commit 31943f4c53358cf42fda68140539e8149d9b60a7 Author: lisong <377344020@qq.com> Date: Tue Dec 28 11:12:24 2021 +0800 初始代码 diff --git a/333.htaccess b/333.htaccess new file mode 100755 index 0000000..907fbef --- /dev/null +++ b/333.htaccess @@ -0,0 +1,7 @@ + +Options +FollowSymlinks -Multiviews +RewriteEngine on +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME} !-f +RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1] + \ No newline at end of file diff --git a/404.html b/404.html new file mode 100755 index 0000000..99ff94f --- /dev/null +++ b/404.html @@ -0,0 +1,26 @@ + + + + + + +404 + + + + +

404,您请求的文件不存在!

+ + diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100755 index 0000000..574a39c --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,32 @@ + +ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 +版权所有Copyright © 2006-2016 by ThinkPHP (http://thinkphp.cn) +All rights reserved。 +ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 + +Apache Licence是著名的非盈利开源组织Apache采用的协议。 +该协议和BSD类似,鼓励代码共享和尊重原作者的著作权, +允许代码修改,再作为开源或商业软件发布。需要满足 +的条件: +1. 需要给代码的用户一份Apache Licence ; +2. 如果你修改了代码,需要在被修改的文件中说明; +3. 在延伸的代码中(修改和有源代码衍生的代码中)需要 +带有原来代码中的协议,商标,专利声明和其他原来作者规 +定需要包含的说明; +4. 如果再发布的产品中包含一个Notice文件,则在Notice文 +件中需要带有本协议内容。你可以在Notice中增加自己的 +许可,但不可以表现为对Apache Licence构成更改。 +具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0 + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/README.md b/README.md new file mode 100755 index 0000000..941e4da --- /dev/null +++ b/README.md @@ -0,0 +1,45 @@ + +## 功能一览 +### 登录模块 +- token验证 +- 图形验证码 +- 极验滑动验证 +### 轮播模块 +- 轮播管理 +### 用户模块 +- 用户管理 +- 用户等级管理 +### 新闻模块 +- 文章管理 +- 文章分类管理 +- 标签管理 +### 商城模块 +- 品牌管理 +- 商品管理 +- 商品分类管理 +- 订单管理 +- 快递管理 +- 收货地址管理 +### 杂项演示 +- 邮件发送 +- 短信发送 +- 二维码生成 +### 微信模块 +- 服务端验证 +- 接收 & 回复用户消息 +- 获取用户信息 +- 发送模版消息 +- 统一下单 +- 更多... +### 人事管理 +- 员工管理 +- 部门管理 +- 职位管理 +### 系统管理 +- 用户管理 +- 角色管理 +- 菜单管理 +- 操作日志 +- 个人资料 +- 代码生成 +3333333444 diff --git a/application/admin/common.php b/application/admin/common.php new file mode 100755 index 0000000..8da7352 --- /dev/null +++ b/application/admin/common.php @@ -0,0 +1,141 @@ +isPost()) { + $url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : url($url); + $result = [ + 'code' => $code, + 'msg' => $msg, + 'data' => $data, + 'url' => $url, + 'wait' => $wait, + ]; + $response = Response::create($result, 'json')->header($header); + throw new HttpResponseException($response); + } + + + if ($url === null) { + $url = request()->server('HTTP_REFERER') ?? 'admin/index/index'; + } + + $response = new Redirect($url); + + $response->code(302)->params($data)->with([$code ? 'success_message' : 'error_message' => $msg, 'url' => $url]); + + throw new HttpResponseException($response); + } +} + +if(!function_exists('goods_imgs_upload')){ + /** + * 简单对称加密算法之解密 + * @param String $union_id 指定id + * @param String $type 类型 + * @param String $ori_img 原图 + * @param String $thumb_img 缩略图 + * @param String $ori_fm_img 原图封面 + * @param String $thumb_img_f 缩略图封面 + * @param String $goods_imgs 编辑时数据库中图片 + * @date 20190906 + * @return li + */ + //上传商品图片 + function goods_imgs_upload($union_id,$type,$ori_img, $thumb_img,$ori_fm_img,$thumb_img_f,$goods_imgs=array()) + { + $_goodsimgsModel= new MallImage(); + //$tps = C('TMPL_PARSE_STRING'); + $inequality_img=array(); + if($ori_img){ + $ori_img_ys=array(); + if($goods_imgs){ + foreach ($goods_imgs as $key=> $v){ + $ori_img_ys[$v['id']]=$v['ori_image']; + $goods_imgs[$v['id']]=$v; + } + $inequality_img = array_diff($ori_img_ys,$ori_img);//前端踢掉的图片 + } + foreach ($ori_img as $key=> $v){ + if(in_array($v,$ori_img_ys,TRUE)){ + if($v==$ori_fm_img && $thumb_img_f=$thumb_img[$key]){ + $data3['is_cover']=1; + }else{ + $data3['is_cover']=0; + } + $_goodsimgsModel->where(array('ori_image'=>$v))->update($data3); + continue; + } + $ori_img_url=trim($v); + if(!$ori_img_url){ + $array = array( + 'code' =>400, + 'msg' =>'上传文件处理失败', + ); + return $array; + } + $thumb_img_url=trim($thumb_img[$key]); + if(!$thumb_img_url){ + $array = array( + 'code' =>400, + 'msg' =>'上传文件处理失败', + ); + return $array; + } + $data1['ori_image']=$yu_url=$ori_img_url; + $data1['thumb_image']=$slt_url=$thumb_img_url; + if($v==$ori_fm_img && $thumb_img_f=$thumb_img[$key]){ + $data1['is_cover']=1; + }else{ + $data1['is_cover']=0; + } + $data1['type']=$type; + $data1['union_id']=$union_id; + $_goodsimgsModel::create($data1); + } + if($inequality_img){ + foreach ($inequality_img as $key1=> $v1){ + $mag=Db::table('mall_image')->where('id',$key1)->delete(); + if($mag){ + $ori_image_del=Env::get('root_path').'public'.$goods_imgs[$key1]['ori_image']; + if(file_exists($ori_image_del)) + { + unlink($ori_image_del); + } + $thumb_image_del=Env::get('root_path').'public'.$goods_imgs[$key1]['thumb_image']; + if(file_exists($thumb_image_del)) + { + unlink($thumb_image_del); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/application/admin/controller/AccountLogController.php b/application/admin/controller/AccountLogController.php new file mode 100755 index 0000000..328bb39 --- /dev/null +++ b/application/admin/controller/AccountLogController.php @@ -0,0 +1,53 @@ +SOURCE_TYPE; + $param = $request->param(); + + $where = []; + if(isset($param['source_type']) && $param['source_type']){ + $source_type = $param['source_type']; + $where[] = ['source_type','in',$source_type]; + } + + if(isset($param['keyword']) && $param['keyword']){ + $where[] = [$param['keyword_type'],'like','%'.$param['keyword'].'%']; + } + if (isset($param['start_time']) && $param['start_time'] && isset($param['end_time']) && $param['end_time']) { + $where[] = ['al.create_time', 'between', [strtotime($param['start_time']), strtotime($param['end_time'])]]; + } + $model = $model + ->alias('al') + ->field('al.*,u.mobile,u.nickname,u.sn as user_sn,u.avatar') + ->join('user u', 'u.id = al.user_id') + ->where($where) + ->scope('where', $param); + + $data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]); + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + 'source_type_list'=>$SOURCE_TYPE, + ]); + return $this->fetch(); + } +} diff --git a/application/admin/controller/AdminLogController.php b/application/admin/controller/AdminLogController.php new file mode 100755 index 0000000..31b71bc --- /dev/null +++ b/application/admin/controller/AdminLogController.php @@ -0,0 +1,53 @@ + + */ + +namespace app\admin\controller; + +use app\admin\model\AdminLog; +use app\admin\model\AdminUser; +use think\Request; + +class AdminLogController extends Controller +{ + + public function index(Request $request, AdminLog $model) + { + + $param = $request->param(); + $data = $model->where(function ($query) use ($param) { + if (isset($param['create_time_range']) && !empty($param['create_time_range'])) { + $range = explode(' - ', $param['create_time_range']); + $query->whereTime('create_time', 'between', $range); + } + }) + ->scope('where', $param) + ->paginate($this->admin['per_page'], false, ['query' => $request->get()]); + + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + 'admin_user_list' => AdminUser::all(), + ]); + + return $this->fetch(); + } + + //日志详情 + public function view($id, AdminLog $model) + { + $data = $model::get($id); + $this->assign([ + 'data' => $data + ]); + return $this->fetch(); + } + + +} diff --git a/application/admin/controller/AdminMenuController.php b/application/admin/controller/AdminMenuController.php new file mode 100755 index 0000000..c8a061e --- /dev/null +++ b/application/admin/controller/AdminMenuController.php @@ -0,0 +1,171 @@ + + */ + +namespace app\admin\controller; + +use think\Request; +use app\admin\model\AdminMenu; +use app\admin\validate\AdminMenuValidate; + +class AdminMenuController extends Controller +{ + + public function index(AdminMenu $model) + { + //查询所有菜单并以树的形式显示 + $result = $model->order('sort_id asc, id asc')->column('*', 'id'); + foreach ($result as $n => $r) { + $result[$n]['level'] = $this->getLevel($r['id'], $result); + $result[$n]['parent_id_node'] = $r['parent_id'] ? ' class="child-of-node-' . $r['parent_id'] . '"' : ''; + $result[$n]['str_manage'] = ' '; + $result[$n]['str_manage'] .= ' ' . $r['id'] . ' 的数据吗\' data-toggle="tooltip" title="删除">'; + $result[$n]['is_show'] = (int)$r['is_show'] === 1 ? '显示' : '隐藏'; + $result[$n]['log_method'] = $r['log_method']; + } + + $str = " + \$id\$spacer\$name\$url + \$parent_id(\$icon) + \$sort_id\$is_show\$log_method\$str_manage"; + + $this->initTree($result); + $data = $this->getTree(0, $str); + $this->assign('data', $data); + return $this->fetch('index'); + } + + public function add(Request $request, AdminMenu $model, AdminMenuValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $result = $model::create($param); + + //如果 + if (isset($param['is_more']) && $param['is_more'] == 1) { + $name = $param['more_name']; + $url = explode('/', $param['url']); + $str = '/'; + $data = [ + [ + 'parent_id' => $result->id, + 'name' => '添加' . $name, + 'url' => $url[0] . $str . $url[1] . $str . 'add', + 'icon' => 'fa-plus', + 'is_show' => 0, + 'log_method' => 'POST', + ], + [ + 'parent_id' => $result->id, + 'name' => '修改' . $name, + 'url' => $url[0] . $str . $url[1] . $str . 'edit', + 'icon' => 'fa-pencil', + 'is_show' => 0, + 'log_method' => 'POST', + ], + [ + 'parent_id' => $result->id, + 'name' => '删除' . $name, + 'url' => $url[0] . $str . $url[1] . $str . 'del', + 'icon' => 'fa-trash', + 'is_show' => 0, + 'log_method' => 'POST', + ] + ]; + + $model->saveAll($data); + + } + unset($url); + $url = URL_BACK; + if (isset($param['_create']) && $param['_create'] == 1) { + $url = URL_RELOAD; + } + + return $result ? success('添加成功', $url) : error(); + } + + $parent_id = $request->param('parent_id') ?? 0; + $parents = $this->menu($parent_id); + $this->assign([ + 'parents' => $parents, + 'log_method' => $model->logMethod + ]); + + return $this->fetch(); + } + + public function edit($id, Request $request, AdminMenu $model, AdminMenuValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $data->save($param); + return $result ? success() : error(); + } + + $parent_id = $data->parent_id; + $parents = $this->menu($parent_id); + $this->assign([ + 'data' => $data, + 'parents' => $parents, + 'log_method' => $model->logMethod, + ]); + return $this->fetch('add'); + } + + public function del($id, Request $request, AdminMenu $model) + { + //判断是否有子菜单 + $have_son = $model->whereIn('parent_id', $id)->find(); + if ($have_son) { + return error('有子菜单不可删除!'); + } + + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + + } + + //菜单选择 select树形选择 + protected function menu($selected = 1, $current_id = 0) + { + $result = AdminMenu::where('id', '<>', $current_id)->order('sort_id', 'asc')->order('id', 'asc')->column('id,parent_id,name,sort_id', 'id'); + foreach ($result as $r) { + $r['selected'] = (int)$r['id'] === (int)$selected ? 'selected' : ''; + } + $str = ""; + $this->initTree($result); + return $this->getTree(0, $str, $selected); + } + +} \ No newline at end of file diff --git a/application/admin/controller/AdminRoleController.php b/application/admin/controller/AdminRoleController.php new file mode 100755 index 0000000..774cdb3 --- /dev/null +++ b/application/admin/controller/AdminRoleController.php @@ -0,0 +1,190 @@ + + */ + +namespace app\admin\controller; + +use app\admin\model\AdminMenu; +use app\admin\model\AdminRole; +use app\admin\validate\AdminRoleValidate; +use think\Request; + +class AdminRoleController extends Controller +{ + + public function index(Request $request, AdminRole $model) + { + + $param = $request->param(); + $data = $model->scope('where', $param) + ->paginate($this->admin['per_page'], false, ['query' => $request->get()]); + + //关键词,排序等赋值 + $this->assign($request->get()); + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, AdminRole $model, AdminRoleValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $result = $model::create($param); + + $url = URL_BACK; + if (isset($param['_create']) && $param['_create'] == 1) { + $url = URL_RELOAD; + } + + return $result ? success('添加成功', $url) : error(); + } + + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, AdminRole $model, AdminRoleValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $data->save($param); + return $result ? success() : error(); + } + + $this->assign([ + 'data' => $data + ]); + return $this->fetch('add'); + + } + + //删除 + public function del($id, AdminRole $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + //角色授权 + public function access($id, Request $request, AdminRole $model) + { + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + if (!isset($param['url'])) { + return error('请至少选择一项权限'); + } + if (!in_array(1, $param['url'])) { + return error('首页权限必选'); + } + + if (false !== $data->save($param)) { + return success(); + } + return error(); + } + + $menu = AdminMenu::order('sort_id', 'asc')->order('id', 'asc')->column('*', 'id'); + $html = $this->authorizeHtml($menu, $data->url); + + $this->assign([ + 'data' => $data, + 'html' => $html, + ]); + + return $this->fetch(); + } + + //启用 + public function enable($id, AdminRole $model) + { + $result = $model->whereIn('id', $id)->update(['status' => 1]); + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + //禁用 + public function disable($id, AdminRole $model) + { + $result = $model->whereIn('id', $id)->update(['status' => 0]); + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + + //生成授权html + protected function authorizeHtml($menu, $auth_menus = []) + { + foreach ($menu as $n => $t) { + $menu[$n]['checked'] = in_array($t['id'], $auth_menus) ? ' checked' : ''; + $menu[$n]['level'] = $this->getLevel($t['id'], $menu); + $menu[$n]['width'] = 100 - $menu[$n]['level']; + } + + $this->initTree($menu); + $this->text = [ + 'other' => "", + '0' => [ + '0' => "
+
+ +
+
", + '1' => '
', + ], + '1' => [ + '0' => " + +
", + '1' => "
", + ] + ]; + return $this->getAuthTreeAccess(0); + } +} diff --git a/application/admin/controller/AdminUserController.php b/application/admin/controller/AdminUserController.php new file mode 100755 index 0000000..e499ea7 --- /dev/null +++ b/application/admin/controller/AdminUserController.php @@ -0,0 +1,170 @@ + + */ + +namespace app\admin\controller; + +use app\common\model\Attachment; +use think\Request; +use app\admin\model\AdminRole; +use app\admin\model\AdminUser; +use app\admin\validate\AdminUserValidate; + +class AdminUserController extends Controller +{ + + //列表 + public function index(Request $request, AdminUser $model) + { + + $param = $request->param(); + $data = $model->scope('where', $param) + ->paginate($this->admin['per_page'], false, ['query' => $request->get()]); + + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, AdminUser $model, AdminUserValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $result = $model::create($param); + + $url = URL_BACK; + if (isset($param['_create']) && $param['_create'] == 1) { + $url = URL_RELOAD; + } + + return $result ? success('添加成功', $url) : error(); + } + + $role = AdminRole::all(function ($query) { + $query->column('id,name', 'id'); + }); + $this->assign([ + 'role' => $role + ]); + + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, AdminUser $model, AdminUserValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $data->save($param); + return $result ? success() : error(); + } + + $role = AdminRole::all(function ($query) { + $query->column('id,name', 'id'); + }); + + $this->assign([ + 'data' => $data, + 'role' => $role + ]); + return $this->fetch('add'); + + } + + + //删除 + public function del($id, AdminUser $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + + //启用 + public function enable($id, AdminUser $model) + { + $result = $model->whereIn('id', $id)->update(['status' => 1]); + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + //禁用 + public function disable($id, AdminUser $model) + { + $result = $model->whereIn('id', $id)->update(['status' => 0]); + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + //个人资料 + public function profile(Request $request, AdminUser $model, AdminUserValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + if ($param['update_type'] === 'password') { + + $validate_result = $validate->scene('password')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + if (!password_verify($param['password'], $this->user->password)) { + return error('当前密码不正确'); + } + $param['password'] = $param['new_password']; + } else if ($param['update_type'] === 'avatar') { + if (!$request->file('avatar')) { + return error('请上传新头像'); + } + $attachment = new Attachment(); + $file = $attachment->upload('avatar'); + if ($file) { + $param['avatar'] = $file->url; + } else { + return error($attachment->getError()); + } + } + if (false !== $this->user->save($param)) { + return success('修改成功', URL_RELOAD); + } + return error(); + } + + return $this->fetch(); + } + + +} diff --git a/application/admin/controller/AuthController.php b/application/admin/controller/AuthController.php new file mode 100755 index 0000000..9de008f --- /dev/null +++ b/application/admin/controller/AuthController.php @@ -0,0 +1,151 @@ + + */ + +namespace app\admin\controller; + +use Exception; +use think\captcha\Captcha; +use think\Request; +use app\admin\model\AdminUser; +use app\admin\validate\AdminUserValidate; +use tools\GeeTest; + +class AuthController extends Controller +{ + + protected $authExcept = [ + 'admin/auth/login', + 'admin/auth/logout', + 'admin/auth/captcha', + 'admin/auth/initgeetest', + + ]; + + //登录 + public function login(Request $request, AdminUser $model, AdminUserValidate $validate) + { + if ($request->isPost()) { + + $login_config = config('admin.login'); + + $param = $request->param(); + + //如果需要验证码 + if ($login_config['captcha'] > 0) { + + if ($login_config['captcha'] == 1) { + if (!captcha_check($param['captcha'])) { + return error('验证码错误'); + } + } else if ($login_config['captcha'] == 2) { + + $config = config('geetest.'); + $geeTest = new GeeTest($config['id'], $config['key']); + + $data = array( + 'user_id' => session('gt_uid'), + 'client_type' => 'web', + 'ip_address' => $request->ip(), + ); + if (session('gt_server') == 1) { + $gee_test_result = $geeTest->successValidate($param['geetest_challenge'], $param['geetest_validate'], $param['geetest_seccode'], $data); + if (!$gee_test_result) { + return error('验证失败'); + } + } else { + if (!$geeTest->failValidate($param['geetest_challenge'], $param['geetest_validate'])) { + return error('验证失败'); + } + } + } + } + + $validate_result = $validate->scene('login')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + //如果需要验证登录token + if ($login_config['token']) { + $token_validate = \think\Validate::make(); + $token_validate_result = $token_validate->rule('__token__', 'token') + ->check($param); + if (!$token_validate_result) { + return error($token_validate->getError()); + } + } + + try { + $user = $model::login($param); + } catch (Exception $e) { + return error($e->getMessage()); + } + + $remember = isset($param['remember']) ? true : false; + self::authLogin($user, $remember); + + $redirect = session('redirect') ?? url('admin/index/index'); + + return success('登录成功', $redirect); + } + $this->admin['title'] = '登录'; + + $this->assign([ + //登录设置,参考/config/admin/admin.php文件配置 + 'login_config' => config('admin.login'), + ]); + + return $this->fetch(); + } + + //退出 + public function logout() + { + self::authLogout(); + return redirect(url('admin/auth/login')); + } + + + //极验初始化 + public function initGeeTest(Request $request) + { + + $config = config('geetest.'); + $geeTest = new GeeTest($config['id'], $config['key']); + + $ip = $request->ip(); + $ug = $request->header('user-agent'); + + $data = array( + + 'gt_uid' => md5($ip . $ug), + 'client_type' => 'web', + 'ip_address' => $ip, + ); + + $status = $geeTest->preProcess($data); + + session('gt_server', $status); + session('gt_uid', $data['gt_uid']); + + return success($status, URL_CURRENT, $geeTest->getResponse()); + } + + //ThinkPHP 图形验证码 + public function captcha() + { + $config = [ + // 验证码字体大小 + 'fontSize' => 30, + // 验证码位数 + 'length' => 4, + // 关闭验证码杂点 + 'useNoise' => false, + ]; + $captcha = new Captcha($config); + return $captcha->entry(); + } +} diff --git a/application/admin/controller/ConsignmentOrderController.php b/application/admin/controller/ConsignmentOrderController.php new file mode 100755 index 0000000..bf1e114 --- /dev/null +++ b/application/admin/controller/ConsignmentOrderController.php @@ -0,0 +1,438 @@ +param(); + $where = []; + //订单搜素 + if (!empty($param['search_key']) && !empty($param['keyword'])) { + $keyword = $param['keyword']; + switch ($param['search_key']) { + case 'order_sn': + $where[] = ['o.order_sn', 'like', '%' . $keyword . '%']; + break; + case 'user_sn': + $where[] = ['u.sn', 'like', '%' . $keyword . '%']; + break; + case 'nickname': + $where[] = ['u.nickname', 'like', '%' . $keyword . '%']; + break; + case 'user_mobile': + $where[] = ['u.mobile', 'like', '%' . $keyword . '%']; + break; + } + } + + //商品名称 + if (isset($param['goods_name']) && $param['goods_name'] != '') { + $where[] = ['g.goods_name', 'like', '%' . $param['goods_name'] . '%']; + } + + //订单类型 + if (isset($param['order_type']) && $param['order_type'] != '') { + $where[] = ['o.order_status', '=', $param['order_type']]; + } + + //下单时间 + if (isset($param['start_time']) && $param['start_time'] != '') { + $where[] = ['o.create_time', '>=', strtotime($param['start_time'])]; + } + if (isset($param['end_time']) && $param['end_time'] != '') { + $where[] = ['o.create_time', '<=', strtotime($param['end_time'])]; + } + $model = $model + ->alias('o') + ->field('o.*,u.mobile,u.nickname,u.sn,u.avatar') + ->join('user u', 'u.id = o.user_id') + ->join('consignment_order_goods g', 'g.order_id = o.id') + ->with(['consignment_order_goods']) + ->append(['delivery_address']) + ->where($where) + ->order('o.id desc') + ->group('o.id') + ->scope('where', $param); + + $data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]); + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + /** + * Desc: 订单详情 + */ + public function detail($id, Request $request, ConsignmentOrder $model, MallImage $mimodel) + { + $order = new ConsignmentOrder(); + $data = $order + ->with(['user', 'consignment_order_goods','logs']) + ->where('id', $id) + ->find(); + foreach ($data['consignment_order_goods'] as &$consignment_order_goods){ + $mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select(); + $consignment_order_goods['img_list']=$mi_list; + } + $this->assign([ + 'detail' => $data, + ]); + return $this->fetch(); + } + + /** + * Desc: 订单审核 + */ + public function examine($id, Request $request, ConsignmentOrder $model, MallImage $mimodel) + { + $order = new ConsignmentOrder(); + $data = $order + ->with(['user', 'consignment_order_goods','logs']) + ->where('id', $id) + ->find(); + foreach ($data['consignment_order_goods'] as &$consignment_order_goods){ + $mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select(); + $consignment_order_goods['img_list']=$mi_list; + } + $this->assign([ + 'detail' => $data, + ]); + return $this->fetch(); + } + + + /** + * Desc: 同意 + */ + public function agree(Request $request) + { + if ($this->request->isAjax()) { + $param = $request->param(); + // 启动事务 + ConsignmentOrderGoods::startTrans(); + try{ + $order_goods = ConsignmentOrderGoods::get(['id' => $param['id']]); + $order_goods->refund_status = 1; + $order_goods->evaluation_price =$param['evaluation_price']; + $order_goods->save(); + $goods_count=ConsignmentOrderGoods::where(array('order_id'=>$order_goods['order_id'],'refund_status'=>0))->count(); + $quanbu=0; + if($goods_count==0){ + $order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]); + $order->order_status = 3; + $order->total_amount =$order['total_amount']+$param['evaluation_price']; + $order->update_time = time(); + $order->save(); + //记录日志 + ConsignmentOrderLog::record( + $order['id'], + '平台已估价' + ); + $data_info=[ + 'user_id' => $order['user_id'], + 'jm_order_id' => $order['id'], + 'scene' =>102, + 'time' => date('Y-m-d H:i:s') + ]; + Notice::noticeByScene($order['user_id'],$data_info); + $quanbu=1; + } + // 提交事务 + ConsignmentOrderGoods::commit(); + }catch(\Exception $e){ + // 回滚事务 + ConsignmentOrderGoods::rollback(); + return error($e->getMessage()); + } + return success('操作成功','',$quanbu); + } + } + + /** + * Desc: 拒绝 + */ + public function refuse(Request $request, ConsignmentOrder $model) + { + if ($this->request->isAjax()) { + $param = $request->param(); + // 启动事务 + ConsignmentOrderGoods::startTrans(); + try{ + $order_goods = ConsignmentOrderGoods::get(['id' => $param['id']]); + $order_goods->refund_status = 2; + $order_goods->refund_remarks =$param['remark']; + $order_goods->save(); + $goods_count=ConsignmentOrderGoods::where(array('order_id'=>$order_goods['order_id'],'refund_status'=>0))->count(); + $quanbu=0; + if($goods_count==0){ + $order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]); + $order->order_status = 1; + $order->update_time = time(); + $order->save(); + //记录日志 + ConsignmentOrderLog::record( + $order['id'], + '平台已估价' + ); + $data_info=[ + 'user_id' => $order['user_id'], + 'jm_order_id' => $order['id'], + 'scene' =>102, + 'time' => date('Y-m-d H:i:s') + ]; + Notice::noticeByScene($order['user_id'],$data_info); + $quanbu=1; + } + // 提交事务 + ConsignmentOrderGoods::commit(); + }catch(\Exception $e){ + // 回滚事务 + ConsignmentOrderGoods::rollback(); + return error($e->getMessage()); + } + return success('操作成功','',$quanbu); + } + } + + /** + * Desc: 订单取货 + */ + public function pickup($id, Request $request, ConsignmentOrder $model, MallImage $mimodel) + { + $order = new ConsignmentOrder(); + $data = $order + ->with(['user', 'consignment_order_goods','logs']) + ->where('id', $id) + ->find(); + foreach ($data['consignment_order_goods'] as &$consignment_order_goods){ + $mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select(); + $consignment_order_goods['img_list']=$mi_list; + } + $this->assign([ + 'detail' => $data, + ]); + return $this->fetch(); + } + + + /** + * Desc: 取货操作 + */ + public function pickuphandle(Request $request, ConsignmentOrder $model, OrderValidate $validate) + { + if ($request->isAjax()) { + $param = $request->param(); + $validate_result = $validate->scene('hansle')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $order_id = $param['order_id']; + $order = ConsignmentOrder::get(['id' => $order_id]); + if ($order['order_status']!='4'){ + return error('该订单状态下,无法进行取货操作'); + } + // 启动事务 + ConsignmentOrder::startTrans(); + try{ + //更新订单下商品的发货状态 + $order->update_time = time(); + $order->order_status = 5; + $order->save(); + + //记录日志 + ConsignmentOrderLog::record( + $order['id'], + '平台安排取货', + '物流公司:'.$param['invoice_name'].',物流单号:'.$param['invoice_no'] + ); + + $data_info=[ + 'user_id' => $order['user_id'], + 'jm_order_id' => $order['id'], + 'scene' =>103, + 'shipping_name' => $param['invoice_name'], + 'invoice_no' => $param['invoice_no'], + 'time' => date('Y-m-d H:i:s') + ]; + Notice::noticeByScene($order['user_id'],$data_info); + // 提交事务 + ConsignmentOrder::commit(); + }catch(\Exception $e){ + // 回滚事务 + ConsignmentOrder::rollback(); + return error($e->getMessage()); + } + return success('操作成功'); + } + } + + /** + * Desc: 订单商品退回 + */ + public function return($id, Request $request, ConsignmentOrder $model, MallImage $mimodel) + { + $order = new ConsignmentOrder(); + $data = $order + ->with(['user', 'consignment_order_goods','logs']) + ->where('id', $id) + ->find(); + foreach ($data['consignment_order_goods'] as &$consignment_order_goods){ + $mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select(); + $consignment_order_goods['img_list']=$mi_list; + } + $this->assign([ + 'detail' => $data, + ]); + return $this->fetch(); + } + + /** + * Desc: 退回操作 + */ + public function returnhandle(Request $request) + { + if ($this->request->isAjax()) { + $param = $request->param(); + // 启动事务 + ConsignmentOrderGoods::startTrans(); + try{ + $order_goods = ConsignmentOrderGoods::get(['id' => $param['id']]); + $order_goods->refund_status = 3; + $order_goods->refund_remarks ='物流公司:'.$param['invoice_name'].',物流单号:'.$param['invoice_no']; + $order_goods->save(); + $goods_count=ConsignmentOrderGoods::where(array('order_id'=>$order_goods['order_id'],'refund_status'=>1))->count(); + $order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]); + $order->order_status = 6; + $quanbu=0; + if($goods_count==0){ + $quanbu=1; + $order->order_status = 7; + } + $order->total_amount =$order['total_amount']-$order_goods['evaluation_price']; + $order->update_time = time(); + $order->save(); + + //记录日志 + ConsignmentOrderLog::record( + $order['id'], + '平台退回商品', + '商品名称:'.$order_goods['goods_name'].',物流公司:'.$param['invoice_name'].',物流单号:'.$param['invoice_no'] + ); + $data_info=[ + 'user_id' => $order['user_id'], + 'jm_order_id' => $order['id'], + 'scene' =>104, + 'shipping_name' => $param['invoice_name'], + 'invoice_no' => $param['invoice_no'], + 'time' => date('Y-m-d H:i:s') + ]; + Notice::noticeByScene($order['user_id'],$data_info); + // 提交事务 + ConsignmentOrderGoods::commit(); + }catch(\Exception $e){ + // 回滚事务 + ConsignmentOrderGoods::rollback(); + return error($e->getMessage()); + } + return success('操作成功','',$quanbu); + } + } + + /** + * Desc: 订单商品上架 + */ + public function shelves($id, Request $request, ConsignmentOrder $model, MallImage $mimodel) + { + $order = new ConsignmentOrder(); + $data = $order + ->with(['user', 'consignment_order_goods','logs']) + ->where('id', $id) + ->find(); + foreach ($data['consignment_order_goods'] as &$consignment_order_goods){ + $mi_list=$mimodel->where(array('union_id'=>$consignment_order_goods['id'],'type'=>2))->select(); + $consignment_order_goods['img_list']=$mi_list; + } + $this->assign([ + 'detail' => $data, + ]); + return $this->fetch(); + } + + /** + * Desc: 上架操作 + */ + public function shelveshandle(Request $request) + { + if ($this->request->isAjax()) { + $param = $request->param(); + $order_goods = ConsignmentOrderGoods::get(['id' => $param['id']]); + $goods = Goods::get(['code' =>$param['goods_sn']]); + if(!$goods){ + return error('该商品未上架,无法找到给商品信息'); + } + $goods_l_count=ConsignmentOrderGoods::where(array('goods_id'=>$goods['id']))->count(); + if($goods_l_count>0){ + return error('该商品已上架,无需重复上架该商品'); + } + // 启动事务 + ConsignmentOrderGoods::startTrans(); + try{ + $order_goods->refund_status = 4; + $order_goods->goods_id =$goods['id']; + $order_goods->save(); + $goods_count=ConsignmentOrderGoods::where(array('order_id'=>$order_goods['order_id'],'refund_status'=>1))->count(); + $order = ConsignmentOrder::get(['id' =>$order_goods['order_id']]); + $quanbu=0; + if($goods_count==0){ + $quanbu=1; + $order->order_status = 2; + $order->update_time = time(); + $order->save(); + } + //记录日志 + ConsignmentOrderLog::record( + $order['id'], + '平台上架商品', + '商品名称:'.$order_goods['goods_name'] + ); + $data_info=[ + 'user_id' => $order['user_id'], + 'jm_order_id' => $order['id'], + 'scene' =>105, + 'time' => date('Y-m-d H:i:s') + ]; + Notice::noticeByScene($order['user_id'],$data_info); + // 提交事务 + ConsignmentOrderGoods::commit(); + }catch(\Exception $e){ + // 回滚事务 + ConsignmentOrderGoods::rollback(); + return error($e->getMessage()); + } + return success('操作成功','',$quanbu); + } + } +} diff --git a/application/admin/controller/Controller.php b/application/admin/controller/Controller.php new file mode 100755 index 0000000..a331641 --- /dev/null +++ b/application/admin/controller/Controller.php @@ -0,0 +1,147 @@ + + */ + +namespace app\admin\controller; + +use app\admin\model\AdminMenu; +use app\admin\model\AdminUser; +use app\admin\traits\{AdminAuth, AdminTree, PhpOffice}; + +class Controller extends \think\Controller +{ + use AdminAuth, AdminTree, PhpOffice; + + + /** + * 当前url + * @var string + */ + protected $url; + + /** + * 当前用户ID + * @var int + */ + protected $uid = 0; + + /** + * 当前用户 + * @var AdminUser + */ + protected $user; + + + /** + * 后台变量 + * @var array + */ + protected $admin; + + /** + * 无需验证权限的url + * @var array + */ + protected $authExcept = [ + 'admin/auth/login', + 'admin/auth/logout', + 'admin/editor/server', + ]; + + //初始化基础控制器 + protected function initialize() + { + $request = $this->request; + //获取当前访问url + $this->url = parse_name($request->module()) . '/' . + parse_name($request->controller()) . '/' . + parse_name($request->action()); + + //验证权限 + if (!in_array($this->url, $this->authExcept)) { + + if (!$this->isLogin()) { + error('未登录', 'auth/login'); + } else if ($this->user->id !== 1 && !$this->authCheck($this->user)) { + error('无权限', $this->request->isGet() ? null : URL_CURRENT); + } + } + + if ((int)$request->param('check_auth') === 1) { + success(); + } + + //记录日志 + $menu = AdminMenu::get(['url' => $this->url]); + if ($menu) { + $this->admin['title'] = $menu->name; + if ($menu->log_method === $request->method()) { + $this->createAdminLog($this->user, $menu); + } + } + + $this->admin['per_page'] = cookie('admin_per_page') ?? 10; + $this->admin['per_page'] = $this->admin['per_page'] < 100 ? $this->admin['per_page'] : 100; + } + + + //重写fetch + protected function fetch($template = '', $vars = [], $config = []) + { + + $this->admin['pjax'] = $this->request->isPjax(); + + + $this->admin['user'] = $this->user; + + $this->setAdminInfo(); + + if (!$this->admin['pjax'] && 'admin/auth/login' !== $this->url) { + $this->admin['menu'] = $this->getLeftMenu($this->user); + } + + $this->assign('debug', config('app.app_debug') ? 'true' : 'false'); + $this->assign('cookie_prefix', config('cookie.prefix') ?? ''); + $this->assign('admin', $this->admin); + return parent::fetch($template, $vars, $config); + } + + //空方法 + public function _empty() + { + $this->admin['title'] = '404'; + return $this->fetch('template/404'); + } + + + //设置前台显示的后台信息 + protected function setAdminInfo() + { + if (!$this->admin['pjax']) { + + $admin_info = [ + 'name' => config('admin.name'), + 'author' => config('admin.author'), + 'version' => config('admin.version'), + 'short_name' => config('admin.short_name'), + ]; + cache('admin_info', json_encode($admin_info), 8640000); + } else { + $admin_info = cache('admin_info'); + if (!$admin_info) { + $admin_info = [ + 'name' => config('admin.name'), + 'author' => config('admin.author'), + 'version' => config('admin.version'), + 'short_name' => config('admin.short_name'), + ]; + } else { + $admin_info = json_decode($admin_info, true); + } + } + + $this->admin = array_merge($this->admin, $admin_info); + } +} diff --git a/application/admin/controller/ErrorController.php b/application/admin/controller/ErrorController.php new file mode 100755 index 0000000..0ab74ca --- /dev/null +++ b/application/admin/controller/ErrorController.php @@ -0,0 +1,17 @@ + + */ + +namespace app\admin\controller; + +class ErrorController extends Controller +{ + public function index() + { + $this->admin['title'] = '404'; + return $this->fetch('template/404'); + } + +} \ No newline at end of file diff --git a/application/admin/controller/FileController.php b/application/admin/controller/FileController.php new file mode 100755 index 0000000..8739bb6 --- /dev/null +++ b/application/admin/controller/FileController.php @@ -0,0 +1,54 @@ + + */ + +namespace app\admin\controller; +use think\facade\Env; +use think\Request; + +class FileController extends Controller +{ + protected $authExcept = [ + 'admin/file/icon', + ]; + //文件列表 + public function index(Request $request) + { + + } + + //文件上传 + public function upload() + { + $file = request()->file('file'); + } + + //上传图片修改 + public function icon(Request $request) + { + $param = $request->param(); + $file = request()->file('image'); + if($file){ + $info = $file->validate(['size'=>10*1024*1024,'ext'=>'jpg,png,gif'])->move(Env::get('root_path').'public/uploads/attachment'); + if($info){ + $data['avatar_logo_thum']=''; + $data['avatar_logo']=''; + if($param['type']==1){ + $width=$param['width'] ?? '200'; + $heigh=$param['heigh'] ?? '200'; + $avatar_thum=thumbnail_img($info,$width,$heigh,'attachment'); + $data['avatar_logo_thum']=$avatar_thum; + } + $data['avatar_logo']='/uploads/attachment/'.$info->getSaveName(); + return success('上传成功','',$data); + }else{ + // 上传失败获取错误信息 + return client_error($file->getError()); + } + }else{ + return client_error('请上传图片'); + } + } +} \ No newline at end of file diff --git a/application/admin/controller/FinanceController.php b/application/admin/controller/FinanceController.php new file mode 100755 index 0000000..1e6aae9 --- /dev/null +++ b/application/admin/controller/FinanceController.php @@ -0,0 +1,24 @@ + + */ + +namespace app\admin\controller; + +use app\admin\model\AdminLog; +use app\admin\model\AdminMenu; +use app\admin\model\AdminRole; +use app\admin\model\AdminUser; +use tools\SystemInfo; +use think\Request; + +class FinanceController extends Controller +{ + public function lists(Request $request) + { + return $this->fetch(); + } + + +} diff --git a/application/admin/controller/GenerateController.php b/application/admin/controller/GenerateController.php new file mode 100755 index 0000000..3ae2d75 --- /dev/null +++ b/application/admin/controller/GenerateController.php @@ -0,0 +1,293 @@ + + */ + +namespace app\admin\controller; + +use app\admin\model\AdminMenu; +use Error; +use Exception; +use generate\field\Ip; +use generate\field\Map; +use generate\field\Province; +use generate\field\Url; +use generate\field\File; +use generate\field\Icon; +use generate\field\Year; +use generate\field\Text; +use generate\field\Date; +use generate\field\Color; +use generate\field\Email; +use generate\field\Field; +use generate\field\Radio; +use generate\field\Image; +use generate\field\Select; +use generate\field\Mobile; +use generate\field\IdCard; +use generate\field\Number; +use generate\field\Editor; +use generate\field\Datetime; +use generate\field\Checkbox; +use generate\field\Password; +use generate\field\Textarea; +use generate\field\YearMonth; +use generate\field\YearRange; +use generate\field\MultiFile; +use generate\field\DateRange; +use generate\field\MultiImage; +use generate\field\SwitchField; +use generate\field\MultiSelect; +use generate\field\DatetimeRange; +use generate\field\YearMonthRange; +use think\Db; +use think\db\Connection; +use think\Request; +use generate\Generate; + +class GenerateController extends Controller +{ + + //首页 + public function index() + { + return $this->fetch(); + } + + //自动生成页面 + public function add() + { + + + $this->assign([ + 'table' => (new Generate())->getTable(), + 'menus' => $this->menu(10000), + ]); + + return $this->fetch(); + } + + //获取表数据 + public function getTable() + { + return success('success', URL_CURRENT, (new Generate())->getTable()); + } + + + public function getMenu() + { + return success('success', URL_CURRENT, (new Generate())->getMenu()); + } + + + //自动生成代码接口 + public function create(Request $request) + { + $param = $request->param(); + + + $data = [ + 'table' => $param['table_name'], + 'cn_name' => $param['cn_name'], + 'menu' => [ + //创建菜单-1为不创建,0为顶级菜单 + 'create' => $param['create_menu'], + 'menu' => $param['create_menu_list'] + ], + 'controller' => [ + 'module' => 'admin', + 'create' => $param['create_controller'] ?? 0, + 'name' => $param['controller_name'], + 'action' => $param['controller_action_list'], + ], + 'model' => [ + 'module' => 'common', + 'create' => $param['create_model'] ?? 0, + 'name' => $param['model_name'], + 'timestamp' => $param['auto_timestamp'] ?? 0, + 'soft_delete' => $param['soft_delete'] ?? 0, + ], + 'validate' => [ + 'module' => 'common', + 'create' => $param['create_validate'] ?? 0, + 'name' => $param['validate_name'], + ], + 'view' => [ + 'enable' => $param['list_enable'] ?? 0, + 'delete' => $param['list_delete'] ?? 0, + 'create' => $param['list_create'] ?? 0, + 'export' => $param['list_export'] ?? 0, + ], + ]; + + + /** + * 字段数据组装 + */ + $field_data = []; + foreach ($param['field_name'] as $key => $value) { + + $field_data[] = [ + //字段名 + 'field_name' => $param['field_name'][$key][0], + //字段类型 + 'field_type' => $param['field_type'][$key][0], + //表单名称/中文名称 + 'form_name' => $param['form_name'][$key][0] ?? '', + //是否为列表字段 + 'is_list' => $param['is_list'][$key][0] ?? 0, + //是否为列表搜索字段 + 'is_search' => $param['is_search'][$key][0] ?? 0, + //是否为表单字段 + 'is_form' => $param['is_form'][$key][0] ?? 0, + //表单类型 + 'form_type' => $param['form_type'][$key][0] ?? 0, + //验证规则 + 'form_validate' => $param['form_validate'][$key] ?? 0, + //默认值 + 'field_default' => $param['field_default'][$key][0] ?? 0, + //获取器/修改器 + 'getter_setter' => $param['getter_setter'][$key][0] ?? 0, + //是否参与列表排序 + 'list_sort' => $param['list_sort'][$key][0] ?? 0, + //验证场景 + 'field_scene' => $param['field_scene'][$key] ?? 0, + //关联 + 'is_relation' => $param['is_relation'][$key][0] ?? 0, + //关联类型 + 'relation_type' => $param['relation_type'][$key][0] ?? 1, + //关联表 + 'relation_table' => $param['relation_table'][$key][0] ?? '', + //关联显示字段 + 'relation_show' => $param['relation_show'][$key][0] ?? 'name', + ]; + } + + $data['data'] = $field_data; + + //已经组装好data,先生成表,再生成模型,验证器,控制器,视图 + $generate = new Generate($data); + $msg = '生成成功'; + $result = false; + try { + $generate->run(); + $result = true; + } catch (Exception $e) { + $msg = $e->getMessage(); + } + + return $result ? success($msg, URL_CURRENT) : error($msg); + } + + + //自动生成form表单字段 + public function form() + { + return $this->fetch(); + } + + //生成表单字段html接口 + public function formField(Request $request) + { + $param = $request->param(); + if (empty($param['form_name']) || empty($param['field_name']) || empty($param['form_type'])) { + return error('信息不完整'); + } + + + $result = false; + + try { + + if ($param['form_type'] === 'switch') { + $param['form_type'] = 'switch_field'; + + } + + $param['field_default'] = ''; + + $class_name = parse_name($param['form_type'], 1); + + $class = '\\generate\\field\\' . $class_name; + $data = $class::create($param); + + $result = true; + + $msg = '生成表单html成功'; + } catch (Exception $exception) { + + $msg = $exception->getMessage(); + } catch (Error $error) { + $msg = $error->getMessage(); + } + + return $result ? success($msg, URL_CURRENT, $data) : error($msg); + } + + + //根据字段返回相关表单类型和验证 + public function getField(Request $request) + { + + $param = $request->param(); + $name = $param['name']; + + $data = (new Generate())->getAll($name); + + return success('success', URL_CURRENT, $data); + + } + + + //获取验证select内容 + + /** + * @param Request $request + * @return \think\response\Json|void + */ + public function getValidateSelect(Request $request) + { + + $param = $request->param(); + + $result = false; + + try { + + if ($param['form_type'] === 'switch') { + $param['form_type'] = 'switch_field'; + } + + $class_name = parse_name($param['form_type'], 1); + + $class = '\\generate\\field\\' . $class_name; + $data = $class::rule(); + + $result = true; + + $msg = '获取字段验证规则成功'; + } catch (Exception $exception) { + + $msg = $exception->getMessage(); + } catch (Error $error) { + $msg = $error->getMessage(); + } + + return $result ? success($msg, URL_CURRENT, $data) : error($msg); + } + + + //菜单选择 + protected function menu($selected = 1, $current_id = 0) + { + $result = AdminMenu::where('id', '<>', $current_id)->order('sort_id', 'asc')->order('id', 'asc')->column('id,parent_id,name,sort_id', 'id'); + foreach ($result as $r) { + $r['selected'] = (int)$r['id'] === (int)$selected ? 'selected' : ''; + } + $str = ""; + $this->initTree($result); + return $this->getTree(0, $str, $selected); + } + +} \ No newline at end of file diff --git a/application/admin/controller/GoodsBrandController.php b/application/admin/controller/GoodsBrandController.php new file mode 100755 index 0000000..35c1620 --- /dev/null +++ b/application/admin/controller/GoodsBrandController.php @@ -0,0 +1,107 @@ +param(); + $model = $model->scope('where', $param); + + $data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]); + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, GoodsBrand $model, GoodsBrandValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $model::create($param); + + $url = URL_BACK; + if(isset($param['_create']) && $param['_create']==1){ + $url = URL_RELOAD; + } + + return $result ? success('添加成功',$url) : error(); + } + $this->assign([ + 'capital' => range('A','Z'), + ]); + + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, GoodsBrand $model, GoodsBrandValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $data->save($param); + return $result ? success() : error(); + } + + $this->assign([ + 'data' => $data, + 'capital' => range('A','Z'), + ]); + return $this->fetch('add'); + + } + + //删除 + public function del($id, GoodsBrand $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + +} diff --git a/application/admin/controller/GoodsCategoryController.php b/application/admin/controller/GoodsCategoryController.php new file mode 100755 index 0000000..3a24215 --- /dev/null +++ b/application/admin/controller/GoodsCategoryController.php @@ -0,0 +1,101 @@ +getTreeList($model); + + $this->assign([ + 'data' => $data, + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, GoodsCategory $model, GoodsCategoryValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $model::create($param); + + $url = URL_BACK; + if (isset($param['_create']) && $param['_create'] == 1) { + $url = URL_RELOAD; + } + + return $result ? success('添加成功', $url) : error(); + } + + $this->assign([ + 'cat_list' => $this->getSelectList($model), + ]); + + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, GoodsCategory $model, GoodsCategoryValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $data->save($param); + return $result ? success() : error(); + } + + $this->assign([ + 'data' => $data, + 'cat_list' => $this->getSelectList($model, $data->parent_id), + + ]); + return $this->fetch('add'); + + } + + //删除 + public function del($id, GoodsCategory $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + +} diff --git a/application/admin/controller/GoodsController.php b/application/admin/controller/GoodsController.php new file mode 100755 index 0000000..e4e46b2 --- /dev/null +++ b/application/admin/controller/GoodsController.php @@ -0,0 +1,195 @@ +param(); + $model = $model->with('goods_category')->scope('where', $param); + + $data = $model->paginate($this->admin['per_page'], false, ['query' => $request->get()]); + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, Goods $model,MallImage $mimode,GoodsItem $gimode, GoodsValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $goods_ids=$param['goods_ids']; + $field_data = array(); + foreach ($goods_ids as $key => $value) { + if($param['goods_ids'][$key][0]){ + $field_data[] =$param['goods_ids'][$key][0]; + } + } + $param['collocation_goods']=json_encode(array_unique($field_data)); + + // 启动事务 + $model->startTrans(); + try{ + $model::create($param); + $goods_id=$model->getLastInsID(); + goods_imgs_upload($goods_id,1,$param['ori_img'],$param['thumb_img'],$param['ori_fm_img'],$param['thumb_img_f']); + $gimode->goods_item_upload($goods_id,$param); + // 提交事务 + $model->commit(); + }catch(\Exception $e){ + // 回滚事务 + $model->rollback(); + return error($e->getMessage()); + } + + $url = URL_BACK; + if(isset($param['_create']) && $param['_create']==1){ + $url = URL_RELOAD; + } + + return success('添加成功',$url); + } + $size_list=ShopConfig::get('website', 'size'); + $size_list=explode(',',$size_list); + foreach ($size_list as $key => $value) { + $size[$key]['size']=$value; + $size[$key]['num']=0; + } + $this->assign([ + 'goods_category_list' => $this->getSelectList(new GoodsCategory), + 'brand_list' =>GoodsBrand::all(), + 'imgurl_list'=>array(), + 'number'=>0, + 'collocation_goods'=>array(), + 'size_list' =>$size, + 'goods_list' => Goods::all() + ]); + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, Goods $model ,MallImage $mimode,GoodsItem $gimode, GoodsValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $goods_ids=$param['goods_ids']; + $field_data = array(); + foreach ($goods_ids as $key => $value) { + if($param['goods_ids'][$key][0]){ + $field_data[] =$param['goods_ids'][$key][0]; + } + } + $param['collocation_goods']=json_encode(array_unique($field_data)); + // 启动事务 + $model->startTrans(); + try{ + $data->save($param); + $MallImage=$mimode->where(array('type'=>1,'union_id'=>$id))->select(); + goods_imgs_upload($id,1,$param['ori_img'],$param['thumb_img'],$param['ori_fm_img'],$param['thumb_img_f'],$MallImage); + $gimode->goods_item_upload($id,$param); + // 提交事务 + $model->commit(); + }catch(\Exception $e){ + // 回滚事务 + $model->rollback(); + return error($e->getMessage()); + } + return success(); + } + $ori_img=''; + $thumb_img=''; + $imgurl_list=$mimode->field('thumb_image,ori_image,is_cover')->where(array('type'=>1,'union_id'=>$id))->select(); + foreach ($imgurl_list as $key => $v) { + $is_cover=$v['is_cover']>0 ? $v['is_cover']:'0'; + if ($is_cover == 1) { + $ori_img = $v['ori_image']; + $thumb_img = $v['thumb_image']; + } + } + $collocation_goods=json_decode($data['collocation_goods']); + $goods_item_list=GoodsItem::where(array('goods_id'=>$id))->select(); + $goods_item=array(); + foreach ($goods_item_list as $key => $value) { + $goods_item[$value['spec_value']]=$value['stock']; + } + $size_list=ShopConfig::get('website', 'size'); + $size_list=explode(',',$size_list); + foreach ($size_list as $key => $value) { + $size[$key]['size']=$value; + $num=$goods_item[$value]??'0'; + $size[$key]['num']=$num; + } + $this->assign([ + 'data' => $data, + 'goods_category_list' => $this->getSelectList(new GoodsCategory, $data->goods_category_id), + 'brand_list' =>GoodsBrand::all(), + 'ori_img'=>$ori_img, + 'thumb_img'=>$thumb_img, + 'imgurl_list'=>$imgurl_list, + 'number'=>count($collocation_goods), + 'collocation_goods'=>$collocation_goods, + 'size_list' =>$size, + 'goods_list' => Goods::all() + ]); + return $this->fetch('add'); + + } + + //删除 + public function del($id, Goods $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + +} diff --git a/application/admin/controller/GoodsIndexController.php b/application/admin/controller/GoodsIndexController.php new file mode 100755 index 0000000..4b7aafa --- /dev/null +++ b/application/admin/controller/GoodsIndexController.php @@ -0,0 +1,131 @@ +param(); + $model = $model->scope('where', $param); + + $data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]); + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, GoodsIndex $model, GoodsIndexValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $goods_ids=$param['goods_id']; + $field_data = array(); + foreach ($goods_ids as $key => $value) { + if($param['goods_id'][$key][0]){ + $field_data[] =$param['goods_id'][$key][0]; + } + } + if(count($field_data)=='0'){ + return error('请选择商品'); + } + $param['goods_ids']=json_encode(array_unique($field_data)); + $result = $model::create($param); + + $url = URL_BACK; + if(isset($param['_create']) && $param['_create']==1){ + $url = URL_RELOAD; + } + + return $result ? success('添加成功',$url) : error(); + } + $this->assign([ + 'goods_list' => Goods::all(), + 'number'=>0, + 'goods_ids'=>array() + ]); + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, GoodsIndex $model, GoodsIndexValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $goods_ids=$param['goods_id']; + $field_data = array(); + foreach ($goods_ids as $key => $value) { + if($param['goods_id'][$key][0]){ + $field_data[] =$param['goods_id'][$key][0]; + } + } + if(count($field_data)=='0'){ + return error('请选择商品'); + } + $param['goods_ids']=json_encode(array_unique($field_data)); + $result = $data->save($param); + return $result ? success() : error(); + } + $goods_ids=json_decode($data['goods_ids']); + $this->assign([ + 'data' => $data, + 'number'=>count($goods_ids), + 'goods_list' => Goods::all(), + 'goods_ids'=>$goods_ids + ]); + return $this->fetch('add'); + + } + + //删除 + public function del($id, GoodsIndex $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + +} diff --git a/application/admin/controller/IndexController.php b/application/admin/controller/IndexController.php new file mode 100755 index 0000000..8ddea8f --- /dev/null +++ b/application/admin/controller/IndexController.php @@ -0,0 +1,105 @@ + + */ + +namespace app\admin\controller; + +use app\admin\model\AdminLog; +use app\admin\model\AdminMenu; +use app\admin\model\AdminRole; +use app\admin\model\AdminUser; +use tools\SystemInfo; +use think\Request; +use think\Db; + +class IndexController extends Controller +{ + public function index(Request $request) + { + + + //更新时间 + $time = date('Y-m-d H:i:s', time()); + //今日成交订单 + $order_num_today = Db::name('order') + ->where(['order_status' =>1]) + ->whereTime('create_time', 'today') + ->count(); + //昨日 + $order_num_yesterday = Db::name('order') + ->where(['order_status' =>1]) + ->whereTime('create_time', 'yesterday') + ->count(); + //变化 + $order_num_change = $order_num_today - $order_num_yesterday; + if ($order_num_change >= 0) { + $order_num_change = '+' . $order_num_change; + } + //总 + $order_num_all = Db::name('order') + ->where(['order_status' =>1]) + ->count(); + //今日销售金额(元) + $order_amount_today = Db::name('order') + ->where(['order_status' =>1]) + ->whereTime('create_time', 'today') + ->sum('total_amount'); + //昨日 + $order_amount_yesterday = Db::name('order') + ->where(['order_status' =>1]) + ->whereTime('create_time', 'yesterday') + ->sum('total_amount'); + //总 + $order_amount_all = Db::name('order') + ->where(['order_status' =>1]) + ->sum('total_amount'); + //变化 + $order_amount_change = $order_amount_today - $order_amount_yesterday; + if ($order_amount_change >= 0) { + $order_amount_change = '+' . $order_amount_change; + } + + + // 今天新增会员数量 + $add_user_today = Db::name('user') + ->whereTime('create_time', 'today') + ->count(); + //昨天 + $add_user_yesterday = Db::name('user') + ->whereTime('create_time', 'yesterday') + ->count(); + //总 + $user_all = Db::name('user') + ->count(); + //变化 + $add_change = $add_user_today - $add_user_yesterday; + if ($add_change >= 0) { + $add_change = '+' . $add_change; + } + $date=[ + 'time' => $time, + 'order_num_today' => $order_num_today, + 'order_num_yesterday' => $order_num_yesterday, + 'order_num_change' => $order_num_change, + 'order_amount_today' => $order_amount_today, + 'order_amount_yesterday' => $order_amount_yesterday, + 'order_amount_change' => $order_amount_change, + + 'add_user_today' => $add_user_today, + 'add_user_yesterday' => $add_user_yesterday, + 'add_user_change' => $add_change, + + 'order_num_all' => $order_num_all, + 'order_amount_all' => $order_amount_all, + 'user_all' => $user_all, + ]; + $this->assign([ + 'res'=>$date, + ]); + return $this->fetch(); + } + + +} diff --git a/application/admin/controller/OrderController.php b/application/admin/controller/OrderController.php new file mode 100755 index 0000000..681d169 --- /dev/null +++ b/application/admin/controller/OrderController.php @@ -0,0 +1,161 @@ +param(); + $where = []; + //订单搜素 + if (!empty($param['search_key']) && !empty($param['keyword'])) { + $keyword = $param['keyword']; + switch ($param['search_key']) { + case 'order_sn': + $where[] = ['o.order_sn', 'like', '%' . $keyword . '%']; + break; + case 'user_sn': + $where[] = ['u.sn', 'like', '%' . $keyword . '%']; + break; + case 'nickname': + $where[] = ['u.nickname', 'like', '%' . $keyword . '%']; + break; + case 'user_mobile': + $where[] = ['u.mobile', 'like', '%' . $keyword . '%']; + break; + } + } + + //商品名称 + if (isset($param['goods_name']) && $param['goods_name'] != '') { + $where[] = ['g.goods_name', 'like', '%' . $param['goods_name'] . '%']; + } + + //订单类型 + if (isset($param['order_type']) && $param['order_type'] != '') { + $where[] = ['o.order_status', '=', $param['order_type']]; + } + + //下单时间 + if (isset($param['start_time']) && $param['start_time'] != '') { + $where[] = ['o.create_time', '>=', strtotime($param['start_time'])]; + } + if (isset($param['end_time']) && $param['end_time'] != '') { + $where[] = ['o.create_time', '<=', strtotime($param['end_time'])]; + } + $model = $model + ->alias('o') + ->field('o.*,u.mobile,u.nickname,u.sn,u.avatar') + ->join('user u', 'u.id = o.user_id') + ->join('order_goods g', 'g.order_id = o.id') + ->with(['order_goods']) + ->append(['delivery_address']) + ->where($where) + ->order('o.id desc') + ->group('o.id') + ->scope('where', $param); + + $data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]); + foreach ($data as $key => $value) { + foreach ($value['order_goods'] as &$order_goods){ + $mi_info=$mimodel->where(array('union_id'=>$order_goods['goods_id'],'type'=>1,'is_cover'=>1))->find(); + $order_goods['img']=$mi_info['thumb_image']; + } + } + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + /** + * Desc: 订单详情 + */ + public function detail($id, Request $request, Order $model, MallImage $mimodel) + { + $order = new Order(); + $data = $order + ->with(['user', 'order_goods']) + ->where('id', $id) + ->append(['delivery_address']) + ->find(); + foreach ($data['order_goods'] as &$order_goods){ + $mi_info=$mimodel->where(array('union_id'=>$order_goods['goods_id'],'type'=>1,'is_cover'=>1))->find(); + $order_goods['img']=$mi_info['thumb_image']; + } + $this->assign([ + 'detail' => $data, + ]); + return $this->fetch(); + } + + /** + * Desc: 订单详情 + */ + public function delivery($id, Request $request, Order $model, MallImage $mimodel) + { + $order = new Order(); + $data = $order + ->with(['user', 'order_goods']) + ->where('id', $id) + ->append(['delivery_address']) + ->find(); + foreach ($data['order_goods'] as &$order_goods){ + $mi_info=$mimodel->where(array('union_id'=>$order_goods['goods_id'],'type'=>1,'is_cover'=>1))->find(); + $order_goods['img']=$mi_info['thumb_image']; + } + $this->assign([ + 'detail' => $data, + ]); + return $this->fetch(); + } + + /** + * Desc: 发货操作 + */ + public function deliveryHandle(Request $request, Order $model, OrderValidate $validate) + { + if ($request->isAjax()) { + $param = $request->param(); + $validate_result = $validate->scene('hansle')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $model->delivery_handle($param); + return success('发货成功'); + } + } + + /** + * Desc: 确认收货 + */ + public function confirm(Request $request, Order $model) + { + if ($this->request->isAjax()) { + $param = $request->param(); + $order = Order::get(['id' => $param['order_id']]); + $order->order_status = 3; + $order->update_time = time(); + $order->confirm_take_time = time(); + $order->save(); + return success('确认成功'); + } + } +} diff --git a/application/admin/controller/PhaseConfigController.php b/application/admin/controller/PhaseConfigController.php new file mode 100755 index 0000000..a5e3822 --- /dev/null +++ b/application/admin/controller/PhaseConfigController.php @@ -0,0 +1,106 @@ +param(); + $model = $model->scope('where', $param); + + $data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]); + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, PhaseConfig $model, PhaseConfigValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $model::create($param); + + $url = URL_BACK; + if(isset($param['_create']) && $param['_create']==1){ + $url = URL_RELOAD; + } + + return $result ? success('添加成功',$url) : error(); + } + + + + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, PhaseConfig $model, PhaseConfigValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $data->save($param); + return $result ? success() : error(); + } + + $this->assign([ + 'data' => $data, + + ]); + return $this->fetch('add'); + + } + + //删除 + public function del($id, PhaseConfig $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + +} diff --git a/application/admin/controller/PubController.php b/application/admin/controller/PubController.php new file mode 100755 index 0000000..3b7e2b6 --- /dev/null +++ b/application/admin/controller/PubController.php @@ -0,0 +1,39 @@ +param(); + + switch ($param['type_id']) { + case 1: + $data = Goods::all(); + break; + case 2: + $data = Article::all(); + break; + + default: + $data = Goods::all(); + break; + + } + + return success('success', URL_CURRENT, $data); + } +} \ No newline at end of file diff --git a/application/admin/controller/ShopConfigController.php b/application/admin/controller/ShopConfigController.php new file mode 100755 index 0000000..53fa2cd --- /dev/null +++ b/application/admin/controller/ShopConfigController.php @@ -0,0 +1,108 @@ +isPost()) { + $param = $request->param(); + ShopConfig::set('policy', 'procedure', $param['procedure']); + ShopConfig::set('policy', 'rule', $param['rule']); + + ShopConfig::set('policy', 'contactus', $param['contactus']); + ShopConfig::set('policy', 'community', $param['community']); + ShopConfig::set('policy', 'privacy', $param['privacy']); + ShopConfig::set('policy', 'clause', $param['clause']); + ShopConfig::set('policy', 'consignment', $param['consignment']); + $url = URL_RELOAD; + return success('添加成功',$url); + } + $config = [ + 'procedure' => ShopConfig::get('policy', 'procedure'), + 'rule' => ShopConfig::get('policy', 'rule'), + 'contactus' => ShopConfig::get('policy', 'contactus'), + 'community' => ShopConfig::get('policy', 'community'), + 'privacy' => ShopConfig::get('policy', 'privacy'), + 'clause' => ShopConfig::get('policy', 'clause'), + 'consignment' => ShopConfig::get('policy', 'consignment'), + ]; + $this->assign([ + 'config' => $config, + ]); + return $this->fetch(); + } + + //会员提现 + public function withdraw(Request $request, ShopConfig $model, ShopConfigValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + ShopConfig::set('withdraw', 'min_withdraw', $param['min_withdraw']); + ShopConfig::set('withdraw', 'max_withdraw', $param['max_withdraw']); + ShopConfig::set('withdraw', 'poundage', $param['poundage']); + ShopConfig::set('withdraw', 'poundage_type', $param['poundage_type']); + $url = URL_RELOAD; + return success('添加成功',$url); + } + $config = [ + 'min_withdraw' => ShopConfig::get('withdraw', 'min_withdraw'), + 'max_withdraw' => ShopConfig::get('withdraw', 'max_withdraw'), + 'poundage' => ShopConfig::get('withdraw', 'poundage'), + 'poundage_type' => ShopConfig::get('withdraw', 'poundage_type'), + ]; + $this->assign([ + 'config' => $config, + ]); + return $this->fetch(); + } + + //网站设置 + public function website(Request $request, ShopConfig $model, ShopConfigValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + ShopConfig::set('website', 'APPID', $param['APPID']); + ShopConfig::set('website', 'APPSECRET', $param['APPSECRET']); + ShopConfig::set('website', 'img_url', $param['img_url']); + ShopConfig::set('website', 'size', $param['size']); + ShopConfig::set('website', 'size_img', $param['size_img']); + ShopConfig::set('website', 'channel', $param['channel']); + ShopConfig::set('website', 'jmnum', $param['jmnum']); + + ShopConfig::set('website', 'MCHID', $param['MCHID']); + ShopConfig::set('website', 'WXPAYKEY', $param['WXPAYKEY']); + ShopConfig::set('website', 'notify_url', $param['notify_url']); + $url = URL_RELOAD; + return success('添加成功',$url); + } + $config = [ + 'APPID' => ShopConfig::get('website', 'APPID'), + 'APPSECRET' => ShopConfig::get('website', 'APPSECRET'), + 'img_url' => ShopConfig::get('website', 'img_url'), + 'size' => ShopConfig::get('website', 'size'), + 'size_img' => ShopConfig::get('website', 'size_img'), + 'channel' => ShopConfig::get('website', 'channel'), + 'jmnum' => ShopConfig::get('website', 'jmnum'), + 'MCHID' => ShopConfig::get('website', 'MCHID'), + 'WXPAYKEY' => ShopConfig::get('website', 'WXPAYKEY'), + 'notify_url' => ShopConfig::get('website', 'notify_url'), + ]; + $this->assign([ + 'config' => $config, + ]); + return $this->fetch(); + } +} diff --git a/application/admin/controller/SlideController.php b/application/admin/controller/SlideController.php new file mode 100755 index 0000000..5056bba --- /dev/null +++ b/application/admin/controller/SlideController.php @@ -0,0 +1,110 @@ +param(); + $model = $model->scope('where', $param); + + $data = $model->paginate($this->admin['per_page'], false, ['query' => $request->get()]); + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, Slide $model, SlideValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + + $result = $model::create($param); + + $url = URL_BACK; + if (isset($param['_create']) && $param['_create'] == 1) { + $url = URL_RELOAD; + } + + return $result ? success('添加成功', $url) : error(); + } + + $this->assign([ + 'jump_type' => $model->jumpType, + 'banner_list' => $model->BannerList, + ]); + + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, Slide $model, SlideValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + $result = $data->save($param); + return $result ? success() : error(); + } + + $this->assign([ + 'data' => $data, + 'jump_type' => $model->jumpType, + 'banner_list' => $model->BannerList, + + ]); + return $this->fetch('add'); + + } + + //删除 + public function del($id, Slide $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + +} diff --git a/application/admin/controller/StatisticsController.php b/application/admin/controller/StatisticsController.php new file mode 100755 index 0000000..6040874 --- /dev/null +++ b/application/admin/controller/StatisticsController.php @@ -0,0 +1,20 @@ +fetch(); + + } +} \ No newline at end of file diff --git a/application/admin/controller/UserController.php b/application/admin/controller/UserController.php new file mode 100755 index 0000000..835ab33 --- /dev/null +++ b/application/admin/controller/UserController.php @@ -0,0 +1,213 @@ +param(); + $where = []; + //查询 + if(isset($param['keyword']) && $param['keyword']){ + $where[] = [$param['keyword_type'],'like','%'.$param['keyword'].'%']; + } + //等级查询 + if(isset($param['level']) && $param['level'] != ''){ + $where[] = ['user_level_id','=',$param['level']]; + } + //提现积分 + if(isset($param['integral_start']) && $param['integral_start']){ + $where[] = ['user_money','>=',$param['integral_start']]; + } + if(isset($param['integral_end']) && $param['integral_end']){ + $where[] = ['user_money','<=',$param['integral_end']]; + } + //注册时间 + if(isset($param['start_time']) && $param['start_time']!=''){ + $where[] = ['create_time','>=',strtotime($param['start_time'])]; + } + if(isset($param['end_time']) && $param['end_time']!=''){ + $where[] = ['create_time','<=',strtotime($param['end_time'])]; + } + + $model = $model->where($where)->scope('where', $param); + $data = $model->paginate($this->admin['per_page'], false, ['query' => $request->get()]); + foreach ($data as $key => $value) { + // 上级推荐人 + $value['first_leader_info'] = User::getUserInfo($value['first_leader']); + //推荐下级人数 + $value['fans'] = User::where([ + ['first_leader|second_leader', '=', $value['id']] + ])->count(); + + //设备数量 + $value['sb_num'] = Order::where([ + ['user_id', '=', $value['id']] + ])->count(); + } + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, User $model, UserValidate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + //处理头像上传 + $attachment_avatar = new \app\common\model\Attachment; + $file_avatar = $attachment_avatar->upload('avatar'); + if ($file_avatar) { + $param['avatar'] = $file_avatar->url; + } else { + return error($attachment_avatar->getError()); + } + + + $result = $model::create($param); + + $url = URL_BACK; + if (isset($param['_create']) && $param['_create'] == 1) { + $url = URL_RELOAD; + } + + return $result ? success('添加成功', $url) : error(); + } + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, User $model, UserValidate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + //处理头像上传 + if (!empty($_FILES['avatar']['name'])) { + $attachment_avatar = new \app\common\model\Attachment; + $file_avatar = $attachment_avatar->upload('avatar'); + if ($file_avatar) { + $param['avatar'] = $file_avatar->url; + } + } + + + $result = $data->save($param); + return $result ? success() : error(); + } + + $this->assign([ + 'data' => $data, + ]); + return $this->fetch('add'); + + } + + //删除 + public function del($id, User $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + //启用 + public function enable($id, User $model) + { + $result = $model->whereIn('id', $id)->update(['status' => 1]); + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + //禁用 + public function disable($id, User $model) + { + $result = $model->whereIn('id', $id)->update(['status' => 0]); + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + //账户调整 + public function adjust_account($id, Request $request, User $model) + { + + $data = $model::get($id); + if ($request->isPost()) { + $post_data = $request->param(); + User::startTrans(); + try { + $number = $post_data['money']; + $change_type = 1; + $money_sql = User::raw('user_money + ' . $post_data['money']); + if ($post_data['money_handle'] == 0) { + $change_type = 2; + $money_sql = User::raw('user_money - ' . $post_data['money']); + } + $update_data['user_money'] = $money_sql; + User::where('id', $post_data['id'])->update($update_data); + //账户变动记录 + AccountLog::AccountRecord( + $post_data['id'], + $post_data['money'], + $change_type, + 100, + $post_data['money_remark'] + ); + User::commit(); + } catch (Exception $e) { + User::rollback(); + return error($e->getMessage()); + } + return success('调整成功'); + } + + $this->assign([ + 'info' => $data, + ]); + return $this->fetch(); + + } +} diff --git a/application/admin/controller/WithdrawController.php b/application/admin/controller/WithdrawController.php new file mode 100755 index 0000000..02b4502 --- /dev/null +++ b/application/admin/controller/WithdrawController.php @@ -0,0 +1,149 @@ +WITHDRAW_TYPE; + $STATUS_TYPE=$model->STATUS_TYPE; + $param = $request->param(); + + $where = []; + // 会员信息 + if (!empty($param['search_key']) && !empty($param['keyword'])) { + $keyword = $param['keyword']; + if ($param['search_key'] == 'user_sn') { + $where[] = ['u.sn', '=', $keyword]; + } elseif ($param['search_key'] == 'nickname'){ + $where[] = ['u.nickname', 'like', '%' . $keyword . '%']; + } + } + + //提现单号 + if (isset($param['withdraw_sn']) && $param['withdraw_sn'] != '') { + $where[] = ['w.sn', '=', $param['withdraw_sn']]; + } + + //提现方式 + if (isset($param['type']) && $param['type'] != '') { + $where[] = ['type', '=', $param['type']]; + } + + //提现状态 + if (isset($param['status']) && $param['status'] != '') { + $where[] = ['w.status', '=', $param['status']]; + } + + // 提现时间 + if (isset($param['start_time']) && $param['start_time'] && isset($param['end_time']) && $param['end_time']) { + $where[] = ['w.create_time', 'between', [strtotime($param['start_time']), strtotime($param['end_time'])]]; + } + + $model = $model + ->alias('w') + ->field('w.*,u.mobile,u.nickname,u.sn as user_sn,u.avatar') + ->join('user u', 'u.id = w.user_id') + ->where($where) + ->scope('where', $param); + + $data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]); + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + 'type_list' =>$WITHDRAW_TYPE, + 'status_list'=>$STATUS_TYPE, + ]); + return $this->fetch(); + } + + public function review($id,Request $request, WithdrawApply $model) + { + $this->assign([ + 'id' => $id, + ]); + return $this->fetch(); + } + + + //审核通过 + public function confirm(Request $request, WithdrawApply $model) + { + $param = $request->param(); + $id = $param['id']; + $withdraw =$model + ->where('id', $id) + ->find(); + // 判断提现单是否为待提现状态 1 + if($withdraw['status'] != 1) { + return error('不是待提现申请单'); + } + // 启动事务 + $model->startTrans(); + try{ + // 直接标识为审核成功状态 + $model + ->where('id', $id) + ->update(['status' =>2, 'update_time' => time(),'description'=>$param['description']]); + // 提交事务 + $model->commit(); + }catch(\Exception $e){ + // 回滚事务 + $model->rollback(); + return error($e->getMessage()); + } + return success('审核通过'); + } + + //审核拒绝 + public function refuse(Request $request, WithdrawApply $model) + { + $model->startTrans(); + $param = $request->param(); + try{ + $withdraw_apply = WithdrawApply::where('id', $param['id'])->find(); + $withdraw_apply->status =3; // 提现失败 + $withdraw_apply->description = $param['description']; + $withdraw_apply->update_time = time(); + $withdraw_apply->save(); + + //拒绝提现,回退佣金 + $user = User::get($withdraw_apply['user_id']); + $user->integral = ['inc', $withdraw_apply['money']]; + $user->save(); + + //增加账户变动记录 + AccountLog::AccountRecord( + $withdraw_apply['user_id'], + $withdraw_apply['money'], + 1, + 130, + '', + $withdraw_apply['id'], + $withdraw_apply['sn'] + ); + $model->commit(); + } catch (Exception $e){ + $model->rollback(); + return error($e->getMessage()); + } + return success('提现失败已回退用户账户'); + } +} diff --git a/application/admin/model/AdminLog.php b/application/admin/model/AdminLog.php new file mode 100755 index 0000000..25d7194 --- /dev/null +++ b/application/admin/model/AdminLog.php @@ -0,0 +1,47 @@ + + */ + +namespace app\admin\model; + +class AdminLog extends Model +{ + protected $name = 'admin_log'; + + public $softDelete = false; + + public $methodText = [ + 1=>'GET', + 2=>'POST', + 3=>'PUT', + 4=>'DELETE', + ]; + + protected $autoWriteTimestamp = true; + protected $updateTime= false; + + protected $searchField = [ + 'name', + 'url', + 'log_ip' + ]; + + protected $whereField = [ + 'admin_user_id' + ]; + + //关联用户 + public function adminUser() + { + return $this->belongsTo(AdminUser::class, 'admin_user_id', 'id'); + } + + //关联详情 + public function adminLogData() + { + return $this->hasOne(AdminLogData::class,'admin_log_id','id'); + } + +} diff --git a/application/admin/model/AdminLogData.php b/application/admin/model/AdminLogData.php new file mode 100755 index 0000000..f3950f6 --- /dev/null +++ b/application/admin/model/AdminLogData.php @@ -0,0 +1,29 @@ + + */ + +namespace app\admin\model; + +use tools\Crypt; + +class AdminLogData extends Model +{ + protected $name = 'admin_log_data'; + + public $softDelete = false; + + //关联log + public function adminLog() + { + return $this->belongsTo('app\admin\AdminLog','admin_log_id','id'); + } + + public function getDataAttr($value) + { + $data = Crypt::decrypt($value, config('app.app_key')); + return json_encode(json_decode($data, true), JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE); + } + +} diff --git a/application/admin/model/AdminMenu.php b/application/admin/model/AdminMenu.php new file mode 100755 index 0000000..3b97bce --- /dev/null +++ b/application/admin/model/AdminMenu.php @@ -0,0 +1,28 @@ + + */ + +namespace app\admin\model; + +class AdminMenu extends Model +{ + protected $name = 'admin_menu'; + + public $softDelete = false; + + public $logMethod = [ + 0 => '不记录', + 1 => 'GET', + 2 => 'POST', + 3 => 'PUT', + 4 => 'DELETE' + ]; + + public $noDeletionId = [ + 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 + ]; + + +} \ No newline at end of file diff --git a/application/admin/model/AdminRole.php b/application/admin/model/AdminRole.php new file mode 100755 index 0000000..4bfbcb5 --- /dev/null +++ b/application/admin/model/AdminRole.php @@ -0,0 +1,41 @@ + + */ + +namespace app\admin\model; + +class AdminRole extends Model +{ + protected $name = 'admin_role'; + + public $softDelete = false; + + protected $searchField = [ + 'name', + 'description' + ]; + + public $noDeletionId = [ + 1 + ]; + + public static function init() + { + //添加首页,系统管理,个人资料菜单/权限 + self::event('before_insert', static function ($data) { + $data->url = [1,2,18]; + }); + } + + protected function getUrlAttr($value) + { + return $value !== '' ? explode(',', $value) : []; + } + + protected function setUrlAttr($value) + { + return $value !== '' ? implode(',', $value) : []; + } +} diff --git a/application/admin/model/AdminUser.php b/application/admin/model/AdminUser.php new file mode 100755 index 0000000..3df8560 --- /dev/null +++ b/application/admin/model/AdminUser.php @@ -0,0 +1,142 @@ + + */ + +namespace app\admin\model; + +use think\model\concern\SoftDelete; + +/** + * @property int id + * @property mixed sign_str + * @property mixed auth_url + * @property mixed role + * @property string password + */ +class AdminUser extends Model +{ + use SoftDelete; + protected $name = 'admin_user'; + + protected $searchField = [ + 'nickname', + 'username' + ]; + + public $noDeletionId = [ + 1, 2 + ]; + + + public static function init() + { + //添加自动加密密码 + self::event('before_insert', static function ($data) { + $data->password = password_hash($data->password, 1); + }); + + //修改密码自动加密 + self::event('before_update', function ($data) { + $old = (new static())::get($data->id); + if ($data->password !== $old->password) { + $data->password = password_hash($data->password, 1); + } + }); + } + + //关联操作日志 + public function adminLog() + { + return $this->hasMany(AdminLog::class, 'admin_user_id', 'id'); + } + + + //角色获取器 + protected function getRoleAttr($value) + { + return explode(',', $value); + } + + //角色修改器 + protected function setRoleAttr($value) + { + return implode(',', $value); + } + + //用户角色名称 + protected function getRoleTextAttr($value, $data) + { + return AdminRole::where('id', 'in', $data['role'])->column('id,name', 'id'); + } + + + /** + * 获取已授权url + * @param $value + * @param $data + * @return array + */ + protected function getAuthUrlAttr($value, $data) + { + $role_urls = AdminRole::where('id', 'in', $data['role'])->where('status', 1)->column('url'); + $url_id_str = ''; + foreach ($role_urls as $key => $val) { + $url_id_str .= $key == 0 ? $val : ',' . $val; + } + $url_id = array_unique(explode(',', $url_id_str)); + $auth_url = []; + if (count($url_id) > 0) { + $auth_url = AdminMenu::where('id', 'in', $url_id)->column('url'); + } + return $auth_url; + } + + //加密字符串,用在登录的时候加密处理 + protected function getSignStrAttr($value, $data) + { + $ua = request()->header('user-agent'); + return sha1($data['id'] . $data['username'] . $ua); + } + + //获取当前用户已授权的显示菜单 + public function getShowMenu() + { + if ($this->id === 1) { + return AdminMenu::where('is_show', 1)->order('sort_id', 'asc')->order('id', 'asc')->column('id,parent_id,name,url,icon,sort_id', 'id'); + } + + $role_urls = AdminRole::where('id', 'in', $this->role)->where('status', 1)->column('url'); + + $url_id_str = ''; + foreach ($role_urls as $key => $val) { + $url_id_str .= $key == 0 ? $val : ',' . $val; + } + + $url_id = array_unique(explode(',', $url_id_str)); + return AdminMenu::where('id', 'in', $url_id)->where('is_show', 1)->order('sort_id', 'asc')->order('id', 'asc')->column('id,parent_id,name,url,icon,sort_id', 'id'); + } + + //用户登录 + public static function login($param) + { + $username = $param['username']; + $password = $param['password']; + $user = self::get(['username' => $username]); + if (!$user) { + exception('用户不存在'); + } + + if (!password_verify($password, $user->password)) { + exception('密码错误'); + } + + if ((int)$user->status !== 1) { + exception('用户被冻结'); + } + return $user; + } + + +} diff --git a/application/admin/model/Model.php b/application/admin/model/Model.php new file mode 100755 index 0000000..7bf78a6 --- /dev/null +++ b/application/admin/model/Model.php @@ -0,0 +1,66 @@ + + */ + +namespace app\admin\model; + +use think\db\Query; + +class Model extends \think\Model +{ + //是否字段,使用场景:用户的是否冻结,文章是否为热门等等。 + const BOOLEAN_TEXT = [0 => '否', 1 => '是']; + + //是否为软删除 + public $softDelete = true; + + //软删除字段默认值 + protected $defaultSoftDelete = 0; + + //可搜索字段 + protected $searchField = []; + + //可作为条件的字段 + protected $whereField = []; + + //禁止删除的数据id + public $noDeletionId = []; + + /** + * 查询处理 + * @var Query $query + * @var array $param + */ + public function scopeWhere($query, $param) + { + //关键词like搜索 + $keywords = $param['_keywords'] ?? ''; + if (!empty($keywords) && count($this->searchField) > 0) { + $this->searchField = implode('|', $this->searchField); + $query->where($this->searchField, 'like', '%' . $keywords . '%'); + } + + //字段条件查询 + if (count($this->whereField) > 0 && count($param) > 0) { + foreach ($param as $key => $value) { + if (!empty($value) && in_array($key, $this->whereField)) { + $query->where($key, $value); + } + } + } + + //排序 + $order = $param['_order'] ?? ''; + $by = $param['_by'] ?? 'desc'; + $query->order($order ?: 'id', $by ?: 'desc'); + } + + //状态获取器 + public function getStatusTextAttr($value, $data) + { + return self::BOOLEAN_TEXT[$data['status']]; + } + +} \ No newline at end of file diff --git a/application/admin/traits/AdminAuth.php b/application/admin/traits/AdminAuth.php new file mode 100755 index 0000000..bbfcb81 --- /dev/null +++ b/application/admin/traits/AdminAuth.php @@ -0,0 +1,133 @@ + + */ + +namespace app\admin\traits; + +use app\admin\model\AdminLog; +use app\admin\model\AdminUser; +use tools\Crypt; +use tools\SafeCookie; +use think\facade\Session; + +trait AdminAuth +{ + public static $admin_user_id = 'admin_user_id'; + public static $admin_user_id_sign = 'admin_user_sign'; + + //是否登录 + protected function isLogin() + { + //这里要写个判断数据库的才行 + $admin_user_id = Session::get(self::$admin_user_id); + $user = false; + $this->user = &$user; + if (empty($admin_user_id)) { + if (SafeCookie::has(self::$admin_user_id) && SafeCookie::has(self::$admin_user_id_sign)) { + $admin_user_id = SafeCookie::get(self::$admin_user_id); + $sign = SafeCookie::get(self::$admin_user_id_sign); + $user = AdminUser::get($admin_user_id); + if ($user && $user->sign_str === $sign) { + Session::set(self::$admin_user_id, $admin_user_id); + Session::set(self::$admin_user_id_sign, $sign); + return true; + } + } + return false; + } + + $user = AdminUser::get($admin_user_id); + if(!$user) { + return false; + } + $this->uid = $user->id; + + return Session::get(self::$admin_user_id_sign) === $user->sign_str; + } + + /** + * session 与cookie登录 + * @param $user AdminUser + * @param bool $remember + * @return bool + */ + public static function authLogin($user, $remember = false) + { + Session::set(self::$admin_user_id, $user->id); + Session::set(self::$admin_user_id_sign, $user->sign_str); + + //记住登录 + if ($remember === true) { + SafeCookie::set(self::$admin_user_id, $user->id); + SafeCookie::set(self::$admin_user_id_sign, $user->sign_str); + } else if (SafeCookie::has(self::$admin_user_id) || SafeCookie::has(self::$admin_user_id_sign)) { + SafeCookie::delete(self::$admin_user_id); + SafeCookie::delete(self::$admin_user_id_sign); + } + //记录登录日志 + self::loginLog($user); + return true; + } + + //退出 + public static function authLogout() + { + Session::delete(self::$admin_user_id); + Session::delete(self::$admin_user_id_sign); + if (SafeCookie::has(self::$admin_user_id) || SafeCookie::has(self::$admin_user_id_sign)) { + SafeCookie::delete(self::$admin_user_id); + SafeCookie::delete(self::$admin_user_id_sign); + } + return true; + } + + /** + * 权限检查 + * @param $user AdminUser + * @return bool + */ + public function authCheck($user) + { + return in_array($this->url, $this->authExcept, true) || in_array($this->url, $user->auth_url, true); + } + + //登录记录 + public static function loginLog($user) + { + $data = AdminLog::create([ + 'admin_user_id' => $user->id, + 'name' => '登录', + 'url' => 'admin/auth/login', + 'log_method' => 'POST', + 'log_ip' => request()->ip() + ]); + + $crypt_data = Crypt::encrypt(json_encode(request()->param()), config('app.app_key')); + $log_data = [ + 'data' => $crypt_data + ]; + $data->adminLogData()->save($log_data); + } + + //创建操作日志 + public function createAdminLog($user, $menu) + { + $data = [ + 'admin_user_id' => $user->id, + 'name' => $menu->name, + 'log_method' => $menu->log_method, + 'url' => request()->pathinfo(), + 'log_ip' => request()->ip() + ]; + $log = AdminLog::create($data); + + //加密数据,防脱库 + $crypt_data = Crypt::encrypt(json_encode(request()->param()), config('app.app_key')); + $log_data = [ + 'data' => $crypt_data + ]; + $log->adminLogData()->save($log_data); + } +} \ No newline at end of file diff --git a/application/admin/traits/AdminTree.php b/application/admin/traits/AdminTree.php new file mode 100755 index 0000000..8806a0e --- /dev/null +++ b/application/admin/traits/AdminTree.php @@ -0,0 +1,375 @@ + + */ + +namespace app\admin\traits; + +use app\admin\model\AdminUser; + +trait AdminTree +{ + + public $text, $html; + /** + * 生成树型结构所需要的2维数组 + * @var array + */ + public $array; + + /** + * 生成树型结构所需修饰符号,可以换成图片 + * @var array + */ + public $icon = array('│', '├', '└'); + public $space = '  '; + /** + * @access private + */ + public $ret = ''; + + + /** + * 构造函数,初始化类 + * @param array $arr + * @return bool + */ + public function initTree($arr=[]) + { + $this->array = $arr; + $this->ret = ''; + $this->html = ''; + return is_array($arr); + } + + /** + * 得到树型结构 + * @param int $my_id ,表示获得这个ID下的所有子级 + * @param string $str 生成树型结构的基本代码,例如:"" + * @param int $sid 被选中的ID,比如在做树型下拉框的时候需要用到 + * @param string $adds + * @param string $str_group + * @return string + */ + public function getTree($my_id, $str, $sid = 0, $adds = '', $str_group = '') + { + $parent_id = ''; + $n_str = ''; + $number = 1; + $child = $this->getChild($my_id); + + if (is_array($child)) { + $total = count($child); + foreach ($child as $id => $value) { + $j = $k = ''; + if ($number == $total) { + $j .= $this->icon[2]; + } else { + $j .= $this->icon[1]; + $k = $adds ? $this->icon[0] : ''; + } + $spacer = $adds ? $adds . $j : ''; + $selected = $id == $sid ? 'selected' : ''; + extract($value); + 0 == $parent_id && $str_group ? eval("\$n_str = \"$str_group\";") : eval("\$n_str = \"$str\";"); + $this->ret .= $n_str; + $space = $this->space; + $this->getTree($id, $str, $sid, $adds . $k . $space, $str_group); + $number++; + } + } + return $this->ret; + } + + /** + * 获取后台左侧菜单 + * @param $my_id + * @param $current_id + * @param $parent_ids + * @return mixed + */ + public function get_authTree($my_id, $current_id, $parent_ids) + { + + $n_str = ''; + $child = $this->getChild($my_id); + if (is_array($child)) { + $menu = current($child); + //获取当前等级的html + $text = $this->text[$menu['level']] ?? end($this->text); + + foreach ($child as $k => $v) { + @extract($v); + + //如果有下级菜单 + if ($this->getChild($k)) { + + if (in_array($k, $parent_ids, true)) { + //如果下级菜单是当前页面 + eval("\$n_str = \"$text[1]\";"); + $this->html .= $n_str; + } else { + //如果下级菜单不是当前页面 + eval("\$n_str = \"$text[0]\";"); + $this->html .= $n_str; + } + + + self::get_authTree($k, $current_id, $parent_ids); + eval("\$n_str = \"$text[2]\";"); + $this->html .= $n_str; + } else if ($k == $current_id) { + $a = $this->text['current']; + eval("\$n_str = \"$a\";"); + + $this->html .= $n_str; + } else { + $a = $this->text['other']; + eval("\$n_str = \"$a\";"); + $this->html .= $n_str; + } + } + } + + return $this->html; + } + + /** + * 得到子级数组 + * @param int $pid + * @return bool|array + */ + public function getChild($pid) + { + $result = []; + foreach ($this->array as $key => $value) { + if ($value['parent_id'] == $pid) { + $result[$key] = $value; + } + } + return $result; + } + + /** + * 递归获取级别 + * @param int $id ID + * @param array $array 所有菜单 + * @param int $i 所在级别 + * @return int + */ + public function getLevel($id, $array, $i = 0) + { + if ($array[$id]['parent_id'] == 0 || empty($array[$array[$id]['parent_id']]) || $array[$id]['parent_id'] == $id) { + return $i; + } + + $i++; + return self::getLevel($array[$id]['parent_id'], $array, $i); + } + + //获取权限树 + public function getAuthTreeAccess($my_id) + { + $id = ''; + $n_str = ''; + $child = $this->getChild($my_id); + + if (is_array($child)) { + $level = current($child); + $text = $this->text[$level['level']] ?? end($this->text); + + foreach ($child as $k => $v) { + @extract($v); + + if ($this->getChild($k)) { + eval("\$n_str = \"$text[0]\";"); + $this->html .= $n_str; + + self::getAuthTreeAccess($k); + + eval("\$n_str = \"$text[1]\";"); + $this->html .= $n_str; + } else { + $a = $this->text['other']; + eval("\$n_str = \"$a\";"); + $this->html .= $n_str; + } + } + } + return $this->html; + } + + + /** + * 获取左侧菜单 + * @param $user AdminUser + * @return mixed + */ + protected function getLeftMenu($user) + { + $menu = $user->getShowMenu(); + $max_level = 0; + $current_id = 1; + $parent_ids = array(0 => 0); + + + foreach ($menu as $k => $v) { + if ($v['url'] == $this->url) { + $parent_ids = $this->getMenuParent($menu, $v['id']); + $current_id = $v['id']; + } + } + if ($parent_ids == false) { + $parent_ids = array(0 => 0); + } + + + foreach ($menu as $k => $v) { + $url = url($v['url']); + $menu[$k]['icon'] = $v['icon']; + $menu[$k]['level'] = $this->getLevel($v['id'], $menu); + $max_level = $max_level <= $menu[$k]['level'] ? $menu[$k]['level'] : $max_level; + $menu[$k]['url'] = $url; + } + + $this->initTree($menu); + + $text_base_one = "
  • text[$i]['0'] = $text_0; + $this->text[$i]['1'] = $text_1; + $this->text[$i]['2'] = $text_2; + } + $this->text['current'] = $text_current; + $this->text['other'] = $text_other; + + return $this->get_authTree(0, $current_id, $parent_ids); + } + + //获取父级菜单 + protected function getMenuParent($arr, $my_id, $parent_ids = array()) + { + $a = array(); + if (is_array($arr)) { + foreach ($arr as $id => $a) { + if (($a['id'] === $my_id) && $a['parent_id'] !== 0) { + $parent_ids[] = $a['parent_id']; + $parent_ids = $this->getMenuParent($arr, $a['parent_id'], $parent_ids); + } + } + } + return !empty($parent_ids) ? $parent_ids : false; + } + + //获取当前导航 + protected function getCurrentNav($arr, $my_id, $parent_ids = array(), $current_nav = '') + { + $a = array(); + if (is_array($arr)) { + foreach ($arr as $id => $a) { + if (($a['id'] === $my_id) && $a['parent_id'] !== 0) { + $parent_ids[] = $a['parent_id']; + $ru = '
  • ' . $a['name'] . '
  • '; + $current_nav = $ru . $current_nav; + $temp_result = $this->getCurrentNav($arr, $a['parent_id'], $parent_ids, $current_nav); + $parent_ids = $temp_result[0]; + $current_nav = $temp_result[1]; + } + } + } + return !empty([$parent_ids, $current_nav]) ? [$parent_ids, $current_nav] : false; + } + + + /** + * 获取树形数据列表 + * @param $model + * @return string + */ + protected function getTreeList($model) + { + + $data = $model->column('id,name,parent_id', 'id'); + + foreach ($data as $key => $value) { + //左侧选择 + $data[$key]['select_html'] = ' + + '; + + //右侧操作 + $data[$key]['todo_html'] = ' + + + + ' . $value['id'] . ' 的数据吗\' + data-url="' . url('del') . '" > + + + '; + + } + + + $this->initTree($data); + $html = " + \$select_html + + \$id + \$spacer \$name + + \$todo_html + "; + + return $this->getTree(0, $html); + } + + + /** + * 获取树形选择列表 + * @param $model + * @param int $selected + * @return string + */ + protected function getSelectList($model, $selected = 0) + { + $data = $model->column('id,parent_id,name', 'id'); + $html = ""; + $this->initTree($data); + return $this->getTree(0, $html, $selected); + } + +} + diff --git a/application/admin/traits/LoginCaptcha.php b/application/admin/traits/LoginCaptcha.php new file mode 100755 index 0000000..5d12177 --- /dev/null +++ b/application/admin/traits/LoginCaptcha.php @@ -0,0 +1,12 @@ + + */ + +namespace app\admin\traits; + +class LoginCaptcha +{ + +} \ No newline at end of file diff --git a/application/admin/traits/PhpOffice.php b/application/admin/traits/PhpOffice.php new file mode 100755 index 0000000..d39b536 --- /dev/null +++ b/application/admin/traits/PhpOffice.php @@ -0,0 +1,81 @@ + + */ + +namespace app\admin\traits; + +use Exception; +use PhpOffice\PhpSpreadsheet\IOFactory; +use PhpOffice\PhpSpreadsheet\Spreadsheet; + +trait PhpOffice +{ + + public function exportData($head, $body, $name = '', $version = '2007',$title='导出记录') + { + try { + // 输出 Excel 文件头 + if(empty($name)){ + $name =date('Y-m-d-H-i-s'); + } + + $spreadsheet = new Spreadsheet(); + $sheetPHPExcel = $spreadsheet->setActiveSheetIndex(0); + $char_index = range('A', 'Z'); + //处理超过26列 + $a = 'A'; + foreach ($char_index as $item){ + $char_index[] = $a . $item; + } + + // Excel 表格头 + foreach ($head as $key => $val) { + $sheetPHPExcel->setCellValue("{$char_index[$key]}1", $val); + } + + $spreadsheet->getActiveSheet()->setTitle($title); + + // Excel body 部分 + foreach ($body as $key => $val) { + $row = $key + 2; + $col = 0; + foreach ($val as $k => $v) { + $spreadsheet->getActiveSheet()->setCellValue("{$char_index[$col]}{$row}", $v); + $col++; + } + } + + // 版本差异信息 + $version_opt = [ + '2007' => [ + 'mime' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'ext' => '.xlsx', + 'write_type' => 'Xlsx', + ], + '2003' => ['mime' => 'application/vnd.ms-excel', + 'ext' => '.xls', + 'write_type' => 'Xls', + ], + 'pdf' => ['mime' => 'application/pdf', + 'ext' => '.pdf', + 'write_type' => 'PDF', + ], + 'ods' => ['mime' => 'application/vnd.oasis.opendocument.spreadsheet', + 'ext' => '.ods', + 'write_type' => 'OpenDocument', + ], + ]; + + header('Content-Type: ' . $version_opt[$version]['mime']); + header('Content-Disposition: attachment;filename="' . $name . $version_opt[$version]['ext'] . '"'); + header('Cache-Control: max-age=0'); + + $objWriter = IOFactory::createWriter($spreadsheet, 'Xlsx'); + return $objWriter->save('php://output'); + } catch (Exception $e) { + return $e->getMessage(); + } + } +} \ No newline at end of file diff --git a/application/admin/validate/AdminMenuValidate.php b/application/admin/validate/AdminMenuValidate.php new file mode 100755 index 0000000..24a37e5 --- /dev/null +++ b/application/admin/validate/AdminMenuValidate.php @@ -0,0 +1,29 @@ + + */ + +namespace app\admin\validate; + +class AdminMenuValidate extends Validate +{ + protected $rule = [ + 'parent_id|上级' => 'require|egt:0', + 'name|名称' => 'require', + 'url|url' => 'require|unique:admin_menu', + 'icon|图标' => 'require', + 'sort_id|排序' => 'require', + 'is_show|是否显示' => 'require', + 'log_method|记录类型' => 'require', + ]; + + protected $message = [ + 'parent_id.egt' => '请选择上级菜单', + ]; + + protected $scene = [ + 'add' => ['parent_id', 'title', 'url', 'icon', 'sort_id', 'is_show', 'log_method'], + 'edit' => ['parent_id', 'title', 'url', 'icon', 'sort_id', 'is_show', 'log_method'], + ]; +} \ No newline at end of file diff --git a/application/admin/validate/AdminRoleValidate.php b/application/admin/validate/AdminRoleValidate.php new file mode 100755 index 0000000..5f83633 --- /dev/null +++ b/application/admin/validate/AdminRoleValidate.php @@ -0,0 +1,21 @@ + + */ + +namespace app\admin\validate; + +class AdminRoleValidate extends Validate +{ + protected $rule = [ + 'name|名称' => 'require|unique:admin_role', + 'description|介绍' => 'require', + 'rules|权限' => 'require', + ]; + + protected $scene = [ + 'add' => ['name', 'description'], + 'edit' => ['name', 'description'], + ]; +} \ No newline at end of file diff --git a/application/admin/validate/AdminUserValidate.php b/application/admin/validate/AdminUserValidate.php new file mode 100755 index 0000000..6a1071b --- /dev/null +++ b/application/admin/validate/AdminUserValidate.php @@ -0,0 +1,38 @@ + + */ + +namespace app\admin\validate; + +class AdminUserValidate extends Validate +{ + protected $rule = [ + 'username|帐号' => 'require|unique:admin_user', + 'password|密码' => 'require', + 'new_password|新密码' => 'require', + 'renew_password|确认新密码' => 'require|confirm:new_password', + 'nickname|昵称' => 'require', + 'role|角色' => 'require', + 'status|状态' => 'require', + ]; + + protected $message = [ + 'role.require' => '请选择角色', + ]; + + protected $scene = [ + 'add' => ['username', 'password', 'nickname', 'role'], + 'edit' => ['username', 'nickname', 'role'], + 'password' => ['password', 'new_password', 'renew_password'], + 'nickname' => ['nickname'], + ]; + + public function sceneLogin() + { + $this->only(['username', 'password']) + ->remove('username', 'unique'); + } + +} diff --git a/application/admin/validate/Validate.php b/application/admin/validate/Validate.php new file mode 100755 index 0000000..067f6d1 --- /dev/null +++ b/application/admin/validate/Validate.php @@ -0,0 +1,12 @@ + + */ + +namespace app\admin\validate; + +class Validate extends \think\Validate +{ + +} \ No newline at end of file diff --git a/application/admin/view/account_log/integrallist.html b/application/admin/view/account_log/integrallist.html new file mode 100755 index 0000000..b9a725e --- /dev/null +++ b/application/admin/view/account_log/integrallist.html @@ -0,0 +1,174 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    +
    + + + + +
    +
    + +
    + + + + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + + + + {/foreach} + +
    流水单号(20位)会员昵称会员编号手机号码来源类型来源单号变动总数剩余总数变动时间
    {$item.log_sn}{$item.nickname}{$item.user_sn}{$item.mobile}{$item.source_type_text}{$item.source_sn}{$item.change_amount}{$item.left_amount}{$item.create_time}
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/admin_log/index.html b/application/admin/view/admin_log/index.html new file mode 100755 index 0000000..8e81a27 --- /dev/null +++ b/application/admin/view/admin_log/index.html @@ -0,0 +1,125 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    + + +
    + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + + + + + + {foreach name='data' item='list'} + + + + + + + + + + + {/foreach} + +
    ID用户操作URL请求方式IP日期操作
    {$list.id}{$list->adminUser->nickname}{$list.name}{$list.url}{$list.log_method}{$list.log_ip}{$list.create_time} + + + +
    +
    + + + + +
    +
    +
    +
    + + + +{/block} + diff --git a/application/admin/view/admin_log/view.html b/application/admin/view/admin_log/view.html new file mode 100755 index 0000000..f2cd509 --- /dev/null +++ b/application/admin/view/admin_log/view.html @@ -0,0 +1,53 @@ +{include file='public/head_css'} +{include file='public/head_js'} +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    日志摘要
    日志ID{$data.id}
    操作用户{$data->adminUser->nickname}
    操作{$data.name}
    url{$data.url}
    类型{$data.log_method}
    ip{$data.log_ip}
    日期{$data.create_time}
    数据详情
    +
    {$data.adminLogData.data}
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/application/admin/view/admin_menu/add.html b/application/admin/view/admin_menu/add.html new file mode 100755 index 0000000..8568c37 --- /dev/null +++ b/application/admin/view/admin_menu/add.html @@ -0,0 +1,213 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + + + + +
    +
    +
    +
    + +
    + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    + + +
    +
    +
    + + +
    + +
    +
    + +
    +
    +
    + + +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    + + + {if !isset($data)} +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    + {/if} +
    +
    + + +
    +
    +
    +
    +
    + + +{/block} \ No newline at end of file diff --git a/application/admin/view/admin_menu/index.html b/application/admin/view/admin_menu/index.html new file mode 100755 index 0000000..658b2d7 --- /dev/null +++ b/application/admin/view/admin_menu/index.html @@ -0,0 +1,51 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + + + +
    + + + + + + + + + + + + + + + + + {$data|raw} + +
    + + ID菜单名称url父级ID图标排序状态日志记录方式操作
    +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/admin_role/access.html b/application/admin/view/admin_role/access.html new file mode 100755 index 0000000..7fe2327 --- /dev/null +++ b/application/admin/view/admin_role/access.html @@ -0,0 +1,137 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +{css href="__ADMIN_CSS__/access.css" /} +
    +
    +
    +
    + + + + +
    +

    【{$data->name|raw}】授权

    + +
    +
    +
    +
    +
    + + + {$html|raw} + +
    +
    +
    + + + + +
    +
    +
    +
    + +
    +
    + + + +{/block} + diff --git a/application/admin/view/admin_role/add.html b/application/admin/view/admin_role/add.html new file mode 100755 index 0000000..e2470eb --- /dev/null +++ b/application/admin/view/admin_role/add.html @@ -0,0 +1,112 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + + + + +
    +
    +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + + +
    +
    + + +
    + + + + +
    +
    +
    +
    +
    + + +{/block} + diff --git a/application/admin/view/admin_role/index.html b/application/admin/view/admin_role/index.html new file mode 100755 index 0000000..649f315 --- /dev/null +++ b/application/admin/view/admin_role/index.html @@ -0,0 +1,153 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + {/foreach} + +
    + + ID名称简介是否启用操作
    + + {$item.id}{$item.name}{$item.description}{$item.status_text} + + + + + + + + + + + + {if $item.status==1} + + + + {else/} + + + + {/if} +
    +
    + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/admin_user/add.html b/application/admin/view/admin_user/add.html new file mode 100755 index 0000000..4a91e79 --- /dev/null +++ b/application/admin/view/admin_user/add.html @@ -0,0 +1,155 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + + +
    +
    + + +
    + +
    + + +
    +
    + + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + + +
    +
    + + +
    + + + + +
    +
    +
    +
    + +
    + + + +{/block} + diff --git a/application/admin/view/admin_user/index.html b/application/admin/view/admin_user/index.html new file mode 100755 index 0000000..73eee2f --- /dev/null +++ b/application/admin/view/admin_user/index.html @@ -0,0 +1,148 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    + + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + + {/foreach} + +
    + + ID昵称账号角色是否启用操作
    + + {$item.id}{$item.nickname}{$item.username} + {foreach name='item.role_text' id='role'} + {$role} + {/foreach} + {$item.status_text} + + + + + + + + + {if $item.status==1} + + + + {else/} + + + + {/if} +
    +
    + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/admin_user/profile.html b/application/admin/view/admin_user/profile.html new file mode 100755 index 0000000..00a1d93 --- /dev/null +++ b/application/admin/view/admin_user/profile.html @@ -0,0 +1,168 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    +
    + 头像 +

    {$admin.user.nickname}

    +

    {$admin.user.username}

    +

    + {foreach name='admin.user.role_text' id='role'} + {$role} + {/foreach} +

    +
    +
    +
    +
    + +
    +
    +
    + + + +{/block} diff --git a/application/admin/view/auth/captcha.html b/application/admin/view/auth/captcha.html new file mode 100755 index 0000000..f5afbc6 --- /dev/null +++ b/application/admin/view/auth/captcha.html @@ -0,0 +1,26 @@ + +
    +
    + +
    + +
    + 图形验证码 +
    +
    + + + diff --git a/application/admin/view/auth/gee_test.html b/application/admin/view/auth/gee_test.html new file mode 100755 index 0000000..76df841 --- /dev/null +++ b/application/admin/view/auth/gee_test.html @@ -0,0 +1,53 @@ +{js href="__ADMIN_PLUGINS__/gee-test/gee-test.min.js" /} +
    + 正在加载验证码... +
    +
    +
    +
    +
    +
    +
    +
    + + \ No newline at end of file diff --git a/application/admin/view/auth/login.html b/application/admin/view/auth/login.html new file mode 100755 index 0000000..88c2fc9 --- /dev/null +++ b/application/admin/view/auth/login.html @@ -0,0 +1,160 @@ + + + + + + + {$admin.title} | {$admin.name|default='OneWeekBackend'} + + {css href="__ADMIN_PLUGINS__/bootstrap/css/bootstrap.min.css" /} + {css href="__ADMIN_PLUGINS__/font-awesome/css/font-awesome.min.css" /} + {css href="__ADMIN_CSS__/AdminLTE.min.css" /} + {css href="__ADMIN_CSS__/admin.css" /} + + + {if $login_config.background} + + {/if} + + + + {js href="__ADMIN_PLUGINS__/jquery/jquery.min.js" /} + {js href="__ADMIN_PLUGINS__/bootstrap/js/bootstrap.min.js" /} + {js href="__ADMIN_PLUGINS__/jquery-validation/jquery.validate.min.js" /} + {js href="__ADMIN_PLUGINS__/jquery-validation/localization/messages_zh.min.js" /} + {js href="__ADMIN_PLUGINS__/layer/layer.js" /} + {js href="__ADMIN_JS__/admin.js" /} + + + + + +
    + +
    + +
    +
    + + +
    +
    + + +
    + + {if $login_config.token} + {:token()} + {/if} + + {if $login_config.captcha==1} + {include file='auth/captcha' /} + {else/} + {if $login_config.captcha==2} + {include file='auth/gee_test' /} + {/if} + {/if} + + +
    +
    +
    + +
    +
    +
    + {:token()} + +
    +
    +
    +
    +
    + + + + + + diff --git a/application/admin/view/consignment_order/detail.html b/application/admin/view/consignment_order/detail.html new file mode 100755 index 0000000..2845d43 --- /dev/null +++ b/application/admin/view/consignment_order/detail.html @@ -0,0 +1,272 @@ +{extend name="layout1" /} +{block name='content'} + + +
    + +
    + + +
    +
    + 订单信息 +
    +
    + +
    + +
    {$detail.order_sn}
    + +
    {$detail.order_status_text}
    + +
    {$detail.create_time}
    +
    + +
    +
    + 会员信息 +
    +
    + +
    + +
    {$detail.user.sn}
    + +
    {$detail.user.nickname}
    + +
    {$detail.user.mobile}
    + +
    {$detail.user.create_time}
    +
    +
    +
    + 取货信息 +
    +
    +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.address}
    + +
    {$detail.takeparts_time}
    +
    +
    +
    + 退货信息 +
    +
    + {eq name="$detail.is_return" value="1"} +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.address}
    +
    + {else/} +
    + +
    无需退回
    +
    + {/eq} +
    +
    + 商品信息 +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + {foreach $detail.consignment_order_goods as $k => $goods} + + + + + + + + + + {/foreach} + + + + +
    图片商品名称商品信息估计备注状态
    +
    + {foreach $goods.img_list as $k1 => $img} +
    + +
    + {/foreach} +
    +
    +
    + {$goods.goods_name} +
    +
    +
    +
    +

    购买价格:{$goods.goods_price}

    +

    尺寸:{$goods.item_value}

    +

    品牌:{$goods.brand_name}

    +

    品类:{$goods.class_name}

    +

    品相:{$goods.phase_name}

    +

    购买渠道:{$goods.channel_name}

    +
    +
    +
    +
    + ¥{$goods.evaluation_price} +
    +
    +
    + {$goods.refund_remarks} +
    +
    +
    + {$goods.refund_status_text} +
    +
    +

    商品总估计金额:¥{$detail.total_amount}

    +
    +
    + + + +
    +
    + 订单操作 +
    +
    + +
    +
    + {eq name="$detail.order_status" value="0"} + + {/eq} + +
    +
    +
    +
    + 订单流程 +
    +
    +
    +
    +
      + {volist name="$detail.logs" id="vo"} +
    • + +
      +

      {$vo.remark}({$vo.create_time})

      + + {notempty name="$vo.extra"} +

      {$vo.extra}

      + {/notempty} +
      +
    • + {/volist} +
    +
    +
    +
    +
    + + +{/block} \ No newline at end of file diff --git a/application/admin/view/consignment_order/examine.html b/application/admin/view/consignment_order/examine.html new file mode 100755 index 0000000..4d1ecc9 --- /dev/null +++ b/application/admin/view/consignment_order/examine.html @@ -0,0 +1,246 @@ +{extend name="layout1" /} +{block name='content'} + + +
    + +
    + +
    +
    + 取货信息 +
    +
    +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.address}
    + +
    {$detail.takeparts_time}
    +
    +
    +
    + 退货信息 +
    +
    + {eq name="$detail.is_return" value="1"} +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.address}
    +
    + {else/} +
    + +
    无需退回
    +
    + {/eq} +
    +
    + 商品信息 +
    +
    + +
    + + + + + + + + + + + + + + + + + {foreach $detail.consignment_order_goods as $k => $goods} + + + + + + + {/foreach} + +
    图片商品名称商品信息操作
    +
    + {foreach $goods.img_list as $k1 => $img} +
    + +
    + {/foreach} +
    +
    +
    + {$goods.goods_name} +
    +
    +
    +
    +

    购买价格:{$goods.goods_price}

    +

    尺寸:{$goods.item_value}

    +

    品牌:{$goods.brand_name}

    +

    品类:{$goods.class_name}

    +

    品相:{$goods.phase_name}

    +

    购买渠道:{$goods.channel_name}

    +
    +
    +
    + {if condition="$goods.refund_status=='0' && $goods.is_confirm=='1'"} + + + {/if} +
    +
    +
    +
    + + +{/block} \ No newline at end of file diff --git a/application/admin/view/consignment_order/index.html b/application/admin/view/consignment_order/index.html new file mode 100755 index 0000000..7fc16a4 --- /dev/null +++ b/application/admin/view/consignment_order/index.html @@ -0,0 +1,335 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + {/foreach} + +
    +
    订单信息
    +
    +
    用户信息
    +
    +
    商品信息
    +
    +
    取货信息
    +
    +
    退货信息
    +
    操作
    +
    +
    +

    订单编号:{$item.order_sn}

    +

    订单状态:{$item.order_status_text}

    +

    订单金额:{$item.total_amount}

    +

    下单时间:{$item.create_time}

    +
    +
    +
    +
    + +
    +

    用户编号:{$item.sn}

    +

    用户昵称:{$item.nickname}

    +

    用户手机:{$item.mobile}

    +
    +
    +
    + {foreach name="item.consignment_order_goods" item="item1"} +
    +
    + {$item1.goods_name} + ¥{$item1.goods_price} +
    + {$item1.item_value} +
    +
    + {/foreach} +
    +
    +
    +

    取货人:{$item.consignee}

    +

    手机号码:{$item.mobile}

    +

    取货地址:{$item.address}

    +
    +
    +
    + {eq name="$item.is_return" value="1"} +
    +
    +

    退货人:{$item.th_consignee}

    +

    手机号码:{$item.th_mobile}

    +

    退货地址:{$item.th_address}

    +
    +
    + {else} + 无需退回 + {/eq} +
    +
    + + {eq name="$item.order_status" value="0"} + + {/eq} + {if condition="$item.order_status=='4'"} + + {/if} + {if condition="($item.order_status=='5' || $item.order_status=='6') && $item.is_return=='1'"} + + {/if} + {if condition="$item.order_status=='5' || $item.order_status=='6'"} + + {/if} +
    +
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/consignment_order/pickup.html b/application/admin/view/consignment_order/pickup.html new file mode 100755 index 0000000..2396c48 --- /dev/null +++ b/application/admin/view/consignment_order/pickup.html @@ -0,0 +1,244 @@ +{extend name="layout1" /} +{block name='content'} + + +
    + +
    + +
    +
    + 取货信息 +
    +
    +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.address}
    + +
    {$detail.takeparts_time}
    +
    +
    +
    + 退货信息 +
    +
    + {eq name="$detail.is_return" value="1"} +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.address}
    +
    + {else/} +
    + +
    无需退回
    +
    + {/eq} +
    +
    + 商品信息 +
    +
    + +
    + + + + + + + + + + + + + + + + + + + {foreach $detail.consignment_order_goods as $k => $goods} + + + + + + + + + {/foreach} + +
    图片商品名称商品信息估价状态
    +
    + {foreach $goods.img_list as $k1 => $img} +
    + +
    + {/foreach} +
    +
    +
    + {$goods.goods_name} +
    +
    +
    +
    +

    购买价格:{$goods.goods_price}

    +

    尺寸:{$goods.item_value}

    +

    品牌:{$goods.brand_name}

    +

    品类:{$goods.class_name}

    +

    品相:{$goods.phase_name}

    +

    购买渠道:{$goods.channel_name}

    +
    +
    +
    +
    + {$goods.evaluation_price} +
    +
    + {if condition="$goods.is_confirm=='1'"} +
    + 已同意估价 +
    + {elseif condition="$goods.is_confirm=='0'"/} +
    + 未同意估价 +
    + {else condition="$goods.refund_status=='2'"/} +
    + {$goods.refund_remarks} +
    + {/if} +
    +
    + +
    +
    + 取货物流 +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + + +
    +
    +
    +
    + + + +{/block} \ No newline at end of file diff --git a/application/admin/view/consignment_order/return.html b/application/admin/view/consignment_order/return.html new file mode 100755 index 0000000..69d8bb8 --- /dev/null +++ b/application/admin/view/consignment_order/return.html @@ -0,0 +1,208 @@ +{extend name="layout1" /} +{block name='content'} + + +
    + +
    + +
    +
    + 取货信息 +
    +
    +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.address}
    + +
    {$detail.takeparts_time}
    +
    +
    +
    + 退货信息 +
    +
    + {eq name="$detail.is_return" value="1"} +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.address}
    +
    + {else/} +
    + +
    无需退回
    +
    + {/eq} +
    +
    + 商品信息 +
    +
    + +
    + + + + + + + + + + + + + + + + + {foreach $detail.consignment_order_goods as $k => $goods} + + + + + + + {/foreach} + +
    图片商品名称商品信息操作
    +
    + {foreach $goods.img_list as $k1 => $img} +
    + +
    + {/foreach} +
    +
    +
    + {$goods.goods_name} +
    +
    +
    +
    +

    购买价格:{$goods.goods_price}

    +

    尺寸:{$goods.item_value}

    +

    品牌:{$goods.brand_name}

    +

    品类:{$goods.class_name}

    +

    品相:{$goods.phase_name}

    +

    购买渠道:{$goods.channel_name}

    +
    +
    +
    + {if condition="$goods.refund_status=='1'"} + + {/if} +
    +
    +
    +
    + + +{/block} \ No newline at end of file diff --git a/application/admin/view/consignment_order/shelves.html b/application/admin/view/consignment_order/shelves.html new file mode 100755 index 0000000..5d0f788 --- /dev/null +++ b/application/admin/view/consignment_order/shelves.html @@ -0,0 +1,167 @@ +{extend name="layout1" /} +{block name='content'} + + +
    + +
    + +
    +
    + 商品信息 +
    +
    + +
    + + + + + + + + + + + + + + + + + {foreach $detail.consignment_order_goods as $k => $goods} + + + + + + + {/foreach} + +
    图片商品名称商品信息操作
    +
    + {foreach $goods.img_list as $k1 => $img} +
    + +
    + {/foreach} +
    +
    +
    + {$goods.goods_name} +
    +
    +
    +
    +

    购买价格:{$goods.goods_price}

    +

    尺寸:{$goods.item_value}

    +

    品牌:{$goods.brand_name}

    +

    品类:{$goods.class_name}

    +

    品相:{$goods.phase_name}

    +

    购买渠道:{$goods.channel_name}

    +
    +
    +
    + {if condition="$goods.refund_status=='1'"} + + {/if} +
    +
    +
    +
    + + +{/block} \ No newline at end of file diff --git a/application/admin/view/finance/lists.html b/application/admin/view/finance/lists.html new file mode 100755 index 0000000..702b627 --- /dev/null +++ b/application/admin/view/finance/lists.html @@ -0,0 +1,177 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    + +
    +
    +
    订单概况
    +
    +
    +
    +
    + +
    本月订单金额(元)
    +
    + +

    1

    +
    +
    +
    + +
    订单总金额(元)
    +
    + +

    1

    +
    +
    +
    + +
    订单总数(笔)
    +
    + +

    1

    +
    +
    +
    + +
    退款订单总额(元)
    +
    + +

    1

    +
    +
    +
    + +
    退款订单总数(笔)
    +
    + +

    1

    +
    +
    +
    + +
    +
    +
    会员概况
    +
    +
    +
    +
    + +
    会员余额(元)
    +
    + +

    1

    +
    +
    +
    + +
    会员积分
    +
    + +

    1

    +
    +
    +
    + +
    会员可提现佣金(元)
    +
    + +

    1

    +
    +
    +
    + +
    会员已提现佣金(元)
    +
    + +

    1

    +
    +
    +
    + + +
    +
    +
    分销概况
    +
    +
    +
    +
    + +
    本月分销佣金(元)
    +
    + +

    1

    +
    +
    +
    + +
    分销总佣金(元)
    +
    + +

    1

    +
    +
    +
    + +
    提现中佣金(元)
    +
    + +

    1

    +
    +
    +
    + +
    已提现佣金(元)
    +
    + +

    1

    +
    +
    +
    +
    + + + +{/block} \ No newline at end of file diff --git a/application/admin/view/generate/add.html b/application/admin/view/generate/add.html new file mode 100755 index 0000000..766b9cb --- /dev/null +++ b/application/admin/view/generate/add.html @@ -0,0 +1,810 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    + + +
    +
    +
    +
    +
    +

    代码自动生成

    +
    + + +
    +
    +
    + + + +
    + +
    + + +
    + +
    + + +
    + +
    + +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    + +
    +
    + + +
    +
    + +
    + + + +
    + + +
    + + +
    + +
    +
    + + +
    +
    + +
    + + +
    + +
    + + +
    + +
    + + +
    +
    +
    + + +
    +
    +
    + + +
    + +
    + + +
    + +
    + + +
    + +
    + +
    + +
    + +
    +
    +
    + + +
    +
    +
    + + +
    + + +
    + + +
    +
    + + +
    + + +
    + + + + + + + + + + + + + + + + + +
    操作字段类型名称列表搜索表单表单类型表单验证更多
    +
    + +
    +
    +
    + +
    + + + + + + + + + + + + + + + + + + + + + +
    + + +
    + + +{/block} \ No newline at end of file diff --git a/application/admin/view/generate/form.html b/application/admin/view/generate/form.html new file mode 100755 index 0000000..38b87c1 --- /dev/null +++ b/application/admin/view/generate/form.html @@ -0,0 +1,218 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    +
    +
    +
    + + + + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    +
    + + +
    +
    +
    + + + +
    + + +
    +
    +
    + +
    +
    +
    +

    生成结果

    + +
    +
    + +
    + +
    +
    + +
    + +
    + + + + + +{/block} + diff --git a/application/admin/view/generate/index.html b/application/admin/view/generate/index.html new file mode 100755 index 0000000..946d69e --- /dev/null +++ b/application/admin/view/generate/index.html @@ -0,0 +1,29 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + +
    + 代码自动生成 + 点击跳转 +
    +
    +
    + +
    +
    + +
    + 表单字段生成 + 点击跳转 +
    +
    +
    + +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/goods/add.html b/application/admin/view/goods/add.html new file mode 100755 index 0000000..34093ca --- /dev/null +++ b/application/admin/view/goods/add.html @@ -0,0 +1,521 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} + + + +
    +
    +
    + + + +
    +
    +
    +
      +
    • 基本设置
    • +
    • 尺码库存
    • +
    • 商品详情
    • +
    • 精品搭配
    • +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + + + + +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    + +
    +
    +
    +
    + + + + + + + + + {foreach name='size_list' key='k' id='item1'} + + + + + {/foreach} + +
    尺码库存
    + + + +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    + + + + + + + + + {foreach name='collocation_goods' key='k' id='item1'} + + + + + {/foreach} + +
    商品名称操作
    + + + + 追加 + 删除 +
    +
    +
    +
    +
    +
    +
    + + +
    +
    +
    +
    + + + + + + + + +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/goods/index.html b/application/admin/view/goods/index.html new file mode 100755 index 0000000..41cef1b --- /dev/null +++ b/application/admin/view/goods/index.html @@ -0,0 +1,166 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    + + +
    +
    +
    +
    +
    + +
    + +
    + +
    + +
    + +
    + +
    + + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    + + + + + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + + + + + {/foreach} + +
    + + ID名称所属分类售价总库存排序(升序)是否上架创建时间操作
    + + {$item.id}{$item.name}{$item.goods_category.name|default=''}{$item.price}{$item.stock}{$item.sort_number}{$item.status_text}{$item.create_time} + + + + + + + +
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/goods_brand/add.html b/application/admin/view/goods_brand/add.html new file mode 100755 index 0000000..6c3f0a7 --- /dev/null +++ b/application/admin/view/goods_brand/add.html @@ -0,0 +1,134 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + + + +
    + +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    + +
    + + +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/goods_brand/index.html b/application/admin/view/goods_brand/index.html new file mode 100755 index 0000000..cecb481 --- /dev/null +++ b/application/admin/view/goods_brand/index.html @@ -0,0 +1,126 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    + + +
    +
    +
    +
    +
    + +
    + +
    + + + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    + + + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + + + {/foreach} + +
    + +品牌名称品牌首字母是否显示排序创建时间操作
    + +{$item.name}{$item.initial}{$item.is_show_text}{$item.sort}{$item.create_time} + + + + + + + +
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/goods_category/add.html b/application/admin/view/goods_category/add.html new file mode 100755 index 0000000..60cdaec --- /dev/null +++ b/application/admin/view/goods_category/add.html @@ -0,0 +1,98 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + + + +
    + +
    +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + + +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/goods_category/index.html b/application/admin/view/goods_category/index.html new file mode 100755 index 0000000..36fa9ff --- /dev/null +++ b/application/admin/view/goods_category/index.html @@ -0,0 +1,85 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    + + +
    +
    +
    +
    +
    + +
    + +
    + + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    + + + + + + + + + + + + {$data|raw} + +
    + + ID名称操作
    +
    + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/goods_index/add.html b/application/admin/view/goods_index/add.html new file mode 100755 index 0000000..2f343a8 --- /dev/null +++ b/application/admin/view/goods_index/add.html @@ -0,0 +1,227 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + + + +
    + +
    +
    + +
    + +
    +
    +
    + +
    + + + +
    +
    +
    + +
    + + + + + + + + + {foreach name='goods_ids' key='k' id='item1'} + + + + + {/foreach} + +
    商品名称操作
    + + + + 追加 + 删除 +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    + + +
    + + +
    +
    +
    +
    +
    + + + + + + + +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/goods_index/index.html b/application/admin/view/goods_index/index.html new file mode 100755 index 0000000..d3db8a9 --- /dev/null +++ b/application/admin/view/goods_index/index.html @@ -0,0 +1,124 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    + + +
    +
    +
    +
    +
    + +
    + +
    + + + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    + + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + + {/foreach} + +
    + +栏目名称排序(升序)是否上架创建时间操作
    + +{$item.name}{$item.sort_number}{$item.status_text}{$item.create_time} + + + + + + + +
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/index/index.html b/application/admin/view/index/index.html new file mode 100755 index 0000000..9b5f402 --- /dev/null +++ b/application/admin/view/index/index.html @@ -0,0 +1,155 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    +
    +
    +
    + 运营数据 + 更新时间:{$res.time} +
    +
    +
    +
    +
    +
    + 成交订单(笔) + 今日 +
    +
    +

    {$res.order_num_today}

    +

    昨日:{$res.order_num_yesterday} + {$res.order_num_change}

    + +
    成交订单总量(笔)
    {$res.order_num_all}
    +
    +
    +
    +
    +
    +
    + 销售金额(元) + 今日 +
    +
    +

    {$res.order_amount_today}

    + +

    昨日:{$res.order_amount_yesterday} + {$res.order_amount_change}

    +
    销售总额(元)
    {$res.order_amount_all}
    +
    +
    +
    +
    +
    +
    + 新增会员(人) + 今日 +
    +
    +

    {$res.add_user_today}

    +

    昨日:{$res.add_user_yesterday} + {$res.add_user_change}

    +
    会员总量(人)
    {$res.user_all}
    +
    +
    +
    + + + +
    +
    +
    + + + +{/block} \ No newline at end of file diff --git a/application/admin/view/layout1.html b/application/admin/view/layout1.html new file mode 100755 index 0000000..1c0e835 --- /dev/null +++ b/application/admin/view/layout1.html @@ -0,0 +1,30 @@ +{if !$admin.pjax} + + + + + + +{/if} + {block name='title'} + {$admin.title|default='Admin'} | {$admin.name|default='Admin'} + {/block} +{if !$admin.pjax} + + + + + + +{/if} + +
    + {block name='content'}{/block} +
    +{if !$admin.pjax} +{/if} + +{if !$admin.pjax} + + +{/if} \ No newline at end of file diff --git a/application/admin/view/order/delivery.html b/application/admin/view/order/delivery.html new file mode 100755 index 0000000..e967572 --- /dev/null +++ b/application/admin/view/order/delivery.html @@ -0,0 +1,191 @@ +{extend name="layout1" /} +{block name='content'} + + +
    + +
    + + +
    +
    + 收货信息 +
    +
    + +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.delivery_address}
    +
    + + +
    +
    + 商品信息 +
    +
    + +
    + + + + + + + + + + + + + + + + {foreach $detail.order_goods as $k => $goods} + + + + + + {/foreach} + +
    商品信息价格(元)数量
    +
    +
    + +
    +
    +

    {$goods.goods_name}

    +
    +

    {$goods.item_value}

    +
    +
    +
    ¥{$goods.goods_price}{$goods.goods_num}
    +
    + +
    +
    + 快递配送 +
    +
    + + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    +
    + + +
    +
    +
    +
    + + + +{/block} \ No newline at end of file diff --git a/application/admin/view/order/detail.html b/application/admin/view/order/detail.html new file mode 100755 index 0000000..d35bbb3 --- /dev/null +++ b/application/admin/view/order/detail.html @@ -0,0 +1,276 @@ +{extend name="layout1" /} +{block name='content'} + + +
    + +
    + + +
    +
    + 订单信息 +
    +
    + +
    + +
    {$detail.order_sn}
    + +
    {$detail.order_status_text}
    + +
    {$detail.create_time}
    + +
    {$detail.pay_time}
    +
    + +
    +
    + 会员信息 +
    +
    + +
    + +
    {$detail.user.sn}
    + +
    {$detail.user.nickname}
    + +
    {$detail.user.mobile}
    + +
    {$detail.user.create_time}
    +
    +
    +
    + 收货信息 +
    +
    + +
    + +
    {$detail.consignee}
    + +
    {$detail.mobile}
    + +
    {$detail.delivery_address}
    +
    +
    +
    + 快递信息 +
    +
    + {empty name="$detail.invoice_no"} +
    + +
    暂无物流信息
    +
    + {else/} +
    + +
    {$detail.shipping_time | default= "未知"}
    + +
    {$detail.invoice_name | default="未知"}
    + +
    {$detail.invoice_no | default= "未知"}
    +
    + {/empty} +
    +
    + 商品信息 +
    +
    + +
    + + + + + + + + + + + + + + + + {foreach $detail.order_goods as $k => $goods} + + + + + + {/foreach} + + + + + +
    商品信息价格(元)数量
    +
    +
    + +
    +
    +

    {$goods.goods_name}

    +
    +

    {$goods.item_value}

    +
    +
    +
    ¥{$goods.goods_price}{$goods.goods_num}
    +

    商品金额:¥{$detail.goods_price}

    +

    应付金额:¥{$detail.order_amount}

    +
    +
    + + + +
    +
    + 订单操作 +
    +
    + +
    +
    + + {eq name="$detail.order_status" value="1"} + + + {/eq} + + {eq name="$detail.order_status" value="2"} + + {/eq} + +
    +
    +
    +
    + + +{/block} \ No newline at end of file diff --git a/application/admin/view/order/index.html b/application/admin/view/order/index.html new file mode 100755 index 0000000..c23076c --- /dev/null +++ b/application/admin/view/order/index.html @@ -0,0 +1,300 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + {/foreach} + +
    +
    订单信息
    +
    +
    用户信息
    +
    +
    商品信息
    +
    +
    收货信息
    +
    操作
    +
    +
    +

    订单编号:{$item.order_sn}

    +

    订单状态:{$item.order_status_text}

    +

    订单金额:{$item.total_amount}

    +

    下单时间:{$item.create_time}

    +
    +
    +
    +
    + +
    +

    用户编号:{$item.sn}

    +

    用户昵称:{$item.nickname}

    +

    用户手机:{$item.mobile}

    +
    +
    +
    + {foreach name="item.order_goods" item="item1"} +
    + +
    + {$item1.goods_name} + ¥{$item1.goods_price} +
    + {$item1.item_value} + {$item1.goods_num}件 +
    +
    + {/foreach} +
    +
    +
    +

    收货人:{$item.consignee}

    +

    手机号码:{$item.mobile}

    +

    收货地址:{$item.delivery_address}

    +
    +
    +
    +
    + + {eq name="$item.order_status" value="1"} + + {/eq} + + {eq name="$item.order_status" value="2"} + + {/eq} +
    +
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/phase_config/add.html b/application/admin/view/phase_config/add.html new file mode 100755 index 0000000..f127b49 --- /dev/null +++ b/application/admin/view/phase_config/add.html @@ -0,0 +1,88 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + + + +
    + +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + + +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/phase_config/index.html b/application/admin/view/phase_config/index.html new file mode 100755 index 0000000..1da08a6 --- /dev/null +++ b/application/admin/view/phase_config/index.html @@ -0,0 +1,122 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    + + +
    +
    +
    +
    +
    + +
    + +
    + + + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + {/foreach} + +
    + +名称描述添加时间操作
    + +{$item.name}{$item.describe}{$item.create_time} + + + + + + + +
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/public/base.html b/application/admin/view/public/base.html new file mode 100755 index 0000000..fe53b4c --- /dev/null +++ b/application/admin/view/public/base.html @@ -0,0 +1,53 @@ +{if !$admin.pjax} + + + + + + +{/if} + + {block name='title'} + {$admin.title|default='Admin'} | {$admin.name|default='Admin'} + {/block} + + +{if !$admin.pjax} + + {include file='public/head_css' /} + + {include file='public/head_js' /} + + +
    +{/if} + + + {block name='header'} + {include file='public/header' /} + {/block} + + {block name='sidebar'} + {include file='public/sidebar' /} + {/block} + +
    + {block name='content'} + {/block} +
    + {block name='footer'} + {include file='public/footer' /} + {/block} + + {block name='control_sidebar'} + {include file='public/control_sidebar' /} + {/block} + +{if !$admin.pjax} +
    +{/if} + +{if !$admin.pjax} + + +{/if} \ No newline at end of file diff --git a/application/admin/view/public/content_header.html b/application/admin/view/public/content_header.html new file mode 100755 index 0000000..a2aa94f --- /dev/null +++ b/application/admin/view/public/content_header.html @@ -0,0 +1,32 @@ + +
    +

    + {$admin.title|default='admin'|raw} +

    + +
    + +{if $Think.session.error_message} + + +{/if} +{if $Think.session.success_message} + +{/if} + + diff --git a/application/admin/view/public/control_sidebar.html b/application/admin/view/public/control_sidebar.html new file mode 100755 index 0000000..e3633fc --- /dev/null +++ b/application/admin/view/public/control_sidebar.html @@ -0,0 +1,12 @@ + +{if !$admin.pjax} + +
    +{/if} \ No newline at end of file diff --git a/application/admin/view/public/footer.html b/application/admin/view/public/footer.html new file mode 100755 index 0000000..9e634b4 --- /dev/null +++ b/application/admin/view/public/footer.html @@ -0,0 +1,10 @@ + +{if !$admin.pjax} + +{/if} \ No newline at end of file diff --git a/application/admin/view/public/head_css.html b/application/admin/view/public/head_css.html new file mode 100755 index 0000000..bd7a5b8 --- /dev/null +++ b/application/admin/view/public/head_css.html @@ -0,0 +1,18 @@ + +{css href="__ADMIN_PLUGINS__/bootstrap/css/bootstrap.min.css" /} +{js href="__ADMIN_PLUGINS__/bootstrap-switch/css/bootstrap-switch.min.css" /} +{css href="__ADMIN_PLUGINS__/font-awesome/css/font-awesome.min.css" /} +{css href="__ADMIN_PLUGINS__/iconpicker/css/iconpicker.min.css" /} +{css href="__ADMIN_PLUGINS__/select2/css/select2.min.css" /} +{css href="__ADMIN_PLUGINS__/fileinput/css/fileinput.min.css" /} +{css href="__ADMIN_PLUGINS__/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css" /} +{css href="__ADMIN_CSS__/AdminLTE.min.css" /} +{css href="__ADMIN_CSS__/admin.css" /} +{css href="__ADMIN_CSS__/_all-skins.min.css" /} +{css href="__ADMIN_CSS__/skins.css" /} + +{css href="__ADMIN_PLUGINS__/nprogress/nprogress.css" /} + \ No newline at end of file diff --git a/application/admin/view/public/head_js.html b/application/admin/view/public/head_js.html new file mode 100755 index 0000000..a9ffdfd --- /dev/null +++ b/application/admin/view/public/head_js.html @@ -0,0 +1,49 @@ + +{if !$admin.pjax} +{js href="__ADMIN_PLUGINS__/js-cookie/js.cookie-2.2.0.min.js" /} +{js href="__ADMIN_PLUGINS__/jquery/jquery.min.js" /} +{js href="__ADMIN_PLUGINS__/jquery-ui/jquery-ui.min.js" /} +{js href="__ADMIN_PLUGINS__/layer/layer.js" /} +{js href="__ADMIN_PLUGINS__/laydate/laydate.js" /} +{js href="__ADMIN_PLUGINS__/bootstrap/js/bootstrap.min.js" /} +{js href="__ADMIN_PLUGINS__/jquery-slimscroll/jquery.slimscroll.min.js" /} +{js href="__ADMIN_PLUGINS__/jquery-validation/jquery.validate.min.js" /} +{js href="__ADMIN_PLUGINS__/jquery-validation/localization/messages_zh.min.js" /} +{js href="__ADMIN_PLUGINS__/bootstrap-switch/js/bootstrap-switch.min.js" /} +{js href="__ADMIN_PLUGINS__/bootstrap-number/bootstrap-number.min.js" /} +{js href="__ADMIN_PLUGINS__/fastclick/fastclick.min.js" /} +{js href="__ADMIN_PLUGINS__/select2/js/select2.full.min.js" /} +{js href="__ADMIN_PLUGINS__/nprogress/nprogress.min.js" /} +{js href="__ADMIN_PLUGINS__/iconpicker/js/iconpicker.min.js" /} +{js href="__ADMIN_PLUGINS__/ueditor/ueditor.config.js" /} +{js href="__ADMIN_PLUGINS__/ueditor/ueditor.all.min.js" /} +{js href="__ADMIN_PLUGINS__/ueditor/lang/zh-cn/zh-cn.min.js" /} +{js href="__ADMIN_PLUGINS__/clipboard/clipboard.min.js" /} +{js href="__ADMIN_PLUGINS__/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js" /} +{js href="__ADMIN_PLUGINS__/viewer/viewer.min.js" /} +{js href="__ADMIN_PLUGINS__/viewer/jquery-viewer.min.js" /} +{js href="__ADMIN_JS__/tag/jquery.tag-editor.js" /} +{css href="__ADMIN_JS__/tag/jquery.tag-editor.css" /} + + + + + + + +{js href="__ADMIN_JS__/adminlte.min.js" /} +{js href="__ADMIN_JS__/jquery.pjax.js" /} +{js href="__ADMIN_JS__/admin.js" /} +{js href="__ADMIN_JS__/demo.js" /} +{js href="__ADMIN_JS__/app.js" /} + +{/if} \ No newline at end of file diff --git a/application/admin/view/public/header.html b/application/admin/view/public/header.html new file mode 100755 index 0000000..e651bd4 --- /dev/null +++ b/application/admin/view/public/header.html @@ -0,0 +1,54 @@ + +{if !$admin.pjax} +
    + + +
    +{/if} diff --git a/application/admin/view/public/sidebar.html b/application/admin/view/public/sidebar.html new file mode 100755 index 0000000..5700857 --- /dev/null +++ b/application/admin/view/public/sidebar.html @@ -0,0 +1,30 @@ + +{if !$admin.pjax} + +{/if} \ No newline at end of file diff --git a/application/admin/view/shop_config/policy.html b/application/admin/view/shop_config/policy.html new file mode 100755 index 0000000..97f485b --- /dev/null +++ b/application/admin/view/shop_config/policy.html @@ -0,0 +1,174 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + +
    + +
    +
    +
      +
    • 寄卖流程
    • +
    • 寄卖规则
    • +
    • 联系我们
    • +
    • 社群与交流
    • +
    • 隐私政策
    • +
    • 条款与条件
    • +
    • 寄卖成功提醒
    • +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    + + + +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/shop_config/website.html b/application/admin/view/shop_config/website.html new file mode 100755 index 0000000..b11548b --- /dev/null +++ b/application/admin/view/shop_config/website.html @@ -0,0 +1,201 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} + +
    +
    +
    +
    + +
    + +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    + +
    + + 多个购买渠道请用英文逗号分隔 +
    +
    +
    + +
    + + 寄卖满XX件才可下单 +
    +
    +
    + +
    + + 多个尺寸请用英文逗号分隔 +
    +
    +
    + +
      +
    • + +
    +
    + +
    + + +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/shop_config/withdraw.html b/application/admin/view/shop_config/withdraw.html new file mode 100755 index 0000000..09e57d4 --- /dev/null +++ b/application/admin/view/shop_config/withdraw.html @@ -0,0 +1,70 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + +
    + +
    +
    + +
    + + 会员提现需满足最低提现金额,才能提交提现申请。 +
    + +
    +
    + +
    + + 会员提现允许的最高提现金额。 +
    + +
    +
    + +
    + + +
    +
    +
    + +
    + + 会员提现时收取的手续费。 +
    + +
    +
    + + +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/slide/add.html b/application/admin/view/slide/add.html new file mode 100755 index 0000000..75be08d --- /dev/null +++ b/application/admin/view/slide/add.html @@ -0,0 +1,264 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} + +
    +
    +
    +
    + + + +
    + +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    + +
      +
    • + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + +
    + +
    +
    + +
    + + +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/slide/index.html b/application/admin/view/slide/index.html new file mode 100755 index 0000000..c8732f7 --- /dev/null +++ b/application/admin/view/slide/index.html @@ -0,0 +1,137 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    + + +
    +
    +
    +
    +
    + +
    + +
    + + +
    + +
    + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    + + + + + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + + + + + {/foreach} + +
    + + ID名称图片跳转类型跳转目标排序创建时间操作
    + + {$item.id}{$item.name}{$item.jump_type_text}{$item.jump_target_text}{$item.sort_number}{$item.create_time} + + + + + + + +
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/template/404.html b/application/admin/view/template/404.html new file mode 100755 index 0000000..5556275 --- /dev/null +++ b/application/admin/view/template/404.html @@ -0,0 +1,17 @@ + +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +

    404

    +
    +

    哎呀!找不到页面。

    +

    + 我们找不到您要查找的页面。 + 同时,您可以

    返回上一页 或者 去首页 +

    +
    +
    +
    +{/block} \ No newline at end of file diff --git a/application/admin/view/template/500.html b/application/admin/view/template/500.html new file mode 100755 index 0000000..81e9a01 --- /dev/null +++ b/application/admin/view/template/500.html @@ -0,0 +1,17 @@ + +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +

    404

    +
    +

    哎呀!页面出问题了。

    +

    + 当前页面出现了一点点问题。 + 同时,您可以

    返回上一页 或者 去首页 +

    +
    +
    +
    +{/block} \ No newline at end of file diff --git a/application/admin/view/template/content.html b/application/admin/view/template/content.html new file mode 100755 index 0000000..f0c48a9 --- /dev/null +++ b/application/admin/view/template/content.html @@ -0,0 +1,11 @@ + +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} +
    + + + +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/user/add.html b/application/admin/view/user/add.html new file mode 100755 index 0000000..2bc4b88 --- /dev/null +++ b/application/admin/view/user/add.html @@ -0,0 +1,227 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} + +
    +
    +
    +
    + + + +
    + +
    +
    + +
      +
    • + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    + + +
    + + +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/user/adjust_account.html b/application/admin/view/user/adjust_account.html new file mode 100755 index 0000000..4978f4b --- /dev/null +++ b/application/admin/view/user/adjust_account.html @@ -0,0 +1,113 @@ +{extend name="layout1" /} +{block name='content'} + +
    + +
    +
    +
    +
      +
    • 余额调整
    • +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    +
    + +
    + + +
    + +
    +
    + +
    + + +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/application/admin/view/user/index.html b/application/admin/view/user/index.html new file mode 100755 index 0000000..26b58de --- /dev/null +++ b/application/admin/view/user/index.html @@ -0,0 +1,270 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + + + +
    + + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + {/foreach} + +
    + + +
    用户信息
    +
    +
    用户等级
    +
    +
    可提现金额
    +
    +
    设备数量
    +
    注册时间
    +
    操作
    +
    + + +
    + +
    +

    用户编号:{$item.sn}

    +

    用户昵称:{$item.nickname}

    +

    用户手机:{$item.mobile}

    +
    +
    +
    +
    {$item.user_level_id_text}
    +
    +
    {$item.user_money}
    +
    +
    {$item.create_time}
    +
    + + 修改 + + + 账户调整 + + {if $item.status==1} + + 禁用 + + {else/} + + 启用 + + {/if} +
    + +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/withdraw/lists.html b/application/admin/view/withdraw/lists.html new file mode 100755 index 0000000..eda7dcd --- /dev/null +++ b/application/admin/view/withdraw/lists.html @@ -0,0 +1,251 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + + +
    + + +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + +
    +
    + + + + +
    +
    + +
    + + + + + + + + + + + + + + + + + + {foreach name="data" item="item"} + + + + + + + + + + + + {/foreach} + +
    +
    提现单号
    +
    +
    用户信息
    +
    +
    收款账户信息
    +
    提现金额信息
    提现状态
    审核备注
    创建时间
    操作
    +
    {$item.sn}
    +
    +
    + +
    +

    用户编号:{$item.user_sn}

    +

    用户昵称:{$item.nickname}

    +

    用户手机:{$item.mobile}

    +
    +
    +
    +
    +
    +

    提现方式:{$item.type_text}

    +

    提现姓名:{$item.real_name}

    +

    提现手机:{$item.real_tel}

    +

    提现账户:{$item.account}

    + {if $item.type eq 3} +

    提现开户:{$item.subbank}

    + {/if} +
    +
    +
    +
    +
    +

    用户提现金额:{$item.money}

    +

    手续费:{$item.poundage}

    +

    用户到账金额:{$item.left_money}

    +
    +
    +
    +
    {$item.status_text}
    +
    +
    {$item.description}
    +
    +
    {$item.create_time}
    +
    +
    + {if $item.status eq 1} + + 审核 + + {/if} +
    +
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/application/admin/view/withdraw/review.html b/application/admin/view/withdraw/review.html new file mode 100755 index 0000000..ed4cf27 --- /dev/null +++ b/application/admin/view/withdraw/review.html @@ -0,0 +1,120 @@ +{extend name="layout1" /} +{block name='content'} + +
    +
    + +
    + +
    + + +
    +
    +
    + +
    审核拒绝后,提现金额会全部退回佣金账户
    +
    +
    + +
    + +
    +
    +
    + +
    + + +
    +
    +
    + + +
    +{/block} \ No newline at end of file diff --git a/application/api/common.php b/application/api/common.php new file mode 100755 index 0000000..34f7d31 --- /dev/null +++ b/application/api/common.php @@ -0,0 +1,201 @@ + '*']; + if (request()->isOptions()) { + $header = config('api.cross_domain.header'); + return json('',200,$header); + } + } + + return json([ + 'code' => $code, + 'msg' => $msg, + 'data' => $data, + ], $code, $header); + } +} + +if(!function_exists('unauthorized')){ + /** + * 未授权 + * @param string $msg + * @param string $data + * @param int $code + * @return Json + */ + function unauthorized($msg = 'unauthorized', $data = '', $code = 401) + { + return result($msg, $data, $code); + } +} + +if(!function_exists('client_error')){ + /** + * 客户端错误 + * @param string $msg + * @param string $data + * @param int $code + * @return Json + */ + function client_error($msg = 'client error', $data = '', $code = 400) + { + return result($msg, $data, $code); + } +} + +if(!function_exists('server_error')){ + /** + * 服务端错误 + * @param string $msg + * @param string $data + * @param int $code + * @return Json + */ + function server_error($msg = 'server error', $data = '', $code = 500) + { + return result($msg, $data, $code); + } +} + +if(!function_exists('error_404')){ + /** + * 资源或接口不存在 + * @param string $msg + * @param string $data + * @param int $code + * @return Json + */ + function error_404($msg = '404 not found', $data = '', $code = 404) + { + return result($msg, $data, $code); + } +} + +if (!function_exists('get_ad')) { + /** + * 广告列表 + * @param string $alias 广告别名 + * @param string $num。显示数量 + * @return li + */ + function get_ad($alias, $num = '999') + { + $_malladviceModel = new Slide(); + $where = 'alias="'.$alias.'"'; + $malladvice_list = $_malladviceModel->where($where)->limit($num)->order('sort_number desc')->select(); + $ad = array(); + $web_url = ShopConfig::get('website', 'img_url'); + foreach ($malladvice_list as $key => $row) { + $ad[$key]['id'] = $row['id']; + if($row['jump_type']==1){ + $ad[$key]['unionid'] = Crypt::encrypt($row['jump_target']); + }else{ + $ad[$key]['url'] = $row['jump_target']; + } + $ad[$key]['type'] = $row['jump_type']; + $ad[$key]['name'] = $row['name']; + $ad[$key]['describe'] = $row['describe']; + $ad[$key]['img'] = $web_url . $row['img']; + } + return $ad; + } +} + +if(!function_exists('curl_request')){ + //参数1:访问的URL,参数2:post数据(不填则为GET),参数3:提交的$cookies,参数4:是否返回$cookies + function curl_request($url,$post='',$cookie='', $returnCookie=0) + { + $curl = curl_init(); + curl_setopt($curl, CURLOPT_URL, $url); + curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)'); + curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1); + curl_setopt($curl, CURLOPT_AUTOREFERER, 1); + curl_setopt($curl, CURLOPT_REFERER, "http://XXX"); + if($post) { + curl_setopt($curl, CURLOPT_POST, 1); + curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post)); + } + if($cookie) { + curl_setopt($curl, CURLOPT_COOKIE, $cookie); + } + curl_setopt($curl, CURLOPT_HEADER, $returnCookie); + curl_setopt($curl, CURLOPT_TIMEOUT, 10); + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + $data = curl_exec($curl); + if (curl_errno($curl)) { + return curl_error($curl); + } + curl_close($curl); + if($returnCookie){ + list($header, $body) = explode("\r\n\r\n", $data, 2); + preg_match_all("/Set\-Cookie:([^;]*);/", $header, $matches); + $info['cookie'] = substr($matches[1][0], 1); + $info['content'] = $body; + return $info; + }else{ + return $data; + } + } +} + +//分类递归 +if(!function_exists('getSubs')){ + function getSubs($categorys,$catId=0,$level=1){ + $subs=array(); + foreach($categorys as $item){ + if($item['parent_id']==$catId){ + $item['son'] = getSubs($categorys, $item['cid']); + if(empty($item['son'])) { + unset($item['son']); + } + array_push($subs, $item); + } + } + return $subs; + } +} diff --git a/application/api/controller/AuthController.php b/application/api/controller/AuthController.php new file mode 100755 index 0000000..14c60a0 --- /dev/null +++ b/application/api/controller/AuthController.php @@ -0,0 +1,109 @@ +param(); + $avatar =$param['avatar']??''; + $nickname =$param['nickname']??''; + $code =$param['code']??''; + $distribution_code =$param['distribution_code']??''; + $encryptedData =$param['encryptedData']??''; + $iv =$param['iv']??''; + if(!$avatar || !$nickname || !$code){ + return error('参数不足'); + } + $user_info = $this->get_openid($code,$encryptedData,$iv); + if (!$user_info['openid']) { + return error('授权失败'); + } + $where['mobile'] = array('EQ',$user_info['tel']); + $userinfo = $fumodel->field('id,avatar,nickname,openid')->where($where)->find(); + if($userinfo && !$userinfo['openid']){ + $data_login['login_ip']=$request->ip(); + $data_login['login_time']=time(); + $data_login['openid']=$user_info['openid']; + $fumodel->where('id', $userinfo['id'])->update($data_login); + $token = $this->getToken($userinfo['id']); + $uid=Crypt::encrypt($userinfo['id']); + return success(['token' => $token,'uid'=>$uid], '登录成功'); + }else if($userinfo && $userinfo['openid']){ + $data_login['login_ip']=$request->ip(); + $data_login['login_time']=time(); + $fumodel->where('id', $userinfo['id'])->update($data_login); + $token = $this->getToken($userinfo['id']); + $uid=Crypt::encrypt($userinfo['id']); + return success(['token' => $token,'uid'=>$uid], '登录成功'); + } + //登录逻辑 + // 启动事务 + $fumodel->startTrans(); + try { + $res['sn'] =create_user_sn(); + $res['distribution_code'] =generate_invite_code(); + $res['nickname']=$nickname; + $res['username'] = '用户'.$res['sn']; + $res['avatar'] = $avatar; + $res['openid'] = $user_info['openid']; + $res['mobile'] = $user_info['tel']; + $res['create_time'] = time(); + $res['login_ip']=$request->ip(); + $res['login_time']=time(); + $fumodel::create($res); + $uid=$fumodel->getLastInsID(); + //分销 + if($distribution_code){ + $fumodel->code($distribution_code,$uid); + } + $fumodel->commit(); + } catch (Exception $e) { + $fumodel->rollback(); + return client_error($e->getMessage()); + } + $uid=Crypt::encrypt($uid); + $token = $this->getToken($uid); + //返回数据 + return success(['token' => $token,'uid'=>$uid], '注册成功'); + } + + //获取用户临时code 用来去获取openid + public function get_openid($code,$encryptedData,$iv) + { + + $APPID =ShopConfig::get('website', 'APPID'); + $APPSECRET=ShopConfig::get('website', 'APPSECRET'); + $url = 'https://api.weixin.qq.com/sns/jscode2session?appid=' . $APPID. '&secret=' . $APPSECRET. '&js_code=' . $code . '&grant_type=authorization_code'; + $val = curl_request($url); + $user_info = json_decode($val,true); + $encryptedData=urldecode($encryptedData); + $iv = urldecode($iv); + $pc = new WXBizDataCrypt($APPID,$user_info['session_key']); + $errCode = $pc->decryptData($encryptedData,$iv,$data); + $data1 = json_decode($data, true); + $user_info['tel']=$data1['purePhoneNumber']; + return $user_info; + } +} \ No newline at end of file diff --git a/application/api/controller/CartController.php b/application/api/controller/CartController.php new file mode 100755 index 0000000..e5b4d1d --- /dev/null +++ b/application/api/controller/CartController.php @@ -0,0 +1,189 @@ +param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $goods_id = $param['goods_id']?Crypt::decrypt($param['goods_id']):''; + if(!$goods_id){ + return client_error('该商品不存在'); + } + $item_value=$param['item_value']??''; + if(!$item_value){ + return client_error('请选择规格'); + } + $goods_num=$param['goods_num']??'0'; + if($goods_num=='0'){ + return client_error('购买数量必须大于0'); + } + $time = time(); + $where = [ + 'user_id' => $user_id, + 'goods_id' => $goods_id, + 'item_value' => $item_value, + ]; + $info = Cart::where($where)->find(); + + $cart_num = $param['goods_num'] + (isset($info) ? $info['goods_num'] : 0); + + if ($cmodel->checkStock($item_value, $cart_num,$goods_id)) { + return client_error('很抱歉,商品库存不足'); + } + if ($info) { + //购物车内已有该商品 + $update_data = [ + 'goods_num' => $goods_num + $info['goods_num'], + 'update_time' => $time, + ]; + $res =$cmodel + ->where('id', $info['id']) + ->update($update_data); + } else { + //新增购物车记录 + $data = [ + 'user_id' => $user_id, + 'goods_id' => $goods_id, + 'goods_num' => $goods_num, + 'item_value' => $item_value, + 'create_time' => $time, + ]; + $res = $cmodel->insert($data); + } + return $res ? success('','添加成功') : client_error('添加失败'); + } + + //删除购物车 + public function del(Request $request,Cart $cmodel) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $cart_id= $param['cart_id']?Crypt::decrypt($param['cart_id']):'0'; + if($cart_id=='0'){ + return client_error('该购物车商品不存在'); + } + $res = $cmodel->whereIn('id',$cart_id)->delete(); + return $res ? success('','删除成功') : client_error('删除失败'); + } + + //变动购物车数量 + public function change(Request $request,Cart $cmodel) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $cart_id=$param['cart_id']?Crypt::decrypt($param['cart_id']):'0'; + if($cart_id=='0'){ + return client_error('该购物车商品不存在'); + } + $goods_num=$param['goods_num']??'0'; + if($goods_num=='0'){ + return client_error('购买数量必须大于0'); + } + $cart = $cmodel->where(['id' => $cart_id])->find(); + if ($cmodel->checkStock($cart['item_value'], $goods_num,$cart['goods_id'])) { + return client_error('很抱歉,商品库存不足'); + } + $update = [ + 'update_time' => time(), + 'goods_num' => $goods_num, + ]; + $res = $cmodel->where(['id' => $cart_id])->update($update); + return $res ? success('','更新成功') : client_error('更新失败'); + } + + //购物车选中状态 + public function selected(Request $request,Cart $cmodel) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $cart_id=$param['cart_id']?Crypt::decrypt($param['cart_id']):'0'; + if($cart_id=='0'){ + return client_error('该购物车商品不存在'); + } + $res = $cmodel->where(['id' => $cart_id, 'user_id' => $user_id]) + ->update(['selected' => $param['selected'], 'update_time' => time()]); + return $res ? success('','更新成功') : client_error('更新失败'); + } + + //列表 + public function lists(Request $request,Cart $cmodel) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $carts =$cmodel + ->alias('c') + ->field("mi.thumb_image as img,g.name,g.price,g.id as goods_id,gb.name as brand_name,c.goods_num,c.selected,c.id as cart_id,item_value") + ->join('goods g', 'g.id = c.goods_id') + ->join('goods_brand gb', 'gb.id= g.brand_id') + ->join('mall_image mi', 'mi.union_id= c.goods_id and is_cover=1 and mi.type=1', 'LEFT') + ->where('c.user_id', $user_id) + ->order('c.create_time desc') + ->select(); + $goods_num = 0; + $total = 0; + $lists = []; + foreach ($carts as $k1 => $cart) { + $cart['goods_id'] = Crypt::encrypt($cart['goods_id']); + $cart['cart_id'] =Crypt::encrypt($cart['cart_id']); + $cart['img'] = $this->img_url.$cart['img']; + $cart['sub_price'] = 0; + if ($cart['selected'] ==1) { + $goods_num += $cart['goods_num']; + $total += $cart['price'] * $cart['goods_num']; + $cart['sub_price'] = round($cart['price'] * $cart['goods_num'], 2); + } + $cart['selected'] = intval($cart['selected']); + $lists[] = $cart; + } + $data=[ + 'lists' => $lists, + 'total_amount' => round($total, 2), + 'total_num' => $goods_num, + ]; + return success($data); + } + + //获取购物车数量 + public function cartnum(Request $request,Cart $cmodel) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $num = $cmodel->where('user_id', $user_id)->sum('goods_num'); + $data=['num' => $num ?? 0]; + return success($data); + } +} \ No newline at end of file diff --git a/application/api/controller/Controller.php b/application/api/controller/Controller.php new file mode 100755 index 0000000..440bf57 --- /dev/null +++ b/application/api/controller/Controller.php @@ -0,0 +1,66 @@ +isOptions()) { //浏览器的option试探请求,要exit掉,不然你的业务会被执行两次 + exit(); + } + $this->request = $request; + + //jwt验证 + //$this->jtwInit(); + //$this->checkToken(); + + //初始化基本数据 + $this->param = $request->param(); + $this->page = $this->param['page'] ?? 1; + $this->limit = $this->param['limit'] ?? 10; + $this->id = $this->param['id'] ?? 0; + $this->img_url=ShopConfig::get('website', 'img_url'); + + //limit防止过大处理 + $this->limit = $this->limit <= 100 ? $this->limit : 100; + } + + +} diff --git a/application/api/controller/GoodsController.php b/application/api/controller/GoodsController.php new file mode 100755 index 0000000..f172040 --- /dev/null +++ b/application/api/controller/GoodsController.php @@ -0,0 +1,249 @@ + + * @title 首页 + */ + +namespace app\api\controller; +use app\common\model\Goodsindex; +use app\common\model\Goods; +use app\common\model\GoodsBrand; +use app\common\model\GoodsItem; +use app\common\model\GoodsCategory; +use app\common\model\MallImage; +use app\common\model\ShopConfig; +use app\common\model\PhaseConfig; +use app\common\model\GoodsCollect; +use tools\Crypt; +use think\Request; +class GoodsController extends Controller +{ + + protected $authExcept = [ + 'goods_info','goods_list','category_list' + ]; + + //商品列表 + public function goods_list(Request $request,Goods $model) + { + $param = $request->param(); + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $where[]=array('status','=',1); + $where[]=array('gi.stock','>',0); + $keyword = $param['keyword']??''; + $where1=''; + if($keyword){ + foreach ($keyword as $v1) { + $where1.="( `spec_value` LIKE '%".$v1."%' OR `gb`.`name` LIKE '%".$v1."%' OR `gc`.`name` LIKE '%".$v1."%') or"; + } + $where1=rtrim($where1,'or'); + } + $sort=$param['sort']??'asc'; + $order=$param['order']??'g.sort_number'; + $goods_count = $model + ->alias('g') + ->where($where) + ->where($where1) + ->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT') + ->join('goods_brand gb', 'gb.id = g.brand_id') + ->join('goods_item gi', 'gi.goods_id = g.id') + ->join('goods_category gc', 'gc.id = g.goods_category_id') + ->group('g.id') + ->count(); + $totalPages = ceil($goods_count / $size); + $goods_list = $model + ->alias('g') + ->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name") + ->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT') + ->join('goods_brand gb', 'gb.id = g.brand_id') + ->join('goods_item gi', 'gi.goods_id = g.id') + ->join('goods_category gc', 'gc.id = g.goods_category_id') + ->where($where) + ->where($where1) + ->limit($page, $size) + ->group('g.id') + ->order($order.' '.$sort) + ->select(); + if (!$goods_list) { + return success(array('list'=>[])); + } + foreach ($goods_list as $k1 => $v1) { + $goods_list[$k1]['img'] =$this->img_url.$v1['img']; + $goods_list[$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']); + } + $page=array( + 'count'=>$goods_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + return success(array('list'=>$goods_list,'page'=>$page)); + } + + //商品详情 + public function goods_info(Request $request,Goods $model,MallImage $mimodel,GoodsItem $gimodel,PhaseConfig $pcmodel) + { + $param = $request->param(); + $gid = $param['gid']?Crypt::decrypt($param['gid']):''; + if(!$gid){ + return client_error('暂无数据'); + } + //商品信息 + $goods_info=$model + ->alias('g') + ->field('g.name as goods_name,price,g.id as goods_id,detail,gb.name as brand_name,model,collocation_goods,original_price,goods_size,pc.name as phase_name,goods_category_id') + ->join('goods_brand gb', 'gb.id = g.brand_id') + ->join('phase_config pc', 'pc.id= g.phase_id', 'LEFT') + ->where(array('g.id'=>$gid,'status'=>1))->find(); + + //精选配置 + $collocation_goods=json_decode($goods_info['collocation_goods']); + $where[]=array('g.id','in',$collocation_goods); + $where[]=array('g.status','=',1); + $goods_info['collocation_goods'] =$model + ->alias('g') + ->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name") + ->join('goods_brand gb', 'gb.id= g.brand_id') + ->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT') + ->where($where) + ->select(); + foreach ($goods_info['collocation_goods'] as $k1 => $v1) { + $goods_info['collocation_goods'][$k1]['img'] =$this->img_url.$v1['img']; + $goods_info['collocation_goods'][$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']); + } + $goods_info['goods_size']=explode("\r\n",$goods_info['goods_size']); + + $img_list=$mimodel->field('thumb_image,ori_image')->where(array('union_id'=>$gid,'type'=>1))->select(); + foreach ($img_list as $key => $value) { + $img_list[$key]['thumb_image'] =$this->img_url.$value['thumb_image']; + $img_list[$key]['ori_image'] =$this->img_url.$value['ori_image']; + } + //尺寸图片 + $size_img=$this->img_url.ShopConfig::get('website', 'size_img'); + + //商品尺码 + $goodsitem_list=$gimodel->field("id,spec_value,stock")->where(array('goods_id'=>$goods_info['goods_id']))->select(); + foreach ($goodsitem_list as $key => $value) { + $goodsitem_list[$key]['id']=Crypt::encrypt($value['id']); + } + + //品相列表 + $phaseconfig_list=$pcmodel->field("name,describe")->all(); + $goods_info['goods_id'] = Crypt::encrypt($goods_info['goods_id']); + + $category_goods =$model + ->alias('g') + ->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name") + ->join('goods_brand gb', 'gb.id= g.brand_id') + ->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT') + ->where(array('g.goods_category_id'=>$goods_info['goods_category_id'],'g.status'=>1)) + ->select(); + foreach ($category_goods as $k1 => $v1) { + $category_goods[$k1]['img'] =$this->img_url.$v1['img']; + $category_goods[$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']); + } + return success(array('info'=>$goods_info,'img_list'=>$img_list,'size_img'=>$size_img,'goodsitem_list'=>$goodsitem_list,'phaseconfig_list'=>$phaseconfig_list,'category_goods'=>$category_goods)); + } + + //商品筛选 + public function category_list(Request $request,GoodsCategory $gcmodel,GoodsBrand $gbmodel) + { + $brand_list=$gbmodel->field('name,initial,img')->where(array('is_show'=>1))->select(); + foreach ($brand_list as $k1 => $v1) { + $brand_list[$k1]['img'] =$this->img_url.$v1['img']; + } + $category_list=$gcmodel->field('name,id as cid,parent_id')->select(); + $category=getSubs($category_list,0); + $size_list=ShopConfig::get('website', 'size'); + $size_list=explode(',',$size_list); + $data=array( + 'brand_list'=>$brand_list, + 'category_list'=>$category, + 'size_list'=>$size_list, + ); + return success($data); + } + + + //愿望清单列表 + public function collectgoods_list(Request $request,GoodsCollect $gcmodel) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $where[]=array('g.status','=',1); + $where[]=array('user_id','=',$user_id); + + $goods_count = $gcmodel + ->alias('gc') + ->where($where) + ->join('goods g', 'g.id = gc.goods_id') + ->join('mall_image mi', 'mi.union_id= gc.goods_id and is_cover=1 and mi.type=1', 'LEFT') + ->join('goods_brand gb', 'gb.id = g.brand_id') + ->count(); + $totalPages = ceil($goods_count / $size); + $goods_list = $gcmodel + ->alias('gc') + ->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name") + ->join('goods g', 'g.id = gc.goods_id') + ->join('mall_image mi', 'mi.union_id= gc.goods_id and is_cover=1 and mi.type=1', 'LEFT') + ->join('goods_brand gb', 'gb.id = g.brand_id') + ->where($where) + ->limit($page, $size) + ->order('g.sort_number asc') + ->select(); + if (!$goods_list) { + return success(array('list'=>[])); + } + foreach ($goods_list as $k1 => $v1) { + $goods_list[$k1]['img'] =$this->img_url.$v1['img']; + $goods_list[$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']); + } + $page=array( + 'count'=>$goods_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + return success(array('list'=>$goods_list,'page'=>$page)); + } + + public function handlecollectgoods(Request $request,GoodsCollect $gcmodel){ + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $goods_id = $param['goods_id']?Crypt::decrypt($param['goods_id']):''; + if(!$goods_id){ + return client_error('该商品不存在'); + } + if($param['is_collect']==1){ + $where = [ + 'user_id' => $user_id, + 'goods_id' => $goods_id + ]; + $info = GoodsCollect::where($where)->find(); + if(!$info){ + $data =[ + 'user_id'=>$user_id, + 'goods_id'=>$goods_id, + 'create_time'=>time(), + ]; + $res =$gcmodel->insert($data); + }else{ + return success('','操作成功'); + } + }else{ + $res =$gcmodel->where(['goods_id'=>$goods_id,'user_id'=>$user_id])->delete(); + } + return $res ? success('','操作成功') : client_error('操作失败'); + } +} \ No newline at end of file diff --git a/application/api/controller/IndexController.php b/application/api/controller/IndexController.php new file mode 100755 index 0000000..67450f9 --- /dev/null +++ b/application/api/controller/IndexController.php @@ -0,0 +1,114 @@ + + * @title 首页 + */ + +namespace app\api\controller; +use app\common\model\GoodsIndex; +use app\common\model\Goods; +use app\common\model\GoodsBrand; +use app\common\model\GoodsItem; +use app\common\model\GoodsCategory; +use app\common\model\MallImage; +use app\common\model\ShopConfig; +use app\common\model\PhaseConfig; +use tools\Crypt; +use think\Request; +class IndexController extends Controller +{ + + protected $authExcept = [ + 'home','pattern_goods' + ]; + + public function home(Request $request,Goods $gmodel,GoodsIndex $gimodel) + { + // echo Crypt::encrypt(1).'|'; + // echo $this->getToken(1); + $param = $request->param(); + //首页轮播 + $carousel = get_ad('carousel',6); + $goodsindex_list=$gimodel->where(array('status'=>1))->order('sort_number ASC')->select(); + $goodsindex=array(); + foreach ($goodsindex_list as $key => $value) { + $goodsindex[$key]['id'] = Crypt::encrypt($value['id']); + $goodsindex[$key]['name']=$value['name']; + $goodsindex[$key]['type']=$value['type']; + $goods_ids=json_decode($value['goods_ids']); + $where[]=array('g.id','in',$goods_ids); + $goods_list=$gmodel + ->alias('g') + ->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name") + ->join('goods_brand gb', 'gb.id= g.brand_id') + ->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT') + ->where($where)->select(); + foreach ($goods_list as $k1 => $v1) { + $goods_list[$k1]['img'] =$this->img_url.$v1['img']; + $goods_list[$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']); + } + $goodsindex[$key]['goods_list']=$goods_list; + } + $data = [ + 'carousel' =>$carousel,//首页轮播 + 'goodsindex' => $goodsindex,//模式板块 + ]; + return success($data); + } + + //模式商品 + public function pattern_goods(Request $request,Goods $model,GoodsIndex $gimodel) + { + $param = $request->param(); + $id = $param['id']?Crypt::decrypt($param['id']):''; + if(!$id){ + return success(array('list'=>[])); + } + $goodsindex_info=$gimodel->where(array('status'=>1,'id'=>$id))->find(); + if(!$goodsindex_info){ + return success(array('list'=>[])); + } + + $id = $param['id']?Crypt::decrypt($param['id']):''; + + $goods_ids=json_decode($goodsindex_info['goods_ids']); + $where[]=array('g.id','in',$goods_ids); + + $sort=$param['sort']??'asc'; + $order=$param['order']??'g.sort_number'; + + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $goods_count = $model + ->alias('g') + ->where($where) + ->join('goods_brand gb', 'gb.id= g.brand_id') + ->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT') + ->count(); + $totalPages = ceil($goods_count / $size); + $goods_list = $model + ->alias('g') + ->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name") + ->join('goods_brand gb', 'gb.id= g.brand_id') + ->join('mall_image mi', 'mi.union_id= g.id and is_cover=1 and mi.type=1', 'LEFT') + ->where($where) + ->limit($page, $size) + ->order($order.' '.$sort) + ->select(); + if (!$goods_list) { + return success(array('list'=>[])); + } + foreach ($goods_list as $k1 => $v1) { + $goods_list[$k1]['img'] =$this->img_url.$v1['img']; + $goods_list[$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']); + } + $page=array( + 'count'=>$goods_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + return success(array('list'=>$goods_list,'page'=>$page)); + } +} \ No newline at end of file diff --git a/application/api/controller/OrderController.php b/application/api/controller/OrderController.php new file mode 100755 index 0000000..6ef3a10 --- /dev/null +++ b/application/api/controller/OrderController.php @@ -0,0 +1,422 @@ +param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $action = $param['action']; + $info = Order::info($param, $user_id); + if (!$info) { + return client_error('商品信息不存在'); + } + if($info['code'] == 0) { + return client_error($info['msg']); + } + if ($action == 'info') { + return success($info['data']); + } + $order = Order::add($user_id, $info['data'], $param); + if($order['code']==0){ + return client_error($order['msg']); + } + return success($order['data']['order_sn'],'下单成功,正在调取支付'); + } + + + //下单接口 + public function consignment_buy(Request $request) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $json_value = $param['json_value']; + if (!$json_value) { + return client_error('商品信息不存在'); + } + $json_value=json_decode($json_value,true); + $info = ConsignmentOrder::info($json_value, $user_id); + if (!$info) { + return client_error('商品信息不存在'); + } + if($info['code'] == 0) { + return client_error($info['msg']); + } + $order = ConsignmentOrder::add($user_id, $info['data']); + if($order['code']==0){ + return client_error($order['msg']); + } + $order_id=Crypt::encrypt($order['data']['order_id']); + return success($order_id,'寄卖订单已提交'); + } + + //寄卖参数 + public function consignment_config(Request $request) + { + //寄卖流程 + $procedure =ShopConfig::get('policy', 'procedure'); + //寄卖规则 + $rule =ShopConfig::get('policy', 'rule'); + //寄卖成功提醒 + $consignment =ShopConfig::get('policy', 'consignment'); + //品相 + $phaseconfig =PhaseConfig::field('name')->select(); + //购买渠道 + $channel =ShopConfig::get('website', 'channel'); + $channel=explode(',',$channel); + //寄卖数量限制 + $jmnum =ShopConfig::get('website', 'jmnum'); + $data=array( + 'procedure'=>$procedure, + 'rule'=>$rule, + 'consignment'=>$consignment, + 'phaseconfig'=>$phaseconfig, + 'channel'=>$channel, + 'jmnum'=>$jmnum, + ); + return success($data); + } + + //上传图片 + public function icon(Request $request) + { + $param = $request->param(); + $file = request()->file('image'); + if($file){ + $info = $file->validate(['size'=>10*1024*1024,'ext'=>'jpg,png,gif'])->move(Env::get('root_path').'public/uploads/attachment'); + if($info){ + $data['avatar_logo']='/uploads/attachment/'.$info->getSaveName(); + $data['avatar']=$this->img_url.$data['avatar_logo']; + return success($data); + }else{ + // 上传失败获取错误信息 + return client_error($file->getError()); + } + }else{ + return client_error('请上传图片'); + } + } + + + //寄卖订单列表(审核中,待上架,已上架,取消/退回) + public function consignment_list(Request $request,ConsignmentOrder $model) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $where[] = ['o.user_id', '=', $user_id]; + //订单类型 + if ($param['status'] == '1') { + $where[] = ['o.order_status', 'in','0']; + } + if ($param['status'] == '2') { + $where[] = ['o.order_status', 'in',"1,3,4,5,6"]; + } + if ($param['status'] == '3') { + $where[] = ['o.order_status', 'in','2']; + } + if ($param['status'] == '4') { + $where[] = ['o.order_status', 'in','7,8']; + } + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $order_count = $model + ->alias('o') + ->join('consignment_order_goods g', 'g.order_id = o.id') + ->with(['consignment_order_goods']) + ->where($where) + ->order('o.id desc') + ->group('o.id') + ->count(); + $totalPages = ceil($order_count / $size); + $order_list = $model + ->alias('o') + ->field('o.order_sn,o.order_status,o.id') + ->join('consignment_order_goods g', 'g.order_id = o.id') + ->with(['consignment_order_goods']) + ->where($where) + ->order('o.id desc') + ->group('o.id') + ->limit($page, $size) + ->select(); + if (!$order_list) { + return success(array('list'=>[])); + } + foreach ($order_list as $k1 => $v1) { + $order_list[$k1]['order_id'] = Crypt::encrypt($v1['id']); + $order_list[$k1]['order_status_text'] = $v1['order_status_text']; + unset($v1['id']); + foreach ($v1['consignment_order_goods'] as &$order_goods){ + $order_goods['goods_img']=$this->img_url.$order_goods['goods_img']; + $order_goods['refund_status_text'] = $order_goods['refund_status_text']; + unset($order_goods['id'],$order_goods['goods_id'],$order_goods['order_id']); + } + } + $page=array( + 'count'=>$order_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + return success(array('list'=>$order_list,'page'=>$page)); + } + + //寄卖订单列表(已售出) + public function consignment_sold(Request $request,ConsignmentOrderGoods $cogmodel) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $where[] = ['o.user_id', '=', $user_id]; + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $order_count = $cogmodel + ->alias('cog') + ->join('consignment_order co', 'cog.order_id = co.id and co.order_status=2') + ->join('order_goods og', 'og.goods_id = cog.goods_id') + ->join('order o', 'og.order_id = o.id and o.order_status in (1,2,3)') + ->where($where) + ->order('o.id desc') + ->group('o.id') + ->count(); + $totalPages = ceil($order_count / $size); + $order_list = $cogmodel + ->alias('cog') + ->field('cog.item_value,cog.goods_name,cog.goods_img,cog.goods_price,cog.brand_name,cog.phase_name,cog.class_name,cog.channel_name') + ->join('consignment_order co', 'cog.order_id = co.id and co.order_status=2') + ->join('order_goods og', 'og.goods_id = cog.goods_id') + ->join('order o', 'og.order_id = o.id and o.order_status in (1,2,3)') + ->where($where) + ->order('cog.id desc') + ->limit($page, $size) + ->select(); + if (!$order_list) { + return success(array('list'=>[])); + } + foreach ($order_list as $k1 => $v1) { + $order_list[$k1]['goods_img'] = $this->img_url.$v1['goods_img']; + } + $page=array( + 'count'=>$order_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + return success(array('list'=>$order_list,'page'=>$page)); + } + + + //寄卖订单详情 + public function consignment_detail(Request $request,ConsignmentOrder $model) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $order_id = $param['order_id']?Crypt::decrypt($param['order_id']):''; + if(!$order_id){ + return client_error('该订单不存在'); + } + $where[] = ['o.user_id', '=', $user_id]; + $where[] = ['o.id', '=', $order_id]; + $order_info = $model + ->alias('o') + // ->field('o.order_sn,o.order_status,o.id,o.pay_time,total_amount,shipping_time,invoice_name,invoice_no,transaction_id,user_remark,confirm_take_time,cancel_time,o.create_time,province,city,district,address,mobile,consignee') + ->with(['consignment_order_goods','logs']) + ->where($where) + ->find(); + if (!$order_info) { + return client_error('该订单不存在'); + } + $order_info['order_id'] = Crypt::encrypt($order_info['id']); + $order_info['order_status_text'] = $order_info['order_status_text']; + foreach ($order_info['consignment_order_goods'] as &$order_goods){ + $order_goods['goods_img']=$this->img_url.$order_goods['goods_img']; + $order_goods['id'] = Crypt::encrypt($order_goods['id']); + $order_goods['refund_status_text'] = $order_goods['refund_status_text']; + unset($order_goods['goods_id'],$order_goods['order_id']); + } + foreach ($order_info['logs'] as &$logs){ + unset($logs['id'],$logs['order_id']); + } + unset($order_info['id'],$order_info['user_id'],$order_info['update_time'],$order_info['delete_time']); + return success($order_info); + } + + /** + * Notes: 取消寄卖订单 + * @param $order_id + * @param $user_id + */ + public static function consignment_cancel(Request $request,ConsignmentOrder $model) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $order_id = $param['order_id']?Crypt::decrypt($param['order_id']):''; + if(!$order_id){ + return client_error('该订单不存在'); + } + $order = ConsignmentOrder::get([ + 'user_id' => $user_id, + 'id' => $order_id + ]); + if (!$order || ($order['order_status']!='0' && $order['order_status']!='3')) { + return client_error('很抱歉!订单无法取消'); + } + $model->startTrans(); + try { + //取消订单 + $update = [ + 'cancel_time' => time(), + 'order_status' => 8, + ]; + $model->where(['id' => $order_id])->update($update); + //记录日志 + ConsignmentOrderLog::record( + $order_id, + '寄卖订单已取消' + ); + $model->commit(); + } catch (Exception $e) { + $model->rollback(); + return client_error($e->getMessage()); + } + return success('','取消成功'); + } + + /** + * Notes: 确认估价 + * @param $order_id + * @param $user_id + */ + public static function consignment_confirm(Request $request,ConsignmentOrder $model,ConsignmentOrderGoods $cogmodel) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $order_id = $param['order_id']?Crypt::decrypt($param['order_id']):''; + if(!$order_id){ + return client_error('该订单不存在'); + } + $goods_id = $param['goods_id']?$param['goods_id']:''; + if(!$goods_id){ + return client_error('请选择确认估价商品'); + } + $is_return = $param['is_return']; + $consignee = $param['consignee']?$param['consignee']:''; + $address = $param['address']?$param['address']:''; + $mobile = $param['mobile']?$param['mobile']:''; + if(!$consignee || !$address || !$mobile){ + return client_error('请选择取货地址'); + } + $th_consignee = $param['th_consignee']?$param['th_consignee']:''; + $th_address = $param['th_address']?$param['th_address']:''; + $th_mobile = $param['th_mobile']?$param['th_mobile']:''; + if($is_return==1 && (!$th_consignee || !$th_address || !$th_mobile)){ + return client_error('请选择退回地址'); + } + $takeparts_time = $param['takeparts_time']?$param['takeparts_time']:''; + if(!$takeparts_time){ + return client_error('请选择取件时间'); + } + $goods_id=json_decode($goods_id,true); + //寄卖数量限制 + $jmnum =ShopConfig::get('website', 'jmnum'); + if($jmnum>count($goods_id)){ + return client_error('寄卖满'.$jmnum.'件才可下单'); + } + $goods_ids=array(); + foreach ($goods_id as $key => $value) { + $goods_id=Crypt::decrypt($value); + if($goods_id>0){ + $goods_ids[]=$goods_id; + } + } + //寄卖数量限制 + $jmnum =ShopConfig::get('website', 'jmnum'); + if($jmnum>count($goods_ids)){ + return client_error('寄卖满'.$jmnum.'件才可下单'); + } + $order = ConsignmentOrder::get([ + 'user_id' => $user_id, + 'id' => $order_id + ]); + if (!$order || $order['order_status']!='3') { + return client_error('很抱歉!订单无法进行确认估价'); + } + + $model->startTrans(); + try { + //确认订单 + $update = [ + 'update_time' => time(), + 'order_status' => 4, + 'is_return' => $is_return, + 'consignee' => $consignee, + 'address' => $address, + 'mobile' => $mobile, + 'th_consignee' => $th_consignee, + 'th_address' => $th_address, + 'th_mobile' => $th_mobile, + 'takeparts_time'=>$takeparts_time + ]; + $model->where(['id' => $order_id])->update($update); + + $update_goods = [ + 'is_confirm' => 1, + ]; + $where_goods[]=array('id','in',$goods_ids); + $cogmodel->where($where_goods)->update($update_goods); + + //记录日志 + ConsignmentOrderLog::record( + $order_id, + '您确认评估价格进行寄卖' + ); + $model->commit(); + } catch (Exception $e) { + $model->rollback(); + return client_error($e->getMessage()); + } + return success('','确认成功'); + } +} \ No newline at end of file diff --git a/application/api/controller/PaymentController.php b/application/api/controller/PaymentController.php new file mode 100755 index 0000000..cc9fee5 --- /dev/null +++ b/application/api/controller/PaymentController.php @@ -0,0 +1,106 @@ +param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $order_sn=$param['order_sn']??''; + if(!isset($order_sn)) { + return client_error('订单不存在'); + } + $order = $omodel + ->alias('o') + ->field("order_status,openid") + ->join('user u', 'u.id = o.user_id') + ->where(array('order_sn'=>$order_sn,'user_id'=>$user_id)) + ->find(); + //找不到订单 + if (empty($order)) { + return client_error('订单不存在'); + } + if ($order['order_status'] !='0') { + return client_error('该订单无法进行支付,请查看订单状态'); + } + $order_wechatsn =$order_sn.str_pad(mt_rand(1, 999), 3, '0', STR_PAD_LEFT); + $WXPAYKEY=ShopConfig::get('website', 'WXPAYKEY'); + $MCHID=ShopConfig::get('website', 'MCHID'); + $APPID=ShopConfig::get('website', 'APPID'); + $notify_url=ShopConfig::get('website', 'notify_url'); + $WxxiaopayApi = new WxxiaopayApi($APPID,$MCHID,$WXPAYKEY,$notify_url); + $log_ip=$request->ip(); + $wxData =$WxxiaopayApi->prePay($order_sn,$order_wechatsn,$order_sn,$order['openid'],$log_ip); + return success($wxData); + } + + //微信小程序回调 + public function wxnotify(Request $request,FrontMemberLog $fmlmodel,FrontUserMember $fummodel) + { + $xml = file_get_contents('php://input', 'r'); + $data = $this->toArray($xml); + Log::write('微信回调2:'.var_export($data, true)); + if($data['result_code']==='SUCCESS' && $data['return_code']==='SUCCESS'){ + $order_sn = mb_substr($data['out_trade_no'],0,18); + $parameter['transaction_id']= $data['transaction_id']; //支付宝交易号 + $parameter['pay_time'] =time(); + $parameter['is_pay'] =1; + $order_info = $fmlmodel + ->alias('fml') + ->field('fml.*,fm.days as days') + ->where(array('order_sn'=>$order_sn)) + ->join('front_member fm', 'fm.id = fml.member_id') + ->find(); + if($order_info){ + $fummodel_info=$fummodel->where(array('user_id'=>$order_info['user_id'],'cid'=>$order_info['cid']))->find(); + $days_num=(60*60*24)*$order_info['days']; + $data_info['end_time']=time()+$days_num; + if($fummodel_info){ + $fummodel->where(array('id'=>$fummodel_info['id']))->update($data_info); + }else{ + $data_info['user_id']=$order_info['user_id']; + $data_info['cid']=$order_info['cid']; + $fummodel::create($data_info); + } + $fmlmodel->where(array('order_sn'=>$order_sn))->update($parameter); + exit('success'); + } + } + exit('fail'); + } + + /** + * 将xml转为array + * @param string $xml xml字符串 + * @return array 转换得到的数组 + */ + public function toArray($xml) { + //禁止引用外部xml实体 + libxml_disable_entity_loader(true); + $result= json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true); + return $result; + } +} \ No newline at end of file diff --git a/application/api/controller/UserAddressController.php b/application/api/controller/UserAddressController.php new file mode 100755 index 0000000..b087710 --- /dev/null +++ b/application/api/controller/UserAddressController.php @@ -0,0 +1,84 @@ +param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $result = UserAddress::infoUserAddress($user_id); + return success($result); + } + + //设置默认地址 + public function setDefault(Request $request) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $result = UserAddress::setDefaultAddress($user_id, $param); + return $result ? success('','设置成功') : client_error('设置失败'); + } + + //添加收货地址 + public function add(Request $request, UserAddressValidate $validate) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return client_error($validate->getError()); + } + $result = UserAddress::addUserAddress($user_id, $param); + return $result ? success('','添加成功') : client_error('添加失败'); + } + + //更新收货地址 + public function update(Request $request, UserAddressValidate $validate) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return client_error($validate->getError()); + } + $result = UserAddress::editUserAddress($user_id, $param); + return $result ? success('','修改成功') : client_error('修改失败'); + } + + //删除收货地址 + public function del(Request $request, UserAddressValidate $validate) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $validate_result = $validate->scene('del')->check($param); + if (!$validate_result) { + return client_error($validate->getError()); + } + $result = UserAddress::delUserAddress($user_id, $param); + return $result ? success('','删除成功') : client_error('删除失败'); + } +} diff --git a/application/api/controller/UserController.php b/application/api/controller/UserController.php new file mode 100755 index 0000000..b472ca2 --- /dev/null +++ b/application/api/controller/UserController.php @@ -0,0 +1,593 @@ +param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $user = User::where('id',$user_id)->field('avatar,nickname,user_money')->find(); + //消息数量 + $user->notice_num = Notice::unRead($user_id) ? 1 : 0; + $goods_list=$gcmodel + ->alias('gc') + ->field("mi.thumb_image as img, g.name,g.price,g.id as goods_id,gb.name as brand_name") + ->join('goods g', 'g.id = gc.goods_id') + ->join('mall_image mi', 'mi.union_id= gc.goods_id and is_cover=1 and mi.type=1', 'LEFT') + ->join('goods_brand gb', 'gb.id = g.brand_id') + ->where(array('user_id'=>$user_id)) + ->limit(3) + ->order('g.sort_number asc') + ->select(); + foreach ($goods_list as $k1 => $v1) { + $goods_list[$k1]['img'] =$this->img_url.$v1['img']; + $goods_list[$k1]['goods_id'] = Crypt::encrypt($v1['goods_id']); + } + $user->collect =$goods_list; + //联系我们 + $user->contactus =ShopConfig::get('policy', 'contactus'); + //社群与交流 + $user->community =ShopConfig::get('policy', 'community'); + //隐私政策 + $user->privacy =ShopConfig::get('policy', 'privacy'); + //条款与条件 + $user->clause =ShopConfig::get('policy', 'clause'); + return success($user); + } + + //我的消息 + public function notice(Request $request,Notice $nmodel) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $where[]=array('user_id','=',$user_id); + $where[]=array('send_type','=',1); + $where[]=array('receive_type','in','2,3'); + $notice_count = $nmodel + ->where($where) + ->count(); + $totalPages = ceil($notice_count / $size); + $notice_list = $nmodel + ->field("title,content") + ->where($where) + ->limit($page, $size) + ->order('create_time DESC') + ->select(); + if (!$notice_list) { + return success(array('list'=>[])); + } + $where1[]=array('user_id','=',$user_id); + Notice::setRead($where1); + $page=array( + 'count'=>$notice_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + return success(array('list'=>$notice_list,'page'=>$page)); + } + + //我的订单 + public function order(Request $request,Order $model) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $where[] = ['o.user_id', '=', $user_id]; + //订单类型 + if ($param['order_status'] != '') { + $where[] = ['o.order_status', 'in', $param['order_status']]; + } + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $order_count = $model + ->alias('o') + ->join('order_goods g', 'g.order_id = o.id') + ->with(['order_goods']) + ->where($where) + ->order('o.id desc') + ->group('o.id') + ->count(); + $totalPages = ceil($order_count / $size); + $order_list = $model + ->alias('o') + ->field('o.order_sn,o.order_status,o.id') + ->join('order_goods g', 'g.order_id = o.id') + ->with(['order_goods']) + ->where($where) + ->order('o.id desc') + ->group('o.id') + ->limit($page, $size) + ->select(); + if (!$order_list) { + return success(array('list'=>[])); + } + foreach ($order_list as $k1 => $v1) { + $order_list[$k1]['order_id'] = Crypt::encrypt($v1['id']); + $order_list[$k1]['order_status_text'] = $v1['order_status_text']; + unset($v1['id']); + foreach ($v1['order_goods'] as &$order_goods){ + $order_goods['goods_img']=$this->img_url.$order_goods['goods_img']; + $order_goods['goods_id'] = Crypt::encrypt($order_goods['goods_id']); + unset($order_goods['id'],$order_goods['order_id']); + } + } + $page=array( + 'count'=>$order_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + return success(array('list'=>$order_list,'page'=>$page)); + } + + //我的订单详情 + public function orderdetail(Request $request,Order $model) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $order_id = $param['order_id']?Crypt::decrypt($param['order_id']):''; + if(!$order_id){ + return client_error('该订单不存在'); + } + $where[] = ['o.user_id', '=', $user_id]; + $where[] = ['o.id', '=', $order_id]; + $order_info = $model + ->alias('o') + ->field('o.order_sn,o.order_status,o.id,o.pay_time,total_amount,shipping_time,invoice_name,invoice_no,transaction_id,user_remark,confirm_take_time,cancel_time,o.create_time,province,city,district,address,mobile,consignee') + ->join('order_goods g', 'g.order_id = o.id') + ->with(['order_goods']) + ->append(['delivery_address']) + ->where($where) + ->find(); + if (!$order_info) { + return client_error('该订单不存在'); + } + $order_info['order_id'] = Crypt::encrypt($order_info['id']); + $order_info['order_status_text'] = $order_info['order_status_text']; + foreach ($order_info['order_goods'] as &$order_goods){ + $order_goods['goods_img']=$this->img_url.$order_goods['goods_img']; + $order_goods['goods_id'] = Crypt::encrypt($order_goods['goods_id']); + unset($order_goods['id'],$order_goods['order_id']); + } + unset($order_info['id']); + return success($order_info); + } + + + /** + * Notes: 取消订单 + * @param $order_id + * @param $user_id + */ + public static function ordercancel(Request $request,Order $model) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $order_id = $param['order_id']?Crypt::decrypt($param['order_id']):''; + if(!$order_id){ + return client_error('该订单不存在'); + } + $order = Order::get([ + 'user_id' => $user_id, + 'id' => $order_id + ]); + if (!$order || $order['order_status']!='0') { + return client_error('很抱歉!订单无法取消'); + } + + $model->startTrans(); + try { + //取消订单 + $update = [ + 'cancel_time' => time(), + 'order_status' => 4, + ]; + $model->where(['id' => $order_id])->update($update); + $model->commit(); + } catch (Exception $e) { + $model->rollback(); + return client_error($e->getMessage()); + } + return success('','取消成功'); + } + + /** + * Notes: 确认收货 + * @param $order_id + * @param $user_id + */ + public static function orderconfirm(Request $request,Order $model) + { + $param = $request->param(); + $user_id = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$user_id){ + return unauthorized('请先授权'); + } + $order_id = $param['order_id']?Crypt::decrypt($param['order_id']):''; + if(!$order_id){ + return client_error('该订单不存在'); + } + $order = Order::get([ + 'user_id' => $user_id, + 'id' => $order_id + ]); + if (!$order || $order['order_status']!='2') { + return client_error('很抱歉!订单未发货'); + } + + $model->startTrans(); + try { + //确认订单 + $update = [ + 'confirm_take_time' => time(), + 'order_status' => 3, + ]; + $model->where(['id' => $order_id])->update($update); + $model->commit(); + } catch (Exception $e) { + $model->rollback(); + return client_error($e->getMessage()); + } + return success('','确认成功'); + } + + + + //收益统计 + public function profit_census(Request $request,AccountLog $almodel,WithdrawApply $wamodel,User $umodel) + { + $param = $request->param(); + $uid = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$uid){ + return unauthorized('请先授权'); + } + $type = $param['type']??'1'; + + //积分规则 + $integral_rule =ShopConfig::get('policy', 'integral_rule'); + + //个人收益 + if($type==1){ + $where[]=array('source_type','in','100,110,120'); + $where[]=array('user_id','eq',$uid); + //今日收益 + $amount_today = $almodel + ->where($where) + ->whereTime('create_time', 'today') + ->sum('change_amount'); + //已提现金额 + $amount_ytx = $wamodel->where(array('user_id'=>$uid,'status'=>2))->sum('money'); + //可提现金额 + $amount_ktx = $umodel->where(array('id'=>$uid))->value('integral'); + $data=array( + 'amount_today'=>$amount_today, + 'amount_ytx'=>$amount_ytx, + 'amount_ktx'=>$amount_ktx, + 'integral_rule'=>$integral_rule, + ); + return success($data); + } + + if($type==2){ + $where[]=array('user_id','eq',$uid); + //今日收益 + $amount_today = $almodel + ->where($where) + ->where(array('source_type'=>100)) + ->whereTime('create_time', 'today') + ->sum('change_amount'); + //累计收益 + $amount_sum = $almodel + ->where($where) + ->where(array('source_type'=>100)) + ->sum('change_amount'); + //推广人数 + $user_fans =$umodel->where([['first_leader|second_leader', '=', $uid]])->count(); + $data=array( + 'amount_today'=>$amount_today, + 'amount_sum'=>$amount_sum, + 'user_fans'=>$user_fans, + 'integral_rule'=>$integral_rule, + ); + return success($data); + } + } + + //提现记录 + public function withdraw(Request $request,WithdrawApply $wamodel) + { + $param = $request->param(); + $uid = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$uid){ + return unauthorized('请先授权'); + } + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $withdraw_count = $wamodel + ->where(array('user_id'=>$uid)) + ->count(); + $totalPages = ceil($withdraw_count / $size); + $withdraw_list = $wamodel + ->field("money,create_time,poundage,status") + ->where(array('user_id'=>$uid)) + ->limit($page, $size) + ->order('create_time DESC') + ->select(); + if (!$withdraw_list) { + return client_error('暂无数据'); + } + foreach ($withdraw_list as $key => $value) { + $withdraw_list[$key]['status_text'] =$wamodel->STATUS_TYPE[$value['status']]; + } + $page=array( + 'count'=>$withdraw_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + return success(array('list'=>$withdraw_list,'page'=>$page)); + } + + //收益记录 + public function account_log(Request $request,AccountLog $almodel) + { + $param = $request->param(); + $uid = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$uid){ + return unauthorized('请先授权'); + } + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $where[]=array('user_id','=',$uid); + $type = $param['type']??''; + if($type){ + $where[]=array('source_type','=',$type); + } + $accountlog_count = $almodel + ->alias('al') + ->where($where) + ->join('user u', 'u.id= al.user_id') + ->count(); + $totalPages = ceil($accountlog_count / $size); + $accountlog_list = $almodel + ->alias('al') + ->field("change_amount,al.create_time,source_type,avatar,nickname") + ->where($where) + ->join('user u', 'u.id= al.user_id') + ->limit($page, $size) + ->order('create_time DESC') + ->select(); + if (!$accountlog_list) { + return client_error('暂无数据'); + } + foreach ($accountlog_list as $key => $value) { + $accountlog_list[$key]['avatar'] =$this->img_url.$value['avatar']; + $accountlog_list[$key]['source_type_text'] =$almodel->SOURCE_TYPE[$value['source_type']]; + } + $amount_sum = $almodel + ->where($where) + ->sum('change_amount'); + $page=array( + 'count'=>$accountlog_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + return success(array('list'=>$accountlog_list,'page'=>$page,'amount_sum'=>$amount_sum)); + } + + //邀请明细 + public function invitation_user(Request $request,User $umodel) + { + $param = $request->param(); + $uid = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$uid){ + return unauthorized('请先授权'); + } + $size=$param['size']>0?$param['size']:12; + $page_l=$param['page']>1?$param['page']:1; + $page=$size * ($page_l - 1); + $user_count = $umodel + ->where([['first_leader|second_leader', '=', $uid]]) + ->count(); + $totalPages = ceil($user_count / $size); + $user_list = $umodel + ->field("create_time,avatar,nickname") + ->where([['first_leader|second_leader', '=', $uid]]) + ->limit($page, $size) + ->order('create_time DESC') + ->select(); + if (!$user_list) { + return client_error('暂无数据'); + } + foreach ($user_list as $key => $value) { + $user_list[$key]['avatar'] =$this->img_url.$value['avatar']; + } + $page=array( + 'count'=>$user_count, + 'num'=>$page_l, + 'size'=>$size, + 'page'=>$totalPages + ); + //推广规则 + $extension_rule =ShopConfig::get('policy', 'extension_rule'); + return success(array('list'=>$user_list,'page'=>$page,'extension_rule'=>$extension_rule)); + } + + //提现账户列表 + public function account_list(Request $request,WithdrawAccount $wamodel) + { + $param = $request->param(); + $uid = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$uid){ + return unauthorized('请先授权'); + } + $account_list=$wamodel->field('real_name,real_tel,account,subbank,type,id')->where(array('user_id'=>$uid))->select(); + foreach ($account_list as $key => $value) { + $account_list[$key]['id'] = Crypt::encrypt($value['id']); + } + return success($account_list); + } + + + //添加提现账户 + public function account_add(Request $request,WithdrawAccount $wamodel, WithdrawAccountValidate $validate) + { + $param = $request->param(); + $param['user_id'] = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$param['user_id']){ + return unauthorized('请先授权'); + } + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return client_error($validate->getError()); + } + // 启动事务 + $wamodel->startTrans(); + try{ + $wamodel::create($param); + // 提交事务 + $wamodel->commit(); + }catch(\Exception $e){ + // 回滚事务 + $wamodel->rollback(); + return client_error($e->getMessage()); + } + return success('','添加成功'); + } + + //删除提现账户 + public function account_dal(Request $request,WithdrawAccount $wamodel) + { + $param = $request->param(); + $param['user_id'] = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$param['user_id']){ + return unauthorized('请先授权'); + } + $param['id'] = $param['id']?Crypt::decrypt($param['id']):''; + if (!$param['id']) { + return client_error('账户不存在'); + } + $result = $wamodel->whereIn('id', $param['id'])->delete(); + return $result ? success('','删除成功') : client_error('删除失败'); + } + //提现操作 + public function wthdrawal(Request $request,WithdrawAccount $wamodel,WithdrawApply $waymodel,AccountLog $almodel,User $umodel) + { + $param = $request->param(); + $uid = $param['uid']?Crypt::decrypt($param['uid']):''; + if(!$uid){ + return unauthorized('请先授权'); + } + //提现积分 + $integral = $param['integral']??'0'; + //提现账户 + $account_id = $param['account_id']?Crypt::decrypt($param['account_id']):''; + if(!$account_id){ + return client_error('请选择提现账户'); + } + $account_info=$wamodel->where(array('id'=>$account_id))->find(); + if(!$account_info){ + return client_error('请选择提现账户'); + } + $umodel_info=$umodel->field('integral')->where(array('id'=>$uid))->find(); + if($umodel_info['integral']<$integral){ + return client_error('积分不足,无法提现'); + } + $min_withdraw =ShopConfig::get('withdraw', 'min_withdraw');//最低提现 + $max_withdraw =ShopConfig::get('withdraw', 'max_withdraw');//最高提现积分 + $poundage_type =ShopConfig::get('withdraw', 'poundage_type');//手续费类型 1固定 2比例 + $poundage =ShopConfig::get('withdraw', 'poundage');//手续费 + if($integral<$min_withdraw){ + return client_error('最少提现积分数'.$min_withdraw.',无法提现'); + } + if($integral>$max_withdraw){ + return client_error('最多提现积分数'.$max_withdraw.',无法提现'); + } + if($poundage_type==2){ + $poundage=$integral*($poundage/100); + } + // 启动事务 + $waymodel->startTrans(); + try{ + + $data = [ + 'sn' => createSn('withdraw_apply', 'sn'), + 'user_id' => $uid, + 'type' => $account_info['type'], + 'account' => $account_info['account'] ?? '', + 'real_name' => $account_info['real_name'] ?? '', + 'real_tel' => $account_info['real_tel'] ?? '', + 'money' => $integral, + 'left_money' => $integral - $poundage, + 'money_qr_code' => '', + 'subbank' => $account_info['subbank'] ?? '', + 'poundage' => $poundage, + 'status' => 1, // 待提现 + 'create_time' => time(), + ]; + $withdraw_id = $waymodel->insertGetId($data); + //提交申请后,扣减用户的积分 + $user = User::get($uid); + $user->integral = ['dec', $integral]; + $user->save(); + + //增加佣金变动记录 + $almodel->AccountRecord( + $uid, + $integral, + 2, + 140, + '', + $withdraw_id, + $data['sn'] + ); + // 提交事务 + $waymodel->commit(); + }catch(\Exception $e){ + // 回滚事务 + $waymodel->rollback(); + return client_error($e->getMessage()); + } + return success('','提交提现申请成功,等待审核打款'); + } +} diff --git a/application/api/traits/ApiAuth.php b/application/api/traits/ApiAuth.php new file mode 100755 index 0000000..b048c75 --- /dev/null +++ b/application/api/traits/ApiAuth.php @@ -0,0 +1,182 @@ + 'token', + //加密使用的secret + 'secret' => '552ac90778a976c72f7f673db174df30', + //颁发者 + 'iss' => 'iss', + //使用者 + 'aud' => 'aud', + //过期时间,以秒为单位,默认2小时 + 'ttl' => 30*60*60*24, + //刷新时间,以秒为单位,默认14天,以 + 'refresh_ttl' => 1209600, + //是否自动刷新,开启后可自动刷新token,附在header中返回,name为`Authorization`,字段为`Bearer `+$token + 'auto_refresh' => true, + //黑名单宽限期,以秒为单位,首次token刷新之后在此时间内原token可以继续访问 + 'blacklist_grace_period' => 60 + ]; + + protected $token; + + public function jtwInit() + { + $config = config('jwt.'); + if ($config) { + $this->config = $config; + } + } + + /** + * 检查token + */ + public function checkToken() + { + $config = $this->config; + if (!in_array($this->request->action(true), $this->authExcept)) { + + $token = $this->request->header($config['name']); + //缺少token + if (empty($token)) { + throw new HttpResponseException(error('缺少token')); + } + + $this->token = $token; + $token_verify = true; + $signer = new Sha256(); + try { + $jwt = (new TokenParser())->parse((string)$token); + + //验证成功后给当前uid赋值 + if (true === $jwt->verify($signer, $config['secret'])) { + $this->uid = $jwt->getClaim('uid'); + $exp = $jwt->isExpired(); + //token已过期 + if ($exp) { + $token_verify = false; + $token_verify_msg = 'token已过期'; + //如果为自动刷新 + if ($config['auto_refresh']) { + $token = $this->refreshToken(); + $token_verify = $token; + } + } + } else { + //token错误 + $token_verify = false; + $token_verify_msg = 'token错误'; + } + } catch (Exception $e) { + //token验证过程出错 + $token_verify = false; + $token_verify_msg = $e->getMessage(); + } + + //统一处理token相关错误,返回401 + if (!$token_verify) { + throw new HttpResponseException(unauthorized('token验证错误,错误信息:'.$token_verify_msg)); + } + + } + } + + + /** + * 获取token + * @param $uid int 用户ID + * @param array $data 更多数据 + * @return string + * @throws Exception + */ + public function getToken($uid, $data = []) + { + $config = $this->config; + //发放token + $signer = new Sha256(); + $time = time(); + $jti = md5($time . $uid . random_int(9999, 999999)); + $jwt = (new Builder())->issuedBy($config['iss'])//颁发者(iss claim) + ->permittedFor($config['aud'])//使用者(aud claim) + ->identifiedBy($jti)//JWT ID (jti claim) + ->issuedAt($time)//签发时间(iat claim) + ->canOnlyBeUsedAfter($time)//可使用时间(nbf claim) + ->expiresAt($time + $config['ttl'])//过期时间(exp claim) + ->withClaim('uid', $uid); //用户ID + + if (count($data) > 0) { + foreach ($data as $key => $value) { + $jwt = $jwt->withClaim($key, $value); + } + } + + $token = $jwt->getToken($signer, new Key($config['secret'])); + + return (string)$token; + } + + + /** + * 刷新token + * @param $data + * @return string + */ + public function refreshToken() + { + $result = false; + $claim_protect = [ + 'iss', 'aud', 'jti', 'iat', 'exp', 'nbf', 'uid' + ]; + + $time = time(); + $jwt = (new TokenParser())->parse((string)$this->token); + $jti = $jwt->getClaim('jti'); + $nbf_time = $jwt->getClaim('nbf'); + $refresh_time = $nbf_time + $this->config['refresh_ttl']; + + if ($time >= $nbf_time && $time <= $refresh_time) { + $blacklist_time = cache('token_blacklist_' . $jti); + if ($blacklist_time) { + $grace_period = $blacklist_time + $this->config['blacklist_grace_period']; + if ($time < $grace_period) { + $result = true; + } + + } else { + //颁发新的token + //将过期的token存到缓存中 + $claims = $jwt->getClaims(); + $data = []; + foreach ($claims as $key => $value) { + $name = $value->getName(); + if (!in_array($name, $claim_protect)) { + $data[$name] = $value->getValue(); + } + } + + $token = $this->getToken($this->uid, $data); + cache('token_blacklist_' . $jti, $time, $refresh_time - $time + 1); + header('Authorization:Bearer ' . $token); + $result = true; + } + } + + return $result; + } +} diff --git a/application/command.php b/application/command.php new file mode 100755 index 0000000..cbc1faa --- /dev/null +++ b/application/command.php @@ -0,0 +1,14 @@ + +// +---------------------------------------------------------------------- + +return [ + +]; diff --git a/application/common.php b/application/common.php new file mode 100755 index 0000000..2939121 --- /dev/null +++ b/application/common.php @@ -0,0 +1,164 @@ + +// +---------------------------------------------------------------------- +use think\facade\Env; +use app\common\model\Order; +use think\db; + +// 应用公共文件 + +if (!function_exists('get_middle_str')) { + /** + * 获取指定字符串中间内容 + * @param string $str 原字符串 + * @param string $leftStr 左侧 + * @param string $rightStr + * @return bool|string + */ + function get_middle_str($str, $leftStr, $rightStr) + { + $left = strpos($str, $leftStr); + $right = strpos($str, $rightStr, $left); + if ($left < 0 || $right < $left) { + return ''; + } + return substr($str, $left + strlen($leftStr), $right - $left - strlen($leftStr)); + } +} + + +if (!function_exists('format_size')) { + /** + * 格式化文件大小单位 + * @param $size + * @param string $delimiter + * @return string + */ + function format_size($size, $delimiter = '') + { + $units = array('B', 'KB', 'MB', 'GB', 'TB', 'PB'); + for ($i = 0; $size >= 1024 && $i < 5; $i++) { + $size /= 1024; + } + return round($size, 2) . $delimiter . $units[$i]; + } +} + +if (!function_exists('thumbnail_img')) { + /** + * 生成缩略图 + * @param string $status 上传后图片信息 + * @param string $width 宽 + * @param string $heigh 高 + */ + function thumbnail_img($status, $width, $heigh, $folder_name = '') + { + $img = Env::get('root_path') . 'public/uploads/attachment/' . $status->getSaveName(); + $image = \think\Image::open($img); + $slt = substr($img, 0, strlen($img) - 4); + $image->thumb($width, $heigh, \think\Image::THUMB_CENTER)->save($slt . '_' . $width . '_' . $heigh . '.' . $status->getExtension()); + $img_url = $status->getSaveName(); + $img_slt = '/uploads/' . $folder_name . '/' . substr($img_url, 0, strlen($img_url) - 4) . '_' . $width . '_' . $heigh . '.' . $status->getExtension(); + return $img_slt; + } +} + +if (!function_exists('get_order_sn')) { + /** + * 获取得到新订单编号 + */ + function get_order_sn() + { + mt_srand((float) microtime() * 1000000); + $order_sn = 'O' . date('Ymd') . str_pad(mt_rand(1, 99999), 5, '0', STR_PAD_LEFT); + $where = 'order_no="' . $order_sn . '"'; + //开始编辑区域 + $_OrderModel = new Order(); + $count = $_OrderModel->where($where)->count(); + //结束编辑区域 + if ($count == 0) { + /* 否则就使用这个订单号 */ + return $order_sn; + } + return get_order_sn(); + } +} + + +/** + * Desc: 用时间生成订单编号 + * @param $table + * @param $field + * @param string $prefix + * @param int $rand_suffix_length + * @param array $pool + */ +function createSn($table, $field, $prefix = '', $rand_suffix_length = 4, $pool = []) +{ + $suffix = ''; + for ($i = 0; $i < $rand_suffix_length; $i++) { + if (empty($pool)) { + $suffix .= rand(0, 9); + } else { + $suffix .= $pool[array_rand($pool)]; + } + } + $sn = $prefix . date('YmdHis') . $suffix; + if (Db::name($table)->where($field, $sn)->find()) { + return createSn($table, $field, $prefix, $rand_suffix_length, $pool); + } + return $sn; +} + +/** + * 生成会员码 + * @return 会员码 + */ +function create_user_sn($prefix = '', $length = 8) +{ + $rand_str = ''; + for ($i = 0; $i < $length; $i++) { + $rand_str .= mt_rand(0, 9); + } + $sn = $prefix . $rand_str; + if (Db::name('user')->where(['sn' => $sn])->find()) { + return create_user_sn($prefix, $length); + } + return $sn; +} + +//生成用户邀请码 +function generate_invite_code() +{ + + $letter_all = range('A', 'Z'); + shuffle($letter_all); + //排除I、O字母 + $letter_array = array_diff($letter_all, ['I', 'O', 'D']); + //排除1、0 + $num_array = range('2', '9'); + shuffle($num_array); + + $pattern = array_merge($num_array, $letter_array, $num_array); + shuffle($pattern); + $pattern = array_values($pattern); + + $code = ''; + for ($i = 0; $i < 6; $i++) { + $code .= $pattern[mt_rand(0, count($pattern) - 1)]; + } + + $code = strtoupper($code); + $check = Db::name('user')->where('distribution_code', $code)->find(); + if ($check) { + return generate_invite_code(); + } + return $code; +} diff --git a/application/common/common.php b/application/common/common.php new file mode 100755 index 0000000..b3d9bbc --- /dev/null +++ b/application/common/common.php @@ -0,0 +1 @@ +module()==='api'){ + + $header = []; + //处理跨域请求问题 + if (config('api.cross_domain.allow')) { + $header = ['Access-Control-Allow-Origin' => '*']; + if (request()->isOptions()) { + $header = config('api.cross_domain.header'); + return json('',200,$header); + } + } + + return json([ + 'code' => 500, + 'msg' => $e->getMessage(), + 'data' => '', + ], 500,$header); + } + + + // 其他错误交给系统处理 + return parent::render($e); + } + +} \ No newline at end of file diff --git a/application/common/helper/helper.php b/application/common/helper/helper.php new file mode 100755 index 0000000..cd71f11 --- /dev/null +++ b/application/common/helper/helper.php @@ -0,0 +1,24 @@ + + */ + + +if (!function_exists('get_middle_str')) { + /** + * @param $str + * @param $leftStr + * @param $rightStr + * @return bool|string + */ + function get_middle_str($str, $leftStr, $rightStr) + { + $left = strpos($str, $leftStr); + $right = strpos($str, $rightStr, $left); + if ($right < $left || $left < 0) { + return ''; + } + return substr($str, $left + strlen($leftStr), $right - $left - strlen($leftStr)); + } +} \ No newline at end of file diff --git a/application/common/model/AccountLog.php b/application/common/model/AccountLog.php new file mode 100755 index 0000000..6738e5d --- /dev/null +++ b/application/common/model/AccountLog.php @@ -0,0 +1,65 @@ +'系统操作', + '110' =>'提现退回', + '120' =>'提现扣除', + ]; + + public function getSourceTypeTextAttr($value, $data) + { + return $this->SOURCE_TYPE[$data['source_type']]; + } + + /** + * Notes:记录会员账户流水,如果变动类型是成长值,且是增加的,则调用更新会员等级方法。该方法应在添加用户账户后调用 + * @param int $user_id 用户id + * @param float $amount 变动数量 + * @param int $change_type 变动类型:1-增加;2-减少 + * @param int $source_type 来源类型 + * @param string $remark 说明 + * @param string $source_id 来源id + * @param string $source_sn 来源单号 + * @param string $extra 额外字段说明 + * @return bool + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\ModelNotFoundException + * @throws \think\exception\DbException + */ + public static function AccountRecord($user_id,$amount,$change_type,$source_type,$remark ='',$source_id ='',$source_sn='',$extra=''){ + $user = User::get($user_id); + if(empty($user)){ + return false; + } + $account_log = new AccountLog(); + $account_log->log_sn = createSn('account_log','log_sn','',4); + $account_log->user_id = $user_id; + $account_log->source_type = $source_type; + $account_log->source_id = $source_id; + $account_log->source_sn = $source_sn; + $account_log->change_amount = $amount; + $account_log->left_amount = $user->user_money; + $account_log->remark = $remark; + $account_log->extra = $extra; + $account_log->change_type = $change_type; + $account_log->create_time = time(); + $account_log->save(); + return true; + + } +} diff --git a/application/common/model/Attachment.php b/application/common/model/Attachment.php new file mode 100755 index 0000000..2092705 --- /dev/null +++ b/application/common/model/Attachment.php @@ -0,0 +1,200 @@ + + */ + +namespace app\common\model; + +use think\model\concern\SoftDelete; + +class Attachment extends Model +{ + use SoftDelete; + + protected $name = 'attachment'; + protected $autoWriteTimestamp = true; + + protected $fileType = [ + '图片' => ['jpg', 'bmp', 'png', 'jpeg', 'gif', 'svg'], + '文档' => ['txt', 'doc', 'docx', 'xls', 'xlsx', 'pdf'], + '压缩文件' => ['rar', 'zip', '7z', 'tar'], + '音视' => ['mp3', 'ogg', 'flac', 'wma', 'ape'], + '视频' => ['mp4', 'wmv', 'avi', 'rmvb', 'mov', 'mpg'] + ]; + + protected $fileThumb = [ + 'picture' => ['jpg', 'bmp', 'png', 'jpeg', 'gif', 'svg'], + 'txt.svg' => ['txt', 'pdf'], + 'pdf.svg' => ['pdf'], + 'word.svg' => ['doc', 'docx'], + 'excel.svg' => ['xls', 'xlsx'], + 'archives.svg' => ['rar', 'zip', '7z', 'tar'], + 'audio.svg' => ['mp3', 'ogg', 'flac', 'wma', 'ape'], + 'video.svg' => ['mp4', 'wmv', 'avi', 'rmvb', 'mov', 'mpg'] + ]; + + protected function initialize() + { + $thumb_path = config('attachment.thumb_path'); + $this->fileThumb = [ + 'picture' => ['jpg', 'bmp', 'png', 'jpeg', 'gif', 'svg'], + $thumb_path . 'txt.svg' => ['txt', 'pdf'], + $thumb_path . 'pdf.svg' => ['pdf'], + $thumb_path . 'word.svg' => ['doc', 'docx'], + $thumb_path . 'excel.svg' => ['xls', 'xlsx'], + $thumb_path . 'archives.svg' => ['rar', 'zip', '7z', 'tar'], + $thumb_path . 'audio.svg' => ['mp3', 'ogg', 'flac', 'wma', 'ape'], + $thumb_path . 'video.svg' => ['mp4', 'wmv', 'avi', 'rmvb', 'mov', 'mpg'] + ]; + parent::initialize(); + } + + //关联后台用户 + public function adminUser() + { + return $this->belongsTo('AdminUser', 'admin_user_id', 'id'); + } + + //关联前台用户 + public function User() + { + return $this->belongsTo('User', 'user_id', 'id'); + } + + //格式化大小 + public function getSizeAttr($value) + { + $units = array(' B', ' KB', ' MB', ' GB', ' TB'); + for ($i = 0; $value >= 1024 && $i < 4; $i++) { + $value /= 1024; + } + return round($value, 2) . $units[$i]; + } + + //文件分类 + public function getFileTypeAttr($value, $data) + { + $type = '其他'; + $extension = $data['extension']; + foreach ($this->fileType as $name => $array) { + if (in_array($extension, $array)) { + $type = $name; + break; + } + } + return $type; + } + + + //文件预览 + public function getThumbnailAttr($value, $data) + { + $thumbnail = config('attachment.thumb_path') . 'unknown.svg'; + $extension = $data['extension']; + foreach ($this->fileThumb as $name => $array) { + if (in_array($extension, $array)) { + $thumbnail = $name === 'picture' ? $data['url'] : $name; + break; + } + } + return $thumbnail; + } + + public function getFileUrlAttr($value, $data) + { + $request = request(); + $url_pre = $request->scheme() . '://' . $request->host(); + return $url_pre . $data['url']; + } + + + public function upload($name, $path = '', $validate = [], $admin_user_id = 0, $user_id = 0) + { + + if (!$_FILES[$name]['name']) { + $this->error = '请选择文件'; + return false; + } + + $file = request()->withFiles([$name => $_FILES[$name]])->file($name); + if ($file) { + $file_path = config('attachment.path') . $path; + $file_url = config('attachment.url') . $path; + $validate = array_merge(config('attachment.validate'), $validate); + $info = $file->validate($validate)->move($file_path); + if ($info) { + $file_info = [ + 'admin_user_id' => $admin_user_id, + 'user_id' => $user_id, + 'original_name' => $info->getInfo('name'), + 'save_name' => $info->getFilename(), + 'save_path' => str_replace("\\", '/', $file_path . $info->getSaveName()), + 'extension' => $info->getExtension(), + 'mime' => $info->getInfo('type'), + 'size' => $info->getSize(), + 'md5' => $info->hash('md5'), + 'sha1' => $info->hash(), + 'url' => str_replace("\\", '/', $file_url . $info->getSaveName()) + ]; + return self::create($file_info); + } + + $this->error = $file->getError(); + } else { + $this->error = '无法获取文件'; + } + return false; + } + + + /** + * @param $name + * @param string $path + * @param array $validate + * @param int $admin_user_id + * @param int $user_id + * @return array|bool + */ + public function uploadMulti($name, $path = '', $validate = [], $admin_user_id = 0, $user_id = 0) + { + $result = []; + + $files = request()->withFiles([$name => $_FILES[$name]])->file($name); + if ($files) { + foreach ($files as $file) { + $file_path = config('attachment.path') . $path; + $file_url = config('attachment.url') . $path; + $validate = array_merge(config('attachment.validate'), $validate); + $info = $file->validate($validate)->move($file_path); + if ($info) { + $file_info = [ + 'admin_user_id' => $admin_user_id, + 'user_id' => $user_id, + 'original_name' => $info->getInfo('name'), + 'save_name' => $info->getFilename(), + 'save_path' => str_replace("\\", '/', $file_path . $info->getSaveName()), + 'extension' => $info->getExtension(), + 'mime' => $info->getInfo('type'), + 'size' => $info->getSize(), + 'md5' => $info->hash('md5'), + 'sha1' => $info->hash(), + 'url' => str_replace("\\", '/', $file_url . $info->getSaveName()) + ]; + $file_item = self::create($file_info); + $result[] = $file_item->url; + } + $this->error = $file->getError(); + } + if (count($result) > 0) { + return $result; + } + + return false; + + } + + $this->error = '无法获取文件'; + return false; + } +} diff --git a/application/common/model/Cart.php b/application/common/model/Cart.php new file mode 100755 index 0000000..0a87489 --- /dev/null +++ b/application/common/model/Cart.php @@ -0,0 +1,23 @@ +where(array('goods_id'=>$goods_id,'spec_value'=>$item_value))->find(); + if ($goods_num > $item_info['stock']) { + return true; + } + return false; + } +} diff --git a/application/common/model/ConsignmentOrder.php b/application/common/model/ConsignmentOrder.php new file mode 100755 index 0000000..89ce511 --- /dev/null +++ b/application/common/model/ConsignmentOrder.php @@ -0,0 +1,241 @@ +hasMany('consignment_order_goods', 'order_id', 'id'); + } + + //订单用户 + public function user() + { + return $this->hasOne('user', 'id', 'user_id') + ->field('id,sn,nickname,avatar,mobile,create_time'); + } + //订单流程 + public function logs() + { + return $this->hasMany('consignment_order_log', 'order_id', 'id')->order('id desc'); + } + + /** + * Notes: 结算详情 + * @param $json_value + * @param $user_id + * @return array + */ + public static function info($json_value, $user_id) + { + try{ + $goods_lists = array(); + $total_num = 0;//商品总数量 + foreach ($json_value as $good) { + $goods_lists[] = $good; + //订单汇总信息 + $total_num ++; + } + if (empty($goods_lists)) { + $data=[ + 'code' =>0, + 'msg' =>'无商品', + 'data' =>'', + ]; + return $data; + } + //寄卖数量限制 + $jmnum =ShopConfig::get('website', 'jmnum'); + if($jmnum>$total_num){ + $data=[ + 'code' =>0, + 'msg' =>'寄卖满'.$jmnum.'件才可下单', + 'data' =>'', + ]; + return $data; + } + $result = [ + 'goods_lists' => array_values($goods_lists), + ]; + $data=[ + 'code' =>1, + 'msg' =>'', + 'data' =>$result, + ]; + return $data; + } catch (Exception $e) { + $data=[ + 'code' =>0, + 'msg' =>$e->getMessage(), + 'data' =>'', + ]; + return $data; + } + } + + + /** + * Notes: 添加订单 + * @param $user_id + * @param $data + * @param $post + */ + public static function add($user_id, $data) + { + Db::startTrans(); + try { + $goods_lists = $data['goods_lists']; + if (empty($data['goods_lists'])) { + $data=[ + 'code' =>0, + 'msg' =>'无商品', + 'data' =>'', + ]; + return $data; + } + $order = self::addOrder($user_id, $data); + $order_id = $order['order_id']; + $addOrderGoods=self::addOrderGoods($order_id, $goods_lists); + if($addOrderGoods['code']==0){ + return $addOrderGoods; + } + self::addOrderAfter($order_id, $user_id, $data); + Db::commit(); + $data=[ + 'code' =>1, + 'msg' =>'', + 'data' =>$order, + ]; + return $data; + } catch (Exception $e) { + Db::rollback(); + $data=[ + 'code' =>0, + 'msg' =>$e->getMessage(), + 'data' =>'', + ]; + return $data; + } + } + + + /** + * Notes: 添加订单记录 + * @param $user_id + * @param $data + * @param $user_address + * @param array $extra + */ + public static function addOrder($user_id, $data) + { + + $order_data = [ + 'order_sn' => createSn('order', 'order_sn', '', 4), + 'user_id' => $user_id, + 'order_status' =>0, + 'create_time' => time(), + ]; + $order_id = Db::name('consignment_order')->insertGetId($order_data); + return [ + 'order_id' => $order_id, + 'order_sn' => $order_data['order_sn'], + ]; + } + + + /** + * Notes: 添加订单商品记录 + * @param $order_id + * @param $goods_lists + */ + public static function addOrderGoods($order_id, $goods_lists) + { + foreach ($goods_lists as $k1 => $good) { + $goods_data = [ + 'order_id' => $order_id, + 'item_value' => $good['item_value'], + 'goods_name' => $good['goods_name'], + 'item_value' => $good['item_value'], + 'goods_price' => $good['goods_price'], + 'goods_img' => $good['img'][0], + 'brand_name' => $good['brand_name'], + 'phase_name' => $good['phase_name'], + 'class_name' => $good['class_name'], + 'channel_name' => $good['channel_name'], + 'create_time' => time(), + ]; + $goods_id = Db::name('consignment_order_goods')->insertGetId($goods_data); + foreach ($good['img'] as $key => $value) { + $goods_img[] = [ + 'type' =>2, + 'union_id' => $goods_id, + 'thumb_image' => $value, + 'ori_image' => $value, + 'create_time' => time(), + ]; + } + } + Db::name('mall_image')->insertAll($goods_img); + $data=[ + 'code' =>1, + 'msg' =>'', + 'data' =>'', + ]; + return $data; + } + + + /** + * Notes: 下单后操作 + * @param $order_id + * @param $user_id + * @param $type + * @param $data + */ + public static function addOrderAfter($order_id, $user_id, $data) + { + //记录日志 + ConsignmentOrderLog::record( + $order_id, + '寄卖下单成功', + '24小时内平台估价' + ); + } +} diff --git a/application/common/model/ConsignmentOrderGoods.php b/application/common/model/ConsignmentOrderGoods.php new file mode 100755 index 0000000..ea6ab6f --- /dev/null +++ b/application/common/model/ConsignmentOrderGoods.php @@ -0,0 +1,29 @@ +order_id = $order_id; + $log->remark = $remark; + $log->extra = $extra; + $log->create_time = time(); + $log->save(); + } + +} diff --git a/application/common/model/Goods.php b/application/common/model/Goods.php new file mode 100755 index 0000000..26adc24 --- /dev/null +++ b/application/common/model/Goods.php @@ -0,0 +1,43 @@ +belongsTo(GoodsCategory::class); + } + + //关联商品尺寸 + public function goodsItem() + { + return $this->hasMany('goods_item', 'goods_id', 'id'); + } + + //关联品牌 + public function goodsBrand() + { + return $this->hasOne('goods_brand','id','brand_id')->field('id,name'); + } +} diff --git a/application/common/model/GoodsBrand.php b/application/common/model/GoodsBrand.php new file mode 100755 index 0000000..0033b9e --- /dev/null +++ b/application/common/model/GoodsBrand.php @@ -0,0 +1,35 @@ +hasMany(Goods::class); + } + +} diff --git a/application/common/model/GoodsCollect.php b/application/common/model/GoodsCollect.php new file mode 100755 index 0000000..5305122 --- /dev/null +++ b/application/common/model/GoodsCollect.php @@ -0,0 +1,14 @@ + $value) { + $data = self::where(['spec_value' => $param['size'][$key][0], 'goods_id' => $goods_id])->find(); + if (empty($data)) { + self::insert(['spec_value' => $param['size'][$key][0], 'goods_id' => $goods_id, 'stock' => $param['number'][$key][0]]); + } else { + self::where(['spec_value' => $param['size'][$key][0], 'goods_id' => $goods_id]) + ->update(['stock' =>$param['number'][$key][0]]); + } + } + } +} diff --git a/application/common/model/MallImage.php b/application/common/model/MallImage.php new file mode 100755 index 0000000..fa13bc4 --- /dev/null +++ b/application/common/model/MallImage.php @@ -0,0 +1,16 @@ + + */ + +namespace app\common\model; + +use think\db\Query; + +class Model extends \think\Model +{ + //是否字段,使用场景:用户的是否冻结,文章是否为热门等等。 + const BOOLEAN_TEXT = [0 => '否', 1 => '是']; + //用户等级 + const LEVL_TEXT = [1 => '普通会员']; + //订单状态 + const ORDER_TEXT = [0 => '待付款', 1=> '待发货',2=> '待收货',3=> '已完成',4=> '已取消']; + //寄卖状态 + const JMORDER_TEXT = [0 => '审核中', 1=> '待上架',2=> '已上架',3=> '待客户确认',4=> '客户已确认',5=> '已取货',6=> '部分退回','7'=>'全部退回','8'=>'已取消']; + //寄卖商品信息 + const JMORDER_GOODS_TEXT = [0 => '审核中', 1=> '同意',2=> '驳回',3=> '退还','4'=>'上架']; + + //是否为软删除 + public $softDelete = true; + + //软删除字段默认值 + protected $defaultSoftDelete = 0; + + //可搜索字段 + protected $searchField = []; + + //可作为条件的字段 + protected $whereField = []; + + //禁止删除的数据id + public $noDeletionId = [ + 1,2,3,4,5,6,7,8 + ]; + + /** + * 查询处理 + * @var Query $query + * @var array $param + */ + public function scopeWhere($query, $param) + { + //关键词like搜索 + $keywords = $param['_keywords'] ?? ''; + if (!empty($keywords) && count($this->searchField) > 0) { + $this->searchField = implode('|', $this->searchField); + $query->where($this->searchField, 'like', '%' . $keywords . '%'); + } + + //字段条件查询 + if (count($this->whereField) > 0 && count($param) > 0) { + foreach ($param as $key => $value) { + if (!empty($value) && in_array($key, $this->whereField)) { + $query->where($key, $value); + } + } + } + + //排序 + $order = $param['_order'] ?? ''; + $by = $param['_by'] ?? 'desc'; + $query->order($order ?: 'id', $by ?: 'desc'); + } + +} diff --git a/application/common/model/Notice.php b/application/common/model/Notice.php new file mode 100755 index 0000000..6e5dd44 --- /dev/null +++ b/application/common/model/Notice.php @@ -0,0 +1,198 @@ +find(); + if (empty($scene_info)) { + throw new Exception('信息错误'); + } + $scene_info['system_notice']=json_decode($scene_info['system_notice'],true); + $scene_info['sms_notice']=json_decode($scene_info['sms_notice'],true); + $scene_info['oa_notice']=json_decode($scene_info['oa_notice'],true); + $scene_info['mnp_notice']=json_decode($scene_info['mnp_notice'],true); + $params = self::mergeParams($params); + //发送系统消息 + if (isset($scene_info['system_notice']['status']) && $scene_info['system_notice']['status'] == 1) { + $content = self::contentFormat($scene_info['system_notice']['content'], $params); + self::addNoticeLog($params, $scene_info,1, $content); + } + + //发送短信记录 + if (isset($scene_info['sms_notice']['status']) && $scene_info['sms_notice']['status'] == 1) { + + } + + //发送公众号记录 + if (isset($scene_info['oa_notice']['status']) && $scene_info['oa_notice']['status'] == 1) { + //(new WxMessageServer($user_id,Client_::oa))->send($params); + } + + //发送小程序记录 + if (isset($scene_info['mnp_notice']['status']) && $scene_info['mnp_notice']['status'] == 1) { + //echo 22; + //(new WxMessageServer($user_id, Client_::mnp))->send($params); + } + } + + + /** + * Notes: 拼装额外参数 + * @param $params + */ + public static function mergeParams($params) + { + //订单相关信息 + if (!empty($params['order_id'])) { + $order = Db::name('order')->where(['id' => $params['order_id']])->find(); + $order_goods = Db::name('order_goods')->alias('og') + ->field('g.name') + ->join('goods g', 'og.goods_id = g.id') + ->where('og.order_id', $params['order_id']) + ->find(); + + $goods_name = $order_goods['name'] ?? '商品'; + if (mb_strlen($goods_name) > 8 ) { + $goods_name = mb_substr($goods_name,0,8) . '..'; + } + $params['goods_name'] = $goods_name; + $params['order_sn'] = $order['order_sn']; + $params['time'] = date('Y-m-d H:i', $order['create_time']); + $params['total_num'] = $order['total_num']; + $params['order_amount'] = $order['order_amount']; + $order_id=Crypt::encrypt($params['order_id']); + } + //寄卖订单相关信息 + if (!empty($params['jm_order_id'])) { + $order = Db::name('consignment_order')->where(['id' => $params['jm_order_id']])->find(); + $order_goods = Db::name('consignment_order_goods') + ->field('goods_name') + ->where('order_id', $params['jm_order_id']) + ->find(); + + $goods_name = $order_goods['goods_name'] ?? '商品'; + if (mb_strlen($goods_name) > 8 ) { + $goods_name = mb_substr($goods_name,0,8) . '..'; + } + $params['goods_name'] = $goods_name; + $params['order_sn'] = $order['order_sn']; + $params['time'] = date('Y-m-d H:i', $order['create_time']); + $order_id=Crypt::encrypt($params['jm_order_id']); + } + //用户相关信息 + if (!empty($params['user_id'])) { + $user = Db::name('user')->where('id', $params['user_id'])->find(); + $params['nickname'] = $user['nickname']; + } + + //跳转路径 + $jump_path = NoticeSetting::getPathByScene($params['scene'], $order_id ?? 0); + $params['url'] = $jump_path['url']; + $params['page'] = $jump_path['page']; + return $params; + } + + + //格式化消息内容(替换文本) + public static function contentFormat($content, $params) + { + foreach ($params as $k => $v) { + $search_replace = '{'.$k.'}'; + $content = str_replace($search_replace, $v, $content); + } + return $content; + } + + //添加通知记录 + public static function addNoticeLog($params, $scene_info, $send_type, $content, $extra = '') + { + return Db::name('notice')->insertGetId([ + 'user_id' => $params['user_id'] ?? 0, + 'title' => self::getTitleByScene($send_type, $scene_info), + 'content' => $content, + 'scene' => $params['scene'], + 'receive_type' => self::getReceiveTypeByScene($params['scene']), + 'send_type' => $send_type, + 'extra' => $extra, + 'create_time' => time() + ]); + } + + //根据不同发送类型获取标题 + public static function getTitleByScene($send_type, $scene_info) + { + $title = ''; + switch ($send_type) { + case NoticeSetting::SYSTEM_NOTICE: + $title = $scene_info['system_notice']['title'] ?? ''; + break; + case NoticeSetting::SMS_NOTICE: + $title = ''; + break; + case NoticeSetting::OA_NOTICE: + $title = $scene_info['oa_notice']['name'] ?? ''; + break; + case NoticeSetting::MNP_NOTICE: + $title = $scene_info['mnp_notice']['name'] ?? ''; + break; + } + return $title; + } + + + //根据场景返回当前接收对象 + public static function getReceiveTypeByScene($scene) + { + if (in_array($scene, NoticeSetting::NOTICE_PLATFORM_SCENE)) { + return NoticeSetting::NOTICE_PLATFORM; + } + + if (in_array($scene, NoticeSetting::NOTICE_USER_SCENE)) { + return NoticeSetting::NOTICE_USER; + } + + if (in_array($scene, NoticeSetting::NOTICE_OTHER_SCENE)) { + return NoticeSetting::NOTICE_OTHER; + } + } + + //更新为已读 + public static function setRead($where) + { + //进入列表后全部已读 + Db::name('notice') + ->where($where) + ->where('read','<>', 1) + ->update(['read' => 1]); + } + + //是否有未读的消息 + public static function unRead($user_id) + { + $un_read = Db::name('notice') + ->where(['user_id' => $user_id, 'read' => 0]) + ->where(['send_type' =>1]) + ->find(); + if ($un_read){ + return true; + } + return false; + } +} diff --git a/application/common/model/NoticeSetting.php b/application/common/model/NoticeSetting.php new file mode 100755 index 0000000..e157739 --- /dev/null +++ b/application/common/model/NoticeSetting.php @@ -0,0 +1,112 @@ + $url, 'page' => $page]; + } + +} diff --git a/application/common/model/Order.php b/application/common/model/Order.php new file mode 100755 index 0000000..f6ef089 --- /dev/null +++ b/application/common/model/Order.php @@ -0,0 +1,340 @@ +hasMany(OrderGoods::class, 'order_id', 'id')->field('goods_id,item_value,goods_name,goods_img,brand_name,goods_num,goods_price,total_price,order_id,id'); + } + + //订单用户 + public function user() + { + return $this->hasOne('user', 'id', 'user_id') + ->field('id,sn,nickname,avatar,mobile,create_time'); + } + + //收货地址 + public function getDeliveryAddressAttr($value, $data) + { + $region = Db::name('dev_region') + ->where('id', 'IN', [$data['province'], $data['city'], $data['district']]) + ->order('level asc') + ->column('name'); + + $region_desc = implode('', $region); + return $region_desc . $data['address']; + } + + + /** + * Notes: 发货操作 + * @param $data + */ + public static function delivery_handle($data) + { + $order_id = $data['order_id']; + $order = Order::get(['id' => $order_id], ['order_goods']); + if ($order['invoice_no']){ + return true; + } + //更新订单下商品的发货状态 + $order->update_time = time(); + $order->shipping_time = time(); + $order->order_status = 2; + $order->invoice_name = $data['invoice_name']; + $order->invoice_no = $data['invoice_no']; + $order->save(); + $data_info=[ + 'user_id' => $order['user_id'], + 'order_id' => $order['id'], + 'scene' =>101, + 'shipping_name' => $data['invoice_name'], + 'invoice_no' => $data['invoice_no'], + 'time' => date('Y-m-d H:i:s') + ]; + Notice::noticeByScene($order['user_id'],$data_info); + } + + + /** + * Notes: 结算详情 + * @param $post + * @param $user_id + * @return array + */ + public static function info($post, $user_id) + { + try{ + $goods =Db::name('cart') + ->alias('c') + ->field("mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,c.goods_num,item_value,g.status,g.stock,g.original_price") + ->join('goods g', 'g.id = c.goods_id') + ->join('goods_brand gb', 'gb.id= g.brand_id') + ->join('mall_image mi', 'mi.union_id= c.goods_id and is_cover=1 and mi.type=1', 'LEFT') + ->where(array('c.user_id'=>$user_id,'selected'=>1)) + ->select(); + $goods_lists = array(); + $total_num = 0;//商品总数量 + $total_goods_price = 0;//商品总金额 + foreach ($goods as $good) { + $good['sub_price'] = round($good['goods_price'] * $good['goods_num'], 2); + $goods_item=Db::name('goods_item')->where(array('spec_value'=>$good['item_value'],'goods_id'=>$good['goods_id']))->find(); + $good['stock'] =$goods_item['stock']; + $goods_lists[] = $good; + //订单汇总信息 + $total_num += $good['goods_num']; + $total_goods_price += $good['goods_price'] * $good['goods_num']; + } + if (empty($goods_lists)) { + $data=[ + 'code' =>0, + 'msg' =>'购物车无商品', + 'data' =>'', + ]; + return $data; + } + //用户地址 + $user_address = UserAddress::getOrderUserAddress($post, $user_id); + + //订单金额 + $total_amount = $total_goods_price; + //订单应付金额 + $order_amount = $total_goods_price; + + + if ($order_amount <= 0){ + $order_amount = 0; + } + $result = [ + 'goods_lists' => array_values($goods_lists), + 'total_num' => $total_num,//订单总数量 + 'total_goods_price' => round($total_goods_price, 2),//订单商品总价 + 'total_amount' => round($total_amount, 2),//订单总价(商品价格,运费,优惠券等) + 'order_amount' => round($order_amount, 2),//订单应付价格 + 'address' => $user_address, + 'remark' => $post['remark'] ?? '', + ]; + $data=[ + 'code' =>1, + 'msg' =>'', + 'data' =>$result, + ]; + return $data; + } catch (Exception $e) { + $data=[ + 'code' =>0, + 'msg' =>$e->getMessage(), + 'data' =>'', + ]; + return $data; + } + } + + /** + * Notes: 添加订单 + * @param $user_id + * @param $data + * @param $post + */ + public static function add($user_id, $data, $post) + { + Db::startTrans(); + try { + $goods_lists = $data['goods_lists']; + if (empty($data['goods_lists'])) { + $data=[ + 'code' =>0, + 'msg' =>'购物车无商品', + 'data' =>'', + ]; + return $data; + } + $user_address = $data['address']; + $user = User::get($user_id); + if (empty($data['address'])) { + $data=[ + 'code' =>0, + 'msg' =>'请选择收货地址', + 'data' =>'', + ]; + return $data; + } + $order = self::addOrder($user_id, $data, $user_address); + $order_id = $order['order_id']; + $addOrderGoods=self::addOrderGoods($order_id, $goods_lists); + if($addOrderGoods['code']==0){ + return $addOrderGoods; + } + self::addOrderAfter($order_id, $user_id, $data); + + Db::commit(); + $data=[ + 'code' =>1, + 'msg' =>'', + 'data' =>$order, + ]; + return $data; + } catch (Exception $e) { + Db::rollback(); + $data=[ + 'code' =>0, + 'msg' =>$e->getMessage(), + 'data' =>'', + ]; + return $data; + } + } + + /** + * Notes: 添加订单记录 + * @param $user_id + * @param $data + * @param $user_address + * @param array $extra + */ + public static function addOrder($user_id, $data, $user_address) + { + + $order_data = [ + 'order_sn' => createSn('order', 'order_sn', '', 4), + 'user_id' => $user_id, + 'consignee' => $user_address['contact'], + 'province' => $user_address['province_id'], + 'city' => $user_address['city_id'], + 'district' => $user_address['district_id'], + 'address' => $user_address['address'], + 'mobile' => $user_address['telephone'], + 'total_goods_price' => $data['total_goods_price'], + 'order_amount' => $data['order_amount'],//应付金额 + 'total_amount' => $data['total_amount'],//订单总金额 + 'total_num' => $data['total_num'],//订单商品数量 + 'user_remark' => $data['remark'], + 'create_time' => time(), + ]; + $order_id = Db::name('order')->insertGetId($order_data); + return [ + 'order_id' => $order_id, + 'order_sn' => $order_data['order_sn'], + 'order_amount' => $order_data['order_amount'], + ]; + } + + /** + * Notes: 添加订单商品记录 + * @param $order_id + * @param $goods_lists + */ + public static function addOrderGoods($order_id, $goods_lists) + { + foreach ($goods_lists as $k1 => $good) { + //商品验证 + if ($good['status'] != 1) { + $data=[ + 'code' =>0, + 'msg' =>'包含不存在或已下架的商品,无法下单', + 'data' =>'', + ]; + return $data; + } + if ($good['goods_num'] > $good['stock']) { + $data=[ + 'code' =>0, + 'msg' =>'商品库存不足,无法下单', + 'data' =>'', + ]; + return $data; + } + $goods_data[] = [ + 'order_id' => $order_id, + 'goods_id' => $good['goods_id'], + 'goods_img' => $good['goods_img'], + 'item_value' => $good['item_value'], + 'brand_name' => $good['brand_name'], + 'goods_name' => $good['goods_name'], + 'goods_num' => $good['goods_num'], + 'goods_price' => $good['goods_price'],//商品价格单价(未扣减优惠和积分价格) + 'total_price' => $good['goods_price'] * $good['goods_num'], + 'original_price' => $good['original_price'] ?? 0,//商品原始价格 + 'create_time' => time(), + ]; + } + Db::name('order_goods')->insertAll($goods_data); + $data=[ + 'code' =>1, + 'msg' =>'', + 'data' =>'', + ]; + return $data; + } + + + /** + * Notes: 下单后操作 + * @param $order_id + * @param $user_id + * @param $type + * @param $data + */ + public static function addOrderAfter($order_id, $user_id, $data) + { + $goods_data = $data['goods_lists']; + + //下单时扣减商品库存 + OrderGoods::decStock($goods_data); + + //删除购物车商品 + $cart_items = array_column($goods_data, 'item_value'); + Db::name('cart')->where([ + ['user_id', '=', $user_id], + ['selected', '=', 1], + ['item_value', 'in', $cart_items], + ])->delete(); + } +} diff --git a/application/common/model/OrderGoods.php b/application/common/model/OrderGoods.php new file mode 100755 index 0000000..e378200 --- /dev/null +++ b/application/common/model/OrderGoods.php @@ -0,0 +1,71 @@ + $good) { + $item_value = $good['item_value']; + //扣除库存,扣除规格库存,增加商品销量 + Db::name('goods') + ->where('id', $good['goods_id']) + ->update([ + 'order_num' => Db::raw("order_num+" . $good['goods_num']), + 'stock' => Db::raw('stock-' . $good['goods_num']) + ]); + //扣除规格表库存 + Db::name('goods_item') + ->where(array('goods_id'=>$good['goods_id'],'spec_value'=>$good['item_value'])) + ->setDec('stock', $good['goods_num']); + $goods_ids[] = $good['goods_id']; + } + //下架商品总库存为0的商品 + if (!empty($goods_ids)){ + self::outGoods($goods_ids); + } + } + + /** + * Notes: 下单后下架商品总库存为0的商品 + * @param $goods_id + */ + public static function outGoods($goods_ids) + { + try{ + $goods = Db::name('goods') + ->field('id, stock') + ->where('id', 'in', $goods_ids) + ->select(); + if (empty($goods)){ + return true; + } + $need_handle_ids = []; + foreach ($goods as $good) { + if ($good['stock'] <= 0) { + $need_handle_ids[] = $good['id']; + } + } + if (empty($need_handle_ids)){ + return true; + } + //下架订单商品中 商品总库存已为0的商品 + Db::name('goods')->where('id', 'in', $need_handle_ids)->update(['status' => 0]); + } catch (\Exception $e) {} + + } +} diff --git a/application/common/model/PhaseConfig.php b/application/common/model/PhaseConfig.php new file mode 100755 index 0000000..b342019 --- /dev/null +++ b/application/common/model/PhaseConfig.php @@ -0,0 +1,25 @@ + $type, 'name' => $name]) + ->find(); + if (empty($data)) { + self::insert(['type' => $type, 'name' => $name, 'value' => $value]); + } else { + self::where(['type' => $type, 'name' => $name]) + ->update(['value' => $value, 'update_time' => $update_time]); + } + return $original; + } + + /** + * Desc: 获取配置值 + * @param $type + * @param $name + * @param string $default_value + * @return mixed|string + */ + public static function get($type, $name = '', $default_value = null) + { + $value = self::where(['type' => $type, 'name' => $name])->value('value'); + $json = json_decode($value, true); + if (json_last_error() === JSON_ERROR_NONE) { + $value = $json; + } + if ($value) { + return $value; + } + } +} diff --git a/application/common/model/Slide.php b/application/common/model/Slide.php new file mode 100755 index 0000000..c3534c5 --- /dev/null +++ b/application/common/model/Slide.php @@ -0,0 +1,62 @@ + 1, 'name' => '商品'], + ['id' => 3, 'name' => '网址'], + ]; + + public $BannerList = [ + ['bm' => 'carousel', 'name' => '首页轮播图','cc'=>'750*500'], + ['bm' => 'merchant', 'name' => '首页精品推荐','cc'=>'710*289'], + ['bm' => 'goods', 'name' => '产品列表','cc'=>'710*240'], + ]; + + + public function getJumpTypeTextAttr($value, $data) + { + $result = '--'; + foreach ($this->jumpType as $item) { + if ($data['jump_type'] == $item['id']) { + $result = $item['name']; + break; + } + } + + return $result; + } + + public function getJumpTargetTextAttr($value, $data) + { + $result = '--'; + switch ($data['jump_type']) { + case 1: + $result = Goods::where('id', $data['jump_target'])->value('name'); + break; + case 3: + $result = $data['jump_target']; + break; + default: + break; + } + + return $result; + } + +} diff --git a/application/common/model/User.php b/application/common/model/User.php new file mode 100755 index 0000000..4f1e190 --- /dev/null +++ b/application/common/model/User.php @@ -0,0 +1,118 @@ +belongsTo(UserLevel::class); + } + + public static function getUserInfo($userId) + { + $user = self::field('id,sn,nickname,avatar,mobile')->findOrEmpty($userId)->toArray(); + if (empty($user)) { + return '系统'; + } + return $user; + } + + /** + * 填写邀请码 + * @param $code + * @param $my_id + * @return bool|string + */ + public static function code($code, $my_id) + { + $my_leader = Db::name('user') + ->field(['id', 'first_leader', 'second_leader', 'ancestor_relation']) + ->where(['distribution_code' => $code]) + ->find(); + + //更新我的第一上级、第二上级、关系链 + $my_leader_id = $my_leader['id']; + $my_first_leader = $my_leader['first_leader']; + $my_leader['ancestor_relation'] = boolval($my_leader['ancestor_relation']) ? $my_leader['ancestor_relation'] : ''; + $my_ancestor_relation = trim("{$my_leader_id},{$my_leader['ancestor_relation']}", ','); + + $user = User::findOrEmpty($my_id); + // 旧关系链 + if (!empty($user->ancestor_relation)) { + $old_ancestor_relation = $user->id . ',' .$user->ancestor_relation; + } else { + $old_ancestor_relation = $user->id; + } + + $data = [ + 'first_leader' => $my_leader_id, + 'second_leader' => $my_first_leader, + 'ancestor_relation' => $my_ancestor_relation, + ]; + Db::name('user') + ->where(['id' => $my_id]) + ->update($data); + + //更新我向下一级的第二上级 + $data = [ + 'second_leader' => $my_leader_id, + ]; + Db::name('user') + ->where(['first_leader' => $my_id]) + ->update($data); + + //更新与我相关的所有关系链 + Db::name('user') + ->where("find_in_set({$my_id},ancestor_relation)") + ->exp('ancestor_relation', "replace(ancestor_relation,'{$old_ancestor_relation}','" . trim("{$my_id},{$my_ancestor_relation}", ',') . "')") + ->update(); + } + + + //用户登录 + public static function login($param) + { + $username = $param['username']; + $password = $param['password']; + $user = self::get(['username' => $username]); + if (!$user) { + exception('用户不存在'); + } + + if (!password_verify($password, $user->password)) { + exception('密码错误'); + } + + if ((int)$user->status !== 1) { + exception('用户被冻结'); + } + return $user; + } +} diff --git a/application/common/model/UserAddress.php b/application/common/model/UserAddress.php new file mode 100755 index 0000000..512ed8e --- /dev/null +++ b/application/common/model/UserAddress.php @@ -0,0 +1,221 @@ +where(['user_id'=>$user_id]) + ->field('id,contact,telephone,province_id,city_id,district_id,address,is_default') + ->select(); + foreach ($info as &$item) { + $item['province'] = self::getAddress($item['province_id']); + $item['city'] = self::getAddress($item['city_id']); + $item['district'] = self::getAddress($item['district_id']); + } + return $info; + } + + /** + * 获取默认地址 + * @param $user_id + */ + public static function getDefaultAddress($user_id){ + $info = Db::name('user_address') + ->where(['is_default'=>1,'user_id'=>$user_id]) + ->field('id,contact,telephone,province_id,city_id,district_id,address,is_default') + ->find(); + if (!$info){ + return []; + } + $info['province'] = self::getAddress($info['province_id']); + $info['city'] = self::getAddress($info['city_id']); + $info['district'] = self::getAddress($info['district_id']); + + return $info; + } + + /** + * 设置默认地址 + * @param $user_id + * @param $post + * @return int|string + */ + public static function setDefaultAddress($user_id,$post){ + Db::startTrans(); + try { + Db::name('user_address') + ->where(['user_id'=>$user_id]) + ->update(['is_default'=>0]); + + $result = Db::name('user_address') + ->where(['id'=>$post['id'],'user_id'=>$user_id]) + ->update(['is_default'=>1]); + Db::commit(); + } catch (Exception $e) { + Db::rollback(); + return false; + } + return $result; + } + + + /** + * 添加收货地址 + * @param $user_id + * @param $post + * @return int|string + */ + public static function addUserAddress($user_id,$post) { + Db::startTrans(); + try { + if ($post['is_default'] == 1){ + Db::name('user_address') + ->where(['user_id'=>$user_id]) + ->update(['is_default'=>0]); + }else{ + $is_first = Db::name('user_address') + ->where(['user_id'=>$user_id]) + ->select(); + if (empty($is_first)){ + $post['is_default'] = 1; + } + } + $data = [ + 'user_id' => $user_id, + 'contact' => $post['contact'], + 'telephone' => $post['telephone'], + 'province_id' => $post['province_id'], + 'city_id' => $post['city_id'], + 'district_id' => $post['district_id'], + 'address' => $post['address'], + 'is_default' => $post['is_default'], + 'create_time' => time() + ]; + $result = Db::name('user_address')->insert($data); + Db::commit(); + } catch (Exception $e) { + Db::rollback(); + return false; + } + return $result; + } + + + /** + * 编辑用户地址 + * @param $user_id + * @param $post + */ + public static function editUserAddress($user_id,$post) { + Db::startTrans(); + try { + if ($post['is_default'] == 1){ + Db::name('user_address') + ->where(['user_id'=>$user_id]) + ->update(['is_default'=>0]); + } + $data = [ + 'contact' => $post['contact'], + 'telephone' => $post['telephone'], + 'province_id' => $post['province_id'], + 'city_id' => $post['city_id'], + 'district_id' => $post['district_id'], + 'address' => $post['address'], + 'is_default' => $post['is_default'], + 'update_time' => time() + ]; + $result = Db::name('user_address') + ->where(['id'=>$post['id'],'user_id'=>$user_id]) + ->update($data); + Db::commit(); + } catch (Exception $e) { + Db::rollback(); + return false; + } + return $result; + } + + /** + * 删除用户地址 + * @param $user_id + * @param $post + */ + public static function delUserAddress($user_id,$post) { + return Db::name('user_address')->where(['id'=>$post['id'],'user_id'=>$user_id])->delete(); + } + + + /** + * Desc: 获取用户指定id的地址 + * @param $address + * @param $user_id + */ + public static function getUserAddressById($address, $user_id) + { + $info = Db::name('user_address') + ->where(['id' => $address, 'user_id' => $user_id]) + ->field('id,contact,telephone,province_id,city_id,district_id,address,is_default') + ->find(); + + if (!$info) { + return []; + } + + $info['province'] = self::getAddress($info['province_id']); + $info['city'] = self::getAddress($info['city_id']); + $info['district'] = self::getAddress($info['district_id']); + + return $info; + } + + + //获取订单用户地址 + + /** + * Desc: 获取下单时用户地址 + * @param $data + * @param $user_id + */ + public static function getOrderUserAddress($data, $user_id) + { + if (isset($data['address_id']) && $data['address_id'] != 0){ + return self::getUserAddressById($data['address_id'], $user_id); + } + return self::getDefaultAddress($user_id); + } + + /** + * 通过id获取地址 + * @param $val(为非数组,返回单独地点名,为数组时,按顺序拼接地址返回) + * @param string $address val为数组时,连接详细地址一起返回 + * @return mixed|string + */ + public static function getAddress($val, $address = '') + { + $area_id_name = Db::name('dev_region')->column('name', 'id'); + if (!is_array($val)) { + return isset($area_id_name[$val]) ? $area_id_name[$val] : ''; + } + $long_address = ''; + foreach ($val as $id) { + $long_address .= isset($area_id_name[$id]) ? $area_id_name[$id] : ''; + } + return $long_address . $address; + } +} diff --git a/application/common/model/UserLevel.php b/application/common/model/UserLevel.php new file mode 100755 index 0000000..cd5830a --- /dev/null +++ b/application/common/model/UserLevel.php @@ -0,0 +1,33 @@ +hasMany(User::class); + } + + +} diff --git a/application/common/model/WithdrawAccount.php b/application/common/model/WithdrawAccount.php new file mode 100755 index 0000000..5071b1c --- /dev/null +++ b/application/common/model/WithdrawAccount.php @@ -0,0 +1,15 @@ +'支付宝', + '2' =>'微信', + '3' =>'银行卡', + ]; + + public $STATUS_TYPE = [ + '1' =>'待提现', + '2' =>'提现成功', + '3' =>'提现失败', + ]; + + public function getTypeTextAttr($value, $data) + { + return $this->WITHDRAW_TYPE[$data['type']]; + } + //状态:1-待提现2-提现中3-提现成功4-提现失败获取器 + public function getStatusTextAttr($value, $data) + { + return $this->STATUS_TYPE[$data['status']]; + }//支付时间获取器 + public function getPaymentTimeAttr($value) + { + return date('Y-m-d H:i:s',$value); + } + + //支付时间修改器 + public function setPaymentTimeAttr($value) + { + return strtotime($value); + }//转账时间获取器 + public function getTransferTimeAttr($value) + { + return date('Y-m-d H:i:s',$value); + } + + //转账时间修改器 + public function setTransferTimeAttr($value) + { + return strtotime($value); + }//重新支付时间获取器 + public function getRepayTimeAttr($value) + { + return date('Y-m-d H:i:s',$value); + } + + //重新支付时间修改器 + public function setRepayTimeAttr($value) + { + return strtotime($value); + } +} diff --git a/application/common/validate/AccountLogValidate.php b/application/common/validate/AccountLogValidate.php new file mode 100755 index 0000000..d744299 --- /dev/null +++ b/application/common/validate/AccountLogValidate.php @@ -0,0 +1,46 @@ + 'require', + 'user_id|用户id' => 'require', + 'source_type|来源类型' => 'require', + 'source_id|来源id' => 'require', + 'source_sn|来源单号' => 'require', + 'change_amount|变动总数' => 'require', + 'left_amount|剩余总数' => 'require', + 'remark|说明' => 'require', + 'extra|额外的字段说明' => 'require', + 'change_type|1-增加;2-减少' => 'require', + + ]; + + protected $message = [ + 'log_sn.require' => '流水单号(20位)不能为空', + 'user_id.require' => '用户id不能为空', + 'source_type.require' => '来源类型不能为空', + 'source_id.require' => '来源id不能为空', + 'source_sn.require' => '来源单号不能为空', + 'change_amount.require' => '变动总数不能为空', + 'left_amount.require' => '剩余总数不能为空', + 'remark.require' => '说明不能为空', + 'extra.require' => '额外的字段说明不能为空', + 'change_type.require' => '1-增加;2-减少不能为空', + + ]; + + protected $scene = [ + 'add' => ['log_sn','user_id','source_type','source_id','source_sn','change_amount','left_amount','remark','extra','change_type',], +'edit' => ['log_sn','user_id','source_type','source_id','source_sn','change_amount','left_amount','remark','extra','change_type',], + + ]; + + + +} diff --git a/application/common/validate/ArticleCategoryValidate.php b/application/common/validate/ArticleCategoryValidate.php new file mode 100755 index 0000000..cb874e3 --- /dev/null +++ b/application/common/validate/ArticleCategoryValidate.php @@ -0,0 +1,29 @@ + 'require', + 'name|名称' => 'require', + + ]; + + protected $message = [ + 'parent_id.require' => '上级分类不能为空', + 'name.require' => '名称不能为空', + + ]; + + protected $scene = [ + 'add' => ['parent_id', 'name',], + 'edit' => ['parent_id', 'name',], + + ]; + + +} diff --git a/application/common/validate/ArticleTagValidate.php b/application/common/validate/ArticleTagValidate.php new file mode 100755 index 0000000..0dcc7ae --- /dev/null +++ b/application/common/validate/ArticleTagValidate.php @@ -0,0 +1,29 @@ + 'require', + 'tag_id|标签' => 'require', + + ]; + + protected $message = [ + 'article_id.require' => '文章不能为空', + 'tag_id.require' => '标签不能为空', + + ]; + + protected $scene = [ + 'add' => ['article_id', 'tag_id',], + 'edit' => ['article_id', 'tag_id',], + + ]; + + +} diff --git a/application/common/validate/ArticleValidate.php b/application/common/validate/ArticleValidate.php new file mode 100755 index 0000000..c2d3087 --- /dev/null +++ b/application/common/validate/ArticleValidate.php @@ -0,0 +1,44 @@ + 'require', + 'user_id|发布人' => 'require', + 'article_category_id|所属分类' => 'require', + 'description|简介' => 'require', + 'content|内容' => 'require', + 'is_top|是否置顶' => 'require', + 'is_hot|是否热门' => 'require', + 'sort_number|排序' => 'require', + 'view_count|浏览数' => 'require', + + ]; + + protected $message = [ + 'name.require' => '标题不能为空', + 'user_id.require' => '发布人不能为空', + 'article_category_id.require' => '所属分类不能为空', + 'description.require' => '简介不能为空', + 'content.require' => '内容不能为空', + 'is_top.require' => '是否置顶不能为空', + 'is_hot.require' => '是否热门不能为空', + 'sort_number.require' => '排序不能为空', + 'view_count.require' => '浏览数不能为空', + + ]; + + protected $scene = [ + 'add' => ['name','user_id','article_category_id','description','content','is_top','is_hot','sort_number','view_count',], +'edit' => ['name','user_id','article_category_id','description','content','is_top','is_hot','sort_number','view_count',], + + ]; + + + +} diff --git a/application/common/validate/BrandValidate.php b/application/common/validate/BrandValidate.php new file mode 100755 index 0000000..7b578fd --- /dev/null +++ b/application/common/validate/BrandValidate.php @@ -0,0 +1,27 @@ + 'require', + + ]; + + protected $message = [ + 'name.require' => '名称不能为空', + + ]; + + protected $scene = [ + 'add' => ['name',], + 'edit' => ['name',], + + ]; + + +} diff --git a/application/common/validate/ConsignmentOrderValidate.php b/application/common/validate/ConsignmentOrderValidate.php new file mode 100755 index 0000000..c391abf --- /dev/null +++ b/application/common/validate/ConsignmentOrderValidate.php @@ -0,0 +1,48 @@ + 'require', + 'user_id|用户id' => 'require', + 'order_status|订单状态;0-审核中;1-待上架;2-已上架;3-已取消' => 'require', + 'is_return|是否退回' => 'require', + 'consignee|收货人' => 'require', + 'address|地址' => 'require', + 'mobile|手机' => 'require', + 'th_consignee|退回收货人' => 'require', + 'th_address|退回地址' => 'require', + 'th_mobile|退回电话' => 'require', + 'goods_price|订单商品总价' => 'require', + + ]; + + protected $message = [ + 'order_sn.require' => '订单编号不能为空', + 'user_id.require' => '用户id不能为空', + 'order_status.require' => '订单状态;0-审核中;1-待上架;2-已上架;3-已取消不能为空', + 'is_return.require' => '是否退回不能为空', + 'consignee.require' => '收货人不能为空', + 'address.require' => '地址不能为空', + 'mobile.require' => '手机不能为空', + 'th_consignee.require' => '退回收货人不能为空', + 'th_address.require' => '退回地址不能为空', + 'th_mobile.require' => '退回电话不能为空', + 'goods_price.require' => '订单商品总价不能为空', + + ]; + + protected $scene = [ + 'add' => ['order_sn','user_id','order_status','is_return','consignee','address','mobile','th_consignee','th_address','th_mobile','goods_price',], +'edit' => ['order_sn','user_id','order_status','is_return','consignee','address','mobile','th_consignee','th_address','th_mobile','goods_price',], + + ]; + + + +} diff --git a/application/common/validate/DeliverAddressValidate.php b/application/common/validate/DeliverAddressValidate.php new file mode 100755 index 0000000..b0c0ff8 --- /dev/null +++ b/application/common/validate/DeliverAddressValidate.php @@ -0,0 +1,43 @@ + 'require', + 'name|姓名' => 'require', + 'mobile|手机号' => 'require', + 'province_id|省' => 'require', + 'city_id|市' => 'require', + 'district_id|区' => 'require', + 'street_id|街道' => 'require', + 'detail|详细地址' => 'require', + 'is_default|是否默认' => 'require', + + ]; + + protected $message = [ + 'user_id.require' => '用户不能为空', + 'name.require' => '姓名不能为空', + 'mobile.require' => '手机号不能为空', + 'province_id.require' => '省不能为空', + 'city_id.require' => '市不能为空', + 'district_id.require' => '区不能为空', + 'street_id.require' => '街道不能为空', + 'detail.require' => '详细地址不能为空', + 'is_default.require' => '是否默认不能为空', + + ]; + + protected $scene = [ + 'add' => ['user_id', 'name', 'mobile', 'province_id', 'city_id', 'district_id', 'street_id', 'detail', 'is_default',], + 'edit' => ['user_id', 'name', 'mobile', 'province_id', 'city_id', 'district_id', 'street_id', 'detail', 'is_default',], + + ]; + + +} diff --git a/application/common/validate/ExpressValidate.php b/application/common/validate/ExpressValidate.php new file mode 100755 index 0000000..d31d3be --- /dev/null +++ b/application/common/validate/ExpressValidate.php @@ -0,0 +1,29 @@ + 'require', + 'code|编码' => 'require', + + ]; + + protected $message = [ + 'name.require' => '名称不能为空', + 'code.require' => '编码不能为空', + + ]; + + protected $scene = [ + 'add' => ['name', 'code',], + 'edit' => ['name', 'code',], + + ]; + + +} diff --git a/application/common/validate/GoodsAttrCategoryValidate.php b/application/common/validate/GoodsAttrCategoryValidate.php new file mode 100755 index 0000000..1947881 --- /dev/null +++ b/application/common/validate/GoodsAttrCategoryValidate.php @@ -0,0 +1,28 @@ + 'require', + + ]; + + protected $message = [ + 'name.require' => '名称不能为空', + + ]; + + protected $scene = [ + 'add' => ['name',], + 'edit' => ['name',], + + ]; + + + +} diff --git a/application/common/validate/GoodsBrandValidate.php b/application/common/validate/GoodsBrandValidate.php new file mode 100755 index 0000000..961474d --- /dev/null +++ b/application/common/validate/GoodsBrandValidate.php @@ -0,0 +1,34 @@ + 'require', + 'initial|品牌首字母' => 'require', + 'is_show|是否显示:1-是.0-否' => 'require', + 'sort|排序' => 'require', + + ]; + + protected $message = [ + 'name.require' => '品牌名称不能为空', + 'initial.require' => '品牌首字母不能为空', + 'is_show.require' => '是否显示:1-是.0-否不能为空', + 'sort.require' => '排序不能为空', + + ]; + + protected $scene = [ + 'add' => ['name','initial','is_show','sort',], +'edit' => ['name','initial','is_show','sort',], + + ]; + + + +} diff --git a/application/common/validate/GoodsCategoryValidate.php b/application/common/validate/GoodsCategoryValidate.php new file mode 100755 index 0000000..a11b0b1 --- /dev/null +++ b/application/common/validate/GoodsCategoryValidate.php @@ -0,0 +1,29 @@ + 'require', + 'name|名称' => 'require', + + ]; + + protected $message = [ + 'parent_id.require' => '上级分类不能为空', + 'name.require' => '名称不能为空', + + ]; + + protected $scene = [ + 'add' => ['parent_id', 'name',], + 'edit' => ['parent_id', 'name',], + + ]; + + +} diff --git a/application/common/validate/GoodsIndexValidate.php b/application/common/validate/GoodsIndexValidate.php new file mode 100755 index 0000000..eadbbdb --- /dev/null +++ b/application/common/validate/GoodsIndexValidate.php @@ -0,0 +1,34 @@ + 'require', + 'goods_ids|商品id组' => 'require', + 'sort_number|排序(升序)' => 'require', + 'status|是否上架' => 'require', + + ]; + + protected $message = [ + 'name.require' => '栏目名称不能为空', + 'goods_ids.require' => '商品id组不能为空', + 'sort_number.require' => '排序(升序)不能为空', + 'status.require' => '是否上架不能为空', + + ]; + + protected $scene = [ + 'add' => ['name','sort_number','status',], +'edit' => ['name','sort_number','status',], + + ]; + + + +} diff --git a/application/common/validate/GoodsValidate.php b/application/common/validate/GoodsValidate.php new file mode 100755 index 0000000..b508637 --- /dev/null +++ b/application/common/validate/GoodsValidate.php @@ -0,0 +1,43 @@ + 'require', + 'name|名称' => 'require', + 'code|编码' => 'require', + 'price|售价' => 'require', + 'brand_id|品牌' => 'require', + 'detail|详情' => 'require', + 'stock|库存' => 'require', + 'sort_number|排序(升序' => 'require', + 'status|是否上架' => 'require', + + ]; + + protected $message = [ + 'goods_category_id.require' => '所属分类不能为空', + 'name.require' => '名称不能为空', + 'code.require' => '商品编号不能为空', + 'price.require' => '售价不能为空', + 'brand_id.require' => '品牌不能为空', + 'detail.require' => '详情不能为空', + 'stock.require' => '库存不能为空', + 'sort_number.require' => '排序(升序不能为空', + 'status.require' => '是否上架不能为空', + + ]; + + protected $scene = [ + 'add' => ['goods_category_id', 'name','code', 'price', 'brand_id', 'detail', 'sort_number', 'status',], + 'edit' => ['goods_category_id', 'name','code', 'price', 'brand_id', 'detail', 'sort_number', 'status',], + + ]; + + +} diff --git a/application/common/validate/OrderGoodsValidate.php b/application/common/validate/OrderGoodsValidate.php new file mode 100755 index 0000000..e202098 --- /dev/null +++ b/application/common/validate/OrderGoodsValidate.php @@ -0,0 +1,37 @@ + 'require', + 'goods_id|商品' => 'require', + 'number|数量' => 'require', + 'attr|规格' => 'require', + 'price|单价' => 'require', + 'total_price|总价' => 'require', + + ]; + + protected $message = [ + 'order_id.require' => '所属订单不能为空', + 'goods_id.require' => '商品不能为空', + 'number.require' => '数量不能为空', + 'attr.require' => '规格不能为空', + 'price.require' => '单价不能为空', + 'total_price.require' => '总价不能为空', + + ]; + + protected $scene = [ + 'add' => ['order_id', 'goods_id', 'number', 'attr', 'price', 'total_price',], + 'edit' => ['order_id', 'goods_id', 'number', 'attr', 'price', 'total_price',], + + ]; + + +} diff --git a/application/common/validate/OrderValidate.php b/application/common/validate/OrderValidate.php new file mode 100755 index 0000000..14849f0 --- /dev/null +++ b/application/common/validate/OrderValidate.php @@ -0,0 +1,28 @@ + 'require', + 'invoice_no|物流单号' => 'require', + ]; + + protected $message = [ + 'invoice_name.require' => '物流公司不能为空', + 'invoice_no.require' => '物流单号不能为空', + + ]; + + protected $scene = [ + 'hansle'=>['invoice_name','invoice_no'] + + ]; + + + +} diff --git a/application/common/validate/PhaseConfigValidate.php b/application/common/validate/PhaseConfigValidate.php new file mode 100755 index 0000000..daa8bcc --- /dev/null +++ b/application/common/validate/PhaseConfigValidate.php @@ -0,0 +1,30 @@ + 'require', + 'describe|描述' => 'require', + + ]; + + protected $message = [ + 'name.require' => '名称不能为空', + 'describe.require' => '描述不能为空', + + ]; + + protected $scene = [ + 'add' => ['name','describe',], +'edit' => ['name','describe',], + + ]; + + + +} diff --git a/application/common/validate/ShopConfigValidate.php b/application/common/validate/ShopConfigValidate.php new file mode 100755 index 0000000..924dac7 --- /dev/null +++ b/application/common/validate/ShopConfigValidate.php @@ -0,0 +1,32 @@ + 'require', + 'name|名称' => 'require', + 'value|值' => 'require', + + ]; + + protected $message = [ + 'type.require' => '类型不能为空', + 'name.require' => '名称不能为空', + 'value.require' => '值不能为空', + + ]; + + protected $scene = [ + 'add' => ['type','name','value',], +'edit' => ['type','name','value',], + + ]; + + + +} diff --git a/application/common/validate/SlideValidate.php b/application/common/validate/SlideValidate.php new file mode 100755 index 0000000..44f1fb1 --- /dev/null +++ b/application/common/validate/SlideValidate.php @@ -0,0 +1,33 @@ + 'require', + 'jump_type|跳转类型' => 'require', + 'jump_target|跳转目标' => 'require', + 'sort_number|排序' => 'require', + + ]; + + protected $message = [ + 'name.require' => '名称不能为空', + 'jump_type.require' => '跳转类型不能为空', + 'jump_target.require' => '跳转目标不能为空', + 'sort_number.require' => '排序不能为空', + + ]; + + protected $scene = [ + 'add' => ['name', 'jump_type', 'jump_target', 'sort_number',], + 'edit' => ['name', 'jump_type', 'jump_target', 'sort_number',], + + ]; + + +} diff --git a/application/common/validate/TagValidate.php b/application/common/validate/TagValidate.php new file mode 100755 index 0000000..c209014 --- /dev/null +++ b/application/common/validate/TagValidate.php @@ -0,0 +1,27 @@ + 'require', + + ]; + + protected $message = [ + 'name.require' => '名称不能为空', + + ]; + + protected $scene = [ + 'add' => ['name',], + 'edit' => ['name',], + + ]; + + +} diff --git a/application/common/validate/TestValidate.php b/application/common/validate/TestValidate.php new file mode 100755 index 0000000..9f66809 --- /dev/null +++ b/application/common/validate/TestValidate.php @@ -0,0 +1,28 @@ + 'require', + + ]; + + protected $message = [ + 'name.require' => '不能为空', + + ]; + + protected $scene = [ + 'add' => ['name',], +'edit' => ['name',], + + ]; + + + +} diff --git a/application/common/validate/UserAddressValidate.php b/application/common/validate/UserAddressValidate.php new file mode 100755 index 0000000..eb29a71 --- /dev/null +++ b/application/common/validate/UserAddressValidate.php @@ -0,0 +1,39 @@ + 'require', + 'contact|收货人' => 'require', + 'telephone|手机号码' => 'require', + 'province_id|省' => 'require', + 'city_id|市' => 'require', + 'district_id|区' => 'require', + 'address|是否启用' => 'require', + 'post_code|邮编' => 'require', + ]; + + protected $message = [ + 'id.require' => '该地址不存在', + 'contact.require' => '收货人不能为空', + 'telephone.require' => '手机号不能为空', + 'province_id.require' => '省不能为空', + 'city_id.require' => '市不能为空', + 'district_id.require' => '区不能为空', + 'address.require' => '详情地址不能为空', + 'post_code.require' => '邮编不能为空', + ]; + + protected $scene = [ + 'add' => ['contact', 'telephone', 'province_id', 'city_id', 'district_id', 'address',], + 'edit' => ['contact', 'telephone', 'province_id', 'city_id', 'district_id', 'address',], + 'del' =>['id'], + ]; + + +} diff --git a/application/common/validate/UserLevelValidate.php b/application/common/validate/UserLevelValidate.php new file mode 100755 index 0000000..30eeed7 --- /dev/null +++ b/application/common/validate/UserLevelValidate.php @@ -0,0 +1,31 @@ + 'require', + 'description|简介' => 'require', + 'status|是否启用' => 'require', + + ]; + + protected $message = [ + 'name.require' => '名称不能为空', + 'description.require' => '简介不能为空', + 'status.require' => '是否启用不能为空', + + ]; + + protected $scene = [ + 'add' => ['name', 'description', 'status',], + 'edit' => ['name', 'description', 'status',], + + ]; + + +} diff --git a/application/common/validate/UserValidate.php b/application/common/validate/UserValidate.php new file mode 100755 index 0000000..64152bb --- /dev/null +++ b/application/common/validate/UserValidate.php @@ -0,0 +1,37 @@ + 'require', + 'username|用户名' => 'require', + 'mobile|手机号' => 'require', + 'nickname|昵称' => 'require', + 'password|密码' => 'require', + 'status|是否启用' => 'require', + + ]; + + protected $message = [ + 'user_level_id.require' => '用户等级不能为空', + 'username.require' => '用户名不能为空', + 'mobile.require' => '手机号不能为空', + 'nickname.require' => '昵称不能为空', + 'password.require' => '密码不能为空', + 'status.require' => '是否启用不能为空', + + ]; + + protected $scene = [ + 'add' => ['user_level_id', 'username', 'mobile', 'nickname', 'password', 'status',], + 'edit' => ['user_level_id', 'username', 'mobile', 'nickname', 'password', 'status',], + + ]; + + +} diff --git a/application/common/validate/Validate.php b/application/common/validate/Validate.php new file mode 100755 index 0000000..19ab734 --- /dev/null +++ b/application/common/validate/Validate.php @@ -0,0 +1,13 @@ + + * @date 2018/12/18 + */ + +namespace app\common\validate; + +class Validate extends \think\Validate +{ + +} \ No newline at end of file diff --git a/application/common/validate/WithdrawAccountValidate.php b/application/common/validate/WithdrawAccountValidate.php new file mode 100755 index 0000000..f00e851 --- /dev/null +++ b/application/common/validate/WithdrawAccountValidate.php @@ -0,0 +1,29 @@ + 'require', + 'real_tel|手机号' => 'require', + 'account|账号' => 'require', + 'type|类型' => 'require', + ]; + + protected $message = [ + 'real_name.require' => '真实姓名不能为空', + 'real_tel.require' => '手机号不能为空', + 'account.require' => '账号不能为空', + 'type.require' => '类型不能为空', + ]; + + protected $scene = [ + 'add' => ['real_name', 'real_tel', 'account', 'type',], + ]; + + +} diff --git a/application/common/validate/WithdrawApplyValidate.php b/application/common/validate/WithdrawApplyValidate.php new file mode 100755 index 0000000..d13d6df --- /dev/null +++ b/application/common/validate/WithdrawApplyValidate.php @@ -0,0 +1,70 @@ + 'require', + 'user_id|用户id' => 'require', + 'real_name|真实姓名' => 'require', + 'account|账号' => 'require', + 'type|类型:1-提现到钱包余额;2-提现到微信零钱;3-提现到微信收款码;4-提现到支付宝收款码' => 'require', + 'money|提现金额' => 'require', + 'left_money|用户可得的金额(扣除手续费后)' => 'require', + 'money_qr_code|收款二维码' => 'require', + 'poundage|手续费' => 'require', + 'remark|提现申请备注' => 'require', + 'status|状态:1-待提现2-提现中3-提现成功4-提现失败' => 'require', + 'pay_desc|微信零钱支付信息' => 'require', + 'payment_no|支付单号' => 'require', + 'payment_time|支付时间' => 'require', + 'description|审核备注' => 'require', + 'transfer_voucher|转账凭证' => 'require', + 'transfer_time|转账时间' => 'require', + 'pay_search_desc|微信零钱支付查询结果' => 'require', + 'transfer_description|转账备注' => 'require', + 'repay_time|重新支付时间' => 'require', + 'bank|提现银行' => 'require', + 'subbank|提现银行支行' => 'require', + + ]; + + protected $message = [ + 'sn.require' => '提现单号不能为空', + 'user_id.require' => '用户id不能为空', + 'real_name.require' => '真实姓名不能为空', + 'account.require' => '账号不能为空', + 'type.require' => '类型:1-提现到钱包余额;2-提现到微信零钱;3-提现到微信收款码;4-提现到支付宝收款码不能为空', + 'money.require' => '提现金额不能为空', + 'left_money.require' => '用户可得的金额(扣除手续费后)不能为空', + 'money_qr_code.require' => '收款二维码不能为空', + 'poundage.require' => '手续费不能为空', + 'remark.require' => '提现申请备注不能为空', + 'status.require' => '状态:1-待提现2-提现中3-提现成功4-提现失败不能为空', + 'pay_desc.require' => '微信零钱支付信息不能为空', + 'payment_no.require' => '支付单号不能为空', + 'payment_time.require' => '支付时间不能为空', + 'description.require' => '审核备注不能为空', + 'transfer_voucher.require' => '转账凭证不能为空', + 'transfer_time.require' => '转账时间不能为空', + 'pay_search_desc.require' => '微信零钱支付查询结果不能为空', + 'transfer_description.require' => '转账备注不能为空', + 'repay_time.require' => '重新支付时间不能为空', + 'bank.require' => '提现银行不能为空', + 'subbank.require' => '提现银行支行不能为空', + + ]; + + protected $scene = [ + 'add' => ['sn','user_id','real_name','account','type','money','left_money','money_qr_code','poundage','remark','status','pay_desc','payment_no','payment_time','description','transfer_voucher','transfer_time','pay_search_desc','transfer_description','repay_time','bank','subbank',], +'edit' => ['sn','user_id','real_name','account','type','money','left_money','money_qr_code','poundage','remark','status','pay_desc','payment_no','payment_time','description','transfer_voucher','transfer_time','pay_search_desc','transfer_description','repay_time','bank','subbank',], + + ]; + + + +} diff --git a/application/index/common.php b/application/index/common.php new file mode 100755 index 0000000..a3bad14 --- /dev/null +++ b/application/index/common.php @@ -0,0 +1,54 @@ +isPost()) { + $url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : url($url); + $result = [ + 'code' => $code, + 'msg' => $msg, + 'data' => $data, + 'url' => $url, + 'wait' => $wait, + ]; + $response = Response::create($result, 'json')->header($header); + throw new HttpResponseException($response); + } + + + if ($url === null) { + $url = request()->server('HTTP_REFERER') ?? 'index/index/index'; + } + + $response = new Redirect($url); + + $response->code(302)->params($data)->with([$code ? 'success_message' : 'error_message' => $msg, 'url' => $url]); + + throw new HttpResponseException($response); + } +} \ No newline at end of file diff --git a/application/index/controller/Controller.php b/application/index/controller/Controller.php new file mode 100755 index 0000000..0c13f77 --- /dev/null +++ b/application/index/controller/Controller.php @@ -0,0 +1,56 @@ + + */ + +namespace app\index\controller; + +use app\common\model\User; +use app\index\traits\{IndexAuth, IndexTree}; + +class Controller extends \think\Controller +{ + use IndexAuth, IndexAuth; + + /** + * 当前url + * @var string + */ + protected $url; + + /** + * 当前用户ID + * @var int + */ + protected $uid = 0; + + /** + * 当前用户 + * @var User + */ + protected $user; + + /** + * 无需验证权限的url + * @var array + */ + protected $authExcept = []; + + protected function initialize() + { + $request = $this->request; + if (!in_array($request->action(true), $this->authExcept)) { + if (!$this->isLogin()) { + error('未登录', 'auth/login'); + } else if ($this->user->id !== 1 && !$this->isLogin()) { + error('无权限'); + } + } + + if ((int)$request->param('check_auth') === 1) { + success(); + } + } + +} diff --git a/application/index/controller/IndexController.php b/application/index/controller/IndexController.php new file mode 100755 index 0000000..f3f90a7 --- /dev/null +++ b/application/index/controller/IndexController.php @@ -0,0 +1,24 @@ +fetch(); + } + + +} diff --git a/application/index/controller/UserController.php b/application/index/controller/UserController.php new file mode 100755 index 0000000..82acd6d --- /dev/null +++ b/application/index/controller/UserController.php @@ -0,0 +1,62 @@ +assign([ + 'user' => $this->user + ]); + + return $this->fetch(); + } + + + //登录 + public function login(Request $request, User $model) + { + $param = $request->param(); + + //登录逻辑 + if ($this->request->isPost()) { + + try { + $user = $model::login($param); + } catch (\Exception $exception) { + + return error($exception->getMessage()); + } + + self::authLogin($user); + + return success('登录成功'); + } + + + return $this->fetch(); + } + + + //退出 + public function logout() + { + self::authLogout(); + + return redirect(url('index/index')); + } +} \ No newline at end of file diff --git a/application/index/traits/IndexAuth.php b/application/index/traits/IndexAuth.php new file mode 100755 index 0000000..fd36075 --- /dev/null +++ b/application/index/traits/IndexAuth.php @@ -0,0 +1,84 @@ + + */ + +namespace app\index\traits; + +use app\common\model\User; +use tools\SafeCookie; +use think\facade\Session; + +trait IndexAuth +{ + public static $user_id = 'user_id'; + public static $user_id_sign = 'user_sign'; + + //是否登录 + protected function isLogin() + { + //这里要写个判断数据库的才行 + $user_id = Session::get(self::$user_id); + $user = false; + $this->user = &$user; + if (empty($user_id)) { + if (SafeCookie::has(self::$user_id) && SafeCookie::has(self::$user_id_sign)) { + $user_id = SafeCookie::get(self::$user_id); + $sign = SafeCookie::get(self::$user_id_sign); + $user = User::get($user_id); + if ($user && $user->sign_str === $sign) { + Session::set(self::$user_id, $user_id); + Session::set(self::$user_id_sign, $sign); + return true; + } + } + return false; + } + + $user = User::get($user_id); + if(!$user) { + return false; + } + $this->uid = $user->id; + + return Session::get(self::$user_id_sign) === $user->sign_str; + } + + /** + * session 与cookie登录 + * @param $user User + * @param bool $remember + * @return bool + */ + public static function authLogin($user, $remember = false) + { + Session::set(self::$user_id, $user->id); + Session::set(self::$user_id_sign, $user->sign_str); + + //记住登录 + if ($remember === true) { + SafeCookie::set(self::$user_id, $user->id); + SafeCookie::set(self::$user_id_sign, $user->sign_str); + } else if (SafeCookie::has(self::$user_id) || SafeCookie::has(self::$user_id_sign)) { + SafeCookie::delete(self::$user_id); + SafeCookie::delete(self::$user_id_sign); + } + + return true; + } + + //退出 + public static function authLogout() + { + Session::delete(self::$user_id); + Session::delete(self::$user_id_sign); + if (SafeCookie::has(self::$user_id) || SafeCookie::has(self::$user_id_sign)) { + SafeCookie::delete(self::$user_id); + SafeCookie::delete(self::$user_id_sign); + } + return true; + } + + +} \ No newline at end of file diff --git a/application/index/traits/IndexTree.php b/application/index/traits/IndexTree.php new file mode 100755 index 0000000..480d7f6 --- /dev/null +++ b/application/index/traits/IndexTree.php @@ -0,0 +1,114 @@ + + */ + +namespace app\index\traits; + +trait IndexTree +{ + public $text, $html; + /** + * 生成树型结构所需要的2维数组 + * @var array + */ + public $array; + + /** + * 生成树型结构所需修饰符号,可以换成图片 + * @var array + */ + public $icon = array('│', '├', '└'); + public $space = '  '; + /** + * @access private + */ + public $ret = ''; + + + /** + * 构造函数,初始化类 + * @param array $arr + * @return bool + */ + public function initTree($arr=[]) + { + $this->array = $arr; + $this->ret = ''; + $this->html = ''; + return is_array($arr); + } + + /** + * 得到树型结构 + * @param int $my_id ,表示获得这个ID下的所有子级 + * @param string $str 生成树型结构的基本代码,例如:"" + * @param int $sid 被选中的ID,比如在做树型下拉框的时候需要用到 + * @param string $adds + * @param string $str_group + * @return string + */ + public function getTree($my_id, $str, $sid = 0, $adds = '', $str_group = '') + { + $parent_id = ''; + $n_str = ''; + $number = 1; + $child = $this->getChild($my_id); + + if (is_array($child)) { + $total = count($child); + foreach ($child as $id => $value) { + $j = $k = ''; + if ($number == $total) { + $j .= $this->icon[2]; + } else { + $j .= $this->icon[1]; + $k = $adds ? $this->icon[0] : ''; + } + $spacer = $adds ? $adds . $j : ''; + $selected = $id == $sid ? 'selected' : ''; + extract($value); + 0 == $parent_id && $str_group ? eval("\$n_str = \"$str_group\";") : eval("\$n_str = \"$str\";"); + $this->ret .= $n_str; + $space = $this->space; + $this->getTree($id, $str, $sid, $adds . $k . $space, $str_group); + $number++; + } + } + return $this->ret; + } + + + /** + * 得到子级数组 + * @param int $pid + * @return bool|array + */ + public function getChild($pid) + { + $result = []; + foreach ($this->array as $key => $value) { + if ($value['parent_id'] == $pid) { + $result[$key] = $value; + } + } + return $result; + } + + /** + * 递归获取级别 + * @param int $id ID + * @param array $array 所有菜单 + * @param int $i 所在级别 + * @return int + */ + public function getLevel($id, $array, $i = 0) + { + if ($array[$id]['parent_id'] == 0 || empty($array[$array[$id]['parent_id']]) || $id == $array[$id]['parent_id']) { + return $i; + } + $i++; + return self::getLevel($array[$id]['parent_id'], $array, $i); + } +} diff --git a/application/index/view/index/index.html b/application/index/view/index/index.html new file mode 100755 index 0000000..c1d5f5f --- /dev/null +++ b/application/index/view/index/index.html @@ -0,0 +1,39 @@ + + + + BearAdmin + + + + + + + + + + + + + +
    +

    BearAdmin

    +

    &一款基于ThinkPHP5.1+AdminLTE的后台快速开发管理系统 

    +

    Go→

    +

    Github

    +

    + Gitee +

    +
    + + + + diff --git a/application/index/view/user/index.html b/application/index/view/user/index.html new file mode 100755 index 0000000..cea872a --- /dev/null +++ b/application/index/view/user/index.html @@ -0,0 +1,12 @@ + + + + + 个人中心 + + + +个人中心 + + + \ No newline at end of file diff --git a/application/index/view/user/login.html b/application/index/view/user/login.html new file mode 100755 index 0000000..ee4a87b --- /dev/null +++ b/application/index/view/user/login.html @@ -0,0 +1,12 @@ + + + + + 登录 + + + +登录 + + + \ No newline at end of file diff --git a/application/provider.php b/application/provider.php new file mode 100755 index 0000000..d0fcd24 --- /dev/null +++ b/application/provider.php @@ -0,0 +1,14 @@ + +// +---------------------------------------------------------------------- + +// 应用容器绑定定义 +return [ +]; diff --git a/application/tags.php b/application/tags.php new file mode 100755 index 0000000..4b18d10 --- /dev/null +++ b/application/tags.php @@ -0,0 +1,28 @@ + +// +---------------------------------------------------------------------- + +// 应用行为扩展定义文件 +return [ + // 应用初始化 + 'app_init' => [], + // 应用开始 + 'app_begin' => [], + // 模块初始化 + 'module_init' => [], + // 操作开始执行 + 'action_begin' => [], + // 视图内容过滤 + 'view_filter' => [], + // 日志写入 + 'log_write' => [], + // 应用结束 + 'app_end' => [], +]; diff --git a/build.php b/build.php new file mode 100755 index 0000000..34ba3c8 --- /dev/null +++ b/build.php @@ -0,0 +1,26 @@ + +// +---------------------------------------------------------------------- + +return [ + // 生成应用公共文件 + '__file__' => ['common.php'], + + // 定义demo模块的自动生成 (按照实际定义的文件名生成) + 'demo' => [ + '__file__' => ['common.php'], + '__dir__' => ['behavior', 'controller', 'model', 'view'], + 'controller' => ['Index', 'Test', 'UserType'], + 'model' => ['User', 'UserType'], + 'view' => ['index/index'], + ], + + // 其他更多的模块定义 +]; diff --git a/composer.json b/composer.json new file mode 100755 index 0000000..a729538 --- /dev/null +++ b/composer.json @@ -0,0 +1,42 @@ +{ + "name": "topthink/think", + "description": "the new thinkphp framework", + "type": "project", + "keywords": [ + "framework", + "thinkphp", + "ORM" + ], + "homepage": "http://thinkphp.cn/", + "license": "Apache-2.0", + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + } + ], + "require": { + "php": ">=5.6.0", + "topthink/framework": "5.1.*", + "topthink/think-migration": "^2.0", + "topthink/think-captcha": "^2.0", + "lcobucci/jwt": "^3.3", + "phpoffice/phpspreadsheet": "^1.8", + "yupoxiong/region": "^1.1", + "overtrue/easy-sms": "^1.1", + "endroid/qr-code": "^3.6", + "overtrue/wechat": "^4.2", + "phpmailer/phpmailer": "^6.0" + }, + "autoload": { + "psr-4": { + "app\\": "application" + } + }, + "extra": { + "think-path": "thinkphp" + }, + "config": { + "preferred-install": "dist" + } +} diff --git a/composer.lock b/composer.lock new file mode 100755 index 0000000..d16cab0 --- /dev/null +++ b/composer.lock @@ -0,0 +1,2953 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "46a4a4dde67c08df891e6ada6d5f3078", + "packages": [ + { + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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'", + "role": "Developer", + "email": "mail@dasprids.de", + "homepage": "http://www.dasprids.de" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode", + "time": "2018-04-25T17:53:56+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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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": "easywechat-composer/easywechat-composer", + "version": "1.1.6", + "source": { + "type": "git", + "url": "https://github.com/mingyoung/easywechat-composer.git", + "reference": "970144fd245e62869edd60db6cc477053219d891" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mingyoung/easywechat-composer/zipball/970144fd245e62869edd60db6cc477053219d891", + "reference": "970144fd245e62869edd60db6cc477053219d891", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "composer-plugin-api": "^1.0", + "php": ">=7.0" + }, + "require-dev": { + "composer/composer": "^1.0", + "phpunit/phpunit": "^6.5 || ^7.0" + }, + "type": "composer-plugin", + "extra": { + "class": "EasyWeChatComposer\\Plugin" + }, + "autoload": { + "psr-4": { + "EasyWeChatComposer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "张铭阳", + "email": "mingyoungcheung@gmail.com" + } + ], + "description": "The composer plugin for EasyWeChat", + "time": "2019-02-22T07:59:50+00:00" + }, + { + "name": "endroid/installer", + "version": "1.1.5", + "source": { + "type": "git", + "url": "https://github.com/endroid/installer.git", + "reference": "d4ae2bbd7977148dcb514ad625ece1a36f751a8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/installer/zipball/d4ae2bbd7977148dcb514ad625ece1a36f751a8b", + "reference": "d4ae2bbd7977148dcb514ad625ece1a36f751a8b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "composer-plugin-api": "^1.1", + "php": ">=7.2" + }, + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "class": "Endroid\\Installer\\Installer" + }, + "autoload": { + "psr-4": { + "Endroid\\Installer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ], + "time": "2019-03-30T21:42:01+00:00" + }, + { + "name": "endroid/qr-code", + "version": "3.6.1", + "source": { + "type": "git", + "url": "https://github.com/endroid/qr-code.git", + "reference": "15641eec67291c6404b612694f65345c84a79919" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/15641eec67291c6404b612694f65345c84a79919", + "reference": "15641eec67291c6404b612694f65345c84a79919", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "endroid/installer": "^1.1.5", + "ext-gd": "*", + "khanamiryan/qrcode-detector-decoder": "^1.0.2", + "myclabs/php-enum": "^1.5", + "php": ">=7.2", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/options-resolver": "^3.4|^4.0", + "symfony/property-access": "^3.4|^4.0" + }, + "require-dev": { + "endroid/test": "^1.1.4" + }, + "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": "2019-05-25T20:13:40+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "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": "2018-04-22T15:46:56+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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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.2", + "source": { + "type": "git", + "url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git", + "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/a75482d3bc804e3f6702332bfda6cccbb0dfaa76", + "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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": "2018-04-26T11:41:33+00:00" + }, + { + "name": "lcobucci/jwt", + "version": "3.3.1", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/jwt.git", + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-mbstring": "*", + "ext-openssl": "*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "mikey179/vfsstream": "~1.5", + "phpmd/phpmd": "~2.2", + "phpunit/php-invoker": "~1.1", + "phpunit/phpunit": "^5.7 || ^7.3", + "squizlabs/php_codesniffer": "~2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Otávio Cobucci Oblonczyk", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ], + "time": "2019-05-24T18:30:49+00:00" + }, + { + "name": "markbaker/complex", + "version": "1.4.7", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ], + "time": "2018-10-13T23:28:42+00:00" + }, + { + "name": "markbaker/matrix", + "version": "1.1.4", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "6ea97472b5baf12119b4f31f802835b820dd6d64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/6ea97472b5baf12119b4f31f802835b820dd6d64", + "reference": "6ea97472b5baf12119b4f31f802835b820dd6d64", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ], + "time": "2018-11-04T22:12:12+00:00" + }, + { + "name": "monolog/monolog", + "version": "1.24.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "time": "2018-11-05T09:00:11+00:00" + }, + { + "name": "myclabs/php-enum", + "version": "1.7.2", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "45f01adf6922df6082bcda36619deb466e826acf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/45f01adf6922df6082bcda36619deb466e826acf", + "reference": "45f01adf6922df6082bcda36619deb466e826acf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.7|^6.0", + "squizlabs/php_codesniffer": "1.*" + }, + "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": "2019-08-19T13:53:00+00:00" + }, + { + "name": "overtrue/easy-sms", + "version": "1.1.15", + "source": { + "type": "git", + "url": "https://github.com/overtrue/easy-sms.git", + "reference": "b2e7d5bbafb68c27bb767a4ea7c7742b358fcc71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/overtrue/easy-sms/zipball/b2e7d5bbafb68c27bb767a4ea7c7742b358fcc71", + "reference": "b2e7d5bbafb68c27bb767a4ea7c7742b358fcc71", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/guzzle": "^6.2", + "php": ">=5.6" + }, + "require-dev": { + "mockery/mockery": "1.2.2", + "phpunit/phpunit": "^5.7 || ^7.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "Overtrue\\EasySms\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "overtrue", + "email": "i@overtrue.me" + } + ], + "description": "The easiest way to send short message.", + "time": "2019-08-01T10:35:17+00:00" + }, + { + "name": "overtrue/socialite", + "version": "2.0.11", + "source": { + "type": "git", + "url": "https://github.com/overtrue/socialite.git", + "reference": "cfc513bbf5fb8c1761e8127eb9427ab05cb4ea10" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/overtrue/socialite/zipball/cfc513bbf5fb8c1761e8127eb9427ab05cb4ea10", + "reference": "cfc513bbf5fb8c1761e8127eb9427ab05cb4ea10", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/guzzle": "~5.0|~6.0", + "php": ">=7.0", + "symfony/http-foundation": "^2.7|^3.0|^4.0" + }, + "require-dev": { + "mockery/mockery": "~1.2", + "phpunit/phpunit": "~6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Overtrue\\Socialite\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ], + "description": "A collection of OAuth 2 packages that extracts from laravel/socialite.", + "keywords": [ + "login", + "oauth", + "qq", + "social", + "wechat", + "weibo" + ], + "time": "2019-07-05T14:42:52+00:00" + }, + { + "name": "overtrue/wechat", + "version": "4.2.2", + "source": { + "type": "git", + "url": "https://github.com/overtrue/wechat.git", + "reference": "e487edc44f9a3d26603bc3c153c087dd2cacd0b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/overtrue/wechat/zipball/e487edc44f9a3d26603bc3c153c087dd2cacd0b0", + "reference": "e487edc44f9a3d26603bc3c153c087dd2cacd0b0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "easywechat-composer/easywechat-composer": "^1.1", + "ext-fileinfo": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.2", + "monolog/monolog": "^1.22", + "overtrue/socialite": "~2.0", + "php": ">=7.1", + "pimple/pimple": "^3.0", + "psr/simple-cache": "^1.0", + "symfony/cache": "^3.3 || ^4.3", + "symfony/event-dispatcher": "^4.3", + "symfony/http-foundation": "^2.7 || ^3.0 || ^4.0", + "symfony/psr-http-message-bridge": "^0.3 || ^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.15", + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.0", + "phpstan/phpstan": "^0.11.12", + "phpunit/phpunit": "~6.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "EasyWeChat\\": "src/" + }, + "files": [ + "src/Kernel/Support/Helpers.php", + "src/Kernel/Helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ], + "description": "微信SDK", + "keywords": [ + "sdk", + "wechat", + "weixin", + "weixin-sdk" + ], + "time": "2019-08-16T10:24:45+00:00" + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.0.7", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "0c41a36d4508d470e376498c1c0c527aa36a2d59" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/0c41a36d4508d470e376498c1c0c527aa36a2d59", + "reference": "0c41a36d4508d470e376498c1c0c527aa36a2d59", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "doctrine/annotations": "1.2.*", + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3", + "zendframework/zend-serializer": "2.7.*" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "type": "library", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "time": "2019-02-01T15:04:28+00:00" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.9.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "8dea03eaf60a349b6097e4bcad11f894668280df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/8dea03eaf60a349b6097e4bcad11f894668280df", + "reference": "8dea03eaf60a349b6097e4bcad11f894668280df", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "markbaker/complex": "^1.4", + "markbaker/matrix": "^1.1", + "php": "^7.1", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.0", + "friendsofphp/php-cs-fixer": "@stable", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^7.0.0", + "phpcompatibility/php-compatibility": "^8.0", + "phpunit/phpunit": "^7.5", + "squizlabs/php_codesniffer": "^3.3", + "tecnickcom/tcpdf": "^6.2" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "type": "library", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ], + "time": "2019-08-17T22:24:35+00:00" + }, + { + "name": "pimple/pimple", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ], + "time": "2018-01-21T07:42:36+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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.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": "2018-11-20T15:27:04+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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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": "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "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/cache", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "1d8f7fee990c586f275cde1a9fc883d6b1e2d43e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/1d8f7fee990c586f275cde1a9fc883d6b1e2d43e", + "reference": "1d8f7fee990c586f275cde1a9fc883d6b1e2d43e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "symfony/cache-contracts": "^1.1", + "symfony/service-contracts": "^1.1", + "symfony/var-exporter": "^4.2" + }, + "conflict": { + "doctrine/dbal": "<2.5", + "symfony/dependency-injection": "<3.4", + "symfony/var-dumper": "<3.4" + }, + "provide": { + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0", + "symfony/cache-implementation": "1.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.5", + "predis/predis": "~1.1", + "psr/simple-cache": "^1.0", + "symfony/config": "~4.2", + "symfony/dependency-injection": "~3.4|~4.1", + "symfony/var-dumper": "^4.1.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 Cache component with PSR-6, PSR-16, and tags", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "time": "2019-08-26T08:26:39+00:00" + }, + { + "name": "symfony/cache-contracts", + "version": "v1.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "ec5524b669744b5f1dc9c66d3c2b091eb7e7f0db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/ec5524b669744b5f1dc9c66d3c2b091eb7e7f0db", + "reference": "ec5524b669744b5f1dc9c66d3c2b091eb7e7f0db", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "psr/cache": "^1.0" + }, + "suggest": { + "symfony/cache-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Cache\\": "" + } + }, + "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": "Generic abstractions related to caching", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-06-13T11:15:36+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/event-dispatcher-contracts": "^1.1" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/service-contracts": "^1.1", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "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 EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2019-08-26T08:55:16+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v1.1.5", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "c61766f4440ca687de1084a5c00b08e167a2575c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c", + "reference": "c61766f4440ca687de1084a5c00b08e167a2575c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "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": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-06-20T06:46:26+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d804bea118ff340a12e22a79f9c7e7eb56b35adc", + "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/mime": "^4.3", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/expression-language": "~3.4|~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "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": "2019-08-26T08:55:16+00:00" + }, + { + "name": "symfony/inflector", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/inflector.git", + "reference": "b25a8dc15fada858432efa083c1ecd2cef5991a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/inflector/zipball/b25a8dc15fada858432efa083c1ecd2cef5991a7", + "reference": "b25a8dc15fada858432efa083c1ecd2cef5991a7", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Inflector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Inflector Component", + "homepage": "https://symfony.com", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string", + "symfony", + "words" + ], + "time": "2019-08-06T18:44:23+00:00" + }, + { + "name": "symfony/mime", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "987a05df1c6ac259b34008b932551353f4f408df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/987a05df1c6ac259b34008b932551353f4f408df", + "reference": "987a05df1c6ac259b34008b932551353f4f408df", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10", + "symfony/dependency-injection": "~3.4|^4.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "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": "2019-08-22T08:16:11+00:00" + }, + { + "name": "symfony/options-resolver", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "81c2e120522a42f623233968244baebd6b36cb6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/81c2e120522a42f623233968244baebd6b36cb6a", + "reference": "81c2e120522a42f623233968244baebd6b36cb6a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "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 OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "time": "2019-08-08T09:29:19+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", + "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.9" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-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": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.12.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "04ce3335667451138df4307d6a9b61565560199e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e", + "reference": "04ce3335667451138df4307d6a9b61565560199e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-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": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/property-access", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-access.git", + "reference": "bb0c302375ffeef60c31e72a4539611b7f787565" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-access/zipball/bb0c302375ffeef60c31e72a4539611b7f787565", + "reference": "bb0c302375ffeef60c31e72a4539611b7f787565", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/inflector": "~3.4|~4.0" + }, + "require-dev": { + "symfony/cache": "~3.4|~4.0" + }, + "suggest": { + "psr/cache-implementation": "To cache access methods." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyAccess\\": "" + }, + "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 PropertyAccess Component", + "homepage": "https://symfony.com", + "keywords": [ + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property path", + "reflection" + ], + "time": "2019-08-26T08:26:39+00:00" + }, + { + "name": "symfony/psr-http-message-bridge", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/psr-http-message-bridge.git", + "reference": "9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad", + "reference": "9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1", + "psr/http-message": "^1.0", + "symfony/http-foundation": "^3.4 || ^4.0" + }, + "require-dev": { + "nyholm/psr7": "^1.1", + "symfony/phpunit-bridge": "^3.4.20 || ^4.0", + "zendframework/zend-diactoros": "^1.4.1 || ^2.0" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\PsrHttpMessage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "PSR HTTP message bridge", + "homepage": "http://symfony.com", + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ], + "time": "2019-03-11T18:22:33+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v1.1.6", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "time": "2019-08-20T14:44:19+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v4.3.4", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "d5b4e2d334c1d80e42876c7d489896cfd37562f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/d5b4e2d334c1d80e42876c7d489896cfd37562f2", + "reference": "d5b4e2d334c1d80e42876c7d489896cfd37562f2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "symfony/var-dumper": "^4.1.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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": "A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "serialize" + ], + "time": "2019-08-22T07:33:08+00:00" + }, + { + "name": "topthink/framework", + "version": "v5.1.38.1", + "source": { + "type": "git", + "url": "https://github.com/top-think/framework.git", + "reference": "12d15c29d5d6a972fc8bfc8db005d64d4786028c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/framework/zipball/12d15c29d5d6a972fc8bfc8db005d64d4786028c", + "reference": "12d15c29d5d6a972fc8bfc8db005d64d4786028c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6.0", + "topthink/think-installer": "2.*" + }, + "require-dev": { + "johnkary/phpunit-speedtrap": "^1.0", + "mikey179/vfsstream": "~1.6", + "phpdocumentor/reflection-docblock": "^2.0", + "phploc/phploc": "2.*", + "phpunit/phpunit": "^5.0|^6.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "2.*" + }, + "type": "think-framework", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + }, + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "description": "the new thinkphp framework", + "homepage": "http://thinkphp.cn/", + "keywords": [ + "framework", + "orm", + "thinkphp" + ], + "time": "2019-08-12T00:58:30+00:00" + }, + { + "name": "topthink/think-captcha", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-captcha.git", + "reference": "54c8a51552f99ff9ea89ea9c272383a8f738ceee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-captcha/zipball/54c8a51552f99ff9ea89ea9c272383a8f738ceee", + "reference": "54c8a51552f99ff9ea89ea9c272383a8f738ceee", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "topthink/framework": "5.1.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "think\\captcha\\": "src/" + }, + "files": [ + "src/helper.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "description": "captcha package for thinkphp5", + "time": "2017-12-31T16:37:49+00:00" + }, + { + "name": "topthink/think-installer", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-installer.git", + "reference": "f5400a12c60e513911aef41fe443fa6920952675" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-installer/zipball/f5400a12c60e513911aef41fe443fa6920952675", + "reference": "f5400a12c60e513911aef41fe443fa6920952675", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "composer-plugin-api": "^1.0" + }, + "require-dev": { + "composer/composer": "1.0.*@dev" + }, + "type": "composer-plugin", + "extra": { + "class": "think\\composer\\Plugin" + }, + "autoload": { + "psr-4": { + "think\\composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "time": "2018-05-11T06:45:42+00:00" + }, + { + "name": "topthink/think-migration", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-migration.git", + "reference": "70c89850ca29c2eab988c7c3475d1d5331901bb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-migration/zipball/70c89850ca29c2eab988c7c3475d1d5331901bb8", + "reference": "70c89850ca29c2eab988c7c3475d1d5331901bb8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "topthink/framework": "5.1.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Phinx\\": "phinx/src/Phinx", + "think\\migration\\": "src" + }, + "files": [ + "src/config.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "time": "2017-12-31T16:32:22+00:00" + }, + { + "name": "yupoxiong/region", + "version": "v1.1.2", + "source": { + "type": "git", + "url": "https://github.com/yupoxiong/region.git", + "reference": "13b241809f259bfd30444ab069d3028a7dd28160" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yupoxiong/region/zipball/13b241809f259bfd30444ab069d3028a7dd28160", + "reference": "13b241809f259bfd30444ab069d3028a7dd28160", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "autoload": { + "psr-4": { + "yupoxiong\\region\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yupoxiong", + "email": "i@yufuping.com", + "homepage": "https://www.yufuping.com" + } + ], + "description": "ThinkPHP省市区(县)街道四级联动扩展", + "homepage": "https://github.com/yupoxiong/region", + "keywords": [ + "region", + "thinkphp", + "省市区" + ], + "time": "2019-08-07T03:15:09+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": ">=5.6.0" + }, + "platform-dev": [] +} diff --git a/config/admin/admin.php b/config/admin/admin.php new file mode 100755 index 0000000..2194e8f --- /dev/null +++ b/config/admin/admin.php @@ -0,0 +1,32 @@ + + * @date 2020/06/19 + */ + +return [ + //后台名称 + 'name' => '后台管理系统', + //后台名称简称 + 'short_name' => '后台', + //后台作者 + 'author' => '寄卖', + //后台版本 + 'version' => '0.1', + //超级管理员默认密码警告 + 'password_warning' => true, + //首页欢迎信息 + 'welcome_info' => true, + + //登录配置 + 'login' => [ + //开启token验证 + 'token' => true, + //验证码选项:false/0不开启验证码,1ThinkPHP图形验证码,2极验点击滑动验证码 + 'captcha' => 0, + //登录背景,false为不需要背景,填写背景地址则为显示 + 'background' => '/static/admin/images/background.jpg', + + ] +]; \ No newline at end of file diff --git a/config/admin/app.php b/config/admin/app.php new file mode 100755 index 0000000..4e1e044 --- /dev/null +++ b/config/admin/app.php @@ -0,0 +1,19 @@ + + * @date 2020/06/19 + */ + +return [ + 'default_ajax_return' => 'html', + + // 默认跳转页面对应的模板文件 + //'dispatch_success_tmpl' => Env::get('app_path') . 'admin/view/template/success.html', + //'dispatch_error_tmpl' => Env::get('app_path') . 'admin/view/template/error.html', + + // 异常页面的模板文件 + //'exception_tmpl' => Env::get('think_path') . 'tpl/think_exception.tpl', + + // 错误显示信息,非调试模式有效 + 'error_message' => '系统繁忙!请稍后再试~', +]; \ No newline at end of file diff --git a/config/admin/paginate.php b/config/admin/paginate.php new file mode 100755 index 0000000..1cc6ce7 --- /dev/null +++ b/config/admin/paginate.php @@ -0,0 +1,12 @@ + + * @date 2020/06/19 + */ + +//分页配置 +return [ + 'type' => '\tools\BearPage', + 'var_page' => 'page', + 'list_rows' => 10, +]; \ No newline at end of file diff --git a/config/admin/template.php b/config/admin/template.php new file mode 100755 index 0000000..cc9ef5d --- /dev/null +++ b/config/admin/template.php @@ -0,0 +1,19 @@ + + * @date 2020/06/19 + */ +return [ + + //模版内标签替换 + 'tpl_replace_string' => [ + '__ADMIN_STATIC__' => '/static/admin', + '__ADMIN_JS__' => '/static/admin/js', + '__ADMIN_CSS__' => '/static/admin/css', + '__ADMIN_FONTS__' => '/static/admin/fonts', + '__ADMIN_IMAGES__' => '/static/admin/images', + '__ADMIN_PLUGINS__' => '/static/admin/plugins', + ] + +]; diff --git a/config/api.php b/config/api.php new file mode 100755 index 0000000..29e08da --- /dev/null +++ b/config/api.php @@ -0,0 +1,22 @@ + + * @date 2020/06/19 + */ + +return [ + //api跨域设置 + 'cross_domain' => [ + //是否允许跨域 + 'allow' => true, + //header设置 + 'header' => [ + 'Access-Control-Allow-Origin' => '*', + 'Access-Control-Allow-Methods' => '*', + 'Access-Control-Allow-Headers' => 'content-type,token', + 'Access-Control-Request-Headers' => 'Origin, content-Type, Accept, token', + ], + + ], +]; diff --git a/config/api/jwt.php b/config/api/jwt.php new file mode 100755 index 0000000..6bdc214 --- /dev/null +++ b/config/api/jwt.php @@ -0,0 +1,19 @@ + 'token', + //token加密使用的secret + 'secret' => '552ac90778a976c72f7f673db174df30', + //颁发者 + 'iss' => 'iss', + //使用者 + 'aud' => 'aud', + //过期时间,以秒为单位,默认2小时 + 'ttl' => 30*60*60*24, + //刷新时间,以秒为单位,默认14天,以 + 'refresh_ttl' => 1209600, + //是否自动刷新,开启后可自动刷新token,附在header中返回,name为`Authorization`,字段为`Bearer `+$token + 'auto_refresh' => true, + //黑名单宽限期,以秒为单位,首次token刷新之后在此时间内原token可以继续访问 + 'blacklist_grace_period' => 60 +]; \ No newline at end of file diff --git a/config/app.php b/config/app.php new file mode 100755 index 0000000..634a585 --- /dev/null +++ b/config/app.php @@ -0,0 +1,155 @@ + +// +---------------------------------------------------------------------- + +// +---------------------------------------------------------------------- +// | 应用设置 +// +---------------------------------------------------------------------- + +return [ + // 应用名称 + 'app_name' => 'AdminDemo', + // 应用地址 + 'app_host' => 'https://admindemo.yupoxiong.com', + // 应用调试模式 + 'app_debug' => true, + // 应用Trace + 'app_trace' => false, + // 是否支持多模块 + 'app_multi_module' => true, + // 入口自动绑定模块 + 'auto_bind_module' => false, + // 注册的根命名空间 + 'root_namespace' => [], + // 默认输出类型 + 'default_return_type' => 'html', + // 默认AJAX 数据返回格式,可选json xml ... + 'default_ajax_return' => 'json', + // 默认JSONP格式返回的处理方法 + 'default_jsonp_handler' => 'jsonpReturn', + // 默认JSONP处理方法 + 'var_jsonp_handler' => 'callback', + // 默认时区 + 'default_timezone' => 'Asia/Shanghai', + // 是否开启多语言 + 'lang_switch_on' => false, + // 默认全局过滤方法 用逗号分隔多个 + 'default_filter' => '', + // 默认语言 + 'default_lang' => 'zh-cn', + // 应用类库后缀 + 'class_suffix' => false, + // 控制器类后缀 + 'controller_suffix' => 'Controller', + + // +---------------------------------------------------------------------- + // | 模块设置 + // +---------------------------------------------------------------------- + + // 默认模块名 + 'default_module' => 'index', + // 禁止访问模块 + 'deny_module_list' => ['common'], + // 默认控制器名 + 'default_controller' => 'Index', + // 默认操作名 + 'default_action' => 'index', + // 默认验证器 + 'default_validate' => '', + // 默认的空模块名 + 'empty_module' => '', + // 默认的空控制器名 + 'empty_controller' => 'Error', + // 操作方法前缀 + 'use_action_prefix' => false, + // 操作方法后缀 + 'action_suffix' => '', + // 自动搜索控制器 + 'controller_auto_search' => false, + + // +---------------------------------------------------------------------- + // | URL设置 + // +---------------------------------------------------------------------- + + // PATHINFO变量名 用于兼容模式 + 'var_pathinfo' => 's', + // 兼容PATH_INFO获取 + 'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'], + // pathinfo分隔符 + 'pathinfo_depr' => '/', + // HTTPS代理标识 + 'https_agent_name' => '', + // IP代理获取标识 + 'http_agent_ip' => 'X-REAL-IP', + // URL伪静态后缀 + 'url_html_suffix' => 'html', + // URL普通方式参数 用于自动生成 + 'url_common_param' => false, + // URL参数方式 0 按名称成对解析 1 按顺序解析 + 'url_param_type' => 0, + // 是否开启路由延迟解析 + 'url_lazy_route' => true, + // 是否强制使用路由 + 'url_route_must' => false, + // 合并路由规则 + 'route_rule_merge' => false, + // 路由是否完全匹配 + 'route_complete_match' => false, + // 使用注解路由 + 'route_annotation' => false, + // 域名根,如thinkphp.cn + 'url_domain_root' => '', + // 是否自动转换URL中的控制器和操作名 + 'url_convert' => true, + // 默认的访问控制器层 + 'url_controller_layer' => 'controller', + // 表单请求类型伪装变量 + 'var_method' => '_method', + // 表单ajax伪装变量 + 'var_ajax' => '_ajax', + // 表单pjax伪装变量 + 'var_pjax' => '_pjax', + // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 + 'request_cache' => false, + // 请求缓存有效期 + 'request_cache_expire' => null, + // 全局请求缓存排除规则 + 'request_cache_except' => [], + // 是否开启路由缓存 + 'route_check_cache' => false, + // 路由缓存的Key自定义设置(闭包),默认为当前URL和请求类型的md5 + 'route_check_cache_key' => '', + // 路由缓存类型及参数 + 'route_cache_option' => [], + + // 默认跳转页面对应的模板文件 + 'dispatch_success_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl', + 'dispatch_error_tmpl' => Env::get('think_path') . 'tpl/dispatch_jump.tpl', + + // 异常页面的模板文件 + 'exception_tmpl' => Env::get('think_path') . 'tpl/think_exception.tpl', + + // 错误显示信息,非调试模式有效 + 'error_message' => '页面错误!请稍后再试~', + // 显示错误信息 + 'show_error_msg' => false, + // 异常处理handle类 留空使用 \think\exception\Handle + 'exception_handle' => '\\app\\common\\exception\\Http', + //程序加密密码,默认为`Taoqi,I love you.`的md5 + 'app_key' => '51971d1dce6bd74b2b6117b06fa5aaf1', + + 'http_exception_template' => [ + // 定义404错误的模板文件地址 + 404 => Env::get('app_path') . 'public/404.html', + // 还可以定义其它的HTTP status + //401 => Env::get('app_path') . '401.html', + ], + +]; diff --git a/config/attachment.php b/config/attachment.php new file mode 100755 index 0000000..c3b5c91 --- /dev/null +++ b/config/attachment.php @@ -0,0 +1,17 @@ + + */ + +return [ + 'thumb_path'=>'/static/attachment/thumbnail/', + 'path' => app()->getRootPath() . 'public/uploads/attachment/', //上传目录配置(相对于根目录) + 'url' => '/uploads/attachment/', //url(相对于web目录) + 'validate' => [ + //默认不超过50mb(52428800) + 'size' => 10240, //demo改成了不超过10k + //常用后缀 + 'ext' => 'bmp,ico,psd,jpg,jpeg,png,gif,doc,docx,xls,xlsx,pdf,zip,rar,7z,tz,mp3,mp4,mov,swf,flv,avi,mpg,ogg,wav,flac,ape', + ], +]; \ No newline at end of file diff --git a/config/cache.php b/config/cache.php new file mode 100755 index 0000000..985dbb1 --- /dev/null +++ b/config/cache.php @@ -0,0 +1,25 @@ + +// +---------------------------------------------------------------------- + +// +---------------------------------------------------------------------- +// | 缓存设置 +// +---------------------------------------------------------------------- + +return [ + // 驱动方式 + 'type' => 'File', + // 缓存保存目录 + 'path' => '', + // 缓存前缀 + 'prefix' => '', + // 缓存有效期 0表示永久缓存 + 'expire' => 0, +]; diff --git a/config/console.php b/config/console.php new file mode 100755 index 0000000..a7fabca --- /dev/null +++ b/config/console.php @@ -0,0 +1,20 @@ + +// +---------------------------------------------------------------------- + +// +---------------------------------------------------------------------- +// | 控制台配置 +// +---------------------------------------------------------------------- +return [ + 'name' => 'Think Console', + 'version' => '0.1', + 'user' => null, + 'auto_path' => env('app_path') . 'command' . DIRECTORY_SEPARATOR, +]; diff --git a/config/cookie.php b/config/cookie.php new file mode 100755 index 0000000..626be69 --- /dev/null +++ b/config/cookie.php @@ -0,0 +1,30 @@ + +// +---------------------------------------------------------------------- + +// +---------------------------------------------------------------------- +// | Cookie设置 +// +---------------------------------------------------------------------- +return [ + // cookie 名称前缀 + 'prefix' => '', + // cookie 保存时间 + 'expire' => 5201314, + // cookie 保存路径 + 'path' => '/', + // cookie 有效域名 + 'domain' => '', + // cookie 启用安全传输 + 'secure' => false, + // httponly设置 + 'httponly' => '', + // 是否使用 setcookie + 'setcookie' => true, +]; diff --git a/config/database.php b/config/database.php new file mode 100755 index 0000000..2b9ed8a --- /dev/null +++ b/config/database.php @@ -0,0 +1,63 @@ + +// +---------------------------------------------------------------------- + +return [ + // 数据库类型 + 'type' => 'mysql', + // 服务器地址 + 'hostname' => '114.215.82.135', + // 数据库名 + 'database' => 'dgg_jimai', + // 用户名 + 'username' => 'dgg_jimai', + // 密码 + 'password' => 'dgg_jimai@028', + // 端口 + 'hostport' => '3306', + // 连接dsn + 'dsn' => '', + // 数据库连接参数 + 'params' => [], + // 数据库编码默认采用utf8 + 'charset' => 'utf8mb4', + // 数据库表前缀 + 'prefix' => '', + // 数据库调试模式 + 'debug' => true, + // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) + 'deploy' => 0, + // 数据库读写是否分离 主从式有效 + 'rw_separate' => false, + // 读写分离后 主服务器数量 + 'master_num' => 1, + // 指定从服务器序号 + 'slave_no' => '', + // 自动读取主库数据 + 'read_master' => false, + // 是否严格检查字段是否存在 + 'fields_strict' => true, + // 数据集返回类型 + 'resultset_type' => 'array', + // 自动写入时间戳字段 + 'auto_timestamp' => false, + // 时间字段取出后的默认时间格式 + 'datetime_format' => 'Y-m-d H:i:s', + // 是否需要进行SQL性能分析 + 'sql_explain' => false, + // Builder类 + 'builder' => '', + // Query类 + 'query' => '\\think\\db\\Query', + // 是否需要断线重连 + 'break_reconnect' => false, + // 断线标识字符串 + 'break_match_str' => [], +]; diff --git a/config/email.php b/config/email.php new file mode 100755 index 0000000..f6de24c --- /dev/null +++ b/config/email.php @@ -0,0 +1,24 @@ + + * @date 2020/06/19 + */ +return [ + 'smtp'=>[ + //host + 'host'=>'smtp.163.com', + //用户名 + 'username'=>'XXXXxxxxx0@163.com', + //密码/授权码 + 'password'=>'xxxxxx', + //tls或ssl + 'smtp_secure'=>'ssl', + //端口 + 'port'=>465, + //发件地址 + 'address'=>'xxxxxx@163.com', + //发件人 + 'name'=>'发件人名字', + ] +]; \ No newline at end of file diff --git a/config/geetest.php b/config/geetest.php new file mode 100755 index 0000000..5b2c2b5 --- /dev/null +++ b/config/geetest.php @@ -0,0 +1,12 @@ + + * @date 2020/06/19 + */ +return [ + //请把ID和KEY换成自己的 + 'id'=>'ed2e0eb9b8d871c64088b49f4a2054bc', + //一定要换成自己的 + 'key'=>'c84ff2e2b64d6c9126e15846ecffabbd', +]; \ No newline at end of file diff --git a/config/generate.php b/config/generate.php new file mode 100755 index 0000000..086380e --- /dev/null +++ b/config/generate.php @@ -0,0 +1,33 @@ + + * @date 2020/06/19 + */ + +return [ + //模版目录 + 'template' => [ + 'path' => Env::get('root_path') . 'extend/generate/stub/', + 'controller' => Env::get('root_path') . 'extend/generate/stub/Controller.stub', + 'model' => Env::get('root_path') . 'extend/generate/stub/Model.stub', + 'validate' => Env::get('root_path') . 'extend/generate/stub/Validate.stub', + 'view' => [ + 'index' => Env::get('root_path') . 'extend/generate/stub/view/index.stub', + 'index_del1' => Env::get('root_path') . 'extend/generate/stub/view/index/del1.stub', + 'index_del2' => Env::get('root_path') . 'extend/generate/stub/view/index/del2.stub', + 'index_filter' => Env::get('root_path') . 'extend/generate/stub/view/index/filter.stub', + 'index_export' => Env::get('root_path') . 'extend/generate/stub/view/index/export.stub', + 'index_select1' => Env::get('root_path') . 'extend/generate/stub/view/index/select1.stub', + 'index_select2' => Env::get('root_path') . 'extend/generate/stub/view/index/select2.stub', + 'add' => Env::get('root_path') . 'extend/generate/stub/view/add.stub', + ], + ], + //生成文件目录 + 'file_dir' => [ + 'controller' => Env::get('app_path') . 'admin/controller/', + 'model' => Env::get('app_path') . 'common/model/', + 'validate' => Env::get('app_path') . 'common/validate/', + 'view' => Env::get('app_path') . 'admin/view/', + ], +]; \ No newline at end of file diff --git a/config/index/template.php b/config/index/template.php new file mode 100755 index 0000000..1f628d9 --- /dev/null +++ b/config/index/template.php @@ -0,0 +1,17 @@ + [ + '__STATIC__' => '/static/index', + '__JS__' => '/static/index/js', + '__CSS__' => '/static/index/css', + '__FONTS__' => '/static/index/fonts', + '__IMAGES__' => '/static/index/images', + '__PLUGINS__' => '/static/index/plugins', + ] + +]; diff --git a/config/log.php b/config/log.php new file mode 100755 index 0000000..b3d87b4 --- /dev/null +++ b/config/log.php @@ -0,0 +1,30 @@ + +// +---------------------------------------------------------------------- + +// +---------------------------------------------------------------------- +// | 日志设置 +// +---------------------------------------------------------------------- +return [ + // 日志记录方式,内置 file socket 支持扩展 + 'type' => 'File', + // 日志保存目录 + 'path' => '', + // 日志记录级别 + 'level' => [], + // 单文件日志写入 + 'single' => false, + // 独立日志级别 + 'apart_level' => [], + // 最大日志文件数量 + 'max_files' => 0, + // 是否关闭日志写入 + 'close' => false, +]; diff --git a/config/middleware.php b/config/middleware.php new file mode 100755 index 0000000..fe15ec3 --- /dev/null +++ b/config/middleware.php @@ -0,0 +1,18 @@ + +// +---------------------------------------------------------------------- + +// +---------------------------------------------------------------------- +// | 中间件配置 +// +---------------------------------------------------------------------- +return [ + // 默认中间件命名空间 + 'default_namespace' => 'app\\http\\middleware\\', +]; diff --git a/config/session.php b/config/session.php new file mode 100755 index 0000000..96ce03e --- /dev/null +++ b/config/session.php @@ -0,0 +1,26 @@ + +// +---------------------------------------------------------------------- + +// +---------------------------------------------------------------------- +// | 会话设置 +// +---------------------------------------------------------------------- + +return [ + 'id' => '', + // SESSION_ID的提交变量,解决flash上传跨域 + 'var_session_id' => '', + // SESSION 前缀 + 'prefix' => '', + // 驱动方式 支持redis memcache memcached + 'type' => '', + // 是否自动开启 SESSION + 'auto_start' => true, +]; diff --git a/config/sms.php b/config/sms.php new file mode 100755 index 0000000..aa0e1b5 --- /dev/null +++ b/config/sms.php @@ -0,0 +1,36 @@ + + * @date 2020/06/19 + */ +return [ + // HTTP 请求的超时时间(秒) + 'timeout' => 5.0, + + // 默认发送配置 + 'default' => [ + // 网关调用策略,默认:顺序调用 + 'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class, + + // 默认可用的发送网关 + 'gateways' => [ + 'yunpian', 'aliyun', + ], + ], + // 可用的网关配置 + 'gateways' => [ + 'errorlog' => [ + 'file' => app()->getRuntimePath().'sms/easy-sms.log', + ], + 'aliyun' => [ + 'access_key_id' => 'xxxxxxxxxx', + 'access_key_secret' => 'xxxxxxxxxx', + 'sign_name' => 'xxxxxxxxxx', + ], + 'yunpian' => [ + 'api_key' => 'xxxxxxxxxx', + ], + //... + ], +]; \ No newline at end of file diff --git a/config/template.php b/config/template.php new file mode 100755 index 0000000..299bd6f --- /dev/null +++ b/config/template.php @@ -0,0 +1,35 @@ + +// +---------------------------------------------------------------------- + +// +---------------------------------------------------------------------- +// | 模板设置 +// +---------------------------------------------------------------------- + +return [ + // 模板引擎类型 支持 php think 支持扩展 + 'type' => 'Think', + // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 3 保持操作方法 + 'auto_rule' => 1, + // 模板路径 + 'view_path' => '', + // 模板后缀 + 'view_suffix' => 'html', + // 模板文件名分隔符 + 'view_depr' => DIRECTORY_SEPARATOR, + // 模板引擎普通标签开始标记 + 'tpl_begin' => '{', + // 模板引擎普通标签结束标记 + 'tpl_end' => '}', + // 标签库标签开始标记 + 'taglib_begin' => '{', + // 标签库标签结束标记 + 'taglib_end' => '}', +]; diff --git a/config/trace.php b/config/trace.php new file mode 100755 index 0000000..425d301 --- /dev/null +++ b/config/trace.php @@ -0,0 +1,18 @@ + +// +---------------------------------------------------------------------- + +// +---------------------------------------------------------------------- +// | Trace设置 开启 app_trace 后 有效 +// +---------------------------------------------------------------------- +return [ + // 内置Html Console 支持扩展 + 'type' => 'Html', +]; diff --git a/config/ueditor.php b/config/ueditor.php new file mode 100755 index 0000000..45e5f3f --- /dev/null +++ b/config/ueditor.php @@ -0,0 +1,86 @@ + + * @date 2020/06/19 + */ + +return [ + + 'imageActionName' => 'uploadimage', + 'imageFieldName' => 'upfile', + 'imageMaxSize' => 20480, //demo改成了20k + 'imageAllowFiles' => [ + '.png', + '.jpg', + '.jpeg', + '.gif', + '.bmp' + ], + 'imageCompressEnable' => true, + 'imageCompressBorder' => 1600, + 'imageInsertAlign' => 'none', + 'imageUrlPrefix' => '',//配置域名 + 'imagePathFormat' => '/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}', + 'scrawlActionName' => 'uploadscrawl', + 'scrawlFieldName' => 'upfile', + 'scrawlPathFormat' => '/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}', + 'scrawlMaxSize' => 20480, + 'scrawlUrlPrefix' => '', + + 'scrawlInsertAlign' => 'none', + 'scrawlAllowFiles' => ['.png', '.jpg', '.jpeg', '.gif', '.bmp',], + 'snapscreenActionName' => 'uploadimage', + 'snapscreenPathFormat' => '/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}', + 'snapscreenUrlPrefix' => '',//配置域名 + 'snapscreenInsertAlign' => 'none', + 'catcherLocalDomain' => ['127.0.0.1', 'localhost', 'img.baidu.com',], + 'catcherActionName' => 'catchimage', + 'catcherFieldName' => 'source', + 'catcherPathFormat' => '/ueditor/php/upload/image/{yyyy}{mm}{dd}/{time}{rand:6}', + 'catcherUrlPrefix' => '', + 'catcherMaxSize' => 20480, + 'catcherAllowFiles' => [ + '.png', '.jpg', '.jpeg', '.gif', '.bmp', + ], + 'videoActionName' => 'uploadvideo', + 'videoFieldName' => 'upfile', + 'videoPathFormat' => '/ueditor/php/upload/video/{yyyy}{mm}{dd}/{time}{rand:6}', + 'videoUrlPrefix' => '',//配置域名 + 'videoMaxSize' => 40960, + 'videoAllowFiles' => [ + '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg', + '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid' + ], + 'fileActionName' => 'uploadfile', + 'fileFieldName' => 'upfile', + 'filePathFormat' => '/ueditor/php/upload/file/{yyyy}{mm}{dd}/{time}{rand:6}', + 'fileUrlPrefix' => '',//配置域名 + 'fileMaxSize' => 10240, + 'fileAllowFiles' => [ + '.png', '.jpg', '.jpeg', '.gif', '.bmp', + '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg', + '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid', + '.rar', '.zip', '.tar', '.gz', '.7z', '.bz2', '.cab', '.iso', + '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.txt', '.md', '.xml' + ], + 'imageManagerActionName' => 'listimage', + 'imageManagerListPath' => '/ueditor/php/upload/image/', + 'imageManagerListSize' => 20, + 'imageManagerUrlPrefix' => '',//配置域名 + 'imageManagerInsertAlign' => 'none', + 'imageManagerAllowFiles' => [ + '.png', '.jpg', '.jpeg', '.gif', '.bmp', + ], + 'fileManagerActionName' => 'listfile', + 'fileManagerListPath' => '/ueditor/php/upload/file/', + 'fileManagerUrlPrefix' => '',//配置域名 + 'fileManagerListSize' => 20, + 'fileManagerAllowFiles' => [ + '.png', '.jpg', '.jpeg', '.gif', '.bmp', + '.flv', '.swf', '.mkv', '.avi', '.rm', '.rmvb', '.mpeg', '.mpg', + '.ogg', '.ogv', '.mov', '.wmv', '.mp4', '.webm', '.mp3', '.wav', '.mid', + '.rar', '.zip', '.tar', '.gz', '.7z', '.bz2', '.cab', '.iso', + '.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.txt', '.md', '.xml' + ] +]; \ No newline at end of file diff --git a/config/wechat.php b/config/wechat.php new file mode 100755 index 0000000..a6afce7 --- /dev/null +++ b/config/wechat.php @@ -0,0 +1,83 @@ + + * @date 2020/06/19 + */ +return [ + /** + * 账号基本信息,请从微信公众平台/开放平台获取 + */ + 'app_id' => 'your-app-id', // AppID + 'secret' => 'your-app-secret', // AppSecret + 'token' => 'your-token', // Token + 'aes_key' => '', // EncodingAESKey,兼容与安全模式下请一定要填写!!! + + + /** + * 微信支付配置 + */ + + 'key' => 'key-for-signature', // API 密钥 + + // 如需使用敏感接口(如退款、发送红包等)需要配置 API 证书路径(登录商户平台下载 API 证书) + 'cert_path' => 'path/to/your/cert.pem', // XXX: 绝对路径!!!! + 'key_path' => 'path/to/your/key', // XXX: 绝对路径!!!! + + 'notify_url' => '默认的订单回调地址', // 你也可以在下单时单独设置来想覆盖它 + /** + * 指定 API 调用返回结果的类型:array(default)/collection/object/raw/自定义类名 + * 使用自定义类名时,构造函数将会接收一个 `EasyWeChat\Kernel\Http\Response` 实例 + */ + 'response_type' => 'array', + /** + * 日志配置 + * + * level: 日志级别, 可选为: + * debug/info/notice/warning/error/critical/alert/emergency + * path:日志文件位置(绝对路径!!!),要求可写权限 + */ + 'log' => [ + 'default' => 'dev', // 默认使用的 channel,生产环境可以改为下面的 prod + 'channels' => [ + // 测试环境 + 'dev' => [ + 'driver' => 'single', + 'path' => '/tmp/easywechat.log', + 'level' => 'debug', + ], + // 生产环境 + 'prod' => [ + 'driver' => 'daily', + 'path' => '/tmp/easywechat.log', + 'level' => 'info', + ], + ], + ], + + /** + * 接口请求相关配置,超时时间等,具体可用参数请参考: + * http://docs.guzzlephp.org/en/stable/request-config.html + * + * - retries: 重试次数,默认 1,指定当 http 请求失败时重试的次数。 + * - retry_delay: 重试延迟间隔(单位:ms),默认 500 + * - log_template: 指定 HTTP 日志模板,请参考:https://github.com/guzzle/guzzle/blob/master/src/MessageFormatter.php + */ + 'http' => [ + 'max_retries' => 1, + 'retry_delay' => 500, + 'timeout' => 5.0, + // 'base_uri' => 'https://api.weixin.qq.com/', // 如果你在国外想要覆盖默认的 url 的时候才使用,根据不同的模块配置不同的 uri + ], + + /** + * OAuth 配置 + * + * scopes:公众平台(snsapi_userinfo / snsapi_base),开放平台:snsapi_login + * callback:OAuth授权完成后的回调页地址 + */ + 'oauth' => [ + 'scopes' => ['snsapi_userinfo'], + 'callback' => '/index/auth/wechat_callback.php', + ], +]; \ No newline at end of file diff --git a/database/migrations/20190302092540_admin_menu.php b/database/migrations/20190302092540_admin_menu.php new file mode 100755 index 0000000..d7a1068 --- /dev/null +++ b/database/migrations/20190302092540_admin_menu.php @@ -0,0 +1,46 @@ + + */ + +use think\Db; +use think\migration\Migrator; +use think\migration\db\Column; + +class AdminMenu extends Migrator +{ + public function change() + { + $table = $this->table('admin_menu', ['comment'=>'后台菜单','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table->addColumn('parent_id', 'integer', ['limit' => 11, 'default' => 0, 'comment' => '父级菜单']) + ->addColumn('name', 'string', ['limit' => 30, 'default' => '', 'comment' => '名称']) + ->addColumn('url', 'string', ['limit' => 100, 'default' => '', 'comment' => 'url']) + ->addColumn('icon', 'string', ['limit' => 30, 'default' => 'fa-list', 'comment' => '图标']) + ->addColumn('is_show', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '等级']) + ->addColumn('sort_id', 'integer', ['limit' => 10, 'default' => '1000', 'comment' => '排序']) + ->addColumn('log_method', 'string', ['limit' => 8, 'default' => '不记录', 'comment' => '记录日志方法']) + ->addIndex(['url'], ['name' => 'index_url']) + ->create(); + $this->insertData(); + } + + protected function insertData() + { + $data = '[{"id":1,"parent_id":0,"name":"后台首页","url":"admin/index/index","icon":"fa-home","is_show":1,"sort_id":99,"log_method":"不记录"},{"id":2,"parent_id":0,"name":"系统管理","url":"admin/sys","icon":"fa-desktop","is_show":1,"sort_id":1099,"log_method":"不记录"},{"id":3,"parent_id":2,"name":"用户管理","url":"admin/admin_user/index","icon":"fa-user","is_show":1,"sort_id":1000,"log_method":"不记录"},{"id":4,"parent_id":3,"name":"添加用户","url":"admin/admin_user/add","icon":"fa-plus","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":5,"parent_id":3,"name":"修改用户","url":"admin/admin_user/edit","icon":"fa-edit","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":6,"parent_id":3,"name":"删除用户","url":"admin/admin_user/del","icon":"fa-close","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":7,"parent_id":2,"name":"角色管理","url":"admin/admin_role/index","icon":"fa-group","is_show":1,"sort_id":1000,"log_method":"不记录"},{"id":8,"parent_id":7,"name":"添加角色","url":"admin/admin_role/add","icon":"fa-plus","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":9,"parent_id":7,"name":"修改角色","url":"admin/admin_role/edit","icon":"fa-edit","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":10,"parent_id":7,"name":"删除角色","url":"admin/admin_role/del","icon":"fa-close","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":11,"parent_id":7,"name":"角色授权","url":"admin/admin_role/access","icon":"fa-key","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":12,"parent_id":2,"name":"菜单管理","url":"admin/admin_menu/index","icon":"fa-align-justify","is_show":1,"sort_id":1000,"log_method":"不记录"},{"id":13,"parent_id":12,"name":"添加菜单","url":"admin/admin_menu/add","icon":"fa-plus","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":14,"parent_id":12,"name":"修改菜单","url":"admin/admin_menu/edit","icon":"fa-edit","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":15,"parent_id":12,"name":"删除菜单","url":"admin/admin_menu/del","icon":"fa-close","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":16,"parent_id":2,"name":"操作日志","url":"admin/admin_log/index","icon":"fa-keyboard-o","is_show":1,"sort_id":1000,"log_method":"不记录"},{"id":17,"parent_id":16,"name":"查看操作日志详情","url":"admin/admin_log/view","icon":"fa-search-plus","is_show":0,"sort_id":1000,"log_method":"不记录"},{"id":18,"parent_id":2,"name":"个人资料","url":"admin/admin_user/profile","icon":"fa-smile-o","is_show":1,"sort_id":1000,"log_method":"POST"},{"id":19,"parent_id":0,"name":"用户管理","url":"admin/user/mange","icon":"fa-users","is_show":1,"sort_id":1000,"log_method":"不记录"},{"id":20,"parent_id":19,"name":"用户管理","url":"admin/user/index","icon":"fa-user","is_show":1,"sort_id":1000,"log_method":"不记录"},{"id":21,"parent_id":20,"name":"添加用户","url":"admin/user/add","icon":"fa-plus","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":22,"parent_id":20,"name":"修改用户","url":"admin/user/edit","icon":"fa-pencil","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":23,"parent_id":20,"name":"删除用户","url":"admin/user/del","icon":"fa-trash","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":24,"parent_id":20,"name":"启用用户","url":"admin/user/enable","icon":"fa-circle","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":25,"parent_id":20,"name":"禁用用户","url":"admin/user/disable","icon":"fa-circle","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":26,"parent_id":19,"name":"用户等级管理","url":"admin/user_level/index","icon":"fa-th-list","is_show":1,"sort_id":1000,"log_method":"不记录"},{"id":27,"parent_id":26,"name":"添加用户等级","url":"admin/user_level/add","icon":"fa-plus","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":28,"parent_id":26,"name":"修改用户等级","url":"admin/user_level/edit","icon":"fa-pencil","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":29,"parent_id":26,"name":"删除用户等级","url":"admin/user_level/del","icon":"fa-trash","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":30,"parent_id":26,"name":"启用用户等级","url":"admin/user_level/enable","icon":"fa-circle","is_show":0,"sort_id":1000,"log_method":"POST"},{"id":31,"parent_id":26,"name":"禁用用户等级","url":"admin/user_level/disable","icon":"fa-circle","is_show":0,"sort_id":1000,"log_method":"POST"}]'; + + $msg = '后台管理菜单导入成功.' . "\n"; + Db::startTrans(); + $data = json_decode($data, true); + try { + foreach ($data as $item) { + \app\admin\model\AdminMenu::create($item); + } + Db::commit(); + } catch (\Exception $e) { + Db::rollback(); + $msg = $e->getMessage(); + } + print ($msg); + } +} diff --git a/database/migrations/20190302094849_admin_user.php b/database/migrations/20190302094849_admin_user.php new file mode 100755 index 0000000..4357141 --- /dev/null +++ b/database/migrations/20190302094849_admin_user.php @@ -0,0 +1,55 @@ + + */ + +use think\Db; +use think\migration\Migrator; +use think\migration\db\Column; + +class AdminUser extends Migrator +{ + public function change() + { + $table = $this->table('admin_user', ['comment'=>'后台用户','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('username', 'string', ['limit' => 30, 'default' => '', 'comment' => '用户名']) + ->addColumn('password', 'string', ['limit' => 255, 'default' => password_hash('_default__password_', 1), 'comment' => '密码']) + ->addColumn('nickname', 'string', ['limit' => 30, 'default' => '', 'comment' => '昵称']) + ->addColumn('avatar', 'string', ['limit' => 255, 'default' => '/static/admin/images/avatar.png', 'comment' => '头像']) + ->addColumn('role', 'string', ['limit' => 200, 'default' => '', 'comment' => '角色']) + ->addColumn('status', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '是否启用']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->addIndex(['username'], ['name' => 'index_username']) + ->create(); + + $this->insertData(); + } + + protected function insertData() + { + $data = [ + [ + 'id' => 1, + 'username' => 'super-admin', + 'nickname' => '超级管理员', + 'password' => 'super-admin', + 'role' => [1] + ] + ]; + + $msg = '超级管理员创建成功.' . "\n" . '用户名:super-admin' . "\n" . '密码:super-admin' . "\n"; + Db::startTrans(); + try { + foreach ($data as $item) { + \app\admin\model\AdminUser::create($item); + } + Db::commit(); + } catch (\Exception $e) { + Db::rollback(); + $msg = $e->getMessage(); + } + print ($msg); + } +} diff --git a/database/migrations/20190302094853_admin_log.php b/database/migrations/20190302094853_admin_log.php new file mode 100755 index 0000000..efa2cd0 --- /dev/null +++ b/database/migrations/20190302094853_admin_log.php @@ -0,0 +1,25 @@ + + */ + +use think\migration\Migrator; +use think\migration\db\Column; + +class AdminLog extends Migrator +{ + public function change() + { + $table = $this->table('admin_log', ['comment'=>'后台操作日志','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('admin_user_id', 'integer', ['limit' => 10, 'comment' => '用户']) + ->addColumn('name', 'string', ['limit' => 30, 'default' => '', 'comment' => '操作']) + ->addColumn('url', 'string', ['limit' => 100, 'default' => '', 'comment' => 'URL']) + ->addColumn('log_method', 'string', ['limit' => 8, 'default' => '不记录', 'comment' => '记录日志方法']) + ->addColumn('log_ip', 'string', ['limit' => 20, 'default' => '', 'comment' => '操作IP']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'comment' => '操作时间']) + ->create(); + + } +} diff --git a/database/migrations/20190302094933_admin_role.php b/database/migrations/20190302094933_admin_role.php new file mode 100755 index 0000000..75a9c8a --- /dev/null +++ b/database/migrations/20190302094933_admin_role.php @@ -0,0 +1,50 @@ + + */ + +use think\Db; +use think\migration\Migrator; +use think\migration\db\Column; + +class AdminRole extends Migrator +{ + public function change() + { + $table = $this->table('admin_role', ['comment'=>'后台角色','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('description', 'string', ['limit' => 100, 'default' => '', 'comment' => '简介']) + ->addColumn('url', 'string', ['limit' => 1000, 'default' => '', 'comment' => '权限']) + ->addColumn('status', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '是否启用']) + ->create(); + $this->insertData(); + } + + protected function insertData() + { + $data = [ + [ + 'id' => 1, + 'name' => '管理员', + 'description' => '后台管理员角色', + 'url' => range(1,31), + 'status' => 1 + ], + ]; + + $msg = '添加管理员角色成功.' . "\n"; + Db::startTrans(); + try { + foreach ($data as $item) { + \app\admin\model\AdminRole::create($item); + } + Db::commit(); + } catch (\Exception $e) { + Db::rollback(); + $msg = $e->getMessage(); + } + print ($msg); + } +} diff --git a/database/migrations/20190312021143_admin_log_data.php b/database/migrations/20190312021143_admin_log_data.php new file mode 100755 index 0000000..7a9e112 --- /dev/null +++ b/database/migrations/20190312021143_admin_log_data.php @@ -0,0 +1,21 @@ + + */ + +use think\migration\Migrator; +use think\migration\db\Column; + +class AdminLogData extends Migrator +{ + public function change() + { + $table = $this->table('admin_log_data', ['comment'=>'后台操作日志数据','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('admin_log_id', 'integer', ['limit' => 11, 'comment' => '日志ID']) + ->addColumn('data', 'text', [ 'comment' => '日志内容']) + ->create(); + + } +} diff --git a/database/migrations/20190518030432_attachment.php b/database/migrations/20190518030432_attachment.php new file mode 100755 index 0000000..3860341 --- /dev/null +++ b/database/migrations/20190518030432_attachment.php @@ -0,0 +1,32 @@ +table('attachment', ['comment' => '附件表', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('admin_user_id', 'integer', ['limit' => 11, 'comment' => '后台用户ID']) + ->addColumn('user_id', 'integer', ['limit' => 11, 'comment' => '前台用户ID']) + ->addColumn('original_name', 'string', ['limit' => 200, 'default' => '', 'comment' => '原文件名']) + ->addColumn('save_name', 'string', ['limit' => 200, 'default' => '', 'comment' => '保存文件名']) + ->addColumn('save_path', 'string', ['limit' => 255, 'default' => '', 'comment' => '系统完整路径']) + ->addColumn('url', 'string', ['limit' => 255, 'default' => '', 'comment' => '系统完整路径']) + ->addColumn('extension', 'string', ['limit' => 100, 'default' => '', 'comment' => '后缀']) + ->addColumn('mime', 'string', ['limit' => 100, 'default' => '', 'comment' => '类型']) + ->addColumn('size', 'biginteger', ['limit' => 21, 'default' => '0', 'comment' => '大小']) + ->addColumn('md5', 'string', ['limit' => 32, 'default' => '', 'comment' => 'MD5']) + ->addColumn('sha1', 'string', ['limit' => 40, 'default' => '', 'comment' => 'SHA1']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190615081122_user.php b/database/migrations/20190615081122_user.php new file mode 100755 index 0000000..88027b2 --- /dev/null +++ b/database/migrations/20190615081122_user.php @@ -0,0 +1,45 @@ +table('user', ['comment' => '用户', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('avatar', 'string', ['limit' => 255, 'default' => '/static/index/images/avatar.png', 'comment' => '头像']) + ->addColumn('username', 'string', ['limit' => 30, 'default' => '', 'comment' => '用户名']) + ->addColumn('nickname', 'string', ['limit' => 30, 'default' => '', 'comment' => '昵称']) + ->addColumn('mobile', 'string', ['limit' => 11, 'default' => '', 'comment' => '手机号']) + ->addColumn('user_level_id', 'integer', ['limit' => 10, 'default' => 1, 'comment' => '用户等级']) + ->addColumn('password', 'string', ['limit' => 255, 'default' => password_hash('_app__pass_', 1), 'comment' => '密码']) + ->addColumn('status', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '是否启用']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + $this->insertData(); + } + + protected function insertData() + { + $data = '[{"id":1,"avatar":"/uploads/attachment/20190822/02fce9aecd6cadf6e019e988ad8703ce.png","user_level_id":2,"username":"test001","mobile":"13000000001","nickname":"测试001","password":"$2y$10$HU5eKkvynPi0iP/eQqSrmuwUMQhDB18QLLNCwtAvc09KKoLuv3I16","status":1},{"id":2,"avatar":"/uploads/attachment/20190822/56644a9f283c058cd371316e186ef48a.png","user_level_id":3,"username":"test002","mobile":"18328374923","nickname":"测试2号会员","password":"$2y$10$HU5eKkvynPi0iP/eQqSrmuwUMQhDB18QLLNCwtAvc09KKoLuv3I16","status":1},{"id":3,"avatar":"/uploads/attachment/20190822/f0a7cd43074283b428b0a33ecfca5f9d.png","user_level_id":4,"username":"测试3号","mobile":"18653165683","nickname":"测试3号","password":"$2y$10$HU5eKkvynPi0iP/eQqSrmuwUMQhDB18QLLNCwtAvc09KKoLuv3I16","status":1},{"id":4,"avatar":"/uploads/attachment/20190822/1771ce624eccb96aad992df540126d3b.png","user_level_id":1,"username":"小女孩","mobile":"13638392923","nickname":"小女孩","password":"$2y$10$HU5eKkvynPi0iP/eQqSrmuwUMQhDB18QLLNCwtAvc09KKoLuv3I16","status":1}]'; + + $msg = '前台测试用户导入成功.' . "\n"; + Db::startTrans(); + $data = json_decode($data, true); + try { + foreach ($data as $item) { + \app\common\model\User::create($item); + } + Db::commit(); + } catch (\Exception $e) { + Db::rollback(); + $msg = $e->getMessage(); + } + print ($msg); + } +} diff --git a/database/migrations/20190807030806_region.php b/database/migrations/20190807030806_region.php new file mode 100755 index 0000000..e834ed8 --- /dev/null +++ b/database/migrations/20190807030806_region.php @@ -0,0 +1,111 @@ +table('region', ['comment' => '省市区表', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $region->addColumn('parent_id', 'integer', ['limit' => 11, 'default' => 0, 'comment' => '父级ID']) + ->addColumn('level', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '等级']) + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('initial', 'string', ['limit' => 50, 'default' => '', 'comment' => '首字母']) + ->addColumn('pinyin', 'string', ['limit' => 255, 'default' => '', 'comment' => '拼音']) + ->addColumn('citycode', 'string', ['limit' => 10, 'default' => '', 'comment' => '城市编码']) + ->addColumn('adcode', 'string', ['limit' => 10, 'default' => '', 'comment' => '区域编码']) + ->addColumn('lng_lat', 'string', ['limit' => 30, 'default' => '', 'comment' => '中心经纬度']) + ->addIndex(['name'], ['name' => 'index_name']) + ->addIndex(['initial'], ['name' => 'index_initial']) + ->addIndex(['pinyin'], ['name' => 'index_pinyin']) + ->addIndex(['name', 'initial', 'pinyin'], ['name' => 'index_name_initial_pinyin']) + ->create(); + $this->insertData(); + + } + + /** + * 插入数据 + */ + public function insertData() + { + print ('正在下载json数据压缩包···' . "\n"); + $online_zip = file_get_contents('http://json.think-region.yupoxiong.com/region.json.zip'); + $zip_file = app()->getRuntimePath() . 'region.json.zip'; + $json_file = app()->getRuntimePath() . 'region.json'; + file_put_contents($zip_file, $online_zip); + + print ('正在解压json数据压缩包···' . "\n"); + $zipArc = new ZipArchive(); + $zipArc->open($zip_file); + $zipArc->extractTo(app()->getRuntimePath()); + $zipArc->close(); + + print ('正在读取json数据···' . "\n"); + $json = file_get_contents($json_file); + $data = json_decode($json, true); + $msg = "\n" . '数据导入成功'; + $total = count($data) + 1; + + print ('正在导入数据···' . "\n"); + Db::startTrans(); + try { + foreach ($data as $key => $value) { + \yupoxiong\region\model\Region::create($value); + $this->showStatus($key + 1, $total, 10); + } + Db::commit(); + } catch (\Exception $e) { + Db::rollback(); + $msg = $e->getMessage(); + } + print ($msg . "\n"); + unset($data); + unlink($zip_file); + unlink($json_file); + } + + /** + * 显示进度 + * @param $done + * @param $total + * @param int $size + */ + protected function showStatus($done, $total, $size = 20) + { + static $start_time; + if ($done > $total) return; + if (empty($start_time)) $start_time = time(); + $now = time(); + $percent = (double)($done / $total); + $bar = floor($percent * $size); + $status_bar = "\r["; + $status_bar .= str_repeat('=', $bar); + if ($bar < $size) { + $status_bar .= '>'; + $status_bar .= str_repeat(' ', $size - $bar); + } else { + $status_bar .= '='; + } + $display = number_format($percent * 100, 0); + $status_bar .= "] $display% $done/$total"; + $rate = ($now - $start_time) / $done; + $left = $total - $done; + $eta = round($rate * $left, 2); + $elapsed = $now - $start_time; + $status_bar .= ' 预计剩余: ' . number_format($eta) . ' 秒. 已执行: ' . number_format($elapsed) . ' 秒.'; + echo "$status_bar "; + flush(); + if ($done === $total) { + echo "\n"; + } + } + +} diff --git a/database/migrations/20190822082112_user_level.php b/database/migrations/20190822082112_user_level.php new file mode 100755 index 0000000..24b986d --- /dev/null +++ b/database/migrations/20190822082112_user_level.php @@ -0,0 +1,46 @@ +table('user_level', ['comment' => '用户等级', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 20, 'default' => '', 'comment' => '名称']) + ->addColumn('description', 'string', ['limit' => 50, 'default' => '', 'comment' => '简介']) + ->addColumn('img', 'string', ['limit' => 255, 'default' => '/static/index/images/user_level_default.png', 'comment' => '图片']) + ->addColumn('status', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '是否启用']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + $this->insertData(); + } + + protected function insertData() + { + $data = '[{"id":1,"name":"普通用户","description":"普通用户","img":"/uploads/attachment/20190822/65e4ad92ece9fdb7f3822ba4fc322bf6.png","status":1},{"id":2,"name":"青铜会员","description":"青铜会员","img":"/uploads/attachment/20190822/d0b153352b15ea7097403c563e9c3be4.png","status":1},{"id":3,"name":"白银会员","description":"白银会员","img":"/uploads/attachment/20190822/72031bafedeba534d1e862b8d717f8db.png","status":1},{"id":4,"name":"黄金会员","description":"黄金会员","img":"/uploads/attachment/20190822/6dcc15ea1701c449e63e6856f0931e2a.png","status":1}]'; + + $msg = '前台测试用户等级导入成功.' . "\n"; + Db::startTrans(); + $data = json_decode($data, true); + try { + foreach ($data as $item) { + \app\common\model\UserLevel::create($item); + } + Db::commit(); + } catch (\Exception $e) { + Db::rollback(); + $msg = $e->getMessage(); + } + print ($msg); + } +} diff --git a/database/migrations/20190829040632_article_category.php b/database/migrations/20190829040632_article_category.php new file mode 100755 index 0000000..06f5c8e --- /dev/null +++ b/database/migrations/20190829040632_article_category.php @@ -0,0 +1,22 @@ +table('article_category', ['comment'=>'文章分类','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('parent_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '上级分类']) + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829040745_article.php b/database/migrations/20190829040745_article.php new file mode 100755 index 0000000..a2153e4 --- /dev/null +++ b/database/migrations/20190829040745_article.php @@ -0,0 +1,31 @@ +table('article', ['comment' => '文章', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 30, 'default' => '', 'comment' => '标题']) + ->addColumn('user_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '发布人']) + ->addColumn('article_category_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '所属分类']) + ->addColumn('description', 'string', ['limit' => 50, 'default' => '', 'comment' => '简介']) + ->addColumn('content', 'text', [ 'comment' => '内容']) + ->addColumn('is_top', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '是否置顶']) + ->addColumn('is_hot', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '是否热门']) + ->addColumn('img', 'string', ['limit' => 255, 'default' => '', 'comment' => '缩略图']) + ->addColumn('sort_number', 'integer', ['limit' => 10, 'default' => 1000, 'comment' => '排序']) + ->addColumn('view_count', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '浏览数']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '发布时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + + } +} diff --git a/database/migrations/20190829160826_article_comment.php b/database/migrations/20190829160826_article_comment.php new file mode 100755 index 0000000..1d6139e --- /dev/null +++ b/database/migrations/20190829160826_article_comment.php @@ -0,0 +1,20 @@ +table('article_comment', ['comment'=>'文章评论','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('user_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '评论用户']) + ->addColumn('parent_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '父级评论']) + ->addColumn('content', 'string', ['limit' => 300, 'default' => '', 'comment' => '评论内容']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829161048_article_tag.php b/database/migrations/20190829161048_article_tag.php new file mode 100755 index 0000000..beed4a1 --- /dev/null +++ b/database/migrations/20190829161048_article_tag.php @@ -0,0 +1,20 @@ +table('article_tag', ['comment'=>'文章标签','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('article_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '文章']) + ->addColumn('tag_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '标签']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829161111_tag.php b/database/migrations/20190829161111_tag.php new file mode 100755 index 0000000..e78c855 --- /dev/null +++ b/database/migrations/20190829161111_tag.php @@ -0,0 +1,19 @@ +table('tag', ['comment'=>'标签','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829161327_goods.php b/database/migrations/20190829161327_goods.php new file mode 100755 index 0000000..ebb05a3 --- /dev/null +++ b/database/migrations/20190829161327_goods.php @@ -0,0 +1,31 @@ +table('goods', ['comment' => '商品', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('img', 'string', ['limit' => 255, 'default' => '', 'comment' => '图片']) + ->addColumn('slide', 'string', ['limit' => 2000, 'default' => '', 'comment' => '轮播']) + ->addColumn('goods_category_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '所属分类']) + ->addColumn('brand_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '品牌']) + ->addColumn('origin_price', 'decimal', ['precision' => 14, 'scale' => 2, 'default' => 0, 'comment' => '原价']) + ->addColumn('price', 'decimal', ['precision' => 14, 'scale' => 2, 'default' => 0, 'comment' => '售价']) + ->addColumn('attr', 'text', ['comment' => '规格']) + ->addColumn('detail', 'text', ['comment' => '详情']) + ->addColumn('weight', 'decimal', ['precision' => 14, 'scale' => 2, 'default' => 0, 'comment' => '重量']) + ->addColumn('stock', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '库存']) + ->addColumn('sort_number', 'integer', ['limit' => 10, 'default' => 1000, 'comment' => '排序(升序)']) + ->addColumn('status', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '是否上架']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829161439_order.php b/database/migrations/20190829161439_order.php new file mode 100755 index 0000000..acd6b7b --- /dev/null +++ b/database/migrations/20190829161439_order.php @@ -0,0 +1,41 @@ +table('order', ['comment' => '订单', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('order_no', 'string', ['limit' => 50, 'default' => '', 'comment' => '订单编号']) + ->addColumn('user_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '下单用户']) + ->addColumn('order_price', 'decimal', ['precision' => 14, 'scale' => 2, 'default' => 0, 'comment' => '订单金额']) + ->addColumn('pay_price', 'decimal', ['precision' => 14, 'scale' => 2, 'default' => 0, 'comment' => '支付金额']) + ->addColumn('goods_price', 'decimal', ['precision' => 14, 'scale' => 2, 'default' => 0, 'comment' => '商品总额']) + ->addColumn('express_price', 'decimal', ['precision' => 14, 'scale' => 2, 'default' => 0, 'comment' => '运费']) + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '姓名']) + ->addColumn('mobile', 'string', ['limit' => 11, 'default' => '', 'comment' => '手机号']) + ->addColumn('province_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '省']) + ->addColumn('city_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '市']) + ->addColumn('district_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '区县']) + ->addColumn('street_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '街道']) + ->addColumn('address', 'string', ['limit' => 200, 'default' => '', 'comment' => '收货地址']) + ->addColumn('full_address', 'string', ['limit' => 500, 'default' => '', 'comment' => '完整收货地址']) + ->addColumn('express_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '快递公司']) + ->addColumn('express_no', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '快递单号']) + ->addColumn('pay_channel', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '支付渠道'])// 1支付宝,2微信,3余额 + ->addColumn('pay_status', 'boolean', ['limit' => 1, 'default' => 0, 'comment' => '支付状态']) + ->addColumn('pay_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '付款时间']) + ->addColumn('deliver_status', 'boolean', ['limit' => 1, 'default' => 0, 'comment' => '发货状态'])// 0未发货,1已发货,2已收货 + ->addColumn('deliver_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '发货时间']) + ->addColumn('receive_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '收货时间']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829161446_cart.php b/database/migrations/20190829161446_cart.php new file mode 100755 index 0000000..e352885 --- /dev/null +++ b/database/migrations/20190829161446_cart.php @@ -0,0 +1,23 @@ +table('cart', ['comment' => '购物车', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + + ->addColumn('user_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '用户']) + ->addColumn('goods_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '商品']) + ->addColumn('number', 'integer', ['limit' => 10, 'default' => 1, 'comment' => '数量']) + ->addColumn('attr', 'string', ['limit' => 100, 'default' => '', 'comment' => '规格']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829161654_goods_category.php b/database/migrations/20190829161654_goods_category.php new file mode 100755 index 0000000..c6f02d2 --- /dev/null +++ b/database/migrations/20190829161654_goods_category.php @@ -0,0 +1,21 @@ +table('goods_category', ['comment'=>'商品分类','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('parent_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '上级分类']) + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + + } +} diff --git a/database/migrations/20190829161715_deliver_address.php b/database/migrations/20190829161715_deliver_address.php new file mode 100755 index 0000000..62edadd --- /dev/null +++ b/database/migrations/20190829161715_deliver_address.php @@ -0,0 +1,27 @@ +table('deliver_address', ['comment'=>'收货地址','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('user_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '用户']) + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '姓名']) + ->addColumn('mobile', 'string', ['limit' => 11, 'default' => '', 'comment' => '手机号']) + ->addColumn('province_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '省']) + ->addColumn('city_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '市']) + ->addColumn('district_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '区']) + ->addColumn('street_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '街道']) + ->addColumn('detail', 'string', ['limit' => 100, 'default' => '', 'comment' => '详细地址']) + ->addColumn('is_default', 'boolean', ['limit' => 1, 'default' => 0, 'comment' => '是否默认']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829163727_brand.php b/database/migrations/20190829163727_brand.php new file mode 100755 index 0000000..c3852cf --- /dev/null +++ b/database/migrations/20190829163727_brand.php @@ -0,0 +1,20 @@ +table('brand', ['comment'=>'品牌','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('img', 'string', ['limit' => 255, 'default' => '', 'comment' => '图片']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829164459_goods_attr.php b/database/migrations/20190829164459_goods_attr.php new file mode 100755 index 0000000..7b2c891 --- /dev/null +++ b/database/migrations/20190829164459_goods_attr.php @@ -0,0 +1,19 @@ +table('goods_attr', ['comment'=>'商品规格','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829164515_goods_attr_category.php b/database/migrations/20190829164515_goods_attr_category.php new file mode 100755 index 0000000..eda195c --- /dev/null +++ b/database/migrations/20190829164515_goods_attr_category.php @@ -0,0 +1,19 @@ +table('goods_attr_category', ['comment'=>'商品规格分类','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829172742_express.php b/database/migrations/20190829172742_express.php new file mode 100755 index 0000000..956329e --- /dev/null +++ b/database/migrations/20190829172742_express.php @@ -0,0 +1,19 @@ +table('express', ['comment'=>'快递','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('code', 'string', ['limit' => 50, 'default' => '', 'comment' => '编码']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190829173031_order_goods.php b/database/migrations/20190829173031_order_goods.php new file mode 100755 index 0000000..fc6cecd --- /dev/null +++ b/database/migrations/20190829173031_order_goods.php @@ -0,0 +1,25 @@ +table('order_goods', ['comment'=>'订单商品','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('order_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '所属订单']) + ->addColumn('goods_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '商品']) + ->addColumn('number', 'integer', ['limit' => 10, 'default' => 1, 'comment' => '数量']) + ->addColumn('attr', 'string', ['limit' => 200, 'default' => '', 'comment' => '规格']) + ->addColumn('price', 'decimal', ['precision' => 14, 'scale' => 2, 'default' => 0, 'comment' => '单价']) + ->addColumn('total_price', 'decimal', ['precision' => 14, 'scale' => 2, 'default' => 0, 'comment' => '总价']) + + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190904060153_slide.php b/database/migrations/20190904060153_slide.php new file mode 100755 index 0000000..1079a3d --- /dev/null +++ b/database/migrations/20190904060153_slide.php @@ -0,0 +1,23 @@ +table('slide', ['comment' => '轮播', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('img', 'string', ['limit' => 255, 'default' => '', 'comment' => '图片']) + ->addColumn('jump_type', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '跳转类型']) //1商品,2文章,3url + ->addColumn('jump_target', 'string', ['limit' => 255, 'default' => '', 'comment' => '跳转目标']) //跳转目标为数据ID或url地址 + ->addColumn('sort_number', 'integer', ['limit' => 10, 'default' => 1000, 'comment' => '排序']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190904074520_staff.php b/database/migrations/20190904074520_staff.php new file mode 100755 index 0000000..adcd237 --- /dev/null +++ b/database/migrations/20190904074520_staff.php @@ -0,0 +1,31 @@ +table('staff', ['comment' => '员工', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('avatar', 'string', ['limit' => 255, 'default' => '', 'comment' => '照片']) + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '姓名']) + ->addColumn('department_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '部门']) + ->addColumn('position_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '职位']) + ->addColumn('job_number', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '工号']) + ->addColumn('mobile', 'string', ['limit' => 11, 'default' => '', 'comment' => '手机号']) + ->addColumn('email', 'string', ['limit' => 100, 'default' => '', 'comment' => '邮箱']) + ->addColumn('birthday', 'date', [ 'comment' => '生日']) + ->addColumn('hired_date', 'date', [ 'comment' => '入职日期']) + ->addColumn('is_boss', 'boolean', ['limit' => 1, 'default' => 0, 'comment' => '是否为老板']) + ->addColumn('is_leader', 'boolean', ['limit' => 1, 'default' => 0, 'comment' => '是否所属部门领导']) + ->addColumn('sort_number', 'integer', ['limit' => 10, 'default' => 1000, 'comment' => '排序']) + ->addColumn('status', 'boolean', ['limit' => 1, 'default' => 1, 'comment' => '是否启用']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190904074525_department.php b/database/migrations/20190904074525_department.php new file mode 100755 index 0000000..f555bf9 --- /dev/null +++ b/database/migrations/20190904074525_department.php @@ -0,0 +1,20 @@ +table('department', ['comment'=>'部门','engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('parent_id', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '上级部门']) + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/database/migrations/20190904074743_position.php b/database/migrations/20190904074743_position.php new file mode 100755 index 0000000..67556bb --- /dev/null +++ b/database/migrations/20190904074743_position.php @@ -0,0 +1,20 @@ +table('position', ['comment' => '职位', 'engine' => 'InnoDB', 'encoding' => 'utf8mb4', 'collation' => 'utf8mb4_unicode_ci']); + $table + ->addColumn('name', 'string', ['limit' => 50, 'default' => '', 'comment' => '名称']) + ->addColumn('create_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '创建时间']) + ->addColumn('update_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '更新时间']) + ->addColumn('delete_time', 'integer', ['limit' => 10, 'default' => 0, 'comment' => '删除时间']) + ->create(); + } +} diff --git a/extend/generate/Generate.php b/extend/generate/Generate.php new file mode 100755 index 0000000..a1c0f3d --- /dev/null +++ b/extend/generate/Generate.php @@ -0,0 +1,1452 @@ + + */ + +namespace generate; + +use app\admin\model\AdminMenu; +use generate\field\Checkbox; +use generate\field\Color; +use generate\field\Date; +use generate\field\DateRange; +use generate\field\Datetime; +use generate\field\DatetimeRange; +use generate\field\Editor; +use generate\field\Email; +use generate\field\Field; +use generate\field\File; +use generate\field\Icon; +use generate\field\IdCard; +use generate\field\Image; +use generate\field\Ip; +use generate\field\Map; +use generate\field\Mobile; +use generate\field\MultiFile; +use generate\field\MultiImage; +use generate\field\MultiSelect; +use generate\field\Number; +use generate\field\Password; +use generate\field\Radio; +use generate\field\Select; +use generate\field\SwitchField; +use generate\field\Text; +use generate\field\Textarea; +use generate\field\Url; +use generate\field\Year; +use generate\field\YearMonth; +use generate\field\YearMonthRange; +use generate\field\YearRange; +use generate\rule\Required; +use think\Db; +use think\facade\Env; +use generate\traits\Tools; + +class Generate +{ + + use Tools; + + protected $config = []; + + //主数据 + protected $data = []; + + + /** + * 控制器和模型名、验证器名黑名单 + * @var array + */ + protected $blacklistName = [ + 'Auth', + 'Index', + 'AdminUser', + 'AdminRole', + 'AdminMenu', + 'AdminLog', + 'AdminLogData', + 'Attachment', + ]; + + /** + * 表名黑名单 + * @var array + */ + protected $blacklistTable = [ + 'admin_user', + 'admin_role', + 'admin_menu', + 'admin_log', + 'admin_log_data', + 'migrations', + 'attachment', + ]; + + public function __construct($data = [], $config = null) + { + + $root_path = Env::get('root_path'); + $app_path = Env::get('app_path'); + $config_tmp = [ + //模版目录 + 'template' => [ + 'path' => $root_path . 'extend/generate/stub/', + 'controller' => $root_path . 'extend/generate/stub/Controller.stub', + 'model' => $root_path . 'extend/generate/stub/Model.stub', + 'validate' => $root_path . 'extend/generate/stub/Validate.stub', + 'view' => [ + 'index' => $root_path . 'extend/generate/stub/view/index.stub', + 'index_path' => $root_path . 'extend/generate/stub/view/index/', + 'index_del1' => $root_path . 'extend/generate/stub/view/index/del1.stub', + 'index_del2' => $root_path . 'extend/generate/stub/view/index/del2.stub', + 'index_filter' => $root_path . 'extend/generate/stub/view/index/filter.stub', + 'index_export' => $root_path . 'extend/generate/stub/view/index/export.stub', + 'index_select1' => $root_path . 'extend/generate/stub/view/index/select1.stub', + 'index_select2' => $root_path . 'extend/generate/stub/view/index/select2.stub', + 'add' => $root_path . 'extend/generate/stub/view/add.stub', + ], + ], + //生成文件目录 + 'file_dir' => [ + 'controller' => $app_path . 'admin/controller/', + 'model' => $app_path . 'common/model/', + 'validate' => $app_path . 'common/validate/', + 'view' => $app_path . 'admin/view/', + ], + ]; + + $config = $config ?? $config_tmp; + $this->config = $config; + + $this->data = $data; + } + + + public function run() + { + $this->checkName($this->data); + $this->checkDir(); + + $this->createAddView(); + $this->createIndexView(); + $this->createController(); + $this->createModel(); + $this->createValidate(); + $this->createMenu(); + return '生成成功'; + + //先判断所有目录是否可写,控制器,模型,验证器,视图 + //然后生成表,然后再生成各个代码 + //检查目录 + + //检查名称 + + //判断是否为 + + + //$this->createTable($this->data); + + + } + + + /** + * 获取所有表(除黑名单之外) + * @return array + */ + public function getTable() + { + $table_data = Db::query('SHOW TABLES'); + $table = []; + + foreach ($table_data as $key => $value) { + $current = current($value); + if (!in_array($current, $this->blacklistTable)) { + $table[] = $current; + } + } + + return $table; + } + + /** + * 获取后台已有菜单,以select形式返回 + */ + public function getMenu() + { + $selected = 1; + $current_id = 0; + $result = AdminMenu::where('id', '<>', $current_id)->order('sort_id', 'asc')->order('id', 'asc')->column('id,parent_id,name,sort_id', 'id'); + foreach ($result as $r) { + $r['selected'] = (int)$r['id'] === (int)$selected ? 'selected' : ''; + } + $str = ""; + $this->initTree($result); + return $this->getTree(0, $str, $selected); + } + + + //获取所有模块 + protected function getModule() + { + $module = []; + $path = Env::get('app_path'); + $dir = scandir($path); + foreach ($dir as $item) { + if ($item !== '.' && $item !== '..' && is_dir($path . $item)) { + $module[] = $item; + } + } + return count($module) > 0 ? $module : false; + } + + //检查目录(是否可写) + protected function checkDir() + { + if (!is_dir($this->config['file_dir']['controller'])) { + $this->mkFolder($this->config['file_dir']['controller']); + } + + if (!is_dir($this->config['file_dir']['model'])) { + $this->mkFolder($this->config['file_dir']['model']); + } + + if (!is_dir($this->config['file_dir']['validate'])) { + $this->mkFolder($this->config['file_dir']['validate']); + } + + if (!is_dir($this->config['file_dir']['view'])) { + $this->mkFolder($this->config['file_dir']['view']); + } + + + if (!is_writable($this->config['file_dir']['controller'])) { + throw new \Exception('控制器目录不可写'); + } + + if (!is_writable($this->config['file_dir']['model'])) { + throw new \Exception('模型目录不可写'); + } + + if (!is_writable($this->config['file_dir']['validate'])) { + throw new \Exception('验证器目录不可写'); + } + + if (!is_writable($this->config['file_dir']['view'])) { + throw new \Exception('视图目录不可写'); + } + + return true; + } + + //检查名称是在黑名单,表是否存在 + protected function checkName($data) + { + if (in_array($data['controller'], $this->blacklistName)) { + throw new \Exception('控制器名非法'); + } + + if (in_array($data['model'], $this->blacklistName)) { + throw new \Exception('模型名非法'); + } + + if (in_array($data['validate'], $this->blacklistName)) { + throw new \Exception('验证器名非法'); + } + + if (in_array($data['table'], $this->blacklistTable)) { + throw new \Exception('表名非法'); + } + + return true; + } + + + /** + * 创建数据表 + * @param array $data + * @return bool + */ + protected function createTable($data = []) + { + if (count($data) == 0) { + $data = $this->data; + } + + //字段 + $fields = []; + //索引 + $indexes = []; + + $fields[] = " `id` int(11) unsigned NOT NULL AUTO_INCREMENT"; + foreach ($data['data'] as $item) { + // 字段 + $fields[] = " `{$item['field_name']}` {$item['field_type']}" + . ($item['not_null'] ? ' NOT NULL' : ' ') + . (strtolower($item['default']) == 'null' ? '' : " DEFAULT '{$item['default']}'") + . ($item['comment'] === '' ? '' : " COMMENT '{$item['comment']}'"); + + // 索引 + if (isset($item['key']) && $item['key'] && $item['name'] != 'id') { + $indexes[] = " KEY `{$item['name']}` (`{$item['name']}`)"; + } + } + + //自动生成时间戳 + if (isset($data['auto_timestamp']) && $data['auto_timestamp']) { + $fields[] = " `create_time` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '创建时间'"; + $fields[] = " `update_time` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '更新时间'"; + } + //软删除 + if (isset($data['soft_delete']) && $data['soft_delete']) { + $fields[] = " `delete_time` int(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '删除时间'"; + } + + // 默认主键为id + $fields[] = " PRIMARY KEY (`id`) "; + //表名 + $name = config('database.prefix') . $data['table']; + $sql = "CREATE TABLE `{$name}` (\n" + . implode(",\n", array_merge($fields, $indexes)) + . "\n)ENGINE=" . (isset($this->data['table_engine']) ? $this->data['table_engine'] : 'InnoDB') + . " DEFAULT CHARSET=utf8mb4 COMMENT '{$this->data['cn_name']}'"; + //记录SQL日志 + //Log::record("AUTO_CREATE_TABLE:\n{$sql};", 'sql'); + $msg = 'error'; + Db::startTrans(); + try { + Db::query($sql); + Db::commit(); + $result = true; + } catch (\Exception $e) { + Db::rollback(); + $msg = $e->getMessage(); + $result = false; + } + + if ($result) { + return true; + } + return $msg; + } + + //创建控制器 + protected function createController() + { + + //不生成控制器 + if($this->data['controller']['create']==0){ + return true; + } + + $add_field_code = ''; + $edit_field_code = ''; + + //关联代码 + $relation_1 = ''; + $relation_2 = ''; + $relation_3 = ''; + + //导出代码 + $export_header = ''; + $export_body = ''; + $export_name = ''; + $export_code = ''; + //with代码 + $relation_with = ''; + //with列表 + $relation_with_list = ''; + + foreach ($this->data['data'] as $key => $value) { + + if ($value['is_form'] == 1) { + switch ($value['form_type']) { + case 'file': + $add_field_code_tmp = File::$controllerAddCode; + $edit_field_code_tmp = File::$controllerEditCode; + break; + case 'image': + $add_field_code_tmp = Image::$controllerAddCode; + $edit_field_code_tmp = Image::$controllerEditCode; + break; + case 'multi_image': + $add_field_code_tmp = MultiImage::$controllerAddCode; + $edit_field_code_tmp = MultiImage::$controllerEditCode; + break; + case 'multi_file': + $add_field_code_tmp = MultiFile::$controllerAddCode; + $edit_field_code_tmp = MultiFile::$controllerEditCode; + break; + case 'editor': + $add_field_code_tmp = Editor::$controllerAddCode; + $edit_field_code_tmp = Editor::$controllerEditCode; + break; + default: + $add_field_code_tmp = ''; + $edit_field_code_tmp = ''; + break; + } + + $add_field_code_tmp = str_replace(array('[FORM_NAME]', '[FIELD_NAME]'), array($value['form_name'], $value['field_name']), $add_field_code_tmp); + $add_field_code .= $add_field_code_tmp; + + $edit_field_code_tmp = str_replace(array('[FORM_NAME]', '[FIELD_NAME]'), array($value['form_name'], $value['field_name']), $edit_field_code_tmp); + $edit_field_code .= $edit_field_code_tmp; + + + //关联处理 + if ($value['is_relation'] == 1 && $value['relation_type'] == 1) { + + $table_name = str_replace('_id', '', $value['field_name']); + + $class_name = parse_name($table_name, 1); + $relation_1 .= 'use app\\common\\model\\' . $class_name . ";\n"; + + $code_3 = file_get_contents($this->config['template']['path'] . 'controller/relation_assign_2.stub'); + $list_name = $table_name . '_list'; + $code_3 = str_replace(array('[LIST_NAME]', '[CLASS_NAME]'), array($list_name, $class_name), $code_3); + $relation_3 .= $code_3; + } + } + + if ($value['is_list'] == 1) { + + //列表关联显示 + if ($value['is_relation'] == 1 && $value['relation_type'] == 1) { + $relation_with_name = str_replace('_id', '', $value['field_name']); + $relation_with_list .= empty($relation_with_list) ? $relation_with_name : ',' . $relation_with_name; + + } + + //如果有列表导出 + if ($this->data['view']['export'] == 1) { + $export_header .= "'" . $value['form_name'] . "',"; + if ($value['getter_setter'] === 'switch') { + $export_body .= '$record[' . "'" . $value['field_name'] . "'" . '] = $item->' . $value['field_name'] . '_text' . ";\n"; + } else if ($value['is_relation'] == 1 && $value['relation_type'] == 1) { + + $relation_name = str_replace('_id', '', $value['field_name']); + $export_body .= '$record[' . "'" . $value['field_name'] . "'" . '] = $item->' . $relation_name . '->' . $value['relation_show'] . '?? ' . "'" . "'" . ";\n"; + } else { + $export_body .= '$record[' . "'" . $value['field_name'] . "'" . '] = $item->' . $value['field_name'] . ";\n"; + } + } + + } + + } + + + //启用禁用 + $enable_code = ''; + if (in_array(5, $this->data['controller']['action'])) { + $enable_tmp = file_get_contents($this->config['template']['path'] . 'controller/enable.stub'); + $enable_tmp = str_replace('[MODEL_NAME]', $this->data['model']['name'], $enable_tmp); + $enable_code = $enable_tmp; + } + + if (strlen($export_header) > 0) { + $export_name = $this->data['table']; + $code_export = file_get_contents($this->config['template']['path'] . 'controller/export.stub'); + $code_export = str_replace(array('[HEADER_LIST]', '[BODY_ITEM]', '[FILE_NAME]'), array($export_header, $export_body, $export_name), $code_export); + $export_code = $code_export; + } + + + if (strlen($relation_3) > 0) { + $code_2 = file_get_contents($this->config['template']['path'] . 'controller/relation_assign_1.stub'); + $code_2 = str_replace('[RELATION_LIST]', $relation_3, $code_2); + $relation_2 = $code_2; + } + + + //如果有列表显示 + if (strlen($relation_with_list) > 0) { + $relation_with = file_get_contents($this->config['template']['path'] . 'controller/relation_with.stub'); + $relation_with = str_replace('[WITH_LIST]', $relation_with_list, $relation_with); + } + + + $file = $this->config['template']['controller']; + $code = file_get_contents($file); + + //控制器添加方法特殊字段处理 + //控制器修改方法特殊字段处理 + $code = str_replace( + array('[NAME]', '[CONTROLLER_NAME]', '[CONTROLLER_MODULE]', '[MODEL_NAME]', '[MODEL_MODULE]', '[VALIDATE_NAME]', '[VALIDATE_MODULE]', '[ADD_FIELD_CODE]', '[EDIT_FIELD_CODE]', '[RELATION_1]', '[RELATION_2]', '[RELATION_3]', '[EXPORT_CODE]', '[ENABLE_CODE]', '[RELATION_WITH]'), + array($this->data['cn_name'], $this->data['controller']['name'], $this->data['controller']['module'], $this->data['model']['name'], $this->data['model']['module'], $this->data['validate']['name'], $this->data['validate']['module'], $add_field_code, $edit_field_code, $relation_1, $relation_2, $relation_3, $export_code, $enable_code, $relation_with), + $code + ); + + + $msg = ''; + try { + file_put_contents($this->config['file_dir']['controller'] . $this->data['controller']['name'] . 'Controller' . '.php', $code); + $result = true; + } catch (\Exception $e) { + $msg = $e->getMessage(); + $result = false; + } + return $result ?? $msg; + } + + //创建模型 + + /** + * @return bool|string + */ + protected function createModel() + { + + //不生成模型 + if($this->data['model']['create']==0){ + return true; + } + + $auto_time = 'protected $autoWriteTimestamp = true;'; + $soft_delete1 = 'use think\model\concern\SoftDelete;'; + $soft_delete2 = 'use SoftDelete;'; + $soft_delete3_1 = 'public $softDelete = true;'; + $soft_delete3_2 = 'public $softDelete = false;'; + + $file = $file = $this->config['template']['model']; + $code = file_get_contents($file); + $code = str_replace(array('[NAME]', '[TABLE_NAME]', '[MODEL_NAME]', '[MODEL_MODULE]'), array($this->data['cn_name'], $this->data['table'], $this->data['model']['name'], $this->data['model']['module']), $code); + + //软删除 + if ($this->data['model']['soft_delete']) { + $code = str_replace(array('[SOFT_DELETE_USE1]', '[SOFT_DELETE_USE2]', '[SOFT_DELETE_USE3]'), array($soft_delete1, $soft_delete2, $soft_delete3_1), $code); + } else { + $code = str_replace(array("\n" . '[SOFT_DELETE_USE1]' . "\n", "\n " . '[SOFT_DELETE_USE2]', '[SOFT_DELETE_USE3]'), array('', '', $soft_delete3_2), $code); + } + + //自动时间戳 + if ($this->data['model']['timestamp']) { + $code = str_replace('[AUTO_TIMESTAMP]', $auto_time, $code); + } else { + $code = str_replace('[AUTO_TIMESTAMP]' . "\n\n", '', $code); + } + + //关联 + $relation_code = ''; + //获取器/修改器 + $getter_setter_code = ''; + + foreach ($this->data['data'] as $key => $value) { + + if ($value['is_relation']) { + + $tmp_code = file_get_contents($this->config['template']['path'] . 'model/relation.stub'); + + if ($value['is_relation'] == 1) { + //外键 + $relation_type = 'belongsTo'; + $table_name = parse_name(str_replace('_id', '', $value['field_name']), 0, false); + //表中文名 + $cn_name = ''; + $table_info = Db::query('SHOW TABLE STATUS LIKE ' . "'" . $table_name . "'"); + if ($table_info) { + $cn_name = $table_info[0]['Comment'] ?? ''; + } + $relation_name = parse_name($table_name, 1, false); + $relation_class = parse_name($table_name, 1); + $tmp_code = str_replace(array('[RELATION_NAME]', '[RELATION_TYPE]', '[CLASS_NAME]', '[CN_NAME]'), array($relation_name, $relation_type, $relation_class, $cn_name), $tmp_code); + $relation_code .= $tmp_code; + + } else if ($value['is_relation'] == 2) { + //主键 + $relation_type = 'hasMany'; + if ($value['relation_type'] == 2) { + $relation_type = 'hasOne'; + } + + $table_tmp = explode(',', $value['relation_table']); + foreach ($table_tmp as $item) { + $table_name = parse_name($item, 0, false); + $relation_name = parse_name($table_name, 1, false); + $relation_class = parse_name($item, 1); + + //表中文名 + $cn_name = ''; + $table_info = Db::query('SHOW TABLE STATUS LIKE ' . "'" . $table_name . "'"); + if ($table_info) { + $cn_name = $table_info[0]['Comment'] ?? ''; + } + + $tmp_code_item = str_replace(array('[RELATION_NAME]', '[RELATION_TYPE]', '[CLASS_NAME]', '[CN_NAME]'), array($relation_name, $relation_type, $relation_class, $cn_name), $tmp_code); + $relation_code .= $tmp_code_item; + } + } + + } + + + if ($value['getter_setter']) { + switch ($value['getter_setter']) { + case 'switch': + $tmp_code = file_get_contents($this->config['template']['path'] . 'model/getter_setter_switch.stub'); + $tmp_code = str_replace(array('[FIELD_NAME]', '[FORM_NAME_LOWER]', '[FORM_NAME]'), array(parse_name($value['field_name'], 1), $value['field_name'], $value['form_name']), $tmp_code); + $getter_setter_code .= $tmp_code; + break; + case 'datetime': + $tmp_code = file_get_contents($this->config['template']['path'] . 'model/getter_setter_datetime.stub'); + $tmp_code = str_replace(array('[FIELD_NAME]', '[FORM_NAME]'), array(parse_name($value['field_name'], 1), $value['form_name']), $tmp_code); + $getter_setter_code .= $tmp_code; + break; + case 'date': + $tmp_code = file_get_contents($this->config['template']['path'] . 'model/getter_setter_date.stub'); + $tmp_code = str_replace(array('[FIELD_NAME]', '[FORM_NAME]'), array(parse_name($value['field_name'], 1), $value['form_name']), $tmp_code); + $getter_setter_code .= $tmp_code; + break; + default: + break; + } + } + } + + $code = str_replace(array('[RELATION]', '[GETTER_SETTER]'), array($relation_code, $getter_setter_code), $code); + + + //暂时不用switch,因为基础模型已经有status的获取器 + /*//switch字段 + $switch_field = ''; + foreach ($this->data['data'] as $value) { + if ($value['form_type'] == 'switch') { + $switch_field .= "'" . $value['field_name'] . "',"; + } + } + //switch字段替换 + $code = str_replace('[SWITCH_FIELD]', $switch_field, $code);*/ + + + //搜索字段 + $search_field = ''; + //多文件/多图上传获取器,修改器 + $multi_field = ''; + foreach ($this->data['data'] as $value) { + if ($value['is_search'] == 1) { + $search_field .= "'" . $value['field_name'] . "',"; + } + //多图/文件的获取器/修改器处理 + if ($value['form_type'] === 'multi_image' || $value['form_type'] === 'multi_file') { + $multi_field_tmp = MultiImage::$modelAttrCode; + $multi_field_tmp = str_replace(array('[FORM_NAME]', '[FIELD_NAME]'), array($value['form_name'], parse_name($value['field_name'], 1)), $multi_field_tmp); + $multi_field .= $multi_field_tmp; + } + + } + //搜索字段替换 + //替换多图/多文件获取器,修改器 + $code = str_replace(array('[SEARCH_FIELD]', '[MULTI_FIELD]'), array($search_field, $multi_field), $code); + + $msg = ''; + try { + file_put_contents($this->config['file_dir']['model'] . $this->data['model']['name'] . '.php', $code); + $result = true; + } catch (\Exception $e) { + $msg = $e->getMessage(); + $result = false; + } + return $result ?? $msg; + } + + //创建验证器 + protected function createValidate() + { + //不生成验证器 + if($this->data['validate']['create']==0){ + return true; + } + + $file = $this->config['template']['validate']; + $code = file_get_contents($file); + $code = str_replace(array('[NAME]', '[VALIDATE_NAME]', '[VALIDATE_MODULE]'), array($this->data['cn_name'], $this->data['validate']['name'], $this->data['validate']['module']), $code); + + + $rule_code = ''; + $msg_code = ''; + $scene_code = Field::$validateSceneCode; + $scene_code_tmp = ''; + foreach ($this->data['data'] as $key => $value) { + if (is_array($value['form_validate']) && $value['is_form'] == 1) { + + if (in_array('required', $value['form_validate']) && !in_array($value['form_type'], ['file', 'multi_file', 'image', 'multi_image'])) { + + $rule_code_tmp = Required::$ruleValidate; + $rule_code_tmp = str_replace(array('[FORM_NAME]', '[FIELD_NAME]'), array($value['form_name'], $value['field_name']), $rule_code_tmp); + + $rule_code .= $rule_code_tmp; + + $msg_code_tmp = Required::$msgValidate; + + $msg_code_tmp = str_replace(array('[FIELD_NAME]', '[FORM_NAME]'), array($value['field_name'], $value['form_name']), $msg_code_tmp); + $msg_code .= $msg_code_tmp; + + $scene_code_tmp .= "'" . $value['field_name'] . "',"; + + + //[RULE_FIELD] + } + } + } + + $scene_code = str_replace('[RULE_FIELD]', $scene_code_tmp, $scene_code); + + //规则 + //消息 + //场景 + $code = str_replace(array('[VALIDATE_RULE]', '[VALIDATE_MSG]', '[VALIDATE_SCENE]'), array($rule_code, $msg_code, $scene_code), $code); + + //场景方法 + $code = str_replace('[VALIDATE_SCENE_FUNC]', '', $code); + /*if ($this->data['validate_scene_func']) { + $code = str_replace('[VALIDATE_SCENE_FUNC]', '', $code); + } else { + $code = str_replace('[VALIDATE_SCENE_FUNC]', '', $code); + }*/ + + $msg = ''; + try { + file_put_contents($this->config['file_dir']['validate'] . $this->data['validate']['name'] . 'Validate' . '.php', $code); + $result = true; + } catch (\Exception $e) { + $msg = $e->getMessage(); + $result = false; + } + return $result ?? $msg; + } + + //列表视图 + protected function createIndexView() + { + //列表数据名称 + $name_list = ''; + //列表数据字段 + $field_list = ''; + //搜索框显示 + $search_name = ''; + $file_fields = ['file', 'image']; + $sort_code = ''; + foreach ($this->data['data'] as $key => $value) { + + if ($value['list_sort'] == 1) { + if (strlen($sort_code) == 0) { + + $sort_code .= file_get_contents($this->config['template']['view']['index_path'] . 'sort1.stub'); + } + $option_code = file_get_contents($this->config['template']['view']['index_path'] . 'sort_option.stub'); + $option_code = str_replace(array('[FORM_NAME]', '[FIELD_NAME]'), array($value['form_name'], $value['field_name']), $option_code); + $sort_code .= $option_code; + } + + + if ($value['is_list'] == 1) { + //名称显示 + $name_list .= str_replace('[FORM_NAME]', $value['form_name'], Field::$listNameHtml); + //字段内容显示 + if (in_array($value['form_type'], $file_fields)) { + //图片显示 + $field_list .= str_replace('[FIELD_NAME]', $value['field_name'], Field::$listImgHtml); + } else if ($value['form_type'] === 'multi_image') { + //多图显示 + $field_list .= str_replace('[FIELD_NAME]', $value['field_name'], Field::$listMultiImgHtml); + } else if ($value['form_type'] === 'switch' && $value['getter_setter'] === 'switch') { + //status switch显示 + $field_list .= str_replace('[FIELD_NAME]', $value['field_name'], Field::$listSwitchHtml); + } else if ($value['is_relation'] == 1) { + //关联字段显示 + if ($value['relation_type'] == 1) { + $value['field_name'] = str_replace('_id', '', $value['field_name']) . '.' . $value['relation_show'] . '|default=' . "''"; + $field_list .= str_replace('[FIELD_NAME]', $value['field_name'], Field::$listFieldHtml); + } + } else { + //普通字段显示 + $field_list .= str_replace('[FIELD_NAME]', $value['field_name'], Field::$listFieldHtml); + } + + } + + if ($value['is_search'] == 1) { + if (!empty($search_name)) { + $search_name .= '/' . $value['form_name']; + } else { + $search_name .= $value['form_name']; + } + } + + } + + if (strlen($sort_code) > 0) { + $sort_code .= file_get_contents($this->config['template']['view']['index_path'] . 'sort2.stub');; + } + + + $file = $this->config['template']['view']['index']; + $code = file_get_contents($file); + + + //列表删除判断 + $del1 = ''; + $del2 = ''; + //列表选择 + $select1 = ''; + $select2 = ''; + + //列表添加 + $create = ''; + + //列表刷新 + $refresh = ''; + + if ($this->data['view']['delete']) { + $del1 = file_get_contents($this->config['template']['view']['index_del1']); + $del2 = file_get_contents($this->config['template']['view']['index_del2']); + $select1 = file_get_contents($this->config['template']['view']['index_select1']); + $select2 = file_get_contents($this->config['template']['view']['index_select2']); + $create = file_get_contents($this->config['template']['view']['index_path'] . 'create.stub'); + $refresh = file_get_contents($this->config['template']['view']['index_path'] . 'refresh.stub'); + } + + $code = str_replace(array('[INDEX_DEL1]', '[INDEX_DEL2]', '[INDEX_SELECT1]', '[INDEX_SELECT2]', '[INDEX_CREATE]', '[INDEX_REFRESH]'), array($del1, $del2, $select1, $select2, $create, $refresh), $code); + + + //顶部筛选(filter)和导出。筛选功能暂时为必生成 + //$filter = ''; + $filter = file_get_contents($this->config['template']['view']['index_filter']); + $code = str_replace('[INDEX_FILTER]', $filter, $code); + + //导出 + $export = ''; + if ($this->data['view']['export']) { + $export = file_get_contents($this->config['template']['view']['index_export']); + } + + //启用/禁用 + $enable1 = ''; + $enable2 = ''; + if ($this->data['view']['enable']) { + $enable1 = file_get_contents($this->config['template']['path'] . 'view/index/enable1.stub'); + $enable2 = file_get_contents($this->config['template']['path'] . 'view/index/enable2.stub'); + } + + $code = str_replace(array('[INDEX_ENABLE1]', '[INDEX_ENABLE2]', '[INDEX_EXPORT]', '[NAME_LIST]', '[FIELD_LIST]', '[SEARCH_FIELD]', '[SORT_CODE]'), array($enable1, $enable2, $export, $name_list, $field_list, $search_name, $sort_code), $code); + + $msg = ''; + try { + file_put_contents($this->config['file_dir']['view'] . $this->data['table'] . '/index.html', $code); + $result = true; + } catch (\Exception $e) { + $msg = $e->getMessage(); + $result = false; + } + return $result ?? $msg; + } + + //add视图页面 + protected function createAddView() + { + + $html = ''; + $form_body = ''; + $form_rules = ''; + $form_messages = ''; + + foreach ($this->data['data'] as $key => $value) { + + if ($value['is_form'] == 1) { + try { + + if ($value['form_type'] === 'switch') { + $value['form_type'] = 'switch_field'; + } else if ($value['form_type'] === 'select') { + $value['relation_data'] = ''; + if ($value['is_relation'] == 1 && $value['relation_type'] == 1) { + $list_code = file_get_contents($this->config['template']['path'] . 'view/add/select_data.stub'); + $list_name = str_replace('_id', '', $value['field_name']) . '_list'; + $list_code = str_replace(array('[DATA_LIST]', '[FIELD_NAME]', '[RELATION_SHOW]'), array($list_name, $value['field_name'], $value['relation_show']), $list_code); + $value['relation_data'] = $list_code; + } + } + + $class_name = parse_name($value['form_type'], 1); + $class = '\\generate\\field\\' . $class_name; + $form_body .= $class::create($value); + + } catch (\Exception $exception) { + echo $exception->getMessage(); + exit(); + } catch (\Error $error) { + echo $error->getMessage(); + exit(); + } + + //验证暂时不处理图片和文件 + if (is_array($value['form_validate']) + && $value['form_type'] !== 'image' + && $value['form_type'] !== 'file' + && $value['form_type'] !== 'multi_image' + && $value['form_type'] !== 'multi_file') { + + if (in_array('required', $value['form_validate'])) { + + $rule_html = Required::$ruleForm; + + //如果是多选select,验证字段使用[]后缀 + if ($value['form_type'] === 'multi_select' || $value['form_type'] === 'multi_image' || $value['form_type'] === 'multi_file') { + $value['field_name'] .= '[]'; + } + + $form_rules .= str_replace('[FIELD_NAME]', $value['field_name'], $rule_html); + + $msg_html = Required::$msgForm; + $msg_html = str_replace(array('[FIELD_NAME]', '[FORM_NAME]'), array($value['field_name'], $value['form_name']), $msg_html); + $form_messages .= $msg_html; + } + } + } + } + + + $file = $this->config['template']['view']['add']; + $code = file_get_contents($file); + $code = str_replace( + array('[FORM_BODY]', '[FORM_RULES]', '[FORM_MESSAGES]'), + array($form_body, $form_rules, $form_messages), + $code); + + + $msg = ''; + try { + if (!is_dir($this->config['file_dir']['view'] . $this->data['table'])) { + $this->mkFolder($this->config['file_dir']['view'] . $this->data['table']); + } + + file_put_contents($this->config['file_dir']['view'] . $this->data['table'] . '/add.html', $code); + $result = true; + } catch (\Exception $e) { + $msg = $e->getMessage(); + $result = false; + } + return $result ?? $msg; + + /*$code = str_replace('[FORM_RULES]', $this->data['validate'], $code); + $code = str_replace('[VALIDATE_MODULE]', $this->data['validate_module'], $code); + + //规则 + if ($this->data['validate_rule']) { + $code = str_replace('[VALIDATE_RULE]', '', $code); + } else { + $code = str_replace('[VALIDATE_RULE]', '', $code); + } + + //消息 + if ($this->data['validate_msg']) { + $code = str_replace('[VALIDATE_MSG]', '', $code); + } else { + $code = str_replace('[VALIDATE_MSG]', '', $code); + } + + //场景 + if ($this->data['validate_scene']) { + $code = str_replace('[VALIDATE_SCENE]', '', $code); + } else { + $code = str_replace('[VALIDATE_SCENE]', '', $code); + } + + //场景方法 + if ($this->data['validate_scene_func']) { + $code = str_replace('[VALIDATE_SCENE_FUNC]', '', $code); + } else { + $code = str_replace('[VALIDATE_SCENE_FUNC]', '', $code); + } + + $msg = ''; + try { + file_put_contents($this->appPath . $this->data['vali\date_module'] . '/validate/' . $this->data['validate'] . '.php', $code); + $result = true; + } catch (\Exception $e) { + $msg = $e->getMessage(); + $result = false; + } + return $result ?? $msg; + + */ + + } + + //自动添加菜单 + protected function createMenu() + { + if ($this->data['menu']['create'] >= 0) { + + //菜单前缀 + $url_prefix = 'admin/' . $this->data['table']; + //显示名称 + $name_show = $this->data['cn_name']; + Db::startTrans(); + try { + $parent = [ + 'parent_id' => $this->data['menu']['create'], + 'name' => $name_show . '管理', + 'url' => $url_prefix . '/index', + 'icon' => 'fa-list', + 'is_show' => 1, + 'log_method' => '不记录', + ]; + $result = AdminMenu::create($parent); + if (in_array(2, $this->data['menu']['menu'])) { + AdminMenu::create([ + 'parent_id' => $result->id, + 'name' => '添加' . $name_show, + 'url' => $url_prefix . '/add', + 'icon' => 'fa-plus', + 'is_show' => 0, + 'log_method' => 'POST', + ]); + } + + if (in_array(3, $this->data['menu']['menu'])) { + AdminMenu::create([ + 'parent_id' => $result->id, + 'name' => '修改' . $name_show, + 'url' => $url_prefix . '/edit', + 'icon' => 'fa-pencil', + 'is_show' => 0, + 'log_method' => 'POST', + ]); + } + + if (in_array(4, $this->data['menu']['menu'])) { + AdminMenu::create([ + 'parent_id' => $result->id, + 'name' => '删除' . $name_show, + 'url' => $url_prefix . '/del', + 'icon' => 'fa-trash', + 'is_show' => 0, + 'log_method' => 'POST', + ]); + } + + if (in_array(5, $this->data['menu']['menu'])) { + AdminMenu::create([ + 'parent_id' => $result->id, + 'name' => '启用' . $name_show, + 'url' => $url_prefix . '/enable', + 'icon' => 'fa-circle', + 'is_show' => 0, + 'log_method' => 'POST', + ]); + + AdminMenu::create([ + 'parent_id' => $result->id, + 'name' => '禁用' . $name_show, + 'url' => $url_prefix . '/disable', + 'icon' => 'fa-circle', + 'is_show' => 0, + 'log_method' => 'POST', + ]); + } + + Db::commit(); + } catch (\Exception $e) { + echo $e->getMessage(); + Db::rollback(); + } + } + } + + //创建目录 + protected function mkFolder($path) + { + if (!is_readable($path)) { + is_file($path) || mkdir($path, 0755) || is_dir($path); + } + } + + //获取目录下的所有类名 + public function getClassList($dir, $except = []) + { + $handler = opendir($dir); + while (($filename = readdir($handler)) !== false) { + if ($filename !== '.' && $filename !== '..') { + $filename = str_replace('.php', '', $filename); + + if (!in_array($filename, $except)) { + $files[] = $filename; + } + } + } + closedir($handler); + + return $files; + } + + + //获取字段列表 + public function getAll($table_name) + { + $parse_name = parse_name($table_name, 1); + + $data = [ + //表 + 'table' => [ + 'name' => $table_name, + 'cn_name' => '' + ], + //控制器 + 'controller' => [ + 'create' => 1, + 'name' => $parse_name, + 'action' => [ + 'index' => 1, + 'add' => 1, + 'edit' => 1, + 'del' => 1, + 'enable' => 0, + 'disable' => 0, + ], + 'del_relation' => [ + //关联方法,删除模式,1判断关联,2不做操作,3关联删除 + 'user' => 1, + ] + ], + //模型 + 'model' => [ + 'create' => 1, + 'name' => $parse_name, + 'auto_timestamp' => 1, + 'soft_delete' => 1, + + ], + //验证器 + 'validate' => [ + 'create' => 1, + 'name' => $parse_name, + 'scene' => [ + 'admin_add' => 1, + 'admin_edit' => 1, + 'api_add' => 1, + 'api_edit' => 1, + 'index_add' => 1, + 'index_edit' => 1, + + ] + ], + //字段 + 'field' => [ + [ + //字段名 + 'name' => 'name', + //字段中文名 + 'cn_name' => '名称', + //字段类型 + 'field_type' => 'varchar(30)', + //是否列表显示 + 'is_list' => 1, + //是否为搜索字段 + 'is_search' => 1, + //是否为表单字段 + 'is_form' => 1, + //表单类型 + 'form_type' => 'text', + //表单验证 + 'validate' => ['required'], + //验证场景 + 'validate_scene' => ['admin_add'], + //获取器 + 'getter' => 'date_time', + //修改器 + 'setter' => 'date_time', + //关联显示 + 'relation_display' => 1, + //关联显示字段 + 'display_field' => 'name', + + ], + ], + + ]; + + //所有字段信息 + $field_list = Db::query('SHOW FULL COLUMNS FROM `' . $table_name . '`'); + //表信息 + $table_info = Db::query('SHOW TABLE STATUS LIKE ' . "'" . $table_name . "'"); + $table_info = $table_info[0]; + //表名 + $data['table']['name'] = $table_info['Name']; + //表中文名 + $data['table']['cn_name'] = $table_info['Comment']; + + + //定义好以下情况, + //90%概率为列表的字段, + //90%概率不为列表的字段, + //90%为搜索的字段 + //90%不为搜索的字段 + //90%为表单的字段 + //90不为表单的字段 + //导出字段暂时和显示字段一样 + + + //显示为列表的字段名,暂时不用 + //$list_show_field = ['id','name','mobile','description','address','money','price', 'keywords','title','img','create_time','sort_number','user_id','status']; + //列表隐藏字段,如果为text字段,大概率隐藏 + $list_hide_field = ['password', 'update_time', 'delete_time']; + $list_hide_type = ['tinytext', 'tinyblob', 'text', 'blob', 'longtext', 'longblob']; + + + /** + * @param $field + * @return mixed + * 常用类型 + * tinyint,smallint,mediumint,int,bigint,float,double,decimal + * char,varchar,tinytext/tinyblob,text/blob,longtext/longblob + * date,datetime,timestamp,time,year + */ + + + //搜索字段,如果为varchar,char字段,大概率需要搜索 + $search_show_field = ['id', 'mobile', 'keywords', 'id_card', 'name', 'title', 'username', 'nickname', 'true_name', 'description']; + $search_show_type = ['char', 'varchar']; + //搜索隐藏字段 + //$search_hide_field = ['id','name','description']; + + //导出显示字段 + //$export_show_field = ['id','create_time']; + //导出隐藏字段,和列表隐藏字段差不多 + $export_hide_field = ['update_time', 'delete_time']; + $export_hide_type = ['tinytext', 'tinyblob', 'text', 'blob', 'longtext', 'longblob']; + + //表单显示字段 + //$form_show_field = ['id','create_time','update_time','delete_time']; + //表单隐藏字段 + $form_hide_field = ['id', 'create_time', 'update_time', 'delete_time']; + $form_hide_type = ['double']; + + $data['field'] = []; + foreach ($field_list as $key => $value) { + + $field_data = [ + //字段名 + 'name' => $value['Field'], + //字段中文名 + 'cn_name' => $value['Field'] === 'id' ? 'ID' : $value['Comment'], + //字段类型 + 'field_type' => $value['Type'], + //字段长度 + 'field_length' => 1, + //默认值 + 'default' => $value['Default'], + //是否列表显示 + 'is_list' => 1, + //是否为搜索字段 + 'is_search' => 0, + //是否为表单字段 + 'is_form' => 1, + //表单类型 + 'form_type' => 'text', + //表单验证 + 'validate' => ['required'], + 'validate_html' => '', + //验证场景 + 'validate_scene' => ['admin_add'], + //获取器/修改器 + 'getter_setter' => false, + //关联显示 + 'relation_display' => 1, + //关联显示字段 + 'display_field' => 'name', + ]; + + + $field_info = $this->getFieldInfo($field_data['name'], $field_data['field_type']); + + $field_data['field_length'] = $field_info['length']; + + //处理是否为列表显示 + if (in_array($field_info['name'], $list_hide_field) || in_array($field_info['type'], $list_hide_type)) { + $field_data['is_list'] = 0; + } + + //处理是否为列表搜索 + if (in_array($field_info['name'], $search_show_field) && in_array($field_info['type'], $search_show_type)) { + $field_data['is_search'] = 1; + } + + //处理是否不为表单字段 + if (in_array($field_info['name'], $form_hide_field) || in_array($field_info['type'], $form_hide_type)) { + $field_data['is_form'] = 0; + } + + //处理字段表单类型 + $form_info = $this->getFormInfo($field_info); + $field_data['form_type'] = $form_info['form_type']; + $field_data['getter_setter'] = $form_info['getter_setter']; + + + //验证 + //$field_data['validate'] = []; + $field_data['validate_html'] = $this->getValidateHtml($field_data); + + + $data['field'][] = $field_data; + + } + + + return $data; + } + + + //根据表单类型和长度返回相应的验证 + public function getValidateHtml($field_data) + { + $html = ''; + + + try { + + if ($field_data['form_type'] === 'switch') { + $field_data['form_type'] = 'switch_field'; + } + + $class_name = parse_name($field_data['form_type'], 1); + + $class = '\\generate\\field\\' . $class_name; + $html = $class::rule($field_data['field_length']); + + } catch (\Exception $exception) { + echo $exception->getMessage(); + } catch (\Error $error) { + echo $error->getMessage(); + } + + return $html; + } + + public function getFormInfo($field_info) + { + + //结尾:_id为select,_time为datetime,_date为date, + //结尾:_count为number,_lng/_longitude为map,img为image,slide为multiImage + //开头:is_为switch + //字段名:lng/longitude为map,password为password,money,price为number + //字段名:status大概率为switch或者其他 + $field_data = [ + 'form_type' => 'text', + 'getter_setter' => false, + ]; + + //id + if ($field_info['name'] === 'id') { + $field_data['form_type'] = 'number'; + } + + //_id为下拉列表,大多数为关联 + if (strrchr($field_info['name'], '_id') === '_id') { + $field_data['form_type'] = 'select'; + } + + //日期时间 + if (strrchr($field_info['name'], '_time') === '_time') { + $field_data['form_type'] = 'datetime'; + + $ignore_field = ['create_time', 'update_time', 'delete_time']; + if (!in_array($field_info['name'], $ignore_field) && $field_info['type'] === 'int') { + $field_data['getter_setter'] = 'datetime'; + } + } + + //日期 + if ($field_info['type'] === 'datetime') { + $field_data['form_type'] = 'date'; + } + + + //日期 + if (strrchr($field_info['name'], '_date') === '_date') { + $field_data['form_type'] = 'date'; + if ($field_info['type'] === 'int') { + $field_data['getter_setter'] = 'date'; + } + } + //日期 + if ($field_info['type'] === 'date') { + $field_data['form_type'] = 'date'; + } + + //数量 + if (strrchr($field_info['name'], '_count') === '_count') { + $field_data['form_type'] = 'number'; + } + + //经纬度 + if (strrchr($field_info['name'], '_lng') === '_lng') { + $field_data['form_type'] = 'map'; + } + + //图片 + if (strrchr($field_info['name'], 'img') === 'img') { + $field_data['form_type'] = 'image'; + } + //轮播 + if (strrchr($field_info['name'], 'slide') === 'slide') { + $field_data['form_type'] = 'multi_image'; + } + + //密码 + if (strrchr($field_info['name'], 'password') === 'password') { + $field_data['form_type'] = 'password'; + } + + //颜色 + if (strrchr($field_info['name'], 'color') === 'color') { + $field_data['form_type'] = 'color'; + } + //图标 + if (strrchr($field_info['name'], 'icon') === 'icon') { + $field_data['form_type'] = 'icon'; + } + + //价格,暂时用number + if (strrchr($field_info['name'], 'price') === 'price') { + $field_data['form_type'] = 'number'; + } + + //金额,暂时用number + if (strrchr($field_info['name'], 'money') === 'money') { + $field_data['form_type'] = 'number'; + } + + //状态 + if ($field_info['name'] === 'status') { + $field_data['form_type'] = 'switch'; + $field_data['getter_setter'] = 'switch'; + } + + //手机号 + if ($field_info['name'] === 'mobile') { + $field_data['form_type'] = 'mobile'; + } + + + //头像 + if ($field_info['name'] === 'avatar') { + $field_data['form_type'] = 'image'; + } + + //富文本 + if ($field_info['type'] === 'text' || $field_info['type'] === 'longtext') { + $field_data['form_type'] = 'editor'; + } + + if (strpos($field_info['name'], 'is_') === 0 && $field_info['type'] === 'tinyint') { + + $field_data['form_type'] = 'switch'; + $field_data['getter_setter'] = 'switch'; + } + return $field_data; + } + +} \ No newline at end of file diff --git a/extend/generate/field/Checkbox.php b/extend/generate/field/Checkbox.php new file mode 100755 index 0000000..661e64d --- /dev/null +++ b/extend/generate/field/Checkbox.php @@ -0,0 +1,37 @@ + + */ + +namespace generate\field; + +class Checkbox extends Field +{ + public static $html = << + +
    +
    + +
    +
    +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/City.php b/extend/generate/field/City.php new file mode 100755 index 0000000..d70c386 --- /dev/null +++ b/extend/generate/field/City.php @@ -0,0 +1,45 @@ + + */ + +namespace generate\field; + +class City extends Field +{ + + public static $html = << + +
    +
    + + +
    +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/Color.php b/extend/generate/field/Color.php new file mode 100755 index 0000000..d8161c0 --- /dev/null +++ b/extend/generate/field/Color.php @@ -0,0 +1,37 @@ + + */ + +namespace generate\field; + +class Color extends Field +{ + public static $html = << + +
    +
    + +
    +
    +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'color' => '颜色', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Date.php b/extend/generate/field/Date.php new file mode 100755 index 0000000..649c98b --- /dev/null +++ b/extend/generate/field/Date.php @@ -0,0 +1,36 @@ + + */ + +namespace generate\field; + +class Date extends Field +{ + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'date' => '日期', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/DateRange.php b/extend/generate/field/DateRange.php new file mode 100755 index 0000000..3d37bff --- /dev/null +++ b/extend/generate/field/DateRange.php @@ -0,0 +1,38 @@ + + */ + +namespace generate\field; + +class DateRange extends Field +{ + + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'date_range' => '日期范围', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Datetime.php b/extend/generate/field/Datetime.php new file mode 100755 index 0000000..366ceb8 --- /dev/null +++ b/extend/generate/field/Datetime.php @@ -0,0 +1,37 @@ + + */ + +namespace generate\field; + +class Datetime extends Field +{ + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'date_time' => '日期时间', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/DatetimeRange.php b/extend/generate/field/DatetimeRange.php new file mode 100755 index 0000000..6bbb176 --- /dev/null +++ b/extend/generate/field/DatetimeRange.php @@ -0,0 +1,39 @@ + + */ + +namespace generate\field; + +class DatetimeRange extends Field +{ + + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'datetime_range' => '日期时间范围', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/District.php b/extend/generate/field/District.php new file mode 100755 index 0000000..c5b526d --- /dev/null +++ b/extend/generate/field/District.php @@ -0,0 +1,45 @@ + + */ + +namespace generate\field; + +class District extends Field +{ + + public static $html = << + +
    +
    + + +
    +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/Editor.php b/extend/generate/field/Editor.php new file mode 100755 index 0000000..05e623c --- /dev/null +++ b/extend/generate/field/Editor.php @@ -0,0 +1,47 @@ + + */ + +namespace generate\field; + +class Editor extends Field +{ + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + + //控制器内代码 + public static $controllerAddCode =<<param(false)['[FIELD_NAME]']; +\n +EOF; + + public static $controllerEditCode =<<param(false)['[FIELD_NAME]']; +\n +EOF; + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Email.php b/extend/generate/field/Email.php new file mode 100755 index 0000000..348bd26 --- /dev/null +++ b/extend/generate/field/Email.php @@ -0,0 +1,31 @@ + + */ + +namespace generate\field; + +class Email extends Field +{ + public static $html = << + +
    + +
    +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'email' => '邮箱', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Field.php b/extend/generate/field/Field.php new file mode 100755 index 0000000..512f5d7 --- /dev/null +++ b/extend/generate/field/Field.php @@ -0,0 +1,279 @@ + + */ + +namespace generate\field; + +use generate\traits\Tools; + +class Field +{ + use Tools; + + + //当前字段可用规则 + public static $rules = [ + //非空 + 'required' => '非空', + 'wechat' => '微信号', + 'qq' => 'QQ号', + 'account' => '账号', + 'cn_name' => '中文姓名', + 'car_number' => '车牌号', + //自定义正则 + 'regular' => '自定义正则' + ]; + + + //列表名字 + public static $listNameHtml = <<[FORM_NAME]\n +EOF; + + //列表字段 + public static $listFieldHtml = <<{\$item.[FIELD_NAME]}\n +EOF; + + //图片字段显示 + public static $listImgHtml = <<\n +EOF; + + + public static $listMultiImgHtml = << +{foreach name='item.[FIELD_NAME]' id='item_[FIELD_NAME]'} + +{/foreach} + +\n +EOF; + + //status字段获取器为switch的时候自动显示为field_name_text + public static $listSwitchHtml = <<{\$item.[FIELD_NAME]_text}\n +EOF; + + + //验证器场景 + public static $validateSceneCode = + << [[RULE_FIELD]], +'edit' => [[RULE_FIELD]],\n +EOF; + + + //获取选择的字段和字段对应的验证optionDOM代码 + public function getFormSelectOption($field_type) + { + $result = ['text', '']; + $field_info = $this->getFieldInfo($file_name = '', $field_type); + switch ($field_info['type']) { + case 'tinyint': + $result[0] = 'switch'; + break; + case 'smallint': + $result[0] = 'number'; + break; + case 'mediumint': + $result[0] = 'number'; + break; + case 'int': + $result[0] = 'number'; + break; + case 'bigint': + $result[0] = 'number'; + break; + case 'float': + $result[0] = 'number'; + break; + case 'double': + $result[0] = 'number'; + break; + case 'decimal': + $result[0] = 'number'; + break; + case 'char': + $result[0] = 'text'; + break; + case 'varchar': + $result[0] = 'text'; + break; + case 'tinytext': + $result[0] = 'editor'; + break; + case 'tinyblob': + $result[0] = 'editor'; + break; + case 'text': + $result[0] = 'editor'; + break; + case 'blob': + $result[0] = 'editor'; + break; + case 'longtext': + $result[0] = 'editor'; + break; + case 'longblob': + $result[0] = 'editor'; + break; + case 'date': + $result[0] = 'date'; + break; + case 'datetime': + $result[0] = 'datetime'; + break; + case 'timestamp': + $result[0] = 'datetime'; + break; + case 'time': + $result[0] = 'time'; + break; + case 'year': + $result[0] = 'year'; + break; + + default: + $result[0] = 'text'; + break; + } + + + $result[1] = $this->getValidateOption($result[0], $field_info['length']); + return $result; + } + + //根据表单类型和长度返回相应的验证 + public function getValidateOption($type, $length = '') + { + switch ($type) { + case 'text': + $data = Text::rule($length); + break; + case 'number': + $data = Number::rule($length); + break; + case 'password': + $data = Password::rule($length); + break; + case 'mobile': + $data = Mobile::rule($length); + break; + case 'email': + $data = Email::rule($length); + break; + case 'id_card': + $data = IdCard::rule($length); + break; + case 'url': + $data = Url::rule($length); + break; + case 'ip': + $data = Ip::rule($length); + break; + case 'texterea': + $data = Textarea::rule($length); + break; + case 'checkbox': + $data = Checkbox::rule($length); + break; + case 'switch': + $data = SwitchField::rule($length); + break; + case 'radio': + $data = Radio::rule($length); + break; + case 'select': + $data = Select::rule($length); + break; + case 'multi_select': + $data = MultiSelect::rule($length); + break; + case 'image': + $data = Image::rule($length); + break; + case 'multi_image': + $data = MultiImage::rule($length); + break; + case 'file': + $data = File::rule($length); + break; + case 'multi_file': + $data = MultiFile::rule($length); + break; + case 'date': + $data = Date::rule($length); + break; + case 'date_range': + $data = DateRange::rule($length); + break; + case 'datetime': + $data = Datetime::rule($length); + break; + case 'datetime_range': + $data = DatetimeRange::rule($length); + break; + case 'year': + $data = Year::rule($length); + break; + case 'year_range': + $data = YearRange::rule($length); + break; + case 'year_month': + $data = YearMonth::rule($length); + break; + case 'year_month_range': + $data = YearMonthRange::rule($length); + break; + case 'map': + $data = Map::rule($length); + break; + case 'color': + $data = Color::rule($length); + break; + case 'icon': + $data = Icon::rule($length); + break; + case 'editor': + $data = Editor::rule($length); + break; + default: + $data = Text::rule($length); + break; + } + + + return $data; + } + + + //规则 + public static function rule($length = '') + { + + $html = ''; + $rules = static::$rules; + foreach ($rules as $key => $value) { + $key = str_replace('[LENGTH]', $length, $key); + $html .= ''; + } + return $html; + } + + public static function createHtmlRule($rule) + { + $html = ''; + if (key_exists($rule, self::$rules)) { + $html .= ''; + } + } + +} \ No newline at end of file diff --git a/extend/generate/field/File.php b/extend/generate/field/File.php new file mode 100755 index 0000000..77b72a2 --- /dev/null +++ b/extend/generate/field/File.php @@ -0,0 +1,86 @@ + + */ + +namespace generate\field; + +class File extends Field +{ + + public static $html = << + +
    + +
    + +\n +EOF; + + + + public static $rules = [ + 'required' => '非空', + 'file_size' => '文件大小限制', + 'file_ext' => '文件后缀限制', + 'regular' => '自定义正则' + ]; + + + //控制器添加上传 + public static $controllerAddCode = + <<upload('[FIELD_NAME]'); +if (\$file_[FIELD_NAME]) { + \$param['[FIELD_NAME]'] = \$file_[FIELD_NAME]->url; +} else { + return error(\$attachment_[FIELD_NAME]->getError()); +} +\n +EOF; + + + //控制器修改上传 + public static $controllerEditCode = + <<upload('[FIELD_NAME]'); + if (\$file_[FIELD_NAME]) { + \$param['[FIELD_NAME]'] = \$file_[FIELD_NAME]->url; + } +} +\n +EOF; + + + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} diff --git a/extend/generate/field/Icon.php b/extend/generate/field/Icon.php new file mode 100755 index 0000000..45bc198 --- /dev/null +++ b/extend/generate/field/Icon.php @@ -0,0 +1,39 @@ + + */ + +namespace generate\field; + +class Icon extends Field +{ + public static $html = << + +
    +
    + + +
    +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'icon' => '图标', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/IdCard.php b/extend/generate/field/IdCard.php new file mode 100755 index 0000000..4d7376f --- /dev/null +++ b/extend/generate/field/IdCard.php @@ -0,0 +1,31 @@ + + */ + +namespace generate\field; + +class IdCard extends Field +{ + public static $html = << + +
    + +
    +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'id_card' => '身份证', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Image.php b/extend/generate/field/Image.php new file mode 100755 index 0000000..e35b0b8 --- /dev/null +++ b/extend/generate/field/Image.php @@ -0,0 +1,78 @@ + + */ + +namespace generate\field; + +class Image extends Field +{ + public static $html = << + +
    + +
    + + \n +EOF; + + public static $rules = [ + 'required' => '非空', + 'file_size' => '文件大小限制', + 'file_image' => '图片类型', + 'regular' => '自定义正则' + ]; + + + //控制器添加上传 + public static $controllerAddCode = + <<upload('[FIELD_NAME]'); +if (\$file_[FIELD_NAME]) { + \$param['[FIELD_NAME]'] = \$file_[FIELD_NAME]->url; +} else { + return error(\$attachment_[FIELD_NAME]->getError()); +} +\n +EOF; + + + //控制器修改上传 + public static $controllerEditCode = + <<upload('[FIELD_NAME]'); + if (\$file_[FIELD_NAME]) { + \$param['[FIELD_NAME]'] = \$file_[FIELD_NAME]->url; + } +} +\n +EOF; + + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/Ip.php b/extend/generate/field/Ip.php new file mode 100755 index 0000000..74494c5 --- /dev/null +++ b/extend/generate/field/Ip.php @@ -0,0 +1,31 @@ + + */ + +namespace generate\field; + +class Ip extends Field +{ + public static $html = << + +
    + +
    +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'ip' => 'IP', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Map.php b/extend/generate/field/Map.php new file mode 100755 index 0000000..afaec8f --- /dev/null +++ b/extend/generate/field/Map.php @@ -0,0 +1,82 @@ + + */ + +namespace generate\field; + +class Map extends Field +{ + public static $html = << + +
    +
    +
    + + +
    + + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'lng_lat' => '经纬度', + 'regular' => '自定义正则' + ]; + + public static function create($data) + { + if ($data['field_name'] === 'lng') { + $data['field_name_lng'] = $data['field_name']; + $data['field_name_lat'] = 'lat'; + } else if ($data['field_name'] === 'longitude') { + $data['field_name_lng'] = $data['field_name']; + $data['field_name_lat'] = 'latitude'; + } else { + throw new \Exception('地图字段必须为lng,lat或longitude,latitude'); + } + + $html = self::$html; + $html = str_replace( + array('[FORM_NAME]', '[FIELD_NAME_LNG]', '[FIELD_NAME_LAT]') + , array($data['form_name'], $data['field_name_lng'] + , $data['field_name_lat']), $html + ); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/Mobile.php b/extend/generate/field/Mobile.php new file mode 100755 index 0000000..b0b560b --- /dev/null +++ b/extend/generate/field/Mobile.php @@ -0,0 +1,31 @@ + + */ + +namespace generate\field; + +class Mobile extends Field +{ + public static $html = << + +
    + +
    +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'mobile' => '手机号', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/MultiFile.php b/extend/generate/field/MultiFile.php new file mode 100755 index 0000000..9abe917 --- /dev/null +++ b/extend/generate/field/MultiFile.php @@ -0,0 +1,83 @@ + + */ + +namespace generate\field; + +class MultiFile extends Field +{ + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'file_size' => '文件大小限制', + 'file_ext' => '文件后缀限制', + 'regular' => '自定义正则' + ]; + + + + //控制器添加上传多图 + public static $controllerAddCode = <<uploadMulti('[FIELD_NAME]'); +if (\$file) { + \$param['[FIELD_NAME]'] = \$file; +} else { + return error(\$attachment_[FIELD_NAME]->getError()); +} +\n +EOF; + + //控制器修改上传多图 + public static $controllerEditCode = <<uploadMulti('[FIELD_NAME]'); + if (\$file) { + \$param['[FIELD_NAME]'] = \$file; + } else { + return error(\$attachment_[FIELD_NAME]->getError()); + } +} +\n +EOF; + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/MultiImage.php b/extend/generate/field/MultiImage.php new file mode 100755 index 0000000..87494a2 --- /dev/null +++ b/extend/generate/field/MultiImage.php @@ -0,0 +1,104 @@ + + */ + +namespace generate\field; + +class MultiImage extends Field +{ + public static $html = << + +
    + +
    + +\n +EOF; + + + //控制器添加上传多图 + public static $controllerAddCode = <<uploadMulti('[FIELD_NAME]'); +if (\$file) { + \$param['[FIELD_NAME]'] = \$file; +} else { + return error(\$attachment_[FIELD_NAME]->getError()); +} +\n +EOF; + + //控制器修改上传多图 + public static $controllerEditCode = <<uploadMulti('[FIELD_NAME]'); + if (\$file) { + \$param['[FIELD_NAME]'] = \$file; + } else { + return error(\$attachment_[FIELD_NAME]->getError()); + } +} +\n +EOF; + + + //多图上传模型内修改器与获取器 + public static $modelAttrCode = << '非空', + 'file_size' => '文件大小限制', + 'file_image' => '图片类型', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/MultiSelect.php b/extend/generate/field/MultiSelect.php new file mode 100755 index 0000000..b1ac39e --- /dev/null +++ b/extend/generate/field/MultiSelect.php @@ -0,0 +1,39 @@ + + */ + +namespace generate\field; + +class MultiSelect extends Field +{ + public static $html = << + +
    + + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/Number.php b/extend/generate/field/Number.php new file mode 100755 index 0000000..69fa2d9 --- /dev/null +++ b/extend/generate/field/Number.php @@ -0,0 +1,72 @@ + + */ + +namespace generate\field; + +class Number extends Field +{ + public static $html = << + +
    +
    + +
    +
    + +\n +EOF; + + public static $rules = [ + //非空 + 'required' => '非空', + //纯数字 + 'number' => '纯数字', + //整数 + 'integer' => '整数', + //在某个范围 + 'in:1,2,3' => '在某个范围', + //不在某个范围 + 'notIn:1,2,3' => '不在某个范围', + //长度在某个范围 + 'length:4,25' => '长度在某个范围', + //指定长度 + 'length:[LENGTH]' => '指定长度', + //最大长度 + 'max:[LENGTH]' => '最大长度', + //最小长度 + 'min:[LENGTH]' => '最小长度', + //浮点数 + 'float' => '浮点数', + //等于某个值 + 'eq:100' => '等于某个值', + //大于等于 + 'egt:60' => '大于等于', + //大于 + 'gt:60' => '大于', + //小于等于 + 'elt:60' => '小于等于', + //小于 + 'lt:60' => '小于', + //自定义正则 + // regex:\d{6} + 'regular' => '自定义正则' + ]; + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } + + +} \ No newline at end of file diff --git a/extend/generate/field/Password.php b/extend/generate/field/Password.php new file mode 100755 index 0000000..c0d893f --- /dev/null +++ b/extend/generate/field/Password.php @@ -0,0 +1,34 @@ + + */ + +namespace generate\field; + +class Password extends Field +{ + public static $html = << + +
    + +
    +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'simple_password' => '简单密码限制', + 'middle_password' => '中等密码限制', + 'complex_password' => '复杂密码限制', + 'number' => '纯数字', + 'length' => '固定长度', + 'regular' => '自定义正则' + ]; + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Province.php b/extend/generate/field/Province.php new file mode 100755 index 0000000..fac7023 --- /dev/null +++ b/extend/generate/field/Province.php @@ -0,0 +1,42 @@ + + */ + +namespace generate\field; + +class Province extends Field +{ + + public static $html = << + +
    +
    + + +
    +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Radio.php b/extend/generate/field/Radio.php new file mode 100755 index 0000000..df20ad1 --- /dev/null +++ b/extend/generate/field/Radio.php @@ -0,0 +1,31 @@ + + */ + +namespace generate\field; + +class Radio extends Field +{ + public static $html = << + +\n +EOF; + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/Select.php b/extend/generate/field/Select.php new file mode 100755 index 0000000..f95ff97 --- /dev/null +++ b/extend/generate/field/Select.php @@ -0,0 +1,39 @@ + + */ + +namespace generate\field; + +class Select extends Field +{ + + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + public static function create($data) + { + $html = self::$html; + $html = str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[RELATION_DATA]'), array($data['form_name'], $data['field_name']??'', $data['relation_data']), $html); + return $html; + } + +} \ No newline at end of file diff --git a/extend/generate/field/Street.php b/extend/generate/field/Street.php new file mode 100755 index 0000000..bdbdbd2 --- /dev/null +++ b/extend/generate/field/Street.php @@ -0,0 +1,45 @@ + + */ + +namespace generate\field; + +class Street extends Field +{ + + public static $html = << + +
    +
    + + +
    +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + $html = self::$html; + $html = str_replace('[FORM_NAME]', $data['form_name'], $html); + $html = str_replace('[FIELD_NAME]', $data['field_name'], $html); + return $html; + } +} \ No newline at end of file diff --git a/extend/generate/field/SwitchField.php b/extend/generate/field/SwitchField.php new file mode 100755 index 0000000..f9d3f1e --- /dev/null +++ b/extend/generate/field/SwitchField.php @@ -0,0 +1,55 @@ + + */ + +namespace generate\field; + +class SwitchField extends Field +{ + public static $html = << + +
    + + +
    +\n + +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + $html = self::$html; + //switch开的文字 + if (isset($data['on_text'])) { + $html = str_replace('[ON_TEXT]', $data['on_text'], $html); + } else { + $html = str_replace('[ON_TEXT]', '是', $html); + } + //switch关的文字 + if (isset($data['off_text'])) { + $html = str_replace('[OFF_TEXT]', $data['off_text'], $html); + } else { + $html = str_replace('[OFF_TEXT]', '否', $html); + } + + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), $html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Text.php b/extend/generate/field/Text.php new file mode 100755 index 0000000..f5a2d9c --- /dev/null +++ b/extend/generate/field/Text.php @@ -0,0 +1,40 @@ + + */ + +namespace generate\field; + +class Text extends Field +{ + + public static $html = << + +
    + +
    +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'account' => '账号', + 'cn_name' => '中文姓名', + 'wechat' => '微信', + 'qq' => 'QQ', + 'car_number' => '车牌号', + 'regular' => '自定义正则' + ]; + + public static function create($data) + { + + return str_replace( + array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), + array($data['form_name'], $data['field_name'], $data['field_default']), + self::$html); + + } + +} \ No newline at end of file diff --git a/extend/generate/field/Textarea.php b/extend/generate/field/Textarea.php new file mode 100755 index 0000000..e1c9183 --- /dev/null +++ b/extend/generate/field/Textarea.php @@ -0,0 +1,31 @@ + + */ + +namespace generate\field; + +class Textarea extends Field +{ + public static $html = << + +
    + +
    +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]', '[ROWS]'), array($data['form_name'], $data['field_name'], $data['field_default'], $data['rows'] ?? 3), self::$html); + + } +} \ No newline at end of file diff --git a/extend/generate/field/Time.php b/extend/generate/field/Time.php new file mode 100755 index 0000000..18b08e3 --- /dev/null +++ b/extend/generate/field/Time.php @@ -0,0 +1,37 @@ + + */ + +namespace generate\field; + +class Time extends Field +{ + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'time' => '时间', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/TimeRange.php b/extend/generate/field/TimeRange.php new file mode 100755 index 0000000..98f89b6 --- /dev/null +++ b/extend/generate/field/TimeRange.php @@ -0,0 +1,38 @@ + + */ + +namespace generate\field; + +class TimeRange extends Field +{ + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'time_range' => '时间范围', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Url.php b/extend/generate/field/Url.php new file mode 100755 index 0000000..25e3004 --- /dev/null +++ b/extend/generate/field/Url.php @@ -0,0 +1,31 @@ + + */ + +namespace generate\field; + +class Url extends Field +{ + public static $html = << + +
    + +
    +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'url' => 'URL', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/Year.php b/extend/generate/field/Year.php new file mode 100755 index 0000000..28c9445 --- /dev/null +++ b/extend/generate/field/Year.php @@ -0,0 +1,36 @@ + + */ + +namespace generate\field; + +class Year extends Field +{ + + public static $html = << + +
    + +
    + +\n +EOF; + public static $rules = [ + 'required' => '非空', + 'year' => '年', + 'regular' => '自定义正则' + ]; + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/YearMonth.php b/extend/generate/field/YearMonth.php new file mode 100755 index 0000000..ededae4 --- /dev/null +++ b/extend/generate/field/YearMonth.php @@ -0,0 +1,38 @@ + + */ + +namespace generate\field; + +class YearMonth extends Field +{ + + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'year_month' => '年月', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/YearMonthRange.php b/extend/generate/field/YearMonthRange.php new file mode 100755 index 0000000..01abb52 --- /dev/null +++ b/extend/generate/field/YearMonthRange.php @@ -0,0 +1,39 @@ + + */ + +namespace generate\field; + +class YearMonthRange extends Field +{ + + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'year_month_range' => '年月范围', + 'regular' => '自定义正则' + ]; + + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/field/YearRange.php b/extend/generate/field/YearRange.php new file mode 100755 index 0000000..497893f --- /dev/null +++ b/extend/generate/field/YearRange.php @@ -0,0 +1,38 @@ + + */ + +namespace generate\field; + +class YearRange extends Field +{ + + public static $html = << + +
    + +
    + +\n +EOF; + + public static $rules = [ + 'required' => '非空', + 'year' => '年范围', + 'regular' => '自定义正则' + ]; + + public static function create($data) + { + return str_replace(array('[FORM_NAME]', '[FIELD_NAME]', '[FIELD_DEFAULT]'), array($data['form_name'], $data['field_name'], $data['field_default']), self::$html); + } +} \ No newline at end of file diff --git a/extend/generate/rule/Required.php b/extend/generate/rule/Required.php new file mode 100755 index 0000000..ab5d11e --- /dev/null +++ b/extend/generate/rule/Required.php @@ -0,0 +1,29 @@ + 'require',\n +EOF; + + public static $msgValidate = << '[FORM_NAME]不能为空',\n +EOF; + + public static $ruleForm = <<param(); + $model = $model[RELATION_WITH]->scope('where', $param); + [EXPORT_CODE] + $data = $model->paginate($this->admin['per_page'], false, ['query'=>$request->get()]); + //关键词,排序等赋值 + $this->assign($request->get()); + + $this->assign([ + 'data' => $data, + 'page' => $data->render(), + 'total' => $data->total(), + ]); + return $this->fetch(); + } + + //添加 + public function add(Request $request, [MODEL_NAME] $model, [VALIDATE_NAME]Validate $validate) + { + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('add')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + [ADD_FIELD_CODE] + $result = $model::create($param); + + $url = URL_BACK; + if(isset($param['_create']) && $param['_create']==1){ + $url = URL_RELOAD; + } + + return $result ? success('添加成功',$url) : error(); + } + + [RELATION_2] + + return $this->fetch(); + } + + //修改 + public function edit($id, Request $request, [MODEL_NAME] $model, [VALIDATE_NAME]Validate $validate) + { + + $data = $model::get($id); + if ($request->isPost()) { + $param = $request->param(); + $validate_result = $validate->scene('edit')->check($param); + if (!$validate_result) { + return error($validate->getError()); + } + [EDIT_FIELD_CODE] + $result = $data->save($param); + return $result ? success() : error(); + } + + $this->assign([ + 'data' => $data, + [RELATION_3] + ]); + return $this->fetch('add'); + + } + + //删除 + public function del($id, [MODEL_NAME] $model) + { + if (count($model->noDeletionId) > 0) { + if (is_array($id)) { + if (array_intersect($model->noDeletionId, $id)) { + return error('ID为' . implode(',', $model->noDeletionId) . '的数据无法删除'); + } + } else if (in_array($id, $model->noDeletionId)) { + return error('ID为' . $id . '的数据无法删除'); + } + } + + if ($model->softDelete) { + $result = $model->whereIn('id', $id)->useSoftDelete('delete_time', time())->delete(); + } else { + $result = $model->whereIn('id', $id)->delete(); + } + + return $result ? success('操作成功', URL_RELOAD) : error(); + } + + [ENABLE_CODE] +} diff --git a/extend/generate/stub/Model.stub b/extend/generate/stub/Model.stub new file mode 100755 index 0000000..f932cbe --- /dev/null +++ b/extend/generate/stub/Model.stub @@ -0,0 +1,25 @@ +whereIn('id',$id)->update(['status'=>1]); + return $result ? success('操作成功', URL_RELOAD) : error(); +} + + +//禁用 +public function disable($id,[MODEL_NAME] $model) +{ + $result = $model->whereIn('id',$id)->update(['status'=>0]); + return $result ? success('操作成功', URL_RELOAD) : error(); +} \ No newline at end of file diff --git a/extend/generate/stub/controller/export.stub b/extend/generate/stub/controller/export.stub new file mode 100755 index 0000000..f68b0cd --- /dev/null +++ b/extend/generate/stub/controller/export.stub @@ -0,0 +1,11 @@ +if (isset($param['export_data']) && $param['export_data'] == 1) { + $header = [[HEADER_LIST]]; + $body = []; + $data = $model->select(); + foreach ($data as $item) { + $record = []; + [BODY_ITEM] + $body[] = $record; + } + return $this->exportData($header, $body, '[FILE_NAME]-' . date('Y-m-d-H-i-s')); +} \ No newline at end of file diff --git a/extend/generate/stub/controller/relation_assign_1.stub b/extend/generate/stub/controller/relation_assign_1.stub new file mode 100755 index 0000000..c15afa4 --- /dev/null +++ b/extend/generate/stub/controller/relation_assign_1.stub @@ -0,0 +1,4 @@ +$this->assign([ + [RELATION_LIST] +]); + diff --git a/extend/generate/stub/controller/relation_assign_2.stub b/extend/generate/stub/controller/relation_assign_2.stub new file mode 100755 index 0000000..8508d5a --- /dev/null +++ b/extend/generate/stub/controller/relation_assign_2.stub @@ -0,0 +1 @@ +'[LIST_NAME]' => [CLASS_NAME]::all(), diff --git a/extend/generate/stub/controller/relation_with.stub b/extend/generate/stub/controller/relation_with.stub new file mode 100755 index 0000000..530a603 --- /dev/null +++ b/extend/generate/stub/controller/relation_with.stub @@ -0,0 +1 @@ +->with('[WITH_LIST]') \ No newline at end of file diff --git a/extend/generate/stub/js/form_region_js.stub b/extend/generate/stub/js/form_region_js.stub new file mode 100755 index 0000000..d132f8f --- /dev/null +++ b/extend/generate/stub/js/form_region_js.stub @@ -0,0 +1,25 @@ + +var regionId = [[REGION_FIELD]]; +var regionHtml = [[REGION_TIPS]]; +$(function () { + {if !isset($data)} + getRegion(0, 0); + {/if} +}); +function getRegion(parent_id, level) { + clearSon(level); + var html = ''; + $.post('/admin/pub/getRegion', {parent_id: parent_id, level: level}, function (result) { + $.each(result, function (index, item) { + html += '' + }); + $(regionId[level]).html(html); + }); +} + +function clearSon(level) { + for(var i=level+1;i<=4;i++){ + var html = ''; + $(regionId[i]).html(html); + } +} \ No newline at end of file diff --git a/extend/generate/stub/model/getter_setter_date.stub b/extend/generate/stub/model/getter_setter_date.stub new file mode 100755 index 0000000..badc42b --- /dev/null +++ b/extend/generate/stub/model/getter_setter_date.stub @@ -0,0 +1,11 @@ +//[FORM_NAME]获取器 +public function get[FIELD_NAME]Attr($value) +{ + return date('Y-m-d',$value); +} + +//[FORM_NAME]修改器 +public function set[FIELD_NAME]Attr($value) +{ + return strtotime($value.' 00:00:00'); +} \ No newline at end of file diff --git a/extend/generate/stub/model/getter_setter_datetime.stub b/extend/generate/stub/model/getter_setter_datetime.stub new file mode 100755 index 0000000..f23d86a --- /dev/null +++ b/extend/generate/stub/model/getter_setter_datetime.stub @@ -0,0 +1,11 @@ +//[FORM_NAME]获取器 +public function get[FIELD_NAME]Attr($value) +{ + return date('Y-m-d H:i:s',$value); +} + +//[FORM_NAME]修改器 +public function set[FIELD_NAME]Attr($value) +{ + return strtotime($value); +} \ No newline at end of file diff --git a/extend/generate/stub/model/getter_setter_switch.stub b/extend/generate/stub/model/getter_setter_switch.stub new file mode 100755 index 0000000..41ddc72 --- /dev/null +++ b/extend/generate/stub/model/getter_setter_switch.stub @@ -0,0 +1,5 @@ +//[FORM_NAME]获取器 +public function get[FIELD_NAME]TextAttr($value, $data) +{ + return self::BOOLEAN_TEXT[$data['[FORM_NAME_LOWER]']]; +} \ No newline at end of file diff --git a/extend/generate/stub/model/relation.stub b/extend/generate/stub/model/relation.stub new file mode 100755 index 0000000..05b6539 --- /dev/null +++ b/extend/generate/stub/model/relation.stub @@ -0,0 +1,5 @@ +//关联[CN_NAME] +public function [RELATION_NAME]() +{ + return $this->[RELATION_TYPE]([CLASS_NAME]::class); +} \ No newline at end of file diff --git a/extend/generate/stub/model/relation_delete.stub b/extend/generate/stub/model/relation_delete.stub new file mode 100755 index 0000000..81bd3b7 --- /dev/null +++ b/extend/generate/stub/model/relation_delete.stub @@ -0,0 +1,15 @@ +//关联数据删除限制 +$msg_[FIELD_NAME] = '下有[FORM_NAME]数据,请删除[FORM_NAME]后再进行删除操作'; +if(is_array($id)){ + foreach ($id as $item){ + $data = $model::get($item); + if($data->school->count()>0){ + return error($data->name.$msg_[FIELD_NAME]); + } + } +}else{ + $data = $model::get($id); + if($data->school->count()>0){ + return error($data->name.$msg_[FIELD_NAME]); + } +} \ No newline at end of file diff --git a/extend/generate/stub/view/add.stub b/extend/generate/stub/view/add.stub new file mode 100755 index 0000000..a524cbc --- /dev/null +++ b/extend/generate/stub/view/add.stub @@ -0,0 +1,64 @@ +{extend name='public/base' /} +{block name='content'} +{include file='public/content_header' /} +
    +
    +
    +
    + + + +
    + +
    + [FORM_BODY] +
    + + +
    +
    +
    +
    +
    + +{/block} \ No newline at end of file diff --git a/extend/generate/stub/view/add/select_data.stub b/extend/generate/stub/view/add/select_data.stub new file mode 100755 index 0000000..4e45285 --- /dev/null +++ b/extend/generate/stub/view/add/select_data.stub @@ -0,0 +1,5 @@ +{foreach name='[DATA_LIST]' id='item'} + +{/foreach} \ No newline at end of file diff --git a/extend/generate/stub/view/index.stub b/extend/generate/stub/view/index.stub new file mode 100755 index 0000000..6a9f72f --- /dev/null +++ b/extend/generate/stub/view/index.stub @@ -0,0 +1,76 @@ +{extend name="public/base" /} +{block name='content'} +{include file='public/content_header' /} + +
    + + [INDEX_FILTER] + +
    +
    +
    + + +
    +
    + [INDEX_CREATE] + [INDEX_DEL1] + [INDEX_ENABLE1] + [INDEX_REFRESH] +
    +
    + +
    + + + + [INDEX_SELECT1] + [NAME_LIST] + + + + + {foreach name="data" item="item"} + + [INDEX_SELECT2] + [FIELD_LIST] + + + {/foreach} + +
    操作
    + + + + [INDEX_DEL2] + [INDEX_ENABLE2] +
    +
    + + + + +
    +
    +
    +
    + +{/block} + diff --git a/extend/generate/stub/view/index/create.stub b/extend/generate/stub/view/index/create.stub new file mode 100755 index 0000000..0f868b9 --- /dev/null +++ b/extend/generate/stub/view/index/create.stub @@ -0,0 +1,3 @@ + + 添加 + \ No newline at end of file diff --git a/extend/generate/stub/view/index/del1.stub b/extend/generate/stub/view/index/del1.stub new file mode 100755 index 0000000..3d84c6b --- /dev/null +++ b/extend/generate/stub/view/index/del1.stub @@ -0,0 +1,3 @@ + + 删除 + \ No newline at end of file diff --git a/extend/generate/stub/view/index/del2.stub b/extend/generate/stub/view/index/del2.stub new file mode 100755 index 0000000..62e2866 --- /dev/null +++ b/extend/generate/stub/view/index/del2.stub @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/extend/generate/stub/view/index/enable1.stub b/extend/generate/stub/view/index/enable1.stub new file mode 100755 index 0000000..e507c58 --- /dev/null +++ b/extend/generate/stub/view/index/enable1.stub @@ -0,0 +1,7 @@ + + 启用 + + + + 禁用 + diff --git a/extend/generate/stub/view/index/enable2.stub b/extend/generate/stub/view/index/enable2.stub new file mode 100755 index 0000000..8365174 --- /dev/null +++ b/extend/generate/stub/view/index/enable2.stub @@ -0,0 +1,9 @@ +{if $item.status==1} + + + +{else/} + + + +{/if} diff --git a/extend/generate/stub/view/index/export.stub b/extend/generate/stub/view/index/export.stub new file mode 100755 index 0000000..ffd9e81 --- /dev/null +++ b/extend/generate/stub/view/index/export.stub @@ -0,0 +1,4 @@ +
    + +
    \ No newline at end of file diff --git a/extend/generate/stub/view/index/filter.stub b/extend/generate/stub/view/index/filter.stub new file mode 100755 index 0000000..b284afd --- /dev/null +++ b/extend/generate/stub/view/index/filter.stub @@ -0,0 +1,29 @@ + +
    +
    +
    +
    +
    + +
    + +
    + + [SORT_CODE] + +
    + +
    + [INDEX_EXPORT] +
    + +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/extend/generate/stub/view/index/refresh.stub b/extend/generate/stub/view/index/refresh.stub new file mode 100755 index 0000000..22c4b4a --- /dev/null +++ b/extend/generate/stub/view/index/refresh.stub @@ -0,0 +1,3 @@ + + 刷新 + \ No newline at end of file diff --git a/extend/generate/stub/view/index/select1.stub b/extend/generate/stub/view/index/select1.stub new file mode 100755 index 0000000..12538fa --- /dev/null +++ b/extend/generate/stub/view/index/select1.stub @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/extend/generate/stub/view/index/select2.stub b/extend/generate/stub/view/index/select2.stub new file mode 100755 index 0000000..7b5af2e --- /dev/null +++ b/extend/generate/stub/view/index/select2.stub @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/extend/generate/stub/view/index/sort1.stub b/extend/generate/stub/view/index/sort1.stub new file mode 100755 index 0000000..a3e7077 --- /dev/null +++ b/extend/generate/stub/view/index/sort1.stub @@ -0,0 +1,4 @@ +
    + +
    + +
    + +
    + \ No newline at end of file diff --git a/extend/generate/stub/view/index/sort_option.stub b/extend/generate/stub/view/index/sort_option.stub new file mode 100755 index 0000000..11f9e7c --- /dev/null +++ b/extend/generate/stub/view/index/sort_option.stub @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/extend/generate/traits/Tools.php b/extend/generate/traits/Tools.php new file mode 100755 index 0000000..7940be9 --- /dev/null +++ b/extend/generate/traits/Tools.php @@ -0,0 +1,128 @@ +getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "smallint")) { + $type = 'smallint'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "mediumint")) { + $type = 'mediumint'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "int")) { + $type = 'int'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "bigint")) { + $type = 'bigint'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "float")) { + $type = 'float'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "double")) { + $type = 'double'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "decimal")) { + $type = 'decimal'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "char")) { + $type = 'char'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "varchar")) { + $type = 'varchar'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "tinytext")) { + $type = 'tinytext'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "tinyblob")) { + $type = 'tinyblob'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "text")) { + $type = 'text'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "blob")) { + $type = 'blob'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "longtext")) { + $type = 'longtext'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "longblob")) { + $type = 'longblob'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "date")) { + $type = 'date'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "datetime")) { + $type = 'datetime'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "timestamp")) { + $type = 'timestamp'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "time")) { + $type = 'time'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "year")) { + $type = 'year'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + + } else if (0 === strpos($field_type, "json")) { + $type = 'json'; + $length = $this->getMiddleStr($field_type, $type . '(', ')'); + } + return [ + 'name' => $field_name, + 'type' => $type, + 'length' => $length, + 'digit' => $digit, + ]; + } +} \ No newline at end of file diff --git a/extend/generate/util/Tree.php b/extend/generate/util/Tree.php new file mode 100755 index 0000000..d3a8dcc --- /dev/null +++ b/extend/generate/util/Tree.php @@ -0,0 +1,317 @@ + + */ + +namespace generate\util; + +use app\admin\model\AdminUser; + +trait Tree +{ + + public $text, $html; + /** + * 生成树型结构所需要的2维数组 + * @var array + */ + public $array; + + /** + * 生成树型结构所需修饰符号,可以换成图片 + * @var array + */ + public $icon = array('│', '├', '└'); + public $space = '  '; + /** + * @access private + */ + public $ret = ''; + + + /** + * 构造函数,初始化类 + * @param array $arr + * @return bool + */ + public function initTree($arr=[]) + { + $this->array = $arr; + $this->ret = ''; + $this->html = ''; + return is_array($arr); + } + + /** + * 得到树型结构 + * @param int $my_id ,表示获得这个ID下的所有子级 + * @param string $str 生成树型结构的基本代码,例如:"" + * @param int $sid 被选中的ID,比如在做树型下拉框的时候需要用到 + * @param string $adds + * @param string $str_group + * @return string + */ + public function getTree($my_id, $str, $sid = 0, $adds = '', $str_group = '') + { + $parent_id = ''; + $nstr = ''; + $number = 1; + $child = $this->getChild($my_id); + + if (is_array($child)) { + $total = count($child); + foreach ($child as $id => $value) { + $j = $k = ''; + if ($number == $total) { + $j .= $this->icon[2]; + } else { + $j .= $this->icon[1]; + $k = $adds ? $this->icon[0] : ''; + } + $spacer = $adds ? $adds . $j : ''; + $selected = $id == $sid ? 'selected' : ''; + @extract($value); + $parent_id == 0 && $str_group ? eval("\$nstr = \"$str_group\";") : eval("\$nstr = \"$str\";"); + $this->ret .= $nstr; + $space = $this->space; + $this->getTree($id, $str, $sid, $adds . $k . $space, $str_group); + $number++; + } + } + return $this->ret; + } + + /** + * 获取后台左侧菜单 + * @param $my_id + * @param $current_id + * @param $parent_ids + * @return mixed + */ + public function get_authTree($my_id, $current_id, $parent_ids) + { + + $nstr = ''; + $child = $this->getChild($my_id); + if (is_array($child)) { + $menu = current($child); + //获取当前等级的html + $text = isset($this->text[$menu['level']]) ? $this->text[$menu['level']] : end($this->text); + + foreach ($child as $k => $v) { + @extract($v); + + //如果有下级菜单 + if ($this->getChild($k)) { + + if (array_search($k, $parent_ids, true) !== false) { + //如果下级菜单是当前页面 + eval("\$nstr = \"$text[1]\";"); + $this->html .= $nstr; + } else { + //如果下级菜单不是当前页面 + eval("\$nstr = \"$text[0]\";"); + $this->html .= $nstr; + } + + + self::get_authTree($k, $current_id, $parent_ids); + eval("\$nstr = \"$text[2]\";"); + $this->html .= $nstr; + } else { + //顶级菜单,只有一级 + if ($k == $current_id) { + $a = $this->text['current']; + eval("\$nstr = \"$a\";"); + + $this->html .= $nstr; + } else { + $a = $this->text['other']; + eval("\$nstr = \"$a\";"); + $this->html .= $nstr; + } + } + } + } + + return $this->html; + } + + /** + * 得到子级数组 + * @param int $pid + * @return bool|array + */ + public function getChild($pid) + { + $result = []; + foreach ($this->array as $key => $value) { + if ($value['parent_id'] == $pid) + $result[$key] = $value; + } + return $result ?? false; + } + + /** + * 递归获取级别 + * @param int $id ID + * @param array $array 所有菜单 + * @param int $i 所在级别 + * @return int + */ + public function getLevel($id, $array, $i = 0) + { + if ($array[$id]['parent_id'] == 0 || empty($array[$array[$id]['parent_id']]) || $array[$id]['parent_id'] == $id) { + return $i; + } else { + $i++; + return self::getLevel($array[$id]['parent_id'], $array, $i); + } + } + + //获取权限树 + public function getAuthTreeAccess($my_id) + { + $id = ''; + $nstr = ''; + $child = $this->getChild($my_id); + + if (is_array($child)) { + $level = current($child); + $text = isset($this->text[$level['level']]) ? $this->text[$level['level']] : end($this->text); + + foreach ($child as $k => $v) { + @extract($v); + + if ($this->getChild($k)) { + eval("\$nstr = \"$text[0]\";"); + $this->html .= $nstr; + + self::getAuthTreeAccess($k); + + eval("\$nstr = \"$text[1]\";"); + $this->html .= $nstr; + } else { + $a = $this->text['other']; + eval("\$nstr = \"$a\";"); + $this->html .= $nstr; + } + } + } + return $this->html; + } + + + /** + * 获取左侧菜单 + * @param $user AdminUser + * @return mixed + */ + protected function getLeftMenu($user) + { + $menu = $user->getShowMenu(); + $max_level = 0; + $current_id = 1; + $parent_ids = array(0 => 0); + + + foreach ($menu as $k => $v) { + if ($v['url'] == $this->url) { + $parent_ids = $this->getMenuParent($menu, $v['id']); + $current_id = $v['id']; + } + } + if ($parent_ids == false) { + $parent_ids = array(0 => 0); + } + + + foreach ($menu as $k => $v) { + $url = url($v['url']); + $menu[$k]['icon'] = $v['icon']; + $menu[$k]['level'] = $this->getLevel($v['id'], $menu); + $max_level = $max_level <= $menu[$k]['level'] ? $menu[$k]['level'] : $max_level; + $menu[$k]['url'] = $url; + } + + $this->initTree($menu); + + $text_base_one = "
  • + + +\$name + + + + */ +class ErrorCode +{ + public static $OK = 0; + public static $IllegalAesKey = -41001; + public static $IllegalIv = -41002; + public static $IllegalBuffer = -41003; + public static $DecodeBase64Error = -41004; +} + +?> \ No newline at end of file diff --git a/index.html b/index.html new file mode 100755 index 0000000..ca49c32 --- /dev/null +++ b/index.html @@ -0,0 +1,40 @@ + + + + + 恭喜,站点创建成功! + + + +
    +

    恭喜, 站点创建成功!

    +

    这是默认index.html,本页面由系统自动生成

    +
      +
    • 本页面在FTP根目录下的index.html
    • +
    • 您可以修改、删除或覆盖本页面
    • +
    • FTP相关信息,请到“面板系统后台 > FTP” 查看
    • +
    • 更多功能了解,请查看宝塔官网(www.bt.cn)
    • +
    +
    + + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100755 index 0000000..a1b1c11 --- /dev/null +++ b/index.php @@ -0,0 +1,21 @@ + +// +---------------------------------------------------------------------- + +// [ 应用入口文件 ] +namespace think; + +// 加载基础文件 +require __DIR__ . '/./thinkphp/base.php'; + +// 支持事先使用静态方法设置Request对象和Config对象 + +// 执行应用并响应 +Container::get('app')->run()->send(); diff --git a/public/.htaccess b/public/.htaccess new file mode 100755 index 0000000..fe29386 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,7 @@ + + RewriteEngine on + RewriteBase / + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^(.*)$ index.php?s=/$1 [QSA,PT,L] + \ No newline at end of file diff --git a/public/123.php b/public/123.php new file mode 100755 index 0000000..8557b9a --- /dev/null +++ b/public/123.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/public/404.html b/public/404.html new file mode 100755 index 0000000..60be624 --- /dev/null +++ b/public/404.html @@ -0,0 +1,10 @@ + + + + + 404 + + +404 - Not Found. + + \ No newline at end of file diff --git a/public/demo/qrcode/1.png b/public/demo/qrcode/1.png new file mode 100755 index 0000000..1fc0ee0 Binary files /dev/null and b/public/demo/qrcode/1.png differ diff --git a/public/demo/qrcode/2.png b/public/demo/qrcode/2.png new file mode 100755 index 0000000..1fc0ee0 Binary files /dev/null and b/public/demo/qrcode/2.png differ diff --git a/public/demo/qrcode/3.png b/public/demo/qrcode/3.png new file mode 100755 index 0000000..71c47e2 Binary files /dev/null and b/public/demo/qrcode/3.png differ diff --git a/public/demo/qrcode/4.png b/public/demo/qrcode/4.png new file mode 100755 index 0000000..6b1302c Binary files /dev/null and b/public/demo/qrcode/4.png differ diff --git a/public/demo/qrcode/5.png b/public/demo/qrcode/5.png new file mode 100755 index 0000000..7f8c87e Binary files /dev/null and b/public/demo/qrcode/5.png differ diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100755 index 0000000..1021a65 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/favicon.png b/public/favicon.png new file mode 100755 index 0000000..0d4af5b Binary files /dev/null and b/public/favicon.png differ diff --git a/public/index.php b/public/index.php new file mode 100755 index 0000000..65b63c1 --- /dev/null +++ b/public/index.php @@ -0,0 +1,19 @@ + +// +---------------------------------------------------------------------- + +// [ 应用入口文件 ] +namespace think; +// 加载基础文件 +require __DIR__ . '/../thinkphp/base.php'; +// 支持事先使用静态方法设置Request对象和Config对象 + +// 执行应用并响应 +Container::get('app')->run()->send(); diff --git a/public/kdn.php b/public/kdn.php new file mode 100755 index 0000000..0ac63ec --- /dev/null +++ b/public/kdn.php @@ -0,0 +1,91 @@ + EBusinessID, + 'RequestType' => '1002', + 'RequestData' => urlencode($requestData), + 'DataType' => '2', + ); + $datas['DataSign'] = encrypt($requestData, AppKey); + //根据公司业务处理返回的信息...... + + + + + return sendPost(ReqURL, $datas); +} + +/** + * post提交数据 + * @param string $url 请求Url + * @param array $datas 提交的数据 + * @return url响应返回的html + */ +function sendPost($url, $datas) +{ + $temps = array(); + foreach ($datas as $key => $value) { + $temps[] = sprintf('%s=%s', $key, $value); + } + $post_data = implode('&', $temps); + $url_info = parse_url($url); + if (empty($url_info['port'])) { + $url_info['port'] = 80; + } + $httpheader = "POST " . $url_info['path'] . " HTTP/1.0\r\n"; + $httpheader .= "Host:" . $url_info['host'] . "\r\n"; + $httpheader .= "Content-Type:application/x-www-form-urlencoded\r\n"; + $httpheader .= "Content-Length:" . strlen($post_data) . "\r\n"; + $httpheader .= "Connection:close\r\n\r\n"; + $httpheader .= $post_data; + $fd = fsockopen($url_info['host'], $url_info['port']); + fwrite($fd, $httpheader); + $gets = ""; + $headerFlag = true; + while (!feof($fd)) { + if (($header = @fgets($fd)) && ($header == "\r\n" || $header == "\n")) { + break; + } + } + while (!feof($fd)) { + $gets .= fread($fd, 128); + } + fclose($fd); + + return $gets; +} + +/** + * 电商Sign签名生成 + * @param data 内容 + * @param appkey Appkey + * @return DataSign签名 + */ +function encrypt($data, $appkey) +{ + return urlencode(base64_encode(md5($data . $appkey))); +} + diff --git a/public/nginx.htaccess b/public/nginx.htaccess new file mode 100755 index 0000000..e69de29 diff --git a/public/robots.txt b/public/robots.txt new file mode 100755 index 0000000..eb05362 --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: diff --git a/public/router.php b/public/router.php new file mode 100755 index 0000000..4f916b4 --- /dev/null +++ b/public/router.php @@ -0,0 +1,17 @@ + +// +---------------------------------------------------------------------- +// $Id$ + +if (is_file($_SERVER["DOCUMENT_ROOT"] . $_SERVER["SCRIPT_NAME"])) { + return false; +} else { + require __DIR__ . "/index.php"; +} diff --git a/public/static/admin/css/AdminLTE.min.css b/public/static/admin/css/AdminLTE.min.css new file mode 100755 index 0000000..a6bcfa0 --- /dev/null +++ b/public/static/admin/css/AdminLTE.min.css @@ -0,0 +1,8 @@ +/*! + * AdminLTE v2.4.17 + * + * Author: Colorlib + * Support: + * Repository: git://github.com/ColorlibHQ/AdminLTE.git + * License: MIT + */html,body{height:100%}.layout-boxed html,.layout-boxed body{height:100%}body{font-family:'Source Sans Pro','Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:400;overflow-x:hidden;overflow-y:auto}.wrapper{height:100%;position:relative;overflow-x:hidden;overflow-y:auto}.wrapper:before,.wrapper:after{content:" ";display:table}.wrapper:after{clear:both}.layout-boxed .wrapper{max-width:1250px;margin:0 auto;min-height:100%;box-shadow:0 0 8px rgba(0,0,0,0.5);position:relative}.layout-boxed{background-color:#f9fafc}.content-wrapper,.main-footer{-webkit-transition:-webkit-transform .3s ease-in-out,margin .3s ease-in-out;-moz-transition:-moz-transform .3s ease-in-out,margin .3s ease-in-out;-o-transition:-o-transform .3s ease-in-out,margin .3s ease-in-out;transition:transform .3s ease-in-out,margin .3s ease-in-out;margin-left:230px;z-index:820}.layout-top-nav .content-wrapper,.layout-top-nav .main-footer{margin-left:0}@media (max-width:767px){.content-wrapper,.main-footer{margin-left:0}}@media (min-width:768px){.sidebar-collapse .content-wrapper,.sidebar-collapse .main-footer{margin-left:0}}@media (max-width:767px){.sidebar-open .content-wrapper,.sidebar-open .main-footer{-webkit-transform:translate(230px, 0);-ms-transform:translate(230px, 0);-o-transform:translate(230px, 0);transform:translate(230px, 0)}}.content-wrapper{min-height:calc(100vh - 101px);background-color:#ecf0f5;z-index:800}@media (max-width:767px){.content-wrapper{min-height:calc(100vh - 151px)}}.main-footer{background:#fff;padding:15px;color:#444;border-top:1px solid #d2d6de}.fixed .main-header,.fixed .main-sidebar,.fixed .left-side{position:fixed}.fixed .main-header{top:0;right:0;left:0}.fixed .content-wrapper,.fixed .right-side{padding-top:50px}@media (max-width:767px){.fixed .content-wrapper,.fixed .right-side{padding-top:100px}}.fixed.layout-boxed .wrapper{max-width:100%}.fixed .wrapper{overflow:hidden}.hold-transition .content-wrapper,.hold-transition .right-side,.hold-transition .main-footer,.hold-transition .main-sidebar,.hold-transition .left-side,.hold-transition .main-header .navbar,.hold-transition .main-header .logo,.hold-transition .menu-open .fa-angle-left{-webkit-transition:none;-o-transition:none;transition:none}.content{min-height:250px;padding:15px;margin-right:auto;margin-left:auto;padding-left:15px;padding-right:15px}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:'Source Sans Pro',sans-serif}a{color:#3c8dbc}a:hover,a:active,a:focus{outline:none;text-decoration:none;color:#72afd2}.page-header{margin:10px 0 20px 0;font-size:22px}.page-header>small{color:#666;display:block;margin-top:5px}.main-header{position:relative;max-height:100px;z-index:1030}.main-header .navbar{-webkit-transition:margin-left .3s ease-in-out;-o-transition:margin-left .3s ease-in-out;transition:margin-left .3s ease-in-out;margin-bottom:0;margin-left:230px;border:none;min-height:50px;border-radius:0}.layout-top-nav .main-header .navbar{margin-left:0}.main-header #navbar-search-input.form-control{background:rgba(255,255,255,0.2);border-color:transparent}.main-header #navbar-search-input.form-control:focus,.main-header #navbar-search-input.form-control:active{border-color:rgba(0,0,0,0.1);background:rgba(255,255,255,0.9)}.main-header #navbar-search-input.form-control::-moz-placeholder{color:#ccc;opacity:1}.main-header #navbar-search-input.form-control:-ms-input-placeholder{color:#ccc}.main-header #navbar-search-input.form-control::-webkit-input-placeholder{color:#ccc}.main-header .navbar-custom-menu,.main-header .navbar-right{float:right}@media (max-width:991px){.main-header .navbar-custom-menu a,.main-header .navbar-right a{color:inherit;background:transparent}}@media (max-width:767px){.main-header .navbar-right{float:none}.navbar-collapse .main-header .navbar-right{margin:7.5px -15px}.main-header .navbar-right>li{color:inherit;border:0}}.main-header .sidebar-toggle{float:left;background-color:transparent;background-image:none;padding:15px 15px;font-family:fontAwesome}.main-header .sidebar-toggle:before{content:"\f0c9"}.main-header .sidebar-toggle:hover{color:#fff}.main-header .sidebar-toggle:focus,.main-header .sidebar-toggle:active{background:transparent}.main-header .sidebar-toggle.fa5{font-family:"Font Awesome\ 5 Free"}.main-header .sidebar-toggle.fa5:before{content:"\f0c9";font-weight:900}.main-header .sidebar-toggle .icon-bar{display:none}.main-header .navbar .nav>li.user>a>.fa,.main-header .navbar .nav>li.user>a>.glyphicon,.main-header .navbar .nav>li.user>a>.ion{margin-right:5px}.main-header .navbar .nav>li>a>.label{position:absolute;top:9px;right:7px;text-align:center;font-size:9px;padding:2px 3px;line-height:.9}.main-header .logo{-webkit-transition:width .3s ease-in-out;-o-transition:width .3s ease-in-out;transition:width .3s ease-in-out;display:block;float:left;height:50px;font-size:20px;line-height:50px;text-align:center;width:230px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;padding:0 15px;font-weight:300;overflow:hidden}.main-header .logo img{padding:4px;object-fit:contain;margin:0 auto}.main-header .logo .logo-lg{display:block}.main-header .logo .logo-lg img{max-width:200px;max-height:50px}.main-header .logo .logo-lg .brandlogo-image{margin-top:8px;margin-right:10px;margin-left:-5px}.main-header .logo .logo-mini{display:none}.main-header .logo .logo-mini img{max-width:50px;max-height:50px}.main-header .logo .logo-mini .brandlogo-image{margin-top:8px;margin-right:10px;margin-left:10px}.main-header .logo .brandlogo-image{float:left;height:34px;width:auto}.main-header .navbar-brand{color:#fff}.content-header{position:relative;padding:15px 15px 0 15px}.content-header>h1{margin:0;font-size:24px}.content-header>h1>small{font-size:15px;display:inline-block;padding-left:4px;font-weight:300}.content-header>.breadcrumb{float:right;background:transparent;margin-top:0;margin-bottom:0;font-size:12px;padding:7px 5px;position:absolute;top:15px;right:10px;border-radius:2px}.content-header>.breadcrumb>li>a{color:#444;text-decoration:none;display:inline-block}.content-header>.breadcrumb>li>a>.fa,.content-header>.breadcrumb>li>a>.glyphicon,.content-header>.breadcrumb>li>a>.ion{margin-right:5px}.content-header>.breadcrumb>li+li:before{content:'>\00a0'}@media (max-width:991px){.content-header>.breadcrumb{position:relative;margin-top:5px;top:0;right:0;float:none;background:#d2d6de;padding-left:10px}.content-header>.breadcrumb li:before{color:#97a0b3}}.navbar-toggle{color:#fff;border:0;margin:0;padding:15px 15px}@media (max-width:991px){.navbar-custom-menu .navbar-nav>li{float:left}.navbar-custom-menu .navbar-nav{margin:0;float:left}.navbar-custom-menu .navbar-nav>li>a{padding-top:15px;padding-bottom:15px;line-height:20px}}@media (max-width:767px){.main-header{position:relative}.main-header .logo,.main-header .navbar{width:100%;float:none}.main-header .navbar{margin:0}.main-header .navbar-custom-menu{float:right}}@media (max-width:991px){.navbar-collapse.pull-left{float:none !important}.navbar-collapse.pull-left+.navbar-custom-menu{display:block;position:absolute;top:0;right:40px}}.main-sidebar{position:absolute;top:0;left:0;padding-top:50px;min-height:100%;width:230px;z-index:810;-webkit-transition:-webkit-transform .3s ease-in-out,width .3s ease-in-out;-moz-transition:-moz-transform .3s ease-in-out,width .3s ease-in-out;-o-transition:-o-transform .3s ease-in-out,width .3s ease-in-out;transition:transform .3s ease-in-out,width .3s ease-in-out}@media (max-width:767px){.main-sidebar{padding-top:100px}}@media (max-width:767px){.main-sidebar{-webkit-transform:translate(-230px, 0);-ms-transform:translate(-230px, 0);-o-transform:translate(-230px, 0);transform:translate(-230px, 0)}}@media (min-width:768px){.sidebar-collapse .main-sidebar{-webkit-transform:translate(-230px, 0);-ms-transform:translate(-230px, 0);-o-transform:translate(-230px, 0);transform:translate(-230px, 0)}}@media (max-width:767px){.sidebar-open .main-sidebar{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}}.sidebar{padding-bottom:10px}.sidebar-form input:focus{border-color:transparent}.user-panel{position:relative;width:100%;padding:10px;overflow:hidden}.user-panel:before,.user-panel:after{content:" ";display:table}.user-panel:after{clear:both}.user-panel>.image>img{width:100%;max-width:45px;height:auto}.user-panel>.info{padding:5px 5px 5px 15px;line-height:1;position:absolute;left:55px}.user-panel>.info>p{font-weight:600;margin-bottom:9px}.user-panel>.info>a{text-decoration:none;padding-right:5px;margin-top:3px;font-size:11px}.user-panel>.info>a>.fa,.user-panel>.info>a>.ion,.user-panel>.info>a>.glyphicon{margin-right:3px}.sidebar-menu{list-style:none;margin:0;padding:0}.sidebar-menu>li{position:relative;margin:0;padding:0}.sidebar-menu>li>a{padding:12px 5px 12px 15px;display:block}.sidebar-menu>li>a>.fa,.sidebar-menu>li>a>.glyphicon,.sidebar-menu>li>a>.ion{width:20px}.sidebar-menu>li .label,.sidebar-menu>li .badge{margin-right:5px}.sidebar-menu>li .badge{margin-top:3px}.sidebar-menu li.header{padding:10px 25px 10px 15px;font-size:12px}.sidebar-menu li>a>.fa-angle-left,.sidebar-menu li>a>.pull-right-container>.fa-angle-left{width:auto;height:auto;padding:0;margin-right:10px;-webkit-transition:transform .5s ease;-o-transition:transform .5s ease;transition:transform .5s ease}.sidebar-menu li>a>.fa-angle-left{position:absolute;top:50%;right:10px;margin-top:-8px}.sidebar-menu .menu-open>a>.fa-angle-left,.sidebar-menu .menu-open>a>.pull-right-container>.fa-angle-left{-webkit-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.sidebar-menu .active>.treeview-menu{display:block}@media (min-width:768px){.sidebar-mini.sidebar-collapse .content-wrapper,.sidebar-mini.sidebar-collapse .right-side,.sidebar-mini.sidebar-collapse .main-footer{margin-left:50px !important;z-index:840}.sidebar-mini.sidebar-collapse .main-sidebar{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0);width:50px !important;z-index:850}.sidebar-mini.sidebar-collapse .sidebar-menu>li{position:relative}.sidebar-mini.sidebar-collapse .sidebar-menu>li>a{margin-right:0}.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>span{border-top-right-radius:4px}.sidebar-mini.sidebar-collapse .sidebar-menu>li:not(.treeview)>a>span{border-bottom-right-radius:4px}.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{padding-top:5px;padding-bottom:5px;border-bottom-right-radius:4px}.sidebar-mini.sidebar-collapse .main-sidebar .user-panel>.info,.sidebar-mini.sidebar-collapse .sidebar-form,.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>span,.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu,.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>.pull-right,.sidebar-mini.sidebar-collapse .sidebar-menu>li>a>span>.pull-right,.sidebar-mini.sidebar-collapse .sidebar-menu li.header{display:none !important;-webkit-transform:translateZ(0)}.sidebar-mini.sidebar-collapse .main-header .logo{width:50px}.sidebar-mini.sidebar-collapse .main-header .logo>.logo-mini{display:block;margin-left:-15px;margin-right:-15px;font-size:18px}.sidebar-mini.sidebar-collapse .main-header .logo>.logo-lg{display:none}.sidebar-mini.sidebar-collapse .main-header .navbar{margin-left:50px}}@media (min-width:768px){.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>a>span:not(.pull-right),.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>.treeview-menu{display:block !important;position:absolute;width:180px;left:50px}.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>a>span{top:0;margin-left:-3px;padding:12px 5px 12px 20px;background-color:inherit}.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>a>.pull-right-container{position:relative !important;float:right;width:auto !important;left:180px !important;top:-22px !important;z-index:900}.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>a>.pull-right-container>.label:not(:first-of-type){display:none}.sidebar-mini:not(.sidebar-mini-expand-feature).sidebar-collapse .sidebar-menu>li:hover>.treeview-menu{top:44px;margin-left:0}}.sidebar-expanded-on-hover .main-footer,.sidebar-expanded-on-hover .content-wrapper{margin-left:50px}.sidebar-expanded-on-hover .main-sidebar{box-shadow:3px 0 8px rgba(0,0,0,0.125)}.sidebar-menu,.main-sidebar .user-panel,.sidebar-menu>li.header{white-space:nowrap;overflow:hidden}.sidebar-menu:hover{overflow:visible}.sidebar-form,.sidebar-menu>li.header{overflow:hidden;text-overflow:clip}.sidebar-menu li>a{position:relative}.sidebar-menu li>a>.pull-right-container{position:absolute;right:10px;top:50%;margin-top:-7px}.control-sidebar-bg{position:fixed;z-index:1000;bottom:0}.control-sidebar-bg,.control-sidebar{top:0;right:-230px;width:230px;-webkit-transition:right .3s ease-in-out;-o-transition:right .3s ease-in-out;transition:right .3s ease-in-out}.control-sidebar{position:absolute;padding-top:50px;z-index:1010}@media (max-width:767px){.control-sidebar{padding-top:100px}}.control-sidebar>.tab-content{padding:10px 15px}.control-sidebar.control-sidebar-open,.control-sidebar.control-sidebar-open+.control-sidebar-bg{right:0}.control-sidebar-hold-transition .control-sidebar-bg,.control-sidebar-hold-transition .control-sidebar,.control-sidebar-hold-transition .content-wrapper{transition:none}.control-sidebar-open .control-sidebar-bg,.control-sidebar-open .control-sidebar{right:0}@media (min-width:768px){.control-sidebar-open .content-wrapper,.control-sidebar-open .right-side,.control-sidebar-open .main-footer{margin-right:230px}}.fixed .control-sidebar{position:fixed;height:100%;overflow-y:auto;padding-bottom:50px}.nav-tabs.control-sidebar-tabs>li:first-of-type>a,.nav-tabs.control-sidebar-tabs>li:first-of-type>a:hover,.nav-tabs.control-sidebar-tabs>li:first-of-type>a:focus{border-left-width:0}.nav-tabs.control-sidebar-tabs>li>a{border-radius:0}.nav-tabs.control-sidebar-tabs>li>a,.nav-tabs.control-sidebar-tabs>li>a:hover{border-top:none;border-right:none;border-left:1px solid transparent;border-bottom:1px solid transparent}.nav-tabs.control-sidebar-tabs>li>a .icon{font-size:16px}.nav-tabs.control-sidebar-tabs>li.active>a,.nav-tabs.control-sidebar-tabs>li.active>a:hover,.nav-tabs.control-sidebar-tabs>li.active>a:focus,.nav-tabs.control-sidebar-tabs>li.active>a:active{border-top:none;border-right:none;border-bottom:none}@media (max-width:768px){.nav-tabs.control-sidebar-tabs{display:table}.nav-tabs.control-sidebar-tabs>li{display:table-cell}}.control-sidebar-heading{font-weight:400;font-size:16px;padding:10px 0;margin-bottom:10px}.control-sidebar-subheading{display:block;font-weight:400;font-size:14px}.control-sidebar-menu{list-style:none;padding:0;margin:0 -15px}.control-sidebar-menu>li>a{display:block;padding:10px 15px}.control-sidebar-menu>li>a:before,.control-sidebar-menu>li>a:after{content:" ";display:table}.control-sidebar-menu>li>a:after{clear:both}.control-sidebar-menu>li>a>.control-sidebar-subheading{margin-top:0}.control-sidebar-menu .menu-icon{float:left;width:35px;height:35px;border-radius:50%;text-align:center;line-height:35px}.control-sidebar-menu .menu-info{margin-left:45px;margin-top:3px}.control-sidebar-menu .menu-info>.control-sidebar-subheading{margin:0}.control-sidebar-menu .menu-info>p{margin:0;font-size:11px}.control-sidebar-menu .progress{margin:0}.control-sidebar-dark{color:#b8c7ce}.control-sidebar-dark,.control-sidebar-dark+.control-sidebar-bg{background:#222d32}.control-sidebar-dark .nav-tabs.control-sidebar-tabs{border-bottom:#1c2529}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a{background:#181f23;color:#b8c7ce}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:hover,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:focus{border-left-color:#141a1d;border-bottom-color:#141a1d}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:hover,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:focus,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:active{background:#1c2529}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li>a:hover{color:#fff}.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li.active>a,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li.active>a:hover,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li.active>a:focus,.control-sidebar-dark .nav-tabs.control-sidebar-tabs>li.active>a:active{background:#222d32;color:#fff}.control-sidebar-dark .control-sidebar-heading,.control-sidebar-dark .control-sidebar-subheading{color:#fff}.control-sidebar-dark .control-sidebar-menu>li>a:hover{background:#1e282c}.control-sidebar-dark .control-sidebar-menu>li>a .menu-info>p{color:#b8c7ce}.control-sidebar-light{color:#5e5e5e}.control-sidebar-light,.control-sidebar-light+.control-sidebar-bg{background:#f9fafc;border-left:1px solid #d2d6de}.control-sidebar-light .nav-tabs.control-sidebar-tabs{border-bottom:#d2d6de}.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a{background:#e8ecf4;color:#444}.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:hover,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:focus{border-left-color:#d2d6de;border-bottom-color:#d2d6de}.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:hover,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:focus,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li>a:active{background:#eff1f7}.control-sidebar-light .nav-tabs.control-sidebar-tabs>li.active>a,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li.active>a:hover,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li.active>a:focus,.control-sidebar-light .nav-tabs.control-sidebar-tabs>li.active>a:active{background:#f9fafc;color:#111}.control-sidebar-light .control-sidebar-heading,.control-sidebar-light .control-sidebar-subheading{color:#111}.control-sidebar-light .control-sidebar-menu{margin-left:-14px}.control-sidebar-light .control-sidebar-menu>li>a:hover{background:#f4f4f5}.control-sidebar-light .control-sidebar-menu>li>a .menu-info>p{color:#5e5e5e}.dropdown-menu{box-shadow:none;border-color:#eee}.dropdown-menu>li>a{color:#777}.dropdown-menu>li>a>.glyphicon,.dropdown-menu>li>a>.fa,.dropdown-menu>li>a>.ion{margin-right:10px}.dropdown-menu>li>a:hover{background-color:#e1e3e9;color:#333}.dropdown-menu>.divider{background-color:#eee}.navbar-nav>.notifications-menu>.dropdown-menu,.navbar-nav>.messages-menu>.dropdown-menu,.navbar-nav>.tasks-menu>.dropdown-menu{width:280px;padding:0 0 0 0;margin:0;top:100%}.navbar-nav>.notifications-menu>.dropdown-menu>li,.navbar-nav>.messages-menu>.dropdown-menu>li,.navbar-nav>.tasks-menu>.dropdown-menu>li{position:relative}.navbar-nav>.notifications-menu>.dropdown-menu>li.header,.navbar-nav>.messages-menu>.dropdown-menu>li.header,.navbar-nav>.tasks-menu>.dropdown-menu>li.header{border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0;background-color:#ffffff;padding:7px 10px;border-bottom:1px solid #f4f4f4;color:#444444;font-size:14px}.navbar-nav>.notifications-menu>.dropdown-menu>li.footer>a,.navbar-nav>.messages-menu>.dropdown-menu>li.footer>a,.navbar-nav>.tasks-menu>.dropdown-menu>li.footer>a{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px;font-size:12px;background-color:#fff;padding:7px 10px;border-bottom:1px solid #eeeeee;color:#444 !important;text-align:center}@media (max-width:991px){.navbar-nav>.notifications-menu>.dropdown-menu>li.footer>a,.navbar-nav>.messages-menu>.dropdown-menu>li.footer>a,.navbar-nav>.tasks-menu>.dropdown-menu>li.footer>a{background:#fff !important;color:#444 !important}}.navbar-nav>.notifications-menu>.dropdown-menu>li.footer>a:hover,.navbar-nav>.messages-menu>.dropdown-menu>li.footer>a:hover,.navbar-nav>.tasks-menu>.dropdown-menu>li.footer>a:hover{text-decoration:none;font-weight:normal}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu,.navbar-nav>.messages-menu>.dropdown-menu>li .menu,.navbar-nav>.tasks-menu>.dropdown-menu>li .menu{max-height:200px;margin:0;padding:0;list-style:none;overflow-x:hidden}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a,.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a,.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a{display:block;white-space:nowrap;border-bottom:1px solid #f4f4f4}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a:hover,.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a:hover,.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a:hover{background:#f4f4f4;text-decoration:none}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a{color:#444444;overflow:hidden;text-overflow:ellipsis;padding:10px}.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a>.glyphicon,.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a>.fa,.navbar-nav>.notifications-menu>.dropdown-menu>li .menu>li>a>.ion{width:20px}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a{margin:0;padding:10px 10px}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>div>img{margin:auto 10px auto auto;width:40px;height:40px}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>h4{padding:0;margin:0 0 0 45px;color:#444444;font-size:15px;position:relative}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>h4>small{color:#999999;font-size:10px;position:absolute;top:0;right:0}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a>p{margin:0 0 0 45px;font-size:12px;color:#888888}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a:before,.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a:after{content:" ";display:table}.navbar-nav>.messages-menu>.dropdown-menu>li .menu>li>a:after{clear:both}.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a{padding:10px}.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a>h3{font-size:14px;padding:0;margin:0 0 10px 0;color:#666666}.navbar-nav>.tasks-menu>.dropdown-menu>li .menu>li>a>.progress{padding:0;margin:0}.navbar-nav>.user-menu>.dropdown-menu{border-top-right-radius:0;border-top-left-radius:0;padding:1px 0 0 0;border-top-width:0;width:280px}.navbar-nav>.user-menu>.dropdown-menu,.navbar-nav>.user-menu>.dropdown-menu>.user-body{border-bottom-right-radius:4px;border-bottom-left-radius:4px}.navbar-nav>.user-menu>.dropdown-menu>li.user-header{height:175px;padding:10px;text-align:center}.navbar-nav>.user-menu>.dropdown-menu>li.user-header>img{z-index:5;height:90px;width:90px;border:3px solid;border-color:transparent;border-color:rgba(255,255,255,0.2)}.navbar-nav>.user-menu>.dropdown-menu>li.user-header>p{z-index:5;color:#fff;color:rgba(255,255,255,0.8);font-size:17px;margin-top:10px}.navbar-nav>.user-menu>.dropdown-menu>li.user-header>p>small{display:block;font-size:12px}.navbar-nav>.user-menu>.dropdown-menu>.user-body{padding:15px;border-bottom:1px solid #f4f4f4;border-top:1px solid #dddddd}.navbar-nav>.user-menu>.dropdown-menu>.user-body:before,.navbar-nav>.user-menu>.dropdown-menu>.user-body:after{content:" ";display:table}.navbar-nav>.user-menu>.dropdown-menu>.user-body:after{clear:both}.navbar-nav>.user-menu>.dropdown-menu>.user-body a{color:#444 !important}@media (max-width:991px){.navbar-nav>.user-menu>.dropdown-menu>.user-body a{background:#fff !important;color:#444 !important}}.navbar-nav>.user-menu>.dropdown-menu>.user-footer{background-color:#f9f9f9;padding:10px}.navbar-nav>.user-menu>.dropdown-menu>.user-footer:before,.navbar-nav>.user-menu>.dropdown-menu>.user-footer:after{content:" ";display:table}.navbar-nav>.user-menu>.dropdown-menu>.user-footer:after{clear:both}.navbar-nav>.user-menu>.dropdown-menu>.user-footer .btn-default{color:#666666}@media (max-width:991px){.navbar-nav>.user-menu>.dropdown-menu>.user-footer .btn-default:hover{background-color:#f9f9f9}}.navbar-nav>.user-menu .user-image{float:left;width:25px;height:25px;border-radius:50%;margin-right:10px;margin-top:-2px}@media (max-width:767px){.navbar-nav>.user-menu .user-image{float:none;margin-right:0;margin-top:-8px;line-height:10px}}.open:not(.dropup)>.animated-dropdown-menu{backface-visibility:visible !important;-webkit-animation:flipInX .7s both;-o-animation:flipInX .7s both;animation:flipInX .7s both}@keyframes flipInX{0%{transform:perspective(400px) rotate3d(1, 0, 0, 90deg);transition-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotate3d(1, 0, 0, -20deg);transition-timing-function:ease-in}60%{transform:perspective(400px) rotate3d(1, 0, 0, 10deg);opacity:1}80%{transform:perspective(400px) rotate3d(1, 0, 0, -5deg)}100%{transform:perspective(400px)}}@-webkit-keyframes flipInX{0%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, 90deg);-webkit-transition-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, -20deg);-webkit-transition-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, 10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1, 0, 0, -5deg)}100%{-webkit-transform:perspective(400px)}}.navbar-custom-menu>.navbar-nav>li{position:relative}.navbar-custom-menu>.navbar-nav>li>.dropdown-menu{position:absolute;right:0;left:auto}@media (max-width:991px){.navbar-custom-menu>.navbar-nav{float:right}.navbar-custom-menu>.navbar-nav>li{position:static}.navbar-custom-menu>.navbar-nav>li>.dropdown-menu{position:absolute;right:5%;left:auto;border:1px solid #ddd;background:#fff}}.form-control{border-radius:0;box-shadow:none;border-color:#d2d6de}.form-control:focus{border-color:#3c8dbc;box-shadow:none}.form-control::-moz-placeholder,.form-control:-ms-input-placeholder,.form-control::-webkit-input-placeholder{color:#bbb;opacity:1}.form-control:not(select){-webkit-appearance:none;-moz-appearance:none;appearance:none}.form-group.has-success label{color:#00a65a}.form-group.has-success .form-control,.form-group.has-success .input-group-addon{border-color:#00a65a;box-shadow:none}.form-group.has-success .help-block{color:#00a65a}.form-group.has-warning label{color:#f39c12}.form-group.has-warning .form-control,.form-group.has-warning .input-group-addon{border-color:#f39c12;box-shadow:none}.form-group.has-warning .help-block{color:#f39c12}.form-group.has-error label{color:#dd4b39}.form-group.has-error .form-control,.form-group.has-error .input-group-addon{border-color:#dd4b39;box-shadow:none}.form-group.has-error .help-block{color:#dd4b39}.input-group .input-group-addon{border-radius:0;border-color:#d2d6de;background-color:#fff}.btn-group-vertical .btn.btn-flat:first-of-type,.btn-group-vertical .btn.btn-flat:last-of-type{border-radius:0}.icheck>label{padding-left:0}.form-control-feedback.fa{line-height:34px}.input-lg+.form-control-feedback.fa,.input-group-lg+.form-control-feedback.fa,.form-group-lg .form-control+.form-control-feedback.fa{line-height:46px}.input-sm+.form-control-feedback.fa,.input-group-sm+.form-control-feedback.fa,.form-group-sm .form-control+.form-control-feedback.fa{line-height:30px}.progress,.progress>.progress-bar{-webkit-box-shadow:none;box-shadow:none}.progress,.progress>.progress-bar,.progress .progress-bar,.progress>.progress-bar .progress-bar{border-radius:1px}.progress.sm,.progress-sm{height:10px}.progress.sm,.progress-sm,.progress.sm .progress-bar,.progress-sm .progress-bar{border-radius:1px}.progress.xs,.progress-xs{height:7px}.progress.xs,.progress-xs,.progress.xs .progress-bar,.progress-xs .progress-bar{border-radius:1px}.progress.xxs,.progress-xxs{height:3px}.progress.xxs,.progress-xxs,.progress.xxs .progress-bar,.progress-xxs .progress-bar{border-radius:1px}.progress.vertical{position:relative;width:30px;height:200px;display:inline-block;margin-right:10px}.progress.vertical>.progress-bar{width:100%;position:absolute;bottom:0}.progress.vertical.sm,.progress.vertical.progress-sm{width:20px}.progress.vertical.xs,.progress.vertical.progress-xs{width:10px}.progress.vertical.xxs,.progress.vertical.progress-xxs{width:3px}.progress-group .progress-text{font-weight:600}.progress-group .progress-number{float:right}.table tr>td .progress{margin:0}.progress-bar-light-blue,.progress-bar-primary{background-color:#3c8dbc}.progress-striped .progress-bar-light-blue,.progress-striped .progress-bar-primary{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-green,.progress-bar-success{background-color:#00a65a}.progress-striped .progress-bar-green,.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-aqua,.progress-bar-info{background-color:#00c0ef}.progress-striped .progress-bar-aqua,.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-yellow,.progress-bar-warning{background-color:#f39c12}.progress-striped .progress-bar-yellow,.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.progress-bar-red,.progress-bar-danger{background-color:#dd4b39}.progress-striped .progress-bar-red,.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255,255,255,0.15) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.15) 75%, transparent 75%, transparent)}.small-box{border-radius:2px;position:relative;display:block;margin-bottom:20px;box-shadow:0 1px 1px rgba(0,0,0,0.1)}.small-box>.inner{padding:10px}.small-box>.small-box-footer{position:relative;text-align:center;padding:3px 0;color:#fff;color:rgba(255,255,255,0.8);display:block;z-index:10;background:rgba(0,0,0,0.1);text-decoration:none}.small-box>.small-box-footer:hover{color:#fff;background:rgba(0,0,0,0.15)}.small-box h3{font-size:38px;font-weight:bold;margin:0 0 10px 0;white-space:nowrap;padding:0}.small-box p{font-size:15px}.small-box p>small{display:block;color:#f9f9f9;font-size:13px;margin-top:5px}.small-box h3,.small-box p{z-index:5}.small-box .icon{-webkit-transition:all .3s linear;-o-transition:all .3s linear;transition:all .3s linear;position:absolute;top:-10px;right:10px;z-index:0;font-size:90px;color:rgba(0,0,0,0.15)}.small-box:hover{text-decoration:none;color:#f9f9f9}.small-box:hover .icon{font-size:95px}@media (max-width:767px){.small-box{text-align:center}.small-box .icon{display:none}.small-box p{font-size:12px}}.box{position:relative;border-radius:3px;background:#ffffff;border-top:3px solid #d2d6de;margin-bottom:20px;width:100%;box-shadow:0 1px 1px rgba(0,0,0,0.1)}.box.box-primary{border-top-color:#3c8dbc}.box.box-info{border-top-color:#00c0ef}.box.box-danger{border-top-color:#dd4b39}.box.box-warning{border-top-color:#f39c12}.box.box-success{border-top-color:#00a65a}.box.box-default{border-top-color:#d2d6de}.box.collapsed-box .box-body,.box.collapsed-box .box-footer{display:none}.box .nav-stacked>li{border-bottom:1px solid #f4f4f4;margin:0}.box .nav-stacked>li:last-of-type{border-bottom:none}.box.height-control .box-body{max-height:300px;overflow:auto}.box .border-right{border-right:1px solid #f4f4f4}.box .border-left{border-left:1px solid #f4f4f4}.box.box-solid{border-top:0}.box.box-solid>.box-header .btn.btn-default{background:transparent}.box.box-solid>.box-header .btn:hover,.box.box-solid>.box-header a:hover{background:rgba(0,0,0,0.1)}.box.box-solid.box-default{border:1px solid #d2d6de}.box.box-solid.box-default>.box-header{color:#444;background:#d2d6de;background-color:#d2d6de}.box.box-solid.box-default>.box-header a,.box.box-solid.box-default>.box-header .btn{color:#444}.box.box-solid.box-primary{border:1px solid #3c8dbc}.box.box-solid.box-primary>.box-header{color:#fff;background:#3c8dbc;background-color:#3c8dbc}.box.box-solid.box-primary>.box-header a,.box.box-solid.box-primary>.box-header .btn{color:#fff}.box.box-solid.box-info{border:1px solid #00c0ef}.box.box-solid.box-info>.box-header{color:#fff;background:#00c0ef;background-color:#00c0ef}.box.box-solid.box-info>.box-header a,.box.box-solid.box-info>.box-header .btn{color:#fff}.box.box-solid.box-danger{border:1px solid #dd4b39}.box.box-solid.box-danger>.box-header{color:#fff;background:#dd4b39;background-color:#dd4b39}.box.box-solid.box-danger>.box-header a,.box.box-solid.box-danger>.box-header .btn{color:#fff}.box.box-solid.box-warning{border:1px solid #f39c12}.box.box-solid.box-warning>.box-header{color:#fff;background:#f39c12;background-color:#f39c12}.box.box-solid.box-warning>.box-header a,.box.box-solid.box-warning>.box-header .btn{color:#fff}.box.box-solid.box-success{border:1px solid #00a65a}.box.box-solid.box-success>.box-header{color:#fff;background:#00a65a;background-color:#00a65a}.box.box-solid.box-success>.box-header a,.box.box-solid.box-success>.box-header .btn{color:#fff}.box.box-solid>.box-header>.box-tools .btn{border:0;box-shadow:none}.box.box-solid[class*='bg']>.box-header{color:#fff}.box .box-group>.box{margin-bottom:5px}.box .knob-label{text-align:center;color:#333;font-weight:100;font-size:12px;margin-bottom:.3em}.box>.overlay,.overlay-wrapper>.overlay,.box>.loading-img,.overlay-wrapper>.loading-img{position:absolute;top:0;left:0;width:100%;height:100%}.box .overlay,.overlay-wrapper .overlay{z-index:50;background:rgba(255,255,255,0.7);border-radius:3px}.box .overlay>.fa,.overlay-wrapper .overlay>.fa{position:absolute;top:50%;left:50%;margin-left:-15px;margin-top:-15px;color:#000;font-size:30px}.box .overlay.dark,.overlay-wrapper .overlay.dark{background:rgba(0,0,0,0.5)}.box-header:before,.box-body:before,.box-footer:before,.box-header:after,.box-body:after,.box-footer:after{content:" ";display:table}.box-header:after,.box-body:after,.box-footer:after{clear:both}.box-header{color:#444;display:block;padding:10px;position:relative}.box-header.with-border{border-bottom:1px solid #f4f4f4}.collapsed-box .box-header.with-border{border-bottom:none}.box-header>.fa,.box-header>.glyphicon,.box-header>.ion,.box-header .box-title{display:inline-block;font-size:18px;margin:0;line-height:1}.box-header>.fa,.box-header>.glyphicon,.box-header>.ion{margin-right:5px}.box-header>.box-tools{position:absolute;right:10px;top:5px}.box-header>.box-tools [data-toggle="tooltip"]{position:relative}.box-header>.box-tools.pull-right .dropdown-menu{right:0;left:auto}.box-header>.box-tools .dropdown-menu>li>a{color:#444 !important}.btn-box-tool{padding:5px;font-size:12px;background:transparent;color:#97a0b3}.open .btn-box-tool,.btn-box-tool:hover{color:#606c84}.btn-box-tool.btn:active{box-shadow:none}.box-body{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;padding:10px}.no-header .box-body{border-top-right-radius:3px;border-top-left-radius:3px}.box-body>.table{margin-bottom:0}.box-body .fc{margin-top:5px}.box-body .full-width-chart{margin:-19px}.box-body.no-padding .full-width-chart{margin:-9px}.box-body .box-pane{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:3px}.box-body .box-pane-right{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:0}.box-footer{border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px;border-top:1px solid #f4f4f4;padding:10px;background-color:#fff}.chart-legend{margin:10px 0}@media (max-width:991px){.chart-legend>li{float:left;margin-right:10px}}.box-comments{background:#f7f7f7}.box-comments .box-comment{padding:8px 0;border-bottom:1px solid #eee}.box-comments .box-comment:before,.box-comments .box-comment:after{content:" ";display:table}.box-comments .box-comment:after{clear:both}.box-comments .box-comment:last-of-type{border-bottom:0}.box-comments .box-comment:first-of-type{padding-top:0}.box-comments .box-comment img{float:left}.box-comments .comment-text{margin-left:40px;color:#555}.box-comments .username{color:#444;display:block;font-weight:600}.box-comments .text-muted{font-weight:400;font-size:12px}.todo-list{margin:0;padding:0;list-style:none;overflow:auto}.todo-list>li{border-radius:2px;padding:10px;background:#f4f4f4;margin-bottom:2px;border-left:2px solid #e6e7e8;color:#444}.todo-list>li:last-of-type{margin-bottom:0}.todo-list>li>input[type='checkbox']{margin:0 10px 0 5px}.todo-list>li .text{display:inline-block;margin-left:5px;font-weight:600}.todo-list>li .label{margin-left:10px;font-size:9px}.todo-list>li .tools{display:none;float:right;color:#dd4b39}.todo-list>li .tools>.fa,.todo-list>li .tools>.glyphicon,.todo-list>li .tools>.ion{margin-right:5px;cursor:pointer}.todo-list>li:hover .tools{display:inline-block}.todo-list>li.done{color:#999}.todo-list>li.done .text{text-decoration:line-through;font-weight:500}.todo-list>li.done .label{background:#d2d6de !important}.todo-list .danger{border-left-color:#dd4b39}.todo-list .warning{border-left-color:#f39c12}.todo-list .info{border-left-color:#00c0ef}.todo-list .success{border-left-color:#00a65a}.todo-list .primary{border-left-color:#3c8dbc}.todo-list .handle{display:inline-block;cursor:move;margin:0 5px}.chat{padding:5px 20px 5px 10px}.chat .item{margin-bottom:10px}.chat .item:before,.chat .item:after{content:" ";display:table}.chat .item:after{clear:both}.chat .item>img{width:40px;height:40px;border:2px solid transparent;border-radius:50%}.chat .item>.online{border:2px solid #00a65a}.chat .item>.offline{border:2px solid #dd4b39}.chat .item>.message{margin-left:55px;margin-top:-40px}.chat .item>.message>.name{display:block;font-weight:600}.chat .item>.attachment{border-radius:3px;background:#f4f4f4;margin-left:65px;margin-right:15px;padding:10px}.chat .item>.attachment>h4{margin:0 0 5px 0;font-weight:600;font-size:14px}.chat .item>.attachment>p,.chat .item>.attachment>.filename{font-weight:600;font-size:13px;font-style:italic;margin:0}.chat .item>.attachment:before,.chat .item>.attachment:after{content:" ";display:table}.chat .item>.attachment:after{clear:both}.box-input{max-width:200px}.modal .panel-body{color:#444}.info-box{display:block;min-height:90px;background:#fff;width:100%;box-shadow:0 1px 1px rgba(0,0,0,0.1);border-radius:2px;margin-bottom:15px}.info-box small{font-size:14px}.info-box .progress{background:rgba(0,0,0,0.2);margin:5px -10px 5px -10px;height:2px}.info-box .progress,.info-box .progress .progress-bar{border-radius:0}.info-box .progress .progress-bar{background:#fff}.info-box-icon{border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px;display:block;float:left;height:90px;width:90px;text-align:center;font-size:45px;line-height:90px;background:rgba(0,0,0,0.2)}.info-box-icon>img{max-width:100%}.info-box-content{padding:5px 10px;margin-left:90px}.info-box-number{display:block;font-weight:bold;font-size:18px}.progress-description,.info-box-text{display:block;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.info-box-text{text-transform:uppercase}.info-box-more{display:block}.progress-description{margin:0}.timeline{position:relative;margin:0 0 30px 0;padding:0;list-style:none}.timeline:before{content:'';position:absolute;top:0;bottom:0;width:4px;background:#ddd;left:31px;margin:0;border-radius:2px}.timeline>li{position:relative;margin-right:10px;margin-bottom:15px}.timeline>li:before,.timeline>li:after{content:" ";display:table}.timeline>li:after{clear:both}.timeline>li>.timeline-item{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.1);box-shadow:0 1px 1px rgba(0,0,0,0.1);border-radius:3px;margin-top:0;background:#fff;color:#444;margin-left:60px;margin-right:15px;padding:0;position:relative}.timeline>li>.timeline-item>.time{color:#999;float:right;padding:10px;font-size:12px}.timeline>li>.timeline-item>.timeline-header{margin:0;color:#555;border-bottom:1px solid #f4f4f4;padding:10px;font-size:16px;line-height:1.1}.timeline>li>.timeline-item>.timeline-header>a{font-weight:600}.timeline>li>.timeline-item>.timeline-body,.timeline>li>.timeline-item>.timeline-footer{padding:10px}.timeline>li>.fa,.timeline>li>.glyphicon,.timeline>li>.ion{width:30px;height:30px;font-size:15px;line-height:30px;position:absolute;color:#666;background:#d2d6de;border-radius:50%;text-align:center;left:18px;top:0}.timeline>.time-label>span{font-weight:600;padding:5px;display:inline-block;background-color:#fff;border-radius:4px}.timeline-inverse>li>.timeline-item{background:#f0f0f0;border:1px solid #ddd;-webkit-box-shadow:none;box-shadow:none}.timeline-inverse>li>.timeline-item>.timeline-header{border-bottom-color:#ddd}.btn{border-radius:3px;-webkit-box-shadow:none;box-shadow:none;border:1px solid transparent}.btn.uppercase{text-transform:uppercase}.btn.btn-flat{border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;border-width:1px}.btn:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn:focus{outline:none}.btn.btn-file{position:relative;overflow:hidden}.btn.btn-file>input[type='file']{position:absolute;top:0;right:0;min-width:100%;min-height:100%;font-size:100px;text-align:right;opacity:0;filter:alpha(opacity=0);outline:none;background:white;cursor:inherit;display:block}.btn-default{background-color:#f4f4f4;color:#444;border-color:#ddd}.btn-default:hover,.btn-default:active,.btn-default.hover{background-color:#e7e7e7}.btn-primary{background-color:#3c8dbc;border-color:#367fa9}.btn-primary:hover,.btn-primary:active,.btn-primary.hover{background-color:#367fa9}.btn-success{background-color:#00a65a;border-color:#008d4c}.btn-success:hover,.btn-success:active,.btn-success.hover{background-color:#008d4c}.btn-info{background-color:#00c0ef;border-color:#00acd6}.btn-info:hover,.btn-info:active,.btn-info.hover{background-color:#00acd6}.btn-danger{background-color:#dd4b39;border-color:#d73925}.btn-danger:hover,.btn-danger:active,.btn-danger.hover{background-color:#d73925}.btn-warning{background-color:#f39c12;border-color:#e08e0b}.btn-warning:hover,.btn-warning:active,.btn-warning.hover{background-color:#e08e0b}.btn-outline{border:1px solid #fff;background:transparent;color:#fff}.btn-outline:hover,.btn-outline:focus,.btn-outline:active{color:rgba(255,255,255,0.7);border-color:rgba(255,255,255,0.7)}.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn[class*='bg-']:hover{-webkit-box-shadow:inset 0 0 100px rgba(0,0,0,0.2);box-shadow:inset 0 0 100px rgba(0,0,0,0.2)}.btn-app{border-radius:3px;position:relative;padding:15px 5px;margin:0 0 10px 10px;min-width:80px;height:60px;text-align:center;color:#666;border:1px solid #ddd;background-color:#f4f4f4;font-size:12px}.btn-app>.fa,.btn-app>.glyphicon,.btn-app>.ion{font-size:20px;display:block}.btn-app:hover{background:#f4f4f4;color:#444;border-color:#aaa}.btn-app:active,.btn-app:focus{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn-app>.badge{position:absolute;top:-3px;right:-10px;font-size:10px;font-weight:400}.callout{border-radius:3px;margin:0 0 20px 0;padding:15px 30px 15px 15px;border-left:5px solid #eee}.callout a{color:#fff;text-decoration:underline}.callout a:hover{color:#eee}.callout h4{margin-top:0;font-weight:600}.callout p:last-child{margin-bottom:0}.callout code,.callout .highlight{background-color:#fff}.callout.callout-danger{border-color:#c23321}.callout.callout-warning{border-color:#c87f0a}.callout.callout-info{border-color:#0097bc}.callout.callout-success{border-color:#00733e}.alert{border-radius:3px}.alert h4{font-weight:600}.alert .icon{margin-right:10px}.alert .close{color:#000;opacity:.2;filter:alpha(opacity=20)}.alert .close:hover{opacity:.5;filter:alpha(opacity=50)}.alert a{color:#fff;text-decoration:underline}.alert-success{border-color:#008d4c}.alert-danger,.alert-error{border-color:#d73925}.alert-warning{border-color:#e08e0b}.alert-info{border-color:#00acd6}.nav>li>a:hover,.nav>li>a:active,.nav>li>a:focus{color:#444;background:#f7f7f7}.nav-pills>li>a{border-radius:0;border-top:3px solid transparent;color:#444}.nav-pills>li>a>.fa,.nav-pills>li>a>.glyphicon,.nav-pills>li>a>.ion{margin-right:5px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{border-top-color:#3c8dbc}.nav-pills>li.active>a{font-weight:600}.nav-stacked>li>a{border-radius:0;border-top:0;border-left:3px solid transparent;color:#444}.nav-stacked>li.active>a,.nav-stacked>li.active>a:hover{background:transparent;color:#444;border-top:0;border-left-color:#3c8dbc}.nav-stacked>li.header{border-bottom:1px solid #ddd;color:#777;margin-bottom:10px;padding:5px 10px;text-transform:uppercase}.nav-tabs-custom{margin-bottom:20px;background:#fff;box-shadow:0 1px 1px rgba(0,0,0,0.1);border-radius:3px}.nav-tabs-custom>.nav-tabs{margin:0;border-bottom-color:#f4f4f4;border-top-right-radius:3px;border-top-left-radius:3px}.nav-tabs-custom>.nav-tabs>li{border-top:3px solid transparent;margin-bottom:-2px;margin-right:5px}.nav-tabs-custom>.nav-tabs>li.disabled>a{color:#777}.nav-tabs-custom>.nav-tabs>li>a{color:#444;border-radius:0}.nav-tabs-custom>.nav-tabs>li>a.text-muted{color:#999}.nav-tabs-custom>.nav-tabs>li>a,.nav-tabs-custom>.nav-tabs>li>a:hover{background:transparent;margin:0}.nav-tabs-custom>.nav-tabs>li>a:hover{color:#999}.nav-tabs-custom>.nav-tabs>li:not(.active)>a:hover,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:focus,.nav-tabs-custom>.nav-tabs>li:not(.active)>a:active{border-color:transparent}.nav-tabs-custom>.nav-tabs>li.active{border-top-color:#3c8dbc}.nav-tabs-custom>.nav-tabs>li.active>a,.nav-tabs-custom>.nav-tabs>li.active:hover>a{background-color:#fff;color:#444}.nav-tabs-custom>.nav-tabs>li.active>a{border-top-color:transparent;border-left-color:#f4f4f4;border-right-color:#f4f4f4}.nav-tabs-custom>.nav-tabs>li:first-of-type{margin-left:0}.nav-tabs-custom>.nav-tabs>li:first-of-type.active>a{border-left-color:transparent}.nav-tabs-custom>.nav-tabs.pull-right{float:none !important}.nav-tabs-custom>.nav-tabs.pull-right>li{float:right}.nav-tabs-custom>.nav-tabs.pull-right>li:first-of-type{margin-right:0}.nav-tabs-custom>.nav-tabs.pull-right>li:first-of-type>a{border-left-width:1px}.nav-tabs-custom>.nav-tabs.pull-right>li:first-of-type.active>a{border-left-color:#f4f4f4;border-right-color:transparent}.nav-tabs-custom>.nav-tabs>li.header{line-height:35px;padding:0 10px;font-size:20px;color:#444}.nav-tabs-custom>.nav-tabs>li.header>.fa,.nav-tabs-custom>.nav-tabs>li.header>.glyphicon,.nav-tabs-custom>.nav-tabs>li.header>.ion{margin-right:5px}.nav-tabs-custom>.tab-content{background:#fff;padding:10px;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.nav-tabs-custom .dropdown.open>a:active,.nav-tabs-custom .dropdown.open>a:focus{background:transparent;color:#999}.nav-tabs-custom.tab-primary>.nav-tabs>li.active{border-top-color:#3c8dbc}.nav-tabs-custom.tab-info>.nav-tabs>li.active{border-top-color:#00c0ef}.nav-tabs-custom.tab-danger>.nav-tabs>li.active{border-top-color:#dd4b39}.nav-tabs-custom.tab-warning>.nav-tabs>li.active{border-top-color:#f39c12}.nav-tabs-custom.tab-success>.nav-tabs>li.active{border-top-color:#00a65a}.nav-tabs-custom.tab-default>.nav-tabs>li.active{border-top-color:#d2d6de}.pagination>li>a{background:#fafafa;color:#666}.pagination.pagination-flat>li>a{border-radius:0 !important}.products-list{list-style:none;margin:0;padding:0}.products-list>.item{border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.1);box-shadow:0 1px 1px rgba(0,0,0,0.1);padding:10px 0;background:#fff}.products-list>.item:before,.products-list>.item:after{content:" ";display:table}.products-list>.item:after{clear:both}.products-list .product-img{float:left}.products-list .product-img img{width:50px;height:50px}.products-list .product-info{margin-left:60px}.products-list .product-title{font-weight:600}.products-list .product-description{display:block;color:#999;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.product-list-in-box>.item{-webkit-box-shadow:none;box-shadow:none;border-radius:0;border-bottom:1px solid #f4f4f4}.product-list-in-box>.item:last-of-type{border-bottom-width:0}.table>thead>tr>th,.table>tbody>tr>th,.table>tfoot>tr>th,.table>thead>tr>td,.table>tbody>tr>td,.table>tfoot>tr>td{border-top:1px solid #f4f4f4}.table>thead>tr>th{border-bottom:2px solid #f4f4f4}.table tr td .progress{margin-top:5px}.table-bordered{border:1px solid #f4f4f4}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #f4f4f4}.table-bordered>thead>tr>th,.table-bordered>thead>tr>td{border-bottom-width:2px}.table.no-border,.table.no-border td,.table.no-border th{border:0}table.text-center,table.text-center td,table.text-center th{text-align:center}.table.align th{text-align:left}.table.align td{text-align:right}.label-default{background-color:#d2d6de;color:#444}.direct-chat .box-body{border-bottom-right-radius:0;border-bottom-left-radius:0;position:relative;overflow-x:hidden;padding:0}.direct-chat.chat-pane-open .direct-chat-contacts{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.direct-chat-messages{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0);padding:10px;height:250px;overflow:auto}.direct-chat-msg,.direct-chat-text{display:block}.direct-chat-msg{margin-bottom:10px}.direct-chat-msg:before,.direct-chat-msg:after{content:" ";display:table}.direct-chat-msg:after{clear:both}.direct-chat-messages,.direct-chat-contacts{-webkit-transition:-webkit-transform .5s ease-in-out;-moz-transition:-moz-transform .5s ease-in-out;-o-transition:-o-transform .5s ease-in-out;transition:transform .5s ease-in-out}.direct-chat-text{border-radius:5px;position:relative;padding:5px 10px;background:#d2d6de;border:1px solid #d2d6de;margin:5px 0 0 50px;color:#444}.direct-chat-text:after,.direct-chat-text:before{position:absolute;right:100%;top:15px;border:solid transparent;border-right-color:#d2d6de;content:' ';height:0;width:0;pointer-events:none}.direct-chat-text:after{border-width:5px;margin-top:-5px}.direct-chat-text:before{border-width:6px;margin-top:-6px}.right .direct-chat-text{margin-right:50px;margin-left:0}.right .direct-chat-text:after,.right .direct-chat-text:before{right:auto;left:100%;border-right-color:transparent;border-left-color:#d2d6de}.direct-chat-img{border-radius:50%;float:left;width:40px;height:40px}.right .direct-chat-img{float:right}.direct-chat-info{display:block;margin-bottom:2px;font-size:12px}.direct-chat-name{font-weight:600}.direct-chat-timestamp{color:#999}.direct-chat-contacts-open .direct-chat-contacts{-webkit-transform:translate(0, 0);-ms-transform:translate(0, 0);-o-transform:translate(0, 0);transform:translate(0, 0)}.direct-chat-contacts{-webkit-transform:translate(101%, 0);-ms-transform:translate(101%, 0);-o-transform:translate(101%, 0);transform:translate(101%, 0);position:absolute;top:0;bottom:0;height:250px;width:100%;background:#222d32;color:#fff;overflow:auto}.contacts-list>li{border-bottom:1px solid rgba(0,0,0,0.2);padding:10px;margin:0}.contacts-list>li:before,.contacts-list>li:after{content:" ";display:table}.contacts-list>li:after{clear:both}.contacts-list>li:last-of-type{border-bottom:none}.contacts-list-img{border-radius:50%;width:40px;float:left}.contacts-list-info{margin-left:45px;color:#fff}.contacts-list-name,.contacts-list-status{display:block}.contacts-list-name{font-weight:600}.contacts-list-status{font-size:12px}.contacts-list-date{color:#aaa;font-weight:normal}.contacts-list-msg{color:#999}.direct-chat-danger .right>.direct-chat-text{background:#dd4b39;border-color:#dd4b39;color:#fff}.direct-chat-danger .right>.direct-chat-text:after,.direct-chat-danger .right>.direct-chat-text:before{border-left-color:#dd4b39}.direct-chat-primary .right>.direct-chat-text{background:#3c8dbc;border-color:#3c8dbc;color:#fff}.direct-chat-primary .right>.direct-chat-text:after,.direct-chat-primary .right>.direct-chat-text:before{border-left-color:#3c8dbc}.direct-chat-warning .right>.direct-chat-text{background:#f39c12;border-color:#f39c12;color:#fff}.direct-chat-warning .right>.direct-chat-text:after,.direct-chat-warning .right>.direct-chat-text:before{border-left-color:#f39c12}.direct-chat-info .right>.direct-chat-text{background:#00c0ef;border-color:#00c0ef;color:#fff}.direct-chat-info .right>.direct-chat-text:after,.direct-chat-info .right>.direct-chat-text:before{border-left-color:#00c0ef}.direct-chat-success .right>.direct-chat-text{background:#00a65a;border-color:#00a65a;color:#fff}.direct-chat-success .right>.direct-chat-text:after,.direct-chat-success .right>.direct-chat-text:before{border-left-color:#00a65a}.users-list>li{width:25%;float:left;padding:10px;text-align:center}.users-list>li img{border-radius:50%;max-width:100%;height:auto}.users-list>li>a:hover,.users-list>li>a:hover .users-list-name{color:#999}.users-list-name,.users-list-date{display:block}.users-list-name{font-weight:600;color:#444;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.users-list-date{color:#999;font-size:12px}.carousel-control.left,.carousel-control.right{background-image:none}.carousel-control>.fa{font-size:40px;position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-20px}.modal{background:rgba(0,0,0,0.3)}.modal-content{border-radius:0;-webkit-box-shadow:0 2px 3px rgba(0,0,0,0.125);box-shadow:0 2px 3px rgba(0,0,0,0.125);border:0}@media (min-width:768px){.modal-content{-webkit-box-shadow:0 2px 3px rgba(0,0,0,0.125);box-shadow:0 2px 3px rgba(0,0,0,0.125)}}.modal-header{border-bottom-color:#f4f4f4}.modal-footer{border-top-color:#f4f4f4}.modal-primary .modal-header,.modal-primary .modal-footer{border-color:#307095}.modal-warning .modal-header,.modal-warning .modal-footer{border-color:#c87f0a}.modal-info .modal-header,.modal-info .modal-footer{border-color:#0097bc}.modal-success .modal-header,.modal-success .modal-footer{border-color:#00733e}.modal-danger .modal-header,.modal-danger .modal-footer{border-color:#c23321}.box-widget{border:none;position:relative}.widget-user .widget-user-header{padding:20px;height:120px;border-top-right-radius:3px;border-top-left-radius:3px}.widget-user .widget-user-username{margin-top:0;margin-bottom:5px;font-size:25px;font-weight:300;text-shadow:0 1px 1px rgba(0,0,0,0.2)}.widget-user .widget-user-desc{margin-top:0}.widget-user .widget-user-image{position:absolute;top:65px;left:50%;margin-left:-45px}.widget-user .widget-user-image>img{width:90px;height:auto;border:3px solid #fff}.widget-user .box-footer{padding-top:30px}.widget-user-2 .widget-user-header{padding:20px;border-top-right-radius:3px;border-top-left-radius:3px}.widget-user-2 .widget-user-username{margin-top:5px;margin-bottom:5px;font-size:25px;font-weight:300}.widget-user-2 .widget-user-desc{margin-top:0}.widget-user-2 .widget-user-username,.widget-user-2 .widget-user-desc{margin-left:75px}.widget-user-2 .widget-user-image>img{width:65px;height:auto;float:left}.treeview-menu{display:none;list-style:none;padding:0;margin:0;padding-left:5px}.treeview-menu .treeview-menu{padding-left:20px}.treeview-menu>li{margin:0}.treeview-menu>li>a{padding:5px 5px 5px 15px;display:block;font-size:14px}.treeview-menu>li>a>.fa,.treeview-menu>li>a>.glyphicon,.treeview-menu>li>a>.ion{width:20px}.treeview-menu>li>a>.pull-right-container>.fa-angle-left,.treeview-menu>li>a>.pull-right-container>.fa-angle-down,.treeview-menu>li>a>.fa-angle-left,.treeview-menu>li>a>.fa-angle-down{width:auto}.treeview>ul.treeview-menu{overflow:hidden;height:auto;padding-top:0px !important;padding-bottom:0px !important}.treeview.menu-open>ul.treeview-menu{overflow:visible;height:auto}.mailbox-messages>.table{margin:0}.mailbox-controls{padding:5px}.mailbox-controls.with-border{border-bottom:1px solid #f4f4f4}.mailbox-read-info{border-bottom:1px solid #f4f4f4;padding:10px}.mailbox-read-info h3{font-size:20px;margin:0}.mailbox-read-info h5{margin:0;padding:5px 0 0 0}.mailbox-read-time{color:#999;font-size:13px}.mailbox-read-message{padding:10px}.mailbox-attachments li{float:left;width:200px;border:1px solid #eee;margin-bottom:10px;margin-right:10px}.mailbox-attachment-name{font-weight:bold;color:#666}.mailbox-attachment-icon,.mailbox-attachment-info,.mailbox-attachment-size{display:block}.mailbox-attachment-info{padding:10px;background:#f4f4f4}.mailbox-attachment-size{color:#999;font-size:12px}.mailbox-attachment-icon{text-align:center;font-size:65px;color:#666;padding:20px 10px}.mailbox-attachment-icon.has-img{padding:0}.mailbox-attachment-icon.has-img>img{max-width:100%;height:auto}.lockscreen{background:#d2d6de}.lockscreen-logo{font-size:35px;text-align:center;margin-bottom:25px;font-weight:300}.lockscreen-logo a{color:#444}.lockscreen-wrapper{max-width:400px;margin:0 auto;margin-top:10%}.lockscreen .lockscreen-name{text-align:center;font-weight:600}.lockscreen-item{border-radius:4px;padding:0;background:#fff;position:relative;margin:10px auto 30px auto;width:290px}.lockscreen-image{border-radius:50%;position:absolute;left:-10px;top:-25px;background:#fff;padding:5px;z-index:10}.lockscreen-image>img{border-radius:50%;width:70px;height:70px}.lockscreen-credentials{margin-left:70px}.lockscreen-credentials .form-control{border:0}.lockscreen-credentials .btn{background-color:#fff;border:0;padding:0 10px}.lockscreen-footer{margin-top:10px}.login-logo,.register-logo{font-size:35px;text-align:center;margin-bottom:25px;font-weight:300}.login-logo a,.register-logo a{color:#444}.login-page,.register-page{height:auto;background:#d2d6de}.login-box,.register-box{width:360px;margin:7% auto}@media (max-width:768px){.login-box,.register-box{width:90%;margin-top:20px}}.login-box-body,.register-box-body{background:#fff;padding:20px;border-top:0;color:#666}.login-box-body .form-control-feedback,.register-box-body .form-control-feedback{color:#777}.login-box-msg,.register-box-msg{margin:0;text-align:center;padding:0 20px 20px 20px}.social-auth-links{margin:10px 0}.error-page{width:600px;margin:20px auto 0 auto}@media (max-width:991px){.error-page{width:100%}}.error-page>.headline{float:left;font-size:100px;font-weight:300}@media (max-width:991px){.error-page>.headline{float:none;text-align:center}}.error-page>.error-content{margin-left:190px;display:block}@media (max-width:991px){.error-page>.error-content{margin-left:0}}.error-page>.error-content>h3{font-weight:300;font-size:25px}@media (max-width:991px){.error-page>.error-content>h3{text-align:center}}.invoice{position:relative;background:#fff;border:1px solid #f4f4f4;padding:20px;margin:10px 25px}.invoice-title{margin-top:0}.profile-user-img{margin:0 auto;width:100px;padding:3px;border:3px solid #d2d6de}.profile-username{font-size:21px;margin-top:5px}.post{border-bottom:1px solid #d2d6de;margin-bottom:15px;padding-bottom:15px;color:#666}.post:last-of-type{border-bottom:0;margin-bottom:0;padding-bottom:0}.post .user-block{margin-bottom:15px}.btn-social{position:relative;padding-left:44px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.btn-social>:first-child{position:absolute;left:0;top:0;bottom:0;width:32px;line-height:34px;font-size:1.6em;text-align:center;border-right:1px solid rgba(0,0,0,0.2)}.btn-social.btn-lg{padding-left:61px}.btn-social.btn-lg>:first-child{line-height:45px;width:45px;font-size:1.8em}.btn-social.btn-sm{padding-left:38px}.btn-social.btn-sm>:first-child{line-height:28px;width:28px;font-size:1.4em}.btn-social.btn-xs{padding-left:30px}.btn-social.btn-xs>:first-child{line-height:20px;width:20px;font-size:1.2em}.btn-social-icon{position:relative;padding-left:44px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;height:34px;width:34px;padding:0}.btn-social-icon>:first-child{position:absolute;left:0;top:0;bottom:0;width:32px;line-height:34px;font-size:1.6em;text-align:center;border-right:1px solid rgba(0,0,0,0.2)}.btn-social-icon.btn-lg{padding-left:61px}.btn-social-icon.btn-lg>:first-child{line-height:45px;width:45px;font-size:1.8em}.btn-social-icon.btn-sm{padding-left:38px}.btn-social-icon.btn-sm>:first-child{line-height:28px;width:28px;font-size:1.4em}.btn-social-icon.btn-xs{padding-left:30px}.btn-social-icon.btn-xs>:first-child{line-height:20px;width:20px;font-size:1.2em}.btn-social-icon>:first-child{border:none;text-align:center;width:100%}.btn-social-icon.btn-lg{height:45px;width:45px;padding-left:0;padding-right:0}.btn-social-icon.btn-sm{height:30px;width:30px;padding-left:0;padding-right:0}.btn-social-icon.btn-xs{height:22px;width:22px;padding-left:0;padding-right:0}.btn-adn{color:#fff;background-color:#d87a68;border-color:rgba(0,0,0,0.2)}.btn-adn:focus,.btn-adn.focus{color:#fff;background-color:#ce563f;border-color:rgba(0,0,0,0.2)}.btn-adn:hover{color:#fff;background-color:#ce563f;border-color:rgba(0,0,0,0.2)}.btn-adn:active,.btn-adn.active,.open>.dropdown-toggle.btn-adn{color:#fff;background-color:#ce563f;border-color:rgba(0,0,0,0.2)}.btn-adn:active:hover,.btn-adn.active:hover,.open>.dropdown-toggle.btn-adn:hover,.btn-adn:active:focus,.btn-adn.active:focus,.open>.dropdown-toggle.btn-adn:focus,.btn-adn:active.focus,.btn-adn.active.focus,.open>.dropdown-toggle.btn-adn.focus{color:#fff;background-color:#b94630;border-color:rgba(0,0,0,0.2)}.btn-adn:active,.btn-adn.active,.open>.dropdown-toggle.btn-adn{background-image:none}.btn-adn.disabled:hover,.btn-adn[disabled]:hover,fieldset[disabled] .btn-adn:hover,.btn-adn.disabled:focus,.btn-adn[disabled]:focus,fieldset[disabled] .btn-adn:focus,.btn-adn.disabled.focus,.btn-adn[disabled].focus,fieldset[disabled] .btn-adn.focus{background-color:#d87a68;border-color:rgba(0,0,0,0.2)}.btn-adn .badge{color:#d87a68;background-color:#fff}.btn-bitbucket{color:#fff;background-color:#205081;border-color:rgba(0,0,0,0.2)}.btn-bitbucket:focus,.btn-bitbucket.focus{color:#fff;background-color:#163758;border-color:rgba(0,0,0,0.2)}.btn-bitbucket:hover{color:#fff;background-color:#163758;border-color:rgba(0,0,0,0.2)}.btn-bitbucket:active,.btn-bitbucket.active,.open>.dropdown-toggle.btn-bitbucket{color:#fff;background-color:#163758;border-color:rgba(0,0,0,0.2)}.btn-bitbucket:active:hover,.btn-bitbucket.active:hover,.open>.dropdown-toggle.btn-bitbucket:hover,.btn-bitbucket:active:focus,.btn-bitbucket.active:focus,.open>.dropdown-toggle.btn-bitbucket:focus,.btn-bitbucket:active.focus,.btn-bitbucket.active.focus,.open>.dropdown-toggle.btn-bitbucket.focus{color:#fff;background-color:#0f253c;border-color:rgba(0,0,0,0.2)}.btn-bitbucket:active,.btn-bitbucket.active,.open>.dropdown-toggle.btn-bitbucket{background-image:none}.btn-bitbucket.disabled:hover,.btn-bitbucket[disabled]:hover,fieldset[disabled] .btn-bitbucket:hover,.btn-bitbucket.disabled:focus,.btn-bitbucket[disabled]:focus,fieldset[disabled] .btn-bitbucket:focus,.btn-bitbucket.disabled.focus,.btn-bitbucket[disabled].focus,fieldset[disabled] .btn-bitbucket.focus{background-color:#205081;border-color:rgba(0,0,0,0.2)}.btn-bitbucket .badge{color:#205081;background-color:#fff}.btn-dropbox{color:#fff;background-color:#1087dd;border-color:rgba(0,0,0,0.2)}.btn-dropbox:focus,.btn-dropbox.focus{color:#fff;background-color:#0d6aad;border-color:rgba(0,0,0,0.2)}.btn-dropbox:hover{color:#fff;background-color:#0d6aad;border-color:rgba(0,0,0,0.2)}.btn-dropbox:active,.btn-dropbox.active,.open>.dropdown-toggle.btn-dropbox{color:#fff;background-color:#0d6aad;border-color:rgba(0,0,0,0.2)}.btn-dropbox:active:hover,.btn-dropbox.active:hover,.open>.dropdown-toggle.btn-dropbox:hover,.btn-dropbox:active:focus,.btn-dropbox.active:focus,.open>.dropdown-toggle.btn-dropbox:focus,.btn-dropbox:active.focus,.btn-dropbox.active.focus,.open>.dropdown-toggle.btn-dropbox.focus{color:#fff;background-color:#0a568c;border-color:rgba(0,0,0,0.2)}.btn-dropbox:active,.btn-dropbox.active,.open>.dropdown-toggle.btn-dropbox{background-image:none}.btn-dropbox.disabled:hover,.btn-dropbox[disabled]:hover,fieldset[disabled] .btn-dropbox:hover,.btn-dropbox.disabled:focus,.btn-dropbox[disabled]:focus,fieldset[disabled] .btn-dropbox:focus,.btn-dropbox.disabled.focus,.btn-dropbox[disabled].focus,fieldset[disabled] .btn-dropbox.focus{background-color:#1087dd;border-color:rgba(0,0,0,0.2)}.btn-dropbox .badge{color:#1087dd;background-color:#fff}.btn-facebook{color:#fff;background-color:#3b5998;border-color:rgba(0,0,0,0.2)}.btn-facebook:focus,.btn-facebook.focus{color:#fff;background-color:#2d4373;border-color:rgba(0,0,0,0.2)}.btn-facebook:hover{color:#fff;background-color:#2d4373;border-color:rgba(0,0,0,0.2)}.btn-facebook:active,.btn-facebook.active,.open>.dropdown-toggle.btn-facebook{color:#fff;background-color:#2d4373;border-color:rgba(0,0,0,0.2)}.btn-facebook:active:hover,.btn-facebook.active:hover,.open>.dropdown-toggle.btn-facebook:hover,.btn-facebook:active:focus,.btn-facebook.active:focus,.open>.dropdown-toggle.btn-facebook:focus,.btn-facebook:active.focus,.btn-facebook.active.focus,.open>.dropdown-toggle.btn-facebook.focus{color:#fff;background-color:#23345a;border-color:rgba(0,0,0,0.2)}.btn-facebook:active,.btn-facebook.active,.open>.dropdown-toggle.btn-facebook{background-image:none}.btn-facebook.disabled:hover,.btn-facebook[disabled]:hover,fieldset[disabled] .btn-facebook:hover,.btn-facebook.disabled:focus,.btn-facebook[disabled]:focus,fieldset[disabled] .btn-facebook:focus,.btn-facebook.disabled.focus,.btn-facebook[disabled].focus,fieldset[disabled] .btn-facebook.focus{background-color:#3b5998;border-color:rgba(0,0,0,0.2)}.btn-facebook .badge{color:#3b5998;background-color:#fff}.btn-flickr{color:#fff;background-color:#ff0084;border-color:rgba(0,0,0,0.2)}.btn-flickr:focus,.btn-flickr.focus{color:#fff;background-color:#cc006a;border-color:rgba(0,0,0,0.2)}.btn-flickr:hover{color:#fff;background-color:#cc006a;border-color:rgba(0,0,0,0.2)}.btn-flickr:active,.btn-flickr.active,.open>.dropdown-toggle.btn-flickr{color:#fff;background-color:#cc006a;border-color:rgba(0,0,0,0.2)}.btn-flickr:active:hover,.btn-flickr.active:hover,.open>.dropdown-toggle.btn-flickr:hover,.btn-flickr:active:focus,.btn-flickr.active:focus,.open>.dropdown-toggle.btn-flickr:focus,.btn-flickr:active.focus,.btn-flickr.active.focus,.open>.dropdown-toggle.btn-flickr.focus{color:#fff;background-color:#a80057;border-color:rgba(0,0,0,0.2)}.btn-flickr:active,.btn-flickr.active,.open>.dropdown-toggle.btn-flickr{background-image:none}.btn-flickr.disabled:hover,.btn-flickr[disabled]:hover,fieldset[disabled] .btn-flickr:hover,.btn-flickr.disabled:focus,.btn-flickr[disabled]:focus,fieldset[disabled] .btn-flickr:focus,.btn-flickr.disabled.focus,.btn-flickr[disabled].focus,fieldset[disabled] .btn-flickr.focus{background-color:#ff0084;border-color:rgba(0,0,0,0.2)}.btn-flickr .badge{color:#ff0084;background-color:#fff}.btn-foursquare{color:#fff;background-color:#f94877;border-color:rgba(0,0,0,0.2)}.btn-foursquare:focus,.btn-foursquare.focus{color:#fff;background-color:#f71752;border-color:rgba(0,0,0,0.2)}.btn-foursquare:hover{color:#fff;background-color:#f71752;border-color:rgba(0,0,0,0.2)}.btn-foursquare:active,.btn-foursquare.active,.open>.dropdown-toggle.btn-foursquare{color:#fff;background-color:#f71752;border-color:rgba(0,0,0,0.2)}.btn-foursquare:active:hover,.btn-foursquare.active:hover,.open>.dropdown-toggle.btn-foursquare:hover,.btn-foursquare:active:focus,.btn-foursquare.active:focus,.open>.dropdown-toggle.btn-foursquare:focus,.btn-foursquare:active.focus,.btn-foursquare.active.focus,.open>.dropdown-toggle.btn-foursquare.focus{color:#fff;background-color:#e30742;border-color:rgba(0,0,0,0.2)}.btn-foursquare:active,.btn-foursquare.active,.open>.dropdown-toggle.btn-foursquare{background-image:none}.btn-foursquare.disabled:hover,.btn-foursquare[disabled]:hover,fieldset[disabled] .btn-foursquare:hover,.btn-foursquare.disabled:focus,.btn-foursquare[disabled]:focus,fieldset[disabled] .btn-foursquare:focus,.btn-foursquare.disabled.focus,.btn-foursquare[disabled].focus,fieldset[disabled] .btn-foursquare.focus{background-color:#f94877;border-color:rgba(0,0,0,0.2)}.btn-foursquare .badge{color:#f94877;background-color:#fff}.btn-github{color:#fff;background-color:#444444;border-color:rgba(0,0,0,0.2)}.btn-github:focus,.btn-github.focus{color:#fff;background-color:#2b2b2b;border-color:rgba(0,0,0,0.2)}.btn-github:hover{color:#fff;background-color:#2b2b2b;border-color:rgba(0,0,0,0.2)}.btn-github:active,.btn-github.active,.open>.dropdown-toggle.btn-github{color:#fff;background-color:#2b2b2b;border-color:rgba(0,0,0,0.2)}.btn-github:active:hover,.btn-github.active:hover,.open>.dropdown-toggle.btn-github:hover,.btn-github:active:focus,.btn-github.active:focus,.open>.dropdown-toggle.btn-github:focus,.btn-github:active.focus,.btn-github.active.focus,.open>.dropdown-toggle.btn-github.focus{color:#fff;background-color:#191919;border-color:rgba(0,0,0,0.2)}.btn-github:active,.btn-github.active,.open>.dropdown-toggle.btn-github{background-image:none}.btn-github.disabled:hover,.btn-github[disabled]:hover,fieldset[disabled] .btn-github:hover,.btn-github.disabled:focus,.btn-github[disabled]:focus,fieldset[disabled] .btn-github:focus,.btn-github.disabled.focus,.btn-github[disabled].focus,fieldset[disabled] .btn-github.focus{background-color:#444444;border-color:rgba(0,0,0,0.2)}.btn-github .badge{color:#444444;background-color:#fff}.btn-google{color:#fff;background-color:#dd4b39;border-color:rgba(0,0,0,0.2)}.btn-google:focus,.btn-google.focus{color:#fff;background-color:#c23321;border-color:rgba(0,0,0,0.2)}.btn-google:hover{color:#fff;background-color:#c23321;border-color:rgba(0,0,0,0.2)}.btn-google:active,.btn-google.active,.open>.dropdown-toggle.btn-google{color:#fff;background-color:#c23321;border-color:rgba(0,0,0,0.2)}.btn-google:active:hover,.btn-google.active:hover,.open>.dropdown-toggle.btn-google:hover,.btn-google:active:focus,.btn-google.active:focus,.open>.dropdown-toggle.btn-google:focus,.btn-google:active.focus,.btn-google.active.focus,.open>.dropdown-toggle.btn-google.focus{color:#fff;background-color:#a32b1c;border-color:rgba(0,0,0,0.2)}.btn-google:active,.btn-google.active,.open>.dropdown-toggle.btn-google{background-image:none}.btn-google.disabled:hover,.btn-google[disabled]:hover,fieldset[disabled] .btn-google:hover,.btn-google.disabled:focus,.btn-google[disabled]:focus,fieldset[disabled] .btn-google:focus,.btn-google.disabled.focus,.btn-google[disabled].focus,fieldset[disabled] .btn-google.focus{background-color:#dd4b39;border-color:rgba(0,0,0,0.2)}.btn-google .badge{color:#dd4b39;background-color:#fff}.btn-instagram{color:#fff;background-color:#3f729b;border-color:rgba(0,0,0,0.2)}.btn-instagram:focus,.btn-instagram.focus{color:#fff;background-color:#305777;border-color:rgba(0,0,0,0.2)}.btn-instagram:hover{color:#fff;background-color:#305777;border-color:rgba(0,0,0,0.2)}.btn-instagram:active,.btn-instagram.active,.open>.dropdown-toggle.btn-instagram{color:#fff;background-color:#305777;border-color:rgba(0,0,0,0.2)}.btn-instagram:active:hover,.btn-instagram.active:hover,.open>.dropdown-toggle.btn-instagram:hover,.btn-instagram:active:focus,.btn-instagram.active:focus,.open>.dropdown-toggle.btn-instagram:focus,.btn-instagram:active.focus,.btn-instagram.active.focus,.open>.dropdown-toggle.btn-instagram.focus{color:#fff;background-color:#26455d;border-color:rgba(0,0,0,0.2)}.btn-instagram:active,.btn-instagram.active,.open>.dropdown-toggle.btn-instagram{background-image:none}.btn-instagram.disabled:hover,.btn-instagram[disabled]:hover,fieldset[disabled] .btn-instagram:hover,.btn-instagram.disabled:focus,.btn-instagram[disabled]:focus,fieldset[disabled] .btn-instagram:focus,.btn-instagram.disabled.focus,.btn-instagram[disabled].focus,fieldset[disabled] .btn-instagram.focus{background-color:#3f729b;border-color:rgba(0,0,0,0.2)}.btn-instagram .badge{color:#3f729b;background-color:#fff}.btn-linkedin{color:#fff;background-color:#007bb6;border-color:rgba(0,0,0,0.2)}.btn-linkedin:focus,.btn-linkedin.focus{color:#fff;background-color:#005983;border-color:rgba(0,0,0,0.2)}.btn-linkedin:hover{color:#fff;background-color:#005983;border-color:rgba(0,0,0,0.2)}.btn-linkedin:active,.btn-linkedin.active,.open>.dropdown-toggle.btn-linkedin{color:#fff;background-color:#005983;border-color:rgba(0,0,0,0.2)}.btn-linkedin:active:hover,.btn-linkedin.active:hover,.open>.dropdown-toggle.btn-linkedin:hover,.btn-linkedin:active:focus,.btn-linkedin.active:focus,.open>.dropdown-toggle.btn-linkedin:focus,.btn-linkedin:active.focus,.btn-linkedin.active.focus,.open>.dropdown-toggle.btn-linkedin.focus{color:#fff;background-color:#00405f;border-color:rgba(0,0,0,0.2)}.btn-linkedin:active,.btn-linkedin.active,.open>.dropdown-toggle.btn-linkedin{background-image:none}.btn-linkedin.disabled:hover,.btn-linkedin[disabled]:hover,fieldset[disabled] .btn-linkedin:hover,.btn-linkedin.disabled:focus,.btn-linkedin[disabled]:focus,fieldset[disabled] .btn-linkedin:focus,.btn-linkedin.disabled.focus,.btn-linkedin[disabled].focus,fieldset[disabled] .btn-linkedin.focus{background-color:#007bb6;border-color:rgba(0,0,0,0.2)}.btn-linkedin .badge{color:#007bb6;background-color:#fff}.btn-microsoft{color:#fff;background-color:#2672ec;border-color:rgba(0,0,0,0.2)}.btn-microsoft:focus,.btn-microsoft.focus{color:#fff;background-color:#125acd;border-color:rgba(0,0,0,0.2)}.btn-microsoft:hover{color:#fff;background-color:#125acd;border-color:rgba(0,0,0,0.2)}.btn-microsoft:active,.btn-microsoft.active,.open>.dropdown-toggle.btn-microsoft{color:#fff;background-color:#125acd;border-color:rgba(0,0,0,0.2)}.btn-microsoft:active:hover,.btn-microsoft.active:hover,.open>.dropdown-toggle.btn-microsoft:hover,.btn-microsoft:active:focus,.btn-microsoft.active:focus,.open>.dropdown-toggle.btn-microsoft:focus,.btn-microsoft:active.focus,.btn-microsoft.active.focus,.open>.dropdown-toggle.btn-microsoft.focus{color:#fff;background-color:#0f4bac;border-color:rgba(0,0,0,0.2)}.btn-microsoft:active,.btn-microsoft.active,.open>.dropdown-toggle.btn-microsoft{background-image:none}.btn-microsoft.disabled:hover,.btn-microsoft[disabled]:hover,fieldset[disabled] .btn-microsoft:hover,.btn-microsoft.disabled:focus,.btn-microsoft[disabled]:focus,fieldset[disabled] .btn-microsoft:focus,.btn-microsoft.disabled.focus,.btn-microsoft[disabled].focus,fieldset[disabled] .btn-microsoft.focus{background-color:#2672ec;border-color:rgba(0,0,0,0.2)}.btn-microsoft .badge{color:#2672ec;background-color:#fff}.btn-openid{color:#fff;background-color:#f7931e;border-color:rgba(0,0,0,0.2)}.btn-openid:focus,.btn-openid.focus{color:#fff;background-color:#da7908;border-color:rgba(0,0,0,0.2)}.btn-openid:hover{color:#fff;background-color:#da7908;border-color:rgba(0,0,0,0.2)}.btn-openid:active,.btn-openid.active,.open>.dropdown-toggle.btn-openid{color:#fff;background-color:#da7908;border-color:rgba(0,0,0,0.2)}.btn-openid:active:hover,.btn-openid.active:hover,.open>.dropdown-toggle.btn-openid:hover,.btn-openid:active:focus,.btn-openid.active:focus,.open>.dropdown-toggle.btn-openid:focus,.btn-openid:active.focus,.btn-openid.active.focus,.open>.dropdown-toggle.btn-openid.focus{color:#fff;background-color:#b86607;border-color:rgba(0,0,0,0.2)}.btn-openid:active,.btn-openid.active,.open>.dropdown-toggle.btn-openid{background-image:none}.btn-openid.disabled:hover,.btn-openid[disabled]:hover,fieldset[disabled] .btn-openid:hover,.btn-openid.disabled:focus,.btn-openid[disabled]:focus,fieldset[disabled] .btn-openid:focus,.btn-openid.disabled.focus,.btn-openid[disabled].focus,fieldset[disabled] .btn-openid.focus{background-color:#f7931e;border-color:rgba(0,0,0,0.2)}.btn-openid .badge{color:#f7931e;background-color:#fff}.btn-pinterest{color:#fff;background-color:#cb2027;border-color:rgba(0,0,0,0.2)}.btn-pinterest:focus,.btn-pinterest.focus{color:#fff;background-color:#9f191f;border-color:rgba(0,0,0,0.2)}.btn-pinterest:hover{color:#fff;background-color:#9f191f;border-color:rgba(0,0,0,0.2)}.btn-pinterest:active,.btn-pinterest.active,.open>.dropdown-toggle.btn-pinterest{color:#fff;background-color:#9f191f;border-color:rgba(0,0,0,0.2)}.btn-pinterest:active:hover,.btn-pinterest.active:hover,.open>.dropdown-toggle.btn-pinterest:hover,.btn-pinterest:active:focus,.btn-pinterest.active:focus,.open>.dropdown-toggle.btn-pinterest:focus,.btn-pinterest:active.focus,.btn-pinterest.active.focus,.open>.dropdown-toggle.btn-pinterest.focus{color:#fff;background-color:#801419;border-color:rgba(0,0,0,0.2)}.btn-pinterest:active,.btn-pinterest.active,.open>.dropdown-toggle.btn-pinterest{background-image:none}.btn-pinterest.disabled:hover,.btn-pinterest[disabled]:hover,fieldset[disabled] .btn-pinterest:hover,.btn-pinterest.disabled:focus,.btn-pinterest[disabled]:focus,fieldset[disabled] .btn-pinterest:focus,.btn-pinterest.disabled.focus,.btn-pinterest[disabled].focus,fieldset[disabled] .btn-pinterest.focus{background-color:#cb2027;border-color:rgba(0,0,0,0.2)}.btn-pinterest .badge{color:#cb2027;background-color:#fff}.btn-reddit{color:#000;background-color:#eff7ff;border-color:rgba(0,0,0,0.2)}.btn-reddit:focus,.btn-reddit.focus{color:#000;background-color:#bcddff;border-color:rgba(0,0,0,0.2)}.btn-reddit:hover{color:#000;background-color:#bcddff;border-color:rgba(0,0,0,0.2)}.btn-reddit:active,.btn-reddit.active,.open>.dropdown-toggle.btn-reddit{color:#000;background-color:#bcddff;border-color:rgba(0,0,0,0.2)}.btn-reddit:active:hover,.btn-reddit.active:hover,.open>.dropdown-toggle.btn-reddit:hover,.btn-reddit:active:focus,.btn-reddit.active:focus,.open>.dropdown-toggle.btn-reddit:focus,.btn-reddit:active.focus,.btn-reddit.active.focus,.open>.dropdown-toggle.btn-reddit.focus{color:#000;background-color:#98ccff;border-color:rgba(0,0,0,0.2)}.btn-reddit:active,.btn-reddit.active,.open>.dropdown-toggle.btn-reddit{background-image:none}.btn-reddit.disabled:hover,.btn-reddit[disabled]:hover,fieldset[disabled] .btn-reddit:hover,.btn-reddit.disabled:focus,.btn-reddit[disabled]:focus,fieldset[disabled] .btn-reddit:focus,.btn-reddit.disabled.focus,.btn-reddit[disabled].focus,fieldset[disabled] .btn-reddit.focus{background-color:#eff7ff;border-color:rgba(0,0,0,0.2)}.btn-reddit .badge{color:#eff7ff;background-color:#000}.btn-soundcloud{color:#fff;background-color:#ff5500;border-color:rgba(0,0,0,0.2)}.btn-soundcloud:focus,.btn-soundcloud.focus{color:#fff;background-color:#c40;border-color:rgba(0,0,0,0.2)}.btn-soundcloud:hover{color:#fff;background-color:#c40;border-color:rgba(0,0,0,0.2)}.btn-soundcloud:active,.btn-soundcloud.active,.open>.dropdown-toggle.btn-soundcloud{color:#fff;background-color:#c40;border-color:rgba(0,0,0,0.2)}.btn-soundcloud:active:hover,.btn-soundcloud.active:hover,.open>.dropdown-toggle.btn-soundcloud:hover,.btn-soundcloud:active:focus,.btn-soundcloud.active:focus,.open>.dropdown-toggle.btn-soundcloud:focus,.btn-soundcloud:active.focus,.btn-soundcloud.active.focus,.open>.dropdown-toggle.btn-soundcloud.focus{color:#fff;background-color:#a83800;border-color:rgba(0,0,0,0.2)}.btn-soundcloud:active,.btn-soundcloud.active,.open>.dropdown-toggle.btn-soundcloud{background-image:none}.btn-soundcloud.disabled:hover,.btn-soundcloud[disabled]:hover,fieldset[disabled] .btn-soundcloud:hover,.btn-soundcloud.disabled:focus,.btn-soundcloud[disabled]:focus,fieldset[disabled] .btn-soundcloud:focus,.btn-soundcloud.disabled.focus,.btn-soundcloud[disabled].focus,fieldset[disabled] .btn-soundcloud.focus{background-color:#ff5500;border-color:rgba(0,0,0,0.2)}.btn-soundcloud .badge{color:#ff5500;background-color:#fff}.btn-tumblr{color:#fff;background-color:#2c4762;border-color:rgba(0,0,0,0.2)}.btn-tumblr:focus,.btn-tumblr.focus{color:#fff;background-color:#1c2d3f;border-color:rgba(0,0,0,0.2)}.btn-tumblr:hover{color:#fff;background-color:#1c2d3f;border-color:rgba(0,0,0,0.2)}.btn-tumblr:active,.btn-tumblr.active,.open>.dropdown-toggle.btn-tumblr{color:#fff;background-color:#1c2d3f;border-color:rgba(0,0,0,0.2)}.btn-tumblr:active:hover,.btn-tumblr.active:hover,.open>.dropdown-toggle.btn-tumblr:hover,.btn-tumblr:active:focus,.btn-tumblr.active:focus,.open>.dropdown-toggle.btn-tumblr:focus,.btn-tumblr:active.focus,.btn-tumblr.active.focus,.open>.dropdown-toggle.btn-tumblr.focus{color:#fff;background-color:#111c26;border-color:rgba(0,0,0,0.2)}.btn-tumblr:active,.btn-tumblr.active,.open>.dropdown-toggle.btn-tumblr{background-image:none}.btn-tumblr.disabled:hover,.btn-tumblr[disabled]:hover,fieldset[disabled] .btn-tumblr:hover,.btn-tumblr.disabled:focus,.btn-tumblr[disabled]:focus,fieldset[disabled] .btn-tumblr:focus,.btn-tumblr.disabled.focus,.btn-tumblr[disabled].focus,fieldset[disabled] .btn-tumblr.focus{background-color:#2c4762;border-color:rgba(0,0,0,0.2)}.btn-tumblr .badge{color:#2c4762;background-color:#fff}.btn-twitter{color:#fff;background-color:#55acee;border-color:rgba(0,0,0,0.2)}.btn-twitter:focus,.btn-twitter.focus{color:#fff;background-color:#2795e9;border-color:rgba(0,0,0,0.2)}.btn-twitter:hover{color:#fff;background-color:#2795e9;border-color:rgba(0,0,0,0.2)}.btn-twitter:active,.btn-twitter.active,.open>.dropdown-toggle.btn-twitter{color:#fff;background-color:#2795e9;border-color:rgba(0,0,0,0.2)}.btn-twitter:active:hover,.btn-twitter.active:hover,.open>.dropdown-toggle.btn-twitter:hover,.btn-twitter:active:focus,.btn-twitter.active:focus,.open>.dropdown-toggle.btn-twitter:focus,.btn-twitter:active.focus,.btn-twitter.active.focus,.open>.dropdown-toggle.btn-twitter.focus{color:#fff;background-color:#1583d7;border-color:rgba(0,0,0,0.2)}.btn-twitter:active,.btn-twitter.active,.open>.dropdown-toggle.btn-twitter{background-image:none}.btn-twitter.disabled:hover,.btn-twitter[disabled]:hover,fieldset[disabled] .btn-twitter:hover,.btn-twitter.disabled:focus,.btn-twitter[disabled]:focus,fieldset[disabled] .btn-twitter:focus,.btn-twitter.disabled.focus,.btn-twitter[disabled].focus,fieldset[disabled] .btn-twitter.focus{background-color:#55acee;border-color:rgba(0,0,0,0.2)}.btn-twitter .badge{color:#55acee;background-color:#fff}.btn-vimeo{color:#fff;background-color:#1ab7ea;border-color:rgba(0,0,0,0.2)}.btn-vimeo:focus,.btn-vimeo.focus{color:#fff;background-color:#1295bf;border-color:rgba(0,0,0,0.2)}.btn-vimeo:hover{color:#fff;background-color:#1295bf;border-color:rgba(0,0,0,0.2)}.btn-vimeo:active,.btn-vimeo.active,.open>.dropdown-toggle.btn-vimeo{color:#fff;background-color:#1295bf;border-color:rgba(0,0,0,0.2)}.btn-vimeo:active:hover,.btn-vimeo.active:hover,.open>.dropdown-toggle.btn-vimeo:hover,.btn-vimeo:active:focus,.btn-vimeo.active:focus,.open>.dropdown-toggle.btn-vimeo:focus,.btn-vimeo:active.focus,.btn-vimeo.active.focus,.open>.dropdown-toggle.btn-vimeo.focus{color:#fff;background-color:#0f7b9f;border-color:rgba(0,0,0,0.2)}.btn-vimeo:active,.btn-vimeo.active,.open>.dropdown-toggle.btn-vimeo{background-image:none}.btn-vimeo.disabled:hover,.btn-vimeo[disabled]:hover,fieldset[disabled] .btn-vimeo:hover,.btn-vimeo.disabled:focus,.btn-vimeo[disabled]:focus,fieldset[disabled] .btn-vimeo:focus,.btn-vimeo.disabled.focus,.btn-vimeo[disabled].focus,fieldset[disabled] .btn-vimeo.focus{background-color:#1ab7ea;border-color:rgba(0,0,0,0.2)}.btn-vimeo .badge{color:#1ab7ea;background-color:#fff}.btn-vk{color:#fff;background-color:#587ea3;border-color:rgba(0,0,0,0.2)}.btn-vk:focus,.btn-vk.focus{color:#fff;background-color:#466482;border-color:rgba(0,0,0,0.2)}.btn-vk:hover{color:#fff;background-color:#466482;border-color:rgba(0,0,0,0.2)}.btn-vk:active,.btn-vk.active,.open>.dropdown-toggle.btn-vk{color:#fff;background-color:#466482;border-color:rgba(0,0,0,0.2)}.btn-vk:active:hover,.btn-vk.active:hover,.open>.dropdown-toggle.btn-vk:hover,.btn-vk:active:focus,.btn-vk.active:focus,.open>.dropdown-toggle.btn-vk:focus,.btn-vk:active.focus,.btn-vk.active.focus,.open>.dropdown-toggle.btn-vk.focus{color:#fff;background-color:#3a526b;border-color:rgba(0,0,0,0.2)}.btn-vk:active,.btn-vk.active,.open>.dropdown-toggle.btn-vk{background-image:none}.btn-vk.disabled:hover,.btn-vk[disabled]:hover,fieldset[disabled] .btn-vk:hover,.btn-vk.disabled:focus,.btn-vk[disabled]:focus,fieldset[disabled] .btn-vk:focus,.btn-vk.disabled.focus,.btn-vk[disabled].focus,fieldset[disabled] .btn-vk.focus{background-color:#587ea3;border-color:rgba(0,0,0,0.2)}.btn-vk .badge{color:#587ea3;background-color:#fff}.btn-yahoo{color:#fff;background-color:#720e9e;border-color:rgba(0,0,0,0.2)}.btn-yahoo:focus,.btn-yahoo.focus{color:#fff;background-color:#500a6f;border-color:rgba(0,0,0,0.2)}.btn-yahoo:hover{color:#fff;background-color:#500a6f;border-color:rgba(0,0,0,0.2)}.btn-yahoo:active,.btn-yahoo.active,.open>.dropdown-toggle.btn-yahoo{color:#fff;background-color:#500a6f;border-color:rgba(0,0,0,0.2)}.btn-yahoo:active:hover,.btn-yahoo.active:hover,.open>.dropdown-toggle.btn-yahoo:hover,.btn-yahoo:active:focus,.btn-yahoo.active:focus,.open>.dropdown-toggle.btn-yahoo:focus,.btn-yahoo:active.focus,.btn-yahoo.active.focus,.open>.dropdown-toggle.btn-yahoo.focus{color:#fff;background-color:#39074e;border-color:rgba(0,0,0,0.2)}.btn-yahoo:active,.btn-yahoo.active,.open>.dropdown-toggle.btn-yahoo{background-image:none}.btn-yahoo.disabled:hover,.btn-yahoo[disabled]:hover,fieldset[disabled] .btn-yahoo:hover,.btn-yahoo.disabled:focus,.btn-yahoo[disabled]:focus,fieldset[disabled] .btn-yahoo:focus,.btn-yahoo.disabled.focus,.btn-yahoo[disabled].focus,fieldset[disabled] .btn-yahoo.focus{background-color:#720e9e;border-color:rgba(0,0,0,0.2)}.btn-yahoo .badge{color:#720e9e;background-color:#fff}.fc-button{background:#f4f4f4;background-image:none;color:#444;border-color:#ddd;border-bottom-color:#ddd}.fc-button:hover,.fc-button:active,.fc-button.hover{background-color:#e9e9e9}.fc-header-title h2{font-size:15px;line-height:1.6em;color:#666;margin-left:10px}.fc-header-right{padding-right:10px}.fc-header-left{padding-left:10px}.fc-widget-header{background:#fafafa}.fc-grid{width:100%;border:0}.fc-widget-header:first-of-type,.fc-widget-content:first-of-type{border-left:0;border-right:0}.fc-widget-header:last-of-type,.fc-widget-content:last-of-type{border-right:0}.fc-toolbar{padding:10px;margin:0}.fc-day-number{font-size:20px;font-weight:300;padding-right:10px}.fc-color-picker{list-style:none;margin:0;padding:0}.fc-color-picker>li{float:left;font-size:30px;margin-right:5px;line-height:30px}.fc-color-picker>li .fa{-webkit-transition:-webkit-transform linear .3s;-moz-transition:-moz-transform linear .3s;-o-transition:-o-transform linear .3s;transition:transform linear .3s}.fc-color-picker>li .fa:hover{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);-o-transform:rotate(30deg);transform:rotate(30deg)}#add-new-event{-webkit-transition:all linear .3s;-o-transition:all linear .3s;transition:all linear .3s}.external-event{padding:5px 10px;font-weight:bold;margin-bottom:4px;box-shadow:0 1px 1px rgba(0,0,0,0.1);text-shadow:0 1px 1px rgba(0,0,0,0.1);border-radius:3px;cursor:move}.external-event:hover{box-shadow:inset 0 0 90px rgba(0,0,0,0.2)}.select2-container--default.select2-container--focus,.select2-selection.select2-container--focus,.select2-container--default:focus,.select2-selection:focus,.select2-container--default:active,.select2-selection:active{outline:none}.select2-container--default .select2-selection--single,.select2-selection .select2-selection--single{border:1px solid #d2d6de;border-radius:0;padding:6px 12px;height:34px}.select2-container--default.select2-container--open{border-color:#3c8dbc}.select2-dropdown{border:1px solid #d2d6de;border-radius:0}.select2-container--default .select2-results__option--highlighted[aria-selected]{background-color:#3c8dbc;color:white}.select2-results__option{padding:6px 12px;user-select:none;-webkit-user-select:none}.select2-container .select2-selection--single .select2-selection__rendered{padding-left:0;padding-right:0;height:auto;margin-top:-4px}.select2-container[dir="rtl"] .select2-selection--single .select2-selection__rendered{padding-right:6px;padding-left:20px}.select2-container--default .select2-selection--single .select2-selection__arrow{height:28px;right:3px}.select2-container--default .select2-selection--single .select2-selection__arrow b{margin-top:0}.select2-dropdown .select2-search__field,.select2-search--inline .select2-search__field{border:1px solid #d2d6de}.select2-dropdown .select2-search__field:focus,.select2-search--inline .select2-search__field:focus{outline:none}.select2-container--default.select2-container--focus .select2-selection--multiple,.select2-container--default .select2-search--dropdown .select2-search__field{border-color:#3c8dbc !important}.select2-container--default .select2-results__option[aria-disabled=true]{color:#999}.select2-container--default .select2-results__option[aria-selected=true]{background-color:#ddd}.select2-container--default .select2-results__option[aria-selected=true],.select2-container--default .select2-results__option[aria-selected=true]:hover{color:#444}.select2-container--default .select2-selection--multiple{border:1px solid #d2d6de;border-radius:0}.select2-container--default .select2-selection--multiple:focus{border-color:#3c8dbc}.select2-container--default.select2-container--focus .select2-selection--multiple{border-color:#d2d6de}.select2-container--default .select2-selection--multiple .select2-selection__choice{background-color:#3c8dbc;border-color:#367fa9;padding:1px 10px;color:#fff}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove{margin-right:5px;color:rgba(255,255,255,0.7)}.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover{color:#fff}.select2-container .select2-selection--single .select2-selection__rendered{padding-right:10px}.box .datepicker-inline,.box .datepicker-inline .datepicker-days,.box .datepicker-inline>table,.box .datepicker-inline .datepicker-days>table{width:100%}.box .datepicker-inline td:hover,.box .datepicker-inline .datepicker-days td:hover,.box .datepicker-inline>table td:hover,.box .datepicker-inline .datepicker-days>table td:hover{background-color:rgba(255,255,255,0.3)}.box .datepicker-inline td.day.old,.box .datepicker-inline .datepicker-days td.day.old,.box .datepicker-inline>table td.day.old,.box .datepicker-inline .datepicker-days>table td.day.old,.box .datepicker-inline td.day.new,.box .datepicker-inline .datepicker-days td.day.new,.box .datepicker-inline>table td.day.new,.box .datepicker-inline .datepicker-days>table td.day.new{color:#777}.pad{padding:10px}.margin{margin:10px}.margin-bottom{margin-bottom:20px}.margin-bottom-none{margin-bottom:0}.margin-r-5{margin-right:5px}.inline{display:inline}.description-block{display:block;margin:10px 0;text-align:center}.description-block.margin-bottom{margin-bottom:25px}.description-block>.description-header{margin:0;padding:0;font-weight:600;font-size:16px}.description-block>.description-text{text-transform:uppercase}.bg-red,.bg-yellow,.bg-aqua,.bg-blue,.bg-light-blue,.bg-green,.bg-navy,.bg-teal,.bg-olive,.bg-lime,.bg-orange,.bg-fuchsia,.bg-purple,.bg-maroon,.bg-black,.bg-red-active,.bg-yellow-active,.bg-aqua-active,.bg-blue-active,.bg-light-blue-active,.bg-green-active,.bg-navy-active,.bg-teal-active,.bg-olive-active,.bg-lime-active,.bg-orange-active,.bg-fuchsia-active,.bg-purple-active,.bg-maroon-active,.bg-black-active,.callout.callout-danger,.callout.callout-warning,.callout.callout-info,.callout.callout-success,.alert-success,.alert-danger,.alert-error,.alert-warning,.alert-info,.label-danger,.label-info,.label-warning,.label-primary,.label-success,.modal-primary .modal-body,.modal-primary .modal-header,.modal-primary .modal-footer,.modal-warning .modal-body,.modal-warning .modal-header,.modal-warning .modal-footer,.modal-info .modal-body,.modal-info .modal-header,.modal-info .modal-footer,.modal-success .modal-body,.modal-success .modal-header,.modal-success .modal-footer,.modal-danger .modal-body,.modal-danger .modal-header,.modal-danger .modal-footer{color:#fff !important}.bg-gray{color:#000;background-color:#d2d6de !important}.bg-gray-light{background-color:#f7f7f7}.bg-black{background-color:#111 !important}.bg-red,.callout.callout-danger,.alert-danger,.alert-error,.label-danger,.modal-danger .modal-body{background-color:#dd4b39 !important}.bg-yellow,.callout.callout-warning,.alert-warning,.label-warning,.modal-warning .modal-body{background-color:#f39c12 !important}.bg-aqua,.callout.callout-info,.alert-info,.label-info,.modal-info .modal-body{background-color:#00c0ef !important}.bg-blue{background-color:#0073b7 !important}.bg-light-blue,.label-primary,.modal-primary .modal-body{background-color:#3c8dbc !important}.bg-green,.callout.callout-success,.alert-success,.label-success,.modal-success .modal-body{background-color:#00a65a !important}.bg-navy{background-color:#001F3F !important}.bg-teal{background-color:#39CCCC !important}.bg-olive{background-color:#3D9970 !important}.bg-lime{background-color:#01FF70 !important}.bg-orange{background-color:#FF851B !important}.bg-fuchsia{background-color:#F012BE !important}.bg-purple{background-color:#605ca8 !important}.bg-maroon{background-color:#D81B60 !important}.bg-gray-active{color:#000;background-color:#b5bbc8 !important}.bg-black-active{background-color:#000 !important}.bg-red-active,.modal-danger .modal-header,.modal-danger .modal-footer{background-color:#d33724 !important}.bg-yellow-active,.modal-warning .modal-header,.modal-warning .modal-footer{background-color:#db8b0b !important}.bg-aqua-active,.modal-info .modal-header,.modal-info .modal-footer{background-color:#00a7d0 !important}.bg-blue-active{background-color:#005384 !important}.bg-light-blue-active,.modal-primary .modal-header,.modal-primary .modal-footer{background-color:#357ca5 !important}.bg-green-active,.modal-success .modal-header,.modal-success .modal-footer{background-color:#008d4c !important}.bg-navy-active{background-color:#001a35 !important}.bg-teal-active{background-color:#30bbbb !important}.bg-olive-active{background-color:#368763 !important}.bg-lime-active{background-color:#00e765 !important}.bg-orange-active{background-color:#ff7701 !important}.bg-fuchsia-active{background-color:#db0ead !important}.bg-purple-active{background-color:#555299 !important}.bg-maroon-active{background-color:#ca195a !important}[class^="bg-"].disabled{opacity:.65;filter:alpha(opacity=65)}.text-red{color:#dd4b39 !important}.text-yellow{color:#f39c12 !important}.text-aqua{color:#00c0ef !important}.text-blue{color:#0073b7 !important}.text-black{color:#111 !important}.text-light-blue{color:#3c8dbc !important}.text-green{color:#00a65a !important}.text-gray{color:#d2d6de !important}.text-navy{color:#001F3F !important}.text-teal{color:#39CCCC !important}.text-olive{color:#3D9970 !important}.text-lime{color:#01FF70 !important}.text-orange{color:#FF851B !important}.text-fuchsia{color:#F012BE !important}.text-purple{color:#605ca8 !important}.text-maroon{color:#D81B60 !important}.link-muted{color:#7a869d}.link-muted:hover,.link-muted:focus{color:#606c84}.link-black{color:#666}.link-black:hover,.link-black:focus{color:#999}.hide{display:none !important}.no-border{border:0 !important}.no-padding{padding:0 !important}.no-margin{margin:0 !important}.no-shadow{box-shadow:none !important}.list-unstyled,.chart-legend,.contacts-list,.users-list,.mailbox-attachments{list-style:none;margin:0;padding:0}.list-group-unbordered>.list-group-item{border-left:0;border-right:0;border-radius:0;padding-left:0;padding-right:0}.flat{border-radius:0 !important}.text-bold,.text-bold.table td,.text-bold.table th{font-weight:700}.text-sm{font-size:12px}.jqstooltip{padding:5px !important;width:auto !important;height:auto !important}.bg-teal-gradient{background:#39CCCC !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #39CCCC), color-stop(1, #7adddd)) !important;background:-ms-linear-gradient(bottom, #39CCCC, #7adddd) !important;background:-moz-linear-gradient(center bottom, #39CCCC 0%, #7adddd 100%) !important;background:-o-linear-gradient(#7adddd, #39CCCC) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#7adddd', endColorstr='#39CCCC', GradientType=0) !important;color:#fff}.bg-light-blue-gradient{background:#3c8dbc !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #3c8dbc), color-stop(1, #67a8ce)) !important;background:-ms-linear-gradient(bottom, #3c8dbc, #67a8ce) !important;background:-moz-linear-gradient(center bottom, #3c8dbc 0%, #67a8ce 100%) !important;background:-o-linear-gradient(#67a8ce, #3c8dbc) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#67a8ce', endColorstr='#3c8dbc', GradientType=0) !important;color:#fff}.bg-blue-gradient{background:#0073b7 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #0073b7), color-stop(1, #0089db)) !important;background:-ms-linear-gradient(bottom, #0073b7, #0089db) !important;background:-moz-linear-gradient(center bottom, #0073b7 0%, #0089db 100%) !important;background:-o-linear-gradient(#0089db, #0073b7) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0089db', endColorstr='#0073b7', GradientType=0) !important;color:#fff}.bg-aqua-gradient{background:#00c0ef !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #00c0ef), color-stop(1, #14d1ff)) !important;background:-ms-linear-gradient(bottom, #00c0ef, #14d1ff) !important;background:-moz-linear-gradient(center bottom, #00c0ef 0%, #14d1ff 100%) !important;background:-o-linear-gradient(#14d1ff, #00c0ef) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#14d1ff', endColorstr='#00c0ef', GradientType=0) !important;color:#fff}.bg-yellow-gradient{background:#f39c12 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #f39c12), color-stop(1, #f7bc60)) !important;background:-ms-linear-gradient(bottom, #f39c12, #f7bc60) !important;background:-moz-linear-gradient(center bottom, #f39c12 0%, #f7bc60 100%) !important;background:-o-linear-gradient(#f7bc60, #f39c12) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f7bc60', endColorstr='#f39c12', GradientType=0) !important;color:#fff}.bg-purple-gradient{background:#605ca8 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #605ca8), color-stop(1, #9491c4)) !important;background:-ms-linear-gradient(bottom, #605ca8, #9491c4) !important;background:-moz-linear-gradient(center bottom, #605ca8 0%, #9491c4 100%) !important;background:-o-linear-gradient(#9491c4, #605ca8) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#9491c4', endColorstr='#605ca8', GradientType=0) !important;color:#fff}.bg-green-gradient{background:#00a65a !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #00a65a), color-stop(1, #00ca6d)) !important;background:-ms-linear-gradient(bottom, #00a65a, #00ca6d) !important;background:-moz-linear-gradient(center bottom, #00a65a 0%, #00ca6d 100%) !important;background:-o-linear-gradient(#00ca6d, #00a65a) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ca6d', endColorstr='#00a65a', GradientType=0) !important;color:#fff}.bg-red-gradient{background:#dd4b39 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #dd4b39), color-stop(1, #e47365)) !important;background:-ms-linear-gradient(bottom, #dd4b39, #e47365) !important;background:-moz-linear-gradient(center bottom, #dd4b39 0%, #e47365 100%) !important;background:-o-linear-gradient(#e47365, #dd4b39) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e47365', endColorstr='#dd4b39', GradientType=0) !important;color:#fff}.bg-black-gradient{background:#111 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #111), color-stop(1, #2b2b2b)) !important;background:-ms-linear-gradient(bottom, #111, #2b2b2b) !important;background:-moz-linear-gradient(center bottom, #111 0%, #2b2b2b 100%) !important;background:-o-linear-gradient(#2b2b2b, #111) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2b2b2b', endColorstr='#111', GradientType=0) !important;color:#fff}.bg-maroon-gradient{background:#D81B60 !important;background:-webkit-gradient(linear, left bottom, left top, color-stop(0, #D81B60), color-stop(1, #e73f7c)) !important;background:-ms-linear-gradient(bottom, #D81B60, #e73f7c) !important;background:-moz-linear-gradient(center bottom, #D81B60 0%, #e73f7c 100%) !important;background:-o-linear-gradient(#e73f7c, #D81B60) !important;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e73f7c', endColorstr='#D81B60', GradientType=0) !important;color:#fff}.description-block .description-icon{font-size:16px}.no-pad-top{padding-top:0}.position-static{position:static !important}.list-header{font-size:15px;padding:10px 4px;font-weight:bold;color:#666}.list-seperator{height:1px;background:#f4f4f4;margin:15px 0 9px 0}.list-link>a{padding:4px;color:#777}.list-link>a:hover{color:#222}.font-light{font-weight:300}.user-block:before,.user-block:after{content:" ";display:table}.user-block:after{clear:both}.user-block img{width:40px;height:40px;float:left}.user-block .username,.user-block .description,.user-block .comment{display:block;margin-left:50px}.user-block .username{font-size:16px;font-weight:600}.user-block .description{color:#999;font-size:13px}.user-block.user-block-sm .username,.user-block.user-block-sm .description,.user-block.user-block-sm .comment{margin-left:40px}.user-block.user-block-sm .username{font-size:14px}.img-sm,.img-md,.img-lg,.box-comments .box-comment img,.user-block.user-block-sm img{float:left}.img-sm,.box-comments .box-comment img,.user-block.user-block-sm img{width:30px !important;height:30px !important}.img-sm+.img-push{margin-left:40px}.img-md{width:60px;height:60px}.img-md+.img-push{margin-left:70px}.img-lg{width:100px;height:100px}.img-lg+.img-push{margin-left:110px}.img-bordered{border:3px solid #d2d6de;padding:3px}.img-bordered-sm{border:2px solid #d2d6de;padding:2px}.attachment-block{border:1px solid #f4f4f4;padding:5px;margin-bottom:10px;background:#f7f7f7}.attachment-block .attachment-img{max-width:100px;max-height:100px;height:auto;float:left}.attachment-block .attachment-pushed{margin-left:110px}.attachment-block .attachment-heading{margin:0}.attachment-block .attachment-text{color:#555}.connectedSortable{min-height:100px}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sort-highlight{background:#f4f4f4;border:1px dashed #ddd;margin-bottom:10px}.full-opacity-hover{opacity:.65;filter:alpha(opacity=65)}.full-opacity-hover:hover{opacity:1;filter:alpha(opacity=100)}.chart{position:relative;overflow:hidden;width:100%}.chart svg,.chart canvas{width:100% !important}hr{border-top:1px solid #555}#red .slider-selection{background:#f56954}#blue .slider-selection{background:#3c8dbc}#green .slider-selection{background:#00a65a}#yellow .slider-selection{background:#f39c12}#aqua .slider-selection{background:#00c0ef}#purple .slider-selection{background:#932ab6}@media print{.no-print,.main-sidebar,.left-side,.main-header,.content-header{display:none !important}.content-wrapper,.right-side,.main-footer{margin-left:0 !important;min-height:0 !important;-webkit-transform:translate(0, 0) !important;-ms-transform:translate(0, 0) !important;-o-transform:translate(0, 0) !important;transform:translate(0, 0) !important}.fixed .content-wrapper,.fixed .right-side{padding-top:0 !important}.invoice{width:100%;border:0;margin:0;padding:0}.invoice-col{float:left;width:33.3333333%}.table-responsive{overflow:auto}.table-responsive>.table tr th,.table-responsive>.table tr td{white-space:normal !important}} \ No newline at end of file diff --git a/public/static/admin/css/_all-skins.min.css b/public/static/admin/css/_all-skins.min.css new file mode 100755 index 0000000..5c98c67 --- /dev/null +++ b/public/static/admin/css/_all-skins.min.css @@ -0,0 +1 @@ +.skin-blue .main-header .navbar{background-color:#3c8dbc}.skin-blue .main-header .navbar .nav>li>a{color:#fff}.skin-blue .main-header .navbar .nav>li>a:hover,.skin-blue .main-header .navbar .nav>li>a:active,.skin-blue .main-header .navbar .nav>li>a:focus,.skin-blue .main-header .navbar .nav .open>a,.skin-blue .main-header .navbar .nav .open>a:hover,.skin-blue .main-header .navbar .nav .open>a:focus,.skin-blue .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue .main-header .logo{background-color:#367fa9;color:#fff;border-bottom:0 solid transparent}.skin-blue .main-header .logo:hover{background-color:#357ca5}.skin-blue .main-header li.user-header{background-color:#3c8dbc}.skin-blue .content-header{background:transparent}.skin-blue .wrapper,.skin-blue .main-sidebar,.skin-blue .left-side{background-color:#222d32}.skin-blue .user-panel>.info,.skin-blue .user-panel>.info>a{color:#fff}.skin-blue .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-blue .sidebar-menu>li>a{border-left:3px solid transparent}.skin-blue .sidebar-menu>li:hover>a,.skin-blue .sidebar-menu>li.active>a,.skin-blue .sidebar-menu>li.menu-open>a{color:#fff;background:#1e282c}.skin-blue .sidebar-menu>li.active>a{border-left-color:#3c8dbc}.skin-blue .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-blue .sidebar a{color:#b8c7ce}.skin-blue .sidebar a:hover{text-decoration:none}.skin-blue .sidebar-menu .treeview-menu>li>a{color:#8aa4af}.skin-blue .sidebar-menu .treeview-menu>li.active>a,.skin-blue .sidebar-menu .treeview-menu>li>a:hover{color:#fff}.skin-blue .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-blue .sidebar-form input[type="text"],.skin-blue .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-blue .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-blue .sidebar-form input[type="text"]:focus,.skin-blue .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}.skin-blue-light .main-header .navbar{background-color:#3c8dbc}.skin-blue-light .main-header .navbar .nav>li>a{color:#fff}.skin-blue-light .main-header .navbar .nav>li>a:hover,.skin-blue-light .main-header .navbar .nav>li>a:active,.skin-blue-light .main-header .navbar .nav>li>a:focus,.skin-blue-light .main-header .navbar .nav .open>a,.skin-blue-light .main-header .navbar .nav .open>a:hover,.skin-blue-light .main-header .navbar .nav .open>a:focus,.skin-blue-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-blue-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-blue-light .main-header .navbar .sidebar-toggle:hover{background-color:#367fa9}@media (max-width:767px){.skin-blue-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-blue-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-blue-light .main-header .navbar .dropdown-menu li a:hover{background:#367fa9}}.skin-blue-light .main-header .logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue-light .main-header .logo:hover{background-color:#3b8ab8}.skin-blue-light .main-header li.user-header{background-color:#3c8dbc}.skin-blue-light .content-header{background:transparent}.skin-blue-light .wrapper,.skin-blue-light .main-sidebar,.skin-blue-light .left-side{background-color:#f9fafc}.skin-blue-light .main-sidebar{border-right:1px solid #d2d6de}.skin-blue-light .user-panel>.info,.skin-blue-light .user-panel>.info>a{color:#444}.skin-blue-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-blue-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-blue-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-blue-light .sidebar-menu>li:hover>a,.skin-blue-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-blue-light .sidebar-menu>li.active{border-left-color:#3c8dbc}.skin-blue-light .sidebar-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-blue-light .sidebar a{color:#444}.skin-blue-light .sidebar a:hover{text-decoration:none}.skin-blue-light .sidebar-menu .treeview-menu>li>a{color:#777}.skin-blue-light .sidebar-menu .treeview-menu>li.active>a,.skin-blue-light .sidebar-menu .treeview-menu>li>a:hover{color:#000}.skin-blue-light .sidebar-menu .treeview-menu>li.active>a{font-weight:600}.skin-blue-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-blue-light .sidebar-form input[type="text"],.skin-blue-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-blue-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-blue-light .sidebar-form input[type="text"]:focus,.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-blue-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-blue-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-blue-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-blue-light .main-footer{border-top-color:#d2d6de}.skin-blue.layout-top-nav .main-header>.logo{background-color:#3c8dbc;color:#fff;border-bottom:0 solid transparent}.skin-blue.layout-top-nav .main-header>.logo:hover{background-color:#3b8ab8}.skin-black .main-header{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.skin-black .main-header .navbar-toggle{color:#333}.skin-black .main-header .navbar-brand{color:#333;border-right:1px solid #eee}.skin-black .main-header .navbar{background-color:#fff}.skin-black .main-header .navbar .nav>li>a{color:#333}.skin-black .main-header .navbar .nav>li>a:hover,.skin-black .main-header .navbar .nav>li>a:active,.skin-black .main-header .navbar .nav>li>a:focus,.skin-black .main-header .navbar .nav .open>a,.skin-black .main-header .navbar .nav .open>a:hover,.skin-black .main-header .navbar .nav .open>a:focus,.skin-black .main-header .navbar .nav>.active>a{background:#fff;color:#999}.skin-black .main-header .navbar .sidebar-toggle{color:#333}.skin-black .main-header .navbar .sidebar-toggle:hover{color:#999;background:#fff}.skin-black .main-header .navbar>.sidebar-toggle{color:#333;border-right:1px solid #eee}.skin-black .main-header .navbar .navbar-nav>li>a{border-right:1px solid #eee}.skin-black .main-header .navbar .navbar-custom-menu .navbar-nav>li>a,.skin-black .main-header .navbar .navbar-right>li>a{border-left:1px solid #eee;border-right-width:0}.skin-black .main-header .logo{background-color:#fff;color:#333;border-bottom:0 solid transparent;border-right:1px solid #eee}.skin-black .main-header .logo:hover{background-color:#fcfcfc}@media (max-width:767px){.skin-black .main-header .logo{background-color:#222;color:#fff;border-bottom:0 solid transparent;border-right:none}.skin-black .main-header .logo:hover{background-color:#1f1f1f}}.skin-black .main-header li.user-header{background-color:#222}.skin-black .content-header{background:transparent;box-shadow:none}.skin-black .wrapper,.skin-black .main-sidebar,.skin-black .left-side{background-color:#222d32}.skin-black .user-panel>.info,.skin-black .user-panel>.info>a{color:#fff}.skin-black .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-black .sidebar-menu>li>a{border-left:3px solid transparent}.skin-black .sidebar-menu>li:hover>a,.skin-black .sidebar-menu>li.active>a,.skin-black .sidebar-menu>li.menu-open>a{color:#fff;background:#1e282c}.skin-black .sidebar-menu>li.active>a{border-left-color:#fff}.skin-black .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-black .sidebar a{color:#b8c7ce}.skin-black .sidebar a:hover{text-decoration:none}.skin-black .sidebar-menu .treeview-menu>li>a{color:#8aa4af}.skin-black .sidebar-menu .treeview-menu>li.active>a,.skin-black .sidebar-menu .treeview-menu>li>a:hover{color:#fff}.skin-black .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-black .sidebar-form input[type="text"],.skin-black .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-black .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-black .sidebar-form input[type="text"]:focus,.skin-black .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-black .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-black .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-black .pace .pace-progress{background:#222}.skin-black .pace .pace-activity{border-top-color:#222;border-left-color:#222}.skin-black-light .main-header{-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.skin-black-light .main-header .navbar-toggle{color:#333}.skin-black-light .main-header .navbar-brand{color:#333;border-right:1px solid #d2d6de}.skin-black-light .main-header .navbar{background-color:#fff}.skin-black-light .main-header .navbar .nav>li>a{color:#333}.skin-black-light .main-header .navbar .nav>li>a:hover,.skin-black-light .main-header .navbar .nav>li>a:active,.skin-black-light .main-header .navbar .nav>li>a:focus,.skin-black-light .main-header .navbar .nav .open>a,.skin-black-light .main-header .navbar .nav .open>a:hover,.skin-black-light .main-header .navbar .nav .open>a:focus,.skin-black-light .main-header .navbar .nav>.active>a{background:#fff;color:#999}.skin-black-light .main-header .navbar .sidebar-toggle{color:#333}.skin-black-light .main-header .navbar .sidebar-toggle:hover{color:#999;background:#fff}.skin-black-light .main-header .navbar>.sidebar-toggle{color:#333;border-right:1px solid #d2d6de}.skin-black-light .main-header .navbar .navbar-nav>li>a{border-right:1px solid #d2d6de}.skin-black-light .main-header .navbar .navbar-custom-menu .navbar-nav>li>a,.skin-black-light .main-header .navbar .navbar-right>li>a{border-left:1px solid #d2d6de;border-right-width:0}.skin-black-light .main-header .logo{background-color:#fff;color:#333;border-bottom:0 solid transparent;border-right:1px solid #d2d6de}.skin-black-light .main-header .logo:hover{background-color:#fcfcfc}@media (max-width:767px){.skin-black-light .main-header .logo{background-color:#222;color:#fff;border-bottom:0 solid transparent;border-right:none}.skin-black-light .main-header .logo:hover{background-color:#1f1f1f}}.skin-black-light .main-header li.user-header{background-color:#222}.skin-black-light .content-header{background:transparent;box-shadow:none}.skin-black-light .wrapper,.skin-black-light .main-sidebar,.skin-black-light .left-side{background-color:#f9fafc}.skin-black-light .main-sidebar{border-right:1px solid #d2d6de}.skin-black-light .user-panel>.info,.skin-black-light .user-panel>.info>a{color:#444}.skin-black-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-black-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-black-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-black-light .sidebar-menu>li:hover>a,.skin-black-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-black-light .sidebar-menu>li.active{border-left-color:#fff}.skin-black-light .sidebar-menu>li.active>a{font-weight:600}.skin-black-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-black-light .sidebar a{color:#444}.skin-black-light .sidebar a:hover{text-decoration:none}.skin-black-light .sidebar-menu .treeview-menu>li>a{color:#777}.skin-black-light .sidebar-menu .treeview-menu>li.active>a,.skin-black-light .sidebar-menu .treeview-menu>li>a:hover{color:#000}.skin-black-light .sidebar-menu .treeview-menu>li.active>a{font-weight:600}.skin-black-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-black-light .sidebar-form input[type="text"],.skin-black-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-black-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-black-light .sidebar-form input[type="text"]:focus,.skin-black-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-black-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-black-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-black-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-green .main-header .navbar{background-color:#00a65a}.skin-green .main-header .navbar .nav>li>a{color:#fff}.skin-green .main-header .navbar .nav>li>a:hover,.skin-green .main-header .navbar .nav>li>a:active,.skin-green .main-header .navbar .nav>li>a:focus,.skin-green .main-header .navbar .nav .open>a,.skin-green .main-header .navbar .nav .open>a:hover,.skin-green .main-header .navbar .nav .open>a:focus,.skin-green .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-green .main-header .navbar .sidebar-toggle{color:#fff}.skin-green .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-green .main-header .navbar .sidebar-toggle{color:#fff}.skin-green .main-header .navbar .sidebar-toggle:hover{background-color:#008d4c}@media (max-width:767px){.skin-green .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-green .main-header .navbar .dropdown-menu li a{color:#fff}.skin-green .main-header .navbar .dropdown-menu li a:hover{background:#008d4c}}.skin-green .main-header .logo{background-color:#008d4c;color:#fff;border-bottom:0 solid transparent}.skin-green .main-header .logo:hover{background-color:#008749}.skin-green .main-header li.user-header{background-color:#00a65a}.skin-green .content-header{background:transparent}.skin-green .wrapper,.skin-green .main-sidebar,.skin-green .left-side{background-color:#222d32}.skin-green .user-panel>.info,.skin-green .user-panel>.info>a{color:#fff}.skin-green .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-green .sidebar-menu>li>a{border-left:3px solid transparent}.skin-green .sidebar-menu>li:hover>a,.skin-green .sidebar-menu>li.active>a,.skin-green .sidebar-menu>li.menu-open>a{color:#fff;background:#1e282c}.skin-green .sidebar-menu>li.active>a{border-left-color:#00a65a}.skin-green .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-green .sidebar a{color:#b8c7ce}.skin-green .sidebar a:hover{text-decoration:none}.skin-green .sidebar-menu .treeview-menu>li>a{color:#8aa4af}.skin-green .sidebar-menu .treeview-menu>li.active>a,.skin-green .sidebar-menu .treeview-menu>li>a:hover{color:#fff}.skin-green .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-green .sidebar-form input[type="text"],.skin-green .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-green .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-green .sidebar-form input[type="text"]:focus,.skin-green .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-green .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-green .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-green-light .main-header .navbar{background-color:#00a65a}.skin-green-light .main-header .navbar .nav>li>a{color:#fff}.skin-green-light .main-header .navbar .nav>li>a:hover,.skin-green-light .main-header .navbar .nav>li>a:active,.skin-green-light .main-header .navbar .nav>li>a:focus,.skin-green-light .main-header .navbar .nav .open>a,.skin-green-light .main-header .navbar .nav .open>a:hover,.skin-green-light .main-header .navbar .nav .open>a:focus,.skin-green-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-green-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-green-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-green-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-green-light .main-header .navbar .sidebar-toggle:hover{background-color:#008d4c}@media (max-width:767px){.skin-green-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-green-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-green-light .main-header .navbar .dropdown-menu li a:hover{background:#008d4c}}.skin-green-light .main-header .logo{background-color:#00a65a;color:#fff;border-bottom:0 solid transparent}.skin-green-light .main-header .logo:hover{background-color:#00a157}.skin-green-light .main-header li.user-header{background-color:#00a65a}.skin-green-light .content-header{background:transparent}.skin-green-light .wrapper,.skin-green-light .main-sidebar,.skin-green-light .left-side{background-color:#f9fafc}.skin-green-light .main-sidebar{border-right:1px solid #d2d6de}.skin-green-light .user-panel>.info,.skin-green-light .user-panel>.info>a{color:#444}.skin-green-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-green-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-green-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-green-light .sidebar-menu>li:hover>a,.skin-green-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-green-light .sidebar-menu>li.active{border-left-color:#00a65a}.skin-green-light .sidebar-menu>li.active>a{font-weight:600}.skin-green-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-green-light .sidebar a{color:#444}.skin-green-light .sidebar a:hover{text-decoration:none}.skin-green-light .sidebar-menu .treeview-menu>li>a{color:#777}.skin-green-light .sidebar-menu .treeview-menu>li.active>a,.skin-green-light .sidebar-menu .treeview-menu>li>a:hover{color:#000}.skin-green-light .sidebar-menu .treeview-menu>li.active>a{font-weight:600}.skin-green-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-green-light .sidebar-form input[type="text"],.skin-green-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-green-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-green-light .sidebar-form input[type="text"]:focus,.skin-green-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-green-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-green-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-green-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-red .main-header .navbar{background-color:#dd4b39}.skin-red .main-header .navbar .nav>li>a{color:#fff}.skin-red .main-header .navbar .nav>li>a:hover,.skin-red .main-header .navbar .nav>li>a:active,.skin-red .main-header .navbar .nav>li>a:focus,.skin-red .main-header .navbar .nav .open>a,.skin-red .main-header .navbar .nav .open>a:hover,.skin-red .main-header .navbar .nav .open>a:focus,.skin-red .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-red .main-header .navbar .sidebar-toggle{color:#fff}.skin-red .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-red .main-header .navbar .sidebar-toggle{color:#fff}.skin-red .main-header .navbar .sidebar-toggle:hover{background-color:#d73925}@media (max-width:767px){.skin-red .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-red .main-header .navbar .dropdown-menu li a{color:#fff}.skin-red .main-header .navbar .dropdown-menu li a:hover{background:#d73925}}.skin-red .main-header .logo{background-color:#d73925;color:#fff;border-bottom:0 solid transparent}.skin-red .main-header .logo:hover{background-color:#d33724}.skin-red .main-header li.user-header{background-color:#dd4b39}.skin-red .content-header{background:transparent}.skin-red .wrapper,.skin-red .main-sidebar,.skin-red .left-side{background-color:#222d32}.skin-red .user-panel>.info,.skin-red .user-panel>.info>a{color:#fff}.skin-red .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-red .sidebar-menu>li>a{border-left:3px solid transparent}.skin-red .sidebar-menu>li:hover>a,.skin-red .sidebar-menu>li.active>a,.skin-red .sidebar-menu>li.menu-open>a{color:#fff;background:#1e282c}.skin-red .sidebar-menu>li.active>a{border-left-color:#dd4b39}.skin-red .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-red .sidebar a{color:#b8c7ce}.skin-red .sidebar a:hover{text-decoration:none}.skin-red .sidebar-menu .treeview-menu>li>a{color:#8aa4af}.skin-red .sidebar-menu .treeview-menu>li.active>a,.skin-red .sidebar-menu .treeview-menu>li>a:hover{color:#fff}.skin-red .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-red .sidebar-form input[type="text"],.skin-red .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-red .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-red .sidebar-form input[type="text"]:focus,.skin-red .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-red .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-red .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-red-light .main-header .navbar{background-color:#dd4b39}.skin-red-light .main-header .navbar .nav>li>a{color:#fff}.skin-red-light .main-header .navbar .nav>li>a:hover,.skin-red-light .main-header .navbar .nav>li>a:active,.skin-red-light .main-header .navbar .nav>li>a:focus,.skin-red-light .main-header .navbar .nav .open>a,.skin-red-light .main-header .navbar .nav .open>a:hover,.skin-red-light .main-header .navbar .nav .open>a:focus,.skin-red-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-red-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-red-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-red-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-red-light .main-header .navbar .sidebar-toggle:hover{background-color:#d73925}@media (max-width:767px){.skin-red-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-red-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-red-light .main-header .navbar .dropdown-menu li a:hover{background:#d73925}}.skin-red-light .main-header .logo{background-color:#dd4b39;color:#fff;border-bottom:0 solid transparent}.skin-red-light .main-header .logo:hover{background-color:#dc4735}.skin-red-light .main-header li.user-header{background-color:#dd4b39}.skin-red-light .content-header{background:transparent}.skin-red-light .wrapper,.skin-red-light .main-sidebar,.skin-red-light .left-side{background-color:#f9fafc}.skin-red-light .main-sidebar{border-right:1px solid #d2d6de}.skin-red-light .user-panel>.info,.skin-red-light .user-panel>.info>a{color:#444}.skin-red-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-red-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-red-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-red-light .sidebar-menu>li:hover>a,.skin-red-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-red-light .sidebar-menu>li.active{border-left-color:#dd4b39}.skin-red-light .sidebar-menu>li.active>a{font-weight:600}.skin-red-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-red-light .sidebar a{color:#444}.skin-red-light .sidebar a:hover{text-decoration:none}.skin-red-light .sidebar-menu .treeview-menu>li>a{color:#777}.skin-red-light .sidebar-menu .treeview-menu>li.active>a,.skin-red-light .sidebar-menu .treeview-menu>li>a:hover{color:#000}.skin-red-light .sidebar-menu .treeview-menu>li.active>a{font-weight:600}.skin-red-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-red-light .sidebar-form input[type="text"],.skin-red-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-red-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-red-light .sidebar-form input[type="text"]:focus,.skin-red-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-red-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-red-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-red-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-yellow .main-header .navbar{background-color:#f39c12}.skin-yellow .main-header .navbar .nav>li>a{color:#fff}.skin-yellow .main-header .navbar .nav>li>a:hover,.skin-yellow .main-header .navbar .nav>li>a:active,.skin-yellow .main-header .navbar .nav>li>a:focus,.skin-yellow .main-header .navbar .nav .open>a,.skin-yellow .main-header .navbar .nav .open>a:hover,.skin-yellow .main-header .navbar .nav .open>a:focus,.skin-yellow .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-yellow .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-yellow .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow .main-header .navbar .sidebar-toggle:hover{background-color:#e08e0b}@media (max-width:767px){.skin-yellow .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-yellow .main-header .navbar .dropdown-menu li a{color:#fff}.skin-yellow .main-header .navbar .dropdown-menu li a:hover{background:#e08e0b}}.skin-yellow .main-header .logo{background-color:#e08e0b;color:#fff;border-bottom:0 solid transparent}.skin-yellow .main-header .logo:hover{background-color:#db8b0b}.skin-yellow .main-header li.user-header{background-color:#f39c12}.skin-yellow .content-header{background:transparent}.skin-yellow .wrapper,.skin-yellow .main-sidebar,.skin-yellow .left-side{background-color:#222d32}.skin-yellow .user-panel>.info,.skin-yellow .user-panel>.info>a{color:#fff}.skin-yellow .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-yellow .sidebar-menu>li>a{border-left:3px solid transparent}.skin-yellow .sidebar-menu>li:hover>a,.skin-yellow .sidebar-menu>li.active>a,.skin-yellow .sidebar-menu>li.menu-open>a{color:#fff;background:#1e282c}.skin-yellow .sidebar-menu>li.active>a{border-left-color:#f39c12}.skin-yellow .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-yellow .sidebar a{color:#b8c7ce}.skin-yellow .sidebar a:hover{text-decoration:none}.skin-yellow .sidebar-menu .treeview-menu>li>a{color:#8aa4af}.skin-yellow .sidebar-menu .treeview-menu>li.active>a,.skin-yellow .sidebar-menu .treeview-menu>li>a:hover{color:#fff}.skin-yellow .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-yellow .sidebar-form input[type="text"],.skin-yellow .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-yellow .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-yellow .sidebar-form input[type="text"]:focus,.skin-yellow .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-yellow .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-yellow .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-yellow-light .main-header .navbar{background-color:#f39c12}.skin-yellow-light .main-header .navbar .nav>li>a{color:#fff}.skin-yellow-light .main-header .navbar .nav>li>a:hover,.skin-yellow-light .main-header .navbar .nav>li>a:active,.skin-yellow-light .main-header .navbar .nav>li>a:focus,.skin-yellow-light .main-header .navbar .nav .open>a,.skin-yellow-light .main-header .navbar .nav .open>a:hover,.skin-yellow-light .main-header .navbar .nav .open>a:focus,.skin-yellow-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-yellow-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-yellow-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-yellow-light .main-header .navbar .sidebar-toggle:hover{background-color:#e08e0b}@media (max-width:767px){.skin-yellow-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-yellow-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-yellow-light .main-header .navbar .dropdown-menu li a:hover{background:#e08e0b}}.skin-yellow-light .main-header .logo{background-color:#f39c12;color:#fff;border-bottom:0 solid transparent}.skin-yellow-light .main-header .logo:hover{background-color:#f39a0d}.skin-yellow-light .main-header li.user-header{background-color:#f39c12}.skin-yellow-light .content-header{background:transparent}.skin-yellow-light .wrapper,.skin-yellow-light .main-sidebar,.skin-yellow-light .left-side{background-color:#f9fafc}.skin-yellow-light .main-sidebar{border-right:1px solid #d2d6de}.skin-yellow-light .user-panel>.info,.skin-yellow-light .user-panel>.info>a{color:#444}.skin-yellow-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-yellow-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-yellow-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-yellow-light .sidebar-menu>li:hover>a,.skin-yellow-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-yellow-light .sidebar-menu>li.active{border-left-color:#f39c12}.skin-yellow-light .sidebar-menu>li.active>a{font-weight:600}.skin-yellow-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-yellow-light .sidebar a{color:#444}.skin-yellow-light .sidebar a:hover{text-decoration:none}.skin-yellow-light .sidebar-menu .treeview-menu>li>a{color:#777}.skin-yellow-light .sidebar-menu .treeview-menu>li.active>a,.skin-yellow-light .sidebar-menu .treeview-menu>li>a:hover{color:#000}.skin-yellow-light .sidebar-menu .treeview-menu>li.active>a{font-weight:600}.skin-yellow-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-yellow-light .sidebar-form input[type="text"],.skin-yellow-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-yellow-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-yellow-light .sidebar-form input[type="text"]:focus,.skin-yellow-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-yellow-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-yellow-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-yellow-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}}.skin-purple .main-header .navbar{background-color:#605ca8}.skin-purple .main-header .navbar .nav>li>a{color:#fff}.skin-purple .main-header .navbar .nav>li>a:hover,.skin-purple .main-header .navbar .nav>li>a:active,.skin-purple .main-header .navbar .nav>li>a:focus,.skin-purple .main-header .navbar .nav .open>a,.skin-purple .main-header .navbar .nav .open>a:hover,.skin-purple .main-header .navbar .nav .open>a:focus,.skin-purple .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-purple .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-purple .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple .main-header .navbar .sidebar-toggle:hover{background-color:#555299}@media (max-width:767px){.skin-purple .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-purple .main-header .navbar .dropdown-menu li a{color:#fff}.skin-purple .main-header .navbar .dropdown-menu li a:hover{background:#555299}}.skin-purple .main-header .logo{background-color:#555299;color:#fff;border-bottom:0 solid transparent}.skin-purple .main-header .logo:hover{background-color:#545096}.skin-purple .main-header li.user-header{background-color:#605ca8}.skin-purple .content-header{background:transparent}.skin-purple .wrapper,.skin-purple .main-sidebar,.skin-purple .left-side{background-color:#222d32}.skin-purple .user-panel>.info,.skin-purple .user-panel>.info>a{color:#fff}.skin-purple .sidebar-menu>li.header{color:#4b646f;background:#1a2226}.skin-purple .sidebar-menu>li>a{border-left:3px solid transparent}.skin-purple .sidebar-menu>li:hover>a,.skin-purple .sidebar-menu>li.active>a,.skin-purple .sidebar-menu>li.menu-open>a{color:#fff;background:#1e282c}.skin-purple .sidebar-menu>li.active>a{border-left-color:#605ca8}.skin-purple .sidebar-menu>li>.treeview-menu{margin:0 1px;background:#2c3b41}.skin-purple .sidebar a{color:#b8c7ce}.skin-purple .sidebar a:hover{text-decoration:none}.skin-purple .sidebar-menu .treeview-menu>li>a{color:#8aa4af}.skin-purple .sidebar-menu .treeview-menu>li.active>a,.skin-purple .sidebar-menu .treeview-menu>li>a:hover{color:#fff}.skin-purple .sidebar-form{border-radius:3px;border:1px solid #374850;margin:10px 10px}.skin-purple .sidebar-form input[type="text"],.skin-purple .sidebar-form .btn{box-shadow:none;background-color:#374850;border:1px solid transparent;height:35px}.skin-purple .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-purple .sidebar-form input[type="text"]:focus,.skin-purple .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-purple .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-purple .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}.skin-purple-light .main-header .navbar{background-color:#605ca8}.skin-purple-light .main-header .navbar .nav>li>a{color:#fff}.skin-purple-light .main-header .navbar .nav>li>a:hover,.skin-purple-light .main-header .navbar .nav>li>a:active,.skin-purple-light .main-header .navbar .nav>li>a:focus,.skin-purple-light .main-header .navbar .nav .open>a,.skin-purple-light .main-header .navbar .nav .open>a:hover,.skin-purple-light .main-header .navbar .nav .open>a:focus,.skin-purple-light .main-header .navbar .nav>.active>a{background:rgba(0,0,0,0.1);color:#f6f6f6}.skin-purple-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple-light .main-header .navbar .sidebar-toggle:hover{color:#f6f6f6;background:rgba(0,0,0,0.1)}.skin-purple-light .main-header .navbar .sidebar-toggle{color:#fff}.skin-purple-light .main-header .navbar .sidebar-toggle:hover{background-color:#555299}@media (max-width:767px){.skin-purple-light .main-header .navbar .dropdown-menu li.divider{background-color:rgba(255,255,255,0.1)}.skin-purple-light .main-header .navbar .dropdown-menu li a{color:#fff}.skin-purple-light .main-header .navbar .dropdown-menu li a:hover{background:#555299}}.skin-purple-light .main-header .logo{background-color:#605ca8;color:#fff;border-bottom:0 solid transparent}.skin-purple-light .main-header .logo:hover{background-color:#5d59a6}.skin-purple-light .main-header li.user-header{background-color:#605ca8}.skin-purple-light .content-header{background:transparent}.skin-purple-light .wrapper,.skin-purple-light .main-sidebar,.skin-purple-light .left-side{background-color:#f9fafc}.skin-purple-light .main-sidebar{border-right:1px solid #d2d6de}.skin-purple-light .user-panel>.info,.skin-purple-light .user-panel>.info>a{color:#444}.skin-purple-light .sidebar-menu>li{-webkit-transition:border-left-color .3s ease;-o-transition:border-left-color .3s ease;transition:border-left-color .3s ease}.skin-purple-light .sidebar-menu>li.header{color:#848484;background:#f9fafc}.skin-purple-light .sidebar-menu>li>a{border-left:3px solid transparent;font-weight:600}.skin-purple-light .sidebar-menu>li:hover>a,.skin-purple-light .sidebar-menu>li.active>a{color:#000;background:#f4f4f5}.skin-purple-light .sidebar-menu>li.active{border-left-color:#605ca8}.skin-purple-light .sidebar-menu>li.active>a{font-weight:600}.skin-purple-light .sidebar-menu>li>.treeview-menu{background:#f4f4f5}.skin-purple-light .sidebar a{color:#444}.skin-purple-light .sidebar a:hover{text-decoration:none}.skin-purple-light .sidebar-menu .treeview-menu>li>a{color:#777}.skin-purple-light .sidebar-menu .treeview-menu>li.active>a,.skin-purple-light .sidebar-menu .treeview-menu>li>a:hover{color:#000}.skin-purple-light .sidebar-menu .treeview-menu>li.active>a{font-weight:600}.skin-purple-light .sidebar-form{border-radius:3px;border:1px solid #d2d6de;margin:10px 10px}.skin-purple-light .sidebar-form input[type="text"],.skin-purple-light .sidebar-form .btn{box-shadow:none;background-color:#fff;border:1px solid transparent;height:35px}.skin-purple-light .sidebar-form input[type="text"]{color:#666;border-top-left-radius:2px;border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:2px}.skin-purple-light .sidebar-form input[type="text"]:focus,.skin-purple-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{background-color:#fff;color:#666}.skin-purple-light .sidebar-form input[type="text"]:focus+.input-group-btn .btn{border-left-color:#fff}.skin-purple-light .sidebar-form .btn{color:#999;border-top-left-radius:0;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:0}@media (min-width:768px){.skin-purple-light.sidebar-mini.sidebar-collapse .sidebar-menu>li>.treeview-menu{border-left:1px solid #d2d6de}} \ No newline at end of file diff --git a/public/static/admin/css/access.css b/public/static/admin/css/access.css new file mode 100755 index 0000000..2eba927 --- /dev/null +++ b/public/static/admin/css/access.css @@ -0,0 +1,52 @@ +.checkbox{ + cursor: pointer; +} +.checkmod { + margin-bottom: 20px; + border: 1px solid #ebebeb; + padding-bottom: 5px; +} +.checkmod dt { + padding-left: 10px; + height: 30px; + line-height: 30px; + font-weight: bold; + border-bottom: 1px solid #ebebeb; + background-color: #ECECEC; +} +.checkmod dt { + margin-bottom: 5px; + border-bottom-color: #ebebeb; + background-color: #ECECEC; +} +.checkbox, .radio { + display: inline-block; + height: 20px; + line-height: 20px; + margin-left: 20px; + margin-right: 20px; +} +.checkmod dd { + padding-left: 30px; + line-height: 30px; +} +.checkmod dd .checkbox { + margin: 0 30px 0 0; + font-weight: normal; +} +.checkmod dd .divsion { + margin-right: 20px; +} +.checkmod dt { + line-height: 30px; + font-weight: bold; + +} +.rule_check { + border: 1px solid #ebebeb; + margin: auto; + padding: 5px 15px; +} +.menu_parent { + margin-bottom: 5px; +} \ No newline at end of file diff --git a/public/static/admin/css/admin.css b/public/static/admin/css/admin.css new file mode 100755 index 0000000..926f9c1 --- /dev/null +++ b/public/static/admin/css/admin.css @@ -0,0 +1,31 @@ +/** 表单验证错误 **/ +.dataForm .error{ + color: #ff0000; + border-color: #dd4b39; +} + +/** 列表页排序select **/ +.index-order{ + min-width: 100px; +} + +/** 表单页保存 **/ +.dataFormSubmit{ + margin-right: 20px; +} + +/** 表单页重置 **/ +.dataFormReset{ + margin-left: 20px; +} + +/** 继续添加 **/ +.createContinue,.bodyFormCheckbox{ + margin-top: 5px; +} + +/** 列表页缩略图 **/ +.dataListImg{ + max-width: 40px; + max-height: 40px; +} diff --git a/public/static/admin/css/skins.css b/public/static/admin/css/skins.css new file mode 100755 index 0000000..5e050dc --- /dev/null +++ b/public/static/admin/css/skins.css @@ -0,0 +1,151 @@ +/*.skin-blue*/ + +.skin-blue .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} + +.skin-blue .form-control:focus { + border: 1px solid #3c8dbc; +} + +.skin-blue .box { + border-top: 3px solid #3c8dbc; +} + +/*skin-black*/ +.skin-black .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} + +.skin-black .form-control:focus { + border: 1px solid #222d32; +} + +.skin-black .box { + border-top: 3px solid #222d32; +} + +/*skin-purple*/ +.skin-purple .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} +.skin-purple .form-control:focus { + border: 1px solid #605ca8; +} +.skin-purple .box { + border-top: 3px solid #605ca8; +} + +/*skin-green*/ +.skin-green .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} +.skin-green .form-control:focus { + border: 1px solid #00a65a; +} + +.skin-green .box { + border-top: 3px solid #00a65a; +} + +/*skin-red*/ +.skin-red .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} +.skin-red .form-control:focus { + border: 1px solid #dd4b39; +} + +.skin-red .box { + border-top: 3px solid #dd4b39; +} + +/*skin-yellow*/ +.skin-yellow .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} + +.skin-yellow .form-control:focus { + border: 1px solid #f39c12; +} + +.skin-yellow .box { + border-top: 3px solid #f39c12; +} + +/*skin-blue*/ +.skin-blue-light .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} + +.skin-blue-light .form-control:focus { + border: 1px solid #3c8dbc; +} + +.skin-blue-light .box { + border-top: 3px solid #3c8dbc; +} + +/*skin-black*/ +.skin-black-light .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} + +.skin-black-light .form-control:focus { + border: 1px solid #222d32; +} + +.skin-black-light .box { + border-top: 3px solid #222d32; +} + + +/*skin-purple*/ +.skin-purple-light .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} +.skin-purple-light .form-control:focus { + border: 1px solid #605ca8; +} +.skin-purple-light .box { + border-top: 3px solid #605ca8; +} + +/*skin-green*/ +.skin-green-light .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} + +.skin-green-light .form-control:focus { + border: 1px solid #00a65a; +} + +.skin-green-light .box { + border-top: 3px solid #00a65a; +} + +/*skin-red*/ +.skin-red-light .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} + +.skin-red-light .form-control:focus { + border: 1px solid #dd4b39; +} + +.skin-red-light .box { + border-top: 3px solid #dd4b39; +} + +/*skin-yellow*/ +.skin-yellow-light .nav-tabs-custom > .nav-tabs > li.active{ + border-top-color:#ccc; +} + +.skin-yellow-light .form-control:focus { + border: 1px solid #f39c12; +} + +.skin-yellow-light .box { + border-top: 3px solid #f39c12; +} \ No newline at end of file diff --git a/public/static/admin/images/avatar.png b/public/static/admin/images/avatar.png new file mode 100755 index 0000000..a682920 Binary files /dev/null and b/public/static/admin/images/avatar.png differ diff --git a/public/static/admin/images/background.jpg b/public/static/admin/images/background.jpg new file mode 100755 index 0000000..cea7e5c Binary files /dev/null and b/public/static/admin/images/background.jpg differ diff --git a/public/static/admin/images/nophoto_100x100.png b/public/static/admin/images/nophoto_100x100.png new file mode 100755 index 0000000..07c836d Binary files /dev/null and b/public/static/admin/images/nophoto_100x100.png differ diff --git a/public/static/admin/js/admin.js b/public/static/admin/js/admin.js new file mode 100755 index 0000000..f903176 --- /dev/null +++ b/public/static/admin/js/admin.js @@ -0,0 +1,504 @@ +try { + /** pjax相关 */ + //超时3秒(可选) + $.pjax.defaults.timeout = 3000; + $.pjax.defaults.type = 'GET'; + //存储容器id + $.pjax.defaults.container = '#pjax-container'; + //目标id + $.pjax.defaults.fragment = '#pjax-container'; + //最大缓存长度(可选) + $.pjax.defaults.maxCacheLength = 0; + $(document).pjax('a:not(a[target="_blank"])', { + //存储容器id + container: '#pjax-container', + //目标id + fragment: '#pjax-container' + }); + //ajax请求开始时执行 + $(document).ajaxStart(function () { + //启动进度条 + NProgress.start(); + }).ajaxStop(function () { + //ajax请求结束后执行 + //关闭进度条 + NProgress.done(); + }); +} catch (e) { + if (adminDebug) { + console.log(e.message); + } +} + +$(document).on('pjax:timeout', function (event) { + event.preventDefault(); +}); +$(document).on('pjax:send', function (xhr) { + NProgress.start(); +}); +$(document).on('pjax:complete', function (xhr) { + $('[data-toggle="tooltip"]').tooltip(); + NProgress.done(); +}); +//列表页搜索pjax +$(document).on('submit', '.searchForm', function (event) { + $.pjax.submit(event, '#pjax-container'); +}); + + +//菜单搜索 +$(function () { + $('#sidebar-form').on('submit', function (e) { + e.preventDefault(); + }); + + $('.sidebar-menu li.active').data('lte.pushmenu.active', true); + + $('#search-input').on('keyup', function () { + var term = $('#search-input').val().trim(); + + if (term.length === 0) { + $('.sidebar-menu li').each(function () { + $(this).show(0); + $(this).removeClass('active'); + if ($(this).data('lte.pushmenu.active')) { + $(this).addClass('active'); + } + }); + return; + } + + $('.sidebar-menu li').each(function () { + if ($(this).text().toLowerCase().indexOf(term.toLowerCase()) === -1) { + $(this).hide(0); + $(this).removeClass('pushmenu-search-found', false); + + if ($(this).is('.treeview')) { + $(this).removeClass('active'); + } + } else { + $(this).show(0); + $(this).addClass('pushmenu-search-found'); + + if ($(this).is('.treeview')) { + $(this).addClass('active'); + } + + var parent = $(this).parents('li').first(); + if (parent.is('.treeview')) { + parent.show(0); + } + } + + if ($(this).is('.header')) { + $(this).show(); + } + }); + + $('.sidebar-menu li.pushmenu-search-found.treeview').each(function () { + $(this).find('.pushmenu-search-found').show(0); + }); + }); +}); + +//点击菜单高亮 +$(function () { + $('.sidebar-menu li:not(.treeview) > a').on('click', function () { + var $parent = $(this).parent().addClass('active'); + $parent.siblings('.treeview.active').find('> a').trigger('click'); + $parent.siblings().removeClass('active').find('li').removeClass('active'); + }); + + $('[data-toggle="popover"]').popover(); +}); + +//bootstrap提示 +$(function () { + $('[data-toggle="tooltip"]').tooltip(); +}); + +/** 表单验证错误展示 */ +$.validator.setDefaults({ + errorElement: "span", + errorClass: "help-block error", + submitHandler: function (form) { + formSubmit(form); + return false; + } +}); + +/** 边栏菜单 */ +try { + $('.sidebar-menu').tree(); +} catch (e) { + if (adminDebug) { + console.log(e.message); + } +} + + +/* 清除搜索表单 */ +function clearSearchForm() { + let url_all = window.location.href; + let arr = url_all.split('?'); + let url = arr[0]; + $.pjax({url: url, container: '#pjax-container'}); +} + + +$(function () { + /* 返回按钮 */ + $('body').on('click', '.BackButton', function (event) { + event.preventDefault(); + history.back(1); + }); + + /* 刷新按钮 */ + $('body').on('click', '.ReloadButton', function (event) { + event.preventDefault(); + $.pjax.reload(); + }); + +}); + + +/*列表中单个选择和取消*/ +function checkThis(obj) { + var id = $(obj).attr('value'); + if ($(obj).is(':checked')) { + if ($.inArray(id, dataSelectIds) < 0) { + dataSelectIds.push(id); + } + } else { + if ($.inArray(id, dataSelectIds) > -1) { + dataSelectIds.splice($.inArray(id, dataSelectIds), 1); + } + } + + var all_length = $("input[name='data-checkbox']").length; + var checked_length = $("input[name='data-checkbox']:checked").length; + if (all_length === checked_length) { + $("#dataCheckAll").prop("checked", true); + } else { + $("#dataCheckAll").prop("checked", false); + } + console.log(dataSelectIds); +} + +/*全部选择/取消*/ +function checkAll(obj) { + dataSelectIds = []; + var all_check = $("input[name='data-checkbox']"); + if ($(obj).is(':checked')) { + all_check.prop("checked", true); + $(all_check).each(function () { + dataSelectIds.push(this.value); + }); + } else { + all_check.prop("checked", false); + } +} + + +/* 表单提交 */ +function formSubmit(form) { + let loadT = layer.msg('正在提交,请稍候…', {icon: 16, time: 0, shade: [0.3, "#000"]}); + let action = $(form).attr('action'); + let method = $(form).attr('method'); + let data = new FormData($(form)[0]); + + if (adminDebug) { + console.log('%cajax submit start!', ';color:#333333'); + console.log('action:' + action); + console.log('method:' + method); + console.log('data:' + data); + } + + $.ajax({ + url: action, + dataType: 'json', + type: method, + data: data, + contentType: false, + processData: false, + success: function (result) { + layer.close(loadT); + layer.msg(result.msg, { + icon: result.code ? 1 : 2 + }); + if (adminDebug) { + console.log('submit success!'); + if (result.code === 1) { + console.log('%cresult success', ';color:#00a65a'); + } else { + console.log('%cresult fail', ';color:#f39c12'); + } + } + goUrl(result.url); + }, + error: function (xhr, type, errorThrown) { + //异常处理; + if (adminDebug) { + console.log('%csubmit fail!', ';color:#dd4b39'); + console.log(); + console.log("type:" + type + ",readyState:" + xhr.readyState + ",status:" + xhr.status); + console.log("url:" + action); + console.log("data:" + data); + layer.close(loadT); + } + layer.msg('访问错误,代码' + xhr.status, {icon: 2}); + } + } + ); + return false; +} + + +/** 跳转到指定url */ +function goUrl(url = 1) { + console.log(url); + //清除列表页选择的ID + if (url !== 'url://current' && url !== 1) { + dataSelectIds = []; + } + if (url === 'url://current' || url === 1) { + console.log('Stay current page.'); + } else if (url === 'url://reload' || url === 2) { + console.log('Reload current page.'); + $.pjax.reload(); + } else if (url === 'url://back' || url === 3) { + console.log('Return to the last page.'); + history.back(1); + } else { + console.log('Go to ' + url); + try { + $.pjax({ + url: url, + container: '#pjax-container' + }); + } catch (e) { + window.location.href = url; + } + } +} + +/** + * ajax访问按钮 + * 例如元素为 + * data-confirm为是否弹出提示,1为是,2为否。比如删除某条数据,data-confirm="1"就会弹出来提示 + * data-type为访问方式,1为直接ajax访问,例如删除操作。2是为打开layer窗口展示数据,例如查看操作日志详情 + * data-url为要访问的url + * data-id为要操作的数据ID,可以填写正常的数据ID,例如data-id="2", + * 或者填写checked表示获取当前数据列表选择的ID,也就是取的变量dataSelectIds的值 + * data-go为操作完成后的跳转url,不设置此参数默认根据后台返回的url跳转 + * data-confirm-title为确认提示弹窗的标题 例如data-confirm-title="删除警告" + * data-confirm-content为确认提示的内容 例如data-confirm-content="您确定要删除此数据吗?" + * data-title 窗口显示的标题 + * + */ +$(function () { + $('body').on('click', '.AjaxButton', function (event) { + event.preventDefault(); + + if (adminDebug) { + console.log('AjaxButton clicked.'); + } + //是否弹出提示 + var layerConfirm = $(this).data("confirm") || 1; + //访问方式,1为直接访问,2为layer窗口显示 + var layerType = parseInt($(this).data("type") || 1); + //访问的url + var url = $(this).data("url"); + //访问方式,默认post + var layerMethod = $(this).data("method") || 'post'; + //访问成功后跳转的页面,不设置此参数默认根据后台返回的url跳转 + var go = $(this).data("go") || 'url://reload'; + + //当为窗口显示时可定义宽度和高度 + var layerWith = $(this).data("width") || '80%'; + var layerHeight = $(this).data("height") || '60%'; + + //窗口的标题 + var layerTitle = $(this).data('title'); + + //当前操作数据的ID + var dataId = $(this).data("id"); + + //如果没有定义ID去查询data-data属性 + if (dataId === undefined) { + var dataData = $(this).data("data") || {}; + } else { + if (dataId === 'checked') { + if (dataSelectIds.length === 0) { + layer.msg('请选择要操作的数据', {icon: 2}); + return false; + } + dataId = dataSelectIds; + } + dataData = {"id": dataId}; + } + + if (typeof (dataData) != 'object') { + dataData = JSON.parse(dataData); + } + + /*需要确认操作*/ + if (parseInt(layerConfirm) === 1) { + //提示窗口的标题 + var confirmTitle = $(this).data("confirmTitle") || '操作确认'; + //提示窗口的内容 + var confirmContent = $(this).data("confirmContent") || '您确定要执行此操作吗?'; + layer.confirm(confirmContent, {title: confirmTitle, closeBtn: 1, icon: 3}, function () { + //如果为直接访问 + if (layerType === 1) { + ajaxRequest(url, layerMethod, dataData, go); + } else if (layerType === 2) { + //如果为打开窗口 + //先进行权限查询 + if (checkAuth(url)) { + layer.open({ + type: 1, + area: [layerWith, layerHeight], + title: layerTitle, + closeBtn: 1, + shift: 0, + content: url + "?request_type=layer_open&" + parseParam(dataData) + }); + } + } + }); + } else { + //不需要操作确认 + if (layerType === 1) { + //直接请求 + ajaxRequest(url, layerMethod, dataData, go); + } else if (layerType === 2) { + //弹出窗口 + //检查权限 + if (checkAuth(url)) { + //用窗口打开 + layer.open({ + type: 2, + area: [layerWith, layerHeight], + title: layerTitle, + closeBtn: 1, + shift: 0, + content: url + "?request_type=layer_open&" + parseParam(dataData) + }); + } + } + } + }); +}); + +//ajax请求封装 +/** + * + * @param url 访问的url + * @param method 访问方式 + * @param data data数据 + * @param go 要跳转的url + */ +function ajaxRequest(url, method, data, go) { + var loadT = layer.msg('正在请求,请稍候…', {icon: 16, time: 0, shade: [0.3, '#000']}); + $.ajax({ + url: url, + dataType: 'json', + type: method, + data: data, + success: function (result) { + layer.close(loadT); + layer.msg(result.msg, { + icon: result.code ? 1 : 2 + }); + + if (adminDebug) { + console.log('request success!'); + if (result.code === 1) { + console.log('%cresult success', ';color:#00a65a'); + } else { + go = 'url://current'; + console.log('%cresult fail', ';color:#f39c12'); + } + } + + goUrl(go); + }, + error: function (xhr, type, errorThrown) { + //异常处理; + if (adminDebug) { + console.log('%crequest fail!', ';color:#dd4b39'); + console.log(); + console.log("type:" + type + ",readyState:" + xhr.readyState + ",status:" + xhr.status); + console.log("url:" + url); + console.log("data:"); + console.log(data); + layer.close(loadT); + } + layer.msg('访问错误,代码' + xhr.status, {icon: 2}); + } + } + ); +} + +//改变每页数量 +function changePerPage(obj) { + if (adminDebug) { + console.log('当前每页数量' + Cookies.get(cookiePrefix + 'admin_per_page')); + } + Cookies.set(cookiePrefix + 'admin_per_page', obj.value, {expires: 365}); + $.pjax.reload(); +} + + +/** + * 检查授权 + */ +function checkAuth(url) { + var hasAuth = false; + var loadT = layer.msg('正在请求,请稍候…', {icon: 16, time: 0, shade: [0.3, '#000']}); + $.post({ + url: url, + data: {"check_auth": 1}, + dataType: 'json', + async: false, + success: function (result) { + layer.close(loadT); + if (result.code === 1) { + hasAuth = true; + } else { + layer.msg(result.msg, { + icon: 2 + }); + } + }, + error: function (xhr, type, errorThrown) { + layer.msg('访问错误,代码' + xhr.status, {icon: 2}); + } + }); + return hasAuth; +} + +/** 处理url参数 **/ +function parseParam(param, key) { + var paramStr = ""; + if (param instanceof String || param instanceof Number || param instanceof Boolean) { + paramStr += "&" + key + "=" + encodeURIComponent(param); + } else { + $.each(param, function (i) { + var k = key == null ? i : key + (param instanceof Array ? "[" + i + "]" : "." + i); + paramStr += '&' + parseParam(this, k); + }); + } + return paramStr.substr(1); +} + +/** 导出excel **/ +function exportData(url) { + var exportUrl = url || 'index.html'; + var openUrl = exportUrl + '?export_data=1&' + $("#searchForm").serialize(); + window.open(openUrl); + +} + + diff --git a/public/static/admin/js/adminlte.min.js b/public/static/admin/js/adminlte.min.js new file mode 100755 index 0000000..3a17810 --- /dev/null +++ b/public/static/admin/js/adminlte.min.js @@ -0,0 +1,14 @@ +/*! AdminLTE app.js +* ================ +* Main JS application file for AdminLTE v2. This file +* should be included in all pages. It controls some layout +* options and implements exclusive AdminLTE plugins. +* +* @Author Almsaeed Studio +* @Support +* @Email +* @version 2.4.8 +* @repository git://github.com/almasaeed2010/AdminLTE.git +* @license MIT +*/ +if("undefined"==typeof jQuery)throw new Error("AdminLTE requires jQuery");+function(a){"use strict";function b(b){return this.each(function(){var e=a(this),g=e.data(c);if(!g){var h=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,g=new f(e,h))}if("string"==typeof g){if(void 0===g[b])throw new Error("No method named "+b);g[b]()}})}var c="lte.boxrefresh",d={source:"",params:{},trigger:".refresh-btn",content:".box-body",loadInContent:!0,responseType:"",overlayTemplate:'
    ',onLoadStart:function(){},onLoadDone:function(a){return a}},e={data:'[data-widget="box-refresh"]'},f=function(b,c){if(this.element=b,this.options=c,this.$overlay=a(c.overlayTemplate),""===c.source)throw new Error("Source url was not defined. Please specify a url in your BoxRefresh source option.");this._setUpListeners(),this.load()};f.prototype.load=function(){this._addOverlay(),this.options.onLoadStart.call(a(this)),a.get(this.options.source,this.options.params,function(b){this.options.loadInContent&&a(this.element).find(this.options.content).html(b),this.options.onLoadDone.call(a(this),b),this._removeOverlay()}.bind(this),""!==this.options.responseType&&this.options.responseType)},f.prototype._setUpListeners=function(){a(this.element).on("click",this.options.trigger,function(a){a&&a.preventDefault(),this.load()}.bind(this))},f.prototype._addOverlay=function(){a(this.element).append(this.$overlay)},f.prototype._removeOverlay=function(){a(this.$overlay).remove()};var g=a.fn.boxRefresh;a.fn.boxRefresh=b,a.fn.boxRefresh.Constructor=f,a.fn.boxRefresh.noConflict=function(){return a.fn.boxRefresh=g,this},a(window).on("load",function(){a(e.data).each(function(){b.call(a(this))})})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var g=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new h(e,g))}if("string"==typeof b){if(void 0===f[b])throw new Error("No method named "+b);f[b]()}})}var c="lte.boxwidget",d={animationSpeed:500,collapseTrigger:'[data-widget="collapse"]',removeTrigger:'[data-widget="remove"]',collapseIcon:"fa-minus",expandIcon:"fa-plus",removeIcon:"fa-times"},e={data:".box",collapsed:".collapsed-box",header:".box-header",body:".box-body",footer:".box-footer",tools:".box-tools"},f={collapsed:"collapsed-box"},g={collapsing:"collapsing.boxwidget",collapsed:"collapsed.boxwidget",expanding:"expanding.boxwidget",expanded:"expanded.boxwidget",removing:"removing.boxwidget",removed:"removed.boxwidget"},h=function(a,b){this.element=a,this.options=b,this._setUpListeners()};h.prototype.toggle=function(){a(this.element).is(e.collapsed)?this.expand():this.collapse()},h.prototype.expand=function(){var b=a.Event(g.expanded),c=a.Event(g.expanding),d=this.options.collapseIcon,h=this.options.expandIcon;a(this.element).removeClass(f.collapsed),a(this.element).children(e.header+", "+e.body+", "+e.footer).children(e.tools).find("."+h).removeClass(h).addClass(d),a(this.element).children(e.body+", "+e.footer).slideDown(this.options.animationSpeed,function(){a(this.element).trigger(b)}.bind(this)).trigger(c)},h.prototype.collapse=function(){var b=a.Event(g.collapsed),c=(a.Event(g.collapsing),this.options.collapseIcon),d=this.options.expandIcon;a(this.element).children(e.header+", "+e.body+", "+e.footer).children(e.tools).find("."+c).removeClass(c).addClass(d),a(this.element).children(e.body+", "+e.footer).slideUp(this.options.animationSpeed,function(){a(this.element).addClass(f.collapsed),a(this.element).trigger(b)}.bind(this)).trigger(expandingEvent)},h.prototype.remove=function(){var b=a.Event(g.removed),c=a.Event(g.removing);a(this.element).slideUp(this.options.animationSpeed,function(){a(this.element).trigger(b),a(this.element).remove()}.bind(this)).trigger(c)},h.prototype._setUpListeners=function(){var b=this;a(this.element).on("click",this.options.collapseTrigger,function(c){return c&&c.preventDefault(),b.toggle(a(this)),!1}),a(this.element).on("click",this.options.removeTrigger,function(c){return c&&c.preventDefault(),b.remove(a(this)),!1})};var i=a.fn.boxWidget;a.fn.boxWidget=b,a.fn.boxWidget.Constructor=h,a.fn.boxWidget.noConflict=function(){return a.fn.boxWidget=i,this},a(window).on("load",function(){a(e.data).each(function(){b.call(a(this))})})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var g=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new h(e,g))}"string"==typeof b&&f.toggle()})}var c="lte.controlsidebar",d={slide:!0},e={sidebar:".control-sidebar",data:'[data-toggle="control-sidebar"]',open:".control-sidebar-open",bg:".control-sidebar-bg",wrapper:".wrapper",content:".content-wrapper",boxed:".layout-boxed"},f={open:"control-sidebar-open",fixed:"fixed"},g={collapsed:"collapsed.controlsidebar",expanded:"expanded.controlsidebar"},h=function(a,b){this.element=a,this.options=b,this.hasBindedResize=!1,this.init()};h.prototype.init=function(){a(this.element).is(e.data)||a(this).on("click",this.toggle),this.fix(),a(window).resize(function(){this.fix()}.bind(this))},h.prototype.toggle=function(b){b&&b.preventDefault(),this.fix(),a(e.sidebar).is(e.open)||a("body").is(e.open)?this.collapse():this.expand()},h.prototype.expand=function(){this.options.slide?a(e.sidebar).addClass(f.open):a("body").addClass(f.open),a(this.element).trigger(a.Event(g.expanded))},h.prototype.collapse=function(){a("body, "+e.sidebar).removeClass(f.open),a(this.element).trigger(a.Event(g.collapsed))},h.prototype.fix=function(){a("body").is(e.boxed)&&this._fixForBoxed(a(e.bg))},h.prototype._fixForBoxed=function(b){b.css({position:"absolute",height:a(e.wrapper).height()})};var i=a.fn.controlSidebar;a.fn.controlSidebar=b,a.fn.controlSidebar.Constructor=h,a.fn.controlSidebar.noConflict=function(){return a.fn.controlSidebar=i,this},a(document).on("click",e.data,function(c){c&&c.preventDefault(),b.call(a(this),"toggle")})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data(c);e||d.data(c,e=new f(d)),"string"==typeof b&&e.toggle(d)})}var c="lte.directchat",d={data:'[data-widget="chat-pane-toggle"]',box:".direct-chat"},e={open:"direct-chat-contacts-open"},f=function(a){this.element=a};f.prototype.toggle=function(a){a.parents(d.box).first().toggleClass(e.open)};var g=a.fn.directChat;a.fn.directChat=b,a.fn.directChat.Constructor=f,a.fn.directChat.noConflict=function(){return a.fn.directChat=g,this},a(document).on("click",d.data,function(c){c&&c.preventDefault(),b.call(a(this),"toggle")})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var h=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new g(h))}if("string"==typeof b){if(void 0===f[b])throw new Error("No method named "+b);f[b]()}})}var c="lte.layout",d={slimscroll:!0,resetHeight:!0},e={wrapper:".wrapper",contentWrapper:".content-wrapper",layoutBoxed:".layout-boxed",mainFooter:".main-footer",mainHeader:".main-header",sidebar:".sidebar",controlSidebar:".control-sidebar",fixed:".fixed",sidebarMenu:".sidebar-menu",logo:".main-header .logo"},f={fixed:"fixed",holdTransition:"hold-transition"},g=function(a){this.options=a,this.bindedResize=!1,this.activate()};g.prototype.activate=function(){this.fix(),this.fixSidebar(),a("body").removeClass(f.holdTransition),this.options.resetHeight&&a("body, html, "+e.wrapper).css({height:"auto","min-height":"100%"}),this.bindedResize||(a(window).resize(function(){this.fix(),this.fixSidebar(),a(e.logo+", "+e.sidebar).one("webkitTransitionEnd otransitionend oTransitionEnd msTransitionEnd transitionend",function(){this.fix(),this.fixSidebar()}.bind(this))}.bind(this)),this.bindedResize=!0),a(e.sidebarMenu).on("expanded.tree",function(){this.fix(),this.fixSidebar()}.bind(this)),a(e.sidebarMenu).on("collapsed.tree",function(){this.fix(),this.fixSidebar()}.bind(this))},g.prototype.fix=function(){a(e.layoutBoxed+" > "+e.wrapper).css("overflow","hidden");var b=a(e.mainFooter).outerHeight()||0,c=a(e.mainHeader).outerHeight()||0,d=c+b,g=a(window).height(),h=a(e.sidebar).height()||0;if(a("body").hasClass(f.fixed))a(e.contentWrapper).css("min-height",g-b);else{var i;g>=h+c?(a(e.contentWrapper).css("min-height",g-d),i=g-d):(a(e.contentWrapper).css("min-height",h),i=h);var j=a(e.controlSidebar);void 0!==j&&j.height()>i&&a(e.contentWrapper).css("min-height",j.height())}},g.prototype.fixSidebar=function(){if(!a("body").hasClass(f.fixed))return void(void 0!==a.fn.slimScroll&&a(e.sidebar).slimScroll({destroy:!0}).height("auto"));this.options.slimscroll&&void 0!==a.fn.slimScroll&&a(e.sidebar).slimScroll({height:a(window).height()-a(e.mainHeader).height()+"px"})};var h=a.fn.layout;a.fn.layout=b,a.fn.layout.Constuctor=g,a.fn.layout.noConflict=function(){return a.fn.layout=h,this},a(window).on("load",function(){b.call(a("body"))})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var g=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new h(g))}"toggle"===b&&f.toggle()})}var c="lte.pushmenu",d={collapseScreenSize:767,expandOnHover:!1,expandTransitionDelay:200},e={collapsed:".sidebar-collapse",open:".sidebar-open",mainSidebar:".main-sidebar",contentWrapper:".content-wrapper",searchInput:".sidebar-form .form-control",button:'[data-toggle="push-menu"]',mini:".sidebar-mini",expanded:".sidebar-expanded-on-hover",layoutFixed:".fixed"},f={collapsed:"sidebar-collapse",open:"sidebar-open",mini:"sidebar-mini",expanded:"sidebar-expanded-on-hover",expandFeature:"sidebar-mini-expand-feature",layoutFixed:"fixed"},g={expanded:"expanded.pushMenu",collapsed:"collapsed.pushMenu"},h=function(a){this.options=a,this.init()};h.prototype.init=function(){(this.options.expandOnHover||a("body").is(e.mini+e.layoutFixed))&&(this.expandOnHover(),a("body").addClass(f.expandFeature)),a(e.contentWrapper).click(function(){a(window).width()<=this.options.collapseScreenSize&&a("body").hasClass(f.open)&&this.close()}.bind(this)),a(e.searchInput).click(function(a){a.stopPropagation()})},h.prototype.toggle=function(){var b=a(window).width(),c=!a("body").hasClass(f.collapsed);b<=this.options.collapseScreenSize&&(c=a("body").hasClass(f.open)),c?this.close():this.open()},h.prototype.open=function(){a(window).width()>this.options.collapseScreenSize?a("body").removeClass(f.collapsed).trigger(a.Event(g.expanded)):a("body").addClass(f.open).trigger(a.Event(g.expanded))},h.prototype.close=function(){a(window).width()>this.options.collapseScreenSize?a("body").addClass(f.collapsed).trigger(a.Event(g.collapsed)):a("body").removeClass(f.open+" "+f.collapsed).trigger(a.Event(g.collapsed))},h.prototype.expandOnHover=function(){a(e.mainSidebar).hover(function(){a("body").is(e.mini+e.collapsed)&&a(window).width()>this.options.collapseScreenSize&&this.expand()}.bind(this),function(){a("body").is(e.expanded)&&this.collapse()}.bind(this))},h.prototype.expand=function(){setTimeout(function(){a("body").removeClass(f.collapsed).addClass(f.expanded)},this.options.expandTransitionDelay)},h.prototype.collapse=function(){setTimeout(function(){a("body").removeClass(f.expanded).addClass(f.collapsed)},this.options.expandTransitionDelay)};var i=a.fn.pushMenu;a.fn.pushMenu=b,a.fn.pushMenu.Constructor=h,a.fn.pushMenu.noConflict=function(){return a.fn.pushMenu=i,this},a(document).on("click",e.button,function(c){c.preventDefault(),b.call(a(this),"toggle")}),a(window).on("load",function(){b.call(a(e.button))})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this),f=e.data(c);if(!f){var h=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,f=new g(e,h))}if("string"==typeof f){if(void 0===f[b])throw new Error("No method named "+b);f[b]()}})}var c="lte.todolist",d={onCheck:function(a){return a},onUnCheck:function(a){return a}},e={data:'[data-widget="todo-list"]'},f={done:"done"},g=function(a,b){this.element=a,this.options=b,this._setUpListeners()};g.prototype.toggle=function(a){if(a.parents(e.li).first().toggleClass(f.done),!a.prop("checked"))return void this.unCheck(a);this.check(a)},g.prototype.check=function(a){this.options.onCheck.call(a)},g.prototype.unCheck=function(a){this.options.onUnCheck.call(a)},g.prototype._setUpListeners=function(){var b=this;a(this.element).on("change ifChanged","input:checkbox",function(){b.toggle(a(this))})};var h=a.fn.todoList;a.fn.todoList=b,a.fn.todoList.Constructor=g,a.fn.todoList.noConflict=function(){return a.fn.todoList=h,this},a(window).on("load",function(){a(e.data).each(function(){b.call(a(this))})})}(jQuery),function(a){"use strict";function b(b){return this.each(function(){var e=a(this);if(!e.data(c)){var f=a.extend({},d,e.data(),"object"==typeof b&&b);e.data(c,new h(e,f))}})}var c="lte.tree",d={animationSpeed:500,accordion:!0,followLink:!1,trigger:".treeview a"},e={tree:".tree",treeview:".treeview",treeviewMenu:".treeview-menu",open:".menu-open, .active",li:"li",data:'[data-widget="tree"]',active:".active"},f={open:"menu-open",tree:"tree"},g={collapsed:"collapsed.tree",expanded:"expanded.tree"},h=function(b,c){this.element=b,this.options=c,a(this.element).addClass(f.tree),a(e.treeview+e.active,this.element).addClass(f.open),this._setUpListeners()};h.prototype.toggle=function(a,b){var c=a.next(e.treeviewMenu),d=a.parent(),g=d.hasClass(f.open);d.is(e.treeview)&&(this.options.followLink&&"#"!==a.attr("href")||b.preventDefault(),g?this.collapse(c,d):this.expand(c,d))},h.prototype.expand=function(b,c){var d=a.Event(g.expanded);if(this.options.accordion){var h=c.siblings(e.open),i=h.children(e.treeviewMenu);this.collapse(i,h)}c.addClass(f.open),b.slideDown(this.options.animationSpeed,function(){a(this.element).trigger(d)}.bind(this))},h.prototype.collapse=function(b,c){var d=a.Event(g.collapsed);c.removeClass(f.open),b.slideUp(this.options.animationSpeed,function(){a(this.element).trigger(d)}.bind(this))},h.prototype._setUpListeners=function(){var b=this;a(this.element).on("click",this.options.trigger,function(c){b.toggle(a(this),c)})};var i=a.fn.tree;a.fn.tree=b,a.fn.tree.Constructor=h,a.fn.tree.noConflict=function(){return a.fn.tree=i,this},a(window).on("load",function(){a(e.data).each(function(){b.call(a(this))})})}(jQuery); \ No newline at end of file diff --git a/public/static/admin/js/app.js b/public/static/admin/js/app.js new file mode 100755 index 0000000..a129703 --- /dev/null +++ b/public/static/admin/js/app.js @@ -0,0 +1,3 @@ +/** + * 自定义js + */ diff --git a/public/static/admin/js/customsku/createSkuTable.js b/public/static/admin/js/customsku/createSkuTable.js new file mode 100755 index 0000000..a7ecb13 --- /dev/null +++ b/public/static/admin/js/customsku/createSkuTable.js @@ -0,0 +1,145 @@ +/** + * author:zhangxiaowu + * date:2016年9月11日 + * version:1.0 + * email:uf_zhangxiaowu@163.com + */ + +var alreadySetSkuVals = {};//已经设置的SKU值数据 + +$(function(){ + //sku属性发生改变时,进行表格创建 + $(document).on("change",'.sku_value',function(){ + getAlreadySetSkuVals();//获取已经设置的SKU值 + console.log(alreadySetSkuVals); + var b = true; + var skuTypeArr = [];//存放SKU类型的数组 + var totalRow = 1;//总行数 + //获取元素类型 + $(".SKU_TYPE").each(function(){ + //SKU类型节点 + var skuTypeNode = $(this).children("li"); + var skuTypeObj = {};//sku类型对象 + //SKU属性类型标题 + skuTypeObj.skuTypeTitle = $(skuTypeNode).attr("sku-type-name"); + //SKU属性类型主键 + var propid = $(skuTypeNode).attr("propid"); + skuTypeObj.skuTypeKey = propid; + //是否是必选SKU 0:不是;1:是; + var is_required = $(skuTypeNode).attr("is_required"); + skuValueArr = [];//存放SKU值得数组 + //SKU相对应的节点 + var skuValNode = $(this).next(); + //获取SKU值 + var skuValCheckBoxs = $(skuValNode).find("input[type='checkbox'][class*='sku_value']"); + var checkedNodeLen = 0 ;//选中的SKU节点的个数 + $(skuValCheckBoxs).each(function(){ + if($(this).is(":checked")){ + var skuValObj = {};//SKU值对象 + skuValObj.skuValueTitle = $(this).val();//SKU值名称 + skuValObj.skuValueId = $(this).attr("propvalid");//SKU值主键 + skuValObj.skuPropId = $(this).attr("propid");//SKU类型主键 + skuValueArr.push(skuValObj); + checkedNodeLen ++ ; + } + }); + if(is_required && "1" == is_required){//必选sku + if(checkedNodeLen <= 0){//有必选的SKU仍然没有选中 + b = false; + return false;//直接返回 + } + } + if(skuValueArr && skuValueArr.length > 0){ + totalRow = totalRow * skuValueArr.length; + skuTypeObj.skuValues = skuValueArr;//sku值数组 + skuTypeObj.skuValueLen = skuValueArr.length;//sku值长度 + skuTypeArr.push(skuTypeObj);//保存进数组中 + } + }); + var SKUTableDom = "";//sku表格数据 + //开始创建行 + if(b){//必选的SKU属性已经都选中了 + +// //调整顺序(少的在前面,多的在后面) +// skuTypeArr.sort(function(skuType1,skuType2){ +// return (skuType1.skuValueLen - skuType2.skuValueLen) +// }); +// + SKUTableDom += ""; + //创建表头 + for(var t = 0 ; t < skuTypeArr.length ; t ++){ + SKUTableDom += ''; + } + SKUTableDom += ''; + SKUTableDom += ""; + //循环处理表体 + for(var i = 0 ; i < totalRow ; i ++){//总共需要创建多少行 + var currRowDoms = ""; + var rowCount = 1;//记录行数 + var propvalidArr = [];//记录SKU值主键 + var propIdArr = [];//属性类型主键 + var propvalnameArr = [];//记录SKU值标题 + var propNameArr = [];//属性类型标题 + for(var j = 0 ; j < skuTypeArr.length ; j ++){//sku列 + var skuValues = skuTypeArr[j].skuValues;//SKU值数组 + var skuValueLen = skuValues.length;//sku值长度 + rowCount = (rowCount * skuValueLen);//目前的生成的总行数 + var anInterBankNum = (totalRow / rowCount);//跨行数 + var point = ((i / anInterBankNum) % skuValueLen); + propNameArr.push(skuTypeArr[j].skuTypeTitle); + if(0 == (i % anInterBankNum)){//需要创建td + currRowDoms += ''; + propvalidArr.push(skuValues[point].skuValueId); + propIdArr.push(skuValues[point].skuPropId); + propvalnameArr.push(skuValues[point].skuValueTitle); + }else{ + //当前单元格为跨行 + propvalidArr.push(skuValues[parseInt(point)].skuValueId); + propIdArr.push(skuValues[parseInt(point)].skuPropId); + propvalnameArr.push(skuValues[parseInt(point)].skuValueTitle); + } + } +// +// //进行排序(主键小的在前,大的在后),注意:适用于数值类型的主键 +// propvalidArr.sort(function(provids1,propvids2){ +// return (provids1 - propvids2) +// }); + + var propvalids = propvalidArr.toString() + var alreadySetSkuPrice = "";//已经设置的SKU价格 + var alreadySetSkuStock = "";//已经设置的SKU库存 + //赋值 + if(alreadySetSkuVals){ + var currGroupSkuVal = alreadySetSkuVals[propvalids];//当前这组SKU值 + if(currGroupSkuVal){ + alreadySetSkuPrice = currGroupSkuVal.skuPrice; + alreadySetSkuStock = currGroupSkuVal.skuStock + } + } + //console.log(propvalids); + SKUTableDom += ''+currRowDoms+''; + } + SKUTableDom += "
    '+skuTypeArr[t].skuTypeTitle+'价格库存
    '+skuValues[point].skuValueTitle+'
    "; + } + $("#skuTable").html(SKUTableDom); + }); +}); + +/** + * 获取已经设置的SKU值 + */ +function getAlreadySetSkuVals(){ + alreadySetSkuVals = {}; + //获取设置的SKU属性值 + $("tr[class*='sku_table_tr']").each(function(){ + var skuPrice = $(this).find("input[type='text'][class*='setting_sku_price']").val();//SKU价格 + var skuStock = $(this).find("input[type='text'][class*='setting_sku_stock']").val();//SKU库存 + if(skuPrice || skuStock){//已经设置了全部或部分值 + var propvalids = $(this).attr("propvalids");//SKU值主键集合 + alreadySetSkuVals[propvalids] = { + "skuPrice" : skuPrice, + "skuStock" : skuStock + } + } + }); +} diff --git a/public/static/admin/js/customsku/customSku.js b/public/static/admin/js/customsku/customSku.js new file mode 100755 index 0000000..4ac9daa --- /dev/null +++ b/public/static/admin/js/customsku/customSku.js @@ -0,0 +1,132 @@ +var customPropId = -1;//自定义属性类型ID +var customPropValId = -1;//自定义属性值id +$(function(){ + //克隆SKU模板生成自定义sku + $(document).on("click" , ".cloneSku" , function(){ + var cloneSource = $("#skuCloneModel");//要克隆的sku模板 + var cloneNode = cloneSource.clone(true);//克隆出来的节点 + cloneNode.css("display","block");//显示元素 + //移除id + cloneNode.removeAttr("id"); + customPropId -- ; + //设置自定义属性类型主键 + $(cloneNode).find(".cusSkuTypeInput").parent().attr("propid",customPropId); + //设置SKU类型主键 propid + $(cloneNode).find(".cusSkuValInput").prev().attr("propid",customPropId); + customPropValId -- ; + //设置自定义属性类型值主键 + $(cloneNode).find(".cusSkuValInput").prev().attr("propvalid",customPropValId); + $(this).before(cloneNode);//添加到该按钮的前面 + }); + + //添加自定义sku值 + $(document).on("click",".cloneSkuVal",function(){ + //要克隆的SKU值模板 + var cloneSource = $("#onlySkuValCloneModel"); + //克隆出来的节点 + var cloneNode = cloneSource.clone(true); + //移除id + cloneNode.removeAttr("id"); + //获取并设置SKU类型主键 + var propid = $(this).parents("ul").prev().find("li").attr("propid"); + $(cloneNode).find(".cusSkuValInput").prev().attr("propid",propid); + customPropValId -- ; + //设置自定义属性类型值主键 + $(cloneNode).find(".cusSkuValInput").prev().attr("propvalid",customPropValId); + //显示元素 + cloneNode.css("display","block"); + //添加到该按钮的前面 + $(this).before(cloneNode); + }); + + //SKU类型改变 + $(document).on("change", ".cusSkuTypeInput", function(){ + //判断当前的SKU类型是否已经存在 + var isHaveThisSkuType = false; + var customSkuTypeName = $(this).val(); + if(customSkuTypeName){ + $("ul[class*='SKU_TYPE']").find("li").each(function(){ + var currSkuTypeName = $(this).attr("sku-type-name");//当前SKU类型名称 + if(currSkuTypeName == customSkuTypeName){//该SKU类型已经存在 + isHaveThisSkuType = true; + } + }); + } + if(isHaveThisSkuType){ + layer.alert("该SKU类型已经存在!"); + $(this).val(""); + } + //赋值类型属性 + $(this).parent().attr("sku-type-name",$(this).val()); + if(!$(this).val() || isHaveThisSkuType){ + $(this).parent().parent().next().find("input[type='checkbox'][class*='sku_value']").each(function(){ + //取消选中 + $(this).attr("checked",false) + //移除class + $(this).removeClass("sku_value"); + }); + } + //触发change事件,重绘表格 + $(".model_sku_val").trigger("change"); + }); + + //SKU值改变 + $(document).on("change", ".cusSkuValInput", function(){ + var isHaveSkuVal = false;//是否已经存在当前的SKU值 + var thisSkuVal = $(this).val(); + //判断SKU值是否已经重复了 + $(".model_sku_val,.sku_value").each(function(){ + var customSkuVal = $(this).val();//当前SKU值 + if(thisSkuVal == customSkuVal){ + isHaveSkuVal = true; + return; + } + }); + + if(isHaveSkuVal){ + layer.alert("该SKU类型已经存在!"); + $(this).val(""); + } + $("input[type*='checkbox'][class*='']") + var cusSkuVal = $(this).val(); + if(!cusSkuVal || isHaveSkuVal){ + //移除class + $(this).prev().removeClass("sku_value"); + if($(this).prev().is(":checked")){ + //移除选中 + $(this).prev().attr("checked",false); + } + } + //赋值类型属性 + $(this).prev().val(cusSkuVal); + //触发change事件 + $(".model_sku_val").trigger("change"); + }); + + //未设置sku值和属性的sku选择框改变事件 + $(document).on("change",".model_sku_val",function(){ + //SKU类型 + var skuTypeVal = $(this).parent().parent().prev().find("li").attr("sku-type-name"); + //是否设置了sku类型及sku值 + if(skuTypeVal && $(this).val()){ + //添加class + $(this).addClass("sku_value"); + } + //触发change事件,重绘表格 + $("input[type='checkbox']").first().trigger("change"); + }); + + //删除自定义sku类型模块 + $(document).on("click",".delCusSkuType",function(){ + $(this).parent().parent().parent().remove(); + //触发change事件,重绘表格 + $("input[type='checkbox']").first().trigger("change"); + }); + + //删除自定义sku值 + $(document).on("click",".delCusSkuVal",function(){ + $(this).parent().remove(); + //触发change事件,重绘表格 + $("input[type='checkbox']").first().trigger("change"); + }); +}) diff --git a/public/static/admin/js/customsku/getSetSkuVals.js b/public/static/admin/js/customsku/getSetSkuVals.js new file mode 100755 index 0000000..6e50ea1 --- /dev/null +++ b/public/static/admin/js/customsku/getSetSkuVals.js @@ -0,0 +1,9 @@ +//获取已经设置的SKU +$(".getSetSkuVal").on("click",function(){ + $("tr[class*='sku_table_tr']").each(function(){ + var propids = $(this).attr("propids");//SKU类型主键 + var propvalids = $(this).attr("propvalids");//SKU值主键 + + + }); +}); diff --git a/public/static/admin/js/demo.js b/public/static/admin/js/demo.js new file mode 100755 index 0000000..ee56354 --- /dev/null +++ b/public/static/admin/js/demo.js @@ -0,0 +1,348 @@ +/** + * AdminLTE Demo Menu + * ------------------ + * You should not use this file in production. + * This file is for demo purposes only. + */ +$(function () { + 'use strict'; + + /** + * Get access to plugins + */ + + $('[data-toggle="control-sidebar"]').controlSidebar(); + $('[data-toggle="push-menu"]').pushMenu(); + var $pushMenu = $('[data-toggle="push-menu"]').data('lte.pushmenu'); + var $controlSidebar = $('[data-toggle="control-sidebar"]').data('lte.controlsidebar'); + var $layout = $('body').data('lte.layout'); + $(window).on('load', function () { + // Reinitialize variables on load + $pushMenu = $('[data-toggle="push-menu"]').data('lte.pushmenu'); + $controlSidebar = $('[data-toggle="control-sidebar"]').data('lte.controlsidebar'); + $layout = $('body').data('lte.layout') + }); + + /** + * List of all the available skins + * + * @type Array + */ + var mySkins = [ + 'skin-blue', + 'skin-black', + 'skin-red', + 'skin-yellow', + 'skin-purple', + 'skin-green', + 'skin-blue-light', + 'skin-black-light', + 'skin-red-light', + 'skin-yellow-light', + 'skin-purple-light', + 'skin-green-light' + ]; + + /** + * Get a prestored setting + * + * @param String name Name of of the setting + * @returns String The value of the setting | null + */ + function get(name) { + if (typeof (Storage) !== 'undefined') { + return localStorage.getItem(name) + } else { + window.alert('请使用现代浏览器(谷歌浏览器或360,QQ,搜狗等极速模式)访问本后台!') + } + } + + /** + * Store a new settings in the browser + * + * @param String name Name of the setting + * @param String val Value of the setting + * @returns void + */ + function store(name, val) { + if (typeof (Storage) !== 'undefined') { + localStorage.setItem(name, val) + } else { + window.alert('请使用现代浏览器(谷歌浏览器或360,QQ,搜狗等极速模式)访问本后台!') + } + } + + /** + * Toggles layout classes + * + * @param String cls the layout class to toggle + * @returns void + */ + function changeLayout(cls) { + $('body').toggleClass(cls); + $layout.fixSidebar(); + if ($('body').hasClass('fixed') && cls == 'fixed') { + $pushMenu.expandOnHover(); + $layout.activate() + } + $controlSidebar.fix() + } + + /** + * Replaces the old skin with the new skin + * @param String cls the new skin class + * @returns Boolean false to prevent link's default action + */ + function changeSkin(cls) { + $.each(mySkins, function (i) { + $('body').removeClass(mySkins[i]) + }); + + $('body').addClass(cls); + store('skin', cls); + return false + } + + /** + * Retrieve default settings and apply them to the template + * + * @returns void + */ + function setup() { + var tmp = get('skin'); + if (tmp && $.inArray(tmp, mySkins)) + changeSkin(tmp); + + // Add the change skin listener + $('[data-skin]').on('click', function (e) { + if ($(this).hasClass('knob')) + return; + e.preventDefault(); + changeSkin($(this).data('skin')) + }); + + // Add the layout manager + $('[data-layout]').on('click', function () { + changeLayout($(this).data('layout')) + }); + + $('[data-controlsidebar]').on('click', function () { + changeLayout($(this).data('controlsidebar')); + var slide = !$controlSidebar.options.slide; + + $controlSidebar.options.slide = slide; + if (!slide) + $('.control-sidebar').removeClass('control-sidebar-open') + }); + + $('[data-sidebarskin="toggle"]').on('click', function () { + var $sidebar = $('.control-sidebar'); + if ($sidebar.hasClass('control-sidebar-dark')) { + $sidebar.removeClass('control-sidebar-dark'); + $sidebar.addClass('control-sidebar-light') + } else { + $sidebar.removeClass('control-sidebar-light'); + $sidebar.addClass('control-sidebar-dark') + } + }); + + $('[data-enable="expandOnHover"]').on('click', function () { + $(this).attr('disabled', true); + $pushMenu.expandOnHover(); + if (!$('body').hasClass('sidebar-collapse')) + $('[data-layout="sidebar-collapse"]').click() + }); + + // Reset options + if ($('body').hasClass('fixed')) { + $('[data-layout="fixed"]').attr('checked', 'checked') + } + if ($('body').hasClass('layout-boxed')) { + $('[data-layout="layout-boxed"]').attr('checked', 'checked') + } + if ($('body').hasClass('sidebar-collapse')) { + $('[data-layout="sidebar-collapse"]').attr('checked', 'checked') + } + + } + + // Create the new tab + var $tabPane = $('
    ', { + 'id': 'control-sidebar-theme-demo-options-tab', + 'class': 'tab-pane active' + }); + + // Create the tab button + var $tabButton = $('
  • ', {'class': 'active'}) + .html('' + + '' + + ''); + + // Add the tab button to the right sidebar tabs + $('[href="#control-sidebar-home-tab"]') + .parent() + .before($tabButton); + + // Create the menu + var $demoSettings = $('
    '); + + // Layout options + $demoSettings.append( + '

    ' + + '布局选项' + + '

    ' + // Fixed layout + + '
    ' + + '' + + '
    ' + // Boxed layout + + '
    ' + + '' + + '
    ' + // Sidebar Toggle + + '
    ' + + '' + + '
    ' + // Sidebar mini expand on hover toggle + + '
    ' + + '' + + '
    ' + // Control Sidebar Toggle + + '
    ' + + '' + + '
    ' + // Control Sidebar Skin Toggle + + '
    ' + + '' + + '
    ' + ); + var $skinsList = $('
      ', {'class': 'list-unstyled clearfix'}); + + // Dark sidebar skins + var $skinBlue = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      蓝 黑

      '); + $skinsList.append($skinBlue); + var $skinBlack = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      白 黑

      '); + $skinsList.append($skinBlack); + var $skinPurple = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      紫 黑

      '); + $skinsList.append($skinPurple); + var $skinGreen = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      绿 黑

      '); + $skinsList.append($skinGreen); + var $skinRed = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      红 黑

      '); + $skinsList.append($skinRed); + var $skinYellow = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      黄 黑

      '); + $skinsList.append($skinYellow); + + // Light sidebar skins + var $skinBlueLight = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      蓝 白

      '); + $skinsList.append($skinBlueLight); + var $skinBlackLight = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      黑 白

      '); + $skinsList.append($skinBlackLight); + var $skinPurpleLight = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      紫 白

      '); + $skinsList.append($skinPurpleLight); + var $skinGreenLight = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      纯 白

      '); + $skinsList.append($skinGreenLight); + var $skinRedLight = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      红 白

      '); + $skinsList.append($skinRedLight); + var $skinYellowLight = + $('
    • ', {style: 'float:left; width: 33.33333%; padding: 5px;'}) + .append('' + + '
      ' + + '
      ' + + '
      ' + + '

      黄 白

      '); + $skinsList.append($skinYellowLight); + + $demoSettings.append('

      皮肤

      '); + $demoSettings.append($skinsList); + + $tabPane.append($demoSettings); + $('#control-sidebar-home-tab').after($tabPane); + + setup(); + + $('[data-toggle="tooltip"]').tooltip() +}); diff --git a/public/static/admin/js/jquery.pjax.js b/public/static/admin/js/jquery.pjax.js new file mode 100755 index 0000000..ea3f1d5 --- /dev/null +++ b/public/static/admin/js/jquery.pjax.js @@ -0,0 +1,8 @@ +/*! + * Copyright 2012, Chris Wanstrath + * Released under the MIT License + * https://github.com/defunkt/jquery-pjax + */ +(function($){function fnPjax(selector,container,options){options=optionsFor(container,options);return this.on("click.pjax",selector,function(event){var opts=options;if(!opts.container){opts=$.extend({},options);opts.container=$(this).attr("data-pjax")}handleClick(event,opts)})}function handleClick(event,container,options){options=optionsFor(container,options);var link=event.currentTarget;var $link=$(link);if(link.tagName.toUpperCase()!=="A"){throw"$.fn.pjax or $.pjax.click requires an anchor element"}if(event.which>1||event.metaKey||event.ctrlKey||event.shiftKey||event.altKey){return}if(location.protocol!==link.protocol||location.hostname!==link.hostname){return}if(link.href.indexOf("#")>-1&&stripHash(link)==stripHash(location)){return}if(event.isDefaultPrevented()){return}var defaults={url:link.href,container:$link.attr("data-pjax"),target:link};var opts=$.extend({},defaults,options);var clickEvent=$.Event("pjax:click");$link.trigger(clickEvent,[opts]);if(!clickEvent.isDefaultPrevented()){pjax(opts);event.preventDefault();$link.trigger("pjax:clicked",[opts])}}function handleSubmit(event,container,options){options=optionsFor(container,options);var form=event.currentTarget;var $form=$(form);if(form.tagName.toUpperCase()!=="FORM"){throw"$.pjax.submit requires a form element"}var defaults={type:($form.attr("method")||"GET").toUpperCase(),url:$form.attr("action"),container:$form.attr("data-pjax"),target:form};if(defaults.type!=="GET"&&window.FormData!==undefined){defaults.data=new FormData(form);defaults.processData=false;defaults.contentType=false}else{if($form.find(":file").length){return}defaults.data=$form.serializeArray()}pjax($.extend({},defaults,options));event.preventDefault()}function pjax(options){options=$.extend(true,{},$.ajaxSettings,pjax.defaults,options);if($.isFunction(options.url)){options.url=options.url()}var hash=parseURL(options.url).hash;var containerType=$.type(options.container);if(containerType!=="string"){throw"expected string value for 'container' option; got "+containerType}var context=options.context=$(options.container);if(!context.length){throw"the container selector '"+options.container+"' did not match anything"}if(!options.data){options.data={}}if($.isArray(options.data)){options.data.push({name:"_pjax",value:options.container})}else{options.data._pjax=options.container}function fire(type,args,props){if(!props){props={}}props.relatedTarget=options.target;var event=$.Event(type,props);context.trigger(event,args);return !event.isDefaultPrevented()}var timeoutTimer;options.beforeSend=function(xhr,settings){if(settings.type!=="GET"){settings.timeout=0}xhr.setRequestHeader("X-PJAX","true");xhr.setRequestHeader("X-PJAX-Container",options.container);if(!fire("pjax:beforeSend",[xhr,settings])){return false}if(settings.timeout>0){timeoutTimer=setTimeout(function(){if(fire("pjax:timeout",[xhr,options])){xhr.abort("timeout")}},settings.timeout);settings.timeout=0}var url=parseURL(settings.url);if(hash){url.hash=hash}options.requestUrl=stripInternalParams(url)};options.complete=function(xhr,textStatus){if(timeoutTimer){clearTimeout(timeoutTimer)}fire("pjax:complete",[xhr,textStatus,options]);fire("pjax:end",[xhr,options])};options.error=function(xhr,textStatus,errorThrown){var container=extractContainer("",xhr,options);var allowed=fire("pjax:error",[xhr,textStatus,errorThrown,options]);if(options.type=="GET"&&textStatus!=="abort"&&allowed){locationReplace(container.url)}};options.success=function(data,status,xhr){var previousState=pjax.state;var currentVersion=typeof $.pjax.defaults.version==="function"?$.pjax.defaults.version():$.pjax.defaults.version;var latestVersion=xhr.getResponseHeader("X-PJAX-Version");var container=extractContainer(data,xhr,options);var url=parseURL(container.url);if(hash){url.hash=hash;container.url=url.href}if(currentVersion&&latestVersion&¤tVersion!==latestVersion){locationReplace(container.url);return}if(!container.contents){locationReplace(container.url);return}pjax.state={id:options.id||uniqueId(),url:container.url,title:container.title,container:options.container,fragment:options.fragment,timeout:options.timeout};if(options.push||options.replace){window.history.replaceState(pjax.state,container.title,container.url)}var blurFocus=$.contains(context,document.activeElement);if(blurFocus){try{document.activeElement.blur()}catch(e){}}if(container.title){document.title=container.title}fire("pjax:beforeReplace",[container.contents,options],{state:pjax.state,previousState:previousState});context.html(container.contents);var autofocusEl=context.find("input[autofocus], textarea[autofocus]").last()[0];if(autofocusEl&&document.activeElement!==autofocusEl){autofocusEl.focus()}executeScriptTags(container.scripts);var scrollTo=options.scrollTo;if(hash){var name=decodeURIComponent(hash.slice(1));var target=document.getElementById(name)||document.getElementsByName(name)[0]; + if(target){scrollTo=$(target).offset().top}}if(typeof scrollTo=="number"){$(window).scrollTop(scrollTo)}fire("pjax:success",[data,status,xhr,options])};if(!pjax.state){pjax.state={id:uniqueId(),url:window.location.href,title:document.title,container:options.container,fragment:options.fragment,timeout:options.timeout};window.history.replaceState(pjax.state,document.title)}abortXHR(pjax.xhr);pjax.options=options;var xhr=pjax.xhr=$.ajax(options);if(xhr.readyState>0){if(options.push&&!options.replace){cachePush(pjax.state.id,[options.container,cloneContents(context)]);window.history.pushState(null,"",options.requestUrl)}fire("pjax:start",[xhr,options]);fire("pjax:send",[xhr,options])}return pjax.xhr}function pjaxReload(container,options){var defaults={url:window.location.href,push:false,replace:true,scrollTo:false};return pjax($.extend(defaults,optionsFor(container,options)))}function locationReplace(url){window.history.replaceState(null,"",pjax.state.url);window.location.replace(url)}var initialPop=true;var initialURL=window.location.href;var initialState=window.history.state;if(initialState&&initialState.container){pjax.state=initialState}if("state" in window.history){initialPop=false}function onPjaxPopstate(event){if(!initialPop){abortXHR(pjax.xhr)}var previousState=pjax.state;var state=event.state;var direction;if(state&&state.container){if(initialPop&&initialURL==state.url){return}if(previousState){if(previousState.id===state.id){return}direction=previousState.id",{method:method==="GET"?"GET":"POST",action:url,style:"display:none"});if(method!=="GET"&&method!=="POST"){form.append($("",{type:"hidden",name:"_method",value:method.toLowerCase()}))}var data=options.data;if(typeof data==="string"){$.each(data.split("&"),function(index,value){var pair=value.split("=");form.append($("",{type:"hidden",name:pair[0],value:pair[1]}))})}else{if($.isArray(data)){$.each(data,function(index,value){form.append($("",{type:"hidden",name:value.name,value:value.value}))})}else{if(typeof data==="object"){var key;for(key in data){form.append($("",{type:"hidden",name:key,value:data[key]}))}}}}$(document.body).append(form);form.submit()}function abortXHR(xhr){if(xhr&&xhr.readyState<4){xhr.onreadystatechange=$.noop;xhr.abort()}}function uniqueId(){return(new Date).getTime()}function cloneContents(container){var cloned=container.clone();cloned.find("script").each(function(){if(!this.src){$._data(this,"globalEval",false)}});return cloned.contents()}function stripInternalParams(url){url.search=url.search.replace(/([?&])(_pjax|_)=[^&]*/g,"").replace(/^&/,"");return url.href.replace(/\?($|#)/,"$1")}function parseURL(url){var a=document.createElement("a");a.href=url;return a}function stripHash(location){return location.href.replace(/#.*/,"")}function optionsFor(container,options){if(container&&options){options=$.extend({},options);options.container=container;return options}else{if($.isPlainObject(container)){return container}else{return{container:container}}}}function findAll(elems,selector){return elems.filter(selector).add(elems.find(selector))}function parseHTML(html){return $.parseHTML(html,document,true)}function extractContainer(data,xhr,options){var obj={},fullDocument=/]*>([\s\S.]*)<\/body>/i)[0]));var head=data.match(/]*>([\s\S.]*)<\/head>/i);$head=head!=null?$(parseHTML(head[0])):$body}else{$head=$body=$(parseHTML(data))}if($body.length===0){return obj}obj.title=findAll($head,"title").last().text();if(options.fragment){var $fragment=$body;if(options.fragment!=="body"){$fragment=findAll($fragment,options.fragment).first()}if($fragment.length){obj.contents=options.fragment==="body"?$fragment:$fragment.contents(); + if(!obj.title){obj.title=$fragment.attr("title")||$fragment.data("title")}}}else{if(!fullDocument){obj.contents=$body}}if(obj.contents){obj.contents=obj.contents.not(function(){return $(this).is("title")});obj.contents.find("title").remove();obj.scripts=findAll(obj.contents,"script[src]").remove();obj.contents=obj.contents.not(obj.scripts)}if(obj.title){obj.title=$.trim(obj.title)}return obj}function executeScriptTags(scripts){if(!scripts){return}var existingScripts=$("script[src]");scripts.each(function(){var src=this.src;var matchedScripts=existingScripts.filter(function(){return this.src===src});if(matchedScripts.length){return}var script=document.createElement("script");var type=$(this).attr("type");if(type){script.type=type}script.src=$(this).attr("src");document.head.appendChild(script)})}var cacheMapping={};var cacheForwardStack=[];var cacheBackStack=[];function cachePush(id,value){cacheMapping[id]=value;cacheBackStack.push(id);trimCacheStack(cacheForwardStack,0);trimCacheStack(cacheBackStack,pjax.defaults.maxCacheLength)}function cachePop(direction,id,value){var pushStack,popStack;cacheMapping[id]=value;if(direction==="forward"){pushStack=cacheBackStack;popStack=cacheForwardStack}else{pushStack=cacheForwardStack;popStack=cacheBackStack}pushStack.push(id);id=popStack.pop();if(id){delete cacheMapping[id]}trimCacheStack(pushStack,pjax.defaults.maxCacheLength)}function trimCacheStack(stack,length){while(stack.length>length){delete cacheMapping[stack.shift()]}}function findVersion(){return $("meta").filter(function(){var name=$(this).attr("http-equiv");return name&&name.toUpperCase()==="X-PJAX-VERSION"}).attr("content")}function enable(){$.fn.pjax=fnPjax;$.pjax=pjax;$.pjax.enable=$.noop;$.pjax.disable=disable;$.pjax.click=handleClick;$.pjax.submit=handleSubmit;$.pjax.reload=pjaxReload;$.pjax.defaults={timeout:650,push:true,replace:false,type:"GET",dataType:"html",scrollTo:0,maxCacheLength:20,version:findVersion};$(window).on("popstate.pjax",onPjaxPopstate)}function disable(){$.fn.pjax=function(){return this};$.pjax=fallbackPjax;$.pjax.enable=enable;$.pjax.disable=$.noop;$.pjax.click=$.noop;$.pjax.submit=$.noop;$.pjax.reload=function(){window.location.reload()};$(window).off("popstate.pjax",onPjaxPopstate)}if($.event.props&&$.inArray("state",$.event.props)<0){$.event.props.push("state")}else{if(!("state" in $.Event.prototype)){$.event.addProp("state")}}$.support.pjax=window.history&&window.history.pushState&&window.history.replaceState&&!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/);if($.support.pjax){enable()}else{disable()}})(jQuery); \ No newline at end of file diff --git a/public/static/admin/js/tag/jquery.tag-editor.css b/public/static/admin/js/tag/jquery.tag-editor.css new file mode 100755 index 0000000..10cf3b0 --- /dev/null +++ b/public/static/admin/js/tag/jquery.tag-editor.css @@ -0,0 +1,45 @@ +/* surrounding tag container */ +.tag-editor { + list-style-type: none; padding: 4px 5px; margin: 0; overflow: hidden; border: 1px solid #DBDBDB; cursor: text; + font: normal 14px sans-serif; color: #555; background: #fff; width: 70%; +} + +/* core styles usually need no change */ +.tag-editor li { display: block; float: left; overflow: hidden; margin: 3px 0; } +.tag-editor div { float: left; padding: 0 4px; } +.tag-editor .placeholder { padding: 0 8px; color: #bbb; } +.tag-editor .tag-editor-spacer { padding: 0; width: 8px; overflow: hidden; color: transparent; background: none; } +.tag-editor input { + vertical-align: inherit; border: 0; outline: none; padding: 0; margin: 0; cursor: text; + font-family: inherit; font-weight: inherit; font-size: inherit; font-style: inherit; + box-shadow: none; background: none; color: #444; +} +/* hide original input field or textarea visually to allow tab navigation */ +.tag-editor-hidden-src { position: absolute !important; left: -99999px; } +/* hide IE10 "clear field" X */ +.tag-editor ::-ms-clear { display: none; } + +/* tag style */ +.tag-editor .tag-editor-tag { + padding-left: 5px; color: #46799b; background: #e0eaf1; white-space: nowrap; + overflow: hidden; cursor: pointer; border-radius: 2px 0 0 2px; line-height: 20px; +} + +/* delete icon */ +.tag-editor .tag-editor-delete { background: #e0eaf1; cursor: pointer; border-radius: 0 2px 2px 0; padding-left: 3px; padding-right: 4px; } +.tag-editor .tag-editor-delete i { line-height: 20px; display: inline-block; } +.tag-editor .tag-editor-delete i:before { font-size: 16px; color: #8ba7ba; content: "×"; font-style: normal; } +.tag-editor .tag-editor-delete:hover i:before { color: #d65454; } +.tag-editor .tag-editor-tag.active+.tag-editor-delete, .tag-editor .tag-editor-tag.active+.tag-editor-delete i { visibility: hidden; cursor: text; } + +.tag-editor .tag-editor-tag.active { background: none !important; } + +/* jQuery UI autocomplete - code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css */ +.ui-autocomplete { position: absolute; top: 0; left: 0; cursor: default; font-size: 14px; } +.ui-front { z-index: 9999; } +.ui-menu { list-style: none; padding: 1px; margin: 0; display: block; outline: none; } +.ui-menu .ui-menu-item a { text-decoration: none; display: block; padding: 2px .4em; line-height: 1.4; min-height: 0; /* support: IE7 */ } +.ui-widget-content { border: 1px solid #bbb; background: #fff; color: #555; } +.ui-widget-content a { color: #46799b; } +.ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { background: #e0eaf1; } +.ui-helper-hidden-accessible { display: none; } diff --git a/public/static/admin/js/tag/jquery.tag-editor.js b/public/static/admin/js/tag/jquery.tag-editor.js new file mode 100755 index 0000000..719ae04 --- /dev/null +++ b/public/static/admin/js/tag/jquery.tag-editor.js @@ -0,0 +1,370 @@ +/* + jQuery tagEditor v1.0.21 + Copyright (c) 2014 Simon Steinberger / Pixabay + GitHub: https://github.com/Pixabay/jQuery-tagEditor + License: http://www.opensource.org/licenses/mit-license.php +*/ + +(function($){ + // auto grow input (stackoverflow.com/questions/931207) + $.fn.tagEditorInput=function(){var t=" ",e=$(this),n=parseInt(e.css("fontSize")),i=$("").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:e.css("fontSize"),fontFamily:e.css("fontFamily"),fontWeight:e.css("fontWeight"),letterSpacing:e.css("letterSpacing"),whiteSpace:"nowrap"}),s=function(){if(t!==(t=e.val())){i.text(t);var s=i.width()+n;20>s&&(s=20),s!=e.width()&&e.width(s)}};return i.insertAfter(e),e.bind("keyup keydown focus",s)}; + + // plugin with val as parameter for public methods + $.fn.tagEditor = function(options, val, blur){ + + // helper + function escape(tag) { + return tag.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'"); + } + + // build options dictionary with default values + var blur_result, o = $.extend({}, $.fn.tagEditor.defaults, options), selector = this; + + // store regex and default delimiter in options for later use + o.dregex = new RegExp('['+o.delimiter.replace('-', '\-')+']', 'g'); + + // public methods + if (typeof options == 'string') { + // depending on selector, response may contain tag lists of multiple editor instances + var response = []; + selector.each(function(){ + // the editor is the next sibling to the hidden, original field + var el = $(this), o = el.data('options'), ed = el.next('.tag-editor'); + if (options == 'getTags') + response.push({field: el[0], editor: ed, tags: ed.data('tags')}); + else if (options == 'addTag') { + if (o.maxTags && ed.data('tags').length >= o.maxTags) return false; + // insert new tag + $('
    •  '+o.delimiter[0]+'
    • ').appendTo(ed).find('.tag-editor-tag') + .html('').addClass('active').find('input').val(val).blur(); + if (!blur) ed.click(); + else $('.placeholder', ed).remove(); + } else if (options == 'removeTag') { + // trigger delete on matching tag, then click editor to create a new tag + $('.tag-editor-tag', ed).filter(function(){return $(this).text()==val;}).closest('li').find('.tag-editor-delete').click(); + if (!blur) ed.click(); + } else if (options == 'destroy') { + el.removeClass('tag-editor-hidden-src').removeData('options').off('focus.tag-editor').next('.tag-editor').remove(); + } + }); + return options == 'getTags' ? response : this; + } + + // delete selected tags on backspace, delete, ctrl+x + if (window.getSelection) $(document).off('keydown.tag-editor').on('keydown.tag-editor', function(e){ + if (e.which == 8 || e.which == 46 || e.ctrlKey && e.which == 88) { + try { + var sel = getSelection(), el = document.activeElement.tagName != 'INPUT' ? $(sel.getRangeAt(0).startContainer.parentNode).closest('.tag-editor') : 0; + } catch(e){ el = 0; } + if (sel.rangeCount > 0 && el && el.length) { + var tags = [], splits = sel.toString().split(el.prev().data('options').dregex); + for (i=0; i
    ').insertAfter(el); + el.addClass('tag-editor-hidden-src') // hide original field + .data('options', o) // set data on hidden field + .on('focus.tag-editor', function(){ ed.click(); }); // simulate tabindex + + // add dummy item for min-height on empty editor + ed.append('
  •  
  • '); + + // markup for new tag + var new_tag = '
  •  '+o.delimiter[0]+'
  • '; + + // helper: update global data + function set_placeholder(){ + if (o.placeholder && !tag_list.length && !$('.deleted, .placeholder, input', ed).length) + ed.append('
  • '+o.placeholder+'
  • '); + } + + // helper: update global data + function update_globals(init){ + var old_tags = tag_list.toString(); + tag_list = $('.tag-editor-tag:not(.deleted)', ed).map(function(i, e) { + var val = $.trim($(this).hasClass('active') ? $(this).find('input').val() : $(e).text()); + if (val) return val; + }).get(); + ed.data('tags', tag_list); + el.val(tag_list.join(o.delimiter[0])); + // change callback except for plugin init + if (!init) if (old_tags != tag_list.toString()) o.onChange(el, ed, tag_list); + set_placeholder(); + } + + ed.click(function(e, closest_tag){ + var d, dist = 99999, loc; + + // do not create tag when user selects tags by text selection + if (window.getSelection && getSelection() != '') return; + + if (o.maxTags && ed.data('tags').length >= o.maxTags) { ed.find('input').blur(); return false; } + + blur_result = true + $('input:focus', ed).blur(); + if (!blur_result) return false; + blur_result = true + + // always remove placeholder on click + $('.placeholder', ed).remove(); + if (closest_tag && closest_tag.length) + loc = 'before'; + else { + // calculate tag closest to click position + $('.tag-editor-tag', ed).each(function(){ + var tag = $(this), to = tag.offset(), tag_x = to.left, tag_y = to.top; + if (e.pageY >= tag_y && e.pageY <= tag_y+tag.height()) { + if (e.pageX < tag_x) loc = 'before', d = tag_x - e.pageX; + else loc = 'after', d = e.pageX - tag_x - tag.width(); + if (d < dist) dist = d, closest_tag = tag; + } + }); + } + + if (loc == 'before') { + $(new_tag).insertBefore(closest_tag.closest('li')).find('.tag-editor-tag').click(); + } else if (loc == 'after') + $(new_tag).insertAfter(closest_tag.closest('li')).find('.tag-editor-tag').click(); + else // empty editor + $(new_tag).appendTo(ed).find('.tag-editor-tag').click(); + return false; + }); + + ed.on('click', '.tag-editor-delete', function(e){ + // delete icon is hidden when input is visible; place cursor near invisible delete icon on click + if ($(this).prev().hasClass('active')) { $(this).closest('li').find('input').caret(-1); return false; } + + var li = $(this).closest('li'), tag = li.find('.tag-editor-tag'); + if (o.beforeTagDelete(el, ed, tag_list, tag.text()) === false) return false; + tag.addClass('deleted').animate({width: 0}, o.animateDelete, function(){ li.remove(); set_placeholder(); }); + update_globals(); + return false; + }); + + // delete on right mouse click or ctrl+click + if (o.clickDelete) + ed.on('mousedown', '.tag-editor-tag', function(e){ + if (e.ctrlKey || e.which > 1) { + var li = $(this).closest('li'), tag = li.find('.tag-editor-tag'); + if (o.beforeTagDelete(el, ed, tag_list, tag.text()) === false) return false; + tag.addClass('deleted').animate({width: 0}, o.animateDelete, function(){ li.remove(); set_placeholder(); }); + update_globals(); + return false; + } + }); + + ed.on('click', '.tag-editor-tag', function(e){ + // delete on right click or ctrl+click -> exit + if (o.clickDelete && (e.ctrlKey || e.which > 1)) return false; + + if (!$(this).hasClass('active')) { + var tag = $(this).text(); + // guess cursor position in text input + var left_percent = Math.abs(($(this).offset().left - e.pageX)/$(this).width()), caret_pos = parseInt(tag.length*left_percent), + input = $(this).html('').addClass('active').find('input'); + input.data('old_tag', tag).tagEditorInput().focus().caret(caret_pos); + if (o.autocomplete) { + var aco = $.extend({}, o.autocomplete); + // extend user provided autocomplete select method + var ac_select = 'select' in aco ? o.autocomplete.select : ''; + aco.select = function(e, ui){ if (ac_select) ac_select(e, ui); setTimeout(function(){ + ed.trigger('click', [$('.active', ed).find('input').closest('li').next('li').find('.tag-editor-tag')]); + }, 20); }; + input.autocomplete(aco); + } + } + return false; + }); + + // helper: split into multiple tags, e.g. after paste + function split_cleanup(input){ + var li = input.closest('li'), sub_tags = input.val().replace(/ +/, ' ').split(o.dregex), + old_tag = input.data('old_tag'), old_tags = tag_list.slice(0), exceeded = false, cb_val; // copy tag_list + for (var i=0; i
     '+o.delimiter[0]+'
    '+escape(tag)+'
    '); + if (o.maxTags && old_tags.length >= o.maxTags) { exceeded = true; break; } + } + input.attr('maxlength', o.maxLength).removeData('old_tag').val('') + if (exceeded) input.blur(); else input.focus(); + update_globals(); + } + + ed.on('blur', 'input', function(e){ + e.stopPropagation(); + var input = $(this), old_tag = input.data('old_tag'), tag = $.trim(input.val().replace(/ +/, ' ').replace(o.dregex, o.delimiter[0])); + if (!tag) { + if (old_tag && o.beforeTagDelete(el, ed, tag_list, old_tag) === false) { + input.val(old_tag).focus(); + blur_result = false; + update_globals(); + return; + } + try { input.closest('li').remove(); } catch(e){} + if (old_tag) update_globals(); + } + else if (tag.indexOf(o.delimiter[0])>=0) { split_cleanup(input); return; } + else if (tag != old_tag) { + if (o.forceLowercase) tag = tag.toLowerCase(); + cb_val = o.beforeTagSave(el, ed, tag_list, old_tag, tag); + tag = cb_val || tag; + if (cb_val === false) { + if (old_tag) { + input.val(old_tag).focus(); + blur_result = false; + update_globals(); + return; + } + try { input.closest('li').remove(); } catch(e){} + if (old_tag) update_globals(); + } + // remove duplicates + else if (o.removeDuplicates) + $('.tag-editor-tag:not(.active)', ed).each(function(){ if ($(this).text() == tag) $(this).closest('li').remove(); }); + } + input.parent().html(escape(tag)).removeClass('active'); + if (tag != old_tag) update_globals(); + set_placeholder(); + }); + + var pasted_content; + ed.on('paste', 'input', function(e){ + $(this).removeAttr('maxlength'); + pasted_content = $(this); + setTimeout(function(){ split_cleanup(pasted_content); }, 30); + }); + + // keypress delimiter + var inp; + ed.on('keypress', 'input', function(e){ + if (o.delimiter.indexOf(String.fromCharCode(e.which))>=0) { + inp = $(this); + setTimeout(function(){ split_cleanup(inp); }, 20); + } + }); + + ed.on('keydown', 'input', function(e){ + var $t = $(this); + + // left/up key + backspace key on empty field + if ((e.which == 37 || !o.autocomplete && e.which == 38) && !$t.caret() || e.which == 8 && !$t.val()) { + var prev_tag = $t.closest('li').prev('li').find('.tag-editor-tag'); + if (prev_tag.length) prev_tag.click().find('input').caret(-1); + else if ($t.val() && !(o.maxTags && ed.data('tags').length >= o.maxTags)) $(new_tag).insertBefore($t.closest('li')).find('.tag-editor-tag').click(); + return false; + } + // right/down key + else if ((e.which == 39 || !o.autocomplete && e.which == 40) && ($t.caret() == $t.val().length)) { + var next_tag = $t.closest('li').next('li').find('.tag-editor-tag'); + if (next_tag.length) next_tag.click().find('input').caret(0); + else if ($t.val()) ed.click(); + return false; + } + // tab key + else if (e.which == 9) { + // shift+tab + if (e.shiftKey) { + var prev_tag = $t.closest('li').prev('li').find('.tag-editor-tag'); + if (prev_tag.length) prev_tag.click().find('input').caret(0); + else if ($t.val() && !(o.maxTags && ed.data('tags').length >= o.maxTags)) $(new_tag).insertBefore($t.closest('li')).find('.tag-editor-tag').click(); + // allow tabbing to previous element + else { + el.attr('disabled', 'disabled'); + setTimeout(function(){ el.removeAttr('disabled'); }, 30); + return; + } + return false; + // tab + } else { + var next_tag = $t.closest('li').next('li').find('.tag-editor-tag'); + if (next_tag.length) next_tag.click().find('input').caret(0); + else if ($t.val()) ed.click(); + else return; // allow tabbing to next element + return false; + } + } + // del key + else if (e.which == 46 && (!$.trim($t.val()) || ($t.caret() == $t.val().length))) { + var next_tag = $t.closest('li').next('li').find('.tag-editor-tag'); + if (next_tag.length) next_tag.click().find('input').caret(0); + else if ($t.val()) ed.click(); + return false; + } + // enter key + else if (e.which == 13) { + ed.trigger('click', [$t.closest('li').next('li').find('.tag-editor-tag')]); + + // trigger blur if maxTags limit is reached + if (o.maxTags && ed.data('tags').length >= o.maxTags) ed.find('input').blur(); + + return false; + } + // pos1 + else if (e.which == 36 && !$t.caret()) ed.find('.tag-editor-tag').first().click(); + // end + else if (e.which == 35 && $t.caret() == $t.val().length) ed.find('.tag-editor-tag').last().click(); + // esc + else if (e.which == 27) { + $t.val($t.data('old_tag') ? $t.data('old_tag') : '').blur(); + return false; + } + }); + + // create initial tags + var tags = o.initialTags.length ? o.initialTags : el.val().split(o.dregex); + for (var i=0; i= o.maxTags) break; + var tag = $.trim(tags[i].replace(/ +/, ' ')); + if (tag) { + if (o.forceLowercase) tag = tag.toLowerCase(); + tag_list.push(tag); + ed.append('
  •  '+o.delimiter[0]+'
    '+escape(tag)+'
  • '); + } + } + update_globals(true); // true -> no onChange callback + + // init sortable + if (o.sortable && $.fn.sortable) ed.sortable({ + distance: 5, cancel: '.tag-editor-spacer, input', helper: 'clone', + update: function(){ update_globals(); } + }); + }); + }; + + $.fn.tagEditor.defaults = { + initialTags: [], + maxTags: 0, + maxLength: 50, + delimiter: ',;', + placeholder: '', + forceLowercase: true, + removeDuplicates: true, + clickDelete: false, + animateDelete: 175, + sortable: true, // jQuery UI sortable + autocomplete: null, // options dict for jQuery UI autocomplete + + // callbacks + onChange: function(){}, + beforeTagSave: function(){}, + beforeTagDelete: function(){} + }; +}(jQuery)); diff --git a/public/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css b/public/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css new file mode 100755 index 0000000..589b84a --- /dev/null +++ b/public/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css @@ -0,0 +1,10 @@ +/*! + * Bootstrap Colorpicker v2.5.2 + * https://itsjavi.com/bootstrap-colorpicker/ + * + * Originally written by (c) 2012 Stefan Petre + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0.txt + * + */.colorpicker-saturation{width:100px;height:100px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAQAAADa613fAAAP9klEQVR4XnRWC47rNgwcKjlA0bv2VL1Qi/YELRav7203iS1ppqZoiXCAhuBHVLI74xFtG3/Hz2joIOjRGuR5eMYuRn9YA1fds859KX8ZvczLr9/pImiR3Rqky9/wlajRIdVE/1Rufeu/0No3/ASgBZAJUkwgi0iCaEatekJJoEqiTQncd67/gyOfRCZshTed0Nl8LbLj8D6qxtoq9/7kJz/aH/3Xfu8VwI5+AUH8DxE7gUyiIpZ5LwiGzUqE3CScJsCDQHAsvBnxWpkbC0QMHmBp6latWS0bnvrCN/x1+xPfce+Ij0GAyeAGGz15sOiax2UylPhKrFaMPnVWClwepKh07hdhkVDsK2uoyEIySergjdbY2VBtV8VLr8Mf9mF/4wMb7kR8FOhzFWZZe7HIZD9JRIbee28eJKBweTB6TwjYkAgWaUmtDveGw1Wx3zZ76YlPPfQd/+gTTUFkiGiJ+NQAszU1EPT/QJEgufolAMPkNU4CVOyUIBLg4xglEZHGQnTFOFV0VaulYddBhA986ge/7N/yQi/3flFgwfQq2ibLnTDBRl9TmUHyJASPV/eoN0UISIr+ICQKIFV4EpljSjV1uFVUq9hRtet5e9gXvuyHPW0zMhQxWaoBBa9Tg8vsCEhww23Smd0CKjIkmPIoxWrUBDgJqFCyESF43ctQxLUoHN7Q1KyVhqrNNm3cy2vMyQNPVKjc29Rh5SSU+giWdRJHkLnQG71FQEuNyNGBTDdBQQAKCuGiEUS/jcyGbkMPq931OIzb/dUPGuVlG7f+slqkO5NAAlzTMdcq0NkzmsEBmAQkbI+pSHbiqnuWIA6lijhvqwIxMyWxMGZiPU669XJE1tADDTs2HWpwKxuqdnTpOiOR42xlzLtm3pXGel3xd8/oTs8Xy0MV8GM1RlsC2Y3Wy3wut3M+2mEVux0Gt9fhzTWyLvGiiJYaqY5DWRFIwAiQ5r6gB9GpQihJw4I9j5Mkscj3BnzGjBhv8xna5P1Jo428o6IOPY5KFZtVOkEKqUjqQY9Gi+jrIOFwJUDzRtA9xyoIrGGmkNRmxVAnZoK+TkUIeUYni5wEzgOG5iZX5HCr2JyQNqdk++G0rgb1ochSIGutTj4P7F0PuRUAolmh5sCzAHn1BYyaADh6bgFeoBx6vst091CEvcSLWBBpqGq384jZ5llVHSwEShLx+D4d0mU3D5eEAJQ9KEhOZUYnDENV2qKgmIlQhWfdvcoXYaegPp/n1oKIOgYFqxrzQSciqNhv/5FqPpy6b0UcX2vf13DfWySRSEgkEYlEJJGQSyKJSEQSCYlEEpHexIVO3XOevffze2a+PfPv9x1rne1c3b3Mmlmz9mE++zuzngfnw/E+Dlc4LL4NwHdFy7u3KGPVmZ6/4eeMoDyre3i/KHADIHYO04w9zO0mAotuKnrc7XaPjvu66bNe5cDT7RlPepEnfS2X8dF1/utDvD+OwGDBxEgQywLCvIMYWBY+DShwAAORAdv9PswhDAqOUCi5+71AbFcDMR4xBDNfhySKXPXZ1+Vub+Q1Ltf5z7eC0AjVldHI26rIFdKIAyYBJCFVUhVDwttAnM52B3Ect1TFQXzJ0z33lOuib/QO8g+CuO0gKBRU80A8hkeJ0b1KRQWmFQVSh8mf3lpUpNaRulzN5NArrmKKGMijXgzk7w5ijdFVgT8f1IdFNjVWjDWicUYWEEMmSFDtILdzHW5XueHp7p+yuS54ep5/c5BE2Gw/gWPNYU4/PZaak2VGEsFjSbOf8irea6KQgojGCk0KxZY31tWWgzwayF8N5KYyo3VADVicWWrhwzr3ZqIOa5xW5zbqMPPMiyDURHDIHQTeWq7KFXcQPOqzPOL5Ov/iIDEDy7DHEwx0PTgjO8SS0fOEHcZNMt+XKEFMj8Q4QUSvPu6HPuvd4N9/x12RPwcIVRCAakSOUzHgsUSMFWYzDQ+PiOJqAOuYc9jh5TecnA+xHfFyOYhebeTH89P80wrCJzUjlsx7euIV0g4zQFUSiBPioIWBACFC7GgDj8P91ZSJOQmQP74MAnQo8H5RIe8kZ0kBcQCMAlEpRDiKROBxbR0ksdhWFq0gR9q9uQzkDzuIFQSPqAgRCAsCaVNF2ZAAhxvtzcqcnDk6tpXxSsayqXLIgSOb6zqeH+fvO0i9XEu5EVV+OZehRZJ6BGTeaRhCkTzVIZeAzaWGAFfErIPogQI5CuR3HQQx7DzBB16R3s7e0MBUPedjWutgG/JUTPqMeAQNEiytJRnJearWUgdwFNxN7rtBoECuj/O3BMHaTIxQ0a4GctireElTJHJvLTaalih5kvBCGMvkdESUMAdCFaI4yG8SpDfRWAptqkAJUwCG6B7lOREFSZBqKs57MEHqVJEBwHa2lp0OiKtiQ18gx9P89QrSXyc0vObBM4vPmBADqJZLAo/yzK7qPSZstCy+fDSZlhrm+Zkyjsf5q2otdC14zkLjHLf0me9wjNqQo0B1a6wBJRaIEgC2Qw9oby/cRHA+xHCQy/xlB1HVSV3Y/5yVhsc7dBi2UoIWCMcbELZWgxNCGUZ5y4ceBaLlE8dAfrEosrYT+z8ya3sxXndFBxuQivNGEHFCbLGBlBLKGYHZoeoQpcjtMn/uICPefcxecpuDOEemg9S/44cflZPIlWolyHkLrEpgbS9IQRlAgZgi0WDjsEiPh+PN/Fkogq4GdzPtarlRGW2tJwEK1RMTEvdVdmhAKHO1pdUuGQsVcX+rSfGzDbwGyE8NRPQc83HCaOkTZwPqABZBdFq8zAN1gue0FPO8wYUFBE1WkMwVzM1iQ4BItFh+H36Qy/yJg0DRQICmBl+tbKUC5cCj3yXI+SUFBS78ZAcBtHt+e9lBuiqpTNh9zTvIjzuIWxVYGQJpAZY+VWS3QKh84iSZbwuIdiDpc4KztQa/sjhMaDJEJDSZ8mZ+kCBdC0JpKVNQzZdKu+EsOeFCosrngVAkDS/uy6iGnW7UxmMpkB8FyFKo6iQW8z1HuBdMu1pdkZdB8jWTjlFtNaiJRYniIDcD+eECMqFLS9ED6DgxzCMKnRD3HYYA2uMCJUh70OK8G0EUnJV8lqe8nj84QdqLhdoJskNlEw1ivajM8LtPBhIeN99LESXI9xcQIHFQudHngZjUhXOQeGlUYmAddh5pxMhzV0M1vMAtMFIVmfp6fq+DgEWefjQVenstaqUy3bJQAiVlEihDghCDINFQg8oUhoQPkO8SBEM7SFQ72VYBwPuE7k8uYF5LNwg/TEd2zkuKjIIhTiJRlYrDfNS1QL7DYUcbcCyKJNwOwucVCVSwBBj/DwghXA2hQtACgCBBPprfXkAIFIYRXhONQARFU00Tsh6LEmmQUbkTImMi9me5qaHDIeBgHeRbdxAIqAJBCDSoCNVQglrciqX/ZCD9RRP6rgpBvhmKAFhg2ForBLXBYPtUjj7vCHPe8SXbYAY47gHB9mKeqjjIg/53fmMD0fR9Bug7SFcHI6EA1OC/E8QTL4NgBSGiCiyTChnI1zcQxmyfRZGM6w701KRybDvsIK3LWDx6mxGkcglEZQLkawnCdppZ6sgCh8trWWBUQaUWCEOlOs7HAenFE45QSu9RQQDAqchXNxDq4orQR44qRIFUQvM+mRJuB6GDEixgCbSBQGXghEEbdn1P/zO/QhAWCsWsmRhLa2VFkSZIgSVKmgEQhvk6K8YKMRZl7Dwg4amOUYvFBfLlE4RasOCB5S9PXKq0AqGDMiYIReXF0mYctITWBmqR5F38X5Y7yJfeCtKBzNbWYm5XpsMpf3dRZD3jPDesvdVCOs6KYQXIFw1E4fcE8dHWOepZBXpLJcACWUZVMRZbfvgXR4Ak8A7VVSKSVuu9p6/mFxyE7cOWavtLp952O8huK83+gmHzHaAsVXLgAvl8gPCvHzAFsM8GNXGKPH5cmN02sXTLa8QdKRXMzHv67/k5A9k1UIx36UH/VlWWtuKssNiRapB6BaLXl6MA+ayDcNS3v/sYXgCL620F1kk8QhKAEOvKu4DvajDO5zkHc4fBg76anyEIIcamBPex5EK8AoVHhMW7QAqWrYD1204CJB1hCfOAV/PTBPH0zBmJmsZZKCEaAmdqm4zMcYxYLN0JuHThIAjirAnp3px7TRgD+ZSD/K92M1CNIgbC8Ex7FkSEIlQEEUQEQQQBRBABEUQQEQTx3X0Evap9AhP39jL5OvuzAWuvbDaTTDIzX2aypUCJ0i7nAigoQAk9gUIUSxXEoCFyyVIuL9ZQcMZoArnwr4D0OLS8jGNGTgGnsZQWMYrcOARoIReAALBeWhf+RUCAIEsECFQHLkwR5zj4JW3t5WOUU5djvgQIawD53EDsctmYz8xGaZGPBUR3qNkiGwqDICUYIFpqBgRaayCfFiAWR2wWvoobmzxdF8N5kyxXmvap/sgGcLF/aoBosbG+lE395R8zCA4BqUYgOgYq+HtvBrT0LK15X8lZwx5f9klCX0rdgXzIIGbdhXMqZtHzJhuptEjmsFc4KzmN5IFPtfM7gWw2kPczSIqQSPUDYKYBMamsBCpKphW0iA5H8AbMDPJOQYjLZg1Vk4G49GlCYNYAkdOd0kwRQ8FCyAHydgLZ6Z2AqrVtjDUQ7hCEmrkEooDAsB2YnBCvkBpZ6yBvJpCd7Mn5zJ6C4QF2BUQPgHEIGUrGnHzQ8rlMekBeTyAzwDJksxwM4+w3BY02B8mIl0CmFRm+ZscxAuSnvwqQsECTIGSV6FEoJFTygVuzB5xAsKqBvAQE3+nkVoJDI1BJIaPBWik7ZSu5NIp5A3mRQaTFvLgkO9fVgEgMqqeVfb+p55tijWH+Kea71ubq4v8Sl8089sZKbKEZNq+VUfISJJF7j79WrbYgS994ZEf+nIz0pNFRWqapSmK6P45i3OQuItIiPDyg6RnxZ4D0g+CFPxAzluoRsWsaA6I6JOqVWCisDvJ0BgHTzMSRgMi0vmi8R+sR6tg/XUh7kCc7kMRqSNkTBDx0OkAUegFcMazciBXNpm798R6klXap/WZz49TQwBHqEcj4oCToUPjUuP9lfxcbyKMAwT6bTf1qqIIQDl3i5oCERNmVm0wgW4A8BGRxMX3hWh8bEV5Rvfp4DS5F3djWH2ztDNWKW7OBjgjIwsDWaKRknJjqMsh9QCa1p608lLovFkBE969DYtYelSzwSRcg535vAsFeNU9SzRCYZb4LDmxmFQKkwYGM+5y/G7b1uxMIylLdyE5yxIyYsoXWhQIpzQhYPi3JkJoKkB9+BxD0OMuyOEBe36DgyPSrxscmATldgKj8PxrkA/kA5PYMgkrocwIQ6GSRGmF0VaNqBKQZ5FYDEZSDzFTzq9mBQjAayE1A+ryDTzcQZe0Ibbxj7EwpAmTrJwEimZR9CCPtODhzxuNtY19Zd2Lf/fjCTnEiDAOg62j1utb/dv9mZ/aHCj4AyOHbsW3/As0BTzIgeJU7AAAAAElFTkSuQmCC);cursor:crosshair;float:left}.colorpicker-saturation i{display:block;height:5px;width:5px;border:1px solid #000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:0;left:0;margin:-4px 0 0 -4px}.colorpicker-saturation i b{display:block;height:5px;width:5px;border:1px solid #fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-alpha,.colorpicker-hue{width:15px;height:100px;float:left;cursor:row-resize;margin-left:4px;margin-bottom:4px}.colorpicker-alpha i,.colorpicker-hue i{display:block;height:1px;background:#000;border-top:1px solid #fff;position:absolute;top:0;left:0;width:100%;margin-top:-1px}.colorpicker-hue{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABkCAMAAABw8qpSAAABLFBMVEXqFBb/ABH/ACL/ADH/AEH/AFD/AGD/AG7/AH7/AI3/AJ3/AKz/ALz/AMr/ANv/AOr/APr2AP/mAP/XAP/HAP+4AP+oAP+aAP+JAP97AP9rAP9cAP9MAP8+AP8tAP8fAP8PAP8BAv8AEP8AH/8AL/8APv8ATv8AXP8Abf8Ae/8Ai/8Amv8Aqv8AuP8Ayf8A1/8A5/8A9/8A//gA/+kA/9kA/8oA/7oA/6wA/5sA/40A/30A/24A/14A/1AA/z8A/zEA/yEA/xEB/wMN/wAd/wAs/wA8/wBK/wBb/wBp/wB5/wCI/wCY/wCm/wC3/wDF/wDV/wDk/wD1/wD/+gD/7AD/3AD/zAD/vgD/rQD/nwD/jgD/gAD/cAD/YgD/UQD/QwD/MgD/JAD/FAD4Eg42qAedAAAAh0lEQVR4XgXAg3EDAAAAwI9to7Zt27a1/w49BASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTS1tHXo1KVbj159+g0YNGTYiFFjxk2YNGXajFlz5i1YtGTZilVr1m3YtGXbjl179h04dOTYiVNnzl24dOXajVt37j149OTZi1dv3n349OXbj19//wOxE1dQ8reGAAAAAElFTkSuQmCC)}.colorpicker-alpha{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAABkCAQAAAAVxWkcAAABr0lEQVR4Xo2VwU0DQQxF7dmRuNIFlzlSAR3QAaXQQdIBJVABFXDcOVAAd67cjJLR07dkhcSrkZKfb/t7bG88rFo3B5gZPMNycItu2xloGV7MWHzM9zuzFWCkmA0nK6AszCUJDW6+mG6R03ncw5v8EMTEvZ2O3AliYjpslblc0RF9LmZYWxURU6aKytWZYsoWCAe+xwOZp1GsEukGiIkYxcQCHck99+gRgB7JncyIB5SGEhP3Yh5P6JwX+u6AnYot104d8DJT7uH7M9JH6OZbimj0vfMVaYnJIZFJDBW9kHlerL2C6JV4mSt7uuo2N57RxnZ+usQjn0R1jwBJBrNO3evJpVYUWsJ/E3UiXRlv24/7YZ04xmEdWlzcKS+B/eapeyMvFd2k0+hRk/T0AmTW8h69s2sjYMsdPntECiILhAeIMZAeH4QvUwfn6ijC0tTV+fT9ky8jM9nK2g7Ly1VjSpKYq6IvsAm7MtNu1orEqa/K3KNvgMFdhfquPfJmp2dbh0/8Gzb6Y22ViaNr6n5410zXdngVhbu6XqdOtWOuin5hjABGp4a2uotZ71MVCfwDBt2/v37yo6AAAAAASUVORK5CYII=);display:none}.colorpicker-alpha,.colorpicker-hue,.colorpicker-saturation{background-size:contain}.colorpicker{padding:4px;min-width:130px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;z-index:2500}.colorpicker:after,.colorpicker:before{display:table;content:"";line-height:0}.colorpicker:after{clear:both}.colorpicker:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:6px}.colorpicker:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.colorpicker div{position:relative}.colorpicker.colorpicker-with-alpha{min-width:140px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-color{height:10px;margin-top:5px;clear:both;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAABkCAQAAAAVxWkcAAABr0lEQVR4Xo2VwU0DQQxF7dmRuNIFlzlSAR3QAaXQQdIBJVABFXDcOVAAd67cjJLR07dkhcSrkZKfb/t7bG88rFo3B5gZPMNycItu2xloGV7MWHzM9zuzFWCkmA0nK6AszCUJDW6+mG6R03ncw5v8EMTEvZ2O3AliYjpslblc0RF9LmZYWxURU6aKytWZYsoWCAe+xwOZp1GsEukGiIkYxcQCHck99+gRgB7JncyIB5SGEhP3Yh5P6JwX+u6AnYot104d8DJT7uH7M9JH6OZbimj0vfMVaYnJIZFJDBW9kHlerL2C6JV4mSt7uuo2N57RxnZ+usQjn0R1jwBJBrNO3evJpVYUWsJ/E3UiXRlv24/7YZ04xmEdWlzcKS+B/eapeyMvFd2k0+hRk/T0AmTW8h69s2sjYMsdPntECiILhAeIMZAeH4QvUwfn6ijC0tTV+fT9ky8jM9nK2g7Ly1VjSpKYq6IvsAm7MtNu1orEqa/K3KNvgMFdhfquPfJmp2dbh0/8Gzb6Y22ViaNr6n5410zXdngVhbu6XqdOtWOuin5hjABGp4a2uotZ71MVCfwDBt2/v37yo6AAAAAASUVORK5CYII=);background-position:0 100%}.colorpicker-color div{height:10px}.colorpicker-selectors{display:none;height:10px;margin-top:5px;clear:both}.colorpicker-selectors i{cursor:pointer;float:left;height:10px;width:10px}.colorpicker-selectors i+i{margin-left:3px}.colorpicker-element .add-on i,.colorpicker-element .input-group-addon i{display:inline-block;cursor:pointer;height:16px;vertical-align:text-top;width:16px}.colorpicker.colorpicker-inline{position:relative;display:inline-block;float:none;z-index:auto}.colorpicker.colorpicker-horizontal{width:110px;min-width:110px;height:auto}.colorpicker.colorpicker-horizontal .colorpicker-saturation{margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-color{width:100px}.colorpicker.colorpicker-horizontal .colorpicker-alpha,.colorpicker.colorpicker-horizontal .colorpicker-hue{width:100px;height:15px;float:left;cursor:col-resize;margin-left:0;margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-alpha i,.colorpicker.colorpicker-horizontal .colorpicker-hue i{display:block;height:15px;background:#fff;position:absolute;top:0;left:0;width:1px;border:none;margin-top:0}.colorpicker.colorpicker-horizontal .colorpicker-hue{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAABCAMAAAAfBfuPAAABLFBMVEXqFBb/ABH/ACL/ADH/AEH/AFD/AGD/AG7/AH7/AI3/AJ3/AKz/ALz/AMr/ANv/AOr/APr2AP/mAP/XAP/HAP+4AP+oAP+aAP+JAP97AP9rAP9cAP9MAP8+AP8tAP8fAP8PAP8BAv8AEP8AH/8AL/8APv8ATv8AXP8Abf8Ae/8Ai/8Amv8Aqv8AuP8Ayf8A1/8A5/8A9/8A//gA/+kA/9kA/8oA/7oA/6wA/5sA/40A/30A/24A/14A/1AA/z8A/zEA/yEA/xEB/wMN/wAd/wAs/wA8/wBK/wBb/wBp/wB5/wCI/wCY/wCm/wC3/wDF/wDV/wDk/wD1/wD/+gD/7AD/3AD/zAD/vgD/rQD/nwD/jgD/gAD/cAD/YgD/UQD/QwD/MgD/JAD/FAD4Eg42qAedAAAAbUlEQVR4XgXAghEDsbxtlrZt27ax/w49ACAYQTGcICmaYTleECVZUTXdMC1Wm93hdLk9Xp8/EAyFI9FYPJFMpTPZXL5QLJUr1Vq90Wy1O91efzAcjSfT2XyxXK03293+cDydL9fb/fF8vT/f3x+LfRNXARMbCAAAAABJRU5ErkJggg==)}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAKCAQAAADoFTP1AAAB9ElEQVR4XoWTQW4VMRBEu9qWEimL7DhEMp8NF+ASnJJLcAQgE1bcgBUSkYKUuHCrZ9pjeqSU5Yn9LPu7umJQBIIv+k7vIOrtK66L4lmr3pVOrOv3otp619KZ0/KjdNI79L52Uo09FBQWrU0vfe5trezU+hLsoUKd3Repovte+0vbq/7Lj5XbaHECKasR9G4MPlbp+gzZxd6koPEJCkAYC5SjcOTAIIOK90Dja1IfIZ8Z+zAY9jm3b5Ia+MT5sFcqRJrR2AYYA8Kua5BzYRrFPNmD4PQMegGJMOffJJUsWiI3nCHZZjInNdffLWOufzbc3JaboCAVxwmnRHbhLSPwRJ4wU0BRSc6HkECYYVw95nMKgJOcylxrJttE5Ibzf9Xq9GPvP+WX3MiV/MGHfRu/SentRQrfG1GzsIrytdNXucSRKxQNIGHM9YhGFQJcdjNcBZvfJayuYe4Sia1CzwW+19mWOhe37HsxJWKwbu/jluEU15QzAQjAqCEbhMJc78GYV2E0kooHDubUImWkTOhGpgv8PoT8DJG/bzxna4BZ0eOFSOaLADGeSpFsg5AzeaDZIDQQXjZ4y/8ryfzUXBwdELRjTjCNvOeT0rNlrJz90vwy6N9pXXQEluX0inElpPWokSdiLCfiNJJjMKQ8Qsh8GEKQKMo/eiHrNbI9UksAAAAASUVORK5CYII=)}.colorpicker-right:before{left:auto;right:6px}.colorpicker-right:after{left:auto;right:7px}.colorpicker-no-arrow:before{border-right:0;border-left:0}.colorpicker-no-arrow:after{border-right:0;border-left:0}.colorpicker-alpha.colorpicker-visible,.colorpicker-hue.colorpicker-visible,.colorpicker-saturation.colorpicker-visible,.colorpicker-selectors.colorpicker-visible,.colorpicker.colorpicker-visible{display:block}.colorpicker-alpha.colorpicker-hidden,.colorpicker-hue.colorpicker-hidden,.colorpicker-saturation.colorpicker-hidden,.colorpicker-selectors.colorpicker-hidden,.colorpicker.colorpicker-hidden{display:none}.colorpicker-inline.colorpicker-visible{display:inline-block} +/*# sourceMappingURL=bootstrap-colorpicker.min.css.map */ \ No newline at end of file diff --git a/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png new file mode 100755 index 0000000..f831889 Binary files /dev/null and b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha-horizontal.png differ diff --git a/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha.png b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha.png new file mode 100755 index 0000000..2e53a30 Binary files /dev/null and b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/alpha.png differ diff --git a/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/hue-horizontal.png b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/hue-horizontal.png new file mode 100755 index 0000000..3dcd594 Binary files /dev/null and b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/hue-horizontal.png differ diff --git a/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png new file mode 100755 index 0000000..6f5ec2e Binary files /dev/null and b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/hue.png differ diff --git a/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/saturation.png b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/saturation.png new file mode 100755 index 0000000..170841c Binary files /dev/null and b/public/static/admin/plugins/bootstrap-colorpicker/img/bootstrap-colorpicker/saturation.png differ diff --git a/public/static/admin/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js b/public/static/admin/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js new file mode 100755 index 0000000..2d6217c --- /dev/null +++ b/public/static/admin/plugins/bootstrap-colorpicker/js/bootstrap-colorpicker.min.js @@ -0,0 +1,5 @@ +/*! + * Bootstrap Colorpicker v2.5.2 + * https://itsjavi.com/bootstrap-colorpicker/ + */ +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):jQuery&&!jQuery.fn.colorpicker&&b(jQuery)}(this,function(a){"use strict";var b=function(c,d,e,f,g){this.fallbackValue=e?"string"==typeof e?this.parse(e):e:null,this.fallbackFormat=f?f:"rgba",this.hexNumberSignPrefix=g===!0,this.value=this.fallbackValue,this.origFormat=null,this.predefinedColors=d?d:{},this.colors=a.extend({},b.webColors,this.predefinedColors),c&&("undefined"!=typeof c.h?this.value=c:this.setColor(String(c))),this.value||(this.value={h:0,s:0,b:0,a:1})};b.webColors={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32",transparent:"transparent"},b.prototype={constructor:b,colors:{},predefinedColors:{},getValue:function(){return this.value},setValue:function(a){this.value=a},_sanitizeNumber:function(a){return"number"==typeof a?a:isNaN(a)||null===a||""===a||void 0===a?1:""===a?0:"undefined"!=typeof a.toLowerCase?(a.match(/^\./)&&(a="0"+a),Math.ceil(100*parseFloat(a))/100):1},isTransparent:function(a){return!(!a||!("string"==typeof a||a instanceof String))&&(a=a.toLowerCase().trim(),"transparent"===a||a.match(/#?00000000/)||a.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(a){return 0===a.r&&0===a.g&&0===a.b&&0===a.a},setColor:function(a){if(a=a.toLowerCase().trim()){if(this.isTransparent(a))return this.value={h:0,s:0,b:0,a:0},!0;var b=this.parse(a);b?(this.value=this.value={h:b.h,s:b.s,b:b.b,a:b.a},this.origFormat||(this.origFormat=b.format)):this.fallbackValue&&(this.value=this.fallbackValue)}return!1},setHue:function(a){this.value.h=1-a},setSaturation:function(a){this.value.s=a},setBrightness:function(a){this.value.b=1-a},setAlpha:function(a){this.value.a=Math.round(parseInt(100*(1-a),10)/100*100)/100},toRGB:function(a,b,c,d){0===arguments.length&&(a=this.value.h,b=this.value.s,c=this.value.b,d=this.value.a),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-Math.abs(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],{r:Math.round(255*e),g:Math.round(255*f),b:Math.round(255*g),a:d}},toHex:function(a,b,c,d,e){arguments.length<=1&&(b=this.value.h,c=this.value.s,d=this.value.b,e=this.value.a);var f="#",g=this.toRGB(b,c,d,e);if(this.rgbaIsTransparent(g))return"transparent";a||(f=this.hexNumberSignPrefix?"#":"");var h=f+((1<<24)+(parseInt(g.r)<<16)+(parseInt(g.g)<<8)+parseInt(g.b)).toString(16).slice(1);return h},toHSL:function(a,b,c,d){0===arguments.length&&(a=this.value.h,b=this.value.s,c=this.value.b,d=this.value.a);var e=a,f=(2-b)*c,g=b*c;return g/=f>0&&f<=1?f:2-f,f/=2,g>1&&(g=1),{h:isNaN(e)?0:e,s:isNaN(g)?0:g,l:isNaN(f)?0:f,a:isNaN(d)?0:d}},toAlias:function(a,b,c,d){var e,f=0===arguments.length?this.toHex(!0):this.toHex(!0,a,b,c,d),g="alias"===this.origFormat?f:this.toString(!1,this.origFormat);for(var h in this.colors)if(e=this.colors[h].toLowerCase().trim(),e===f||e===g)return h;return!1},RGBtoHSB:function(a,b,c,d){a/=255,b/=255,c/=255;var e,f,g,h;return g=Math.max(a,b,c),h=g-Math.min(a,b,c),e=0===h?null:g===a?(b-c)/h:g===b?(c-a)/h+2:(a-b)/h+4,e=(e+360)%6*60/360,f=0===h?0:h/g,{h:this._sanitizeNumber(e),s:f,b:g,a:this._sanitizeNumber(d)}},HueToRGB:function(a,b,c){return c<0?c+=1:c>1&&(c-=1),6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a},HSLtoRGB:function(a,b,c,d){b<0&&(b=0);var e;e=c<=.5?c*(1+b):c+b-c*b;var f=2*c-e,g=a+1/3,h=a,i=a-1/3,j=Math.round(255*this.HueToRGB(f,e,g)),k=Math.round(255*this.HueToRGB(f,e,h)),l=Math.round(255*this.HueToRGB(f,e,i));return[j,k,l,this._sanitizeNumber(d)]},parse:function(b){if("string"!=typeof b)return this.fallbackValue;if(0===arguments.length)return!1;var c,d,e=this,f=!1,g="undefined"!=typeof this.colors[b];return g&&(b=this.colors[b].toLowerCase().trim()),a.each(this.stringParsers,function(a,h){var i=h.re.exec(b);return c=i&&h.parse.apply(e,[i]),!c||(f={},d=g?"alias":h.format?h.format:e.getValidFallbackFormat(),f=d.match(/hsla?/)?e.RGBtoHSB.apply(e,e.HSLtoRGB.apply(e,c)):e.RGBtoHSB.apply(e,c),f instanceof Object&&(f.format=d),!1)}),f},getValidFallbackFormat:function(){var a=["rgba","rgb","hex","hsla","hsl"];return this.origFormat&&a.indexOf(this.origFormat)!==-1?this.origFormat:this.fallbackFormat&&a.indexOf(this.fallbackFormat)!==-1?this.fallbackFormat:"rgba"},toString:function(a,c,d){c=c||this.origFormat||this.fallbackFormat,d=d||!1;var e=!1;switch(c){case"rgb":return e=this.toRGB(),this.rgbaIsTransparent(e)?"transparent":"rgb("+e.r+","+e.g+","+e.b+")";case"rgba":return e=this.toRGB(),"rgba("+e.r+","+e.g+","+e.b+","+e.a+")";case"hsl":return e=this.toHSL(),"hsl("+Math.round(360*e.h)+","+Math.round(100*e.s)+"%,"+Math.round(100*e.l)+"%)";case"hsla":return e=this.toHSL(),"hsla("+Math.round(360*e.h)+","+Math.round(100*e.s)+"%,"+Math.round(100*e.l)+"%,"+e.a+")";case"hex":return this.toHex(a);case"alias":return e=this.toAlias(),e===!1?this.toString(a,this.getValidFallbackFormat()):d&&!(e in b.webColors)&&e in this.predefinedColors?this.predefinedColors[e]:e;default:return e}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(a){return[a[1],a[2],a[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16),1]}}],colorNameToHex:function(a){return"undefined"!=typeof this.colors[a.toLowerCase()]&&this.colors[a.toLowerCase()]}};var c={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",fallbackColor:!1,fallbackFormat:"hex",hexNumberSignPrefix:!0,sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'"}},f.inherits(j,d),g.on(document,"mousedown",function(b){a(b)}),g.on(window,"scroll",function(b){a(b)})}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui.UIBase,c=baidu.editor.ui.Breakline=function(a){this.initOptions(a),this.initSeparator()};c.prototype={uiName:"Breakline",initSeparator:function(){this.initUIBase()},getHtmlTpl:function(){return"
    "}},a.inherits(c,b)}(),function(){var a=baidu.editor.utils,b=baidu.editor.dom.domUtils,c=baidu.editor.ui.UIBase,d=baidu.editor.ui.Message=function(a){this.initOptions(a),this.initMessage()};d.prototype={initMessage:function(){this.initUIBase()},getHtmlTpl:function(){return'
    ×
    '},reset:function(a){var b=this;a.keepshow||(clearTimeout(this.timer),b.timer=setTimeout(function(){b.hide()},a.timeout||4e3)),void 0!==a.content&&b.setContent(a.content),void 0!==a.type&&b.setType(a.type),b.show()},postRender:function(){var a=this,c=this.getDom("closer");c&&b.on(c,"click",function(){a.hide()})},setContent:function(a){this.getDom("content").innerHTML=a},setType:function(a){a=a||"info";var b=this.getDom("body");b.className=b.className.replace(/edui-message-type-[\w-]+/,"edui-message-type-"+a)},getContent:function(){return this.getDom("content").innerHTML},getType:function(){var a=this.getDom("body").match(/edui-message-type-([\w-]+)/);return a?a[1]:""},show:function(){this.getDom().style.display="block"},hide:function(){var a=this.getDom();a&&(a.style.display="none",a.parentNode&&a.parentNode.removeChild(a))}},a.inherits(d,c)}(),function(){var a=baidu.editor.utils,b=baidu.editor.ui,c=b.Dialog;b.buttons={},b.Dialog=function(a){var b=new c(a);return b.addListener("hide",function(){if(b.editor){var a=b.editor;try{if(browser.gecko){var c=a.window.scrollY,d=a.window.scrollX;a.body.focus(),a.window.scrollTo(d,c)}else a.focus()}catch(e){}}}),b};for(var d,e={anchor:"~/dialogs/anchor/anchor.html",insertimage:"~/dialogs/image/image.html",link:"~/dialogs/link/link.html",spechars:"~/dialogs/spechars/spechars.html",searchreplace:"~/dialogs/searchreplace/searchreplace.html",map:"~/dialogs/map/map.html",gmap:"~/dialogs/gmap/gmap.html",insertvideo:"~/dialogs/video/video.html",help:"~/dialogs/help/help.html",preview:"~/dialogs/preview/preview.html",emotion:"~/dialogs/emotion/emotion.html",wordimage:"~/dialogs/wordimage/wordimage.html",attachment:"~/dialogs/attachment/attachment.html",insertframe:"~/dialogs/insertframe/insertframe.html",edittip:"~/dialogs/table/edittip.html",edittable:"~/dialogs/table/edittable.html",edittd:"~/dialogs/table/edittd.html",webapp:"~/dialogs/webapp/webapp.html",snapscreen:"~/dialogs/snapscreen/snapscreen.html",scrawl:"~/dialogs/scrawl/scrawl.html",music:"~/dialogs/music/music.html",template:"~/dialogs/template/template.html",background:"~/dialogs/background/background.html",charts:"~/dialogs/charts/charts.html"},f=["undo","redo","formatmatch","bold","italic","underline","fontborder","touppercase","tolowercase","strikethrough","subscript","superscript","source","indent","outdent","blockquote","pasteplain","pagebreak","selectall","print","horizontal","removeformat","time","date","unlink","insertparagraphbeforetable","insertrow","insertcol","mergeright","mergedown","deleterow","deletecol","splittorows","splittocols","splittocells","mergecells","deletetable","drafts"],g=0;d=f[g++];)d=d.toLowerCase(),b[d]=function(a){return function(c){var d=new b.Button({className:"edui-for-"+a,title:c.options.labelMap[a]||c.getLang("labelMap."+a)||"",onclick:function(){c.execCommand(a)},theme:c.options.theme,showText:!1});return b.buttons[a]=d,c.addListener("selectionchange",function(b,e,f){var g=c.queryCommandState(a);g==-1?(d.setDisabled(!0),d.setChecked(!1)):f||(d.setDisabled(!1),d.setChecked(g))}),d}}(d);b.cleardoc=function(a){var c=new b.Button({className:"edui-for-cleardoc",title:a.options.labelMap.cleardoc||a.getLang("labelMap.cleardoc")||"",theme:a.options.theme,onclick:function(){confirm(a.getLang("confirmClear"))&&a.execCommand("cleardoc")}});return b.buttons.cleardoc=c,a.addListener("selectionchange",function(){c.setDisabled(a.queryCommandState("cleardoc")==-1)}),c};var h={justify:["left","right","center","justify"],imagefloat:["none","left","center","right"],directionality:["ltr","rtl"]};for(var i in h)!function(a,c){for(var d,e=0;d=c[e++];)!function(c){b[a.replace("float","")+c]=function(d){var e=new b.Button({ +className:"edui-for-"+a.replace("float","")+c,title:d.options.labelMap[a.replace("float","")+c]||d.getLang("labelMap."+a.replace("float","")+c)||"",theme:d.options.theme,onclick:function(){d.execCommand(a,c)}});return b.buttons[a]=e,d.addListener("selectionchange",function(b,f,g){e.setDisabled(d.queryCommandState(a)==-1),e.setChecked(d.queryCommandValue(a)==c&&!g)}),e}}(d)}(i,h[i]);for(var d,g=0;d=["backcolor","forecolor"][g++];)b[d]=function(a){return function(c){var d=new b.ColorButton({className:"edui-for-"+a,color:"default",title:c.options.labelMap[a]||c.getLang("labelMap."+a)||"",editor:c,onpickcolor:function(b,d){c.execCommand(a,d)},onpicknocolor:function(){c.execCommand(a,"default"),this.setColor("transparent"),this.color="default"},onbuttonclick:function(){c.execCommand(a,this.color)}});return b.buttons[a]=d,c.addListener("selectionchange",function(){d.setDisabled(c.queryCommandState(a)==-1)}),d}}(d);var j={noOk:["searchreplace","help","spechars","webapp","preview"],ok:["attachment","anchor","link","insertimage","map","gmap","insertframe","wordimage","insertvideo","insertframe","edittip","edittable","edittd","scrawl","template","music","background","charts"]};for(var i in j)!function(c,d){for(var f,g=0;f=d[g++];)browser.opera&&"searchreplace"===f||!function(d){b[d]=function(f,g,h){g=g||(f.options.iframeUrlMap||{})[d]||e[d],h=f.options.labelMap[d]||f.getLang("labelMap."+d)||"";var i;g&&(i=new b.Dialog(a.extend({iframeUrl:f.ui.mapUrl(g),editor:f,className:"edui-for-"+d,title:h,holdScroll:"insertimage"===d,fullscreen:/charts|preview/.test(d),closeDialog:f.getLang("closeDialog")},"ok"==c?{buttons:[{className:"edui-okbutton",label:f.getLang("ok"),editor:f,onclick:function(){i.close(!0)}},{className:"edui-cancelbutton",label:f.getLang("cancel"),editor:f,onclick:function(){i.close(!1)}}]}:{})),f.ui._dialogs[d+"Dialog"]=i);var j=new b.Button({className:"edui-for-"+d,title:h,onclick:function(){if(i)switch(d){case"wordimage":var a=f.execCommand("wordimage");a&&a.length&&(i.render(),i.open());break;case"scrawl":f.queryCommandState("scrawl")!=-1&&(i.render(),i.open());break;default:i.render(),i.open()}},theme:f.options.theme,disabled:"scrawl"==d&&f.queryCommandState("scrawl")==-1||"charts"==d});return b.buttons[d]=j,f.addListener("selectionchange",function(){var a={edittable:1};if(!(d in a)){var b=f.queryCommandState(d);j.getDom()&&(j.setDisabled(b==-1),j.setChecked(b))}}),j}}(f.toLowerCase())}(i,j[i]);b.snapscreen=function(a,c,d){d=a.options.labelMap.snapscreen||a.getLang("labelMap.snapscreen")||"";var f=new b.Button({className:"edui-for-snapscreen",title:d,onclick:function(){a.execCommand("snapscreen")},theme:a.options.theme});if(b.buttons.snapscreen=f,c=c||(a.options.iframeUrlMap||{}).snapscreen||e.snapscreen){var g=new b.Dialog({iframeUrl:a.ui.mapUrl(c),editor:a,className:"edui-for-snapscreen",title:d,buttons:[{className:"edui-okbutton",label:a.getLang("ok"),editor:a,onclick:function(){g.close(!0)}},{className:"edui-cancelbutton",label:a.getLang("cancel"),editor:a,onclick:function(){g.close(!1)}}]});g.render(),a.ui._dialogs.snapscreenDialog=g}return a.addListener("selectionchange",function(){f.setDisabled(a.queryCommandState("snapscreen")==-1)}),f},b.insertcode=function(c,d,e){d=c.options.insertcode||[],e=c.options.labelMap.insertcode||c.getLang("labelMap.insertcode")||"";var f=[];a.each(d,function(a,b){f.push({label:a,value:b,theme:c.options.theme,renderLabelHtml:function(){return'
    '+(this.label||"")+"
    "}})});var g=new b.Combox({editor:c,items:f,onselect:function(a,b){c.execCommand("insertcode",this.items[b].value)},onbuttonclick:function(){this.showPopup()},title:e,initValue:e,className:"edui-for-insertcode",indexByValue:function(a){if(a)for(var b,c=0;b=this.items[c];c++)if(b.value.indexOf(a)!=-1)return c;return-1}});return b.buttons.insertcode=g,c.addListener("selectionchange",function(a,b,d){if(!d){var f=c.queryCommandState("insertcode");if(f==-1)g.setDisabled(!0);else{g.setDisabled(!1);var h=c.queryCommandValue("insertcode");if(!h)return void g.setValue(e);h&&(h=h.replace(/['"]/g,"").split(",")[0]),g.setValue(h)}}}),g},b.fontfamily=function(c,d,e){if(d=c.options.fontfamily||[],e=c.options.labelMap.fontfamily||c.getLang("labelMap.fontfamily")||"",d.length){for(var f,g=0,h=[];f=d[g];g++){var i=c.getLang("fontfamily")[f.name]||"";!function(b,d){h.push({label:b,value:d,theme:c.options.theme,renderLabelHtml:function(){return'
    '+(this.label||"")+"
    "}})}(f.label||i,f.val)}var j=new b.Combox({editor:c,items:h,onselect:function(a,b){c.execCommand("FontFamily",this.items[b].value)},onbuttonclick:function(){this.showPopup()},title:e,initValue:e,className:"edui-for-fontfamily",indexByValue:function(a){if(a)for(var b,c=0;b=this.items[c];c++)if(b.value.indexOf(a)!=-1)return c;return-1}});return b.buttons.fontfamily=j,c.addListener("selectionchange",function(a,b,d){if(!d){var e=c.queryCommandState("FontFamily");if(e==-1)j.setDisabled(!0);else{j.setDisabled(!1);var f=c.queryCommandValue("FontFamily");f&&(f=f.replace(/['"]/g,"").split(",")[0]),j.setValue(f)}}}),j}},b.fontsize=function(a,c,d){if(d=a.options.labelMap.fontsize||a.getLang("labelMap.fontsize")||"",c=c||a.options.fontsize||[],c.length){for(var e=[],f=0;f'+(this.label||"")+""}})}var h=new b.Combox({editor:a,items:e,title:d,initValue:d,onselect:function(b,c){a.execCommand("FontSize",this.items[c].value)},onbuttonclick:function(){this.showPopup()},className:"edui-for-fontsize"});return b.buttons.fontsize=h,a.addListener("selectionchange",function(b,c,d){if(!d){var e=a.queryCommandState("FontSize");e==-1?h.setDisabled(!0):(h.setDisabled(!1),h.setValue(a.queryCommandValue("FontSize")))}}),h}},b.paragraph=function(c,d,e){if(e=c.options.labelMap.paragraph||c.getLang("labelMap.paragraph")||"",d=c.options.paragraph||[],!a.isEmptyObject(d)){var f=[];for(var g in d)f.push({value:g,label:d[g]||c.getLang("paragraph")[g],theme:c.options.theme,renderLabelHtml:function(){return'
    '+(this.label||"")+"
    "}});var h=new b.Combox({editor:c,items:f,title:e,initValue:e,className:"edui-for-paragraph",onselect:function(a,b){c.execCommand("Paragraph",this.items[b].value)},onbuttonclick:function(){this.showPopup()}});return b.buttons.paragraph=h,c.addListener("selectionchange",function(a,b,d){if(!d){var e=c.queryCommandState("Paragraph");if(e==-1)h.setDisabled(!0);else{h.setDisabled(!1);var f=c.queryCommandValue("Paragraph"),g=h.indexByValue(f);g!=-1?h.setValue(f):h.setValue(h.initValue)}}}),h}},b.customstyle=function(a){var c=a.options.customstyle||[],d=a.options.labelMap.customstyle||a.getLang("labelMap.customstyle")||"";if(c.length){for(var e,f=a.getLang("customstyle"),g=0,h=[];e=c[g++];)!function(b){var c={};c.label=b.label?b.label:f[b.name],c.style=b.style,c.className=b.className,c.tag=b.tag,h.push({label:c.label,value:c,theme:a.options.theme,renderLabelHtml:function(){return'
    <'+c.tag+" "+(c.className?' class="'+c.className+'"':"")+(c.style?' style="'+c.style+'"':"")+">"+c.label+"
    "}})}(e);var i=new b.Combox({editor:a,items:h,title:d,initValue:d,className:"edui-for-customstyle",onselect:function(b,c){a.execCommand("customstyle",this.items[c].value)},onbuttonclick:function(){this.showPopup()},indexByValue:function(a){for(var b,c=0;b=this.items[c++];)if(b.label==a)return c-1;return-1}});return b.buttons.customstyle=i,a.addListener("selectionchange",function(b,c,d){if(!d){var e=a.queryCommandState("customstyle");if(e==-1)i.setDisabled(!0);else{i.setDisabled(!1);var f=a.queryCommandValue("customstyle"),g=i.indexByValue(f);g!=-1?i.setValue(f):i.setValue(i.initValue)}}}),i}},b.inserttable=function(a,c,d){d=a.options.labelMap.inserttable||a.getLang("labelMap.inserttable")||"";var e=new b.TableButton({editor:a,title:d,className:"edui-for-inserttable",onpicktable:function(b,c,d){a.execCommand("InsertTable",{numRows:d,numCols:c,border:1})},onbuttonclick:function(){this.showPopup()}});return b.buttons.inserttable=e,a.addListener("selectionchange",function(){e.setDisabled(a.queryCommandState("inserttable")==-1)}),e},b.lineheight=function(a){var c=a.options.lineheight||[];if(c.length){for(var d,e=0,f=[];d=c[e++];)f.push({label:d,value:d,theme:a.options.theme,onclick:function(){a.execCommand("lineheight",this.value)}});var g=new b.MenuButton({editor:a,className:"edui-for-lineheight",title:a.options.labelMap.lineheight||a.getLang("labelMap.lineheight")||"",items:f,onbuttonclick:function(){var b=a.queryCommandValue("LineHeight")||this.value;a.execCommand("LineHeight",b)}});return b.buttons.lineheight=g,a.addListener("selectionchange",function(){var b=a.queryCommandState("LineHeight");if(b==-1)g.setDisabled(!0);else{g.setDisabled(!1);var c=a.queryCommandValue("LineHeight");c&&g.setValue((c+"").replace(/cm/,"")),g.setChecked(b)}}),g}};for(var k,l=["top","bottom"],m=0;k=l[m++];)!function(a){b["rowspacing"+a]=function(c){var d=c.options["rowspacing"+a]||[];if(!d.length)return null;for(var e,f=0,g=[];e=d[f++];)g.push({label:e,value:e,theme:c.options.theme,onclick:function(){c.execCommand("rowspacing",this.value,a)}});var h=new b.MenuButton({editor:c,className:"edui-for-rowspacing"+a,title:c.options.labelMap["rowspacing"+a]||c.getLang("labelMap.rowspacing"+a)||"",items:g,onbuttonclick:function(){var b=c.queryCommandValue("rowspacing",a)||this.value;c.execCommand("rowspacing",b,a)}});return b.buttons[a]=h,c.addListener("selectionchange",function(){var b=c.queryCommandState("rowspacing",a);if(b==-1)h.setDisabled(!0);else{h.setDisabled(!1);var d=c.queryCommandValue("rowspacing",a);d&&h.setValue((d+"").replace(/%/,"")),h.setChecked(b)}}),h}}(k);for(var n,o=["insertorderedlist","insertunorderedlist"],p=0;n=o[p++];)!function(a){b[a]=function(c){var d=c.options[a],e=function(){c.execCommand(a,this.value)},f=[];for(var g in d)f.push({label:d[g]||c.getLang()[a][g]||"",value:g,theme:c.options.theme,onclick:e});var h=new b.MenuButton({editor:c,className:"edui-for-"+a,title:c.getLang("labelMap."+a)||"",items:f,onbuttonclick:function(){var b=c.queryCommandValue(a)||this.value;c.execCommand(a,b)}});return b.buttons[a]=h,c.addListener("selectionchange",function(){var b=c.queryCommandState(a);if(b==-1)h.setDisabled(!0);else{h.setDisabled(!1);var d=c.queryCommandValue(a);h.setValue(d),h.setChecked(b)}}),h}}(n);b.fullscreen=function(a,c){c=a.options.labelMap.fullscreen||a.getLang("labelMap.fullscreen")||"";var d=new b.Button({className:"edui-for-fullscreen",title:c,theme:a.options.theme,onclick:function(){a.ui&&a.ui.setFullScreen(!a.ui.isFullScreen()),this.setChecked(a.ui.isFullScreen())}});return b.buttons.fullscreen=d,a.addListener("selectionchange",function(){var b=a.queryCommandState("fullscreen");d.setDisabled(b==-1),d.setChecked(a.ui.isFullScreen())}),d},b.emotion=function(a,c){var d="emotion",f=new b.MultiMenuPop({title:a.options.labelMap[d]||a.getLang("labelMap."+d)||"",editor:a,className:"edui-for-"+d,iframeUrl:a.ui.mapUrl(c||(a.options.iframeUrlMap||{})[d]||e[d])});return b.buttons[d]=f,a.addListener("selectionchange",function(){f.setDisabled(a.queryCommandState(d)==-1)}),f},b.autotypeset=function(a){var c=new b.AutoTypeSetButton({editor:a,title:a.options.labelMap.autotypeset||a.getLang("labelMap.autotypeset")||"",className:"edui-for-autotypeset",onbuttonclick:function(){a.execCommand("autotypeset")}});return b.buttons.autotypeset=c,a.addListener("selectionchange",function(){c.setDisabled(a.queryCommandState("autotypeset")==-1)}),c},b.simpleupload=function(a){var c="simpleupload",d=new b.Button({className:"edui-for-"+c,title:a.options.labelMap[c]||a.getLang("labelMap."+c)||"",onclick:function(){},theme:a.options.theme,showText:!1});return b.buttons[c]=d,a.addListener("ready",function(){var b=d.getDom("body"),c=b.children[0];a.fireEvent("simpleuploadbtnready",c)}),a.addListener("selectionchange",function(b,e,f){var g=a.queryCommandState(c);g==-1?(d.setDisabled(!0),d.setChecked(!1)):f||(d.setDisabled(!1),d.setChecked(g))}),d}}(),function(){function a(a){this.initOptions(a),this.initEditorUI()}var b=baidu.editor.utils,c=baidu.editor.ui.uiUtils,d=baidu.editor.ui.UIBase,e=baidu.editor.dom.domUtils,f=[];a.prototype={uiName:"editor",initEditorUI:function(){function a(a,b){a.setOpt({wordCount:!0,maximumWords:1e4,wordCountMsg:a.options.wordCountMsg||a.getLang("wordCountMsg"),wordOverFlowMsg:a.options.wordOverFlowMsg||a.getLang("wordOverFlowMsg")});var c=a.options,d=c.maximumWords,e=c.wordCountMsg,f=c.wordOverFlowMsg,g=b.getDom("wordcount");if(c.wordCount){var h=a.getContentLength(!0);h>d?(g.innerHTML=f,a.fireEvent("wordcountoverflow")):g.innerHTML=e.replace("{#leave}",d-h).replace("{#count}",h)}}this.editor.ui=this,this._dialogs={},this.initUIBase(),this._initToolbars();var b=this.editor,c=this;b.addListener("ready",function(){function d(){a(b,c),e.un(b.document,"click",arguments.callee)}b.getDialog=function(a){return b.ui._dialogs[a+"Dialog"]},e.on(b.window,"scroll",function(a){baidu.editor.ui.Popup.postHide(a)}),b.ui._actualFrameWidth=b.options.initialFrameWidth,UE.browser.ie&&6===UE.browser.version&&b.container.ownerDocument.execCommand("BackgroundImageCache",!1,!0),b.options.elementPathEnabled&&(b.ui.getDom("elementpath").innerHTML='
    '+b.getLang("elementPathTip")+":
    "),b.options.wordCount&&(e.on(b.document,"click",d),b.ui.getDom("wordcount").innerHTML=b.getLang("wordCountTip")),b.ui._scale(),b.options.scaleEnabled?(b.autoHeightEnabled&&b.disableAutoHeight(),c.enableScale()):c.disableScale(),b.options.elementPathEnabled||b.options.wordCount||b.options.scaleEnabled||(b.ui.getDom("elementpath").style.display="none",b.ui.getDom("wordcount").style.display="none",b.ui.getDom("scale").style.display="none"),b.selection.isFocus()&&b.fireEvent("selectionchange",!1,!0)}),b.addListener("mousedown",function(a,b){var c=b.target||b.srcElement;baidu.editor.ui.Popup.postHide(b,c),baidu.editor.ui.ShortCutMenu.postHide(b)}),b.addListener("delcells",function(){UE.ui.edittip&&new UE.ui.edittip(b),b.getDialog("edittip").open()});var d,f,g=!1;b.addListener("afterpaste",function(){b.queryCommandState("pasteplain")||(baidu.editor.ui.PastePicker&&(d=new baidu.editor.ui.Popup({content:new baidu.editor.ui.PastePicker({editor:b}),editor:b,className:"edui-wordpastepop"}),d.render()),g=!0)}),b.addListener("afterinserthtml",function(){clearTimeout(f),f=setTimeout(function(){if(d&&(g||b.ui._isTransfer)){if(d.isHidden()){var a=e.createElement(b.document,"span",{style:"line-height:0px;",innerHTML:"\ufeff"}),c=b.selection.getRange();c.insertNode(a);var f=getDomNode(a,"firstChild","previousSibling");f&&d.showAnchor(3==f.nodeType?f.parentNode:f),e.remove(a)}else d.show();delete b.ui._isTransfer,g=!1}},200)}),b.addListener("contextmenu",function(a,b){baidu.editor.ui.Popup.postHide(b)}),b.addListener("keydown",function(a,b){d&&d.dispose(b);var c=b.keyCode||b.which;b.altKey&&90==c&&UE.ui.buttons.fullscreen.onclick()}),b.addListener("wordcount",function(b){a(this,c)}),b.addListener("selectionchange",function(){b.options.elementPathEnabled&&c[(b.queryCommandState("elementpath")==-1?"dis":"en")+"ableElementPath"](),b.options.scaleEnabled&&c[(b.queryCommandState("scale")==-1?"dis":"en")+"ableScale"]()});var h=new baidu.editor.ui.Popup({editor:b,content:"",className:"edui-bubble",_onEditButtonClick:function(){this.hide(),b.ui._dialogs.linkDialog.open()},_onImgEditButtonClick:function(a){this.hide(),b.ui._dialogs[a]&&b.ui._dialogs[a].open()},_onImgSetFloat:function(a){this.hide(),b.execCommand("imagefloat",a)},_setIframeAlign:function(a){var b=h.anchorEl,c=b.cloneNode(!0);switch(a){case-2:c.setAttribute("align","");break;case-1:c.setAttribute("align","left");break;case 1:c.setAttribute("align","right")}b.parentNode.insertBefore(c,b),e.remove(b),h.anchorEl=c,h.showAnchor(h.anchorEl)},_updateIframe:function(){var a=b._iframe=h.anchorEl;e.hasClass(a,"ueditor_baidumap")?(b.selection.getRange().selectNode(a).select(),b.ui._dialogs.mapDialog.open(),h.hide()):(b.ui._dialogs.insertframeDialog.open(),h.hide())},_onRemoveButtonClick:function(a){b.execCommand(a),this.hide()},queryAutoHide:function(a){return a&&a.ownerDocument==b.document&&("img"==a.tagName.toLowerCase()||e.findParentByTagName(a,"a",!0))?a!==h.anchorEl:baidu.editor.ui.Popup.prototype.queryAutoHide.call(this,a)}});h.render(),b.options.imagePopup&&(b.addListener("mouseover",function(a,c){c=c||window.event;var d=c.target||c.srcElement;if(b.ui._dialogs.insertframeDialog&&/iframe/gi.test(d.tagName)){var e=h.formatHtml(""+b.getLang("property")+': '+b.getLang("default")+'  '+b.getLang("justifyleft")+'  '+b.getLang("justifyright")+'   '+b.getLang("modify")+"");e?(h.getDom("content").innerHTML=e,h.anchorEl=d,h.showAnchor(h.anchorEl)):h.hide()}}),b.addListener("selectionchange",function(a,c){if(c){var d="",f="",g=b.selection.getRange().getClosedNode(),i=b.ui._dialogs;if(g&&"IMG"==g.tagName){var j="insertimageDialog";if(g.className.indexOf("edui-faked-video")==-1&&g.className.indexOf("edui-upload-video")==-1||(j="insertvideoDialog"),g.className.indexOf("edui-faked-webapp")!=-1&&(j="webappDialog"),g.src.indexOf("http://api.map.baidu.com")!=-1&&(j="mapDialog"),g.className.indexOf("edui-faked-music")!=-1&&(j="musicDialog"),g.src.indexOf("http://maps.google.com/maps/api/staticmap")!=-1&&(j="gmapDialog"),g.getAttribute("anchorname")&&(j="anchorDialog",d=h.formatHtml(""+b.getLang("property")+': '+b.getLang("modify")+"  "+b.getLang("delete")+"")),g.getAttribute("word_img")&&(b.word_img=[g.getAttribute("word_img")],j="wordimageDialog"),(e.hasClass(g,"loadingclass")||e.hasClass(g,"loaderrorclass"))&&(j=""),!i[j])return;f=""+b.getLang("property")+': '+b.getLang("default")+'  '+b.getLang("justifyleft")+'  '+b.getLang("justifyright")+'  '+b.getLang("justifycenter")+"  '+b.getLang("modify")+"",!d&&(d=h.formatHtml(f))}if(b.ui._dialogs.linkDialog){var k,l=b.queryCommandValue("link");if(l&&(k=l.getAttribute("_href")||l.getAttribute("href",2))){var m=k;k.length>30&&(m=k.substring(0,20)+"..."),d&&(d+='
    '),d+=h.formatHtml(""+b.getLang("anthorMsg")+': '+m+' '+b.getLang("modify")+' '+b.getLang("clear")+""),h.showAnchor(l)}}d?(h.getDom("content").innerHTML=d,h.anchorEl=g||l,h.showAnchor(h.anchorEl)):h.hide()}}))},_initToolbars:function(){for(var a=this.editor,c=this.toolbars||[],d=[],e=0;e
    '+(this.toolbars.length?'
    '+this.renderToolbarBoxHtml()+"
    ":"")+'
    '},showWordImageDialog:function(){this._dialogs.wordimageDialog.open()},renderToolbarBoxHtml:function(){for(var a=[],b=0;b'+c+"");b.innerHTML='
    '+this.editor.getLang("elementPathTip")+": "+d.join(" > ")+"
    "}else b.style.display="none"},disableElementPath:function(){var a=this.getDom("elementpath");a.innerHTML="",a.style.display="none",this.elementPathEnabled=!1},enableElementPath:function(){var a=this.getDom("elementpath");a.style.display="",this.elementPathEnabled=!0,this._updateElementPath()},_scale:function(){function a(){o=e.getXY(h),p||(p=g.options.minFrameHeight+j.offsetHeight+k.offsetHeight),m.style.cssText="position:absolute;left:0;display:;top:0;background-color:#41ABFF;opacity:0.4;filter: Alpha(opacity=40);width:"+h.offsetWidth+"px;height:"+h.offsetHeight+"px;z-index:"+(g.options.zIndex+1),e.on(f,"mousemove",b),e.on(i,"mouseup",c),e.on(f,"mouseup",c)}function b(a){d();var b=a||window.event;r=b.pageX||f.documentElement.scrollLeft+b.clientX,s=b.pageY||f.documentElement.scrollTop+b.clientY,t=r-o.x,u=s-o.y,t>=q&&(n=!0,m.style.width=t+"px"),u>=p&&(n=!0,m.style.height=u+"px")}function c(){n&&(n=!1,g.ui._actualFrameWidth=m.offsetWidth-2,h.style.width=g.ui._actualFrameWidth+"px",g.setHeight(m.offsetHeight-k.offsetHeight-j.offsetHeight-2,!0)),m&&(m.style.display="none"),d(),e.un(f,"mousemove",b),e.un(i,"mouseup",c),e.un(f,"mouseup",c)}function d(){browser.ie?f.selection.clear():window.getSelection().removeAllRanges()}var f=document,g=this.editor,h=g.container,i=g.document,j=this.getDom("toolbarbox"),k=this.getDom("bottombar"),l=this.getDom("scale"),m=this.getDom("scalelayer"),n=!1,o=null,p=0,q=g.options.minFrameWidth,r=0,s=0,t=0,u=0,v=this;this.editor.addListener("fullscreenchanged",function(a,b){if(b)v.disableScale();else if(v.editor.options.scaleEnabled){v.enableScale();var c=v.editor.document.createElement("span");v.editor.body.appendChild(c),v.editor.body.style.height=Math.max(e.getXY(c).y,v.editor.iframe.offsetHeight-20)+"px",e.remove(c)}}),this.enableScale=function(){1!=g.queryCommandState("source")&&(l.style.display="",this.scaleEnabled=!0,e.on(l,"mousedown",a))},this.disableScale=function(){l.style.display="none",this.scaleEnabled=!1,e.un(l,"mousedown",a)}},isFullScreen:function(){return this._fullscreen},postRender:function(){d.prototype.postRender.call(this);for(var a=0;a[\n\r\t]+([ ]{4})+/g,">").replace(/[\n\r\t]+([ ]{4})+[\n\r\t]+<"),c.className&&(b.className=c.className),c.style.cssText&&(b.style.cssText=c.style.cssText),/textarea/i.test(c.tagName)?(d.textarea=c,d.textarea.style.display="none"):c.parentNode.removeChild(c),c.id&&(b.id=c.id,e.removeAttributes(c,"id")),c=b,c.innerHTML=""}e.addClass(c,"edui-"+d.options.theme),d.ui.render(c);var h=d.options;d.container=d.ui.getDom();for(var i,j=e.findParents(c,!0),k=[],l=0;i=j[l];l++)k[l]=i.style.display,i.style.display="block";if(h.initialFrameWidth)h.minFrameWidth=h.initialFrameWidth;else{h.minFrameWidth=h.initialFrameWidth=c.offsetWidth;var m=c.style.width;/%$/.test(m)&&(h.initialFrameWidth=m)}h.initialFrameHeight?h.minFrameHeight=h.initialFrameHeight:h.initialFrameHeight=h.minFrameHeight=c.offsetHeight;for(var i,l=0;i=j[l];l++)i.style.display=k[l];c.style.height&&(c.style.height=""),d.container.style.width=h.initialFrameWidth+(/%$/.test(h.initialFrameWidth)?"":"px"),d.container.style.zIndex=h.zIndex,f.call(d,d.ui.getDom("iframeholder")),d.fireEvent("afteruiready")}d.langIsReady?b():d.addListener("langReady",b)})},d},UE.getEditor=function(a,b){var c=g[a];return c||(c=g[a]=new UE.ui.Editor(b),c.render(a)),c},UE.delEditor=function(a){var b;(b=g[a])&&(b.key&&b.destroy(),delete g[a])},UE.registerUI=function(a,c,d,e){b.each(a.split(/\s+/),function(a){UE._customizeUI[a]={id:e,execFn:c,index:d}})}}(),UE.registerUI("message",function(a){function b(){var a=g.ui.getDom("toolbarbox");a&&(c.style.top=a.offsetHeight+3+"px"),c.style.zIndex=Math.max(g.options.zIndex,g.iframe.style.zIndex)+1}var c,d=baidu.editor.ui,e=d.Message,f=[],g=a;g.addListener("ready",function(){c=document.getElementById(g.ui.id+"_message_holder"),b(),setTimeout(function(){b()},500)}),g.addListener("showmessage",function(a,d){d=utils.isString(d)?{content:d}:d;var h=new e({timeout:d.timeout,type:d.type,content:d.content,keepshow:d.keepshow,editor:g}),i=d.id||"msg_"+(+new Date).toString(36);return h.render(c),f[i]=h,h.reset(d),b(),i}),g.addListener("updatemessage",function(a,b,d){d=utils.isString(d)?{content:d}:d;var e=f[b];e.render(c),e&&e.reset(d)}),g.addListener("hidemessage",function(a,b){var c=f[b];c&&c.hide()})}),UE.registerUI("autosave",function(a){var b=null,c=null;a.on("afterautosave",function(){clearTimeout(b),b=setTimeout(function(){c&&a.trigger("hidemessage",c),c=a.trigger("showmessage",{content:a.getLang("autosave.success"),timeout:2e3})},2e3)})})}(); \ No newline at end of file diff --git a/public/static/admin/plugins/ueditor/ueditor.config.js b/public/static/admin/plugins/ueditor/ueditor.config.js new file mode 100755 index 0000000..c9146cb --- /dev/null +++ b/public/static/admin/plugins/ueditor/ueditor.config.js @@ -0,0 +1,147 @@ +/** + * UEEditor完整配置项 + */ + +(function () { + var URL = window.UEDITOR_HOME_URL || getUEBasePath(); + /** + * 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。 + */ + window.UEDITOR_CONFIG = { + //宽度调为100% + initialFrameWidth: '100%', + //为编辑器实例添加一个路径,这个不能被注释 + UEDITOR_HOME_URL: URL + // 服务器统一请求接口路径 + , serverUrl: URL + "" + //工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的重新定义 + , toolbars: [[ + 'fullscreen', 'source', '|', 'undo', 'redo', '|', + 'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|', + 'rowspacingtop', 'rowspacingbottom', 'lineheight', '|', + 'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|', + 'directionalityltr', 'directionalityrtl', 'indent', '|', + 'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|', + 'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|', + 'simpleupload', 'insertimage', 'emotion', 'scrawl', 'insertvideo', 'music', 'attachment', 'map', 'gmap', 'insertframe', 'insertcode', 'pagebreak', 'template', 'background', '|', + 'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|', + 'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|', + 'print', 'preview', 'searchreplace', 'drafts' + ]] + + , zIndex: 8 + // xss 过滤是否开启,inserthtml等操作 + , xssFilterRules: true + //input xss过滤 + , inputXssFilter: true + //output xss过滤 + , outputXssFilter: true + // xss过滤白名单 名单来源: https://raw.githubusercontent.com/leizongmin/js-xss/master/lib/default.js + , whitList: { + a: ['target', 'href', 'title', 'class', 'style'], + abbr: ['title', 'class', 'style'], + address: ['class', 'style'], + area: ['shape', 'coords', 'href', 'alt'], + article: [], + aside: [], + audio: ['autoplay', 'controls', 'loop', 'preload', 'src', 'class', 'style'], + b: ['class', 'style'], + bdi: ['dir'], + bdo: ['dir'], + big: [], + blockquote: ['cite', 'class', 'style'], + br: [], + caption: ['class', 'style'], + center: [], + cite: [], + code: ['class', 'style'], + col: ['align', 'valign', 'span', 'width', 'class', 'style'], + colgroup: ['align', 'valign', 'span', 'width', 'class', 'style'], + dd: ['class', 'style'], + del: ['datetime'], + details: ['open'], + div: ['class', 'style'], + dl: ['class', 'style'], + dt: ['class', 'style'], + em: ['class', 'style'], + font: ['color', 'size', 'face'], + footer: [], + h1: ['class', 'style'], + h2: ['class', 'style'], + h3: ['class', 'style'], + h4: ['class', 'style'], + h5: ['class', 'style'], + h6: ['class', 'style'], + header: [], + hr: [], + i: ['class', 'style'], + img: ['src', 'alt', 'title', 'width', 'height', 'id', '_src', 'loadingclass', 'class', 'data-latex'], + ins: ['datetime'], + li: ['class', 'style'], + mark: [], + nav: [], + ol: ['class', 'style'], + p: ['class', 'style'], + pre: ['class', 'style'], + s: [], + section: [], + small: [], + span: ['class', 'style'], + sub: ['class', 'style'], + sup: ['class', 'style'], + strong: ['class', 'style'], + table: ['width', 'border', 'align', 'valign', 'class', 'style'], + tbody: ['align', 'valign', 'class', 'style'], + td: ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'], + tfoot: ['align', 'valign', 'class', 'style'], + th: ['width', 'rowspan', 'colspan', 'align', 'valign', 'class', 'style'], + thead: ['align', 'valign', 'class', 'style'], + tr: ['rowspan', 'align', 'valign', 'class', 'style'], + tt: [], + u: [], + ul: ['class', 'style'], + video: ['autoplay', 'controls', 'loop', 'preload', 'src', 'height', 'width', 'class', 'style'] + } + }; + + function getUEBasePath(docUrl, confUrl) { + return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath()); + } + + function getConfigFilePath() { + var configPath = document.getElementsByTagName('script'); + return configPath[configPath.length - 1].src; + } + + function getBasePath(docUrl, confUrl) { + var basePath = confUrl; + if (/^(\/|\\\\)/.test(confUrl)) { + basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, ''); + } else if (!/^[a-z]+:/i.test(confUrl)) { + docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, ''); + basePath = docUrl + "" + confUrl; + } + return optimizationPath(basePath); + } + + function optimizationPath(path) { + var protocol = /^[a-z]+:\/\//.exec(path)[0], + tmp = null, + res = []; + path = path.replace(protocol, "").split("?")[0].split("#")[0]; + path = path.replace(/\\/g, '/').split(/\//); + path[path.length - 1] = ""; + while (path.length) { + if ((tmp = path.shift()) === "..") { + res.pop(); + } else if (tmp !== ".") { + res.push(tmp); + } + } + return protocol + res.join("/"); + } + + window.UE = { + getUEBasePath: getUEBasePath + }; +})(); diff --git a/public/static/admin/plugins/ueditor/ueditor.parse.min.js b/public/static/admin/plugins/ueditor/ueditor.parse.min.js new file mode 100755 index 0000000..af057a1 --- /dev/null +++ b/public/static/admin/plugins/ueditor/ueditor.parse.min.js @@ -0,0 +1,7 @@ +/*! + * UEditor + * version: ueditor + * build: Wed Aug 10 2016 11:06:05 GMT+0800 (CST) + */ + +!function(){!function(){UE=window.UE||{};var a=!!window.ActiveXObject,b={removeLastbs:function(a){return a.replace(/\/$/,"")},extend:function(a,b){for(var c=arguments,d=!!this.isBoolean(c[c.length-1])&&c[c.length-1],e=this.isBoolean(c[c.length-1])?c.length-1:c.length,f=1;f=c&&a===b)return d=e,!1}),d},hasClass:function(a,b){b=b.replace(/(^[ ]+)|([ ]+$)/g,"").replace(/[ ]{2,}/g," ").split(" ");for(var c,d=0,e=a.className;c=b[d++];)if(!new RegExp("\\b"+c+"\\b","i").test(e))return!1;return d-1==b.length},addClass:function(a,c){if(a){c=this.trim(c).replace(/[ ]{2,}/g," ").split(" ");for(var d,e=0,f=a.className;d=c[e++];)new RegExp("\\b"+d+"\\b").test(f)||(f+=" "+d);a.className=b.trim(f)}},removeClass:function(a,b){b=this.isArray(b)?b:this.trim(b).replace(/[ ]{2,}/g," ").split(" ");for(var c,d=0,e=a.className;c=b[d++];)e=e.replace(new RegExp("\\b"+c+"\\b"),"");e=this.trim(e).replace(/[ ]{2,}/g," "),a.className=e,!e&&a.removeAttribute("className")},on:function(a,c,d){var e=this.isArray(c)?c:c.split(/\s+/),f=e.length;if(f)for(;f--;)if(c=e[f],a.addEventListener)a.addEventListener(c,d,!1);else{d._d||(d._d={els:[]});var g=c+d.toString(),h=b.indexOf(d._d.els,a);d._d[g]&&h!=-1||(h==-1&&d._d.els.push(a),d._d[g]||(d._d[g]=function(a){return d.call(a.srcElement,a||window.event)}),a.attachEvent("on"+c,d._d[g]))}a=null},off:function(a,c,d){var e=this.isArray(c)?c:c.split(/\s+/),f=e.length;if(f)for(;f--;)if(c=e[f],a.removeEventListener)a.removeEventListener(c,d,!1);else{var g=c+d.toString();try{a.detachEvent("on"+c,d._d?d._d[g]:d)}catch(h){}if(d._d&&d._d[g]){var i=b.indexOf(d._d.els,a);i!=-1&&d._d.els.splice(i,1),0==d._d.els.length&&delete d._d[g]}}},loadFile:function(){function a(a,c){try{for(var d,e=0;d=b[e++];)if(d.doc===a&&d.url==(c.src||c.href))return d}catch(f){return null}}var b=[];return function(c,d,e){var f=a(c,d);if(f)return void(f.ready?e&&e():f.funs.push(e));if(b.push({doc:c,url:d.src||d.href,funs:[e]}),!c.body){var g=[];for(var h in d)"tag"!=h&&g.push(h+'="'+d[h]+'"');return void c.write("<"+d.tag+" "+g.join(" ")+" >")}if(!d.id||!c.getElementById(d.id)){var i=c.createElement(d.tag);delete d.tag;for(var h in d)i.setAttribute(h,d[h]);i.onload=i.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){if(f=a(c,d),f.funs.length>0){f.ready=1;for(var b;b=f.funs.pop();)b()}i.onload=i.onreadystatechange=null}},i.onerror=function(){throw Error("The load "+(d.href||d.src)+" fails,check the url")},c.getElementsByTagName("head")[0].appendChild(i)}}}()};b.each(["String","Function","Array","Number","RegExp","Object","Boolean"],function(a){b["is"+a]=function(b){return Object.prototype.toString.apply(b)=="[object "+a+"]"}});var c={};UE.parse={register:function(a,b){c[a]=b},load:function(a){b.each(c,function(c){c.call(a,b)})}},uParse=function(a,c){b.domReady(function(){var d;if(document.querySelectorAll)d=document.querySelectorAll(a);else if(/^#/.test(a))d=[document.getElementById(a.replace(/^#/,""))];else if(/^\./.test(a)){var d=[];b.each(document.getElementsByTagName("*"),function(b){b.className&&new RegExp("\\b"+a.replace(/^\./,"")+"\\b","i").test(b.className)&&d.push(b)})}else d=document.getElementsByTagName(a);b.each(d,function(d){UE.parse.load(b.extend({root:d,selector:a},c))})})}}(),UE.parse.register("insertcode",function(a){var b=this.root.getElementsByTagName("pre");if(b.length)if("undefined"==typeof XRegExp){var c,d;void 0!==this.rootPath?(c=a.removeLastbs(this.rootPath)+"/third-party/SyntaxHighlighter/shCore.js",d=a.removeLastbs(this.rootPath)+"/third-party/SyntaxHighlighter/shCoreDefault.css"):(c=this.highlightJsUrl,d=this.highlightCssUrl),a.loadFile(document,{id:"syntaxhighlighter_css",tag:"link",rel:"stylesheet",type:"text/css",href:d}),a.loadFile(document,{id:"syntaxhighlighter_js",src:c,tag:"script",type:"text/javascript",defer:"defer"},function(){a.each(b,function(a){a&&/brush/i.test(a.className)&&SyntaxHighlighter.highlight(a)})})}else a.each(b,function(a){a&&/brush/i.test(a.className)&&SyntaxHighlighter.highlight(a)})}),UE.parse.register("table",function(a){function b(b,c){var d,e=b;for(c=a.isArray(c)?c:[c];e;){for(d=0;d0){var g=a[c];a[c]=a[e],a[e]=g}return a}function e(b){if(!a.hasClass(b.rows[0],"firstRow")){for(var c=1;cimg{height:auto;margin:15px auto;max-width:90%!important;width:auto}.viewer-footer{bottom:0;left:0;overflow:hidden;position:absolute;right:0;text-align:center}.viewer-navbar{background-color:rgba(0,0,0,.5);overflow:hidden}.viewer-list{-webkit-box-sizing:content-box;box-sizing:content-box;height:50px;margin:0;overflow:hidden;padding:1px 0}.viewer-list>li{color:transparent;cursor:pointer;float:left;font-size:0;height:50px;line-height:0;opacity:.5;overflow:hidden;-webkit-transition:opacity .15s;transition:opacity .15s;width:30px}.viewer-list>li:hover{opacity:.75}.viewer-list>li+li{margin-left:1px}.viewer-list>.viewer-loading{position:relative}.viewer-list>.viewer-loading:after{border-width:2px;height:20px;margin-left:-10px;margin-top:-10px;width:20px}.viewer-list>.viewer-active,.viewer-list>.viewer-active:hover{opacity:1}.viewer-player{background-color:#000;bottom:0;cursor:none;display:none;right:0}.viewer-player,.viewer-player>img{left:0;position:absolute;top:0}.viewer-toolbar>ul{display:inline-block;margin:0 auto 5px;overflow:hidden;padding:3px 0}.viewer-toolbar>ul>li{background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;float:left;height:24px;overflow:hidden;-webkit-transition:background-color .15s;transition:background-color .15s;width:24px}.viewer-toolbar>ul>li:hover{background-color:rgba(0,0,0,.8)}.viewer-toolbar>ul>li:before{margin:2px}.viewer-toolbar>ul>li+li{margin-left:1px}.viewer-toolbar>ul>.viewer-small{height:18px;margin-bottom:3px;margin-top:3px;width:18px}.viewer-toolbar>ul>.viewer-small:before{margin:-1px}.viewer-toolbar>ul>.viewer-large{height:30px;margin-bottom:-3px;margin-top:-3px;width:30px}.viewer-toolbar>ul>.viewer-large:before{margin:5px}.viewer-tooltip{background-color:rgba(0,0,0,.8);border-radius:10px;color:#fff;display:none;font-size:12px;height:20px;left:50%;line-height:20px;margin-left:-25px;margin-top:-10px;position:absolute;text-align:center;top:50%;width:50px}.viewer-title{color:#ccc;display:inline-block;font-size:12px;line-height:1;margin:0 5% 5px;max-width:90%;opacity:.8;overflow:hidden;text-overflow:ellipsis;-webkit-transition:opacity .15s;transition:opacity .15s;white-space:nowrap}.viewer-title:hover{opacity:1}.viewer-button{background-color:rgba(0,0,0,.5);border-radius:50%;cursor:pointer;height:80px;overflow:hidden;position:absolute;right:-40px;top:-40px;-webkit-transition:background-color .15s;transition:background-color .15s;width:80px}.viewer-button:focus,.viewer-button:hover{background-color:rgba(0,0,0,.8)}.viewer-button:before{bottom:15px;left:15px;position:absolute}.viewer-fixed{position:fixed}.viewer-open{overflow:hidden}.viewer-show{display:block}.viewer-hide{display:none}.viewer-backdrop{background-color:rgba(0,0,0,.5)}.viewer-invisible{visibility:hidden}.viewer-move{cursor:move;cursor:-webkit-grab;cursor:grab}.viewer-fade{opacity:0}.viewer-in{opacity:1}.viewer-transition{-webkit-transition:all .3s;transition:all .3s}@-webkit-keyframes viewer-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes viewer-spinner{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.viewer-loading:after{-webkit-animation:viewer-spinner 1s linear infinite;animation:viewer-spinner 1s linear infinite;border:4px solid hsla(0,0%,100%,.1);border-left-color:hsla(0,0%,100%,.5);border-radius:50%;content:"";display:inline-block;height:40px;left:50%;margin-left:-20px;margin-top:-20px;position:absolute;top:50%;width:40px;z-index:1}@media (max-width:767px){.viewer-hide-xs-down{display:none}}@media (max-width:991px){.viewer-hide-sm-down{display:none}}@media (max-width:1199px){.viewer-hide-md-down{display:none}} \ No newline at end of file diff --git a/public/static/admin/plugins/viewer/viewer.min.js b/public/static/admin/plugins/viewer/viewer.min.js new file mode 100755 index 0000000..27af002 --- /dev/null +++ b/public/static/admin/plugins/viewer/viewer.min.js @@ -0,0 +1,10 @@ +/*! + * Viewer.js v1.3.5 + * https://fengyuanchen.github.io/viewerjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2019-07-04T11:00:16.790Z + */ +!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?module.exports=i():"function"==typeof define&&define.amd?define(i):(t=t||self).Viewer=i()}(this,function(){"use strict";function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function n(t,i){for(var e=0;e/g,">"):t}function ht(t,i){return t.classList?t.classList.contains(i):-1=this.length||this.viewed&&i===this.index)return this;this.viewing&&this.viewing.abort();var n=this.element,s=this.options,o=this.title,a=this.canvas,r=this.items[i],h=r.querySelector("img"),l=ft(h,"originalUrl"),c=rt(h.getAttribute("alt")),u=document.createElement("img");if(u.src=l,u.alt=c,et(s.view)&&wt(n,j,s.view,{once:!0}),!1===bt(n,j,{originalImage:this.images[i],index:i,image:u})||!this.isShown||this.hiding||this.played)return this;this.image=u,ct(this.items[this.index],f),lt(r,f),this.viewed=!1,this.index=i,this.imageData={},lt(u,z),s.loading&<(a,v),a.innerHTML="",a.appendChild(u),this.renderList(),o.innerHTML="";function d(){var t=e.imageData,i=Array.isArray(s.title)?s.title[1]:s.title;o.innerHTML=rt(et(i)?i.call(e,u,t):"".concat(c," (").concat(t.naturalWidth," × ").concat(t.naturalHeight,")"))}var m;return wt(n,V,d,{once:!0}),this.viewing={abort:function(){pt(n,V,d),u.complete?this.imageRendering?this.imageRendering.abort():this.imageInitializing&&this.imageInitializing.abort():(u.src="",pt(u,Y,m),this.timeout&&clearTimeout(this.timeout))}},u.complete?this.load():(wt(u,Y,m=this.load.bind(this),{once:!0}),this.timeout&&clearTimeout(this.timeout),this.timeout=setTimeout(function(){ct(u,z),e.timeout=!1},1e3)),this},prev:function(t){var i=0Math.abs(o)&&(this.pointers={},1
    ';var n=e.querySelector(".".concat(p,"-container")),s=n.querySelector(".".concat(p,"-title")),o=n.querySelector(".".concat(p,"-toolbar")),a=n.querySelector(".".concat(p,"-navbar")),r=n.querySelector(".".concat(p,"-button")),l=n.querySelector(".".concat(p,"-canvas"));if(this.parent=i,this.viewer=n,this.title=s,this.toolbar=o,this.navbar=a,this.button=r,this.canvas=l,this.footer=n.querySelector(".".concat(p,"-footer")),this.tooltipBox=n.querySelector(".".concat(p,"-tooltip")),this.player=n.querySelector(".".concat(p,"-player")),this.list=n.querySelector(".".concat(p,"-list")),lt(s,h.title?zt(Array.isArray(h.title)?h.title[0]:h.title):k),lt(a,h.navbar?zt(h.navbar):k),ut(r,k,!h.button),h.backdrop&&(lt(n,"".concat(p,"-backdrop")),h.inline||"static"===h.backdrop||gt(l,K,"hide")),$(h.className)&&h.className&&h.className.split(U).forEach(function(t){lt(n,t)}),h.toolbar){var c=document.createElement("ul"),u=it(h.toolbar),d=Z.slice(0,3),m=Z.slice(7,9),f=Z.slice(9);u||lt(o,zt(h.toolbar)),nt(u?h.toolbar:Z,function(t,i){var e=u&&it(t),n=u?mt(i):t,s=e&&!J(t.show)?t.show:t;if(s&&(h.zoomable||-1===d.indexOf(n))&&(h.rotatable||-1===m.indexOf(n))&&(h.scalable||-1===f.indexOf(n))){var o=e&&!J(t.size)?t.size:t,a=e&&!J(t.click)?t.click:t,r=document.createElement("li");r.setAttribute("role","button"),lt(r,"".concat(p,"-").concat(n)),et(a)||gt(r,K,n),G(s)&<(r,zt(s)),-1!==["small","large"].indexOf(o)?lt(r,"".concat(p,"-").concat(o)):"play"===n&<(r,"".concat(p,"-large")),et(a)&&wt(r,S,a),c.appendChild(r)}}),o.appendChild(c)}else lt(o,k);if(!h.rotatable){var g=o.querySelectorAll('li[class*="rotate"]');lt(g,z),nt(g,function(t){o.appendChild(t)})}if(h.inline)lt(r,x),at(n,{zIndex:h.zIndexInline}),"static"===window.getComputedStyle(i).position&&at(i,{position:"relative"}),i.insertBefore(n,t.nextSibling);else{lt(r,w),lt(n,y),lt(n,b),lt(n,k),at(n,{zIndex:h.zIndex});var v=h.container;$(v)&&(v=t.ownerDocument.querySelector(v)),(v=v||this.body).appendChild(n)}h.inline&&(this.render(),this.bind(),this.isShown=!0),this.ready=!0,et(h.ready)&&wt(t,O,h.ready,{once:!0}),!1!==bt(t,O)?this.ready&&h.inline&&this.view(this.index):this.ready=!1}}}],[{key:"noConflict",value:function(){return window.Viewer=Lt,e}},{key:"setDefaults",value:function(t){st(s,it(t)&&t)}}]),e}();return st(Nt.prototype,Tt,Et,It,St,Ct),Nt}); \ No newline at end of file diff --git a/public/static/index/css/index.css b/public/static/index/css/index.css new file mode 100755 index 0000000..e181777 --- /dev/null +++ b/public/static/index/css/index.css @@ -0,0 +1,75 @@ +/** +演示页面css + */ +body, html { + overflow: hidden; + margin: 0; + height: 100%; + width: 100%; +} + +body { + font-family: 'Roboto Mono', monospace, 'Microsoft Yahei'; + color: #333 +} + +#wrapper { + position: absolute; + width: 320px; + text-align: center; + top: 50%; + left: 50%; + margin-left: -160px; + margin-top: -160px; + -webkit-user-select: none; + -moz-user-select: none; + user-select: none +} + +h1 { + font-weight: 700; + font-size: 30px; + letter-spacing: 9px; + margin: 12px 0; + left: 4px +} + +h2 { + color: #000; + font-weight: 400; + font-size: 15px; + letter-spacing: .12em; + margin-bottom: 30px; + left: 3px +} + +h1, h2 { + position: relative +} + +p { + font-size: 14px; + line-height: 2em; + margin: 0; + letter-spacing: 2px +} + +canvas { + position: absolute; + top: 0; + left: 0; + z-index: 0; + width: 100%; + height: 100%; + pointer-events: none +} + +a { + color: #54565d; + text-decoration: none; + transition: color .2s ease +} + +a:hover { + color: #f33 +} \ No newline at end of file diff --git a/public/static/index/images/avatar.png b/public/static/index/images/avatar.png new file mode 100755 index 0000000..a682920 Binary files /dev/null and b/public/static/index/images/avatar.png differ diff --git a/public/static/index/images/user_level_default.png b/public/static/index/images/user_level_default.png new file mode 100755 index 0000000..d3c270a Binary files /dev/null and b/public/static/index/images/user_level_default.png differ diff --git a/public/static/index/plugins/canvas-nest/canvas-nest.umd.js b/public/static/index/plugins/canvas-nest/canvas-nest.umd.js new file mode 100755 index 0000000..858c06d --- /dev/null +++ b/public/static/index/plugins/canvas-nest/canvas-nest.umd.js @@ -0,0 +1 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.CanvasNest=t()}(this,function(){"use strict";function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function t(e,t){return e(t={exports:{}},t.exports),t.exports}var n=t(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=1;t.default=function(){return""+n++},e.exports=t.default});e(n);var o=t(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:30,n=null;return function(){for(var o=this,i=arguments.length,r=Array(i),a=0;an||r.x<0?-1:1,r.ya*=r.y>o||r.y<0?-1:1,t.fillStyle="rgba("+e.c.pointColor+")",t.fillRect(r.x-.5,r.y-.5,1,1),u=v+1;u=s.max/2&&(r.x-=.03*l,r.y-=.03*d),c=(s.max-f)/s.max,t.beginPath(),t.lineWidth=c/2,t.strokeStyle="rgba("+e.c.color+","+(c+.2)+")",t.moveTo(r.x,r.y),t.lineTo(s.x,s.y),t.stroke()))}),this.requestFrame(this.drawCanvas)}},{key:"destroy",value:function(){l(this.el),window.onmousemove=this.onmousemove,window.onmouseout=this.onmouseout,v(this.tid),this.canvas.parentNode.removeChild(this.canvas)}}]),e}();return y.version="2.0.4",y}); diff --git a/public/static/layui-admin/dist/layuiadmin/config.js b/public/static/layui-admin/dist/layuiadmin/config.js new file mode 100755 index 0000000..eaef43b --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/config.js @@ -0,0 +1,128 @@ +/** + + @Name:layuiAdmin iframe版全局配置 + @Author:贤心 + @Site:http://www.layui.com/admin/ + @License:LPPL(layui付费产品协议) + + */ +layui.define(['laytpl', 'layer', 'element', 'util'], function(exports){ + exports('setter', { + container: 'LAY_app' //容器ID + ,base: layui.cache.base //记录静态资源所在路径 + ,views: layui.cache.base + 'tpl/' //动态模板所在目录 + ,entry: 'index' //默认视图文件名 + ,engine: '.html' //视图文件后缀名 + ,pageTabs: true //是否开启页面选项卡功能。iframe版推荐开启 + + ,name: 'layuiAdmin' + ,tableName: ( typeof theme_tag !== 'undefined' && theme_tag === 2)?'layuiAdmin2':'layuiAdmin' + ,MOD_NAME: 'admin' //模块事件名 + + ,debug: true //是否开启调试模式。如开启,接口异常时会抛出异常 URL 等信息 + + //自定义请求字段 + ,request: { + tokenName: false //自动携带 token 的字段名(如:access_token)。可设置 false 不携带。 + } + + //自定义响应字段 + ,response: { + statusName: 'code' //数据状态的字段名称 + ,statusCode: { + ok: 1 //数据状态一切正常的状态码 + ,logout: 1001 //登录状态失效的状态码 + } + ,msgName: 'msg' //状态信息的字段名称 + ,dataName: 'data' //数据详情的字段名称 + } + + //扩展的第三方模块 + ,extend: [ + 'echarts', //echarts 核心包 + 'echartsTheme' //echarts 主题 + ] + + //主题配置 + ,theme: { + //内置主题配色方案 + color: [{ + main: '#20222A' //主题色 + ,selected: '#009688' //选中色 + ,alias: 'default' //默认别名 + },{ + main: '#03152A' + ,selected: '#3B91FF' + ,alias: 'dark-blue' //藏蓝 + },{ + main: '#2E241B' + ,selected: '#A48566' + ,alias: 'coffee' //咖啡 + },{ + main: '#50314F' + ,selected: '#7A4D7B' + ,alias: 'purple-red' //紫红 + },{ + main: '#344058' + ,logo: '#1E9FFF' + ,selected: '#1E9FFF' + ,alias: 'ocean' //海洋 + },{ + main: '#3A3D49' + ,logo: '#2F9688' + ,selected: '#5FB878' + ,alias: 'green' //墨绿 + },{ + main: '#20222A' + ,logo: '#F78400' + ,selected: '#F78400' + ,alias: 'red' //橙色 + },{ + main: '#28333E' + ,logo: '#AA3130' + ,selected: '#AA3130' + ,alias: 'fashion-red' //时尚红 + },{ + main: '#24262F' + ,logo: '#3A3D49' + ,selected: '#009688' + ,alias: 'classic-black' //经典黑 + },{ + logo: '#226A62' + ,header: '#2F9688' + ,alias: 'green-header' //墨绿头 + },{ + main: '#344058' + ,logo: '#0085E8' + ,selected: '#1E9FFF' + ,header: '#1E9FFF' + ,alias: 'ocean-header' //海洋头 + },{ + header: '#393D49' + ,alias: 'classic-black-header' //经典黑头 + },{ + main: '#50314F' + ,logo: '#50314F' + ,selected: '#7A4D7B' + ,header: '#50314F' + ,alias: 'purple-red-header' //紫红头 + },{ + main: '#28333E' + ,logo: '#28333E' + ,selected: '#AA3130' + ,header: '#AA3130' + ,alias: 'fashion-red-header' //时尚红头 + },{ + main: '#28333E' + ,logo: '#009688' + ,selected: '#009688' + ,header: '#009688' + ,alias: 'green-header' //墨绿头 + }] + + //初始的颜色索引,对应上面的配色方案数组索引 + //如果本地已经有主题色记录,则以本地记录为优先,除非请求本地数据(localStorage) + ,initColorIndex: 1 + } + }); +}); diff --git a/public/static/layui-admin/dist/layuiadmin/json/console/prograss.js b/public/static/layui-admin/dist/layuiadmin/json/console/prograss.js new file mode 100755 index 0000000..090488e --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/console/prograss.js @@ -0,0 +1,36 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "prograss": "开会" + ,"time": "一小时" + ,"complete": "已完成" + ,"LAY_CHECKED": true + },{ + "prograss": "项目开发" + ,"time": "两小时" + ,"complete": "进行中" + ,"LAY_CHECKED": true + },{ + "prograss": "陪吃饭" + ,"time": "一小时" + ,"complete": "未完成" + },{ + "prograss": "修改小bug" + ,"time": "半小时" + ,"complete": "未完成" + },{ + "prograss": "修改大bug" + ,"time": "两小时" + ,"complete": "未完成" + },{ + "prograss": "修改小bug" + ,"time": "半小时" + ,"complete": "未完成" + },{ + "prograss": "修改大bug" + ,"time": "两小时" + ,"complete": "未完成" + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/console/top-card.js b/public/static/layui-admin/dist/layuiadmin/json/console/top-card.js new file mode 100755 index 0000000..e731a26 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/console/top-card.js @@ -0,0 +1,76 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "id": 111 + ,"title": "社区开始接受 “赞助商广告” 投放" + ,"username": "贤心" + ,"channel": "公告" + ,"href": "http://fly.layui.com/jie/15697/" + ,"crt": 61632 + },{ + "id": 222 + ,"title": "layui 一周年" + ,"username": "猫吃" + ,"channel": "讨论" + ,"href": "http://fly.layui.com/jie/16622/" + ,"crt": 61632 + },{ + "id": 333 + ,"title": "四个月的前端" + ,"username": "fd" + ,"channel": "分享" + ,"href": "http://fly.layui.com/jie/16651/" + ,"crt": 61632 + },{ + "id": 333 + ,"title": "如何评价LayUI和他的作者闲心" + ,"username": "纸飞机" + ,"channel": "提问" + ,"href": "http://fly.layui.com/jie/9352/" + ,"crt": 61632 + },{ + "id": 333 + ,"title": "如何评价LayUI和他的作者闲心" + ,"username": "纸飞机" + ,"channel": "提问" + ,"href": "http://fly.layui.com/jie/9352/" + ,"crt": 61632 + },{ + "id": 333 + ,"title": "如何评价LayUI和他的作者闲心" + ,"username": "纸飞机" + ,"channel": "提问" + ,"href": "http://fly.layui.com/jie/9352/" + ,"crt": 61632 + },{ + "id": 333 + ,"title": "如何评价LayUI和他的作者闲心" + ,"username": "纸飞机" + ,"channel": "提问" + ,"href": "http://fly.layui.com/jie/9352/" + ,"crt": 61632 + },{ + "id": 333 + ,"title": "如何评价LayUI和他的作者闲心" + ,"username": "纸飞机" + ,"channel": "提问" + ,"href": "http://fly.layui.com/jie/9352/" + ,"crt": 61632 + },{ + "id": 333 + ,"title": "如何评价LayUI和他的作者闲心" + ,"username": "纸飞机" + ,"channel": "提问" + ,"href": "http://fly.layui.com/jie/9352/" + ,"crt": 61632 + },{ + "id": 333 + ,"title": "如何评价LayUI和他的作者闲心" + ,"username": "纸飞机" + ,"channel": "提问" + ,"href": "http://fly.layui.com/jie/9352/" + ,"crt": 61632 + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/console/top-search.js b/public/static/layui-admin/dist/layuiadmin/json/console/top-search.js new file mode 100755 index 0000000..1d270bd --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/console/top-search.js @@ -0,0 +1,46 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "keywords": "贤心是男是女" + ,"frequency": 8520 + ,"userNums": 2216 + },{ + "keywords": "Java程序员能找到女朋友吗" + ,"frequency": 666 + ,"userNums": 333 + },{ + "keywords": "此表格是静态模拟数据" + ,"frequency": 666 + ,"userNums": 333 + },{ + "keywords": "layui官方教程" + ,"frequency": 666 + ,"userNums": 333 + },{ + "keywords": "layui官方教程" + ,"frequency": 666 + ,"userNums": 333 + },{ + "keywords": "layui官方教程" + ,"frequency": 666 + ,"userNums": 333 + },{ + "keywords": "layui官方教程" + ,"frequency": 666 + ,"userNums": 333 + },{ + "keywords": "layui官方教程" + ,"frequency": 666 + ,"userNums": 333 + },{ + "keywords": "layui官方教程" + ,"frequency": 666 + ,"userNums": 333 + },{ + "keywords": "layui官方教程" + ,"frequency": 666 + ,"userNums": 333 + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/content/comment.js b/public/static/layui-admin/dist/layuiadmin/json/content/comment.js new file mode 100755 index 0000000..4dd442d --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/content/comment.js @@ -0,0 +1,56 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "id": "001" + ,"reviewers": "赵" + ,"content": "我又爱上编程了" + ,"commtime": 20160312 + },{ + "id": "002" + ,"reviewers": "钱" + ,"content": "女生出门要小心" + ,"commtime": 20160821 + },{ + "id": "003" + ,"reviewers": "孙" + ,"content": "框架就用layui" + ,"commtime": 20161212 + },{ + "id": "004" + ,"reviewers": "李" + ,"content": "心姐么么哒" + ,"commtime": 20170311 + },{ + "id": "005" + ,"reviewers": "周" + ,"content": "希望明天是个好天气" + ,"commtime": 20170612 + },{ + "id": "006" + ,"reviewers": "吴" + ,"content": "我又爱上编程了" + ,"commtime": 20171112 + },{ + "id": "007" + ,"reviewers": "郑" + ,"content": "女生出门要小心" + ,"commtime": 20171230 + },{ + "id": "008" + ,"reviewers": "王" + ,"content": "框架就用layui" + ,"commtime": 20180112 + },{ + "id": "009" + ,"reviewers": "冯" + ,"content": "心姐么么哒" + ,"commtime": 20180221 + },{ + "id": "010" + ,"reviewers": "陈" + ,"content": "希望明天是个好天气" + ,"commtime": 20180312 + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/content/list.js b/public/static/layui-admin/dist/layuiadmin/json/content/list.js new file mode 100755 index 0000000..8ce066a --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/content/list.js @@ -0,0 +1,62 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "id": "001" + ,"label": "美食" + ,"title": "舌尖上的中国第一季" + ,"author": "作者-1" + ,"content": "通过中华美食的多个侧面,来展现食物给中国人生活带来的仪式、伦理等方面的文化;见识中国特色食材以及与食物相关、构成中国美食特有气质的一系列元素;了解中华饮食文化的精致和源远流长" + ,"uploadtime": 20121204 + ,"status": true + },{ + "id": "002" + ,"label": "美食" + ,"title": "舌尖上的中国第二季" + ,"author": "作者-2" + ,"content": "以食物为窗口,读懂中国——通过美食,使人们可以有滋有味地认知这个古老的东方国度。“一方水土一方人”,本片将通过展示人们日常生活中与美食相关的多重侧面,描绘与感知中国人的文化传统、家族观念、生活态度与故土难离。人们收获、保存、烹饪、生产美食,并在其过程中留存和传承食物所承载的味觉记忆、饮食习俗、文化样态与家常情感。" + ,"uploadtime": 20141204 + ,"status": false + },{ + "id": "003" + ,"label": "美食" + ,"title": "舌尖上的中国第三季" + ,"author": "作者-3" + ,"content": "以食物为窗口,读懂中国——通过美食,使人们可以有滋有味地认知这个古老的东方国度。“一方水土一方人”,本片将通过展示人们日常生活中与美食相关的多重侧面,描绘与感知中国人的文化传统、家族观念、生活态度与故土难离。人们收获、保存、烹饪、生产美食,并在其过程中留存和传承食物所承载的味觉记忆、饮食习俗、文化样态与家常情感将世界美食和中国美食进行比照。春耕、夏耘、秋收、冬藏,天人合一的东方哲学让中国饮食依时而变,智慧灵动,中医营养摄生学说创造了食材运用的新天地,儒家人伦道德则把心意和家的味道端上我们的餐桌。淘洗历史,糅合时光,一代又一代的中国人在天地间升起烟火,用至精至诚的心意烹制食物,一餐一食之间,中国人展示个性,确认归属,构建文明,理解和把握着世界的奥妙。" + ,"uploadtime": 20161204 + ,"status": false + },{ + "id": "004" + ,"label": "历史" + ,"title": "诸葛亮骂王朗" + ,"author": "作者-1" + ,"content": "皓首匹夫!苍髯老贼!你即将命归于九泉之下,届时,有何面目见汉朝二十四代先帝?二臣贼子!你枉活七十有六,一生未立寸功,只会摇唇舞舌,助曹为虐!一条断脊之犬,还敢在我军阵前狺狺狂吠!我从未见过如此厚颜无耻之人!!!" + ,"uploadtime": 20180201 + ,"status": false + },{ + "id": "005" + ,"label": "新闻" + ,"title": "新时代特色中国梦" + ,"author": "作者-1" + ,"content": "今天,我们比历史上任何时期都更接近、更有信心和能力实现中华民族伟大复兴的目标。新时代已经到来,蓝图已经绘就,中国梦离我们越来越近了。" + ,"uploadtime": 20180512 + ,"status": false + },{ + "id": "006" + ,"label": "新闻" + ,"title": "新时代特色中国梦" + ,"author": "作者-2" + ,"content": "梦想不会主动走向我们,只有我们去主动实现梦想。行百里者半九十。虽然中国梦离我们越来越近了,但是要实现中国梦,还要靠我们以永不懈怠的精神状态、功在不舍的坚强意志,不忘初心,继续前进。" + ,"uploadtime": 20180514 + ,"status": false + },{ + "id": "007" + ,"label": "体育" + ,"title": "皇马大战利物浦" + ,"author": "作者-3" + ,"content": "对欧足联而言,更想要产生个新冠军。连续三年都是同一个冠军队,这会毁掉欧冠……”格里姆表态,“皇马有梦幻般的阵容,但从促进竞争的角度而言,另一支球队获胜会更好。" + ,"uploadtime": 20180515 + ,"status": false + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/content/tags.js b/public/static/layui-admin/dist/layuiadmin/json/content/tags.js new file mode 100755 index 0000000..3e5b7d1 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/content/tags.js @@ -0,0 +1,21 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "id": "001" + ,"tags": "美食" + },{ + "id": "002" + ,"tags": "新闻" + },{ + "id": "003" + ,"tags": "八卦" + },{ + "id": "004" + ,"tags": "体育" + },{ + "id": "005" + ,"tags": "音乐" + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/forum/list.js b/public/static/layui-admin/dist/layuiadmin/json/forum/list.js new file mode 100755 index 0000000..5146e33 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/forum/list.js @@ -0,0 +1,62 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "id": "1001" + ,"poster": "赵" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"content": "为什么花儿这么么红" + ,"posttime": 20160805 + ,"top": false + },{ + "id": "1002" + ,"poster": "钱" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"content": "喜欢胡歌,赞赞赞" + ,"posttime": 20161205 + ,"top": true + },{ + "id": "1003" + ,"poster": "孙" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"content": "明天就要考试了,好紧张,求保佑" + ,"posttime": 20170405 + ,"top": false + },{ + "id": "1004" + ,"poster": "李" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"content": "希望明天是个好天气" + ,"posttime": 20171005 + ,"top": false + },{ + "id": "1005" + ,"poster": "周" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"content": "女追男隔层纱,是不是真的" + ,"posttime": 20180205 + ,"top": false + },{ + "id": "1006" + ,"poster": "吴" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"content": "竟然有人跳楼,年轻人想不开啊!" + ,"posttime": 20180512 + ,"top": false + },{ + "id": "1007" + ,"poster": "郑" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"content": "大家一定不能学那个年轻人,珍爱生命啊" + ,"posttime": 20180512 + ,"top": false + },{ + "id": "1008" + ,"poster": "王" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"content": "想知道南昌哪里有好吃的西安肉夹馍" + ,"posttime": 20180514 + ,"top": false + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/forum/replys.js b/public/static/layui-admin/dist/layuiadmin/json/forum/replys.js new file mode 100755 index 0000000..3e52cea --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/forum/replys.js @@ -0,0 +1,69 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "id": "001" + ,"replyer": "吴" + ,"cardid": "1002" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"content": "有眼光,我也喜欢胡歌!" + ,"replytime": 20161205 + },{ + "id": "002" + ,"replyer": "郑" + ,"cardid": "1002" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"content": "同上同上。" + ,"replytime": 20161205 + },{ + "id": "003" + ,"replyer": "王" + ,"cardid": "1003" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"content": "能过一定过,不能过紧张也没用" + ,"replytime": 20170405 + },{ + "id": "004" + ,"replyer": "冯" + ,"cardid": "1001" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"content": "可能因为你流鼻血了。" + ,"replytime": 20170405 + },{ + "id": "005" + ,"replyer": "陈" + ,"cardid": "1003" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"content": "加油加油,看好你" + ,"replytime": 20170405 + },{ + "id": "006" + ,"replyer": "褚" + ,"cardid": "1005" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"content": "纯属放屁" + ,"replytime": 20180207 + },{ + "id": "007" + ,"replyer": "卫" + ,"cardid": "1005" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"content": "可以试试" + ,"replytime": 20180207 + },{ + "id": "006" + ,"replyer": "蒋" + ,"cardid": "1006" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"content": "是啊是啊,太恐怖了。" + ,"replytime": 20180512 + },{ + "id": "007" + ,"replyer": "沈" + ,"cardid": "1008" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"content": "魏家凉皮的凉皮就很不错奥。" + ,"replytime": 20180515 + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/layer/photos.js b/public/static/layui-admin/dist/layuiadmin/json/layer/photos.js new file mode 100755 index 0000000..a5f401e --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/layer/photos.js @@ -0,0 +1,39 @@ +{ + "code": 1, + "msg": "", + "title": "JSON请求的相册", + "id": 8, + "start": 0, + "data": [ + { + "alt": "layer", + "pid": 109, + "src": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg", + "thumb": "" + }, + { + "alt": "说好的,一起Fly", + "pid": 110, + "src": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4kebemcj20ga09saa1.jpg", + "thumb": "" + }, + { + "alt": "佟丽娅女神", + "pid": 111, + "src": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg", + "thumb": "" + }, + { + "alt": "凤姐是个好人", + "pid": 112, + "src": "https://wx3.sinaimg.cn/mw690/5db11ff4gy1fmx4kec9vuj20b20dwmyk.jpg", + "thumb": "" + }, + { + "alt": "星空如此深邃", + "pid": 113, + "src": "https://wx3.sinaimg.cn/mw690/5db11ff4gy1fmx4keca8ag208g06iglw.gif", + "thumb": "" + } + ] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/layim/getList.js b/public/static/layui-admin/dist/layuiadmin/json/layim/getList.js new file mode 100755 index 0000000..5811642 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/layim/getList.js @@ -0,0 +1,96 @@ +{ + "code": 1 + ,"msg": "" + ,"data": { + "mine": { + "username": "纸飞机" + ,"id": "100000" + ,"status": "online" + ,"sign": "在深邃的编码世界,做一枚轻盈的纸飞机" + ,"avatar": "//res.layui.com/images/fly/avatar/00.jpg" + } + ,"friend": [{ + "groupname": "知名人物" + ,"id": 0 + ,"list": [{ + "username": "贤心" + ,"id": "100001" + ,"avatar": "//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" + ,"sign": "这些都是测试数据,实际使用请严格按照该格式返回" + ,"status": "online" + },{ + "username": "刘涛tamia" + ,"id": "100001222" + ,"sign": "如约而至,不负姊妹欢乐颂" + ,"avatar": "//tva4.sinaimg.cn/crop.0.1.1125.1125.180/475bb144jw8f9nwebnuhkj20v90vbwh9.jpg" + },{ + "username": "谢楠" + ,"id": "10034001" + ,"avatar": "//tva2.sinaimg.cn/crop.1.0.747.747.180/633f068fjw8f9h040n951j20ku0kr74t.jpg" + ,"sign": "" + },{ + "username": "马小云" + ,"id": "168168" + ,"avatar": "//tva1.sinaimg.cn/crop.0.0.180.180.180/7fde8b93jw1e8qgp5bmzyj2050050aa8.jpg" + ,"sign": "让天下没有难写的代码" + },{ + "username": "徐小峥" + ,"id": "666666" + ,"avatar": "//tva1.sinaimg.cn/crop.0.0.512.512.180/6a4acad5jw8eqi6yaholjj20e80e8t9f.jpg" + ,"sign": "代码在囧途,也要写到底" + }] + },{ + "groupname": "网红声优" + ,"id": 1 + ,"list": [{ + "username": "罗玉凤" + ,"id": "121286" + ,"avatar": "//tva4.sinaimg.cn/crop.0.0.640.640.180/4a02849cjw8fc8vn18vktj20hs0hs75v.jpg" + ,"sign": "在自己实力不济的时候,不要去相信什么媒体和记者。他们不是善良的人,有时候候他们的采访对当事人而言就是陷阱" + },{ + "username": "Z_子晴" + ,"id": "108101" + ,"avatar": "//tva1.sinaimg.cn/crop.0.23.1242.1242.180/8693225ajw8fbimjimpjwj20yi0zs77l.jpg" + ,"sign": "微电商达人" + },{ + "username": "大鱼_MsYuyu" + ,"id": "12123454" + ,"avatar": "//tva2.sinaimg.cn/crop.0.0.512.512.180/005LMAegjw8f2bp9qg4mrj30e80e8dg5.jpg" + ,"sign": "我瘋了!這也太準了吧 超級笑點低" + },{ + "username": "醋醋cucu" + ,"id": "102101" + ,"avatar": "//tva2.sinaimg.cn/crop.0.0.640.640.180/648fbe5ejw8ethmg0u9egj20hs0ht0tn.jpg" + ,"sign": "" + },{ + "username": "柏雪近在它香" + ,"id": "3435343" + ,"avatar": "//tva2.sinaimg.cn/crop.0.8.751.751.180/961a9be5jw8fczq7q98i7j20kv0lcwfn.jpg" + ,"sign": "" + }] + },{ + "groupname": "女神艺人" + ,"id": 2 + ,"list": [{ + "username": "王祖贤" + ,"id": "76543" + ,"avatar": "//wx2.sinaimg.cn/mw690/5db11ff4gy1flxmew7edlj203d03wt8n.jpg" + ,"sign": "我爱贤心" + },{ + "username": "佟丽娅" + ,"id": "4803920" + ,"avatar": "//tva3.sinaimg.cn/crop.0.0.750.750.180/5033b6dbjw8etqysyifpkj20ku0kuwfw.jpg" + ,"sign": "我也爱贤心吖吖啊" + }] + }] + ,"group": [{ + "groupname": "前端群" + ,"id": "101" + ,"avatar": "//tva1.sinaimg.cn/crop.0.0.200.200.50/006q8Q6bjw8f20zsdem2mj305k05kdfw.jpg" + },{ + "groupname": "Fly社区官方群" + ,"id": "102" + ,"avatar": "//tva2.sinaimg.cn/crop.0.0.199.199.180/005Zseqhjw1eplix1brxxj305k05kjrf.jpg" + }] + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/layim/getMembers.js b/public/static/layui-admin/dist/layuiadmin/json/layim/getMembers.js new file mode 100755 index 0000000..395fe23 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/layim/getMembers.js @@ -0,0 +1,67 @@ +{ + "code": 1 + ,"msg": "" + ,"data": { + "list": [{ + "username": "贤心" + ,"id": "100001" + ,"avatar": "//tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg" + ,"sign": "这些都是测试数据,实际使用请严格按照该格式返回" + },{ + "username": "Z_子晴" + ,"id": "108101" + ,"avatar": "//tva1.sinaimg.cn/crop.0.23.1242.1242.180/8693225ajw8fbimjimpjwj20yi0zs77l.jpg" + ,"sign": "微电商达人" + },{ + "username": "Lemon_CC" + ,"id": "102101" + ,"avatar": "//tva4.sinaimg.cn/crop.0.0.180.180.180/6d424ea5jw1e8qgp5bmzyj2050050aa8.jpg" + ,"sign": "" + },{ + "username": "马小云" + ,"id": "168168" + ,"avatar": "//tva1.sinaimg.cn/crop.0.0.180.180.180/7fde8b93jw1e8qgp5bmzyj2050050aa8.jpg" + ,"sign": "让天下没有难写的代码" + },{ + "username": "徐小峥" + ,"id": "666666" + ,"avatar": "//tva1.sinaimg.cn/crop.0.0.512.512.180/6a4acad5jw8eqi6yaholjj20e80e8t9f.jpg" + ,"sign": "代码在囧途,也要写到底" + },{ + "username": "罗玉凤" + ,"id": "121286" + ,"avatar": "//tva4.sinaimg.cn/crop.0.0.640.640.180/4a02849cjw8fc8vn18vktj20hs0hs75v.jpg" + ,"sign": "在自己实力不济的时候,不要去相信什么媒体和记者。他们不是善良的人,有时候候他们的采访对当事人而言就是陷阱" + },{ + "username": "刘涛tamia" + ,"id": "100001222" + ,"avatar": "//tva4.sinaimg.cn/crop.0.1.1125.1125.180/475bb144jw8f9nwebnuhkj20v90vbwh9.jpg" + ,"sign": "如约而至,不负姊妹欢乐颂" + },{ + "username": "大鱼_MsYuyu" + ,"id": "12123454" + ,"avatar": "//tva2.sinaimg.cn/crop.0.0.512.512.180/005LMAegjw8f2bp9qg4mrj30e80e8dg5.jpg" + ,"sign": "我瘋了!這也太準了吧 超級笑點低" + },{ + "username": "谢楠" + ,"id": "10034001" + ,"avatar": "//tva2.sinaimg.cn/crop.1.0.747.747.180/633f068fjw8f9h040n951j20ku0kr74t.jpg" + ,"sign": "" + },{ + "username": "柏雪近在它香" + ,"id": "3435343" + ,"avatar": "//tva2.sinaimg.cn/crop.0.8.751.751.180/961a9be5jw8fczq7q98i7j20kv0lcwfn.jpg" + ,"sign": "" + },{ + "username": "林心如" + ,"id": "76543" + ,"avatar": "//tva3.sinaimg.cn/crop.0.0.512.512.180/48f122e6jw8fcmi072lkyj20e80e8t9i.jpg" + ,"sign": "我爱贤心" + },{ + "username": "佟丽娅" + ,"id": "4803920" + ,"avatar": "//tva3.sinaimg.cn/crop.0.0.750.750.180/5033b6dbjw8etqysyifpkj20ku0kuwfw.jpg" + ,"sign": "我也爱贤心吖吖啊" + }] + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/mall/order.js b/public/static/layui-admin/dist/layuiadmin/json/mall/order.js new file mode 100755 index 0000000..db636c1 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/mall/order.js @@ -0,0 +1,42 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "invoice": "X123565541" + ,"username": "张小三" + ,"orderDate": "2017-11-10" + ,"amount": 800 + ,"status": 1 + },{ + "invoice": "X123565542" + ,"username": "李小四" + ,"orderDate": "2017-11-10" + ,"amount": 800 + ,"status": 0 + },{ + "invoice": "X123565543" + ,"username": "王老五" + ,"orderDate": "2017-11-10" + ,"amount": 800 + ,"status": 1 + },{ + "invoice": "X123565544" + ,"username": "赵小六" + ,"orderDate": "2017-11-09" + ,"amount": 1600 + ,"status": 1 + },{ + "invoice": "X123565545" + ,"username": "孙小七" + ,"orderDate": "2017-11-09" + ,"amount": 1600 + ,"status": -1 + },{ + "invoice": "X123565546" + ,"username": "周小八" + ,"orderDate": "2017-11-08" + ,"amount": 2600 + ,"status": 1 + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/menu.js b/public/static/layui-admin/dist/layuiadmin/json/menu.js new file mode 100755 index 0000000..a943974 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/menu.js @@ -0,0 +1,227 @@ +{ + "code": 1 + ,"msg": "" + ,"data": [{ + "name": "component" + ,"title": "组件" + ,"icon": "layui-icon-component" + ,"list": [{ + "name": "grid" + ,"title": "栅格" + ,"list": [{ + "name": "list" + ,"title": "等比例列表排列" + },{ + "name": "mobile" + ,"title": "按移动端排列" + },{ + "name": "mobile-pc" + ,"title": "移动桌面端组合" + },{ + "name": "all" + ,"title": "全端复杂组合" + },{ + "name": "stack" + ,"title": "低于桌面堆叠排列" + },{ + "name": "speed-dial" + ,"title": "九宫格" + }] + }, { + "name": "button" + ,"title": "按钮" + }, { + "name": "form" + ,"title": "表单" + ,"list": [{ + "name": "element" + ,"title": "表单元素" + },{ + "name": "group" + ,"title": "表单组合" + }] + }, { + "name": "nav" + ,"title": "导航" + }, { + "name": "tabs" + ,"title": "选项卡" + }, { + "name": "progress" + ,"title": "进度条" + }, { + "name": "panel" + ,"title": "面板" + }, { + "name": "badge" + ,"title": "徽章" + }, { + "name": "timeline" + ,"title": "时间线" + }, { + "name": "anim" + ,"title": "动画" + }, { + "name": "auxiliar" + ,"title": "辅助" + }, { + "name": "layer" + ,"title": "通用弹层" + ,"list": [{ + "name": "list" + ,"title": "功能演示" + },{ + "name": "special-demo" + ,"title": "特殊示例" + },{ + "name": "theme" + ,"title": "风格定制" + }] + }, { + "name": "laydate" + ,"title": "日期时间" + }, { + "name": "table" + ,"title": "表格" + }, { + "name": "laypage" + ,"title": "分页" + }, { + "name": "upload" + ,"title": "上传" + }, { + "name": "carousel" + ,"title": "轮播" + }, { + "name": "laytpl" + ,"title": "模板引擎" + }, { + "name": "flow" + ,"title": "流加载" + }, { + "name": "util" + ,"title": "工具" + }, { + "name": "code" + ,"title": "代码修饰" + }, { + "name": "layim" + ,"title": "即时聊天" + ,"jump": "senior/im/" + }] + }, { + "name": "template" + ,"title": "模板" + ,"icon": "layui-icon-template" + ,"list": [{ + "name": "user" + ,"title": "用户相关" + ,"spread": true + ,"list": [{ + "name": "reg" + ,"title": "注册" + ,"jump": "user/reg" + },{ + "name": "login" + ,"title": "登入" + ,"jump": "user/login" + },{ + "name": "forget" + ,"title": "忘记密码" + ,"jump": "user/forget" + }] + }, { + "name": "tips" + ,"title": "提示页面" + ,"spread": true + ,"list": [{ + "name": "404" + ,"title": "404" + },{ + "name": "error" + ,"title": "错误提示" + }] + }, { + "name": "" + ,"title": "内嵌页面" + ,"spread": true + ,"list": [{ + "name": "" + ,"title": "百度一下" + ,"jump": "/iframe/link/baidu" + }, { + "name": "" + ,"title": "layui官网" + ,"jump": "/iframe/link/layui" + }, { + "name": "" + ,"title": "layuiAdmin官网" + ,"jump": "/iframe/link/layuiAdmin" + }] + }] + }, { + "name": "app" + ,"title": "应用" + ,"icon": "layui-icon-app" + ,"list": [{ + "name": "message" + ,"title": "消息中心" + }] + }, { + "name": "senior" + ,"title": "高级" + ,"icon": "layui-icon-senior" + ,"list": [{ + "name": "im" + ,"title": "通讯系统" + }] + }, { + "name": "user" + ,"title": "用户" + ,"icon": "layui-icon-user" + ,"list": [{ + "name": "user" + ,"title": "用户" + ,"spread": true + ,"list": [{ + "name": "list" + ,"title": "用户列表" + }] + },{ + "name": "administrators" + ,"title": "后台管理组" + ,"spread": true + ,"list": [{ + "name": "list" + ,"title": "管理员列表" + },{ + "name": "role" + ,"title": "角色管理" + }] + }] + }, { + "name": "set" + ,"title": "设置" + ,"icon": "layui-icon-set" + ,"list": [{ + "name": "base" + ,"title": "基本设置" + ,"spread": true + ,"list": [{ + "name": "website" + ,"title": "系统设置" + },{ + "name": "email" + ,"title": "邮件服务" + }] + },{ + "name": "security" + ,"title": "安全设置" + }] + }, { + "name": "get" + ,"title": "授权" + ,"icon": "layui-icon-auz" + ,"jump": "system/get" + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/message/all.js b/public/static/layui-admin/dist/layuiadmin/json/message/all.js new file mode 100755 index 0000000..59277d8 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/message/all.js @@ -0,0 +1,46 @@ +{ + "code": 1 + ,"msg": "" + ,"count": 60 + ,"data": [{ + "id": 123 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510363800000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1507447570000 + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/message/detail.js b/public/static/layui-admin/dist/layuiadmin/json/message/detail.js new file mode 100755 index 0000000..4bbc88d --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/message/detail.js @@ -0,0 +1,10 @@ +{ + "code": 1 + ,"msg": "" + ,"data": { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"content": "

    一直以来,layui 秉承无偿开源的初心,虔诚致力于服务各层次前后端 Web 开发者,在商业横飞的当今时代,这一信念从未动摇。即便身单力薄,仍然重拾决心,埋头造轮,以尽可能地填补产品本身的缺口。在过去的一段的时间,我一直在寻求持久之道,已维持你眼前所见的一切。而 layuiAdmin 是我们尝试解决的手段之一。我相信真正有爱于 layui 生态的你,定然不会错过这一拥抱吧。

    子曰:君子不用防,小人防不住。请务必通过官网正规渠道,获得 layuiAdmin!

    —— 贤心(layui.com)

    " + ,"time": 1510363800000 + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/message/direct.js b/public/static/layui-admin/dist/layuiadmin/json/message/direct.js new file mode 100755 index 0000000..52ea860 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/message/direct.js @@ -0,0 +1,46 @@ +{ + "code": 1 + ,"msg": "" + ,"count": 60 + ,"data": [{ + "id": 123 + ,"title": "贤心发来了一段私信" + ,"time": 1510363800000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "贤心发来了一段私信" + ,"time": 1507447570000 + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/message/new.js b/public/static/layui-admin/dist/layuiadmin/json/message/new.js new file mode 100755 index 0000000..95af9bb --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/message/new.js @@ -0,0 +1,7 @@ +{ + "code": 1 + ,"msg": "" + ,"data": { + "newmsg": 3 + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/message/notice.js b/public/static/layui-admin/dist/layuiadmin/json/message/notice.js new file mode 100755 index 0000000..7c8b067 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/message/notice.js @@ -0,0 +1,46 @@ +{ + "code": 1 + ,"msg": "" + ,"count": 60 + ,"data": [{ + "id": 123 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510363800000 + }, { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1510212370000 + }, { + "id": 111 + ,"title": "你好新朋友,感谢使用 layuiAdmin" + ,"time": 1507447570000 + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/table/demo.js b/public/static/layui-admin/dist/layuiadmin/json/table/demo.js new file mode 100755 index 0000000..491c4f5 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/table/demo.js @@ -0,0 +1,96 @@ + +{ + "code": 1 + ,"msg": "" + ,"count": 3000000 + ,"data": [{ + "id": "10001" + ,"username": "杜甫" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "点击此处,显示更多。当内容超出时,点击单元格会自动显示更多内容。" + ,"experience": "116" + ,"ip": "192.168.0.8" + ,"logins": "108" + ,"joinTime": "2016-10-14" + }, { + "id": "10002" + ,"username": "李白" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "君不见,黄河之水天上来,奔流到海不复回。 君不见,高堂明镜悲白发,朝如青丝暮成雪。 人生得意须尽欢,莫使金樽空对月。 天生我材必有用,千金散尽还复来。 烹羊宰牛且为乐,会须一饮三百杯。 岑夫子,丹丘生,将进酒,杯莫停。 与君歌一曲,请君为我倾耳听。(倾耳听 一作:侧耳听) 钟鼓馔玉不足贵,但愿长醉不复醒。(不足贵 一作:何足贵;不复醒 一作:不愿醒/不用醒) 古来圣贤皆寂寞,惟有饮者留其名。(古来 一作:自古;惟 通:唯) 陈王昔时宴平乐,斗酒十千恣欢谑。 主人何为言少钱,径须沽取对君酌。 五花马,千金裘,呼儿将出换美酒,与尔同销万古愁。" + ,"experience": "12" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + ,"LAY_CHECKED": true + }, { + "id": "10003" + ,"username": "王勃" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "65" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10004" + ,"username": "李清照" + ,"email": "xianxin@layui.com" + ,"sex": "女" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "666" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10005" + ,"username": "冰心" + ,"email": "xianxin@layui.com" + ,"sex": "女" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "86" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10006" + ,"username": "贤心" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "12" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10007" + ,"username": "贤心" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "16" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10008" + ,"username": "贤心" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "106" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/table/demo2.js b/public/static/layui-admin/dist/layuiadmin/json/table/demo2.js new file mode 100755 index 0000000..e1d39f8 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/table/demo2.js @@ -0,0 +1,61 @@ + +{ + "code": 1 + ,"msg": "" + ,"count": 66 + ,"data": [{ + "username": "张小三" + ,"amount": 18 + ,"province": "浙江" + ,"city": "杭州" + ,"zone": "西湖区" + ,"street": "西溪街道" + ,"address": "西溪花园" + ,"house": "30栋1单元" + }, { + "username": "李小四" + ,"amount": 39 + ,"province": "江苏" + ,"city": "苏州" + ,"zone": "姑苏区" + ,"street": "丝绸路" + ,"address": "天墅之城" + ,"house": "9幢2单元" + }, { + "username": "王小五" + ,"amount": 8 + ,"province": "江西" + ,"city": "南昌" + ,"zone": "青山湖区" + ,"street": "艾溪湖办事处" + ,"address": "中兴和园" + ,"house": "1幢3单元" + }, { + "username": "赵小六" + ,"amount": 16 + ,"province": "福建" + ,"city": "泉州" + ,"zone": "丰泽区" + ,"street": "南洋街道" + ,"address": "南洋村" + ,"house": "6幢1单元" + }, { + "username": "孙小七" + ,"amount": 12 + ,"province": "湖北" + ,"city": "武汉" + ,"zone": "武昌区" + ,"street": "武昌大道" + ,"address": "两湖花园" + ,"house": "16幢2单元" + }, { + "username": "周小八" + ,"amount": 11 + ,"province": "安徽" + ,"city": "黄山" + ,"zone": "黄山区" + ,"street": "汤口镇" + ,"address": "温泉村" + ,"house": "21号" + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/table/demo3.js b/public/static/layui-admin/dist/layuiadmin/json/table/demo3.js new file mode 100755 index 0000000..93d0e65 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/table/demo3.js @@ -0,0 +1,96 @@ +{ + "status": 200 + ,"message": "" + ,"total": 8 + ,"rows": { + "item": [{ + "id": "10001" + ,"username": "杜甫" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "点击此处,显示更多。当内容超出时,点击单元格会自动显示更多内容。" + ,"experience": "116" + ,"ip": "192.168.0.8" + ,"logins": "108" + ,"joinTime": "2016-10-14" + }, { + "id": "10002" + ,"username": "李白" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "君不见,黄河之水天上来,奔流到海不复回。 君不见,高堂明镜悲白发,朝如青丝暮成雪。 人生得意须尽欢,莫使金樽空对月。 天生我材必有用,千金散尽还复来。 烹羊宰牛且为乐,会须一饮三百杯。 岑夫子,丹丘生,将进酒,杯莫停。 与君歌一曲,请君为我倾耳听。(倾耳听 一作:侧耳听) 钟鼓馔玉不足贵,但愿长醉不复醒。(不足贵 一作:何足贵;不复醒 一作:不愿醒/不用醒) 古来圣贤皆寂寞,惟有饮者留其名。(古来 一作:自古;惟 通:唯) 陈王昔时宴平乐,斗酒十千恣欢谑。 主人何为言少钱,径须沽取对君酌。 五花马,千金裘,呼儿将出换美酒,与尔同销万古愁。" + ,"experience": "12" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10003" + ,"username": "王勃" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "65" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10004" + ,"username": "李清照" + ,"email": "xianxin@layui.com" + ,"sex": "女" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "666" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10005" + ,"username": "冰心" + ,"email": "xianxin@layui.com" + ,"sex": "女" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "86" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10006" + ,"username": "贤心" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "12" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10007" + ,"username": "贤心" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "16" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }, { + "id": "10008" + ,"username": "贤心" + ,"email": "xianxin@layui.com" + ,"sex": "男" + ,"city": "浙江杭州" + ,"sign": "人生恰似一场修行" + ,"experience": "106" + ,"ip": "192.168.0.8" + ,"logins": "106" + ,"joinTime": "2016-10-14" + }] + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/table/user.js b/public/static/layui-admin/dist/layuiadmin/json/table/user.js new file mode 100755 index 0000000..240c7aa --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/table/user.js @@ -0,0 +1,2 @@ + +{"code":0,"msg":"","count":1000,"data":[{"id":10000,"username":"user-0","sex":"女","city":"城市-0","sign":"签名-0","experience":255,"logins":24,"wealth":82830700,"classify":"作家","score":57},{"id":10001,"username":"user-1","sex":"男","city":"城市-1","sign":"签名-1","experience":884,"logins":58,"wealth":64928690,"classify":"词人","score":27},{"id":10002,"username":"user-2","sex":"女","city":"城市-2","sign":"签名-2","experience":650,"logins":77,"wealth":6298078,"classify":"酱油","score":31},{"id":10003,"username":"user-3","sex":"女","city":"城市-3","sign":"签名-3","experience":362,"logins":157,"wealth":37117017,"classify":"诗人","score":68},{"id":10004,"username":"user-4","sex":"男","city":"城市-4","sign":"签名-4","experience":807,"logins":51,"wealth":76263262,"classify":"作家","score":6},{"id":10005,"username":"user-5","sex":"女","city":"城市-5","sign":"签名-5","experience":173,"logins":68,"wealth":60344147,"classify":"作家","score":87},{"id":10006,"username":"user-6","sex":"女","city":"城市-6","sign":"签名-6","experience":982,"logins":37,"wealth":57768166,"classify":"作家","score":34},{"id":10007,"username":"user-7","sex":"男","city":"城市-7","sign":"签名-7","experience":727,"logins":150,"wealth":82030578,"classify":"作家","score":28},{"id":10008,"username":"user-8","sex":"男","city":"城市-8","sign":"签名-8","experience":951,"logins":133,"wealth":16503371,"classify":"词人","score":14},{"id":10009,"username":"user-9","sex":"女","city":"城市-9","sign":"签名-9","experience":484,"logins":25,"wealth":86801934,"classify":"词人","score":75}]} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/table/user30.js b/public/static/layui-admin/dist/layuiadmin/json/table/user30.js new file mode 100755 index 0000000..0246bbd --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/table/user30.js @@ -0,0 +1,2 @@ + +{"code":0,"msg":"","count":1000,"data":[{"id":10000,"username":"user-0","sex":"女","city":"城市-0","sign":"签名-0","experience":255,"logins":24,"wealth":82830700,"classify":"作家","score":57},{"id":10001,"username":"user-1","sex":"男","city":"城市-1","sign":"签名-1","experience":884,"logins":58,"wealth":64928690,"classify":"词人","score":27},{"id":10002,"username":"user-2","sex":"女","city":"城市-2","sign":"签名-2","experience":650,"logins":77,"wealth":6298078,"classify":"酱油","score":31},{"id":10003,"username":"user-3","sex":"女","city":"城市-3","sign":"签名-3","experience":362,"logins":157,"wealth":37117017,"classify":"诗人","score":68},{"id":10004,"username":"user-4","sex":"男","city":"城市-4","sign":"签名-4","experience":807,"logins":51,"wealth":76263262,"classify":"作家","score":6},{"id":10005,"username":"user-5","sex":"女","city":"城市-5","sign":"签名-5","experience":173,"logins":68,"wealth":60344147,"classify":"作家","score":87},{"id":10006,"username":"user-6","sex":"女","city":"城市-6","sign":"签名-6","experience":982,"logins":37,"wealth":57768166,"classify":"作家","score":34},{"id":10007,"username":"user-7","sex":"男","city":"城市-7","sign":"签名-7","experience":727,"logins":150,"wealth":82030578,"classify":"作家","score":28},{"id":10008,"username":"user-8","sex":"男","city":"城市-8","sign":"签名-8","experience":951,"logins":133,"wealth":16503371,"classify":"词人","score":14},{"id":10009,"username":"user-9","sex":"女","city":"城市-9","sign":"签名-9","experience":484,"logins":25,"wealth":86801934,"classify":"词人","score":75},{"id":10010,"username":"user-10","sex":"女","city":"城市-10","sign":"签名-10","experience":1016,"logins":182,"wealth":71294671,"classify":"诗人","score":34},{"id":10011,"username":"user-11","sex":"女","city":"城市-11","sign":"签名-11","experience":492,"logins":107,"wealth":8062783,"classify":"诗人","score":6},{"id":10012,"username":"user-12","sex":"女","city":"城市-12","sign":"签名-12","experience":106,"logins":176,"wealth":42622704,"classify":"词人","score":54},{"id":10013,"username":"user-13","sex":"男","city":"城市-13","sign":"签名-13","experience":1047,"logins":94,"wealth":59508583,"classify":"诗人","score":63},{"id":10014,"username":"user-14","sex":"男","city":"城市-14","sign":"签名-14","experience":873,"logins":116,"wealth":72549912,"classify":"词人","score":8},{"id":10015,"username":"user-15","sex":"女","city":"城市-15","sign":"签名-15","experience":1068,"logins":27,"wealth":52737025,"classify":"作家","score":28},{"id":10016,"username":"user-16","sex":"女","city":"城市-16","sign":"签名-16","experience":862,"logins":168,"wealth":37069775,"classify":"酱油","score":86},{"id":10017,"username":"user-17","sex":"女","city":"城市-17","sign":"签名-17","experience":1060,"logins":187,"wealth":66099525,"classify":"作家","score":69},{"id":10018,"username":"user-18","sex":"女","city":"城市-18","sign":"签名-18","experience":866,"logins":88,"wealth":81722326,"classify":"词人","score":74},{"id":10019,"username":"user-19","sex":"女","city":"城市-19","sign":"签名-19","experience":682,"logins":106,"wealth":68647362,"classify":"词人","score":51},{"id":10020,"username":"user-20","sex":"男","city":"城市-20","sign":"签名-20","experience":770,"logins":24,"wealth":92420248,"classify":"诗人","score":87},{"id":10021,"username":"user-21","sex":"男","city":"城市-21","sign":"签名-21","experience":184,"logins":131,"wealth":71566045,"classify":"词人","score":99},{"id":10022,"username":"user-22","sex":"男","city":"城市-22","sign":"签名-22","experience":739,"logins":152,"wealth":60907929,"classify":"作家","score":18},{"id":10023,"username":"user-23","sex":"女","city":"城市-23","sign":"签名-23","experience":127,"logins":82,"wealth":14765943,"classify":"作家","score":30},{"id":10024,"username":"user-24","sex":"女","city":"城市-24","sign":"签名-24","experience":212,"logins":133,"wealth":59011052,"classify":"词人","score":76},{"id":10025,"username":"user-25","sex":"女","city":"城市-25","sign":"签名-25","experience":938,"logins":182,"wealth":91183097,"classify":"作家","score":69},{"id":10026,"username":"user-26","sex":"男","city":"城市-26","sign":"签名-26","experience":978,"logins":7,"wealth":48008413,"classify":"作家","score":65},{"id":10027,"username":"user-27","sex":"女","city":"城市-27","sign":"签名-27","experience":371,"logins":44,"wealth":64419691,"classify":"诗人","score":60},{"id":10028,"username":"user-28","sex":"女","city":"城市-28","sign":"签名-28","experience":977,"logins":21,"wealth":75935022,"classify":"作家","score":37},{"id":10029,"username":"user-29","sex":"男","city":"城市-29","sign":"签名-29","experience":647,"logins":107,"wealth":97450636,"classify":"酱油","score":27}]} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/upload/demo.js b/public/static/layui-admin/dist/layuiadmin/json/upload/demo.js new file mode 100755 index 0000000..2d26705 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/upload/demo.js @@ -0,0 +1,7 @@ +{ + "code": 1, + "msg": "", + "data": { + "src": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/user/forget.js b/public/static/layui-admin/dist/layuiadmin/json/user/forget.js new file mode 100755 index 0000000..9413c0c --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/user/forget.js @@ -0,0 +1,7 @@ +{ + "code": 1 + ,"msg": "注册成功" + ,"data": { + + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/user/login.js b/public/static/layui-admin/dist/layuiadmin/json/user/login.js new file mode 100755 index 0000000..8a0248d --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/user/login.js @@ -0,0 +1,7 @@ +{ + "code": 1 + ,"msg": "登入成功" + ,"data": { + "access_token": "c262e61cd13ad99fc650e6908c7e5e65b63d2f32185ecfed6b801ee3fbdd5c0a" + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/user/logout.js b/public/static/layui-admin/dist/layuiadmin/json/user/logout.js new file mode 100755 index 0000000..f16b30d --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/user/logout.js @@ -0,0 +1,5 @@ +{ + "code": 1 + ,"msg": "退出成功" + ,"data": null +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/user/reg.js b/public/static/layui-admin/dist/layuiadmin/json/user/reg.js new file mode 100755 index 0000000..9413c0c --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/user/reg.js @@ -0,0 +1,7 @@ +{ + "code": 1 + ,"msg": "注册成功" + ,"data": { + + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/user/resetpass.js b/public/static/layui-admin/dist/layuiadmin/json/user/resetpass.js new file mode 100755 index 0000000..9413c0c --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/user/resetpass.js @@ -0,0 +1,7 @@ +{ + "code": 1 + ,"msg": "注册成功" + ,"data": { + + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/user/session.js b/public/static/layui-admin/dist/layuiadmin/json/user/session.js new file mode 100755 index 0000000..498e5b5 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/user/session.js @@ -0,0 +1,9 @@ +{ + "code": 1 + ,"msg": "" + ,"data": { + "username": "贤心" + ,"sex": "男" + ,"role": 1 + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/user/sms.js b/public/static/layui-admin/dist/layuiadmin/json/user/sms.js new file mode 100755 index 0000000..9413c0c --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/user/sms.js @@ -0,0 +1,7 @@ +{ + "code": 1 + ,"msg": "注册成功" + ,"data": { + + } +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/useradmin/mangadmin.js b/public/static/layui-admin/dist/layuiadmin/json/useradmin/mangadmin.js new file mode 100755 index 0000000..0203e02 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/useradmin/mangadmin.js @@ -0,0 +1,78 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "id": "1001" + ,"loginname": "admin" + ,"telphone": "11111111111" + ,"email": "111@qq.com" + ,"role": "超级管理员" + ,"jointime": "20150217" + ,"check": true + },{ + "id": "1002" + ,"loginname": "common-1" + ,"telphone": "22222222222" + ,"email": "222@qq.com" + ,"role": "管理员" + ,"jointime": "20160217" + ,"check": false + },{ + "id": "1003" + ,"loginname": "common-2" + ,"telphone": "33333333333" + ,"email": "333@qq.com" + ,"role": "管理员" + ,"jointime": "20161012" + ,"check": false + },{ + "id": "1004" + ,"loginname": "common-3" + ,"telphone": "44444444444" + ,"email": "444@qq.com" + ,"role": "管理员" + ,"jointime": "20170518" + ,"check": true + },{ + "id": "1005" + ,"loginname": "common-4" + ,"telphone": "55555555555" + ,"email": "555@qq.com" + ,"role": "管理员" + ,"jointime": "20180101" + ,"check": false + },{ + "id": "1006" + ,"loginname": "common-5" + ,"telphone": "66666666666" + ,"email": "666@qq.com" + ,"role": "管理员" + ,"jointime": "20160217" + ,"check": false + },{ + "id": "1007" + ,"loginname": "common-6" + ,"telphone": "77777777777" + ,"email": "777@qq.com" + ,"role": "管理员" + ,"jointime": "20161012" + ,"check": false + },{ + "id": "1008" + ,"loginname": "common-7" + ,"telphone": "88888888888" + ,"email": "888@qq.com" + ,"role": "管理员" + ,"jointime": "20170518" + ,"check": true + },{ + "id": "1009" + ,"loginname": "common-8" + ,"telphone": "99999999999" + ,"email": "999@qq.com" + ,"role": "管理员" + ,"jointime": "20180101" + ,"check": false + }] +} diff --git a/public/static/layui-admin/dist/layuiadmin/json/useradmin/role.js b/public/static/layui-admin/dist/layuiadmin/json/useradmin/role.js new file mode 100755 index 0000000..d766d1e --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/useradmin/role.js @@ -0,0 +1,54 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "id": "1" + ,"rolename": "超级管理员" + ,"limits": "管理所有的管理员" + ,"descr": "拥有至高无上的权利" + ,"check": true + },{ + "id": "2" + ,"rolename": "管理员" + ,"limits": "所有列表的管理" + ,"descr": "事情很多,权力很大" + ,"check": true + },{ + "id": "3" + ,"rolename": "文章撰写员" + ,"limits": "负责文章的编写" + ,"descr": "文采第一的人才集合" + ,"check": false + },{ + "id": "4" + ,"rolename": "纠错员" + ,"limits": "负责文章内容的修改" + ,"descr": "暂无" + ,"check": false + },{ + "id": "5" + ,"rolename": "统计人员" + ,"limits": "对数据进行统计" + ,"descr": "暂无" + ,"check": false + },{ + "id": "6" + ,"rolename": "评估员" + ,"limits": "对统计数据进行评估" + ,"descr": "及时捕捉市场发展动态" + ,"check": false + },{ + "id": "7" + ,"rolename": "采购员" + ,"limits": "负责员工的伙食" + ,"descr": "暂无" + ,"check": false + },{ + "id": "8" + ,"rolename": "推销员" + ,"limits": "介绍销售公司产品" + ,"descr": "暂无" + ,"check": false + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/useradmin/webuser.js b/public/static/layui-admin/dist/layuiadmin/json/useradmin/webuser.js new file mode 100755 index 0000000..b316158 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/useradmin/webuser.js @@ -0,0 +1,143 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "id": "001" + ,"username": "用户-1" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20171204 + },{ + "id": "002" + ,"username": "用户-2" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20171204 + },{ + "id": "003" + ,"username": "用户-3" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "女" + ,"ip": "1111111" + ,"jointime": 20171011 + ,"LAY_CHECKED": true + },{ + "id": "004" + ,"username": "用户-4" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20160505 + },{ + "id": "005" + ,"username": "用户-5" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20171204 + },{ + "id": "006" + ,"username": "用户-6" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20171204 + },{ + "id": "007" + ,"username": "用户-7" + ,"avatar": "https://wx3.sinaimg.cn/mw690/5db11ff4gy1fmx4keca8ag208g06iglw.gif" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20180210 + },{ + "id": "008" + ,"username": "用户-8" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "女" + ,"ip": "1111111" + ,"jointime": 20171204 + },{ + "id": "009" + ,"username": "用户-9" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "女" + ,"ip": "1111111" + ,"jointime": 20171204 + },{ + "id": "010" + ,"username": "用户-10" + ,"avatar": "https://wx4.sinaimg.cn/mw1024/5db11ff4gy1fmx4keaw9pj20dw08caa4.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20170719 + },{ + "id": "011" + ,"username": "用户-11" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20171204 + },{ + "id": "012" + ,"username": "用户-12" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "女" + ,"ip": "1111111" + ,"jointime": 20171204 + },{ + "id": "013" + ,"username": "用户-13" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "女" + ,"ip": "1111111" + ,"jointime": 20171204 + ,"LAY_CHECKED": true + },{ + "id": "014" + ,"username": "用户-14" + ,"avatar": "https://wx3.sinaimg.cn/mw690/5db11ff4gy1fmx4keca8ag208g06iglw.gif" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20171204 + },{ + "id": "015" + ,"username": "用户-15" + ,"avatar": "https://wx2.sinaimg.cn/mw690/5db11ff4gy1fmx4kec5bvj20eb0h3mxh.jpg" + ,"phone": 12345678901 + ,"email": "11111@qq.com" + ,"sex": "男" + ,"ip": "1111111" + ,"jointime": 20171204 + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/workorder/demo.js b/public/static/layui-admin/dist/layuiadmin/json/workorder/demo.js new file mode 100755 index 0000000..67a8648 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/workorder/demo.js @@ -0,0 +1,78 @@ +{ + "code": 1 + ,"msg": "" + ,"count": "100" + ,"data": [{ + "orderid": 111 + ,"title": "移动支付踏入马来西亚,聚合支付紧随其后" + ,"attr": "公告" + ,"progress": "25%" + ,"submit": "贤心" + ,"accept": "员工-1" + ,"state": "处理中" + },{ + "orderid": 222 + ,"title": "凡科拖拽式免费建站神器,享双重优惠!" + ,"attr": "讨论" + ,"progress": "100%" + ,"submit": "猫吃" + ,"accept": "员工-1" + ,"state": "已处理" + },{ + "orderid": 333 + ,"title": "看着别人的老板给员工送汽车有感" + ,"attr": "分享" + ,"progress": "0%" + ,"submit": "纸飞机" + ,"accept": "" + ,"state": "未分配" + },{ + "orderid": 444 + ,"title": "DISCUZ的云平台应该彻底完了" + ,"attr": "提问" + ,"progress": "0%" + ,"submit": "纸飞机" + ,"accept": "" + ,"state": "未分配" + },{ + "orderid": 555 + ,"title": "现在个人网站还有必要长期坚持下去吗?" + ,"attr": "提问" + ,"progress": "50%" + ,"submit": "纸飞机" + ,"accept": "员工-2" + ,"state": "处理中" + },{ + "orderid": 666 + ,"title": "向北京公安局投诉了京东商城" + ,"attr": "公告" + ,"progress": "25%" + ,"submit": "纸飞机" + ,"accept": "员工-3" + ,"state": "处理中" + },{ + "orderid": 777 + ,"title": "游戏 网页美工,一个月多少工资才正常?" + ,"attr": "提问" + ,"progress": "100%" + ,"submit": "纸飞机" + ,"accept": "员工-1" + ,"state": "已处理" + },{ + "orderid": 888 + ,"title": "几年没来了,蓝色理想帖子这么少了啊" + ,"attr": "提问" + ,"progress": "0%" + ,"submit": "纸飞机" + ,"accept": "" + ,"state": "未分配" + },{ + "orderid": 999 + ,"title": "我的天,求推荐靠谱的学习网站" + ,"attr": "提问" + ,"progress": "50%" + ,"submit": "纸飞机" + ,"accept": "员工-2" + ,"state": "处理中" + }] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/json/หตร๗.txt b/public/static/layui-admin/dist/layuiadmin/json/หตร๗.txt new file mode 100755 index 0000000..ff402e5 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/json/หตร๗.txt @@ -0,0 +1,3 @@ + +注意:这里是模拟的数据。 +实际应用时,请在模板文件(.html)中的 lay-url="" 和其它相关接口的 url 设置成你真实的接口地址 \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/layui.css b/public/static/layui-admin/dist/layuiadmin/layui/css/layui.css new file mode 100755 index 0000000..171109a --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/layui.css @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + .layui-inline,img{display:inline-block;vertical-align:middle}h1,h2,h3,h4,h5,h6{font-weight:400}.layui-edge,.layui-header,.layui-inline,.layui-main{position:relative}.layui-body,.layui-edge,.layui-elip{overflow:hidden}.layui-btn,.layui-edge,.layui-inline,img{vertical-align:middle}.layui-btn,.layui-disabled,.layui-icon,.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-elip,.layui-form-checkbox span,.layui-form-pane .layui-form-label{text-overflow:ellipsis;white-space:nowrap}.layui-breadcrumb,.layui-tree-btnGroup{visibility:hidden}blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,li,ol,p,pre,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}a:active,a:hover{outline:0}img{border:none}li{list-style:none}table{border-collapse:collapse;border-spacing:0}h4,h5,h6{font-size:100%}button,input,optgroup,option,select,textarea{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;outline:0}pre{white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;word-wrap:break-word}body{line-height:24px;font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif}hr{height:1px;margin:10px 0;border:0;clear:both}a{color:#333;text-decoration:none}a:hover{color:#777}a cite{font-style:normal;*cursor:pointer}.layui-border-box,.layui-border-box *{box-sizing:border-box}.layui-box,.layui-box *{box-sizing:content-box}.layui-clear{clear:both;*zoom:1}.layui-clear:after{content:'\20';clear:both;*zoom:1;display:block;height:0}.layui-inline{*display:inline;*zoom:1}.layui-edge{display:inline-block;width:0;height:0;border-width:6px;border-style:dashed;border-color:transparent}.layui-edge-top{top:-4px;border-bottom-color:#999;border-bottom-style:solid}.layui-edge-right{border-left-color:#999;border-left-style:solid}.layui-edge-bottom{top:2px;border-top-color:#999;border-top-style:solid}.layui-edge-left{border-right-color:#999;border-right-style:solid}.layui-disabled,.layui-disabled:hover{color:#d2d2d2!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=256);src:url(../font/iconfont.eot?v=256#iefix) format('embedded-opentype'),url(../font/iconfont.woff2?v=256) format('woff2'),url(../font/iconfont.woff?v=256) format('woff'),url(../font/iconfont.ttf?v=256) format('truetype'),url(../font/iconfont.svg?v=256#layui-icon) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-icon-reply-fill:before{content:"\e611"}.layui-icon-set-fill:before{content:"\e614"}.layui-icon-menu-fill:before{content:"\e60f"}.layui-icon-search:before{content:"\e615"}.layui-icon-share:before{content:"\e641"}.layui-icon-set-sm:before{content:"\e620"}.layui-icon-engine:before{content:"\e628"}.layui-icon-close:before{content:"\1006"}.layui-icon-close-fill:before{content:"\1007"}.layui-icon-chart-screen:before{content:"\e629"}.layui-icon-star:before{content:"\e600"}.layui-icon-circle-dot:before{content:"\e617"}.layui-icon-chat:before{content:"\e606"}.layui-icon-release:before{content:"\e609"}.layui-icon-list:before{content:"\e60a"}.layui-icon-chart:before{content:"\e62c"}.layui-icon-ok-circle:before{content:"\1005"}.layui-icon-layim-theme:before{content:"\e61b"}.layui-icon-table:before{content:"\e62d"}.layui-icon-right:before{content:"\e602"}.layui-icon-left:before{content:"\e603"}.layui-icon-cart-simple:before{content:"\e698"}.layui-icon-face-cry:before{content:"\e69c"}.layui-icon-face-smile:before{content:"\e6af"}.layui-icon-survey:before{content:"\e6b2"}.layui-icon-tree:before{content:"\e62e"}.layui-icon-ie:before{content:"\e7bb"}.layui-icon-upload-circle:before{content:"\e62f"}.layui-icon-add-circle:before{content:"\e61f"}.layui-icon-download-circle:before{content:"\e601"}.layui-icon-templeate-1:before{content:"\e630"}.layui-icon-util:before{content:"\e631"}.layui-icon-face-surprised:before{content:"\e664"}.layui-icon-edit:before{content:"\e642"}.layui-icon-speaker:before{content:"\e645"}.layui-icon-down:before{content:"\e61a"}.layui-icon-file:before{content:"\e621"}.layui-icon-layouts:before{content:"\e632"}.layui-icon-rate-half:before{content:"\e6c9"}.layui-icon-add-circle-fine:before{content:"\e608"}.layui-icon-prev-circle:before{content:"\e633"}.layui-icon-read:before{content:"\e705"}.layui-icon-404:before{content:"\e61c"}.layui-icon-carousel:before{content:"\e634"}.layui-icon-help:before{content:"\e607"}.layui-icon-code-circle:before{content:"\e635"}.layui-icon-windows:before{content:"\e67f"}.layui-icon-water:before{content:"\e636"}.layui-icon-username:before{content:"\e66f"}.layui-icon-find-fill:before{content:"\e670"}.layui-icon-about:before{content:"\e60b"}.layui-icon-location:before{content:"\e715"}.layui-icon-up:before{content:"\e619"}.layui-icon-pause:before{content:"\e651"}.layui-icon-date:before{content:"\e637"}.layui-icon-layim-uploadfile:before{content:"\e61d"}.layui-icon-delete:before{content:"\e640"}.layui-icon-play:before{content:"\e652"}.layui-icon-top:before{content:"\e604"}.layui-icon-firefox:before{content:"\e686"}.layui-icon-friends:before{content:"\e612"}.layui-icon-refresh-3:before{content:"\e9aa"}.layui-icon-ok:before{content:"\e605"}.layui-icon-layer:before{content:"\e638"}.layui-icon-face-smile-fine:before{content:"\e60c"}.layui-icon-dollar:before{content:"\e659"}.layui-icon-group:before{content:"\e613"}.layui-icon-layim-download:before{content:"\e61e"}.layui-icon-picture-fine:before{content:"\e60d"}.layui-icon-link:before{content:"\e64c"}.layui-icon-diamond:before{content:"\e735"}.layui-icon-log:before{content:"\e60e"}.layui-icon-key:before{content:"\e683"}.layui-icon-rate-solid:before{content:"\e67a"}.layui-icon-fonts-del:before{content:"\e64f"}.layui-icon-unlink:before{content:"\e64d"}.layui-icon-fonts-clear:before{content:"\e639"}.layui-icon-triangle-r:before{content:"\e623"}.layui-icon-circle:before{content:"\e63f"}.layui-icon-radio:before{content:"\e643"}.layui-icon-align-center:before{content:"\e647"}.layui-icon-align-right:before{content:"\e648"}.layui-icon-align-left:before{content:"\e649"}.layui-icon-loading-1:before{content:"\e63e"}.layui-icon-return:before{content:"\e65c"}.layui-icon-fonts-strong:before{content:"\e62b"}.layui-icon-upload:before{content:"\e67c"}.layui-icon-dialogue:before{content:"\e63a"}.layui-icon-video:before{content:"\e6ed"}.layui-icon-headset:before{content:"\e6fc"}.layui-icon-cellphone-fine:before{content:"\e63b"}.layui-icon-add-1:before{content:"\e654"}.layui-icon-face-smile-b:before{content:"\e650"}.layui-icon-fonts-html:before{content:"\e64b"}.layui-icon-screen-full:before{content:"\e622"}.layui-icon-form:before{content:"\e63c"}.layui-icon-cart:before{content:"\e657"}.layui-icon-camera-fill:before{content:"\e65d"}.layui-icon-tabs:before{content:"\e62a"}.layui-icon-heart-fill:before{content:"\e68f"}.layui-icon-fonts-code:before{content:"\e64e"}.layui-icon-ios:before{content:"\e680"}.layui-icon-at:before{content:"\e687"}.layui-icon-fire:before{content:"\e756"}.layui-icon-set:before{content:"\e716"}.layui-icon-fonts-u:before{content:"\e646"}.layui-icon-triangle-d:before{content:"\e625"}.layui-icon-tips:before{content:"\e702"}.layui-icon-picture:before{content:"\e64a"}.layui-icon-more-vertical:before{content:"\e671"}.layui-icon-bluetooth:before{content:"\e689"}.layui-icon-flag:before{content:"\e66c"}.layui-icon-loading:before{content:"\e63d"}.layui-icon-fonts-i:before{content:"\e644"}.layui-icon-refresh-1:before{content:"\e666"}.layui-icon-rmb:before{content:"\e65e"}.layui-icon-addition:before{content:"\e624"}.layui-icon-home:before{content:"\e68e"}.layui-icon-time:before{content:"\e68d"}.layui-icon-user:before{content:"\e770"}.layui-icon-notice:before{content:"\e667"}.layui-icon-chrome:before{content:"\e68a"}.layui-icon-edge:before{content:"\e68b"}.layui-icon-login-weibo:before{content:"\e675"}.layui-icon-voice:before{content:"\e688"}.layui-icon-upload-drag:before{content:"\e681"}.layui-icon-login-qq:before{content:"\e676"}.layui-icon-snowflake:before{content:"\e6b1"}.layui-icon-heart:before{content:"\e68c"}.layui-icon-logout:before{content:"\e682"}.layui-icon-file-b:before{content:"\e655"}.layui-icon-template:before{content:"\e663"}.layui-icon-transfer:before{content:"\e691"}.layui-icon-auz:before{content:"\e672"}.layui-icon-console:before{content:"\e665"}.layui-icon-app:before{content:"\e653"}.layui-icon-prev:before{content:"\e65a"}.layui-icon-website:before{content:"\e7ae"}.layui-icon-next:before{content:"\e65b"}.layui-icon-component:before{content:"\e857"}.layui-icon-android:before{content:"\e684"}.layui-icon-more:before{content:"\e65f"}.layui-icon-login-wechat:before{content:"\e677"}.layui-icon-shrink-right:before{content:"\e668"}.layui-icon-spread-left:before{content:"\e66b"}.layui-icon-camera:before{content:"\e660"}.layui-icon-note:before{content:"\e66e"}.layui-icon-refresh:before{content:"\e669"}.layui-icon-female:before{content:"\e661"}.layui-icon-male:before{content:"\e662"}.layui-icon-screen-restore:before{content:"\e758"}.layui-icon-password:before{content:"\e673"}.layui-icon-senior:before{content:"\e674"}.layui-icon-theme:before{content:"\e66a"}.layui-icon-tread:before{content:"\e6c5"}.layui-icon-praise:before{content:"\e6c6"}.layui-icon-star-fill:before{content:"\e658"}.layui-icon-rate:before{content:"\e67b"}.layui-icon-template-1:before{content:"\e656"}.layui-icon-vercode:before{content:"\e679"}.layui-icon-service:before{content:"\e626"}.layui-icon-cellphone:before{content:"\e678"}.layui-icon-print:before{content:"\e66d"}.layui-icon-cols:before{content:"\e610"}.layui-icon-wifi:before{content:"\e7e0"}.layui-icon-export:before{content:"\e67d"}.layui-icon-rss:before{content:"\e808"}.layui-icon-slider:before{content:"\e714"}.layui-icon-email:before{content:"\e618"}.layui-icon-subtraction:before{content:"\e67e"}.layui-icon-mike:before{content:"\e6dc"}.layui-icon-light:before{content:"\e748"}.layui-icon-gift:before{content:"\e627"}.layui-icon-mute:before{content:"\e685"}.layui-icon-reduce-circle:before{content:"\e616"}.layui-icon-music:before{content:"\e690"}.layui-main{width:1140px;margin:0 auto}.layui-header{z-index:1000;height:60px}.layui-header a:hover{transition:all .5s;-webkit-transition:all .5s}.layui-side{position:fixed;left:0;top:0;bottom:0;z-index:999;width:200px;overflow-x:hidden}.layui-side-scroll{position:relative;width:220px;height:100%;overflow-x:hidden}.layui-body{position:absolute;left:200px;right:0;top:0;bottom:0;z-index:998;width:auto;overflow-y:auto;box-sizing:border-box}.layui-layout-body{overflow:hidden}.layui-layout-admin .layui-header{background-color:#23262E}.layui-layout-admin .layui-side{top:60px;width:200px;overflow-x:hidden}.layui-layout-admin .layui-body{position:fixed;top:60px;bottom:44px}.layui-layout-admin .layui-main{width:auto;margin:0 15px}.layui-layout-admin .layui-footer{position:fixed;left:200px;right:0;bottom:0;height:44px;line-height:44px;padding:0 15px;background-color:#eee}.layui-layout-admin .layui-logo{position:absolute;left:0;top:0;width:200px;height:100%;line-height:60px;text-align:center;color:#009688;font-size:16px}.layui-layout-admin .layui-header .layui-nav{background:0 0}.layui-layout-left{position:absolute!important;left:200px;top:0}.layui-layout-right{position:absolute!important;right:0;top:0}.layui-container{position:relative;margin:0 auto;padding:0 15px;box-sizing:border-box}.layui-fluid{position:relative;margin:0 auto;padding:0 15px}.layui-row:after,.layui-row:before{content:'';display:block;clear:both}.layui-col-lg1,.layui-col-lg10,.layui-col-lg11,.layui-col-lg12,.layui-col-lg2,.layui-col-lg3,.layui-col-lg4,.layui-col-lg5,.layui-col-lg6,.layui-col-lg7,.layui-col-lg8,.layui-col-lg9,.layui-col-md1,.layui-col-md10,.layui-col-md11,.layui-col-md12,.layui-col-md2,.layui-col-md3,.layui-col-md4,.layui-col-md5,.layui-col-md6,.layui-col-md7,.layui-col-md8,.layui-col-md9,.layui-col-sm1,.layui-col-sm10,.layui-col-sm11,.layui-col-sm12,.layui-col-sm2,.layui-col-sm3,.layui-col-sm4,.layui-col-sm5,.layui-col-sm6,.layui-col-sm7,.layui-col-sm8,.layui-col-sm9,.layui-col-xs1,.layui-col-xs10,.layui-col-xs11,.layui-col-xs12,.layui-col-xs2,.layui-col-xs3,.layui-col-xs4,.layui-col-xs5,.layui-col-xs6,.layui-col-xs7,.layui-col-xs8,.layui-col-xs9{position:relative;display:block;box-sizing:border-box}.layui-col-xs1,.layui-col-xs10,.layui-col-xs11,.layui-col-xs12,.layui-col-xs2,.layui-col-xs3,.layui-col-xs4,.layui-col-xs5,.layui-col-xs6,.layui-col-xs7,.layui-col-xs8,.layui-col-xs9{float:left}.layui-col-xs1{width:8.33333333%}.layui-col-xs2{width:16.66666667%}.layui-col-xs3{width:25%}.layui-col-xs4{width:33.33333333%}.layui-col-xs5{width:41.66666667%}.layui-col-xs6{width:50%}.layui-col-xs7{width:58.33333333%}.layui-col-xs8{width:66.66666667%}.layui-col-xs9{width:75%}.layui-col-xs10{width:83.33333333%}.layui-col-xs11{width:91.66666667%}.layui-col-xs12{width:100%}.layui-col-xs-offset1{margin-left:8.33333333%}.layui-col-xs-offset2{margin-left:16.66666667%}.layui-col-xs-offset3{margin-left:25%}.layui-col-xs-offset4{margin-left:33.33333333%}.layui-col-xs-offset5{margin-left:41.66666667%}.layui-col-xs-offset6{margin-left:50%}.layui-col-xs-offset7{margin-left:58.33333333%}.layui-col-xs-offset8{margin-left:66.66666667%}.layui-col-xs-offset9{margin-left:75%}.layui-col-xs-offset10{margin-left:83.33333333%}.layui-col-xs-offset11{margin-left:91.66666667%}.layui-col-xs-offset12{margin-left:100%}@media screen and (max-width:768px){.layui-hide-xs{display:none!important}.layui-show-xs-block{display:block!important}.layui-show-xs-inline{display:inline!important}.layui-show-xs-inline-block{display:inline-block!important}}@media screen and (min-width:768px){.layui-container{width:750px}.layui-hide-sm{display:none!important}.layui-show-sm-block{display:block!important}.layui-show-sm-inline{display:inline!important}.layui-show-sm-inline-block{display:inline-block!important}.layui-col-sm1,.layui-col-sm10,.layui-col-sm11,.layui-col-sm12,.layui-col-sm2,.layui-col-sm3,.layui-col-sm4,.layui-col-sm5,.layui-col-sm6,.layui-col-sm7,.layui-col-sm8,.layui-col-sm9{float:left}.layui-col-sm1{width:8.33333333%}.layui-col-sm2{width:16.66666667%}.layui-col-sm3{width:25%}.layui-col-sm4{width:33.33333333%}.layui-col-sm5{width:41.66666667%}.layui-col-sm6{width:50%}.layui-col-sm7{width:58.33333333%}.layui-col-sm8{width:66.66666667%}.layui-col-sm9{width:75%}.layui-col-sm10{width:83.33333333%}.layui-col-sm11{width:91.66666667%}.layui-col-sm12{width:100%}.layui-col-sm-offset1{margin-left:8.33333333%}.layui-col-sm-offset2{margin-left:16.66666667%}.layui-col-sm-offset3{margin-left:25%}.layui-col-sm-offset4{margin-left:33.33333333%}.layui-col-sm-offset5{margin-left:41.66666667%}.layui-col-sm-offset6{margin-left:50%}.layui-col-sm-offset7{margin-left:58.33333333%}.layui-col-sm-offset8{margin-left:66.66666667%}.layui-col-sm-offset9{margin-left:75%}.layui-col-sm-offset10{margin-left:83.33333333%}.layui-col-sm-offset11{margin-left:91.66666667%}.layui-col-sm-offset12{margin-left:100%}}@media screen and (min-width:992px){.layui-container{width:970px}.layui-hide-md{display:none!important}.layui-show-md-block{display:block!important}.layui-show-md-inline{display:inline!important}.layui-show-md-inline-block{display:inline-block!important}.layui-col-md1,.layui-col-md10,.layui-col-md11,.layui-col-md12,.layui-col-md2,.layui-col-md3,.layui-col-md4,.layui-col-md5,.layui-col-md6,.layui-col-md7,.layui-col-md8,.layui-col-md9{float:left}.layui-col-md1{width:8.33333333%}.layui-col-md2{width:16.66666667%}.layui-col-md3{width:25%}.layui-col-md4{width:33.33333333%}.layui-col-md5{width:41.66666667%}.layui-col-md6{width:50%}.layui-col-md7{width:58.33333333%}.layui-col-md8{width:66.66666667%}.layui-col-md9{width:75%}.layui-col-md10{width:83.33333333%}.layui-col-md11{width:91.66666667%}.layui-col-md12{width:100%}.layui-col-md-offset1{margin-left:8.33333333%}.layui-col-md-offset2{margin-left:16.66666667%}.layui-col-md-offset3{margin-left:25%}.layui-col-md-offset4{margin-left:33.33333333%}.layui-col-md-offset5{margin-left:41.66666667%}.layui-col-md-offset6{margin-left:50%}.layui-col-md-offset7{margin-left:58.33333333%}.layui-col-md-offset8{margin-left:66.66666667%}.layui-col-md-offset9{margin-left:75%}.layui-col-md-offset10{margin-left:83.33333333%}.layui-col-md-offset11{margin-left:91.66666667%}.layui-col-md-offset12{margin-left:100%}}@media screen and (min-width:1200px){.layui-container{width:1170px}.layui-hide-lg{display:none!important}.layui-show-lg-block{display:block!important}.layui-show-lg-inline{display:inline!important}.layui-show-lg-inline-block{display:inline-block!important}.layui-col-lg1,.layui-col-lg10,.layui-col-lg11,.layui-col-lg12,.layui-col-lg2,.layui-col-lg3,.layui-col-lg4,.layui-col-lg5,.layui-col-lg6,.layui-col-lg7,.layui-col-lg8,.layui-col-lg9{float:left}.layui-col-lg1{width:8.33333333%}.layui-col-lg2{width:16.66666667%}.layui-col-lg3{width:25%}.layui-col-lg4{width:33.33333333%}.layui-col-lg5{width:41.66666667%}.layui-col-lg6{width:50%}.layui-col-lg7{width:58.33333333%}.layui-col-lg8{width:66.66666667%}.layui-col-lg9{width:75%}.layui-col-lg10{width:83.33333333%}.layui-col-lg11{width:91.66666667%}.layui-col-lg12{width:100%}.layui-col-lg-offset1{margin-left:8.33333333%}.layui-col-lg-offset2{margin-left:16.66666667%}.layui-col-lg-offset3{margin-left:25%}.layui-col-lg-offset4{margin-left:33.33333333%}.layui-col-lg-offset5{margin-left:41.66666667%}.layui-col-lg-offset6{margin-left:50%}.layui-col-lg-offset7{margin-left:58.33333333%}.layui-col-lg-offset8{margin-left:66.66666667%}.layui-col-lg-offset9{margin-left:75%}.layui-col-lg-offset10{margin-left:83.33333333%}.layui-col-lg-offset11{margin-left:91.66666667%}.layui-col-lg-offset12{margin-left:100%}}.layui-col-space1{margin:-.5px}.layui-col-space1>*{padding:.5px}.layui-col-space2{margin:-1px}.layui-col-space2>*{padding:1px}.layui-col-space4{margin:-2px}.layui-col-space4>*{padding:2px}.layui-col-space5{margin:-2.5px}.layui-col-space5>*{padding:2.5px}.layui-col-space6{margin:-3px}.layui-col-space6>*{padding:3px}.layui-col-space8{margin:-4px}.layui-col-space8>*{padding:4px}.layui-col-space10{margin:-5px}.layui-col-space10>*{padding:5px}.layui-col-space12{margin:-6px}.layui-col-space12>*{padding:6px}.layui-col-space14{margin:-7px}.layui-col-space14>*{padding:7px}.layui-col-space15{margin:-7.5px}.layui-col-space15>*{padding:7.5px}.layui-col-space16{margin:-8px}.layui-col-space16>*{padding:8px}.layui-col-space18{margin:-9px}.layui-col-space18>*{padding:9px}.layui-col-space20{margin:-10px}.layui-col-space20>*{padding:10px}.layui-col-space22{margin:-11px}.layui-col-space22>*{padding:11px}.layui-col-space24{margin:-12px}.layui-col-space24>*{padding:12px}.layui-col-space25{margin:-12.5px}.layui-col-space25>*{padding:12.5px}.layui-col-space26{margin:-13px}.layui-col-space26>*{padding:13px}.layui-col-space28{margin:-14px}.layui-col-space28>*{padding:14px}.layui-col-space30{margin:-15px}.layui-col-space30>*{padding:15px}.layui-btn,.layui-input,.layui-select,.layui-textarea,.layui-upload-button{outline:0;-webkit-appearance:none;transition:all .3s;-webkit-transition:all .3s;box-sizing:border-box}.layui-elem-quote{margin-bottom:10px;padding:15px;line-height:22px;border-left:5px solid #009688;border-radius:0 2px 2px 0;background-color:#f2f2f2}.layui-quote-nm{border-style:solid;border-width:1px 1px 1px 5px;background:0 0}.layui-elem-field{margin-bottom:10px;padding:0;border-width:1px;border-style:solid}.layui-elem-field legend{margin-left:20px;padding:0 10px;font-size:20px;font-weight:300}.layui-field-title{margin:10px 0 20px;border-width:1px 0 0}.layui-field-box{padding:10px 15px}.layui-field-title .layui-field-box{padding:10px 0}.layui-progress{position:relative;height:6px;border-radius:20px;background-color:#e2e2e2}.layui-progress-bar{position:absolute;left:0;top:0;width:0;max-width:100%;height:6px;border-radius:20px;text-align:right;background-color:#5FB878;transition:all .3s;-webkit-transition:all .3s}.layui-progress-big,.layui-progress-big .layui-progress-bar{height:18px;line-height:18px}.layui-progress-text{position:relative;top:-20px;line-height:18px;font-size:12px;color:#666}.layui-progress-big .layui-progress-text{position:static;padding:0 10px;color:#fff}.layui-collapse{border-width:1px;border-style:solid;border-radius:2px}.layui-colla-content,.layui-colla-item{border-top-width:1px;border-top-style:solid}.layui-colla-item:first-child{border-top:none}.layui-colla-title{position:relative;height:42px;line-height:42px;padding:0 15px 0 35px;color:#333;background-color:#f2f2f2;cursor:pointer;font-size:14px;overflow:hidden}.layui-colla-content{display:none;padding:10px 15px;line-height:22px;color:#666}.layui-colla-icon{position:absolute;left:15px;top:0;font-size:14px}.layui-card{margin-bottom:15px;border-radius:2px;background-color:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.layui-card:last-child{margin-bottom:0}.layui-card-header{position:relative;height:42px;line-height:42px;padding:0 15px;border-bottom:1px solid #f6f6f6;color:#333;border-radius:2px 2px 0 0;font-size:14px}.layui-bg-black,.layui-bg-blue,.layui-bg-cyan,.layui-bg-green,.layui-bg-orange,.layui-bg-red{color:#fff!important}.layui-card-body{position:relative;padding:10px 15px;line-height:24px}.layui-card-body[pad15]{padding:15px}.layui-card-body[pad20]{padding:20px}.layui-card-body .layui-table{margin:5px 0}.layui-card .layui-tab{margin:0}.layui-panel-window{position:relative;padding:15px;border-radius:0;border-top:5px solid #E6E6E6;background-color:#fff}.layui-auxiliar-moving{position:fixed;left:0;right:0;top:0;bottom:0;width:100%;height:100%;background:0 0;z-index:9999999999}.layui-form-label,.layui-form-mid,.layui-form-select,.layui-input-block,.layui-input-inline,.layui-textarea{position:relative}.layui-bg-red{background-color:#FF5722!important}.layui-bg-orange{background-color:#FFB800!important}.layui-bg-green{background-color:#009688!important}.layui-bg-cyan{background-color:#2F4056!important}.layui-bg-blue{background-color:#1E9FFF!important}.layui-bg-black{background-color:#393D49!important}.layui-bg-gray{background-color:#eee!important;color:#666!important}.layui-badge-rim,.layui-colla-content,.layui-colla-item,.layui-collapse,.layui-elem-field,.layui-form-pane .layui-form-item[pane],.layui-form-pane .layui-form-label,.layui-input,.layui-layedit,.layui-layedit-tool,.layui-quote-nm,.layui-select,.layui-tab-bar,.layui-tab-card,.layui-tab-title,.layui-tab-title .layui-this:after,.layui-textarea{border-color:#e6e6e6}.layui-timeline-item:before,hr{background-color:#e6e6e6}.layui-text{line-height:22px;font-size:14px;color:#666}.layui-text h1,.layui-text h2,.layui-text h3{font-weight:500;color:#333}.layui-text h1{font-size:30px}.layui-text h2{font-size:24px}.layui-text h3{font-size:18px}.layui-text a:not(.layui-btn){color:#01AAED}.layui-text a:not(.layui-btn):hover{text-decoration:underline}.layui-text ul{padding:5px 0 5px 15px}.layui-text ul li{margin-top:5px;list-style-type:disc}.layui-text em,.layui-word-aux{color:#999!important;padding:0 5px!important}.layui-btn{display:inline-block;height:38px;line-height:38px;padding:0 18px;background-color:#009688;color:#fff;white-space:nowrap;text-align:center;font-size:14px;border:none;border-radius:2px;cursor:pointer}.layui-btn:hover{opacity:.8;filter:alpha(opacity=80);color:#fff}.layui-btn:active{opacity:1;filter:alpha(opacity=100)}.layui-btn+.layui-btn{margin-left:10px}.layui-btn-container{font-size:0}.layui-btn-container .layui-btn{margin-right:10px;margin-bottom:10px}.layui-btn-container .layui-btn+.layui-btn{margin-left:0}.layui-table .layui-btn-container .layui-btn{margin-bottom:9px}.layui-btn-radius{border-radius:100px}.layui-btn .layui-icon{margin-right:3px;font-size:18px;vertical-align:bottom;vertical-align:middle\9}.layui-btn-primary{border:1px solid #C9C9C9;background-color:#fff;color:#555}.layui-btn-primary:hover{border-color:#009688;color:#333}.layui-btn-normal{background-color:#1E9FFF}.layui-btn-warm{background-color:#FFB800}.layui-btn-danger{background-color:#FF5722}.layui-btn-checked{background-color:#5FB878}.layui-btn-disabled,.layui-btn-disabled:active,.layui-btn-disabled:hover{border:1px solid #e6e6e6;background-color:#FBFBFB;color:#C9C9C9;cursor:not-allowed;opacity:1}.layui-btn-lg{height:44px;line-height:44px;padding:0 25px;font-size:16px}.layui-btn-sm{height:30px;line-height:30px;padding:0 10px;font-size:12px}.layui-btn-sm i{font-size:16px!important}.layui-btn-xs{height:22px;line-height:22px;padding:0 5px;font-size:12px}.layui-btn-xs i{font-size:14px!important}.layui-btn-group{display:inline-block;vertical-align:middle;font-size:0}.layui-btn-group .layui-btn{margin-left:0!important;margin-right:0!important;border-left:1px solid rgba(255,255,255,.5);border-radius:0}.layui-btn-group .layui-btn-primary{border-left:none}.layui-btn-group .layui-btn-primary:hover{border-color:#C9C9C9;color:#009688}.layui-btn-group .layui-btn:first-child{border-left:none;border-radius:2px 0 0 2px}.layui-btn-group .layui-btn-primary:first-child{border-left:1px solid #c9c9c9}.layui-btn-group .layui-btn:last-child{border-radius:0 2px 2px 0}.layui-btn-group .layui-btn+.layui-btn{margin-left:0}.layui-btn-group+.layui-btn-group{margin-left:10px}.layui-btn-fluid{width:100%}.layui-input,.layui-select,.layui-textarea{height:38px;line-height:1.3;line-height:38px\9;border-width:1px;border-style:solid;background-color:#fff;border-radius:2px}.layui-input::-webkit-input-placeholder,.layui-select::-webkit-input-placeholder,.layui-textarea::-webkit-input-placeholder{line-height:1.3}.layui-input,.layui-textarea{display:block;width:100%;padding-left:10px}.layui-input:hover,.layui-textarea:hover{border-color:#D2D2D2!important}.layui-input:focus,.layui-textarea:focus{border-color:#C9C9C9!important}.layui-textarea{min-height:100px;height:auto;line-height:20px;padding:6px 10px;resize:vertical}.layui-select{padding:0 10px}.layui-form input[type=checkbox],.layui-form input[type=radio],.layui-form select{display:none}.layui-form [lay-ignore]{display:initial}.layui-form-item{margin-bottom:15px;clear:both;*zoom:1}.layui-form-item:after{content:'\20';clear:both;*zoom:1;display:block;height:0}.layui-form-label{float:left;display:block;padding:9px 15px;width:80px;font-weight:400;line-height:20px;text-align:right}.layui-form-label-col{display:block;float:none;padding:9px 0;line-height:20px;text-align:left}.layui-form-item .layui-inline{margin-bottom:5px;margin-right:10px}.layui-input-block{margin-left:110px;min-height:36px}.layui-input-inline{display:inline-block;vertical-align:middle}.layui-form-item .layui-input-inline{float:left;width:190px;margin-right:10px}.layui-form-text .layui-input-inline{width:auto}.layui-form-mid{float:left;display:block;padding:9px 0!important;line-height:20px;margin-right:10px}.layui-form-danger+.layui-form-select .layui-input,.layui-form-danger:focus{border-color:#FF5722!important}.layui-form-select .layui-input{padding-right:30px;cursor:pointer}.layui-form-select .layui-edge{position:absolute;right:10px;top:50%;margin-top:-3px;cursor:pointer;border-width:6px;border-top-color:#c2c2c2;border-top-style:solid;transition:all .3s;-webkit-transition:all .3s}.layui-form-select dl{display:none;position:absolute;left:0;top:42px;padding:5px 0;z-index:899;min-width:100%;border:1px solid #d2d2d2;max-height:300px;overflow-y:auto;background-color:#fff;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12);box-sizing:border-box}.layui-form-select dl dd,.layui-form-select dl dt{padding:0 10px;line-height:36px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layui-form-select dl dt{font-size:12px;color:#999}.layui-form-select dl dd{cursor:pointer}.layui-form-select dl dd:hover{background-color:#f2f2f2;-webkit-transition:.5s all;transition:.5s all}.layui-form-select .layui-select-group dd{padding-left:20px}.layui-form-select dl dd.layui-select-tips{padding-left:10px!important;color:#999}.layui-form-select dl dd.layui-this{background-color:#5FB878;color:#fff}.layui-form-checkbox,.layui-form-select dl dd.layui-disabled{background-color:#fff}.layui-form-selected dl{display:block}.layui-form-checkbox,.layui-form-checkbox *,.layui-form-switch{display:inline-block;vertical-align:middle}.layui-form-selected .layui-edge{margin-top:-9px;-webkit-transform:rotate(180deg);transform:rotate(180deg);margin-top:-3px\9}:root .layui-form-selected .layui-edge{margin-top:-9px\0/IE9}.layui-form-selectup dl{top:auto;bottom:42px}.layui-select-none{margin:5px 0;text-align:center;color:#999}.layui-select-disabled .layui-disabled{border-color:#eee!important}.layui-select-disabled .layui-edge{border-top-color:#d2d2d2}.layui-form-checkbox{position:relative;height:30px;line-height:30px;margin-right:10px;padding-right:30px;cursor:pointer;font-size:0;-webkit-transition:.1s linear;transition:.1s linear;box-sizing:border-box}.layui-form-checkbox span{padding:0 10px;height:100%;font-size:14px;border-radius:2px 0 0 2px;background-color:#d2d2d2;color:#fff;overflow:hidden}.layui-form-checkbox:hover span{background-color:#c2c2c2}.layui-form-checkbox i{position:absolute;right:0;top:0;width:30px;height:28px;border:1px solid #d2d2d2;border-left:none;border-radius:0 2px 2px 0;color:#fff;font-size:20px;text-align:center}.layui-form-checkbox:hover i{border-color:#c2c2c2;color:#c2c2c2}.layui-form-checked,.layui-form-checked:hover{border-color:#5FB878}.layui-form-checked span,.layui-form-checked:hover span{background-color:#5FB878}.layui-form-checked i,.layui-form-checked:hover i{color:#5FB878}.layui-form-item .layui-form-checkbox{margin-top:4px}.layui-form-checkbox[lay-skin=primary]{height:auto!important;line-height:normal!important;min-width:18px;min-height:18px;border:none!important;margin-right:0;padding-left:28px;padding-right:0;background:0 0}.layui-form-checkbox[lay-skin=primary] span{padding-left:0;padding-right:15px;line-height:18px;background:0 0;color:#666}.layui-form-checkbox[lay-skin=primary] i{right:auto;left:0;width:16px;height:16px;line-height:16px;border:1px solid #d2d2d2;font-size:12px;border-radius:2px;background-color:#fff;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-checkbox[lay-skin=primary]:hover i{border-color:#5FB878;color:#fff}.layui-form-checked[lay-skin=primary] i{border-color:#5FB878!important;background-color:#5FB878;color:#fff}.layui-checkbox-disbaled[lay-skin=primary] span{background:0 0!important;color:#c2c2c2}.layui-checkbox-disbaled[lay-skin=primary]:hover i{border-color:#d2d2d2}.layui-form-item .layui-form-checkbox[lay-skin=primary]{margin-top:10px}.layui-form-switch{position:relative;height:22px;line-height:22px;min-width:35px;padding:0 5px;margin-top:8px;border:1px solid #d2d2d2;border-radius:20px;cursor:pointer;background-color:#fff;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-switch i{position:absolute;left:5px;top:3px;width:16px;height:16px;border-radius:20px;background-color:#d2d2d2;-webkit-transition:.1s linear;transition:.1s linear}.layui-form-switch em{position:relative;top:0;width:25px;margin-left:21px;padding:0!important;text-align:center!important;color:#999!important;font-style:normal!important;font-size:12px}.layui-form-onswitch{border-color:#5FB878;background-color:#5FB878}.layui-checkbox-disbaled,.layui-checkbox-disbaled i{border-color:#e2e2e2!important}.layui-form-onswitch i{left:100%;margin-left:-21px;background-color:#fff}.layui-form-onswitch em{margin-left:5px;margin-right:21px;color:#fff!important}.layui-checkbox-disbaled span{background-color:#e2e2e2!important}.layui-checkbox-disbaled:hover i{color:#fff!important}[lay-radio]{display:none}.layui-form-radio,.layui-form-radio *{display:inline-block;vertical-align:middle}.layui-form-radio{line-height:28px;margin:6px 10px 0 0;padding-right:10px;cursor:pointer;font-size:0}.layui-form-radio *{font-size:14px}.layui-form-radio>i{margin-right:8px;font-size:22px;color:#c2c2c2}.layui-form-radio>i:hover,.layui-form-radioed>i{color:#5FB878}.layui-radio-disbaled>i{color:#e2e2e2!important}.layui-form-pane .layui-form-label{width:110px;padding:8px 15px;height:38px;line-height:20px;border-width:1px;border-style:solid;border-radius:2px 0 0 2px;text-align:center;background-color:#FBFBFB;overflow:hidden;box-sizing:border-box}.layui-form-pane .layui-input-inline{margin-left:-1px}.layui-form-pane .layui-input-block{margin-left:110px;left:-1px}.layui-form-pane .layui-input{border-radius:0 2px 2px 0}.layui-form-pane .layui-form-text .layui-form-label{float:none;width:100%;border-radius:2px;box-sizing:border-box;text-align:left}.layui-form-pane .layui-form-text .layui-input-inline{display:block;margin:0;top:-1px;clear:both}.layui-form-pane .layui-form-text .layui-input-block{margin:0;left:0;top:-1px}.layui-form-pane .layui-form-text .layui-textarea{min-height:100px;border-radius:0 0 2px 2px}.layui-form-pane .layui-form-checkbox{margin:4px 0 4px 10px}.layui-form-pane .layui-form-radio,.layui-form-pane .layui-form-switch{margin-top:6px;margin-left:10px}.layui-form-pane .layui-form-item[pane]{position:relative;border-width:1px;border-style:solid}.layui-form-pane .layui-form-item[pane] .layui-form-label{position:absolute;left:0;top:0;height:100%;border-width:0 1px 0 0}.layui-form-pane .layui-form-item[pane] .layui-input-inline{margin-left:110px}@media screen and (max-width:450px){.layui-form-item .layui-form-label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-form-item .layui-inline{display:block;margin-right:0;margin-bottom:20px;clear:both}.layui-form-item .layui-inline:after{content:'\20';clear:both;display:block;height:0}.layui-form-item .layui-input-inline{display:block;float:none;left:-3px;width:auto;margin:0 0 10px 112px}.layui-form-item .layui-input-inline+.layui-form-mid{margin-left:110px;top:-5px;padding:0}.layui-form-item .layui-form-checkbox{margin-right:5px;margin-bottom:5px}}.layui-layedit{border-width:1px;border-style:solid;border-radius:2px}.layui-layedit-tool{padding:3px 5px;border-bottom-width:1px;border-bottom-style:solid;font-size:0}.layedit-tool-fixed{position:fixed;top:0;border-top:1px solid #e2e2e2}.layui-layedit-tool .layedit-tool-mid,.layui-layedit-tool .layui-icon{display:inline-block;vertical-align:middle;text-align:center;font-size:14px}.layui-layedit-tool .layui-icon{position:relative;width:32px;height:30px;line-height:30px;margin:3px 5px;color:#777;cursor:pointer;border-radius:2px}.layui-layedit-tool .layui-icon:hover{color:#393D49}.layui-layedit-tool .layui-icon:active{color:#000}.layui-layedit-tool .layedit-tool-active{background-color:#e2e2e2;color:#000}.layui-layedit-tool .layui-disabled,.layui-layedit-tool .layui-disabled:hover{color:#d2d2d2;cursor:not-allowed}.layui-layedit-tool .layedit-tool-mid{width:1px;height:18px;margin:0 10px;background-color:#d2d2d2}.layedit-tool-html{width:50px!important;font-size:30px!important}.layedit-tool-b,.layedit-tool-code,.layedit-tool-help{font-size:16px!important}.layedit-tool-d,.layedit-tool-face,.layedit-tool-image,.layedit-tool-unlink{font-size:18px!important}.layedit-tool-image input{position:absolute;font-size:0;left:0;top:0;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layui-layedit-iframe iframe{display:block;width:100%}#LAY_layedit_code{overflow:hidden}.layui-laypage{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;margin:10px 0;font-size:0}.layui-laypage>a:first-child,.layui-laypage>a:first-child em{border-radius:2px 0 0 2px}.layui-laypage>a:last-child,.layui-laypage>a:last-child em{border-radius:0 2px 2px 0}.layui-laypage>:first-child{margin-left:0!important}.layui-laypage>:last-child{margin-right:0!important}.layui-laypage a,.layui-laypage button,.layui-laypage input,.layui-laypage select,.layui-laypage span{border:1px solid #e2e2e2}.layui-laypage a,.layui-laypage span{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding:0 15px;height:28px;line-height:28px;margin:0 -1px 5px 0;background-color:#fff;color:#333;font-size:12px}.layui-flow-more a *,.layui-laypage input,.layui-table-view select[lay-ignore]{display:inline-block}.layui-laypage a:hover{color:#009688}.layui-laypage em{font-style:normal}.layui-laypage .layui-laypage-spr{color:#999;font-weight:700}.layui-laypage a{text-decoration:none}.layui-laypage .layui-laypage-curr{position:relative}.layui-laypage .layui-laypage-curr em{position:relative;color:#fff}.layui-laypage .layui-laypage-curr .layui-laypage-em{position:absolute;left:-1px;top:-1px;padding:1px;width:100%;height:100%;background-color:#009688}.layui-laypage-em{border-radius:2px}.layui-laypage-next em,.layui-laypage-prev em{font-family:Sim sun;font-size:16px}.layui-laypage .layui-laypage-count,.layui-laypage .layui-laypage-limits,.layui-laypage .layui-laypage-refresh,.layui-laypage .layui-laypage-skip{margin-left:10px;margin-right:10px;padding:0;border:none}.layui-laypage .layui-laypage-limits,.layui-laypage .layui-laypage-refresh{vertical-align:top}.layui-laypage .layui-laypage-refresh i{font-size:18px;cursor:pointer}.layui-laypage select{height:22px;padding:3px;border-radius:2px;cursor:pointer}.layui-laypage .layui-laypage-skip{height:30px;line-height:30px;color:#999}.layui-laypage button,.layui-laypage input{height:30px;line-height:30px;border-radius:2px;vertical-align:top;background-color:#fff;box-sizing:border-box}.layui-laypage input{width:40px;margin:0 10px;padding:0 3px;text-align:center}.layui-laypage input:focus,.layui-laypage select:focus{border-color:#009688!important}.layui-laypage button{margin-left:10px;padding:0 10px;cursor:pointer}.layui-table,.layui-table-view{margin:10px 0}.layui-flow-more{margin:10px 0;text-align:center;color:#999;font-size:14px}.layui-flow-more a{height:32px;line-height:32px}.layui-flow-more a *{vertical-align:top}.layui-flow-more a cite{padding:0 20px;border-radius:3px;background-color:#eee;color:#333;font-style:normal}.layui-flow-more a cite:hover{opacity:.8}.layui-flow-more a i{font-size:30px;color:#737383}.layui-table{width:100%;background-color:#fff;color:#666}.layui-table tr{transition:all .3s;-webkit-transition:all .3s}.layui-table th{text-align:left;font-weight:400}.layui-table tbody tr:hover,.layui-table thead tr,.layui-table-click,.layui-table-header,.layui-table-hover,.layui-table-mend,.layui-table-patch,.layui-table-tool,.layui-table-total,.layui-table-total tr,.layui-table[lay-even] tr:nth-child(even){background-color:#f2f2f2}.layui-table td,.layui-table th,.layui-table-col-set,.layui-table-fixed-r,.layui-table-grid-down,.layui-table-header,.layui-table-page,.layui-table-tips-main,.layui-table-tool,.layui-table-total,.layui-table-view,.layui-table[lay-skin=line],.layui-table[lay-skin=row]{border-width:1px;border-style:solid;border-color:#e6e6e6}.layui-table td,.layui-table th{position:relative;padding:9px 15px;min-height:20px;line-height:20px;font-size:14px}.layui-table[lay-skin=line] td,.layui-table[lay-skin=line] th{border-width:0 0 1px}.layui-table[lay-skin=row] td,.layui-table[lay-skin=row] th{border-width:0 1px 0 0}.layui-table[lay-skin=nob] td,.layui-table[lay-skin=nob] th{border:none}.layui-table img{max-width:100px}.layui-table[lay-size=lg] td,.layui-table[lay-size=lg] th{padding:15px 30px}.layui-table-view .layui-table[lay-size=lg] .layui-table-cell{height:40px;line-height:40px}.layui-table[lay-size=sm] td,.layui-table[lay-size=sm] th{font-size:12px;padding:5px 10px}.layui-table-view .layui-table[lay-size=sm] .layui-table-cell{height:20px;line-height:20px}.layui-table[lay-data]{display:none}.layui-table-box{position:relative;overflow:hidden}.layui-table-view .layui-table{position:relative;width:auto;margin:0}.layui-table-view .layui-table[lay-skin=line]{border-width:0 1px 0 0}.layui-table-view .layui-table[lay-skin=row]{border-width:0 0 1px}.layui-table-view .layui-table td,.layui-table-view .layui-table th{padding:5px 0;border-top:none;border-left:none}.layui-table-view .layui-table th.layui-unselect .layui-table-cell span{cursor:pointer}.layui-table-view .layui-table td{cursor:default}.layui-table-view .layui-table td[data-edit=text]{cursor:text}.layui-table-view .layui-form-checkbox[lay-skin=primary] i{width:18px;height:18px}.layui-table-view .layui-form-radio{line-height:0;padding:0}.layui-table-view .layui-form-radio>i{margin:0;font-size:20px}.layui-table-init{position:absolute;left:0;top:0;width:100%;height:100%;text-align:center;z-index:110}.layui-table-init .layui-icon{position:absolute;left:50%;top:50%;margin:-15px 0 0 -15px;font-size:30px;color:#c2c2c2}.layui-table-header{border-width:0 0 1px;overflow:hidden}.layui-table-header .layui-table{margin-bottom:-1px}.layui-table-tool .layui-inline[lay-event]{position:relative;width:26px;height:26px;padding:5px;line-height:16px;margin-right:10px;text-align:center;color:#333;border:1px solid #ccc;cursor:pointer;-webkit-transition:.5s all;transition:.5s all}.layui-table-tool .layui-inline[lay-event]:hover{border:1px solid #999}.layui-table-tool-temp{padding-right:120px}.layui-table-tool-self{position:absolute;right:17px;top:10px}.layui-table-tool .layui-table-tool-self .layui-inline[lay-event]{margin:0 0 0 10px}.layui-table-tool-panel{position:absolute;top:29px;left:-1px;padding:5px 0;min-width:150px;min-height:40px;border:1px solid #d2d2d2;text-align:left;overflow-y:auto;background-color:#fff;box-shadow:0 2px 4px rgba(0,0,0,.12)}.layui-table-cell,.layui-table-tool-panel li{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layui-table-tool-panel li{padding:0 10px;line-height:30px;-webkit-transition:.5s all;transition:.5s all}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary]{width:100%;padding-left:28px}.layui-table-tool-panel li:hover{background-color:#f2f2f2}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary] i{position:absolute;left:0;top:0}.layui-table-tool-panel li .layui-form-checkbox[lay-skin=primary] span{padding:0}.layui-table-tool .layui-table-tool-self .layui-table-tool-panel{left:auto;right:-1px}.layui-table-col-set{position:absolute;right:0;top:0;width:20px;height:100%;border-width:0 0 0 1px;background-color:#fff}.layui-table-sort{width:10px;height:20px;margin-left:5px;cursor:pointer!important}.layui-table-sort .layui-edge{position:absolute;left:5px;border-width:5px}.layui-table-sort .layui-table-sort-asc{top:3px;border-top:none;border-bottom-style:solid;border-bottom-color:#b2b2b2}.layui-table-sort .layui-table-sort-asc:hover{border-bottom-color:#666}.layui-table-sort .layui-table-sort-desc{bottom:5px;border-bottom:none;border-top-style:solid;border-top-color:#b2b2b2}.layui-table-sort .layui-table-sort-desc:hover{border-top-color:#666}.layui-table-sort[lay-sort=asc] .layui-table-sort-asc{border-bottom-color:#000}.layui-table-sort[lay-sort=desc] .layui-table-sort-desc{border-top-color:#000}.layui-table-cell{height:28px;line-height:28px;padding:0 15px;position:relative;box-sizing:border-box}.layui-table-cell .layui-form-checkbox[lay-skin=primary]{top:-1px;padding:0}.layui-table-cell .layui-table-link{color:#01AAED}.laytable-cell-checkbox,.laytable-cell-numbers,.laytable-cell-radio,.laytable-cell-space{padding:0;text-align:center}.layui-table-body{position:relative;overflow:auto;margin-right:-1px;margin-bottom:-1px}.layui-table-body .layui-none{line-height:26px;padding:15px;text-align:center;color:#999}.layui-table-fixed{position:absolute;left:0;top:0;z-index:101}.layui-table-fixed .layui-table-body{overflow:hidden}.layui-table-fixed-l{box-shadow:0 -1px 8px rgba(0,0,0,.08)}.layui-table-fixed-r{left:auto;right:-1px;border-width:0 0 0 1px;box-shadow:-1px 0 8px rgba(0,0,0,.08)}.layui-table-fixed-r .layui-table-header{position:relative;overflow:visible}.layui-table-mend{position:absolute;right:-49px;top:0;height:100%;width:50px}.layui-table-tool{position:relative;z-index:890;width:100%;min-height:50px;line-height:30px;padding:10px 15px;border-width:0 0 1px}.layui-table-tool .layui-btn-container{margin-bottom:-10px}.layui-table-page,.layui-table-total{border-width:1px 0 0;margin-bottom:-1px;overflow:hidden}.layui-table-page{position:relative;width:100%;padding:7px 7px 0;height:41px;font-size:12px;white-space:nowrap}.layui-table-page>div{height:26px}.layui-table-page .layui-laypage{margin:0}.layui-table-page .layui-laypage a,.layui-table-page .layui-laypage span{height:26px;line-height:26px;margin-bottom:10px;border:none;background:0 0}.layui-table-page .layui-laypage a,.layui-table-page .layui-laypage span.layui-laypage-curr{padding:0 12px}.layui-table-page .layui-laypage span{margin-left:0;padding:0}.layui-table-page .layui-laypage .layui-laypage-prev{margin-left:-7px!important}.layui-table-page .layui-laypage .layui-laypage-curr .layui-laypage-em{left:0;top:0;padding:0}.layui-table-page .layui-laypage button,.layui-table-page .layui-laypage input{height:26px;line-height:26px}.layui-table-page .layui-laypage input{width:40px}.layui-table-page .layui-laypage button{padding:0 10px}.layui-table-page select{height:18px}.layui-table-patch .layui-table-cell{padding:0;width:30px}.layui-table-edit{position:absolute;left:0;top:0;width:100%;height:100%;padding:0 14px 1px;border-radius:0;box-shadow:1px 1px 20px rgba(0,0,0,.15)}.layui-table-edit:focus{border-color:#5FB878!important}select.layui-table-edit{padding:0 0 0 10px;border-color:#C9C9C9}.layui-table-view .layui-form-checkbox,.layui-table-view .layui-form-radio,.layui-table-view .layui-form-switch{top:0;margin:0;box-sizing:content-box}.layui-table-view .layui-form-checkbox{top:-1px;height:26px;line-height:26px}.layui-table-view .layui-form-checkbox i{height:26px}.layui-table-grid .layui-table-cell{overflow:visible}.layui-table-grid-down{position:absolute;top:0;right:0;width:26px;height:100%;padding:5px 0;border-width:0 0 0 1px;text-align:center;background-color:#fff;color:#999;cursor:pointer}.layui-table-grid-down .layui-icon{position:absolute;top:50%;left:50%;margin:-8px 0 0 -8px}.layui-table-grid-down:hover{background-color:#fbfbfb}body .layui-table-tips .layui-layer-content{background:0 0;padding:0;box-shadow:0 1px 6px rgba(0,0,0,.12)}.layui-table-tips-main{margin:-44px 0 0 -1px;max-height:150px;padding:8px 15px;font-size:14px;overflow-y:scroll;background-color:#fff;color:#666}.layui-table-tips-c{position:absolute;right:-3px;top:-13px;width:20px;height:20px;padding:3px;cursor:pointer;background-color:#666;border-radius:50%;color:#fff}.layui-table-tips-c:hover{background-color:#777}.layui-table-tips-c:before{position:relative;right:-2px}.layui-upload-file{display:none!important;opacity:.01;filter:Alpha(opacity=1)}.layui-upload-drag,.layui-upload-form,.layui-upload-wrap{display:inline-block}.layui-upload-list{margin:10px 0}.layui-upload-choose{padding:0 10px;color:#999}.layui-upload-drag{position:relative;padding:30px;border:1px dashed #e2e2e2;background-color:#fff;text-align:center;cursor:pointer;color:#999}.layui-upload-drag .layui-icon{font-size:50px;color:#009688}.layui-upload-drag[lay-over]{border-color:#009688}.layui-upload-iframe{position:absolute;width:0;height:0;border:0;visibility:hidden}.layui-upload-wrap{position:relative;vertical-align:middle}.layui-upload-wrap .layui-upload-file{display:block!important;position:absolute;left:0;top:0;z-index:10;font-size:100px;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layui-transfer-active,.layui-transfer-box{display:inline-block;vertical-align:middle}.layui-transfer-box,.layui-transfer-header,.layui-transfer-search{border-width:0;border-style:solid;border-color:#e6e6e6}.layui-transfer-box{position:relative;border-width:1px;width:200px;height:360px;border-radius:2px;background-color:#fff}.layui-transfer-box .layui-form-checkbox{width:100%;margin:0!important}.layui-transfer-header{height:38px;line-height:38px;padding:0 10px;border-bottom-width:1px}.layui-transfer-search{position:relative;padding:10px;border-bottom-width:1px}.layui-transfer-search .layui-input{height:32px;padding-left:30px;font-size:12px}.layui-transfer-search .layui-icon-search{position:absolute;left:20px;top:50%;margin-top:-8px;color:#666}.layui-transfer-active{margin:0 15px}.layui-transfer-active .layui-btn{display:block;margin:0;padding:0 15px;background-color:#5FB878;border-color:#5FB878;color:#fff}.layui-transfer-active .layui-btn-disabled{background-color:#FBFBFB;border-color:#e6e6e6;color:#C9C9C9}.layui-transfer-active .layui-btn:first-child{margin-bottom:15px}.layui-transfer-active .layui-btn .layui-icon{margin:0;font-size:14px!important}.layui-transfer-data{padding:5px 0;overflow:auto}.layui-transfer-data li{height:32px;line-height:32px;padding:0 10px}.layui-transfer-data li:hover{background-color:#f2f2f2;transition:.5s all}.layui-transfer-data .layui-none{padding:15px 10px;text-align:center;color:#999}.layui-nav{position:relative;padding:0 20px;background-color:#393D49;color:#fff;border-radius:2px;font-size:0;box-sizing:border-box}.layui-nav *{font-size:14px}.layui-nav .layui-nav-item{position:relative;display:inline-block;*display:inline;*zoom:1;vertical-align:middle;line-height:60px}.layui-nav .layui-nav-item a{display:block;padding:0 20px;color:#fff;color:rgba(255,255,255,.7);transition:all .3s;-webkit-transition:all .3s}.layui-nav .layui-this:after,.layui-nav-bar,.layui-nav-tree .layui-nav-itemed:after{position:absolute;left:0;top:0;width:0;height:5px;background-color:#5FB878;transition:all .2s;-webkit-transition:all .2s}.layui-nav-bar{z-index:1000}.layui-nav .layui-nav-item a:hover,.layui-nav .layui-this a{color:#fff}.layui-nav .layui-this:after{content:'';top:auto;bottom:0;width:100%}.layui-nav-img{width:30px;height:30px;margin-right:10px;border-radius:50%}.layui-nav .layui-nav-more{content:'';width:0;height:0;border-style:solid dashed dashed;border-color:#fff transparent transparent;overflow:hidden;cursor:pointer;transition:all .2s;-webkit-transition:all .2s;position:absolute;top:50%;right:3px;margin-top:-4px;border-width:6px;border-top-color:rgba(255,255,255,.7)}.layui-nav .layui-nav-mored,.layui-nav-itemed>a .layui-nav-more{margin-top:-9px;border-style:dashed dashed solid;border-color:transparent transparent #fff}.layui-nav-child{display:none;position:absolute;left:0;top:65px;min-width:100%;line-height:36px;padding:5px 0;box-shadow:0 2px 4px rgba(0,0,0,.12);border:1px solid #d2d2d2;background-color:#fff;z-index:100;border-radius:2px;white-space:nowrap}.layui-nav .layui-nav-child a{color:#333}.layui-nav .layui-nav-child a:hover{background-color:#f2f2f2;color:#000}.layui-nav-child dd{position:relative}.layui-nav .layui-nav-child dd.layui-this a,.layui-nav-child dd.layui-this{background-color:#5FB878;color:#fff}.layui-nav-child dd.layui-this:after{display:none}.layui-nav-tree{width:200px;padding:0}.layui-nav-tree .layui-nav-item{display:block;width:100%;line-height:45px}.layui-nav-tree .layui-nav-item a{position:relative;height:45px;line-height:45px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-nav-tree .layui-nav-item a:hover{background-color:#4E5465}.layui-nav-tree .layui-nav-bar{width:5px;height:0;background-color:#009688}.layui-nav-tree .layui-nav-child dd.layui-this,.layui-nav-tree .layui-nav-child dd.layui-this a,.layui-nav-tree .layui-this,.layui-nav-tree .layui-this>a,.layui-nav-tree .layui-this>a:hover{background-color:#009688;color:#fff}.layui-nav-tree .layui-this:after{display:none}.layui-nav-itemed>a,.layui-nav-tree .layui-nav-title a,.layui-nav-tree .layui-nav-title a:hover{color:#fff!important}.layui-nav-tree .layui-nav-child{position:relative;z-index:0;top:0;border:none;box-shadow:none}.layui-nav-tree .layui-nav-child a{height:40px;line-height:40px;color:#fff;color:rgba(255,255,255,.7)}.layui-nav-tree .layui-nav-child,.layui-nav-tree .layui-nav-child a:hover{background:0 0;color:#fff}.layui-nav-tree .layui-nav-more{right:10px}.layui-nav-itemed>.layui-nav-child{display:block;padding:0;background-color:rgba(0,0,0,.3)!important}.layui-nav-itemed>.layui-nav-child>.layui-this>.layui-nav-child{display:block}.layui-nav-side{position:fixed;top:0;bottom:0;left:0;overflow-x:hidden;z-index:999}.layui-bg-blue .layui-nav-bar,.layui-bg-blue .layui-nav-itemed:after,.layui-bg-blue .layui-this:after{background-color:#93D1FF}.layui-bg-blue .layui-nav-child dd.layui-this{background-color:#1E9FFF}.layui-bg-blue .layui-nav-itemed>a,.layui-nav-tree.layui-bg-blue .layui-nav-title a,.layui-nav-tree.layui-bg-blue .layui-nav-title a:hover{background-color:#007DDB!important}.layui-breadcrumb{font-size:0}.layui-breadcrumb>*{font-size:14px}.layui-breadcrumb a{color:#999!important}.layui-breadcrumb a:hover{color:#5FB878!important}.layui-breadcrumb a cite{color:#666;font-style:normal}.layui-breadcrumb span[lay-separator]{margin:0 10px;color:#999}.layui-tab{margin:10px 0;text-align:left!important}.layui-tab[overflow]>.layui-tab-title{overflow:hidden}.layui-tab-title{position:relative;left:0;height:40px;white-space:nowrap;font-size:0;border-bottom-width:1px;border-bottom-style:solid;transition:all .2s;-webkit-transition:all .2s}.layui-tab-title li{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;font-size:14px;transition:all .2s;-webkit-transition:all .2s;position:relative;line-height:40px;min-width:65px;padding:0 15px;text-align:center;cursor:pointer}.layui-tab-title li a{display:block}.layui-tab-title .layui-this{color:#000}.layui-tab-title .layui-this:after{position:absolute;left:0;top:0;content:'';width:100%;height:41px;border-width:1px;border-style:solid;border-bottom-color:#fff;border-radius:2px 2px 0 0;box-sizing:border-box;pointer-events:none}.layui-tab-bar{position:absolute;right:0;top:0;z-index:10;width:30px;height:39px;line-height:39px;border-width:1px;border-style:solid;border-radius:2px;text-align:center;background-color:#fff;cursor:pointer}.layui-tab-bar .layui-icon{position:relative;display:inline-block;top:3px;transition:all .3s;-webkit-transition:all .3s}.layui-tab-item{display:none}.layui-tab-more{padding-right:30px;height:auto!important;white-space:normal!important}.layui-tab-more li.layui-this:after{border-bottom-color:#e2e2e2;border-radius:2px}.layui-tab-more .layui-tab-bar .layui-icon{top:-2px;top:3px\9;-webkit-transform:rotate(180deg);transform:rotate(180deg)}:root .layui-tab-more .layui-tab-bar .layui-icon{top:-2px\0/IE9}.layui-tab-content{padding:10px}.layui-tab-title li .layui-tab-close{position:relative;display:inline-block;width:18px;height:18px;line-height:20px;margin-left:8px;top:1px;text-align:center;font-size:14px;color:#c2c2c2;transition:all .2s;-webkit-transition:all .2s}.layui-tab-title li .layui-tab-close:hover{border-radius:2px;background-color:#FF5722;color:#fff}.layui-tab-brief>.layui-tab-title .layui-this{color:#009688}.layui-tab-brief>.layui-tab-more li.layui-this:after,.layui-tab-brief>.layui-tab-title .layui-this:after{border:none;border-radius:0;border-bottom:2px solid #5FB878}.layui-tab-brief[overflow]>.layui-tab-title .layui-this:after{top:-1px}.layui-tab-card{border-width:1px;border-style:solid;border-radius:2px;box-shadow:0 2px 5px 0 rgba(0,0,0,.1)}.layui-tab-card>.layui-tab-title{background-color:#f2f2f2}.layui-tab-card>.layui-tab-title li{margin-right:-1px;margin-left:-1px}.layui-tab-card>.layui-tab-title .layui-this{background-color:#fff}.layui-tab-card>.layui-tab-title .layui-this:after{border-top:none;border-width:1px;border-bottom-color:#fff}.layui-tab-card>.layui-tab-title .layui-tab-bar{height:40px;line-height:40px;border-radius:0;border-top:none;border-right:none}.layui-tab-card>.layui-tab-more .layui-this{background:0 0;color:#5FB878}.layui-tab-card>.layui-tab-more .layui-this:after{border:none}.layui-timeline{padding-left:5px}.layui-timeline-item{position:relative;padding-bottom:20px}.layui-timeline-axis{position:absolute;left:-5px;top:0;z-index:10;width:20px;height:20px;line-height:20px;background-color:#fff;color:#5FB878;border-radius:50%;text-align:center;cursor:pointer}.layui-timeline-axis:hover{color:#FF5722}.layui-timeline-item:before{content:'';position:absolute;left:5px;top:0;z-index:0;width:1px;height:100%}.layui-timeline-item:last-child:before{display:none}.layui-timeline-item:first-child:before{display:block}.layui-timeline-content{padding-left:25px}.layui-timeline-title{position:relative;margin-bottom:10px}.layui-badge,.layui-badge-dot,.layui-badge-rim{position:relative;display:inline-block;padding:0 6px;font-size:12px;text-align:center;background-color:#FF5722;color:#fff;border-radius:2px}.layui-badge{height:18px;line-height:18px}.layui-badge-dot{width:8px;height:8px;padding:0;border-radius:50%}.layui-badge-rim{height:18px;line-height:18px;border-width:1px;border-style:solid;background-color:#fff;color:#666}.layui-btn .layui-badge,.layui-btn .layui-badge-dot{margin-left:5px}.layui-nav .layui-badge,.layui-nav .layui-badge-dot{position:absolute;top:50%;margin:-8px 6px 0}.layui-tab-title .layui-badge,.layui-tab-title .layui-badge-dot{left:5px;top:-2px}.layui-carousel{position:relative;left:0;top:0;background-color:#f8f8f8}.layui-carousel>[carousel-item]{position:relative;width:100%;height:100%;overflow:hidden}.layui-carousel>[carousel-item]:before{position:absolute;content:'\e63d';left:50%;top:50%;width:100px;line-height:20px;margin:-10px 0 0 -50px;text-align:center;color:#c2c2c2;font-family:layui-icon!important;font-size:30px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-carousel>[carousel-item]>*{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f8f8f8;transition-duration:.3s;-webkit-transition-duration:.3s}.layui-carousel-updown>*{-webkit-transition:.3s ease-in-out up;transition:.3s ease-in-out up}.layui-carousel-arrow{display:none\9;opacity:0;position:absolute;left:10px;top:50%;margin-top:-18px;width:36px;height:36px;line-height:36px;text-align:center;font-size:20px;border:0;border-radius:50%;background-color:rgba(0,0,0,.2);color:#fff;-webkit-transition-duration:.3s;transition-duration:.3s;cursor:pointer}.layui-carousel-arrow[lay-type=add]{left:auto!important;right:10px}.layui-carousel:hover .layui-carousel-arrow[lay-type=add],.layui-carousel[lay-arrow=always] .layui-carousel-arrow[lay-type=add]{right:20px}.layui-carousel[lay-arrow=always] .layui-carousel-arrow{opacity:1;left:20px}.layui-carousel[lay-arrow=none] .layui-carousel-arrow{display:none}.layui-carousel-arrow:hover,.layui-carousel-ind ul:hover{background-color:rgba(0,0,0,.35)}.layui-carousel:hover .layui-carousel-arrow{display:block\9;opacity:1;left:20px}.layui-carousel-ind{position:relative;top:-35px;width:100%;line-height:0!important;text-align:center;font-size:0}.layui-carousel[lay-indicator=outside]{margin-bottom:30px}.layui-carousel[lay-indicator=outside] .layui-carousel-ind{top:10px}.layui-carousel[lay-indicator=outside] .layui-carousel-ind ul{background-color:rgba(0,0,0,.5)}.layui-carousel[lay-indicator=none] .layui-carousel-ind{display:none}.layui-carousel-ind ul{display:inline-block;padding:5px;background-color:rgba(0,0,0,.2);border-radius:10px;-webkit-transition-duration:.3s;transition-duration:.3s}.layui-carousel-ind li{display:inline-block;width:10px;height:10px;margin:0 3px;font-size:14px;background-color:#e2e2e2;background-color:rgba(255,255,255,.5);border-radius:50%;cursor:pointer;-webkit-transition-duration:.3s;transition-duration:.3s}.layui-carousel-ind li:hover{background-color:rgba(255,255,255,.7)}.layui-carousel-ind li.layui-this{background-color:#fff}.layui-carousel>[carousel-item]>.layui-carousel-next,.layui-carousel>[carousel-item]>.layui-carousel-prev,.layui-carousel>[carousel-item]>.layui-this{display:block}.layui-carousel>[carousel-item]>.layui-this{left:0}.layui-carousel>[carousel-item]>.layui-carousel-prev{left:-100%}.layui-carousel>[carousel-item]>.layui-carousel-next{left:100%}.layui-carousel>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel>[carousel-item]>.layui-carousel-prev.layui-carousel-right{left:0}.layui-carousel>[carousel-item]>.layui-this.layui-carousel-left{left:-100%}.layui-carousel>[carousel-item]>.layui-this.layui-carousel-right{left:100%}.layui-carousel[lay-anim=updown] .layui-carousel-arrow{left:50%!important;top:20px;margin:0 0 0 -18px}.layui-carousel[lay-anim=updown]>[carousel-item]>*,.layui-carousel[lay-anim=fade]>[carousel-item]>*{left:0!important}.layui-carousel[lay-anim=updown] .layui-carousel-arrow[lay-type=add]{top:auto!important;bottom:20px}.layui-carousel[lay-anim=updown] .layui-carousel-ind{position:absolute;top:50%;right:20px;width:auto;height:auto}.layui-carousel[lay-anim=updown] .layui-carousel-ind ul{padding:3px 5px}.layui-carousel[lay-anim=updown] .layui-carousel-ind li{display:block;margin:6px 0}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this{top:0}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-prev{top:-100%}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-next{top:100%}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-prev.layui-carousel-right{top:0}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this.layui-carousel-left{top:-100%}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this.layui-carousel-right{top:100%}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-next,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-prev{opacity:0}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-prev.layui-carousel-right{opacity:1}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-this.layui-carousel-left,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-this.layui-carousel-right{opacity:0}.layui-fixbar{position:fixed;right:15px;bottom:15px;z-index:999999}.layui-fixbar li{width:50px;height:50px;line-height:50px;margin-bottom:1px;text-align:center;cursor:pointer;font-size:30px;background-color:#9F9F9F;color:#fff;border-radius:2px;opacity:.95}.layui-fixbar li:hover{opacity:.85}.layui-fixbar li:active{opacity:1}.layui-fixbar .layui-fixbar-top{display:none;font-size:40px}body .layui-util-face{border:none;background:0 0}body .layui-util-face .layui-layer-content{padding:0;background-color:#fff;color:#666;box-shadow:none}.layui-util-face .layui-layer-TipsG{display:none}.layui-util-face ul{position:relative;width:372px;padding:10px;border:1px solid #D9D9D9;background-color:#fff;box-shadow:0 0 20px rgba(0,0,0,.2)}.layui-util-face ul li{cursor:pointer;float:left;border:1px solid #e8e8e8;height:22px;width:26px;overflow:hidden;margin:-1px 0 0 -1px;padding:4px 2px;text-align:center}.layui-util-face ul li:hover{position:relative;z-index:2;border:1px solid #eb7350;background:#fff9ec}.layui-code{position:relative;margin:10px 0;padding:15px;line-height:20px;border:1px solid #ddd;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New;font-size:12px}.layui-rate,.layui-rate *{display:inline-block;vertical-align:middle}.layui-rate{padding:10px 5px 10px 0;font-size:0}.layui-rate li i.layui-icon{font-size:20px;color:#FFB800;margin-right:5px;transition:all .3s;-webkit-transition:all .3s}.layui-rate li i:hover{cursor:pointer;transform:scale(1.12);-webkit-transform:scale(1.12)}.layui-rate[readonly] li i:hover{cursor:default;transform:scale(1)}.layui-colorpicker{width:26px;height:26px;border:1px solid #e6e6e6;padding:5px;border-radius:2px;line-height:24px;display:inline-block;cursor:pointer;transition:all .3s;-webkit-transition:all .3s}.layui-colorpicker:hover{border-color:#d2d2d2}.layui-colorpicker.layui-colorpicker-lg{width:34px;height:34px;line-height:32px}.layui-colorpicker.layui-colorpicker-sm{width:24px;height:24px;line-height:22px}.layui-colorpicker.layui-colorpicker-xs{width:22px;height:22px;line-height:20px}.layui-colorpicker-trigger-bgcolor{display:block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);border-radius:2px}.layui-colorpicker-trigger-span{display:block;height:100%;box-sizing:border-box;border:1px solid rgba(0,0,0,.15);border-radius:2px;text-align:center}.layui-colorpicker-trigger-i{display:inline-block;color:#FFF;font-size:12px}.layui-colorpicker-trigger-i.layui-icon-close{color:#999}.layui-colorpicker-main{position:absolute;z-index:66666666;width:280px;padding:7px;background:#FFF;border:1px solid #d2d2d2;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.12)}.layui-colorpicker-main-wrapper{height:180px;position:relative}.layui-colorpicker-basis{width:260px;height:100%;position:relative}.layui-colorpicker-basis-white{width:100%;height:100%;position:absolute;top:0;left:0;background:linear-gradient(90deg,#FFF,hsla(0,0%,100%,0))}.layui-colorpicker-basis-black{width:100%;height:100%;position:absolute;top:0;left:0;background:linear-gradient(0deg,#000,transparent)}.layui-colorpicker-basis-cursor{width:10px;height:10px;border:1px solid #FFF;border-radius:50%;position:absolute;top:-3px;right:-3px;cursor:pointer}.layui-colorpicker-side{position:absolute;top:0;right:0;width:12px;height:100%;background:linear-gradient(red,#FF0,#0F0,#0FF,#00F,#F0F,red)}.layui-colorpicker-side-slider{width:100%;height:5px;box-shadow:0 0 1px #888;box-sizing:border-box;background:#FFF;border-radius:1px;border:1px solid #f0f0f0;cursor:pointer;position:absolute;left:0}.layui-colorpicker-main-alpha{display:none;height:12px;margin-top:7px;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.layui-colorpicker-alpha-bgcolor{height:100%;position:relative}.layui-colorpicker-alpha-slider{width:5px;height:100%;box-shadow:0 0 1px #888;box-sizing:border-box;background:#FFF;border-radius:1px;border:1px solid #f0f0f0;cursor:pointer;position:absolute;top:0}.layui-colorpicker-main-pre{padding-top:7px;font-size:0}.layui-colorpicker-pre{width:20px;height:20px;border-radius:2px;display:inline-block;margin-left:6px;margin-bottom:7px;cursor:pointer}.layui-colorpicker-pre:nth-child(11n+1){margin-left:0}.layui-colorpicker-pre-isalpha{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==)}.layui-colorpicker-pre.layui-this{box-shadow:0 0 3px 2px rgba(0,0,0,.15)}.layui-colorpicker-pre>div{height:100%;border-radius:2px}.layui-colorpicker-main-input{text-align:right;padding-top:7px}.layui-colorpicker-main-input .layui-btn-container .layui-btn{margin:0 0 0 10px}.layui-colorpicker-main-input div.layui-inline{float:left;margin-right:10px;font-size:14px}.layui-colorpicker-main-input input.layui-input{width:150px;height:30px;color:#666}.layui-slider{height:4px;background:#e2e2e2;border-radius:3px;position:relative;cursor:pointer}.layui-slider-bar{border-radius:3px;position:absolute;height:100%}.layui-slider-step{position:absolute;top:0;width:4px;height:4px;border-radius:50%;background:#FFF;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.layui-slider-wrap{width:36px;height:36px;position:absolute;top:-16px;-webkit-transform:translateX(-50%);transform:translateX(-50%);z-index:10;text-align:center}.layui-slider-wrap-btn{width:12px;height:12px;border-radius:50%;background:#FFF;display:inline-block;vertical-align:middle;cursor:pointer;transition:.3s}.layui-slider-wrap:after{content:"";height:100%;display:inline-block;vertical-align:middle}.layui-slider-wrap-btn.layui-slider-hover,.layui-slider-wrap-btn:hover{transform:scale(1.2)}.layui-slider-wrap-btn.layui-disabled:hover{transform:scale(1)!important}.layui-slider-tips{position:absolute;top:-42px;z-index:66666666;white-space:nowrap;display:none;-webkit-transform:translateX(-50%);transform:translateX(-50%);color:#FFF;background:#000;border-radius:3px;height:25px;line-height:25px;padding:0 10px}.layui-slider-tips:after{content:'';position:absolute;bottom:-12px;left:50%;margin-left:-6px;width:0;height:0;border-width:6px;border-style:solid;border-color:#000 transparent transparent}.layui-slider-input{width:70px;height:32px;border:1px solid #e6e6e6;border-radius:3px;font-size:16px;line-height:32px;position:absolute;right:0;top:-15px}.layui-slider-input-btn{display:none;position:absolute;top:0;right:0;width:20px;height:100%;border-left:1px solid #d2d2d2}.layui-slider-input-btn i{cursor:pointer;position:absolute;right:0;bottom:0;width:20px;height:50%;font-size:12px;line-height:16px;text-align:center;color:#999}.layui-slider-input-btn i:first-child{top:0;border-bottom:1px solid #d2d2d2}.layui-slider-input-txt{height:100%;font-size:14px}.layui-slider-input-txt input{height:100%;border:none}.layui-slider-input-btn i:hover{color:#009688}.layui-slider-vertical{width:4px;margin-left:34px}.layui-slider-vertical .layui-slider-bar{width:4px}.layui-slider-vertical .layui-slider-step{top:auto;left:0;-webkit-transform:translateY(50%);transform:translateY(50%)}.layui-slider-vertical .layui-slider-wrap{top:auto;left:-16px;-webkit-transform:translateY(50%);transform:translateY(50%)}.layui-slider-vertical .layui-slider-tips{top:auto;left:2px}@media \0screen{.layui-slider-wrap-btn{margin-left:-20px}.layui-slider-vertical .layui-slider-wrap-btn{margin-left:0;margin-bottom:-20px}.layui-slider-vertical .layui-slider-tips{margin-left:-8px}.layui-slider>span{margin-left:8px}}.layui-tree{line-height:22px}.layui-tree .layui-form-checkbox{margin:0!important}.layui-tree-set{width:100%;position:relative}.layui-tree-pack{display:none;padding-left:20px;position:relative}.layui-tree-iconClick,.layui-tree-main{display:inline-block;vertical-align:middle}.layui-tree-line .layui-tree-pack{padding-left:27px}.layui-tree-line .layui-tree-set .layui-tree-set:after{content:'';position:absolute;top:14px;left:-9px;width:17px;height:0;border-top:1px dotted #c0c4cc}.layui-tree-entry{position:relative;padding:3px 0;height:20px;white-space:nowrap}.layui-tree-entry:hover{background-color:#eee}.layui-tree-line .layui-tree-entry:hover{background-color:rgba(0,0,0,0)}.layui-tree-line .layui-tree-entry:hover .layui-tree-txt{color:#999;text-decoration:underline;transition:.3s}.layui-tree-main{cursor:pointer;padding-right:10px}.layui-tree-line .layui-tree-set:before{content:'';position:absolute;top:0;left:-9px;width:0;height:100%;border-left:1px dotted #c0c4cc}.layui-tree-line .layui-tree-set.layui-tree-setLineShort:before{height:13px}.layui-tree-line .layui-tree-set.layui-tree-setHide:before{height:0}.layui-tree-iconClick{position:relative;height:20px;line-height:20px;margin:0 10px;color:#c0c4cc}.layui-tree-icon{height:12px;line-height:12px;width:12px;text-align:center;border:1px solid #c0c4cc}.layui-tree-iconClick .layui-icon{font-size:18px}.layui-tree-icon .layui-icon{font-size:12px;color:#666}.layui-tree-iconArrow{padding:0 5px}.layui-tree-iconArrow:after{content:'';position:absolute;left:4px;top:3px;z-index:100;width:0;height:0;border-width:5px;border-style:solid;border-color:transparent transparent transparent #c0c4cc;transition:.5s}.layui-tree-btnGroup,.layui-tree-editInput{position:relative;vertical-align:middle;display:inline-block}.layui-tree-spread>.layui-tree-entry>.layui-tree-iconClick>.layui-tree-iconArrow:after{transform:rotate(90deg) translate(3px,4px)}.layui-tree-txt{display:inline-block;vertical-align:middle;color:#555}.layui-tree-search{margin-bottom:15px;color:#666}.layui-tree-btnGroup .layui-icon{display:inline-block;vertical-align:middle;padding:0 2px;cursor:pointer}.layui-tree-btnGroup .layui-icon:hover{color:#999;transition:.3s}.layui-tree-entry:hover .layui-tree-btnGroup{visibility:visible}.layui-tree-editInput{height:20px;line-height:20px;padding:0 3px;border:none;background-color:rgba(0,0,0,.05)}.layui-tree-emptyText{text-align:center;color:#999}.layui-anim{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-anim.layui-icon{display:inline-block}.layui-anim-loop{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.layui-trans,.layui-trans a{transition:all .3s;-webkit-transition:all .3s}@-webkit-keyframes layui-rotate{from{-webkit-transform:rotate(0)}to{-webkit-transform:rotate(360deg)}}@keyframes layui-rotate{from{transform:rotate(0)}to{transform:rotate(360deg)}}.layui-anim-rotate{-webkit-animation-name:layui-rotate;animation-name:layui-rotate;-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-timing-function:linear;animation-timing-function:linear}@-webkit-keyframes layui-up{from{-webkit-transform:translate3d(0,100%,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes layui-up{from{transform:translate3d(0,100%,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-anim-up{-webkit-animation-name:layui-up;animation-name:layui-up}@-webkit-keyframes layui-upbit{from{-webkit-transform:translate3d(0,30px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes layui-upbit{from{transform:translate3d(0,30px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-anim-upbit{-webkit-animation-name:layui-upbit;animation-name:layui-upbit}@-webkit-keyframes layui-scale{0%{opacity:.3;-webkit-transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes layui-scale{0%{opacity:.3;-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-ms-transform:scale(1);transform:scale(1)}}.layui-anim-scale{-webkit-animation-name:layui-scale;animation-name:layui-scale}@-webkit-keyframes layui-scale-spring{0%{opacity:.5;-webkit-transform:scale(.5)}80%{opacity:.8;-webkit-transform:scale(1.1)}100%{opacity:1;-webkit-transform:scale(1)}}@keyframes layui-scale-spring{0%{opacity:.5;transform:scale(.5)}80%{opacity:.8;transform:scale(1.1)}100%{opacity:1;transform:scale(1)}}.layui-anim-scaleSpring{-webkit-animation-name:layui-scale-spring;animation-name:layui-scale-spring}@-webkit-keyframes layui-fadein{0%{opacity:0}100%{opacity:1}}@keyframes layui-fadein{0%{opacity:0}100%{opacity:1}}.layui-anim-fadein{-webkit-animation-name:layui-fadein;animation-name:layui-fadein}@-webkit-keyframes layui-fadeout{0%{opacity:1}100%{opacity:0}}@keyframes layui-fadeout{0%{opacity:1}100%{opacity:0}}.layui-anim-fadeout{-webkit-animation-name:layui-fadeout;animation-name:layui-fadeout} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/layui.mobile.css b/public/static/layui-admin/dist/layuiadmin/layui/css/layui.mobile.css new file mode 100755 index 0000000..7835392 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/layui.mobile.css @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + blockquote,body,button,dd,div,dl,dt,form,h1,h2,h3,h4,h5,h6,input,legend,li,ol,p,td,textarea,th,ul{margin:0;padding:0;-webkit-tap-highlight-color:rgba(0,0,0,0)}html{font:12px 'Helvetica Neue','PingFang SC',STHeitiSC-Light,Helvetica,Arial,sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}a,button,input{-webkit-tap-highlight-color:rgba(255,0,0,0)}a{text-decoration:none;background:0 0}a:active,a:hover{outline:0}table{border-collapse:collapse;border-spacing:0}li{list-style:none}b,strong{font-weight:700}h1,h2,h3,h4,h5,h6{font-weight:500}address,cite,dfn,em,var{font-style:normal}dfn{font-style:italic}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}img{border:0;vertical-align:bottom}.layui-inline,input,label{vertical-align:middle}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0;outline:0}button,select{text-transform:none}select{-webkit-appearance:none;border:none}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}@font-face{font-family:layui-icon;src:url(../font/iconfont.eot?v=1.0.7);src:url(../font/iconfont.eot?v=1.0.7#iefix) format('embedded-opentype'),url(../font/iconfont.woff?v=1.0.7) format('woff'),url(../font/iconfont.ttf?v=1.0.7) format('truetype'),url(../font/iconfont.svg?v=1.0.7#iconfont) format('svg')}.layui-icon{font-family:layui-icon!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-box,.layui-box *{-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important;box-sizing:content-box!important}.layui-border-box,.layui-border-box *{-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-inline{position:relative;display:inline-block;*display:inline;*zoom:1}.layui-edge,.layui-upload-iframe{position:absolute;width:0;height:0}.layui-edge{border-style:dashed;border-color:transparent;overflow:hidden}.layui-elip{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-unselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-disabled,.layui-disabled:active{background-color:#d2d2d2!important;color:#fff!important;cursor:not-allowed!important}.layui-circle{border-radius:100%}.layui-show{display:block!important}.layui-hide{display:none!important}.layui-upload-iframe{border:0;visibility:hidden}.layui-upload-enter{border:1px solid #009E94;background-color:#009E94;color:#fff;-webkit-transform:scale(1.1);transform:scale(1.1)}@-webkit-keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layui-m-anim-scale{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}.layui-m-anim-scale{animation-name:layui-m-anim-scale;-webkit-animation-name:layui-m-anim-scale}@-webkit-keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layui-m-anim-up{0%{opacity:0;-webkit-transform:translateY(800px);transform:translateY(800px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}.layui-m-anim-up{-webkit-animation-name:layui-m-anim-up;animation-name:layui-m-anim-up}@-webkit-keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-left{0%{-webkit-transform:translateX(100%);transform:translateX(100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-left{-webkit-animation-name:layui-m-anim-left;animation-name:layui-m-anim-left}@-webkit-keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes layui-m-anim-right{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}100%{-webkit-transform:translateX(0);transform:translateX(0)}}.layui-m-anim-right{-webkit-animation-name:layui-m-anim-right;animation-name:layui-m-anim-right}@-webkit-keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}@keyframes layui-m-anim-lout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}}.layui-m-anim-lout{-webkit-animation-name:layui-m-anim-lout;animation-name:layui-m-anim-lout}@-webkit-keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes layui-m-anim-rout{0%{-webkit-transform:translateX(0);transform:translateX(0)}100%{-webkit-transform:translateX(100%);transform:translateX(100%)}}.layui-m-anim-rout{-webkit-animation-name:layui-m-anim-rout;animation-name:layui-m-anim-rout}.layui-m-layer{position:relative;z-index:19891014}.layui-m-layer *{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.layui-m-layermain,.layui-m-layershade{position:fixed;left:0;top:0;width:100%;height:100%}.layui-m-layershade{background-color:rgba(0,0,0,.7);pointer-events:auto}.layui-m-layermain{display:table;font-family:Helvetica,arial,sans-serif;pointer-events:none}.layui-m-layermain .layui-m-layersection{display:table-cell;vertical-align:middle;text-align:center}.layui-m-layerchild{position:relative;display:inline-block;text-align:left;background-color:#fff;font-size:14px;border-radius:5px;box-shadow:0 0 8px rgba(0,0,0,.1);pointer-events:auto;-webkit-overflow-scrolling:touch;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layui-m-layer0 .layui-m-layerchild{width:90%;max-width:640px}.layui-m-layer1 .layui-m-layerchild{border:none;border-radius:0}.layui-m-layer2 .layui-m-layerchild{width:auto;max-width:260px;min-width:40px;border:none;background:0 0;box-shadow:none;color:#fff}.layui-m-layerchild h3{padding:0 10px;height:60px;line-height:60px;font-size:16px;font-weight:400;border-radius:5px 5px 0 0;text-align:center}.layui-m-layerbtn span,.layui-m-layerchild h3{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layui-m-layercont{padding:50px 30px;line-height:22px;text-align:center}.layui-m-layer1 .layui-m-layercont{padding:0;text-align:left}.layui-m-layer2 .layui-m-layercont{text-align:center;padding:0;line-height:0}.layui-m-layer2 .layui-m-layercont i{width:25px;height:25px;margin-left:8px;display:inline-block;background-color:#fff;border-radius:100%;-webkit-animation:layui-m-anim-loading 1.4s infinite ease-in-out;animation:layui-m-anim-loading 1.4s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.layui-m-layerbtn,.layui-m-layerbtn span{position:relative;text-align:center;border-radius:0 0 5px 5px}.layui-m-layer2 .layui-m-layercont p{margin-top:20px}@-webkit-keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes layui-m-anim-loading{0%,100%,80%{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}.layui-m-layer2 .layui-m-layercont i:first-child{margin-left:0;-webkit-animation-delay:-.32s;animation-delay:-.32s}.layui-m-layer2 .layui-m-layercont i.layui-m-layerload{-webkit-animation-delay:-.16s;animation-delay:-.16s}.layui-m-layer2 .layui-m-layercont>div{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/code.css b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/code.css new file mode 100755 index 0000000..9143a25 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/code.css @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/laydate/default/laydate.css b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/laydate/default/laydate.css new file mode 100755 index 0000000..b900971 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/laydate/default/laydate.css @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + .laydate-set-ym,.layui-laydate,.layui-laydate *,.layui-laydate-list{box-sizing:border-box}html #layuicss-laydate{display:none;position:absolute;width:1989px}.layui-laydate *{margin:0;padding:0}.layui-laydate{position:absolute;z-index:66666666;margin:5px 0;border-radius:2px;font-size:14px;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-name:laydate-upbit;animation-name:laydate-upbit}.layui-laydate-main{width:272px}.layui-laydate-content td,.layui-laydate-header *,.layui-laydate-list li{transition-duration:.3s;-webkit-transition-duration:.3s}@-webkit-keyframes laydate-upbit{from{-webkit-transform:translate3d(0,20px,0);opacity:.3}to{-webkit-transform:translate3d(0,0,0);opacity:1}}@keyframes laydate-upbit{from{transform:translate3d(0,20px,0);opacity:.3}to{transform:translate3d(0,0,0);opacity:1}}.layui-laydate-static{position:relative;z-index:0;display:inline-block;margin:0;-webkit-animation:none;animation:none}.laydate-ym-show .laydate-next-m,.laydate-ym-show .laydate-prev-m{display:none!important}.laydate-ym-show .laydate-next-y,.laydate-ym-show .laydate-prev-y{display:inline-block!important}.laydate-time-show .laydate-set-ym span[lay-type=month],.laydate-time-show .laydate-set-ym span[lay-type=year],.laydate-time-show .layui-laydate-header .layui-icon,.laydate-ym-show .laydate-set-ym span[lay-type=month]{display:none!important}.layui-laydate-header{position:relative;line-height:30px;padding:10px 70px 5px}.laydate-set-ym span,.layui-laydate-header i{padding:0 5px;cursor:pointer}.layui-laydate-header *{display:inline-block;vertical-align:bottom}.layui-laydate-header i{position:absolute;top:10px;color:#999;font-size:18px}.layui-laydate-header i.laydate-prev-y{left:15px}.layui-laydate-header i.laydate-prev-m{left:45px}.layui-laydate-header i.laydate-next-y{right:15px}.layui-laydate-header i.laydate-next-m{right:45px}.laydate-set-ym{width:100%;text-align:center;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.laydate-time-text{cursor:default!important}.layui-laydate-content{position:relative;padding:10px;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.layui-laydate-content table{border-collapse:collapse;border-spacing:0}.layui-laydate-content td,.layui-laydate-content th{width:36px;height:30px;padding:5px;text-align:center}.layui-laydate-content td{position:relative;cursor:pointer}.laydate-day-mark{position:absolute;left:0;top:0;width:100%;height:100%;line-height:30px;font-size:12px;overflow:hidden}.laydate-day-mark::after{position:absolute;content:'';right:2px;top:2px;width:5px;height:5px;border-radius:50%}.layui-laydate-footer{position:relative;height:46px;line-height:26px;padding:10px 20px}.layui-laydate-footer span{margin-right:15px;display:inline-block;cursor:pointer;font-size:12px}.layui-laydate-footer span:hover{color:#5FB878}.laydate-footer-btns{position:absolute;right:10px;top:10px}.laydate-footer-btns span{height:26px;line-height:26px;margin:0 0 0 -1px;padding:0 10px;border:1px solid #C9C9C9;background-color:#fff;white-space:nowrap;vertical-align:top;border-radius:2px}.layui-laydate-list>li,.layui-laydate-range .layui-laydate-main{display:inline-block;vertical-align:middle}.layui-laydate-list{position:absolute;left:0;top:0;width:100%;height:100%;padding:10px;background-color:#fff}.layui-laydate-list>li{position:relative;width:33.3%;height:36px;line-height:36px;margin:3px 0;text-align:center;cursor:pointer}.laydate-month-list>li{width:25%;margin:17px 0}.laydate-time-list>li{height:100%;margin:0;line-height:normal;cursor:default}.laydate-time-list p{position:relative;top:-4px;line-height:29px}.laydate-time-list ol{height:181px;overflow:hidden}.laydate-time-list>li:hover ol{overflow-y:auto}.laydate-time-list ol li{width:130%;padding-left:33px;line-height:30px;text-align:left;cursor:pointer}.layui-laydate-hint{position:absolute;top:115px;left:50%;width:250px;margin-left:-125px;line-height:20px;padding:15px;text-align:center;font-size:12px}.layui-laydate-range{width:546px}.layui-laydate-range .laydate-main-list-0 .laydate-next-m,.layui-laydate-range .laydate-main-list-0 .laydate-next-y,.layui-laydate-range .laydate-main-list-1 .laydate-prev-m,.layui-laydate-range .laydate-main-list-1 .laydate-prev-y{display:none}.layui-laydate-range .laydate-main-list-1 .layui-laydate-content{border-left:1px solid #e2e2e2}.layui-laydate,.layui-laydate-hint{border:1px solid #d2d2d2;box-shadow:0 2px 4px rgba(0,0,0,.12);background-color:#fff;color:#666}.layui-laydate-header{border-bottom:1px solid #e2e2e2}.layui-laydate-header i:hover,.layui-laydate-header span:hover{color:#5FB878}.layui-laydate-content{border-top:none 0;border-bottom:none 0}.layui-laydate-content th{font-weight:400;color:#333}.layui-laydate-content td{color:#666}.layui-laydate-content td.laydate-selected{background-color:#00F7DE}.laydate-selected:hover{background-color:#00F7DE!important}.layui-laydate-content td:hover,.layui-laydate-list li:hover{background-color:#eaeaea;color:#333}.laydate-time-list li ol{margin:0;padding:0;border:1px solid #e2e2e2;border-left-width:0}.laydate-time-list li:first-child ol{border-left-width:1px}.laydate-time-list>li:hover{background:0 0}.layui-laydate-content .laydate-day-next,.layui-laydate-content .laydate-day-prev{color:#d2d2d2}.laydate-selected.laydate-day-next,.laydate-selected.laydate-day-prev{background-color:#f8f8f8!important}.layui-laydate-footer{border-top:1px solid #e2e2e2}.layui-laydate-hint{color:#FF5722}.laydate-day-mark::after{background-color:#5FB878}.layui-laydate-content td.layui-this .laydate-day-mark::after{display:none}.layui-laydate-footer span[lay-type=date]{color:#5FB878}.layui-laydate .layui-this{background-color:#009688!important;color:#fff!important}.layui-laydate .laydate-disabled,.layui-laydate .laydate-disabled:hover{background:0 0!important;color:#d2d2d2!important;cursor:not-allowed!important;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.laydate-theme-molv{border:none}.laydate-theme-molv.layui-laydate-range{width:548px}.laydate-theme-molv .layui-laydate-main{width:274px}.laydate-theme-molv .layui-laydate-header{border:none;background-color:#009688}.laydate-theme-molv .layui-laydate-header i,.laydate-theme-molv .layui-laydate-header span{color:#f6f6f6}.laydate-theme-molv .layui-laydate-header i:hover,.laydate-theme-molv .layui-laydate-header span:hover{color:#fff}.laydate-theme-molv .layui-laydate-content{border:1px solid #e2e2e2;border-top:none;border-bottom:none}.laydate-theme-molv .laydate-main-list-1 .layui-laydate-content{border-left:none}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li,.laydate-theme-grid .layui-laydate-content td,.laydate-theme-grid .layui-laydate-content thead,.laydate-theme-molv .layui-laydate-footer{border:1px solid #e2e2e2}.laydate-theme-grid .laydate-selected,.laydate-theme-grid .laydate-selected:hover{background-color:#f2f2f2!important;color:#009688!important}.laydate-theme-grid .laydate-selected.laydate-day-next,.laydate-theme-grid .laydate-selected.laydate-day-prev{color:#d2d2d2!important}.laydate-theme-grid .laydate-month-list,.laydate-theme-grid .laydate-year-list{margin:1px 0 0 1px}.laydate-theme-grid .laydate-month-list>li,.laydate-theme-grid .laydate-year-list>li{margin:0 -1px -1px 0}.laydate-theme-grid .laydate-year-list>li{height:43px;line-height:43px}.laydate-theme-grid .laydate-month-list>li{height:71px;line-height:71px} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/icon-ext.png b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/icon-ext.png new file mode 100755 index 0000000..bbbb669 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/icon-ext.png differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/icon.png b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/icon.png new file mode 100755 index 0000000..3e17da8 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/icon.png differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/layer.css b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/layer.css new file mode 100755 index 0000000..032ae12 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/layer.css @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + .layui-layer-imgbar,.layui-layer-imgtit a,.layui-layer-tab .layui-layer-title span,.layui-layer-title{text-overflow:ellipsis;white-space:nowrap}html #layuicss-layer{display:none;position:absolute;width:1989px}.layui-layer,.layui-layer-shade{position:fixed;_position:absolute;pointer-events:auto}.layui-layer-shade{top:0;left:0;width:100%;height:100%;_height:expression(document.body.offsetHeight+"px")}.layui-layer{-webkit-overflow-scrolling:touch;top:150px;left:0;margin:0;padding:0;background-color:#fff;-webkit-background-clip:content;border-radius:2px;box-shadow:1px 1px 50px rgba(0,0,0,.3)}.layui-layer-close{position:absolute}.layui-layer-content{position:relative}.layui-layer-border{border:1px solid #B2B2B2;border:1px solid rgba(0,0,0,.1);box-shadow:1px 1px 5px rgba(0,0,0,.2)}.layui-layer-load{background:url(loading-1.gif) center center no-repeat #eee}.layui-layer-ico{background:url(icon.png) no-repeat}.layui-layer-btn a,.layui-layer-dialog .layui-layer-ico,.layui-layer-setwin a{display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-move{display:none;position:fixed;*position:absolute;left:0;top:0;width:100%;height:100%;cursor:move;opacity:0;filter:alpha(opacity=0);background-color:#fff;z-index:2147483647}.layui-layer-resize{position:absolute;width:15px;height:15px;right:0;bottom:0;cursor:se-resize}.layer-anim{-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.3s;animation-duration:.3s}@-webkit-keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceIn{0%{opacity:0;-webkit-transform:scale(.5);-ms-transform:scale(.5);transform:scale(.5)}100%{opacity:1;-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-00{-webkit-animation-name:layer-bounceIn;animation-name:layer-bounceIn}@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0) rotate(0);-ms-transform:translateX(0) rotate(0);transform:translateX(0) rotate(0)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}.layui-layer-title{padding:0 80px 0 20px;height:42px;line-height:42px;border-bottom:1px solid #eee;font-size:14px;color:#333;overflow:hidden;background-color:#F8F8F8;border-radius:2px 2px 0 0}.layui-layer-setwin{position:absolute;right:15px;*right:0;top:15px;font-size:0;line-height:initial}.layui-layer-setwin a{position:relative;width:16px;height:16px;margin-left:10px;font-size:12px;_overflow:hidden}.layui-layer-setwin .layui-layer-min cite{position:absolute;width:14px;height:2px;left:0;top:50%;margin-top:-1px;background-color:#2E2D3C;cursor:pointer;_overflow:hidden}.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA}.layui-layer-setwin .layui-layer-max{background-position:-32px -40px}.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px}.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px}.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px}.layui-layer-setwin .layui-layer-close1{background-position:1px -40px;cursor:pointer}.layui-layer-setwin .layui-layer-close1:hover{opacity:.7}.layui-layer-setwin .layui-layer-close2{position:absolute;right:-28px;top:-28px;width:30px;height:30px;margin-left:0;background-position:-149px -31px;*right:-18px;_display:none}.layui-layer-setwin .layui-layer-close2:hover{background-position:-180px -31px}.layui-layer-btn{text-align:right;padding:0 15px 12px;pointer-events:auto;user-select:none;-webkit-user-select:none}.layui-layer-btn a{height:28px;line-height:28px;margin:5px 5px 0;padding:0 15px;border:1px solid #dedede;background-color:#fff;color:#333;border-radius:2px;font-weight:400;cursor:pointer;text-decoration:none}.layui-layer-btn a:hover{opacity:.9;text-decoration:none}.layui-layer-btn a:active{opacity:.8}.layui-layer-btn .layui-layer-btn0{border-color:#1E9FFF;background-color:#1E9FFF;color:#fff}.layui-layer-btn-l{text-align:left}.layui-layer-btn-c{text-align:center}.layui-layer-dialog{min-width:260px}.layui-layer-dialog .layui-layer-content{position:relative;padding:20px;line-height:24px;word-break:break-all;overflow:hidden;font-size:14px;overflow-x:hidden;overflow-y:auto}.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute;top:16px;left:15px;_left:-40px;width:30px;height:30px}.layui-layer-ico1{background-position:-30px 0}.layui-layer-ico2{background-position:-60px 0}.layui-layer-ico3{background-position:-90px 0}.layui-layer-ico4{background-position:-120px 0}.layui-layer-ico5{background-position:-150px 0}.layui-layer-ico6{background-position:-180px 0}.layui-layer-rim{border:6px solid #8D8D8D;border:6px solid rgba(0,0,0,.3);border-radius:5px;box-shadow:none}.layui-layer-msg{min-width:180px;border:1px solid #D3D4D3;box-shadow:none}.layui-layer-hui{min-width:100px;background-color:#000;filter:alpha(opacity=60);background-color:rgba(0,0,0,.6);color:#fff;border:none}.layui-layer-hui .layui-layer-content{padding:12px 25px;text-align:center}.layui-layer-dialog .layui-layer-padding{padding:20px 20px 20px 55px;text-align:left}.layui-layer-page .layui-layer-content{position:relative;overflow:auto}.layui-layer-iframe .layui-layer-btn,.layui-layer-page .layui-layer-btn{padding-top:10px}.layui-layer-nobg{background:0 0}.layui-layer-iframe iframe{display:block;width:100%}.layui-layer-loading{border-radius:100%;background:0 0;box-shadow:none;border:none}.layui-layer-loading .layui-layer-content{width:60px;height:24px;background:url(loading-0.gif) no-repeat}.layui-layer-loading .layui-layer-loading1{width:37px;height:37px;background:url(loading-1.gif) no-repeat}.layui-layer-ico16,.layui-layer-loading .layui-layer-loading2{width:32px;height:32px;background:url(loading-2.gif) no-repeat}.layui-layer-tips{background:0 0;box-shadow:none;border:none}.layui-layer-tips .layui-layer-content{position:relative;line-height:22px;min-width:12px;padding:8px 15px;font-size:12px;_float:left;border-radius:2px;box-shadow:1px 1px 3px rgba(0,0,0,.2);background-color:#000;color:#fff}.layui-layer-tips .layui-layer-close{right:-2px;top:-1px}.layui-layer-tips i.layui-layer-TipsG{position:absolute;width:0;height:0;border-width:8px;border-color:transparent;border-style:dashed;*overflow:hidden}.layui-layer-tips i.layui-layer-TipsB,.layui-layer-tips i.layui-layer-TipsT{left:5px;border-right-style:solid;border-right-color:#000}.layui-layer-tips i.layui-layer-TipsT{bottom:-8px}.layui-layer-tips i.layui-layer-TipsB{top:-8px}.layui-layer-tips i.layui-layer-TipsL,.layui-layer-tips i.layui-layer-TipsR{top:5px;border-bottom-style:solid;border-bottom-color:#000}.layui-layer-tips i.layui-layer-TipsR{left:-8px}.layui-layer-tips i.layui-layer-TipsL{right:-8px}.layui-layer-lan[type=dialog]{min-width:280px}.layui-layer-lan .layui-layer-title{background:#4476A7;color:#fff;border:none}.layui-layer-lan .layui-layer-btn{padding:5px 10px 10px;text-align:right;border-top:1px solid #E9E7E7}.layui-layer-lan .layui-layer-btn a{background:#fff;border-color:#E9E7E7;color:#333}.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5}.layui-layer-molv .layui-layer-title{background:#009f95;color:#fff;border:none}.layui-layer-molv .layui-layer-btn a{background:#009f95;border-color:#009f95}.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1}.layui-layer-iconext{background:url(icon-ext.png) no-repeat}.layui-layer-prompt .layui-layer-input{display:block;width:230px;height:36px;margin:0 auto;line-height:30px;padding-left:10px;border:1px solid #e6e6e6;color:#333}.layui-layer-prompt textarea.layui-layer-input{width:300px;height:100px;line-height:20px;padding:6px 10px}.layui-layer-prompt .layui-layer-content{padding:20px}.layui-layer-prompt .layui-layer-btn{padding-top:0}.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4)}.layui-layer-tab .layui-layer-title{padding-left:0;overflow:visible}.layui-layer-tab .layui-layer-title span{position:relative;float:left;min-width:80px;max-width:260px;padding:0 20px;text-align:center;overflow:hidden;cursor:pointer}.layui-layer-tab .layui-layer-title span.layui-this{height:43px;border-left:1px solid #eee;border-right:1px solid #eee;background-color:#fff;z-index:10}.layui-layer-tab .layui-layer-title span:first-child{border-left:none}.layui-layer-tabmain{line-height:24px;clear:both}.layui-layer-tabmain .layui-layer-tabli{display:none}.layui-layer-tabmain .layui-layer-tabli.layui-this{display:block}.layui-layer-photos{-webkit-animation-duration:.8s;animation-duration:.8s}.layui-layer-photos .layui-layer-content{overflow:hidden;text-align:center}.layui-layer-photos .layui-layer-phimg img{position:relative;width:100%;display:inline-block;*display:inline;*zoom:1;vertical-align:top}.layui-layer-imgbar,.layui-layer-imguide{display:none}.layui-layer-imgnext,.layui-layer-imgprev{position:absolute;top:50%;width:27px;_width:44px;height:44px;margin-top:-22px;outline:0;blr:expression(this.onFocus=this.blur())}.layui-layer-imgprev{left:10px;background-position:-5px -5px;_background-position:-70px -5px}.layui-layer-imgprev:hover{background-position:-33px -5px;_background-position:-120px -5px}.layui-layer-imgnext{right:10px;_right:8px;background-position:-5px -50px;_background-position:-70px -50px}.layui-layer-imgnext:hover{background-position:-33px -50px;_background-position:-120px -50px}.layui-layer-imgbar{position:absolute;left:0;bottom:0;width:100%;height:32px;line-height:32px;background-color:rgba(0,0,0,.8);background-color:#000\9;filter:Alpha(opacity=80);color:#fff;overflow:hidden;font-size:0}.layui-layer-imgtit *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:12px}.layui-layer-imgtit a{max-width:65%;overflow:hidden;color:#fff}.layui-layer-imgtit a:hover{color:#fff;text-decoration:underline}.layui-layer-imgtit em{padding-left:10px;font-style:normal}@-webkit-keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes layer-bounceOut{100%{opacity:0;-webkit-transform:scale(.7);-ms-transform:scale(.7);transform:scale(.7)}30%{-webkit-transform:scale(1.05);-ms-transform:scale(1.05);transform:scale(1.05)}0%{-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1)}}.layer-anim-close{-webkit-animation-name:layer-bounceOut;animation-name:layer-bounceOut;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}@media screen and (max-width:1100px){.layui-layer-iframe{overflow-y:auto;-webkit-overflow-scrolling:touch}} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/loading-0.gif b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/loading-0.gif new file mode 100755 index 0000000..6f3c953 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/loading-0.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/loading-1.gif b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/loading-1.gif new file mode 100755 index 0000000..db3a483 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/loading-1.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/loading-2.gif b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/loading-2.gif new file mode 100755 index 0000000..5bb90fd Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layer/default/loading-2.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/chatlog.html b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/chatlog.html new file mode 100755 index 0000000..9cbc571 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/chatlog.html @@ -0,0 +1,96 @@ + + + + + + + +聊天记录 + + + + + + +
    +
      +
      + +
      + + + + + + + + + + + diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/find.html b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/find.html new file mode 100755 index 0000000..ff5cab1 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/find.html @@ -0,0 +1,38 @@ + + + + + + + +发现 + + + + + + +
      +
      此为自定义的【查找】页面,因需求不一,所以官方暂不提供该模版结构与样式,实际使用时,可移至该文件到你的项目中,对页面自行把控。 +
      文件所在目录(相对于layui.js):/css/modules/layim/html/find.html
      +
      + + + + + + + diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/getmsg.json b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/getmsg.json new file mode 100755 index 0000000..c6ab365 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/getmsg.json @@ -0,0 +1,87 @@ +{ + "code": 1, + "pages": 1, + "data": [ + { + "id": 76, + "content": "申请添加你为好友", + "uid": 168, + "from": 166488, + "from_group": 0, + "type": 1, + "remark": "有问题要问", + "href": null, + "read": 1, + "time": "刚刚", + "user": { + "id": 166488, + "avatar": "http://q.qlogo.cn/qqapp/101235792/B704597964F9BD0DB648292D1B09F7E8/100", + "username": "李彦宏", + "sign": null + } + }, + { + "id": 75, + "content": "申请添加你为好友", + "uid": 168, + "from": 347592, + "from_group": 0, + "type": 1, + "remark": "你好啊!", + "href": null, + "read": 1, + "time": "刚刚", + "user": { + "id": 347592, + "avatar": "http://q.qlogo.cn/qqapp/101235792/B78751375E0531675B1272AD994BA875/100", + "username": "麻花疼", + "sign": null + } + }, + { + "id": 62, + "content": "雷军 拒绝了你的好友申请", + "uid": 168, + "from": null, + "from_group": null, + "type": 1, + "remark": null, + "href": null, + "read": 1, + "time": "10天前", + "user": { + "id": null + } + }, + { + "id": 60, + "content": "马小云 已经同意你的好友申请", + "uid": 168, + "from": null, + "from_group": null, + "type": 1, + "remark": null, + "href": null, + "read": 1, + "time": "10天前", + "user": { + "id": null + } + }, + { + "id": 61, + "content": "贤心 已经同意你的好友申请", + "uid": 168, + "from": null, + "from_group": null, + "type": 1, + "remark": null, + "href": null, + "read": 1, + "time": "10天前", + "user": { + "id": null + } + } + ] +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/msgbox.html b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/msgbox.html new file mode 100755 index 0000000..0adf002 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/html/msgbox.html @@ -0,0 +1,208 @@ + + + + + + + +消息盒子 + + + + + + +
        + +
        +
        注意:这些都是模拟数据,实际使用时,需将其中的模拟接口改为你的项目真实接口。 +
        该模版文件所在目录(相对于layui.js):/css/modules/layim/html/msgbox.html
        +
        + + + + + + + + + + diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/layim.css b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/layim.css new file mode 100755 index 0000000..2fb1c14 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/layim.css @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + html #layuicss-skinlayimcss{display:none;position:absolute;width:1989px}body .layui-layim,body .layui-layim-chat{border:1px solid #D9D9D9;border-color:rgba(0,0,0,.05);background-repeat:no-repeat;background-color:#F6F6F6;color:#333;font-family:\5FAE\8F6F\96C5\9ED1}body .layui-layim-chat{background-size:cover}body .layui-layim .layui-layer-title{height:110px;border-bottom:none;background:0 0}.layui-layim-main{position:relative;top:-98px;left:0}body .layui-layim .layui-layer-content,body .layui-layim-chat .layui-layer-content{overflow:visible}.layui-layim cite,.layui-layim em,.layui-layim-chat cite,.layui-layim-chat em{font-style:normal}.layui-layim-info{height:50px;font-size:0;padding:0 15px}.layui-layim-info *{font-size:14px}.layim-tab-content li h5 *,.layui-layim-info div,.layui-layim-skin li,.layui-layim-tab li,.layui-layim-tool li{display:inline-block;vertical-align:top;*zoom:1;*display:inline}.layim-tab-content li h5 span,.layui-layim-info .layui-layim-user,.layui-layim-list li p,.layui-layim-list li span,.layui-layim-remark{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layui-layim-info .layui-layim-user{max-width:150px;margin-right:5px;font-size:16px}.layui-layim-status{position:relative;top:2px;line-height:19px;cursor:pointer}.layim-status-online{color:#3FDD86}.layim-status-hide{color:#DD691D}.layim-menu-box{display:none;position:absolute;z-index:100;top:24px;left:-31px;padding:5px 0;width:85px;border:1px solid #E2E2E2;border-radius:2px;background-color:#fff;box-shadow:1px 1px 20px rgba(0,0,0,.1)}.layim-menu-box li{position:relative;line-height:22px;padding-left:30px;font-size:12px}.layim-menu-box li cite{padding-right:5px;font-size:14px}.layim-menu-box li i{display:none;position:absolute;left:8px;top:0;font-weight:700;color:#5FB878}.layim-menu-box .layim-this i{display:block}.layim-menu-box li:hover{background-color:#eee}.layui-layim-remark{position:relative;left:-6px;display:block;width:100%;border:1px solid transparent;margin-top:8px;padding:0 5px;height:26px;line-height:26px;background:0 0;border-radius:2px}.layui-layim-remark:focus,.layui-layim-remark:hover{border:1px solid #d2d2d2;border-color:rgba(0,0,0,.15)}.layui-layim-remark:focus{background-color:#fff}.layui-layim-tab{margin-top:10px;padding:9px 0;font-size:0}.layui-layim-tab li{position:relative;width:33.33%;height:24px;line-height:24px;font-size:22px;text-align:center;color:#666;color:rgba(0,0,0,.6);cursor:pointer}.layim-tab-two li{width:50%}.layui-layim-tab li.layim-this:after{content:'';position:absolute;left:0;bottom:-9px;width:100%;height:3px;background-color:#3FDD86}.layui-layim-tab li.layim-hide{display:none}.layui-layim-tab li:hover{opacity:.8;filter:Alpha(opacity=80)}.layim-tab-content{display:none;padding:10px 0;height:349px;overflow:hidden;background-color:#fff;background-color:rgba(255,255,255,.9)}.layim-tab-content:hover{overflow-y:auto}.layim-tab-content li h5{position:relative;margin-right:15px;padding-left:30px;height:28px;line-height:28px;cursor:pointer;font-size:0;white-space:nowrap;overflow:hidden}.layim-tab-content li h5 *{font-size:14px}.layim-tab-content li h5 span{max-width:125px}.layim-tab-content li h5 i{position:absolute;left:12px;top:0;color:#C9BDBB}.layim-tab-content li h5 em{padding-left:5px;color:#999}.layim-tab-content li h5[lay-type=true] i{top:2px}.layim-tab-content li ul{display:none;margin-bottom:10px}.layui-layim-list li{position:relative;height:42px;padding:5px 15px 5px 60px;font-size:0;cursor:pointer}.layui-layim-list li:hover{background-color:#F2F2F2;background-color:rgba(0,0,0,.05)}.layui-layim-list li.layim-null{height:20px;line-height:20px;padding:0;font-size:14px;color:#999;text-align:center;cursor:default}.layui-layim-list li.layim-null:hover{background:0 0}.layui-layim-list li *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px}.layui-layim-list li span{margin-top:4px;max-width:155px}.layui-layim-list li img{position:absolute;left:15px;top:8px;width:36px;height:36px;border-radius:100%}.layui-layim-list li p{display:block;padding-right:30px;line-height:18px;font-size:12px;color:#999}.layui-layim-list li .layim-msg-status{display:none;position:absolute;right:10px;bottom:7px;padding:0 5px;height:16px;line-height:16px;border-radius:16px;text-align:center;font-size:10px;background-color:#F74C31;color:#fff}.layim-list-gray{-webkit-filter:grayscale(100%);-ms-filter:grayscale(100%);filter:grayscale(100%);filter:gray}.layui-layim-tool{padding:0 10px;font-size:0;background-color:#F6F6F6;border-radius:0 0 2px 2px}.layui-layim-tool li{position:relative;width:48px;height:37px;line-height:40px;text-align:center;font-size:22px;cursor:pointer}.layui-layim-tool li:active{background-color:#e2e2e2}.layui-layim-tool .layim-tool-msgbox{line-height:37px}.layui-layim-tool .layim-tool-find{line-height:38px}.layui-layim-tool .layim-tool-skin{font-size:26px}.layim-tool-msgbox span{display:none;position:absolute;left:12px;top:-12px;height:20px;line-height:20px;padding:0 10px;border-radius:2px;background-color:#33DF83;color:#fff;font-size:12px;-webkit-animation-duration:1s;animation-duration:1s}.layim-tool-msgbox .layer-anim-05{display:block}.layui-layim-search{display:none;position:absolute;bottom:5px;left:5px;height:28px;line-height:28px}.layui-layim-search input{width:210px;padding:0 30px 0 10px;height:30px;line-height:30px;border:none;border-radius:3px;background-color:#ddd}.layui-layim-search label{position:absolute;right:6px;top:4px;font-size:20px;cursor:pointer;color:#333;font-weight:400}.layui-layim-skin{margin:10px 0 0 10px;font-size:0}.layui-layim-skin li{margin:0 10px 10px 0;line-height:60px;text-align:center;background-color:#f6f6f6}.layui-layim-skin li,.layui-layim-skin li img{width:86px;height:60px;cursor:pointer}.layui-layim-skin li img:hover{opacity:.8;filter:Alpha(opacity=80)}.layui-layim-skin li cite{font-size:14px;font-style:normal}body .layui-layim-chat{background-color:#fff}body .layui-layim-chat-list{width:760px}body .layui-layim-chat .layui-layer-title{height:80px;border-bottom:none;background-color:#F8F8F8;background-color:rgba(245,245,245,.7)}body .layui-layim-chat .layui-layer-content{background:0 0}.layim-chat-list li *,.layui-layim-min .layui-layer-content *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px}.layim-chat-list{display:none;position:absolute;z-index:1000;top:-80px;width:200px;height:100%;background-color:#D9D9D9;overflow:hidden;font-size:0}.layim-chat-list:hover{overflow-y:auto}.layim-chat-list li,.layui-layim-min .layui-layer-content{position:relative;margin:5px;padding:5px 30px 5px 5px;line-height:40px;cursor:pointer;border-radius:3px}.layim-chat-list li img,.layui-layim-min .layui-layer-content img{width:40px;height:40px;border-radius:100%}.layui-layim-photos{cursor:crosshair}.layim-chat-list li{white-space:nowrap}.layim-chat-list li span,.layui-layim-min .layui-layer-content span{width:100px;padding-left:10px;font-size:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.layim-chat-list li span cite{color:#999;padding-left:10px}.layim-chat-list li:hover{background-color:#E2E2E2}.layim-chat-list li.layim-this{background-color:#F3F3F3}.layim-chat-list li .layui-icon{display:none;position:absolute;right:5px;top:7px;color:#555;font-size:22px}.layim-chat-list li .layui-icon:hover{color:#c00}.layim-chat-list li:hover .layui-icon{display:inline-block}.layim-chat-system{margin:10px 0;text-align:center}.layim-chat-system span{display:inline-block;line-height:30px;padding:0 15px;border-radius:3px;background-color:#e2e2e2;cursor:default;font-size:14px}.layim-chat{display:none;position:relative;background-color:#fff;background-color:rgba(255,255,255,.9)}.layim-chat-title{position:absolute;top:-80px;height:80px}.layim-chat-other{position:relative;top:15px;left:15px;padding-left:60px;cursor:default}.layim-chat-other img{position:absolute;left:0;top:0;width:50px;height:50px;border-radius:100%}.layim-chat-username{position:relative;top:5px;font-size:18px}.layim-chat-status{margin-top:6px;font-size:14px;color:#999}.layim-chat-group .layim-chat-other .layim-chat-username{cursor:pointer}.layim-chat-group .layim-chat-other .layim-chat-username em{padding:0 10px;color:#999}.layim-chat-main{height:262px;padding:15px 15px 5px;overflow-x:hidden;overflow-y:auto}.layim-chat-main ul li{position:relative;font-size:0;margin-bottom:10px;padding-left:60px;min-height:68px}.layim-chat-text,.layim-chat-user{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px}.layim-chat-user{position:absolute;left:3px}.layim-chat-user img{width:40px;height:40px;border-radius:100%}.layim-chat-user cite{position:absolute;left:60px;top:-2px;width:500px;line-height:24px;font-size:12px;white-space:nowrap;color:#999;text-align:left;font-style:normal}.layim-chat-user cite i{padding-left:15px;font-style:normal}.layim-chat-text{position:relative;line-height:22px;margin-top:25px;padding:8px 15px;background-color:#e2e2e2;border-radius:3px;color:#333;word-break:break-all;max-width:462px\9}.layim-chat-text:after{content:'';position:absolute;left:-10px;top:13px;width:0;height:0;border-style:solid dashed dashed;border-color:#e2e2e2 transparent transparent;overflow:hidden;border-width:10px}.layim-chat-text a{color:#33DF83}.layim-chat-text img{max-width:100%;vertical-align:middle}.layim-chat-text .layui-layim-file,.layui-layim-file{display:block;text-align:center}.layim-chat-text .layui-layim-file{color:#333}.layui-layim-file:hover{opacity:.9}.layui-layim-file i{font-size:80px;line-height:80px}.layui-layim-file cite{display:block;line-height:20px;font-size:14px}.layui-layim-audio{text-align:center;cursor:pointer}.layui-layim-audio .layui-icon{position:relative;top:5px;font-size:24px}.layui-layim-audio p{margin-top:3px}.layui-layim-video{width:120px;height:80px;line-height:80px;background-color:#333;text-align:center;border-radius:3px}.layui-layim-video .layui-icon{font-size:36px;cursor:pointer;color:#fff}.layim-chat-main ul .layim-chat-system{min-height:0;padding:0}.layim-chat-main ul .layim-chat-mine{text-align:right;padding-left:0;padding-right:60px}.layim-chat-mine .layim-chat-user{left:auto;right:3px}.layim-chat-mine .layim-chat-user cite{left:auto;right:60px;text-align:right}.layim-chat-mine .layim-chat-user cite i{padding-left:0;padding-right:15px}.layim-chat-mine .layim-chat-text{margin-left:0;text-align:left;background-color:#5FB878;color:#fff}.layim-chat-mine .layim-chat-text:after{left:auto;right:-10px;border-top-color:#5FB878}.layim-chat-mine .layim-chat-text a{color:#fff}.layim-chat-footer{border-top:1px solid #F1F1F1}.layim-chat-tool{position:relative;padding:0 8px;height:38px;line-height:38px;font-size:0}.layim-chat-tool span{position:relative;margin:0 10px;display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:24px;cursor:pointer}.layim-chat-tool .layim-tool-log{position:absolute;right:5px;font-size:14px}.layim-tool-log i{position:relative;top:2px;margin-right:5px;font-size:20px;color:#999}.layim-tool-image input{position:absolute;font-size:0;left:0;top:0;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}body .layui-layim-face{margin:10px 0 0 -18px;border:none;background:0 0}body .layui-layim-face .layui-layer-content{padding:0;background-color:#fff;color:#666;box-shadow:none}.layui-layim-face .layui-layer-TipsG{display:none}.layui-layim-face ul{position:relative;width:372px;padding:10px;border:1px solid #D9D9D9;background-color:#fff;box-shadow:0 0 20px rgba(0,0,0,.2)}.layui-layim-face ul li{cursor:pointer;float:left;border:1px solid #e8e8e8;height:22px;width:26px;overflow:hidden;margin:-1px 0 0 -1px;padding:4px 2px;text-align:center}.layui-layim-face ul li:hover{position:relative;z-index:2;border:1px solid #eb7350;background:#fff9ec}.layim-chat-textarea{margin-left:10px}.layim-chat-textarea textarea{display:block;width:100%;padding:5px 0 0;height:68px;line-height:20px;border:none;overflow:auto;resize:none;background:0 0}.layim-chat-textarea textarea:focus{outline:0}.layim-chat-bottom{position:relative;height:46px}.layim-chat-send{position:absolute;right:15px;top:3px;height:32px;line-height:32px;font-size:0;cursor:pointer}.layim-chat-send span{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px;line-height:32px;margin-left:5px;padding:0 20px;background-color:#5FB878;color:#fff;border-radius:3px}.layim-chat-send span:hover{background-color:#69BC80}.layim-chat-send span:active{background-color:#59B573}.layim-chat-send .layim-send-btn{border-radius:3px 0 0 3px}.layim-chat-send .layim-send-set{position:relative;width:30px;height:32px;margin-left:0;padding:0;border-left:1px solid #85C998;border-radius:0 3px 3px 0}.layim-send-set .layui-edge{position:absolute;top:14px;left:9px;border-width:6px;border-top-style:solid;border-top-color:#fff}.layim-chat-send .layim-menu-box{left:auto;right:0;top:33px;width:180px;padding:10px 0}.layim-chat-send .layim-menu-box li{padding-right:15px;line-height:28px}body .layui-layim-min{border:1px solid #D9D9D9}.layui-layim-min .layui-layer-content{margin:0 5px;padding:5px 10px;white-space:nowrap}.layui-layim-close .layui-layer-content span{width:auto;max-width:120px}body .layui-layim-members{margin:25px 0 0 -75px;border:none;background:0 0}body .layui-layim-members .layui-layer-content{padding:0;background:0 0;color:#666;box-shadow:none}.layui-layim-members .layui-layer-TipsG{display:none}.layui-layim-members ul{position:relative;width:578px;height:200px;padding:10px 10px 0;border:1px solid #D9D9D9;background-color:#fff;background-color:rgba(255,255,255,.9);box-shadow:none;overflow:hidden;font-size:0}.layui-layim-members ul:hover{overflow:auto}.layim-add-img,.layim-add-remark,.layui-layim-members li{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:14px}.layui-layim-members li{width:112px;margin:10px 0;text-align:center}.layui-layim-members li a{position:relative;display:inline-block;max-width:100%}.layui-layim-members li a:after{content:'';position:absolute;width:46px;height:46px;left:50%;margin-left:-23px;top:0;border:1px solid #eee;border-color:rgba(0,0,0,.1);border-radius:100%}.layui-layim-members li img{width:48px;height:48px;border-radius:100%}.layui-layim-members li:hover{opacity:.9}.layui-layim-members li a cite{display:block;padding:0 3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body .layui-layim-contextmenu{margin:70px 0 0 30px;width:200px;padding:5px 0;border:1px solid #ccc;background:#fff;border-radius:0;box-shadow:0 0 5px rgba(0,0,0,.2)}body .layui-layim-contextmenu .layui-layer-content{padding:0;background-color:#fff;color:#333;font-size:14px;box-shadow:none}.layui-layim-contextmenu .layui-layer-TipsG{display:none}.layui-layim-contextmenu li{padding:0 15px 0 35px;cursor:pointer;line-height:30px}.layui-layim-contextmenu li:hover{background-color:#F2F2F2}.layim-add-box{margin:15px;font-size:0}.layim-add-img img,.layim-add-remark p{margin-bottom:10px}.layim-add-img{width:100px;margin-right:20px;text-align:center}.layim-add-img img{width:100px;height:100px}.layim-add-remark{width:280px}.layim-add-remark .layui-select{width:100%;margin-bottom:10px}.layim-add-remark .layui-textarea{height:80px;min-height:80px;resize:none}.layim-tab-content,.layui-layim-face ul,.layui-layim-tab{margin-bottom:0}.layim-tab-content li h5{margin-top:0;margin-bottom:0},.layui-layim-face img{vertical-align:bottom}.layim-chat-other span{color:#444}.layim-chat-other span cite{padding:0 15px;color:#999}.layim-chat-other:hover{text-decoration:none} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/mobile/layim.css b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/mobile/layim.css new file mode 100755 index 0000000..590e637 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/mobile/layim.css @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + .layim-tab-content li h5,.layui-layim-list li{border-bottom:1px solid #f2f2f2;cursor:pointer}html #layuicss-skinlayim-mobilecss{display:none;position:absolute;width:1989px}.layim-tab-content li h5 *,.layui-layim-skin li,.layui-layim-tab li,.layui-layim-tool li{display:inline-block;vertical-align:top;*zoom:1;*display:inline}.layim-tab-content li h5 span,.layui-layim-list li p,.layui-layim-list li span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.layui-layim-tab{position:absolute;bottom:0;left:0;right:0;height:50px;border-top:1px solid #f2f2f2;background-color:#fff}.layui-layim-tab li{position:relative;width:33.33%;height:50px;text-align:center;color:#666;color:rgba(0,0,0,.6);cursor:pointer}.layui-layim-tab li .layui-icon{position:relative;top:7px;font-size:25px}.layui-layim-tab li span{position:relative;bottom:-3px;display:block;font-size:12px}.layui-layim-tab li[lay-type=more] .layui-icon{top:4px;font-size:22px}.layui-layim-tab li.layim-this{color:#3FDD86}.layim-new{display:none;position:absolute;top:5px;left:50%;margin-left:15px;width:10px;height:10px;border-radius:10px;background-color:#F74C31;color:#fff}.layim-list-top .layim-new{position:relative;vertical-align:top;top:10px;left:initial;margin-left:5px}.layim-list-top i.layui-show{display:inline-block!important}.layim-tab-content,.layim-tab-content li ul{display:none}.layui-layim{position:fixed;left:0;right:0;top:50px;bottom:50px;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}.layim-tab-content li h5{position:relative;padding-left:35px;height:45px;line-height:45px;font-size:0;white-space:nowrap;overflow:hidden}.layim-tab-content li h5 *{font-size:17px}.layim-tab-content li h5 span{max-width:80%}.layim-tab-content li h5 i{position:absolute;left:12px;top:0;color:#C9BDBB}.layim-tab-content li h5 em{padding-left:5px;color:#999}.layim-list-friend,.layim-list-group{background-color:#fff}.layui-layim-list li{position:relative;height:42px;padding:5px 15px 5px 60px;font-size:0}.layui-layim-list li:active{background-color:#F2F2F2;background-color:rgba(0,0,0,.05)}.layui-layim-list li.layim-null{height:20px;line-height:20px;padding:10px 0;color:#999;text-align:center;cursor:default;font-size:14px}.layim-list-history li.layim-null{padding:30px 0;border-bottom:none;background-color:#eee}.layui-layim-list li *{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:17px}.layui-layim-list li span{margin-top:2px;max-width:155px;font-size:17px}.layui-layim-list li img{position:absolute;left:12px;top:8px;width:36px;height:36px;border-radius:100%}.layui-layim-list li p{display:block;padding-right:30px;line-height:18px;font-size:13px;color:#999}.layui-layim-list li .layim-msg-status{display:none;position:absolute;right:10px;bottom:7px;padding:0 5px;height:17px;line-height:17px;border-radius:17px;text-align:center;font-size:10px;background-color:#F74C31;color:#fff}.layim-list-gray{-webkit-filter:grayscale(100%);-ms-filter:grayscale(100%);filter:grayscale(100%);filter:gray}.layim-list-top{background-color:#fff;font-size:17px}.layim-list-top li{position:relative;padding:0 15px 0 50px;line-height:45px;border-bottom:1px solid #f2f2f2;cursor:pointer}.layim-list-top li:last-child{margin-bottom:10px;border-bottom:none}.layim-list-top li .layui-icon{position:absolute;left:12px;top:0;margin-right:10px;color:#36373C;font-size:24px}.layim-list-top li[layim-event=newFriend] .layui-icon{left:15px}.layim-panel,.layim-title{position:fixed;left:0;right:0;top:0}.layim-list-top li[layim-event=group] .layui-icon{font-size:20px}.layim-list-top li[layim-event=about] .layui-icon{font-size:25px}.layim-panel{bottom:0;background-color:#eee;-webkit-animation-fill-mode:both;animation-fill-mode:both;-webkit-animation-duration:.2s;animation-duration:.2s}.layim-title{height:50px;line-height:50px;padding:0 15px;background-color:#36373C;color:#fff;font-size:18px}.layim-chat-status{padding-left:15px;font-size:14px;opacity:.7}.layim-title .layim-chat-back{display:inline-block;vertical-align:middle;position:relative;padding:0 15px;margin-left:-10px;top:0;font-size:24px;cursor:pointer}.layim-chat-detail{position:absolute;right:0;top:0;padding:0 15px;font-size:18px;cursor:pointer}.layim-chat-main,.layim-content{position:fixed;top:50px;left:0;right:0;overflow-y:auto;overflow-x:hidden}.layim-chat-detail:active,.layim-title .layim-chat-back:active{opacity:.8}.layui-layim .layim-title{text-align:left}.layui-layim .layim-title p{padding:0 15px}.layim-content{bottom:0}.layim-chat-main{width:100%;bottom:85px;padding:15px;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layim-chat-main ul{overflow-x:hidden}.layim-chat-main ul li{position:relative;font-size:0;margin-bottom:10px;padding-left:60px;min-height:68px}.layim-chat-text,.layim-chat-user{display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:15px}.layim-chat-user{position:absolute;left:3px}.layim-chat-user img{width:40px;height:40px;border-radius:100%}.layim-chat-user cite{position:absolute;left:60px;top:-2px;width:500px;line-height:24px;font-size:12px;white-space:nowrap;color:#999;text-align:left;font-style:normal}.layim-chat-user cite i{padding-left:15px;font-style:normal}.layim-chat-text{position:relative;min-height:22px;line-height:22px;margin-top:25px;padding:8px 15px;background-color:#fff;border-radius:3px;color:#333;word-break:break-all}.layim-chat-text:after{content:'';position:absolute;left:-10px;top:13px;width:0;height:0;border-style:solid dashed dashed;border-color:#fff transparent transparent;overflow:hidden;border-width:10px}.layim-chat-text a{color:#33DF83}.layim-chat-text img{max-width:100%;vertical-align:middle}.layim-chat-text .layui-layim-file,.layui-layim-file{display:block;text-align:center}.layim-chat-text .layui-layim-file{color:#333}.layui-layim-file:active{opacity:.9}.layui-layim-file i{font-size:80px;line-height:80px}.layui-layim-file cite{display:block;line-height:20px;font-size:17px}.layui-layim-audio{text-align:center;cursor:pointer}.layui-layim-audio .layui-icon{position:relative;top:5px;font-size:24px}.layui-layim-audio p{margin-top:3px}.layui-layim-video{width:120px;height:80px;line-height:80px;background-color:#333;text-align:center;border-radius:3px}.layui-layim-video .layui-icon{font-size:36px;cursor:pointer;color:#fff}.layim-chat-main ul .layim-chat-mine{text-align:right;padding-left:0;padding-right:60px}.layim-chat-mine .layim-chat-user{left:auto;right:3px}.layim-chat-mine .layim-chat-user cite{left:auto;right:60px;text-align:right}.layim-chat-mine .layim-chat-user cite i{padding-left:0;padding-right:15px}.layim-chat-mine .layim-chat-text{margin-left:0;text-align:left;background-color:#5FB878;color:#fff}.layim-chat-mine .layim-chat-text:after{left:auto;right:-10px;border-top-color:#5FB878}.layim-chat-mine .layim-chat-text a{color:#fff}.layim-chat-main ul .layim-chat-system{min-height:0;margin:20px 0 5px;padding:0}.layim-chat-system{margin:10px 0;text-align:center}.layim-chat-system span{display:inline-block;line-height:30px;padding:0 15px;border-radius:3px;background-color:#ddd;color:#fff;font-size:14px;cursor:pointer}.layim-chat-footer{position:fixed;bottom:0;left:10px;right:10px;height:80px}.layim-chat-send{display:-webkit-box;display:-webkit-flex;display:flex}.layim-chat-send input{-webkit-box-flex:1;-webkit-flex:1;flex:1;height:40px;padding-left:5px;border:0;background-color:#fff;border-radius:3px}.layim-chat-send button{border-radius:3px;height:40px;padding:0 20px;border:0;margin-left:10px;background-color:#5FB878;color:#fff}.layim-chat-tool{position:relative;width:100%;overflow-x:auto;padding:0;height:38px;line-height:38px;margin-top:3px;font-size:0;white-space:nowrap}.layim-chat-tool span{position:relative;margin:0 15px;display:inline-block;*display:inline;*zoom:1;vertical-align:top;font-size:28px;cursor:pointer}.layim-chat-tool .layim-tool-log{position:absolute;right:5px;font-size:14px}.layim-tool-log i{position:relative;top:2px;margin-right:5px;font-size:20px;color:#999}.layim-tool-image input{position:absolute;font-size:0;left:0;top:0;width:100%;height:100%;opacity:.01;filter:Alpha(opacity=1);cursor:pointer}.layim-layer{position:fixed;bottom:85px;left:10px;right:10px;margin:0 auto}.layui-layim-face{position:relative;max-height:180px;overflow:auto;padding:10px;font-size:0}.layui-layim-face li{cursor:pointer;display:inline-block;vertical-align:bottom;padding:5px 2px;text-align:center;width:10%;-webkit-box-sizing:border-box!important;-moz-box-sizing:border-box!important;box-sizing:border-box!important}.layui-layim-face li img{width:22px;height:22px}.layim-about{font-size:17px}.layim-about .layui-m-layercont{text-align:left}.layim-about .layui-m-layercont p{line-height:30px}.layim-about .layui-m-layercont a{color:#01AAED} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/1.jpg b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/1.jpg new file mode 100755 index 0000000..d9f9926 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/1.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/2.jpg b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/2.jpg new file mode 100755 index 0000000..0bffb50 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/2.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/3.jpg b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/3.jpg new file mode 100755 index 0000000..53ba921 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/3.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/4.jpg b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/4.jpg new file mode 100755 index 0000000..83b4738 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/4.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/5.jpg b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/5.jpg new file mode 100755 index 0000000..8ed74b9 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/5.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/logo.jpg b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/logo.jpg new file mode 100755 index 0000000..26c7358 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/skin/logo.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/voice/default.mp3 b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/voice/default.mp3 new file mode 100755 index 0000000..90013c5 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/css/modules/layim/voice/default.mp3 differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.eot b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.eot new file mode 100755 index 0000000..622d7ec Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.eot differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.svg b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.svg new file mode 100755 index 0000000..999ca1f --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.svg @@ -0,0 +1,554 @@ + + + + + +Created by iconfont + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.ttf b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.ttf new file mode 100755 index 0000000..06e30f9 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.ttf differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.woff b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.woff new file mode 100755 index 0000000..66a1783 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.woff differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.woff2 b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.woff2 new file mode 100755 index 0000000..47e9980 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/font/iconfont.woff2 differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/0.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/0.gif new file mode 100755 index 0000000..a63f0d5 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/0.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/1.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/1.gif new file mode 100755 index 0000000..b2b78b2 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/1.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/10.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/10.gif new file mode 100755 index 0000000..556c7e3 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/10.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/11.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/11.gif new file mode 100755 index 0000000..2bfc58b Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/11.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/12.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/12.gif new file mode 100755 index 0000000..1c321c7 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/12.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/13.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/13.gif new file mode 100755 index 0000000..300bbc2 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/13.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/14.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/14.gif new file mode 100755 index 0000000..43b6d0a Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/14.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/15.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/15.gif new file mode 100755 index 0000000..c9f25fa Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/15.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/16.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/16.gif new file mode 100755 index 0000000..34f28e4 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/16.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/17.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/17.gif new file mode 100755 index 0000000..39cd035 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/17.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/18.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/18.gif new file mode 100755 index 0000000..7bce299 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/18.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/19.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/19.gif new file mode 100755 index 0000000..adac542 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/19.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/2.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/2.gif new file mode 100755 index 0000000..7edbb58 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/2.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/20.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/20.gif new file mode 100755 index 0000000..50631a6 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/20.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/21.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/21.gif new file mode 100755 index 0000000..b984212 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/21.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/22.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/22.gif new file mode 100755 index 0000000..1f0bd8b Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/22.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/23.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/23.gif new file mode 100755 index 0000000..e05e0f9 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/23.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/24.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/24.gif new file mode 100755 index 0000000..f35928a Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/24.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/25.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/25.gif new file mode 100755 index 0000000..0b4a883 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/25.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/26.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/26.gif new file mode 100755 index 0000000..45c4fb5 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/26.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/27.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/27.gif new file mode 100755 index 0000000..7a4c013 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/27.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/28.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/28.gif new file mode 100755 index 0000000..fc5a0cf Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/28.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/29.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/29.gif new file mode 100755 index 0000000..5dd7442 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/29.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/3.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/3.gif new file mode 100755 index 0000000..86df67b Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/3.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/30.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/30.gif new file mode 100755 index 0000000..b751f98 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/30.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/31.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/31.gif new file mode 100755 index 0000000..c9476d7 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/31.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/32.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/32.gif new file mode 100755 index 0000000..9931b06 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/32.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/33.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/33.gif new file mode 100755 index 0000000..59111a3 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/33.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/34.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/34.gif new file mode 100755 index 0000000..a334548 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/34.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/35.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/35.gif new file mode 100755 index 0000000..a932264 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/35.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/36.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/36.gif new file mode 100755 index 0000000..6de432a Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/36.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/37.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/37.gif new file mode 100755 index 0000000..d05f2da Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/37.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/38.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/38.gif new file mode 100755 index 0000000..8b1c88a Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/38.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/39.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/39.gif new file mode 100755 index 0000000..38b84a5 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/39.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/4.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/4.gif new file mode 100755 index 0000000..d52200c Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/4.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/40.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/40.gif new file mode 100755 index 0000000..ae42991 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/40.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/41.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/41.gif new file mode 100755 index 0000000..b9c715c Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/41.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/42.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/42.gif new file mode 100755 index 0000000..0eb1434 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/42.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/43.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/43.gif new file mode 100755 index 0000000..ac0b700 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/43.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/44.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/44.gif new file mode 100755 index 0000000..ad44497 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/44.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/45.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/45.gif new file mode 100755 index 0000000..6837fca Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/45.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/46.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/46.gif new file mode 100755 index 0000000..d62916d Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/46.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/47.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/47.gif new file mode 100755 index 0000000..58a0836 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/47.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/48.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/48.gif new file mode 100755 index 0000000..7ffd161 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/48.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/49.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/49.gif new file mode 100755 index 0000000..959b992 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/49.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/5.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/5.gif new file mode 100755 index 0000000..4e8b09f Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/5.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/50.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/50.gif new file mode 100755 index 0000000..6e22e7f Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/50.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/51.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/51.gif new file mode 100755 index 0000000..ad3f4d3 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/51.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/52.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/52.gif new file mode 100755 index 0000000..39f8a22 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/52.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/53.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/53.gif new file mode 100755 index 0000000..a181ee7 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/53.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/54.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/54.gif new file mode 100755 index 0000000..e289d92 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/54.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/55.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/55.gif new file mode 100755 index 0000000..4351083 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/55.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/56.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/56.gif new file mode 100755 index 0000000..e0eff22 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/56.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/57.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/57.gif new file mode 100755 index 0000000..0bf130f Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/57.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/58.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/58.gif new file mode 100755 index 0000000..0f06508 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/58.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/59.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/59.gif new file mode 100755 index 0000000..7081e4f Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/59.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/6.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/6.gif new file mode 100755 index 0000000..f7715bf Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/6.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/60.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/60.gif new file mode 100755 index 0000000..6e15f89 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/60.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/61.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/61.gif new file mode 100755 index 0000000..f092d7e Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/61.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/62.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/62.gif new file mode 100755 index 0000000..7fe4984 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/62.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/63.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/63.gif new file mode 100755 index 0000000..cf8e23e Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/63.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/64.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/64.gif new file mode 100755 index 0000000..a779719 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/64.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/65.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/65.gif new file mode 100755 index 0000000..7bb98f2 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/65.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/66.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/66.gif new file mode 100755 index 0000000..bb6d077 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/66.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/67.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/67.gif new file mode 100755 index 0000000..6e33f7c Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/67.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/68.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/68.gif new file mode 100755 index 0000000..1a6c400 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/68.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/69.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/69.gif new file mode 100755 index 0000000..a02f0b2 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/69.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/7.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/7.gif new file mode 100755 index 0000000..e6d4db8 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/7.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/70.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/70.gif new file mode 100755 index 0000000..416c5c1 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/70.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/71.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/71.gif new file mode 100755 index 0000000..c17d60c Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/71.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/8.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/8.gif new file mode 100755 index 0000000..66f967b Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/8.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/face/9.gif b/public/static/layui-admin/dist/layuiadmin/layui/images/face/9.gif new file mode 100755 index 0000000..6044740 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/face/9.gif differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/other/image.png b/public/static/layui-admin/dist/layuiadmin/layui/images/other/image.png new file mode 100755 index 0000000..fa27753 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/other/image.png differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/images/other/video.png b/public/static/layui-admin/dist/layuiadmin/layui/images/other/video.png new file mode 100755 index 0000000..e778dcf Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/layui/images/other/video.png differ diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/carousel.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/carousel.js new file mode 100755 index 0000000..2c4521b --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/carousel.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
          ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
        "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
        1. '+o.replace(/[\r\t\n]+/g,"
        2. ")+"
        "),c.find(">.layui-code-h3")[0]||c.prepend('

        '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

        ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/colorpicker.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/colorpicker.js new file mode 100755 index 0000000..0fc6395 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/colorpicker.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,o={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var o=this;return o.config=i.extend({},o.config,e),o},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this,i=e.config;return{config:i}},t="colorpicker",n="layui-show",l="layui-colorpicker",c=".layui-colorpicker-main",a="layui-icon-down",s="layui-icon-close",f="layui-colorpicker-trigger-span",d="layui-colorpicker-trigger-i",u="layui-colorpicker-side",p="layui-colorpicker-side-slider",g="layui-colorpicker-basis",v="layui-colorpicker-alpha-bgcolor",h="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",b="layui-colorpicker-main-input",k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),t=r-o;return i.b=r,i.s=0!=r?255*t/r:0,0!=i.s?e.r==r?i.h=(e.g-e.b)/t:e.g==r?i.h=2+(e.b-e.r)/t:i.h=4+(e.r-e.g)/t:i.h=-1,r==o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},y=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var o={r:e>>16,g:(65280&e)>>8,b:255&e};return k(o)},x=function(e){var i={},o=e.h,r=255*e.s/100,t=255*e.b/100;if(0==r)i.r=i.g=i.b=t;else{var n=t,l=(255-r)*t/255,c=(n-l)*(o%60)/60;360==o&&(o=0),o<60?(i.r=n,i.b=l,i.g=l+c):o<120?(i.g=n,i.b=l,i.r=n-c):o<180?(i.g=n,i.r=l,i.b=l+c):o<240?(i.b=n,i.r=l,i.g=n-c):o<300?(i.b=n,i.g=l,i.r=l+c):o<360?(i.r=n,i.g=l,i.b=n-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},C=function(e){var o=x(e),r=[o.r.toString(16),o.g.toString(16),o.b.toString(16)];return i.each(r,function(e,i){1==i.length&&(r[e]="0"+i)}),r.join("")},P=function(e){var i=/[0-9]{1,3}/g,o=e.match(i)||[];return{r:o[0],g:o[1],b:o[2]}},B=i(window),w=i(document),D=function(e){var r=this;r.index=++o.index,r.config=i.extend({},r.config,o.config,e),r.render()};D.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},D.prototype.render=function(){var e=this,o=e.config,r=i(['
        ',"",'3&&(o.alpha&&"rgb"==o.format||(e="#"+C(k(P(o.color))))),"background: "+e):e}()+'">','',"","","
        "].join("")),t=i(o.elem);o.size&&r.addClass("layui-colorpicker-"+o.size),t.addClass("layui-inline").html(e.elemColorBox=r),e.color=e.elemColorBox.find("."+f)[0].style.background,e.events()},D.prototype.renderPicker=function(){var e=this,o=e.config,r=e.elemColorBox[0],t=e.elemPicker=i(['
        ','
        ','
        ','
        ','
        ','
        ',"
        ",'
        ','
        ',"
        ","
        ",'
        ','
        ','
        ',"
        ","
        ",function(){if(o.predefine){var e=['
        '];return layui.each(o.colors,function(i,o){e.push(['
        ','
        ',"
        "].join(""))}),e.push("
        "),e.join("")}return""}(),'
        ','
        ','',"
        ",'
        ','','',"","
        "].join(""));e.elemColorBox.find("."+f)[0];i(c)[0]&&i(c).data("index")==e.index?e.removePicker(D.thisElemInd):(e.removePicker(D.thisElemInd),i("body").append(t)),D.thisElemInd=e.index,D.thisColor=r.style.background,e.position(),e.pickerEvents()},D.prototype.removePicker=function(e){var o=this;o.config;return i("#layui-colorpicker"+(e||o.index)).remove(),o},D.prototype.position=function(){var e=this,i=e.config,o=e.bindElem||e.elemColorBox[0],r=e.elemPicker[0],t=o.getBoundingClientRect(),n=r.offsetWidth,l=r.offsetHeight,c=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},a=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},s=5,f=t.left,d=t.bottom;f-=(n-o.offsetWidth)/2,d+=s,f+n+s>a("width")?f=a("width")-n-s:fa()&&(d=t.top>l?t.top-l:a()-l,d-=2*s),i.position&&(r.style.position=i.position),r.style.left=f+("fixed"===i.position?0:c(1))+"px",r.style.top=d+("fixed"===i.position?0:c())+"px"},D.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+f)),o=e.elemPicker.find("."+b),r=i[0],t=r.style.backgroundColor;if(t){var n=k(P(t)),l=i.attr("lay-type");if(e.select(n.h,n.s,n.b),"torgb"===l&&o.find("input").val(t),"rgba"===l){var c=P(t);if(3==(t.match(/[0-9]{1,3}/g)||[]).length)o.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+h).css("left",280);else{o.find("input").val(t);var a=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+h).css("left",a)}e.elemPicker.find("."+v)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),o.find("input").val(""),e.elemPicker.find("."+v)[0].style.background="",e.elemPicker.find("."+h).css("left",280)},D.prototype.side=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=r.attr("lay-type"),n=e.elemPicker.find("."+u),l=e.elemPicker.find("."+p),c=e.elemPicker.find("."+g),y=e.elemPicker.find("."+m),C=e.elemPicker.find("."+v),w=e.elemPicker.find("."+h),D=l[0].offsetTop/180*360,E=100-(y[0].offsetTop+3)/180*100,H=(y[0].offsetLeft+3)/260*100,W=Math.round(w[0].offsetLeft/280*100)/100,j=e.elemColorBox.find("."+d),F=e.elemPicker.find(".layui-colorpicker-pre").children("div"),L=function(i,n,l,c){e.select(i,n,l);var f=x({h:i,s:n,b:l});if(j.addClass(a).removeClass(s),r[0].style.background="rgb("+f.r+", "+f.g+", "+f.b+")","torgb"===t&&e.elemPicker.find("."+b).find("input").val("rgb("+f.r+", "+f.g+", "+f.b+")"),"rgba"===t){var d=0;d=280*c,w.css("left",d),e.elemPicker.find("."+b).find("input").val("rgba("+f.r+", "+f.g+", "+f.b+", "+c+")"),r[0].style.background="rgba("+f.r+", "+f.g+", "+f.b+", "+c+")",C[0].style.background="linear-gradient(to right, rgba("+f.r+", "+f.g+", "+f.b+", 0), rgb("+f.r+", "+f.g+", "+f.b+"))"}o.change&&o.change(e.elemPicker.find("."+b).find("input").val())},M=i(['
        t&&(r=t);var l=r/180*360;D=l,L(l,H,E,W),e.preventDefault()};Y(r),e.preventDefault()}),n.on("click",function(e){var o=e.clientY-i(this).offset().top;o<0&&(o=0),o>this.offsetHeight&&(o=this.offsetHeight);var r=o/180*360;D=r,L(r,H,E,W),e.preventDefault()}),y.on("mousedown",function(e){var i=this.offsetTop,o=this.offsetLeft,r=e.clientY,t=e.clientX,n=function(e){var n=i+(e.clientY-r),l=o+(e.clientX-t),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;n<-3&&(n=-3),n>a&&(n=a),l<-3&&(l=-3),l>s&&(l=s);var f=(l+3)/260*100,d=100-(n+3)/180*100;E=d,H=f,L(D,f,d,W),e.preventDefault()};layui.stope(e),Y(n),e.preventDefault()}),c.on("mousedown",function(e){var o=e.clientY-i(this).offset().top-3+B.scrollTop(),r=e.clientX-i(this).offset().left-3+B.scrollLeft();o<-3&&(o=-3),o>this.offsetHeight-3&&(o=this.offsetHeight-3),r<-3&&(r=-3),r>this.offsetWidth-3&&(r=this.offsetWidth-3);var t=(r+3)/260*100,n=100-(o+3)/180*100;E=n,H=t,L(D,t,n,W),e.preventDefault(),y.trigger(e,"mousedown")}),w.on("mousedown",function(e){var i=this.offsetLeft,o=e.clientX,r=function(e){var r=i+(e.clientX-o),t=C[0].offsetWidth;r<0&&(r=0),r>t&&(r=t);var n=Math.round(r/280*100)/100;W=n,L(D,H,E,n),e.preventDefault()};Y(r),e.preventDefault()}),C.on("click",function(e){var o=e.clientX-i(this).offset().left;o<0&&(o=0),o>this.offsetWidth&&(o=this.offsetWidth);var r=Math.round(o/280*100)/100;W=r,L(D,H,E,r),e.preventDefault()}),F.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,o=this.style.backgroundColor,r=k(P(o)),t=o.slice(o.lastIndexOf(",")+1,o.length-1);D=r.h,H=r.s,E=r.b,3==(o.match(/[0-9]{1,3}/g)||[]).length&&(t=1),W=t,e=280*t,L(r.h,r.s,r.b,t)})})},D.prototype.select=function(e,i,o,r){var t=this,n=(t.config,C({h:e,s:100,b:100})),l=C({h:e,s:i,b:o}),c=e/360*180,a=180-o/100*180-3,s=i/100*260-3;t.elemPicker.find("."+p).css("top",c),t.elemPicker.find("."+g)[0].style.background="#"+n,t.elemPicker.find("."+m).css({top:a,left:s}),"change"!==r&&t.elemPicker.find("."+b).find("input").val("#"+l)},D.prototype.pickerEvents=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=e.elemPicker.find("."+b+" input"),n={clear:function(i){r[0].style.background="",e.elemColorBox.find("."+d).removeClass(a).addClass(s),e.color="",o.done&&o.done(""),e.removePicker()},confirm:function(i,n){var l=t.val(),c=l,f={};if(l.indexOf(",")>-1){if(f=k(P(l)),e.select(f.h,f.s,f.b),r[0].style.background=c="#"+C(f),(l.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===r.attr("lay-type")){var u=280*l.slice(l.lastIndexOf(",")+1,l.length-1);e.elemPicker.find("."+h).css("left",u),r[0].style.background=l,c=l}}else f=y(l),r[0].style.background=c="#"+C(f),e.elemColorBox.find("."+d).removeClass(s).addClass(a);return"change"===n?(e.select(f.h,f.s,f.b,n),void(o.change&&o.change(c))):(e.color=l,o.done&&o.done(l),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),o=e.attr("colorpicker-events");n[o]&&n[o].call(this,e)}),t.on("keyup",function(e){var o=i(this);n.confirm.call(this,o,13===e.keyCode?null:"change")})},D.prototype.events=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f);e.elemColorBox.on("click",function(){e.renderPicker(),i(c)[0]&&(e.val(),e.side())}),o.elem[0]&&!e.elemColorBox[0].eventHandler&&(w.on("click",function(o){if(!i(o.target).hasClass(l)&&!i(o.target).parents("."+l)[0]&&!i(o.target).hasClass(c.replace(/\./g,""))&&!i(o.target).parents(c)[0]&&e.elemPicker){if(e.color){var t=k(P(e.color));e.select(t.h,t.s,t.b)}else e.elemColorBox.find("."+d).removeClass(a).addClass(s);r[0].style.background=e.color||"",e.removePicker()}}),B.on("resize",function(){return!(!e.elemPicker||!i(c)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},o.render=function(e){var i=new D(e);return r.call(i)},e(t,o)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/element.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/element.js new file mode 100755 index 0000000..290a1e8 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/element.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
      • "+(i.title||"unnaming")+"
      • ";return s[0]?s.before(r):n.append(r),o.append('
        '+(i.content||"")+"
        "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('ဆ');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/flow.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/flow.js new file mode 100755 index 0000000..924c78d --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/flow.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),!i&&f.width()&&(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/form.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/form.js new file mode 100755 index 0000000..818dd39 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/form.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=this,n=t(r+'[lay-filter="'+e+'"]');return n.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value==t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e),a.getValue(e)},u.prototype.getValue=function(e,i){i=i||t(r+'[lay-filter="'+e+'"]').eq(0);var a={},n={},l=i.find("input,select,textarea");return layui.each(l,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];a[i]=0|a[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+a[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(n[t.name]=t.value)}}),n},u.prototype.render=function(e,i){var n=this,u=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(i,u,f){var y,p=t(this),m=i.find("."+n),k=m.find("input"),g=i.find("dl"),x=g.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=g.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),x.removeClass(o),y=null,x.eq(b).addClass(s).siblings().removeClass(s),e+t>h.height()&&e>=t&&i.addClass(a+"up"),T()},w=function(e){i.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||$(k.val(),function(e){var i=p[0].selectedIndex;e&&(d=t(p[0].options[i]).html(),0===i&&d===k.attr("placeholder")&&(d=""),k.val(d||""))})},T=function(){var e=g.children("dd."+s);if(e[0]){var t=e.position().top,i=g.height(),a=e.height();t>i&&g.scrollTop(t+g.scrollTop()-i+a-5),t<0&&g.scrollTop(t+g.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),g.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=g.children("dd."+s);if(g.children("dd."+o)[0]&&"next"===t){var i=g.children("dd:not(."+o+",."+c+")"),n=i.eq(0).index();if(n>=0&&n无匹配项

        '):g.find("."+r).remove()},"keyup"),""===t&&g.find("."+r).remove(),void T())};f&&k.on("keyup",q).on("blur",function(i){var a=p[0].selectedIndex;e=k,d=t(p[0].options[a]).html(),0===a&&d===k.attr("placeholder")&&(d=""),setTimeout(function(){$(k.val(),function(e){d||k.val("")},"blur")},200)}),x.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['
        ','
        ','','
        ','
        ',function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
        "+a.label+"
        "):t.push('
        '+a.innerHTML+"
        "):t.push('
        '+(a.innerHTML||i)+"
        ")}),0===t.length&&t.push('
        没有选项
        '),t.join("")}(r.find("*"))+"
        ","
        "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=u.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['
        ",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return t[r]||t.checkbox}(),"
        "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=u.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=t(['
        ',''+i[l.checked?0:1]+"","
        "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
        ","
        "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=null,a=f.config.verify,s="layui-form-danger",o={},c=t(this),u=c.parents(r),d=u.find("*[lay-verify]"),v=c.parents("form")[0],h=c.attr("lay-filter");return layui.each(d,function(l,r){var o=t(this),c=o.attr("lay-verify").split("|"),u=o.attr("lay-verType"),d=o.val();if(o.removeClass(s),layui.each(c,function(t,l){var c,f="",v="function"==typeof a[l];if(a[l]){var c=v?f=a[l](d,r):!a[l][0].test(d);if(f=f||a[l][1],"required"===l&&(f=o.attr("lay-reqText")||f),c)return"tips"===u?i.tips(f,function(){return"string"==typeof o.attr("lay-ignore")||"select"!==r.tagName.toLowerCase()&&!/^checkbox|radio$/.test(r.type)?o:o.next()}(),{tips:1}):"alert"===u?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||setTimeout(function(){r.focus()},7),o.addClass(s),e=!0}}),e)return e}),!e&&(o=f.getValue(null,u),layui.event.call(this,l,"submit("+h+")",{elem:this,form:v,field:o}))},f=new u,v=t(document),h=t(window);f.render(),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/jquery.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/jquery.js new file mode 100755 index 0000000..10d8c2b --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/jquery.js @@ -0,0 +1,5 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=pe.type(e);return"function"!==n&&!pe.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), +l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
        a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
        ","
        "],area:[1,"",""],param:[1,"",""],thead:[1,"","
        "],tr:[2,"","
        "],col:[2,"","
        "],td:[3,"","
        "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
        ","
        "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
        a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
        ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ +for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){layui.$=pe,e("jquery",pe)}),pe}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/laydate.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/laydate.js new file mode 100755 index 0000000..0766cb5 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/laydate.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;!function(){"use strict";var e=window.layui&&layui.define,t={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,n=t.length-1,a=n;a>0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期
        建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push(''+n.timeTips+""),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push(''+o+""))}),e.push('"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));t.elem&&(n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3))},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length必须遵循下述格式:
        "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+"
        已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html(''+n+""),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.nowl.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.yeard[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e=t&&e=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=["

        "+r.time[e]+"

          "];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+"")}),a.innerHTML=i.join("")+"
        ",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s','
        '+f+"
        ",'
        ','',"
        ","
        "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

        ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

        "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

        "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

          ','
        • ','','
          ','',"
          ","
        • ",'
        • ','','
          ','",'","
          ","
        • ",'
        • ','','',"
        • ","
        "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
      • '+e+'
      • ')}),'
          '+t.join("")+"
        "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
          ','
        • ','','
          ','","
          ","
        • ",'
        • ','','
          ','',"
          ","
        • ",'
        • ','','',"
        • ","
        "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/layer.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/layer.js new file mode 100755 index 0000000..03e780c --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/layer.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
        '+(f?r.title[0]:r.title)+"
        ":"";return r.zIndex=s,t([r.shade?'
        ':"",'
        '+(e&&2!=r.type?"":u)+'
        '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
        '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
        '+e+"
        "}():"")+(r.resize?'':"")+"
        "],u,i('
        ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
          '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
        • '+(t[0].content||"no content")+"
        • ";i'+(t[i].content||"no content")+"";return a}()+"
        ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
        '+(u.length>1?'':"")+'
        '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
        ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
        是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/layim.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/layim.js new file mode 100755 index 0000000..9180c71 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/layim.js @@ -0,0 +1,3 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define(["layer","laytpl","upload"],function(i){var a="3.9.1",e=layui.$,t=layui.layer,n=layui.laytpl,l=layui.device(),s="layui-show",o="layim-this",d=20,r={},c=function(){this.v=a,e("body").on("click","*[layim-event]",function(i){var a=e(this),t=a.attr("layim-event");ti[t]?ti[t].call(this,a,i):""})};c.prototype.config=function(i){var a=[];if(layui.each(Array(5),function(i){a.push(layui.cache.dir+"css/modules/layim/skin/"+(i+1)+".jpg")}),i=i||{},i.skin=i.skin||[],layui.each(i.skin,function(i,e){a.unshift(e)}),i.skin=a,i=e.extend({isfriend:!0,isgroup:!0,voice:"default.mp3"},i),window.JSON&&window.JSON.parse)return H(i),this},c.prototype.on=function(i,a){return"function"==typeof a&&(r[i]?r[i].push(a):r[i]=[a]),this},c.prototype.cache=function(){return j},c.prototype.chat=function(i){if(window.JSON&&window.JSON.parse)return z(i),this},c.prototype.setChatMin=function(){return N(),this},c.prototype.setChatStatus=function(i){var a=_();if(a){var e=a.elem.find(".layim-chat-status");return e.html(i),this}},c.prototype.getMessage=function(i){return K(i),this},c.prototype.notice=function(i){return J(i),this},c.prototype.add=function(i){return M(i),this},c.prototype.setFriendGroup=function(i){return M(i,"setGroup"),this},c.prototype.msgbox=function(i){return V(i),this},c.prototype.addList=function(i){return P(i),this},c.prototype.removeList=function(i){return W(i),this},c.prototype.setFriendStatus=function(i,a){var t=e(".layim-friend"+i);t["online"===a?"removeClass":"addClass"]("layim-list-gray")},c.prototype.content=function(i){return layui.data.content(i)};var u=function(i){var a={friend:"该分组下暂无好友",group:"暂无群组",history:"暂无历史会话"};return i=i||{},i.item=i.item||"d."+i.type,["{{# var length = 0; layui.each("+i.item+", function(i, data){ length++; }}",'
      • {{ data.username||data.groupname||data.name||"佚名" }}

        {{ data.remark||data.sign||"" }}

        new
      • ',"{{# }); if(length === 0){ }}",'
      • '+(a[i.type]||"暂无数据")+"
      • ","{{# } }}"].join("")},y=['
        ','
        ','
        {{ d.mine.username }}
        ','
        ','{{# if(d.mine.status === "online"){ }}','','{{# } else if(d.mine.status === "hide") { }}','',"{{# } }}",'
          ','
        • 在线
        • ','
        • 隐身
        • ',"
        ","
        ",'',"
        ",'
          ','
        • ','
        • ','
        • ',"
        ",'
          ','{{# layui.each(d.friend, function(index, item){ var spread = d.local["spread"+index]; }}',"
        • ",'
          {{# if(spread === "true"){ }}{{# } else { }}{{# } }}{{ item.groupname||"未命名分组"+index }}( {{ (item.list||[]).length }})
          ','
            ',u({type:"friend",item:"item.list",index:"index"}),"
          ","
        • ","{{# }); if(d.friend.length === 0){ }}",'
          • 暂无联系人
          ',"{{# } }}","
        ",'
          ',"
        • ",'
            ',u({type:"group"}),"
          ","
        • ","
        ",'
          ',"
        • ",'
            ',u({type:"history"}),"
          ","
        • ","
        ",'
          ',"
        • ",'',"
        • ","
        ",'
          ','',"{{# if(d.base.msgbox){ }}",'
        • ',"{{# } }}","{{# if(d.base.find){ }}",'
        • ',"{{# } }}",'
        • ',"{{# if(!d.base.copyright){ }}",'
        • ',"{{# } }}","
        ",'',"
        "].join(""),m=['
          ',"{{# layui.each(d.skin, function(index, item){ }}",'
        • ',"{{# }); }}",'
        • 简约
        • ',"
        "].join(""),f=['
        ','
        ','
        ','{{ d.data.name||"佚名" }} {{d.data.temporary ? "临时会话" : ""}} {{# if(d.data.type==="group"){ }} {{# } }}','

        ',"
        ","
        ",'
        ',"
          ","
          ",'","
          "].join(""),p=['
          ','

          {{ d.data.name||"" }}

          ','
          ','{{# if(d.data.type === "friend" && d.type === "setGroup"){ }}',"

          选择分组

          ",'{{# } if(d.data.type === "friend"){ }}','","{{# } }}",'{{# if(d.data.type === "group"){ }}',"

          请输入验证信息

          ",'{{# } if(d.type !== "setGroup"){ }}','',"{{# } }}","
          ","
          "].join(""),h=['
        • ','
          ',"{{# if(d.mine){ }}",'{{ layui.data.date(d.timestamp) }}{{ d.username||"佚名" }}',"{{# } else { }}",'{{ d.username||"佚名" }}{{ layui.data.date(d.timestamp) }}',"{{# } }}","
          ",'
          {{ layui.data.content(d.content||" ") }}
          ',"
        • "].join(""),v='
        • {{ d.data.name||"佚名" }}{{# if(!d.base.brief){ }}ဇ{{# } }}
        • ',g=function(i){return i<10?"0"+(0|i):i};layui.data.date=function(i){var a=new Date(i||new Date);return a.getFullYear()+"-"+g(a.getMonth()+1)+"-"+g(a.getDate())+" "+g(a.getHours())+":"+g(a.getMinutes())+":"+g(a.getSeconds())},layui.data.content=function(i){var a=function(i){return new RegExp("\\n*\\["+(i||"")+"(code|pre|div|span|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)\\]\\n*","g")};return i=(i||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(/@(\S+)(\s+?|$)/g,'@$1$2').replace(/face\[([^\s\[\]]+?)\]/g,function(i){var a=i.replace(/^face/g,"");return''+a+''}).replace(/img\[([^\s]+?)\]/g,function(i){return''}).replace(/file\([\s\S]+?\)\[[\s\S]*?\]/g,function(i){var a=(i.match(/file\(([\s\S]+?)\)\[/)||[])[1],e=(i.match(/\)\[([\s\S]*?)\]/)||[])[1];return a?''+(e||a)+"":i}).replace(/audio\[([^\s]+?)\]/g,function(i){return'

          音频消息

          '}).replace(/video\[([^\s]+?)\]/g,function(i){return'
          '}).replace(/a\([\s\S]+?\)\[[\s\S]*?\]/g,function(i){var a=(i.match(/a\(([\s\S]+?)\)\[/)||[])[1],e=(i.match(/\)\[([\s\S]*?)\]/)||[])[1];return a?''+(e||a)+"":i}).replace(a(),"<$1 $2>").replace(a("/"),"").replace(/\n/g,"
          ")};var x,b,w,k,C,S=function(i,a,n){return i=i||{},e.ajax({url:i.url,type:i.type||"get",data:i.data,dataType:i.dataType||"json",cache:!1,success:function(i){0==i.code?a&&a(i.data||{}):t.msg(i.msg||(n||"Error")+": LAYIM_NOT_GET_DATA",{time:5e3})},error:function(i,a){window.console&&console.log&&console.error("LAYIM_DATE_ERROR:"+a)}})},j={message:{},chat:[]},H=function(i){var a=i.init||{};return mine=a.mine||{},local=layui.data("layim")[mine.id]||{},obj={base:i,local:local,mine:mine,history:local.history||{}},create=function(a){var t=a.mine||{},l=layui.data("layim")[t.id]||{},s={base:i,local:l,mine:t,friend:a.friend||[],group:a.group||[],history:l.history||{}};j=e.extend(j,s),L(n(y).render(s)),(l.close||i.min)&&T(),layui.each(r.ready,function(i,a){a&&a(s)})},j=e.extend(j,obj),i.brief?layui.each(r.ready,function(i,a){a&&a(obj)}):void(a.url?S(a,create,"INIT"):create(a))},L=function(i){return t.open({type:1,area:["260px","520px"],skin:"layui-box layui-layim",title:"​",offset:"rb",id:"layui-layim",shade:!1,anim:2,resize:!1,content:i,success:function(i){x=i,R(i),j.base.right&&i.css("margin-left","-"+j.base.right),b&&t.close(b.attr("times"));var a=[],n=i.find(".layim-list-history");n.find("li").each(function(){a.push(e(this).prop("outerHTML"))}),a.length>0&&(a.reverse(),n.html(a.join(""))),A(),ti.sign()},cancel:function(i){T();var a=layui.data("layim")[j.mine.id]||{};return a.close=!0,layui.data("layim",{key:j.mine.id,value:a}),!1}})},A=function(){x.on("contextmenu",function(i){return i.cancelBubble=!0,i.returnValue=!1,!1});var i=function(){t.closeAll("tips")};x.find(".layim-list-history").on("contextmenu","li",function(a){var n=e(this),l='
          • 移除该会话
          • 清空全部会话列表
          ';n.hasClass("layim-null")||(t.tips(l,this,{tips:1,time:0,anim:5,fixed:!0,skin:"layui-box layui-layim-contextmenu",success:function(i){var a=function(i){ii(i)};i.off("mousedown",a).on("mousedown",a)}}),e(document).off("mousedown",i).on("mousedown",i),e(window).off("resize",i).on("resize",i))})},T=function(i){return b&&t.close(b.attr("times")),x&&x.hide(),j.mine=j.mine||{},t.open({type:1,title:!1,id:"layui-layim-close",skin:"layui-box layui-layim-min layui-layim-close",shade:!1,closeBtn:!1,anim:2,offset:"rb",resize:!1,content:''+(i||j.base.title||"我的LayIM")+"",move:"#layui-layim-close img",success:function(i,a){b=i,j.base.right&&i.css("margin-left","-"+j.base.right),i.on("click",function(){t.close(a),x.show();var i=layui.data("layim")[j.mine.id]||{};delete i.close,layui.data("layim",{key:j.mine.id,value:i})})}})},z=function(i){i=i||{};var a=e("#layui-layim-chat"),l={data:i,base:j.base,local:j.local};if(!i.id)return t.msg("非法用户");if(a[0]){var s=w.find(".layim-chat-list"),o=s.find(".layim-chatlist-"+i.type+i.id),d=w.find(".layui-layer-max").hasClass("layui-layer-maxmin"),c=a.children(".layim-chat-box");return"none"===w.css("display")&&w.show(),k&&t.close(k.attr("times")),1!==s.find("li").length||o[0]||(d||w.css("width",800),s.css({height:w.height()}).show(),c.css("margin-left","200px")),o[0]||(s.append(n(v).render(l)),c.append(n(f).render(l)),I(i),E()),O(s.find(".layim-chatlist-"+i.type+i.id)),o[0]||U(),$(i),Q(),C}l.first=!0;var u=C=t.open({type:1,area:"600px",skin:"layui-box layui-layim-chat",id:"layui-layim-chat",title:"​",shade:!1,maxmin:!0,offset:i.offset||"auto",anim:i.anim||0,closeBtn:!j.base.brief&&1,content:n('
            '+v+'
          '+f+"
          ").render(l),success:function(a){w=a,a.css({"min-width":"500px","min-height":"420px"}),I(i),"function"==typeof i.success&&i.success(a),Q(),R(a),$(i),U(),q(),layui.each(r.chatChange,function(i,a){a&&a(_())}),a.on("dblclick",".layui-layim-photos",function(){var i=this.src;t.close(z.photosIndex),t.photos({photos:{data:[{alt:"大图模式",src:i}]},shade:.01,closeBtn:2,anim:0,resize:!1,success:function(i,a){z.photosIndex=a}})})},full:function(i){t.style(u,{width:"100%",height:"100%"},!0),E()},resizing:E,restore:E,min:function(){return N(),!1},end:function(){t.closeAll("tips"),w=null}});return u},I=function(i){e(".layim-"+i.type+i.id).each(function(){e(this).hasClass("layim-list-gray")&&layui.layim.setFriendStatus(i.id,"offline")})},E=function(){var i=w.find(".layim-chat-list"),a=w.find(".layim-chat-main"),e=w.height();i.css({height:e}),a.css({height:e-20-80-158})},N=function(i){var a=i||_().data,n=layui.layim.cache().base;w&&!i&&w.hide(),t.close(N.index),N.index=t.open({type:1,title:!1,skin:"layui-box layui-layim-min",shade:!1,closeBtn:!1,anim:a.anim||2,offset:"b",move:"#layui-layim-min",resize:!1,area:["182px","50px"],content:''+a.name+"",success:function(a,l){i||(k=a),n.minRight&&t.style(l,{left:e(window).width()-a.outerWidth()-parseFloat(n.minRight)}),a.find(".layui-layer-content span").on("click",function(){t.close(l),i?layui.each(j.chat,function(i,a){z(a)}):w.show(),i&&(j.chat=[],Z())}),a.find(".layui-layer-content img").on("click",function(i){ii(i)})}})},M=function(i,a){return i=i||{},t.close(M.index),M.index=t.open({type:1,area:"430px",title:{friend:"添加好友",group:"加入群组"}[i.type]||"",shade:!1,resize:!1,btn:a?["确认","取消"]:["发送申请","关闭"],content:n(p).render({data:{name:i.username||i.groupname,avatar:i.avatar,group:i.group||parent.layui.layim.cache().friend||[],type:i.type},type:a}),yes:function(e,t){var n=t.find("#LAY_layimGroup"),l=t.find("#LAY_layimRemark");a?i.submit&&i.submit(n.val(),e):i.submit&&i.submit(n.val(),l.val(),e)}})},O=function(i,a){i=i||e(".layim-chat-list ."+o);var n=i.index()===-1?0:i.index(),l=".layim-chat",d=w.find(l).eq(n),c=w.find(".layui-layer-max").hasClass("layui-layer-maxmin");if(a){i.hasClass(o)&&O(0===n?i.next():i.prev());var u=w.find(l).length;return 1===u?t.close(C):(i.remove(),d.remove(),2===u&&(w.find(".layim-chat-list").hide(),c||w.css("width","600px"),w.find(".layim-chat-box").css("margin-left",0)),!1)}i.addClass(o).siblings().removeClass(o),d.addClass(s).siblings(l).removeClass(s),d.find("textarea").focus(),layui.each(r.chatChange,function(i,a){a&&a(_())}),q()},q=function(){var i=_(),a=j.message[i.data.type+i.data.id];a&&delete j.message[i.data.type+i.data.id]},_=c.prototype.thisChat=function(){if(w){var i=e(".layim-chat-list ."+o).index(),a=w.find(".layim-chat").eq(i),t=JSON.parse(decodeURIComponent(a.find(".layim-chat-tool").data("json")));return{elem:a,data:t,textarea:a.find("textarea")}}},R=function(i){var a=layui.data("layim")[j.mine.id]||{},e=a.skin;i.css({"background-image":e?"url("+e+")":function(){return j.base.initSkin?"url("+(layui.cache.dir+"css/modules/layim/skin/"+j.base.initSkin)+")":"none"}()})},$=function(i){var a=layui.data("layim")[j.mine.id]||{},e={},t=a.history||{},l=t[i.type+i.id];if(x){var s=x.find(".layim-list-history");if(i.historyTime=(new Date).getTime(),t[i.type+i.id]=i,a.history=t,layui.data("layim",{key:j.mine.id,value:a}),!l){e[i.type+i.id]=i;var o=n(u({type:"history",item:"d.data"})).render({data:e});s.prepend(o),s.find(".layim-null").remove()}}},D=function(){var i={username:j.mine?j.mine.username:"访客",avatar:j.mine?j.mine.avatar:layui.cache.dir+"css/pc/layim/skin/logo.jpg",id:j.mine?j.mine.id:null,mine:!0},a=_(),e=a.elem.find(".layim-chat-main ul"),l=j.base.maxLength||3e3;if(i.content=a.textarea.val(),""!==i.content.replace(/\s/g,"")){if(i.content.length>l)return t.msg("内容最长不能超过"+l+"个字符");e.append(n(h).render(i));var s={mine:i,to:a.data},o={username:s.mine.username,avatar:s.mine.avatar,id:s.to.id,type:s.to.type,content:s.mine.content,timestamp:(new Date).getTime(),mine:!0};B(o),layui.each(r.sendMessage,function(i,a){a&&a(s)})}Z(),a.textarea.val("").focus()},J=function(i){if(i=i||{},window.Notification)if("granted"===Notification.permission){new Notification(i.title||"",{body:i.content||"",icon:i.avatar||"http://tp2.sinaimg.cn/5488749285/50/5719808192/1"})}else Notification.requestPermission()},F=function(){if(!(l.ie&&l.ie<9)){var i=document.createElement("audio");i.src=layui.cache.dir+"css/modules/layim/voice/"+j.base.voice,i.play()}},G={},K=function(i){i=i||{};var a=e(".layim-chatlist-"+i.type+i.id),t={},l=a.index();if(i.timestamp=i.timestamp||(new Date).getTime(),i.fromid==j.mine.id&&(i.mine=!0),i.system||B(i),G=JSON.parse(JSON.stringify(i)),j.base.voice&&F(),!w&&i.content||l===-1){if(j.message[i.type+i.id])j.message[i.type+i.id].push(i);else if(j.message[i.type+i.id]=[i],"friend"===i.type){var s;layui.each(j.friend,function(a,e){if(layui.each(e.list,function(a,e){if(e.id==i.id)return e.type="friend",e.name=e.username,j.chat.push(e),s=!0}),s)return!0}),s||(i.name=i.username,i.temporary=!0,j.chat.push(i))}else if("group"===i.type){var o;layui.each(j.group,function(a,e){if(e.id==i.id)return e.type="group",e.name=e.groupname,j.chat.push(e),o=!0}),o||(i.name=i.groupname,j.chat.push(i))}else i.name=i.name||i.username||i.groupname,j.chat.push(i);if("group"===i.type&&layui.each(j.group,function(a,e){if(e.id==i.id)return t.avatar=e.avatar,!0}),!i.system)return j.base.notice&&J({title:"来自 "+i.username+" 的消息",content:i.content,avatar:t.avatar||i.avatar}),N({name:"收到新消息",avatar:t.avatar||i.avatar,anim:6})}if(w){var d=_();d.data.type+d.data.id!==i.type+i.id&&(a.addClass("layui-anim layer-anim-06"),setTimeout(function(){a.removeClass("layui-anim layer-anim-06")},300));var r=w.find(".layim-chat").eq(l),c=r.find(".layim-chat-main ul");i.system?l!==-1&&c.append('
        • '+i.content+"
        • "):""!==i.content.replace(/\s/g,"")&&c.append(n(h).render(i)),Z()}},Y="layui-anim-loop layer-anim-05",V=function(i){var a=x.find(".layim-tool-msgbox");a.find("span").addClass(Y).html(i)},B=function(i){var a=layui.data("layim")[j.mine.id]||{};a.chatlog=a.chatlog||{};var e=a.chatlog[i.type+i.id];if(e){var t;layui.each(e,function(a,e){e.timestamp===i.timestamp&&e.type===i.type&&e.id===i.id&&e.content===i.content&&(t=!0)}),t||i.fromid==j.mine.id||e.push(i),e.length>d&&e.shift()}else a.chatlog[i.type+i.id]=[i];layui.data("layim",{key:j.mine.id,value:a})},U=function(){var i=layui.data("layim")[j.mine.id]||{},a=_(),e=i.chatlog||{},t=a.elem.find(".layim-chat-main ul");layui.each(e[a.data.type+a.data.id],function(i,a){t.append(n(h).render(a))}),Z()},P=function(i){var a,e={},l=x.find(".layim-list-"+i.type);if(j[i.type])if("friend"===i.type)layui.each(j.friend,function(n,l){if(i.groupid==l.id)return layui.each(j.friend[n].list,function(e,t){if(t.id==i.id)return a=!0}),a?t.msg("好友 ["+(i.username||"")+"] 已经存在列表中",{anim:6}):(j.friend[n].list=j.friend[n].list||[],e[j.friend[n].list.length]=i,i.groupIndex=n,j.friend[n].list.push(i),!0)});else if("group"===i.type){if(layui.each(j.group,function(e,t){if(t.id==i.id)return a=!0}),a)return t.msg("您已是 ["+(i.groupname||"")+"] 的群成员",{anim:6});e[j.group.length]=i,j.group.push(i)}if(!a){var s=n(u({type:i.type,item:"d.data",index:"friend"===i.type?"data.groupIndex":null})).render({data:e});if("friend"===i.type){var o=l.find(">li").eq(i.groupIndex);o.find(".layui-layim-list").append(s),o.find(".layim-count").html(j.friend[i.groupIndex].list.length),o.find(".layim-null")[0]&&o.find(".layim-null").remove()}else"group"===i.type&&(l.append(s),l.find(".layim-null")[0]&&l.find(".layim-null").remove())}},W=function(i){var a=x.find(".layim-list-"+i.type);j[i.type]&&("friend"===i.type?layui.each(j.friend,function(e,t){layui.each(t.list,function(t,n){if(i.id==n.id){var l=a.find(">li").eq(e);l.find(".layui-layim-list>li");return l.find(".layui-layim-list>li").eq(t).remove(),j.friend[e].list.splice(t,1),l.find(".layim-count").html(j.friend[e].list.length),0===j.friend[e].list.length&&l.find(".layui-layim-list").html('
        • 该分组下已无好友了
        • '),!0}})}):"group"===i.type&&layui.each(j.group,function(e,t){if(i.id==t.id)return a.find(">li").eq(e).remove(),j.group.splice(e,1),0===j.group.length&&a.html('
        • 暂无群组
        • '),!0}))},Z=function(){var i=_(),a=i.elem.find(".layim-chat-main"),e=a.find("ul"),t=e.find("li").length;if(t>=d){var n=e.find("li").eq(0);e.prev().hasClass("layim-chat-system")||e.before('
          查看更多记录
          '),t>d&&n.remove()}a.scrollTop(a[0].scrollHeight+1e3),a.find("ul li:last").find("img").load(function(){a.scrollTop(a[0].scrollHeight+1e3)})},Q=function(){var i=_(),a=i.textarea;a.focus(),a.off("keydown").on("keydown",function(i){var e=layui.data("layim")[j.mine.id]||{},t=i.keyCode;if("Ctrl+Enter"===e.sendHotKey)return void(i.ctrlKey&&13===t&&D());if(13===t){if(i.ctrlKey)return a.val(a.val()+"\n");if(i.shiftKey)return;i.preventDefault(),D()}})},X=function(){var i=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],a={};return layui.each(i,function(i,e){a[e]=layui.cache.dir+"images/face/"+i+".gif"}),a}(),ii=layui.stope,ai=function(i,a){var e,t=i.value;i.focus(),document.selection?(e=document.selection.createRange(),document.selection.empty(),e.text=a):(e=[t.substring(0,i.selectionStart),a,t.substr(i.selectionEnd)],i.focus(),i.value=e.join(""))},ei="layui-anim-upbit",ti={status:function(i,a){var t=function(){i.next().hide().removeClass(ei)},n=i.attr("lay-type");if("show"===n)ii(a),i.next().show().addClass(ei),e(document).off("click",t).on("click",t);else{var l=i.parent().prev();i.addClass(o).siblings().removeClass(o),l.html(i.find("cite").html()),l.removeClass("layim-status-"+("online"===n?"hide":"online")).addClass("layim-status-"+n),layui.each(r.online,function(i,a){a&&a(n)})}},sign:function(){var i=x.find(".layui-layim-remark");i.on("change",function(){var i=this.value;layui.each(r.sign,function(a,e){e&&e(i)})}),i.on("keyup",function(i){var a=i.keyCode;13===a&&this.blur()})},tab:function(i){var a,e=".layim-tab-content",t=x.find(".layui-layim-tab>li");"number"==typeof i?(a=i,i=t.eq(a)):a=i.index(),a>2?t.removeClass(o):(ti.tab.index=a,i.addClass(o).siblings().removeClass(o)),x.find(e).eq(a).addClass(s).siblings(e).removeClass(s)},spread:function(i){var a=i.attr("lay-type"),e="true"===a?"false":"true",t=layui.data("layim")[j.mine.id]||{};i.next()["true"===a?"removeClass":"addClass"](s),t["spread"+i.parent().index()]=e,layui.data("layim",{key:j.mine.id,value:t}),i.attr("lay-type",e),i.find(".layui-icon").html("true"===e?"":"")},search:function(i){var a=x.find(".layui-layim-search"),e=x.find("#layui-layim-search"),t=a.find("input"),n=function(i){var a=t.val().replace(/\s/);if(""===a)ti.tab(0|ti.tab.index);else{for(var n=[],l=j.friend||[],s=j.group||[],o="",d=0;d0)for(var u=0;u'+(n[u].username||n[u].groupname||"佚名")+"

          "+(n[u].remark||n[u].sign||"")+"

          ";else o='
        • 无搜索结果
        • ';e.html(o),ti.tab(3)}};!j.base.isfriend&&j.base.isgroup?ti.tab.index=1:j.base.isfriend||j.base.isgroup||(ti.tab.index=2),a.show(),t.focus(),t.off("keyup",n).on("keyup",n)},closeSearch:function(i){i.parent().hide(),ti.tab(0|ti.tab.index)},msgbox:function(){var i=x.find(".layim-tool-msgbox");return t.close(ti.msgbox.index),i.find("span").removeClass(Y).html(""),ti.msgbox.index=t.open({type:2,title:"消息盒子",shade:!1,maxmin:!0,area:["600px","520px"],skin:"layui-box layui-layer-border",resize:!1,content:j.base.msgbox})},find:function(){return t.close(ti.find.index),ti.find.index=t.open({type:2,title:"查找",shade:!1,maxmin:!0,area:["1000px","520px"],skin:"layui-box layui-layer-border",resize:!1,content:j.base.find})},skin:function(){t.open({type:1,title:"更换背景",shade:!1,area:"300px",skin:"layui-box layui-layer-border",id:"layui-layim-skin",zIndex:66666666,resize:!1,content:n(m).render({skin:j.base.skin})})},about:function(){t.alert("版本: "+a+'
          版权所有:layim.layui.com',{title:"关于 LayIM",shade:!1})},setSkin:function(i){var a=i.attr("src"),e=layui.data("layim")[j.mine.id]||{};e.skin=a,a||delete e.skin,layui.data("layim",{key:j.mine.id,value:e});try{x.css({"background-image":a?"url("+a+")":"none"}),w.css({"background-image":a?"url("+a+")":"none"})}catch(t){}layui.each(r.setSkin,function(i,e){var t=(a||"").replace(layui.cache.dir+"css/modules/layim/skin/","");e&&e(t,a)})},chat:function(i){var a=layui.data("layim")[j.mine.id]||{},e=i.data("type"),t=i.data("index"),n=i.attr("data-list")||i.index(),l={};"friend"===e?l=j[e][t].list[n]:"group"===e?l=j[e][n]:"history"===e&&(l=(a.history||{})[t]||{}),l.name=l.name||l.username||l.groupname,"history"!==e&&(l.type=e),z(l)},tabChat:function(i){O(i)},closeChat:function(i,a){O(i.parent(),1),ii(a)},closeThisChat:function(){O(null,1)},groupMembers:function(i,a){var n=i.find(".layui-icon"),l=function(){n.html(""),i.data("down",null),t.close(ti.groupMembers.index)},s=function(i){ii(i)};i.data("down")?l():(n.html(""),i.data("down",!0),ti.groupMembers.index=t.tips('
            ',i,{tips:3,time:0,anim:5,fixed:!0,skin:"layui-box layui-layim-members",success:function(a){var t=j.base.members||{},n=_(),s=a.find(".layim-members-list"),o="",d={},c=w.find(".layui-layer-max").hasClass("layui-layer-maxmin"),u="none"===w.find(".layim-chat-list").css("display");c&&s.css({width:e(window).width()-22-(u||200)}),t.data=e.extend(t.data,{id:n.data.id}),S(t,function(a){layui.each(a.list,function(i,a){o+='
          • '+a.username+"
          • ",d[a.id]=a}),s.html(o),i.find(".layim-chat-members").html(a.members||(a.list||[]).length+"人"),s.find("li").on("click",function(){var i=e(this).data("uid"),a=d[i];z({name:a.username,type:"friend",avatar:a.avatar,id:a.id}),l()}),layui.each(r.members,function(i,e){e&&e(a)})}),a.on("mousedown",function(i){ii(i)})}}),e(document).off("mousedown",l).on("mousedown",l),e(window).off("resize",l).on("resize",l),i.off("mousedown",s).on("mousedown",s))},send:function(){D()},setSend:function(i,a){var t=ti.setSend.box=i.siblings(".layim-menu-box"),n=i.attr("lay-type");if("show"===n)ii(a),t.show().addClass(ei),e(document).off("click",ti.setSendHide).on("click",ti.setSendHide);else{i.addClass(o).siblings().removeClass(o);var l=layui.data("layim")[j.mine.id]||{};l.sendHotKey=n,layui.data("layim",{key:j.mine.id,value:l}),ti.setSendHide(a,i.parent())}},setSendHide:function(i,a){(a||ti.setSend.box).hide().removeClass(ei)},face:function(i,a){var n="",l=_();for(var s in X)n+='
          • ';n='
              '+n+"
            ",ti.face.index=t.tips(n,i,{tips:1,time:0,fixed:!0,skin:"layui-box layui-layim-face",success:function(i){i.find(".layim-face-list>li").on("mousedown",function(i){ii(i)}).on("click",function(){ai(l.textarea[0],"face"+this.title+" "),t.close(ti.face.index); +})}}),e(document).off("mousedown",ti.faceHide).on("mousedown",ti.faceHide),e(window).off("resize",ti.faceHide).on("resize",ti.faceHide),ii(a)},faceHide:function(){t.close(ti.face.index)},image:function(i){var a=i.data("type")||"images",e={images:"uploadImage",file:"uploadFile"},n=_(),l=j.base[e[a]]||{};layui.upload.render({url:l.url||"",method:l.type,elem:i.find("input")[0],accept:a,done:function(i){0==i.code?(i.data=i.data||{},"images"===a?ai(n.textarea[0],"img["+(i.data.src||"")+"]"):"file"===a&&ai(n.textarea[0],"file("+(i.data.src||"")+")["+(i.data.name||"下载文件")+"]"),D()):t.msg(i.msg||"上传失败")}})},media:function(i){var a=i.data("type"),n={audio:"音频",video:"视频"},l=_();t.prompt({title:"请输入网络"+n[a]+"地址",shade:!1,offset:[i.offset().top-e(window).scrollTop()-158+"px",i.offset().left+"px"]},function(i,e){ai(l.textarea[0],a+"["+i+"]"),D(),t.close(e)})},extend:function(i){var a=i.attr("lay-filter"),e=_();layui.each(r["tool("+a+")"],function(a,t){t&&t.call(i,function(i){ai(e.textarea[0],i)},D,e)})},playAudio:function(i){var a=i.data("audio"),e=a||document.createElement("audio"),n=function(){e.pause(),i.removeAttr("status"),i.find("i").html("")};return i.data("error")?t.msg("播放音频源异常"):e.play?void(i.attr("status")?n():(a||(e.src=i.data("src")),e.play(),i.attr("status","pause"),i.data("audio",e),i.find("i").html(""),e.onended=function(){n()},e.onerror=function(){t.msg("播放音频源异常"),i.data("error",!0),n()})):t.msg("您的浏览器不支持audio")},playVideo:function(i){var a=i.data("src"),e=document.createElement("video");return e.play?(t.close(ti.playVideo.index),void(ti.playVideo.index=t.open({type:1,title:"播放视频",area:["460px","300px"],maxmin:!0,shade:!1,content:'
            '}))):t.msg("您的浏览器不支持video")},chatLog:function(i){var a=_();return j.base.chatLog?(t.close(ti.chatLog.index),ti.chatLog.index=t.open({type:2,maxmin:!0,title:"与 "+a.data.name+" 的聊天记录",area:["450px","100%"],shade:!1,offset:"rb",skin:"layui-box",anim:2,id:"layui-layim-chatlog",content:j.base.chatLog+"?id="+a.data.id+"&type="+a.data.type})):t.msg("未开启更多聊天记录")},menuHistory:function(i,a){var n=layui.data("layim")[j.mine.id]||{},l=i.parent(),s=i.data("type"),o=x.find(".layim-list-history"),d='
          • 暂无历史会话
          • ';if("one"===s){var r=n.history;delete r[l.data("index")],n.history=r,layui.data("layim",{key:j.mine.id,value:n}),e(".layim-list-history li.layim-"+l.data("index")).remove(),0===o.find("li").length&&o.html(d)}else"all"===s&&(delete n.history,layui.data("layim",{key:j.mine.id,value:n}),o.html(d));t.closeAll("tips")}};i("layim",new c)}).addcss("modules/layim/layim.css?v=3.9.1","skinlayimcss"); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/laypage.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/laypage.js new file mode 100755 index 0000000..2e2ab0d --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/laypage.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('…');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
            ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
            "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/laytpl.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/laytpl.js new file mode 100755 index 0000000..11cc3c4 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/laytpl.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/mobile.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/mobile.js new file mode 100755 index 0000000..d21d000 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/mobile.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define(function(i){i("layui.mobile",layui.v)});layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},c={exp:function(e){return new RegExp(e,"g")},query:function(e,c,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return n((c||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var t=(window,document),i="querySelectorAll",n="getElementsByClassName",a=function(e){return t[i](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var i in e)t[i]=e[i];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var o=0,r=["layui-m-layer"],d=function(e){var t=this;t.config=l.extend(e),t.view()};d.prototype.view=function(){var e=this,i=e.config,s=t.createElement("div");e.id=s.id=r[0]+o,s.setAttribute("class",r[0]+" "+r[0]+(i.type||0)),s.setAttribute("index",o);var l=function(){var e="object"==typeof i.title;return i.title?'

            '+(e?i.title[0]:i.title)+"

            ":""}(),d=function(){"string"==typeof i.btn&&(i.btn=[i.btn]);var e,t=(i.btn||[]).length;return 0!==t&&i.btn?(e=''+i.btn[0]+"",2===t&&(e=''+i.btn[1]+""+e),'
            '+e+"
            "):""}();if(i.fixed||(i.top=i.hasOwnProperty("top")?i.top:100,i.style=i.style||"",i.style+=" top:"+(t.body.scrollTop+i.top)+"px"),2===i.type&&(i.content='

            '+(i.content||"")+"

            "),i.skin&&(i.anim="up"),"msg"===i.skin&&(i.shade=!1),s.innerHTML=(i.shade?"
            ':"")+'
            "+l+'
            '+i.content+"
            "+d+"
            ",!i.type||2===i.type){var y=t[n](r[0]+i.type),u=y.length;u>=1&&c.close(y[0].getAttribute("index"))}document.body.appendChild(s);var m=e.elem=a("#"+e.id)[0];i.success&&i.success(m),e.index=o++,e.action(i,m)},d.prototype.action=function(e,t){var i=this;e.time&&(l.timer[i.index]=setTimeout(function(){c.close(i.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),c.close(i.index)):e.yes?e.yes(i.index):c.close(i.index)};if(e.btn)for(var s=t[n]("layui-m-layerbtn")[0].children,o=s.length,r=0;r0&&e-1 in t)}function s(t){return A.call(t,function(t){return null!=t})}function u(t){return t.length>0?T.fn.concat.apply([],t):t}function c(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in F?F[t]:F[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||k[c(t)]?e:e+"px"}function h(t){var e,n;return $[t]||(e=L.createElement(t),L.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),$[t]=n),$[t]}function p(t){return"children"in t?D.call(t.children):T.map(t.childNodes,function(t){if(1==t.nodeType)return t})}function d(t,e){var n,r=t?t.length:0;for(n=0;n]*>/,R=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Z=/^(?:body|html)$/i,q=/([A-Z])/g,H=["val","css","html","text","data","width","height","offset"],I=["after","prepend","before","append"],V=L.createElement("table"),_=L.createElement("tr"),B={tr:L.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:_,th:_,"*":L.createElement("div")},U=/complete|loaded|interactive/,X=/^[\w-]*$/,J={},W=J.toString,Y={},G=L.createElement("div"),K={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},Q=Array.isArray||function(t){return t instanceof Array};return Y.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=G).appendChild(t),r=~Y.qsa(i,e).indexOf(t),o&&G.removeChild(t),r},C=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},N=function(t){return A.call(t,function(e,n){return t.indexOf(e)==n})},Y.fragment=function(t,e,n){var r,i,a;return R.test(t)&&(r=T(L.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace(z,"<$1>")),e===E&&(e=M.test(t)&&RegExp.$1),e in B||(e="*"),a=B[e],a.innerHTML=""+t,r=T.each(D.call(a.childNodes),function(){a.removeChild(this)})),o(n)&&(i=T(r),T.each(n,function(t,e){H.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},Y.Z=function(t,e){return new d(t,e)},Y.isZ=function(t){return t instanceof Y.Z},Y.init=function(t,n){var r;if(!t)return Y.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=Y.fragment(t,RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}else{if(e(t))return T(L).ready(t);if(Y.isZ(t))return t;if(Q(t))r=s(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=Y.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==E)return T(n).find(t);r=Y.qsa(L,t)}}return Y.Z(r,t)},T=function(t,e){return Y.init(t,e)},T.extend=function(t){var e,n=D.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){m(t,n,e)}),t},Y.qsa=function(t,e){var n,r="#"==e[0],i=!r&&"."==e[0],o=r||i?e.slice(1):e,a=X.test(o);return t.getElementById&&a&&r?(n=t.getElementById(o))?[n]:[]:1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType?[]:D.call(a&&!r&&t.getElementsByClassName?i?t.getElementsByClassName(o):t.getElementsByTagName(e):t.querySelectorAll(e))},T.contains=L.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},T.type=t,T.isFunction=e,T.isWindow=n,T.isArray=Q,T.isPlainObject=o,T.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},T.isNumeric=function(t){var e=Number(t),n=typeof t;return null!=t&&"boolean"!=n&&("string"!=n||t.length)&&!isNaN(e)&&isFinite(e)||!1},T.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},T.camelCase=C,T.trim=function(t){return null==t?"":String.prototype.trim.call(t)},T.uuid=0,T.support={},T.expr={},T.noop=function(){},T.map=function(t,e){var n,r,i,o=[];if(a(t))for(r=0;r=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):T(A.call(this,function(e){return Y.matches(e,t)}))},add:function(t,e){return T(N(this.concat(T(t,e))))},is:function(t){return this.length>0&&Y.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==E)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):a(t)&&e(t.item)?D.call(t):T(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return T(n)},has:function(t){return this.filter(function(){return i(t)?T.contains(this,t):T(this).find(t).size()})},eq:function(t){return t===-1?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:T(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:T(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?T(t).filter(function(){var t=this;return O.some.call(n,function(e){return T.contains(e,t)})}):1==this.length?T(Y.qsa(this[0],t)):this.map(function(){return Y.qsa(this,t)}):T()},closest:function(t,e){var n=[],i="object"==typeof t&&T(t);return this.each(function(o,a){for(;a&&!(i?i.indexOf(a)>=0:Y.matches(a,t));)a=a!==e&&!r(a)&&a.parentNode;a&&n.indexOf(a)<0&&n.push(a)}),T(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=T.map(n,function(t){if((t=t.parentNode)&&!r(t)&&e.indexOf(t)<0)return e.push(t),t});return v(e,t)},parent:function(t){return v(N(this.pluck("parentNode")),t)},children:function(t){return v(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return this.contentDocument||D.call(this.childNodes)})},siblings:function(t){return v(this.map(function(t,e){return A.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return T.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=T(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){T(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){T(this[0]).before(t=T(t));for(var e;(e=t.children()).length;)t=e.first();T(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=T(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){T(this).replaceWith(T(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=T(this);(t===E?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return T(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return T(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;T(this).empty().append(g(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=g(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this.pluck("textContent").join(""):null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(j in t)y(this,j,t[j]);else y(this,t,g(this,e,n,this.getAttribute(t)))}):0 in this&&1==this[0].nodeType&&null!=(n=this[0].getAttribute(t))?n:E},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=K[t]||t,1 in arguments?this.each(function(n){this[t]=g(this,e,n,this[t])}):this[0]&&this[0][t]},removeProp:function(t){return t=K[t]||t,this.each(function(){delete this[t]})},data:function(t,e){var n="data-"+t.replace(q,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?b(r):E},val:function(t){return 0 in arguments?(null==t&&(t=""),this.each(function(e){this.value=g(this,t,e,this.value)})):this[0]&&(this[0].multiple?T(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=T(this),r=g(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(L.documentElement!==this[0]&&!T.contains(L.documentElement,this[0]))return{top:0,left:0};var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r=this[0];if("string"==typeof e){if(!r)return;return r.style[C(e)]||getComputedStyle(r,"").getPropertyValue(e)}if(Q(e)){if(!r)return;var i={},o=getComputedStyle(r,"");return T.each(e,function(t,e){i[e]=r.style[C(e)]||o.getPropertyValue(e)}),i}}var a="";if("string"==t(e))n||0===n?a=c(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(c(e))});else for(j in e)e[j]||0===e[j]?a+=c(j)+":"+f(j,e[j])+";":this.each(function(){this.style.removeProperty(c(j))});return this.each(function(){this.style.cssText+=";"+a})},index:function(t){return t?this.indexOf(T(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return!!t&&O.some.call(this,function(t){return this.test(x(t))},l(t))},addClass:function(t){return t?this.each(function(e){if("className"in this){S=[];var n=x(this),r=g(this,t,e,n);r.split(/\s+/g).forEach(function(t){T(this).hasClass(t)||S.push(t)},this),S.length&&x(this,n+(n?" ":"")+S.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===E)return x(this,"");S=x(this),g(this,t,e,S).split(/\s+/g).forEach(function(t){S=S.replace(l(t)," ")}),x(this,S.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=T(this),i=g(this,t,n,x(this));i.split(/\s+/g).forEach(function(t){(e===E?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===E?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===E?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=Z.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(T(t).css("margin-top"))||0,n.left-=parseFloat(T(t).css("margin-left"))||0,r.top+=parseFloat(T(e[0]).css("border-top-width"))||0,r.left+=parseFloat(T(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||L.body;t&&!Z.test(t.nodeName)&&"static"==T(t).css("position");)t=t.offsetParent;return t})}},T.fn.detach=T.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});T.fn[t]=function(i){var o,a=this[0];return i===E?n(a)?a["inner"+e]:r(a)?a.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){a=T(this),a.css(t,g(this,i,e,a[t]()))})}}),I.forEach(function(e,n){var r=n%2;T.fn[e]=function(){var e,i,o=T.map(arguments,function(n){var r=[];return e=t(n),"array"==e?(n.forEach(function(t){return t.nodeType!==E?r.push(t):T.zepto.isZ(t)?r=r.concat(t.get()):void(r=r.concat(Y.fragment(t)))}),r):"object"==e||null==n?n:Y.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var s=T.contains(L.documentElement,i);o.forEach(function(t){if(a)t=t.cloneNode(!0);else if(!i)return T(t).remove();i.insertBefore(t,e),s&&w(t,function(t){if(!(null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src)){var e=t.ownerDocument?t.ownerDocument.defaultView:window;e.eval.call(e,t.innerHTML)}})})})},T.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return T(t)[e](this),this}}),Y.Z.prototype=d.prototype=T.fn,Y.uniq=N,Y.deserializeValue=b,T.zepto=Y,T}();!function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||s.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!a||t.sel==a)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function a(t){return b[t]||y&&x[t]||t}function s(n,i,s,u,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(s);var i=r(e);i.fn=s,i.sel=l,i.e in b&&(s=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return i.fn.apply(this,arguments)}),i.del=h;var d=h||s;i.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,p))})}function u(t,r,i,s,u){var c=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,s).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(a(e.e),e.proxy,o(e,u))})})}function c(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(T,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=E}),e.timeStamp||(e.timeStamp=Date.now()),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)j.test(e)||t[e]===f||(n[e]=t[e]);return c(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},b={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:s,remove:u},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},E=function(){return!1},j=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,T={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var a,c,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,r,e,o)}),h):(m(n)||d(i)||i===!1||(i=r,r=n,n=f),i!==f&&r!==!1||(i=r,r=f),i===!1&&(i=E),h.each(function(f,h){o&&(a=function(t){return u(h,t.type,i),i.apply(this,arguments)}),n&&(c=function(e){var r,o=t(e.target).closest(n,h).get(0);if(o&&o!==h)return r=t.extend(l(e),{currentTarget:o,liveFired:h}),(a||i).apply(o,[r].concat(p.call(arguments,1)))}),s(h,e,i,r,n,c||a)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=f),r===!1&&(r=E),i.each(function(){u(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in x&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(a,s){i=l(m(e)?t.Event(e):e),i._args=r,i.target=s,t.each(n(s,e.type||e),function(t,e){if(o=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),c(n)}}(e),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){if(t.global)return e(n||x,r,i)}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)!==!1&&n(e,r,"ajaxBeforeSend",[t,e])!==!1&&void n(e,r,"ajaxSend",[t,e])}function a(t,e,r,i){var o=r.context,a="success";r.success.call(o,t,a,e),i&&i.resolveWith(o,[t,a,e]),n(r,o,"ajaxSuccess",[e,r,t]),u(a,e,r)}function s(t,e,r,i,o){var a=i.context;i.error.call(a,r,e,t),o&&o.rejectWith(a,[r,e,t]),n(i,a,"ajaxError",[r,i,t||e]),u(e,r,i)}function u(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function c(t,e,n){if(n.dataFilter==l)return t;var r=n.context;return n.dataFilter.call(r,t,e)}function l(){}function f(t){return t&&(t=t.split(";",2)[0]),t&&(t==T?"html":t==j?"json":w.test(t)?"script":E.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function p(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=h(e.url,e.data),e.data=void 0)}function d(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function m(e,n,r,i){var o,a=t.isArray(n),s=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?e.add(u.name,u.value):"array"==o||!r&&"object"==o?m(e,u,r,n):e.add(n,u)})}var v,g,y=+new Date,x=window.document,b=/)<[^<]*)*<\/script>/gi,w=/^(?:text|application)\/javascript/i,E=/^(?:text|application)\/xml/i,j="application/json",T="text/html",S=/^\s*$/,C=x.createElement("a");C.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"Zepto"+y++,l=x.createElement("script"),f=window[c],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?a(r[0],p,e,n):s(null,u||"error",p,e,n),window[c]=f,r&&t.isFunction(f)&&f(r[0]),f=r=void 0}),o(p,e)===!1?(h("abort"),p):(window[c]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),x.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:l,success:l,error:l,complete:l,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:j,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:l},t.ajax=function(e){var n,i,u=t.extend({},e||{}),d=t.Deferred&&t.Deferred();for(v in t.ajaxSettings)void 0===u[v]&&(u[v]=t.ajaxSettings[v]);r(u),u.crossDomain||(n=x.createElement("a"),n.href=u.url,n.href=n.href,u.crossDomain=C.protocol+"//"+C.host!=n.protocol+"//"+n.host),u.url||(u.url=window.location.toString()),(i=u.url.indexOf("#"))>-1&&(u.url=u.url.slice(0,i)),p(u);var m=u.dataType,y=/\?.+=\?/.test(u.url);if(y&&(m="jsonp"),u.cache!==!1&&(e&&e.cache===!0||"script"!=m&&"jsonp"!=m)||(u.url=h(u.url,"_="+Date.now())),"jsonp"==m)return y||(u.url=h(u.url,u.jsonp?u.jsonp+"=?":u.jsonp===!1?"":"callback=?")),t.ajaxJSONP(u,d);var b,w=u.accepts[m],E={},j=function(t,e){E[t.toLowerCase()]=[t,e]},T=/^([\w-]+:)\/\//.test(u.url)?RegExp.$1:window.location.protocol,N=u.xhr(),O=N.setRequestHeader;if(d&&d.promise(N),u.crossDomain||j("X-Requested-With","XMLHttpRequest"),j("Accept",w||"*/*"),(w=u.mimeType||w)&&(w.indexOf(",")>-1&&(w=w.split(",",2)[0]),N.overrideMimeType&&N.overrideMimeType(w)),(u.contentType||u.contentType!==!1&&u.data&&"GET"!=u.type.toUpperCase())&&j("Content-Type",u.contentType||"application/x-www-form-urlencoded"),u.headers)for(g in u.headers)j(g,u.headers[g]);if(N.setRequestHeader=j,N.onreadystatechange=function(){if(4==N.readyState){N.onreadystatechange=l,clearTimeout(b);var e,n=!1;if(N.status>=200&&N.status<300||304==N.status||0==N.status&&"file:"==T){if(m=m||f(u.mimeType||N.getResponseHeader("content-type")),"arraybuffer"==N.responseType||"blob"==N.responseType)e=N.response;else{e=N.responseText;try{e=c(e,m,u),"script"==m?(0,eval)(e):"xml"==m?e=N.responseXML:"json"==m&&(e=S.test(e)?null:t.parseJSON(e))}catch(r){n=r}if(n)return s(n,"parsererror",N,u,d)}a(e,N,u,d)}else s(N.statusText||null,N.status?"error":"abort",N,u,d)}},o(N,u)===!1)return N.abort(),s(null,"abort",N,u,d),N;var P=!("async"in u)||u.async;if(N.open(u.type,u.url,P,u.username,u.password),u.xhrFields)for(g in u.xhrFields)N[g]=u.xhrFields[g];for(g in E)O.apply(N,E[g]);return u.timeout>0&&(b=setTimeout(function(){N.onreadystatechange=l,N.abort(),s(null,"timeout",N,u,d)},u.timeout)),N.send(u.data?u.data:null),N},t.get=function(){return t.ajax(d.apply(null,arguments))},t.post=function(){var e=d.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=d.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,a=e.split(/\s/),s=d(e,n,r),u=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(e){o.html(i?t("
            ").html(e.replace(b,"")).find(i):e),u&&u.apply(o,arguments)},t.ajax(s),this};var N=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(N(e)+"="+N(n))},m(r,e,n),r.join("&").replace(/%20/g,"+")}}(e),function(t){t.fn.serializeArray=function(){var e,n,r=[],i=function(t){return t.forEach?t.forEach(i):void r.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(r,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&i(t(o).val())}),r},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(e),function(){try{getComputedStyle(void 0)}catch(t){var e=getComputedStyle;window.getComputedStyle=function(t,n){try{return e(t,n)}catch(r){return null}}}}(),t("zepto",e)});layui.define(["laytpl","upload","layer-mobile","zepto"],function(i){var e="2.2.0",a=layui.zepto,t=layui.laytpl,n=layui["layer-mobile"],l=layui.device(),s="layui-show",o="layim-this",c=20,d={},r=function(){this.v=e,u(a("body"),"*[layim-event]",function(i){var e=a(this),t=e.attr("layim-event");R[t]?R[t].call(this,e,i):""})},u=function(i,e,t){var n,l="function"==typeof e,s=function(i){var e=a(this);e.data("lock")||(n||t.call(this,i),n=!1,e.data("lock","true"),setTimeout(function(){e.removeAttr("data-lock")},e.data("locktime")||0))};return l&&(t=e),i="string"==typeof i?a(i):i,m?void(l?i.on("touchmove",function(){n=!0}).on("touchend",s):i.on("touchmove",e,function(){n=!0}).on("touchend",e,s)):void(l?i.on("click",s):i.on("click",e,s))},m=/Android|iPhone|SymbianOS|Windows Phone|iPad|iPod/.test(navigator.userAgent);n.popBottom=function(i){n.close(n.popBottom.index),n.popBottom.index=n.open(a.extend({type:1,content:i.content||"",shade:!1,className:"layim-layer"},i))},r.prototype.config=function(i){i=i||{},i=a.extend({title:"我的IM",isgroup:0,isNewFriend:!0,voice:"default.mp3",chatTitleColor:"#36373C"},i),C(i)},r.prototype.on=function(i,e){return"function"==typeof e&&(d[i]?d[i].push(e):d[i]=[e]),this},r.prototype.chat=function(i){if(window.JSON&&window.JSON.parse)return N(i,-1),this},r.prototype.panel=function(i){return S(i)},r.prototype.cache=function(){return w},r.prototype.getMessage=function(i){return D(i),this},r.prototype.addList=function(i){return $(i),this},r.prototype.removeList=function(i){return O(i),this},r.prototype.setFriendStatus=function(i,e){var t=a(".layim-friend"+i);t["online"===e?"removeClass":"addClass"]("layim-list-gray")},r.prototype.setChatStatus=function(i){var e=T(),a=e.elem.find(".layim-chat-status");return a.html(i),this},r.prototype.showNew=function(i,e){H(i,e)},r.prototype.content=function(i){return layui.data.content(i)};var y=function(i){var e={friend:"该分组下暂无好友",group:"暂无群组",history:"暂无任何消息"};return i=i||{},"history"===i.type&&(i.item=i.item||"d.sortHistory"),["{{# var length = 0; layui.each("+i.item+", function(i, data){ length++; }}",'
          • {{ data.username||data.groupname||data.name||"佚名" }}

            {{ data.remark||data.sign||"" }}

            new
          • ',"{{# }); if(length === 0){ }}",'
          • '+(e[i.type]||"暂无数据")+"
          • ","{{# } }}"].join("")},p=function(i,e,a){return['
            ','
            ',"

            ",a?'':"",'{{ d.title || d.base.title }}',"{{# if(d.data){ }}",'{{# if(d.data.type === "group"){ }}','',"{{# } }}","{{# } }}","

            ","
            ",'
            ',i,"
            ","
            "].join("")},f=['
            ','
            ','
              ','
                ',y({type:"history"}),"
              ","
            ","
            ",'
            ','
              ',"{{# if(d.base.isNewFriend){ }}",'
            • 新的朋友
            • ',"{{# } if(d.base.isgroup){ }}",'
            • 群聊
            • ',"{{# } }}","
            ",'
              ','{{# layui.each(d.friend, function(index, item){ var spread = d.local["spread"+index]; }}',"
            • ",'
              {{# if(spread === "true"){ }}{{# } else { }}{{# } }}{{ item.groupname||"未命名分组"+index }}( {{ (item.list||[]).length }})
              ','
                ',y({type:"friend",item:"item.list",index:"index"}),"
              ","
            • ","{{# }); if(d.friend.length === 0){ }}",'
              • 暂无联系人
              ',"{{# } }}","
            ","
            ",'
            ','
              ',"{{# layui.each(d.base.moreList, function(index, item){ }}",'
            • ','{{item.iconUnicode||""}}{{item.title}}',"
            • ","{{# }); if(!d.base.copyright){ }}",'
            • 关于
            • ',"{{# } }}","
            ","
            ","
            ",'
              ','
            • 消息
            • ','
            • 联系人
            • ','
            • 更多
            • ',"
            "].join(""),h=['
            ','
            ',"
              ","
              ",'","
              "].join(""),v=function(i){return i<10?"0"+(0|i):i};layui.data.date=function(i){var e=new Date(i||new Date);return v(e.getMonth()+1)+"-"+v(e.getDate())+" "+v(e.getHours())+":"+v(e.getMinutes())},layui.data.content=function(i){var e=function(i){return new RegExp("\\n*\\["+(i||"")+"(pre|div|p|table|thead|th|tbody|tr|td|ul|li|ol|li|dl|dt|dd|h2|h3|h4|h5)([\\s\\S]*?)\\]\\n*","g")};return i=(i||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""").replace(/@(\S+)(\s+?|$)/g,'@$1$2').replace(/face\[([^\s\[\]]+?)\]/g,function(i){var e=i.replace(/^face/g,"");return''+e+''}).replace(/img\[([^\s]+?)\]/g,function(i){return''}).replace(/file\([\s\S]+?\)\[[\s\S]*?\]/g,function(i){var e=(i.match(/file\(([\s\S]+?)\)\[/)||[])[1],a=(i.match(/\)\[([\s\S]*?)\]/)||[])[1];return e?''+(a||e)+"":i}).replace(/audio\[([^\s]+?)\]/g,function(i){return'

              音频消息

              '}).replace(/video\[([^\s]+?)\]/g,function(i){return'
              '}).replace(/a\([\s\S]+?\)\[[\s\S]*?\]/g,function(i){var e=(i.match(/a\(([\s\S]+?)\)\[/)||[])[1],a=(i.match(/\)\[([\s\S]*?)\]/)||[])[1];return e?''+(a||e)+"":i}).replace(e(),"<$1 $2>").replace(e("/"),"").replace(/\n/g,"
              ")};var g,b,x=['
            • ','
              {{ d.uid || d.id }}','{{ d.username||"佚名" }}',"
              ",'
              {{ layui.data.content(d.content||" ") }}
              ',"
            • "].join(""),w={message:{},chat:[]},C=function(i){var e=i.init||{};return mine=e.mine||{},local=layui.data("layim-mobile")[mine.id]||{},obj={base:i,local:local,mine:mine,history:local.history||[]},create=function(e){var n=e.mine||{},l=layui.data("layim-mobile")[n.id]||{},s={base:i,local:l,mine:n,friend:e.friend||[],group:e.group||[],history:l.history||[]};s.sortHistory=A(s.history,"historyTime"),w=a.extend(w,s),k(t(p(f)).render(s)),layui.each(d.ready,function(i,e){e&&e(s)})},w=a.extend(w,obj),i.brief?layui.each(d.ready,function(i,e){e&&e(obj)}):void create(e)},k=function(i){return n.open({type:1,shade:!1,shadeClose:!1,anim:-1,content:i,success:function(i){g=a(i),L(g.find(".layui-layim")),w.base.tabIndex&&R.tab(a(".layui-layim-tab>li").eq(w.base.tabIndex))}})},S=function(i,e){i=i||{};var l=a.extend({},w,{title:i.title||"",data:i.data});return n.open({type:1,shade:!1,shadeClose:!1,anim:-1,content:t(p(i.tpl,e!==-1,!0)).render(l),success:function(e){var t=a(e);t.prev().find(".layim-panel").addClass("layui-m-anim-lout"),i.success&&i.success(e),i.isChat||L(t.find(".layim-content"))},end:i.end})},N=function(i,e,t){return i=i||{},i.id?(n.close(N.index),N.index=S({tpl:h,data:i,title:i.name,isChat:!0,success:function(e){b=a(e),J(),F(),delete w.message[i.type+i.id],H("Msg");var t=T(),n=t.elem.find(".layim-chat-main");layui.each(d.chatChange,function(i,e){e&&e(t)}),L(n),t.textarea.on("focus",function(){setTimeout(function(){n.scrollTop(n[0].scrollHeight+1e3)},500)})},end:function(){b=null,I.time=0}},e)):n.msg("非法用户")},L=function(i){l.ios&&i.on("touchmove",function(e){var a=i.scrollTop();a<=0&&(i.scrollTop(1),e.preventDefault(e)),this.scrollHeight-a-i.height()<=0&&(i.scrollTop(i.scrollTop()-1),e.preventDefault(e))})},T=function(){if(!b)return{};var i=b.find(".layim-chat"),e=JSON.parse(decodeURIComponent(i.find(".layim-chat-tool").data("json")));return{elem:i,data:e,textarea:i.find("input")}},A=function(i,e,a){var t=[],n=function(i,a){var t=i[e],n=a[e];return nt?1:0};return layui.each(i,function(i,e){t.push(e)}),t.sort(n),a&&t.reverse(),t},j=function(i){var e=layui.data("layim-mobile")[w.mine.id]||{},a={},n=e.history||{};n[i.type+i.id];if(g){var l=g.find(".layim-list-history");i.historyTime=(new Date).getTime(),i.sign=i.content,n[i.type+i.id]=i,e.history=n,layui.data("layim-mobile",{key:w.mine.id,value:e});var o=l.find(".layim-"+i.type+i.id),c=(w.message[i.type+i.id]||[]).length,d=function(){o=l.find(".layim-"+i.type+i.id),o.find("p").html(i.content),c>0&&o.find(".layim-msg-status").html(c).addClass(s)};if(o.length>0)d(),l.prepend(o.clone()),o.remove();else{a[i.type+i.id]=i;var r=t(y({type:"history",item:"d.data"})).render({data:a});l.prepend(r),d(),l.find(".layim-null").remove()}H("Msg")}},H=function(i,e){if(!e){var e;layui.each(w.message,function(){return e=!0,!1})}a("#LAY_layimNew"+i)[e?"addClass":"removeClass"](s)},I=function(){var i={username:w.mine?w.mine.username:"访客",avatar:w.mine?w.mine.avatar:layui.cache.dir+"css/pc/layim/skin/logo.jpg",id:w.mine?w.mine.id:null,mine:!0},e=T(),a=e.elem.find(".layim-chat-main ul"),l=e.data,s=w.base.maxLength||3e3,o=(new Date).getTime(),c=e.textarea;if(i.content=c.val(),""!==i.content){if(i.content.length>s)return n.msg("内容最长不能超过"+s+"个字符");o-(I.time||0)>6e4&&(a.append('
            • '+layui.data.date()+"
            • "),I.time=o),a.append(t(x).render(i));var r={mine:i,to:l},u={username:r.mine.username,avatar:r.mine.avatar,id:l.id,type:l.type,content:r.mine.content,timestamp:o,mine:!0};M(u),layui.each(d.sendMessage,function(i,e){e&&e(r)}),l.content=i.content,j(l),Y(),c.val(""),c.next().addClass("layui-disabled")}},q=function(){var i=document.createElement("audio");i.src=layui.cache.dir+"css/modules/layim/voice/"+w.base.voice,i.play()},_={},D=function(i){i=i||{};var e={},n=T(),l=n.data||{},s=l.id==i.id&&l.type==i.type;i.timestamp=i.timestamp||(new Date).getTime(),i.system||M(i),console.log(i),_=JSON.parse(JSON.stringify(i)),w.base.voice&&q(),(!b&&i.content||!s)&&(w.message[i.type+i.id]?w.message[i.type+i.id].push(i):w.message[i.type+i.id]=[i]);var e={};if("friend"===i.type){var o;layui.each(w.friend,function(e,a){if(layui.each(a.list,function(e,a){if(a.id==i.id)return i.type="friend",i.name=a.username,o=!0}),o)return!0}),o||(i.temporary=!0)}else"group"===i.type?layui.each(w.group,function(a,t){if(t.id==i.id)return i.type="group",i.name=i.groupname=t.groupname,e.avatar=t.avatar,!0}):i.name=i.name||i.username||i.groupname;var c=a.extend({},i,{avatar:e.avatar||i.avatar});if("group"===i.type&&delete c.username,j(c),b&&s){var d=b.find(".layim-chat"),r=d.find(".layim-chat-main ul");i.system?r.append('
            • '+i.content+"
            • "):""!==i.content.replace(/\s/g,"")&&(i.timestamp-(I.time||0)>6e4&&(r.append('
            • '+layui.data.date(i.timestamp)+"
            • "),I.time=i.timestamp),r.append(t(x).render(i))),Y()}},M=function(i){var e=layui.data("layim-mobile")[w.mine.id]||{},a=e.chatlog||{};a[i.type+i.id]?(a[i.type+i.id].push(i),a[i.type+i.id].length>c&&a[i.type+i.id].shift()):a[i.type+i.id]=[i],e.chatlog=a,layui.data("layim-mobile",{key:w.mine.id,value:e})},F=function(){var i=layui.data("layim-mobile")[w.mine.id]||{},e=T(),a=i.chatlog||{},n=e.elem.find(".layim-chat-main ul");layui.each(a[e.data.type+e.data.id],function(i,e){(new Date).getTime()>e.timestamp&&e.timestamp-(I.time||0)>6e4&&(n.append('
            • '+layui.data.date(e.timestamp)+"
            • "),I.time=e.timestamp),n.append(t(x).render(e))}),Y()},$=function(i){var e,a={},l=g.find(".layim-list-"+i.type);if(w[i.type])if("friend"===i.type)layui.each(w.friend,function(t,l){if(i.groupid==l.id)return layui.each(w.friend[t].list,function(a,t){if(t.id==i.id)return e=!0}),e?n.msg("好友 ["+(i.username||"")+"] 已经存在列表中",{anim:6}):(w.friend[t].list=w.friend[t].list||[],a[w.friend[t].list.length]=i,i.groupIndex=t,w.friend[t].list.push(i),!0)});else if("group"===i.type){if(layui.each(w.group,function(a,t){if(t.id==i.id)return e=!0}),e)return n.msg("您已是 ["+(i.groupname||"")+"] 的群成员",{anim:6});a[w.group.length]=i,w.group.push(i)}if(!e){var s=t(y({type:i.type,item:"d.data",index:"friend"===i.type?"data.groupIndex":null})).render({data:a});if("friend"===i.type){var o=l.children("li").eq(i.groupIndex);o.find(".layui-layim-list").append(s),o.find(".layim-count").html(w.friend[i.groupIndex].list.length),o.find(".layim-null")[0]&&o.find(".layim-null").remove()}else"group"===i.type&&(l.append(s),l.find(".layim-null")[0]&&l.find(".layim-null").remove())}},O=function(i){var e=g.find(".layim-list-"+i.type);w[i.type]&&("friend"===i.type?layui.each(w.friend,function(a,t){layui.each(t.list,function(t,n){if(i.id==n.id){var l=e.children("li").eq(a);l.find(".layui-layim-list").children("li");return l.find(".layui-layim-list").children("li").eq(t).remove(),w.friend[a].list.splice(t,1),l.find(".layim-count").html(w.friend[a].list.length),0===w.friend[a].list.length&&l.find(".layui-layim-list").html('
            • 该分组下已无好友了
            • '),!0}})}):"group"===i.type&&layui.each(w.group,function(a,t){if(i.id==t.id)return e.children("li").eq(a).remove(),w.group.splice(a,1),0===w.group.length&&e.html('
            • 暂无群组
            • '),!0}))},Y=function(){var i=T(),e=i.elem.find(".layim-chat-main"),a=e.find("ul"),t=a.children(".layim-chat-li");if(t.length>=c){var n=t.eq(0);n.prev().remove(),a.prev().hasClass("layim-chat-system")||a.before('
              查看更多记录
              '),n.remove()}e.scrollTop(e[0].scrollHeight+1e3)},J=function(){var i=T(),e=i.textarea,a=e.next();e.off("keyup").on("keyup",function(i){var t=i.keyCode;13===t&&(i.preventDefault(),I()),a[""===e.val()?"addClass":"removeClass"]("layui-disabled")})},B=function(){var i=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(i,function(i,a){e[a]=layui.cache.dir+"images/face/"+i+".gif"}),e}(),E=layui.stope,P=function(i,e,a){var t,n=i.value;a||i.focus(),document.selection?(t=document.selection.createRange(),document.selection.empty(),t.text=e):(t=[n.substring(0,i.selectionStart),e,n.substr(i.selectionEnd)],a||i.focus(),i.value=t.join(""))},R={chat:function(i){var e=layui.data("layim-mobile")[w.mine.id]||{},t=i.data("type"),n=i.data("index"),l=i.attr("data-list")||i.index(),o={};"friend"===t?o=w[t][n].list[l]:"group"===t?o=w[t][l]:"history"===t&&(o=(e.history||{})[n]||{}),o.name=o.name||o.username||o.groupname,"history"!==t&&(o.type=t),N(o,!0),a(".layim-"+o.type+o.id).find(".layim-msg-status").removeClass(s)},spread:function(i){var e=i.attr("lay-type"),a="true"===e?"false":"true",t=layui.data("layim-mobile")[w.mine.id]||{};i.next()["true"===e?"removeClass":"addClass"](s),t["spread"+i.parent().index()]=a,layui.data("layim-mobile",{key:w.mine.id,value:t}),i.attr("lay-type",a),i.find(".layui-icon").html("true"===a?"":"")},tab:function(i){var e=i.index(),a=".layim-tab-content";i.addClass(o).siblings().removeClass(o),g.find(a).eq(e).addClass(s).siblings(a).removeClass(s)},back:function(i){var e=i.parents(".layui-m-layer").eq(0),a=e.attr("index"),t=".layim-panel";setTimeout(function(){n.close(a)},300),i.parents(t).eq(0).removeClass("layui-m-anim-left").addClass("layui-m-anim-rout"),e.prev().find(t).eq(0).removeClass("layui-m-anim-lout").addClass("layui-m-anim-right"),layui.each(d.back,function(i,e){setTimeout(function(){e&&e()},200)})},send:function(){I()},face:function(i,e){var t="",l=T(),s=l.textarea;layui.each(B,function(i,e){t+='
            • '}),t='
                '+t+"
              ",n.popBottom({content:t,success:function(i){var e=a(i).find(".layui-layim-face").children("li");u(e,function(){return P(s[0],"face"+this.title+" ",!0),s.next()[""===s.val()?"addClass":"removeClass"]("layui-disabled"),!1})}});var o=a(document);m?u(o,function(){R.faceHide()}):o.off("click",R.faceHide).on("click",R.faceHide),E(e)},faceHide:function(){n.close(n.popBottom.index),a(document).off("touchend",R.faceHide).off("click",R.faceHide)},image:function(i){var e=i.data("type")||"images",a={images:"uploadImage",file:"uploadFile"},t=T(),l=w.base[a[e]]||{};layui.upload.render({url:l.url||"",method:l.type,elem:i.find("input")[0],accept:e,done:function(i){0==i.code?(i.data=i.data||{},"images"===e?P(t.textarea[0],"img["+(i.data.src||"")+"]"):"file"===e&&P(t.textarea[0],"file("+(i.data.src||"")+")["+(i.data.name||"下载文件")+"]"),I()):n.msg(i.msg||"上传失败")}})},extend:function(i){var e=i.attr("lay-filter"),a=T();layui.each(d["tool("+e+")"],function(e,t){t&&t.call(i,function(i){P(a.textarea[0],i)},I,a)})},newFriend:function(){layui.each(d.newFriend,function(i,e){e&&e()})},group:function(){S({title:"群聊",tpl:['
              ',y({type:"group",item:"d.group"}),"
              "].join(""),data:{}})},detail:function(){var i=T();layui.each(d.detail,function(e,a){a&&a(i.data)})},playAudio:function(i){var e=i.data("audio"),a=e||document.createElement("audio"),t=function(){a.pause(),i.removeAttr("status"),i.find("i").html("")};return i.data("error")?n.msg("播放音频源异常"):a.play?void(i.attr("status")?t():(e||(a.src=i.data("src")),a.play(),i.attr("status","pause"),i.data("audio",a),i.find("i").html(""),a.onended=function(){t()},a.onerror=function(){n.msg("播放音频源异常"),i.data("error",!0),t()})):n.msg("您的浏览器不支持audio")},playVideo:function(i){var e=i.data("src"),a=document.createElement("video");return a.play?(n.close(R.playVideo.index),void(R.playVideo.index=n.open({type:1,anim:!1,style:"width: 100%; height: 50%;",content:'
              '}))):n.msg("您的浏览器不支持video")},chatLog:function(i){var e=T();layui.each(d.chatlog,function(i,a){a&&a(e.data,e.elem.find(".layim-chat-main>ul"))})},moreList:function(i){var e=i.attr("lay-filter");layui.each(d.moreList,function(i,a){a&&a({alias:e})})},about:function(){n.open({content:'

              LayIM属于付费产品,欢迎通过官网获得授权,促进良性发展!

              当前版本:layim mobile v'+e+'

              版权所有:layim.layui.com

              ',className:"layim-about",shadeClose:!1,btn:"我知道了"})}};i("layim-mobile",new r)}).addcss("modules/layim/mobile/layim.css?v=2.20","skinlayim-mobilecss");layui["layui.mobile"]||layui.config({base:layui.cache.dir+"lay/modules/mobile/"}).extend({"layer-mobile":"layer-mobile",zepto:"zepto","upload-mobile":"upload-mobile","layim-mobile":"layim-mobile"}),layui.define(["layer-mobile","zepto","layim-mobile"],function(l){l("mobile",{layer:layui["layer-mobile"],layim:layui["layim-mobile"]})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/rate.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/rate.js new file mode 100755 index 0000000..7feef34 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/rate.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var a=layui.jquery,i={config:{},index:layui.rate?layui.rate.index+1e4:0,set:function(e){var i=this;return i.config=a.extend({},i.config,e),i},on:function(e,a){return layui.onevent.call(this,n,e,a)}},l=function(){var e=this,a=e.config;return{setvalue:function(a){e.setvalue.call(e,a)},config:a}},n="rate",t="layui-rate",o="layui-icon-rate",s="layui-icon-rate-solid",u="layui-icon-rate-half",r="layui-icon-rate-solid layui-icon-rate-half",c="layui-icon-rate-solid layui-icon-rate",f="layui-icon-rate layui-icon-rate-half",v=function(e){var l=this;l.index=++i.index,l.config=a.extend({},l.config,i.config,e),l.render()};v.prototype.config={length:5,text:!1,readonly:!1,half:!1,value:0,theme:""},v.prototype.render=function(){var e=this,i=e.config,l=i.theme?'style="color: '+i.theme+';"':"";i.elem=a(i.elem),parseInt(i.value)!==i.value&&(i.half||(i.value=Math.ceil(i.value)-i.value<.5?Math.ceil(i.value):Math.floor(i.value)));for(var n='
                ",u=1;u<=i.length;u++){var r='
              • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
              • ":n+=r}n+="
              "+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/slider.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/slider.js new file mode 100755 index 0000000..6f824a9 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/slider.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
              '+(t.tips?'
              ':"")+'
              '+(t.range?'
              ':"")+"
              ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
              ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
              ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
              f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/table.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/table.js new file mode 100755 index 0000000..f301c04 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/table.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,y,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{config:t,reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)}}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u=function(e,a,l,n){var o=e.templet?function(){return"function"==typeof e.templet?e.templet(l):i(t(e.templet).html()||String(a)).render(l)}():a;return n?t("
              "+o+"
              ").text():o},y="table",h=".layui-table",f="layui-hide",p="layui-none",v="layui-table-view",m=".layui-table-tool",g=".layui-table-box",b=".layui-table-init",x=".layui-table-header",k=".layui-table-body",C=".layui-table-main",w=".layui-table-fixed",T=".layui-table-fixed-l",A=".layui-table-fixed-r",L=".layui-table-total",N=".layui-table-page",S=".layui-table-sort",R="layui-table-edit",W="layui-table-hover",_=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
              ','
              ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
              ","
              "].join("")},E=['',"","
              "].join(""),z=['
              ',"{{# if(d.data.toolbar){ }}",'
              ','
              ','
              ',"
              ","{{# } }}",'
              ',"{{# if(d.data.loading){ }}",'
              ','',"
              ","{{# } }}","{{# var left, right; }}",'
              ',_(),"
              ",'
              ',E,"
              ","{{# if(left){ }}",'
              ','
              ',_({fixed:!0}),"
              ",'
              ',E,"
              ","
              ","{{# }; }}","{{# if(right){ }}",'
              ','
              ',_({fixed:"right"}),'
              ',"
              ",'
              ',E,"
              ","
              ","{{# }; }}","
              ","{{# if(d.data.totalRow){ }}",'
              ','','',"
              ","
              ","{{# } }}","{{# if(d.data.page){ }}",'
              ','
              ',"
              ","{{# } }}","","
              "].join(""),H=t(window),j=t(document),F=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};F.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},F.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:1,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=H.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+v),o=e.elem=t(i(z).render({VIEW_CLASS:v,data:a,index:e.index}));if(a.index=e.index,e.key=a.id||a.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(m),e.layBox=o.find(g),e.layHeader=o.find(x),e.layMain=o.find(C),e.layBody=o.find(k),e.layFixed=o.find(w),e.layFixLeft=o.find(T),e.layFixRight=o.find(A),e.layTotal=o.find(L),e.layPage=o.find(N),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(x).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},F.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},F.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},F.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
              ','
              ','
              '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i="string"==typeof t?r[t]:t;i&&d.push('
              ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},F.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](f),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},F.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},F.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},F.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},F.prototype.reload=function(e){var i=this;e=e||{},delete i.haveInit,e.data&&e.data.constructor===Array&&delete i.config.data,i.config=t.extend(!0,{},i.config,e),i.render()},F.prototype.errorView=function(e){var i=this,a=i.layMain.find("."+p),l=t('
              '+(e||"Error")+"
              ");a[0]&&(i.layNone.remove(),a.remove()),i.layFixed.addClass(f),i.layMain.find("tbody").html(""),i.layMain.append(i.layNone=l),d.cache[i.key]=[]},F.prototype.page=1,F.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),i.loading(),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.errorView(t[n.msgName]||'返回的数据不符合规范,正确的成功状态码应为:"'+n.statusName+'": '+n.statusCode)):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.errorView("数据接口请求异常:"+t),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,"object"==typeof a.totalRow&&(c[n.totalRowName]=t.extend({},a.totalRow)),i.renderData(c,e,c[n.countName]),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},F.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},F.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,y=e[s.response.dataName]||[],h=e[s.response.totalRowName],v=[],m=[],g=[],b=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(y,function(a,l){var o=[],y=[],h=[],p=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,v=s.index+"-"+r.key,m=l[c];if(void 0!==m&&null!==m||(m=""),!r.colGroup){var g=['','
              '+function(){var n=t.extend(!0,{LAY_INDEX:p},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return p}return r.toolbar?i(t(r.toolbar).html()||"").render(n):u(r,m,n)}(),"
              "].join("");o.push(g),r.fixed&&"right"!==r.fixed&&y.push(g),"right"===r.fixed&&h.push(g)}}),v.push(''+o.join("")+""),m.push(''+y.join("")+""),g.push(''+h.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+p).remove(),c.layMain.find("tbody").html(v.join("")),c.layFixLeft.find("tbody").html(m.join("")),c.layFixRight.find("tbody").html(g.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return d.cache[c.key]=y,c.layPage[0==o||0===y.length&&1==n?"addClass":"removeClass"](f),r?b():0===y.length?(c.renderForm(),c.errorView(s.text.none)):(c.layFixed.removeClass(f),b(),c.renderTotal(y,h),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},F.prototype.renderTotal=function(e,t){var i=this,a=i.config,l={};if(a.totalRow){layui.each(e,function(e,t){0!==t.length&&i.eachCols(function(e,i){var a=i.field||e,n=t[a];i.totalRow&&(l[a]=(l[a]||0)+(parseFloat(n)||0))})}),i.dataTotal={};var n=[];i.eachCols(function(e,o){var r=o.field||e,d=function(){var e=o.totalRowText||"",i=parseFloat(l[r]).toFixed(2),a={};return a[r]=i,i=u(o,i,a),t?t[o.field]||e:o.totalRow?i||e:e}(),c=['','
              '+d,"
              "].join("");o.field&&(i.dataTotal[r]=d),n.push(c)}),i.layTotal.find("tbody").html(""+n.join("")+"")}},F.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},F.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},F.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},F.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},u=c.config,h=u.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},u.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[u.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,y,"sort("+h+")",{field:n,type:i})},F.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(b).remove()):(i.layInit=t(['
              ','',"
              "].join("")),i.layBox.append(i.layInit)))},F.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},F.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},F.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},F.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=H.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e-=t.layPage.outerHeight()||41),t.layMain.css("height",e-2))},F.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},F.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
              ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(k).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](f),e.layFixRight.css("right",a-1)},F.prototype.events=function(){var e,i=this,a=i.config,o=t("body"),c={},s=i.layHeader.find("th"),h=".layui-table-cell",p=a.elem.attr("lay-filter");i.layTool.on("click","*[lay-event]",function(e){var o=t(this),c=o.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
                ');n.html(l),a.height&&n.css("max-height",a.height-(i.layTool.outerHeight()||50)),o.find(".layui-table-tool-panel")[0]||o.append(n),i.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),j.trigger("table.tool.panel.remove"),l.close(i.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return i.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
              • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var l=t(e.elem),n=this.checked,o=l.data("key"),r=l.data("parentkey");layui.each(a.cols,function(e,t){layui.each(t,function(t,l){if(e+"-"+t===o){var d=l.hide;l.hide=!n,i.elem.find('*[data-key="'+a.index+"-"+o+'"]')[n?"removeClass":"addClass"](f),d!=l.hide&&i.setParentCol(!n,r),i.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
              • 导出到 Csv 文件
              • ','
              • 导出到 Excel 文件
              • '].join("")}(),done:function(e,l){l.on("click",function(){var e=t(this).data("type");d.exportFile.call(i,a.id,null,e)})}});break;case"LAYTABLE_PRINT":var u=window.open("打印窗口","_blank"),h=[""].join(""),v=t(i.layHeader.html());v.append(i.layMain.find("table").html()),v.append(i.layTotal.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),u.document.write(h+v.prop("outerHTML")),u.document.close(),u.print(),u.close()}layui.event.call(this,y,"toolbar("+p+")",t.extend({event:c,config:a},{}))}),s.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||c.resizeStart||(c.allowResize=i.width()-l<=10,o.css("cursor",c.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);c.resizeStart||o.css("cursor","")}).on("mousedown",function(e){var l=t(this);if(c.allowResize){var n=l.data("key");e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],i.getCssRule(n,function(e){var t=e.style.width||l.outerWidth();c.rule=e,c.ruleWidth=parseFloat(t),c.minWidth=l.data("minwidth")||a.cellMinWidth})}}),j.on("mousemove",function(t){if(c.resizeStart){if(t.preventDefault(),c.rule){var a=c.ruleWidth+t.clientX-c.offset[0];a');return n[0].value=i.data("content")||l.text(),i.find("."+R)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(h);if(!i.data("off"))if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
                ')}};i.layBody.on("click","."+g,function(e){var n=t(this),o=n.parent(),d=o.children(h);i.tipsIndex=l.tips(['
                ',d.html(),"
                ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:i.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),i.layBody.on("click","*[lay-event]",function(){var e=t(this),a=e.parents("tr").eq(0).data("index");layui.event.call(this,y,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),i.setThisRowChecked(a)}),i.layMain.on("scroll",function(){var e=t(this),a=e.scrollLeft(),n=e.scrollTop();i.layHeader.scrollLeft(a),i.layTotal.scrollLeft(a),i.layFixed.find(k).scrollTop(n),l.close(i.tipsIndex)}),H.on("resize",function(){i.resize()})},function(){j.on("click",function(){j.trigger("table.remove.tool.panel")}),j.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()})}(),d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i,name){var a=this;t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var l=c.config[e]||{},n={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],s=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(s.href="data:"+n+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],l=[],n=[];return layui.each(t,function(t,a){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(a),function(e,t){n.push('"'+(t||"")+'"')})):d.eachCols(e,function(e,l){if(l.field&&"normal"==l.type&&!l.hide){var o=a[l.field];void 0!==o&&null!==o||(o=""),0==t&&i.push(l.title||""),n.push('"'+u(l,o,a,"text")+'"')}}),l.push(n.join(","))}),layui.each(a.dataTotal,function(e,t){n.push(t)}),i.join(",")+"\r\n"+l.join("\r\n")+"\r\n"+n.join(",")}()),s.download=(name||l.title||"table_"+(l.index||""))+"."+i,document.body.appendChild(s),s.click(),void document.body.removeChild(s))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,t){var i=s(e);if(i){var a=c.that[e];return a.reload(t),c.call(a)}},d.render=function(e){var t=new F(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(y,d)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/transfer.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/transfer.js new file mode 100755 index 0000000..2483921 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/transfer.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define(["laytpl","form"],function(e){"use strict";var a=layui.$,t=layui.laytpl,n=layui.form,i="transfer",l={config:{},index:layui[i]?layui[i].index+1e4:0,set:function(e){var t=this;return t.config=a.extend({},t.config,e),t},on:function(e,a){return layui.onevent.call(this,i,e,a)}},r=function(){var e=this,a=e.config,t=a.id||e.index;return r.that[t]=e,r.config[t]=a,{config:a,reload:function(a){e.reload.call(e,a)},getData:function(){return e.getData.call(e)}}},c="layui-hide",o="layui-btn-disabled",d="layui-none",s="layui-transfer-box",u="layui-transfer-header",h="layui-transfer-search",f="layui-transfer-active",y="layui-transfer-data",p=function(e){return e=e||{},['
                ','
                ','","
                ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
                  ',"
                  "].join("")},v=['
                  ',p({index:0,checkAllName:"layTransferLeftCheckAll"}),'
                  ','",'","
                  ",p({index:1,checkAllName:"layTransferRightCheckAll"}),"
                  "].join(""),x=function(e){var t=this;t.index=++l.index,t.config=a.extend({},t.config,l.config,e),t.render()};x.prototype.config={title:["列表一","列表二"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"无数据",searchNone:"无匹配数据"}},x.prototype.reload=function(e){var t=this;layui.each(e,function(e,a){a.constructor===Array&&delete t.config[e]}),t.config=a.extend(!0,{},t.config,e),t.render()},x.prototype.render=function(){var e=this,n=e.config,i=e.elem=a(t(v).render({data:n,index:e.index})),l=n.elem=a(n.elem);l[0]&&(n.data=n.data||[],n.value=n.value||[],e.key=n.id||e.index,l.html(e.elem),e.layBox=e.elem.find("."+s),e.layHeader=e.elem.find("."+u),e.laySearch=e.elem.find("."+h),e.layData=i.find("."+y),e.layBtn=i.find("."+f+" .layui-btn"),e.layBox.css({width:n.width,height:n.height}),e.layData.css({height:function(){return n.height-e.layHeader.outerHeight()-e.laySearch.outerHeight()-2}()}),e.renderData(),e.events())},x.prototype.renderData=function(){var e=this,a=(e.config,[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}]);e.parseData(function(e){var t=e.selected?1:0,n=["
                • ",'',"
                • "].join("");a[t].views.push(n),delete e.selected}),e.layData.eq(0).html(a[0].views.join("")),e.layData.eq(1).html(a[1].views.join("")),e.renderCheckBtn()},x.prototype.renderForm=function(e){n.render(e,"LAY-transfer-"+this.index)},x.prototype.renderCheckBtn=function(e){var t=this,n=t.config;e=e||{},t.layBox.each(function(i){var l=a(this),r=l.find("."+y),d=l.find("."+u).find('input[type="checkbox"]'),s=r.find('input[type="checkbox"]'),h=0,f=!1;if(s.each(function(){var e=a(this).data("hide");(this.checked||this.disabled||e)&&h++,this.checked&&!e&&(f=!0)}),d.prop("checked",f&&h===s.length),t.layBtn.eq(i)[f?"removeClass":"addClass"](o),!e.stopNone){var p=r.children("li:not(."+c+")").length;t.noneView(r,p?"":n.text.none)}}),t.renderForm("checkbox")},x.prototype.noneView=function(e,t){var n=a('

                  '+(t||"")+"

                  ");e.find("."+d)[0]&&e.find("."+d).remove(),t.replace(/\s/g,"")&&e.append(n)},x.prototype.setValue=function(){var e=this,t=e.config,n=[];return e.layBox.eq(1).find("."+y+' input[type="checkbox"]').each(function(){var e=a(this).data("hide");e||n.push(this.value)}),t.value=n,e},x.prototype.parseData=function(e){var t=this,n=t.config,i=[];return layui.each(n.data,function(t,l){l=("function"==typeof n.parseData?n.parseData(l):l)||l,i.push(l=a.extend({},l)),layui.each(n.value,function(e,a){a==l.value&&(l.selected=!0)}),e&&e(l)}),n.data=i,t},x.prototype.getData=function(e){var a=this,t=a.config,n=[];return a.setValue(),layui.each(e||t.value,function(e,a){layui.each(t.data,function(e,t){delete t.selected,a==t.value&&n.push(t)})}),n},x.prototype.events=function(){var e=this,t=e.config;e.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var t=a(this).prev(),n=t[0].checked,i=t.parents("."+s).eq(0).find("."+y);t[0].disabled||("all"===t.attr("lay-type")&&i.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=n)}),e.renderCheckBtn({stopNone:!0}))}),e.layBtn.on("click",function(){var n=a(this),i=n.data("index"),l=e.layBox.eq(i),r=[];if(!n.hasClass(o)){e.layBox.eq(i).each(function(t){var n=a(this),i=n.find("."+y);i.children("li").each(function(){var t=a(this),n=t.find('input[type="checkbox"]'),i=n.data("hide");n[0].checked&&!i&&(n[0].checked=!1,l.siblings("."+s).find("."+y).append(t.clone()),t.remove(),r.push(n[0].value)),e.setValue()})}),e.renderCheckBtn();var c=l.siblings("."+s).find("."+h+" input");""===c.val()||c.trigger("keyup"),t.onchange&&t.onchange(e.getData(r),i)}}),e.laySearch.find("input").on("keyup",function(){var n=this.value,i=a(this).parents("."+h).eq(0).siblings("."+y),l=i.children("li");l.each(function(){var e=a(this),t=e.find('input[type="checkbox"]'),i=t[0].title.indexOf(n)!==-1;e[i?"removeClass":"addClass"](c),t.data("hide",!i)}),e.renderCheckBtn();var r=l.length===i.children("li."+c).length;e.noneView(i,r?t.text.searchNone:"")})},r.that={},r.config={},l.reload=function(e,a){var t=r.that[e];return t.reload(a),r.call(t)},l.getData=function(e){var a=r.that[e];return a.getData()},l.render=function(e){var a=new x(e);return r.call(a)},e(i,l)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/tree.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/tree.js new file mode 100755 index 0000000..c9c93a2 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/tree.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define("form",function(e){"use strict";var i=layui.$,a=layui.form,n=layui.layer,t="tree",r={config:{},index:layui[t]?layui[t].index+1e4:0,set:function(e){var a=this;return a.config=i.extend({},a.config,e),a},on:function(e,i){return layui.onevent.call(this,t,e,i)}},l=function(){var e=this,i=e.config,a=i.id||e.index;return l.that[a]=e,l.config[a]=i,{config:i,reload:function(i){e.reload.call(e,i)},getChecked:function(){return e.getChecked.call(e)},setChecked:function(i){return e.setChecked.call(e,i)}}},c="layui-hide",d="layui-disabled",s="layui-tree-set",o="layui-tree-iconClick",h="layui-icon-addition",u="layui-icon-subtraction",p="layui-tree-entry",f="layui-tree-main",y="layui-tree-txt",v="layui-tree-pack",C="layui-tree-spread",k="layui-tree-setLineShort",m="layui-tree-showLine",x="layui-tree-lineExtend",b=function(e){var a=this;a.index=++r.index,a.config=i.extend({},a.config,r.config,e),a.render()};b.prototype.config={data:[],showCheckbox:!1,showLine:!0,accordion:!1,onlyIconControl:!1,isJump:!1,edit:!1,text:{defaultNodeName:"未命名",none:"无数据"}},b.prototype.reload=function(e){var a=this;layui.each(e,function(e,i){i.constructor===Array&&delete a.config[e]}),a.config=i.extend(!0,{},a.config,e),a.render()},b.prototype.render=function(){var e=this,a=e.config;e.checkids=[];var n=i('
                  ');e.tree(n);var t=a.elem=i(a.elem);if(t[0]){if(e.key=a.id||e.index,e.elem=n,e.elemNone=i('
                  '+a.text.none+"
                  "),t.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);a.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=i(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(k),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(k)}),e.events()}},b.prototype.renderForm=function(e){a.render(e,"LAY-tree-"+this.index)},b.prototype.tree=function(e,a){var n=this,t=n.config,r=a||t.data;layui.each(r,function(a,r){var l=r.children&&r.children.length>0,o=i('
                  '),h=i(['
                  ','
                  ','
                  ',function(){return t.showLine?l?'':'':''}(),function(){return t.showCheckbox?'':""}(),function(){return t.isJump&&r.href?''+(r.title||r.label||t.text.defaultNodeName)+"":''+(r.title||r.label||t.text.defaultNodeName)+""}(),"
                  ",function(){if(!t.edit)return"";var e={add:'',update:'',del:''},i=['
                  '];return t.edit===!0&&(t.edit=["update","del"]),"object"==typeof t.edit?(layui.each(t.edit,function(a,n){i.push(e[n]||"")}),i.join("")+"
                  "):void 0}(),"
                  "].join(""));l&&(h.append(o),n.tree(o,r.children)),e.append(h),h.prev("."+s)[0]&&h.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),l||h.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),n.spread(h,r),t.showCheckbox&&(r.checked&&n.checkids.push(r.id),n.checkClick(h,r)),t.edit&&n.operate(h,r)})},b.prototype.spread=function(e,a){var n=this,t=n.config,r=e.children("."+p),l=r.children("."+f),c=r.find("."+o),k=r.find("."+y),m=t.onlyIconControl?c:l,x="";m.on("click",function(i){var a=e.children("."+v),n=m.children(".layui-icon")[0]?m.children(".layui-icon"):m.find(".layui-tree-icon").children(".layui-icon");if(a[0]){if(e.hasClass(C))e.removeClass(C),a.slideUp(200),n.removeClass(u).addClass(h);else if(e.addClass(C),a.slideDown(200),n.addClass(u).removeClass(h),t.accordion){var r=e.siblings("."+s);r.removeClass(C),r.children("."+v).slideUp(200),r.find(".layui-tree-icon").children(".layui-icon").removeClass(u).addClass(h)}}else x="normal"}),k.on("click",function(){var n=i(this);n.hasClass(d)||(x=e.hasClass(C)?t.onlyIconControl?"open":"close":t.onlyIconControl?"close":"open",t.click&&t.click({elem:e,state:x,data:a}))})},b.prototype.setCheckbox=function(e,i,a){var n=this,t=(n.config,a.prop("checked"));if(!a.prop("disabled")){if("object"==typeof i.children||e.find("."+v)[0]){var r=e.find("."+v).find('input[same="layuiTreeCheck"]');r.each(function(){this.disabled||(this.checked=t)})}var l=function(e){if(e.parents("."+s)[0]){var i,a=e.parent("."+v),n=a.parent(),r=a.prev().find('input[same="layuiTreeCheck"]');t?r.prop("checked",t):(a.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(i=!0)}),i||r.prop("checked",!1)),l(n)}};l(e),n.renderForm("checkbox")}},b.prototype.checkClick=function(e,a){var n=this,t=n.config,r=e.children("."+p),l=r.children("."+f);l.on("click",'input[same="layuiTreeCheck"]+',function(r){layui.stope(r);var l=i(this).prev(),c=l.prop("checked");l.prop("disabled")||(n.setCheckbox(e,a,l),t.oncheck&&t.oncheck({elem:e,checked:c,data:a}))})},b.prototype.operate=function(e,a){var t=this,r=t.config,l=e.children("."+p),d=l.children("."+f);l.children(".layui-tree-btnGroup").on("click",".layui-icon",function(l){layui.stope(l);var f=i(this).data("type"),b=e.children("."+v),g={data:a,type:f,elem:e};if("add"==f){b[0]||(r.showLine?(d.find("."+o).addClass("layui-tree-icon"),d.find("."+o).children(".layui-icon").addClass(h).removeClass("layui-icon-file")):d.find(".layui-tree-iconArrow").removeClass(c),e.append('
                  '));var w=r.operate&&r.operate(g),N={};if(N.title=r.text.defaultNodeName,N.id=w,t.tree(e.children("."+v),[N]),r.showLine)if(b[0])b.hasClass(x)||b.addClass(x),e.find("."+v).each(function(){i(this).children("."+s).last().addClass(k)}),b.children("."+s).last().prev().hasClass(k)?b.children("."+s).last().prev().removeClass(k):b.children("."+s).last().removeClass(k),!e.parent("."+v)[0]&&e.next()[0]&&b.children("."+s).last().removeClass(k);else{var T=e.siblings("."+s),L=1,A=e.parent("."+v);layui.each(T,function(e,a){i(a).children("."+v)[0]||(L=0)}),1==L?(T.children("."+v).addClass(m),T.children("."+v).children("."+s).removeClass(k),e.children("."+v).addClass(m),A.removeClass(x),A.children("."+s).last().children("."+v).children("."+s).last().addClass(k)):e.children("."+v).children("."+s).addClass(k)}if(!r.showCheckbox)return;if(d.find('input[same="layuiTreeCheck"]')[0].checked){var I=e.children("."+v).children("."+s).last();I.find('input[same="layuiTreeCheck"]')[0].checked=!0}t.renderForm("checkbox")}else if("update"==f){var F=d.children("."+y).html();d.children("."+y).html(""),d.append(''),d.children(".layui-tree-editInput").val(F).focus();var j=function(e){var i=e.val().trim();i=i?i:r.text.defaultNodeName,e.remove(),d.children("."+y).html(i),g.data.title=i,r.operate&&r.operate(g)};d.children(".layui-tree-editInput").blur(function(){j(i(this))}),d.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),j(i(this)))})}else n.confirm('确认删除该节点 "'+(a.title||"")+'" 吗?',function(a){if(r.operate&&r.operate(g),g.status="remove",n.close(a),!e.prev("."+s)[0]&&!e.next("."+s)[0]&&!e.parent("."+v)[0])return e.remove(),void t.elem.append(t.elemNone);if(e.siblings("."+s).children("."+p)[0]){if(r.showCheckbox){var l=function(e){if(e.parents("."+s)[0]){var a=e.siblings("."+s).children("."+p),n=e.parent("."+v).prev(),r=n.find('input[same="layuiTreeCheck"]')[0],c=1,d=0;0==r.checked&&(a.each(function(e,a){var n=i(a).find('input[same="layuiTreeCheck"]')[0];0!=n.checked||n.disabled||(c=0),n.disabled||(d=1)}),1==c&&1==d&&(r.checked=!0,t.renderForm("checkbox"),l(n.parent("."+s))))}};l(e)}if(r.showLine){var d=e.siblings("."+s),h=1,f=e.parent("."+v);layui.each(d,function(e,a){i(a).children("."+v)[0]||(h=0)}),1==h?(b[0]||(f.removeClass(x),d.children("."+v).addClass(m),d.children("."+v).children("."+s).removeClass(k)),e.next()[0]?f.children("."+s).last().children("."+v).children("."+s).last().addClass(k):e.prev().children("."+v).children("."+s).last().addClass(k),e.next()[0]||e.parents("."+s)[1]||e.parents("."+s).eq(0).next()[0]||e.prev("."+s).addClass(k)):!e.next()[0]&&e.hasClass(k)&&e.prev().addClass(k)}}else{var y=e.parent("."+v).prev();if(r.showLine){y.find("."+o).removeClass("layui-tree-icon"),y.find("."+o).children(".layui-icon").removeClass(u).addClass("layui-icon-file");var w=y.parents("."+v).eq(0);w.addClass(x),w.children("."+s).each(function(){i(this).children("."+v).children("."+s).last().addClass(k)})}else y.find(".layui-tree-iconArrow").addClass(c);e.parents("."+s).eq(0).removeClass(C),e.parent("."+v).remove()}e.remove()})})},b.prototype.events=function(){var e=this,a=e.config;e.elem.find(".layui-tree-checkedFirst");e.setChecked(e.checkids),e.elem.find(".layui-tree-search").on("keyup",function(){var n=i(this),t=n.val(),r=n.nextAll(),l=[];r.find("."+y).each(function(){var e=i(this).parents("."+p);if(i(this).html().indexOf(t)!=-1){l.push(i(this).parent());var a=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+v)[0]&&a(e.parent("."+v).parent("."+s))};a(e.parent("."+s))}}),r.find("."+p).each(function(){var e=i(this).parent("."+s);e.hasClass("layui-tree-searchShow")||e.addClass(c)}),0==r.find(".layui-tree-searchShow").length&&e.elem.append(e.elemNone),a.onsearch&&a.onsearch({elem:l})}),e.elem.find(".layui-tree-search").on("keydown",function(){i(this).nextAll().find("."+p).each(function(){var e=i(this).parent("."+s);e.removeClass("layui-tree-searchShow "+c)}),i(".layui-tree-emptyText")[0]&&i(".layui-tree-emptyText").remove()})},b.prototype.getChecked=function(){var e=this,a=e.config,n=[],t=[];e.elem.find(".layui-form-checked").each(function(){n.push(i(this).prev()[0].value)});var r=function(e,a){layui.each(e,function(e,t){layui.each(n,function(e,n){if(t.id==n){var l=i.extend({},t);return delete l.children,a.push(l),t.children&&(l.children=[],r(t.children,l.children)),!0}})})};return r(i.extend({},a.data),t),t},b.prototype.setChecked=function(e){var a=this;a.config;a.elem.find("."+s).each(function(a,n){var t=i(this).data("id"),r=i(n).children("."+p).find('input[same="layuiTreeCheck"]'),l=r.next();if("number"==typeof e){if(t==e)return r[0].checked||l.click(),!1}else"object"==typeof e&&layui.each(e,function(e,i){if(i==t&&!r[0].checked)return l.click(),!0})})},l.that={},l.config={},r.reload=function(e,i){var a=l.that[e];return a.reload(i),l.call(a)},r.getChecked=function(e){var i=l.that[e];return i.getChecked()},r.setChecked=function(e,i){var a=l.that[e];return a.setChecked(i)},r.render=function(e){var i=new b(e);return l.call(i)},e(t,r)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/upload.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/upload.js new file mode 100755 index 0000000..5b8ee0e --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/upload.js @@ -0,0 +1,242 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ +;layui.define("layer", function (e) { + "use strict"; + var t = layui.$, i = layui.layer, n = layui.hint(), o = layui.device(), a = { + config: {}, set: function (e) { + var i = this; + return i.config = t.extend({}, i.config, e), i + }, on: function (e, t) { + return layui.onevent.call(this, r, e, t) + } + }, l = function () { + var e = this; + return { + upload: function (t) { + e.upload.call(e, t) + }, reload: function (t) { + e.reload.call(e, t) + }, config: e.config + } + }, r = "upload", u = "layui-upload-file", c = "layui-upload-form", f = "layui-upload-iframe", + s = "layui-upload-choose", p = function (e) { + var i = this; + i.config = t.extend({}, i.config, a.config, e), i.render() + }; + p.prototype.config = { + accept: "images", + exts: "", + auto: !0, + bindAction: "", + url: "", + field: "file", + acceptMime: "", + method: "post", + data: {}, + drag: !0, + size: 0, + number: 0, + multiple: !1 + }, p.prototype.render = function (e) { + var i = this, e = i.config; + e.elem = t(e.elem), e.bindAction = t(e.bindAction), i.file(), i.events() + }, p.prototype.file = function () { + var e = this, i = e.config, + n = e.elemFile = t(['"].join("")), + a = i.elem.next(); + (a.hasClass(u) || a.hasClass(c)) && a.remove(), o.ie && o.ie < 10 && i.elem.wrap('
                  '), e.isFile() ? (e.elemFile = i.elem, i.field = i.elem[0].name) : i.elem.after(n), o.ie && o.ie < 10 && e.initIE() + }, p.prototype.initIE = function () { + var e = this, i = e.config, + n = t(''), + o = t(['
                  ', "
                  "].join("")); + t("#" + f)[0] || t("body").append(n), i.elem.next().hasClass(c) || (e.elemFile.wrap(o), i.elem.next("." + c).append(function () { + var e = []; + return layui.each(i.data, function (t, i) { + i = "function" == typeof i ? i() : i, e.push('') + }), e.join("") + }())) + }, p.prototype.msg = function (e) { + return i.msg(e, {icon: 2, shift: 6}) + }, p.prototype.isFile = function () { + var e = this.config.elem[0]; + if (e) return "input" === e.tagName.toLocaleLowerCase() && "file" === e.type + }, p.prototype.preview = function (e) { + var t = this; + window.FileReader && layui.each(t.chooseFiles, function (t, i) { + var n = new FileReader; + n.readAsDataURL(i), n.onload = function () { + e && e(t, i, this.result) + } + }) + }, p.prototype.upload = function (e, i) { + var n, a = this, l = a.config, r = a.elemFile[0], u = function () { + var i = 0, n = 0, o = e || a.files || a.chooseFiles || r.files, u = function () { + l.multiple && i + n === a.fileLength && "function" == typeof l.allDone && l.allDone({ + total: a.fileLength, + successful: i, + aborted: n + }) + }; + layui.each(o, function (e, o) { + var r = new FormData; + r.append(l.field, o), layui.each(l.data, function (e, t) { + t = "function" == typeof t ? t() : t, r.append(e, t) + }); + var c = { + url: l.url, + type: "post", + data: r, + contentType: !1, + processData: !1, + dataType: "json", + headers: l.headers || {}, + success: function (t) { + i++, d(e, t), u() + }, + error: function () { + n++, a.msg("请求上传接口出现异常"), m(e), u() + } + }; + "function" == typeof l.progress && (c.xhr = function () { + var e = t.ajaxSettings.xhr(); + return e.upload.addEventListener("progress", function (e) { + if (e.lengthComputable) { + var t = Math.floor(e.loaded / e.total * 100); + l.progress(t, l.item[0], e) + } + }), e + }), t.ajax(c) + }) + }, c = function () { + var e = t("#" + f); + a.elemFile.parent().submit(), clearInterval(p.timer), p.timer = setInterval(function () { + var t, i = e.contents().find("body"); + try { + t = i.text() + } catch (n) { + a.msg("获取上传后的响应信息出现异常"), clearInterval(p.timer), m() + } + t && (clearInterval(p.timer), i.html(""), d(0, t)) + }, 30) + }, d = function (e, t) { + if (a.elemFile.next("." + s).remove(), r.value = "", "object" != typeof t) try { + t = JSON.parse(t) + } catch (i) { + return t = {}, a.msg("请对上传接口返回有效JSON") + } + "function" == typeof l.done && l.done(t, e || 0, function (e) { + a.upload(e) + }) + }, m = function (e) { + l.auto && (r.value = ""), "function" == typeof l.error && l.error(e || 0, function (e) { + a.upload(e) + }) + }, h = l.exts, v = function () { + var t = []; + return layui.each(e || a.chooseFiles, function (e, i) { + t.push(i.name) + }), t + }(), g = { + preview: function (e) { + a.preview(e) + }, upload: function (e, t) { + var i = {}; + i[e] = t, a.upload(i) + }, pushFile: function () { + return a.files = a.files || {}, layui.each(a.chooseFiles, function (e, t) { + a.files[e] = t + }), a.files + }, resetFile: function (e, t, i) { + var n = new File([t], i); + a.files = a.files || {}, a.files[e] = n + } + }, y = function () { + if ("choose" !== i && !l.auto || (l.choose && l.choose(g), "choose" !== i)) return l.before && l.before(g), o.ie ? o.ie > 9 ? u() : c() : void u() + }; + if (v = 0 === v.length ? r.value.match(/[^\/\\]+\..+/g) || [] || "" : v, 0 !== v.length) { + switch (l.accept) { + case"file": + if (h && !RegExp("\\w\\.(" + h + ")$", "i").test(escape(v))) return a.msg("选择的文件中包含不支持的格式"), r.value = ""; + break; + case"video": + if (!RegExp("\\w\\.(" + (h || "avi|mp4|wma|rmvb|rm|flash|3gp|flv") + ")$", "i").test(escape(v))) return a.msg("选择的视频中包含不支持的格式"), r.value = ""; + break; + case"audio": + if (!RegExp("\\w\\.(" + (h || "mp3|wav|mid") + ")$", "i").test(escape(v))) return a.msg("选择的音频中包含不支持的格式"), r.value = ""; + break; + default: + if (layui.each(v, function (e, t) { + RegExp("\\w\\.(" + (h || "jpg|png|gif|bmp|jpeg$") + ")", "i").test(escape(t)) || (n = !0) + }), n) return a.msg("选择的图片中包含不支持的格式"), r.value = "" + } + if (a.fileLength = function () { + var t = 0, i = e || a.files || a.chooseFiles || r.files; + return layui.each(i, function () { + t++ + }), t + }(), l.number && a.fileLength > l.number) return a.msg("同时最多只能上传的数量为:" + l.number); + if (l.size > 0 && !(o.ie && o.ie < 10)) { + var F; + if (layui.each(a.chooseFiles, function (e, t) { + if (t.size > 1024 * l.size) { + var i = l.size / 1024; + i = i >= 1 ? i.toFixed(2) + "MB" : l.size + "KB", r.value = "", F = i + } + }), F) return a.msg("文件不能超过" + F) + } + y() + } + }, p.prototype.reload = function (e) { + e = e || {}, delete e.elem, delete e.bindAction; + var i = this, e = i.config = t.extend({}, i.config, a.config, e), n = e.elem.next(); + n.attr({name: e.name, accept: e.acceptMime, multiple: e.multiple}) + }, p.prototype.events = function () { + var e = this, i = e.config, a = function (t) { + e.chooseFiles = {}, layui.each(t, function (t, i) { + var n = (new Date).getTime(); + e.chooseFiles[n + "-" + t] = i + }) + }, l = function (t, n) { + var o = e.elemFile, + a = t.length > 1 ? t.length + "个文件" : (t[0] || {}).name || o[0].value.match(/[^\/\\]+\..+/g) || [] || ""; + o.next().hasClass(s) && o.next().remove(), e.upload(null, "choose"), e.isFile() || i.choose || o.after('' + a + "") + }; + i.elem.off("upload.start").on("upload.start", function () { + var o = t(this), a = o.attr("lay-data"); + if (a) try { + a = new Function("return " + a)(), e.config = t.extend({}, i, a) + } catch (l) { + n.error("Upload element property lay-data configuration item has a syntax error: " + a) + } + e.config.item = o, e.elemFile[0].click() + }), o.ie && o.ie < 10 || i.elem.off("upload.over").on("upload.over", function () { + var e = t(this); + e.attr("lay-over", "") + }).off("upload.leave").on("upload.leave", function () { + var e = t(this); + e.removeAttr("lay-over") + }).off("upload.drop").on("upload.drop", function (n, o) { + var r = t(this), u = o.originalEvent.dataTransfer.files || []; + r.removeAttr("lay-over"), a(u), i.auto ? e.upload(u) : l(u) + }), e.elemFile.off("upload.change").on("upload.change", function () { + var t = this.files || []; + a(t), i.auto ? e.upload() : l(t) + }), i.bindAction.off("upload.action").on("upload.action", function () { + e.upload() + }), i.elem.data("haveEvents") || (e.elemFile.on("change", function () { + t(this).trigger("upload.change") + }), i.elem.on("click", function () { + e.isFile() || t(this).trigger("upload.start") + }), i.drag && i.elem.on("dragover", function (e) { + e.preventDefault(), t(this).trigger("upload.over") + }).on("dragleave", function (e) { + t(this).trigger("upload.leave") + }).on("drop", function (e) { + e.preventDefault(), t(this).trigger("upload.drop", e) + }), i.bindAction.on("click", function () { + t(this).trigger("upload.action") + }), i.elem.data("haveEvents", !0)) + }, a.render = function (e) { + var t = new p(e); + return l.call(t) + }, e(r, a) +}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/util.js b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/util.js new file mode 100755 index 0000000..fdc1ec2 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/lay/modules/util.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,n,a="layui-fixbar",o="layui-fixbar-top",r=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],u=t(['
                    ',e.bar1?'
                  • '+c[0]+"
                  • ":"",e.bar2?'
                  • '+c[1]+"
                  • ":"",'
                  • '+c[2]+"
                  • ","
                  "].join("")),g=u.find("."+o),s=function(){var t=r.scrollTop();t>=e.showHeight?i||(g.show(),i=1):i&&(g.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&u.css(e.css),l.append(u),s(),u.find("li").on("click",function(){var i=t(this),n=i.attr("lay-type");"top"===n&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,n)}),r.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){s()},100)}))},countdown:function(e,t,i){var n=this,a="function"==typeof t,o=new Date(e).getTime(),r=new Date(!t||a?(new Date).getTime():t).getTime(),l=o-r,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var u=setTimeout(function(){n.countdown(e,r+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,u),l<=0&&clearTimeout(u),u},timeAgo:function(e,t){var i=this,n=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>26784e5?(a=new Date(e),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),t||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=18e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var n=e.length;n/g,">").replace(/'/g,"'").replace(/"/g,""")},event:function(e,n,a){var o=t("body");return a=a||"click",n=i.event[e]=t.extend(!0,i.event[e],n)||{},i.event.UTIL_EVENT_CALLBACK=i.event.UTIL_EVENT_CALLBACK||{},o.off(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),i.event.UTIL_EVENT_CALLBACK[e]=function(){var i=t(this),a=i.attr(e);"function"==typeof n[a]&&n[a].call(this,i)},o.on(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),n}};!function(e,t,i){"$:nomunge";function n(){a=t[l](function(){o.each(function(){var t=e(this),i=t.width(),n=t.height(),a=e.data(this,u);(i!==a.w||n!==a.h)&&t.trigger(c,[a.w=i,a.h=n])}),n()},r[g])}var a,o=e([]),r=e.resize=e.extend(e.resize,{}),l="setTimeout",c="resize",u=c+"-special-event",g="delay",s="throttleWindow";r[g]=250,r[s]=!0,e.event.special[c]={setup:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.add(t),e.data(this,u,{w:t.width(),h:t.height()}),1===o.length&&n()},teardown:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.not(t),t.removeData(u),o.length||clearTimeout(a)},add:function(t){function n(t,n,o){var r=e(this),l=e.data(this,u)||{};l.w=n!==i?n:r.width(),l.h=o!==i?o:r.height(),a.apply(this,arguments)}if(!r[s]&&this[l])return!1;var a;return e.isFunction(t)?(a=t,n):(a=t.handler,void(t.handler=n))}}}(t,window),e("util",i)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/layui.all.js b/public/static/layui-admin/dist/layuiadmin/layui/layui.all.js new file mode 100755 index 0000000..af3355c --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/layui.all.js @@ -0,0 +1,5 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;!function(e){"use strict";var t=document,n={modules:{},status:{},timeout:10,event:{}},r=function(){this.v="2.5.6"},o=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,n=t.scripts,r=n.length-1,o=r;o>0;o--)if("interactive"===n[o].readyState){e=n[o].src;break}return e||n[r].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),a=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},i="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",transfer:"modules/transfer",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};r.prototype.cache=n,r.prototype.define=function(e,t){var r=this,o="function"==typeof e,a=function(){var e=function(e,t){layui[e]=t,n.status[e]=!0};return"function"==typeof t&&t(function(r,o){e(r,o),n.callback[r]=function(){t(e)}}),this};return o&&(t=e,e=[]),!layui["layui.all"]&&layui["layui.mobile"]?a.call(r):(r.use(e,a),r)},r.prototype.use=function(e,r,l){function c(e,t){var r="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||r.test((e.currentTarget||e.srcElement).readyState))&&(n.modules[d]=t,y.removeChild(h),function o(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void(n.status[d]?s():setTimeout(o,4))}())}function s(){l.push(layui[d]),e.length>1?p.use(e.slice(1),r,l):"function"==typeof r&&r.apply(layui,l)}var p=this,f=n.dir=n.dir?n.dir:o,y=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(p.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var d=e[0],m=0;if(l=l||[],n.host=n.host||(f.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[d]||!layui["layui.all"]&&layui["layui.mobile"]&&u[d])return s(),p;var v=(u[d]?f+"lay/":/^\{\/\}/.test(p.modules[d])?"":n.base||"")+(p.modules[d]||d)+".js";if(v=v.replace(/^\{\/\}/,""),!n.modules[d]&&layui[d]&&(n.modules[d]=v),n.modules[d])!function g(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void("string"==typeof n.modules[d]&&n.status[d]?s():setTimeout(g,4))}();else{var h=t.createElement("script");h.async=!0,h.charset="utf-8",h.src=v+function(){var e=n.version===!0?n.v||(new Date).getTime():n.version||"";return e?"?v="+e:""}(),y.appendChild(h),!h.attachEvent||h.attachEvent.toString&&h.attachEvent.toString().indexOf("[native code")<0||i?h.addEventListener("load",function(e){c(e,v)},!1):h.attachEvent("onreadystatechange",function(e){c(e,v)}),n.modules[d]=v}return p},r.prototype.getStyle=function(t,n){var r=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return r[r.getPropertyValue?"getPropertyValue":"getAttribute"](n)},r.prototype.link=function(e,r,o){var i=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof r&&(o=r);var c=(o||e).replace(/\.|\//g,""),s=u.id="layuicss-"+c,p=0;return u.rel="stylesheet",u.href=e+(n.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(s)||l.appendChild(u),"function"!=typeof r?i:(function f(){return++p>1e3*n.timeout/100?a(e+" timeout"):void(1989===parseInt(i.getStyle(t.getElementById(s),"width"))?function(){r()}():setTimeout(f,100))}(),i)},n.callback={},r.prototype.factory=function(e){if(layui[e])return"function"==typeof n.callback[e]?n.callback[e]:null},r.prototype.addcss=function(e,t,r){return layui.link(n.dir+"css/"+e,t,r)},r.prototype.img=function(e,t,n){var r=new Image;return r.src=e,r.complete?t(r):(r.onload=function(){r.onload=null,"function"==typeof t&&t(r)},void(r.onerror=function(e){r.onerror=null,"function"==typeof n&&n(e)}))},r.prototype.config=function(e){e=e||{};for(var t in e)n[t]=e[t];return this},r.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),r.prototype.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?a("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},r.prototype.router=function(e){var t=this,e=e||location.hash,n={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),n.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),n.search[t[0]]=t[1]}():n.path.push(t)}),n):n},r.prototype.url=function(e){var t=this,n={pathname:function(){var t=e?function(){var t=(e.match(/\.[^.]+?\/.+/)||[])[0]||"";return t.replace(/^[^\/]+/,"").replace(/\?.+/,"")}():location.pathname;return t.replace(/^\//,"").split("/")}(),search:function(){var n={},r=(e?function(){var t=(e.match(/\?.+/)||[])[0]||"";return t.replace(/\#.+/,"")}():location.search).replace(/^\?+/,"").split("&");return t.each(r,function(e,t){var r=t.indexOf("="),o=function(){return r<0?t.substr(0,t.length):0!==r&&t.substr(0,r)}();o&&(n[o]=r>0?t.substr(r+1):null)}),n}(),hash:t.router(function(){return e?(e.match(/#.+/)||[])[0]||"":location.hash}())};return n},r.prototype.data=function(t,n,r){if(t=t||"layui",r=r||localStorage,e.JSON&&e.JSON.parse){if(null===n)return delete r[t];n="object"==typeof n?n:{key:n};try{var o=JSON.parse(r[t])}catch(a){var o={}}return"value"in n&&(o[n.key]=n.value),n.remove&&delete o[n.key],r[t]=JSON.stringify(o),n.key?o[n.key]:o}},r.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},r.prototype.device=function(t){var n=navigator.userAgent.toLowerCase(),r=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(n.match(t)||[])[1],e||!1},o={os:function(){return/windows/.test(n)?"windows":/linux/.test(n)?"linux":/iphone|ipod|ipad|ios/.test(n)?"ios":/mac/.test(n)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((n.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:r("micromessenger")};return t&&!o[t]&&(o[t]=r(t)),o.android=/android/.test(n),o.ios="ios"===o.os,o.mobile=!(!o.android&&!o.ios),o},r.prototype.hint=function(){return{error:a}},r.prototype.each=function(e,t){var n,r=this;if("function"!=typeof t)return r;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;na?1:o/g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var c="Laytpl Error:";return"object"==typeof console&&console.error(c+e+"\n"+(r||"")),c+e}},n=c.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=n("^"+r.open+"#",""),l=n(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(n(r.open+"#"),r.open+"# ").replace(n(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(n(r.open+"!(.+?)!"+r.close),function(e){return e=e.replace(n("^"+r.open+"!"),"").replace(n("!"+r.close),"").replace(n(r.open+"|"+r.close),function(e){return e.replace(/(.)/g,"\\$1")})}).replace(/(?="|')/g,"\\").replace(c.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(c.query(1),function(e){var c='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(n(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),c='"+_escape_('),c+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,c.escape)}catch(u){return delete o.cache,c.error(u,p)}},t.pt.render=function(e,r){var n,t=this;return e?(n=t.cache?t.cache(e,c.escape):t.parse(t.tpl,e),r?void r(n):n):c.error("no data")};var o=function(e){return"string"!=typeof e?c.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var c in e)r[c]=e[c]},o.v="1.2.0",e("laytpl",o)});layui.define(function(e){"use strict";var a=document,t="getElementById",n="getElementsByTagName",i="laypage",r="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config,t=a.groups="groups"in a?0|a.groups:5;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),t<0?t=1:t>a.pages&&(t=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var n=a.pages>t?Math.ceil((a.curr+(t>1?1:0))/(t>0?t:1)):1,i={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";n>1&&a.first!==!1&&0!==t&&e.push(''+(a.first||1)+"");var i=Math.floor((t-1)/2),r=n>1?a.curr-i:1,u=n>1?function(){var e=a.curr+(t-i-1);return e>a.pages?a.pages:e}():t;for(u-r2&&e.push('…');r<=u;r++)r===a.curr?e.push('"+r+""):e.push(''+r+"");return a.pages>t&&a.pages>u&&a.last!==!1&&(u+1…'),0!==t&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),refresh:['','',""].join(""),skip:function(){return['到第','','页',""].join("")}()};return['
                  ',function(){var e=[];return layui.each(a.layout,function(a,t){i[t]&&e.push(i[t])}),e.join("")}(),"
                  "].join("")},u.prototype.jump=function(e,a){if(e){var t=this,i=t.config,r=e.children,u=e[n]("button")[0],l=e[n]("input")[0],p=e[n]("select")[0],c=function(){var e=0|l.value.replace(/\s|\D/g,"");e&&(i.curr=e,t.render())};if(a)return c();for(var o=0,y=r.length;oi.pages||(i.curr=e,t.render())});p&&s.on(p,"change",function(){var e=this.value;i.curr*e>i.count&&(i.curr=Math.ceil(i.count/e)),i.limit=e,t.render()}),u&&s.on(u,"click",function(){c()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[n]("input")[0];t&&s.on(t,"keyup",function(t){var n=this.value,i=t.keyCode;/^(37|38|39|40)$/.test(i)||(/\D/.test(n)&&(this.value=n.replace(/\D/,"")),13===i&&a.jump(e,!0))})}},u.prototype.render=function(e){var n=this,i=n.config,r=n.type(),u=n.view();2===r?i.elem&&(i.elem.innerHTML=u):3===r?i.elem.html(u):a[t](i.elem)&&(a[t](i.elem).innerHTML=u),i.jump&&i.jump(i,e);var s=a[t]("layui-laypage-"+i.index);n.jump(s),i.hash&&!e&&(location.hash="!"+i.hash+"="+i.curr),n.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){a.target=a.srcElement,t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(i,s)});!function(){"use strict";var e=window.layui&&layui.define,t={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,n=t.length-1,a=n;a>0;a--)if("interactive"===t[a].readyState){e=t[a].src;break}return e||t[n].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),getStyle:function(e,t){var n=e.currentStyle?e.currentStyle:window.getComputedStyle(e,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](t)},link:function(e,a,i){if(n.path){var r=document.getElementsByTagName("head")[0],o=document.createElement("link");"string"==typeof a&&(i=a);var s=(i||e).replace(/\.|\//g,""),l="layuicss-"+s,d=0;o.rel="stylesheet",o.href=n.path+e,o.id=l,document.getElementById(l)||r.appendChild(o),"function"==typeof a&&!function c(){return++d>80?window.console&&console.error("laydate.css: Invalid"):void(1989===parseInt(t.getStyle(document.getElementById(l),"width"))?a():setTimeout(c,100))}()}}},n={v:"5.0.9",config:{},index:window.laydate&&window.laydate.v?1e5:0,path:t.getPath,set:function(e){var t=this;return t.config=w.extend({},t.config,e),t},ready:function(a){var i="laydate",r="",o=(e?"modules/laydate/":"theme/")+"default/laydate.css?v="+n.v+r;return e?layui.addcss(o,a,i):t.link(o,a,i),this}},a=function(){var e=this;return{hint:function(t){e.hint.call(e,t)},config:e.config}},i="laydate",r=".layui-laydate",o="layui-this",s="laydate-disabled",l="开始日期超出了结束日期
                  建议重新选择",d=[100,2e5],c="layui-laydate-static",m="layui-laydate-list",u="laydate-selected",h="layui-laydate-hint",y="laydate-day-prev",f="laydate-day-next",p="layui-laydate-footer",g=".laydate-btns-confirm",v="laydate-time-text",D=".laydate-btns-time",T=function(e){var t=this;t.index=++n.index,t.config=w.extend({},t.config,n.config,e),n.ready(function(){t.init()})},w=function(e){return new C(e)},C=function(e){for(var t=0,n="object"==typeof e?[e]:(this.selector=e,document.querySelectorAll(e||null));t0)return n[0].getAttribute(e)}():n.each(function(n,a){a.setAttribute(e,t)})},C.prototype.removeAttr=function(e){return this.each(function(t,n){n.removeAttribute(e)})},C.prototype.html=function(e){return this.each(function(t,n){n.innerHTML=e})},C.prototype.val=function(e){return this.each(function(t,n){n.value=e})},C.prototype.append=function(e){return this.each(function(t,n){"object"==typeof e?n.appendChild(e):n.innerHTML=n.innerHTML+e})},C.prototype.remove=function(e){return this.each(function(t,n){e?n.removeChild(e):n.parentNode.removeChild(n)})},C.prototype.on=function(e,t){return this.each(function(n,a){a.attachEvent?a.attachEvent("on"+e,function(e){e.target=e.srcElement,t.call(a,e)}):a.addEventListener(e,t,!1)})},C.prototype.off=function(e,t){return this.each(function(n,a){a.detachEvent?a.detachEvent("on"+e,t):a.removeEventListener(e,t,!1)})},T.isLeapYear=function(e){return e%4===0&&e%100!==0||e%400===0},T.prototype.config={type:"date",range:!1,format:"yyyy-MM-dd",value:null,isInitValue:!0,min:"1900-1-1",max:"2099-12-31",trigger:"focus",show:!1,showBottom:!0,btns:["clear","now","confirm"],lang:"cn",theme:"default",position:null,calendar:!1,mark:{},zIndex:null,done:null,change:null},T.prototype.lang=function(){var e=this,t=e.config,n={cn:{weeks:["日","一","二","三","四","五","六"],time:["时","分","秒"],timeTips:"选择时间",startTime:"开始时间",endTime:"结束时间",dateTips:"返回日期",month:["一","二","三","四","五","六","七","八","九","十","十一","十二"],tools:{confirm:"确定",clear:"清空",now:"现在"}},en:{weeks:["Su","Mo","Tu","We","Th","Fr","Sa"],time:["Hours","Minutes","Seconds"],timeTips:"Select Time",startTime:"Start Time",endTime:"End Time",dateTips:"Select Date",month:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],tools:{confirm:"Confirm",clear:"Clear",now:"Now"}}};return n[t.lang]||n.cn},T.prototype.init=function(){var e=this,t=e.config,n="yyyy|y|MM|M|dd|d|HH|H|mm|m|ss|s",a="static"===t.position,i={year:"yyyy",month:"yyyy-MM",date:"yyyy-MM-dd",time:"HH:mm:ss",datetime:"yyyy-MM-dd HH:mm:ss"};t.elem=w(t.elem),t.eventElem=w(t.eventElem),t.elem[0]&&(t.range===!0&&(t.range="-"),t.format===i.date&&(t.format=i[t.type]),e.format=t.format.match(new RegExp(n+"|.","g"))||[],e.EXP_IF="",e.EXP_SPLIT="",w.each(e.format,function(t,a){var i=new RegExp(n).test(a)?"\\d{"+function(){return new RegExp(n).test(e.format[0===t?t+1:t-1]||"")?/^yyyy|y$/.test(a)?4:a.length:/^yyyy$/.test(a)?"1,4":/^y$/.test(a)?"1,308":"1,2"}()+"}":"\\"+a;e.EXP_IF=e.EXP_IF+i,e.EXP_SPLIT=e.EXP_SPLIT+"("+i+")"}),e.EXP_IF=new RegExp("^"+(t.range?e.EXP_IF+"\\s\\"+t.range+"\\s"+e.EXP_IF:e.EXP_IF)+"$"),e.EXP_SPLIT=new RegExp("^"+e.EXP_SPLIT+"$",""),e.isInput(t.elem[0])||"focus"===t.trigger&&(t.trigger="click"),t.elem.attr("lay-key")||(t.elem.attr("lay-key",e.index),t.eventElem.attr("lay-key",e.index)),t.mark=w.extend({},t.calendar&&"cn"===t.lang?{"0-1-1":"元旦","0-2-14":"情人","0-3-8":"妇女","0-3-12":"植树","0-4-1":"愚人","0-5-1":"劳动","0-5-4":"青年","0-6-1":"儿童","0-9-10":"教师","0-9-18":"国耻","0-10-1":"国庆","0-12-25":"圣诞"}:{},t.mark),w.each(["min","max"],function(e,n){var a=[],i=[];if("number"==typeof t[n]){var r=t[n],o=(new Date).getTime(),s=864e5,l=new Date(r?r0)return!0;var a=w.elem("div",{"class":"layui-laydate-header"}),i=[function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-y"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-prev-m"});return e.innerHTML="",e}(),function(){var e=w.elem("div",{"class":"laydate-set-ym"}),t=w.elem("span"),n=w.elem("span");return e.appendChild(t),e.appendChild(n),e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-m"});return e.innerHTML="",e}(),function(){var e=w.elem("i",{"class":"layui-icon laydate-icon laydate-next-y"});return e.innerHTML="",e}()],d=w.elem("div",{"class":"layui-laydate-content"}),c=w.elem("table"),m=w.elem("thead"),u=w.elem("tr");w.each(i,function(e,t){a.appendChild(t)}),m.appendChild(u),w.each(new Array(6),function(e){var t=c.insertRow(0);w.each(new Array(7),function(a){if(0===e){var i=w.elem("th");i.innerHTML=n.weeks[a],u.appendChild(i)}t.insertCell(a)})}),c.insertBefore(m,c.children[0]),d.appendChild(c),r[e]=w.elem("div",{"class":"layui-laydate-main laydate-main-list-"+e}),r[e].appendChild(a),r[e].appendChild(d),o.push(i),s.push(d),l.push(c)}),w(d).html(function(){var e=[],i=[];return"datetime"===t.type&&e.push(''+n.timeTips+""),w.each(t.btns,function(e,r){var o=n.tools[r]||"btn";t.range&&"now"===r||(a&&"clear"===r&&(o="cn"===t.lang?"重置":"Reset"),i.push(''+o+""))}),e.push('"),e.join("")}()),w.each(r,function(e,t){i.appendChild(t)}),t.showBottom&&i.appendChild(d),/^#/.test(t.theme)){var m=w.elem("style"),u=["#{{id}} .layui-laydate-header{background-color:{{theme}};}","#{{id}} .layui-this{background-color:{{theme}} !important;}"].join("").replace(/{{id}}/g,e.elemID).replace(/{{theme}}/g,t.theme);"styleSheet"in m?(m.setAttribute("type","text/css"),m.styleSheet.cssText=u):m.innerHTML=u,w(i).addClass("laydate-theme-molv"),i.appendChild(m)}e.remove(T.thisElemDate),a?t.elem.append(i):(document.body.appendChild(i),e.position()),e.checkDate().calendar(),e.changeEvent(),T.thisElemDate=e.elemID,"function"==typeof t.ready&&t.ready(w.extend({},t.dateTime,{month:t.dateTime.month+1}))},T.prototype.remove=function(e){var t=this,n=(t.config,w("#"+(e||t.elemID)));return n.hasClass(c)||t.checkDate(function(){n.remove()}),t},T.prototype.position=function(){var e=this,t=e.config,n=e.bindElem||t.elem[0],a=n.getBoundingClientRect(),i=e.elem.offsetWidth,r=e.elem.offsetHeight,o=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},s=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},l=5,d=a.left,c=a.bottom;d+i+l>s("width")&&(d=s("width")-i-l),c+r+l>s()&&(c=a.top>r?a.top-r:s()-r,c-=2*l),t.position&&(e.elem.style.position=t.position),e.elem.style.left=d+("fixed"===t.position?0:o(1))+"px",e.elem.style.top=c+("fixed"===t.position?0:o())+"px"},T.prototype.hint=function(e){var t=this,n=(t.config,w.elem("div",{"class":h}));t.elem&&(n.innerHTML=e||"",w(t.elem).find("."+h).remove(),t.elem.appendChild(n),clearTimeout(t.hinTimer),t.hinTimer=setTimeout(function(){w(t.elem).find("."+h).remove()},3e3))},T.prototype.getAsYM=function(e,t,n){return n?t--:t++,t<0&&(t=11,e--),t>11&&(t=0,e++),[e,t]},T.prototype.systemDate=function(e){var t=e||new Date;return{year:t.getFullYear(),month:t.getMonth(),date:t.getDate(),hours:e?e.getHours():0,minutes:e?e.getMinutes():0,seconds:e?e.getSeconds():0}},T.prototype.checkDate=function(e){var t,a,i=this,r=(new Date,i.config),o=r.dateTime=r.dateTime||i.systemDate(),s=i.bindElem||r.elem[0],l=(i.isInput(s)?"val":"html",i.isInput(s)?s.value:"static"===r.position?"":s.innerHTML),c=function(e){e.year>d[1]&&(e.year=d[1],a=!0),e.month>11&&(e.month=11,a=!0),e.hours>23&&(e.hours=0,a=!0),e.minutes>59&&(e.minutes=0,e.hours++,a=!0),e.seconds>59&&(e.seconds=0,e.minutes++,a=!0),t=n.getEndDate(e.month+1,e.year),e.date>t&&(e.date=t,a=!0)},m=function(e,t,n){var o=["startTime","endTime"];t=(t.match(i.EXP_SPLIT)||[]).slice(1),n=n||0,r.range&&(i[o[n]]=i[o[n]]||{}),w.each(i.format,function(s,l){var c=parseFloat(t[s]);t[s].length必须遵循下述格式:
                  "+(r.range?r.format+" "+r.range+" "+r.format:r.format)+"
                  已为你重置"),a=!0):l&&l.constructor===Date?r.dateTime=i.systemDate(l):(r.dateTime=i.systemDate(),delete i.startState,delete i.endState,delete i.startDate,delete i.endDate,delete i.startTime,delete i.endTime),c(o),a&&l&&i.setValue(r.range?i.endDate?i.parse():"":i.parse()),e&&e(),i)},T.prototype.mark=function(e,t){var n,a=this,i=a.config;return w.each(i.mark,function(e,a){var i=e.split("-");i[0]!=t[0]&&0!=i[0]||i[1]!=t[1]&&0!=i[1]||i[2]!=t[2]||(n=a||t[2])}),n&&e.html(''+n+""),a},T.prototype.limit=function(e,t,n,a){var i,r=this,o=r.config,l={},d=o[n>41?"endDate":"dateTime"],c=w.extend({},d,t||{});return w.each({now:c,min:o.min,max:o.max},function(e,t){l[e]=r.newDate(w.extend({year:t.year,month:t.month,date:t.date},function(){var e={};return w.each(a,function(n,a){e[a]=t[a]}),e}())).getTime()}),i=l.nowl.max,e&&e[i?"addClass":"removeClass"](s),i},T.prototype.calendar=function(e){var t,a,i,r=this,s=r.config,l=e||s.dateTime,c=new Date,m=r.lang(),u="date"!==s.type&&"datetime"!==s.type,h=e?1:0,y=w(r.table[h]).find("td"),f=w(r.elemHeader[h][2]).find("span");if(l.yeard[1]&&(l.year=d[1],r.hint("最高只能支持到公元"+d[1]+"年")),r.firstDate||(r.firstDate=w.extend({},l)),c.setFullYear(l.year,l.month,1),t=c.getDay(),a=n.getEndDate(l.month||12,l.year),i=n.getEndDate(l.month+1,l.year),w.each(y,function(e,n){var d=[l.year,l.month],c=0;n=w(n),n.removeAttr("class"),e=t&&e=n.firstDate.year&&(r.month=a.max.month,r.date=a.max.date),n.limit(w(i),r,t),M++}),w(u[f?0:1]).attr("lay-ym",M-8+"-"+T[1]).html(b+p+" - "+(M-1+p))}else if("month"===e)w.each(new Array(12),function(e){var i=w.elem("li",{"lay-ym":e}),s={year:T[0],month:e};e+1==T[1]&&w(i).addClass(o),i.innerHTML=r.month[e]+(f?"月":""),d.appendChild(i),T[0]=n.firstDate.year&&(s.date=a.max.date),n.limit(w(i),s,t)}),w(u[f?0:1]).attr("lay-ym",T[0]+"-"+T[1]).html(T[0]+p);else if("time"===e){var E=function(){w(d).find("ol").each(function(e,a){w(a).find("li").each(function(a,i){n.limit(w(i),[{hours:a},{hours:n[x].hours,minutes:a},{hours:n[x].hours,minutes:n[x].minutes,seconds:a}][e],t,[["hours"],["hours","minutes"],["hours","minutes","seconds"]][e])})}),a.range||n.limit(w(n.footer).find(g),n[x],0,["hours","minutes","seconds"])};a.range?n[x]||(n[x]={hours:0,minutes:0,seconds:0}):n[x]=i,w.each([24,60,60],function(e,t){var a=w.elem("li"),i=["

                  "+r.time[e]+"

                    "];w.each(new Array(t),function(t){i.push(""+w.digit(t,2)+"")}),a.innerHTML=i.join("")+"
                  ",d.appendChild(a)}),E()}if(y&&h.removeChild(y),h.appendChild(d),"year"===e||"month"===e)w(n.elemMain[t]).addClass("laydate-ym-show"),w(d).find("li").on("click",function(){var r=0|w(this).attr("lay-ym");if(!w(this).hasClass(s)){if(0===t)i[e]=r,l&&(n.startDate[e]=r),n.limit(w(n.footer).find(g),null,0);else if(l)n.endDate[e]=r;else{var c="year"===e?n.getAsYM(r,T[1]-1,"sub"):n.getAsYM(T[0],r,"sub");w.extend(i,{year:c[0],month:c[1]})}"year"===a.type||"month"===a.type?(w(d).find("."+o).removeClass(o),w(this).addClass(o),"month"===a.type&&"year"===e&&(n.listYM[t][0]=r,l&&(n[["startDate","endDate"][t]].year=r),n.list("month",t))):(n.checkDate("limit").calendar(),n.closeList()),n.setBtnStatus(),a.range||n.done(null,"change"),w(n.footer).find(D).removeClass(s)}});else{var S=w.elem("span",{"class":v}),k=function(){w(d).find("ol").each(function(e){var t=this,a=w(t).find("li");t.scrollTop=30*(n[x][C[e]]-2),t.scrollTop<=0&&a.each(function(e,n){if(!w(this).hasClass(s))return t.scrollTop=30*(e-2),!0})})},H=w(c[2]).find("."+v);k(),S.innerHTML=a.range?[r.startTime,r.endTime][t]:r.timeTips,w(n.elemMain[t]).addClass("laydate-time-show"),H[0]&&H.remove(),c[2].appendChild(S),w(d).find("ol").each(function(e){var t=this;w(t).find("li").on("click",function(){var r=0|this.innerHTML;w(this).hasClass(s)||(a.range?n[x][C[e]]=r:i[C[e]]=r,w(t).find("."+o).removeClass(o),w(this).addClass(o),E(),k(),(n.endDate||"time"===a.type)&&n.done(null,"change"),n.setBtnStatus())})})}return n},T.prototype.listYM=[],T.prototype.closeList=function(){var e=this;e.config;w.each(e.elemCont,function(t,n){w(this).find("."+m).remove(),w(e.elemMain[t]).removeClass("laydate-ym-show laydate-time-show")}),w(e.elem).find("."+v).remove()},T.prototype.setBtnStatus=function(e,t,n){var a,i=this,r=i.config,o=w(i.footer).find(g),d=r.range&&"date"!==r.type&&"time"!==r.type;d&&(t=t||i.startDate,n=n||i.endDate,a=i.newDate(t).getTime()>i.newDate(n).getTime(),i.limit(null,t)||i.limit(null,n)?o.addClass(s):o[a?"addClass":"removeClass"](s),e&&a&&i.hint("string"==typeof e?l.replace(/日期/g,e):l))},T.prototype.parse=function(e,t){var n=this,a=n.config,i=t||(e?w.extend({},n.endDate,n.endTime):a.range?w.extend({},n.startDate,n.startTime):a.dateTime),r=n.format.concat();return w.each(r,function(e,t){/yyyy|y/.test(t)?r[e]=w.digit(i.year,t.length):/MM|M/.test(t)?r[e]=w.digit(i.month+1,t.length):/dd|d/.test(t)?r[e]=w.digit(i.date,t.length):/HH|H/.test(t)?r[e]=w.digit(i.hours,t.length):/mm|m/.test(t)?r[e]=w.digit(i.minutes,t.length):/ss|s/.test(t)&&(r[e]=w.digit(i.seconds,t.length))}),a.range&&!e?r.join("")+" "+a.range+" "+n.parse(1):r.join("")},T.prototype.newDate=function(e){return e=e||{},new Date(e.year||1,e.month||0,e.date||1,e.hours||0,e.minutes||0,e.seconds||0)},T.prototype.setValue=function(e){var t=this,n=t.config,a=t.bindElem||n.elem[0],i=t.isInput(a)?"val":"html";return"static"===n.position||w(a)[i](e||""),this},T.prototype.stampRange=function(){var e,t,n=this,a=n.config,i=w(n.elem).find("td");if(a.range&&!n.endDate&&w(n.footer).find(g).addClass(s),n.endDate)return e=n.newDate({year:n.startDate.year,month:n.startDate.month,date:n.startDate.date}).getTime(),t=n.newDate({year:n.endDate.year,month:n.endDate.month,date:n.endDate.date}).getTime(),e>t?n.hint(l):void w.each(i,function(a,i){var r=w(i).attr("lay-ymd").split("-"),s=n.newDate({year:r[0],month:r[1]-1,date:r[2]}).getTime();w(i).removeClass(u+" "+o),s!==e&&s!==t||w(i).addClass(w(i).hasClass(y)||w(i).hasClass(f)?u:o),s>e&&s0&&t-1 in e)}function r(e,t,n){if(pe.isFunction(t))return pe.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return pe.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(Ce.test(t))return pe.filter(t,e,n);t=pe.filter(t,e)}return pe.grep(e,function(e){return pe.inArray(e,t)>-1!==n})}function i(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function o(e){var t={};return pe.each(e.match(De)||[],function(e,n){t[n]=!0}),t}function a(){re.addEventListener?(re.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s)):(re.detachEvent("onreadystatechange",s),e.detachEvent("onload",s))}function s(){(re.addEventListener||"load"===e.event.type||"complete"===re.readyState)&&(a(),pe.ready())}function u(e,t,n){if(void 0===n&&1===e.nodeType){var r="data-"+t.replace(_e,"-$1").toLowerCase();if(n=e.getAttribute(r),"string"==typeof n){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:qe.test(n)?pe.parseJSON(n):n)}catch(i){}pe.data(e,t,n)}else n=void 0}return n}function l(e){var t;for(t in e)if(("data"!==t||!pe.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function c(e,t,n,r){if(He(e)){var i,o,a=pe.expando,s=e.nodeType,u=s?pe.cache:e,l=s?e[a]:e[a]&&a;if(l&&u[l]&&(r||u[l].data)||void 0!==n||"string"!=typeof t)return l||(l=s?e[a]=ne.pop()||pe.guid++:a),u[l]||(u[l]=s?{}:{toJSON:pe.noop}),"object"!=typeof t&&"function"!=typeof t||(r?u[l]=pe.extend(u[l],t):u[l].data=pe.extend(u[l].data,t)),o=u[l],r||(o.data||(o.data={}),o=o.data),void 0!==n&&(o[pe.camelCase(t)]=n),"string"==typeof t?(i=o[t],null==i&&(i=o[pe.camelCase(t)])):i=o,i}}function f(e,t,n){if(He(e)){var r,i,o=e.nodeType,a=o?pe.cache:e,s=o?e[pe.expando]:pe.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){pe.isArray(t)?t=t.concat(pe.map(t,pe.camelCase)):t in r?t=[t]:(t=pe.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;for(;i--;)delete r[t[i]];if(n?!l(r):!pe.isEmptyObject(r))return}(n||(delete a[s].data,l(a[s])))&&(o?pe.cleanData([e],!0):fe.deleteExpando||a!=a.window?delete a[s]:a[s]=void 0)}}}function d(e,t,n,r){var i,o=1,a=20,s=r?function(){return r.cur()}:function(){return pe.css(e,t,"")},u=s(),l=n&&n[3]||(pe.cssNumber[t]?"":"px"),c=(pe.cssNumber[t]||"px"!==l&&+u)&&Me.exec(pe.css(e,t));if(c&&c[3]!==l){l=l||c[3],n=n||[],c=+u||1;do o=o||".5",c/=o,pe.style(e,t,c+l);while(o!==(o=s()/u)&&1!==o&&--a)}return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}function p(e){var t=ze.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function h(e,t){var n,r,i=0,o="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):void 0;if(!o)for(o=[],n=e.childNodes||e;null!=(r=n[i]);i++)!t||pe.nodeName(r,t)?o.push(r):pe.merge(o,h(r,t));return void 0===t||t&&pe.nodeName(e,t)?pe.merge([e],o):o}function g(e,t){for(var n,r=0;null!=(n=e[r]);r++)pe._data(n,"globalEval",!t||pe._data(t[r],"globalEval"))}function m(e){Be.test(e.type)&&(e.defaultChecked=e.checked)}function y(e,t,n,r,i){for(var o,a,s,u,l,c,f,d=e.length,y=p(t),v=[],x=0;x"!==f[1]||Ve.test(a)?0:u:u.firstChild,o=a&&a.childNodes.length;o--;)pe.nodeName(c=a.childNodes[o],"tbody")&&!c.childNodes.length&&a.removeChild(c);for(pe.merge(v,u.childNodes),u.textContent="";u.firstChild;)u.removeChild(u.firstChild);u=y.lastChild}else v.push(t.createTextNode(a));for(u&&y.removeChild(u),fe.appendChecked||pe.grep(h(v,"input"),m),x=0;a=v[x++];)if(r&&pe.inArray(a,r)>-1)i&&i.push(a);else if(s=pe.contains(a.ownerDocument,a),u=h(y.appendChild(a),"script"),s&&g(u),n)for(o=0;a=u[o++];)Ie.test(a.type||"")&&n.push(a);return u=null,y}function v(){return!0}function x(){return!1}function b(){try{return re.activeElement}catch(e){}}function w(e,t,n,r,i,o){var a,s;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=void 0);for(s in t)w(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),i===!1)i=x;else if(!i)return e;return 1===o&&(a=i,i=function(e){return pe().off(e),a.apply(this,arguments)},i.guid=a.guid||(a.guid=pe.guid++)),e.each(function(){pe.event.add(this,t,i,r,n)})}function T(e,t){return pe.nodeName(e,"table")&&pe.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function C(e){return e.type=(null!==pe.find.attr(e,"type"))+"/"+e.type,e}function E(e){var t=it.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function N(e,t){if(1===t.nodeType&&pe.hasData(e)){var n,r,i,o=pe._data(e),a=pe._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;r1&&"string"==typeof p&&!fe.checkClone&&rt.test(p))return e.each(function(i){var o=e.eq(i);g&&(t[0]=p.call(this,i,o.html())),S(o,t,n,r)});if(f&&(l=y(t,e[0].ownerDocument,!1,e,r),i=l.firstChild,1===l.childNodes.length&&(l=i),i||r)){for(s=pe.map(h(l,"script"),C),a=s.length;c")).appendTo(t.documentElement),t=(ut[0].contentWindow||ut[0].contentDocument).document,t.write(),t.close(),n=D(e,t),ut.detach()),lt[e]=n),n}function L(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function H(e){if(e in Et)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=Ct.length;n--;)if(e=Ct[n]+t,e in Et)return e}function q(e,t){for(var n,r,i,o=[],a=0,s=e.length;a=0&&n=0},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},isPlainObject:function(e){var t;if(!e||"object"!==pe.type(e)||e.nodeType||pe.isWindow(e))return!1;try{if(e.constructor&&!ce.call(e,"constructor")&&!ce.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}if(!fe.ownFirst)for(t in e)return ce.call(e,t);for(t in e);return void 0===t||ce.call(e,t)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ue[le.call(e)]||"object":typeof e},globalEval:function(t){t&&pe.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(ge,"ms-").replace(me,ye)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var r,i=0;if(n(e))for(r=e.length;iT.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[P]=!0,e}function i(e){var t=H.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=n.length;r--;)T.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||V)-(~e.sourceIndex||V);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function u(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function l(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function c(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function f(){}function d(e){for(var t=0,n=e.length,r="";t1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function g(e,n,r){for(var i=0,o=n.length;i-1&&(r[l]=!(a[l]=f))}}else x=m(x===a?x.splice(h,x.length):x),o?o(null,a,x,u):Q.apply(a,x)})}function v(e){for(var t,n,r,i=e.length,o=T.relative[e[0].type],a=o||T.relative[" "],s=o?1:0,u=p(function(e){return e===t},a,!0),l=p(function(e){return ee(t,e)>-1},a,!0),c=[function(e,n,r){var i=!o&&(r||n!==A)||((t=n).nodeType?u(e,n,r):l(e,n,r));return t=null,i}];s1&&h(c),s>1&&d(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,s0,o=e.length>0,a=function(r,a,s,u,l){var c,f,d,p=0,h="0",g=r&&[],y=[],v=A,x=r||o&&T.find.TAG("*",l),b=W+=null==v?1:Math.random()||.1,w=x.length;for(l&&(A=a===H||a||l);h!==w&&null!=(c=x[h]);h++){if(o&&c){for(f=0,a||c.ownerDocument===H||(L(c),s=!_);d=e[f++];)if(d(c,a||H,s)){u.push(c);break}l&&(W=b)}i&&((c=!d&&c)&&p--,r&&g.push(c))}if(p+=h,i&&h!==p){for(f=0;d=n[f++];)d(g,y,a,s);if(r){if(p>0)for(;h--;)g[h]||y[h]||(y[h]=G.call(u));y=m(y)}Q.apply(u,y),l&&!r&&y.length>0&&p+n.length>1&&t.uniqueSort(u)}return l&&(W=b,A=v),g};return i?r(a):a}var b,w,T,C,E,N,k,S,A,D,j,L,H,q,_,F,M,O,R,P="sizzle"+1*new Date,B=e.document,W=0,I=0,$=n(),z=n(),X=n(),U=function(e,t){return e===t&&(j=!0),0},V=1<<31,Y={}.hasOwnProperty,J=[],G=J.pop,K=J.push,Q=J.push,Z=J.slice,ee=function(e,t){for(var n=0,r=e.length;n+~]|"+ne+")"+ne+"*"),ce=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),fe=new RegExp(oe),de=new RegExp("^"+re+"$"),pe={ID:new RegExp("^#("+re+")"),CLASS:new RegExp("^\\.("+re+")"),TAG:new RegExp("^("+re+"|[*])"),ATTR:new RegExp("^"+ie),PSEUDO:new RegExp("^"+oe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},he=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,xe=/'|\\/g,be=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),we=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},Te=function(){L()};try{Q.apply(J=Z.call(B.childNodes),B.childNodes),J[B.childNodes.length].nodeType}catch(Ce){Q={apply:J.length?function(e,t){K.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}w=t.support={},E=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},L=t.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:B;return r!==H&&9===r.nodeType&&r.documentElement?(H=r,q=H.documentElement,_=!E(H),(n=H.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",Te,!1):n.attachEvent&&n.attachEvent("onunload",Te)),w.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),w.getElementsByTagName=i(function(e){return e.appendChild(H.createComment("")),!e.getElementsByTagName("*").length}),w.getElementsByClassName=me.test(H.getElementsByClassName),w.getById=i(function(e){return q.appendChild(e).id=P,!H.getElementsByName||!H.getElementsByName(P).length}),w.getById?(T.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&_){var n=t.getElementById(e);return n?[n]:[]}},T.filter.ID=function(e){var t=e.replace(be,we);return function(e){return e.getAttribute("id")===t}}):(delete T.find.ID,T.filter.ID=function(e){var t=e.replace(be,we);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),T.find.TAG=w.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):w.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},T.find.CLASS=w.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&_)return t.getElementsByClassName(e)},M=[],F=[],(w.qsa=me.test(H.querySelectorAll))&&(i(function(e){q.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&F.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||F.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+P+"-]").length||F.push("~="),e.querySelectorAll(":checked").length||F.push(":checked"),e.querySelectorAll("a#"+P+"+*").length||F.push(".#.+[+~]")}),i(function(e){var t=H.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&F.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),F.push(",.*:")})),(w.matchesSelector=me.test(O=q.matches||q.webkitMatchesSelector||q.mozMatchesSelector||q.oMatchesSelector||q.msMatchesSelector))&&i(function(e){w.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),M.push("!=",oe)}),F=F.length&&new RegExp(F.join("|")),M=M.length&&new RegExp(M.join("|")),t=me.test(q.compareDocumentPosition),R=t||me.test(q.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},U=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!w.sortDetached&&t.compareDocumentPosition(e)===n?e===H||e.ownerDocument===B&&R(B,e)?-1:t===H||t.ownerDocument===B&&R(B,t)?1:D?ee(D,e)-ee(D,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],u=[t];if(!i||!o)return e===H?-1:t===H?1:i?-1:o?1:D?ee(D,e)-ee(D,t):0;if(i===o)return a(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)u.unshift(n);for(;s[r]===u[r];)r++;return r?a(s[r],u[r]):s[r]===B?-1:u[r]===B?1:0},H):H},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==H&&L(e),n=n.replace(ce,"='$1']"),w.matchesSelector&&_&&!X[n+" "]&&(!M||!M.test(n))&&(!F||!F.test(n)))try{var r=O.call(e,n);if(r||w.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(i){}return t(n,H,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==H&&L(e),R(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==H&&L(e);var n=T.attrHandle[t.toLowerCase()],r=n&&Y.call(T.attrHandle,t.toLowerCase())?n(e,t,!_):void 0;return void 0!==r?r:w.attributes||!_?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],r=0,i=0;if(j=!w.detectDuplicates,D=!w.sortStable&&e.slice(0),e.sort(U),j){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return D=null,e},C=t.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=C(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=C(t);return n},T=t.selectors={cacheLength:50,createPseudo:r,match:pe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(be,we),e[3]=(e[3]||e[4]||e[5]||"").replace(be,we),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return pe.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&fe.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(be,we).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=$[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&$(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,r){return function(i){var o=t.attr(i,e);return null==o?"!="===n:!n||(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o.replace(ae," ")+" ").indexOf(r)>-1:"|="===n&&(o===r||o.slice(0,r.length+1)===r+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,d,p,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s,x=!1;if(m){if(o){for(;g;){for(d=t;d=d[g];)if(s?d.nodeName.toLowerCase()===y:1===d.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(d=m,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}), +l=c[e]||[],p=l[0]===W&&l[1],x=p&&l[2],d=p&&m.childNodes[p];d=++p&&d&&d[g]||(x=p=0)||h.pop();)if(1===d.nodeType&&++x&&d===t){c[e]=[W,p,x];break}}else if(v&&(d=t,f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),l=c[e]||[],p=l[0]===W&&l[1],x=p),x===!1)for(;(d=++p&&d&&d[g]||(x=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==y:1!==d.nodeType)||!++x||(v&&(f=d[P]||(d[P]={}),c=f[d.uniqueID]||(f[d.uniqueID]={}),c[e]=[W,x]),d!==t)););return x-=i,x===r||x%r===0&&x/r>=0}}},PSEUDO:function(e,n){var i,o=T.pseudos[e]||T.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return o[P]?o(n):o.length>1?(i=[e,e,"",n],T.setFilters.hasOwnProperty(e.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=ee(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=k(e.replace(se,"$1"));return i[P]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),t[0]=null,!n.pop()}}),has:r(function(e){return function(n){return t(e,n).length>0}}),contains:r(function(e){return e=e.replace(be,we),function(t){return(t.textContent||t.innerText||C(t)).indexOf(e)>-1}}),lang:r(function(e){return de.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(be,we).toLowerCase(),function(t){var n;do if(n=_?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===q},focus:function(e){return e===H.activeElement&&(!H.hasFocus||H.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!T.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return he.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:l(function(){return[0]}),last:l(function(e,t){return[t-1]}),eq:l(function(e,t,n){return[n<0?n+t:n]}),even:l(function(e,t){for(var n=0;n=0;)e.push(r);return e}),gt:l(function(e,t,n){for(var r=n<0?n+t:n;++r2&&"ID"===(a=o[0]).type&&w.getById&&9===t.nodeType&&_&&T.relative[o[1].type]){if(t=(T.find.ID(a.matches[0].replace(be,we),t)||[])[0],!t)return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=pe.needsContext.test(e)?0:o.length;i--&&(a=o[i],!T.relative[s=a.type]);)if((u=T.find[s])&&(r=u(a.matches[0].replace(be,we),ve.test(o[0].type)&&c(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&d(o),!e)return Q.apply(n,r),n;break}}return(l||k(e,f))(r,t,!_,n,!t||ve.test(e)&&c(t.parentNode)||t),n},w.sortStable=P.split("").sort(U).join("")===P,w.detectDuplicates=!!j,L(),w.sortDetached=i(function(e){return 1&e.compareDocumentPosition(H.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),w.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(te,function(e,t,n){var r;if(!n)return e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),t}(e);pe.find=ve,pe.expr=ve.selectors,pe.expr[":"]=pe.expr.pseudos,pe.uniqueSort=pe.unique=ve.uniqueSort,pe.text=ve.getText,pe.isXMLDoc=ve.isXML,pe.contains=ve.contains;var xe=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&pe(e).is(n))break;r.push(e)}return r},be=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},we=pe.expr.match.needsContext,Te=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Ce=/^.[^:#\[\.,]*$/;pe.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?pe.find.matchesSelector(r,e)?[r]:[]:pe.find.matches(e,pe.grep(t,function(e){return 1===e.nodeType}))},pe.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(pe(e).filter(function(){for(t=0;t1?pe.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(r(this,e||[],!1))},not:function(e){return this.pushStack(r(this,e||[],!0))},is:function(e){return!!r(this,"string"==typeof e&&we.test(e)?pe(e):e||[],!1).length}});var Ee,Ne=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ke=pe.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||Ee,"string"==typeof e){if(r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:Ne.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof pe?t[0]:t,pe.merge(this,pe.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:re,!0)),Te.test(r[1])&&pe.isPlainObject(t))for(r in t)pe.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}if(i=re.getElementById(r[2]),i&&i.parentNode){if(i.id!==r[2])return Ee.find(e);this.length=1,this[0]=i}return this.context=re,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):pe.isFunction(e)?"undefined"!=typeof n.ready?n.ready(e):e(pe):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),pe.makeArray(e,this))};ke.prototype=pe.fn,Ee=pe(re);var Se=/^(?:parents|prev(?:Until|All))/,Ae={children:!0,contents:!0,next:!0,prev:!0};pe.fn.extend({has:function(e){var t,n=pe(e,this),r=n.length;return this.filter(function(){for(t=0;t-1:1===n.nodeType&&pe.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(o.length>1?pe.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?pe.inArray(this[0],pe(e)):pe.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(pe.uniqueSort(pe.merge(this.get(),pe(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),pe.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return xe(e,"parentNode")},parentsUntil:function(e,t,n){return xe(e,"parentNode",n)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return xe(e,"nextSibling")},prevAll:function(e){return xe(e,"previousSibling")},nextUntil:function(e,t,n){return xe(e,"nextSibling",n)},prevUntil:function(e,t,n){return xe(e,"previousSibling",n)},siblings:function(e){return be((e.parentNode||{}).firstChild,e)},children:function(e){return be(e.firstChild)},contents:function(e){return pe.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:pe.merge([],e.childNodes)}},function(e,t){pe.fn[e]=function(n,r){var i=pe.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=pe.filter(r,i)),this.length>1&&(Ae[e]||(i=pe.uniqueSort(i)),Se.test(e)&&(i=i.reverse())),this.pushStack(i)}});var De=/\S+/g;pe.Callbacks=function(e){e="string"==typeof e?o(e):pe.extend({},e);var t,n,r,i,a=[],s=[],u=-1,l=function(){for(i=e.once,r=t=!0;s.length;u=-1)for(n=s.shift();++u-1;)a.splice(n,1),n<=u&&u--}),this},has:function(e){return e?pe.inArray(e,a)>-1:a.length>0},empty:function(){return a&&(a=[]),this},disable:function(){return i=s=[],a=n="",this},disabled:function(){return!a},lock:function(){return i=!0,n||c.disable(),this},locked:function(){return!!i},fireWith:function(e,n){return i||(n=n||[],n=[e,n.slice?n.slice():n],s.push(n),t||l()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},pe.extend({Deferred:function(e){var t=[["resolve","done",pe.Callbacks("once memory"),"resolved"],["reject","fail",pe.Callbacks("once memory"),"rejected"],["notify","progress",pe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return pe.Deferred(function(n){pe.each(t,function(t,o){var a=pe.isFunction(e[t])&&e[t];i[o[1]](function(){var e=a&&a.apply(this,arguments);e&&pe.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[o[0]+"With"](this===r?n.promise():this,a?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?pe.extend(e,r):r}},i={};return r.pipe=r.then,pe.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=ie.call(arguments),a=o.length,s=1!==a||e&&pe.isFunction(e.promise)?a:0,u=1===s?e:pe.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?ie.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=new Array(a),n=new Array(a),r=new Array(a);i0||(je.resolveWith(re,[pe]),pe.fn.triggerHandler&&(pe(re).triggerHandler("ready"),pe(re).off("ready"))))}}),pe.ready.promise=function(t){if(!je)if(je=pe.Deferred(),"complete"===re.readyState||"loading"!==re.readyState&&!re.documentElement.doScroll)e.setTimeout(pe.ready);else if(re.addEventListener)re.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s);else{re.attachEvent("onreadystatechange",s),e.attachEvent("onload",s);var n=!1;try{n=null==e.frameElement&&re.documentElement}catch(r){}n&&n.doScroll&&!function i(){if(!pe.isReady){try{n.doScroll("left")}catch(t){return e.setTimeout(i,50)}a(),pe.ready()}}()}return je.promise(t)},pe.ready.promise();var Le;for(Le in pe(fe))break;fe.ownFirst="0"===Le,fe.inlineBlockNeedsLayout=!1,pe(function(){var e,t,n,r;n=re.getElementsByTagName("body")[0],n&&n.style&&(t=re.createElement("div"),r=re.createElement("div"),r.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",n.appendChild(r).appendChild(t),"undefined"!=typeof t.style.zoom&&(t.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",fe.inlineBlockNeedsLayout=e=3===t.offsetWidth,e&&(n.style.zoom=1)),n.removeChild(r))}),function(){var e=re.createElement("div");fe.deleteExpando=!0;try{delete e.test}catch(t){fe.deleteExpando=!1}e=null}();var He=function(e){var t=pe.noData[(e.nodeName+" ").toLowerCase()],n=+e.nodeType||1;return(1===n||9===n)&&(!t||t!==!0&&e.getAttribute("classid")===t)},qe=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,_e=/([A-Z])/g;pe.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?pe.cache[e[pe.expando]]:e[pe.expando],!!e&&!l(e)},data:function(e,t,n){return c(e,t,n)},removeData:function(e,t){return f(e,t)},_data:function(e,t,n){return c(e,t,n,!0)},_removeData:function(e,t){return f(e,t,!0)}}),pe.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0===e){if(this.length&&(i=pe.data(o),1===o.nodeType&&!pe._data(o,"parsedAttrs"))){for(n=a.length;n--;)a[n]&&(r=a[n].name,0===r.indexOf("data-")&&(r=pe.camelCase(r.slice(5)),u(o,r,i[r])));pe._data(o,"parsedAttrs",!0)}return i}return"object"==typeof e?this.each(function(){pe.data(this,e)}):arguments.length>1?this.each(function(){pe.data(this,e,t)}):o?u(o,e,pe.data(o,e)):void 0},removeData:function(e){return this.each(function(){pe.removeData(this,e)})}}),pe.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=pe._data(e,t),n&&(!r||pe.isArray(n)?r=pe._data(e,t,pe.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=pe.queue(e,t),r=n.length,i=n.shift(),o=pe._queueHooks(e,t),a=function(){pe.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return pe._data(e,n)||pe._data(e,n,{empty:pe.Callbacks("once memory").add(function(){pe._removeData(e,t+"queue"),pe._removeData(e,n)})})}}),pe.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length
                  a",fe.leadingWhitespace=3===e.firstChild.nodeType,fe.tbody=!e.getElementsByTagName("tbody").length,fe.htmlSerialize=!!e.getElementsByTagName("link").length,fe.html5Clone="<:nav>"!==re.createElement("nav").cloneNode(!0).outerHTML,n.type="checkbox",n.checked=!0,t.appendChild(n),fe.appendChecked=n.checked,e.innerHTML="",fe.noCloneChecked=!!e.cloneNode(!0).lastChild.defaultValue,t.appendChild(e),n=re.createElement("input"),n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),e.appendChild(n),fe.checkClone=e.cloneNode(!0).cloneNode(!0).lastChild.checked,fe.noCloneEvent=!!e.addEventListener,e[pe.expando]=1,fe.attributes=!e.getAttribute(pe.expando)}();var Xe={option:[1,""],legend:[1,"
                  ","
                  "],area:[1,"",""],param:[1,"",""],thead:[1,"","
                  "],tr:[2,"","
                  "],col:[2,"","
                  "],td:[3,"","
                  "],_default:fe.htmlSerialize?[0,"",""]:[1,"X
                  ","
                  "]};Xe.optgroup=Xe.option,Xe.tbody=Xe.tfoot=Xe.colgroup=Xe.caption=Xe.thead,Xe.th=Xe.td;var Ue=/<|&#?\w+;/,Ve=/-1&&(h=p.split("."),p=h.shift(),h.sort()),a=p.indexOf(":")<0&&"on"+p,t=t[pe.expando]?t:new pe.Event(p,"object"==typeof t&&t),t.isTrigger=i?2:3,t.namespace=h.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:pe.makeArray(n,[t]),l=pe.event.special[p]||{},i||!l.trigger||l.trigger.apply(r,n)!==!1)){if(!i&&!l.noBubble&&!pe.isWindow(r)){for(u=l.delegateType||p,Ke.test(u+p)||(s=s.parentNode);s;s=s.parentNode)d.push(s),c=s;c===(r.ownerDocument||re)&&d.push(c.defaultView||c.parentWindow||e)}for(f=0;(s=d[f++])&&!t.isPropagationStopped();)t.type=f>1?u:l.bindType||p,o=(pe._data(s,"events")||{})[t.type]&&pe._data(s,"handle"),o&&o.apply(s,n),o=a&&s[a],o&&o.apply&&He(s)&&(t.result=o.apply(s,n),t.result===!1&&t.preventDefault());if(t.type=p,!i&&!t.isDefaultPrevented()&&(!l._default||l._default.apply(d.pop(),n)===!1)&&He(r)&&a&&r[p]&&!pe.isWindow(r)){c=r[a],c&&(r[a]=null),pe.event.triggered=p;try{r[p]()}catch(g){}pe.event.triggered=void 0,c&&(r[a]=c)}return t.result}},dispatch:function(e){e=pe.event.fix(e);var t,n,r,i,o,a=[],s=ie.call(arguments),u=(pe._data(this,"events")||{})[e.type]||[],l=pe.event.special[e.type]||{};if(s[0]=e,e.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,e)!==!1){for(a=pe.event.handlers.call(this,e,u),t=0;(i=a[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,r=((pe.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,s),void 0!==r&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,a=[],s=t.delegateCount,u=e.target;if(s&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(r=[],n=0;n-1:pe.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&a.push({elem:u,handlers:r})}return s]","i"),tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt=/\s*$/g,at=p(re),st=at.appendChild(re.createElement("div"));pe.extend({htmlPrefilter:function(e){return e.replace(tt,"<$1>")},clone:function(e,t,n){var r,i,o,a,s,u=pe.contains(e.ownerDocument,e);if(fe.html5Clone||pe.isXMLDoc(e)||!et.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(st.innerHTML=e.outerHTML,st.removeChild(o=st.firstChild)),!(fe.noCloneEvent&&fe.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||pe.isXMLDoc(e)))for(r=h(o),s=h(e),a=0;null!=(i=s[a]);++a)r[a]&&k(i,r[a]);if(t)if(n)for(s=s||h(e),r=r||h(o),a=0;null!=(i=s[a]);a++)N(i,r[a]);else N(e,o);return r=h(o,"script"),r.length>0&&g(r,!u&&h(e,"script")),r=s=i=null,o},cleanData:function(e,t){for(var n,r,i,o,a=0,s=pe.expando,u=pe.cache,l=fe.attributes,c=pe.event.special;null!=(n=e[a]);a++)if((t||He(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?pe.event.remove(n,r):pe.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l||"undefined"==typeof n.removeAttribute?n[s]=void 0:n.removeAttribute(s),ne.push(i))}}}),pe.fn.extend({domManip:S,detach:function(e){return A(this,e,!0)},remove:function(e){return A(this,e)},text:function(e){return Pe(this,function(e){return void 0===e?pe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||re).createTextNode(e))},null,e,arguments.length)},append:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.appendChild(e)}})},prepend:function(){return S(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=T(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return S(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&pe.cleanData(h(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&pe.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return pe.clone(this,e,t)})},html:function(e){return Pe(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e)return 1===t.nodeType?t.innerHTML.replace(Ze,""):void 0;if("string"==typeof e&&!nt.test(e)&&(fe.htmlSerialize||!et.test(e))&&(fe.leadingWhitespace||!$e.test(e))&&!Xe[(We.exec(e)||["",""])[1].toLowerCase()]){e=pe.htmlPrefilter(e);try{for(;nt",t=l.getElementsByTagName("td"),t[0].style.cssText="margin:0;border:0;padding:0;display:none",o=0===t[0].offsetHeight,o&&(t[0].style.display="",t[1].style.display="none",o=0===t[0].offsetHeight)),f.removeChild(u)}var n,r,i,o,a,s,u=re.createElement("div"),l=re.createElement("div");l.style&&(l.style.cssText="float:left;opacity:.5",fe.opacity="0.5"===l.style.opacity,fe.cssFloat=!!l.style.cssFloat,l.style.backgroundClip="content-box",l.cloneNode(!0).style.backgroundClip="",fe.clearCloneStyle="content-box"===l.style.backgroundClip,u=re.createElement("div"),u.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",l.innerHTML="",u.appendChild(l),fe.boxSizing=""===l.style.boxSizing||""===l.style.MozBoxSizing||""===l.style.WebkitBoxSizing,pe.extend(fe,{reliableHiddenOffsets:function(){return null==n&&t(),o},boxSizingReliable:function(){return null==n&&t(),i},pixelMarginRight:function(){return null==n&&t(),r},pixelPosition:function(){return null==n&&t(),n},reliableMarginRight:function(){return null==n&&t(),a},reliableMarginLeft:function(){return null==n&&t(),s}}))}();var ht,gt,mt=/^(top|right|bottom|left)$/;e.getComputedStyle?(ht=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n.getPropertyValue(t)||n[t]:void 0,""!==a&&void 0!==a||pe.contains(e.ownerDocument,e)||(a=pe.style(e,t)),n&&!fe.pixelMarginRight()&&ft.test(a)&&ct.test(t)&&(r=s.width,i=s.minWidth,o=s.maxWidth,s.minWidth=s.maxWidth=s.width=a,a=n.width,s.width=r,s.minWidth=i,s.maxWidth=o),void 0===a?a:a+""}):pt.currentStyle&&(ht=function(e){return e.currentStyle},gt=function(e,t,n){var r,i,o,a,s=e.style;return n=n||ht(e),a=n?n[t]:void 0,null==a&&s&&s[t]&&(a=s[t]),ft.test(a)&&!mt.test(t)&&(r=s.left,i=e.runtimeStyle,o=i&&i.left,o&&(i.left=e.currentStyle.left),s.left="fontSize"===t?"1em":a,a=s.pixelLeft+"px",s.left=r,o&&(i.left=o)),void 0===a?a:a+""||"auto"});var yt=/alpha\([^)]*\)/i,vt=/opacity\s*=\s*([^)]*)/i,xt=/^(none|table(?!-c[ea]).+)/,bt=new RegExp("^("+Fe+")(.*)$","i"),wt={position:"absolute",visibility:"hidden",display:"block"},Tt={letterSpacing:"0",fontWeight:"400"},Ct=["Webkit","O","Moz","ms"],Et=re.createElement("div").style;pe.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=gt(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":fe.cssFloat?"cssFloat":"styleFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=pe.camelCase(t),u=e.style;if(t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:u[t];if(o=typeof n,"string"===o&&(i=Me.exec(n))&&i[1]&&(n=d(e,t,i),o="number"),null!=n&&n===n&&("number"===o&&(n+=i&&i[3]||(pe.cssNumber[s]?"":"px")),fe.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),!(a&&"set"in a&&void 0===(n=a.set(e,n,r)))))try{u[t]=n}catch(l){}}},css:function(e,t,n,r){var i,o,a,s=pe.camelCase(t);return t=pe.cssProps[s]||(pe.cssProps[s]=H(s)||s),a=pe.cssHooks[t]||pe.cssHooks[s],a&&"get"in a&&(o=a.get(e,!0,n)),void 0===o&&(o=gt(e,t,r)),"normal"===o&&t in Tt&&(o=Tt[t]),""===n||n?(i=parseFloat(o),n===!0||isFinite(i)?i||0:o):o}}),pe.each(["height","width"],function(e,t){pe.cssHooks[t]={get:function(e,n,r){if(n)return xt.test(pe.css(e,"display"))&&0===e.offsetWidth?dt(e,wt,function(){return M(e,t,r)}):M(e,t,r)},set:function(e,n,r){var i=r&&ht(e);return _(e,n,r?F(e,t,r,fe.boxSizing&&"border-box"===pe.css(e,"boxSizing",!1,i),i):0)}}}),fe.opacity||(pe.cssHooks.opacity={get:function(e,t){return vt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=pe.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===pe.trim(o.replace(yt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=yt.test(o)?o.replace(yt,i):o+" "+i)}}),pe.cssHooks.marginRight=L(fe.reliableMarginRight,function(e,t){if(t)return dt(e,{display:"inline-block"},gt,[e,"marginRight"])}),pe.cssHooks.marginLeft=L(fe.reliableMarginLeft,function(e,t){if(t)return(parseFloat(gt(e,"marginLeft"))||(pe.contains(e.ownerDocument,e)?e.getBoundingClientRect().left-dt(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}):0))+"px"}),pe.each({margin:"",padding:"",border:"Width"},function(e,t){pe.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+Oe[r]+t]=o[r]||o[r-2]||o[0];return i}},ct.test(e)||(pe.cssHooks[e+t].set=_)}),pe.fn.extend({css:function(e,t){return Pe(this,function(e,t,n){var r,i,o={},a=0;if(pe.isArray(t)){for(r=ht(e),i=t.length;a1)},show:function(){return q(this,!0)},hide:function(){return q(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){Re(this)?pe(this).show():pe(this).hide()})}}),pe.Tween=O,O.prototype={constructor:O,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||pe.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(pe.cssNumber[n]?"":"px")},cur:function(){var e=O.propHooks[this.prop];return e&&e.get?e.get(this):O.propHooks._default.get(this)},run:function(e){var t,n=O.propHooks[this.prop];return this.options.duration?this.pos=t=pe.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):O.propHooks._default.set(this),this}},O.prototype.init.prototype=O.prototype,O.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=pe.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){pe.fx.step[e.prop]?pe.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[pe.cssProps[e.prop]]&&!pe.cssHooks[e.prop]?e.elem[e.prop]=e.now:pe.style(e.elem,e.prop,e.now+e.unit)}}},O.propHooks.scrollTop=O.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},pe.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},pe.fx=O.prototype.init,pe.fx.step={};var Nt,kt,St=/^(?:toggle|show|hide)$/,At=/queueHooks$/;pe.Animation=pe.extend($,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return d(n.elem,e,Me.exec(t),n),n}]},tweener:function(e,t){pe.isFunction(e)?(t=e,e=["*"]):e=e.match(De);for(var n,r=0,i=e.length;r
                  a",e=n.getElementsByTagName("a")[0],t.setAttribute("type","checkbox"),n.appendChild(t),e=n.getElementsByTagName("a")[0],e.style.cssText="top:1px",fe.getSetAttribute="t"!==n.className,fe.style=/top/.test(e.getAttribute("style")),fe.hrefNormalized="/a"===e.getAttribute("href"),fe.checkOn=!!t.value,fe.optSelected=i.selected,fe.enctype=!!re.createElement("form").enctype,r.disabled=!0,fe.optDisabled=!i.disabled,t=re.createElement("input"),t.setAttribute("value",""),fe.input=""===t.getAttribute("value"),t.value="t",t.setAttribute("type","radio"),fe.radioValue="t"===t.value}();var Dt=/\r/g,jt=/[\x20\t\r\n\f]+/g;pe.fn.extend({val:function(e){var t,n,r,i=this[0];{if(arguments.length)return r=pe.isFunction(e),this.each(function(n){var i;1===this.nodeType&&(i=r?e.call(this,n,pe(this).val()):e,null==i?i="":"number"==typeof i?i+="":pe.isArray(i)&&(i=pe.map(i,function(e){return null==e?"":e+""})),t=pe.valHooks[this.type]||pe.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=pe.valHooks[i.type]||pe.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:(n=i.value,"string"==typeof n?n.replace(Dt,""):null==n?"":n)}}}),pe.extend({valHooks:{option:{get:function(e){var t=pe.find.attr(e,"value");return null!=t?t:pe.trim(pe.text(e)).replace(jt," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,a=o?null:[],s=o?i+1:r.length,u=i<0?s:o?i:0;u-1)try{r.selected=n=!0}catch(s){r.scrollHeight}else r.selected=!1;return n||(e.selectedIndex=-1),i}}}}),pe.each(["radio","checkbox"],function(){pe.valHooks[this]={set:function(e,t){if(pe.isArray(t))return e.checked=pe.inArray(pe(e).val(),t)>-1}},fe.checkOn||(pe.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Lt,Ht,qt=pe.expr.attrHandle,_t=/^(?:checked|selected)$/i,Ft=fe.getSetAttribute,Mt=fe.input;pe.fn.extend({attr:function(e,t){return Pe(this,pe.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){pe.removeAttr(this,e)})}}),pe.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return"undefined"==typeof e.getAttribute?pe.prop(e,t,n):(1===o&&pe.isXMLDoc(e)||(t=t.toLowerCase(),i=pe.attrHooks[t]||(pe.expr.match.bool.test(t)?Ht:Lt)),void 0!==n?null===n?void pe.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:(r=pe.find.attr(e,t),null==r?void 0:r))},attrHooks:{type:{set:function(e,t){if(!fe.radioValue&&"radio"===t&&pe.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(De);if(o&&1===e.nodeType)for(;n=o[i++];)r=pe.propFix[n]||n,pe.expr.match.bool.test(n)?Mt&&Ft||!_t.test(n)?e[r]=!1:e[pe.camelCase("default-"+n)]=e[r]=!1:pe.attr(e,n,""),e.removeAttribute(Ft?n:r)}}),Ht={set:function(e,t,n){return t===!1?pe.removeAttr(e,n):Mt&&Ft||!_t.test(n)?e.setAttribute(!Ft&&pe.propFix[n]||n,n):e[pe.camelCase("default-"+n)]=e[n]=!0,n}},pe.each(pe.expr.match.bool.source.match(/\w+/g),function(e,t){var n=qt[t]||pe.find.attr;Mt&&Ft||!_t.test(t)?qt[t]=function(e,t,r){var i,o;return r||(o=qt[t],qt[t]=i,i=null!=n(e,t,r)?t.toLowerCase():null,qt[t]=o),i}:qt[t]=function(e,t,n){if(!n)return e[pe.camelCase("default-"+t)]?t.toLowerCase():null}}),Mt&&Ft||(pe.attrHooks.value={set:function(e,t,n){return pe.nodeName(e,"input")?void(e.defaultValue=t):Lt&&Lt.set(e,t,n)}}),Ft||(Lt={set:function(e,t,n){var r=e.getAttributeNode(n);if(r||e.setAttributeNode(r=e.ownerDocument.createAttribute(n)),r.value=t+="","value"===n||t===e.getAttribute(n))return t}},qt.id=qt.name=qt.coords=function(e,t,n){var r;if(!n)return(r=e.getAttributeNode(t))&&""!==r.value?r.value:null},pe.valHooks.button={get:function(e,t){var n=e.getAttributeNode(t);if(n&&n.specified)return n.value},set:Lt.set},pe.attrHooks.contenteditable={set:function(e,t,n){Lt.set(e,""!==t&&t,n)}},pe.each(["width","height"],function(e,t){pe.attrHooks[t]={set:function(e,n){if(""===n)return e.setAttribute(t,"auto"),n}}})),fe.style||(pe.attrHooks.style={get:function(e){return e.style.cssText||void 0},set:function(e,t){return e.style.cssText=t+""}});var Ot=/^(?:input|select|textarea|button|object)$/i,Rt=/^(?:a|area)$/i;pe.fn.extend({prop:function(e,t){return Pe(this,pe.prop,e,t,arguments.length>1)},removeProp:function(e){return e=pe.propFix[e]||e,this.each(function(){try{this[e]=void 0,delete this[e]}catch(t){}})}}),pe.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&pe.isXMLDoc(e)||(t=pe.propFix[t]||t,i=pe.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=pe.find.attr(e,"tabindex");return t?parseInt(t,10):Ot.test(e.nodeName)||Rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),fe.hrefNormalized||pe.each(["href","src"],function(e,t){pe.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),fe.optSelected||(pe.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),pe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){pe.propFix[this.toLowerCase()]=this}),fe.enctype||(pe.propFix.enctype="encoding");var Pt=/[\t\r\n\f]/g;pe.fn.extend({addClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).addClass(e.call(this,t,z(this)))});if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},removeClass:function(e){var t,n,r,i,o,a,s,u=0;if(pe.isFunction(e))return this.each(function(t){pe(this).removeClass(e.call(this,t,z(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(De)||[];n=this[u++];)if(i=z(n),r=1===n.nodeType&&(" "+i+" ").replace(Pt," ")){for(a=0;o=t[a++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");s=pe.trim(r),i!==s&&pe.attr(n,"class",s)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):pe.isFunction(e)?this.each(function(n){pe(this).toggleClass(e.call(this,n,z(this),t),t)}):this.each(function(){var t,r,i,o;if("string"===n)for(r=0,i=pe(this),o=e.match(De)||[];t=o[r++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else void 0!==e&&"boolean"!==n||(t=z(this),t&&pe._data(this,"__className__",t),pe.attr(this,"class",t||e===!1?"":pe._data(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&(" "+z(n)+" ").replace(Pt," ").indexOf(t)>-1)return!0;return!1}}),pe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){pe.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),pe.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}});var Bt=e.location,Wt=pe.now(),It=/\?/,$t=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;pe.parseJSON=function(t){if(e.JSON&&e.JSON.parse)return e.JSON.parse(t+"");var n,r=null,i=pe.trim(t+"");return i&&!pe.trim(i.replace($t,function(e,t,i,o){return n&&t&&(r=0),0===r?e:(n=i||t,r+=!o-!i,"")}))?Function("return "+i)():pe.error("Invalid JSON: "+t)},pe.parseXML=function(t){var n,r;if(!t||"string"!=typeof t)return null;try{e.DOMParser?(r=new e.DOMParser,n=r.parseFromString(t,"text/xml")):(n=new e.ActiveXObject("Microsoft.XMLDOM"),n.async="false",n.loadXML(t))}catch(i){n=void 0}return n&&n.documentElement&&!n.getElementsByTagName("parsererror").length||pe.error("Invalid XML: "+t),n};var zt=/#.*$/,Xt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Vt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Yt=/^(?:GET|HEAD)$/,Jt=/^\/\//,Gt=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Kt={},Qt={},Zt="*/".concat("*"),en=Bt.href,tn=Gt.exec(en.toLowerCase())||[];pe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:en,type:"GET",isLocal:Vt.test(tn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Zt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":pe.parseJSON,"text xml":pe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?V(V(e,pe.ajaxSettings),t):V(pe.ajaxSettings,e)},ajaxPrefilter:X(Kt),ajaxTransport:X(Qt),ajax:function(t,n){function r(t,n,r,i){var o,f,v,x,w,C=n;2!==b&&(b=2,u&&e.clearTimeout(u),c=void 0,s=i||"",T.readyState=t>0?4:0,o=t>=200&&t<300||304===t,r&&(x=Y(d,T,r)),x=J(d,x,T,o),o?(d.ifModified&&(w=T.getResponseHeader("Last-Modified"),w&&(pe.lastModified[a]=w),w=T.getResponseHeader("etag"),w&&(pe.etag[a]=w)),204===t||"HEAD"===d.type?C="nocontent":304===t?C="notmodified":(C=x.state,f=x.data,v=x.error,o=!v)):(v=C,!t&&C||(C="error",t<0&&(t=0))),T.status=t,T.statusText=(n||C)+"",o?g.resolveWith(p,[f,C,T]):g.rejectWith(p,[T,C,v]),T.statusCode(y),y=void 0,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[T,d,o?f:v]),m.fireWith(p,[T,C]),l&&(h.trigger("ajaxComplete",[T,d]),--pe.active||pe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var i,o,a,s,u,l,c,f,d=pe.ajaxSetup({},n),p=d.context||d,h=d.context&&(p.nodeType||p.jquery)?pe(p):pe.event,g=pe.Deferred(),m=pe.Callbacks("once memory"),y=d.statusCode||{},v={},x={},b=0,w="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===b){if(!f)for(f={};t=Ut.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===b?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return b||(e=x[n]=x[n]||e,v[e]=t),this},overrideMimeType:function(e){return b||(d.mimeType=e),this},statusCode:function(e){var t;if(e)if(b<2)for(t in e)y[t]=[y[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||w;return c&&c.abort(t),r(0,t),this}};if(g.promise(T).complete=m.add,T.success=T.done,T.error=T.fail,d.url=((t||d.url||en)+"").replace(zt,"").replace(Jt,tn[1]+"//"),d.type=n.method||n.type||d.method||d.type,d.dataTypes=pe.trim(d.dataType||"*").toLowerCase().match(De)||[""],null==d.crossDomain&&(i=Gt.exec(d.url.toLowerCase()),d.crossDomain=!(!i||i[1]===tn[1]&&i[2]===tn[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(tn[3]||("http:"===tn[1]?"80":"443")))),d.data&&d.processData&&"string"!=typeof d.data&&(d.data=pe.param(d.data,d.traditional)),U(Kt,d,n,T),2===b)return T;l=pe.event&&d.global,l&&0===pe.active++&&pe.event.trigger("ajaxStart"),d.type=d.type.toUpperCase(),d.hasContent=!Yt.test(d.type),a=d.url,d.hasContent||(d.data&&(a=d.url+=(It.test(a)?"&":"?")+d.data,delete d.data),d.cache===!1&&(d.url=Xt.test(a)?a.replace(Xt,"$1_="+Wt++):a+(It.test(a)?"&":"?")+"_="+Wt++)),d.ifModified&&(pe.lastModified[a]&&T.setRequestHeader("If-Modified-Since",pe.lastModified[a]),pe.etag[a]&&T.setRequestHeader("If-None-Match",pe.etag[a])),(d.data&&d.hasContent&&d.contentType!==!1||n.contentType)&&T.setRequestHeader("Content-Type",d.contentType),T.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+("*"!==d.dataTypes[0]?", "+Zt+"; q=0.01":""):d.accepts["*"]);for(o in d.headers)T.setRequestHeader(o,d.headers[o]);if(d.beforeSend&&(d.beforeSend.call(p,T,d)===!1||2===b))return T.abort();w="abort";for(o in{success:1,error:1,complete:1})T[o](d[o]);if(c=U(Qt,d,n,T)){if(T.readyState=1,l&&h.trigger("ajaxSend",[T,d]),2===b)return T;d.async&&d.timeout>0&&(u=e.setTimeout(function(){T.abort("timeout")},d.timeout));try{b=1,c.send(v,r)}catch(C){if(!(b<2))throw C;r(-1,C)}}else r(-1,"No Transport");return T},getJSON:function(e,t,n){return pe.get(e,t,n,"json")},getScript:function(e,t){return pe.get(e,void 0,t,"script")}}),pe.each(["get","post"],function(e,t){pe[t]=function(e,n,r,i){return pe.isFunction(n)&&(i=i||r,r=n,n=void 0),pe.ajax(pe.extend({url:e,type:t,dataType:i,data:n,success:r},pe.isPlainObject(e)&&e))}}),pe._evalUrl=function(e){return pe.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,"throws":!0})},pe.fn.extend({wrapAll:function(e){if(pe.isFunction(e))return this.each(function(t){pe(this).wrapAll(e.call(this,t))});if(this[0]){var t=pe(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return pe.isFunction(e)?this.each(function(t){pe(this).wrapInner(e.call(this,t))}):this.each(function(){var t=pe(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=pe.isFunction(e);return this.each(function(n){pe(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){pe.nodeName(this,"body")||pe(this).replaceWith(this.childNodes)}).end()}}),pe.expr.filters.hidden=function(e){return fe.reliableHiddenOffsets()?e.offsetWidth<=0&&e.offsetHeight<=0&&!e.getClientRects().length:K(e)},pe.expr.filters.visible=function(e){return!pe.expr.filters.hidden(e)};var nn=/%20/g,rn=/\[\]$/,on=/\r?\n/g,an=/^(?:submit|button|image|reset|file)$/i,sn=/^(?:input|select|textarea|keygen)/i;pe.param=function(e,t){var n,r=[],i=function(e,t){t=pe.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=pe.ajaxSettings&&pe.ajaxSettings.traditional),pe.isArray(e)||e.jquery&&!pe.isPlainObject(e))pe.each(e,function(){i(this.name,this.value)});else for(n in e)Q(n,e[n],t,i);return r.join("&").replace(nn,"+")},pe.fn.extend({serialize:function(){return pe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=pe.prop(this,"elements");return e?pe.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!pe(this).is(":disabled")&&sn.test(this.nodeName)&&!an.test(e)&&(this.checked||!Be.test(e))}).map(function(e,t){var n=pe(this).val();return null==n?null:pe.isArray(n)?pe.map(n,function(e){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),pe.ajaxSettings.xhr=void 0!==e.ActiveXObject?function(){return this.isLocal?ee():re.documentMode>8?Z():/^(get|post|head|put|delete|options)$/i.test(this.type)&&Z()||ee()}:Z;var un=0,ln={},cn=pe.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ln)ln[e](void 0,!0)}),fe.cors=!!cn&&"withCredentials"in cn,cn=fe.ajax=!!cn,cn&&pe.ajaxTransport(function(t){if(!t.crossDomain||fe.cors){var n;return{send:function(r,i){var o,a=t.xhr(),s=++un;if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)void 0!==r[o]&&a.setRequestHeader(o,r[o]+"");a.send(t.hasContent&&t.data||null),n=function(e,r){var o,u,l;if(n&&(r||4===a.readyState))if(delete ln[s],n=void 0,a.onreadystatechange=pe.noop,r)4!==a.readyState&&a.abort();else{l={},o=a.status,"string"==typeof a.responseText&&(l.text=a.responseText);try{u=a.statusText}catch(c){u=""}o||!t.isLocal||t.crossDomain?1223===o&&(o=204):o=l.text?200:404}l&&i(o,u,l,a.getAllResponseHeaders())},t.async?4===a.readyState?e.setTimeout(n):a.onreadystatechange=ln[s]=n:n()},abort:function(){n&&n(void 0,!0)}}}}),pe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return pe.globalEval(e),e}}}),pe.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),pe.ajaxTransport("script",function(e){if(e.crossDomain){var t,n=re.head||pe("head")[0]||re.documentElement;return{send:function(r,i){t=re.createElement("script"),t.async=!0,e.scriptCharset&&(t.charset=e.scriptCharset),t.src=e.url,t.onload=t.onreadystatechange=function(e,n){(n||!t.readyState||/loaded|complete/.test(t.readyState))&&(t.onload=t.onreadystatechange=null,t.parentNode&&t.parentNode.removeChild(t),t=null,n||i(200,"success"))},n.insertBefore(t,n.firstChild)},abort:function(){t&&t.onload(void 0,!0)}}}});var fn=[],dn=/(=)\?(?=&|$)|\?\?/;pe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=fn.pop()||pe.expando+"_"+Wt++;return this[e]=!0,e}}),pe.ajaxPrefilter("json jsonp",function(t,n,r){var i,o,a,s=t.jsonp!==!1&&(dn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&dn.test(t.data)&&"data");if(s||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=pe.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,s?t[s]=t[s].replace(dn,"$1"+i):t.jsonp!==!1&&(t.url+=(It.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return a||pe.error(i+" was not called"),a[0]},t.dataTypes[0]="json",o=e[i],e[i]=function(){a=arguments},r.always(function(){void 0===o?pe(e).removeProp(i):e[i]=o,t[i]&&(t.jsonpCallback=n.jsonpCallback,fn.push(i)),a&&pe.isFunction(o)&&o(a[0]),a=o=void 0}),"script"}),pe.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||re;var r=Te.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=y([e],t,i),i&&i.length&&pe(i).remove(),pe.merge([],r.childNodes))};var pn=pe.fn.load;return pe.fn.load=function(e,t,n){if("string"!=typeof e&&pn)return pn.apply(this,arguments);var r,i,o,a=this,s=e.indexOf(" ");return s>-1&&(r=pe.trim(e.slice(s,e.length)),e=e.slice(0,s)),pe.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),a.length>0&&pe.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,a.html(r?pe("
                  ").append(pe.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},pe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){pe.fn[t]=function(e){return this.on(t,e)}}),pe.expr.filters.animated=function(e){return pe.grep(pe.timers,function(t){return e===t.elem}).length},pe.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l,c=pe.css(e,"position"),f=pe(e),d={};"static"===c&&(e.style.position="relative"),s=f.offset(),o=pe.css(e,"top"),u=pe.css(e,"left"),l=("absolute"===c||"fixed"===c)&&pe.inArray("auto",[o,u])>-1,l?(r=f.position(),a=r.top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),pe.isFunction(t)&&(t=t.call(e,n,pe.extend({},s))),null!=t.top&&(d.top=t.top-s.top+a),null!=t.left&&(d.left=t.left-s.left+i),"using"in t?t.using.call(e,d):f.css(d)}},pe.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){pe.offset.setOffset(this,e,t)});var t,n,r={top:0,left:0},i=this[0],o=i&&i.ownerDocument;if(o)return t=o.documentElement,pe.contains(t,i)?("undefined"!=typeof i.getBoundingClientRect&&(r=i.getBoundingClientRect()),n=te(o),{top:r.top+(n.pageYOffset||t.scrollTop)-(t.clientTop||0),left:r.left+(n.pageXOffset||t.scrollLeft)-(t.clientLeft||0)}):r},position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===pe.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),pe.nodeName(e[0],"html")||(n=e.offset()),n.top+=pe.css(e[0],"borderTopWidth",!0),n.left+=pe.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-pe.css(r,"marginTop",!0),left:t.left-n.left-pe.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){ +for(var e=this.offsetParent;e&&!pe.nodeName(e,"html")&&"static"===pe.css(e,"position");)e=e.offsetParent;return e||pt})}}),pe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n=/Y/.test(t);pe.fn[e]=function(r){return Pe(this,function(e,r,i){var o=te(e);return void 0===i?o?t in o?o[t]:o.document.documentElement[r]:e[r]:void(o?o.scrollTo(n?pe(o).scrollLeft():i,n?i:pe(o).scrollTop()):e[r]=i)},e,r,arguments.length,null)}}),pe.each(["top","left"],function(e,t){pe.cssHooks[t]=L(fe.pixelPosition,function(e,n){if(n)return n=gt(e,t),ft.test(n)?pe(e).position()[t]+"px":n})}),pe.each({Height:"height",Width:"width"},function(e,t){pe.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,r){pe.fn[r]=function(r,i){var o=arguments.length&&(n||"boolean"!=typeof r),a=n||(r===!0||i===!0?"margin":"border");return Pe(this,function(t,n,r){var i;return pe.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(i=t.documentElement,Math.max(t.body["scroll"+e],i["scroll"+e],t.body["offset"+e],i["offset"+e],i["client"+e])):void 0===r?pe.css(t,n,a):pe.style(t,n,r,a)},t,o?r:void 0,o,null)}})}),pe.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}}),pe.fn.size=function(){return this.length},pe.fn.andSelf=pe.fn.addBack,layui.define(function(e){layui.$=pe,e("jquery",pe)}),pe});!function(e,t){"use strict";var i,n,a=e.layui&&layui.define,o={getPath:function(){var e=document.currentScript?document.currentScript.src:function(){for(var e,t=document.scripts,i=t.length-1,n=i;n>0;n--)if("interactive"===t[n].readyState){e=t[n].src;break}return e||t[i].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),config:{},end:{},minIndex:0,minLeft:[],btn:["确定","取消"],type:["dialog","page","iframe","loading","tips"],getStyle:function(t,i){var n=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return n[n.getPropertyValue?"getPropertyValue":"getAttribute"](i)},link:function(t,i,n){if(r.path){var a=document.getElementsByTagName("head")[0],s=document.createElement("link");"string"==typeof i&&(n=i);var l=(n||t).replace(/\.|\//g,""),f="layuicss-"+l,c=0;s.rel="stylesheet",s.href=r.path+t,s.id=f,document.getElementById(f)||a.appendChild(s),"function"==typeof i&&!function u(){return++c>80?e.console&&console.error("layer.css: Invalid"):void(1989===parseInt(o.getStyle(document.getElementById(f),"width"))?i():setTimeout(u,100))}()}}},r={v:"3.1.1",ie:function(){var t=navigator.userAgent.toLowerCase();return!!(e.ActiveXObject||"ActiveXObject"in e)&&((t.match(/msie\s(\d+)/)||[])[1]||"11")}(),index:e.layer&&e.layer.v?1e5:0,path:o.getPath,config:function(e,t){return e=e||{},r.cache=o.config=i.extend({},o.config,e),r.path=o.config.path||r.path,"string"==typeof e.extend&&(e.extend=[e.extend]),o.config.path&&r.ready(),e.extend?(a?layui.addcss("modules/layer/"+e.extend):o.link("theme/"+e.extend),this):this},ready:function(e){var t="layer",i="",n=(a?"modules/layer/":"theme/")+"default/layer.css?v="+r.v+i;return a?layui.addcss(n,e,t):o.link(n,e,t),this},alert:function(e,t,n){var a="function"==typeof t;return a&&(n=t),r.open(i.extend({content:e,yes:n},a?{}:t))},confirm:function(e,t,n,a){var s="function"==typeof t;return s&&(a=n,n=t),r.open(i.extend({content:e,btn:o.btn,yes:n,btn2:a},s?{}:t))},msg:function(e,n,a){var s="function"==typeof n,f=o.config.skin,c=(f?f+" "+f+"-msg":"")||"layui-layer-msg",u=l.anim.length-1;return s&&(a=n),r.open(i.extend({content:e,time:3e3,shade:!1,skin:c,title:!1,closeBtn:!1,btn:!1,resize:!1,end:a},s&&!o.config.skin?{skin:c+" layui-layer-hui",anim:u}:function(){return n=n||{},(n.icon===-1||n.icon===t&&!o.config.skin)&&(n.skin=c+" "+(n.skin||"layui-layer-hui")),n}()))},load:function(e,t){return r.open(i.extend({type:3,icon:e||0,resize:!1,shade:.01},t))},tips:function(e,t,n){return r.open(i.extend({type:4,content:[e,t],closeBtn:!1,time:3e3,shade:!1,resize:!1,fixed:!1,maxWidth:210},n))}},s=function(e){var t=this;t.index=++r.index,t.config=i.extend({},t.config,o.config,e),document.body?t.creat():setTimeout(function(){t.creat()},30)};s.pt=s.prototype;var l=["layui-layer",".layui-layer-title",".layui-layer-main",".layui-layer-dialog","layui-layer-iframe","layui-layer-content","layui-layer-btn","layui-layer-close"];l.anim=["layer-anim-00","layer-anim-01","layer-anim-02","layer-anim-03","layer-anim-04","layer-anim-05","layer-anim-06"],s.pt.config={type:0,shade:.3,fixed:!0,move:l[1],title:"信息",offset:"auto",area:"auto",closeBtn:1,time:0,zIndex:19891014,maxWidth:360,anim:0,isOutAnim:!0,icon:-1,moveType:1,resize:!0,scrollbar:!0,tips:2},s.pt.vessel=function(e,t){var n=this,a=n.index,r=n.config,s=r.zIndex+a,f="object"==typeof r.title,c=r.maxmin&&(1===r.type||2===r.type),u=r.title?'
                  '+(f?r.title[0]:r.title)+"
                  ":"";return r.zIndex=s,t([r.shade?'
                  ':"",'
                  '+(e&&2!=r.type?"":u)+'
                  '+(0==r.type&&r.icon!==-1?'':"")+(1==r.type&&e?"":r.content||"")+'
                  '+function(){var e=c?'':"";return r.closeBtn&&(e+=''),e}()+""+(r.btn?function(){var e="";"string"==typeof r.btn&&(r.btn=[r.btn]);for(var t=0,i=r.btn.length;t'+r.btn[t]+"";return'
                  '+e+"
                  "}():"")+(r.resize?'':"")+"
                  "],u,i('
                  ')),n},s.pt.creat=function(){var e=this,t=e.config,a=e.index,s=t.content,f="object"==typeof s,c=i("body");if(!t.id||!i("#"+t.id)[0]){switch("string"==typeof t.area&&(t.area="auto"===t.area?["",""]:[t.area,""]),t.shift&&(t.anim=t.shift),6==r.ie&&(t.fixed=!1),t.type){case 0:t.btn="btn"in t?t.btn:o.btn[0],r.closeAll("dialog");break;case 2:var s=t.content=f?t.content:[t.content||"","auto"];t.content='';break;case 3:delete t.title,delete t.closeBtn,t.icon===-1&&0===t.icon,r.closeAll("loading");break;case 4:f||(t.content=[t.content,"body"]),t.follow=t.content[1],t.content=t.content[0]+'',delete t.title,t.tips="object"==typeof t.tips?t.tips:[t.tips,!0],t.tipsMore||r.closeAll("tips")}if(e.vessel(f,function(n,r,u){c.append(n[0]),f?function(){2==t.type||4==t.type?function(){i("body").append(n[1])}():function(){s.parents("."+l[0])[0]||(s.data("display",s.css("display")).show().addClass("layui-layer-wrap").wrap(n[1]),i("#"+l[0]+a).find("."+l[5]).before(r))}()}():c.append(n[1]),i(".layui-layer-move")[0]||c.append(o.moveElem=u),e.layero=i("#"+l[0]+a),t.scrollbar||l.html.css("overflow","hidden").attr("layer-full",a)}).auto(a),i("#layui-layer-shade"+e.index).css({"background-color":t.shade[1]||"#000",opacity:t.shade[0]||t.shade}),2==t.type&&6==r.ie&&e.layero.find("iframe").attr("src",s[0]),4==t.type?e.tips():e.offset(),t.fixed&&n.on("resize",function(){e.offset(),(/^\d+%$/.test(t.area[0])||/^\d+%$/.test(t.area[1]))&&e.auto(a),4==t.type&&e.tips()}),t.time<=0||setTimeout(function(){r.close(e.index)},t.time),e.move().callback(),l.anim[t.anim]){var u="layer-anim "+l.anim[t.anim];e.layero.addClass(u).one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){i(this).removeClass(u)})}t.isOutAnim&&e.layero.data("isOutAnim",!0)}},s.pt.auto=function(e){var t=this,a=t.config,o=i("#"+l[0]+e);""===a.area[0]&&a.maxWidth>0&&(r.ie&&r.ie<8&&a.btn&&o.width(o.innerWidth()),o.outerWidth()>a.maxWidth&&o.width(a.maxWidth));var s=[o.innerWidth(),o.innerHeight()],f=o.find(l[1]).outerHeight()||0,c=o.find("."+l[6]).outerHeight()||0,u=function(e){e=o.find(e),e.height(s[1]-f-c-2*(0|parseFloat(e.css("padding-top"))))};switch(a.type){case 2:u("iframe");break;default:""===a.area[1]?a.maxHeight>0&&o.outerHeight()>a.maxHeight?(s[1]=a.maxHeight,u("."+l[5])):a.fixed&&s[1]>=n.height()&&(s[1]=n.height(),u("."+l[5])):u("."+l[5])}return t},s.pt.offset=function(){var e=this,t=e.config,i=e.layero,a=[i.outerWidth(),i.outerHeight()],o="object"==typeof t.offset;e.offsetTop=(n.height()-a[1])/2,e.offsetLeft=(n.width()-a[0])/2,o?(e.offsetTop=t.offset[0],e.offsetLeft=t.offset[1]||e.offsetLeft):"auto"!==t.offset&&("t"===t.offset?e.offsetTop=0:"r"===t.offset?e.offsetLeft=n.width()-a[0]:"b"===t.offset?e.offsetTop=n.height()-a[1]:"l"===t.offset?e.offsetLeft=0:"lt"===t.offset?(e.offsetTop=0,e.offsetLeft=0):"lb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=0):"rt"===t.offset?(e.offsetTop=0,e.offsetLeft=n.width()-a[0]):"rb"===t.offset?(e.offsetTop=n.height()-a[1],e.offsetLeft=n.width()-a[0]):e.offsetTop=t.offset),t.fixed||(e.offsetTop=/%$/.test(e.offsetTop)?n.height()*parseFloat(e.offsetTop)/100:parseFloat(e.offsetTop),e.offsetLeft=/%$/.test(e.offsetLeft)?n.width()*parseFloat(e.offsetLeft)/100:parseFloat(e.offsetLeft),e.offsetTop+=n.scrollTop(),e.offsetLeft+=n.scrollLeft()),i.attr("minLeft")&&(e.offsetTop=n.height()-(i.find(l[1]).outerHeight()||0),e.offsetLeft=i.css("left")),i.css({top:e.offsetTop,left:e.offsetLeft})},s.pt.tips=function(){var e=this,t=e.config,a=e.layero,o=[a.outerWidth(),a.outerHeight()],r=i(t.follow);r[0]||(r=i("body"));var s={width:r.outerWidth(),height:r.outerHeight(),top:r.offset().top,left:r.offset().left},f=a.find(".layui-layer-TipsG"),c=t.tips[0];t.tips[1]||f.remove(),s.autoLeft=function(){s.left+o[0]-n.width()>0?(s.tipLeft=s.left+s.width-o[0],f.css({right:12,left:"auto"})):s.tipLeft=s.left},s.where=[function(){s.autoLeft(),s.tipTop=s.top-o[1]-10,f.removeClass("layui-layer-TipsB").addClass("layui-layer-TipsT").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left+s.width+10,s.tipTop=s.top,f.removeClass("layui-layer-TipsL").addClass("layui-layer-TipsR").css("border-bottom-color",t.tips[1])},function(){s.autoLeft(),s.tipTop=s.top+s.height+10,f.removeClass("layui-layer-TipsT").addClass("layui-layer-TipsB").css("border-right-color",t.tips[1])},function(){s.tipLeft=s.left-o[0]-10,s.tipTop=s.top,f.removeClass("layui-layer-TipsR").addClass("layui-layer-TipsL").css("border-bottom-color",t.tips[1])}],s.where[c-1](),1===c?s.top-(n.scrollTop()+o[1]+16)<0&&s.where[2]():2===c?n.width()-(s.left+s.width+o[0]+16)>0||s.where[3]():3===c?s.top-n.scrollTop()+s.height+o[1]+16-n.height()>0&&s.where[0]():4===c&&o[0]+16-s.left>0&&s.where[1](),a.find("."+l[5]).css({"background-color":t.tips[1],"padding-right":t.closeBtn?"30px":""}),a.css({left:s.tipLeft-(t.fixed?n.scrollLeft():0),top:s.tipTop-(t.fixed?n.scrollTop():0)})},s.pt.move=function(){var e=this,t=e.config,a=i(document),s=e.layero,l=s.find(t.move),f=s.find(".layui-layer-resize"),c={};return t.move&&l.css("cursor","move"),l.on("mousedown",function(e){e.preventDefault(),t.move&&(c.moveStart=!0,c.offset=[e.clientX-parseFloat(s.css("left")),e.clientY-parseFloat(s.css("top"))],o.moveElem.css("cursor","move").show())}),f.on("mousedown",function(e){e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],c.area=[s.outerWidth(),s.outerHeight()],o.moveElem.css("cursor","se-resize").show()}),a.on("mousemove",function(i){if(c.moveStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1],l="fixed"===s.css("position");if(i.preventDefault(),c.stX=l?0:n.scrollLeft(),c.stY=l?0:n.scrollTop(),!t.moveOut){var f=n.width()-s.outerWidth()+c.stX,u=n.height()-s.outerHeight()+c.stY;af&&(a=f),ou&&(o=u)}s.css({left:a,top:o})}if(t.resize&&c.resizeStart){var a=i.clientX-c.offset[0],o=i.clientY-c.offset[1];i.preventDefault(),r.style(e.index,{width:c.area[0]+a,height:c.area[1]+o}),c.isResize=!0,t.resizing&&t.resizing(s)}}).on("mouseup",function(e){c.moveStart&&(delete c.moveStart,o.moveElem.hide(),t.moveEnd&&t.moveEnd(s)),c.resizeStart&&(delete c.resizeStart,o.moveElem.hide())}),e},s.pt.callback=function(){function e(){var e=a.cancel&&a.cancel(t.index,n);e===!1||r.close(t.index)}var t=this,n=t.layero,a=t.config;t.openLayer(),a.success&&(2==a.type?n.find("iframe").on("load",function(){a.success(n,t.index)}):a.success(n,t.index)),6==r.ie&&t.IE6(n),n.find("."+l[6]).children("a").on("click",function(){var e=i(this).index();if(0===e)a.yes?a.yes(t.index,n):a.btn1?a.btn1(t.index,n):r.close(t.index);else{var o=a["btn"+(e+1)]&&a["btn"+(e+1)](t.index,n);o===!1||r.close(t.index)}}),n.find("."+l[7]).on("click",e),a.shadeClose&&i("#layui-layer-shade"+t.index).on("click",function(){r.close(t.index)}),n.find(".layui-layer-min").on("click",function(){var e=a.min&&a.min(n);e===!1||r.min(t.index,a)}),n.find(".layui-layer-max").on("click",function(){i(this).hasClass("layui-layer-maxmin")?(r.restore(t.index),a.restore&&a.restore(n)):(r.full(t.index,a),setTimeout(function(){a.full&&a.full(n)},100))}),a.end&&(o.end[t.index]=a.end)},o.reselect=function(){i.each(i("select"),function(e,t){var n=i(this);n.parents("."+l[0])[0]||1==n.attr("layer")&&i("."+l[0]).length<1&&n.removeAttr("layer").show(),n=null})},s.pt.IE6=function(e){i("select").each(function(e,t){var n=i(this);n.parents("."+l[0])[0]||"none"===n.css("display")||n.attr({layer:"1"}).hide(),n=null})},s.pt.openLayer=function(){var e=this;r.zIndex=e.config.zIndex,r.setTop=function(e){var t=function(){r.zIndex++,e.css("z-index",r.zIndex+1)};return r.zIndex=parseInt(e[0].style.zIndex),e.on("mousedown",t),r.zIndex}},o.record=function(e){var t=[e.width(),e.height(),e.position().top,e.position().left+parseFloat(e.css("margin-left"))];e.find(".layui-layer-max").addClass("layui-layer-maxmin"),e.attr({area:t})},o.rescollbar=function(e){l.html.attr("layer-full")==e&&(l.html[0].style.removeProperty?l.html[0].style.removeProperty("overflow"):l.html[0].style.removeAttribute("overflow"),l.html.removeAttr("layer-full"))},e.layer=r,r.getChildFrame=function(e,t){return t=t||i("."+l[4]).attr("times"),i("#"+l[0]+t).find("iframe").contents().find(e)},r.getFrameIndex=function(e){return i("#"+e).parents("."+l[4]).attr("times")},r.iframeAuto=function(e){if(e){var t=r.getChildFrame("html",e).outerHeight(),n=i("#"+l[0]+e),a=n.find(l[1]).outerHeight()||0,o=n.find("."+l[6]).outerHeight()||0;n.css({height:t+a+o}),n.find("iframe").css({height:t})}},r.iframeSrc=function(e,t){i("#"+l[0]+e).find("iframe").attr("src",t)},r.style=function(e,t,n){var a=i("#"+l[0]+e),r=a.find(".layui-layer-content"),s=a.attr("type"),f=a.find(l[1]).outerHeight()||0,c=a.find("."+l[6]).outerHeight()||0;a.attr("minLeft");s!==o.type[3]&&s!==o.type[4]&&(n||(parseFloat(t.width)<=260&&(t.width=260),parseFloat(t.height)-f-c<=64&&(t.height=64+f+c)),a.css(t),c=a.find("."+l[6]).outerHeight(),s===o.type[2]?a.find("iframe").css({height:parseFloat(t.height)-f-c}):r.css({height:parseFloat(t.height)-f-c-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom"))}))},r.min=function(e,t){var a=i("#"+l[0]+e),s=a.find(l[1]).outerHeight()||0,f=a.attr("minLeft")||181*o.minIndex+"px",c=a.css("position");o.record(a),o.minLeft[0]&&(f=o.minLeft[0],o.minLeft.shift()),a.attr("position",c),r.style(e,{width:180,height:s,left:f,top:n.height()-s,position:"fixed",overflow:"hidden"},!0),a.find(".layui-layer-min").hide(),"page"===a.attr("type")&&a.find(l[4]).hide(),o.rescollbar(e),a.attr("minLeft")||o.minIndex++,a.attr("minLeft",f)},r.restore=function(e){var t=i("#"+l[0]+e),n=t.attr("area").split(",");t.attr("type");r.style(e,{width:parseFloat(n[0]),height:parseFloat(n[1]),top:parseFloat(n[2]),left:parseFloat(n[3]),position:t.attr("position"),overflow:"visible"},!0),t.find(".layui-layer-max").removeClass("layui-layer-maxmin"),t.find(".layui-layer-min").show(),"page"===t.attr("type")&&t.find(l[4]).show(),o.rescollbar(e)},r.full=function(e){var t,a=i("#"+l[0]+e);o.record(a),l.html.attr("layer-full")||l.html.css("overflow","hidden").attr("layer-full",e),clearTimeout(t),t=setTimeout(function(){var t="fixed"===a.css("position");r.style(e,{top:t?0:n.scrollTop(),left:t?0:n.scrollLeft(),width:n.width(),height:n.height()},!0),a.find(".layui-layer-min").hide()},100)},r.title=function(e,t){var n=i("#"+l[0]+(t||r.index)).find(l[1]);n.html(e)},r.close=function(e){var t=i("#"+l[0]+e),n=t.attr("type"),a="layer-anim-close";if(t[0]){var s="layui-layer-wrap",f=function(){if(n===o.type[1]&&"object"===t.attr("conType")){t.children(":not(."+l[5]+")").remove();for(var a=t.find("."+s),r=0;r<2;r++)a.unwrap();a.css("display",a.data("display")).removeClass(s)}else{if(n===o.type[2])try{var f=i("#"+l[4]+e)[0];f.contentWindow.document.write(""),f.contentWindow.close(),t.find("."+l[5])[0].removeChild(f)}catch(c){}t[0].innerHTML="",t.remove()}"function"==typeof o.end[e]&&o.end[e](),delete o.end[e]};t.data("isOutAnim")&&t.addClass("layer-anim "+a),i("#layui-layer-moves, #layui-layer-shade"+e).remove(),6==r.ie&&o.reselect(),o.rescollbar(e),t.attr("minLeft")&&(o.minIndex--,o.minLeft.push(t.attr("minLeft"))),r.ie&&r.ie<10||!t.data("isOutAnim")?f():setTimeout(function(){f()},200)}},r.closeAll=function(e){i.each(i("."+l[0]),function(){var t=i(this),n=e?t.attr("type")===e:1;n&&r.close(t.attr("times")),n=null})};var f=r.cache||{},c=function(e){return f.skin?" "+f.skin+" "+f.skin+"-"+e:""};r.prompt=function(e,t){var a="";if(e=e||{},"function"==typeof e&&(t=e),e.area){var o=e.area;a='style="width: '+o[0]+"; height: "+o[1]+';"',delete e.area}var s,l=2==e.formType?'":function(){return''}(),f=e.success;return delete e.success,r.open(i.extend({type:1,btn:["确定","取消"],content:l,skin:"layui-layer-prompt"+c("prompt"),maxWidth:n.width(),success:function(t){s=t.find(".layui-layer-input"),s.val(e.value||"").focus(),"function"==typeof f&&f(t)},resize:!1,yes:function(i){var n=s.val();""===n?s.focus():n.length>(e.maxlength||500)?r.tips("最多输入"+(e.maxlength||500)+"个字数",s,{tips:1}):t&&t(n,i,s)}},e))},r.tab=function(e){e=e||{};var t=e.tab||{},n="layui-this",a=e.success;return delete e.success,r.open(i.extend({type:1,skin:"layui-layer-tab"+c("tab"),resize:!1,title:function(){var e=t.length,i=1,a="";if(e>0)for(a=''+t[0].title+"";i"+t[i].title+"";return a}(),content:'
                    '+function(){var e=t.length,i=1,a="";if(e>0)for(a='
                  • '+(t[0].content||"no content")+"
                  • ";i'+(t[i].content||"no content")+"";return a}()+"
                  ",success:function(t){var o=t.find(".layui-layer-title").children(),r=t.find(".layui-layer-tabmain").children();o.on("mousedown",function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0;var a=i(this),o=a.index();a.addClass(n).siblings().removeClass(n),r.eq(o).show().siblings().hide(),"function"==typeof e.change&&e.change(o)}),"function"==typeof a&&a(t)}},e))},r.photos=function(t,n,a){function o(e,t,i){var n=new Image;return n.src=e,n.complete?t(n):(n.onload=function(){n.onload=null,t(n)},void(n.onerror=function(e){n.onerror=null,i(e)}))}var s={};if(t=t||{},t.photos){var l=t.photos.constructor===Object,f=l?t.photos:{},u=f.data||[],d=f.start||0;s.imgIndex=(0|d)+1,t.img=t.img||"img";var y=t.success;if(delete t.success,l){if(0===u.length)return r.msg("没有图片")}else{var p=i(t.photos),h=function(){u=[],p.find(t.img).each(function(e){var t=i(this);t.attr("layer-index",e),u.push({alt:t.attr("alt"),pid:t.attr("layer-pid"),src:t.attr("layer-src")||t.attr("src"),thumb:t.attr("src")})})};if(h(),0===u.length)return;if(n||p.on("click",t.img,function(){var e=i(this),n=e.attr("layer-index");r.photos(i.extend(t,{photos:{start:n,data:u,tab:t.tab},full:t.full}),!0),h()}),!n)return}s.imgprev=function(e){s.imgIndex--,s.imgIndex<1&&(s.imgIndex=u.length),s.tabimg(e)},s.imgnext=function(e,t){s.imgIndex++,s.imgIndex>u.length&&(s.imgIndex=1,t)||s.tabimg(e)},s.keyup=function(e){if(!s.end){var t=e.keyCode;e.preventDefault(),37===t?s.imgprev(!0):39===t?s.imgnext(!0):27===t&&r.close(s.index)}},s.tabimg=function(e){if(!(u.length<=1))return f.start=s.imgIndex-1,r.close(s.index),r.photos(t,!0,e)},s.event=function(){s.bigimg.hover(function(){s.imgsee.show()},function(){s.imgsee.hide()}),s.bigimg.find(".layui-layer-imgprev").on("click",function(e){e.preventDefault(),s.imgprev()}),s.bigimg.find(".layui-layer-imgnext").on("click",function(e){e.preventDefault(),s.imgnext()}),i(document).on("keyup",s.keyup)},s.loadi=r.load(1,{shade:!("shade"in t)&&.9,scrollbar:!1}),o(u[d].src,function(n){r.close(s.loadi),s.index=r.open(i.extend({type:1,id:"layui-layer-photos",area:function(){var a=[n.width,n.height],o=[i(e).width()-100,i(e).height()-100];if(!t.full&&(a[0]>o[0]||a[1]>o[1])){var r=[a[0]/o[0],a[1]/o[1]];r[0]>r[1]?(a[0]=a[0]/r[0],a[1]=a[1]/r[0]):r[0]'+(u[d].alt||
                  '+(u.length>1?'':"")+'
                  '+(u[d].alt||"")+""+s.imgIndex+"/"+u.length+"
                  ",success:function(e,i){s.bigimg=e.find(".layui-layer-phimg"),s.imgsee=e.find(".layui-layer-imguide,.layui-layer-imgbar"),s.event(e),t.tab&&t.tab(u[d],e),"function"==typeof y&&y(e)},end:function(){s.end=!0,i(document).off("keyup",s.keyup)}},t))},function(){r.close(s.loadi),r.msg("当前图片地址异常
                  是否继续查看下一张?",{time:3e4,btn:["下一张","不看了"],yes:function(){u.length>1&&s.imgnext(!0,!0)}})})}},o.run=function(t){i=t,n=i(e),l.html=i("html"),r.open=function(e){var t=new s(e);return t.index}},e.layui&&layui.define?(r.ready(),layui.define("jquery",function(t){r.path=layui.cache.dir,o.run(layui.$),e.layer=r,t("layer",r)})):"function"==typeof define&&define.amd?define(["jquery"],function(){return o.run(e.jQuery),r}):function(){o.run(e.jQuery),r.ready()}()}(window);layui.define("jquery",function(t){"use strict";var a=layui.$,i=(layui.hint(),layui.device()),e="element",l="layui-this",n="layui-show",s=function(){this.config={}};s.prototype.set=function(t){var i=this;return a.extend(!0,i.config,t),i},s.prototype.on=function(t,a){return layui.onevent.call(this,e,t,a)},s.prototype.tabAdd=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.children(".layui-tab-bar"),o=l.children(".layui-tab-content"),r='
                • "+(i.title||"unnaming")+"
                • ";return s[0]?s.before(r):n.append(r),o.append('
                  '+(i.content||"")+"
                  "),f.hideTabMore(!0),f.tabAuto(),this},s.prototype.tabDelete=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabDelete(null,s),this},s.prototype.tabChange=function(t,i){var e=".layui-tab-title",l=a(".layui-tab[lay-filter="+t+"]"),n=l.children(e),s=n.find('>li[lay-id="'+i+'"]');return f.tabClick.call(s[0],null,null,s),this},s.prototype.tab=function(t){t=t||{},b.on("click",t.headerElem,function(i){var e=a(this).index();f.tabClick.call(this,i,e,null,t)})},s.prototype.progress=function(t,i){var e="layui-progress",l=a("."+e+"[lay-filter="+t+"]"),n=l.find("."+e+"-bar"),s=n.find("."+e+"-text");return n.css("width",i),s.text(i),this};var o=".layui-nav",r="layui-nav-item",c="layui-nav-bar",u="layui-nav-tree",d="layui-nav-child",y="layui-nav-more",h="layui-anim layui-anim-upbit",f={tabClick:function(t,i,s,o){o=o||{};var r=s||a(this),i=i||r.parent().children("li").index(r),c=o.headerElem?r.parent():r.parents(".layui-tab").eq(0),u=o.bodyElem?a(o.bodyElem):c.children(".layui-tab-content").children(".layui-tab-item"),d=r.find("a"),y=c.attr("lay-filter");"javascript:;"!==d.attr("href")&&"_blank"===d.attr("target")||(r.addClass(l).siblings().removeClass(l),u.eq(i).addClass(n).siblings().removeClass(n)),layui.event.call(this,e,"tab("+y+")",{elem:c,index:i})},tabDelete:function(t,i){var n=i||a(this).parent(),s=n.index(),o=n.parents(".layui-tab").eq(0),r=o.children(".layui-tab-content").children(".layui-tab-item"),c=o.attr("lay-filter");n.hasClass(l)&&(n.next()[0]?f.tabClick.call(n.next()[0],null,s+1):n.prev()[0]&&f.tabClick.call(n.prev()[0],null,s-1)),n.remove(),r.eq(s).remove(),setTimeout(function(){f.tabAuto()},50),layui.event.call(this,e,"tabDelete("+c+")",{elem:o,index:s})},tabAuto:function(){var t="layui-tab-more",e="layui-tab-bar",l="layui-tab-close",n=this;a(".layui-tab").each(function(){var s=a(this),o=s.children(".layui-tab-title"),r=(s.children(".layui-tab-content").children(".layui-tab-item"),'lay-stope="tabmore"'),c=a('');if(n===window&&8!=i.ie&&f.hideTabMore(!0),s.attr("lay-allowClose")&&o.find("li").each(function(){var t=a(this);if(!t.find("."+l)[0]){var i=a('ဆ');i.on("click",f.tabDelete),t.append(i)}}),"string"!=typeof s.attr("lay-unauto"))if(o.prop("scrollWidth")>o.outerWidth()+1){if(o.find("."+e)[0])return;o.append(c),s.attr("overflow",""),c.on("click",function(a){o[this.title?"removeClass":"addClass"](t),this.title=this.title?"":"收缩"})}else o.find("."+e).remove(),s.removeAttr("overflow")})},hideTabMore:function(t){var i=a(".layui-tab-title");t!==!0&&"tabmore"===a(t.target).attr("lay-stope")||(i.removeClass("layui-tab-more"),i.find(".layui-tab-bar").attr("title",""))},clickThis:function(){var t=a(this),i=t.parents(o),n=i.attr("lay-filter"),s=t.parent(),c=t.siblings("."+d),y="string"==typeof s.attr("lay-unselect");"javascript:;"!==t.attr("href")&&"_blank"===t.attr("target")||y||c[0]||(i.find("."+l).removeClass(l),s.addClass(l)),i.hasClass(u)&&(c.removeClass(h),c[0]&&(s["none"===c.css("display")?"addClass":"removeClass"](r+"ed"),"all"===i.attr("lay-shrink")&&s.siblings().removeClass(r+"ed"))),layui.event.call(this,e,"nav("+n+")",t)},collapse:function(){var t=a(this),i=t.find(".layui-colla-icon"),l=t.siblings(".layui-colla-content"),s=t.parents(".layui-collapse").eq(0),o=s.attr("lay-filter"),r="none"===l.css("display");if("string"==typeof s.attr("lay-accordion")){var c=s.children(".layui-colla-item").children("."+n);c.siblings(".layui-colla-title").children(".layui-colla-icon").html(""),c.removeClass(n)}l[r?"addClass":"removeClass"](n),i.html(r?"":""),layui.event.call(this,e,"collapse("+o+")",{title:t,content:l,show:r})}};s.prototype.init=function(t,e){var l=function(){return e?'[lay-filter="'+e+'"]':""}(),s={tab:function(){f.tabAuto.call({})},nav:function(){var t=200,e={},s={},p={},b=function(l,o,r){var c=a(this),f=c.find("."+d);o.hasClass(u)?l.css({top:c.position().top,height:c.children("a").outerHeight(),opacity:1}):(f.addClass(h),l.css({left:c.position().left+parseFloat(c.css("marginLeft")),top:c.position().top+c.height()-l.height()}),e[r]=setTimeout(function(){l.css({width:c.width(),opacity:1})},i.ie&&i.ie<10?0:t),clearTimeout(p[r]),"block"===f.css("display")&&clearTimeout(s[r]),s[r]=setTimeout(function(){f.addClass(n),c.find("."+y).addClass(y+"d")},300))};a(o+l).each(function(i){var l=a(this),o=a(''),h=l.find("."+r);l.find("."+c)[0]||(l.append(o),h.on("mouseenter",function(){b.call(this,o,l,i)}).on("mouseleave",function(){l.hasClass(u)||(clearTimeout(s[i]),s[i]=setTimeout(function(){l.find("."+d).removeClass(n),l.find("."+y).removeClass(y+"d")},300))}),l.on("mouseleave",function(){clearTimeout(e[i]),p[i]=setTimeout(function(){l.hasClass(u)?o.css({height:0,top:o.position().top+o.height()/2,opacity:0}):o.css({width:0,left:o.position().left+o.width()/2,opacity:0})},t)})),h.find("a").each(function(){var t=a(this),i=(t.parent(),t.siblings("."+d));i[0]&&!t.children("."+y)[0]&&t.append(''),t.off("click",f.clickThis).on("click",f.clickThis)})})},breadcrumb:function(){var t=".layui-breadcrumb";a(t+l).each(function(){var t=a(this),i="lay-separator",e=t.attr(i)||"/",l=t.find("a");l.next("span["+i+"]")[0]||(l.each(function(t){t!==l.length-1&&a(this).after(""+e+"")}),t.css("visibility","visible"))})},progress:function(){var t="layui-progress";a("."+t+l).each(function(){var i=a(this),e=i.find(".layui-progress-bar"),l=e.attr("lay-percent");e.css("width",function(){return/^.+\/.+$/.test(l)?100*new Function("return "+l)()+"%":l}()),i.attr("lay-showPercent")&&setTimeout(function(){e.html(''+l+"")},350)})},collapse:function(){var t="layui-collapse";a("."+t+l).each(function(){var t=a(this).find(".layui-colla-item");t.each(function(){var t=a(this),i=t.find(".layui-colla-title"),e=t.find(".layui-colla-content"),l="none"===e.css("display");i.find(".layui-colla-icon").remove(),i.append(''+(l?"":"")+""),i.off("click",f.collapse).on("click",f.collapse)})})}};return s[t]?s[t]():layui.each(s,function(t,a){a()})},s.prototype.render=s.prototype.init;var p=new s,b=a(document);p.render();var v=".layui-tab-title li";b.on("click",v,f.tabClick),b.on("click",f.hideTabMore),a(window).on("resize",f.tabAuto),t(e,p)});layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,n=layui.hint(),o=layui.device(),a={config:{},set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,r,e,t)}},l=function(){var e=this;return{upload:function(t){e.upload.call(e,t)},reload:function(t){e.reload.call(e,t)},config:e.config}},r="upload",u="layui-upload-file",c="layui-upload-form",f="layui-upload-iframe",s="layui-upload-choose",p=function(e){var i=this;i.config=t.extend({},i.config,a.config,e),i.render()};p.prototype.config={accept:"images",exts:"",auto:!0,bindAction:"",url:"",field:"file",acceptMime:"",method:"post",data:{},drag:!0,size:0,number:0,multiple:!1},p.prototype.render=function(e){var i=this,e=i.config;e.elem=t(e.elem),e.bindAction=t(e.bindAction),i.file(),i.events()},p.prototype.file=function(){var e=this,i=e.config,n=e.elemFile=t(['"].join("")),a=i.elem.next();(a.hasClass(u)||a.hasClass(c))&&a.remove(),o.ie&&o.ie<10&&i.elem.wrap('
                  '),e.isFile()?(e.elemFile=i.elem,i.field=i.elem[0].name):i.elem.after(n),o.ie&&o.ie<10&&e.initIE()},p.prototype.initIE=function(){var e=this,i=e.config,n=t(''),o=t(['
                  ',"
                  "].join(""));t("#"+f)[0]||t("body").append(n),i.elem.next().hasClass(c)||(e.elemFile.wrap(o),i.elem.next("."+c).append(function(){var e=[];return layui.each(i.data,function(t,i){i="function"==typeof i?i():i,e.push('')}),e.join("")}()))},p.prototype.msg=function(e){return i.msg(e,{icon:2,shift:6})},p.prototype.isFile=function(){var e=this.config.elem[0];if(e)return"input"===e.tagName.toLocaleLowerCase()&&"file"===e.type},p.prototype.preview=function(e){var t=this;window.FileReader&&layui.each(t.chooseFiles,function(t,i){var n=new FileReader;n.readAsDataURL(i),n.onload=function(){e&&e(t,i,this.result)}})},p.prototype.upload=function(e,i){var n,a=this,l=a.config,r=a.elemFile[0],u=function(){var i=0,n=0,o=e||a.files||a.chooseFiles||r.files,u=function(){l.multiple&&i+n===a.fileLength&&"function"==typeof l.allDone&&l.allDone({total:a.fileLength,successful:i,aborted:n})};layui.each(o,function(e,o){var r=new FormData;r.append(l.field,o),layui.each(l.data,function(e,t){t="function"==typeof t?t():t,r.append(e,t)});var c={url:l.url,type:"post",data:r,contentType:!1,processData:!1,dataType:"json",headers:l.headers||{},success:function(t){i++,d(e,t),u()},error:function(){n++,a.msg("请求上传接口出现异常"),m(e),u()}};"function"==typeof l.progress&&(c.xhr=function(){var e=t.ajaxSettings.xhr();return e.upload.addEventListener("progress",function(e){if(e.lengthComputable){var t=Math.floor(e.loaded/e.total*100);l.progress(t,l.item[0],e)}}),e}),t.ajax(c)})},c=function(){var e=t("#"+f);a.elemFile.parent().submit(),clearInterval(p.timer),p.timer=setInterval(function(){var t,i=e.contents().find("body");try{t=i.text()}catch(n){a.msg("获取上传后的响应信息出现异常"),clearInterval(p.timer),m()}t&&(clearInterval(p.timer),i.html(""),d(0,t))},30)},d=function(e,t){if(a.elemFile.next("."+s).remove(),r.value="","object"!=typeof t)try{t=JSON.parse(t)}catch(i){return t={},a.msg("请对上传接口返回有效JSON")}"function"==typeof l.done&&l.done(t,e||0,function(e){a.upload(e)})},m=function(e){l.auto&&(r.value=""),"function"==typeof l.error&&l.error(e||0,function(e){a.upload(e)})},h=l.exts,v=function(){var t=[];return layui.each(e||a.chooseFiles,function(e,i){t.push(i.name)}),t}(),g={preview:function(e){a.preview(e)},upload:function(e,t){var i={};i[e]=t,a.upload(i)},pushFile:function(){return a.files=a.files||{},layui.each(a.chooseFiles,function(e,t){a.files[e]=t}),a.files},resetFile:function(e,t,i){var n=new File([t],i);a.files=a.files||{},a.files[e]=n}},y=function(){if("choose"!==i&&!l.auto||(l.choose&&l.choose(g),"choose"!==i))return l.before&&l.before(g),o.ie?o.ie>9?u():c():void u()};if(v=0===v.length?r.value.match(/[^\/\\]+\..+/g)||[]||"":v,0!==v.length){switch(l.accept){case"file":if(h&&!RegExp("\\w\\.("+h+")$","i").test(escape(v)))return a.msg("选择的文件中包含不支持的格式"),r.value="";break;case"video":if(!RegExp("\\w\\.("+(h||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(v)))return a.msg("选择的视频中包含不支持的格式"),r.value="";break;case"audio":if(!RegExp("\\w\\.("+(h||"mp3|wav|mid")+")$","i").test(escape(v)))return a.msg("选择的音频中包含不支持的格式"),r.value="";break;default:if(layui.each(v,function(e,t){RegExp("\\w\\.("+(h||"jpg|png|gif|bmp|jpeg$")+")","i").test(escape(t))||(n=!0)}),n)return a.msg("选择的图片中包含不支持的格式"),r.value=""}if(a.fileLength=function(){var t=0,i=e||a.files||a.chooseFiles||r.files;return layui.each(i,function(){t++}),t}(),l.number&&a.fileLength>l.number)return a.msg("同时最多只能上传的数量为:"+l.number);if(l.size>0&&!(o.ie&&o.ie<10)){var F;if(layui.each(a.chooseFiles,function(e,t){if(t.size>1024*l.size){var i=l.size/1024;i=i>=1?i.toFixed(2)+"MB":l.size+"KB",r.value="",F=i}}),F)return a.msg("文件不能超过"+F)}y()}},p.prototype.reload=function(e){e=e||{},delete e.elem,delete e.bindAction;var i=this,e=i.config=t.extend({},i.config,a.config,e),n=e.elem.next();n.attr({name:e.name,accept:e.acceptMime,multiple:e.multiple})},p.prototype.events=function(){var e=this,i=e.config,a=function(t){e.chooseFiles={},layui.each(t,function(t,i){var n=(new Date).getTime();e.chooseFiles[n+"-"+t]=i})},l=function(t,n){var o=e.elemFile,a=t.length>1?t.length+"个文件":(t[0]||{}).name||o[0].value.match(/[^\/\\]+\..+/g)||[]||"";o.next().hasClass(s)&&o.next().remove(),e.upload(null,"choose"),e.isFile()||i.choose||o.after(''+a+"")};i.elem.off("upload.start").on("upload.start",function(){var o=t(this),a=o.attr("lay-data");if(a)try{a=new Function("return "+a)(),e.config=t.extend({},i,a)}catch(l){n.error("Upload element property lay-data configuration item has a syntax error: "+a)}e.config.item=o,e.elemFile[0].click()}),o.ie&&o.ie<10||i.elem.off("upload.over").on("upload.over",function(){var e=t(this);e.attr("lay-over","")}).off("upload.leave").on("upload.leave",function(){var e=t(this);e.removeAttr("lay-over")}).off("upload.drop").on("upload.drop",function(n,o){var r=t(this),u=o.originalEvent.dataTransfer.files||[];r.removeAttr("lay-over"),a(u),i.auto?e.upload(u):l(u)}),e.elemFile.off("upload.change").on("upload.change",function(){var t=this.files||[];a(t),i.auto?e.upload():l(t)}),i.bindAction.off("upload.action").on("upload.action",function(){e.upload()}),i.elem.data("haveEvents")||(e.elemFile.on("change",function(){t(this).trigger("upload.change")}),i.elem.on("click",function(){e.isFile()||t(this).trigger("upload.start")}),i.drag&&i.elem.on("dragover",function(e){e.preventDefault(),t(this).trigger("upload.over")}).on("dragleave",function(e){t(this).trigger("upload.leave")}).on("drop",function(e){e.preventDefault(),t(this).trigger("upload.drop",e)}),i.bindAction.on("click",function(){t(this).trigger("upload.action")}),i.elem.data("haveEvents",!0))},a.render=function(e){var t=new p(e);return l.call(t)},e(r,a)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,t={config:{},index:layui.slider?layui.slider.index+1e4:0,set:function(e){var t=this;return t.config=i.extend({},t.config,e),t},on:function(e,i){return layui.onevent.call(this,n,e,i)}},a=function(){var e=this,i=e.config;return{setValue:function(i,t){return e.slide("set",i,t||0)},config:i}},n="slider",l="layui-disabled",s="layui-slider",r="layui-slider-bar",o="layui-slider-wrap",u="layui-slider-wrap-btn",d="layui-slider-tips",v="layui-slider-input",c="layui-slider-input-txt",m="layui-slider-input-btn",p="layui-slider-hover",f=function(e){var a=this;a.index=++t.index,a.config=i.extend({},a.config,t.config,e),a.render()};f.prototype.config={type:"default",min:0,max:100,value:0,step:1,showstep:!1,tips:!0,input:!1,range:!1,height:200,disabled:!1,theme:"#009688"},f.prototype.render=function(){var e=this,t=e.config;if(t.step<1&&(t.step=1),t.maxt.min?a:t.min,t.value[1]=n>t.min?n:t.min,t.value[0]=t.value[0]>t.max?t.max:t.value[0],t.value[1]=t.value[1]>t.max?t.max:t.value[1];var r=Math.floor((t.value[0]-t.min)/(t.max-t.min)*100),v=Math.floor((t.value[1]-t.min)/(t.max-t.min)*100),m=v-r+"%";r+="%",v+="%"}else{"object"==typeof t.value&&(t.value=Math.min.apply(null,t.value)),t.valuet.max&&(t.value=t.max);var m=Math.floor((t.value-t.min)/(t.max-t.min)*100)+"%"}var p=t.disabled?"#c2c2c2":t.theme,f='
                  '+(t.tips?'
                  ':"")+'
                  '+(t.range?'
                  ':"")+"
                  ",h=i(t.elem),y=h.next("."+s);if(y[0]&&y.remove(),e.elemTemp=i(f),t.range?(e.elemTemp.find("."+o).eq(0).data("value",t.value[0]),e.elemTemp.find("."+o).eq(1).data("value",t.value[1])):e.elemTemp.find("."+o).data("value",t.value),h.html(e.elemTemp),"vertical"===t.type&&e.elemTemp.height(t.height+"px"),t.showstep){for(var g=(t.max-t.min)/t.step,b="",x=1;x
                  ')}e.elemTemp.append(b)}if(t.input&&!t.range){var w=i('
                  ');h.css("position","relative"),h.append(w),h.find("."+c).children("input").val(t.value),"vertical"===t.type?w.css({left:0,top:-48}):e.elemTemp.css("margin-right",w.outerWidth()+15)}t.disabled?(e.elemTemp.addClass(l),e.elemTemp.find("."+u).addClass(l)):e.slide(),e.elemTemp.find("."+u).on("mouseover",function(){var a="vertical"===t.type?t.height:e.elemTemp[0].offsetWidth,n=e.elemTemp.find("."+o),l="vertical"===t.type?a-i(this).parent()[0].offsetTop-n.height():i(this).parent()[0].offsetLeft,s=l/a*100,r=i(this).parent().data("value"),u=t.setTips?t.setTips(r):r;e.elemTemp.find("."+d).html(u),"vertical"===t.type?e.elemTemp.find("."+d).css({bottom:s+"%","margin-bottom":"20px",display:"inline-block"}):e.elemTemp.find("."+d).css({left:s+"%",display:"inline-block"})}).on("mouseout",function(){e.elemTemp.find("."+d).css("display","none")})},f.prototype.slide=function(e,t,a){var n=this,l=n.config,s=n.elemTemp,f=function(){return"vertical"===l.type?l.height:s[0].offsetWidth},h=s.find("."+o),y=s.next("."+v),g=y.children("."+c).children("input").val(),b=100/((l.max-l.min)/Math.ceil(l.step)),x=function(e,i){e=Math.ceil(e)*b>100?Math.ceil(e)*b:Math.round(e)*b,e=e>100?100:e,h.eq(i).css("vertical"===l.type?"bottom":"left",e+"%");var t=T(h[0].offsetLeft),a=l.range?T(h[1].offsetLeft):0;"vertical"===l.type?(s.find("."+d).css({bottom:e+"%","margin-bottom":"20px"}),t=T(f()-h[0].offsetTop-h.height()),a=l.range?T(f()-h[1].offsetTop-h.height()):0):s.find("."+d).css("left",e+"%"),t=t>100?100:t,a=a>100?100:a;var n=Math.min(t,a),o=Math.abs(t-a);"vertical"===l.type?s.find("."+r).css({height:o+"%",bottom:n+"%"}):s.find("."+r).css({width:o+"%",left:n+"%"});var u=l.min+Math.round((l.max-l.min)*e/100);if(g=u,y.children("."+c).children("input").val(g),h.eq(i).data("value",u),u=l.setTips?l.setTips(u):u,s.find("."+d).html(u),l.range){var v=[h.eq(0).data("value"),h.eq(1).data("value")];v[0]>v[1]&&v.reverse()}l.change&&l.change(l.range?v:u)},T=function(e){var i=e/f()*100/b,t=Math.round(i)*b;return e==f()&&(t=Math.ceil(i)*b),t},w=i(['
                  f()&&(r=f());var o=r/f()*100/b;x(o,e),t.addClass(p),s.find("."+d).show(),i.preventDefault()},o=function(){t.removeClass(p),s.find("."+d).hide()};M(r,o)})}),s.on("click",function(e){var t=i("."+u);if(!t.is(event.target)&&0===t.has(event.target).length&&t.length){var a,n="vertical"===l.type?f()-e.clientY+i(this).offset().top:e.clientX-i(this).offset().left;n<0&&(n=0),n>f()&&(n=f());var s=n/f()*100/b;a=l.range?"vertical"===l.type?Math.abs(n-parseInt(i(h[0]).css("bottom")))>Math.abs(n-parseInt(i(h[1]).css("bottom")))?1:0:Math.abs(n-h[0].offsetLeft)>Math.abs(n-h[1].offsetLeft)?1:0:0,x(s,a),e.preventDefault()}}),y.hover(function(){var e=i(this);e.children("."+m).fadeIn("fast")},function(){var e=i(this);e.children("."+m).fadeOut("fast")}),y.children("."+m).children("i").each(function(e){i(this).on("click",function(){g=1==e?g-l.stepl.max?l.max:Number(g)+l.step;var i=(g-l.min)/(l.max-l.min)*100/b;x(i,0)})});var q=function(){var e=this.value;e=isNaN(e)?0:e,e=el.max?l.max:e,this.value=e;var i=(e-l.min)/(l.max-l.min)*100/b;x(i,0)};y.children("."+c).children("input").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),q.call(this))}).on("change",q)},f.prototype.events=function(){var e=this;e.config},t.render=function(e){var i=new f(e);return a.call(i)},e(n,t)});layui.define("jquery",function(e){"use strict";var i=layui.jquery,o={config:{},index:layui.colorpicker?layui.colorpicker.index+1e4:0,set:function(e){var o=this;return o.config=i.extend({},o.config,e),o},on:function(e,i){return layui.onevent.call(this,"colorpicker",e,i)}},r=function(){var e=this,i=e.config;return{config:i}},t="colorpicker",n="layui-show",l="layui-colorpicker",c=".layui-colorpicker-main",a="layui-icon-down",s="layui-icon-close",f="layui-colorpicker-trigger-span",d="layui-colorpicker-trigger-i",u="layui-colorpicker-side",p="layui-colorpicker-side-slider",g="layui-colorpicker-basis",v="layui-colorpicker-alpha-bgcolor",h="layui-colorpicker-alpha-slider",m="layui-colorpicker-basis-cursor",b="layui-colorpicker-main-input",k=function(e){var i={h:0,s:0,b:0},o=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b),t=r-o;return i.b=r,i.s=0!=r?255*t/r:0,0!=i.s?e.r==r?i.h=(e.g-e.b)/t:e.g==r?i.h=2+(e.b-e.r)/t:i.h=4+(e.r-e.g)/t:i.h=-1,r==o&&(i.h=0),i.h*=60,i.h<0&&(i.h+=360),i.s*=100/255,i.b*=100/255,i},y=function(e){var e=e.indexOf("#")>-1?e.substring(1):e;if(3==e.length){var i=e.split("");e=i[0]+i[0]+i[1]+i[1]+i[2]+i[2]}e=parseInt(e,16);var o={r:e>>16,g:(65280&e)>>8,b:255&e};return k(o)},x=function(e){var i={},o=e.h,r=255*e.s/100,t=255*e.b/100;if(0==r)i.r=i.g=i.b=t;else{var n=t,l=(255-r)*t/255,c=(n-l)*(o%60)/60;360==o&&(o=0),o<60?(i.r=n,i.b=l,i.g=l+c):o<120?(i.g=n,i.b=l,i.r=n-c):o<180?(i.g=n,i.r=l,i.b=l+c):o<240?(i.b=n,i.r=l,i.g=n-c):o<300?(i.b=n,i.g=l,i.r=l+c):o<360?(i.r=n,i.g=l,i.b=n-c):(i.r=0,i.g=0,i.b=0)}return{r:Math.round(i.r),g:Math.round(i.g),b:Math.round(i.b)}},C=function(e){var o=x(e),r=[o.r.toString(16),o.g.toString(16),o.b.toString(16)];return i.each(r,function(e,i){1==i.length&&(r[e]="0"+i)}),r.join("")},P=function(e){var i=/[0-9]{1,3}/g,o=e.match(i)||[];return{r:o[0],g:o[1],b:o[2]}},B=i(window),w=i(document),D=function(e){var r=this;r.index=++o.index,r.config=i.extend({},r.config,o.config,e),r.render()};D.prototype.config={color:"",size:null,alpha:!1,format:"hex",predefine:!1,colors:["#009688","#5FB878","#1E9FFF","#FF5722","#FFB800","#01AAED","#999","#c00","#ff8c00","#ffd700","#90ee90","#00ced1","#1e90ff","#c71585","rgb(0, 186, 189)","rgb(255, 120, 0)","rgb(250, 212, 0)","#393D49","rgba(0,0,0,.5)","rgba(255, 69, 0, 0.68)","rgba(144, 240, 144, 0.5)","rgba(31, 147, 255, 0.73)"]},D.prototype.render=function(){var e=this,o=e.config,r=i(['
                  ',"",'3&&(o.alpha&&"rgb"==o.format||(e="#"+C(k(P(o.color))))),"background: "+e):e}()+'">','',"","","
                  "].join("")),t=i(o.elem);o.size&&r.addClass("layui-colorpicker-"+o.size),t.addClass("layui-inline").html(e.elemColorBox=r),e.color=e.elemColorBox.find("."+f)[0].style.background,e.events()},D.prototype.renderPicker=function(){var e=this,o=e.config,r=e.elemColorBox[0],t=e.elemPicker=i(['
                  ','
                  ','
                  ','
                  ','
                  ','
                  ',"
                  ",'
                  ','
                  ',"
                  ","
                  ",'
                  ','
                  ','
                  ',"
                  ","
                  ",function(){if(o.predefine){var e=['
                  '];return layui.each(o.colors,function(i,o){e.push(['
                  ','
                  ',"
                  "].join(""))}),e.push("
                  "),e.join("")}return""}(),'
                  ','
                  ','',"
                  ",'
                  ','','',"","
                  "].join(""));e.elemColorBox.find("."+f)[0];i(c)[0]&&i(c).data("index")==e.index?e.removePicker(D.thisElemInd):(e.removePicker(D.thisElemInd),i("body").append(t)),D.thisElemInd=e.index,D.thisColor=r.style.background,e.position(),e.pickerEvents()},D.prototype.removePicker=function(e){var o=this;o.config;return i("#layui-colorpicker"+(e||o.index)).remove(),o},D.prototype.position=function(){var e=this,i=e.config,o=e.bindElem||e.elemColorBox[0],r=e.elemPicker[0],t=o.getBoundingClientRect(),n=r.offsetWidth,l=r.offsetHeight,c=function(e){return e=e?"scrollLeft":"scrollTop",document.body[e]|document.documentElement[e]},a=function(e){return document.documentElement[e?"clientWidth":"clientHeight"]},s=5,f=t.left,d=t.bottom;f-=(n-o.offsetWidth)/2,d+=s,f+n+s>a("width")?f=a("width")-n-s:fa()&&(d=t.top>l?t.top-l:a()-l,d-=2*s),i.position&&(r.style.position=i.position),r.style.left=f+("fixed"===i.position?0:c(1))+"px",r.style.top=d+("fixed"===i.position?0:c())+"px"},D.prototype.val=function(){var e=this,i=(e.config,e.elemColorBox.find("."+f)),o=e.elemPicker.find("."+b),r=i[0],t=r.style.backgroundColor;if(t){var n=k(P(t)),l=i.attr("lay-type");if(e.select(n.h,n.s,n.b),"torgb"===l&&o.find("input").val(t),"rgba"===l){var c=P(t);if(3==(t.match(/[0-9]{1,3}/g)||[]).length)o.find("input").val("rgba("+c.r+", "+c.g+", "+c.b+", 1)"),e.elemPicker.find("."+h).css("left",280);else{o.find("input").val(t);var a=280*t.slice(t.lastIndexOf(",")+1,t.length-1);e.elemPicker.find("."+h).css("left",a)}e.elemPicker.find("."+v)[0].style.background="linear-gradient(to right, rgba("+c.r+", "+c.g+", "+c.b+", 0), rgb("+c.r+", "+c.g+", "+c.b+"))"}}else e.select(0,100,100),o.find("input").val(""),e.elemPicker.find("."+v)[0].style.background="",e.elemPicker.find("."+h).css("left",280)},D.prototype.side=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=r.attr("lay-type"),n=e.elemPicker.find("."+u),l=e.elemPicker.find("."+p),c=e.elemPicker.find("."+g),y=e.elemPicker.find("."+m),C=e.elemPicker.find("."+v),w=e.elemPicker.find("."+h),D=l[0].offsetTop/180*360,E=100-(y[0].offsetTop+3)/180*100,H=(y[0].offsetLeft+3)/260*100,W=Math.round(w[0].offsetLeft/280*100)/100,j=e.elemColorBox.find("."+d),F=e.elemPicker.find(".layui-colorpicker-pre").children("div"),L=function(i,n,l,c){e.select(i,n,l);var f=x({h:i,s:n,b:l});if(j.addClass(a).removeClass(s),r[0].style.background="rgb("+f.r+", "+f.g+", "+f.b+")","torgb"===t&&e.elemPicker.find("."+b).find("input").val("rgb("+f.r+", "+f.g+", "+f.b+")"),"rgba"===t){var d=0;d=280*c,w.css("left",d),e.elemPicker.find("."+b).find("input").val("rgba("+f.r+", "+f.g+", "+f.b+", "+c+")"),r[0].style.background="rgba("+f.r+", "+f.g+", "+f.b+", "+c+")",C[0].style.background="linear-gradient(to right, rgba("+f.r+", "+f.g+", "+f.b+", 0), rgb("+f.r+", "+f.g+", "+f.b+"))"}o.change&&o.change(e.elemPicker.find("."+b).find("input").val())},M=i(['
                  t&&(r=t);var l=r/180*360;D=l,L(l,H,E,W),e.preventDefault()};Y(r),e.preventDefault()}),n.on("click",function(e){var o=e.clientY-i(this).offset().top;o<0&&(o=0),o>this.offsetHeight&&(o=this.offsetHeight);var r=o/180*360;D=r,L(r,H,E,W),e.preventDefault()}),y.on("mousedown",function(e){var i=this.offsetTop,o=this.offsetLeft,r=e.clientY,t=e.clientX,n=function(e){var n=i+(e.clientY-r),l=o+(e.clientX-t),a=c[0].offsetHeight-3,s=c[0].offsetWidth-3;n<-3&&(n=-3),n>a&&(n=a),l<-3&&(l=-3),l>s&&(l=s);var f=(l+3)/260*100,d=100-(n+3)/180*100;E=d,H=f,L(D,f,d,W),e.preventDefault()};layui.stope(e),Y(n),e.preventDefault()}),c.on("mousedown",function(e){var o=e.clientY-i(this).offset().top-3+B.scrollTop(),r=e.clientX-i(this).offset().left-3+B.scrollLeft();o<-3&&(o=-3),o>this.offsetHeight-3&&(o=this.offsetHeight-3),r<-3&&(r=-3),r>this.offsetWidth-3&&(r=this.offsetWidth-3);var t=(r+3)/260*100,n=100-(o+3)/180*100;E=n,H=t,L(D,t,n,W),e.preventDefault(),y.trigger(e,"mousedown")}),w.on("mousedown",function(e){var i=this.offsetLeft,o=e.clientX,r=function(e){var r=i+(e.clientX-o),t=C[0].offsetWidth;r<0&&(r=0),r>t&&(r=t);var n=Math.round(r/280*100)/100;W=n,L(D,H,E,n),e.preventDefault()};Y(r),e.preventDefault()}),C.on("click",function(e){var o=e.clientX-i(this).offset().left;o<0&&(o=0),o>this.offsetWidth&&(o=this.offsetWidth);var r=Math.round(o/280*100)/100;W=r,L(D,H,E,r),e.preventDefault()}),F.each(function(){i(this).on("click",function(){i(this).parent(".layui-colorpicker-pre").addClass("selected").siblings().removeClass("selected");var e,o=this.style.backgroundColor,r=k(P(o)),t=o.slice(o.lastIndexOf(",")+1,o.length-1);D=r.h,H=r.s,E=r.b,3==(o.match(/[0-9]{1,3}/g)||[]).length&&(t=1),W=t,e=280*t,L(r.h,r.s,r.b,t)})})},D.prototype.select=function(e,i,o,r){var t=this,n=(t.config,C({h:e,s:100,b:100})),l=C({h:e,s:i,b:o}),c=e/360*180,a=180-o/100*180-3,s=i/100*260-3;t.elemPicker.find("."+p).css("top",c),t.elemPicker.find("."+g)[0].style.background="#"+n,t.elemPicker.find("."+m).css({top:a,left:s}),"change"!==r&&t.elemPicker.find("."+b).find("input").val("#"+l)},D.prototype.pickerEvents=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f),t=e.elemPicker.find("."+b+" input"),n={clear:function(i){r[0].style.background="",e.elemColorBox.find("."+d).removeClass(a).addClass(s),e.color="",o.done&&o.done(""),e.removePicker()},confirm:function(i,n){var l=t.val(),c=l,f={};if(l.indexOf(",")>-1){if(f=k(P(l)),e.select(f.h,f.s,f.b),r[0].style.background=c="#"+C(f),(l.match(/[0-9]{1,3}/g)||[]).length>3&&"rgba"===r.attr("lay-type")){var u=280*l.slice(l.lastIndexOf(",")+1,l.length-1);e.elemPicker.find("."+h).css("left",u),r[0].style.background=l,c=l}}else f=y(l),r[0].style.background=c="#"+C(f),e.elemColorBox.find("."+d).removeClass(s).addClass(a);return"change"===n?(e.select(f.h,f.s,f.b,n),void(o.change&&o.change(c))):(e.color=l,o.done&&o.done(l),void e.removePicker())}};e.elemPicker.on("click","*[colorpicker-events]",function(){var e=i(this),o=e.attr("colorpicker-events");n[o]&&n[o].call(this,e)}),t.on("keyup",function(e){var o=i(this);n.confirm.call(this,o,13===e.keyCode?null:"change")})},D.prototype.events=function(){var e=this,o=e.config,r=e.elemColorBox.find("."+f);e.elemColorBox.on("click",function(){e.renderPicker(),i(c)[0]&&(e.val(),e.side())}),o.elem[0]&&!e.elemColorBox[0].eventHandler&&(w.on("click",function(o){if(!i(o.target).hasClass(l)&&!i(o.target).parents("."+l)[0]&&!i(o.target).hasClass(c.replace(/\./g,""))&&!i(o.target).parents(c)[0]&&e.elemPicker){if(e.color){var t=k(P(e.color));e.select(t.h,t.s,t.b)}else e.elemColorBox.find("."+d).removeClass(a).addClass(s);r[0].style.background=e.color||"",e.removePicker()}}),B.on("resize",function(){return!(!e.elemPicker||!i(c)[0])&&void e.position()}),e.elemColorBox[0].eventHandler=!0)},o.render=function(e){var i=new D(e);return r.call(i)},e(t,o)});layui.define("layer",function(e){"use strict";var t=layui.$,i=layui.layer,a=layui.hint(),n=layui.device(),l="form",r=".layui-form",s="layui-this",o="layui-hide",c="layui-disabled",u=function(){this.config={verify:{required:[/[\S]+/,"必填项不能为空"],phone:[/^1\d{10}$/,"请输入正确的手机号"],email:[/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/,"邮箱格式不正确"],url:[/(^#)|(^http(s*):\/\/[^\s]+\.[^\s]+)/,"链接格式不正确"],number:function(e){if(!e||isNaN(e))return"只能填写数字"},date:[/^(\d{4})[-\/](\d{1}|0\d{1}|1[0-2])([-\/](\d{1}|0\d{1}|[1-2][0-9]|3[0-1]))*$/,"日期格式不正确"],identity:[/(^\d{15}$)|(^\d{17}(x|X|\d)$)/,"请输入正确的身份证号"]}}};u.prototype.set=function(e){var i=this;return t.extend(!0,i.config,e),i},u.prototype.verify=function(e){var i=this;return t.extend(!0,i.config.verify,e),i},u.prototype.on=function(e,t){return layui.onevent.call(this,l,e,t)},u.prototype.val=function(e,i){var a=this,n=t(r+'[lay-filter="'+e+'"]');return n.each(function(e,a){var n=t(this);layui.each(i,function(e,t){var i,a=n.find('[name="'+e+'"]');a[0]&&(i=a[0].type,"checkbox"===i?a[0].checked=t:"radio"===i?a.each(function(){this.value==t&&(this.checked=!0)}):a.val(t))})}),f.render(null,e),a.getValue(e)},u.prototype.getValue=function(e,i){i=i||t(r+'[lay-filter="'+e+'"]').eq(0);var a={},n={},l=i.find("input,select,textarea");return layui.each(l,function(e,t){if(t.name=(t.name||"").replace(/^\s*|\s*&/,""),t.name){if(/^.*\[\]$/.test(t.name)){var i=t.name.match(/^(.*)\[\]$/g)[0];a[i]=0|a[i],t.name=t.name.replace(/^(.*)\[\]$/,"$1["+a[i]++ +"]")}/^checkbox|radio$/.test(t.type)&&!t.checked||(n[t.name]=t.value)}}),n},u.prototype.render=function(e,i){var n=this,u=t(r+function(){return i?'[lay-filter="'+i+'"]':""}()),d={select:function(){var e,i="请选择",a="layui-form-select",n="layui-select-title",r="layui-select-none",d="",f=u.find("select"),v=function(i,l){t(i.target).parent().hasClass(n)&&!l||(t("."+a).removeClass(a+"ed "+a+"up"),e&&d&&e.val(d)),e=null},y=function(i,u,f){var y,p=t(this),m=i.find("."+n),k=m.find("input"),g=i.find("dl"),x=g.children("dd"),b=this.selectedIndex;if(!u){var C=function(){var e=i.offset().top+i.outerHeight()+5-h.scrollTop(),t=g.outerHeight();b=p[0].selectedIndex,i.addClass(a+"ed"),x.removeClass(o),y=null,x.eq(b).addClass(s).siblings().removeClass(s),e+t>h.height()&&e>=t&&i.addClass(a+"up"),T()},w=function(e){i.removeClass(a+"ed "+a+"up"),k.blur(),y=null,e||$(k.val(),function(e){var i=p[0].selectedIndex;e&&(d=t(p[0].options[i]).html(),0===i&&d===k.attr("placeholder")&&(d=""),k.val(d||""))})},T=function(){var e=g.children("dd."+s);if(e[0]){var t=e.position().top,i=g.height(),a=e.height();t>i&&g.scrollTop(t+g.scrollTop()-i+a-5),t<0&&g.scrollTop(t+g.scrollTop()-5)}};m.on("click",function(e){i.hasClass(a+"ed")?w():(v(e,!0),C()),g.find("."+r).remove()}),m.find(".layui-edge").on("click",function(){k.focus()}),k.on("keyup",function(e){var t=e.keyCode;9===t&&C()}).on("keydown",function(e){var t=e.keyCode;9===t&&w();var i=function(t,a){var n,l;e.preventDefault();var r=function(){var e=g.children("dd."+s);if(g.children("dd."+o)[0]&&"next"===t){var i=g.children("dd:not(."+o+",."+c+")"),n=i.eq(0).index();if(n>=0&&n无匹配项

                  '):g.find("."+r).remove()},"keyup"),""===t&&g.find("."+r).remove(),void T())};f&&k.on("keyup",q).on("blur",function(i){var a=p[0].selectedIndex;e=k,d=t(p[0].options[a]).html(),0===a&&d===k.attr("placeholder")&&(d=""),setTimeout(function(){$(k.val(),function(e){d||k.val("")},"blur")},200)}),x.on("click",function(){var e=t(this),a=e.attr("lay-value"),n=p.attr("lay-filter");return!e.hasClass(c)&&(e.hasClass("layui-select-tips")?k.val(""):(k.val(e.text()),e.addClass(s)),e.siblings().removeClass(s),p.val(a).removeClass("layui-form-danger"),layui.event.call(this,l,"select("+n+")",{elem:p[0],value:a,othis:i}),w(!0),!1)}),i.find("dl>dt").on("click",function(e){return!1}),t(document).off("click",v).on("click",v)}};f.each(function(e,l){var r=t(this),o=r.next("."+a),u=this.disabled,d=l.value,f=t(l.options[l.selectedIndex]),v=l.options[0];if("string"==typeof r.attr("lay-ignore"))return r.show();var h="string"==typeof r.attr("lay-search"),p=v?v.value?i:v.innerHTML||i:i,m=t(['
                  ','
                  ','','
                  ','
                  ',function(e){var t=[];return layui.each(e,function(e,a){0!==e||a.value?"optgroup"===a.tagName.toLowerCase()?t.push("
                  "+a.label+"
                  "):t.push('
                  '+a.innerHTML+"
                  "):t.push('
                  '+(a.innerHTML||i)+"
                  ")}),0===t.length&&t.push('
                  没有选项
                  '),t.join("")}(r.find("*"))+"
                  ","
                  "].join(""));o[0]&&o.remove(),r.after(m),y.call(this,m,u,h)})},checkbox:function(){var e={checkbox:["layui-form-checkbox","layui-form-checked","checkbox"],_switch:["layui-form-switch","layui-form-onswitch","switch"]},i=u.find("input[type=checkbox]"),a=function(e,i){var a=t(this);e.on("click",function(){var t=a.attr("lay-filter"),n=(a.attr("lay-text")||"").split("|");a[0].disabled||(a[0].checked?(a[0].checked=!1,e.removeClass(i[1]).find("em").text(n[1])):(a[0].checked=!0,e.addClass(i[1]).find("em").text(n[0])),layui.event.call(a[0],l,i[2]+"("+t+")",{elem:a[0],value:a[0].value,othis:e}))})};i.each(function(i,n){var l=t(this),r=l.attr("lay-skin"),s=(l.attr("lay-text")||"").split("|"),o=this.disabled;"switch"===r&&(r="_"+r);var u=e[r]||e.checkbox;if("string"==typeof l.attr("lay-ignore"))return l.show();var d=l.next("."+u[0]),f=t(['
                  ",function(){var e=n.title.replace(/\s/g,""),t={checkbox:[e?""+n.title+"":"",''].join(""),_switch:""+((n.checked?s[0]:s[1])||"")+""};return t[r]||t.checkbox}(),"
                  "].join(""));d[0]&&d.remove(),l.after(f),a.call(this,f,u)})},radio:function(){var e="layui-form-radio",i=["",""],a=u.find("input[type=radio]"),n=function(a){var n=t(this),s="layui-anim-scaleSpring";a.on("click",function(){var o=n[0].name,c=n.parents(r),u=n.attr("lay-filter"),d=c.find("input[name="+o.replace(/(\.|#|\[|\])/g,"\\$1")+"]");n[0].disabled||(layui.each(d,function(){var a=t(this).next("."+e);this.checked=!1,a.removeClass(e+"ed"),a.find(".layui-icon").removeClass(s).html(i[1])}),n[0].checked=!0,a.addClass(e+"ed"),a.find(".layui-icon").addClass(s).html(i[0]),layui.event.call(n[0],l,"radio("+u+")",{elem:n[0],value:n[0].value,othis:a}))})};a.each(function(a,l){var r=t(this),s=r.next("."+e),o=this.disabled;if("string"==typeof r.attr("lay-ignore"))return r.show();s[0]&&s.remove();var u=t(['
                  ',''+i[l.checked?0:1]+"","
                  "+function(){var e=l.title||"";return"string"==typeof r.next().attr("lay-radio")&&(e=r.next().html(),r.next().remove()),e}()+"
                  ","
                  "].join(""));r.after(u),n.call(this,u)})}};return e?d[e]?d[e]():a.error("不支持的"+e+"表单渲染"):layui.each(d,function(e,t){t()}),n};var d=function(){var e=null,a=f.config.verify,s="layui-form-danger",o={},c=t(this),u=c.parents(r),d=u.find("*[lay-verify]"),v=c.parents("form")[0],h=c.attr("lay-filter");return layui.each(d,function(l,r){var o=t(this),c=o.attr("lay-verify").split("|"),u=o.attr("lay-verType"),d=o.val();if(o.removeClass(s),layui.each(c,function(t,l){var c,f="",v="function"==typeof a[l];if(a[l]){var c=v?f=a[l](d,r):!a[l][0].test(d);if(f=f||a[l][1],"required"===l&&(f=o.attr("lay-reqText")||f),c)return"tips"===u?i.tips(f,function(){return"string"==typeof o.attr("lay-ignore")||"select"!==r.tagName.toLowerCase()&&!/^checkbox|radio$/.test(r.type)?o:o.next()}(),{tips:1}):"alert"===u?i.alert(f,{title:"提示",shadeClose:!0}):i.msg(f,{icon:5,shift:6}),n.android||n.ios||setTimeout(function(){r.focus()},7),o.addClass(s),e=!0}}),e)return e}),!e&&(o=f.getValue(null,u),layui.event.call(this,l,"submit("+h+")",{elem:this,form:v,field:o}))},f=new u,v=t(document),h=t(window);f.render(),v.on("reset",r,function(){var e=t(this).attr("lay-filter");setTimeout(function(){f.render(null,e)},50)}),v.on("submit",r,d).on("click","*[lay-submit]",d),e(l,f)});layui.define("form",function(e){"use strict";var i=layui.$,a=layui.form,n=layui.layer,t="tree",r={config:{},index:layui[t]?layui[t].index+1e4:0,set:function(e){var a=this;return a.config=i.extend({},a.config,e),a},on:function(e,i){return layui.onevent.call(this,t,e,i)}},l=function(){var e=this,i=e.config,a=i.id||e.index;return l.that[a]=e,l.config[a]=i,{config:i,reload:function(i){e.reload.call(e,i)},getChecked:function(){return e.getChecked.call(e)},setChecked:function(i){return e.setChecked.call(e,i)}}},c="layui-hide",d="layui-disabled",s="layui-tree-set",o="layui-tree-iconClick",h="layui-icon-addition",u="layui-icon-subtraction",p="layui-tree-entry",f="layui-tree-main",y="layui-tree-txt",v="layui-tree-pack",C="layui-tree-spread",k="layui-tree-setLineShort",m="layui-tree-showLine",x="layui-tree-lineExtend",b=function(e){var a=this;a.index=++r.index,a.config=i.extend({},a.config,r.config,e),a.render()};b.prototype.config={data:[],showCheckbox:!1,showLine:!0,accordion:!1,onlyIconControl:!1,isJump:!1,edit:!1,text:{defaultNodeName:"未命名",none:"无数据"}},b.prototype.reload=function(e){var a=this;layui.each(e,function(e,i){i.constructor===Array&&delete a.config[e]}),a.config=i.extend(!0,{},a.config,e),a.render()},b.prototype.render=function(){var e=this,a=e.config;e.checkids=[];var n=i('
                  ');e.tree(n);var t=a.elem=i(a.elem);if(t[0]){if(e.key=a.id||e.index,e.elem=n,e.elemNone=i('
                  '+a.text.none+"
                  "),t.html(e.elem),0==e.elem.find(".layui-tree-set").length)return e.elem.append(e.elemNone);a.showCheckbox&&e.renderForm("checkbox"),e.elem.find(".layui-tree-set").each(function(){var e=i(this);e.parent(".layui-tree-pack")[0]||e.addClass("layui-tree-setHide"),!e.next()[0]&&e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend")&&e.addClass(k),e.next()[0]||e.parents(".layui-tree-set").eq(0).next()[0]||e.addClass(k)}),e.events()}},b.prototype.renderForm=function(e){a.render(e,"LAY-tree-"+this.index)},b.prototype.tree=function(e,a){var n=this,t=n.config,r=a||t.data;layui.each(r,function(a,r){var l=r.children&&r.children.length>0,o=i('
                  '),h=i(['
                  ','
                  ','
                  ',function(){return t.showLine?l?'':'':''}(),function(){return t.showCheckbox?'':""}(),function(){return t.isJump&&r.href?''+(r.title||r.label||t.text.defaultNodeName)+"":''+(r.title||r.label||t.text.defaultNodeName)+""}(),"
                  ",function(){if(!t.edit)return"";var e={add:'',update:'',del:''},i=['
                  '];return t.edit===!0&&(t.edit=["update","del"]),"object"==typeof t.edit?(layui.each(t.edit,function(a,n){i.push(e[n]||"")}),i.join("")+"
                  "):void 0}(),"
                  "].join(""));l&&(h.append(o),n.tree(o,r.children)),e.append(h),h.prev("."+s)[0]&&h.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"),l||h.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"),n.spread(h,r),t.showCheckbox&&(r.checked&&n.checkids.push(r.id),n.checkClick(h,r)),t.edit&&n.operate(h,r)})},b.prototype.spread=function(e,a){var n=this,t=n.config,r=e.children("."+p),l=r.children("."+f),c=r.find("."+o),k=r.find("."+y),m=t.onlyIconControl?c:l,x="";m.on("click",function(i){var a=e.children("."+v),n=m.children(".layui-icon")[0]?m.children(".layui-icon"):m.find(".layui-tree-icon").children(".layui-icon");if(a[0]){if(e.hasClass(C))e.removeClass(C),a.slideUp(200),n.removeClass(u).addClass(h);else if(e.addClass(C),a.slideDown(200),n.addClass(u).removeClass(h),t.accordion){var r=e.siblings("."+s);r.removeClass(C),r.children("."+v).slideUp(200),r.find(".layui-tree-icon").children(".layui-icon").removeClass(u).addClass(h)}}else x="normal"}),k.on("click",function(){var n=i(this);n.hasClass(d)||(x=e.hasClass(C)?t.onlyIconControl?"open":"close":t.onlyIconControl?"close":"open",t.click&&t.click({elem:e,state:x,data:a}))})},b.prototype.setCheckbox=function(e,i,a){var n=this,t=(n.config,a.prop("checked"));if(!a.prop("disabled")){if("object"==typeof i.children||e.find("."+v)[0]){var r=e.find("."+v).find('input[same="layuiTreeCheck"]');r.each(function(){this.disabled||(this.checked=t)})}var l=function(e){if(e.parents("."+s)[0]){var i,a=e.parent("."+v),n=a.parent(),r=a.prev().find('input[same="layuiTreeCheck"]');t?r.prop("checked",t):(a.find('input[same="layuiTreeCheck"]').each(function(){this.checked&&(i=!0)}),i||r.prop("checked",!1)),l(n)}};l(e),n.renderForm("checkbox")}},b.prototype.checkClick=function(e,a){var n=this,t=n.config,r=e.children("."+p),l=r.children("."+f);l.on("click",'input[same="layuiTreeCheck"]+',function(r){layui.stope(r);var l=i(this).prev(),c=l.prop("checked");l.prop("disabled")||(n.setCheckbox(e,a,l),t.oncheck&&t.oncheck({elem:e,checked:c,data:a}))})},b.prototype.operate=function(e,a){var t=this,r=t.config,l=e.children("."+p),d=l.children("."+f);l.children(".layui-tree-btnGroup").on("click",".layui-icon",function(l){layui.stope(l);var f=i(this).data("type"),b=e.children("."+v),g={data:a,type:f,elem:e};if("add"==f){b[0]||(r.showLine?(d.find("."+o).addClass("layui-tree-icon"),d.find("."+o).children(".layui-icon").addClass(h).removeClass("layui-icon-file")):d.find(".layui-tree-iconArrow").removeClass(c),e.append('
                  '));var w=r.operate&&r.operate(g),N={};if(N.title=r.text.defaultNodeName,N.id=w,t.tree(e.children("."+v),[N]),r.showLine)if(b[0])b.hasClass(x)||b.addClass(x),e.find("."+v).each(function(){i(this).children("."+s).last().addClass(k)}),b.children("."+s).last().prev().hasClass(k)?b.children("."+s).last().prev().removeClass(k):b.children("."+s).last().removeClass(k),!e.parent("."+v)[0]&&e.next()[0]&&b.children("."+s).last().removeClass(k);else{var T=e.siblings("."+s),L=1,A=e.parent("."+v);layui.each(T,function(e,a){i(a).children("."+v)[0]||(L=0)}),1==L?(T.children("."+v).addClass(m),T.children("."+v).children("."+s).removeClass(k),e.children("."+v).addClass(m),A.removeClass(x),A.children("."+s).last().children("."+v).children("."+s).last().addClass(k)):e.children("."+v).children("."+s).addClass(k)}if(!r.showCheckbox)return;if(d.find('input[same="layuiTreeCheck"]')[0].checked){var I=e.children("."+v).children("."+s).last();I.find('input[same="layuiTreeCheck"]')[0].checked=!0}t.renderForm("checkbox")}else if("update"==f){var F=d.children("."+y).html();d.children("."+y).html(""),d.append(''),d.children(".layui-tree-editInput").val(F).focus();var j=function(e){var i=e.val().trim();i=i?i:r.text.defaultNodeName,e.remove(),d.children("."+y).html(i),g.data.title=i,r.operate&&r.operate(g)};d.children(".layui-tree-editInput").blur(function(){j(i(this))}),d.children(".layui-tree-editInput").on("keydown",function(e){13===e.keyCode&&(e.preventDefault(),j(i(this)))})}else n.confirm('确认删除该节点 "'+(a.title||"")+'" 吗?',function(a){if(r.operate&&r.operate(g),g.status="remove",n.close(a),!e.prev("."+s)[0]&&!e.next("."+s)[0]&&!e.parent("."+v)[0])return e.remove(),void t.elem.append(t.elemNone);if(e.siblings("."+s).children("."+p)[0]){if(r.showCheckbox){var l=function(e){if(e.parents("."+s)[0]){var a=e.siblings("."+s).children("."+p),n=e.parent("."+v).prev(),r=n.find('input[same="layuiTreeCheck"]')[0],c=1,d=0;0==r.checked&&(a.each(function(e,a){var n=i(a).find('input[same="layuiTreeCheck"]')[0];0!=n.checked||n.disabled||(c=0),n.disabled||(d=1)}),1==c&&1==d&&(r.checked=!0,t.renderForm("checkbox"),l(n.parent("."+s))))}};l(e)}if(r.showLine){var d=e.siblings("."+s),h=1,f=e.parent("."+v);layui.each(d,function(e,a){i(a).children("."+v)[0]||(h=0)}),1==h?(b[0]||(f.removeClass(x),d.children("."+v).addClass(m),d.children("."+v).children("."+s).removeClass(k)),e.next()[0]?f.children("."+s).last().children("."+v).children("."+s).last().addClass(k):e.prev().children("."+v).children("."+s).last().addClass(k),e.next()[0]||e.parents("."+s)[1]||e.parents("."+s).eq(0).next()[0]||e.prev("."+s).addClass(k)):!e.next()[0]&&e.hasClass(k)&&e.prev().addClass(k)}}else{var y=e.parent("."+v).prev();if(r.showLine){y.find("."+o).removeClass("layui-tree-icon"),y.find("."+o).children(".layui-icon").removeClass(u).addClass("layui-icon-file");var w=y.parents("."+v).eq(0);w.addClass(x),w.children("."+s).each(function(){i(this).children("."+v).children("."+s).last().addClass(k)})}else y.find(".layui-tree-iconArrow").addClass(c);e.parents("."+s).eq(0).removeClass(C),e.parent("."+v).remove()}e.remove()})})},b.prototype.events=function(){var e=this,a=e.config;e.elem.find(".layui-tree-checkedFirst");e.setChecked(e.checkids),e.elem.find(".layui-tree-search").on("keyup",function(){var n=i(this),t=n.val(),r=n.nextAll(),l=[];r.find("."+y).each(function(){var e=i(this).parents("."+p);if(i(this).html().indexOf(t)!=-1){l.push(i(this).parent());var a=function(e){e.addClass("layui-tree-searchShow"),e.parent("."+v)[0]&&a(e.parent("."+v).parent("."+s))};a(e.parent("."+s))}}),r.find("."+p).each(function(){var e=i(this).parent("."+s);e.hasClass("layui-tree-searchShow")||e.addClass(c)}),0==r.find(".layui-tree-searchShow").length&&e.elem.append(e.elemNone),a.onsearch&&a.onsearch({elem:l})}),e.elem.find(".layui-tree-search").on("keydown",function(){i(this).nextAll().find("."+p).each(function(){var e=i(this).parent("."+s);e.removeClass("layui-tree-searchShow "+c)}),i(".layui-tree-emptyText")[0]&&i(".layui-tree-emptyText").remove()})},b.prototype.getChecked=function(){var e=this,a=e.config,n=[],t=[];e.elem.find(".layui-form-checked").each(function(){n.push(i(this).prev()[0].value)});var r=function(e,a){layui.each(e,function(e,t){layui.each(n,function(e,n){if(t.id==n){var l=i.extend({},t);return delete l.children,a.push(l),t.children&&(l.children=[],r(t.children,l.children)),!0}})})};return r(i.extend({},a.data),t),t},b.prototype.setChecked=function(e){var a=this;a.config;a.elem.find("."+s).each(function(a,n){var t=i(this).data("id"),r=i(n).children("."+p).find('input[same="layuiTreeCheck"]'),l=r.next();if("number"==typeof e){if(t==e)return r[0].checked||l.click(),!1}else"object"==typeof e&&layui.each(e,function(e,i){if(i==t&&!r[0].checked)return l.click(),!0})})},l.that={},l.config={},r.reload=function(e,i){var a=l.that[e];return a.reload(i),l.call(a)},r.getChecked=function(e){var i=l.that[e];return i.getChecked()},r.setChecked=function(e,i){var a=l.that[e];return a.setChecked(i)},r.render=function(e){var i=new b(e);return l.call(i)},e(t,r)});layui.define(["laytpl","form"],function(e){"use strict";var a=layui.$,t=layui.laytpl,n=layui.form,i="transfer",l={config:{},index:layui[i]?layui[i].index+1e4:0,set:function(e){var t=this;return t.config=a.extend({},t.config,e),t},on:function(e,a){return layui.onevent.call(this,i,e,a)}},r=function(){var e=this,a=e.config,t=a.id||e.index;return r.that[t]=e,r.config[t]=a,{config:a,reload:function(a){e.reload.call(e,a)},getData:function(){return e.getData.call(e)}}},c="layui-hide",o="layui-btn-disabled",d="layui-none",s="layui-transfer-box",u="layui-transfer-header",h="layui-transfer-search",f="layui-transfer-active",y="layui-transfer-data",p=function(e){return e=e||{},['
                  ','
                  ','","
                  ","{{# if(d.data.showSearch){ }}",'","{{# } }}",'
                    ',"
                    "].join("")},v=['
                    ',p({index:0,checkAllName:"layTransferLeftCheckAll"}),'
                    ','",'","
                    ",p({index:1,checkAllName:"layTransferRightCheckAll"}),"
                    "].join(""),x=function(e){var t=this;t.index=++l.index,t.config=a.extend({},t.config,l.config,e),t.render()};x.prototype.config={title:["列表一","列表二"],width:200,height:360,data:[],value:[],showSearch:!1,id:"",text:{none:"无数据",searchNone:"无匹配数据"}},x.prototype.reload=function(e){var t=this;layui.each(e,function(e,a){a.constructor===Array&&delete t.config[e]}),t.config=a.extend(!0,{},t.config,e),t.render()},x.prototype.render=function(){var e=this,n=e.config,i=e.elem=a(t(v).render({data:n,index:e.index})),l=n.elem=a(n.elem);l[0]&&(n.data=n.data||[],n.value=n.value||[],e.key=n.id||e.index,l.html(e.elem),e.layBox=e.elem.find("."+s),e.layHeader=e.elem.find("."+u),e.laySearch=e.elem.find("."+h),e.layData=i.find("."+y),e.layBtn=i.find("."+f+" .layui-btn"),e.layBox.css({width:n.width,height:n.height}),e.layData.css({height:function(){return n.height-e.layHeader.outerHeight()-e.laySearch.outerHeight()-2}()}),e.renderData(),e.events())},x.prototype.renderData=function(){var e=this,a=(e.config,[{checkName:"layTransferLeftCheck",views:[]},{checkName:"layTransferRightCheck",views:[]}]);e.parseData(function(e){var t=e.selected?1:0,n=["
                  • ",'',"
                  • "].join("");a[t].views.push(n),delete e.selected}),e.layData.eq(0).html(a[0].views.join("")),e.layData.eq(1).html(a[1].views.join("")),e.renderCheckBtn()},x.prototype.renderForm=function(e){n.render(e,"LAY-transfer-"+this.index)},x.prototype.renderCheckBtn=function(e){var t=this,n=t.config;e=e||{},t.layBox.each(function(i){var l=a(this),r=l.find("."+y),d=l.find("."+u).find('input[type="checkbox"]'),s=r.find('input[type="checkbox"]'),h=0,f=!1;if(s.each(function(){var e=a(this).data("hide");(this.checked||this.disabled||e)&&h++,this.checked&&!e&&(f=!0)}),d.prop("checked",f&&h===s.length),t.layBtn.eq(i)[f?"removeClass":"addClass"](o),!e.stopNone){var p=r.children("li:not(."+c+")").length;t.noneView(r,p?"":n.text.none)}}),t.renderForm("checkbox")},x.prototype.noneView=function(e,t){var n=a('

                    '+(t||"")+"

                    ");e.find("."+d)[0]&&e.find("."+d).remove(),t.replace(/\s/g,"")&&e.append(n)},x.prototype.setValue=function(){var e=this,t=e.config,n=[];return e.layBox.eq(1).find("."+y+' input[type="checkbox"]').each(function(){var e=a(this).data("hide");e||n.push(this.value)}),t.value=n,e},x.prototype.parseData=function(e){var t=this,n=t.config,i=[];return layui.each(n.data,function(t,l){l=("function"==typeof n.parseData?n.parseData(l):l)||l,i.push(l=a.extend({},l)),layui.each(n.value,function(e,a){a==l.value&&(l.selected=!0)}),e&&e(l)}),n.data=i,t},x.prototype.getData=function(e){var a=this,t=a.config,n=[];return a.setValue(),layui.each(e||t.value,function(e,a){layui.each(t.data,function(e,t){delete t.selected,a==t.value&&n.push(t)})}),n},x.prototype.events=function(){var e=this,t=e.config;e.elem.on("click",'input[lay-filter="layTransferCheckbox"]+',function(){var t=a(this).prev(),n=t[0].checked,i=t.parents("."+s).eq(0).find("."+y);t[0].disabled||("all"===t.attr("lay-type")&&i.find('input[type="checkbox"]').each(function(){this.disabled||(this.checked=n)}),e.renderCheckBtn({stopNone:!0}))}),e.layBtn.on("click",function(){var n=a(this),i=n.data("index"),l=e.layBox.eq(i),r=[];if(!n.hasClass(o)){e.layBox.eq(i).each(function(t){var n=a(this),i=n.find("."+y);i.children("li").each(function(){var t=a(this),n=t.find('input[type="checkbox"]'),i=n.data("hide");n[0].checked&&!i&&(n[0].checked=!1,l.siblings("."+s).find("."+y).append(t.clone()),t.remove(),r.push(n[0].value)),e.setValue()})}),e.renderCheckBtn();var c=l.siblings("."+s).find("."+h+" input");""===c.val()||c.trigger("keyup"),t.onchange&&t.onchange(e.getData(r),i)}}),e.laySearch.find("input").on("keyup",function(){var n=this.value,i=a(this).parents("."+h).eq(0).siblings("."+y),l=i.children("li");l.each(function(){var e=a(this),t=e.find('input[type="checkbox"]'),i=t[0].title.indexOf(n)!==-1;e[i?"removeClass":"addClass"](c),t.data("hide",!i)}),e.renderCheckBtn();var r=l.length===i.children("li."+c).length;e.noneView(i,r?t.text.searchNone:"")})},r.that={},r.config={},l.reload=function(e,a){var t=r.that[e];return t.reload(a),r.call(t)},l.getData=function(e){var a=r.that[e];return a.getData()},l.render=function(e){var a=new x(e);return r.call(a)},e(i,l)});layui.define(["laytpl","laypage","layer","form","util"],function(e){"use strict";var t=layui.$,i=layui.laytpl,a=layui.laypage,l=layui.layer,n=layui.form,o=(layui.util,layui.hint()),r=layui.device(),d={config:{checkName:"LAY_CHECKED",indexName:"LAY_TABLE_INDEX"},cache:{},index:layui.table?layui.table.index+1e4:0,set:function(e){var i=this;return i.config=t.extend({},i.config,e),i},on:function(e,t){return layui.onevent.call(this,y,e,t)}},c=function(){var e=this,t=e.config,i=t.id||t.index;return i&&(c.that[i]=e,c.config[i]=t),{config:t,reload:function(t){e.reload.call(e,t)},setColsWidth:function(){e.setColsWidth.call(e)},resize:function(){e.resize.call(e)}}},s=function(e){var t=c.config[e];return t||o.error("The ID option was not found in the table instance"),t||null},u=function(e,a,l,n){var o=e.templet?function(){return"function"==typeof e.templet?e.templet(l):i(t(e.templet).html()||String(a)).render(l)}():a;return n?t("
                    "+o+"
                    ").text():o},y="table",h=".layui-table",f="layui-hide",p="layui-none",v="layui-table-view",m=".layui-table-tool",g=".layui-table-box",b=".layui-table-init",x=".layui-table-header",k=".layui-table-body",C=".layui-table-main",w=".layui-table-fixed",T=".layui-table-fixed-l",A=".layui-table-fixed-r",L=".layui-table-total",N=".layui-table-page",S=".layui-table-sort",R="layui-table-edit",W="layui-table-hover",_=function(e){var t='{{#if(item2.colspan){}} colspan="{{item2.colspan}}"{{#} if(item2.rowspan){}} rowspan="{{item2.rowspan}}"{{#}}}';return e=e||{},['',"","{{# layui.each(d.data.cols, function(i1, item1){ }}","","{{# layui.each(item1, function(i2, item2){ }}",'{{# if(item2.fixed && item2.fixed !== "right"){ left = true; } }}','{{# if(item2.fixed === "right"){ right = true; } }}',function(){return e.fixed&&"right"!==e.fixed?'{{# if(item2.fixed && item2.fixed !== "right"){ }}':"right"===e.fixed?'{{# if(item2.fixed === "right"){ }}':""}(),"{{# var isSort = !(item2.colGroup) && item2.sort; }}",'",e.fixed?"{{# }; }}":"","{{# }); }}","","{{# }); }}","","
                    ','
                    ','{{# if(item2.type === "checkbox"){ }}','',"{{# } else { }}",'{{item2.title||""}}',"{{# if(isSort){ }}",'',"{{# } }}","{{# } }}","
                    ","
                    "].join("")},E=['',"","
                    "].join(""),z=['
                    ',"{{# if(d.data.toolbar){ }}",'
                    ','
                    ','
                    ',"
                    ","{{# } }}",'
                    ',"{{# if(d.data.loading){ }}",'
                    ','',"
                    ","{{# } }}","{{# var left, right; }}",'
                    ',_(),"
                    ",'
                    ',E,"
                    ","{{# if(left){ }}",'
                    ','
                    ',_({fixed:!0}),"
                    ",'
                    ',E,"
                    ","
                    ","{{# }; }}","{{# if(right){ }}",'
                    ','
                    ',_({fixed:"right"}),'
                    ',"
                    ",'
                    ',E,"
                    ","
                    ","{{# }; }}","
                    ","{{# if(d.data.totalRow){ }}",'
                    ','','',"
                    ","
                    ","{{# } }}","{{# if(d.data.page){ }}",'
                    ','
                    ',"
                    ","{{# } }}","","
                    "].join(""),H=t(window),j=t(document),F=function(e){var i=this;i.index=++d.index,i.config=t.extend({},i.config,d.config,e),i.render()};F.prototype.config={limit:10,loading:!0,cellMinWidth:60,defaultToolbar:["filter","exports","print"],autoSort:!0,text:{none:"无数据"}},F.prototype.render=function(){var e=this,a=e.config;if(a.elem=t(a.elem),a.where=a.where||{},a.id=a.id||a.elem.attr("id")||e.index,a.request=t.extend({pageName:"page",limitName:"limit"},a.request),a.response=t.extend({statusName:"code",statusCode:0,msgName:"msg",dataName:"data",totalRowName:"totalRow",countName:"count"},a.response),"object"==typeof a.page&&(a.limit=a.page.limit||a.limit,a.limits=a.page.limits||a.limits,e.page=a.page.curr=a.page.curr||1,delete a.page.elem,delete a.page.jump),!a.elem[0])return e;a.height&&/^full-\d+$/.test(a.height)&&(e.fullHeightGap=a.height.split("-")[1],a.height=H.height()-e.fullHeightGap),e.setInit();var l=a.elem,n=l.next("."+v),o=e.elem=t(i(z).render({VIEW_CLASS:v,data:a,index:e.index}));if(a.index=e.index,e.key=a.id||a.index,n[0]&&n.remove(),l.after(o),e.layTool=o.find(m),e.layBox=o.find(g),e.layHeader=o.find(x),e.layMain=o.find(C),e.layBody=o.find(k),e.layFixed=o.find(w),e.layFixLeft=o.find(T),e.layFixRight=o.find(A),e.layTotal=o.find(L),e.layPage=o.find(N),e.renderToolbar(),e.fullSize(),a.cols.length>1){var r=e.layFixed.find(x).find("th");r.height(e.layHeader.height()-1-parseFloat(r.css("padding-top"))-parseFloat(r.css("padding-bottom")))}e.pullData(e.page),e.events()},F.prototype.initOpts=function(e){var t=this,i=(t.config,{checkbox:48,radio:48,space:15,numbers:40});e.checkbox&&(e.type="checkbox"),e.space&&(e.type="space"),e.type||(e.type="normal"),"normal"!==e.type&&(e.unresize=!0,e.width=e.width||i[e.type])},F.prototype.setInit=function(e){var t=this,i=t.config;return i.clientWidth=i.width||function(){var e=function(t){var a,l;t=t||i.elem.parent(),a=t.width();try{l="none"===t.css("display")}catch(n){}return!t[0]||a&&!l?a:e(t.parent())};return e()}(),"width"===e?i.clientWidth:void layui.each(i.cols,function(e,a){layui.each(a,function(l,n){if(!n)return void a.splice(l,1);if(n.key=e+"-"+l,n.hide=n.hide||!1,n.colGroup||n.colspan>1){var o=0;layui.each(i.cols[e+1],function(t,i){i.HAS_PARENT||o>1&&o==n.colspan||(i.HAS_PARENT=!0,i.parentKey=e+"-"+l,o+=parseInt(i.colspan>1?i.colspan:1))}),n.colGroup=!0}t.initOpts(n)})})},F.prototype.renderToolbar=function(){var e=this,a=e.config,l=['
                    ','
                    ','
                    '].join(""),n=e.layTool.find(".layui-table-tool-temp");if("default"===a.toolbar)n.html(l);else if("string"==typeof a.toolbar){var o=t(a.toolbar).html()||"";o&&n.html(i(o).render(a))}var r={filter:{title:"筛选列",layEvent:"LAYTABLE_COLS",icon:"layui-icon-cols"},exports:{title:"导出",layEvent:"LAYTABLE_EXPORT",icon:"layui-icon-export"},print:{title:"打印",layEvent:"LAYTABLE_PRINT",icon:"layui-icon-print"}},d=[];"object"==typeof a.defaultToolbar&&layui.each(a.defaultToolbar,function(e,t){var i="string"==typeof t?r[t]:t;i&&d.push('
                    ')}),e.layTool.find(".layui-table-tool-self").html(d.join(""))},F.prototype.setParentCol=function(e,t){var i=this,a=i.config,l=i.layHeader.find('th[data-key="'+a.index+"-"+t+'"]'),n=parseInt(l.attr("colspan"))||0;if(l[0]){var o=t.split("-"),r=a.cols[o[0]][o[1]];e?n--:n++,l.attr("colspan",n),l[n<1?"addClass":"removeClass"](f),r.colspan=n,r.hide=n<1;var d=l.data("parentkey");d&&i.setParentCol(e,d)}},F.prototype.setColsPatch=function(){var e=this,t=e.config;layui.each(t.cols,function(t,i){layui.each(i,function(t,i){i.hide&&e.setParentCol(i.hide,i.parentKey)})})},F.prototype.setColsWidth=function(){var e=this,t=e.config,i=0,a=0,l=0,n=0,o=e.setInit("width");e.eachCols(function(e,t){t.hide||i++}),o=o-function(){return"line"===t.skin||"nob"===t.skin?2:i+1}()-e.getScrollWidth(e.layMain[0])-1;var r=function(e){layui.each(t.cols,function(i,r){layui.each(r,function(i,d){var c=0,s=d.minWidth||t.cellMinWidth;return d?void(d.colGroup||d.hide||(e?l&&ln&&a&&(l=(o-n)/a)};r(),r(!0),e.autoColNums=a,e.eachCols(function(i,a){var n=a.minWidth||t.cellMinWidth;a.colGroup||a.hide||(0===a.width?e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(l>=n?l:n)+"px"}):/\d+%$/.test(a.width)&&e.getCssRule(t.index+"-"+a.key,function(e){e.style.width=Math.floor(parseFloat(a.width)/100*o)+"px"}))});var d=e.layMain.width()-e.getScrollWidth(e.layMain[0])-e.layMain.children("table").outerWidth();if(e.autoColNums&&d>=-i&&d<=i){var c=function(t){var i;return t=t||e.layHeader.eq(0).find("thead th:last-child"),i=t.data("field"),!i&&t.prev()[0]?c(t.prev()):t},s=c(),u=s.data("key");e.getCssRule(u,function(t){var i=t.style.width||s.outerWidth();t.style.width=parseFloat(i)+d+"px",e.layMain.height()-e.layMain.prop("clientHeight")>0&&(t.style.width=parseFloat(t.style.width)-1+"px")})}e.loading(!0)},F.prototype.resize=function(){var e=this;e.fullSize(),e.setColsWidth(),e.scrollPatch()},F.prototype.reload=function(e){var i=this;e=e||{},delete i.haveInit,e.data&&e.data.constructor===Array&&delete i.config.data,i.config=t.extend(!0,{},i.config,e),i.render()},F.prototype.errorView=function(e){var i=this,a=i.layMain.find("."+p),l=t('
                    '+(e||"Error")+"
                    ");a[0]&&(i.layNone.remove(),a.remove()),i.layFixed.addClass(f),i.layMain.find("tbody").html(""),i.layMain.append(i.layNone=l),d.cache[i.key]=[]},F.prototype.page=1,F.prototype.pullData=function(e){var i=this,a=i.config,l=a.request,n=a.response,o=function(){"object"==typeof a.initSort&&i.sort(a.initSort.field,a.initSort.type)};if(i.startTime=(new Date).getTime(),a.url){var r={};r[l.pageName]=e,r[l.limitName]=a.limit;var d=t.extend(r,a.where);a.contentType&&0==a.contentType.indexOf("application/json")&&(d=JSON.stringify(d)),i.loading(),t.ajax({type:a.method||"get",url:a.url,contentType:a.contentType,data:d,dataType:"json",headers:a.headers||{},success:function(t){"function"==typeof a.parseData&&(t=a.parseData(t)||t),t[n.statusName]!=n.statusCode?(i.renderForm(),i.errorView(t[n.msgName]||'返回的数据不符合规范,正确的成功状态码应为:"'+n.statusName+'": '+n.statusCode)):(i.renderData(t,e,t[n.countName]),o(),a.time=(new Date).getTime()-i.startTime+" ms"),i.setColsWidth(),"function"==typeof a.done&&a.done(t,e,t[n.countName])},error:function(e,t){i.errorView("数据接口请求异常:"+t),i.renderForm(),i.setColsWidth()}})}else if(a.data&&a.data.constructor===Array){var c={},s=e*a.limit-a.limit;c[n.dataName]=a.data.concat().splice(s,a.limit),c[n.countName]=a.data.length,"object"==typeof a.totalRow&&(c[n.totalRowName]=t.extend({},a.totalRow)),i.renderData(c,e,c[n.countName]),o(),i.setColsWidth(),"function"==typeof a.done&&a.done(c,e,c[n.countName])}},F.prototype.eachCols=function(e){var t=this;return d.eachCols(null,e,t.config.cols),t},F.prototype.renderData=function(e,n,o,r){var c=this,s=c.config,y=e[s.response.dataName]||[],h=e[s.response.totalRowName],v=[],m=[],g=[],b=function(){var e;return!r&&c.sortKey?c.sort(c.sortKey.field,c.sortKey.sort,!0):(layui.each(y,function(a,l){var o=[],y=[],h=[],p=a+s.limit*(n-1)+1;0!==l.length&&(r||(l[d.config.indexName]=a),c.eachCols(function(n,r){var c=r.field||n,v=s.index+"-"+r.key,m=l[c];if(void 0!==m&&null!==m||(m=""),!r.colGroup){var g=['','
                    '+function(){var n=t.extend(!0,{LAY_INDEX:p},l),o=d.config.checkName;switch(r.type){case"checkbox":return'";case"radio":return n[o]&&(e=a),'';case"numbers":return p}return r.toolbar?i(t(r.toolbar).html()||"").render(n):u(r,m,n)}(),"
                    "].join("");o.push(g),r.fixed&&"right"!==r.fixed&&y.push(g),"right"===r.fixed&&h.push(g)}}),v.push(''+o.join("")+""),m.push(''+y.join("")+""),g.push(''+h.join("")+""))}),c.layBody.scrollTop(0),c.layMain.find("."+p).remove(),c.layMain.find("tbody").html(v.join("")),c.layFixLeft.find("tbody").html(m.join("")),c.layFixRight.find("tbody").html(g.join("")),c.renderForm(),"number"==typeof e&&c.setThisRowChecked(e),c.syncCheckAll(),c.haveInit?c.scrollPatch():setTimeout(function(){c.scrollPatch()},50),c.haveInit=!0,l.close(c.tipsIndex),s.HAS_SET_COLS_PATCH||c.setColsPatch(),void(s.HAS_SET_COLS_PATCH=!0))};return d.cache[c.key]=y,c.layPage[0==o||0===y.length&&1==n?"addClass":"removeClass"](f),r?b():0===y.length?(c.renderForm(),c.errorView(s.text.none)):(c.layFixed.removeClass(f),b(),c.renderTotal(y,h),void(s.page&&(s.page=t.extend({elem:"layui-table-page"+s.index,count:o,limit:s.limit,limits:s.limits||[10,20,30,40,50,60,70,80,90],groups:3,layout:["prev","page","next","skip","count","limit"],prev:'',next:'',jump:function(e,t){t||(c.page=e.curr,s.limit=e.limit,c.pullData(e.curr))}},s.page),s.page.count=o,a.render(s.page))))},F.prototype.renderTotal=function(e,t){var i=this,a=i.config,l={};if(a.totalRow){layui.each(e,function(e,t){0!==t.length&&i.eachCols(function(e,i){var a=i.field||e,n=t[a];i.totalRow&&(l[a]=(l[a]||0)+(parseFloat(n)||0))})}),i.dataTotal={};var n=[];i.eachCols(function(e,o){var r=o.field||e,d=function(){var e=o.totalRowText||"",i=parseFloat(l[r]).toFixed(2),a={};return a[r]=i,i=u(o,i,a),t?t[o.field]||e:o.totalRow?i||e:e}(),c=['','
                    '+d,"
                    "].join("");o.field&&(i.dataTotal[r]=d),n.push(c)}),i.layTotal.find("tbody").html(""+n.join("")+"")}},F.prototype.getColElem=function(e,t){var i=this,a=i.config;return e.eq(0).find(".laytable-cell-"+(a.index+"-"+t)+":eq(0)")},F.prototype.renderForm=function(e){n.render(e,"LAY-table-"+this.index)},F.prototype.setThisRowChecked=function(e){var t=this,i=(t.config,"layui-table-click"),a=t.layBody.find('tr[data-index="'+e+'"]');a.addClass(i).siblings("tr").removeClass(i)},F.prototype.sort=function(e,i,a,l){var n,r,c=this,s={},u=c.config,h=u.elem.attr("lay-filter"),f=d.cache[c.key];"string"==typeof e&&c.layHeader.find("th").each(function(i,a){var l=t(this),o=l.data("field");if(o===e)return e=l,n=o,!1});try{var n=n||e.data("field"),p=e.data("key");if(c.sortKey&&!a&&n===c.sortKey.field&&i===c.sortKey.sort)return;var v=c.layHeader.find("th .laytable-cell-"+p).find(S);c.layHeader.find("th").find(S).removeAttr("lay-sort"),v.attr("lay-sort",i||null),c.layFixed.find("th")}catch(m){return o.error("Table modules: Did not match to field")}c.sortKey={field:n,sort:i},u.autoSort&&("asc"===i?r=layui.sort(f,n):"desc"===i?r=layui.sort(f,n,!0):(r=layui.sort(f,d.config.indexName),delete c.sortKey)),s[u.response.dataName]=r||f,c.renderData(s,c.page,c.count,!0),l&&layui.event.call(e,y,"sort("+h+")",{field:n,type:i})},F.prototype.loading=function(e){var i=this,a=i.config;a.loading&&(e?(i.layInit&&i.layInit.remove(),delete i.layInit,i.layBox.find(b).remove()):(i.layInit=t(['
                    ','',"
                    "].join("")),i.layBox.append(i.layInit)))},F.prototype.setCheckData=function(e,t){var i=this,a=i.config,l=d.cache[i.key];l[e]&&l[e].constructor!==Array&&(l[e][a.checkName]=t)},F.prototype.syncCheckAll=function(){var e=this,t=e.config,i=e.layHeader.find('input[name="layTableCheckbox"]'),a=function(i){return e.eachCols(function(e,a){"checkbox"===a.type&&(a[t.checkName]=i)}),i};i[0]&&(d.checkStatus(e.key).isAll?(i[0].checked||(i.prop("checked",!0),e.renderForm("checkbox")),a(!0)):(i[0].checked&&(i.prop("checked",!1),e.renderForm("checkbox")),a(!1)))},F.prototype.getCssRule=function(e,t){var i=this,a=i.elem.find("style")[0],l=a.sheet||a.styleSheet||{},n=l.cssRules||l.rules;layui.each(n,function(i,a){if(a.selectorText===".laytable-cell-"+e)return t(a),!0})},F.prototype.fullSize=function(){var e,t=this,i=t.config,a=i.height;t.fullHeightGap&&(a=H.height()-t.fullHeightGap,a<135&&(a=135),t.elem.css("height",a)),a&&(e=parseFloat(a)-(t.layHeader.outerHeight()||38),i.toolbar&&(e-=t.layTool.outerHeight()||50),i.totalRow&&(e-=t.layTotal.outerHeight()||40),i.page&&(e-=t.layPage.outerHeight()||41),t.layMain.css("height",e-2))},F.prototype.getScrollWidth=function(e){var t=0;return e?t=e.offsetWidth-e.clientWidth:(e=document.createElement("div"),e.style.width="100px",e.style.height="100px",e.style.overflowY="scroll",document.body.appendChild(e),t=e.offsetWidth-e.clientWidth,document.body.removeChild(e)),t},F.prototype.scrollPatch=function(){var e=this,i=e.layMain.children("table"),a=e.layMain.width()-e.layMain.prop("clientWidth"),l=e.layMain.height()-e.layMain.prop("clientHeight"),n=(e.getScrollWidth(e.layMain[0]),i.outerWidth()-e.layMain.width()),o=function(e){if(a&&l){if(e=e.eq(0),!e.find(".layui-table-patch")[0]){var i=t('
                    ');i.find("div").css({width:a}),e.find("tr").append(i)}}else e.find(".layui-table-patch").remove()};o(e.layHeader),o(e.layTotal);var r=e.layMain.height(),d=r-l;e.layFixed.find(k).css("height",i.height()>=d?d:"auto"),e.layFixRight[n>0?"removeClass":"addClass"](f),e.layFixRight.css("right",a-1)},F.prototype.events=function(){var e,i=this,a=i.config,o=t("body"),c={},s=i.layHeader.find("th"),h=".layui-table-cell",p=a.elem.attr("lay-filter");i.layTool.on("click","*[lay-event]",function(e){var o=t(this),c=o.attr("lay-event"),s=function(e){var l=t(e.list),n=t('
                      ');n.html(l),a.height&&n.css("max-height",a.height-(i.layTool.outerHeight()||50)),o.find(".layui-table-tool-panel")[0]||o.append(n),i.renderForm(),n.on("click",function(e){layui.stope(e)}),e.done&&e.done(n,l)};switch(layui.stope(e),j.trigger("table.tool.panel.remove"),l.close(i.tipsIndex),c){case"LAYTABLE_COLS":s({list:function(){var e=[];return i.eachCols(function(t,i){i.field&&"normal"==i.type&&e.push('
                    • ')}),e.join("")}(),done:function(){n.on("checkbox(LAY_TABLE_TOOL_COLS)",function(e){var l=t(e.elem),n=this.checked,o=l.data("key"),r=l.data("parentkey");layui.each(a.cols,function(e,t){layui.each(t,function(t,l){if(e+"-"+t===o){var d=l.hide;l.hide=!n,i.elem.find('*[data-key="'+a.index+"-"+o+'"]')[n?"removeClass":"addClass"](f),d!=l.hide&&i.setParentCol(!n,r),i.resize()}})})})}});break;case"LAYTABLE_EXPORT":r.ie?l.tips("导出功能不支持 IE,请用 Chrome 等高级浏览器导出",this,{tips:3}):s({list:function(){return['
                    • 导出到 Csv 文件
                    • ','
                    • 导出到 Excel 文件
                    • '].join("")}(),done:function(e,l){l.on("click",function(){var e=t(this).data("type");d.exportFile.call(i,a.id,null,e)})}});break;case"LAYTABLE_PRINT":var u=window.open("打印窗口","_blank"),h=[""].join(""),v=t(i.layHeader.html());v.append(i.layMain.find("table").html()),v.append(i.layTotal.find("table").html()),v.find("th.layui-table-patch").remove(),v.find(".layui-table-col-special").remove(),u.document.write(h+v.prop("outerHTML")),u.document.close(),u.print(),u.close()}layui.event.call(this,y,"toolbar("+p+")",t.extend({event:c,config:a},{}))}),s.on("mousemove",function(e){var i=t(this),a=i.offset().left,l=e.clientX-a;i.data("unresize")||c.resizeStart||(c.allowResize=i.width()-l<=10,o.css("cursor",c.allowResize?"col-resize":""))}).on("mouseleave",function(){t(this);c.resizeStart||o.css("cursor","")}).on("mousedown",function(e){var l=t(this);if(c.allowResize){var n=l.data("key");e.preventDefault(),c.resizeStart=!0,c.offset=[e.clientX,e.clientY],i.getCssRule(n,function(e){var t=e.style.width||l.outerWidth();c.rule=e,c.ruleWidth=parseFloat(t),c.minWidth=l.data("minwidth")||a.cellMinWidth})}}),j.on("mousemove",function(t){if(c.resizeStart){if(t.preventDefault(),c.rule){var a=c.ruleWidth+t.clientX-c.offset[0];a');return n[0].value=i.data("content")||l.text(),i.find("."+R)[0]||i.append(n),n.focus(),void layui.stope(e)}}).on("mouseenter","td",function(){b.call(this)}).on("mouseleave","td",function(){b.call(this,"hide")});var g="layui-table-grid-down",b=function(e){var i=t(this),a=i.children(h);if(!i.data("off"))if(e)i.find(".layui-table-grid-down").remove();else if(a.prop("scrollWidth")>a.outerWidth()){if(a.find("."+g)[0])return;i.append('
                      ')}};i.layBody.on("click","."+g,function(e){var n=t(this),o=n.parent(),d=o.children(h);i.tipsIndex=l.tips(['
                      ',d.html(),"
                      ",''].join(""),d[0],{tips:[3,""],time:-1,anim:-1,maxWidth:r.ios||r.android?300:i.elem.width()/2,isOutAnim:!1,skin:"layui-table-tips",success:function(e,t){e.find(".layui-table-tips-c").on("click",function(){l.close(t)})}}),layui.stope(e)}),i.layBody.on("click","*[lay-event]",function(){var e=t(this),a=e.parents("tr").eq(0).data("index");layui.event.call(this,y,"tool("+p+")",v.call(this,{event:e.attr("lay-event")})),i.setThisRowChecked(a)}),i.layMain.on("scroll",function(){var e=t(this),a=e.scrollLeft(),n=e.scrollTop();i.layHeader.scrollLeft(a),i.layTotal.scrollLeft(a),i.layFixed.find(k).scrollTop(n),l.close(i.tipsIndex)}),H.on("resize",function(){i.resize()})},function(){j.on("click",function(){j.trigger("table.remove.tool.panel")}),j.on("table.remove.tool.panel",function(){t(".layui-table-tool-panel").remove()})}(),d.init=function(e,i){i=i||{};var a=this,l=t(e?'table[lay-filter="'+e+'"]':h+"[lay-data]"),n="Table element property lay-data configuration item has a syntax error: ";return l.each(function(){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){o.error(n+l)}var c=[],s=t.extend({elem:this,cols:[],data:[],skin:a.attr("lay-skin"),size:a.attr("lay-size"),even:"string"==typeof a.attr("lay-even")},d.config,i,l);e&&a.hide(),a.find("thead>tr").each(function(e){s.cols[e]=[],t(this).children().each(function(i){var a=t(this),l=a.attr("lay-data");try{l=new Function("return "+l)()}catch(r){return o.error(n+l)}var d=t.extend({title:a.text(),colspan:a.attr("colspan")||0,rowspan:a.attr("rowspan")||0},l);d.colspan<2&&c.push(d),s.cols[e].push(d)})}),a.find("tbody>tr").each(function(e){var i=t(this),a={};i.children("td").each(function(e,i){var l=t(this),n=l.data("field");if(n)return a[n]=l.html()}),layui.each(c,function(e,t){var l=i.children("td").eq(e);a[t.field]=l.html()}),s.data[e]=a}),d.render(s)}),a},c.that={},c.config={},d.eachCols=function(e,i,a){var l=c.config[e]||{},n=[],o=0;a=t.extend(!0,[],a||l.cols),layui.each(a,function(e,t){layui.each(t,function(t,i){if(i.colGroup){var l=0;o++,i.CHILD_COLS=[],layui.each(a[e+1],function(e,t){t.PARENT_COL_INDEX||l>1&&l==i.colspan||(t.PARENT_COL_INDEX=o,i.CHILD_COLS.push(t),l+=parseInt(t.colspan>1?t.colspan:1))})}i.PARENT_COL_INDEX||n.push(i)})});var r=function(e){layui.each(e||n,function(e,t){return t.CHILD_COLS?r(t.CHILD_COLS):void("function"==typeof i&&i(e,t))})};r()},d.checkStatus=function(e){var t=0,i=0,a=[],l=d.cache[e]||[];return layui.each(l,function(e,l){return l.constructor===Array?void i++:void(l[d.config.checkName]&&(t++,a.push(d.clearCacheKey(l))))}),{data:a,isAll:!!l.length&&t===l.length-i}},d.exportFile=function(e,t,i){var a=this;t=t||d.clearCacheKey(d.cache[e]),i=i||"csv";var l=c.config[e]||{},n={csv:"text/csv",xls:"application/vnd.ms-excel"}[i],s=document.createElement("a");return r.ie?o.error("IE_NOT_SUPPORT_EXPORTS"):(s.href="data:"+n+";charset=utf-8,\ufeff"+encodeURIComponent(function(){var i=[],l=[],n=[];return layui.each(t,function(t,a){var n=[];"object"==typeof e?(layui.each(e,function(e,a){0==t&&i.push(a||"")}),layui.each(d.clearCacheKey(a),function(e,t){n.push('"'+(t||"")+'"')})):d.eachCols(e,function(e,l){if(l.field&&"normal"==l.type&&!l.hide){var o=a[l.field];void 0!==o&&null!==o||(o=""),0==t&&i.push(l.title||""),n.push('"'+u(l,o,a,"text")+'"')}}),l.push(n.join(","))}),layui.each(a.dataTotal,function(e,t){n.push(t)}),i.join(",")+"\r\n"+l.join("\r\n")+"\r\n"+n.join(",")}()),s.download=(l.title||"table_"+(l.index||""))+"."+i,document.body.appendChild(s),s.click(),void document.body.removeChild(s))},d.resize=function(e){if(e){var t=s(e);if(!t)return;c.that[e].resize()}else layui.each(c.that,function(){this.resize()})},d.reload=function(e,t){var i=s(e);if(i){var a=c.that[e];return a.reload(t),c.call(a)}},d.render=function(e){var t=new F(e);return c.call(t)},d.clearCacheKey=function(e){return e=t.extend({},e),delete e[d.config.checkName],delete e[d.config.indexName],e},d.init(),e(y,d)});layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",l=">*[carousel-item]>*",o="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(l),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.elemItem.length<=1||(e.indicator(),e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(clearInterval(e.timer),e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
                        ',function(){var i=[];return layui.each(e.elemItem,function(e){i.push("")}),i.join("")}(),"
                      "].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a",u=1;u<=i.length;u++){var r='
                    • ";i.half&&parseInt(i.value)!==i.value&&u==Math.ceil(i.value)?n=n+'
                    • ":n+=r}n+=""+(i.text?''+i.value+"星":"")+"";var c=i.elem,f=c.next("."+t);f[0]&&f.remove(),e.elemTemp=a(n),i.span=e.elemTemp.next("span"),i.setText&&i.setText(i.value),c.html(e.elemTemp),c.addClass("layui-inline"),i.readonly||e.action()},v.prototype.setvalue=function(e){var a=this,i=a.config;i.value=e,a.render()},v.prototype.action=function(){var e=this,i=e.config,l=e.elemTemp,n=l.find("i").width();l.children("li").each(function(e){var t=e+1,v=a(this);v.on("click",function(e){if(i.value=t,i.half){var o=e.pageX-a(this).offset().left;o<=n/2&&(i.value=i.value-.5)}i.text&&l.next("span").text(i.value+"星"),i.choose&&i.choose(i.value),i.setText&&i.setText(i.value)}),v.on("mousemove",function(e){if(l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+t+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half){var c=e.pageX-a(this).offset().left;c<=n/2&&v.children("i").addClass(u).removeClass(s)}}),v.on("mouseleave",function(){l.find("i").each(function(){a(this).addClass(o).removeClass(r)}),l.find("i:lt("+Math.floor(i.value)+")").each(function(){a(this).addClass(s).removeClass(f)}),i.half&&parseInt(i.value)!==i.value&&l.children("li:eq("+Math.floor(i.value)+")").children("i").addClass(u).removeClass(c)})})},v.prototype.events=function(){var e=this;e.config},i.render=function(e){var a=new v(e);return l.call(a)},e(n,i)});layui.define("jquery",function(e){"use strict";var t=layui.$,i={fixbar:function(e){var i,n,a="layui-fixbar",o="layui-fixbar-top",r=t(document),l=t("body");e=t.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var c=[e.bar1,e.bar2,""],u=t(['
                        ',e.bar1?'
                      • '+c[0]+"
                      • ":"",e.bar2?'
                      • '+c[1]+"
                      • ":"",'
                      • '+c[2]+"
                      • ","
                      "].join("")),g=u.find("."+o),s=function(){var t=r.scrollTop();t>=e.showHeight?i||(g.show(),i=1):i&&(g.hide(),i=0)};t("."+a)[0]||("object"==typeof e.css&&u.css(e.css),l.append(u),s(),u.find("li").on("click",function(){var i=t(this),n=i.attr("lay-type");"top"===n&&t("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,n)}),r.on("scroll",function(){clearTimeout(n),n=setTimeout(function(){s()},100)}))},countdown:function(e,t,i){var n=this,a="function"==typeof t,o=new Date(e).getTime(),r=new Date(!t||a?(new Date).getTime():t).getTime(),l=o-r,c=[Math.floor(l/864e5),Math.floor(l/36e5)%24,Math.floor(l/6e4)%60,Math.floor(l/1e3)%60];a&&(i=t);var u=setTimeout(function(){n.countdown(e,r+1e3,i)},1e3);return i&&i(l>0?c:[0,0,0,0],t,u),l<=0&&clearTimeout(u),u},timeAgo:function(e,t){var i=this,n=[[],[]],a=(new Date).getTime()-new Date(e).getTime();return a>26784e5?(a=new Date(e),n[0][0]=i.digit(a.getFullYear(),4),n[0][1]=i.digit(a.getMonth()+1),n[0][2]=i.digit(a.getDate()),t||(n[1][0]=i.digit(a.getHours()),n[1][1]=i.digit(a.getMinutes()),n[1][2]=i.digit(a.getSeconds())),n[0].join("-")+" "+n[1].join(":")):a>=864e5?(a/1e3/60/60/24|0)+"天前":a>=36e5?(a/1e3/60/60|0)+"小时前":a>=18e4?(a/1e3/60|0)+"分钟前":a<0?"未来":"刚刚"},digit:function(e,t){var i="";e=String(e),t=t||2;for(var n=e.length;n/g,">").replace(/'/g,"'").replace(/"/g,""")},event:function(e,n,a){var o=t("body");return a=a||"click",n=i.event[e]=t.extend(!0,i.event[e],n)||{},i.event.UTIL_EVENT_CALLBACK=i.event.UTIL_EVENT_CALLBACK||{},o.off(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),i.event.UTIL_EVENT_CALLBACK[e]=function(){var i=t(this),a=i.attr(e);"function"==typeof n[a]&&n[a].call(this,i)},o.on(a,"*["+e+"]",i.event.UTIL_EVENT_CALLBACK[e]),n}};!function(e,t,i){"$:nomunge";function n(){a=t[l](function(){o.each(function(){var t=e(this),i=t.width(),n=t.height(),a=e.data(this,u);(i!==a.w||n!==a.h)&&t.trigger(c,[a.w=i,a.h=n])}),n()},r[g])}var a,o=e([]),r=e.resize=e.extend(e.resize,{}),l="setTimeout",c="resize",u=c+"-special-event",g="delay",s="throttleWindow";r[g]=250,r[s]=!0,e.event.special[c]={setup:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.add(t),e.data(this,u,{w:t.width(),h:t.height()}),1===o.length&&n()},teardown:function(){if(!r[s]&&this[l])return!1;var t=e(this);o=o.not(t),t.removeData(u),o.length||clearTimeout(a)},add:function(t){function n(t,n,o){var r=e(this),l=e.data(this,u)||{};l.w=n!==i?n:r.width(),l.h=o!==i?o:r.height(),a.apply(this,arguments)}if(!r[s]&&this[l])return!1;var a;return e.isFunction(t)?(a=t,n):(a=t.handler,void(t.handler=n))}}}(t,window),e("util",i)});layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),!i&&f.width()&&(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)});layui.define(["layer","form"],function(t){"use strict";var e=layui.$,i=layui.layer,a=layui.form,l=(layui.hint(),layui.device()),n="layedit",o="layui-show",r="layui-disabled",c=function(){var t=this;t.index=0,t.config={tool:["strong","italic","underline","del","|","left","center","right","|","link","unlink","face","image"],hideTool:[],height:280}};c.prototype.set=function(t){var i=this;return e.extend(!0,i.config,t),i},c.prototype.on=function(t,e){return layui.onevent(n,t,e)},c.prototype.build=function(t,i){i=i||{};var a=this,n=a.config,r="layui-layedit",c=e("string"==typeof t?"#"+t:t),u="LAY_layedit_"+ ++a.index,d=c.next("."+r),y=e.extend({},n,i),f=function(){var t=[],e={};return layui.each(y.hideTool,function(t,i){e[i]=!0}),layui.each(y.tool,function(i,a){C[a]&&!e[a]&&t.push(C[a])}),t.join("")}(),m=e(['
                      ','
                      '+f+"
                      ",'
                      ','',"
                      ","
                      "].join(""));return l.ie&&l.ie<8?c.removeClass("layui-hide").addClass(o):(d[0]&&d.remove(),s.call(a,m,c[0],y),c.addClass("layui-hide").after(m),a.index)},c.prototype.getContent=function(t){var e=u(t);if(e[0])return d(e[0].document.body.innerHTML)},c.prototype.getText=function(t){var i=u(t);if(i[0])return e(i[0].document.body).text()},c.prototype.setContent=function(t,i,a){var l=u(t);l[0]&&(a?e(l[0].document.body).append(i):e(l[0].document.body).html(i),layedit.sync(t))},c.prototype.sync=function(t){var i=u(t);if(i[0]){var a=e("#"+i[1].attr("textarea"));a.val(d(i[0].document.body.innerHTML))}},c.prototype.getSelection=function(t){var e=u(t);if(e[0]){var i=m(e[0].document);return document.selection?i.text:i.toString()}};var s=function(t,i,a){var l=this,n=t.find("iframe");n.css({height:a.height}).on("load",function(){var o=n.contents(),r=n.prop("contentWindow"),c=o.find("head"),s=e([""].join("")),u=o.find("body");c.append(s),u.attr("contenteditable","true").css({"min-height":a.height}).html(i.value||""),y.apply(l,[r,n,i,a]),g.call(l,r,t,a)})},u=function(t){var i=e("#LAY_layedit_"+t),a=i.prop("contentWindow");return[a,i]},d=function(t){return 8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),t},y=function(t,a,n,o){var r=t.document,c=e(r.body);c.on("keydown",function(t){var e=t.keyCode;if(13===e){var a=m(r),l=p(a),n=l.parentNode;if("pre"===n.tagName.toLowerCase()){if(t.shiftKey)return;return i.msg("请暂时用shift+enter"),!1}r.execCommand("formatBlock",!1,"

                      ")}}),e(n).parents("form").on("submit",function(){var t=c.html();8==l.ie&&(t=t.replace(/<.+>/g,function(t){return t.toLowerCase()})),n.value=t}),c.on("paste",function(e){r.execCommand("formatBlock",!1,"

                      "),setTimeout(function(){f.call(t,c),n.value=c.html()},100)})},f=function(t){var i=this;i.document;t.find("*[style]").each(function(){var t=this.style.textAlign;this.removeAttribute("style"),e(this).css({"text-align":t||""})}),t.find("table").addClass("layui-table"),t.find("script,link").remove()},m=function(t){return t.selection?t.selection.createRange():t.getSelection().getRangeAt(0)},p=function(t){return t.endContainer||t.parentElement().childNodes[0]},v=function(t,i,a){var l=this.document,n=document.createElement(t);for(var o in i)n.setAttribute(o,i[o]);if(n.removeAttribute("text"),l.selection){var r=a.text||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.pasteHTML(e(n).prop("outerHTML")),a.select()}else{var r=a.toString()||i.text;if("a"===t&&!r)return;r&&(n.innerHTML=r),a.deleteContents(),a.insertNode(n)}},h=function(t,i){var a=this.document,l="layedit-tool-active",n=p(m(a)),o=function(e){return t.find(".layedit-tool-"+e)};i&&i[i.hasClass(l)?"removeClass":"addClass"](l),t.find(">i").removeClass(l),o("unlink").addClass(r),e(n).parents().each(function(){var t=this.tagName.toLowerCase(),e=this.style.textAlign;"b"!==t&&"strong"!==t||o("b").addClass(l),"i"!==t&&"em"!==t||o("i").addClass(l),"u"===t&&o("u").addClass(l),"strike"===t&&o("d").addClass(l),"p"===t&&("center"===e?o("center").addClass(l):"right"===e?o("right").addClass(l):o("left").addClass(l)),"a"===t&&(o("link").addClass(l),o("unlink").removeClass(r))})},g=function(t,a,l){var n=t.document,o=e(n.body),c={link:function(i){var a=p(i),l=e(a).parent();b.call(o,{href:l.attr("href"),target:l.attr("target")},function(e){var a=l[0];"A"===a.tagName?a.href=e.url:v.call(t,"a",{target:e.target,href:e.url,text:e.url},i)})},unlink:function(t){n.execCommand("unlink")},face:function(e){x.call(this,function(i){v.call(t,"img",{src:i.src,alt:i.alt},e)})},image:function(a){var n=this;layui.use("upload",function(o){var r=l.uploadImage||{};o.render({url:r.url,method:r.type,elem:e(n).find("input")[0],done:function(e){0==e.code?(e.data=e.data||{},v.call(t,"img",{src:e.data.src,alt:e.data.title},a)):i.msg(e.msg||"上传失败")}})})},code:function(e){k.call(o,function(i){v.call(t,"pre",{text:i.code,"lay-lang":i.lang},e)})},help:function(){i.open({type:2,title:"帮助",area:["600px","380px"],shadeClose:!0,shade:.1,skin:"layui-layer-msg",content:["http://www.layui.com/about/layedit/help.html","no"]})}},s=a.find(".layui-layedit-tool"),u=function(){var i=e(this),a=i.attr("layedit-event"),l=i.attr("lay-command");if(!i.hasClass(r)){o.focus();var u=m(n);u.commonAncestorContainer;l?(n.execCommand(l),/justifyLeft|justifyCenter|justifyRight/.test(l)&&n.execCommand("formatBlock",!1,"

                      "),setTimeout(function(){o.focus()},10)):c[a]&&c[a].call(this,u),h.call(t,s,i)}},d=/image/;s.find(">i").on("mousedown",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)||u.call(this)}).on("click",function(){var t=e(this),i=t.attr("layedit-event");d.test(i)&&u.call(this)}),o.on("click",function(){h.call(t,s),i.close(x.index)})},b=function(t,e){var l=this,n=i.open({type:1,id:"LAY_layedit_link",area:"350px",shade:.05,shadeClose:!0,moveType:1,title:"超链接",skin:"layui-layer-msg",content:['

                        ','
                      • ','','
                        ','',"
                        ","
                      • ",'
                      • ','','
                        ','",'","
                        ","
                      • ",'
                      • ','','',"
                      • ","
                      "].join(""),success:function(t,n){var o="submit(layedit-link-yes)";a.render("radio"),t.find(".layui-btn-primary").on("click",function(){i.close(n),l.focus()}),a.on(o,function(t){i.close(b.index),e&&e(t.field)})}});b.index=n},x=function(t){var a=function(){var t=["[微笑]","[嘻嘻]","[哈哈]","[可爱]","[可怜]","[挖鼻]","[吃惊]","[害羞]","[挤眼]","[闭嘴]","[鄙视]","[爱你]","[泪]","[偷笑]","[亲亲]","[生病]","[太开心]","[白眼]","[右哼哼]","[左哼哼]","[嘘]","[衰]","[委屈]","[吐]","[哈欠]","[抱抱]","[怒]","[疑问]","[馋嘴]","[拜拜]","[思考]","[汗]","[困]","[睡]","[钱]","[失望]","[酷]","[色]","[哼]","[鼓掌]","[晕]","[悲伤]","[抓狂]","[黑线]","[阴险]","[怒骂]","[互粉]","[心]","[伤心]","[猪头]","[熊猫]","[兔子]","[ok]","[耶]","[good]","[NO]","[赞]","[来]","[弱]","[草泥马]","[神马]","[囧]","[浮云]","[给力]","[围观]","[威武]","[奥特曼]","[礼物]","[钟]","[话筒]","[蜡烛]","[蛋糕]"],e={};return layui.each(t,function(t,i){e[i]=layui.cache.dir+"images/face/"+t+".gif"}),e}();return x.hide=x.hide||function(t){"face"!==e(t.target).attr("layedit-event")&&i.close(x.index)},x.index=i.tips(function(){var t=[];return layui.each(a,function(e,i){t.push('
                    • '+e+'
                    • ')}),'
                        '+t.join("")+"
                      "}(),this,{tips:1,time:0,skin:"layui-box layui-util-face",maxWidth:500,success:function(l,n){l.css({marginTop:-4,marginLeft:-10}).find(".layui-clear>li").on("click",function(){t&&t({src:a[this.title],alt:this.title}),i.close(n)}),e(document).off("click",x.hide).on("click",x.hide)}})},k=function(t){var e=this,l=i.open({type:1,id:"LAY_layedit_code",area:"550px",shade:.05,shadeClose:!0,moveType:1,title:"插入代码",skin:"layui-layer-msg",content:['
                        ','
                      • ','','
                        ','","
                        ","
                      • ",'
                      • ','','
                        ','',"
                        ","
                      • ",'
                      • ','','',"
                      • ","
                      "].join(""),success:function(l,n){var o="submit(layedit-code-yes)";a.render("select"),l.find(".layui-btn-primary").on("click",function(){i.close(n),e.focus()}),a.on(o,function(e){i.close(k.index),t&&t(e.field)})}});k.index=l},C={html:'',strong:'',italic:'',underline:'',del:'',"|":'',left:'',center:'',right:'',link:'',unlink:'',face:'',image:'',code:'',help:''},w=new c;t(n,w)});layui.define("jquery",function(e){"use strict";var a=layui.$,l="http://www.layui.com/doc/modules/code.html";e("code",function(e){var t=[];e=e||{},e.elem=a(e.elem||".layui-code"),e.about=!("about"in e)||e.about,e.elem.each(function(){t.push(this)}),layui.each(t.reverse(),function(t,i){var c=a(i),o=c.html();(c.attr("lay-encode")||e.encode)&&(o=o.replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
                      1. '+o.replace(/[\r\t\n]+/g,"
                      2. ")+"
                      "),c.find(">.layui-code-h3")[0]||c.prepend('

                      '+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

                      ");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/layui/layui.js b/public/static/layui-admin/dist/layuiadmin/layui/layui.js new file mode 100755 index 0000000..99dba90 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/layui/layui.js @@ -0,0 +1,2 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ + ;!function(e){"use strict";var t=document,n={modules:{},status:{},timeout:10,event:{}},r=function(){this.v="2.5.6"},o=function(){var e=t.currentScript?t.currentScript.src:function(){for(var e,n=t.scripts,r=n.length-1,o=r;o>0;o--)if("interactive"===n[o].readyState){e=n[o].src;break}return e||n[r].src}();return e.substring(0,e.lastIndexOf("/")+1)}(),a=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},i="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),u={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",transfer:"modules/transfer",tree:"modules/tree",table:"modules/table",element:"modules/element",rate:"modules/rate",colorpicker:"modules/colorpicker",slider:"modules/slider",carousel:"modules/carousel",flow:"modules/flow",util:"modules/util",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"../layui.all"};r.prototype.cache=n,r.prototype.define=function(e,t){var r=this,o="function"==typeof e,a=function(){var e=function(e,t){layui[e]=t,n.status[e]=!0};return"function"==typeof t&&t(function(r,o){e(r,o),n.callback[r]=function(){t(e)}}),this};return o&&(t=e,e=[]),!layui["layui.all"]&&layui["layui.mobile"]?a.call(r):(r.use(e,a),r)},r.prototype.use=function(e,r,l){function c(e,t){var r="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||r.test((e.currentTarget||e.srcElement).readyState))&&(n.modules[d]=t,y.removeChild(h),function o(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void(n.status[d]?s():setTimeout(o,4))}())}function s(){l.push(layui[d]),e.length>1?p.use(e.slice(1),r,l):"function"==typeof r&&r.apply(layui,l)}var p=this,f=n.dir=n.dir?n.dir:o,y=t.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(p.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=layui.$=jQuery);var d=e[0],m=0;if(l=l||[],n.host=n.host||(f.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&u[d]||!layui["layui.all"]&&layui["layui.mobile"]&&u[d])return s(),p;var v=(u[d]?f+"lay/":/^\{\/\}/.test(p.modules[d])?"":n.base||"")+(p.modules[d]||d)+".js";if(v=v.replace(/^\{\/\}/,""),!n.modules[d]&&layui[d]&&(n.modules[d]=v),n.modules[d])!function g(){return++m>1e3*n.timeout/4?a(d+" is not a valid module"):void("string"==typeof n.modules[d]&&n.status[d]?s():setTimeout(g,4))}();else{var h=t.createElement("script");h.async=!0,h.charset="utf-8",h.src=v+function(){var e=n.version===!0?n.v||(new Date).getTime():n.version||"";return e?"?v="+e:""}(),y.appendChild(h),!h.attachEvent||h.attachEvent.toString&&h.attachEvent.toString().indexOf("[native code")<0||i?h.addEventListener("load",function(e){c(e,v)},!1):h.attachEvent("onreadystatechange",function(e){c(e,v)}),n.modules[d]=v}return p},r.prototype.getStyle=function(t,n){var r=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return r[r.getPropertyValue?"getPropertyValue":"getAttribute"](n)},r.prototype.link=function(e,r,o){var i=this,u=t.createElement("link"),l=t.getElementsByTagName("head")[0];"string"==typeof r&&(o=r);var c=(o||e).replace(/\.|\//g,""),s=u.id="layuicss-"+c,p=0;return u.rel="stylesheet",u.href=e+(n.debug?"?v="+(new Date).getTime():""),u.media="all",t.getElementById(s)||l.appendChild(u),"function"!=typeof r?i:(function f(){return++p>1e3*n.timeout/100?a(e+" timeout"):void(1989===parseInt(i.getStyle(t.getElementById(s),"width"))?function(){r()}():setTimeout(f,100))}(),i)},n.callback={},r.prototype.factory=function(e){if(layui[e])return"function"==typeof n.callback[e]?n.callback[e]:null},r.prototype.addcss=function(e,t,r){return layui.link(n.dir+"css/"+e,t,r)},r.prototype.img=function(e,t,n){var r=new Image;return r.src=e,r.complete?t(r):(r.onload=function(){r.onload=null,"function"==typeof t&&t(r)},void(r.onerror=function(e){r.onerror=null,"function"==typeof n&&n(e)}))},r.prototype.config=function(e){e=e||{};for(var t in e)n[t]=e[t];return this},r.prototype.modules=function(){var e={};for(var t in u)e[t]=u[t];return e}(),r.prototype.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?a("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},r.prototype.router=function(e){var t=this,e=e||location.hash,n={path:[],search:{},hash:(e.match(/[^#](#.*$)/)||[])[1]||""};return/^#\//.test(e)?(e=e.replace(/^#\//,""),n.href="/"+e,e=e.replace(/([^#])(#.*$)/,"$1").split("/")||[],t.each(e,function(e,t){/^\w+=/.test(t)?function(){t=t.split("="),n.search[t[0]]=t[1]}():n.path.push(t)}),n):n},r.prototype.url=function(e){var t=this,n={pathname:function(){var t=e?function(){var t=(e.match(/\.[^.]+?\/.+/)||[])[0]||"";return t.replace(/^[^\/]+/,"").replace(/\?.+/,"")}():location.pathname;return t.replace(/^\//,"").split("/")}(),search:function(){var n={},r=(e?function(){var t=(e.match(/\?.+/)||[])[0]||"";return t.replace(/\#.+/,"")}():location.search).replace(/^\?+/,"").split("&");return t.each(r,function(e,t){var r=t.indexOf("="),o=function(){return r<0?t.substr(0,t.length):0!==r&&t.substr(0,r)}();o&&(n[o]=r>0?t.substr(r+1):null)}),n}(),hash:t.router(function(){return e?(e.match(/#.+/)||[])[0]||"":location.hash}())};return n},r.prototype.data=function(t,n,r){if(t=t||"layui",r=r||localStorage,e.JSON&&e.JSON.parse){if(null===n)return delete r[t];n="object"==typeof n?n:{key:n};try{var o=JSON.parse(r[t])}catch(a){var o={}}return"value"in n&&(o[n.key]=n.value),n.remove&&delete o[n.key],r[t]=JSON.stringify(o),n.key?o[n.key]:o}},r.prototype.sessionData=function(e,t){return this.data(e,t,sessionStorage)},r.prototype.device=function(t){var n=navigator.userAgent.toLowerCase(),r=function(e){var t=new RegExp(e+"/([^\\s\\_\\-]+)");return e=(n.match(t)||[])[1],e||!1},o={os:function(){return/windows/.test(n)?"windows":/linux/.test(n)?"linux":/iphone|ipod|ipad|ios/.test(n)?"ios":/mac/.test(n)?"mac":void 0}(),ie:function(){return!!(e.ActiveXObject||"ActiveXObject"in e)&&((n.match(/msie\s(\d+)/)||[])[1]||"11")}(),weixin:r("micromessenger")};return t&&!o[t]&&(o[t]=r(t)),o.android=/android/.test(n),o.ios="ios"===o.os,o.mobile=!(!o.android&&!o.ios),o},r.prototype.hint=function(){return{error:a}},r.prototype.each=function(e,t){var n,r=this;if("function"!=typeof t)return r;if(e=e||[],e.constructor===Object){for(n in e)if(t.call(e[n],n,e[n]))break}else for(n=0;na?1:o/g, '>') + .replace(/'/g, ''').replace(/"/g, '"'); + } + + //事件监听 + ,on: function(events, callback){ + return layui.onevent.call(this, setter.MOD_NAME, events, callback); + } + + //发送验证码 + ,sendAuthCode: function(options){ + options = $.extend({ + seconds: 60 + ,elemPhone: '#LAY_phone' + ,elemVercode: '#LAY_vercode' + }, options); + + var seconds = options.seconds + ,btn = $(options.elem) + ,token = null + ,timer, countDown = function(loop){ + seconds--; + if(seconds < 0){ + btn.removeClass(DISABLED).html('获取验证码'); + seconds = options.seconds; + clearInterval(timer); + } else { + btn.addClass(DISABLED).html(seconds + '秒后重获'); + } + + if(!loop){ + timer = setInterval(function(){ + countDown(true); + }, 1000); + } + }; + + options.elemPhone = $(options.elemPhone); + options.elemVercode = $(options.elemVercode); + + btn.on('click', function(){ + var elemPhone = options.elemPhone + ,value = elemPhone.val(); + + if(seconds !== options.seconds || $(this).hasClass(DISABLED)) return; + + if(!/^1\d{10}$/.test(value)){ + elemPhone.focus(); + return layer.msg('请输入正确的手机号') + }; + + if(typeof options.ajax === 'object'){ + var success = options.ajax.success; + delete options.ajax.success; + } + + admin.req($.extend(true, { + url: '/auth/code' + ,type: 'get' + ,data: { + phone: value + } + ,success: function(res){ + layer.msg('验证码已发送至你的手机,请注意查收', { + icon: 1 + ,shade: 0 + }); + options.elemVercode.focus(); + countDown(); + success && success(res); + } + }, options.ajax)); + }); + } + + //屏幕类型 + ,screen: function(){ + var width = $win.width() + if(width > 1200){ + return 3; //大屏幕 + } else if(width > 992){ + return 2; //中屏幕 + } else if(width > 768){ + return 1; //小屏幕 + } else { + return 0; //超小屏幕 + } + } + + //侧边伸缩 + ,sideFlexible: function(status){ + var app = container + ,iconElem = $('#'+ APP_FLEXIBLE) + ,screen = admin.screen(); + + //设置状态,PC:默认展开、移动:默认收缩 + if(status === 'spread'){ + //切换到展开状态的 icon,箭头:← + iconElem.removeClass(ICON_SPREAD).addClass(ICON_SHRINK); + + //移动:从左到右位移;PC:清除多余选择器恢复默认 + if(screen < 2){ + app.addClass(APP_SPREAD_SM); + } else { + app.removeClass(APP_SPREAD_SM); + } + + app.removeClass(SIDE_SHRINK) + } else { + //切换到搜索状态的 icon,箭头:→ + iconElem.removeClass(ICON_SHRINK).addClass(ICON_SPREAD); + + //移动:清除多余选择器恢复默认;PC:从右往左收缩 + if(screen < 2){ + app.removeClass(SIDE_SHRINK); + } else { + app.addClass(SIDE_SHRINK); + } + + app.removeClass(APP_SPREAD_SM) + } + + layui.event.call(this, setter.MOD_NAME, 'side({*})', { + status: status + }); + } + + //弹出面板 + ,popup: view.popup + + //右侧面板 + ,popupRight: function(options){ + //layer.close(admin.popup.index); + return admin.popup.index = layer.open($.extend({ + type: 1 + ,id: 'LAY_adminPopupR' + ,anim: -1 + ,title: false + ,closeBtn: false + ,offset: 'r' + ,shade: 0.1 + ,shadeClose: true + ,skin: 'layui-anim layui-anim-rl layui-layer-adminRight' + ,area: '300px' + }, options)); + } + + //主题设置 + ,theme: function(options){ + var theme = setter.theme + ,local = layui.data(setter.tableName) + ,id = 'LAY_layadmin_theme' + ,style = document.createElement('style') + ,styleText = laytpl([ + //主题色 + '.layui-side-menu,' + ,'.layadmin-pagetabs .layui-tab-title li:after,' + ,'.layadmin-pagetabs .layui-tab-title li.layui-this:after,' + ,'.layui-layer-admin .layui-layer-title,' + ,'.layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-item>.layui-nav-child' + ,'{background-color:{{d.color.main}} !important;}' + + //选中色 + ,'.layui-nav-tree .layui-this,' + ,'.layui-nav-tree .layui-this>a,' + ,'.layui-nav-tree .layui-nav-child dd.layui-this,' + ,'.layui-nav-tree .layui-nav-child dd.layui-this a' + ,'{background-color:{{d.color.selected}} !important;}' + + //logo + ,'.layui-layout-admin .layui-logo{background-color:{{d.color.logo || d.color.main}} !important;}' + + //头部色 + ,'{{# if(d.color.header){ }}' + ,'.layui-layout-admin .layui-header{background-color:{{ d.color.header }};}' + ,'.layui-layout-admin .layui-header a,' + ,'.layui-layout-admin .layui-header a cite{color: #f8f8f8;}' + ,'.layui-layout-admin .layui-header a:hover{color: #fff;}' + ,'.layui-layout-admin .layui-header .layui-nav .layui-nav-more{border-top-color: #fbfbfb;}' + ,'.layui-layout-admin .layui-header .layui-nav .layui-nav-mored{border-color: transparent; border-bottom-color: #fbfbfb;}' + ,'.layui-layout-admin .layui-header .layui-nav .layui-this:after, .layui-layout-admin .layui-header .layui-nav-bar{background-color: #fff; background-color: rgba(255,255,255,.5);}' + ,'.layadmin-pagetabs .layui-tab-title li:after{display: none;}' + ,'{{# } }}' + ].join('')).render(options = $.extend({}, local.theme, options)) + ,styleElem = document.getElementById(id); + + //添加主题样式 + if('styleSheet' in style){ + style.setAttribute('type', 'text/css'); + style.styleSheet.cssText = styleText; + } else { + style.innerHTML = styleText; + } + style.id = id; + + styleElem && $body[0].removeChild(styleElem); + $body[0].appendChild(style); + $body.attr('layadmin-themealias', options.color.alias); + + //本地存储记录 + local.theme = local.theme || {}; + layui.each(options, function(key, value){ + local.theme[key] = value; + }); + layui.data(setter.tableName, { + key: 'theme' + ,value: local.theme + }); + } + + //初始化主题 + ,initTheme: function(index){ + var theme = setter.theme; + index = index || 0; + if(theme.color[index]){ + theme.color[index].index = index; + admin.theme({ + color: theme.color[index] + }); + } + } + + //记录最近一次点击的页面标签数据 + ,tabsPage: {} + + //获取页面标签主体元素 + ,tabsBody: function(index){ + return $(APP_BODY).find('.'+ TABS_BODY).eq(index || 0); + } + + //切换页面标签主体 + ,tabsBodyChange: function(index, options){ + options = options || {}; + admin.tabsBody(index).addClass(SHOW).siblings().removeClass(SHOW); + events.rollPage('auto', index); + + // 如果是控制台 关闭菜单那状态 + var id = $(TABS_HEADER).eq(index).find('span').attr('data-id'); + var text = $(TABS_HEADER).eq(index).find('span').html(); + if (id === undefined || text === "修改密码") { + + $(".first-nav .layui-nav-tree .layui-nav-item").removeClass("activate"); + $("#LAY_app_body").addClass("hide-second-nav"); + $("#view").html(""); + + } else { + + // 如果是点击选项卡进行切换 + if (!("text" in options)) { + + // 1、得到二级菜单 + var menus = JSON.parse(localStorage.getItem("menus")); + var data = []; + menus.forEach(function (item) { + if (parseInt(id) === item['id']) { + data = item; + } + }); + // 2、切换一级菜单选择状态 + $(".first-nav .layui-nav .layui-nav-item").removeClass("activate"); + $(".first-nav .layui-nav .layui-nav-item[data-id="+id+"]").addClass("activate"); + + // 3、是否存在二级菜单,不存在则隐藏 + if (data) { + $("#LAY_app_body").removeClass('hide-second-nav'); + } else { + $("#LAY_app_body").addClass('hide-second-nav'); + } + + // 使用模板引擎, 渲染二三级菜单 + var getTpl = document.getElementById('subMenu').innerHTML; + var view = document.getElementById('view'); + laytpl(getTpl).render(data, function(html){ + view.innerHTML = html; + }); + + // 4、切换二级菜单选择状态 + $(".second-nav .layui-nav .layui-nav-item").removeClass("layui-this"); + $(".second-nav .layui-nav-tree .layui-nav-itemed dl dd").removeClass("layui-this"); + $(".second-nav .layui-nav .layui-nav-item a[lay-href='"+options.url+"']").parent().addClass("layui-this"); + } + } + + //执行 {setter.MOD_NAME}.tabsPage 下的事件 + layui.event.call(this, setter.MOD_NAME, 'tabsPage({*})', { + url: options.url + ,text: options.text + }); + } + + //resize事件管理 + ,resize: function(fn){ + var router = layui.router() + ,key = router.path.join('-'); + + if(admin.resizeFn[key]){ + $win.off('resize', admin.resizeFn[key]); + delete admin.resizeFn[key]; + } + + if(fn === 'off') return; //如果是清除 resize 事件,则终止往下执行 + + fn(), admin.resizeFn[key] = fn; + $win.on('resize', admin.resizeFn[key]); + } + ,resizeFn: {} + ,runResize: function(){ + var router = layui.router() + ,key = router.path.join('-'); + admin.resizeFn[key] && admin.resizeFn[key](); + } + ,delResize: function(){ + this.resize('off'); + } + + //关闭当前 pageTabs + ,closeThisTabs: function(){ + if(!admin.tabsPage.index) return; + $(TABS_HEADER).eq(admin.tabsPage.index).find('.layui-tab-close').trigger('click'); + // 切换回上一级菜单 + var id = $(TABS_HEADER).eq(admin.tabsPage.index).find('span').attr('data-id'); + $(".first-nav .layui-nav .layui-nav-item").removeClass("activate"); + $(".first-nav .layui-nav .layui-nav-item[data-id="+id+"]").trigger("click"); + } + + //全屏 + ,fullScreen: function(){ + var ele = document.documentElement + ,reqFullScreen = ele.requestFullScreen || ele.webkitRequestFullScreen + || ele.mozRequestFullScreen || ele.msRequestFullscreen; + if(typeof reqFullScreen !== 'undefined' && reqFullScreen) { + reqFullScreen.call(ele); + }; + } + + //退出全屏 + ,exitScreen: function(){ + var ele = document.documentElement + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.mozCancelFullScreen) { + document.mozCancelFullScreen(); + } else if (document.webkitCancelFullScreen) { + document.webkitCancelFullScreen(); + } else if (document.msExitFullscreen) { + document.msExitFullscreen(); + } + } + + //…… + }; + + //事件 + var events = admin.events = { + //伸缩 + flexible: function(othis){ + var iconElem = othis.find('#'+ APP_FLEXIBLE) + ,isSpread = iconElem.hasClass(ICON_SPREAD); + admin.sideFlexible(isSpread ? 'spread' : null); + } + + //刷新 + ,refresh: function(){ + var ELEM_IFRAME = '.layadmin-iframe' + ,length = $('.'+ TABS_BODY).length; + + if(admin.tabsPage.index >= length){ + admin.tabsPage.index = length - 1; + } + + var iframe = admin.tabsBody(admin.tabsPage.index).find(ELEM_IFRAME); + iframe[0].contentWindow.location.reload(true); + } + + //输入框搜索 + ,serach: function(othis){ + othis.off('keypress').on('keypress',function(e){ + if(!this.value.replace(/\s/g, '')) return; + //回车跳转 + if(e.keyCode === 13){ + var href = othis.attr('lay-action') + ,text = othis.attr('lay-text') || '搜索'; + + href = href + this.value; + text = text + ' '+ admin.escape(this.value) +''; + + //打开标签页 + layui.index.openTabsPage(href, text); + + //如果搜索关键词已经打开,则刷新页面即可 + events.serach.keys || (events.serach.keys = {}); + events.serach.keys[admin.tabsPage.index] = this.value; + if(this.value === events.serach.keys[admin.tabsPage.index]){ + events.refresh(othis); + } + + //清空输入框 + this.value = ''; + } + }); + } + + //点击消息 + ,message: function(othis){ + othis.find('.layui-badge-dot').remove(); + } + + //弹出主题面板 + ,theme: function(){ + admin.popupRight({ + id: 'LAY_adminPopupTheme' + ,success: function(){ + view(this.id).render('system/theme') + } + }); + } + + //便签 + ,note: function(othis){ + var mobile = admin.screen() < 2 + ,note = layui.data(setter.tableName).note; + + events.note.index = admin.popup({ + title: '便签' + ,shade: 0 + ,offset: [ + '41px' + ,(mobile ? null : (othis.offset().left - 250) + 'px') + ] + ,anim: -1 + ,id: 'LAY_adminNote' + ,skin: 'layadmin-note layui-anim layui-anim-upbit' + ,content: '' + ,resize: false + ,success: function(layero, index){ + var textarea = layero.find('textarea') + ,value = note === undefined ? '便签中的内容会存储在本地,这样即便你关掉了浏览器,在下次打开时,依然会读取到上一次的记录。是个非常小巧实用的本地备忘录' : note; + + textarea.val(value).focus().on('keyup', function(){ + layui.data(setter.tableName, { + key: 'note' + ,value: this.value + }); + }); + } + }) + } + + //全屏 + ,fullscreen: function(othis){ + var SCREEN_FULL = 'layui-icon-screen-full' + ,SCREEN_REST = 'layui-icon-screen-restore' + ,iconElem = othis.children("i"); + + if(iconElem.hasClass(SCREEN_FULL)){ + admin.fullScreen(); + iconElem.addClass(SCREEN_REST).removeClass(SCREEN_FULL); + } else { + admin.exitScreen(); + iconElem.addClass(SCREEN_FULL).removeClass(SCREEN_REST); + } + } + + //弹出关于面板 + ,about: function(){ + admin.popupRight({ + id: 'LAY_adminPopupAbout' + ,success: function(){ + view(this.id).render('system/about'); + } + }); + } + + //弹出更多面板 + ,more: function(){ + admin.popupRight({ + id: 'LAY_adminPopupMore' + ,success: function(){ + view(this.id).render('system/more'); + } + }); + } + + //返回上一页 + ,back: function(){ + history.back(); + } + + //主题设置 + ,setTheme: function(othis){ + var index = othis.data('index') + ,nextIndex = othis.siblings('.layui-this').data('index'); + + if(othis.hasClass(THIS)) return; + + othis.addClass(THIS).siblings('.layui-this').removeClass(THIS); + admin.initTheme(index); + } + + //左右滚动页面标签 + ,rollPage: function(type, index){ + var tabsHeader = $('#LAY_app_tabsheader') + ,liItem = tabsHeader.children('li') + ,scrollWidth = tabsHeader.prop('scrollWidth') + ,outerWidth = tabsHeader.outerWidth() + ,tabsLeft = parseFloat(tabsHeader.css('left')); + + //右左往右 + if(type === 'left'){ + if(!tabsLeft && tabsLeft <=0) return; + + //当前的left减去可视宽度,用于与上一轮的页标比较 + var prefLeft = -tabsLeft - outerWidth; + + liItem.each(function(index, item){ + var li = $(item) + ,left = li.position().left; + + if(left >= prefLeft){ + tabsHeader.css('left', -left); + return false; + } + }); + } else if(type === 'auto'){ //自动滚动 + (function(){ + var thisLi = liItem.eq(index), thisLeft; + + if(!thisLi[0]) return; + thisLeft = thisLi.position().left; + + //当目标标签在可视区域左侧时 + if(thisLeft < -tabsLeft){ + return tabsHeader.css('left', -thisLeft); + } + + //当目标标签在可视区域右侧时 + if(thisLeft + thisLi.outerWidth() >= outerWidth - tabsLeft){ + var subLeft = thisLeft + thisLi.outerWidth() - (outerWidth - tabsLeft); + liItem.each(function(i, item){ + var li = $(item) + ,left = li.position().left; + + //从当前可视区域的最左第二个节点遍历,如果减去最左节点的差 > 目标在右侧不可见的宽度,则将该节点放置可视区域最左 + if(left + tabsLeft > 0){ + if(left - tabsLeft > subLeft){ + tabsHeader.css('left', -left); + return false; + } + } + }); + } + }()); + } else { + //默认向左滚动 + liItem.each(function(i, item){ + var li = $(item) + ,left = li.position().left; + + if(left + li.outerWidth() >= outerWidth - tabsLeft){ + tabsHeader.css('left', -left); + return false; + } + }); + } + } + + //向右滚动页面标签 + ,leftPage: function(){ + events.rollPage('left'); + } + + //向左滚动页面标签 + ,rightPage: function(){ + events.rollPage(); + } + + //关闭当前标签页 + ,closeThisTabs: function(){ + var topAdmin = parent === self ? admin : parent.layui.admin; + topAdmin.closeThisTabs(); + } + + //关闭其它标签页 + ,closeOtherTabs: function(type){ + var TABS_REMOVE = 'LAY-system-pagetabs-remove'; + if(type === 'all'){ + $(TABS_HEADER+ ':gt(0)').remove(); + $(APP_BODY).find('.'+ TABS_BODY+ ':gt(0)').remove(); + + $(TABS_HEADER).eq(0).trigger('click'); + } else { + $(TABS_HEADER).each(function(index, item){ + if(index && index != admin.tabsPage.index){ + $(item).addClass(TABS_REMOVE); + admin.tabsBody(index).addClass(TABS_REMOVE); + } + }); + $('.'+ TABS_REMOVE).remove(); + } + } + + //关闭全部标签页 + ,closeAllTabs: function(){ + events.closeOtherTabs('all'); + $(".first-nav .layui-nav-tree .layui-nav-item").removeClass("activate"); + $("#LAY_app_body").addClass("hide-second-nav"); + $("#view").html(""); + //location.hash = ''; + } + + //遮罩 + ,shade: function(){ + admin.sideFlexible(); + } + + //检查更新 + ,update: function(){ + $.ajax({ + type: 'get', + dataType: 'jsonp', + data: { + name: 'layuiAdmin' + ,version: admin.v + }, + url: 'https://fly.layui.com/api/product_update/', + success: function(res){ + if(res.status === 0) { + if(res.version === admin.v.replace(/\s|pro|std/g, '')){ + layer.alert('当前版本已经是最新版本'); + } else { + layer.alert('检查到更新,是否前往下载?', { + btn: ['更新', '暂不'] + }, function(index){ + layer.close(index); + layer.open({ + type: 2 + ,content: 'https://fly.layui.com/user/product/' + ,area: ['100%', '100%'] + ,title: '检查更新' + }); + }); + } + } else if(res.status == 1){ + layer.alert(res.msg, { + btn: ['登入', '暂不'] + }, function(index){ + layer.close(index); + layer.open({ + type: 2 + ,content: 'https://fly.layui.com/user/login/' + ,area: ['100%', '100%'] + ,title: '检查更新' + }); + }); + } else { + layer.msg(res.msg || res.code, {shift: 6}); + } + }, error: function(e){ + layer.msg('请求异常,请重试', {shift: 6}); + } + }); + } + + //呼出IM 示例 + ,im: function(){ + admin.popup({ + id: 'LAY-popup-layim-demo' //定义唯一ID,防止重复弹出 + ,shade: 0 + ,area: ['800px', '300px'] + ,title: '面板外的操作示例' + ,offset: 'lb' + ,success: function(){ + //将 views 目录下的某视图文件内容渲染给该面板 + layui.view(this.id).render('layim/demo').then(function(){ + layui.use('im'); + }); + } + }) + } + }; + + //初始 + !function(){ + //主题初始化,本地主题记录优先,其次为 initColorIndex + var local = layui.data(setter.tableName); + if(local.theme){ + admin.theme(local.theme); + } else if(setter.theme){ + admin.initTheme(setter.theme.initColorIndex); + } + + //常规版默认开启多标签页 + if(!('pageTabs' in layui.setter)) layui.setter.pageTabs = true; + + //不开启页面标签时 + if(!setter.pageTabs){ + $('#LAY_app_tabs').addClass(HIDE); + container.addClass('layadmin-tabspage-none'); + } + + //低版本IE提示 + if(device.ie && device.ie < 10){ + view.error('IE'+ device.ie + '下访问可能不佳,推荐使用:Chrome / Firefox / Edge 等高级浏览器', { + offset: 'auto' + ,id: 'LAY_errorIE' + }); + } + + }(); + + //admin.prevRouter = {}; //上一个路由 + + //监听 tab 组件切换,同步 index + element.on('tab('+ FILTER_TAB_TBAS +')', function(data){ + admin.tabsPage.index = data.index; + }); + + //监听选项卡切换,改变菜单状态 + admin.on('tabsPage(setMenustatus)', function(router){ + var pathURL = router.url, getData = function(item){ + return { + list: item.children('.layui-nav-child') + ,a: item.children('*[lay-href]') + } + } + ,sideMenu = $('#'+ SIDE_MENU) + ,SIDE_NAV_ITEMD = 'layui-nav-itemed' + + //捕获对应菜单 + ,matchMenu = function(list){ + list.each(function(index1, item1){ + var othis1 = $(item1) + ,data1 = getData(othis1) + ,listChildren1 = data1.list.children('dd') + ,matched1 = pathURL === data1.a.attr('lay-href'); + + listChildren1.each(function(index2, item2){ + var othis2 = $(item2) + ,data2 = getData(othis2) + ,listChildren2 = data2.list.children('dd') + ,matched2 = pathURL === data2.a.attr('lay-href'); + + listChildren2.each(function(index3, item3){ + var othis3 = $(item3) + ,data3 = getData(othis3) + ,matched3 = pathURL === data3.a.attr('lay-href'); + + if(matched3){ + var selected = data3.list[0] ? SIDE_NAV_ITEMD : THIS; + othis3.addClass(selected).siblings().removeClass(selected); //标记选择器 + return false; + } + + }); + + if(matched2){ + var selected = data2.list[0] ? SIDE_NAV_ITEMD : THIS; + othis2.addClass(selected).siblings().removeClass(selected); //标记选择器 + return false + } + + }); + + if(matched1){ + var selected = data1.list[0] ? SIDE_NAV_ITEMD : THIS; + othis1.addClass(selected).siblings().removeClass(selected); //标记选择器 + return false; + } + + }); + } + + //重置状态 + sideMenu.find('.'+ THIS).removeClass(THIS); + + //移动端点击菜单时自动收缩 + if(admin.screen() < 2) admin.sideFlexible(); + + //开始捕获 + matchMenu(sideMenu.children('li')); + }); + + //监听侧边导航点击事件 + element.on('nav(layadmin-system-side-menu)', function(elem){ + if(elem.siblings('.layui-nav-child')[0] && container.hasClass(SIDE_SHRINK)){ + admin.sideFlexible('spread'); + layer.close(elem.data('index')); + }; + admin.tabsPage.type = 'nav'; + }); + + //监听选项卡的更多操作 + element.on('nav(layadmin-pagetabs-nav)', function(elem){ + var dd = elem.parent(); + dd.removeClass(THIS); + dd.parent().removeClass(SHOW); + }); + + //同步路由 + var setThisRouter = function(othis){ + var layid = othis.attr('lay-id') + ,attr = othis.attr('lay-attr') + ,index = othis.index(); + + admin.tabsBodyChange(index, { + url: attr + }); + //location.hash = layid === setter.entry ? '/' : attr; + } + ,TABS_HEADER = '#LAY_app_tabsheader>li'; + + //标签页标题点击 + $body.on('click', TABS_HEADER, function(){ + var othis = $(this) + ,index = othis.index(); + + admin.tabsPage.type = 'tab'; + admin.tabsPage.index = index; + + setThisRouter(othis); + }); + + //监听 tabspage 删除 + element.on('tabDelete('+ FILTER_TAB_TBAS +')', function(obj){ + var othis = $(TABS_HEADER+ '.layui-this'); + + obj.index && admin.tabsBody(obj.index).remove(); + setThisRouter(othis); + + //移除resize事件 + admin.delResize(); + }); + + // 三级菜单收缩 + $body.on("click", ".second-nav .layui-nav-tree .layui-nav-itemed a", function () { + var spanElem = $(this).children('i'); + if (spanElem.hasClass('up')) { + spanElem.removeClass('up'); + $(this).next().show(); + } else { + spanElem.addClass('up'); + $(this).next().hide(); + } + }); + + //页面跳转 + $body.on('click', '*[lay-href]', function(){ + var othis = $(this) + ,href = othis.attr('lay-href') + ,text = othis.attr('lay-text') + ,menus_id = othis.attr('data-id') + ,router = layui.router(); + + admin.tabsPage.elem = othis; + //admin.prevRouter[router.path[0]] = router.href; //记录上一次各菜单的路由信息 + + // 解决选项卡 切换后 二级菜单点击样式 不会进行切换问题 + $(".second-nav .layui-nav .layui-nav-itemed dl dd").removeClass('layui-this'); + $(".second-nav .layui-nav .layui-nav-item").removeClass('layui-this'); + $(this).parent().addClass('layui-this'); + + //执行跳转 + var topLayui = parent === self ? layui : top.layui; + topLayui.index.openTabsPage(href, text || othis.text(), menus_id); + + //如果为当前页,则执行刷新 + if(href === admin.tabsBody(admin.tabsPage.index).find('iframe').attr('src')){ + admin.events.refresh(); + } + }); + + //点击事件 + $body.on('click', '*[layadmin-event]', function(){ + var othis = $(this) + ,attrEvent = othis.attr('layadmin-event'); + events[attrEvent] && events[attrEvent].call(this, othis); + }); + + //tips + $body.on('mouseenter', '*[lay-tips]', function(){ + var othis = $(this); + + if(othis.parent().hasClass('layui-nav-item') && !container.hasClass(SIDE_SHRINK)) return; + + var tips = othis.attr('lay-tips') + ,offset = othis.attr('lay-offset') + ,direction = othis.attr('lay-direction') + ,index = layer.tips(tips, this, { + tips: direction || 1 + ,time: -1 + ,success: function(layero, index){ + if(offset){ + layero.css('margin-left', offset + 'px'); + } + } + }); + othis.data('index', index); + }).on('mouseleave', '*[lay-tips]', function(){ + layer.close($(this).data('index')); + }); + + //窗口resize事件 + var resizeSystem = layui.data.resizeSystem = function(){ + //layer.close(events.note.index); + layer.closeAll('tips'); + + if(!resizeSystem.lock){ + setTimeout(function(){ + admin.sideFlexible(admin.screen() < 2 ? '' : 'spread'); + delete resizeSystem.lock; + }, 100); + } + + resizeSystem.lock = true; + } + $win.on('resize', layui.data.resizeSystem); + + //接口输出 + exports('admin', admin); +}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/lib/admin备份.js b/public/static/layui-admin/dist/layuiadmin/lib/admin备份.js new file mode 100755 index 0000000..644da03 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/lib/admin备份.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define("view",function(e){var a=layui.jquery,t=layui.laytpl,i=layui.element,n=layui.setter,l=layui.view,s=layui.device(),r=a(window),o=a("body"),u=a("#"+n.container),d="layui-show",c="layui-hide",y="layui-this",f="layui-disabled",m="#LAY_app_body",h="LAY_app_flexible",p="layadmin-layout-tabs",v="layadmin-side-spread-sm",b="layadmin-tabsbody-item",g="layui-icon-shrink-right",x="layui-icon-spread-left",C="layadmin-side-shrink",k="LAY-system-side-menu",P={v:"2020 std",req:l.req,exit:l.exit,escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},on:function(e,a){return layui.onevent.call(this,n.MOD_NAME,e,a)},sendAuthCode:function(e){e=a.extend({seconds:60,elemPhone:"#LAY_phone",elemVercode:"#LAY_vercode"},e);var t,i=e.seconds,n=a(e.elem),l=function(a){i--,i<0?(n.removeClass(f).html("获取验证码"),i=e.seconds,clearInterval(t)):n.addClass(f).html(i+"秒后重获"),a||(t=setInterval(function(){l(!0)},1e3))};e.elemPhone=a(e.elemPhone),e.elemVercode=a(e.elemVercode),n.on("click",function(){var t=e.elemPhone,n=t.val();if(i===e.seconds&&!a(this).hasClass(f)){if(!/^1\d{10}$/.test(n))return t.focus(),layer.msg("请输入正确的手机号");if("object"==typeof e.ajax){var s=e.ajax.success;delete e.ajax.success}P.req(a.extend(!0,{url:"/auth/code",type:"get",data:{phone:n},success:function(a){layer.msg("验证码已发送至你的手机,请注意查收",{icon:1,shade:0}),e.elemVercode.focus(),l(),s&&s(a)}},e.ajax))}})},screen:function(){var e=r.width();return e>1200?3:e>992?2:e>768?1:0},sideFlexible:function(e){var t=u,i=a("#"+h),l=P.screen();"spread"===e?(i.removeClass(x).addClass(g),l<2?t.addClass(v):t.removeClass(v),t.removeClass(C)):(i.removeClass(g).addClass(x),l<2?t.removeClass(C):t.addClass(C),t.removeClass(v)),layui.event.call(this,n.MOD_NAME,"side({*})",{status:e})},popup:l.popup,popupRight:function(e){return P.popup.index=layer.open(a.extend({type:1,id:"LAY_adminPopupR",anim:-1,title:!1,closeBtn:!1,offset:"r",shade:.1,shadeClose:!0,skin:"layui-anim layui-anim-rl layui-layer-adminRight",area:"300px"},e))},theme:function(e){var i=(n.theme,layui.data(n.tableName)),l="LAY_layadmin_theme",s=document.createElement("style"),r=t([".layui-side-menu,",".layadmin-pagetabs .layui-tab-title li:after,",".layadmin-pagetabs .layui-tab-title li.layui-this:after,",".layui-layer-admin .layui-layer-title,",".layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-item>.layui-nav-child","{background-color:{{d.color.main}} !important;}",".layui-nav-tree .layui-this,",".layui-nav-tree .layui-this>a,",".layui-nav-tree .layui-nav-child dd.layui-this,",".layui-nav-tree .layui-nav-child dd.layui-this a","{background-color:{{d.color.selected}} !important;}",".layui-layout-admin .layui-logo{background-color:{{d.color.logo || d.color.main}} !important;}","{{# if(d.color.header){ }}",".layui-layout-admin .layui-header{background-color:{{ d.color.header }};}",".layui-layout-admin .layui-header a,",".layui-layout-admin .layui-header a cite{color: #f8f8f8;}",".layui-layout-admin .layui-header a:hover{color: #fff;}",".layui-layout-admin .layui-header .layui-nav .layui-nav-more{border-top-color: #fbfbfb;}",".layui-layout-admin .layui-header .layui-nav .layui-nav-mored{border-color: transparent; border-bottom-color: #fbfbfb;}",".layui-layout-admin .layui-header .layui-nav .layui-this:after, .layui-layout-admin .layui-header .layui-nav-bar{background-color: #fff; background-color: rgba(255,255,255,.5);}",".layadmin-pagetabs .layui-tab-title li:after{display: none;}","{{# } }}"].join("")).render(e=a.extend({},i.theme,e)),u=document.getElementById(l);"styleSheet"in s?(s.setAttribute("type","text/css"),s.styleSheet.cssText=r):s.innerHTML=r,s.id=l,u&&o[0].removeChild(u),o[0].appendChild(s),o.attr("layadmin-themealias",e.color.alias),i.theme=i.theme||{},layui.each(e,function(e,a){i.theme[e]=a}),layui.data(n.tableName,{key:"theme",value:i.theme})},initTheme:function(e){var a=n.theme;e=e||0,a.color[e]&&(a.color[e].index=e,P.theme({color:a.color[e]}))},tabsPage:{},tabsBody:function(e){return a(m).find("."+b).eq(e||0)},tabsBodyChange:function(e,a){a=a||{},P.tabsBody(e).addClass(d).siblings().removeClass(d),F.rollPage("auto",e),layui.event.call(this,n.MOD_NAME,"tabsPage({*})",{url:a.url,text:a.text})},resize:function(e){var a=layui.router(),t=a.path.join("-");P.resizeFn[t]&&(r.off("resize",P.resizeFn[t]),delete P.resizeFn[t]),"off"!==e&&(e(),P.resizeFn[t]=e,r.on("resize",P.resizeFn[t]))},resizeFn:{},runResize:function(){var e=layui.router(),a=e.path.join("-");P.resizeFn[a]&&P.resizeFn[a]()},delResize:function(){this.resize("off")},closeThisTabs:function(){P.tabsPage.index&&a(_).eq(P.tabsPage.index).find(".layui-tab-close").trigger("click")},fullScreen:function(){var e=document.documentElement,a=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;"undefined"!=typeof a&&a&&a.call(e)},exitScreen:function(){document.documentElement;document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}},F=P.events={flexible:function(e){var a=e.find("#"+h),t=a.hasClass(x);P.sideFlexible(t?"spread":null)},refresh:function(){var e=".layadmin-iframe",t=a("."+b).length;P.tabsPage.index>=t&&(P.tabsPage.index=t-1);var i=P.tabsBody(P.tabsPage.index).find(e);i[0].contentWindow.location.reload(!0)},serach:function(e){e.off("keypress").on("keypress",function(a){if(this.value.replace(/\s/g,"")&&13===a.keyCode){var t=e.attr("lay-action"),i=e.attr("lay-text")||"搜索";t+=this.value,i=i+' '+P.escape(this.value)+"",layui.index.openTabsPage(t,i),F.serach.keys||(F.serach.keys={}),F.serach.keys[P.tabsPage.index]=this.value,this.value===F.serach.keys[P.tabsPage.index]&&F.refresh(e),this.value=""}})},message:function(e){e.find(".layui-badge-dot").remove()},theme:function(){P.popupRight({id:"LAY_adminPopupTheme",success:function(){l(this.id).render("system/theme")}})},note:function(e){var a=P.screen()<2,t=layui.data(n.tableName).note;F.note.index=P.popup({title:"便签",shade:0,offset:["41px",a?null:e.offset().left-250+"px"],anim:-1,id:"LAY_adminNote",skin:"layadmin-note layui-anim layui-anim-upbit",content:'',resize:!1,success:function(e,a){var i=e.find("textarea"),l=void 0===t?"便签中的内容会存储在本地,这样即便你关掉了浏览器,在下次打开时,依然会读取到上一次的记录。是个非常小巧实用的本地备忘录":t;i.val(l).focus().on("keyup",function(){layui.data(n.tableName,{key:"note",value:this.value})})}})},fullscreen:function(e){var a="layui-icon-screen-full",t="layui-icon-screen-restore",i=e.children("i");i.hasClass(a)?(P.fullScreen(),i.addClass(t).removeClass(a)):(P.exitScreen(),i.addClass(a).removeClass(t))},about:function(){P.popupRight({id:"LAY_adminPopupAbout",success:function(){l(this.id).render("system/about")}})},more:function(){P.popupRight({id:"LAY_adminPopupMore",success:function(){l(this.id).render("system/more")}})},back:function(){history.back()},setTheme:function(e){var a=e.data("index");e.siblings(".layui-this").data("index");e.hasClass(y)||(e.addClass(y).siblings(".layui-this").removeClass(y),P.initTheme(a))},rollPage:function(e,t){var i=a("#LAY_app_tabsheader"),n=i.children("li"),l=(i.prop("scrollWidth"),i.outerWidth()),s=parseFloat(i.css("left"));if("left"===e){if(!s&&s<=0)return;var r=-s-l;n.each(function(e,t){var n=a(t),l=n.position().left;if(l>=r)return i.css("left",-l),!1})}else"auto"===e?!function(){var e,r=n.eq(t);if(r[0]){if(e=r.position().left,e<-s)return i.css("left",-e);if(e+r.outerWidth()>=l-s){var o=e+r.outerWidth()-(l-s);n.each(function(e,t){var n=a(t),l=n.position().left;if(l+s>0&&l-s>o)return i.css("left",-l),!1})}}}():n.each(function(e,t){var n=a(t),r=n.position().left;if(r+n.outerWidth()>=l-s)return i.css("left",-r),!1})},leftPage:function(){F.rollPage("left")},rightPage:function(){F.rollPage()},closeThisTabs:function(){var e=parent===self?P:parent.layui.admin;e.closeThisTabs()},closeOtherTabs:function(e){var t="LAY-system-pagetabs-remove";"all"===e?(a(_+":gt(0)").remove(),a(m).find("."+b+":gt(0)").remove(),a(_).eq(0).trigger("click")):(a(_).each(function(e,i){e&&e!=P.tabsPage.index&&(a(i).addClass(t),P.tabsBody(e).addClass(t))}),a("."+t).remove())},closeAllTabs:function(){F.closeOtherTabs("all")},shade:function(){P.sideFlexible()},update:function(){a.ajax({type:"get",dataType:"jsonp",data:{name:"layuiAdmin",version:P.v},url:"https://fly.layui.com/api/product_update/",success:function(e){0===e.status?e.version===P.v.replace(/\s|pro|std/g,"")?layer.alert("当前版本已经是最新版本"):layer.alert("检查到更新,是否前往下载?",{btn:["更新","暂不"]},function(e){layer.close(e),layer.open({type:2,content:"https://fly.layui.com/user/product/",area:["100%","100%"],title:"检查更新"})}):1==e.status?layer.alert(e.msg,{btn:["登入","暂不"]},function(e){layer.close(e),layer.open({type:2,content:"https://fly.layui.com/user/login/",area:["100%","100%"],title:"检查更新"})}):layer.msg(e.msg||e.code,{shift:6})},error:function(e){layer.msg("请求异常,请重试",{shift:6})}})},im:function(){P.popup({id:"LAY-popup-layim-demo",shade:0,area:["800px","300px"],title:"面板外的操作示例",offset:"lb",success:function(){layui.view(this.id).render("layim/demo").then(function(){layui.use("im")})}})}};!function(){var e=layui.data(n.tableName);e.theme?P.theme(e.theme):n.theme&&P.initTheme(n.theme.initColorIndex),"pageTabs"in layui.setter||(layui.setter.pageTabs=!0),n.pageTabs||(a("#LAY_app_tabs").addClass(c),u.addClass("layadmin-tabspage-none")),s.ie&&s.ie<10&&l.error("IE"+s.ie+"下访问可能不佳,推荐使用:Chrome / Firefox / Edge 等高级浏览器",{offset:"auto",id:"LAY_errorIE"})}(),i.on("tab("+p+")",function(e){P.tabsPage.index=e.index}),P.on("tabsPage(setMenustatus)",function(e){var t=e.url,i=function(e){return{list:e.children(".layui-nav-child"),a:e.children("*[lay-href]")}},n=a("#"+k),l="layui-nav-itemed",s=function(e){e.each(function(e,n){var s=a(n),r=i(s),o=r.list.children("dd"),u=t===r.a.attr("lay-href");if(o.each(function(e,n){var s=a(n),r=i(s),o=r.list.children("dd"),u=t===r.a.attr("lay-href");if(o.each(function(e,n){var s=a(n),r=i(s),o=t===r.a.attr("lay-href");if(o){var u=r.list[0]?l:y;return s.addClass(u).siblings().removeClass(u),!1}}),u){var d=r.list[0]?l:y;return s.addClass(d).siblings().removeClass(d),!1}}),u){var d=r.list[0]?l:y;return s.addClass(d).siblings().removeClass(d),!1}})};n.find("."+y).removeClass(y),P.screen()<2&&P.sideFlexible(),s(n.children("li"))}),i.on("nav(layadmin-system-side-menu)",function(e){e.siblings(".layui-nav-child")[0]&&u.hasClass(C)&&(P.sideFlexible("spread"),layer.close(e.data("index"))),P.tabsPage.type="nav"}),i.on("nav(layadmin-pagetabs-nav)",function(e){var a=e.parent();a.removeClass(y),a.parent().removeClass(d)});var A=function(e){var a=(e.attr("lay-id"),e.attr("lay-attr")),t=e.index();P.tabsBodyChange(t,{url:a})},_="#LAY_app_tabsheader>li";o.on("click",_,function(){var e=a(this),t=e.index();P.tabsPage.type="tab",P.tabsPage.index=t,A(e)}),i.on("tabDelete("+p+")",function(e){var t=a(_+".layui-this");e.index&&P.tabsBody(e.index).remove(),A(t),P.delResize()}),o.on("click","*[lay-href]",function(){var e=a(this),t=e.attr("lay-href"),i=e.attr("lay-text");layui.router();P.tabsPage.elem=e;var n=parent===self?layui:top.layui;n.index.openTabsPage(t,i||e.text()),t===P.tabsBody(P.tabsPage.index).find("iframe").attr("src")&&P.events.refresh()}),o.on("click","*[layadmin-event]",function(){var e=a(this),t=e.attr("layadmin-event");F[t]&&F[t].call(this,e)}),o.on("mouseenter","*[lay-tips]",function(){var e=a(this);if(!e.parent().hasClass("layui-nav-item")||u.hasClass(C)){var t=e.attr("lay-tips"),i=e.attr("lay-offset"),n=e.attr("lay-direction"),l=layer.tips(t,this,{tips:n||1,time:-1,success:function(e,a){i&&e.css("margin-left",i+"px")}});e.data("index",l)}}).on("mouseleave","*[lay-tips]",function(){layer.close(a(this).data("index"))});var z=layui.data.resizeSystem=function(){layer.closeAll("tips"),z.lock||setTimeout(function(){P.sideFlexible(P.screen()<2?"":"spread"),delete z.lock},100),z.lock=!0};r.on("resize",layui.data.resizeSystem),e("admin",P)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/lib/extend/echarts.js b/public/static/layui-admin/dist/layuiadmin/lib/extend/echarts.js new file mode 100755 index 0000000..67c9f51 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/lib/extend/echarts.js @@ -0,0 +1,46 @@ + +/* +* Licensed to the Apache Software Foundation (ASF) under one +* or more contributor license agreements. See the NOTICE file +* distributed with this work for additional information +* regarding copyright ownership. The ASF licenses this file +* to you under the Apache License, Version 2.0 (the +* "License"); you may not use this file except in compliance +* with the License. You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, +* software distributed under the License is distributed on an +* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +* KIND, either express or implied. See the License for the +* specific language governing permissions and limitations +* under the License. +*/ + +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).echarts={})}(this,(function(t){"use strict"; +/*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)};function n(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var i=function(){return(i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n18);a&&(n.weChat=!0);e.canvasSupported=!!document.createElement("canvas").getContext,e.svgSupported="undefined"!=typeof SVGRect,e.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,e.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),e.domSupported="undefined"!=typeof document}(navigator.userAgent,a);var s={"[object Function]":!0,"[object RegExp]":!0,"[object Date]":!0,"[object Error]":!0,"[object CanvasGradient]":!0,"[object CanvasPattern]":!0,"[object Image]":!0,"[object Canvas]":!0},l={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0},u=Object.prototype.toString,h=Array.prototype,c=h.forEach,p=h.filter,d=h.slice,f=h.map,g=function(){}.constructor,y=g?g.prototype:null,v={};function m(t,e){v[t]=e}var _=2311;function x(){return _++}function b(){for(var t=[],e=0;e>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",i[s]+":0",r[l]+":0",i[1-s]+":auto",r[1-l]+":auto",""].join("!important;"),t.appendChild(a),n.push(a)}return n}(e,o),o,r);if(s)return s(t,n,i),!0}return!1}function Ut(t){return"CANVAS"===t.nodeName.toUpperCase()}var Zt="undefined"!=typeof window&&!!window.addEventListener,jt=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,qt=[];function Kt(t,e,n,i){return n=n||{},i||!a.canvasSupported?$t(t,e,n):a.browser.firefox&&null!=e.layerX&&e.layerX!==e.offsetX?(n.zrX=e.layerX,n.zrY=e.layerY):null!=e.offsetX?(n.zrX=e.offsetX,n.zrY=e.offsetY):$t(t,e,n),n}function $t(t,e,n){if(a.domSupported&&t.getBoundingClientRect){var i=e.clientX,r=e.clientY;if(Ut(t)){var o=t.getBoundingClientRect();return n.zrX=i-o.left,void(n.zrY=r-o.top)}if(Xt(qt,t,i,r))return n.zrX=qt[0],void(n.zrY=qt[1])}n.zrX=n.zrY=0}function Jt(t){return t||window.event}function Qt(t,e,n){if(null!=(e=Jt(e)).zrX)return e;var i=e.type;if(i&&i.indexOf("touch")>=0){var r="touchend"!==i?e.targetTouches[0]:e.changedTouches[0];r&&Kt(t,r,e,n)}else{Kt(t,e,e,n);var o=function(t){var e=t.wheelDelta;if(e)return e;var n=t.deltaX,i=t.deltaY;if(null==n||null==i)return e;return 3*(0!==i?Math.abs(i):Math.abs(n))*(i>0?-1:i<0?1:n>0?-1:1)}(e);e.zrDelta=o?o/120:-(e.detail||0)/3}var a=e.button;return null==e.which&&void 0!==a&&jt.test(e.type)&&(e.which=1&a?1:2&a?3:4&a?2:0),e}function te(t,e,n,i){Zt?t.addEventListener(e,n,i):t.attachEvent("on"+e,n)}var ee=Zt?function(t){t.preventDefault(),t.stopPropagation(),t.cancelBubble=!0}:function(t){t.returnValue=!1,t.cancelBubble=!0};function ne(t){return 2===t.which||3===t.which}var ie=function(){function t(){this._track=[]}return t.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},t.prototype.clear=function(){return this._track.length=0,this},t.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var r={points:[],touches:[],target:e,event:t},o=0,a=i.length;o1&&r&&r.length>1){var a=re(r)/re(o);!isFinite(a)&&(a=1),e.pinchScale=a;var s=[((i=r)[0][0]+i[1][0])/2,(i[0][1]+i[1][1])/2];return e.pinchX=s[0],e.pinchY=s[1],{type:"pinch",target:t[0].target,event:e}}}}},ae="silent";function se(){ee(this.event)}var le=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.handler=null,e}return n(e,t),e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Ft),ue=function(t,e){this.x=t,this.y=e},he=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],ce=function(t){function e(e,n,i,r){var o=t.call(this)||this;return o._hovered=new ue(0,0),o.storage=e,o.painter=n,o.painterRoot=r,i=i||new le,o.proxy=null,o.setHandlerProxy(i),o._draggingMgr=new Vt(o),o}return n(e,t),e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(P(he,(function(e){t.on&&t.on(e,this[e],this)}),this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var e=t.zrX,n=t.zrY,i=de(this,e,n),r=this._hovered,o=r.target;o&&!o.__zr&&(o=(r=this.findHover(r.x,r.y)).target);var a=this._hovered=i?new ue(e,n):this.findHover(e,n),s=a.target,l=this.proxy;l.setCursor&&l.setCursor(s?s.cursor:"default"),o&&s!==o&&this.dispatchToElement(r,"mouseout",t),this.dispatchToElement(a,"mousemove",t),s&&s!==o&&this.dispatchToElement(a,"mouseover",t)},e.prototype.mouseout=function(t){var e=t.zrEventControl;"only_globalout"!==e&&this.dispatchToElement(this._hovered,"mouseout",t),"no_globalout"!==e&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new ue(0,0)},e.prototype.dispatch=function(t,e){var n=this[t];n&&n.call(this,e)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var e=this.proxy;e.setCursor&&e.setCursor(t)},e.prototype.dispatchToElement=function(t,e,n){var i=(t=t||{}).target;if(!i||!i.silent){for(var r="on"+e,o=function(t,e,n){return{type:t,event:n,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:se}}(e,t,n);i&&(i[r]&&(o.cancelBubble=!!i[r].call(i,o)),i.trigger(e,o),i=i.__hostTarget?i.__hostTarget:i.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(e,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(t){"function"==typeof t[r]&&t[r].call(t,o),t.trigger&&t.trigger(e,o)})))}},e.prototype.findHover=function(t,e,n){for(var i=this.storage.getDisplayList(),r=new ue(t,e),o=i.length-1;o>=0;o--){var a=void 0;if(i[o]!==n&&!i[o].ignore&&(a=pe(i[o],t,e))&&(!r.topTarget&&(r.topTarget=i[o]),a!==ae)){r.target=i[o];break}}return r},e.prototype.processGesture=function(t,e){this._gestureMgr||(this._gestureMgr=new ie);var n=this._gestureMgr;"start"===e&&n.clear();var i=n.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if("end"===e&&n.clear(),i){var r=i.type;t.gestureEvent=r;var o=new ue;o.target=i.target,this.dispatchToElement(o,r,i.event)}},e}(Ft);function pe(t,e,n){if(t[t.rectHover?"rectContain":"contain"](e,n)){for(var i=t,r=void 0,o=!1;i;){if(i.ignoreClip&&(o=!0),!o){var a=i.getClipPath();if(a&&!a.contain(e,n))return!1;i.silent&&(r=!0)}var s=i.__hostTarget;i=s||i.parent}return!r||ae}return!1}function de(t,e,n){var i=t.painter;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}function fe(){return[1,0,0,1,0,0]}function ge(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,t}function ye(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t}function ve(t,e,n){var i=e[0]*n[0]+e[2]*n[1],r=e[1]*n[0]+e[3]*n[1],o=e[0]*n[2]+e[2]*n[3],a=e[1]*n[2]+e[3]*n[3],s=e[0]*n[4]+e[2]*n[5]+e[4],l=e[1]*n[4]+e[3]*n[5]+e[5];return t[0]=i,t[1]=r,t[2]=o,t[3]=a,t[4]=s,t[5]=l,t}function me(t,e,n){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4]+n[0],t[5]=e[5]+n[1],t}function _e(t,e,n){var i=e[0],r=e[2],o=e[4],a=e[1],s=e[3],l=e[5],u=Math.sin(n),h=Math.cos(n);return t[0]=i*h+a*u,t[1]=-i*u+a*h,t[2]=r*h+s*u,t[3]=-r*u+h*s,t[4]=h*o+u*l,t[5]=h*l-u*o,t}function xe(t,e,n){var i=n[0],r=n[1];return t[0]=e[0]*i,t[1]=e[1]*r,t[2]=e[2]*i,t[3]=e[3]*r,t[4]=e[4]*i,t[5]=e[5]*r,t}function be(t,e){var n=e[0],i=e[2],r=e[4],o=e[1],a=e[3],s=e[5],l=n*a-o*i;return l?(l=1/l,t[0]=a*l,t[1]=-o*l,t[2]=-i*l,t[3]=n*l,t[4]=(i*s-a*r)*l,t[5]=(o*r-n*s)*l,t):null}function we(t){var e=[1,0,0,1,0,0];return ye(e,t),e}P(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(t){ce.prototype[t]=function(e){var n,i,r=e.zrX,o=e.zrY,a=de(this,r,o);if("mouseup"===t&&a||(i=(n=this.findHover(r,o)).target),"mousedown"===t)this._downEl=i,this._downPoint=[e.zrX,e.zrY],this._upEl=i;else if("mouseup"===t)this._upEl=i;else if("click"===t){if(this._downEl!==this._upEl||!this._downPoint||Lt(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(n,t,e)}}));var Se=Object.freeze({__proto__:null,create:fe,identity:ge,copy:ye,mul:ve,translate:me,rotate:_e,scale:xe,invert:be,clone:we}),Me=ge,Ie=5e-5;function Te(t){return t>Ie||t<-5e-5}var Ce=[],Ae=[],De=[1,0,0,1,0,0],Le=Math.abs,ke=function(){function t(){}return t.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},t.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},t.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},t.prototype.needLocalTransform=function(){return Te(this.rotation)||Te(this.x)||Te(this.y)||Te(this.scaleX-1)||Te(this.scaleY-1)},t.prototype.updateTransform=function(){var t=this.parent,e=t&&t.transform,n=this.needLocalTransform(),i=this.transform;n||e?(i=i||[1,0,0,1,0,0],n?this.getLocalTransform(i):Me(i),e&&(n?ve(i,t.transform,i):ye(i,t.transform)),this.transform=i,this._resolveGlobalScaleRatio(i)):i&&Me(i)},t.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(null!=e&&1!==e){this.getGlobalScale(Ce);var n=Ce[0]<0?-1:1,i=Ce[1]<0?-1:1,r=((Ce[0]-n)*e+n)/Ce[0]||0,o=((Ce[1]-i)*e+i)/Ce[1]||0;t[0]*=r,t[1]*=r,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||[1,0,0,1,0,0],be(this.invTransform,t)},t.prototype.getLocalTransform=function(e){return t.getLocalTransform(this,e)},t.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},t.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3];Te(e-1)&&(e=Math.sqrt(e)),Te(n-1)&&(n=Math.sqrt(n)),t[0]<0&&(e=-e),t[3]<0&&(n=-n),this.rotation=Math.atan2(-t[1]/n,t[0]/e),e<0&&n<0&&(this.rotation+=Math.PI,e=-e,n=-n),this.x=t[4],this.y=t[5],this.scaleX=e,this.scaleY=n}},t.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(ve(Ae,t.invTransform,e),e=Ae);var n=this.originX,i=this.originY;(n||i)&&(De[4]=n,De[5]=i,ve(Ae,e,De),Ae[4]-=n,Ae[5]-=i,e=Ae),this.setLocalTransform(e)}},t.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},t.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Rt(n,n,i),n},t.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Rt(n,n,i),n},t.prototype.getLineScale=function(){var t=this.transform;return t&&Le(t[0]-1)>1e-10&&Le(t[3]-1)>1e-10?Math.sqrt(Le(t[0]*t[3]-t[2]*t[1])):1},t.getLocalTransform=function(t,e){Me(e=e||[]);var n=t.originX||0,i=t.originY||0,r=t.scaleX,o=t.scaleY,a=t.rotation||0,s=t.x,l=t.y;return e[4]-=n,e[5]-=i,e[0]*=r,e[1]*=o,e[2]*=r,e[3]*=o,e[4]*=r,e[5]*=o,a&&_e(e,e,a),e[4]+=n,e[5]+=i,e[4]+=s,e[5]+=l,e},t.initDefaultProps=function(){var e=t.prototype;e.x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.originX=0,e.originY=0,e.rotation=0,e.globalScaleRatio=1}(),t}(),Pe={linear:function(t){return t},quadraticIn:function(t){return t*t},quadraticOut:function(t){return t*(2-t)},quadraticInOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)},cubicIn:function(t){return t*t*t},cubicOut:function(t){return--t*t*t+1},cubicInOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)},quarticIn:function(t){return t*t*t*t},quarticOut:function(t){return 1- --t*t*t*t},quarticInOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)},quinticIn:function(t){return t*t*t*t*t},quinticOut:function(t){return--t*t*t*t*t+1},quinticInOut:function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)},sinusoidalIn:function(t){return 1-Math.cos(t*Math.PI/2)},sinusoidalOut:function(t){return Math.sin(t*Math.PI/2)},sinusoidalInOut:function(t){return.5*(1-Math.cos(Math.PI*t))},exponentialIn:function(t){return 0===t?0:Math.pow(1024,t-1)},exponentialOut:function(t){return 1===t?1:1-Math.pow(2,-10*t)},exponentialInOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))},circularIn:function(t){return 1-Math.sqrt(1-t*t)},circularOut:function(t){return Math.sqrt(1- --t*t)},circularInOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},elasticIn:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4))},elasticOut:function(t){var e,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},elasticInOut:function(t){var e,n=.1,i=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=i*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/i)*.5+1)},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},backInOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)},bounceIn:function(t){return 1-Pe.bounceOut(1-t)},bounceOut:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},bounceInOut:function(t){return t<.5?.5*Pe.bounceIn(2*t):.5*Pe.bounceOut(2*t-1)+.5}},Oe=function(){function t(t){this._initialized=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=null!=t.loop&&t.loop,this.gap=t.gap||0,this.easing=t.easing||"linear",this.onframe=t.onframe,this.ondestroy=t.ondestroy,this.onrestart=t.onrestart}return t.prototype.step=function(t,e){if(this._initialized||(this._startTime=t+this._delay,this._initialized=!0),!this._paused){var n=(t-this._startTime-this._pausedTime)/this._life;n<0&&(n=0),n=Math.min(n,1);var i=this.easing,r="string"==typeof i?Pe[i]:i,o="function"==typeof r?r(n):n;if(this.onframe&&this.onframe(o),1===n){if(!this.loop)return!0;this._restart(t),this.onrestart&&this.onrestart()}return!1}this._pausedTime+=e},t.prototype._restart=function(t){var e=(t-this._startTime-this._pausedTime)%this._life;this._startTime=t-e+this.gap,this._pausedTime=0},t.prototype.pause=function(){this._paused=!0},t.prototype.resume=function(){this._paused=!1},t}(),Re=function(t){this.value=t},Ne=function(){function t(){this._len=0}return t.prototype.insert=function(t){var e=new Re(t);return this.insertEntry(e),e},t.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},t.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},t.prototype.len=function(){return this._len},t.prototype.clear=function(){this.head=this.tail=null,this._len=0},t}(),Ee=function(){function t(t){this._list=new Ne,this._maxSize=10,this._map={},this._maxSize=t}return t.prototype.put=function(t,e){var n=this._list,i=this._map,r=null;if(null==i[t]){var o=n.len(),a=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var s=n.head;n.remove(s),delete i[s.key],r=s.value,this._lastRemovedEntry=s}a?a.value=e:a=new Re(e),a.key=t,n.insertEntry(a),i[t]=a}return r},t.prototype.get=function(t){var e=this._map[t],n=this._list;if(null!=e)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},t.prototype.clear=function(){this._list.clear(),this._map={}},t.prototype.len=function(){return this._list.len()},t}(),ze={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Be(t){return(t=Math.round(t))<0?0:t>255?255:t}function Ve(t){return t<0?0:t>1?1:t}function Fe(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Be(parseFloat(e)/100*255):Be(parseInt(e,10))}function Ge(t){var e=t;return e.length&&"%"===e.charAt(e.length-1)?Ve(parseFloat(e)/100):Ve(parseFloat(e))}function He(t,e,n){return n<0?n+=1:n>1&&(n-=1),6*n<1?t+(e-t)*n*6:2*n<1?e:3*n<2?t+(e-t)*(2/3-n)*6:t}function We(t,e,n){return t+(e-t)*n}function Ye(t,e,n,i,r){return t[0]=e,t[1]=n,t[2]=i,t[3]=r,t}function Xe(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}var Ue=new Ee(20),Ze=null;function je(t,e){Ze&&Xe(Ze,e),Ze=Ue.put(t,Ze||e.slice())}function qe(t,e){if(t){e=e||[];var n=Ue.get(t);if(n)return Xe(e,n);var i=(t+="").replace(/ /g,"").toLowerCase();if(i in ze)return Xe(e,ze[i]),je(t,e),e;var r,o=i.length;if("#"===i.charAt(0))return 4===o||5===o?(r=parseInt(i.slice(1,4),16))>=0&&r<=4095?(Ye(e,(3840&r)>>4|(3840&r)>>8,240&r|(240&r)>>4,15&r|(15&r)<<4,5===o?parseInt(i.slice(4),16)/15:1),je(t,e),e):void Ye(e,0,0,0,1):7===o||9===o?(r=parseInt(i.slice(1,7),16))>=0&&r<=16777215?(Ye(e,(16711680&r)>>16,(65280&r)>>8,255&r,9===o?parseInt(i.slice(7),16)/255:1),je(t,e),e):void Ye(e,0,0,0,1):void 0;var a=i.indexOf("("),s=i.indexOf(")");if(-1!==a&&s+1===o){var l=i.substr(0,a),u=i.substr(a+1,s-(a+1)).split(","),h=1;switch(l){case"rgba":if(4!==u.length)return 3===u.length?Ye(e,+u[0],+u[1],+u[2],1):Ye(e,0,0,0,1);h=Ge(u.pop());case"rgb":return 3!==u.length?void Ye(e,0,0,0,1):(Ye(e,Fe(u[0]),Fe(u[1]),Fe(u[2]),h),je(t,e),e);case"hsla":return 4!==u.length?void Ye(e,0,0,0,1):(u[3]=Ge(u[3]),Ke(u,e),je(t,e),e);case"hsl":return 3!==u.length?void Ye(e,0,0,0,1):(Ke(u,e),je(t,e),e);default:return}}Ye(e,0,0,0,1)}}function Ke(t,e){var n=(parseFloat(t[0])%360+360)%360/360,i=Ge(t[1]),r=Ge(t[2]),o=r<=.5?r*(i+1):r+i-r*i,a=2*r-o;return Ye(e=e||[],Be(255*He(a,o,n+1/3)),Be(255*He(a,o,n)),Be(255*He(a,o,n-1/3)),1),4===t.length&&(e[3]=t[3]),e}function $e(t,e){var n=qe(t);if(n){for(var i=0;i<3;i++)n[i]=e<0?n[i]*(1-e)|0:(255-n[i])*e+n[i]|0,n[i]>255?n[i]=255:n[i]<0&&(n[i]=0);return an(n,4===n.length?"rgba":"rgb")}}function Je(t){var e=qe(t);if(e)return((1<<24)+(e[0]<<16)+(e[1]<<8)+ +e[2]).toString(16).slice(1)}function Qe(t,e,n){if(e&&e.length&&t>=0&&t<=1){n=n||[];var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=e[r],s=e[o],l=i-r;return n[0]=Be(We(a[0],s[0],l)),n[1]=Be(We(a[1],s[1],l)),n[2]=Be(We(a[2],s[2],l)),n[3]=Ve(We(a[3],s[3],l)),n}}var tn=Qe;function en(t,e,n){if(e&&e.length&&t>=0&&t<=1){var i=t*(e.length-1),r=Math.floor(i),o=Math.ceil(i),a=qe(e[r]),s=qe(e[o]),l=i-r,u=an([Be(We(a[0],s[0],l)),Be(We(a[1],s[1],l)),Be(We(a[2],s[2],l)),Ve(We(a[3],s[3],l))],"rgba");return n?{color:u,leftIndex:r,rightIndex:o,value:i}:u}}var nn=en;function rn(t,e,n,i){var r=qe(t);if(t)return r=function(t){if(t){var e,n,i=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(i,r,o),s=Math.max(i,r,o),l=s-a,u=(s+a)/2;if(0===l)e=0,n=0;else{n=u<.5?l/(s+a):l/(2-s-a);var h=((s-i)/6+l/2)/l,c=((s-r)/6+l/2)/l,p=((s-o)/6+l/2)/l;i===s?e=p-c:r===s?e=1/3+h-p:o===s&&(e=2/3+c-h),e<0&&(e+=1),e>1&&(e-=1)}var d=[360*e,n,u];return null!=t[3]&&d.push(t[3]),d}}(r),null!=e&&(r[0]=function(t){return(t=Math.round(t))<0?0:t>360?360:t}(e)),null!=n&&(r[1]=Ge(n)),null!=i&&(r[2]=Ge(i)),an(Ke(r),"rgba")}function on(t,e){var n=qe(t);if(n&&null!=e)return n[3]=Ve(e),an(n,"rgba")}function an(t,e){if(t&&t.length){var n=t[0]+","+t[1]+","+t[2];return"rgba"!==e&&"hsva"!==e&&"hsla"!==e||(n+=","+t[3]),e+"("+n+")"}}function sn(t,e){var n=qe(t);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*e:0}var ln=Object.freeze({__proto__:null,parse:qe,lift:$e,toHex:Je,fastLerp:Qe,fastMapToColor:tn,lerp:en,mapToColor:nn,modifyHSL:rn,modifyAlpha:on,stringify:an,lum:sn,random:function(){return"rgb("+Math.round(255*Math.random())+","+Math.round(255*Math.random())+","+Math.round(255*Math.random())+")"}}),un=Array.prototype.slice;function hn(t,e,n){return(e-t)*n+t}function cn(t,e,n,i){for(var r=e.length,o=0;oa)i.length=a;else for(var s=o;s=2&&this.interpolable},t.prototype.getAdditiveTrack=function(){return this._additiveTrack},t.prototype.addKeyframe=function(t,e){t>=this.maxTime?this.maxTime=t:this._needsSort=!0;var n=this.keyframes,i=n.length;if(this.interpolable)if(k(e)){var r=function(t){return k(t&&t[0])?2:1}(e);if(i>0&&this.arrDim!==r)return void(this.interpolable=!1);if(1===r&&"number"!=typeof e[0]||2===r&&"number"!=typeof e[0][0])return void(this.interpolable=!1);if(i>0){var o=n[i-1];this._isAllValueEqual&&(1===r&&gn(e,o.value)||(this._isAllValueEqual=!1))}this.arrDim=r}else{if(this.arrDim>0)return void(this.interpolable=!1);if("string"==typeof e){var a=qe(e);a?(e=a,this.isValueColor=!0):this.interpolable=!1}else if("number"!=typeof e)return void(this.interpolable=!1);if(this._isAllValueEqual&&i>0){o=n[i-1];(this.isValueColor&&!gn(o.value,e)||o.value!==e)&&(this._isAllValueEqual=!1)}}var s={time:t,value:e,percent:0};return this.keyframes.push(s),s},t.prototype.prepare=function(t){var e=this.keyframes;this._needsSort&&e.sort((function(t,e){return t.time-e.time}));for(var n=this.arrDim,i=e.length,r=e[i-1],o=0;o0&&o!==i-1&&fn(e[o].value,r.value,n);if(t&&this.needsAnimate()&&t.needsAnimate()&&n===t.arrDim&&this.isValueColor===t.isValueColor&&!t._finished){this._additiveTrack=t;var a=e[0].value;for(o=0;o=0&&!(o[n].percent<=e);n--);n=Math.min(n,a-2)}else{for(n=this._lastFrame;ne);n++);n=Math.min(n-1,a-2)}var h=o[n+1],c=o[n];if(c&&h){this._lastFrame=n,this._lastFramePercent=e;var p=h.percent-c.percent;if(0!==p){var d=(e-c.percent)/p,f=i?this._additiveValue:u?wn:t[s];if((l>0||u)&&!f&&(f=this._additiveValue=[]),this.useSpline){var g=o[n][r],y=o[0===n?n:n-1][r],v=o[n>a-2?a-1:n+1][r],m=o[n>a-3?a-1:n+2][r];if(l>0)1===l?vn(f,y,g,v,m,d,d*d,d*d*d):function(t,e,n,i,r,o,a,s){for(var l=e.length,u=e[0].length,h=0;h0)1===l?cn(f,c[r],h[r],d):function(t,e,n,i){for(var r=e.length,o=r&&e[0].length,a=0;a.5?e:t}(c[r],h[r],d),i?this._additiveValue=_:t[s]=_}i&&this._addToTarget(t)}}}},t.prototype._addToTarget=function(t){var e=this.arrDim,n=this.propName,i=this._additiveValue;0===e?this.isValueColor?(qe(t[n],wn),pn(wn,wn,i,1),t[n]=_n(wn)):t[n]=t[n]+i:1===e?pn(t[n],t[n],i,1):2===e&&dn(t[n],t[n],i,1)},t}(),Mn=function(){function t(t,e,n){this._tracks={},this._trackKeys=[],this._delay=0,this._maxTime=0,this._paused=!1,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n?b("Can' use additive animation on looped animation."):this._additiveAnimators=n}return t.prototype.getTarget=function(){return this._target},t.prototype.changeTarget=function(t){this._target=t},t.prototype.when=function(t,e){return this.whenWithKeys(t,e,z(e))},t.prototype.whenWithKeys=function(t,e,n){for(var i=this._tracks,r=0;r0)){this._started=1;for(var n=this,i=[],r=0;r1){var a=o.pop();r.addKeyframe(a.time,t[i]),r.prepare(r.getAdditiveTrack())}}}},t}(),In=function(){function t(t,e){this.x=t||0,this.y=e||0}return t.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.set=function(t,e){return this.x=t,this.y=e,this},t.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},t.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},t.prototype.scale=function(t){this.x*=t,this.y*=t},t.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},t.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},t.prototype.dot=function(t){return this.x*t.x+this.y*t.y},t.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},t.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},t.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},t.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},t.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},t.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},t.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},t.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},t.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},t.set=function(t,e,n){t.x=e,t.y=n},t.copy=function(t,e){t.x=e.x,t.y=e.y},t.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.lenSquare=function(t){return t.x*t.x+t.y*t.y},t.dot=function(t,e){return t.x*e.x+t.y*e.y},t.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},t.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},t.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},t.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},t.lerp=function(t,e,n,i){var r=1-i;t.x=r*e.x+i*n.x,t.y=r*e.y+i*n.y},t}(),Tn=Math.min,Cn=Math.max,An=new In,Dn=new In,Ln=new In,kn=new In,Pn=new In,On=new In,Rn=function(){function t(t,e,n,i){n<0&&isFinite(n)&&(t+=n,n=-n),i<0&&isFinite(i)&&(e+=i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return t.prototype.union=function(t){var e=Tn(t.x,this.x),n=Tn(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Cn(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=Cn(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},t.prototype.applyTransform=function(e){t.applyTransform(this,this,e)},t.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,r=[1,0,0,1,0,0];return me(r,r,[-e.x,-e.y]),xe(r,r,[n,i]),me(r,r,[t.x,t.y]),r},t.prototype.intersect=function(e,n){if(!e)return!1;e instanceof t||(e=t.create(e));var i=this,r=i.x,o=i.x+i.width,a=i.y,s=i.y+i.height,l=e.x,u=e.x+e.width,h=e.y,c=e.y+e.height,p=!(of&&(f=_,gf&&(f=x,v=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copy=function(e){t.copy(this,e)},t.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},t.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},t.prototype.isZero=function(){return 0===this.width||0===this.height},t.create=function(e){return new t(e.x,e.y,e.width,e.height)},t.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},t.applyTransform=function(e,n,i){if(i){if(i[1]<1e-5&&i[1]>-1e-5&&i[2]<1e-5&&i[2]>-1e-5){var r=i[0],o=i[3],a=i[4],s=i[5];return e.x=n.x*r+a,e.y=n.y*o+s,e.width=n.width*r,e.height=n.height*o,e.width<0&&(e.x+=e.width,e.width=-e.width),void(e.height<0&&(e.y+=e.height,e.height=-e.height))}An.x=Ln.x=n.x,An.y=kn.y=n.y,Dn.x=kn.x=n.x+n.width,Dn.y=Ln.y=n.y+n.height,An.transform(i),kn.transform(i),Dn.transform(i),Ln.transform(i),e.x=Tn(An.x,Dn.x,Ln.x,kn.x),e.y=Tn(An.y,Dn.y,Ln.y,kn.y);var l=Cn(An.x,Dn.x,Ln.x,kn.x),u=Cn(An.y,Dn.y,Ln.y,kn.y);e.width=l-e.x,e.height=u-e.y}else e!==n&&t.copy(e,n)},t}(),Nn={},En="12px sans-serif";var zn={measureText:function(t,e){return xn||(xn=C().getContext("2d")),bn!==e&&(bn=xn.font=e||En),xn.measureText(t)}};function Bn(t,e){var n=Nn[e=e||En];n||(n=Nn[e]=new Ee(500));var i=n.get(t);return null==i&&(i=zn.measureText(t,e).width,n.put(t,i)),i}function Vn(t,e,n,i){var r=Bn(t,e),o=Wn(e),a=Gn(0,r,n),s=Hn(0,o,i);return new Rn(a,s,r,o)}function Fn(t,e,n,i){var r=((t||"")+"").split("\n");if(1===r.length)return Vn(r[0],e,n,i);for(var o=new Rn(0,0,0,0),a=0;a=0?parseFloat(t)/100*e:parseFloat(t):t}function Xn(t,e,n){var i=e.position||"inside",r=null!=e.distance?e.distance:5,o=n.height,a=n.width,s=o/2,l=n.x,u=n.y,h="left",c="top";if(i instanceof Array)l+=Yn(i[0],n.width),u+=Yn(i[1],n.height),h=null,c=null;else switch(i){case"left":l-=r,u+=s,h="right",c="middle";break;case"right":l+=r+a,u+=s,c="middle";break;case"top":l+=a/2,u-=r,h="center",c="bottom";break;case"bottom":l+=a/2,u+=o+r,h="center";break;case"inside":l+=a/2,u+=s,h="center",c="middle";break;case"insideLeft":l+=r,u+=s,c="middle";break;case"insideRight":l+=a-r,u+=s,h="right",c="middle";break;case"insideTop":l+=a/2,u+=r,h="center";break;case"insideBottom":l+=a/2,u+=o-r,h="center",c="bottom";break;case"insideTopLeft":l+=r,u+=r;break;case"insideTopRight":l+=a-r,u+=r,h="right";break;case"insideBottomLeft":l+=r,u+=o-r,c="bottom";break;case"insideBottomRight":l+=a-r,u+=o-r,h="right",c="bottom"}return(t=t||{}).x=l,t.y=u,t.align=h,t.verticalAlign=c,t}var Un=1;"undefined"!=typeof window&&(Un=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var Zn=Un,jn="#333",qn="#ccc",Kn="__zr_normal__",$n=["x","y","scaleX","scaleY","originX","originY","rotation","ignore"],Jn={x:!0,y:!0,scaleX:!0,scaleY:!0,originX:!0,originY:!0,rotation:!0,ignore:!1},Qn={},ti=new Rn(0,0,0,0),ei=function(){function t(t){this.id=x(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return t.prototype._init=function(t){this.attr(t)},t.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},t.prototype.beforeUpdate=function(){},t.prototype.afterUpdate=function(){},t.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},t.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,r=e.attachedTransform,o=void 0,a=void 0,s=!1;r.parent=i?this:null;var l=!1;if(r.x=e.x,r.y=e.y,r.originX=e.originX,r.originY=e.originY,r.rotation=e.rotation,r.scaleX=e.scaleX,r.scaleY=e.scaleY,null!=n.position){var u=ti;n.layoutRect?u.copy(n.layoutRect):u.copy(this.getBoundingRect()),i||u.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Qn,n,u):Xn(Qn,n,u),r.x=Qn.x,r.y=Qn.y,o=Qn.align,a=Qn.verticalAlign;var h=n.origin;if(h&&null!=n.rotation){var c=void 0,p=void 0;"center"===h?(c=.5*u.width,p=.5*u.height):(c=Yn(h[0],u.width),p=Yn(h[1],u.height)),l=!0,r.originX=-r.x+c+(i?0:u.x),r.originY=-r.y+p+(i?0:u.y)}}null!=n.rotation&&(r.rotation=n.rotation);var d=n.offset;d&&(r.x+=d[0],r.y+=d[1],l||(r.originX=-d[0],r.originY=-d[1]));var f=null==n.inside?"string"==typeof n.position&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,v=void 0,m=void 0;f&&this.canBeInsideText()?(y=n.insideFill,v=n.insideStroke,null!=y&&"auto"!==y||(y=this.getInsideTextFill()),null!=v&&"auto"!==v||(v=this.getInsideTextStroke(y),m=!0)):(y=n.outsideFill,v=n.outsideStroke,null!=y&&"auto"!==y||(y=this.getOutsideFill()),null!=v&&"auto"!==v||(v=this.getOutsideStroke(y),m=!0)),(y=y||"#000")===g.fill&&v===g.stroke&&m===g.autoStroke&&o===g.align&&a===g.verticalAlign||(s=!0,g.fill=y,g.stroke=v,g.autoStroke=m,g.align=o,g.verticalAlign=a,e.setDefaultTextStyle(g)),s&&e.dirtyStyle(),e.markRedraw()}},t.prototype.canBeInsideText=function(){return!0},t.prototype.getInsideTextFill=function(){return"#fff"},t.prototype.getInsideTextStroke=function(t){return"#000"},t.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?qn:jn},t.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof e&&qe(e);n||(n=[255,255,255,1]);for(var i=n[3],r=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(r?0:255)*(1-i);return n[3]=1,an(n,"rgba")},t.prototype.traverse=function(t,e){},t.prototype.attrKV=function(t,e){"textConfig"===t?this.setTextConfig(e):"textContent"===t?this.setTextContent(e):"clipPath"===t?this.setClipPath(e):"extra"===t?(this.extra=this.extra||{},I(this.extra,e)):this[t]=e},t.prototype.hide=function(){this.ignore=!0,this.markRedraw()},t.prototype.show=function(){this.ignore=!1,this.markRedraw()},t.prototype.attr=function(t,e){if("string"==typeof t)this.attrKV(t,e);else if(X(t))for(var n=z(t),i=0;i0},t.prototype.getState=function(t){return this.states[t]},t.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},t.prototype.clearStates=function(t){this.useState(Kn,!1,t)},t.prototype.useState=function(e,n,i){var r=e===Kn;if(this.hasState()||!r){var o=this.currentStates,a=this.stateTransition;if(!(A(o,e)>=0)||!n&&1!==o.length){var s;if(this.stateProxy&&!r&&(s=this.stateProxy(e)),s||(s=this.states&&this.states[e]),s||r){r||this.saveCurrentToNormalState(s);var l=!(!s||!s.hoverLayer);return l&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,s,this._normalState,n,!i&&!this.__inHover&&a&&a.duration>0,a),this._textContent&&this._textContent.useState(e,n),this._textGuide&&this._textGuide.useState(e,n),r?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT),s}b("State "+e+" not exists.")}}},t.prototype.useStates=function(e,n){if(e.length){var i=[],r=this.currentStates,o=e.length,a=o===r.length;if(a)for(var s=0;s0,p),this._textContent&&this._textContent.useStates(e),this._textGuide&&this._textGuide.useStates(e),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!h&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~t.REDARAW_BIT)}else this.clearStates()},t.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},t.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),r=A(i,t),o=A(i,e)>=0;r>=0?o?i.splice(r,1):i[r]=e:n&&!o&&i.push(e),this.useStates(i)},t.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},t.prototype._mergeStates=function(t){for(var e,n={},i=0;i=0&&e.splice(n,1)})),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},t.prototype.updateDuringAnimation=function(t){this.markRedraw()},t.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,r=[],o=0;o8)&&(r("position","_legacyPos","x","y"),r("scale","_legacyScale","scaleX","scaleY"),r("origin","_legacyOrigin","originX","originY"))}(),t}();function ni(t,e,n,i,r){var o=[];oi(t,"",t,e,n=n||{},i,o,r);var a=o.length,s=!1,l=n.done,u=n.aborted,h=function(){s=!0,--a<=0&&(s?l&&l():u&&u())},c=function(){--a<=0&&(s?l&&l():u&&u())};a||l&&l(),o.length>0&&n.during&&o[0].during((function(t,e){n.during(e)}));for(var p=0;p0||r.force&&!a.length){for(var m=t.animators,_=[],x=0;x=0;)r++;return r-e}function si(t,e,n,i,r){for(i===e&&i++;i>>1])<0?l=o:s=o+1;var u=i-s;switch(u){case 3:t[s+3]=t[s+2];case 2:t[s+2]=t[s+1];case 1:t[s+1]=t[s];break;default:for(;u>0;)t[s+u]=t[s+u-1],u--}t[s]=a}}function li(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])>0){for(s=i-r;l0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}else{for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}for(a++;a>>1);o(t,e[n+h])>0?a=h+1:l=h}return l}function ui(t,e,n,i,r,o){var a=0,s=0,l=1;if(o(t,e[n+r])<0){for(s=r+1;ls&&(l=s);var u=a;a=r-l,l=r-u}else{for(s=i-r;l=0;)a=l,(l=1+(l<<1))<=0&&(l=s);l>s&&(l=s),a+=r,l+=r}for(a++;a>>1);o(t,e[n+h])<0?l=h:a=h+1}return l}function hi(t,e){var n,i,r=7,o=0;t.length;var a=[];function s(s){var l=n[s],u=i[s],h=n[s+1],c=i[s+1];i[s]=u+c,s===o-3&&(n[s+1]=n[s+2],i[s+1]=i[s+2]),o--;var p=ui(t[h],t,l,u,0,e);l+=p,0!==(u-=p)&&0!==(c=li(t[l+u-1],t,h,c,c-1,e))&&(u<=c?function(n,i,o,s){var l=0;for(l=0;l=7||d>=7);if(f)break;g<0&&(g=0),g+=2}if((r=g)<1&&(r=1),1===i){for(l=0;l=0;l--)t[d+l]=t[p+l];return void(t[c]=a[h])}var f=r;for(;;){var g=0,y=0,v=!1;do{if(e(a[h],t[u])<0){if(t[c--]=t[u--],g++,y=0,0==--i){v=!0;break}}else if(t[c--]=a[h--],y++,g=0,1==--s){v=!0;break}}while((g|y)=0;l--)t[d+l]=t[p+l];if(0===i){v=!0;break}}if(t[c--]=a[h--],1==--s){v=!0;break}if(0!==(y=s-li(t[u],a,0,s,s-1,e))){for(s-=y,d=(c-=y)+1,p=(h-=y)+1,l=0;l=7||y>=7);if(v)break;f<0&&(f=0),f+=2}(r=f)<1&&(r=1);if(1===s){for(d=(c-=i)+1,p=(u-=i)+1,l=i-1;l>=0;l--)t[d+l]=t[p+l];t[c]=a[h]}else{if(0===s)throw new Error;for(p=c-(s-1),l=0;l1;){var t=o-2;if(t>=1&&i[t-1]<=i[t]+i[t+1]||t>=2&&i[t-2]<=i[t]+i[t-1])i[t-1]i[t+1])break;s(t)}},forceMergeRuns:function(){for(;o>1;){var t=o-2;t>0&&i[t-1]=32;)e|=1&t,t>>=1;return t+e}(r);do{if((o=ai(t,n,i,e))s&&(l=s),si(t,n,n+l,n+o,e),o=l}a.pushRun(n,o),a.mergeRuns(),r-=o,n+=o}while(0!==r);a.forceMergeRuns()}}}var pi=!1;function di(){pi||(pi=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function fi(t,e){return t.zlevel===e.zlevel?t.z===e.z?t.z2-e.z2:t.z-e.z:t.zlevel-e.zlevel}var gi,yi,vi=function(){function t(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=fi}return t.prototype.traverse=function(t,e){for(var n=0;n0&&(u.__clipPaths=[]),isNaN(u.z)&&(di(),u.z=0),isNaN(u.z2)&&(di(),u.z2=0),isNaN(u.zlevel)&&(di(),u.zlevel=0),this._displayList[this._displayListLen++]=u}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var p=t.getTextContent();p&&this._updateAndAddDisplayable(p,e,n)}},t.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},t.prototype.delRoot=function(t){if(t instanceof Array)for(var e=0,n=t.length;e=0&&this._roots.splice(i,1)}},t.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},t.prototype.getRoots=function(){return this._roots},t.prototype.dispose=function(){this._displayList=null,this._roots=null},t}(),mi="undefined"!=typeof window&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(t){return setTimeout(t,16)},_i=function(t){function e(e){var n=t.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n.onframe=e.onframe||function(){},n}return n(e,t),e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._clipsHead?(this._clipsTail.next=t,t.prev=this._clipsTail,t.next=null,this._clipsTail=t):this._clipsHead=this._clipsTail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var e=t.getClip();e&&this.addClip(e)},e.prototype.removeClip=function(t){if(t.animation){var e=t.prev,n=t.next;e?e.next=n:this._clipsHead=n,n?n.prev=e:this._clipsTail=e,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var e=t.getClip();e&&this.removeClip(e),t.animation=null},e.prototype.update=function(t){for(var e=(new Date).getTime()-this._pausedTime,n=e-this._time,i=this._clipsHead;i;){var r=i.next;i.step(e,n)?(i.ondestroy&&i.ondestroy(),this.removeClip(i),i=r):i=r}this._time=e,t||(this.onframe(n),this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0,mi((function e(){t._running&&(mi(e),!t._paused&&t.update())}))},e.prototype.start=function(){this._running||(this._time=(new Date).getTime(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=(new Date).getTime(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=(new Date).getTime()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._clipsHead;t;){var e=t.next;t.prev=t.next=t.animation=null,t=e}this._clipsHead=this._clipsTail=null},e.prototype.isFinished=function(){return null==this._clipsHead},e.prototype.animate=function(t,e){e=e||{},this.start();var n=new Mn(t,e.loop);return this.addAnimator(n),n},e}(Ft),xi=a.domSupported,bi=(yi={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:gi=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:O(gi,(function(t){var e=t.replace("mouse","pointer");return yi.hasOwnProperty(e)?e:t}))}),wi=["mousemove","mouseup"],Si=["pointermove","pointerup"],Mi=!1;function Ii(t){var e=t.pointerType;return"pen"===e||"touch"===e}function Ti(t){t&&(t.zrByTouch=!0)}function Ci(t,e){for(var n=e,i=!1;n&&9!==n.nodeType&&!(i=n.domBelongToZr||n!==e&&n===t.painterRoot);)n=n.parentNode;return i}var Ai=function(t,e){this.stopPropagation=ft,this.stopImmediatePropagation=ft,this.preventDefault=ft,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY},Di={mousedown:function(t){t=Qt(this.dom,t),this.__mayPointerCapture=[t.zrX,t.zrY],this.trigger("mousedown",t)},mousemove:function(t){t=Qt(this.dom,t);var e=this.__mayPointerCapture;!e||t.zrX===e[0]&&t.zrY===e[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",t)},mouseup:function(t){t=Qt(this.dom,t),this.__togglePointerCapture(!1),this.trigger("mouseup",t)},mouseout:function(t){Ci(this,(t=Qt(this.dom,t)).toElement||t.relatedTarget)||(this.__pointerCapturing&&(t.zrEventControl="no_globalout"),this.trigger("mouseout",t))},wheel:function(t){Mi=!0,t=Qt(this.dom,t),this.trigger("mousewheel",t)},mousewheel:function(t){Mi||(t=Qt(this.dom,t),this.trigger("mousewheel",t))},touchstart:function(t){Ti(t=Qt(this.dom,t)),this.__lastTouchMoment=new Date,this.handler.processGesture(t,"start"),Di.mousemove.call(this,t),Di.mousedown.call(this,t)},touchmove:function(t){Ti(t=Qt(this.dom,t)),this.handler.processGesture(t,"change"),Di.mousemove.call(this,t)},touchend:function(t){Ti(t=Qt(this.dom,t)),this.handler.processGesture(t,"end"),Di.mouseup.call(this,t),+new Date-+this.__lastTouchMoment<300&&Di.click.call(this,t)},pointerdown:function(t){Di.mousedown.call(this,t)},pointermove:function(t){Ii(t)||Di.mousemove.call(this,t)},pointerup:function(t){Di.mouseup.call(this,t)},pointerout:function(t){Ii(t)||Di.mouseout.call(this,t)}};P(["click","dblclick","contextmenu"],(function(t){Di[t]=function(e){e=Qt(this.dom,e),this.trigger(t,e)}}));var Li={pointermove:function(t){Ii(t)||Li.mousemove.call(this,t)},pointerup:function(t){Li.mouseup.call(this,t)},mousemove:function(t){this.trigger("mousemove",t)},mouseup:function(t){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",t),e&&(t.zrEventControl="only_globalout",this.trigger("mouseout",t))}};function ki(t,e){var n=e.domHandlers;a.pointerEventsSupported?P(bi.pointer,(function(i){Oi(e,i,(function(e){n[i].call(t,e)}))})):(a.touchEventsSupported&&P(bi.touch,(function(i){Oi(e,i,(function(r){n[i].call(t,r),function(t){t.touching=!0,null!=t.touchTimer&&(clearTimeout(t.touchTimer),t.touchTimer=null),t.touchTimer=setTimeout((function(){t.touching=!1,t.touchTimer=null}),700)}(e)}))})),P(bi.mouse,(function(i){Oi(e,i,(function(r){r=Jt(r),e.touching||n[i].call(t,r)}))})))}function Pi(t,e){function n(n){Oi(e,n,(function(i){i=Jt(i),Ci(t,i.target)||(i=function(t,e){return Qt(t.dom,new Ai(t,e),!0)}(t,i),e.domHandlers[n].call(t,i))}),{capture:!0})}a.pointerEventsSupported?P(Si,n):a.touchEventsSupported||P(wi,n)}function Oi(t,e,n,i){t.mounted[e]=n,t.listenerOpts[e]=i,te(t.domTarget,e,n,i)}function Ri(t){var e,n,i,r,o=t.mounted;for(var a in o)o.hasOwnProperty(a)&&(e=t.domTarget,n=a,i=o[a],r=t.listenerOpts[a],Zt?e.removeEventListener(n,i,r):e.detachEvent("on"+n,i));t.mounted={}}var Ni=function(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e},Ei=function(t){function e(e,n){var i=t.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new Ni(e,Di),xi&&(i._globalHandlerScope=new Ni(document,Li)),ki(i,i._localHandlerScope),i}return n(e,t),e.prototype.dispose=function(){Ri(this._localHandlerScope),xi&&Ri(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,xi&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var e=this._globalHandlerScope;t?Pi(this,e):Ri(e)}},e}(Ft),zi=function(t){function e(e){var n=t.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var e=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replaceAt=function(t,e){var n=this._children,i=n[e];if(t&&t!==this&&t.parent!==this&&t!==i){n[e]=t,i.parent=null;var r=this.__zr;r&&i.removeSelfFromZr(r),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var e=this.__zr;e&&e!==t.__zr&&t.addSelfToZr(e),e&&e.refresh()},e.prototype.remove=function(t){var e=this.__zr,n=this._children,i=A(n,t);return i<0||(n.splice(i,1),t.parent=null,e&&t.removeSelfFromZr(e),e&&e.refresh()),this},e.prototype.removeAll=function(){for(var t=this._children,e=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},t.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},t.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},t.prototype.addHover=function(t){},t.prototype.removeHover=function(t){},t.prototype.clearHover=function(){},t.prototype.refreshHover=function(){this._needsRefreshHover=!0},t.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},t.prototype.resize=function(t){t=t||{},this.painter.resize(t.width,t.height),this.handler.resize()},t.prototype.clearAnimation=function(){this.animation.clear()},t.prototype.getWidth=function(){return this.painter.getWidth()},t.prototype.getHeight=function(){return this.painter.getHeight()},t.prototype.pathToImage=function(t,e){if(this.painter.pathToImage)return this.painter.pathToImage(t,e)},t.prototype.setCursorStyle=function(t){this.handler.setCursorStyle(t)},t.prototype.findHover=function(t,e){return this.handler.findHover(t,e)},t.prototype.on=function(t,e,n){return this.handler.on(t,e,n),this},t.prototype.off=function(t,e){this.handler.off(t,e)},t.prototype.trigger=function(t,e){this.handler.trigger(t,e)},t.prototype.clear=function(){for(var t=this.storage.getRoots(),e=0;e0){if(t<=e[0])return n[0];if(t>=e[1])return n[1]}else{if(t>=e[0])return n[0];if(t<=e[1])return n[1]}else{if(t===e[0])return n[0];if(t===e[1])return n[1]}return(t-e[0])/r*o+n[0]}function Zi(t,e){switch(t){case"center":case"middle":t="50%";break;case"left":case"top":t="0%";break;case"right":case"bottom":t="100%"}return"string"==typeof t?(n=t,n.replace(/^\s+|\s+$/g,"")).match(/%$/)?parseFloat(t)/100*e:parseFloat(t):null==t?NaN:+t;var n}function ji(t,e,n){return null==e&&(e=10),e=Math.min(Math.max(0,e),20),t=(+t).toFixed(e),n?t:+t}function qi(t){return t.sort((function(t,e){return t-e})),t}function Ki(t){if(t=+t,isNaN(t))return 0;for(var e=1,n=0;Math.round(t*e)/e!==t;)e*=10,n++;return n}function $i(t){var e=t.toString(),n=e.indexOf("e");if(n>0){var i=+e.slice(n+1);return i<0?-i:0}var r=e.indexOf(".");return r<0?0:e.length-1-r}function Ji(t,e){var n=Math.log,i=Math.LN10,r=Math.floor(n(t[1]-t[0])/i),o=Math.round(n(Math.abs(e[1]-e[0]))/i),a=Math.min(Math.max(-r+o,0),20);return isFinite(a)?a:20}function Qi(t,e,n){if(!t[e])return 0;var i=R(t,(function(t,e){return t+(isNaN(e)?0:e)}),0);if(0===i)return 0;for(var r=Math.pow(10,n),o=O(t,(function(t){return(isNaN(t)?0:t)/i*r*100})),a=100*r,s=O(o,(function(t){return Math.floor(t)})),l=R(s,(function(t,e){return t+e}),0),u=O(o,(function(t,e){return t-s[e]}));lh&&(h=u[p],c=p);++s[c],u[c]=0,++l}return s[e]/r}var tr=9007199254740991;function er(t){var e=2*Math.PI;return(t%e+e)%e}function nr(t){return t>-1e-4&&t=10&&e++,e}function sr(t,e){var n=ar(t),i=Math.pow(10,n),r=t/i;return t=(e?r<1.5?1:r<2.5?2:r<4?3:r<7?5:10:r<1?1:r<2?2:r<3?3:r<5?5:10)*i,n>=-20?+t.toFixed(n<0?-n:0):t}function lr(t,e){var n=(t.length-1)*e+1,i=Math.floor(n),r=+t[i-1],o=n-i;return o?r+o*(t[i]-r):r}function ur(t){t.sort((function(t,e){return s(t,e,0)?-1:1}));for(var e=-1/0,n=1,i=0;i=0||r&&A(r,s)<0)){var l=n.getShallow(s,e);null!=l&&(o[t[a][0]]=l)}}return o}}var Kr=qr([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]),$r=function(){function t(){}return t.prototype.getAreaStyle=function(t,e){return Kr(this,t,e)},t}(),Jr=new Ee(50);function Qr(t){if("string"==typeof t){var e=Jr.get(t);return e&&e.image}return t}function to(t,e,n,i,r){if(t){if("string"==typeof t){if(e&&e.__zrImageSrc===t||!n)return e;var o=Jr.get(t),a={hostEl:n,cb:i,cbPayload:r};return o?!no(e=o.image)&&o.pending.push(a):((e=new Image).onload=e.onerror=eo,Jr.put(t,e.__cachedImgObj={image:e,pending:[a]}),e.src=e.__zrImageSrc=t),e}return t}return e}function eo(){var t=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=a;l++)s-=a;var u=Bn(n,e);return u>s&&(n="",u=0),s=t-u,r.ellipsis=n,r.ellipsisWidth=u,r.contentWidth=s,r.containerWidth=t,r}function ao(t,e){var n=e.containerWidth,i=e.font,r=e.contentWidth;if(!n)return"";var o=Bn(t,i);if(o<=n)return t;for(var a=0;;a++){if(o<=r||a>=e.maxIterations){t+=e.ellipsis;break}var s=0===a?so(t,r,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*r/o):0;o=Bn(t=t.substr(0,s),i)}return""===t&&(t=e.placeholder),t}function so(t,e,n,i){for(var r=0,o=0,a=t.length;o=0?parseFloat(t)/100*e:parseFloat(t);return t}(l.width,i.width)+d;u.length>0&&f+i.accumWidth>i.width&&(o=e.split("\n"),c=!0),i.accumWidth=f}else{var g=go(e,h,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+d,a=g.linesWidths,o=g.lines}}else o=e.split("\n");for(var y=0;y=33&&e<=255}(t)||!!po[t]}function go(t,e,n,i,r){for(var o=[],a=[],s="",l="",u=0,h=0,c=0;cn:r+h+d>n)?h?(s||l)&&(f?(s||(s=l,l="",h=u=0),o.push(s),a.push(h-u),l+=p,s="",h=u+=d):(l&&(s+=l,h+=u,l="",u=0),o.push(s),a.push(h),s=p,h=d)):f?(o.push(l),a.push(u),l=p,u=d):(o.push(p),a.push(d)):(h+=d,f?(l+=p,u+=d):(l&&(s+=l,l="",u=0),s+=p))}else l&&(s+=l,h+=u),o.push(s),a.push(h),s="",l="",u=0,h=0}return o.length||s||(s=t,l="",u=0),l&&(s+=l),s&&(o.push(s),a.push(h)),1===o.length&&(h+=r),{accumWidth:h,lines:o,linesWidths:a}}var yo="__zr_style_"+Math.round(10*Math.random()),vo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},mo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};vo[yo]=!0;var _o=["z","z2","invisible"],xo=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype._init=function(e){for(var n=z(e),i=0;i-1e-8&&tIo||t<-1e-8}function Ro(t,e,n,i,r){var o=1-r;return o*o*(o*t+3*r*e)+r*r*(r*i+3*o*n)}function No(t,e,n,i,r){var o=1-r;return 3*(((e-t)*o+2*(n-e)*r)*o+(i-n)*r*r)}function Eo(t,e,n,i,r,o){var a=i+3*(e-n)-t,s=3*(n-2*e+t),l=3*(e-t),u=t-r,h=s*s-3*a*l,c=s*l-9*a*u,p=l*l-3*s*u,d=0;if(Po(h)&&Po(c)){if(Po(s))o[0]=0;else(M=-l/s)>=0&&M<=1&&(o[d++]=M)}else{var f=c*c-4*h*p;if(Po(f)){var g=c/h,y=-g/2;(M=-s/a+g)>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y)}else if(f>0){var v=Mo(f),m=h*s+1.5*a*(-c+v),_=h*s+1.5*a*(-c-v);(M=(-s-((m=m<0?-So(-m,Ao):So(m,Ao))+(_=_<0?-So(-_,Ao):So(_,Ao))))/(3*a))>=0&&M<=1&&(o[d++]=M)}else{var x=(2*h*s-3*a*c)/(2*Mo(h*h*h)),b=Math.acos(x)/3,w=Mo(h),S=Math.cos(b),M=(-s-2*w*S)/(3*a),I=(y=(-s+w*(S+Co*Math.sin(b)))/(3*a),(-s+w*(S-Co*Math.sin(b)))/(3*a));M>=0&&M<=1&&(o[d++]=M),y>=0&&y<=1&&(o[d++]=y),I>=0&&I<=1&&(o[d++]=I)}}return d}function zo(t,e,n,i,r){var o=6*n-12*e+6*t,a=9*e+3*i-3*t-9*n,s=3*e-3*t,l=0;if(Po(a)){if(Oo(o))(h=-s/o)>=0&&h<=1&&(r[l++]=h)}else{var u=o*o-4*a*s;if(Po(u))r[0]=-o/(2*a);else if(u>0){var h,c=Mo(u),p=(-o-c)/(2*a);(h=(-o+c)/(2*a))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}function Bo(t,e,n,i,r,o){var a=(e-t)*r+t,s=(n-e)*r+e,l=(i-n)*r+n,u=(s-a)*r+a,h=(l-s)*r+s,c=(h-u)*r+u;o[0]=t,o[1]=a,o[2]=u,o[3]=c,o[4]=c,o[5]=h,o[6]=l,o[7]=i}function Vo(t,e,n,i,r,o,a,s,l,u,h){var c,p,d,f,g,y=.005,v=1/0;Do[0]=l,Do[1]=u;for(var m=0;m<1;m+=.05)Lo[0]=Ro(t,n,r,a,m),Lo[1]=Ro(e,i,o,s,m),(f=Pt(Do,Lo))=0&&f=0&&y1e-4)return s[0]=t-n,s[1]=e-i,l[0]=t+n,void(l[1]=e+i);if(Jo[0]=Ko(r)*n+t,Jo[1]=qo(r)*i+e,Qo[0]=Ko(o)*n+t,Qo[1]=qo(o)*i+e,u(s,Jo,Qo),h(l,Jo,Qo),(r%=$o)<0&&(r+=$o),(o%=$o)<0&&(o+=$o),r>o&&!a?o+=$o:rr&&(ta[0]=Ko(d)*n+t,ta[1]=qo(d)*i+e,u(s,ta,s),h(l,ta,l))}var la={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},ua=[],ha=[],ca=[],pa=[],da=[],fa=[],ga=Math.min,ya=Math.max,va=Math.cos,ma=Math.sin,_a=Math.sqrt,xa=Math.abs,ba=Math.PI,wa=2*ba,Sa="undefined"!=typeof Float32Array,Ma=[];function Ia(t){return Math.round(t/ba*1e8)/1e8%2*ba}function Ta(t,e){var n=Ia(t[0]);n<0&&(n+=wa);var i=n-t[0],r=t[1];r+=i,!e&&r-n>=wa?r=n+wa:e&&n-r>=wa?r=n-wa:!e&&n>r?r=n+(wa-Ia(n-r)):e&&n0&&(this._ux=xa(n/Zn/t)||0,this._uy=xa(n/Zn/e)||0)},t.prototype.setDPR=function(t){this.dpr=t},t.prototype.setContext=function(t){this._ctx=t},t.prototype.getContext=function(){return this._ctx},t.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},t.prototype.reset=function(){this._saveData&&(this._len=0),this._lineDash&&(this._lineDash=null,this._dashOffset=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},t.prototype.moveTo=function(t,e){return this.addData(la.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},t.prototype.lineTo=function(t,e){var n=xa(t-this._xi)>this._ux||xa(e-this._yi)>this._uy||this._len<5;return this.addData(la.L,t,e),this._ctx&&n&&(this._needsDash?this._dashedLineTo(t,e):this._ctx.lineTo(t,e)),n&&(this._xi=t,this._yi=e),this},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){return this.addData(la.C,t,e,n,i,r,o),this._ctx&&(this._needsDash?this._dashedBezierTo(t,e,n,i,r,o):this._ctx.bezierCurveTo(t,e,n,i,r,o)),this._xi=r,this._yi=o,this},t.prototype.quadraticCurveTo=function(t,e,n,i){return this.addData(la.Q,t,e,n,i),this._ctx&&(this._needsDash?this._dashedQuadraticTo(t,e,n,i):this._ctx.quadraticCurveTo(t,e,n,i)),this._xi=n,this._yi=i,this},t.prototype.arc=function(t,e,n,i,r,o){Ma[0]=i,Ma[1]=r,Ta(Ma,o),i=Ma[0];var a=(r=Ma[1])-i;return this.addData(la.A,t,e,n,n,i,a,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,r,o),this._xi=va(r)*n+t,this._yi=ma(r)*n+e,this},t.prototype.arcTo=function(t,e,n,i,r){return this._ctx&&this._ctx.arcTo(t,e,n,i,r),this},t.prototype.rect=function(t,e,n,i){return this._ctx&&this._ctx.rect(t,e,n,i),this.addData(la.R,t,e,n,i),this},t.prototype.closePath=function(){this.addData(la.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&(this._needsDash&&this._dashedLineTo(e,n),t.closePath()),this._xi=e,this._yi=n,this},t.prototype.fill=function(t){t&&t.fill(),this.toStatic()},t.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},t.prototype.setLineDash=function(t){if(t instanceof Array){this._lineDash=t,this._dashIdx=0;for(var e=0,n=0;nu.length&&(this._expandData(),u=this.data);for(var h=0;h0&&d<=t||h<0&&d>=t||0===h&&(c>0&&f<=e||c<0&&f>=e);)d+=h*(n=o[i=this._dashIdx]),f+=c*n,this._dashIdx=(i+1)%g,h>0&&dl||c>0&&fu||a[i%2?"moveTo":"lineTo"](h>=0?ga(d,t):ya(d,t),c>=0?ga(f,e):ya(f,e));h=d-t,c=f-e,this._dashOffset=-_a(h*h+c*c)},t.prototype._dashedBezierTo=function(t,e,n,i,r,o){var a,s,l,u,h,c=this._ctx,p=this._dashSum,d=this._dashOffset,f=this._lineDash,g=this._xi,y=this._yi,v=0,m=this._dashIdx,_=f.length,x=0;for(d<0&&(d=p+d),d%=p,a=0;a<1;a+=.1)s=Ro(g,t,n,r,a+.1)-Ro(g,t,n,r,a),l=Ro(y,e,i,o,a+.1)-Ro(y,e,i,o,a),v+=_a(s*s+l*l);for(;m<_&&!((x+=f[m])>d);m++);for(a=(x-d)/v;a<=1;)u=Ro(g,t,n,r,a),h=Ro(y,e,i,o,a),m%2?c.moveTo(u,h):c.lineTo(u,h),a+=f[m]/v,m=(m+1)%_;m%2!=0&&c.lineTo(r,o),s=r-u,l=o-h,this._dashOffset=-_a(s*s+l*l)},t.prototype._dashedQuadraticTo=function(t,e,n,i){var r=n,o=i;n=(n+2*t)/3,i=(i+2*e)/3,t=(this._xi+2*t)/3,e=(this._yi+2*e)/3,this._dashedBezierTo(t,e,n,i,r,o)},t.prototype.toStatic=function(){if(this._saveData){var t=this.data;t instanceof Array&&(t.length=this._len,Sa&&this._len>11&&(this.data=new Float32Array(t)))}},t.prototype.getBoundingRect=function(){ca[0]=ca[1]=da[0]=da[1]=Number.MAX_VALUE,pa[0]=pa[1]=fa[0]=fa[1]=-Number.MAX_VALUE;var t,e=this.data,n=0,i=0,r=0,o=0;for(t=0;tn||xa(y)>i||c===e-1)&&(f=Math.sqrt(D*D+y*y),r=g,o=_);break;case la.C:var v=t[c++],m=t[c++],_=(g=t[c++],t[c++]),x=t[c++],b=t[c++];f=Fo(r,o,v,m,g,_,x,b,10),r=x,o=b;break;case la.Q:f=Uo(r,o,v=t[c++],m=t[c++],g=t[c++],_=t[c++],10),r=g,o=_;break;case la.A:var w=t[c++],S=t[c++],M=t[c++],I=t[c++],T=t[c++],C=t[c++],A=C+T;c+=1;t[c++];d&&(a=va(T)*M+w,s=ma(T)*I+S),f=ya(M,I)*ga(wa,Math.abs(C)),r=va(A)*M+w,o=ma(A)*I+S;break;case la.R:a=r=t[c++],s=o=t[c++],f=2*t[c++]+2*t[c++];break;case la.Z:var D=a-r;y=s-o;f=Math.sqrt(D*D+y*y),r=a,o=s}f>=0&&(l[h++]=f,u+=f)}return this._pathLen=u,u},t.prototype.rebuildPath=function(t,e){var n,i,r,o,a,s,l,u,h=this.data,c=this._ux,p=this._uy,d=this._len,f=e<1,g=0,y=0;if(!f||(this._pathSegLen||this._calculateLength(),l=this._pathSegLen,u=e*this._pathLen))t:for(var v=0;vc||xa(s-o)>p||v===d-1){if(f){if(g+(H=l[y++])>u){var x=(u-g)/H;t.lineTo(r*(1-x)+a*x,o*(1-x)+s*x);break t}g+=H}t.lineTo(a,s),r=a,o=s}break;case la.C:var b=h[v++],w=h[v++],S=h[v++],M=h[v++],I=h[v++],T=h[v++];if(f){if(g+(H=l[y++])>u){Bo(r,b,S,I,x=(u-g)/H,ua),Bo(o,w,M,T,x,ha),t.bezierCurveTo(ua[1],ha[1],ua[2],ha[2],ua[3],ha[3]);break t}g+=H}t.bezierCurveTo(b,w,S,M,I,T),r=I,o=T;break;case la.Q:b=h[v++],w=h[v++],S=h[v++],M=h[v++];if(f){if(g+(H=l[y++])>u){Yo(r,b,S,x=(u-g)/H,ua),Yo(o,w,M,x,ha),t.quadraticCurveTo(ua[1],ha[1],ua[2],ha[2]);break t}g+=H}t.quadraticCurveTo(b,w,S,M),r=S,o=M;break;case la.A:var C=h[v++],A=h[v++],D=h[v++],L=h[v++],k=h[v++],P=h[v++],O=h[v++],R=!h[v++],N=D>L?D:L,E=xa(D-L)>.001,z=k+P,B=!1;if(f)g+(H=l[y++])>u&&(z=k+P*(u-g)/H,B=!0),g+=H;if(E&&t.ellipse?t.ellipse(C,A,D,L,O,k,z,R):t.arc(C,A,N,k,z,R),B)break t;_&&(n=va(k)*D+C,i=ma(k)*L+A),r=va(z)*D+C,o=ma(z)*L+A;break;case la.R:n=r=h[v],i=o=h[v+1],a=h[v++],s=h[v++];var V=h[v++],F=h[v++];if(f){if(g+(H=l[y++])>u){var G=u-g;t.moveTo(a,s),t.lineTo(a+ga(G,V),s),(G-=V)>0&&t.lineTo(a+V,s+ga(G,F)),(G-=F)>0&&t.lineTo(a+ya(V-G,0),s+F),(G-=V)>0&&t.lineTo(a,s+ya(F-G,0));break t}g+=H}t.rect(a,s,V,F);break;case la.Z:if(f){var H;if(g+(H=l[y++])>u){x=(u-g)/H;t.lineTo(r*(1-x)+n*x,o*(1-x)+i*x);break t}g+=H}t.closePath(),r=n,o=i}}},t.CMD=la,t.initDefaultProps=function(){var e=t.prototype;e._saveData=!0,e._needsDash=!1,e._dashOffset=0,e._dashIdx=0,e._dashSum=0,e._ux=0,e._uy=0}(),t}();function Aa(t,e,n,i,r,o,a){if(0===r)return!1;var s=r,l=0;if(a>e+s&&a>i+s||at+s&&o>n+s||oe+c&&h>i+c&&h>o+c&&h>s+c||ht+c&&u>n+c&&u>r+c&&u>a+c||ue+u&&l>i+u&&l>o+u||lt+u&&s>n+u&&s>r+u||sn||h+ur&&(r+=Oa);var p=Math.atan2(l,s);return p<0&&(p+=Oa),p>=i&&p<=r||p+Oa>=i&&p+Oa<=r}function Na(t,e,n,i,r,o){if(o>e&&o>i||or?s:0}var Ea=Ca.CMD,za=2*Math.PI;var Ba=[-1,-1,-1],Va=[-1,-1];function Fa(t,e,n,i,r,o,a,s,l,u){if(u>e&&u>i&&u>o&&u>s||u1&&(h=void 0,h=Va[0],Va[0]=Va[1],Va[1]=h),f=Ro(e,i,o,s,Va[0]),d>1&&(g=Ro(e,i,o,s,Va[1]))),2===d?ve&&s>i&&s>o||s=0&&h<=1&&(r[l++]=h);else{var u=a*a-4*o*s;if(Po(u))(h=-a/(2*o))>=0&&h<=1&&(r[l++]=h);else if(u>0){var h,c=Mo(u),p=(-a-c)/(2*o);(h=(-a+c)/(2*o))>=0&&h<=1&&(r[l++]=h),p>=0&&p<=1&&(r[l++]=p)}}return l}(e,i,o,s,Ba);if(0===l)return 0;var u=Wo(e,i,o);if(u>=0&&u<=1){for(var h=0,c=Go(e,i,o,u),p=0;pn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);Ba[0]=-l,Ba[1]=l;var u=Math.abs(i-r);if(u<1e-4)return 0;if(u>=za-1e-4){i=0,r=za;var h=o?1:-1;return a>=Ba[0]+t&&a<=Ba[1]+t?h:0}if(i>r){var c=i;i=r,r=c}i<0&&(i+=za,r+=za);for(var p=0,d=0;d<2;d++){var f=Ba[d];if(f+t>a){var g=Math.atan2(s,f);h=o?1:-1;g<0&&(g=za+g),(g>=i&&g<=r||g+za>=i&&g+za<=r)&&(g>Math.PI/2&&g<1.5*Math.PI&&(h=-h),p+=h)}}return p}function Wa(t,e,n,i,r){for(var o,a,s,l,u=t.data,h=t.len(),c=0,p=0,d=0,f=0,g=0,y=0;y1&&(n||(c+=Na(p,d,f,g,i,r))),m&&(f=p=u[y],g=d=u[y+1]),v){case Ea.M:p=f=u[y++],d=g=u[y++];break;case Ea.L:if(n){if(Aa(p,d,u[y],u[y+1],e,i,r))return!0}else c+=Na(p,d,u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ea.C:if(n){if(Da(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Fa(p,d,u[y++],u[y++],u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ea.Q:if(n){if(La(p,d,u[y++],u[y++],u[y],u[y+1],e,i,r))return!0}else c+=Ga(p,d,u[y++],u[y++],u[y],u[y+1],i,r)||0;p=u[y++],d=u[y++];break;case Ea.A:var _=u[y++],x=u[y++],b=u[y++],w=u[y++],S=u[y++],M=u[y++];y+=1;var I=!!(1-u[y++]);o=Math.cos(S)*b+_,a=Math.sin(S)*w+x,m?(f=o,g=a):c+=Na(p,d,o,a,i,r);var T=(i-_)*w/b+_;if(n){if(Ra(_,x,w,S,S+M,I,e,T,r))return!0}else c+=Ha(_,x,w,S,S+M,I,T,r);p=Math.cos(S+M)*b+_,d=Math.sin(S+M)*w+x;break;case Ea.R:if(f=p=u[y++],g=d=u[y++],o=f+u[y++],a=g+u[y++],n){if(Aa(f,g,o,g,e,i,r)||Aa(o,g,o,a,e,i,r)||Aa(o,a,f,a,e,i,r)||Aa(f,a,f,g,e,i,r))return!0}else c+=Na(o,g,o,a,i,r),c+=Na(f,a,f,g,i,r);break;case Ea.Z:if(n){if(Aa(p,d,f,g,e,i,r))return!0}else c+=Na(p,d,f,g,i,r);p=f,d=g}}return n||(s=d,l=g,Math.abs(s-l)<1e-4)||(c+=Na(p,d,f,g,i,r)||0),0!==c}var Ya=T({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},vo),Xa={style:T({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},mo.style)},Ua=["x","y","rotation","scaleX","scaleY","originX","originY","invisible","culling","z","z2","zlevel","parent"],Za=function(t){function e(e){return t.call(this,e)||this}var i;return n(e,t),e.prototype.update=function(){var n=this;t.prototype.update.call(this);var i=this.style;if(i.decal){var r=this._decalEl=this._decalEl||new e;r.buildPath===e.prototype.buildPath&&(r.buildPath=function(t){n.buildPath(t,n.shape)}),r.silent=!0;var o=r.style;for(var a in i)o[a]!==i[a]&&(o[a]=i[a]);o.fill=i.fill?i.decal:null,o.decal=null,o.shadowColor=null,i.strokeFirst&&(o.stroke=null);for(var s=0;s.5?jn:e>.2?"#eee":qn}if(t)return qn}return jn},e.prototype.getInsideTextStroke=function(t){var e=this.style.fill;if(H(e)){var n=this.__zr;if(!(!n||!n.isDarkMode())===sn(t,0)<.4)return e}},e.prototype.buildPath=function(t,e,n){},e.prototype.pathUpdated=function(){this.__dirty&=~e.SHAPE_CHANGED_BIT},e.prototype.createPathProxy=function(){this.path=new Ca(!1)},e.prototype.hasStroke=function(){var t=this.style,e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,i=!t;if(i){var r=!1;this.path||(r=!0,this.createPathProxy());var o=this.path;(r||this.__dirty&e.SHAPE_CHANGED_BIT)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectWithStroke||(this._rectWithStroke=t.clone());if(this.__dirty||i){a.copy(t);var s=n.strokeNoScale?this.getLineScale():1,l=n.lineWidth;if(!this.hasFill()){var u=this.strokeContainThreshold;l=Math.max(l,null==u?4:u)}s>1e-10&&(a.width+=l/s,a.height+=l/s,a.x-=l/s/2,a.y-=l/s/2)}return a}return t},e.prototype.contain=function(t,e){var n=this.transformCoordToLocal(t,e),i=this.getBoundingRect(),r=this.style;if(t=n[0],e=n[1],i.contain(t,e)){var o=this.path;if(this.hasStroke()){var a=r.lineWidth,s=r.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(a=Math.max(a,this.strokeContainThreshold)),function(t,e,n,i){return Wa(t,e,!0,n,i)}(o,a/s,t,e)))return!0}if(this.hasFill())return function(t,e,n){return Wa(t,0,!1,e,n)}(o,t,e)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=e.SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){"style"===t?this.dirtyStyle():"shape"===t?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(e,n){"shape"===e?this.setShape(n):t.prototype.attrKV.call(this,e,n)},e.prototype.setShape=function(t,e){var n=this.shape;return n||(n=this.shape={}),"string"==typeof t?n[t]=e:I(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&e.SHAPE_CHANGED_BIT)},e.prototype.createStyle=function(t){return pt(Ya,t)},e.prototype._innerSaveToNormal=function(e){t.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=I({},this.shape))},e.prototype._applyStateObj=function(e,n,i,r,o,a){t.prototype._applyStateObj.call(this,e,n,i,r,o,a);var s,l=!(n&&r);if(n&&n.shape?o?r?s=n.shape:(s=I({},i.shape),I(s,n.shape)):(s=I({},r?this.shape:i.shape),I(s,n.shape)):l&&(s=i.shape),s)if(o){this.shape=I({},this.shape);for(var u={},h=z(s),c=0;c0},e.prototype.hasFill=function(){var t=this.style.fill;return null!=t&&"none"!==t},e.prototype.createStyle=function(t){return pt(ja,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var e=t.text;null!=e?e+="":e="";var n=Fn(e,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=void(e.prototype.dirtyRectTolerance=10),e}(xo);qa.prototype.type="tspan";var Ka=T({x:0,y:0},vo),$a={style:T({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},mo.style)};var Ja=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.createStyle=function(t){return pt(Ka,t)},e.prototype._getSize=function(t){var e=this.style,n=e[t];if(null!=n)return n;var i,r=(i=e.image)&&"string"!=typeof i&&i.width&&i.height?e.image:this.__image;if(!r)return 0;var o="width"===t?"height":"width",a=e[o];return null==a?r[t]:r[t]/r[o]*a},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return $a},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new Rn(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(xo);Ja.prototype.type="image";var Qa=Math.round;function ts(t,e,n){if(e){var i=e.x1,r=e.x2,o=e.y1,a=e.y2;t.x1=i,t.x2=r,t.y1=o,t.y2=a;var s=n&&n.lineWidth;return s?(Qa(2*i)===Qa(2*r)&&(t.x1=t.x2=ns(i,s,!0)),Qa(2*o)===Qa(2*a)&&(t.y1=t.y2=ns(o,s,!0)),t):t}}function es(t,e,n){if(e){var i=e.x,r=e.y,o=e.width,a=e.height;t.x=i,t.y=r,t.width=o,t.height=a;var s=n&&n.lineWidth;return s?(t.x=ns(i,s,!0),t.y=ns(r,s,!0),t.width=Math.max(ns(i+o,s,!1)-t.x,0===o?0:1),t.height=Math.max(ns(r+a,s,!1)-t.y,0===a?0:1),t):t}}function ns(t,e,n){if(!e)return t;var i=Qa(2*t);return(i+Qa(e))%2==0?i/2:(i+(n?1:-1))/2}var is=function(){this.x=0,this.y=0,this.width=0,this.height=0},rs={},os=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new is},e.prototype.buildPath=function(t,e){var n,i,r,o;if(this.subPixelOptimize){var a=es(rs,e,this.style);n=a.x,i=a.y,r=a.width,o=a.height,a.r=e.r,e=a}else n=e.x,i=e.y,r=e.width,o=e.height;e.r?function(t,e){var n,i,r,o,a,s=e.x,l=e.y,u=e.width,h=e.height,c=e.r;u<0&&(s+=u,u=-u),h<0&&(l+=h,h=-h),"number"==typeof c?n=i=r=o=c:c instanceof Array?1===c.length?n=i=r=o=c[0]:2===c.length?(n=r=c[0],i=o=c[1]):3===c.length?(n=c[0],i=o=c[1],r=c[2]):(n=c[0],i=c[1],r=c[2],o=c[3]):n=i=r=o=0,n+i>u&&(n*=u/(a=n+i),i*=u/a),r+o>u&&(r*=u/(a=r+o),o*=u/a),i+r>h&&(i*=h/(a=i+r),r*=h/a),n+o>h&&(n*=h/(a=n+o),o*=h/a),t.moveTo(s+n,l),t.lineTo(s+u-i,l),0!==i&&t.arc(s+u-i,l+i,i,-Math.PI/2,0),t.lineTo(s+u,l+h-r),0!==r&&t.arc(s+u-r,l+h-r,r,0,Math.PI/2),t.lineTo(s+o,l+h),0!==o&&t.arc(s+o,l+h-o,o,Math.PI/2,Math.PI),t.lineTo(s,l+n),0!==n&&t.arc(s+n,l+n,n,Math.PI,1.5*Math.PI)}(t,e):t.rect(n,i,r,o)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Za);os.prototype.type="rect";var as={fill:"#000"},ss={style:T({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},mo.style)},ls=function(t){function e(e){var n=t.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=as,n.attr(e),n}return n(e,t),e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){this.styleChanged()&&this._updateSubTexts();for(var e=0;ep&&u){var d=Math.floor(p/l);n=n.slice(0,d)}var f=p,g=h;if(r&&(f+=r[0]+r[2],null!=g&&(g+=r[1]+r[3])),t&&a&&null!=g)for(var y=oo(h,o,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),v=0;v0,I=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),T=i.calculatedLineHeight,C=0;Cl&&co(n,t.substring(l,u),e,s),co(n,i[2],e,s,i[1]),l=io.lastIndex}lo){b>0?(m.tokens=m.tokens.slice(0,b),y(m,x,_),n.lines=n.lines.slice(0,v+1)):n.lines=n.lines.slice(0,v);break t}var C=w.width,A=null==C||"auto"===C;if("string"==typeof C&&"%"===C.charAt(C.length-1))P.percentWidth=C,h.push(P),P.contentWidth=Bn(P.text,I);else{if(A){var D=w.backgroundColor,L=D&&D.image;L&&no(L=Qr(L))&&(P.width=Math.max(P.width,L.width*T/L.height))}var k=f&&null!=r?r-x:null;null!=k&&k=0&&"right"===(C=_[T]).align;)this._placeToken(C,t,b,f,I,"right",y),w-=C.width,I-=C.width,T--;for(M+=(n-(M-d)-(g-I)-w)/2;S<=T;)C=_[S],this._placeToken(C,t,b,f,M+C.width/2,"center",y),M+=C.width,S++;f+=b}},e.prototype._placeToken=function(t,e,n,i,r,o,a){var s=e.rich[t.styleName]||{};s.text=t.text;var l=t.verticalAlign,u=i+n/2;"top"===l?u=i+t.height/2:"bottom"===l&&(u=i+n-t.height/2),!t.isLineHolder&&gs(s)&&this._renderBackground(s,e,"right"===o?r-t.width:"center"===o?r-t.width/2:r,u-t.height/2,t.width,t.height);var h=!!s.backgroundColor,c=t.textPadding;c&&(r=ds(r,o,c),u-=t.height/2-c[0]-t.innerHeight/2);var p=this._getOrCreateChild(qa),d=p.createStyle();p.useStyle(d);var f=this._defaultStyle,g=!1,y=0,v=ps("fill"in s?s.fill:"fill"in e?e.fill:(g=!0,f.fill)),m=ps("stroke"in s?s.stroke:"stroke"in e?e.stroke:h||a||f.autoStroke&&!g?null:(y=2,f.stroke)),_=s.textShadowBlur>0||e.textShadowBlur>0;d.text=t.text,d.x=r,d.y=u,_&&(d.shadowBlur=s.textShadowBlur||e.textShadowBlur||0,d.shadowColor=s.textShadowColor||e.textShadowColor||"transparent",d.shadowOffsetX=s.textShadowOffsetX||e.textShadowOffsetX||0,d.shadowOffsetY=s.textShadowOffsetY||e.textShadowOffsetY||0),d.textAlign=o,d.textBaseline="middle",d.font=t.font||En,d.opacity=et(s.opacity,e.opacity,1),m&&(d.lineWidth=et(s.lineWidth,e.lineWidth,y),d.lineDash=tt(s.lineDash,e.lineDash),d.lineDashOffset=e.lineDashOffset||0,d.stroke=m),v&&(d.fill=v);var x=t.contentWidth,b=t.contentHeight;p.setBoundingRect(new Rn(Gn(d.x,x,d.textAlign),Hn(d.y,b,d.textBaseline),x,b))},e.prototype._renderBackground=function(t,e,n,i,r,o){var a,s,l,u=t.backgroundColor,h=t.borderWidth,c=t.borderColor,p=H(u),d=t.borderRadius,f=this;if(p||h&&c){(a=this._getOrCreateChild(os)).useStyle(a.createStyle()),a.style.fill=null;var g=a.shape;g.x=n,g.y=i,g.width=r,g.height=o,g.r=d,a.dirtyShape()}if(p)(l=a.style).fill=u||null,l.fillOpacity=tt(t.fillOpacity,1);else if(u&&u.image){(s=this._getOrCreateChild(Ja)).onload=function(){f.dirtyStyle()};var y=s.style;y.image=u.image,y.x=n,y.y=i,y.width=r,y.height=o}h&&c&&((l=a.style).lineWidth=h,l.stroke=c,l.strokeOpacity=tt(t.strokeOpacity,1),l.lineDash=t.borderDash,l.lineDashOffset=t.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(l.strokeFirst=!0,l.lineWidth*=2));var v=(a||s).style;v.shadowBlur=t.shadowBlur||0,v.shadowColor=t.shadowColor||"transparent",v.shadowOffsetX=t.shadowOffsetX||0,v.shadowOffsetY=t.shadowOffsetY||0,v.opacity=et(t.opacity,e.opacity,1)},e.makeFont=function(t){var e="";if(t.fontSize||t.fontFamily||t.fontWeight){var n="";n="string"!=typeof t.fontSize||-1===t.fontSize.indexOf("px")&&-1===t.fontSize.indexOf("rem")&&-1===t.fontSize.indexOf("em")?isNaN(+t.fontSize)?"12px":t.fontSize+"px":t.fontSize,e=[t.fontStyle,t.fontWeight,n,t.fontFamily||"sans-serif"].join(" ")}return e&&ot(e)||t.textFont||t.font},e}(xo),us={left:!0,right:1,center:1},hs={top:1,bottom:1,middle:1};function cs(t){if(t){t.font=ls.makeFont(t);var e=t.align;"middle"===e&&(e="center"),t.align=null==e||us[e]?e:"left";var n=t.verticalAlign;"center"===n&&(n="middle"),t.verticalAlign=null==n||hs[n]?n:"top",t.padding&&(t.padding=it(t.padding))}}function ps(t,e){return null==t||e<=0||"transparent"===t||"none"===t?null:t.image||t.colorStops?"#000":t}function ds(t,e,n){return"right"===e?t-n[1]:"center"===e?t+n[3]/2-n[1]/2:t+n[3]}function fs(t){var e=t.text;return null!=e&&(e+=""),e}function gs(t){return!!(t.backgroundColor||t.borderWidth&&t.borderColor)}var ys=Lr(),vs=1,ms={},_s=Lr(),xs=["emphasis","blur","select"],bs=["normal","emphasis","blur","select"],ws="highlight",Ss="downplay",Ms="select",Is="unselect",Ts="toggleSelect";function Cs(t){return null!=t&&"none"!==t}var As=new Ee(100);function Ds(t){if("string"!=typeof t)return t;var e=As.get(t);return e||(e=$e(t,-.1),As.put(t,e)),e}function Ls(t,e,n){t.onHoverStateChange&&(t.hoverState||0)!==n&&t.onHoverStateChange(e),t.hoverState=n}function ks(t){Ls(t,"emphasis",2)}function Ps(t){2===t.hoverState&&Ls(t,"normal",0)}function Os(t){Ls(t,"blur",1)}function Rs(t){1===t.hoverState&&Ls(t,"normal",0)}function Ns(t){t.selected=!0}function Es(t){t.selected=!1}function zs(t,e,n){e(t,n)}function Bs(t,e,n){zs(t,e,n),t.isGroup&&t.traverse((function(t){zs(t,e,n)}))}function Vs(t,e){switch(e){case"emphasis":t.hoverState=2;break;case"normal":t.hoverState=0;break;case"blur":t.hoverState=1;break;case"select":t.selected=!0}}function Fs(t,e){var n=this.states[t];if(this.style){if("emphasis"===t)return function(t,e,n,i){var r=n&&A(n,"select")>=0,o=!1;if(t instanceof Za){var a=_s(t),s=r&&a.selectFill||a.normalFill,l=r&&a.selectStroke||a.normalStroke;if(Cs(s)||Cs(l)){var u=(i=i||{}).style||{};!Cs(u.fill)&&Cs(s)?(o=!0,i=I({},i),(u=I({},u)).fill=Ds(s)):!Cs(u.stroke)&&Cs(l)&&(o||(i=I({},i),u=I({},u)),u.stroke=Ds(l)),i.style=u}}if(i&&null==i.z2){o||(i=I({},i));var h=t.z2EmphasisLift;i.z2=t.z2+(null!=h?h:10)}return i}(this,0,e,n);if("blur"===t)return function(t,e,n){var i=A(t.currentStates,e)>=0,r=t.style.opacity,o=i?null:function(t,e,n,i){for(var r=t.style,o={},a=0;a0){var o={dataIndex:r,seriesIndex:t.seriesIndex};null!=i&&(o.dataType=i),e.push(o)}}))})),e}function Js(t,e,n){il(t,!0),Bs(t,Gs),Qs(t,e,n)}function Qs(t,e,n){var i=ys(t);null!=e?(i.focus=e,i.blurScope=n):i.focus&&(i.focus=null)}var tl=["emphasis","blur","select"],el={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function nl(t,e,n,i){n=n||"itemStyle";for(var r=0;r1&&(a*=cl(f),s*=cl(f));var g=(r===o?-1:1)*cl((a*a*(s*s)-a*a*(d*d)-s*s*(p*p))/(a*a*(d*d)+s*s*(p*p)))||0,y=g*a*d/s,v=g*-s*p/a,m=(t+n)/2+dl(c)*y-pl(c)*v,_=(e+i)/2+pl(c)*y+dl(c)*v,x=vl([1,0],[(p-y)/a,(d-v)/s]),b=[(p-y)/a,(d-v)/s],w=[(-1*p-y)/a,(-1*d-v)/s],S=vl(b,w);if(yl(b,w)<=-1&&(S=fl),yl(b,w)>=1&&(S=0),S<0){var M=Math.round(S/fl*1e6)/1e6;S=2*fl+M%2*fl}h.addData(u,m,_,a,s,x,S,c,o)}var _l=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,xl=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;var bl=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.applyTransform=function(t){},e}(Za);function wl(t){return null!=t.setData}function Sl(t,e){var n=function(t){var e=new Ca;if(!t)return e;var n,i=0,r=0,o=i,a=r,s=Ca.CMD,l=t.match(_l);if(!l)return e;for(var u=0;uL*L+k*k&&(M=T,I=C),{cx:M,cy:I,x01:-h,y01:-c,x11:M*(r/b-1),y11:I*(r/b-1)}}function Gl(t,e){var n=zl(e.r,0),i=zl(e.r0||0,0),r=n>0;if(r||i>0){if(r||(n=i,i=0),i>n){var o=n;n=i,i=o}var a=!!e.clockwise,s=e.startAngle,l=e.endAngle,u=[s,l];Ta(u,!a);var h=Nl(u[0]-u[1]),c=e.cx,p=e.cy,d=e.cornerRadius||0,f=e.innerCornerRadius||0;if(n>Vl)if(h>Ll-Vl)t.moveTo(c+n*Pl(s),p+n*kl(s)),t.arc(c,p,n,s,l,!a),i>Vl&&(t.moveTo(c+i*Pl(l),p+i*kl(l)),t.arc(c,p,i,l,s,a));else{var g=Nl(n-i)/2,y=Bl(g,d),v=Bl(g,f),m=v,_=y,x=n*Pl(s),b=n*kl(s),w=i*Pl(l),S=i*kl(l),M=void 0,I=void 0,T=void 0,C=void 0;if((y>Vl||v>Vl)&&(M=n*Pl(l),I=n*kl(l),T=i*Pl(s),C=i*kl(s),hVl)if(_>Vl){var N=Fl(T,C,x,b,n,_,a),E=Fl(M,I,w,S,n,_,a);t.moveTo(c+N.cx+N.x01,p+N.cy+N.y01),_Vl&&h>Vl)if(m>Vl){N=Fl(w,S,M,I,i,-m,a),E=Fl(x,b,T,C,i,-m,a);t.lineTo(c+N.cx+N.x01,p+N.cy+N.y01),m=2){if(i&&"spline"!==i){var o=function(t,e,n,i){var r,o,a,s,l=[],u=[],h=[],c=[];if(i){a=[1/0,1/0],s=[-1/0,-1/0];for(var p=0,d=t.length;pn-2?n-1:l+1],d=t[l>n-3?n-1:l+2]);var f=u*u,g=u*f;i.push([Ul(h[0],c[0],p[0],d[0],u,f,g),Ul(h[1],c[1],p[1],d[1],u,f,g)])}return i}(r,n)),t.moveTo(r[0][0],r[0][1]);s=1;for(var c=r.length;spu[1]){if(a=!1,r)return a;var u=Math.abs(pu[0]-cu[1]),h=Math.abs(cu[0]-pu[1]);Math.min(u,h)>i.len()&&(u0?l?e.animateFrom(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,scope:t,during:a}):e.animateTo(n,{duration:f,delay:y||0,easing:g,done:o,force:!!o||!!a,setToFinal:!0,scope:t,during:a}):(e.stopAnimation(),!l&&e.attr(n),o&&o())}else e.stopAnimation(),!l&&e.attr(n),a&&a(1),o&&o()}function Ou(t,e,n,i,r,o){Pu("update",t,e,n,i,r,o)}function Ru(t,e,n,i,r,o){Pu("init",t,e,n,i,r,o)}function Nu(t,e,n,i,r,o){Bu(t)||Pu("remove",t,e,n,i,r,o)}function Eu(t,e,n,i){t.removeTextContent(),t.removeTextGuideLine(),Nu(t,{style:{opacity:0}},e,n,i)}function zu(t,e,n){function i(){t.parent&&t.parent.remove(t)}t.isGroup?t.traverse((function(t){t.isGroup||Eu(t,e,n,i)})):Eu(t,e,n,i)}function Bu(t){if(!t.__zr)return!0;for(var e=0;eMath.abs(o[1])?o[0]>0?"right":"left":o[1]>0?"bottom":"top"}function Hu(t){return!t.isGroup}function Wu(t,e,n){if(t&&e){var i,r=(i={},t.traverse((function(t){Hu(t)&&t.anid&&(i[t.anid]=t)})),i);e.traverse((function(t){if(Hu(t)&&t.anid){var e=r[t.anid];if(e){var i=o(t);t.attr(o(e)),Ou(t,i,n,ys(t).dataIndex)}}}))}function o(t){var e={x:t.x,y:t.y,rotation:t.rotation};return function(t){return null!=t.shape}(t)&&(e.shape=I({},t.shape)),e}}function Yu(t,e){return O(t,(function(t){var n=t[0];n=mu(n,e.x),n=_u(n,e.x+e.width);var i=t[1];return i=mu(i,e.y),[n,i=_u(i,e.y+e.height)]}))}function Xu(t,e){var n=mu(t.x,e.x),i=_u(t.x+t.width,e.x+e.width),r=mu(t.y,e.y),o=_u(t.y+t.height,e.y+e.height);if(i>=n&&o>=r)return{x:n,y:r,width:i-n,height:o-r}}function Uu(t,e,n){var i=I({rectHover:!0},e),r=i.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},t)return 0===t.indexOf("image://")?(r.image=t.slice(8),T(r,n),new Ja(i)):Tu(t.replace("path://",""),i,n,"center")}function Zu(t,e,n,i,r){for(var o=0,a=r[r.length-1];o=-1e-6)return!1;var f=t-r,g=e-o,y=qu(f,g,u,h)/d;if(y<0||y>1)return!1;var v=qu(f,g,c,p)/d;return!(v<0||v>1)}function qu(t,e,n,i){return t*i-n*e}Mu("circle",Tl),Mu("ellipse",Al),Mu("sector",Wl),Mu("ring",Xl),Mu("polygon",ql),Mu("polyline",$l),Mu("rect",os),Mu("line",tu),Mu("bezierCurve",ru),Mu("arc",au);var Ku=Object.freeze({__proto__:null,extendShape:bu,extendPath:Su,registerShape:Mu,getShapeClass:Iu,makePath:Tu,makeImage:Cu,mergePath:Du,resizePath:Lu,subPixelOptimizeLine:function(t){return ts(t.shape,t.shape,t.style),t},subPixelOptimizeRect:function(t){return es(t.shape,t.shape,t.style),t},subPixelOptimize:ku,updateProps:Ou,initProps:Ru,removeElement:Nu,removeElementWithFadeOut:zu,isElementRemoved:Bu,getTransform:Vu,applyTransform:Fu,transformDirection:Gu,groupTransition:Wu,clipPointsByRect:Yu,clipRectByRect:Xu,createIcon:Uu,linePolygonIntersect:Zu,lineLineIntersect:ju,Group:zi,Image:Ja,Text:ls,Circle:Tl,Ellipse:Al,Sector:Wl,Ring:Xl,Polygon:ql,Polyline:$l,Rect:os,Line:tu,BezierCurve:ru,Arc:au,IncrementalDisplayable:vu,CompoundPath:su,LinearGradient:uu,RadialGradient:hu,BoundingRect:Rn,OrientedBoundingRect:gu,Point:In,Path:Za}),$u={};function Ju(t,e){for(var n=0;n-1?Ch:Dh;function Oh(t,e){t=t.toUpperCase(),kh[t]=new Sh(e),Lh[t]=e}Oh(Ah,{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Guage",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),Oh(Ch,{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}});var Rh=1e3,Nh=6e4,Eh=36e5,zh=864e5,Bh=31536e6,Vh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{hh}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}"},Fh="{yyyy}-{MM}-{dd}",Gh={year:"{yyyy}",month:"{yyyy}-{MM}",day:Fh,hour:"{yyyy}-{MM}-{dd} "+Vh.hour,minute:"{yyyy}-{MM}-{dd} "+Vh.minute,second:"{yyyy}-{MM}-{dd} "+Vh.second,millisecond:Vh.none},Hh=["year","month","day","hour","minute","second","millisecond"],Wh=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Yh(t,e){return"0000".substr(0,e-(t+="").length)+t}function Xh(t){switch(t){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return t}}function Uh(t){return t===Xh(t)}function Zh(t,e,n,i){var r=rr(t),o=r[Kh(n)](),a=r[$h(n)]()+1,s=Math.floor((a-1)/4)+1,l=r[Jh(n)](),u=r["get"+(n?"UTC":"")+"Day"](),h=r[Qh(n)](),c=(h-1)%12+1,p=r[tc(n)](),d=r[ec(n)](),f=r[nc(n)](),g=(i instanceof Sh?i:function(t){return kh[t]}(i||Ph)||kh.EN).getModel("time"),y=g.get("month"),v=g.get("monthAbbr"),m=g.get("dayOfWeek"),_=g.get("dayOfWeekAbbr");return(e||"").replace(/{yyyy}/g,o+"").replace(/{yy}/g,o%100+"").replace(/{Q}/g,s+"").replace(/{MMMM}/g,y[a-1]).replace(/{MMM}/g,v[a-1]).replace(/{MM}/g,Yh(a,2)).replace(/{M}/g,a+"").replace(/{dd}/g,Yh(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,m[u]).replace(/{ee}/g,_[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Yh(h,2)).replace(/{H}/g,h+"").replace(/{hh}/g,Yh(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Yh(p,2)).replace(/{m}/g,p+"").replace(/{ss}/g,Yh(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Yh(f,3)).replace(/{S}/g,f+"")}function jh(t,e){var n=rr(t),i=n[$h(e)]()+1,r=n[Jh(e)](),o=n[Qh(e)](),a=n[tc(e)](),s=n[ec(e)](),l=0===n[nc(e)](),u=l&&0===s,h=u&&0===a,c=h&&0===o,p=c&&1===r;return p&&1===i?"year":p?"month":c?"day":h?"hour":u?"minute":l?"second":"millisecond"}function qh(t,e,n){var i="number"==typeof t?rr(t):t;switch(e=e||jh(t,n)){case"year":return i[Kh(n)]();case"half-year":return i[$h(n)]()>=6?1:0;case"quarter":return Math.floor((i[$h(n)]()+1)/4);case"month":return i[$h(n)]();case"day":return i[Jh(n)]();case"half-day":return i[Qh(n)]()/24;case"hour":return i[Qh(n)]();case"minute":return i[tc(n)]();case"second":return i[ec(n)]();case"millisecond":return i[nc(n)]()}}function Kh(t){return t?"getUTCFullYear":"getFullYear"}function $h(t){return t?"getUTCMonth":"getMonth"}function Jh(t){return t?"getUTCDate":"getDate"}function Qh(t){return t?"getUTCHours":"getHours"}function tc(t){return t?"getUTCMinutes":"getMinutes"}function ec(t){return t?"getUTCSeconds":"getSeconds"}function nc(t){return t?"getUTCSeconds":"getSeconds"}function ic(t){return t?"setUTCFullYear":"setFullYear"}function rc(t){return t?"setUTCMonth":"setMonth"}function oc(t){return t?"setUTCDate":"setDate"}function ac(t){return t?"setUTCHours":"setHours"}function sc(t){return t?"setUTCMinutes":"setMinutes"}function lc(t){return t?"setUTCSeconds":"setSeconds"}function uc(t){return t?"setUTCSeconds":"setSeconds"}function hc(t){if(!cr(t))return H(t)?t:"-";var e=(t+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function cc(t,e){return t=(t||"").toLowerCase().replace(/-(.)/g,(function(t,e){return e.toUpperCase()})),e&&t&&(t=t.charAt(0).toUpperCase()+t.slice(1)),t}var pc=it,dc=/([&<>"'])/g,fc={"&":"&","<":"<",">":">",'"':""","'":"'"};function gc(t){return null==t?"":(t+"").replace(dc,(function(t,e){return fc[e]}))}function yc(t,e,n){function i(t){return t&&ot(t)?t:"-"}function r(t){return!(null==t||isNaN(t)||!isFinite(t))}var o="time"===e,a=t instanceof Date;if(o||a){var s=o?rr(t):t;if(!isNaN(+s))return Zh(s,"yyyy-MM-dd hh:mm:ss",n);if(a)return"-"}if("ordinal"===e)return W(t)?i(t):Y(t)&&r(t)?t+"":"-";var l=hr(t);return r(l)?hc(l):W(t)?i(t):"-"}var vc=["a","b","c","d","e","f","g"],mc=function(t,e){return"{"+t+(null==e?"":e)+"}"};function _c(t,e,n){F(e)||(e=[e]);var i=e.length;if(!i)return"";for(var r=e[0].$vars||[],o=0;o':'':{renderMode:o,content:"{"+(n.markerId||"markerX")+"|} ",style:"subItem"===r?{width:4,height:4,borderRadius:2,backgroundColor:i}:{width:10,height:10,borderRadius:5,backgroundColor:i}}:""}function bc(t,e){return e=e||"transparent",H(t)?t:X(t)&&t.colorStops&&(t.colorStops[0]||{}).color||e}function wc(t,e){if("_blank"===e||"blank"===e){var n=window.open();n.opener=null,n.location.href=t}else window.open(t,e)}var Sc=P,Mc=["left","right","top","bottom","width","height"],Ic=[["width","left","right"],["height","top","bottom"]];function Tc(t,e,n,i,r){var o=0,a=0;null==i&&(i=1/0),null==r&&(r=1/0);var s=0;e.eachChild((function(l,u){var h,c,p=l.getBoundingRect(),d=e.childAt(u+1),f=d&&d.getBoundingRect();if("horizontal"===t){var g=p.width+(f?-f.x+p.x:0);(h=o+g)>i||l.newline?(o=0,h=g,a+=s+n,s=p.height):s=Math.max(s,p.height)}else{var y=p.height+(f?-f.y+p.y:0);(c=a+y)>r||l.newline?(o+=s+n,a=0,c=y,s=p.width):s=Math.max(s,p.width)}l.newline||(l.x=o,l.y=a,l.markRedraw(),"horizontal"===t?o=h+n:a=c+n)}))}var Cc=Tc;V(Tc,"vertical"),V(Tc,"horizontal");function Ac(t,e,n){n=pc(n||0);var i=e.width,r=e.height,o=Zi(t.left,i),a=Zi(t.top,r),s=Zi(t.right,i),l=Zi(t.bottom,r),u=Zi(t.width,i),h=Zi(t.height,r),c=n[2]+n[0],p=n[1]+n[3],d=t.aspect;switch(isNaN(u)&&(u=i-s-p-o),isNaN(h)&&(h=r-l-c-a),null!=d&&(isNaN(u)&&isNaN(h)&&(d>i/r?u=.8*i:h=.8*r),isNaN(u)&&(u=d*h),isNaN(h)&&(h=u/d)),isNaN(o)&&(o=i-s-u-p),isNaN(a)&&(a=r-l-h-c),t.left||t.right){case"center":o=i/2-u/2-n[3];break;case"right":o=i-u-p}switch(t.top||t.bottom){case"middle":case"center":a=r/2-h/2-n[0];break;case"bottom":a=r-h-c}o=o||0,a=a||0,isNaN(u)&&(u=i-p-o-(s||0)),isNaN(h)&&(h=r-c-a-(l||0));var f=new Rn(o+n[3],a+n[0],u,h);return f.margin=n,f}function Dc(t,e,n,i,r){var o=!r||!r.hv||r.hv[0],a=!r||!r.hv||r.hv[1],s=r&&r.boundingMode||"all";if(o||a){var l;if("raw"===s)l="group"===t.type?new Rn(0,0,+e.width||0,+e.height||0):t.getBoundingRect();else if(l=t.getBoundingRect(),t.needLocalTransform()){var u=t.getLocalTransform();(l=l.clone()).applyTransform(u)}var h=Ac(T({width:l.width,height:l.height},e),n,i),c=o?h.x-l.x:0,p=a?h.y-l.y:0;"raw"===s?(t.x=c,t.y=p):(t.x+=c,t.y+=p),t.markRedraw()}}function Lc(t){var e=t.layoutMode||t.constructor.layoutMode;return X(e)?e:e?{type:e}:null}function kc(t,e,n){var i=n&&n.ignoreSize;!F(i)&&(i=[i,i]);var r=a(Ic[0],0),o=a(Ic[1],1);function a(n,r){var o={},a=0,u={},h=0;if(Sc(n,(function(e){u[e]=t[e]})),Sc(n,(function(t){s(e,t)&&(o[t]=u[t]=e[t]),l(o,t)&&a++,l(u,t)&&h++})),i[r])return l(e,n[1])?u[n[2]]=null:l(e,n[2])&&(u[n[1]]=null),u;if(2!==h&&a){if(a>=2)return o;for(var c=0;c=0;a--)o=S(o,n[a],!0);e.defaultOption=o}return e.defaultOption},e.prototype.getReferringComponents=function(t,e){var n=t+"Index",i=t+"Id";return Nr(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},e)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Sh);Yr(Nc,Sh),jr(Nc),function(t){var e={};t.registerSubTypeDefaulter=function(t,n){var i=Gr(t);e[i.main]=n},t.determineSubType=function(n,i){var r=i.type;if(!r){var o=Gr(n).main;t.hasSubTypes(n)&&e[o]&&(r=e[o](i))}return r}}(Nc),function(t,e){function n(t,e){return t[e]||(t[e]={predecessor:[],successor:[]}),t[e]}t.topologicalTravel=function(t,i,r,o){if(t.length){var a=function(t){var i={},r=[];return P(t,(function(o){var a=n(i,o),s=function(t,e){var n=[];return P(t,(function(t){A(e,t)>=0&&n.push(t)})),n}(a.originalDeps=e(o),t);a.entryCount=s.length,0===a.entryCount&&r.push(o),P(s,(function(t){A(a.predecessor,t)<0&&a.predecessor.push(t);var e=n(i,t);A(e.successor,t)<0&&e.successor.push(o)}))})),{graph:i,noEntryList:r}}(i),s=a.graph,l=a.noEntryList,u={};for(P(t,(function(t){u[t]=!0}));l.length;){var h=l.pop(),c=s[h],p=!!u[h];p&&(r.call(o,h,c.originalDeps.slice()),delete u[h]),P(c.successor,p?f:d)}P(u,(function(){var t="";throw new Error(t)}))}function d(t){s[t].entryCount--,0===s[t].entryCount&&l.push(t)}function f(t){u[t]=!0,d(t)}}}(Nc,(function(t){var e=[];P(Nc.getClassesByMainType(t),(function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])})),e=O(e,(function(t){return Gr(t).main})),"dataset"!==t&&A(e,"dataset")<=0&&e.unshift("dataset");return e}));var Ec="";"undefined"!=typeof navigator&&(Ec=navigator.platform||"");var zc="rgba(0, 0, 0, 0.2)",Bc={darkMode:"auto",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:zc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:zc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:zc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:zc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:zc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:zc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Ec.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1},Vc=ht(["tooltip","label","itemName","itemId","seriesName"]),Fc="original",Gc="arrayRows",Hc="objectRows",Wc="keyedColumns",Yc="typedArray",Xc="unknown",Uc="column",Zc="row",jc=1,qc=2,Kc=3,$c=Lr();function Jc(t,e,n){var i={},r=tp(e);if(!r||!t)return i;var o,a,s=[],l=[],u=e.ecModel,h=$c(u).datasetMap,c=r.uid+"_"+n.seriesLayoutBy;P(t=t.slice(),(function(e,n){var r=X(e)?e:t[n]={name:e};"ordinal"===r.type&&null==o&&(o=n,a=f(r)),i[r.name]=[]}));var p=h.get(c)||h.set(c,{categoryWayDim:a,valueWayDim:0});function d(t,e,n){for(var i=0;ie)return t[i];return t[n-1]}(i,a):n;if((h=h||n)&&h.length){var c=h[l];return r&&(u[r]=c),s.paletteIdx=(l+1)%h.length,c}}var pp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(t,e,n,i,r,o){i=i||{},this.option=null,this._theme=new Sh(i),this._locale=new Sh(r),this._optionManager=o},e.prototype.setOption=function(t,e,n){var i=gp(e);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,e){return this._resetOption(t,gp(e))},e.prototype._resetOption=function(t,e){var n=!1,i=this._optionManager;if(!t||"recreate"===t){var r=i.mountOption("recreate"===t);this.option&&"recreate"!==t?(this.restoreData(),this._mergeOption(r,e)):ap(this,r),n=!0}if("timeline"!==t&&"media"!==t||this.restoreData(),!t||"recreate"===t||"timeline"===t){var o=i.getTimelineOption(this);o&&(n=!0,this._mergeOption(o,e))}if(!t||"recreate"===t||"media"===t){var a=i.getMediaOption(this);a.length&&P(a,(function(t){n=!0,this._mergeOption(t,e)}),this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,e){var n=this.option,i=this._componentsMap,r=this._componentsCount,o=[],a=ht(),s=e&&e.replaceMergeMainTypeMap;$c(this).datasetMap=ht(),P(t,(function(t,e){null!=t&&(Nc.hasClass(e)?e&&(o.push(e),a.set(e,!0)):n[e]=null==n[e]?w(t):S(n[e],t,!0))})),s&&s.each((function(t,e){Nc.hasClass(e)&&!a.get(e)&&(o.push(e),a.set(e,!0))})),Nc.topologicalTravel(o,Nc.getAllClassMainTypes(),(function(e){var o=function(t,e,n){var i=ip.get(e);if(!i)return n;var r=i(t);return r?n.concat(r):n}(this,e,_r(t[e])),a=i.get(e),l=a?s&&s.get(e)?"replaceMerge":"normalMerge":"replaceAll",u=Sr(a,o,l);(function(t,e,n){P(t,(function(t){var i=t.newOption;X(i)&&(t.keyInfo.mainType=e,t.keyInfo.subType=function(t,e,n,i){return e.type?e.type:n?n.subType:i.determineSubType(t,e)}(e,i,t.existing,n))}))})(u,e,Nc),n[e]=null,i.set(e,null),r.set(e,0);var h=[],c=[],p=0;P(u,(function(t,n){var i=t.existing,r=t.newOption;if(r){var o=Nc.getClass(e,t.keyInfo.subType,!0);if(i&&i.constructor===o)i.name=t.keyInfo.name,i.mergeOption(r,this),i.optionUpdated(r,!1);else{var a=I({componentIndex:n},t.keyInfo);I(i=new o(r,this,this,a),a),t.brandNew&&(i.__requireNewView=!0),i.init(r,this,this),i.optionUpdated(null,!0)}}else i&&(i.mergeOption({},this),i.optionUpdated({},!1));i?(h.push(i.option),c.push(i),p++):(h.push(void 0),c.push(void 0))}),this),n[e]=h,i.set(e,c),r.set(e,p),"series"===e&&rp(this)}),this),this._seriesIndices||rp(this)},e.prototype.getOption=function(){var t=w(this.option);return P(t,(function(e,n){if(Nc.hasClass(n)){for(var i=_r(e),r=i.length,o=!1,a=r-1;a>=0;a--)i[a]&&!Ar(i[a])?o=!0:(i[a]=null,!o&&r--);i.length=r,t[n]=i}})),delete t["\0_ec_inner"],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.getLocale=function(t){return this.getLocaleModel().get(t)},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,e){var n=this._componentsMap.get(t);if(n){var i=n[e||0];if(i)return i;if(null==e)for(var r=0;r=e:"max"===n?t<=e:t===e})(i[a],t,o)||(r=!1)}})),r}var Sp=P,Mp=X,Ip=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Tp(t){var e=t&&t.itemStyle;if(e)for(var n=0,i=Ip.length;n=0;f--){var g=t[f];if(s||(c=g.data.rawIndexOf(g.stackedByDimension,h)),c>=0){var y=g.data.getByRawIndex(g.stackResultDimension,c);if(p>=0&&y>0||p<=0&&y<0){p+=y,d=y;break}}}return i[0]=p,i[1]=d,i}));a.hostModel.setData(l),e.data=l}))}var Yp,Xp,Up,Zp,jp,qp=function(t){this.data=t.data||(t.sourceFormat===Wc?{}:[]),this.sourceFormat=t.sourceFormat||Xc,this.seriesLayoutBy=t.seriesLayoutBy||Uc,this.startIndex=t.startIndex||0,this.dimensionsDefine=t.dimensionsDefine,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.encodeDefine=t.encodeDefine,this.metaRawOption=t.metaRawOption};function Kp(t){return t instanceof qp}function $p(t,e,n,i){n=n||td(t);var r=e.seriesLayoutBy,o=function(t,e,n,i,r){var o,a;if(!t)return{dimensionsDefine:ed(r),startIndex:a,dimensionsDetectedCount:o};if(e===Gc){var s=t;"auto"===i||null==i?nd((function(t){null!=t&&"-"!==t&&(H(t)?null==a&&(a=1):a=0)}),n,s,10):a=Y(i)?i:i?1:0,r||1!==a||(r=[],nd((function(t,e){r[e]=null!=t?t+"":""}),n,s,1/0)),o=r?r.length:n===Zc?s.length:s[0]?s[0].length:null}else if(e===Hc)r||(r=function(t){var e,n=0;for(;nu&&(u=d)}s[0]=l,s[1]=u}},i=function(){return this._data?this._data.length/this._dimSize:0};function r(t){for(var e=0;e=1)&&(t=1),t}a===l&&s===u||(e="reset"),(this._dirty||"reset"===e)&&(this._dirty=!1,o=this._doReset(i)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(this._dueEnd=n?n._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var p=this._dueIndex,d=Math.min(null!=c?this._dueIndex+c:1/0,this._dueEnd);if(!i&&(o||p1&&i>0?s:a}};return o;function a(){return e=t?null:oe},gte:function(t,e){return t>=e}},Id=function(){function t(t,e){if("number"!=typeof e){var n="";0,yr(n)}this._opFn=Md[t],this._rvalFloat=hr(e)}return t.prototype.evaluate=function(t){return"number"==typeof t?this._opFn(t,this._rvalFloat):this._opFn(hr(t),this._rvalFloat)},t}(),Td=function(){function t(t,e){var n="desc"===t;this._resultLT=n?1:-1,null==e&&(e=n?"min":"max"),this._incomparable="min"===e?-1/0:1/0}return t.prototype.evaluate=function(t,e){var n=typeof t,i=typeof e,r="number"===n?t:hr(t),o="number"===i?e:hr(e),a=isNaN(r),s=isNaN(o);if(a&&(r=this._incomparable),s&&(o=this._incomparable),a&&s){var l="string"===n,u="string"===i;l&&(r=u?t:0),u&&(o=l?e:0)}return ro?-this._resultLT:0},t}(),Cd=function(){function t(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=hr(e)}return t.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var n=typeof t;n===this._rvalTypeof||"number"!==n&&"number"!==this._rvalTypeof||(e=hr(t)===this._rvalFloat)}return this._isEQ?e:!e},t}();function Ad(t,e){return"eq"===t||"ne"===t?new Cd("eq"===t,e):dt(Md,t)?new Id(t,e):null}var Dd=function(){function t(){}return t.prototype.getRawData=function(){throw new Error("not supported")},t.prototype.getRawDataItem=function(t){throw new Error("not supported")},t.prototype.cloneRawData=function(){},t.prototype.getDimensionInfo=function(t){},t.prototype.cloneAllDimensionInfo=function(){},t.prototype.count=function(){},t.prototype.retrieveValue=function(t,e){},t.prototype.retrieveValueFromItem=function(t,e){},t.prototype.convertValue=function(t,e){return bd(t,e)},t}();function Ld(t){var e=t.sourceFormat;if(!Ed(e)){var n="";0,yr(n)}return t.data}function kd(t){var e=t.sourceFormat,n=t.data;if(!Ed(e)){var i="";0,yr(i)}if(e===Gc){for(var r=[],o=0,a=n.length;o9e10&&(this._versionSignBase=0)},t.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},t.prototype.prepareSource=function(){this._isDirty()&&this._createSource()},t.prototype._createSource=function(){this._setLocalSource([],[]);var t,e,n=this._sourceHost,i=this._getUpstreamSourceManagers(),r=!!i.length;if(Vd(n)){var o=n,a=void 0,s=void 0,l=void 0;if(r){var u=i[0];u.prepareSource(),a=(l=u.getSource()).data,s=l.sourceFormat,e=[u._getVersionSign()]}else s=Z(a=o.get("data",!0))?Yc:Fc,e=[];var h=this._getSourceMetaRawOption(),c=l?l.metaRawOption:null;t=[$p(a,{seriesLayoutBy:tt(h.seriesLayoutBy,c?c.seriesLayoutBy:null),sourceHeader:tt(h.sourceHeader,c?c.sourceHeader:null),dimensions:tt(h.dimensions,c?c.dimensions:null)},s,o.get("encode",!0))]}else{var p=n;if(r){var d=this._applyTransform(i);t=d.sourceList,e=d.upstreamSignList}else{t=[$p(p.get("source",!0),this._getSourceMetaRawOption(),null,null)],e=[]}}this._setLocalSource(t,e)},t.prototype._applyTransform=function(t){var e,n=this._sourceHost,i=n.get("transform",!0),r=n.get("fromTransformResult",!0);if(null!=r){var o="";1!==t.length&&Fd(o)}var a,s=[],l=[];return P(t,(function(t){t.prepareSource();var e=t.getSource(r||0),n="";null==r||e||Fd(n),s.push(e),l.push(t._getVersionSign())})),i?e=function(t,e,n){var i=_r(t),r=i.length,o="";r||yr(o);for(var a=0,s=r;a1||e>0&&!t.noHeader,i=0;P(t.blocks,(function(t){Xd(t).planLayout(t);var e=t.__gapLevelBetweenSubBlocks;e>=i&&(i=e+(!n||e&&("section"!==t.type||t.noHeader)?0:1))})),t.__gapLevelBetweenSubBlocks=i},build:function(t,e,n,i){var r=e.noHeader,o=jd(e),a=function(t,e,n,i){var r=[],o=e.blocks||[];rt(!o||F(o)),o=o||[];var a=t.orderMode;if(e.sortBlocks&&a){o=o.slice();var s={valueAsc:"asc",valueDesc:"desc"};if(dt(s,a)){var l=new Td(s[a],null);o.sort((function(t,e){return l.evaluate(t.sortParam,e.sortParam)}))}else"seriesDesc"===a&&o.reverse()}var u=jd(e);if(P(o,(function(e,n){var o=Xd(e).build(t,e,n>0?u.html:0,i);null!=o&&r.push(o)})),!r.length)return;return"richText"===t.renderMode?r.join(u.richText):qd(r.join(""),n)}(t,e,r?n:o.html,i);if(r)return a;var s=yc(e.header,"ordinal",t.useUTC),l=Gd(i,t.renderMode).nameStyle;return"richText"===t.renderMode?Kd(t,s,l)+o.richText+a:qd('
                      '+gc(s)+"
                      "+a,n)}},nameValue:{planLayout:function(t){t.__gapLevelBetweenSubBlocks=0},build:function(t,e,n,i){var r=t.renderMode,o=e.noName,a=e.noValue,s=!e.markerType,l=e.name,u=e.value,h=t.useUTC;if(!o||!a){var c=s?"":t.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",r),p=o?"":yc(l,"ordinal",h),d=e.valueType,f=a?[]:F(u)?O(u,(function(t,e){return yc(t,F(d)?d[e]:d,h)})):[yc(u,F(d)?d[0]:d,h)],g=!s||!o,y=!s&&o,v=Gd(i,r),m=v.nameStyle,_=v.valueStyle;return"richText"===r?(s?"":c)+(o?"":Kd(t,p,m))+(a?"":function(t,e,n,i,r){var o=[r],a=i?10:20;return n&&o.push({padding:[0,0,0,a],align:"right"}),t.markupStyleCreator.wrapRichTextStyle(e.join(" "),o)}(t,f,g,y,_)):qd((s?"":c)+(o?"":function(t,e,n){return''+gc(t)+""}(p,!s,m))+(a?"":function(t,e,n,i){var r=n?"10px":"20px";return''+O(t,(function(t){return gc(t)})).join("  ")+""}(f,g,y,_)),n)}}}};function Zd(t,e,n,i,r,o){if(t){var a=Xd(t);a.planLayout(t);var s={useUTC:r,renderMode:n,orderMode:i,markupStyleCreator:e};return a.build(s,t,0,o)}}function jd(t){var e=t.__gapLevelBetweenSubBlocks;return{html:Hd[e],richText:Wd[e]}}function qd(t,e){return'
                      '+t+'
                      '}function Kd(t,e,n){return t.markupStyleCreator.wrapRichTextStyle(e,n)}function $d(t,e){return bc(t.getData().getItemVisual(e,"style")[t.visualDrawType])}function Jd(t,e){var n=t.get("padding");return null!=n?n:"richText"===e?[8,10]:10}var Qd=function(){function t(){this.richTextStyles={},this._nextStyleNameId=pr()}return t.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},t.prototype.makeTooltipMarker=function(t,e,n){var i="richText"===n?this._generateStyleName():null,r=xc({color:e,type:t,renderMode:n,markerId:i});return H(r)?r:(this.richTextStyles[i]=r.style,r.content)},t.prototype.wrapRichTextStyle=function(t,e){var n={};F(e)?P(e,(function(t){return I(n,t)})):I(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},t}();function tf(t){var e,n,i,r,o=t.series,a=t.dataIndex,s=t.multipleSeries,l=o.getData(),u=l.mapDimensionsAll("defaultedTooltip"),h=u.length,c=o.getRawValue(a),p=F(c),d=$d(o,a);if(h>1||p&&!h){var f=function(t,e,n,i,r){var o=e.getData(),a=R(t,(function(t,e,n){var i=o.getDimensionInfo(n);return t||i&&!1!==i.tooltip&&null!=i.displayName}),!1),s=[],l=[],u=[];function h(t,e){var n=o.getDimensionInfo(e);n&&!1!==n.otherDims.tooltip&&(a?u.push(Yd("nameValue",{markerType:"subItem",markerColor:r,name:n.displayName,value:t,valueType:n.type})):(s.push(t),l.push(n.type)))}return i.length?P(i,(function(t){h(fd(o,n,t),t)})):P(t,h),{inlineValues:s,inlineValueTypes:l,blocks:u}}(c,o,a,u,d);e=f.inlineValues,n=f.inlineValueTypes,i=f.blocks,r=f.inlineValues[0]}else if(h){var g=l.getDimensionInfo(u[0]);r=e=fd(l,a,u[0]),n=g.type}else r=e=p?c[0]:c;var y=Cr(o),v=y&&o.name||"",m=l.getName(a),_=s?v:m;return Yd("section",{header:v,noHeader:s||!y,sortParam:r,blocks:[Yd("nameValue",{markerType:"item",markerColor:d,name:_,noName:!ot(_),value:e,valueType:n})].concat(i||[])})}var ef=Lr();function nf(t,e){return t.getName(e)||t.getId(e)}var rf=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return n(e,t),e.prototype.init=function(t,e,n){this.seriesIndex=this.componentIndex,this.dataTask=md({count:af,reset:sf}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n),(ef(this).sourceManager=new zd(this)).prepareSource();var i=this.getInitialData(t,n);uf(i,this),this.dataTask.context.data=i,ef(this).dataBeforeProcessed=i,of(this),this._initSelectedMapFromData(i)},e.prototype.mergeDefaultAndTheme=function(t,e){var n=Lc(this),i=n?Pc(t):{},r=this.subType;Nc.hasClass(r)&&(r+="Series"),S(t,e.getTheme().get(this.subType)),S(t,this.getDefaultOption()),xr(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&kc(t,i,n)},e.prototype.mergeOption=function(t,e){t=S(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Lc(this);n&&kc(this.option,t,n);var i=ef(this).sourceManager;i.dirty(),i.prepareSource();var r=this.getInitialData(t,e);uf(r,this),this.dataTask.dirty(),this.dataTask.context.data=r,ef(this).dataBeforeProcessed=r,of(this),this._initSelectedMapFromData(r)},e.prototype.fillDataTextStyle=function(t){if(t&&!Z(t))for(var e=["show"],n=0;nthis.getShallow("animationThreshold")&&(t=!1),!!t},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,e,n){var i=this.ecModel,r=up.prototype.getColorFromPalette.call(this,t,e,n);return r||(r=i.getColorFromPalette(t,e,n)),r},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,e){this._innerSelect(this.getData(e),t)},e.prototype.unselect=function(t,e){var n=this.option.selectedMap;if(n)for(var i=this.getData(e),r=0;r=0&&n.push(r)}return n},e.prototype.isSelected=function(t,e){var n=this.option.selectedMap;return n&&n[nf(this.getData(e),t)]||!1},e.prototype._innerSelect=function(t,e){var n,i,r=this.option.selectedMode,o=e.length;if(r&&o)if("multiple"===r)for(var a=this.option.selectedMap||(this.option.selectedMap={}),s=0;s0&&this._innerSelect(t,e)}},e.registerClass=function(t){return Nc.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.useColorPaletteOnData=!1,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Nc);function of(t){var e=t.name;Cr(t)||(t.name=function(t){var e=t.getRawData(),n=e.mapDimensionsAll("seriesName"),i=[];return P(n,(function(t){var n=e.getDimensionInfo(t);n.displayName&&i.push(n.displayName)})),i.join(" ")}(t)||e)}function af(t){return t.model.getRawData().count()}function sf(t){var e=t.model;return e.setData(e.getRawData().cloneShallow()),lf}function lf(t,e){e.outputData&&t.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function uf(t,e){P(r(t.CHANGABLE_METHODS,t.DOWNSAMPLE_METHODS),(function(n){t.wrapMethod(n,V(hf,e))}))}function hf(t,e){var n=cf(t);return n&&n.setOutputEnd((e||this).count()),e}function cf(t){var e=(t.ecModel||{}).scheduler,n=e&&e.getPipeline(t.uid);if(n){var i=n.currentTask;if(i){var r=i.agentStubMap;r&&(i=r.get(t.uid))}return i}}L(rf,yd),L(rf,up),Yr(rf,Nc);var pf=function(){function t(){this.group=new zi,this.uid=Ih("viewComponent")}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){},t.prototype.updateLayout=function(t,e,n,i){},t.prototype.updateVisual=function(t,e,n,i){},t.prototype.blurSeries=function(t,e){},t}();function df(){var t=Lr();return function(e){var n=t(e),i=e.pipelineContext,r=!!n.large,o=!!n.progressiveRender,a=n.large=!(!i||!i.large),s=n.progressiveRender=!(!i||!i.progressiveRender);return!(r===a&&o===s)&&"reset"}}Hr(pf),jr(pf);var ff=Lr(),gf=df(),yf=function(){function t(){this.group=new zi,this.uid=Ih("viewChart"),this.renderTask=md({plan:_f,reset:xf}),this.renderTask.context={view:this}}return t.prototype.init=function(t,e){},t.prototype.render=function(t,e,n,i){},t.prototype.highlight=function(t,e,n,i){mf(t.getData(),i,"emphasis")},t.prototype.downplay=function(t,e,n,i){mf(t.getData(),i,"normal")},t.prototype.remove=function(t,e){this.group.removeAll()},t.prototype.dispose=function(t,e){},t.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},t.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},t.markUpdateMethod=function(t,e){ff(t).updateMethod=e},t.protoInitialize=void(t.prototype.type="chart"),t}();function vf(t,e,n){t&&("emphasis"===e?Hs:Ws)(t,n)}function mf(t,e,n){var i=Dr(t,e),r=e&&null!=e.highlightKey?function(t){var e=ms[t];return null==e&&vs<=32&&(e=ms[t]=vs++),e}(e.highlightKey):null;null!=i?P(_r(i),(function(e){vf(t.getItemGraphicEl(e),n,r)})):t.eachItemGraphicEl((function(t){vf(t,n,r)}))}function _f(t){return gf(t.model)}function xf(t){var e=t.model,n=t.ecModel,i=t.api,r=t.payload,o=e.pipelineContext.progressiveRender,a=t.view,s=r&&ff(r).updateMethod,l=o?"incrementalPrepareRender":s&&a[s]?s:"render";return"render"!==l&&a[l](e,n,i,r),bf[l]}Hr(yf),jr(yf);var bf={incrementalPrepareRender:{progress:function(t,e){e.view.incrementalRender(t,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(t,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},wf="\0__throttleOriginMethod",Sf="\0__throttleRate",Mf="\0__throttleType";function If(t,e,n){var i,r,o,a,s,l=0,u=0,h=null;function c(){u=(new Date).getTime(),h=null,t.apply(o,a||[])}e=e||0;var p=function(){for(var t=[],p=0;p=0?c():h=setTimeout(c,-r),l=i};return p.clear=function(){h&&(clearTimeout(h),h=null)},p.debounceNextCall=function(t){s=t},p}function Tf(t,e,n,i){var r=t[e];if(r){var o=r[wf]||r,a=r[Mf];if(r[Sf]!==n||a!==i){if(null==n||!i)return t[e]=o;(r=t[e]=If(o,n,"debounce"===i))[wf]=o,r[Mf]=i,r[Sf]=n}return r}}var Cf=Lr(),Af={itemStyle:qr(xh,!0),lineStyle:qr(vh,!0)},Df={lineStyle:"stroke",itemStyle:"fill"};function Lf(t,e){var n=t.visualStyleMapper||Af[e];return n||(console.warn("Unkown style type '"+e+"'."),Af.itemStyle)}function kf(t,e){var n=t.visualDrawType||Df[e];return n||(console.warn("Unkown style type '"+e+"'."),"fill")}var Pf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=t.getModel(i),o=Lf(t,i)(r),a=r.getShallow("decal");a&&(n.setVisual("decal",a),a.dirty=!0);var s=kf(t,i),l=o[s],u=G(l)?l:null;if(o[s]&&!u||(o[s]=t.getColorFromPalette(t.name,null,e.getSeriesCount()),n.setVisual("colorFromPalette",!0)),n.setVisual("style",o),n.setVisual("drawType",s),!e.isSeriesFiltered(t)&&u)return n.setVisual("colorFromPalette",!1),{dataEach:function(e,n){var i=t.getDataParams(n),r=I({},o);r[s]=u(i),e.setItemVisual(n,"style",r)}}}},Of=new Sh,Rf={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(!t.ignoreStyleOnData&&!e.isSeriesFiltered(t)){var n=t.getData(),i=t.visualStyleAccessPath||"itemStyle",r=Lf(t,i),o=n.getVisual("drawType");return{dataEach:n.hasItemOption?function(t,e){var n=t.getRawDataItem(e);if(n&&n[i]){Of.option=n[i];var a=r(Of);I(t.ensureUniqueItemVisual(e,"style"),a),Of.option.decal&&(t.setItemVisual(e,"decal",Of.option.decal),Of.option.decal.dirty=!0),o in a&&t.setItemVisual(e,"colorFromPalette",!1)}}:null}}}},Nf={performRawSeries:!0,overallReset:function(t){var e=ht();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),Cf(t).scope=n}})),t.eachSeries((function(e){if(e.useColorPaletteOnData&&!t.isSeriesFiltered(e)){var n=e.getRawData(),i={},r=e.getData(),o=Cf(e).scope,a=e.visualStyleAccessPath||"itemStyle",s=kf(e,a);r.each((function(t){var e=r.getRawIndex(t);i[e]=t})),n.each((function(t){var a=i[t];if(r.getItemVisual(a,"colorFromPalette")){var l=r.ensureUniqueItemVisual(a,"style"),u=n.getName(t)||t+"",h=n.count();l[s]=e.getColorFromPalette(u,o,h)}}))}}))}},Ef=Math.PI;var zf=function(){function t(t,e,n,i){this._stageTaskMap=ht(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return t.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each((function(t){var e=t.overallTask;e&&e.dirty()}))},t.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,r=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex?n.step:null,o=i&&i.modDataCount;return{step:r,modBy:null!=o?Math.ceil(o/r):null,modDataCount:o}}},t.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},t.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData().count(),r=n.progressiveEnabled&&e.incrementalPrepareRender&&i>=n.threshold,o=t.get("large")&&i>=t.get("largeThreshold"),a="mod"===t.get("progressiveChunkMode")?i:null;t.pipelineContext=n.context={progressiveRender:r,modDataCount:a,large:o}},t.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=ht();t.eachSeries((function(t){var i=t.getProgressive(),r=t.uid;n.set(r,{id:r,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),e._pipe(t,t.dataTask)}))},t.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;P(this._allHandlers,(function(i){var r=t.get(i.uid)||t.set(i.uid,{}),o="";rt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,r,e,n),i.overallReset&&this._createOverallStageTask(i,r,e,n)}),this)},t.prototype.prepareView=function(t,e,n,i){var r=t.renderTask,o=r.context;o.model=e,o.ecModel=n,o.api=i,r.__block=!t.incrementalPrepareRender,this._pipe(e,r)},t.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},t.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},t.prototype._performStageTasks=function(t,e,n,i){i=i||{};var r=!1,o=this;function a(t,e){return t.setDirty&&(!t.dirtyMap||t.dirtyMap.get(e.__pipeline.id))}P(t,(function(t,s){if(!i.visualType||i.visualType===t.visualType){var l=o._stageTaskMap.get(t.uid),u=l.seriesTaskMap,h=l.overallTask;if(h){var c,p=h.agentStubMap;p.each((function(t){a(i,t)&&(t.dirty(),c=!0)})),c&&h.dirty(),o.updatePayload(h,n);var d=o.getPerformArgs(h,i.block);p.each((function(t){t.perform(d)})),h.perform(d)&&(r=!0)}else u&&u.each((function(s,l){a(i,s)&&s.dirty();var u=o.getPerformArgs(s,i.block);u.skip=!t.performRawSeries&&e.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(u)&&(r=!0)}))}})),this.unfinished=r||this.unfinished},t.prototype.performSeriesTasks=function(t){var e;t.eachSeries((function(t){e=t.dataTask.perform()||e})),this.unfinished=e||this.unfinished},t.prototype.plan=function(){this._pipelineMap.each((function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)}))},t.prototype.updatePayload=function(t,e){"remain"!==e&&(t.context.payload=e)},t.prototype._createSeriesStageTask=function(t,e,n,i){var r=this,o=e.seriesTaskMap,a=e.seriesTaskMap=ht(),s=t.seriesType,l=t.getTargetSeries;function u(e){var s=e.uid,l=a.set(s,o&&o.get(s)||md({plan:Hf,reset:Wf,count:Uf}));l.context={model:e,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:r},r._pipe(e,l)}t.createOnAllSeries?n.eachRawSeries(u):s?n.eachRawSeriesByType(s,u):l&&l(n,i).each(u)},t.prototype._createOverallStageTask=function(t,e,n,i){var r=this,o=e.overallTask=e.overallTask||md({reset:Bf});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:r};var a=o.agentStubMap,s=o.agentStubMap=ht(),l=t.seriesType,u=t.getTargetSeries,h=!0,c=!1,p="";function d(t){var e=t.uid,n=s.set(e,a&&a.get(e)||(c=!0,md({reset:Vf,onDirty:Gf})));n.context={model:t,overallProgress:h},n.agent=o,n.__block=h,r._pipe(t,n)}rt(!t.createOnAllSeries,p),l?n.eachRawSeriesByType(l,d):u?u(n,i).each(d):(h=!1,P(n.getSeries(),d)),c&&o.dirty()},t.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},t.wrapStageHandler=function(t,e){return G(t)&&(t={overallReset:t,seriesType:Zf(t)}),t.uid=Ih("stageHandler"),e&&(t.visualType=e),t},t}();function Bf(t){t.overallReset(t.ecModel,t.api,t.payload)}function Vf(t){return t.overallProgress&&Ff}function Ff(){this.agent.dirty(),this.getDownstream().dirty()}function Gf(){this.agent&&this.agent.dirty()}function Hf(t){return t.plan?t.plan(t.model,t.ecModel,t.api,t.payload):null}function Wf(t){t.useClearVisual&&t.data.clearAllVisual();var e=t.resetDefines=_r(t.reset(t.model,t.ecModel,t.api,t.payload));return e.length>1?O(e,(function(t,e){return Xf(e)})):Yf}var Yf=Xf(0);function Xf(t){return function(e,n){var i=n.data,r=n.resetDefines[t];if(r&&r.dataEach)for(var o=e.start;o0&&h===r.length-u.length){var c=r.slice(0,h);"data"!==c&&(e.mainType=c,e[u.toLowerCase()]=t,s=!0)}}a.hasOwnProperty(r)&&(n[r]=t,s=!0),s||(i[r]=t)}))}return{cptQuery:e,dataQuery:n,otherQuery:i}},t.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,r=n.packedEvent,o=n.model,a=n.view;if(!o||!a)return!0;var s=e.cptQuery,l=e.dataQuery;return u(s,o,"mainType")&&u(s,o,"subType")&&u(s,o,"index","componentIndex")&&u(s,o,"name")&&u(s,o,"id")&&u(l,r,"name")&&u(l,r,"dataIndex")&&u(l,r,"dataType")&&(!a.filterForExposedEvent||a.filterForExposedEvent(t,e.otherQuery,i,r));function u(t,e,n,i){return null==t[n]||e[i||n]===t[n]}},t.prototype.afterTrigger=function(){this.eventInfo=null},t}(),cg={createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){var n=t.getData();if(t.legendSymbol&&n.setVisual("legendSymbol",t.legendSymbol),t.hasSymbolVisual){var i=t.get("symbol"),r=t.get("symbolSize"),o=t.get("symbolKeepAspect"),a=t.get("symbolRotate"),s=G(i),l=G(r),u=G(a),h=s||l||u,c=!s&&i?i:t.defaultSymbol,p=l?null:r,d=u?null:a;if(n.setVisual({legendSymbol:t.legendSymbol||c,symbol:c,symbolSize:p,symbolKeepAspect:o,symbolRotate:d}),!e.isSeriesFiltered(t))return{dataEach:h?function(e,n){var o=t.getRawValue(n),h=t.getDataParams(n);s&&e.setItemVisual(n,"symbol",i(o,h)),l&&e.setItemVisual(n,"symbolSize",r(o,h)),u&&e.setItemVisual(n,"symbolRotate",a(o,h))}:null}}}};function pg(t,e,n){switch(n){case"color":return t.getItemVisual(e,"style")[t.getVisual("drawType")];case"opacity":return t.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getItemVisual(e,n);default:0}}function dg(t,e){switch(e){case"color":return t.getVisual("style")[t.getVisual("drawType")];case"opacity":return t.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return t.getVisual(e);default:0}}function fg(t,e,n,i){switch(n){case"color":t.ensureUniqueItemVisual(e,"style")[t.getVisual("drawType")]=i,t.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":t.ensureUniqueItemVisual(e,"style").opacity=i;break;case"symbol":case"symbolSize":case"liftZ":t.setItemVisual(e,n,i);break;default:0}}var gg=2*Math.PI,yg=Ca.CMD,vg=["top","right","bottom","left"];function mg(t,e,n,i,r){var o=n.width,a=n.height;switch(t){case"top":i.set(n.x+o/2,n.y-e),r.set(0,-1);break;case"bottom":i.set(n.x+o/2,n.y+a+e),r.set(0,1);break;case"left":i.set(n.x-e,n.y+a/2),r.set(-1,0);break;case"right":i.set(n.x+o+e,n.y+a/2),r.set(1,0)}}function _g(t,e,n,i,r,o,a,s,l){a-=t,s-=e;var u=Math.sqrt(a*a+s*s),h=(a/=u)*n+t,c=(s/=u)*n+e;if(Math.abs(i-r)%gg<1e-4)return l[0]=h,l[1]=c,u-n;if(o){var p=i;i=Pa(r),r=Pa(p)}else i=Pa(i),r=Pa(r);i>r&&(r+=gg);var d=Math.atan2(s,a);if(d<0&&(d+=gg),d>=i&&d<=r||d+gg>=i&&d+gg<=r)return l[0]=h,l[1]=c,u-n;var f=n*Math.cos(i)+t,g=n*Math.sin(i)+e,y=n*Math.cos(r)+t,v=n*Math.sin(r)+e,m=(f-a)*(f-a)+(g-s)*(g-s),_=(y-a)*(y-a)+(v-s)*(v-s);return m<_?(l[0]=f,l[1]=g,Math.sqrt(m)):(l[0]=y,l[1]=v,Math.sqrt(_))}function xg(t,e,n,i,r,o,a,s){var l=r-t,u=o-e,h=n-t,c=i-e,p=Math.sqrt(h*h+c*c),d=(l*(h/=p)+u*(c/=p))/p;s&&(d=Math.min(Math.max(d,0),1)),d*=p;var f=a[0]=t+d*h,g=a[1]=e+d*c;return Math.sqrt((f-r)*(f-r)+(g-o)*(g-o))}function bg(t,e,n,i,r,o,a){n<0&&(t+=n,n=-n),i<0&&(e+=i,i=-i);var s=t+n,l=e+i,u=a[0]=Math.min(Math.max(r,t),s),h=a[1]=Math.min(Math.max(o,e),l);return Math.sqrt((u-r)*(u-r)+(h-o)*(h-o))}var wg=[];function Sg(t,e,n){var i=bg(e.x,e.y,e.width,e.height,t.x,t.y,wg);return n.set(wg[0],wg[1]),i}function Mg(t,e,n){for(var i,r,o=0,a=0,s=0,l=0,u=1/0,h=e.data,c=t.x,p=t.y,d=0;d0){e=e/180*Math.PI,Ig.fromArray(t[0]),Tg.fromArray(t[1]),Cg.fromArray(t[2]),In.sub(Ag,Ig,Tg),In.sub(Dg,Cg,Tg);var n=Ag.len(),i=Dg.len();if(!(n<.001||i<.001)){Ag.scale(1/n),Dg.scale(1/i);var r=Ag.dot(Dg);if(Math.cos(e)1&&In.copy(Pg,Cg),Pg.toArray(t[1])}}}}function Rg(t,e,n){if(n<=180&&n>0){n=n/180*Math.PI,Ig.fromArray(t[0]),Tg.fromArray(t[1]),Cg.fromArray(t[2]),In.sub(Ag,Tg,Ig),In.sub(Dg,Cg,Tg);var i=Ag.len(),r=Dg.len();if(!(i<.001||r<.001))if(Ag.scale(1/i),Dg.scale(1/r),Ag.dot(e)=a)In.copy(Pg,Cg);else{Pg.scaleAndAdd(Dg,o/Math.tan(Math.PI/2-s));var l=Cg.x!==Tg.x?(Pg.x-Tg.x)/(Cg.x-Tg.x):(Pg.y-Tg.y)/(Cg.y-Tg.y);if(isNaN(l))return;l<0?In.copy(Pg,Tg):l>1&&In.copy(Pg,Cg)}Pg.toArray(t[1])}}}function Ng(t,e,n,i){var r="normal"===n,o=r?t:t.ensureState(n);o.ignore=e;var a=i.get("smooth");a&&!0===a&&(a=.3),o.shape=o.shape||{},a>0&&(o.shape.smooth=a);var s=i.getModel("lineStyle").getLineStyle();r?t.useStyle(s):o.style=s}function Eg(t,e){var n=e.smooth,i=e.points;if(i)if(t.moveTo(i[0][0],i[0][1]),n>0&&i.length>=3){var r=Lt(i[0],i[1]),o=Lt(i[1],i[2]);if(!r||!o)return t.lineTo(i[1][0],i[1][1]),void t.lineTo(i[2][0],i[2][1]);var a=Math.min(r,o)*n,s=Ot([],i[1],i[0],a/r),l=Ot([],i[1],i[2],a/o),u=Ot([],s,l,.5);t.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),t.bezierCurveTo(l[0],l[1],l[0],l[1],i[2][0],i[2][1])}else for(var h=1;h0&&o&&x(-h/a,0,a);var f,g,y=t[0],v=t[a-1];return m(),f<0&&b(-f,.8),g<0&&b(g,.8),m(),_(f,g,1),_(g,f,-1),m(),f<0&&w(-f),g<0&&w(g),u}function m(){f=y.rect[e]-i,g=r-v.rect[e]-v.rect[n]}function _(t,e,n){if(t<0){var i=Math.min(e,-t);if(i>0){x(i*n,0,a);var r=i+t;r<0&&b(-r*n,1)}else b(-t*n,1)}}function x(n,i,r){0!==n&&(u=!0);for(var o=i;o0)for(l=0;l0;l--){x(-(o[l-1]*c),l,a)}}}function w(t){var e=t<0?-1:1;t=Math.abs(t);for(var n=Math.ceil(t/(a-1)),i=0;i0?x(n,0,i+1):x(-n,a-i-1,a),(t-=n)<=0)return}}function Fg(t,e,n,i){return Vg(t,"y","height",e,n,i)}function Gg(t){if(t){for(var e=[],n=0;n=0&&n.attr(d.oldLayoutSelect),A(u,"emphasis")>=0&&n.attr(d.oldLayoutEmphasis)),Ou(n,s,e,a)}else if(n.attr(s),!uh(n).valueAnimation){var h=tt(n.style.opacity,1);n.style.opacity=0,Ru(n,{style:{opacity:h}},e,a)}if(d.oldLayout=s,n.states.select){var c=d.oldLayoutSelect={};Zg(c,s,jg),Zg(c,n.states.select,jg)}if(n.states.emphasis){var p=d.oldLayoutEmphasis={};Zg(p,s,jg),Zg(p,n.states.emphasis,jg)}ch(n,a,l,e,e)}if(i&&!i.ignore&&!i.invisible){r=(d=Ug(i)).oldLayout;var d,f={points:i.shape.points};r?(i.attr({shape:r}),Ou(i,{shape:f},e)):(i.setShape(f),i.style.strokePercent=0,Ru(i,{style:{strokePercent:1}},e)),d.oldLayout=f}},t}();function Kg(t,e){function n(e,n){var i=[];return e.eachComponent({mainType:"series",subType:t,query:n},(function(t){i.push(t.seriesIndex)})),i}P([[t+"ToggleSelect","toggleSelect"],[t+"Select","select"],[t+"UnSelect","unselect"]],(function(t){e(t[0],(function(e,i,r){e=I({},e),r.dispatchAction(I(e,{type:t[1],seriesIndex:n(i,e)}))}))}))}function $g(t,e,n,i,r){var o=t+e;n.isSilent(o)||i.eachComponent({mainType:"series",subType:"pie"},(function(t){for(var e=t.seriesIndex,i=r.selected,a=0;a0?(e=e||1,"dashed"===t?[4*e,2*e]:"dotted"===t?[e]:Y(t)?[t]:F(t)?t:null):null}var dy=new Ca(!0);function fy(t){var e=t.stroke;return!(null==e||"none"===e||!(t.lineWidth>0))}function gy(t){var e=t.fill;return null!=e&&"none"!==e}function yy(t,e){if(null!=e.fillOpacity&&1!==e.fillOpacity){var n=t.globalAlpha;t.globalAlpha=e.fillOpacity*e.opacity,t.fill(),t.globalAlpha=n}else t.fill()}function vy(t,e){if(null!=e.strokeOpacity&&1!==e.strokeOpacity){var n=t.globalAlpha;t.globalAlpha=e.strokeOpacity*e.opacity,t.stroke(),t.globalAlpha=n}else t.stroke()}function my(t,e,n){var i=to(e.image,e.__image,n);if(no(i)){var r=t.createPattern(i,e.repeat||"repeat");if("function"==typeof DOMMatrix){var o=new DOMMatrix;o.rotateSelf(0,0,(e.rotation||0)/Math.PI*180),o.scaleSelf(e.scaleX||1,e.scaleY||1),o.translateSelf(e.x||0,e.y||0),r.setTransform(o)}return r}}var _y=["shadowBlur","shadowOffsetX","shadowOffsetY"],xy=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function by(t,e,n,i,r){var o=!1;if(!i&&e===(n=n||{}))return!1;(i||e.opacity!==n.opacity)&&(o||(My(t,r),o=!0),t.globalAlpha=null==e.opacity?vo.opacity:e.opacity),(i||e.blend!==n.blend)&&(o||(My(t,r),o=!0),t.globalCompositeOperation=e.blend||vo.blend);for(var a=0;a<_y.length;a++){var s=_y[a];(i||e[s]!==n[s])&&(o||(My(t,r),o=!0),t[s]=t.dpr*(e[s]||0))}return(i||e.shadowColor!==n.shadowColor)&&(o||(My(t,r),o=!0),t.shadowColor=e.shadowColor||vo.shadowColor),o}function wy(t,e,n,i,r){var o=Iy(e,r.inHover),a=i?null:n&&Iy(n,r.inHover)||{};if(o===a)return!1;var s=by(t,o,a,i,r);if((i||o.fill!==a.fill)&&(s||(My(t,r),s=!0),t.fillStyle=o.fill),(i||o.stroke!==a.stroke)&&(s||(My(t,r),s=!0),t.strokeStyle=o.stroke),(i||o.opacity!==a.opacity)&&(s||(My(t,r),s=!0),t.globalAlpha=null==o.opacity?1:o.opacity),e.hasStroke()){var l=o.lineWidth/(o.strokeNoScale&&e&&e.getLineScale?e.getLineScale():1);t.lineWidth!==l&&(s||(My(t,r),s=!0),t.lineWidth=l)}for(var u=0;u0&&py(n.lineDash,n.lineWidth),w=n.lineDashOffset,S=!!t.setLineDash,M=e.getGlobalScale();if(u.setScale(M[0],M[1],e.segmentIgnoreThreshold),b){var I=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;I&&1!==I&&(b=O(b,(function(t){return t/I})),w/=I)}var T=!0;(l||e.__dirty&Za.SHAPE_CHANGED_BIT||b&&!S&&r)&&(u.setDPR(t.dpr),s?u.setContext(null):(u.setContext(t),T=!1),u.reset(),b&&!S&&(u.setLineDash(b),u.setLineDashOffset(w)),e.buildPath(u,e.shape,i),u.toStatic(),e.pathUpdated()),T&&u.rebuildPath(t,s?a:1),b&&S&&(t.setLineDash(b),t.lineDashOffset=w),i||(n.strokeFirst?(r&&vy(t,n),o&&yy(t,n)):(o&&yy(t,n),r&&vy(t,n))),b&&S&&t.setLineDash([])}(t,e,d,p),p&&(n.batchFill=d.fill||"",n.batchStroke=d.stroke||"")):e instanceof qa?(3!==n.lastDrawType&&(l=!0,n.lastDrawType=3),wy(t,e,u,l,n),function(t,e,n){var i=n.text;if(null!=i&&(i+=""),i){t.font=n.font||En,t.textAlign=n.textAlign,t.textBaseline=n.textBaseline;var r=void 0;if(t.setLineDash){var o=n.lineDash&&n.lineWidth>0&&py(n.lineDash,n.lineWidth),a=n.lineDashOffset;if(o){var s=n.strokeNoScale&&e.getLineScale?e.getLineScale():1;s&&1!==s&&(o=O(o,(function(t){return t/s})),a/=s),t.setLineDash(o),t.lineDashOffset=a,r=!0}}n.strokeFirst?(fy(n)&&t.strokeText(i,n.x,n.y),gy(n)&&t.fillText(i,n.x,n.y)):(gy(n)&&t.fillText(i,n.x,n.y),fy(n)&&t.strokeText(i,n.x,n.y)),r&&t.setLineDash([])}}(t,e,d)):e instanceof Ja?(2!==n.lastDrawType&&(l=!0,n.lastDrawType=2),function(t,e,n,i,r){by(t,Iy(e,r.inHover),n&&Iy(n,r.inHover),i,r)}(t,e,u,l,n),function(t,e,n){var i=e.__image=to(n.image,e.__image,e,e.onload);if(i&&no(i)){var r=n.x||0,o=n.y||0,a=e.getWidth(),s=e.getHeight(),l=i.width/i.height;if(null==a&&null!=s?a=s*l:null==s&&null!=a?s=a/l:null==a&&null==s&&(a=i.width,s=i.height),n.sWidth&&n.sHeight){var u=n.sx||0,h=n.sy||0;t.drawImage(i,u,h,n.sWidth,n.sHeight,r,o,a,s)}else if(n.sx&&n.sy){var c=a-(u=n.sx),p=s-(h=n.sy);t.drawImage(i,u,h,c,p,r,o,a,s)}else t.drawImage(i,r,o,a,s)}}(t,e,d)):e instanceof vu&&(4!==n.lastDrawType&&(l=!0,n.lastDrawType=4),function(t,e,n){var i=e.getDisplayables(),r=e.getTemporalDisplayables();t.save();var o,a,s={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:n.viewWidth,viewHeight:n.viewHeight,inHover:n.inHover};for(o=e.getCursor(),a=i.length;o0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.setOption=function(t,e,n){if(this._disposed)bv(this.id);else{var i,r,o;if(By(e)&&(n=e.lazyUpdate,i=e.silent,r=e.replaceMerge,o=e.transition,e=e.notMerge),this.__flagInMainProcess=!0,!this._model||e){var a=new bp(this._api),s=this._theme,l=this._model=new pp;l.scheduler=this._scheduler,l.init(null,null,null,s,this._locale,a)}this._model.setOption(t,{replaceMerge:r},Iv),dv(this,o),n?(this.__optionUpdated={silent:i},this.__flagInMainProcess=!1,this.getZr().wakeUp()):(qy(this),Jy.update.call(this),this._zr.flush(),this.__optionUpdated=!1,this.__flagInMainProcess=!1,nv.call(this,i),iv.call(this,i))}},e.prototype.setTheme=function(){console.error("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Fy&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){if(a.canvasSupported)return(t=I({},t||{})).pixelRatio=t.pixelRatio||1,t.backgroundColor=t.backgroundColor||this._model.get("backgroundColor"),this._zr.painter.getRenderedCanvas(t)},e.prototype.getSvgDataURL=function(){if(a.svgSupported){var t=this._zr;return P(t.storage.getDisplayList(),(function(t){t.stopAnimation(null,!0)})),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(!this._disposed){var e=(t=t||{}).excludeComponents,n=this._model,i=[],r=this;Ey(e,(function(t){n.eachComponent({mainType:t},(function(t){var e=r._componentsMap[t.__viewId];e.group.ignore||(i.push(e),e.group.ignore=!0)}))}));var o="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.getRenderedCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return Ey(i,(function(t){t.group.ignore=!1})),o}bv(this.id)},e.prototype.getConnectedDataURL=function(t){if(this._disposed)bv(this.id);else if(a.canvasSupported){var e="svg"===t.type,n=this.group,i=Math.min,r=Math.max,o=1/0;if(Pv[n]){var s=o,l=o,u=-1/0,h=-1/0,c=[],p=t&&t.pixelRatio||1;P(kv,(function(o,a){if(o.group===n){var p=e?o.getZr().painter.getSvgDom().innerHTML:o.getRenderedCanvas(w(t)),d=o.getDom().getBoundingClientRect();s=i(d.left,s),l=i(d.top,l),u=r(d.right,u),h=r(d.bottom,h),c.push({dom:p,left:d.left,top:d.top})}}));var d=(u*=p)-(s*=p),f=(h*=p)-(l*=p),g=C(),y=Hi(g,{renderer:e?"svg":"canvas"});if(y.resize({width:d,height:f}),e){var v="";return Ey(c,(function(t){var e=t.left-s,n=t.top-l;v+=''+t.dom+""})),y.painter.getSvgRoot().innerHTML=v,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}return t.connectedBackgroundColor&&y.add(new os({shape:{x:0,y:0,width:d,height:f},style:{fill:t.connectedBackgroundColor}})),Ey(c,(function(t){var e=new Ja({style:{x:t.left*p-s,y:t.top*p-l,image:t.dom}});y.add(e)})),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}return this.getDataURL(t)}},e.prototype.convertToPixel=function(t,e){return Qy(this,"convertToPixel",t,e)},e.prototype.convertFromPixel=function(t,e){return Qy(this,"convertFromPixel",t,e)},e.prototype.containPixel=function(t,e){var n;if(!this._disposed)return P(Pr(this._model,t),(function(t,i){i.indexOf("Models")>=0&&P(t,(function(t){var r=t.coordinateSystem;if(r&&r.containPoint)n=n||!!r.containPoint(e);else if("seriesModels"===i){var o=this._chartsMap[t.__viewId];o&&o.containPoint&&(n=n||o.containPoint(e,t))}else 0}),this)}),this),!!n;bv(this.id)},e.prototype.getVisual=function(t,e){var n=Pr(this._model,t,{defaultMainType:"series"}),i=n.seriesModel;var r=i.getData(),o=n.hasOwnProperty("dataIndexInside")?n.dataIndexInside:n.hasOwnProperty("dataIndex")?r.indexOfRawIndex(n.dataIndex):null;return null!=o?pg(r,o,e):dg(r,e)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t,e,n,i=this;Ey(xv,(function(t){var e=function(e){var n,r=i.getModel(),o=e.target,a="globalout"===t;if(a?n={}:o&&Jg(o,(function(t){var e=ys(t);if(e&&null!=e.dataIndex){var i=e.dataModel||r.getSeriesByIndex(e.seriesIndex);return n=i&&i.getDataParams(e.dataIndex,e.dataType)||{},!0}if(e.eventData)return n=I({},e.eventData),!0}),!0),n){var s=n.componentType,l=n.componentIndex;"markLine"!==s&&"markPoint"!==s&&"markArea"!==s||(s="series",l=n.seriesIndex);var u=s&&null!=l&&r.getComponent(s,l),h=u&&i["series"===u.mainType?"_chartsMap":"_componentsMap"][u.__viewId];0,n.event=e,n.type=t,i._$eventProcessor.eventInfo={targetEl:o,packedEvent:n,model:u,view:h},i.trigger(t,n)}};e.zrEventfulCallAtLast=!0,i._zr.on(t,e,i)})),Ey(Sv,(function(t,e){i._messageCenter.on(e,(function(t){this.trigger(e,t)}),i)})),Ey(["selectchanged"],(function(t){i._messageCenter.on(t,(function(e){this.trigger(t,e)}),i)})),t=this._messageCenter,e=this,n=this._api,t.on("selectchanged",(function(t){var i=n.getModel();t.isFromClick?($g("map","selectchanged",e,i,t),$g("pie","selectchanged",e,i,t)):"select"===t.fromAction?($g("map","selected",e,i,t),$g("pie","selected",e,i,t)):"unselect"===t.fromAction&&($g("map","unselected",e,i,t),$g("pie","unselected",e,i,t))}))},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){this._disposed?bv(this.id):this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed)bv(this.id);else{this._disposed=!0,Er(this.getDom(),Nv,"");var t=this._api,e=this._model;Ey(this._componentsViews,(function(n){n.dispose(e,t)})),Ey(this._chartsViews,(function(n){n.dispose(e,t)})),this._zr.dispose(),delete kv[this.id]}},e.prototype.resize=function(t){if(this._disposed)bv(this.id);else{this._zr.resize(t);var e=this._model;if(this._loadingFX&&this._loadingFX.resize(),e){var n=e.resetOption("media"),i=t&&t.silent;this.__flagInMainProcess=!0,n&&qy(this),Jy.update.call(this,{type:"resize",animation:{duration:0}}),this.__flagInMainProcess=!1,nv.call(this,i),iv.call(this,i)}}},e.prototype.showLoading=function(t,e){if(this._disposed)bv(this.id);else if(By(t)&&(e=t,t=""),t=t||"default",this.hideLoading(),Lv[t]){var n=Lv[t](this._api,e),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){this._disposed?bv(this.id):(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},e.prototype.makeActionFromEvent=function(t){var e=I({},t);return e.type=Sv[t.type],e},e.prototype.dispatchAction=function(t,e){if(this._disposed)bv(this.id);else if(By(e)||(e={silent:!!e}),wv[t.type]&&this._model)if(this.__flagInMainProcess)this._pendingActions.push(t);else{var n=e.silent;ev.call(this,t,n);var i=e.flush;i?this._zr.flush():!1!==i&&a.browser.weChat&&this._throttledZrFlush(),nv.call(this,n),iv.call(this,n)}},e.prototype.updateLabelLayout=function(){var t=this._labelManager;t.updateLayoutConfig(this._api),t.layout(this._api),t.processLabelsOverall()},e.prototype.appendData=function(t){if(this._disposed)bv(this.id);else{var e=t.seriesIndex,n=this.getModel().getSeriesByIndex(e);0,n.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()}},e.internalField=function(){function t(t){for(var e=[],n=t.currentStates,i=0;i0?{duration:o,delay:i.get("delay"),easing:i.get("easing")}:null;n.group.traverse((function(e){if(e.states&&e.states.emphasis){if(Bu(e))return;if(e instanceof Za&&function(t){var e=_s(t);e.normalFill=t.style.fill,e.normalStroke=t.style.stroke;var n=t.states.select||{};e.selectFill=n.style&&n.style.fill||null,e.selectStroke=n.style&&n.style.stroke||null}(e),e.__dirty){var n=e.prevStates;n&&e.useStates(n)}if(r){e.stateTransition=a;var i=e.getTextContent(),o=e.getTextGuideLine();i&&(i.stateTransition=a),o&&(o.stateTransition=a)}e.__dirty&&t(e)}}))}qy=function(t){var e=t._scheduler;e.restorePipelines(t._model),e.prepareStageTasks(),Ky(t,!0),Ky(t,!1),e.plan()},Ky=function(t,e){for(var n=t._model,i=t._scheduler,r=e?t._componentsViews:t._chartsViews,o=e?t._componentsMap:t._chartsMap,a=t._zr,s=t._api,l=0;le.get("hoverLayerThreshold")&&!a.node&&!a.worker&&e.eachSeries((function(e){if(!e.preventUsingHoverLayer){var n=t._chartsMap[e.__viewId];n.__alive&&n.group.traverse((function(t){t.states.emphasis&&(t.states.emphasis.hoverLayer=!0)}))}}))}(t,n)},hv=function(t,e){Ey(Cv,(function(n){n(t,e)}))},fv=function(t){t.__needsUpdateStatus=!0,t.getZr().wakeUp()},gv=function(e){e.__needsUpdateStatus&&(e.getZr().storage.traverse((function(e){Bu(e)||t(e)})),e.__needsUpdateStatus=!1)},cv=function(t){return new(function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return n(i,e),i.prototype.getCoordinateSystems=function(){return t._coordSysMgr.getCoordinateSystems()},i.prototype.getComponentByElement=function(e){for(;e;){var n=e.__ecComponentInfo;if(null!=n)return t._model.getComponent(n.mainType,n.index);e=e.parent}},i.prototype.enterEmphasis=function(e,n){Hs(e,n),fv(t)},i.prototype.leaveEmphasis=function(e,n){Ws(e,n),fv(t)},i.prototype.enterBlur=function(e){Ys(e),fv(t)},i.prototype.leaveBlur=function(e){Xs(e),fv(t)},i.prototype.enterSelect=function(e){Us(e),fv(t)},i.prototype.leaveSelect=function(e){Zs(e),fv(t)},i.prototype.getModel=function(){return t.getModel()},i.prototype.getViewOfComponentModel=function(e){return t.getViewOfComponentModel(e)},i.prototype.getViewOfSeriesModel=function(e){return t.getViewOfSeriesModel(e)},i}(vp))(t)},pv=function(t){function e(t,e){for(var n=0;n=0)){jv.push(n);var o=zf.wrapStageHandler(n,r);o.__prio=e,o.__raw=n,t.push(o)}}function Kv(t,e){Lv[t]=e}function $v(t,e,n){sg(t,e,n)}var Jv=function(t){var e=(t=w(t)).type,n="";e||yr(n);var i=e.split(":");2!==i.length&&yr(n);var r=!1;"echarts"===i[0]&&(e=i[1],r=!0),t.__isBuiltIn=r,Rd.set(e,t)};Zv(Gy,Pf),Zv(Hy,Rf),Zv(Hy,Nf),Zv(Gy,cg),Zv(Hy,{createOnAllSeries:!0,performRawSeries:!0,reset:function(t,e){if(t.hasSymbolVisual&&!e.isSeriesFiltered(t))return{dataEach:t.getData().hasItemOption?function(t,e){var n=t.getItemModel(e),i=n.getShallow("symbol",!0),r=n.getShallow("symbolSize",!0),o=n.getShallow("symbolRotate",!0),a=n.getShallow("symbolKeepAspect",!0);null!=i&&t.setItemVisual(e,"symbol",i),null!=r&&t.setItemVisual(e,"symbolSize",r),null!=o&&t.setItemVisual(e,"symbolRotate",o),null!=a&&t.setItemVisual(e,"symbolKeepAspect",a)}:null}}}),Zv(7e3,(function(t,e){t.eachRawSeries((function(n){if(!t.isSeriesFiltered(n)){var i=n.getData();i.hasItemVisual()&&i.each((function(t){var n=i.getItemVisual(t,"decal");n&&(i.ensureUniqueItemVisual(t,"style").decal=ky(n,e))}));var r=i.getVisual("decal");if(r)i.getVisual("style").decal=ky(r,e)}}))})),Fv(Hp),Gv(900,(function(t){var e=ht();t.eachSeries((function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),r=t.getData(),o={stackResultDimension:r.getCalculationInfo("stackResultDimension"),stackedOverDimension:r.getCalculationInfo("stackedOverDimension"),stackedDimension:r.getCalculationInfo("stackedDimension"),stackedByDimension:r.getCalculationInfo("stackedByDimension"),isStackedByIndex:r.getCalculationInfo("isStackedByIndex"),data:r,seriesModel:t};if(!o.stackedDimension||!o.isStackedByIndex&&!o.stackedByDimension)return;i.length&&r.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}})),e.each(Wp)})),Kv("default",(function(t,e){T(e=e||{},{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n=new zi,i=new os({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});n.add(i);var r,o=new ls({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily}}),a=new os({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});return n.add(a),e.showSpinner&&((r=new au({shape:{startAngle:-Ef/2,endAngle:-Ef/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*Ef/2}).start("circularInOut"),r.animateShape(!0).when(1e3,{startAngle:3*Ef/2}).delay(300).start("circularInOut"),n.add(r)),n.resize=function(){var n=o.getBoundingRect().width,s=e.showSpinner?e.spinnerRadius:0,l=(t.getWidth()-2*s-(e.showSpinner&&n?10:0)-n)/2-(e.showSpinner&&n?0:5+n/2)+(e.showSpinner?0:n/2)+(n?0:s),u=t.getHeight()/2;e.showSpinner&&r.setShape({cx:l,cy:u}),a.setShape({x:l-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:t.getWidth(),height:t.getHeight()})},n.resize(),n})),Yv({type:ws,event:ws,update:ws},ft),Yv({type:Ss,event:Ss,update:Ss},ft),Yv({type:Ms,event:Ms,update:Ms},ft),Yv({type:Is,event:Is,update:Is},ft),Yv({type:Ts,event:Ts,update:Ts},ft),Vv("light",Qf),Vv("dark",rg);var Qv=[],tm={registerPreprocessor:Fv,registerProcessor:Gv,registerPostInit:Hv,registerPostUpdate:Wv,registerAction:Yv,registerCoordinateSystem:Xv,registerLayout:Uv,registerVisual:Zv,registerTransform:Jv,registerLoading:Kv,registerMap:$v,PRIORITY:Wy,ComponentModel:Nc,ComponentView:pf,SeriesModel:rf,ChartView:yf,registerComponentModel:function(t){Nc.registerClass(t)},registerComponentView:function(t){pf.registerClass(t)},registerSeriesModel:function(t){rf.registerClass(t)},registerChartView:function(t){yf.registerClass(t)},registerSubTypeDefaulter:function(t,e){Nc.registerSubTypeDefaulter(t,e)},registerPainter:function(t,e){Wi(t,e)}};function em(t){F(t)?P(t,(function(t){em(t)})):A(Qv,t)>=0||(Qv.push(t),G(t)&&(t={install:t}),t.install(tm))}function nm(t){return null==t?0:t.length||1}function im(t){return t}var rm=function(){function t(t,e,n,i,r,o){this._old=t,this._new=e,this._oldKeyGetter=n||im,this._newKeyGetter=i||im,this.context=r,this._diffModeMultiple="multiple"===o}return t.prototype.add=function(t){return this._add=t,this},t.prototype.update=function(t){return this._update=t,this},t.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},t.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},t.prototype.remove=function(t){return this._remove=t,this},t.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},t.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),r=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,r,"_newKeyGetter");for(var o=0;o1){var u=s.shift();1===s.length&&(n[a]=s[0]),this._update&&this._update(u,o)}else 1===l?(n[a]=null,this._update&&this._update(s,o)):this._remove&&this._remove(o)}this._performRestAdd(r,n)},t.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},r=[],o=[];this._initIndexMap(t,n,r,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var a=0;a1&&1===c)this._updateManyToOne&&this._updateManyToOne(u,l),i[s]=null;else if(1===h&&c>1)this._updateOneToMany&&this._updateOneToMany(u,l),i[s]=null;else if(1===h&&1===c)this._update&&this._update(u,l),i[s]=null;else if(h>1)for(var p=0;p1)for(var a=0;av[1]&&(v[1]=y)}e&&(this._nameList[d]=e[f],this._dontMakeIdFromName||gm(this,d))}this._rawCount=this._count=s,this._extent={},lm(this)},t.prototype._initDataFromProvider=function(t,e,n){if(!(t>=e)){for(var i=this._rawData,r=this._storage,o=this.dimensions,a=o.length,s=this._dimensionInfos,l=this._nameList,u=this._idList,h=this._rawExtent,c=i.getSource().sourceFormat===Fc,p=0;pb[1]&&(b[1]=x)}if(c&&!i.pure&&y){var w=y.name;null==l[v]&&null!=w&&(l[v]=Tr(w,null));var S=y.id;null==u[v]&&null!=S&&(u[v]=Tr(S,null))}this._dontMakeIdFromName||gm(this,v)}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent={},lm(this)}},t.prototype.count=function(){return this._count},t.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var r=0;r=0&&e=0&&e=0&&ea&&(a=l)}return i=[o,a],this._extent[t]=i,i},t.prototype.getApproximateExtent=function(t){return t=this.getDimension(t),this._approximateExtent[t]||this.getDataExtent(t)},t.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},t.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},t.prototype.setCalculationInfo=function(t,e){Sm(t)?I(this._calculationInfo,t):this._calculationInfo[t]=e},t.prototype.getSum=function(t){var e=0;if(this._storage[t])for(var n=0,i=this.count();n=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(null!=n&&nt))return o;r=o-1}}return-1},t.prototype.indicesOfNearest=function(t,e,n){var i=this._storage[t],r=[];if(!i)return r;null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,l=0,u=this.count();l=0&&a<0)&&(o=c,a=h,s=0),h===a&&(r[s++]=l))}return r.length=s,r},t.prototype.getRawDataItem=function(t){if(this._rawData.persistent)return this._rawData.getItem(this.getRawIndex(t));for(var e=[],n=0;n=c&&b<=p||isNaN(b))&&(s[l++]=g),g++}f=!0}else if(2===o){y=d[h[0]];var m=d[h[1]],_=t[i[1]][0],x=t[i[1]][1];for(v=0;v=c&&b<=p||isNaN(b))&&(w>=_&&w<=x||isNaN(w))&&(s[l++]=g),g++}f=!0}}if(!f)if(1===o)for(v=0;v=c&&b<=p||isNaN(b))&&(s[l++]=S)}else for(v=0;vt[T][1])&&(M=!1)}M&&(s[l++]=this.getRawIndex(v))}return lx[1]&&(x[1]=_)}}}return a},t.prototype.downSample=function(t,e,n,i){for(var r=vm(this,[t]),o=r._storage,a=[],s=wm(1/e),l=o[t],u=this.count(),h=r._rawExtent[t],c=new(um(this))(u),p=0,d=0;du-d&&(s=u-d,a.length=s);for(var f=0;fh[1]&&(h[1]=y),c[p++]=v}return r._count=p,r._indices=c,r.getRawIndex=pm,r},t.prototype.lttbDownSample=function(t,e){var n,i,r,o=vm(this,[]),a=o._storage[t],s=this.count(),l=new(um(this))(s),u=0,h=wm(1/e),c=this.getRawIndex(0);l[u++]=c;for(var p=1;pn&&(n=i,r=S)}l[u++]=r,c=r}return l[u++]=this.getRawIndex(s-1),o._count=u,o._indices=l,o.getRawIndex=pm,o},t.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new Sh(n,e,e&&e.ecModel)},t.prototype.diff=function(t){var e=this;return new rm(t?t.getIndices():[],this.getIndices(),(function(e){return dm(t,e)}),(function(t){return dm(e,t)}))},t.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},t.prototype.setVisual=function(t,e){this._visual=this._visual||{},Sm(t)?I(this._visual,t):this._visual[t]=e},t.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return null==i?this.getVisual(e):i},t.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},t.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var r=i[e];return null==r&&(F(r=this.getVisual(e))?r=r.slice():Sm(r)&&(r=I({},r)),i[e]=r),r},t.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Sm(e)?I(i,e):i[e]=n},t.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},t.prototype.setLayout=function(t,e){if(Sm(t))for(var n in t)t.hasOwnProperty(n)&&this.setLayout(n,t[n]);else this._layout[t]=e},t.prototype.getLayout=function(t){return this._layout[t]},t.prototype.getItemLayout=function(t){return this._itemLayouts[t]},t.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?I(this._itemLayouts[t]||{},e):e},t.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},t.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel;if(e){var i=ys(e);i.dataIndex=t,i.dataType=this.dataType,i.seriesIndex=n&&n.seriesIndex,"group"===e.type&&e.traverse(_m,e)}this._graphicEls[t]=e},t.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},t.prototype.eachItemGraphicEl=function(t,e){P(this._graphicEls,(function(n,i){n&&t&&t.call(e,n,i)}))},t.prototype.cloneShallow=function(e){e||(e=new t(Mm(this.dimensions,this.getDimensionInfo,this),this.hostModel));if(e._storage=this._storage,e._storageArr=this._storageArr,xm(e,this),this._indices){var n=this._indices.constructor;if(n===Array){var i=this._indices.length;e._indices=new n(i);for(var r=0;r65535?Cm:Dm},hm=function(t,e,n,i){var r=Tm[e.type],o=e.name;if(i){var a=t[o],s=a&&a.length;if(s!==n){for(var l=new r(n),u=0;u=0?this._indices[t]:-1},dm=function(t,e){var n=t._idList[e];return null==n&&null!=t._idDimIdx&&(n=fm(t,t._idDimIdx,t._idOrdinalMeta,e)),null==n&&(n="e\0\0"+e),n},ym=function(t){return F(t)||(t=null!=t?[t]:[]),t},function(t,e){for(var n=0;n=0?(s[c]=(o=l[c],a=void 0,(a=o.constructor)===Array?o.slice():new a(o)),r._rawExtent[c]=mm(),r._extent[c]=null):s[c]=l[c],u.push(s[c]))}return r},mm=function(){return[1/0,-1/0]},_m=function(t){var e=ys(t),n=ys(this);e.seriesIndex=n.seriesIndex,e.dataIndex=n.dataIndex,e.dataType=n.dataType},xm=function(t,e){P(Lm.concat(e.__wrappedMethods||[]),(function(n){e.hasOwnProperty(n)&&(t[n]=e[n])})),t.__wrappedMethods=e.__wrappedMethods,P(km,(function(n){t[n]=w(e[n])})),t._calculationInfo=I({},e._calculationInfo)},gm=function(t,e){var n=t._nameList,i=t._idList,r=t._nameDimIdx,o=t._idDimIdx,a=n[e],s=i[e];if(null==a&&null!=r&&(n[e]=a=fm(t,r,t._nameOrdinalMeta,e)),null==s&&null!=o&&(i[e]=s=fm(t,o,t._idOrdinalMeta,e)),null==s&&null!=a){var l=t._nameRepeatCount,u=l[a]=(l[a]||0)+1;s=a,u>1&&(s+="__ec__"+u),i[e]=s}}}(),t}();function Om(t,e,n){Kp(e)||(e=Jp(e)),n=n||{},t=(t||[]).slice();for(var i=(n.dimsDef||[]).slice(),r=ht(),o=ht(),a=[],s=function(t,e,n,i){var r=Math.max(t.dimensionsDetectedCount||1,e.length,n.length,i||0);return P(e,(function(t){var e;X(t)&&(e=t.dimsDef)&&(r=Math.max(r,e.length))})),r}(e,t,i,n.dimCount),l=0;le[1]&&(e[1]=t[1])},t.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},t.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},t.prototype.isBlank=function(){return this._isBlank},t.prototype.setBlank=function(t){this._isBlank=t},t}();jr(Wm);var Ym=function(){function t(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication}return t.createByAxisModel=function(e){var n=e.option,i=n.data,r=i&&O(i,Xm);return new t({categories:r,needCollect:!r,deduplication:!1!==n.dedplication})},t.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},t.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if("string"!=typeof t&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return null==(e=i.get(t))&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},t.prototype._getOrCreateMap=function(){return this._map||(this._map=ht(this.categories))},t}();function Xm(t){return X(t)&&null!=t.value?t.value:t+""}var Um=ji;function Zm(t,e,n,i){var r={},o=t[1]-t[0],a=r.interval=sr(o/e,!0);null!=n&&ai&&(a=r.interval=i);var s=r.intervalPrecision=jm(a);return function(t,e){!isFinite(t[0])&&(t[0]=e[0]),!isFinite(t[1])&&(t[1]=e[1]),qm(t,0,e),qm(t,1,e),t[0]>t[1]&&(t[0]=t[1])}(r.niceTickExtent=[Um(Math.ceil(t[0]/a)*a,s),Um(Math.floor(t[1]/a)*a,s)],t),r}function jm(t){return $i(t)+2}function qm(t,e,n){t[e]=Math.max(Math.min(t[e],n[1]),n[0])}function Km(t,e){return t>=e[0]&&t<=e[1]}function $m(t,e){return e[1]===e[0]?.5:(t-e[0])/(e[1]-e[0])}function Jm(t,e){return t*(e[1]-e[0])+e[0]}var Qm=function(t){function e(e){var n=t.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new Ym({})),F(i)&&(i=new Ym({categories:O(i,(function(t){return X(t)?t.value:t}))})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return n(e,t),e.prototype.parse=function(t){return"string"==typeof t?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return Km(t=this.parse(t),this._extent)&&null!=this._ordinalMeta.categories[t]},e.prototype.normalize=function(t){return $m(t=this._getTickNumber(this.parse(t)),this._extent)},e.prototype.scale=function(t){return t=Math.round(Jm(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],e=this._extent,n=e[0];n<=e[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(null!=t){for(var e=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],r=0,o=this._ordinalMeta.categories.length,a=Math.min(o,e.length);r=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.niceTicks=function(){},e.prototype.niceExtent=function(){},e.type="ordinal",e}(Wm);Wm.registerClass(Qm);var t_=ji,e_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return n(e,t),e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Km(t,this._extent)},e.prototype.normalize=function(t){return $m(t,this._extent)},e.prototype.scale=function(t){return Jm(t,this._extent)},e.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(e)||(n[1]=parseFloat(e))},e.prototype.unionExtent=function(t){var e=this._extent;t[0]e[1]&&(e[1]=t[1]),this.setExtent(e[0],e[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=jm(t)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=this._niceExtent,r=this._intervalPrecision,o=[];if(!e)return o;n[0]1e4)return[];var s=o.length?o[o.length-1].value:i[1];return n[1]>s&&(t?o.push({value:t_(s+e,r)}):o.push({value:n[1]})),o},e.prototype.getMinorTicks=function(t){for(var e=this.getTicks(!0),n=[],i=this.getExtent(),r=1;ri[0]&&h0&&(o=null===o?s:Math.min(o,s))}n[i]=o}}return n}(t),n=[];return P(t,(function(t){var i,r=t.coordinateSystem.getBaseAxis(),o=r.getExtent();if("category"===r.type)i=r.getBandWidth();else if("value"===r.type||"time"===r.type){var a=r.dim+"_"+r.index,s=e[a],l=Math.abs(o[1]-o[0]),u=r.scale.getExtent(),h=Math.abs(u[1]-u[0]);i=s?l/h*s:l}else{var c=t.getData();i=Math.abs(o[1]-o[0])/c.count()}var p=Zi(t.get("barWidth"),i),d=Zi(t.get("barMaxWidth"),i),f=Zi(t.get("barMinWidth")||1,i),g=t.get("barGap"),y=t.get("barCategoryGap");n.push({bandWidth:i,barWidth:p,barMaxWidth:d,barMinWidth:f,barGap:g,barCategoryGap:y,axisKey:o_(r),stackId:r_(t)})})),l_(n)}function l_(t){var e={};P(t,(function(t,n){var i=t.axisKey,r=t.bandWidth,o=e[i]||{bandWidth:r,remainedWidth:r,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},a=o.stacks;e[i]=o;var s=t.stackId;a[s]||o.autoWidthCount++,a[s]=a[s]||{width:0,maxWidth:0};var l=t.barWidth;l&&!a[s].width&&(a[s].width=l,l=Math.min(o.remainedWidth,l),o.remainedWidth-=l);var u=t.barMaxWidth;u&&(a[s].maxWidth=u);var h=t.barMinWidth;h&&(a[s].minWidth=h);var c=t.barGap;null!=c&&(o.gap=c);var p=t.barCategoryGap;null!=p&&(o.categoryGap=p)}));var n={};return P(e,(function(t,e){n[e]={};var i=t.stacks,r=t.bandWidth,o=t.categoryGap;if(null==o){var a=z(i).length;o=Math.max(35-4*a,15)+"%"}var s=Zi(o,r),l=Zi(t.gap,1),u=t.remainedWidth,h=t.autoWidthCount,c=(u-s)/(h+(h-1)*l);c=Math.max(c,0),P(i,(function(t){var e=t.maxWidth,n=t.minWidth;if(t.width){i=t.width;e&&(i=Math.min(i,e)),n&&(i=Math.max(i,n)),t.width=i,u-=i+l*i,h--}else{var i=c;e&&ei&&(i=n),i!==c&&(t.width=i,u-=i+l*i,h--)}})),c=(u-s)/(h+(h-1)*l),c=Math.max(c,0);var p,d=0;P(i,(function(t,e){t.width||(t.width=c),p=t,d+=t.width*(1+l)})),p&&(d-=p.width*l);var f=-d/2;P(i,(function(t,i){n[e][i]=n[e][i]||{bandWidth:r,offset:f,width:t.width},f+=t.width*(1+l)}))})),n}function u_(t,e,n){if(t&&e){var i=t[o_(e)];return null!=i&&null!=n?i[r_(n)]:i}}function h_(t,e){var n=a_(t,e),i=s_(n),r={};P(n,(function(t){var e=t.getData(),n=t.coordinateSystem,o=n.getBaseAxis(),a=r_(t),s=i[o_(o)][a],l=s.offset,u=s.width,h=n.getOtherAxis(o),c=t.get("barMinHeight")||0;r[a]=r[a]||[],e.setLayout({bandWidth:s.bandWidth,offset:l,size:u});for(var p=e.mapDimension(h.dim),d=e.mapDimension(o.dim),f=Fm(e,p),g=h.isHorizontal(),y=f_(o,h),v=0,m=e.count();v=0?"p":"n",w=y;f&&(r[a][x]||(r[a][x]={p:y,n:y}),w=r[a][x][b]);var S,M=void 0,I=void 0,T=void 0,C=void 0;if(g)M=w,I=(S=n.dataToPoint([_,x]))[1]+l,T=S[0]-y,C=u,Math.abs(T).5||(h=.5),{progress:function(t,e){for(var c,p=t.count,d=new i_(2*p),f=new i_(2*p),g=new i_(p),y=[],v=[],m=0,_=0;null!=(c=t.next());)v[u]=e.get(a,c),v[1-u]=e.get(s,c),y=n.dataToPoint(v,null,y),f[m]=l?i.x+i.width:y[0],d[m++]=y[0],f[m]=l?y[1]:i.y+i.height,d[m++]=y[1],g[_++]=c;e.setLayout({largePoints:d,largeDataIndices:g,largeBackgroundPoints:f,barWidth:h,valueAxisStart:f_(r,o),backgroundStart:l?i.x:i.y,valueAxisHorizontal:l})}}}}};function p_(t){return t.coordinateSystem&&"cartesian2d"===t.coordinateSystem.type}function d_(t){return t.pipelineContext&&t.pipelineContext.large}function f_(t,e,n){return e.toGlobalCoord(e.dataToCoord("log"===e.type?1:0))}var g_=function(t){function e(e){var n=t.call(this,e)||this;return n.type="time",n}return n(e,t),e.prototype.getLabel=function(t){var e=this.getSetting("useUTC");return Zh(t.value,Gh[function(t){switch(t){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(Xh(this._minLevelUnit))]||Gh.second,e,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,e,n){var i=this.getSetting("useUTC");return function(t,e,n,i,r){var o=null;if("string"==typeof n)o=n;else if("function"==typeof n)o=n(t.value,e,{level:t.level});else{var a=I({},Vh);if(t.level>0)for(var s=0;s=0;--s)if(l[u]){o=l[u];break}o=o||a.none}if(F(o)){var h=null==t.level?0:t.level>=0?t.level:o.length+t.level;o=o[h=Math.min(h,o.length-1)]}}return Zh(new Date(t.value),o,r,i)}(t,e,n,this.getSetting("locale"),i)},e.prototype.getTicks=function(t){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});var r=this.getSetting("useUTC"),o=function(t,e,n,i){var r=1e4,o=Wh,a=0;function s(t,e,n,r,o,a,s){for(var l=new Date(e),u=e,h=l[r]();u1&&0===u&&o.unshift({value:o[0].value-p})}}for(u=0;u=i[0]&&v<=i[1]&&c++)}var m=(i[1]-i[0])/e;if(c>1.5*m&&p>m/1.5)break;if(u.push(g),c>m||t===o[d])break}h=[]}}0;var _=N(O(u,(function(t){return N(t,(function(t){return t.value>=i[0]&&t.value<=i[1]&&!t.notAdd}))})),(function(t){return t.length>0})),x=[],b=_.length-1;for(d=0;d<_.length;++d)for(var w=_[d],S=0;Sn&&(this._approxInterval=n);var o=y_.length,a=Math.min(function(t,e,n,i){for(;n>>1;t[r][1]16?16:t>7.5?7:t>3.5?4:t>1.5?2:1}function m_(t){return(t/=2592e6)>6?6:t>3?3:t>2?2:1}function __(t){return(t/=Eh)>12?12:t>6?6:t>3.5?4:t>2?2:1}function x_(t,e){return(t/=e?Nh:Rh)>30?30:t>20?20:t>15?15:t>10?10:t>5?5:t>2?2:1}function b_(t){return sr(t,!0)}function w_(t,e,n){var i=new Date(t);switch(Xh(e)){case"year":case"month":i[rc(n)](0);case"day":i[oc(n)](1);case"hour":i[ac(n)](0);case"minute":i[sc(n)](0);case"second":i[lc(n)](0),i[uc(n)](0)}return i.getTime()}Wm.registerClass(g_);var S_=Wm.prototype,M_=e_.prototype,I_=$i,T_=ji,C_=Math.floor,A_=Math.ceil,D_=Math.pow,L_=Math.log,k_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new e_,e._interval=0,e}return n(e,t),e.prototype.getTicks=function(t){var e=this._originalScale,n=this._extent,i=e.getExtent();return O(M_.getTicks.call(this,t),(function(t){var e=t.value,r=ji(D_(this.base,e));return r=e===n[0]&&this._fixMin?O_(r,i[0]):r,{value:r=e===n[1]&&this._fixMax?O_(r,i[1]):r}}),this)},e.prototype.setExtent=function(t,e){var n=this.base;t=L_(t)/L_(n),e=L_(e)/L_(n),M_.setExtent.call(this,t,e)},e.prototype.getExtent=function(){var t=this.base,e=S_.getExtent.call(this);e[0]=D_(t,e[0]),e[1]=D_(t,e[1]);var n=this._originalScale.getExtent();return this._fixMin&&(e[0]=O_(e[0],n[0])),this._fixMax&&(e[1]=O_(e[1],n[1])),e},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var e=this.base;t[0]=L_(t[0])/L_(e),t[1]=L_(t[1])/L_(e),S_.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},e.prototype.niceTicks=function(t){t=t||10;var e=this._extent,n=e[1]-e[0];if(!(n===1/0||n<=0)){var i=or(n);for(t/n*i<=.5&&(i*=10);!isNaN(i)&&Math.abs(i)<1&&Math.abs(i)>0;)i*=10;var r=[ji(A_(e[0]/i)*i),ji(C_(e[1]/i)*i)];this._interval=i,this._niceExtent=r}},e.prototype.niceExtent=function(t){M_.niceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Km(t=L_(t)/L_(this.base),this._extent)},e.prototype.normalize=function(t){return $m(t=L_(t)/L_(this.base),this._extent)},e.prototype.scale=function(t){return t=Jm(t,this._extent),D_(this.base,t)},e.type="log",e}(Wm),P_=k_.prototype;function O_(t,e){return T_(t,I_(e))}P_.getMinorTicks=M_.getMinorTicks,P_.getLabel=M_.getLabel,Wm.registerClass(k_);var R_=function(){function t(t,e,n){this._prepareParams(t,e,n)}return t.prototype._prepareParams=function(t,e,n){n[1]s&&(a=NaN,s=NaN);var h=J(a)||J(s)||t&&!i;this._needCrossZero&&(a>0&&s>0&&!l&&(a=0),a<0&&s<0&&!u&&(s=0));var c=this._determinedMin,p=this._determinedMax;return null!=c&&(a=c,l=!0),null!=p&&(s=p,u=!0),{min:a,max:s,minFixed:l,maxFixed:u,isBlank:h}},t.prototype.modifyDataMinMax=function(t,e){this[E_[t]]=e},t.prototype.setDeterminedMinMax=function(t,e){var n=N_[t];this[n]=e},t.prototype.freeze=function(){this.frozen=!0},t}(),N_={min:"_determinedMin",max:"_determinedMax"},E_={min:"_dataMin",max:"_dataMax"};function z_(t,e,n){var i=t.rawExtentInfo;return i||(i=new R_(t,e,n),t.rawExtentInfo=i,i)}function B_(t,e){return null==e?null:J(e)?NaN:t.parse(e)}function V_(t,e){var n=t.type,i=z_(t,e,t.getExtent()).calculate();t.setBlank(i.isBlank);var r=i.min,o=i.max,a=e.ecModel;if(a&&"time"===n){var s=a_("bar",a),l=!1;if(P(s,(function(t){l=l||t.getBaseAxis()===e.axis})),l){var u=s_(s),h=function(t,e,n,i){var r=n.axis.getExtent(),o=r[1]-r[0],a=u_(i,n.axis);if(void 0===a)return{min:t,max:e};var s=1/0;P(a,(function(t){s=Math.min(t.offset,s)}));var l=-1/0;P(a,(function(t){l=Math.max(t.offset+t.width,l)})),s=Math.abs(s),l=Math.abs(l);var u=s+l,h=e-t,c=h/(1-(s+l)/o)-h;return{min:t-=c*(s/u),max:e+=c*(l/u)}}(r,o,e,u);r=h.min,o=h.max}}return{extent:[r,o],fixMin:i.minFixed,fixMax:i.maxFixed}}function F_(t,e){var n=V_(t,e),i=n.extent,r=e.get("splitNumber");t instanceof k_&&(t.base=e.get("logBase"));var o=t.type;t.setExtent(i[0],i[1]),t.niceExtent({splitNumber:r,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:"interval"===o||"time"===o?e.get("minInterval"):null,maxInterval:"interval"===o||"time"===o?e.get("maxInterval"):null});var a=e.get("interval");null!=a&&t.setInterval&&t.setInterval(a)}function G_(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Qm({ordinalMeta:t.getOrdinalMeta?t.getOrdinalMeta():t.getCategories(),extent:[1/0,-1/0]});case"time":return new g_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new(Wm.getClass(e)||e_)}}function H_(t){var e,n,i=t.getLabelModel().get("formatter"),r="category"===t.type?t.scale.getExtent()[0]:null;return"time"===t.scale.type?(n=i,function(e,i){return t.scale.getFormattedLabel(e,i,n)}):"string"==typeof i?function(e){return function(n){var i=t.scale.getLabel(n);return e.replace("{value}",null!=i?i:"")}}(i):"function"==typeof i?(e=i,function(n,i){return null!=r&&(i=n.value-r),e(W_(t,n),i,null!=n.level?{level:n.level}:null)}):function(e){return t.scale.getLabel(e)}}function W_(t,e){return"category"===t.type?t.scale.getLabel(e):e.value}function Y_(t,e){var n=e*Math.PI/180,i=t.width,r=t.height,o=i*Math.abs(Math.cos(n))+Math.abs(r*Math.sin(n)),a=i*Math.abs(Math.sin(n))+Math.abs(r*Math.cos(n));return new Rn(t.x,t.y,o,a)}function X_(t){var e=t.get("interval");return null==e?"auto":e}function U_(t){return"category"===t.type&&0===X_(t.getLabelModel())}function Z_(t,e){var n={};return P(t.mapDimensionsAll(e),(function(e){n[Gm(t,e)]=!0})),z(n)}var j_=function(){function t(){}return t.prototype.getNeedCrossZero=function(){return!this.option.scale},t.prototype.getCoordSysModel=function(){},t}();var q_={isDimensionStacked:Fm,enableDataStack:Vm,getStackedDimension:Gm};var K_=Object.freeze({__proto__:null,createList:function(t){return Hm(t.getSource(),t)},getLayoutRect:Ac,dataStack:q_,createScale:function(t,e){var n=e;e instanceof Sh||(n=new Sh(e));var i=G_(n);return i.setExtent(t[0],t[1]),F_(i,n),i},mixinAxisModelCommonMethods:function(t){L(t,j_)},getECData:ys,createTextStyle:function(t,e){return nh(t,null,null,"normal"!==(e=e||{}).state)},createDimensions:Nm,createSymbol:uy,enableHoverEmphasis:Js});function $_(t,e){return Math.abs(t-e)<1e-8}function J_(t,e,n){var i=0,r=t[0];if(!r)return!1;for(var o=1;o>1^-(1&s),l=l>>1^-(1&l),r=s+=r,o=l+=o,i.push([s/n,l/n])}return i}function ex(t,e){return O(N((t=function(t){if(!t.UTF8Encoding)return t;var e=t,n=e.UTF8Scale;null==n&&(n=1024);for(var i=e.features,r=0;r0})),(function(t){var n=t.properties,i=t.geometry,r=[];if("Polygon"===i.type){var o=i.coordinates;r.push({type:"polygon",exterior:o[0],interiors:o.slice(1)})}"MultiPolygon"===i.type&&P(o=i.coordinates,(function(t){t[0]&&r.push({type:"polygon",exterior:t[0],interiors:t.slice(1)})}));var a=new Q_(n[e||"name"],r,n.cp);return a.properties=n,a}))}var nx=Object.freeze({__proto__:null,linearMap:Ui,round:ji,asc:qi,getPrecision:Ki,getPrecisionSafe:$i,getPixelPrecision:Ji,getPercentWithPrecision:Qi,MAX_SAFE_INTEGER:tr,remRadian:er,isRadianAroundZero:nr,parseDate:rr,quantity:or,quantityExponent:ar,nice:sr,quantile:lr,reformIntervals:ur,isNumeric:cr,numericToNumber:hr}),ix=Object.freeze({__proto__:null,parse:rr,format:Zh}),rx=Object.freeze({__proto__:null,extendShape:bu,extendPath:Su,makePath:Tu,makeImage:Cu,mergePath:Du,resizePath:Lu,createIcon:Uu,updateProps:Ou,initProps:Ru,getTransform:Vu,clipPointsByRect:Yu,clipRectByRect:Xu,registerShape:Mu,getShapeClass:Iu,Group:zi,Image:Ja,Text:ls,Circle:Tl,Ellipse:Al,Sector:Wl,Ring:Xl,Polygon:ql,Polyline:$l,Rect:os,Line:tu,BezierCurve:ru,Arc:au,IncrementalDisplayable:vu,CompoundPath:su,LinearGradient:uu,RadialGradient:hu,BoundingRect:Rn}),ox=Object.freeze({__proto__:null,addCommas:hc,toCamelCase:cc,normalizeCssArray:pc,encodeHTML:gc,formatTpl:_c,getTooltipMarker:xc,formatTime:function(t,e,n){"week"!==t&&"month"!==t&&"quarter"!==t&&"half-year"!==t&&"year"!==t||(t="MM-dd\nyyyy");var i=rr(e),r=n?"UTC":"",o=i["get"+r+"FullYear"](),a=i["get"+r+"Month"]()+1,s=i["get"+r+"Date"](),l=i["get"+r+"Hours"](),u=i["get"+r+"Minutes"](),h=i["get"+r+"Seconds"](),c=i["get"+r+"Milliseconds"]();return t=t.replace("MM",Yh(a,2)).replace("M",a).replace("yyyy",o).replace("yy",o%100+"").replace("dd",Yh(s,2)).replace("d",s).replace("hh",Yh(l,2)).replace("h",l).replace("mm",Yh(u,2)).replace("m",u).replace("ss",Yh(h,2)).replace("s",h).replace("SSS",Yh(c,3))},capitalFirst:function(t){return t?t.charAt(0).toUpperCase()+t.substr(1):t},truncateText:ro,getTextRect:function(t,e,n,i,r,o,a,s){return gr(),new ls({style:{text:t,font:e,align:n,verticalAlign:i,padding:r,rich:o,overflow:a?"truncate":null,lineHeight:s}}).getBoundingRect()}}),ax=Object.freeze({__proto__:null,map:O,each:P,indexOf:A,inherits:D,reduce:R,filter:N,bind:B,curry:V,isArray:F,isString:H,isObject:X,isFunction:G,extend:I,defaults:T,clone:w,merge:S}),sx=Lr();function lx(t){return"category"===t.type?function(t){var e=t.getLabelModel(),n=hx(t,e);return!e.get("show")||t.scale.isBlank()?{labels:[],labelCategoryInterval:n.labelCategoryInterval}:n}(t):function(t){var e=t.scale.getTicks(),n=H_(t);return{labels:O(e,(function(e,i){return{formattedLabel:n(e,i),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))}}(t)}function ux(t,e){return"category"===t.type?function(t,e){var n,i,r=cx(t,"ticks"),o=X_(e),a=px(r,o);if(a)return a;e.get("show")&&!t.scale.isBlank()||(n=[]);if(G(o))n=gx(t,o,!0);else if("auto"===o){var s=hx(t,t.getLabelModel());i=s.labelCategoryInterval,n=O(s.labels,(function(t){return t.tickValue}))}else n=fx(t,i=o,!0);return dx(r,o,{ticks:n,tickCategoryInterval:i})}(t,e):{ticks:O(t.scale.getTicks(),(function(t){return t.value}))}}function hx(t,e){var n,i,r=cx(t,"labels"),o=X_(e),a=px(r,o);return a||(G(o)?n=gx(t,o):(i="auto"===o?function(t){var e=sx(t).autoInterval;return null!=e?e:sx(t).autoInterval=t.calculateCategoryInterval()}(t):o,n=fx(t,i)),dx(r,o,{labels:n,labelCategoryInterval:i}))}function cx(t,e){return sx(t)[e]||(sx(t)[e]=[])}function px(t,e){for(var n=0;n1&&h/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=U_(t),p=a.get("showMinLabel")||c,d=a.get("showMaxLabel")||c;p&&u!==o[0]&&g(o[0]);for(var f=u;f<=o[1];f+=l)g(f);function g(t){var e={value:t};s.push(n?t:{formattedLabel:i(e),rawLabel:r.getLabel(e),tickValue:t})}return d&&f-l!==o[1]&&g(o[1]),s}function gx(t,e,n){var i=t.scale,r=H_(t),o=[];return P(i.getTicks(),(function(t){var a=i.getLabel(t),s=t.value;e(t.value,a)&&o.push(n?s:{formattedLabel:r(t),rawLabel:a,tickValue:s})})),o}var yx=[0,1],vx=function(){function t(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return t.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},t.prototype.containData=function(t){return this.scale.contain(t)},t.prototype.getExtent=function(){return this._extent.slice()},t.prototype.getPixelPrecision=function(t){return Ji(t||this.scale.getExtent(),this._extent)},t.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},t.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&"ordinal"===i.type&&mx(n=n.slice(),i.count()),Ui(t,yx,n,e)},t.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&"ordinal"===i.type&&mx(n=n.slice(),i.count());var r=Ui(t,n,yx,e);return this.scale.scale(r)},t.prototype.pointToData=function(t,e){},t.prototype.getTicksCoords=function(t){var e=(t=t||{}).tickModel||this.getTickModel(),n=O(ux(this,e).ticks,(function(t){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(t):t),tickValue:t}}),this);return function(t,e,n,i){var r=e.length;if(!t.onBand||n||!r)return;var o,a,s=t.getExtent();if(1===r)e[0].coord=s[0],o=e[1]={coord:s[0]};else{var l=e[r-1].tickValue-e[0].tickValue,u=(e[r-1].coord-e[0].coord)/l;P(e,(function(t){t.coord-=u/2})),a=1+t.scale.getExtent()[1]-e[r-1].tickValue,o={coord:e[r-1].coord+u*a},e.push(o)}var h=s[0]>s[1];c(e[0].coord,s[0])&&(i?e[0].coord=s[0]:e.shift());i&&c(s[0],e[0].coord)&&e.unshift({coord:s[0]});c(s[1],o.coord)&&(i?o.coord=s[1]:e.pop());i&&c(o.coord,s[1])&&e.push({coord:s[1]});function c(t,e){return t=ji(t),e=ji(e),h?t>e:t0&&t<100||(t=5),O(this.scale.getMinorTicks(t),(function(t){return O(t,(function(t){return{coord:this.dataToCoord(t),tickValue:t}}),this)}),this)},t.prototype.getViewLabels=function(){return lx(this).labels},t.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},t.prototype.getTickModel=function(){return this.model.getModel("axisTick")},t.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);0===n&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},t.prototype.calculateCategoryInterval=function(){return function(t){var e=function(t){var e=t.getLabelModel();return{axisRotate:t.getRotate?t.getRotate():t.isHorizontal&&!t.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}(t),n=H_(t),i=(e.axisRotate-e.labelRotate)/180*Math.PI,r=t.scale,o=r.getExtent(),a=r.count();if(o[1]-o[0]<1)return 0;var s=1;a>40&&(s=Math.max(1,Math.floor(a/40)));for(var l=o[0],u=t.dataToCoord(l+1)-t.dataToCoord(l),h=Math.abs(u*Math.cos(i)),c=Math.abs(u*Math.sin(i)),p=0,d=0;l<=o[1];l+=s){var f,g,y=Fn(n({value:l}),e.font,"center","top");f=1.3*y.width,g=1.3*y.height,p=Math.max(p,f,7),d=Math.max(d,g,7)}var v=p/h,m=d/c;isNaN(v)&&(v=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(v,m))),x=sx(t.model),b=t.getExtent(),w=x.lastAutoInterval,S=x.lastTickCount;return null!=w&&null!=S&&Math.abs(w-_)<=1&&Math.abs(S-a)<=1&&w>_&&x.axisExtent0===b[0]&&x.axisExtent1===b[1]?_=w:(x.lastTickCount=a,x.lastAutoInterval=_,x.axisExtent0=b[0],x.axisExtent1=b[1]),_}(this)},t}();function mx(t,e){var n=(t[1]-t[0])/e/2;t[0]+=n,t[1]-=n}function _x(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function xx(t,e,n,i,r){for(var o=e.length,a=n.length,s=t.newPos,l=s-i,u=0;s+1=i&&l+1>=r){for(var u=[],h=0;h=i&&c+1>=r)return Sx(l.components);s[a]=l}else s[a]=void 0}var f;o++}for(;o<=a;){var p=c();if(p)return p}}(t,e,n)}var Ix="none",Tx=Math.round,Cx=Math.sin,Ax=Math.cos,Dx=Math.PI,Lx=2*Math.PI,kx=180/Dx,Px=1e-4;function Ox(t){return Tx(1e3*t)/1e3}function Rx(t){return Tx(1e4*t)/1e4}function Nx(t){return t-1e-4}function Ex(t,e){e&&zx(t,"transform","matrix("+Ox(e[0])+","+Ox(e[1])+","+Ox(e[2])+","+Ox(e[3])+","+Rx(e[4])+","+Rx(e[5])+")")}function zx(t,e,n){(!n||"linear"!==n.type&&"radial"!==n.type)&&t.setAttribute(e,n)}function Bx(t,e,n){var i=null==e.opacity?1:e.opacity;if(n instanceof Ja)t.style.opacity=i+"";else{if(function(t){var e=t.fill;return null!=e&&e!==Ix}(e)){var r=e.fill;zx(t,"fill",r="transparent"===r?Ix:r),zx(t,"fill-opacity",(null!=e.fillOpacity?e.fillOpacity*i:i)+"")}else zx(t,"fill",Ix);if(function(t){var e=t.stroke;return null!=e&&e!==Ix}(e)){var o=e.stroke;zx(t,"stroke",o="transparent"===o?Ix:o);var a=e.lineWidth,s=e.strokeNoScale?n.getLineScale():1;zx(t,"stroke-width",(s?a/s:0)+""),zx(t,"paint-order",e.strokeFirst?"stroke":"fill"),zx(t,"stroke-opacity",(null!=e.strokeOpacity?e.strokeOpacity*i:i)+"");var l=e.lineDash&&a>0&&py(e.lineDash,a);if(l){var u=e.lineDashOffset;s&&1!==s&&(l=O(l,(function(t){return t/s})),u&&(u=Tx(u/=s))),zx(t,"stroke-dasharray",l.join(",")),zx(t,"stroke-dashoffset",(u||0)+"")}else zx(t,"stroke-dasharray","");e.lineCap&&zx(t,"stroke-linecap",e.lineCap),e.lineJoin&&zx(t,"stroke-linejoin",e.lineJoin),e.miterLimit&&zx(t,"stroke-miterlimit",e.miterLimit+"")}else zx(t,"stroke",Ix)}}var Vx=function(){function t(){}return t.prototype.reset=function(){this._d=[],this._str=""},t.prototype.moveTo=function(t,e){this._add("M",t,e)},t.prototype.lineTo=function(t,e){this._add("L",t,e)},t.prototype.bezierCurveTo=function(t,e,n,i,r,o){this._add("C",t,e,n,i,r,o)},t.prototype.quadraticCurveTo=function(t,e,n,i){this._add("Q",t,e,n,i)},t.prototype.arc=function(t,e,n,i,r,o){this.ellipse(t,e,n,n,0,i,r,o)},t.prototype.ellipse=function(t,e,n,i,r,o,a,s){var l=0===this._d.length,u=a-o,h=!s,c=Math.abs(u),p=Nx(c-Lx)||(h?u>=Lx:-u>=Lx),d=u>0?u%Lx:u%Lx+Lx,f=!1;f=!!p||!Nx(c)&&d>=Dx==!!h;var g=Rx(t+n*Ax(o)),y=Rx(e+i*Cx(o));p&&(u=h?Lx-1e-4:1e-4-Lx,f=!0,l&&this._d.push("M",g,y));var v=Rx(t+n*Ax(o+u)),m=Rx(e+i*Cx(o+u));if(isNaN(g)||isNaN(y)||isNaN(n)||isNaN(i)||isNaN(r)||isNaN(kx)||isNaN(v)||isNaN(m))return"";this._d.push("A",Rx(n),Rx(i),Tx(r*kx),+f,+h,v,m)},t.prototype.rect=function(t,e,n,i){this._add("M",t,e),this._add("L",t+n,e),this._add("L",t+n,e+i),this._add("L",t,e+i),this._add("L",t,e)},t.prototype.closePath=function(){this._d.length>0&&this._add("Z")},t.prototype._add=function(t,e,n,i,r,o,a,s,l){this._d.push(t);for(var u=1;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.doUpdate=function(t,e){if(t){var n=this.getDefs(!1);if(t[this._domName]&&n.contains(t[this._domName]))"function"==typeof e&&e(t);else{var i=this.add(t);i&&(t[this._domName]=i)}}},t.prototype.add=function(t){return null},t.prototype.addDom=function(t){var e=this.getDefs(!0);t.parentNode!==e&&e.appendChild(t)},t.prototype.removeDom=function(t){var e=this.getDefs(!1);e&&t[this._domName]&&(e.removeChild(t[this._domName]),t[this._domName]=null)},t.prototype.getDoms=function(){var t=this.getDefs(!1);if(!t)return[];var e=[];return P(this._tagNames,(function(n){for(var i=t.getElementsByTagName(n),r=0;r-1){var s=qe(a)[3],l=Je(a);o.setAttribute("stop-color","#"+l),o.setAttribute("stop-opacity",s+"")}else o.setAttribute("stop-color",n[i].color);e.appendChild(o)}t.__dom=e},e.prototype.markUsed=function(e){if(e.style){var n=e.style.fill;n&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom),(n=e.style.stroke)&&n.__dom&&t.prototype.markDomUsed.call(this,n.__dom)}},e}(Yx);function qx(t){return t&&(!!t.image||!!t.svgElement)}var Kx=new ty,$x=function(t){function e(e,n){return t.call(this,e,n,["pattern"],"__pattern_in_use__")||this}return n(e,t),e.prototype.addWithoutUpdate=function(t,e){if(e&&e.style){var n=this;P(["fill","stroke"],(function(i){var r=e.style[i];if(qx(r)){var o=n.getDefs(!0),a=Kx.get(r);a?o.contains(a)||n.addDom(a):a=n.add(r),n.markUsed(e);var s=a.getAttribute("id");t.setAttribute(i,"url(#"+s+")")}}))}},e.prototype.add=function(t){if(qx(t)){var e=this.createElement("pattern");return t.id=null==t.id?this.nextId++:t.id,e.setAttribute("id","zr"+this._zrId+"-pattern-"+t.id),e.setAttribute("x","0"),e.setAttribute("y","0"),e.setAttribute("patternUnits","userSpaceOnUse"),this.updateDom(t,e),this.addDom(e),e}},e.prototype.update=function(t){if(qx(t)){var e=this;this.doUpdate(t,(function(){var n=Kx.get(t);e.updateDom(t,n)}))}},e.prototype.updateDom=function(t,e){var n=t.svgElement;if(n instanceof SVGElement)n.parentNode!==e&&(e.innerHTML="",e.appendChild(n),e.setAttribute("width",t.svgWidth+""),e.setAttribute("height",t.svgHeight+""));else{var i=void 0,r=e.getElementsByTagName("image");if(r.length){if(!t.image)return void e.removeChild(r[0]);i=r[0]}else t.image&&(i=this.createElement("image"));if(i){var o=void 0;if("string"==typeof t.image?o=t.image:t.image instanceof HTMLImageElement?o=t.image.src:t.image instanceof HTMLCanvasElement&&(o=t.image.toDataURL()),o){i.setAttribute("href",o),i.setAttribute("x","0"),i.setAttribute("y","0");var a=to(o,i,{dirty:function(){}},(function(t){e.setAttribute("width",t.width+""),e.setAttribute("height",t.height+"")}));a&&a.width&&a.height&&(e.setAttribute("width",a.width+""),e.setAttribute("height",a.height+"")),e.appendChild(i)}}}var s="translate("+(t.x||0)+", "+(t.y||0)+") rotate("+(t.rotation||0)/Math.PI*180+") scale("+(t.scaleX||1)+", "+(t.scaleY||1)+")";e.setAttribute("patternTransform",s),Kx.set(t,e)},e.prototype.markUsed=function(e){e.style&&(qx(e.style.fill)&&t.prototype.markDomUsed.call(this,Kx.get(e.style.fill)),qx(e.style.stroke)&&t.prototype.markDomUsed.call(this,Kx.get(e.style.stroke)))},e}(Yx);function Jx(t){var e=t.__clipPaths;return e&&e.length>0}var Qx=function(t){function e(e,n){var i=t.call(this,e,n,"clipPath","__clippath_in_use__")||this;return i._refGroups={},i._keyDuplicateCount={},i}return n(e,t),e.prototype.markAllUnused=function(){for(var e in t.prototype.markAllUnused.call(this),this._refGroups)this.markDomUnused(this._refGroups[e]);this._keyDuplicateCount={}},e.prototype._getClipPathGroup=function(t,e){if(Jx(t)){var n=t.__clipPaths,i=this._keyDuplicateCount,r=function(t){var e=[];if(t)for(var n=0;n0){var n=this.getDefs(!0),i=e[0],r=void 0,o=void 0;i._dom?(o=i._dom.getAttribute("id"),r=i._dom,n.contains(r)||n.appendChild(r)):(o="zr"+this._zrId+"-clip-"+this.nextId,++this.nextId,(r=this.createElement("clipPath")).setAttribute("id",o),n.appendChild(r),i._dom=r),this.getSvgProxy(i).brush(i);var a=this.getSvgElement(i);r.innerHTML="",r.appendChild(a),t.setAttribute("clip-path","url(#"+o+")"),e.length>1&&this.updateDom(r,e.slice(1))}else t&&t.setAttribute("clip-path","none")},e.prototype.markUsed=function(e){var n=this;e.__clipPaths&&P(e.__clipPaths,(function(e){e._dom&&t.prototype.markDomUsed.call(n,e._dom)}))},e.prototype.removeUnused=function(){t.prototype.removeUnused.call(this);var e={};for(var n in this._refGroups){var i=this._refGroups[n];this.isDomUnused(i)?i.parentNode&&i.parentNode.removeChild(i):e[n]=i}this._refGroups=e},e}(Yx),tb=function(t){function e(e,n){var i=t.call(this,e,n,["filter"],"__filter_in_use__","_shadowDom")||this;return i._shadowDomMap={},i._shadowDomPool=[],i}return n(e,t),e.prototype._getFromPool=function(){var t=this._shadowDomPool.pop();if(!t){(t=this.createElement("filter")).setAttribute("id","zr"+this._zrId+"-shadow-"+this.nextId++);var e=this.createElement("feDropShadow");t.appendChild(e),this.addDom(t)}return t},e.prototype.update=function(t,e){if(function(t){return t&&(t.shadowBlur||t.shadowOffsetX||t.shadowOffsetY)}(e.style)){var n=function(t){var e=t.style,n=t.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(",")}(e),i=e._shadowDom=this._shadowDomMap[n];i||(i=this._getFromPool(),this._shadowDomMap[n]=i),this.updateDom(t,e,i)}else this.remove(t,e)},e.prototype.remove=function(t,e){null!=e._shadowDom&&(e._shadowDom=null,t.style.filter="")},e.prototype.updateDom=function(t,e,n){var i=n.children[0],r=e.style,o=e.getGlobalScale(),a=o[0],s=o[1];if(a&&s){var l=r.shadowOffsetX||0,u=r.shadowOffsetY||0,h=r.shadowBlur,c=r.shadowColor;i.setAttribute("dx",l/a+""),i.setAttribute("dy",u/s+""),i.setAttribute("flood-color",c);var p=h/2/a+" "+h/2/s;i.setAttribute("stdDeviation",p),n.setAttribute("x","-100%"),n.setAttribute("y","-100%"),n.setAttribute("width","300%"),n.setAttribute("height","300%"),e._shadowDom=n;var d=n.getAttribute("id");t.style.filter="url(#"+d+")"}},e.prototype.removeUnused=function(){if(this.getDefs(!1)){var t=this._shadowDomPool;for(var e in this._shadowDomMap){var n=this._shadowDomMap[e];t.push(n)}this._shadowDomMap={}}},e}(Yx);function eb(t){return parseInt(t,10)}function nb(t){return t instanceof Za?Fx:t instanceof Ja?Gx:t instanceof qa?Wx:Fx}function ib(t,e){return e&&t&&e.parentNode!==t}function rb(t,e,n){if(ib(t,e)&&n){var i=n.nextSibling;i?t.insertBefore(e,i):t.appendChild(e)}}function ob(t,e){if(ib(t,e)){var n=t.firstChild;n?t.insertBefore(e,n):t.appendChild(e)}}function ab(t,e){e&&t&&e.parentNode===t&&t.removeChild(e)}function sb(t){return t.__svgEl}var lb=function(){function t(t,e,n,i){this.type="svg",this.refreshHover=ub("refreshHover"),this.pathToImage=ub("pathToImage"),this.configLayer=ub("configLayer"),this.root=t,this.storage=e,this._opts=n=I({},n||{});var r=_x("svg");r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns","http://www.w3.org/2000/svg"),r.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),r.setAttribute("version","1.1"),r.setAttribute("baseProfile","full"),r.style.cssText="user-select:none;position:absolute;left:0;top:0;";var o=_x("g");r.appendChild(o);var a=_x("g");r.appendChild(a),this._gradientManager=new jx(i,a),this._patternManager=new $x(i,a),this._clipPathManager=new Qx(i,a),this._shadowManager=new tb(i,a);var s=document.createElement("div");s.style.cssText="overflow:hidden;position:relative",this._svgDom=r,this._svgRoot=a,this._backgroundRoot=o,this._viewport=s,t.appendChild(s),s.appendChild(r),this.resize(n.width,n.height),this._visibleList=[]}return t.prototype.getType=function(){return"svg"},t.prototype.getViewportRoot=function(){return this._viewport},t.prototype.getSvgDom=function(){return this._svgDom},t.prototype.getSvgRoot=function(){return this._svgRoot},t.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},t.prototype.refresh=function(){var t=this.storage.getDisplayList(!0);this._paintList(t)},t.prototype.setBackgroundColor=function(t){this._backgroundRoot&&this._backgroundNode&&this._backgroundRoot.removeChild(this._backgroundNode);var e=_x("rect");e.setAttribute("width",this.getWidth()),e.setAttribute("height",this.getHeight()),e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("id",0),e.style.fill=t,this._backgroundRoot.appendChild(e),this._backgroundNode=e},t.prototype.createSVGElement=function(t){return _x(t)},t.prototype.paintOne=function(t){var e=nb(t);return e&&e.brush(t),sb(t)},t.prototype._paintList=function(t){var e=this._gradientManager,n=this._patternManager,i=this._clipPathManager,r=this._shadowManager;e.markAllUnused(),n.markAllUnused(),i.markAllUnused(),r.markAllUnused();for(var o=this._svgRoot,a=this._visibleList,s=t.length,l=[],u=0;u=0;--n)if(e[n]===t)return!0;return!1}),i}return null}return n[0]},t.prototype.resize=function(t,e){var n=this._viewport;n.style.display="none";var i=this._opts;if(null!=t&&(i.width=t),null!=e&&(i.height=e),t=this._getSize(0),e=this._getSize(1),n.style.display="",this._width!==t||this._height!==e){this._width=t,this._height=e;var r=n.style;r.width=t+"px",r.height=e+"px";var o=this._svgDom;o.setAttribute("width",t+""),o.setAttribute("height",e+"")}this._backgroundNode&&(this._backgroundNode.setAttribute("width",t),this._backgroundNode.setAttribute("height",e))},t.prototype.getWidth=function(){return this._width},t.prototype.getHeight=function(){return this._height},t.prototype._getSize=function(t){var e=this._opts,n=["width","height"][t],i=["clientWidth","clientHeight"][t],r=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(null!=e[n]&&"auto"!==e[n])return parseFloat(e[n]);var a=this.root,s=document.defaultView.getComputedStyle(a);return(a[i]||eb(s[n])||eb(a.style[n]))-(eb(s[r])||0)-(eb(s[o])||0)|0},t.prototype.dispose=function(){this.root.innerHTML="",this._svgRoot=this._backgroundRoot=this._svgDom=this._backgroundNode=this._viewport=this.storage=null},t.prototype.clear=function(){var t=this._viewport;t&&t.parentNode&&t.parentNode.removeChild(t)},t.prototype.toDataURL=function(){this.refresh();var t=this._svgDom,e=t.outerHTML||(t.parentNode&&t.parentNode).innerHTML;return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(e.replace(/>\n\r<"))},t}();function ub(t){return function(){b('In SVG mode painter not support method "'+t+'"')}}function hb(){return!1}function cb(t,e,n){var i=C(),r=e.getWidth(),o=e.getHeight(),a=i.style;return a&&(a.position="absolute",a.left="0",a.top="0",a.width=r+"px",a.height=o+"px",i.setAttribute("data-zr-dom-id",t)),i.width=r*n,i.height=o*n,i}var pb=function(t){function e(e,n,i){var r,o=t.call(this)||this;o.motionBlur=!1,o.lastFrameAlpha=.7,o.dpr=1,o.virtual=!1,o.config={},o.incremental=!1,o.zlevel=0,o.maxRepaintRectCount=5,o.__dirty=!0,o.__firstTimePaint=!0,o.__used=!1,o.__drawIndex=0,o.__startIndex=0,o.__endIndex=0,o.__prevStartIndex=null,o.__prevEndIndex=null,i=i||Zn,"string"==typeof e?r=cb(e,n,i):X(e)&&(e=(r=e).id),o.id=e,o.dom=r;var a=r.style;return a&&(r.onselectstart=hb,a.webkitUserSelect="none",a.userSelect="none",a.webkitTapHighlightColor="rgba(0,0,0,0)",a["-webkit-touch-callout"]="none",a.padding="0",a.margin="0",a.borderWidth="0"),o.domBack=null,o.ctxBack=null,o.painter=n,o.config=null,o.dpr=i,o}return n(e,t),e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=cb("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),1!==t&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,e,n,i){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var r,o=[],a=this.maxRepaintRectCount,s=!1,l=new Rn(0,0,0,0);function u(t){if(t.isFinite()&&!t.isZero())if(0===o.length){(e=new Rn(0,0,0,0)).copy(t),o.push(e)}else{for(var e,n=!1,i=1/0,r=0,u=0;u=a)}}for(var h=this.__startIndex;h15)break}n.prevElClipPaths&&l.restore()};if(u)if(0===u.length)p=s.__endIndex;else for(var x=d.dpr,b=0;b0&&t>i[0]){for(s=0;st);s++);a=n[i[s]]}if(i.splice(s+1,0,t),n[t]=e,!e.virtual)if(a){var l=a.dom;l.nextSibling?o.insertBefore(e.dom,l.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.__painter=this}else b("Layer of zlevel "+t+" is not valid")},t.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i0?gb:0),this._needsManuallyCompositing),u.__builtin__||b("ZLevel "+l+" has been used by unkown layer "+u.id),u!==o&&(u.__used=!0,u.__startIndex!==r&&(u.__dirty=!0),u.__startIndex=r,u.incremental?u.__drawIndex=-1:u.__drawIndex=r,e(r),o=u),s.__dirty&ei.REDARAW_BIT&&!s.__inHover&&(u.__dirty=!0,u.incremental&&u.__drawIndex<0&&(u.__drawIndex=r))}e(r),this.eachBuiltinLayer((function(t,e){!t.__used&&t.getElementCount()>0&&(t.__dirty=!0,t.__startIndex=t.__endIndex=t.__drawIndex=0),t.__dirty&&t.__drawIndex<0&&(t.__drawIndex=t.__startIndex)}))},t.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},t.prototype._clearLayer=function(t){t.clear()},t.prototype.setBackgroundColor=function(t){this._backgroundColor=t,P(this._layers,(function(t){t.setUnpainted()}))},t.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?S(n[t],e,!0):n[t]=e;for(var i=0;i0?n=i[0]:i[1]<0&&(n=i[1]);return n}(r,n),a=i.dim,s=r.dim,l=e.mapDimension(s),u=e.mapDimension(a),h="x"===s||"radius"===s?1:0,c=O(t.dimensions,(function(t){return e.mapDimension(t)})),p=!1,d=e.getCalculationInfo("stackResultDimension");return Fm(e,c[0])&&(p=!0,c[0]=d),Fm(e,c[1])&&(p=!0,c[1]=d),{dataDimsForPoint:c,valueStart:o,valueAxisDim:s,baseAxisDim:a,stacked:!!p,valueDim:l,baseDim:u,baseDataOffset:h,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function Ab(t,e,n,i){var r=NaN;t.stacked&&(r=n.get(n.getCalculationInfo("stackedOverDimension"),i)),isNaN(r)&&(r=t.valueStart);var o=t.baseDataOffset,a=[];return a[o]=n.get(t.baseDim,i),a[1-o]=r,e.dataToPoint(a)}var Db="undefined"!=typeof Float32Array,Lb=Db?Float32Array:Array;function kb(t){return F(t)?Db?new Float32Array(t):t:new Lb(t)}var Pb=Math.min,Ob=Math.max;function Rb(t,e){return isNaN(t)||isNaN(e)}function Nb(t,e,n,i,r,o,a,s,l){for(var u,h,c,p,d,f,g=n,y=0;y=r||g<0)break;if(Rb(v,m)){if(l){g+=o;continue}break}if(g===n)t[o>0?"moveTo":"lineTo"](v,m),c=v,p=m;else{var _=v-u,x=m-h;if(_*_+x*x<.5){g+=o;continue}if(a>0){var b=g+o,w=e[2*b],S=e[2*b+1],M=y+1;if(l)for(;Rb(w,S)&&M=i||Rb(w,S))d=v,f=m;else{T=w-u,C=S-h;var L=v-u,k=w-v,P=m-h,O=S-m,R=void 0,N=void 0;"x"===s?(R=Math.abs(L),N=Math.abs(k),d=v-R*a,f=m,A=v+R*a,D=m):"y"===s?(R=Math.abs(P),N=Math.abs(O),d=v,f=m-R*a,A=v,D=m+R*a):(R=Math.sqrt(L*L+P*P),d=v-T*a*(1-(I=(N=Math.sqrt(k*k+O*O))/(N+R))),f=m-C*a*(1-I),D=m+C*a*I,A=Pb(A=v+T*a*I,Ob(w,v)),D=Pb(D,Ob(S,m)),A=Ob(A,Pb(w,v)),f=m-(C=(D=Ob(D,Pb(S,m)))-m)*R/N,d=Pb(d=v-(T=A-v)*R/N,Ob(u,v)),f=Pb(f,Ob(h,m)),A=v+(T=v-(d=Ob(d,Pb(u,v))))*N/R,D=m+(C=m-(f=Ob(f,Pb(h,m))))*N/R)}t.bezierCurveTo(c,p,d,f,v,m),c=A,p=D}else t.lineTo(v,m)}u=v,h=m,g+=o}return y}var Eb=function(){this.smooth=0,this.smoothConstraint=!0},zb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polyline",n}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Eb},e.prototype.buildPath=function(t,e){var n=e.points,i=0,r=n.length/2;if(e.connectNulls){for(;r>0&&Rb(n[2*r-2],n[2*r-1]);r--);for(;i=0){var y=a?(h-i)*g+i:(u-n)*g+n;return a?[t,y]:[y,t]}n=u,i=h;break;case o.C:u=r[l++],h=r[l++],c=r[l++],p=r[l++],d=r[l++],f=r[l++];var v=a?Eo(n,u,c,d,t,s):Eo(i,h,p,f,t,s);if(v>0)for(var m=0;m=0){y=a?Ro(i,h,p,f,_):Ro(n,u,c,d,_);return a?[t,y]:[y,t]}}n=d,i=f}}},e}(Za),Bb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e}(Eb),Vb=function(t){function e(e){var n=t.call(this,e)||this;return n.type="ec-polygon",n}return n(e,t),e.prototype.getDefaultShape=function(){return new Bb},e.prototype.buildPath=function(t,e){var n=e.points,i=e.stackedOnPoints,r=0,o=n.length/2,a=e.smoothMonotone;if(e.connectNulls){for(;o>0&&Rb(n[2*o-2],n[2*o-1]);o--);for(;ri)return!1;return!0}(o,e))){var a=e.mapDimension(o.dim),s={};return P(o.getViewLabels(),(function(t){var e=o.scale.getRawOrdinalNumber(t.tickValue);s[e]=1})),function(t){return!s.hasOwnProperty(e.get(a,t))}}}}function Kb(t,e){return[t[2*e],t[2*e+1]]}function $b(t,e,n,i){if(Wb(e,"cartesian2d")){var r=i.getModel("endLabel"),o=r.get("show"),a=r.get("valueAnimation"),s=i.getData(),l={lastFrameIndex:0},u=o?function(n,i){t._endLabelOnDuring(n,i,s,l,a,r,e)}:null,h=e.getBaseAxis().isHorizontal(),c=Fb(e,n,i,(function(){var e=t._endLabel;e&&n&&null!=l.originalX&&e.attr({x:l.originalX,y:l.originalY})}),u);if(!i.get("clip",!0)){var p=c.shape,d=Math.max(p.width,p.height);h?(p.y-=d,p.height+=2*d):(p.x-=d,p.width+=2*d)}return u&&u(1,c),c}return Gb(e,n,i)}var Jb=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.init=function(){var t=new zi,e=new Tb;this.group.add(e.group),this._symbolDraw=e,this._lineGroup=t},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem,o=this.group,a=t.getData(),s=t.getModel("lineStyle"),l=t.getModel("areaStyle"),u=a.getLayout("points")||[],h="polar"===r.type,c=this._coordSys,p=this._symbolDraw,d=this._polyline,f=this._polygon,g=this._lineGroup,y=t.get("animation"),v=!l.isEmpty(),m=l.get("origin"),_=Cb(r,a,m),x=v&&function(t,e,n){if(!n.valueDim)return[];for(var i=e.count(),r=kb(2*i),o=0;o=0;o--){var a=n[o].dimension,s=t.dimensions[a],l=t.getDimensionInfo(s);if("x"===(i=l&&l.coordDim)||"y"===i){r=n[o];break}}if(r){var u=e.getAxis(i),h=O(r.stops,(function(t){return{offset:0,coord:u.toGlobalCoord(u.dataToCoord(t.value)),color:t.color}})),c=h.length,p=r.outerColors.slice();c&&h[0].coord>h[c-1].coord&&(h.reverse(),p.reverse());var d=h[0].coord-10,f=h[c-1].coord+10,g=f-d;if(g<.001)return"transparent";P(h,(function(t){t.offset=(t.coord-d)/g})),h.push({offset:c?h[c-1].offset:.5,color:p[1]||"transparent"}),h.unshift({offset:c?h[0].offset:.5,color:p[0]||"transparent"});var y=new uu(0,0,0,0,h,!0);return y[i]=d,y[i+"2"]=f,y}}}(a,r)||a.getVisual("style")[a.getVisual("drawType")],A=t.get(["emphasis","focus"]),D=t.get(["emphasis","blurScope"]);(d.useStyle(T(s.getLineStyle(),{fill:"none",stroke:C,lineJoin:"bevel"})),nl(d,t,"lineStyle"),d.style.lineWidth>0&&"bolder"===t.get(["emphasis","lineStyle","width"]))&&(d.getState("emphasis").style.lineWidth=d.style.lineWidth+1);ys(d).seriesIndex=t.seriesIndex,Js(d,A,D);var L=Zb(t.get("smooth")),k=t.get("smoothMonotone"),R=t.get("connectNulls");if(d.setShape({smooth:L,smoothMonotone:k,connectNulls:R}),f){var N=a.getCalculationInfo("stackedOnSeries"),E=0;f.useStyle(T(l.getAreaStyle(),{fill:C,opacity:.7,lineJoin:"bevel",decal:a.getVisual("style").decal})),N&&(E=Zb(N.get("smooth"))),f.setShape({smooth:L,stackedOnSmooth:E,smoothMonotone:k,connectNulls:R}),nl(f,t,"areaStyle"),ys(f).seriesIndex=t.seriesIndex,Js(f,A,D)}var z=function(t){i._changePolyState(t)};a.eachItemGraphicEl((function(t){t&&(t.onHoverStateChange=z)})),this._polyline.onHoverStateChange=z,this._data=a,this._coordSys=r,this._stackedOnPoints=x,this._points=u,this._step=I,this._valueOrigin=m},e.prototype.dispose=function(){},e.prototype.highlight=function(t,e,n,i){var r=t.getData(),o=Dr(r,i);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&o>=0){var a=r.getLayout("points"),s=r.getItemGraphicEl(o);if(!s){var l=a[2*o],u=a[2*o+1];if(isNaN(l)||isNaN(u))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(l,u))return;(s=new bb(r,o)).x=l,s.y=u,s.setZ(t.get("zlevel"),t.get("z")),s.__temp=!0,r.setItemGraphicEl(o,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else yf.prototype.highlight.call(this,t,e,n,i)},e.prototype.downplay=function(t,e,n,i){var r=t.getData(),o=Dr(r,i);if(this._changePolyState("normal"),null!=o&&o>=0){var a=r.getItemGraphicEl(o);a&&(a.__temp?(r.setItemGraphicEl(o,null),this.group.remove(a)):a.downplay())}else yf.prototype.downplay.call(this,t,e,n,i)},e.prototype._changePolyState=function(t){var e=this._polygon;Vs(this._polyline,t),e&&Vs(e,t)},e.prototype._newPolyline=function(t){var e=this._polyline;return e&&this._lineGroup.remove(e),e=new zb({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(e),this._polyline=e,e},e.prototype._newPolygon=function(t,e){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Vb({shape:{points:t,stackedOnPoints:e},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,e,n){var i,r,o=e.getBaseAxis(),a=o.inverse;"cartesian2d"===e.type?(i=o.isHorizontal(),r=!1):"polar"===e.type&&(i="angle"===o.dim,r=!0);var s=t.hostModel,l=s.get("animationDuration");"function"==typeof l&&(l=l(null));var u=s.get("animationDelay")||0,h="function"==typeof u?u(null):u;t.eachItemGraphicEl((function(t,o){var s=t;if(s){var c=[t.x,t.y],p=void 0,d=void 0,f=void 0;if(r){var g=n,y=e.pointToCoord(c);i?(p=g.startAngle,d=g.endAngle,f=-y[1]/180*Math.PI):(p=g.r0,d=g.r,f=y[0])}else{var v=n;i?(p=v.x,d=v.x+v.width,f=t.x):(p=v.y+v.height,d=v.y,f=t.y)}var m=d===p?0:(f-p)/(d-p);a&&(m=1-m);var _="function"==typeof u?u(o):l*m+h,x=s.getSymbolPath(),b=x.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,delay:_}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:_}),x.disableLabelAnimation=!0}}))},e.prototype._initOrUpdateEndLabel=function(t,e){var n=t.getModel("endLabel");if(n.get("show")){var i=t.getData(),r=this._polyline,o=this._endLabel;o||((o=this._endLabel=new ls({z2:200})).ignoreClip=!0,r.setTextContent(this._endLabel),r.disableLabelAnimation=!0);var a=function(t){for(var e,n,i=t.length/2;i>0&&(e=t[2*i-2],n=t[2*i-1],isNaN(e)||isNaN(n));i--);return i-1}(i.getLayout("points"));a>=0&&(th(r,eh(t,"endLabel"),{labelFetcher:t,labelDataIndex:a,defaultText:function(t,e,n){return null!=n?xb(i,n):_b(i,t)},enableTextSetter:!0},function(t,e){var n=e.getBaseAxis(),i=n.isHorizontal(),r=n.inverse,o=i?r?"right":"left":"center",a=i?"middle":r?"top":"bottom";return{normal:{align:t.get("align")||o,verticalAlign:t.get("verticalAlign")||a}}}(n,e)),r.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,e,n,i,r,o,a){var s=this._endLabel,l=this._polyline;if(s){t<1&&null==i.originalX&&(i.originalX=s.x,i.originalY=s.y);var u=n.getLayout("points"),h=n.hostModel,c=h.get("connectNulls"),p=o.get("precision"),d=o.get("distance")||0,f=a.getBaseAxis(),g=f.isHorizontal(),y=f.inverse,v=e.shape,m=y?g?v.x:v.y+v.height:g?v.x+v.width:v.y,_=(g?d:0)*(y?-1:1),x=(g?0:-d)*(y?-1:1),b=g?"x":"y",w=function(t,e,n){for(var i,r,o=t.length/2,a="x"===n?0:1,s=0,l=-1,u=0;u=e||i>=e&&r<=e){l=u;break}s=u,i=r}else i=r;return{range:[s,l],t:(e-i)/(r-i)}}(u,m,b),S=w.range,M=S[1]-S[0],I=void 0;if(M>=1){if(M>1&&!c){var T=Kb(u,S[0]);s.attr({x:T[0]+_,y:T[1]+x}),r&&(I=h.getRawValue(S[0]))}else{(T=l.getPointOn(m,b))&&s.attr({x:T[0]+_,y:T[1]+x});var C=h.getRawValue(S[0]),A=h.getRawValue(S[1]);r&&(I=Br(n,p,C,A,w.t))}i.lastFrameIndex=S[0]}else{var D=1===t||i.lastFrameIndex>0?S[0]:0;T=Kb(u,D);r&&(I=h.getRawValue(D)),s.attr({x:T[0]+_,y:T[1]+x})}r&&uh(s).setLabelText(I)}},e.prototype._doUpdateAnimation=function(t,e,n,i,r,o){var a=this._polyline,s=this._polygon,l=t.hostModel,u=function(t,e,n,i,r,o,a,s){for(var l=function(t,e){var n=[];return e.diff(t).add((function(t){n.push({cmd:"+",idx:t})})).update((function(t,e){n.push({cmd:"=",idx:e,idx1:t})})).remove((function(t){n.push({cmd:"-",idx:t})})).execute(),n}(t,e),u=[],h=[],c=[],p=[],d=[],f=[],g=[],y=Cb(r,e,a),v=Cb(o,t,s),m=t.getLayout("points")||[],_=e.getLayout("points")||[],x=0;x3e3||s&&Ub(c,d)>3e3)return a.setShape({points:p}),void(s&&s.setShape({points:p,stackedOnPoints:d}));a.shape.__points=u.current,a.shape.points=h;var f={shape:{points:p}};u.current!==h&&(f.shape.__points=u.next),a.stopAnimation(),Ou(a,f,l),s&&(s.setShape({points:h,stackedOnPoints:c}),s.stopAnimation(),Ou(s,{shape:{stackedOnPoints:d}},l),a.shape.points!==s.shape.points&&(s.shape.points=a.shape.points));for(var g=[],y=u.status,v=0;ve&&(e=t[n]);return isFinite(e)?e:NaN},min:function(t){for(var e=1/0,n=0;n10&&"cartesian2d"===o.type&&r){var s=o.getBaseAxis(),l=o.getOtherAxis(s),u=s.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(u[1]-u[0])*(h||1),p=Math.round(a/c);if(p>1){"lttb"===r&&t.setData(i.lttbDownSample(i.mapDimension(l.dim),1/p));var d=void 0;"string"==typeof r?d=tw[r]:"function"==typeof r&&(d=r),d&&t.setData(i.downSample(i.mapDimension(l.dim),1/p,d,ew))}}}}}var iw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(t,e){return Hm(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t){var e=this.coordinateSystem;if(e){var n=e.dataToPoint(e.clampData(t)),i=this.getData(),r=i.getLayout("offset"),o=i.getLayout("size");return n[e.getBaseAxis().isHorizontal()?0:1]+=r+o/2,n}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(rf);rf.registerClass(iw);var rw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.getInitialData=function(){return Hm(this.getSource(),this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),e=this.get("largeThreshold");return e>t&&(t=e),t},e.prototype.brushSelector=function(t,e,n){return n.rect(e.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Th(iw.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(iw),ow=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0},aw=function(t){function e(e){var n=t.call(this,e)||this;return n.type="sausage",n}return n(e,t),e.prototype.getDefaultShape=function(){return new ow},e.prototype.buildPath=function(t,e){var n=e.cx,i=e.cy,r=Math.max(e.r0||0,0),o=Math.max(e.r,0),a=.5*(o-r),s=r+a,l=e.startAngle,u=e.endAngle,h=e.clockwise,c=Math.cos(l),p=Math.sin(l),d=Math.cos(u),f=Math.sin(u);(h?u-l<2*Math.PI:l-u<2*Math.PI)&&(t.moveTo(c*r+n,p*r+i),t.arc(c*s+n,p*s+i,a,-Math.PI+l,l,!h)),t.arc(n,i,o,l,u,!h),t.moveTo(d*o+n,f*o+i),t.arc(d*s+n,f*s+i,a,u-2*Math.PI,u-Math.PI,!h),0!==r&&(t.arc(n,i,r,u,l,h),t.moveTo(c*r+n,f*r+i)),t.closePath()},e}(Za),sw=["itemStyle","borderWidth"],lw=["itemStyle","borderRadius"],uw=[0,0],hw=Math.max,cw=Math.min;var pw=function(t){function e(){var n=t.call(this)||this;return n.type=e.type,n._isFirstFrame=!0,n}return n(e,t),e.prototype.render=function(t,e,n,i){this._model=t,this._removeOnRenderedListener(n),this._updateDrawMode(t);var r=t.get("coordinateSystem");("cartesian2d"===r||"polar"===r)&&(this._isLargeDraw?this._renderLarge(t,e,n):this._renderNormal(t,e,n,i))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,e){this._incrementalRenderLarge(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t,e,n,i){var r,o=this.group,a=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis();"cartesian2d"===l.type?r=u.isHorizontal():"polar"===l.type&&(r="angle"===u.dim);var h=t.isAnimationEnabled()?t:null,c=function(t,e){var n=t.get("realtimeSort",!0),i=e.getBaseAxis();0;if(n&&"category"===i.type&&"cartesian2d"===e.type)return{baseAxis:i,otherAxis:e.getOtherAxis(i)}}(t,l);c&&this._enableRealtimeSort(c,a,n);var p=t.get("clip",!0)||c,d=function(t,e){var n=t.getArea&&t.getArea();if(Wb(t,"cartesian2d")){var i=t.getBaseAxis();if("category"!==i.type||!i.onBand){var r=e.getLayout("bandWidth");i.isHorizontal()?(n.x-=r,n.width+=2*r):(n.y-=r,n.height+=2*r)}}return n}(l,a);o.removeClipPath();var f=t.get("roundCap",!0),g=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),v=y.get("borderRadius")||0,m=[],_=this._backgroundEls,x=i&&i.isInitSort,b=i&&"changeAxisOrder"===i.type;function w(t){var e=yw[l.type](a,t),n=function(t,e,n){return new("polar"===t.type?Wl:os)({shape:ww(e,n,t),silent:!0,z2:0})}(l,r,e);return n.useStyle(y.getItemStyle()),"cartesian2d"===l.type&&n.setShape("r",v),m[t]=n,n}a.diff(s).add((function(e){var n=a.getItemModel(e),i=yw[l.type](a,e,n);if(g&&w(e),a.hasValue(e)){var s=!1;p&&(s=dw[l.type](d,i));var y=fw[l.type](t,a,e,i,r,h,u.model,!1,f);vw(y,a,e,n,i,t,r,"polar"===l.type),x?y.attr({shape:i}):c?gw(c,h,y,i,e,r,!1,!1):Ru(y,{shape:i},t,e),a.setItemGraphicEl(e,y),o.add(y),y.ignore=s}})).update((function(e,n){var i=a.getItemModel(e),S=yw[l.type](a,e,i);if(g){var M=void 0;0===_.length?M=w(n):((M=_[n]).useStyle(y.getItemStyle()),"cartesian2d"===l.type&&M.setShape("r",v),m[e]=M);var I=yw[l.type](a,e);Ou(M,{shape:ww(r,I,l)},h,e)}var T=s.getItemGraphicEl(n);if(!a.hasValue(e))return o.remove(T),void(T=null);var C=!1;p&&(C=dw[l.type](d,S))&&o.remove(T),T||(T=fw[l.type](t,a,e,S,r,h,u.model,!!T,f)),b||vw(T,a,e,i,S,t,r,"polar"===l.type),x?T.attr({shape:S}):c?gw(c,h,T,S,e,r,!0,b):Ou(T,{shape:S},t,e,null),a.setItemGraphicEl(e,T),T.ignore=C,o.add(T)})).remove((function(e){var n=s.getItemGraphicEl(e);n&&zu(n,t,e)})).execute();var S=this._backgroundGroup||(this._backgroundGroup=new zi);S.removeAll();for(var M=0;Mo)return!0;o=u}return!1},e.prototype._isOrderDifferentInView=function(t,e){for(var n=e.scale,i=n.getExtent(),r=Math.max(0,i[0]),o=Math.min(i[1],n.getOrdinalMeta().categories.length-1);r<=o;++r)if(t.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},e.prototype._updateSortWithinSameData=function(t,e,n,i){if(this._isOrderChangedWithinSameData(t,e,n)){var r=this._dataSort(t,n,e);this._isOrderDifferentInView(r,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:r}))}},e.prototype._dispatchInitSort=function(t,e,n){var i=e.baseAxis,r=this._dataSort(t,i,(function(n){return t.get(t.mapDimension(e.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:r,animation:{duration:0}})},e.prototype.remove=function(t,e){this._clear(this._model),this._removeOnRenderedListener(e)},e.prototype.dispose=function(t,e){this._removeOnRenderedListener(e)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var e=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(e){zu(e,t,ys(e).dataIndex)}))):e.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(yf),dw={cartesian2d:function(t,e){var n=e.width<0?-1:1,i=e.height<0?-1:1;n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height);var r=t.x+t.width,o=t.y+t.height,a=hw(e.x,t.x),s=cw(e.x+e.width,r),l=hw(e.y,t.y),u=cw(e.y+e.height,o),h=sr?s:a,e.y=c&&l>o?u:l,e.width=h?0:s-a,e.height=c?0:u-l,n<0&&(e.x+=e.width,e.width=-e.width),i<0&&(e.y+=e.height,e.height=-e.height),h||c},polar:function(t,e){var n=e.r0<=e.r?1:-1;if(n<0){var i=e.r;e.r=e.r0,e.r0=i}var r=cw(e.r,t.r),o=hw(e.r0,t.r0);e.r=r,e.r0=o;var a=r-o<0;if(n<0){i=e.r;e.r=e.r0,e.r0=i}return a}},fw={cartesian2d:function(t,e,n,i,r,o,a,s,l){var u=new os({shape:I({},i),z2:1});(u.__dataIndex=n,u.name="item",o)&&(u.shape[r?"height":"width"]=0);return u},polar:function(t,e,n,i,r,o,a,s,l){var u=i.startAngle0?1:-1,a=i.height>0?1:-1;return{x:i.x+o*r/2,y:i.y+a*r/2,width:i.width-o*r,height:i.height-a*r}},polar:function(t,e,n){var i=t.getItemLayout(e);return{cx:i.cx,cy:i.cy,r0:i.r0,r:i.r,startAngle:i.startAngle,endAngle:i.endAngle}}};function vw(t,e,n,i,r,o,a,s){var l=e.getItemVisual(n,"style");s||t.setShape("r",i.get(lw)||0),t.useStyle(l);var u=i.getShallow("cursor");if(u&&t.attr("cursor",u),!s){var h=a?r.height>0?"bottom":"top":r.width>0?"left":"right",c=eh(i);th(t,c,{labelFetcher:o,labelDataIndex:n,defaultText:_b(o.getData(),n),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h}),hh(t.getTextContent(),c,o.getRawValue(n),(function(t){return xb(e,t)}))}var p=i.getModel(["emphasis"]);Js(t,p.get("focus"),p.get("blurScope")),nl(t,i),function(t){return null!=t.startAngle&&null!=t.endAngle&&t.startAngle===t.endAngle}(r)&&(t.style.fill="none",t.style.stroke="none",P(t.states,(function(t){t.style&&(t.style.fill=t.style.stroke="none")})))}var mw=function(){},_w=function(t){function e(e){var n=t.call(this,e)||this;return n.type="largeBar",n}return n(e,t),e.prototype.getDefaultShape=function(){return new mw},e.prototype.buildPath=function(t,e){for(var n=e.points,i=this.__startPoint,r=this.__baseDimIdx,o=0;o=c&&y<=p&&(l<=v?h>=l&&h<=v:h>=v&&h<=l))return a[d]}return-1}(this,t.offsetX,t.offsetY);ys(this).dataIndex=e>=0?e:null}),30,!1);function ww(t,e,n){if(Wb(n,"cartesian2d")){var i=e,r=n.getArea();return{x:t?i.x:r.x,y:t?r.y:i.y,width:t?i.width:r.width,height:t?r.height:i.height}}var o=e;return{cx:(r=n.getArea()).cx,cy:r.cy,r0:t?r.r0:o.r0,r:t?r.r:o.r,startAngle:t?o.startAngle:0,endAngle:t?o.endAngle:2*Math.PI}}var Sw=2*Math.PI,Mw=Math.PI/180;function Iw(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.getData(),i=e.mapDimension("value"),r=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,n),o=t.get("center"),a=t.get("radius");F(a)||(a=[0,a]),F(o)||(o=[o,o]);var s=Zi(r.width,n.getWidth()),l=Zi(r.height,n.getHeight()),u=Math.min(s,l),h=Zi(o[0],s)+r.x,c=Zi(o[1],l)+r.y,p=Zi(a[0],u/2),d=Zi(a[1],u/2),f=-t.get("startAngle")*Mw,g=t.get("minAngle")*Mw,y=0;e.each(i,(function(t){!isNaN(t)&&y++}));var v=e.getSum(i),m=Math.PI/(v||y)*2,_=t.get("clockwise"),x=t.get("roseType"),b=t.get("stillShowZeroSum"),w=e.getDataExtent(i);w[0]=0;var S=Sw,M=0,I=f,T=_?1:-1;if(e.setLayout({viewRect:r,r:d}),e.each(i,(function(t,n){var i;if(isNaN(t))e.setItemLayout(n,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:_,cx:h,cy:c,r0:p,r:x?NaN:d});else{(i="area"!==x?0===v&&b?m:t*m:Sw/y)n?a:o,h=Math.abs(l.label.y-n);if(h>u.maxY){var c=l.label.x-e-l.len2*r,p=i+l.len,f=c0?"right":"left":L>0?"left":"right"}var F=y.get("rotate");if(O="number"==typeof F?F*(Math.PI/180):F?L<0?-D+Math.PI:-D:0,o=!!O,p.x=I,p.y=T,p.rotation=O,p.setStyle({verticalAlign:"middle"}),R){p.setStyle({align:A});var G=p.states.select;G&&(G.x+=p.x,G.y+=p.y)}else{var H=p.getBoundingRect().clone();H.applyTransform(p.getComputedTransform());var W=(p.style.margin||0)+2.1;H.y-=W/2,H.height+=W,r.push({label:p,labelLine:f,position:v,len:S,len2:M,minTurnAngle:w.get("minTurnAngle"),maxSurfaceAngle:w.get("maxSurfaceAngle"),surfaceNormal:new In(L,k),linePoints:C,textAlign:A,labelDistance:m,labelAlignTo:_,edgeDistance:x,bleedMargin:b,rect:H})}s.setTextConfig({inside:R})}})),!o&&t.get("avoidLabelOverlap")&&function(t,e,n,i,r,o,a,s){for(var l=[],u=[],h=Number.MAX_VALUE,c=-Number.MAX_VALUE,p=0;p0){for(var l=o.getItemLayout(0),u=1;isNaN(l&&l.startAngle)&&u=n.r0}},e.type="pie",e}(yf);function Rw(t,e,n){e=F(e)&&{coordDimensions:e}||I({},e);var i=t.getSource(),r=Nm(i,e),o=new Pm(r,t);return o.initData(i,n),o}var Nw=function(){function t(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return t.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},t.prototype.containName=function(t){return this._getRawData().indexOfName(t)>=0},t.prototype.indexOfName=function(t){return this._getDataWithEncodedVisual().indexOfName(t)},t.prototype.getItemVisual=function(t,e){return this._getDataWithEncodedVisual().getItemVisual(t,e)},t}(),Ew=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.useColorPaletteOnData=!0,e}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Nw(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.mergeOption=function(){t.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Rw(this,{coordDimensions:["value"],encodeDefaulter:V(Qc,this)})},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=[];return n.each(n.mapDimension("value"),(function(t){r.push(t)})),i.percent=Qi(r,e,n.hostModel.get("percentPrecision")),i.$vars.push("percent"),i},e.prototype._defaultLabelLine=function(t){xr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(rf);var zw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return Hm(this.getSource(),this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,e,n){return n.point(e.getItemLayout(t))},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}}},e}(rf),Bw=function(){},Vw=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultShape=function(){return new Bw},e.prototype.buildPath=function(t,e){var n=e.points,i=e.size,r=this.symbolProxy,o=r.shape,a=t.getContext?t.getContext():t;if(a&&i[0]<4)this._ctx=a;else{this._ctx=null;for(var s=0;s=0;s--){var l=2*s,u=i[l]-o/2,h=i[l+1]-a/2;if(t>=u&&e>=h&&t<=u+o&&e<=h+a)return s}return-1},e}(Za),Fw=function(){function t(){this.group=new zi}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t,e){this.group.removeAll();var n=new Vw({rectHover:!0,cursor:"default"});n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,!1,e),this.group.add(n),this._incremental=null},t.prototype.updateLayout=function(t){if(!this._incremental){var e=t.getLayout("points");this.group.eachChild((function(t){if(null!=t.startIndex){var n=2*(t.endIndex-t.startIndex),i=4*t.startIndex*2;e=new Float32Array(e.buffer,i,n)}t.setShape("points",e)}))}},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>2e6?(this._incremental||(this._incremental=new vu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e,n){var i;this._incremental?(i=new Vw,this._incremental.addDisplayable(i,!0)):((i=new Vw({rectHover:!0,cursor:"default",startIndex:t.start,endIndex:t.end})).incremental=!0,this.group.add(i)),i.setShape({points:e.getLayout("points")}),this._setCommon(i,e,!!this._incremental,n)},t.prototype._setCommon=function(t,e,n,i){var r=e.hostModel;i=i||{};var o=e.getVisual("symbolSize");t.setShape("size",o instanceof Array?o:[o,o]),t.softClipShape=i.clipShape||null,t.symbolProxy=uy(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var a=t.shape.size[0]<4;t.useStyle(r.getModel("itemStyle").getItemStyle(a?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;if(l&&t.setColor(l),!n){var u=ys(t);u.seriesIndex=r.seriesIndex,t.on("mousemove",(function(e){u.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>=0&&(u.dataIndex=n+(t.startIndex||0))}))}},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),Gw=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,e,n){var i=t.getData();this._updateSymbolDraw(i,t).incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,e,n){this._symbolDraw.incrementalUpdate(t,e.getData(),{clipShape:this._getClipShape(e)}),this._finished=t.end===e.getData().count()},e.prototype.updateTransform=function(t,e,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4||!this._symbolDraw.isPersistent())return{update:!0};var r=Qb("").reset(t,e,n);r.progress&&r.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype._getClipShape=function(t){var e=t.coordinateSystem,n=e&&e.getArea&&e.getArea();return t.get("clip",!0)?n:null},e.prototype._updateSymbolDraw=function(t,e){var n=this._symbolDraw,i=e.pipelineContext.large;return n&&i===this._isLargeDraw||(n&&n.remove(),n=this._symbolDraw=i?new Fw:new Tb,this._isLargeDraw=i,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,e){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(yf),Hw=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,zlevel:0,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Nc),Ww=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Or).models[0]},e.type="cartesian2dAxis",e}(Nc);L(Ww,j_);var Yw={show:!0,zlevel:0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},Xw=S({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Yw),Uw=S({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Yw),Zw={category:Xw,value:Uw,time:S({scale:!0,splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Uw),log:T({scale:!0,logBase:10},Uw)},jw={value:1,category:1,time:1,log:1};function qw(t,e,i,r){P(jw,(function(o,a){var s=S(S({},Zw[a],!0),r,!0),l=function(t){function i(){for(var n=[],i=0;ie[1]&&e.reverse(),e},e.prototype.pointToData=function(t,e){return this.coordToData(this.toLocalCoord(t["x"===this.dim?0:1]),e)},e.prototype.setCategorySortInfo=function(t){if("category"!==this.type)return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(vx);function nS(t,e,n){n=n||{};var i=t.coordinateSystem,r=e.axis,o={},a=r.getAxesOnZeroOf()[0],s=r.position,l=a?"onZero":s,u=r.dim,h=i.getRect(),c=[h.x,h.x+h.width,h.y,h.y+h.height],p={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,f="x"===u?[c[2]-d,c[3]+d]:[c[0]-d,c[1]+d];if(a){var g=a.toGlobalCoord(a.dataToCoord(0));f[p.onZero]=Math.max(Math.min(g,f[1]),f[0])}o.position=["y"===u?f[p[l]]:c[0],"x"===u?f[p[l]]:c[3]],o.rotation=Math.PI/2*("x"===u?0:1);o.labelDirection=o.tickDirection=o.nameDirection={top:-1,bottom:1,left:-1,right:1}[s],o.labelOffset=a?f[p[s]]-f[p.onZero]:0,e.get(["axisTick","inside"])&&(o.tickDirection=-o.tickDirection),Q(n.labelInside,e.get(["axisLabel","inside"]))&&(o.labelDirection=-o.labelDirection);var y=e.get(["axisLabel","rotate"]);return o.labelRotate="top"===l?-y:y,o.z2=1,o}function iS(t){return"cartesian2d"===t.get("coordinateSystem")}function rS(t){var e={xAxisModel:null,yAxisModel:null};return P(e,(function(n,i){var r=i.replace(/Model$/,""),o=t.getReferringComponents(r,Or).models[0];e[i]=o})),e}var oS=function(){function t(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=Jw,this._initCartesian(t,e,n),this.model=t}return t.prototype.getRect=function(){return this._rect},t.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model),P(n.x,(function(t){F_(t.scale,t.model)})),P(n.y,(function(t){F_(t.scale,t.model)}));var i={};P(n.x,(function(t){sS(n,"y",t,i)})),P(n.y,(function(t){sS(n,"x",t,i)})),this.resize(this.model,e)},t.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),r=!n&&t.get("containLabel"),o=Ac(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var a=this._axesList;function s(){P(a,(function(t){var e=t.isHorizontal(),n=e?[0,o.width]:[0,o.height],i=t.inverse?1:0;t.setExtent(n[i],n[1-i]),function(t,e){var n=t.getExtent(),i=n[0]+n[1];t.toGlobalCoord="x"===t.dim?function(t){return t+e}:function(t){return i-t+e},t.toLocalCoord="x"===t.dim?function(t){return t-e}:function(t){return i-t+e}}(t,e?o.x:o.y)}))}s(),r&&(P(a,(function(t){if(!t.model.get(["axisLabel","inside"])){var e=function(t){var e=t.model,n=t.scale;if(e.get(["axisLabel","show"])&&!n.isBlank()){var i,r,o=n.getExtent();r=n instanceof Qm?n.count():(i=n.getTicks()).length;var a,s=t.getLabelModel(),l=H_(t),u=1;r>40&&(u=Math.ceil(r/40));for(var h=0;h0&&i>0||n<0&&i<0)}(t)}var uS=Math.PI,hS=function(){function t(t,e){this.group=new zi,this.opt=e,this.axisModel=t,T(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new zi({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return t.prototype.hasBuilder=function(t){return!!cS[t]},t.prototype.add=function(t){cS[t](this.opt,this.axisModel,this.group,this._transformGroup)},t.prototype.getGroup=function(){return this.group},t.innerTextLayout=function(t,e,n){var i,r,o=er(e-t);return nr(o)?(r=n>0?"top":"bottom",i="center"):nr(o-uS)?(r=n>0?"bottom":"top",i="center"):(r="middle",i=o>0&&o0?"right":"left":n>0?"left":"right"),{rotation:o,textAlign:i,textVerticalAlign:r}},t.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},t.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},t}(),cS={axisLine:function(t,e,n,i){var r=e.get(["axisLine","show"]);if("auto"===r&&t.handleAutoShown&&(r=t.handleAutoShown("axisLine")),r){var o=e.axis.getExtent(),a=i.transform,s=[o[0],0],l=[o[1],0];a&&(Rt(s,s,a),Rt(l,l,a));var u=I({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new tu({subPixelOptimize:!0,shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:u,strokeContainThreshold:t.strokeContainThreshold||5,silent:!0,z2:1});h.anid="line",n.add(h);var c=e.get(["axisLine","symbol"]),p=e.get(["axisLine","symbolSize"]),d=e.get(["axisLine","symbolOffset"])||0;if("number"==typeof d&&(d=[d,d]),null!=c){"string"==typeof c&&(c=[c,c]),"string"!=typeof p&&"number"!=typeof p||(p=[p,p]);var f=p[0],g=p[1];P([{rotate:t.rotation+Math.PI/2,offset:d[0],r:0},{rotate:t.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],(function(e,i){if("none"!==c[i]&&null!=c[i]){var r=uy(c[i],-f/2,-g/2,f,g,u.stroke,!0),o=e.r+e.offset;r.attr({rotation:e.rotate,x:s[0]+o*Math.cos(t.rotation),y:s[1]-o*Math.sin(t.rotation),silent:!0,z2:11}),n.add(r)}}))}}},axisTickLabel:function(t,e,n,i){var r=function(t,e,n,i){var r=n.axis,o=n.getModel("axisTick"),a=o.get("show");"auto"===a&&i.handleAutoShown&&(a=i.handleAutoShown("axisTick"));if(!a||r.scale.isBlank())return;for(var s=o.getModel("lineStyle"),l=i.tickDirection*o.get("length"),u=gS(r.getTicksCoords(),e.transform,l,T(s.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;hc[1]?-1:1,d=["start"===s?c[0]-p*h:"end"===s?c[1]+p*h:(c[0]+c[1])/2,fS(s)?t.labelOffset+l*h:0],f=e.get("nameRotate");null!=f&&(f=f*uS/180),fS(s)?o=hS.innerTextLayout(t.rotation,null!=f?f:t.rotation,l):(o=function(t,e,n,i){var r,o,a=er(n-t),s=i[0]>i[1],l="start"===e&&!s||"start"!==e&&s;nr(a-uS/2)?(o=l?"bottom":"top",r="center"):nr(a-1.5*uS)?(o=l?"top":"bottom",r="center"):(o="middle",r=a<1.5*uS&&a>uS/2?l?"left":"right":l?"right":"left");return{rotation:a,textAlign:r,textVerticalAlign:o}}(t.rotation,s,f||0,c),null!=(a=t.axisNameAvailableWidth)&&(a=Math.abs(a/Math.sin(o.rotation)),!isFinite(a)&&(a=null)));var g=u.getFont(),y=e.get("nameTruncate",!0)||{},v=y.ellipsis,m=Q(t.nameTruncateMaxWidth,y.maxWidth,a),_=e.get("tooltip",!0),x=e.mainType,b={componentType:x,name:r,$vars:["name"]};b[x+"Index"]=e.componentIndex;var w=new ls({x:d[0],y:d[1],rotation:o.rotation,silent:hS.isLabelSilent(e),style:nh(u,{text:r,font:g,overflow:"truncate",width:m,ellipsis:v,fill:u.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:u.get("align")||o.textAlign,verticalAlign:u.get("verticalAlign")||o.textVerticalAlign}),z2:1});if(w.tooltip=_&&_.show?I({content:r,formatter:function(){return r},formatterParams:b},_):null,w.__fullText=r,w.anid="name",e.get("triggerEvent")){var S=hS.makeAxisEventDataBase(e);S.targetType="axisName",S.name=r,ys(w).eventData=S}i.add(w),w.updateTransform(),n.add(w),w.decomposeTransform()}}};function pS(t){t&&(t.ignore=!0)}function dS(t,e){var n=t&&t.getBoundingRect().clone(),i=e&&e.getBoundingRect().clone();if(n&&i){var r=ge([]);return _e(r,r,-t.rotation),n.applyTransform(ve([],r,t.getLocalTransform())),i.applyTransform(ve([],r,e.getLocalTransform())),n.intersect(i)}}function fS(t){return"middle"===t||"center"===t}function gS(t,e,n,i,r){for(var o=[],a=[],s=[],l=0;l=0||t===e}function mS(t){var e=_S(t);if(e){var n=e.axisPointerModel,i=e.axis.scale,r=n.option,o=n.get("status"),a=n.get("value");null!=a&&(a=i.parse(a));var s=xS(n);null==o&&(r.status=s?"show":"hide");var l=i.getExtent().slice();l[0]>l[1]&&l.reverse(),(null==a||a>l[1])&&(a=l[1]),a0&&!c.min?c.min=0:null!=c.min&&c.min<0&&!c.max&&(c.max=0);var p=a;null!=c.color&&(p=T({color:c.color},a));var d=S(w(c),{boundaryGap:t,splitNumber:e,scale:n,axisLine:i,axisTick:r,axisLabel:o,name:c.text,nameLocation:"end",nameGap:u,nameTextStyle:p,triggerEvent:h},!1);if(s||(d.name=""),"string"==typeof l){var f=d.name;d.name=l.replace("{value}",null!=f?f:"")}else"function"==typeof l&&(d.name=l(d.name,d));var g=new Sh(d,null,this.ecModel);return L(g,j_.prototype),g.mainType="radar",g.componentIndex=this.componentIndex,g}),this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:S({lineStyle:{color:"#bbb"}},HS.axisLine),axisLabel:WS(HS.axisLabel,!1),axisTick:WS(HS.axisTick,!1),splitLine:WS(HS.splitLine,!0),splitArea:WS(HS.splitArea,!0),indicator:[]},e}(Nc),XS=["axisLine","axisTickLabel","axisName"],US=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var e=t.coordinateSystem;P(O(e.getIndicatorAxes(),(function(t){return new hS(t.model,{position:[e.cx,e.cy],rotation:t.angle,labelDirection:-1,tickDirection:-1,nameDirection:1})})),(function(t){P(XS,t.add,t),this.group.add(t.getGroup())}),this)},e.prototype._buildSplitLineAndArea=function(t){var e=t.coordinateSystem,n=e.getIndicatorAxes();if(n.length){var i=t.get("shape"),r=t.getModel("splitLine"),o=t.getModel("splitArea"),a=r.getModel("lineStyle"),s=o.getModel("areaStyle"),l=r.get("show"),u=o.get("show"),h=a.get("color"),c=s.get("color"),p=F(h)?h:[h],d=F(c)?c:[c],f=[],g=[];if("circle"===i)for(var y=n[0].getTicksCoords(),v=e.cx,m=e.cy,_=0;_n[0]&&isFinite(c)&&isFinite(n[0]))}else{a.getTicks().length-1>r&&(u=o(u));c=ji((h=Math.ceil(n[1]/u)*u)-u*r);a.setExtent(c,h),a.setInterval(u)}}))},t.prototype.convertToPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.convertFromPixel=function(t,e,n){return console.warn("Not implemented."),null},t.prototype.containPoint=function(t){return console.warn("Not implemented."),!1},t.create=function(e,n){var i=[];return e.eachComponent("radar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeriesByType("radar",(function(t){"radar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("radarIndex")||0])})),i},t.dimensions=[],t}();function qS(t){t.registerCoordinateSystem("radar",jS),t.registerComponentModel(YS),t.registerComponentView(US)}var KS="\0_ec_interaction_mutex";function $S(t,e){return!!JS(t)[e]}function JS(t){return t[KS]||(t[KS]={})}Yv({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},(function(){}));var QS=function(t){function e(e){var n=t.call(this)||this;n._zr=e;var i=B(n._mousedownHandler,n),r=B(n._mousemoveHandler,n),o=B(n._mouseupHandler,n),a=B(n._mousewheelHandler,n),s=B(n._pinchHandler,n);return n.enable=function(t,n){this.disable(),this._opt=T(w(n)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),null==t&&(t=!0),!0!==t&&"move"!==t&&"pan"!==t||(e.on("mousedown",i),e.on("mousemove",r),e.on("mouseup",o)),!0!==t&&"scale"!==t&&"zoom"!==t||(e.on("mousewheel",a),e.on("pinch",s))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",r),e.off("mouseup",o),e.off("mousewheel",a),e.off("pinch",s)},n}return n(e,t),e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!(ne(t)||t.target&&t.target.draggable)){var e=t.offsetX,n=t.offsetY;this.pointerChecker&&this.pointerChecker(t,e,n)&&(this._x=e,this._y=n,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(this._dragging&&nM("moveOnMouseMove",t,this._opt)&&"pinch"!==t.gestureEvent&&!$S(this._zr,"globalPan")){var e=t.offsetX,n=t.offsetY,i=this._x,r=this._y,o=e-i,a=n-r;this._x=e,this._y=n,this._opt.preventDefaultMouseMove&&ee(t.event),eM(this,"pan","moveOnMouseMove",t,{dx:o,dy:a,oldX:i,oldY:r,newX:e,newY:n,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){ne(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var e=nM("zoomOnMouseWheel",t,this._opt),n=nM("moveOnMouseWheel",t,this._opt),i=t.wheelDelta,r=Math.abs(i),o=t.offsetX,a=t.offsetY;if(0!==i&&(e||n)){if(e){var s=r>3?1.4:r>1?1.2:1.1;tM(this,"zoom","zoomOnMouseWheel",t,{scale:i>0?s:1/s,originX:o,originY:a,isAvailableBehavior:null})}if(n){var l=Math.abs(i);tM(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:(i>0?1:-1)*(l>3?.4:l>1?.15:.05),originX:o,originY:a,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){$S(this._zr,"globalPan")||tM(this,"zoom",null,t,{scale:t.pinchScale>1?1.1:1/1.1,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})},e}(Ft);function tM(t,e,n,i,r){t.pointerChecker&&t.pointerChecker(i,r.originX,r.originY)&&(ee(i.event),eM(t,e,n,i,r))}function eM(t,e,n,i,r){r.isAvailableBehavior=B(nM,null,n,i),t.trigger(e,r)}function nM(t,e,n){var i=n[t];return!t||i&&(!H(i)||e.event[i+"Key"])}function iM(t,e,n){var i=t.target;i.x+=e,i.y+=n,i.dirty()}function rM(t,e,n,i){var r=t.target,o=t.zoomLimit,a=t.zoom=t.zoom||1;if(a*=e,o){var s=o.min||0,l=o.max||1/0;a=Math.max(Math.min(l,a),s)}var u=a/t.zoom;t.zoom=a,r.x-=(n-r.x)*(u-1),r.y-=(i-r.y)*(u-1),r.scaleX*=u,r.scaleY*=u,r.dirty()}var oM={axisPointer:1,tooltip:1,brush:1};function aM(t,e,n){var i=e.getComponentByElement(t.topTarget),r=i&&i.coordinateSystem;return i&&i!==n&&!oM.hasOwnProperty(i.mainType)&&r&&r.model!==n}for(var sM=[126,25],lM=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],uM=0;uM=4&&(s={x:parseFloat(h[0]||0),y:parseFloat(h[1]||0),width:parseFloat(h[2]),height:parseFloat(h[3])})}if(s&&null!=o&&null!=a&&(l=DM(s,o,a),!e.ignoreViewBox)){var c=i;(i=new zi).add(c),c.scaleX=c.scaleY=l.scale,c.x=l.x,c.y=l.y}return e.ignoreRootClip||null==o||null==a||i.setClipPath(new os({shape:{x:0,y:0,width:o,height:a}})),{root:i,width:o,height:a,viewBoxRect:s,viewBoxTransform:l}},t.prototype._parseNode=function(t,e){var n,i,r=t.nodeName.toLowerCase();if("defs"===r?this._isDefine=!0:"text"===r&&(this._isText=!0),this._isDefine){if(i=xM[r]){var o=i.call(this,t),a=t.getAttribute("id");a&&(this._defs[a]=o)}}else(i=vM[r])&&(n=i.call(this,t,e),e.add(n));if(n)for(var s=t.firstChild;s;)1===s.nodeType&&this._parseNode(s,n),3===s.nodeType&&this._isText&&this._parseText(s,n),s=s.nextSibling;"defs"===r?this._isDefine=!1:"text"===r&&(this._isText=!1)},t.prototype._parseText=function(t,e){if(1===t.nodeType){var n=t.getAttribute("dx")||0,i=t.getAttribute("dy")||0;this._textX+=parseFloat(n),this._textY+=parseFloat(i)}var r=new qa({style:{text:t.textContent},x:this._textX||0,y:this._textY||0});bM(e,r),MM(t,r,this._defs);var o=r.style,a=o.fontSize;a&&a<9&&(o.fontSize=9,r.scaleX*=a/9,r.scaleY*=a/9);var s=(o.fontSize||o.fontFamily)&&[o.fontStyle,o.fontWeight,(o.fontSize||12)+"px",o.fontFamily||"sans-serif"].join(" ");o.font=s;var l=r.getBoundingRect();return this._textX+=l.width,e.add(r),r},t.internalField=void(vM={g:function(t,e){var n=new zi;return bM(e,n),MM(t,n,this._defs),n},rect:function(t,e){var n=new os;return bM(e,n),MM(t,n,this._defs),n.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),n},circle:function(t,e){var n=new Tl;return bM(e,n),MM(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),n},line:function(t,e){var n=new tu;return bM(e,n),MM(t,n,this._defs),n.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),n},ellipse:function(t,e){var n=new Al;return bM(e,n),MM(t,n,this._defs),n.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),n},polygon:function(t,e){var n,i=t.getAttribute("points");i&&(n=wM(i));var r=new ql({shape:{points:n||[]}});return bM(e,r),MM(t,r,this._defs),r},polyline:function(t,e){var n=new Za;bM(e,n),MM(t,n,this._defs);var i,r=t.getAttribute("points");return r&&(i=wM(r)),new $l({shape:{points:i||[]}})},image:function(t,e){var n=new Ja;return bM(e,n),MM(t,n,this._defs),n.setStyle({image:t.getAttribute("xlink:href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),n},text:function(t,e){var n=t.getAttribute("x")||"0",i=t.getAttribute("y")||"0",r=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(r),this._textY=parseFloat(i)+parseFloat(o);var a=new zi;return bM(e,a),MM(t,a,this._defs),a},tspan:function(t,e){var n=t.getAttribute("x"),i=t.getAttribute("y");null!=n&&(this._textX=parseFloat(n)),null!=i&&(this._textY=parseFloat(i));var r=t.getAttribute("dx")||0,o=t.getAttribute("dy")||0,a=new zi;return bM(e,a),MM(t,a,this._defs),this._textX+=r,this._textY+=o,a},path:function(t,e){var n=Ml(t.getAttribute("d")||"");return bM(e,n),MM(t,n,this._defs),n}}),t}(),xM={lineargradient:function(t){var e=parseInt(t.getAttribute("x1")||"0",10),n=parseInt(t.getAttribute("y1")||"0",10),i=parseInt(t.getAttribute("x2")||"10",10),r=parseInt(t.getAttribute("y2")||"0",10),o=new uu(e,n,i,r);return function(t,e){var n=t.firstChild;for(;n;){if(1===n.nodeType){var i=n.getAttribute("offset"),r=void 0;r=i.indexOf("%")>0?parseInt(i,10)/100:i?parseFloat(i):0;var o=n.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:r,color:o})}n=n.nextSibling}}(t,o),o}};function bM(t,e){t&&t.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),T(e.__inheritedStyle,t.__inheritedStyle))}function wM(t){for(var e=ot(t).split(mM),n=[],i=0;i0;o-=2){var a=i[o],s=void 0;switch(r=r||[1,0,0,1,0,0],i[o-1]){case"translate":s=ot(a).split(mM),me(r,r,[parseFloat(s[0]),parseFloat(s[1]||"0")]);break;case"scale":s=ot(a).split(mM),xe(r,r,[parseFloat(s[0]),parseFloat(s[1]||s[0])]);break;case"rotate":s=ot(a).split(mM),_e(r,r,parseFloat(s[0]));break;case"skew":s=ot(a).split(mM),console.warn("Skew transform is not supported yet");break;case"matrix":s=ot(a).split(mM),r[0]=parseFloat(s[0]),r[1]=parseFloat(s[1]),r[2]=parseFloat(s[2]),r[3]=parseFloat(s[3]),r[4]=parseFloat(s[4]),r[5]=parseFloat(s[5])}}e.setLocalTransform(r)}}(t,e),I(o,function(t){var e=t.getAttribute("style"),n={};if(!e)return n;var i,r={};AM.lastIndex=0;for(;null!=(i=AM.exec(e));)r[i[1]]=i[2];for(var o in SM)SM.hasOwnProperty(o)&&null!=r[o]&&(n[SM[o]]=r[o]);return n}(t)),!i))for(var a in SM)if(SM.hasOwnProperty(a)){var s=t.getAttribute(a);null!=s&&(o[SM[a]]=s)}r.style=r.style||{},null!=o.fill&&(r.style.fill=TM(o.fill,n)),null!=o.stroke&&(r.style.stroke=TM(o.stroke,n)),P(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],(function(t){null!=o[t]&&(r.style[t]=parseFloat(o[t]))})),o.textBaseline&&"auto"!==o.textBaseline||(o.textBaseline="alphabetic"),"alphabetic"===o.textBaseline&&(o.textBaseline="bottom"),"start"===o.textAlign&&(o.textAlign="left"),"end"===o.textAlign&&(o.textAlign="right"),P(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign","textBaseline"],(function(t){null!=o[t]&&(r.style[t]=o[t])})),o.lineDash&&(r.style.lineDash=O(ot(o.lineDash).split(mM),(function(t){return parseFloat(t)}))),r.__inheritedStyle=o}var IM=/url\(\s*#(.*?)\)/;function TM(t,e){var n=e&&t&&t.match(IM);return n?e[ot(n[1])]:t}var CM=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.e,]*)\)/g;var AM=/([^\s:;]+)\s*:\s*([^:;]+)/g;function DM(t,e,n){var i=e/t.width,r=n/t.height,o=Math.min(i,r);return{scale:o,x:-(t.x+t.width/2)*o+e/2,y:-(t.y+t.height/2)*o+n/2}}var LM=Lr();function kM(t,e){var n,i,r,o,a=t.svgXML;try{rt(null!=(i=(n=a&&(r=a,o={ignoreViewBox:!0,ignoreRootClip:!0},(new _M).parse(r,o))||{}).root))}catch(t){throw new Error("Invalid svg format\n"+t.message)}var s=n.width,l=n.height,u=n.viewBoxRect;if(e||(e=null==s||null==l?i.getBoundingRect():new Rn(0,0,0,0),null!=s&&(e.width=s),null!=l&&(e.height=l)),u){var h=DM(u,e.width,e.height),c=i;(i=new zi).add(c),c.scaleX=c.scaleY=h.scale,c.x=h.x,c.y=h.y}return i.setClipPath(new os({shape:e.plain()})),{root:i,boundingRect:e}}var PM={geoJSON:gM,svg:{load:function(t,e){var n=LM(e).originRoot;if(n)return{root:n,boundingRect:LM(e).boundingRect};var i=kM(e);return LM(e).originRoot=i.root,LM(e).boundingRect=i.boundingRect,i},makeGraphic:function(t,e,n){var i=LM(e),r=i.rootMap||(i.rootMap=ht()),o=r.get(n);if(o)return o;var a=i.originRoot,s=i.boundingRect;return i.originRootHostKey?o=kM(e,s).root:(i.originRootHostKey=n,o=a),r.set(n,o)},removeGraphic:function(t,e,n){var i=LM(e),r=i.rootMap;r&&r.removeKey(n),n===i.originRootHostKey&&(i.originRootHostKey=null)}}},OM=function(t,e,n){var i,r=[],o=ht(),a=ht();return P(EM(t),(function(s){var l=PM[s.type].load(t,s,n);P(l.regions,(function(t){var n=t.name;e&&e.hasOwnProperty(n)&&(t=t.cloneShallow(n=e[n])),r.push(t),o.set(n,t),a.set(n,t.center)}));var u=l.boundingRect;u&&(i?i.union(u):i=u.clone())})),{regions:r,regionsMap:o,nameCoordMap:a,boundingRect:i||new Rn(0,0,0,0)}},RM=function(t,e){var n=EM(t),i=[];return P(n,(function(n){var r=PM[n.type].makeGraphic;r&&i.push(r(t,n,e))})),i},NM=function(t,e){P(EM(t),(function(n){var i=PM[n.type].makeGraphic;i&&i(t,n,e)}))};function EM(t){var e=lg(t)||[];return e}function zM(t){var e=t.getItemStyle(),n=t.get("areaColor");return null!=n&&(e.fill=n),e}var BM=function(){function t(t){var e=new zi;this.uid=Ih("ec_map_draw"),this._controller=new QS(t.getZr()),this._controllerHost={target:e},this.group=e,e.add(this._regionsGroup=new zi),e.add(this._backgroundGroup=new zi)}return t.prototype.draw=function(t,e,n,i,r){var o="geo"===t.mainType,a=t.getData&&t.getData();o&&e.eachComponent({mainType:"series",subType:"map"},(function(e){a||e.getHostGeoModel()!==t||(a=e.getData())}));var s=t.coordinateSystem;this._updateBackground(s);var l,u,h=this._regionsGroup,c=this.group,p=s.getTransformInfo(),d=!h.childAt(0)||r;if(d)c.transform=p.roamTransform,c.decomposeTransform(),c.dirty();else{var f=new ke;f.transform=p.roamTransform,f.decomposeTransform();var g={scaleX:f.scaleX,scaleY:f.scaleY,x:f.x,y:f.y};l=f.scaleX,u=f.scaleY,Ou(c,g,t)}h.removeAll();var y=ht(),v=a&&a.getVisual("visualMeta")&&a.getVisual("visualMeta").length>0;P(s.regions,(function(e){var i=y.get(e.name)||y.set(e.name,new zi),r=new su({segmentIgnoreThreshold:1,shape:{paths:[]}});i.add(r);var s,f=t.getRegionModel(e.name)||t,g=f.getModel("itemStyle"),m=f.getModel("emphasis"),_=m.getModel("itemStyle"),x=f.getModel(["blur","itemStyle"]),b=f.getModel(["select","itemStyle"]),w=zM(g),S=zM(_),M=zM(x),I=zM(b);if(a){s=a.indexOfName(e.name);var T=a.getItemVisual(s,"style"),C=a.getItemVisual(s,"decal");v&&T.fill&&(w.fill=T.fill),C&&(w.decal=ky(C,n))}var A=p.rawScaleX,D=p.rawScaleY,L=p.rawX,k=p.rawY,O=function(t){return[t[0]*A+L,t[1]*D+k]};P(e.geometries,(function(t){if("polygon"===t.type){for(var e=[],n=0;n=0)&&(F=t);var G=O(e.center),H=new ls({x:G[0],y:G[1],scaleX:1/c.scaleX,scaleY:1/c.scaleY,z2:10,silent:!0});th(H,eh(f),{labelFetcher:F,labelDataIndex:V,defaultText:e.name},{normal:{align:"center",verticalAlign:"middle"}}),r.setTextContent(H),r.setTextConfig({local:!0}),r.disableLabelAnimation=!0,d||Ou(H,{scaleX:1/l,scaleY:1/u},t)}if(a)a.setItemGraphicEl(s,i);else{var W=t.getRegionModel(e.name);ys(r).eventData={componentType:"geo",componentIndex:t.componentIndex,geoIndex:t.componentIndex,name:e.name,region:W&&W.option||{}}}(i.__regions||(i.__regions=[])).push(e),i.highDownSilentOnTouch=!!t.get("selectedMode"),Js(i,m.get("focus"),m.get("blurScope")),h.add(i)})),this._updateController(t,e,n),this._updateMapSelectHandler(t,h,n,i)},t.prototype.remove=function(){this._regionsGroup.removeAll(),this._backgroundGroup.removeAll(),this._controller.dispose(),this._mapName&&NM(this._mapName,this.uid),this._mapName=null,this._controllerHost=null},t.prototype._updateBackground=function(t){var e=t.map;this._mapName!==e&&P(RM(e,this.uid),(function(t){this._backgroundGroup.add(t)}),this),this._mapName=e},t.prototype._updateController=function(t,e,n){var i=t.coordinateSystem,r=this._controller,o=this._controllerHost;o.zoomLimit=t.get("scaleLimit"),o.zoom=i.getZoom(),r.enable(t.get("roam")||!1);var a=t.mainType;function s(){var e={type:"geoRoam",componentType:a};return e[a+"Id"]=t.id,e}r.off("pan").on("pan",(function(t){this._mouseDownFlag=!1,iM(o,t.dx,t.dy),n.dispatchAction(I(s(),{dx:t.dx,dy:t.dy}))}),this),r.off("zoom").on("zoom",(function(t){this._mouseDownFlag=!1,rM(o,t.scale,t.originX,t.originY),n.dispatchAction(I(s(),{zoom:t.scale,originX:t.originX,originY:t.originY}));var e=this.group;this._regionsGroup.traverse((function(t){var n=t.getTextContent();n&&(n.scaleX=1/e.scaleX,n.scaleY=1/e.scaleY,n.markRedraw())}))}),this),r.setPointerChecker((function(e,r,o){return i.getViewRectAfterRoam().contain(r,o)&&!aM(e,n,t)}))},t.prototype._updateMapSelectHandler=function(t,e,n,i){var r=this;e.off("mousedown"),t.get("selectedMode")&&(e.on("mousedown",(function(){r._mouseDownFlag=!0})),e.on("click",(function(t){r._mouseDownFlag&&(r._mouseDownFlag=!1)})))},t}(),VM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){if(!i||"mapToggleSelect"!==i.type||i.from!==this.uid){var r=this.group;if(r.removeAll(),!t.getHostGeoModel()){if(i&&"geoRoam"===i.type&&"series"===i.componentType&&i.seriesId===t.id)(o=this._mapDraw)&&r.add(o.group);else if(t.needsDrawMap){var o=this._mapDraw||new BM(n);r.add(o.group),o.draw(t,e,n,this,i),this._mapDraw=o}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&e.getComponent("legend")&&this._renderSymbols(t,e,n)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,e,n){var i=t.originalData,r=this.group;i.each(i.mapDimension("value"),(function(e,n){if(!isNaN(e)){var o=i.getItemLayout(n);if(o&&o.point){var a=o.point,s=o.offset,l=new Tl({style:{fill:t.getData().getVisual("style").fill},shape:{cx:a[0]+9*s,cy:a[1],r:3},silent:!0,z2:8+(s?0:11)});if(!s){var u=t.mainSeries.getData(),h=i.getName(n),c=u.indexOfName(h),p=i.getItemModel(n),d=p.getModel("label"),f=u.getItemGraphicEl(c);th(l,eh(p),{labelFetcher:{getFormattedLabel:function(e,n){return t.getFormattedLabel(c,n)}}}),l.disableLabelAnimation=!0,d.get("position")||l.setTextConfig({position:"bottom"}),f.onHoverStateChange=function(t){l.useState(t)}}r.add(l)}}}))},e.type="map",e}(yf),FM=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.needsDrawMap=!1,n.seriesGroup=[],n.getTooltipPosition=function(t){if(null!=t){var e=this.getData().getName(t),n=this.coordinateSystem,i=n.getRegion(e);return i&&n.dataToPoint(i.center)}},n}return n(e,t),e.prototype.getInitialData=function(t){for(var e=Rw(this,{coordDimensions:["value"],encodeDefaulter:V(Qc,this)}),n=ht(),i=[],r=0,o=e.count();r=0;){var o=e[n];o.hierNode.prelim+=i,o.hierNode.modifier+=i,r+=o.hierNode.change,i+=o.hierNode.shift+r}}(t);var o=(n[0].hierNode.prelim+n[n.length-1].hierNode.prelim)/2;r?(t.hierNode.prelim=r.hierNode.prelim+e(t,r),t.hierNode.modifier=t.hierNode.prelim-o):t.hierNode.prelim=o}else r&&(t.hierNode.prelim=r.hierNode.prelim+e(t,r));t.parentNode.hierNode.defaultAncestor=function(t,e,n,i){if(e){for(var r=t,o=t,a=o.parentNode.children[0],s=e,l=r.hierNode.modifier,u=o.hierNode.modifier,h=a.hierNode.modifier,c=s.hierNode.modifier;s=ZM(s),o=jM(o),s&&o;){r=ZM(r),a=jM(a),r.hierNode.ancestor=t;var p=s.hierNode.prelim+c-o.hierNode.prelim-u+i(s,o);p>0&&(KM(qM(s,t,n),t,p),u+=p,l+=p),c+=s.hierNode.modifier,u+=o.hierNode.modifier,l+=r.hierNode.modifier,h+=a.hierNode.modifier}s&&!ZM(r)&&(r.hierNode.thread=s,r.hierNode.modifier+=c-l),o&&!jM(a)&&(a.hierNode.thread=o,a.hierNode.modifier+=u-h,n=t)}return n}(t,r,t.parentNode.hierNode.defaultAncestor||i[0],e)}function YM(t){var e=t.hierNode.prelim+t.parentNode.hierNode.modifier;t.setLayout({x:e},!0),t.hierNode.modifier+=t.parentNode.hierNode.modifier}function XM(t){return arguments.length?t:$M}function UM(t,e){return t-=Math.PI/2,{x:e*Math.cos(t),y:e*Math.sin(t)}}function ZM(t){var e=t.children;return e.length&&t.isExpand?e[e.length-1]:t.hierNode.thread}function jM(t){var e=t.children;return e.length&&t.isExpand?e[0]:t.hierNode.thread}function qM(t,e,n){return t.hierNode.ancestor.parentNode===e.parentNode?t.hierNode.ancestor:n}function KM(t,e,n){var i=n/(e.hierNode.i-t.hierNode.i);e.hierNode.change-=i,e.hierNode.shift+=n,e.hierNode.modifier+=n,e.hierNode.prelim+=n,t.hierNode.change+=i}function $M(t,e){return t.parentNode===e.parentNode?1:2}var JM=Rt,QM=function(t){function e(e){var n=t.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new ke,n._rawTransformable=new ke,n.name=e,n}return n(e,t),e.prototype.setBoundingRect=function(t,e,n,i){return this._rect=new Rn(t,e,n,i),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,e,n,i){this.transformTo(t,e,n,i),this._viewRect=new Rn(t,e,n,i)},e.prototype.transformTo=function(t,e,n,i){var r=this.getBoundingRect(),o=this._rawTransformable;o.transform=r.calculateTransform(new Rn(t,e,n,i)),o.decomposeTransform(),this._updateTransform()},e.prototype.setCenter=function(t){t&&(this._center=t,this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var e=this.zoomLimit;e&&(null!=e.max&&(t=Math.min(e.max,t)),null!=e.min&&(t=Math.max(e.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect();return[t.x+t.width/2,t.y+t.height/2]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),e=this._roamTransformable,n=this.getDefaultCenter(),i=this.getCenter(),r=this.getZoom();i=Rt([],i,t),n=Rt([],n,t),e.originX=i[0],e.originY=i[1],e.x=n[0]-i[0],e.y=n[1]-i[1],e.scaleX=e.scaleY=r,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,e=this._rawTransformable;e.parent=t,t.updateTransform(),e.updateTransform(),ye(this.transform||(this.transform=[]),e.transform||[1,0,0,1,0,0]),this._rawTransform=e.getLocalTransform(),this.invTransform=this.invTransform||[],be(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._roamTransformable.transform,e=this._rawTransformable;return{roamTransform:t?nt(t):[1,0,0,1,0,0],rawScaleX:e.scaleX,rawScaleY:e.scaleY,rawX:e.x,rawY:e.y}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,e,n){var i=e?this._rawTransform:this.transform;return n=n||[],i?JM(n,t,i):vt(n,t)},e.prototype.pointToData=function(t){var e=this.invTransform;return e?JM([],t,e):[t[0],t[1]]},e.prototype.convertToPixel=function(t,e,n){var i=tI(e);return i===this?i.dataToPoint(n):null},e.prototype.convertFromPixel=function(t,e,n){var i=tI(e);return i===this?i.pointToData(n):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(ke);function tI(t){var e=t.seriesModel;return e?e.coordinateSystem:null}var eI=function(){this.parentPoint=[],this.childPoints=[]},nI=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new eI},e.prototype.buildPath=function(t,e){var n=e.childPoints,i=n.length,r=e.parentPoint,o=n[0],a=n[i-1];if(1===i)return t.moveTo(r[0],r[1]),void t.lineTo(o[0],o[1]);var s=e.orient,l="TB"===s||"BT"===s?0:1,u=1-l,h=Zi(e.forkPosition,1),c=[];c[l]=r[l],c[u]=r[u]+(a[u]-r[u])*h,t.moveTo(r[0],r[1]),t.lineTo(c[0],c[1]),t.moveTo(o[0],o[1]),c[l]=o[l],t.lineTo(c[0],c[1]),c[l]=a[l],t.lineTo(c[0],c[1]),t.lineTo(a[0],a[1]);for(var p=1;pm.x)||(x-=Math.PI);var S=b?"left":"right",M=s.getModel("label"),I=M.get("rotate"),C=I*(Math.PI/180),A=y.getTextContent();A&&(y.setTextConfig({position:M.get("position")||S,rotation:null==I?-x:C,origin:"center"}),A.setStyle("verticalAlign","middle"))}var D=s.get(["emphasis","focus"]),L="ancestor"===D?a.getAncestorsIndices():"descendant"===D?a.getDescendantIndices():null;L&&(ys(n).focus=L),function(t,e,n,i,r,o,a,s){var l=e.getModel(),u=t.get("edgeShape"),h=t.get("layout"),c=t.getOrient(),p=t.get(["lineStyle","curveness"]),d=t.get("edgeForkPosition"),f=l.getModel("lineStyle").getLineStyle(),g=i.__edge;if("curve"===u)e.parentNode&&e.parentNode!==n&&(g||(g=i.__edge=new ru({shape:sI(h,c,p,r,r)})),Ou(g,{shape:sI(h,c,p,o,a)},t));else if("polyline"===u)if("orthogonal"===h){if(e!==n&&e.children&&0!==e.children.length&&!0===e.isExpand){for(var y=e.children,v=[],m=0;me&&(e=i.height)}this.height=e+1},t.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,n=this.children,i=n.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},t.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},t.prototype.getModel=function(t){if(!(this.dataIndex<0))return this.hostTree.data.getItemModel(this.dataIndex).getModel(t)},t.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},t.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},t.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},t.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},t.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},t.prototype.isAncestorOf=function(t){for(var e=t.parentNode;e;){if(e===this)return!0;e=e.parentNode}return!1},t.prototype.isDescendantOf=function(t){return t!==this&&t.isAncestorOf(this)},t}(),mI=function(){function t(t){this.type="tree",this._nodes=[],this.hostModel=t}return t.prototype.eachNode=function(t,e,n){this.root.eachNode(t,e,n)},t.prototype.getNodeByDataIndex=function(t){var e=this.data.getRawIndex(t);return this._nodes[e]},t.prototype.getNodeById=function(t){return this.root.getNodeById(t)},t.prototype.update=function(){for(var t=this.data,e=this._nodes,n=0,i=e.length;no&&(o=t.depth)}));var a=t.expandAndCollapse&&t.initialTreeDepth>=0?t.initialTreeDepth:o;return r.root.eachNode("preorder",(function(t){var e=t.hostTree.data.getRawDataItem(t.dataIndex);t.isExpand=e&&null!=e.collapsed?!e.collapsed:t.depth<=a})),r.data},e.prototype.getOrient=function(){var t=this.get("orient");return"horizontal"===t?t="LR":"vertical"===t&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,e,n){for(var i=this.getData().tree,r=i.root.children[0],o=i.getNodeByDataIndex(t),a=o.getValue(),s=o.name;o&&o!==r;)s=o.parentNode.name+"."+s,o=o.parentNode;return Yd("nameValue",{name:s,value:a,noValue:isNaN(a)||null==a})},e.type="series.tree",e.layoutMode="box",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderColor:"#c23531",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(rf);function xI(t,e){for(var n,i=[t];n=i.pop();)if(e(n),n.isExpand){var r=n.children;if(r.length)for(var o=r.length-1;o>=0;o--)i.push(r[o])}}function bI(t,e){t.eachSeriesByType("tree",(function(t){!function(t,e){var n=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=n;var i=t.get("layout"),r=0,o=0,a=null;"radial"===i?(r=2*Math.PI,o=Math.min(n.height,n.width)/2,a=XM((function(t,e){return(t.parentNode===e.parentNode?1:2)/t.depth}))):(r=n.width,o=n.height,a=XM());var s=t.getData().tree.root,l=s.children[0];if(l){!function(t){var e=t;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var n,i,r=[e];n=r.pop();)if(i=n.children,n.isExpand&&i.length)for(var o=i.length-1;o>=0;o--){var a=i[o];a.hierNode={defaultAncestor:null,ancestor:a,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},r.push(a)}}(s),function(t,e,n){for(var i,r=[t],o=[];i=r.pop();)if(o.push(i),i.isExpand){var a=i.children;if(a.length)for(var s=0;sh.getLayout().x&&(h=t),t.depth>c.depth&&(c=t)}));var p=u===h?1:a(u,h)/2,d=p-u.getLayout().x,f=0,g=0,y=0,v=0;if("radial"===i)f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),xI(l,(function(t){y=(t.getLayout().x+d)*f,v=(t.depth-1)*g;var e=UM(y,v);t.setLayout({x:e.x,y:e.y,rawX:y,rawY:v},!0)}));else{var m=t.getOrient();"RL"===m||"LR"===m?(g=o/(h.getLayout().x+p+d),f=r/(c.depth-1||1),xI(l,(function(t){v=(t.getLayout().x+d)*g,y="LR"===m?(t.depth-1)*f:r-(t.depth-1)*f,t.setLayout({x:y,y:v},!0)}))):"TB"!==m&&"BT"!==m||(f=r/(h.getLayout().x+p+d),g=o/(c.depth-1||1),xI(l,(function(t){y=(t.getLayout().x+d)*f,v="TB"===m?(t.depth-1)*g:o-(t.depth-1)*g,t.setLayout({x:y,y:v},!0)})))}}}(t,e)}))}function wI(t){t.eachSeriesByType("tree",(function(t){var e=t.getData();e.tree.eachNode((function(t){var n=t.getModel().getModel("itemStyle").getItemStyle();I(e.ensureUniqueItemVisual(t.dataIndex,"style"),n)}))}))}function SI(t,e,n){var i=t.getZoom(),r=t.getCenter(),o=e.zoom,a=t.dataToPoint(r);if(null!=e.dx&&null!=e.dy&&(a[0]-=e.dx,a[1]-=e.dy,t.setCenter(t.pointToData(a))),null!=o){if(n){var s=n.min||0,l=n.max||1/0;o=Math.max(Math.min(i*o,l),s)/i}t.scaleX*=o,t.scaleY*=o;var u=(e.originX-t.x)*(o-1),h=(e.originY-t.y)*(o-1);t.x-=u,t.y-=h,t.updateTransform(),t.setCenter(t.pointToData(a)),t.setZoom(o*i)}return{center:t.getCenter(),zoom:t.getZoom()}}function MI(t,e,n){if(t&&A(e,t.type)>=0){var i=n.getData().tree.root,r=t.targetNode;if("string"==typeof r&&(r=i.getNodeById(r)),r&&i.contains(r))return{node:r};var o=t.targetNodeId;if(null!=o&&(r=i.getNodeById(o)))return{node:r}}}function II(t){for(var e=[];t;)(t=t.parentNode)&&e.push(t);return e.reverse()}function TI(t,e){return A(II(t),e)>=0}function CI(t,e){for(var n=[];t;){var i=t.dataIndex;n.push({name:t.name,dataIndex:i,value:e.getRawValue(i)}),t=t.parentNode}return n.reverse(),n}var AI=function(){},DI=["treemapZoomToNode","treemapRender","treemapMove"];function LI(t){var e=t.getData().tree,n={};e.eachNode((function(e){for(var i=e;i&&i.depth>1;)i=i.parentNode;var r=hp(t.ecModel,i.name||i.dataIndex+"",n);e.setVisual("decal",r)}))}var kI=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.preventUsingHoverLayer=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};PI(n);var i=t.levels||[],r=this.designatedVisualItemStyle={},o=new Sh({itemStyle:r},this,e),a=O((i=t.levels=function(t,e){var n,i,r=_r(e.get("color")),o=_r(e.get(["aria","decal","decals"]));if(!r)return;P(t=t||[],(function(t){var e=new Sh(t),r=e.get("color"),o=e.get("decal");(e.get(["itemStyle","color"])||r&&"none"!==r)&&(n=!0),(e.get(["itemStyle","decal"])||o&&"none"!==o)&&(i=!0)}));var a=t[0]||(t[0]={});n||(a.color=r.slice());!i&&o&&(a.decal=o.slice());return t}(i,e))||[],(function(t){return new Sh(t,o,e)}),this),s=mI.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=s.getNodeByDataIndex(e),i=a[n.depth];return t.parentModel=i||o,t}))}));return s.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,e,n){var i=this.getData(),r=this.getRawValue(t);return Yd("nameValue",{name:i.getName(t),value:r})},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=CI(i,this),n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},I(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var e=this._idIndexMap;e||(e=this._idIndexMap=ht(),this._idIndexMapCount=0);var n=e.get(t);return null==n&&e.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){LI(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.1024,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],ellipsis:!0,verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(rf);function PI(t){var e=0;P(t.children,(function(t){PI(t);var n=t.value;F(n)&&(n=n[0]),e+=n}));var n=t.value;F(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),F(t.value)?t.value[0]=n:t.value=n}var OI=function(){function t(t){this.group=new zi,t.add(this.group)}return t.prototype.render=function(t,e,n,i){var r=t.getModel("breadcrumb"),o=this.group;if(o.removeAll(),r.get("show")&&n){var a=r.getModel("itemStyle"),s=a.getModel("textStyle"),l={pos:{left:r.get("left"),right:r.get("right"),top:r.get("top"),bottom:r.get("bottom")},box:{width:e.getWidth(),height:e.getHeight()},emptyItemWidth:r.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,l,s),this._renderContent(t,l,a,s,i),Dc(o,l.pos,l.box)}},t.prototype._prepare=function(t,e,n){for(var i=t;i;i=i.parentNode){var r=Tr(i.getModel().get("name"),""),o=n.getTextRect(r),a=Math.max(o.width+16,e.emptyItemWidth);e.totalWidth+=a+8,e.renderList.push({node:i,text:r,width:a})}},t.prototype._renderContent=function(t,e,n,i,r){for(var o,a,s,l,u,h,c,p,d,f=0,g=e.emptyItemWidth,y=t.get(["breadcrumb","height"]),v=(o=e.pos,a=e.box,l=a.width,u=a.height,h=Zi(o.left,l),c=Zi(o.top,u),p=Zi(o.right,l),d=Zi(o.bottom,u),(isNaN(h)||isNaN(parseFloat(o.left)))&&(h=0),(isNaN(p)||isNaN(parseFloat(o.right)))&&(p=l),(isNaN(c)||isNaN(parseFloat(o.top)))&&(c=0),(isNaN(d)||isNaN(parseFloat(o.bottom)))&&(d=u),s=pc(s||0),{width:Math.max(p-h-s[1]-s[3],0),height:Math.max(d-c-s[0]-s[2],0)}),m=e.totalWidth,_=e.renderList,x=_.length-1;x>=0;x--){var b=_[x],w=b.node,S=b.width,M=b.text;m>v.width&&(m-=S-g,S=g,M=null);var I=new ql({shape:{points:RI(f,0,S,y,x===_.length-1,0===x)},style:T(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new ls({style:{text:M,fill:i.getTextColor(),font:i.getFont()}}),textConfig:{position:"inside"},z:10,onclick:V(r,w)});I.disableLabelAnimation=!0,this.group.add(I),NI(I,t,w),f+=S+8}},t.prototype.remove=function(){this.group.removeAll()},t}();function RI(t,e,n,i,r,o){var a=[[r?t:t-5,e],[t+n,e],[t+n,e+i],[r?t:t-5,e+i]];return!o&&a.splice(2,0,[t+n+5,e+i/2]),!r&&a.push([t,e+i/2]),a}function NI(t,e,n){ys(t).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.componentIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:n&&n.dataIndex,name:n&&n.name},treePathInfo:n&&CI(n,e)}}var EI=function(){function t(){this._storage=[],this._elExistsMap={}}return t.prototype.add=function(t,e,n,i,r){return!this._elExistsMap[t.id]&&(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:n,delay:i,easing:r}),!0)},t.prototype.finished=function(t){return this._finishedCallback=t,this},t.prototype.start=function(){for(var t=this,e=this._storage.length,n=function(){--e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},i=0,r=this._storage.length;i3||Math.abs(t.dy)>3)){var e=this.seriesModel.getData().tree.root;if(!e)return;var n=e.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var e=t.originX,n=t.originY;if("animating"!==this._state){var i=this.seriesModel.getData().tree.root;if(!i)return;var r=i.getLayout();if(!r)return;var o=new Rn(r.x,r.y,r.width,r.height),a=this.seriesModel.layoutInfo,s=[1,0,0,1,0,0];me(s,s,[-(e-=a.x),-(n-=a.y)]),xe(s,s,[t.scale,t.scale]),me(s,s,[e,n]),o.applyTransform(s),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:o.x,y:o.y,width:o.width,height:o.height}})}},e.prototype._initEvents=function(t){var e=this;t.on("click",(function(t){if("ready"===e._state){var n=e.seriesModel.get("nodeClick",!0);if(n){var i=e.findTarget(t.offsetX,t.offsetY);if(i){var r=i.node;if(r.getLayout().isLeafRoot)e._rootToNode(i);else if("zoomToNode"===n)e._zoomToNode(i);else if("link"===n){var o=r.hostTree.data.getItemModel(r.dataIndex),a=o.get("link",!0),s=o.get("target",!0)||"blank";a&&wc(a,s)}}}}}),this)},e.prototype._renderBreadcrumb=function(t,e,n){var i=this;n||(n=null!=t.get("leafDepth",!0)?{node:t.getViewRoot()}:this.findTarget(e.getWidth()/2,e.getHeight()/2))||(n={node:t.getData().tree.root}),(this._breadcrumb||(this._breadcrumb=new OI(this.group))).render(t,e,n.node,(function(e){"animating"!==i._state&&(TI(t.getViewRoot(),e)?i._rootToNode({node:e}):i._zoomToNode({node:e}))}))},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage={nodeGroup:[],background:[],content:[]},this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,e){var n;return this.seriesModel.getViewRoot().eachNode({attr:"viewChildren",order:"preorder"},(function(i){var r=this._storage.background[i.getRawIndex()];if(r){var o=r.transformCoordToLocal(t,e),a=r.shape;if(!(a.x<=o[0]&&o[0]<=a.x+a.width&&a.y<=o[1]&&o[1]<=a.y+a.height))return!1;n={node:i,offsetX:o[0],offsetY:o[1]}}}),this),n},e.type="treemap",e}(yf);var XI=P,UI=X,ZI=-1,jI=function(){function t(e){var n=e.mappingMethod,i=e.type,r=this.option=w(e);this.type=i,this.mappingMethod=n,this._normalizeData=rT[n];var o=t.visualHandlers[i];this.applyVisual=o.applyVisual,this.getColorMapper=o.getColorMapper,this._normalizedToVisual=o._normalizedToVisual[n],"piecewise"===n?(qI(r),function(t){var e=t.pieceList;t.hasSpecialVisual=!1,P(e,(function(e,n){e.originIndex=n,null!=e.visual&&(t.hasSpecialVisual=!0)}))}(r)):"category"===n?r.categories?function(t){var e=t.categories,n=t.categoryMap={},i=t.visual;if(XI(e,(function(t,e){n[t]=e})),!F(i)){var r=[];X(i)?XI(i,(function(t,e){var i=n[e];r[null!=i?i:ZI]=t})):r[-1]=i,i=iT(t,r)}for(var o=e.length-1;o>=0;o--)null==i[o]&&(delete n[e[o]],e.pop())}(r):qI(r,!0):(rt("linear"!==n||r.dataExtent),qI(r))}return t.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},t.prototype.getNormalizer=function(){return B(this._normalizeData,this)},t.listVisualTypes=function(){return z(t.visualHandlers)},t.isValidType=function(e){return t.visualHandlers.hasOwnProperty(e)},t.eachVisual=function(t,e,n){X(t)?P(t,e,n):e.call(n,t)},t.mapVisual=function(e,n,i){var r,o=F(e)?[]:X(e)?{}:(r=!0,null);return t.eachVisual(e,(function(t,e){var a=n.call(i,t,e);r?o=a:o[e]=a})),o},t.retrieveVisuals=function(e){var n,i={};return e&&XI(t.visualHandlers,(function(t,r){e.hasOwnProperty(r)&&(i[r]=e[r],n=!0)})),n?i:null},t.prepareVisualTypes=function(t){if(F(t))t=t.slice();else{if(!UI(t))return[];var e=[];XI(t,(function(t,n){e.push(n)})),t=e}return t.sort((function(t,e){return"color"===e&&"color"!==t&&0===t.indexOf("color")?1:-1})),t},t.dependsOn=function(t,e){return"color"===e?!(!t||0!==t.indexOf(e)):t===e},t.findPieceIndex=function(t,e,n){for(var i,r=1/0,o=0,a=e.length;ou[1]&&(u[1]=l);var h=e.get("colorMappingBy"),c={type:a.name,dataExtent:u,visual:a.range};"color"!==c.type||"index"!==h&&"id"!==h?c.mappingMethod="linear":(c.mappingMethod="category",c.loop=!0);var p=new jI(c);return aT(p).drColorMappingBy=h,p}(0,r,o,0,u,d);P(d,(function(t,e){if(t.depth>=n.length||t===n[t.depth]){var o=function(t,e,n,i,r,o){var a=I({},e);if(r){var s=r.type,l="color"===s&&aT(r).drColorMappingBy,u="index"===l?i:"id"===l?o.mapIdToIndex(n.getId()):n.getValue(t.get("visualDimension"));a[s]=r.mapValueToVisual(u)}return a}(r,u,t,e,f,i);lT(t,o,n,i)}}))}else s=uT(u),h.fill=s}}function uT(t){var e=hT(t,"color");if(e){var n=hT(t,"colorAlpha"),i=hT(t,"colorSaturation");return i&&(e=rn(e,null,null,i)),n&&(e=on(e,n)),e}}function hT(t,e){var n=t[e];if(null!=n&&"none"!==n)return n}function cT(t,e){var n=t.get(e);return F(n)&&n.length?{name:e,range:n}:null}var pT=Math.max,dT=Math.min,fT=Q,gT=P,yT=["itemStyle","borderWidth"],vT=["itemStyle","gapWidth"],mT=["upperLabel","show"],_T=["upperLabel","height"],xT={seriesType:"treemap",reset:function(t,e,n,i){var r=n.getWidth(),o=n.getHeight(),a=t.option,s=Ac(t.getBoxLayoutParams(),{width:n.getWidth(),height:n.getHeight()}),l=a.size||[],u=Zi(fT(s.width,l[0]),r),h=Zi(fT(s.height,l[1]),o),c=i&&i.type,p=MI(i,["treemapZoomToNode","treemapRootToNode"],t),d="treemapRender"===c||"treemapMove"===c?i.rootRect:null,f=t.getViewRoot(),g=II(f);if("treemapMove"!==c){var y="treemapZoomToNode"===c?function(t,e,n,i,r){var o,a=(e||{}).node,s=[i,r];if(!a||a===n)return s;var l=i*r,u=l*t.option.zoomToNodeRatio;for(;o=a.parentNode;){for(var h=0,c=o.children,p=0,d=c.length;ptr&&(u=tr),a=o}ua[1]&&(a[1]=e)}))):a=[NaN,NaN];return{sum:i,dataExtent:a}}(e,a,s);if(0===u.sum)return t.viewChildren=[];if(u.sum=function(t,e,n,i,r){if(!i)return n;for(var o=t.get("visibleMin"),a=r.length,s=a,l=a-1;l>=0;l--){var u=r["asc"===i?a-l-1:l].getValue();u/n*ei&&(i=a));var l=t.area*t.area,u=e*e*n;return l?pT(u*i/l,l/(u*r)):1/0}function ST(t,e,n,i,r){var o=e===n.width?0:1,a=1-o,s=["x","y"],l=["width","height"],u=n[s[o]],h=e?t.area/e:0;(r||h>n[l[a]])&&(h=n[l[a]]);for(var c=0,p=t.length;ci&&(i=e);var o=i%2?i+2:i+3;r=[];for(var a=0;a0&&(m[0]=-m[0],m[1]=-m[1]);var x=v[0]<0?-1:1;if("start"!==i.__position&&"end"!==i.__position){var b=-Math.atan2(v[1],v[0]);u[0].8?"left":h[0]<-.8?"right":"center",p=h[1]>.8?"top":h[1]<-.8?"bottom":"middle";break;case"start":i.x=-h[0]*f+l[0],i.y=-h[1]*g+l[1],c=h[0]>.8?"right":h[0]<-.8?"left":"center",p=h[1]>.8?"bottom":h[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=f*x+l[0],i.y=l[1]+w,c=v[0]<0?"right":"left",i.originX=-f*x,i.originY=-w;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=_[0],i.y=_[1]+w,c="center",i.originY=-w;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-f*x+u[0],i.y=u[1]+w,c=v[0]>=0?"right":"left",i.originX=f*x,i.originY=-w}i.scaleX=i.scaleY=r,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||c})}}}function S(t,e){var n=t.__specifiedRotation;if(null==n){var i=a.tangentAt(e);t.attr("rotation",(1===e?-1:1)*Math.PI/2-Math.atan2(i[1],i[0]))}else t.attr("rotation",n)}},e}(zi),aC=function(){function t(t){this.group=new zi,this._LineCtor=t||oC}return t.prototype.isPersistent=function(){return!0},t.prototype.updateData=function(t){var e=this,n=this,i=n.group,r=n._lineData;n._lineData=t,r||i.removeAll();var o=sC(t);t.diff(r).add((function(n){e._doAdd(t,n,o)})).update((function(n,i){e._doUpdate(r,t,i,n,o)})).remove((function(t){i.remove(r.getItemGraphicEl(t))})).execute()},t.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl((function(e,n){e.updateLayout(t,n)}),this)},t.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=sC(t),this._lineData=null,this.group.removeAll()},t.prototype.incrementalUpdate=function(t,e){function n(t){t.isGroup||function(t){return t.animators&&t.animators.length>0}(t)||(t.incremental=!0,t.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i=0?i+=u:i-=u:f>=0?i-=u:i+=u}return i}function vC(t,e){var n=[],i=Yo,r=[[],[],[]],o=[[],[]],a=[];e/=2,t.eachEdge((function(t,s){var l=t.getLayout(),u=t.getVisual("fromSymbol"),h=t.getVisual("toSymbol");l.__original||(l.__original=[mt(l[0]),mt(l[1])],l[2]&&l.__original.push(mt(l[2])));var c=l.__original;if(null!=l[2]){if(vt(r[0],c[0]),vt(r[1],c[2]),vt(r[2],c[1]),u&&"none"!==u){var p=GT(t.node1),d=yC(r,c[0],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[0][0]=n[3],r[1][0]=n[4],i(r[0][1],r[1][1],r[2][1],d,n),r[0][1]=n[3],r[1][1]=n[4]}if(h&&"none"!==h){p=GT(t.node2),d=yC(r,c[1],p*e);i(r[0][0],r[1][0],r[2][0],d,n),r[1][0]=n[1],r[2][0]=n[2],i(r[0][1],r[1][1],r[2][1],d,n),r[1][1]=n[1],r[2][1]=n[2]}vt(l[0],r[0]),vt(l[1],r[2]),vt(l[2],r[1])}else{if(vt(o[0],c[0]),vt(o[1],c[1]),wt(a,o[1],o[0]),At(a,a),u&&"none"!==u){p=GT(t.node1);bt(o[0],o[0],a,p*e)}if(h&&"none"!==h){p=GT(t.node2);bt(o[1],o[1],a,-p*e)}vt(l[0],o[0]),vt(l[1],o[1])}}))}function mC(t){return"view"===t.type}var _C=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){var n=new Tb,i=new aC,r=this.group;this._controller=new QS(e.getZr()),this._controllerHost={target:r},r.add(n.group),r.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,e,n){var i=this,r=t.coordinateSystem;this._model=t;var o=this._symbolDraw,a=this._lineDraw,s=this.group;if(mC(r)){var l={x:r.x,y:r.y,scaleX:r.scaleX,scaleY:r.scaleY};this._firstRender?s.attr(l):Ou(s,l,t)}vC(t.getGraph(),FT(t));var u=t.getData();o.updateData(u);var h=t.getEdgeData();a.updateData(h),this._updateNodeAndLinkScale(),this._updateController(t,e,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p),u.graph.eachNode((function(t){var e=t.dataIndex,n=t.getGraphicEl(),r=t.getModel();n.off("drag").off("dragend");var o=r.get("draggable");o&&n.on("drag",(function(){c&&(c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(e),u.setItemLayout(e,[n.x,n.y]))})).on("dragend",(function(){c&&c.setUnfixed(e)})),n.setDraggable(o&&!!c),"adjacency"===r.get(["emphasis","focus"])&&(ys(n).focus=t.getAdjacentDataIndices())})),u.graph.eachEdge((function(t){var e=t.getGraphicEl();"adjacency"===t.getModel().get(["emphasis","focus"])&&(ys(e).focus={edge:[t.dataIndex],node:[t.node1.dataIndex,t.node2.dataIndex]})}));var d="circular"===t.get("layout")&&t.get(["circular","rotateLabel"]),f=u.getLayout("cx"),g=u.getLayout("cy");u.eachItemGraphicEl((function(t,e){var n=u.getItemModel(e).get(["label","rotate"])||0,i=t.getSymbolPath();if(d){var r=u.getItemLayout(e),o=Math.atan2(r[1]-g,r[0]-f);o<0&&(o=2*Math.PI+o);var a=r[0]=0&&t.call(e,n[r],r)},t.prototype.eachEdge=function(t,e){for(var n=this.edges,i=n.length,r=0;r=0&&n[r].node1.dataIndex>=0&&n[r].node2.dataIndex>=0&&t.call(e,n[r],r)},t.prototype.breadthFirstTraverse=function(t,e,n,i){if(e instanceof wC||(e=this._nodesMap[xC(e)]),e){for(var r="out"===n?"outEdges":"in"===n?"inEdges":"edges",o=0;o=0&&n.node2.dataIndex>=0}));for(r=0,o=i.length;r=0&&this[t][e].setItemVisual(this.dataIndex,n,i)},getVisual:function(n){return this[t][e].getItemVisual(this.dataIndex,n)},setLayout:function(n,i){this.dataIndex>=0&&this[t][e].setItemLayout(this.dataIndex,n,i)},getLayout:function(){return this[t][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[t][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[t][e].getRawIndex(this.dataIndex)}}}function IC(t,e,n,i,r){for(var o=new bC(i),a=0;a "+p)),u++)}var d,f=n.get("coordinateSystem");if("cartesian2d"===f||"polar"===f)d=Hm(t,n);else{var g=_p.get(f),y=g&&g.dimensions||[];A(y,"value")<0&&y.concat(["value"]);var v=Nm(t,{coordDimensions:y});(d=new Pm(v,n)).initData(t)}var m=new Pm(["value"],n);return m.initData(l,s),r&&r(d,m),uI({mainData:d,struct:o,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),o.update(),o}L(wC,MC("hostGraph","data")),L(SC,MC("hostGraph","edgeData"));var TC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments);var n=this;function i(){return n._categoriesData}this.legendVisualProvider=new Nw(i,i),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(e){t.prototype.mergeDefaultAndTheme.apply(this,arguments),xr(e,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,e){var n,i=t.edges||t.links||[],r=t.data||t.nodes||[],o=this;if(r&&i){kT(n=this)&&(n.__curvenessList=[],n.__edgeMap={},PT(n));var a=IC(r,i,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t){var e=o._categoriesModels[t.getShallow("category")];return e&&(e.parentModel=t.parentModel,t.parentModel=e),t}));var n=Sh.prototype.getModel;function i(t,e){var i=n.call(this,t,e);return i.resolveParentPath=r,i}function r(t){if(t&&("label"===t[0]||"label"===t[1])){var e=t.slice();return"label"===t[0]?e[0]="edgeLabel":"label"===t[1]&&(e[1]="edgeLabel"),e}return t}e.wrapMethod("getItemModel",(function(t){return t.resolveParentPath=r,t.getModel=i,t}))}));return P(a.edges,(function(t){!function(t,e,n,i){if(kT(n)){var r=OT(t,e,n),o=n.__edgeMap,a=o[RT(r)];o[r]&&!a?o[r].isForward=!0:a&&o[r]&&(a.isForward=!0,o[r].isForward=!1),o[r]=o[r]||[],o[r].push(i)}}(t.node1,t.node2,this,t.dataIndex)}),this),a.data}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,e,n){if("edge"===n){var i=this.getData(),r=this.getDataParams(t,n),o=i.graph.getEdgeByIndex(t),a=i.getName(o.node1.dataIndex),s=i.getName(o.node2.dataIndex),l=[];return null!=a&&l.push(a),null!=s&&l.push(s),Yd("nameValue",{name:l.join(" > "),value:r.value,noValue:null==r.value})}return tf({series:this,dataIndex:t,multipleSeries:e})},e.prototype._updateCategoriesData=function(){var t=O(this.option.categories||[],(function(t){return null!=t.value?t:I({value:0},t)})),e=new Pm(["value"],this);e.initData(t),this._categoriesData=e,this._categoriesModels=e.mapArray((function(t){return e.getItemModel(t)}))},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return t.prototype.isAnimationEnabled.call(this)&&!("force"===this.get("layout")&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,focusNodeAdjacency:!1,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(rf),CC={type:"graphRoam",event:"graphRoam",update:"none"};var AC=function(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0},DC=function(t){function e(e){var n=t.call(this,e)||this;return n.type="pointer",n}return n(e,t),e.prototype.getDefaultShape=function(){return new AC},e.prototype.buildPath=function(t,e){var n=Math.cos,i=Math.sin,r=e.r,o=e.width,a=e.angle,s=e.x-n(a)*o*(o>=r/3?1:2),l=e.y-i(a)*o*(o>=r/3?1:2);a=e.angle-Math.PI/2,t.moveTo(s,l),t.lineTo(e.x+n(a)*o,e.y+i(a)*o),t.lineTo(e.x+n(e.angle)*r,e.y+i(e.angle)*r),t.lineTo(e.x-n(a)*o,e.y-i(a)*o),t.lineTo(s,l)},e}(Za);function LC(t,e){var n=null==t?"":t+"";return e&&("string"==typeof e?n=e.replace("{value}",n):"function"==typeof e&&(n=e(t))),n}var kC=2*Math.PI,PC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),r=function(t,e){var n=t.get("center"),i=e.getWidth(),r=e.getHeight(),o=Math.min(i,r);return{cx:Zi(n[0],e.getWidth()),cy:Zi(n[1],e.getHeight()),r:Zi(t.get("radius"),o/2)}}(t,n);this._renderMain(t,e,n,i,r),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,e,n,i,r){for(var o=this.group,a=t.get("clockwise"),s=-t.get("startAngle")/180*Math.PI,l=-t.get("endAngle")/180*Math.PI,u=t.getModel("axisLine"),h=u.get("roundCap")?aw:Wl,c=u.get("show"),p=u.getModel("lineStyle"),d=p.get("width"),f=(l-s)%kC||l===s?(l-s)%kC:kC,g=s,y=0;c&&y=t&&(0===e?0:i[e-1][0]).8?"bottom":"middle",align:u<-.4?"left":u>.4?"right":"center"},{inheritColor:R}),silent:!0}))}if(m.get("show")&&L!==x){P=(P=m.get("distance"))?P+l:l;for(var N=0;N<=b;N++){u=Math.cos(M),h=Math.sin(M);var E=new tu({shape:{x1:u*(f-P)+p,y1:h*(f-P)+d,x2:u*(f-S-P)+p,y2:h*(f-S-P)+d},silent:!0,style:A});"auto"===A.stroke&&E.setStyle({stroke:i((L+N/b)/x)}),c.add(E),M+=T}M-=T}else M+=I}},e.prototype._renderPointer=function(t,e,n,i,r,o,a,s,l){var u=this.group,h=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),f=t.getModel("progress"),g=f.get("show"),y=t.getData(),v=y.mapDimension("value"),m=+t.get("min"),_=+t.get("max"),x=[m,_],b=[o,a];function w(e,n){var i,o=y.getItemModel(e).getModel("pointer"),a=Zi(o.get("width"),r.r),s=Zi(o.get("length"),r.r),l=t.get(["pointer","icon"]),u=o.get("offsetCenter"),h=Zi(u[0],r.r),c=Zi(u[1],r.r),p=o.get("keepAspect");return(i=l?uy(l,h-a/2,c-s,a,s,null,p):new DC({shape:{angle:-Math.PI/2,width:a,r:s,x:h,y:c}})).rotation=-(n+Math.PI/2),i.x=r.cx,i.y=r.cy,i}function S(t,e){var n=f.get("roundCap")?aw:Wl,i=f.get("overlap"),a=i?f.get("width"):l/y.count(),u=i?r.r-a:r.r-(t+1)*a,h=i?r.r:r.r-t*a,c=new n({shape:{startAngle:o,endAngle:e,cx:r.cx,cy:r.cy,clockwise:s,r0:u,r:h}});return i&&(c.z2=_-y.get(v,t)%_),c}(g||d)&&(y.diff(h).add((function(e){if(d){var n=w(e,o);Ru(n,{rotation:-(Ui(y.get(v,e),x,b,!0)+Math.PI/2)},t),u.add(n),y.setItemGraphicEl(e,n)}if(g){var i=S(e,o),r=f.get("clip");Ru(i,{shape:{endAngle:Ui(y.get(v,e),x,b,r)}},t),u.add(i),p[e]=i}})).update((function(e,n){if(d){var i=h.getItemGraphicEl(n),r=i?i.rotation:o,a=w(e,r);a.rotation=r,Ou(a,{rotation:-(Ui(y.get(v,e),x,b,!0)+Math.PI/2)},t),u.add(a),y.setItemGraphicEl(e,a)}if(g){var s=c[n],l=S(e,s?s.shape.endAngle:o),m=f.get("clip");Ou(l,{shape:{endAngle:Ui(y.get(v,e),x,b,m)}},t),u.add(l),p[e]=l}})).execute(),y.each((function(t){var e=y.getItemModel(t),n=e.getModel("emphasis");if(d){var r=y.getItemGraphicEl(t);r.useStyle(y.getItemVisual(t,"style")),r.setStyle(e.getModel(["pointer","itemStyle"]).getItemStyle()),"auto"===r.style.fill&&r.setStyle("fill",i(Ui(y.get(v,t),x,[0,1],!0))),r.z2EmphasisLift=0,nl(r,e),Js(r,n.get("focus"),n.get("blurScope"))}if(g){var o=p[t];o.useStyle(y.getItemVisual(t,"style")),o.setStyle(e.getModel(["progress","itemStyle"]).getItemStyle()),o.z2EmphasisLift=0,nl(o,e),Js(o,n.get("focus"),n.get("blurScope"))}})),this._progressEls=p)},e.prototype._renderAnchor=function(t,e){var n=t.getModel("anchor");if(n.get("show")){var i=n.get("size"),r=n.get("icon"),o=n.get("offsetCenter"),a=n.get("keepAspect"),s=uy(r,e.cx-i/2+Zi(o[0],e.r),e.cy-i/2+Zi(o[1],e.r),i,i,null,a);s.z2=n.get("showAbove")?1:0,s.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(s)}},e.prototype._renderTitleAndDetail=function(t,e,n,i,r){var o=this,a=t.getData(),s=a.mapDimension("value"),l=+t.get("min"),u=+t.get("max"),h=new zi,c=[],p=[],d=t.isAnimationEnabled();a.diff(this._data).add((function(t){c[t]=new ls({silent:!0}),p[t]=new ls({silent:!0})})).update((function(t,e){c[t]=o._titleEls[e],p[t]=o._detailEls[e]})).execute(),a.each((function(e){var n=a.getItemModel(e),o=a.get(s,e),f=new zi,g=i(Ui(o,[l,u],[0,1],!0)),y=n.getModel("title");if(y.get("show")){var v=y.get("offsetCenter"),m=r.cx+Zi(v[0],r.r),_=r.cy+Zi(v[1],r.r);(C=c[e]).attr({style:nh(y,{x:m,y:_,text:a.getName(e),align:"center",verticalAlign:"middle"},{inheritColor:g})}),f.add(C)}var x=n.getModel("detail");if(x.get("show")){var b=x.get("offsetCenter"),w=r.cx+Zi(b[0],r.r),S=r.cy+Zi(b[1],r.r),M=Zi(x.get("width"),r.r),I=Zi(x.get("height"),r.r),T=t.get(["progress","show"])?a.getItemVisual(e,"style").fill:g,C=p[e],A=x.get("formatter");C.attr({style:nh(x,{x:w,y:S,text:LC(o,A),width:isNaN(M)?null:M,height:isNaN(I)?null:I,align:"center",verticalAlign:"middle"},{inheritColor:T})}),hh(C,{normal:x},o,(function(t){return LC(t,A)})),d&&ch(C,e,a,t,{getFormattedLabel:function(t,e,n,i,r,a){return LC(a?a.interpolatedValue:o,A)}}),f.add(C)}h.add(f)})),this.group.add(h),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(yf),OC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.visualStyleAccessPath="itemStyle",n.useColorPaletteOnData=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){return Rw(this,["value"])},e.type="series.gauge",e.defaultOption={zlevel:0,z:2,center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12},pointer:{icon:null,offsetCenter:[0,0],show:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(rf);var RC=["itemStyle","opacity"],NC=function(t){function e(e,n){var i=t.call(this)||this,r=i,o=new $l,a=new ls;return r.setTextContent(a),i.setTextGuideLine(o),i.updateData(e,n,!0),i}return n(e,t),e.prototype.updateData=function(t,e,n){var i=this,r=t.hostModel,o=t.getItemModel(e),a=t.getItemLayout(e),s=o.getModel("emphasis"),l=o.get(RC);l=null==l?1:l,i.useStyle(t.getItemVisual(e,"style")),i.style.lineJoin="round",n?(i.setShape({points:a.points}),i.style.opacity=0,Ru(i,{style:{opacity:l}},r,e)):Ou(i,{style:{opacity:l},shape:{points:a.points}},r,e),nl(i,o),this._updateLabel(t,e),Js(this,s.get("focus"),s.get("blurScope"))},e.prototype._updateLabel=function(t,e){var n=this,i=this.getTextGuideLine(),r=n.getTextContent(),o=t.hostModel,a=t.getItemModel(e),s=t.getItemLayout(e).label,l=t.getItemVisual(e,"style"),u=l.fill;th(r,eh(a),{labelFetcher:t.hostModel,labelDataIndex:e,defaultOpacity:l.opacity,defaultText:t.getName(e)},{normal:{align:s.textAlign,verticalAlign:s.verticalAlign}}),n.setTextConfig({local:!0,inside:!!s.inside,insideStroke:u,outsideFill:u});var h=s.linePoints;i.setShape({points:h}),n.textGuideLineConfig={anchor:h?new In(h[0][0],h[0][1]):null},Ou(r,{style:{x:s.x,y:s.y}},o,e),r.attr({rotation:s.rotation,originX:s.x,originY:s.y,z2:10}),zg(n,Bg(a),{stroke:u})},e}(ql),EC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreLabelLineUpdate=!0,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this._data,o=this.group;i.diff(r).add((function(t){var e=new NC(i,t);i.setItemGraphicEl(t,e),o.add(e)})).update((function(t,e){var n=r.getItemGraphicEl(e);n.updateData(i,t),o.add(n),i.setItemGraphicEl(t,n)})).remove((function(e){zu(r.getItemGraphicEl(e),t,e)})).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(yf),zC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.useColorPaletteOnData=!0,n}return n(e,t),e.prototype.init=function(e){t.prototype.init.apply(this,arguments),this.legendVisualProvider=new Nw(B(this.getData,this),B(this.getRawData,this)),this._defaultLabelLine(e)},e.prototype.getInitialData=function(t,e){return Rw(this,{coordDimensions:["value"],encodeDefaulter:V(Qc,this)})},e.prototype._defaultLabelLine=function(t){xr(t,"labelLine",["show"]);var e=t.labelLine,n=t.emphasis.labelLine;e.show=e.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(e){var n=this.getData(),i=t.prototype.getDataParams.call(this,e),r=n.mapDimension("value"),o=n.getSum(r);return i.percent=o?+(n.get(r,e)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={zlevel:0,z:2,legendHoverLink:!0,left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(rf);function BC(t,e){t.eachSeriesByType("funnel",(function(t){var n=t.getData(),i=n.mapDimension("value"),r=t.get("sort"),o=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e),a=t.get("orient"),s=o.width,l=o.height,u=function(t,e){for(var n=t.mapDimension("value"),i=t.mapArray(n,(function(t){return t})),r=[],o="ascending"===e,a=0,s=t.count();a5)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]);"none"!==i.behavior&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(t){if(!this._mouseDownPoint&&$C(this,"mousemove")){var e=this._model,n=e.coordinateSystem.getSlidedAxisExpandWindow([t.offsetX,t.offsetY]),i=n.behavior;"jump"===i&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand("none"===i?null:{axisExpandWindow:n.axisExpandWindow,animation:"jump"===i?null:{duration:0}})}}};function $C(t,e){var n=t._model;return n.get("axisExpandable")&&n.get("axisExpandTriggerOn")===e}var JC=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var e=this.option;t&&S(e,t,!0),this._initDimensions()},e.prototype.contains=function(t,e){var n=t.get("parallelIndex");return null!=n&&e.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){P(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],(function(e){t.hasOwnProperty(e)&&(this.option[e]=t[e])}),this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],e=this.parallelAxisIndex=[];P(N(this.ecModel.queryComponents({mainType:"parallelAxis"}),(function(t){return(t.get("parallelIndex")||0)===this.componentIndex}),this),(function(n){t.push("dim"+n.get("dim")),e.push(n.componentIndex)}))},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={zlevel:0,z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Nc),QC=function(t){function e(e,n,i,r,o){var a=t.call(this,e,n,i)||this;return a.type=r||"value",a.axisIndex=o,a}return n(e,t),e.prototype.isHorizontal=function(){return"horizontal"!==this.coordinateSystem.getModel().get("layout")},e}(vx);function tA(t,e,n,i,r,o){t=t||0;var a=n[1]-n[0];if(null!=r&&(r=nA(r,[0,a])),null!=o&&(o=Math.max(o,null!=r?r:0)),"all"===i){var s=Math.abs(e[1]-e[0]);s=nA(s,[0,a]),r=o=nA(s,[r,o]),i=0}e[0]=nA(e[0],n),e[1]=nA(e[1],n);var l=eA(e,i);e[i]+=t;var u,h=r||0,c=n.slice();return l.sign<0?c[0]+=h:c[1]-=h,e[i]=nA(e[i],c),u=eA(e,i),null!=r&&(u.sign!==l.sign||u.spano&&(e[1-i]=e[i]+u.sign*o),e}function eA(t,e){var n=t[e]-t[1-e];return{span:Math.abs(n),sign:n>0?-1:n<0?1:e?-1:1}}function nA(t,e){return Math.min(null!=e[1]?e[1]:1/0,Math.max(null!=e[0]?e[0]:-1/0,t))}var iA=P,rA=Math.min,oA=Math.max,aA=Math.floor,sA=Math.ceil,lA=ji,uA=Math.PI,hA=function(){function t(t,e,n){this.type="parallel",this._axesMap=ht(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,n)}return t.prototype._init=function(t,e,n){var i=t.dimensions,r=t.parallelAxisIndex;iA(i,(function(t,n){var i=r[n],o=e.getComponent("parallelAxis",i),a=this._axesMap.set(t,new QC(t,G_(o),[0,0],o.get("type"),i)),s="category"===a.type;a.onBand=s&&o.get("boundaryGap"),a.inverse=o.get("inverse"),o.axis=a,a.model=o,a.coordinateSystem=o.coordinateSystem=this}),this)},t.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},t.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),n=e.axisBase,i=e.layoutBase,r=e.pixelDimIndex,o=t[1-r],a=t[r];return o>=n&&o<=n+e.axisLength&&a>=i&&a<=i+e.layoutLength},t.prototype.getModel=function(){return this._model},t.prototype._updateAxesFromSeries=function(t,e){e.eachSeries((function(n){if(t.contains(n,e)){var i=n.getData();iA(this.dimensions,(function(t){var e=this._axesMap.get(t);e.scale.unionExtentFromData(i,i.mapDimension(t)),F_(e.scale,e.model)}),this)}}),this)},t.prototype.resize=function(t,e){this._rect=Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()}),this._layoutAxes()},t.prototype.getRect=function(){return this._rect},t.prototype._makeLayoutInfo=function(){var t,e=this._model,n=this._rect,i=["x","y"],r=["width","height"],o=e.get("layout"),a="horizontal"===o?0:1,s=n[r[a]],l=[0,s],u=this.dimensions.length,h=cA(e.get("axisExpandWidth"),l),c=cA(e.get("axisExpandCount")||0,[0,u]),p=e.get("axisExpandable")&&u>3&&u>c&&c>1&&h>0&&s>0,d=e.get("axisExpandWindow");d?(t=cA(d[1]-d[0],l),d[1]=d[0]+t):(t=cA(h*(c-1),l),(d=[h*(e.get("axisExpandCenter")||aA(u/2))-t/2])[1]=d[0]+t);var f=(s-t)/(u-c);f<3&&(f=0);var g=[aA(lA(d[0]/h,1))+1,sA(lA(d[1]/h,1))-1],y=f/h*d[0];return{layout:o,pixelDimIndex:a,layoutBase:n[i[a]],layoutLength:s,axisBase:n[i[1-a]],axisLength:n[r[1-a]],axisExpandable:p,axisExpandWidth:h,axisCollapseWidth:f,axisExpandWindow:d,axisCount:u,winInnerIndices:g,axisExpandWindow0Pos:y}},t.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),r=i.layout;e.each((function(t){var e=[0,i.axisLength],n=t.inverse?1:0;t.setExtent(e[n],e[1-n])})),iA(n,(function(e,n){var o=(i.axisExpandable?dA:pA)(n,i),a={horizontal:{x:o.position,y:i.axisLength},vertical:{x:0,y:o.position}},s={horizontal:uA/2,vertical:0},l=[a[r].x+t.x,a[r].y+t.y],u=s[r],h=[1,0,0,1,0,0];_e(h,h,u),me(h,h,l),this._axesLayout[e]={position:l,rotation:u,transform:h,axisNameAvailableWidth:o.axisNameAvailableWidth,axisLabelShow:o.axisLabelShow,nameTruncateMaxWidth:o.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}}),this)},t.prototype.getAxis=function(t){return this._axesMap.get(t)},t.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},t.prototype.eachActiveState=function(t,e,n,i){null==n&&(n=0),null==i&&(i=t.count());var r=this._axesMap,o=this.dimensions,a=[],s=[];P(o,(function(e){a.push(t.mapDimension(e)),s.push(r.get(e).model)}));for(var l=this.hasAxisBrushed(),u=n;ur*(1-h[0])?(l="jump",a=s-r*(1-h[2])):(a=s-r*h[1])>=0&&(a=s-r*(1-h[1]))<=0&&(a=0),(a*=e.axisExpandWidth/u)?tA(a,i,o,"all"):l="none";else{var p=i[1]-i[0];(i=[oA(0,o[1]*s/p-p/2)])[1]=rA(o[1],i[0]+p),i[0]=i[1]-p}return{axisExpandWindow:i,behavior:l}},t}();function cA(t,e){return rA(oA(t,e[0]),e[1])}function pA(t,e){var n=e.layoutLength/(e.axisCount-1);return{position:n*t,axisNameAvailableWidth:n,axisLabelShow:!0}}function dA(t,e){var n,i,r=e.layoutLength,o=e.axisExpandWidth,a=e.axisCount,s=e.axisCollapseWidth,l=e.winInnerIndices,u=s,h=!1;return t=0;n--)qi(e[n])},e.prototype.getActiveState=function(t){var e=this.activeIntervals;if(!e.length)return"normal";if(null==t||isNaN(+t))return"inactive";if(1===e.length){var n=e[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,r=e.length;i6}(t)||o){if(a&&!o){"single"===s.brushMode&&RA(t);var l=w(s);l.brushType=$A(l.brushType,a),l.panelId=a===yA?null:a.panelId,o=t._creatingCover=TA(t,l),t._covers.push(o)}if(o){var u=tD[$A(t._brushType,a)];o.__brushOption.range=u.getCreatingRange(ZA(t,o,t._track)),i&&(CA(t,o),u.updateCommon(t,o)),AA(t,o),r={isEnd:i}}}else i&&"single"===s.brushMode&&s.removeOnClick&&PA(t,e,n)&&RA(t)&&(r={isEnd:i,removeOnClick:!0});return r}function $A(t,e){return"auto"===t?e.defaultBrushType:t}var JA={mousedown:function(t){if(this._dragging)QA(this,t);else if(!t.target||!t.target.draggable){jA(t);var e=this.group.transformCoordToLocal(t.offsetX,t.offsetY);this._creatingCover=null,(this._creatingPanel=PA(this,t,e))&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(t){var e=t.offsetX,n=t.offsetY,i=this.group.transformCoordToLocal(e,n);if(function(t,e,n){if(t._brushType&&!function(t,e,n){var i=t._zr;return e<0||e>i.getWidth()||n<0||n>i.getHeight()}(t,e.offsetX,e.offsetY)){var i=t._zr,r=t._covers,o=PA(t,e,n);if(!t._dragging)for(var a=0;a=0&&(o[r[a].depth]=new Sh(r[a],this,e));if(i&&n)return IC(i,n,this,!0,(function(t,e){t.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getData().getItemLayout(e);if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t})),e.wrapMethod("getItemModel",(function(t,e){var n=t.parentModel,i=n.getGraph().getEdgeByIndex(e).node1.getLayout();if(i){var r=i.depth,o=n.levelModels[r];o&&(t.parentModel=o)}return t}))})).data},e.prototype.setNodePosition=function(t,e){var n=this.option.data[t];n.localX=e[0],n.localY=e[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,e,n){function i(t){return isNaN(t)||null==t}if("edge"===n){var r=this.getDataParams(t,n),o=r.data,a=r.value;return Yd("nameValue",{name:o.source+" -- "+o.target,value:a,noValue:i(a)})}var s=this.getGraph().getNodeByIndex(t).getLayout().value,l=this.getDataParams(t,n).data.name;return Yd("nameValue",{name:null!=l?l+"":null,value:s,noValue:i(s)})},e.prototype.optionUpdated=function(){var t=this.option;!0===t.focusNodeAdjacency&&(t.focusNodeAdjacency="allEdges")},e.prototype.getDataParams=function(e,n){var i=t.prototype.getDataParams.call(this,e,n);if(null==i.value&&"node"===n){var r=this.getGraph().getNodeByIndex(e).getLayout().value;i.value=r}return i},e.type="series.sankey",e.defaultOption={zlevel:0,z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,focusNodeAdjacency:!1,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(rf);function gD(t,e){t.eachSeriesByType("sankey",(function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),r=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}(t,e);t.layoutInfo=r;var o=r.width,a=r.height,s=t.getGraph(),l=s.nodes,u=s.edges;!function(t){P(t,(function(t){var e=ID(t.outEdges,MD),n=ID(t.inEdges,MD),i=t.getValue()||0,r=Math.max(e,n,i);t.setLayout({value:r},!0)}))}(l),function(t,e,n,i,r,o,a,s,l){(function(t,e,n,i,r,o,a){for(var s=[],l=[],u=[],h=[],c=0,p=0;p=0;v&&y.depth>d&&(d=y.depth),g.setLayout({depth:v?y.depth:c},!0),"vertical"===o?g.setLayout({dy:n},!0):g.setLayout({dx:n},!0);for(var m=0;mc-1?d:c-1;a&&"left"!==a&&function(t,e,n,i){if("right"===e){for(var r=[],o=t,a=0;o.length;){for(var s=0;s0;o--)mD(s,l*=.99,a),vD(s,r,n,i,a),TD(s,l,a),vD(s,r,n,i,a)}(t,e,o,r,i,a,s),function(t,e){var n="vertical"===e?"x":"y";P(t,(function(t){t.outEdges.sort((function(t,e){return t.node2.getLayout()[n]-e.node2.getLayout()[n]})),t.inEdges.sort((function(t,e){return t.node1.getLayout()[n]-e.node1.getLayout()[n]}))})),P(t,(function(t){var e=0,n=0;P(t.outEdges,(function(t){t.setLayout({sy:e},!0),e+=t.getLayout().dy})),P(t.inEdges,(function(t){t.setLayout({ty:n},!0),n+=t.getLayout().dy}))}))}(t,s)}(l,u,n,i,o,a,0!==N(l,(function(t){return 0===t.getLayout().value})).length?0:t.get("layoutIterations"),t.get("orient"),t.get("nodeAlign"))}))}function yD(t){var e=t.hostGraph.data.getRawDataItem(t.dataIndex);return null!=e.depth&&e.depth>=0}function vD(t,e,n,i,r){var o="vertical"===r?"x":"y";P(t,(function(t){var a,s,l;t.sort((function(t,e){return t.getLayout()[o]-e.getLayout()[o]}));for(var u=0,h=t.length,c="vertical"===r?"dx":"dy",p=0;p0&&(a=s.getLayout()[o]+l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]+s.getLayout()[c]+e;if((l=u-e-("vertical"===r?i:n))>0){a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0),u=a;for(p=h-2;p>=0;--p)(l=(s=t[p]).getLayout()[o]+s.getLayout()[c]+e-u)>0&&(a=s.getLayout()[o]-l,"vertical"===r?s.setLayout({x:a},!0):s.setLayout({y:a},!0)),u=s.getLayout()[o]}}))}function mD(t,e,n){P(t.slice().reverse(),(function(t){P(t,(function(t){if(t.outEdges.length){var i=ID(t.outEdges,_D,n)/ID(t.outEdges,MD);if(isNaN(i)){var r=t.outEdges.length;i=r?ID(t.outEdges,xD,n)/r:0}if("vertical"===n){var o=t.getLayout().x+(i-SD(t,n))*e;t.setLayout({x:o},!0)}else{var a=t.getLayout().y+(i-SD(t,n))*e;t.setLayout({y:a},!0)}}}))}))}function _D(t,e){return SD(t.node2,e)*t.getValue()}function xD(t,e){return SD(t.node2,e)}function bD(t,e){return SD(t.node1,e)*t.getValue()}function wD(t,e){return SD(t.node1,e)}function SD(t,e){return"vertical"===e?t.getLayout().x+t.getLayout().dx/2:t.getLayout().y+t.getLayout().dy/2}function MD(t){return t.getValue()}function ID(t,e,n){for(var i=0,r=t.length,o=-1;++oi&&(i=e)})),P(e,(function(e){var r=new jI({type:"color",mappingMethod:"linear",dataExtent:[n,i],visual:t.get("color")}).mapValueToVisual(e.getLayout().value),o=e.getModel().get(["itemStyle","color"]);null!=o?(e.setVisual("color",o),e.setVisual("style",{fill:o})):(e.setVisual("color",r),e.setVisual("style",{fill:r}))}))}}))}var AD=function(){function t(){}return t.prototype.getInitialData=function(t,e){var n,i,r=e.getComponent("xAxis",this.get("xAxisIndex")),o=e.getComponent("yAxis",this.get("yAxisIndex")),a=r.get("type"),s=o.get("type");"category"===a?(t.layout="horizontal",n=r.getOrdinalMeta(),i=!0):"category"===s?(t.layout="vertical",n=o.getOrdinalMeta(),i=!0):t.layout=t.layout||"horizontal";var l=["x","y"],u="horizontal"===t.layout?0:1,h=this._baseAxisDim=l[u],c=l[1-u],p=[r,o],d=p[u].get("type"),f=p[1-u].get("type"),g=t.data;if(g&&i){var y=[];P(g,(function(t,e){var n;F(t)?(n=t.slice(),t.unshift(e)):F(t.value)?(n=t.value.slice(),t.value.unshift(e)):n=t,y.push(n)})),t.data=y}var v=this.defaultValueDimensions,m=[{name:h,type:am(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:am(f),dimsDef:v.slice()}];return Rw(this,{coordDimensions:m,dimensionsCount:v.length+1,encodeDefaulter:V(Jc,m,this)})},t.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},t}(),DD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],n.visualDrawType="stroke",n}return n(e,t),e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(rf);L(DD,AD,!0);var LD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this.group,o=this._data;this._data||r.removeAll();var a="horizontal"===t.get("layout")?1:0;i.diff(o).add((function(t){if(i.hasValue(t)){var e=OD(i.getItemLayout(t),i,t,a,!0);i.setItemGraphicEl(t,e),r.add(e)}})).update((function(t,e){var n=o.getItemGraphicEl(e);if(i.hasValue(t)){var s=i.getItemLayout(t);n?RD(s,n,i,t):n=OD(s,i,t,a),r.add(n),i.setItemGraphicEl(t,n)}else r.remove(n)})).remove((function(t){var e=o.getItemGraphicEl(t);e&&r.remove(e)})).execute(),this._data=i},e.prototype.remove=function(t){var e=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl((function(t){t&&e.remove(t)}))},e.type="boxplot",e}(yf),kD=function(){},PD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="boxplotBoxPath",n}return n(e,t),e.prototype.getDefaultShape=function(){return new kD},e.prototype.buildPath=function(t,e){var n=e.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ig){var x=[v,_];i.push(x)}}}return{boxData:n,outliers:i}}(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};var FD=["color","borderColor"],GD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){this.group.removeClipPath(),this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,e,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,e,n,i){this._isLargeDraw?this._incrementalRenderLarge(t,e):this._incrementalRenderNormal(t,e)},e.prototype._updateDrawMode=function(t){var e=t.pipelineContext.large;null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},e.prototype._renderNormal=function(t){var e=t.getData(),n=this._data,i=this.group,r=e.getLayout("isSimpleBox"),o=t.get("clip",!0),a=t.coordinateSystem,s=a.getArea&&a.getArea();this._data||i.removeAll(),e.diff(n).add((function(n){if(e.hasValue(n)){var a=e.getItemLayout(n);if(o&&XD(s,a))return;var l=YD(a,n,!0);Ru(l,{shape:{points:a.ends}},t,n),UD(l,e,n,r),i.add(l),e.setItemGraphicEl(n,l)}})).update((function(a,l){var u=n.getItemGraphicEl(l);if(e.hasValue(a)){var h=e.getItemLayout(a);o&&XD(s,h)?i.remove(u):(u?Ou(u,{shape:{points:h.ends}},t,a):u=YD(h),UD(u,e,a,r),i.add(u),e.setItemGraphicEl(a,u))}else i.remove(u)})).remove((function(t){var e=n.getItemGraphicEl(t);e&&i.remove(e)})).execute(),this._data=e},e.prototype._renderLarge=function(t){this._clear(),KD(t,this.group);var e=t.get("clip",!0)?Hb(t.coordinateSystem,!1,t):null;e?this.group.setClipPath(e):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,e){for(var n,i=e.getData(),r=i.getLayout("isSimpleBox");null!=(n=t.next());){var o=YD(i.getItemLayout(n));UD(o,i,n,r),o.incremental=!0,this.group.add(o)}},e.prototype._incrementalRenderLarge=function(t,e){KD(e,this.group,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(yf),HD=function(){},WD=function(t){function e(e){var n=t.call(this,e)||this;return n.type="normalCandlestickBox",n}return n(e,t),e.prototype.getDefaultShape=function(){return new HD},e.prototype.buildPath=function(t,e){var n=e.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Za);function YD(t,e,n){var i=t.ends;return new WD({shape:{points:n?ZD(i,t):i},z2:100})}function XD(t,e){for(var n=!0,i=0;i0?"borderColor":"borderColor0"])||n.get(["itemStyle",t>0?"color":"color0"]),o=n.getModel("itemStyle").getItemStyle(FD);e.useStyle(o),e.style.fill=null,e.style.stroke=r}var JD=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],n}return n(e,t),e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,e,n){var i=e.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={zlevel:0,z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(rf);function QD(t){t&&F(t.series)&&P(t.series,(function(t){X(t)&&"k"===t.type&&(t.type="candlestick")}))}L(JD,AD,!0);var tL=["itemStyle","borderColor"],eL=["itemStyle","borderColor0"],nL=["itemStyle","color"],iL=["itemStyle","color0"],rL={seriesType:"candlestick",plan:df(),performRawSeries:!0,reset:function(t,e){function n(t,e){return e.get(t>0?nL:iL)}function i(t,e){return e.get(t>0?tL:eL)}if(t.getData().setVisual("legendSymbol","roundRect"),!e.isSeriesFiltered(t))return!t.pipelineContext.large&&{progress:function(t,e){for(var r;null!=(r=t.next());){var o=e.getItemModel(r),a=e.getItemLayout(r).sign,s=o.getItemStyle();s.fill=n(a,o),s.stroke=i(a,o)||s.fill,I(e.ensureUniqueItemVisual(r,"style"),s)}}}}},oL="undefined"!=typeof Float32Array?Float32Array:Array,aL={seriesType:"candlestick",plan:df(),reset:function(t){var e=t.coordinateSystem,n=t.getData(),i=function(t,e){var n,i=t.getBaseAxis(),r="category"===i.type?i.getBandWidth():(n=i.getExtent(),Math.abs(n[1]-n[0])/e.count()),o=Zi(tt(t.get("barMaxWidth"),r),r),a=Zi(tt(t.get("barMinWidth"),1),r),s=t.get("barWidth");return null!=s?Zi(s,r):Math.max(Math.min(r/2,o),a)}(t,n),r=["x","y"],o=n.mapDimension(r[0]),a=n.mapDimensionsAll(r[1]),s=a[0],l=a[1],u=a[2],h=a[3];if(n.setLayout({candleWidth:i,isSimpleBox:i<=1.3}),!(null==o||a.length<4))return{progress:t.pipelineContext.large?function(t,n){var i,r,a=new oL(4*t.count),c=0,p=[],d=[];for(;null!=(r=t.next());){var f=n.get(o,r),g=n.get(s,r),y=n.get(l,r),v=n.get(u,r),m=n.get(h,r);isNaN(f)||isNaN(v)||isNaN(m)?(a[c++]=NaN,c+=3):(a[c++]=sL(n,r,g,y,l),p[0]=f,p[1]=v,i=e.dataToPoint(p,null,d),a[c++]=i?i[0]:NaN,a[c++]=i?i[1]:NaN,p[1]=m,i=e.dataToPoint(p,null,d),a[c++]=i?i[1]:NaN)}n.setLayout("largePoints",a)}:function(t,n){var r;for(;null!=(r=t.next());){var a=n.get(o,r),c=n.get(s,r),p=n.get(l,r),d=n.get(u,r),f=n.get(h,r),g=Math.min(c,p),y=Math.max(c,p),v=w(g,a),m=w(y,a),_=w(d,a),x=w(f,a),b=[];S(b,m,0),S(b,v,1),b.push(I(x),I(m),I(_),I(v)),n.setItemLayout(r,{sign:sL(n,r,c,p,l),initBaseline:c>p?m[1]:v[1],ends:b,brushRect:M(d,f,a)})}function w(t,n){var i=[];return i[0]=n,i[1]=t,isNaN(n)||isNaN(t)?[NaN,NaN]:e.dataToPoint(i)}function S(t,e,n){var r=e.slice(),o=e.slice();r[0]=ku(r[0]+i/2,1,!1),o[0]=ku(o[0]-i/2,1,!0),n?t.push(r,o):t.push(o,r)}function M(t,e,n){var r=w(t,n),o=w(e,n);return r[0]-=i/2,o[0]-=i/2,{x:r[0],y:r[1],width:i,height:o[1]-r[1]}}function I(t){return t[0]=ku(t[0],1),t}}}}};function sL(t,e,n,i,r){return n>i?-1:n0?t.get(r,e-1)<=i?1:-1:1}function lL(t,e){var n=e.rippleEffectColor||e.color;t.eachChild((function(t){t.attr({z:e.z,zlevel:e.zlevel,style:{stroke:"stroke"===e.brushType?n:null,fill:"fill"===e.brushType?n:null}})}))}var uL=function(t){function e(e,n){var i=t.call(this)||this,r=new bb(e,n),o=new zi;return i.add(r),i.add(o),i.updateData(e,n),i}return n(e,t),e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var e=t.symbolType,n=t.color,i=this.childAt(1),r=0;r<3;r++){var o=uy(e,-1,-1,2,2,n);o.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var a=-r/3*t.period+t.effectOffset;o.animate("",!0).when(t.period,{scale:[t.rippleScale/2,t.rippleScale/2]}).delay(a).start(),o.animateStyle(!0).when(t.period,{opacity:0}).delay(a).start(),i.add(o)}lL(i,t)},e.prototype.updateEffectAnimation=function(t){for(var e=this._effectCfg,n=this.childAt(1),i=["symbolType","period","rippleScale"],r=0;r0&&(a=this._getLineLength(i)/l*1e3),(a!==this._period||s!==this._loop)&&(i.stopAnimation(),a>0)){var h=void 0;h="function"==typeof u?u(n):u,i.__t>0&&(h=-a*i.__t),i.__t=0;var c=i.animate("",s).when(a,{__t:1}).delay(h).during((function(){r._updateSymbolPosition(i)}));s||c.done((function(){r.remove(i)})),c.start()}this._period=a,this._loop=s}},e.prototype._getLineLength=function(t){return Lt(t.__p1,t.__cp1)+Lt(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,e){t.__p1=e[0],t.__p2=e[1],t.__cp1=e[2]||[(e[0][0]+e[1][0])/2,(e[0][1]+e[1][1])/2]},e.prototype.updateData=function(t,e,n){this.childAt(0).updateData(t,e,n),this._updateEffectSymbol(t,e)},e.prototype._updateSymbolPosition=function(t){var e=t.__p1,n=t.__p2,i=t.__cp1,r=t.__t,o=[t.x,t.y],a=o.slice(),s=Go,l=Ho;o[0]=s(e[0],i[0],n[0],r),o[1]=s(e[1],i[1],n[1],r);var u=l(e[0],i[0],n[0],r),h=l(e[1],i[1],n[1],r);t.rotation=-Math.atan2(h,u)-Math.PI/2,"line"!==this._symbolType&&"rect"!==this._symbolType&&"roundRect"!==this._symbolType||(void 0!==t.__lastT&&t.__lastT=0&&!(i[o]<=e);o--);o=Math.min(o,r-2)}else{for(o=a;oe);o++);o=Math.min(o-1,r-2)}var s=(e-i[o])/(i[o+1]-i[o]),l=n[o],u=n[o+1];t.x=l[0]*(1-s)+s*u[0],t.y=l[1]*(1-s)+s*u[1];var h=u[0]-l[0],c=u[1]-l[1];t.rotation=-Math.atan2(c,h)-Math.PI/2,this._lastFrame=o,this._lastFramePercent=e,t.ignore=!1}},e}(pL),gL=function(){this.polyline=!1,this.curveness=0,this.segs=[]},yL=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new gL},e.prototype.buildPath=function(t,e){var n=e.segs,i=e.curveness;if(e.polyline)for(var r=0;r0){t.moveTo(n[r++],n[r++]);for(var a=1;a0){var c=(s+u)/2-(l-h)*i,p=(l+h)/2-(u-s)*i;t.quadraticCurveTo(c,p,u,h)}else t.lineTo(u,h)}},e.prototype.findDataIndex=function(t,e){var n=this.shape,i=n.segs,r=n.curveness,o=this.style.lineWidth;if(n.polyline)for(var a=0,s=0;s0)for(var u=i[s++],h=i[s++],c=1;c0){if(La(u,h,(u+p)/2-(h-d)*r,(h+d)/2-(p-u)*r,p,d,o,t,e))return a}else if(Aa(u,h,p,d,o,t,e))return a;a++}return-1},e}(Za),vL=function(){function t(){this.group=new zi}return t.prototype.isPersistent=function(){return!this._incremental},t.prototype.updateData=function(t){this.group.removeAll();var e=new yL({rectHover:!0,cursor:"default"});e.setShape({segs:t.getLayout("linesPoints")}),this._setCommon(e,t),this.group.add(e),this._incremental=null},t.prototype.incrementalPrepareUpdate=function(t){this.group.removeAll(),this._clearIncremental(),t.count()>5e5?(this._incremental||(this._incremental=new vu({silent:!0})),this.group.add(this._incremental)):this._incremental=null},t.prototype.incrementalUpdate=function(t,e){var n=new yL;n.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(n,e,!!this._incremental),this._incremental?this._incremental.addDisplayable(n,!0):(n.rectHover=!0,n.cursor="default",n.__startIndex=t.start,this.group.add(n))},t.prototype.remove=function(){this._clearIncremental(),this._incremental=null,this.group.removeAll()},t.prototype._setCommon=function(t,e,n){var i=e.hostModel;t.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),t.useStyle(i.getModel("lineStyle").getLineStyle()),t.style.strokeNoScale=!0;var r=e.getVisual("style");if(r&&r.stroke&&t.setStyle("stroke",r.stroke),t.setStyle("fill",null),!n){var o=ys(t);o.seriesIndex=i.seriesIndex,t.on("mousemove",(function(e){o.dataIndex=null;var n=t.findDataIndex(e.offsetX,e.offsetY);n>0&&(o.dataIndex=n+t.__startIndex)}))}},t.prototype._clearIncremental=function(){var t=this._incremental;t&&t.clearDisplaybles()},t}(),mL={seriesType:"lines",plan:df(),reset:function(t){var e=t.coordinateSystem,n=t.get("polyline"),i=t.pipelineContext.large;return{progress:function(r,o){var a=[];if(i){var s=void 0,l=r.end-r.start;if(n){for(var u=0,h=r.start;h ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return null==t?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return null==t?this.option.large?2e4:this.get("progressiveThreshold"):t},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",zlevel:0,z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(rf);function ML(t){return t instanceof Array||(t=[t,t]),t}var IL={seriesType:"lines",reset:function(t){var e=ML(t.get("symbol")),n=ML(t.get("symbolSize")),i=t.getData();return i.setVisual("fromSymbol",e&&e[0]),i.setVisual("toSymbol",e&&e[1]),i.setVisual("fromSymbolSize",n&&n[0]),i.setVisual("toSymbolSize",n&&n[1]),{dataEach:i.hasItemOption?function(t,e){var n=t.getItemModel(e),i=ML(n.getShallow("symbol",!0)),r=ML(n.getShallow("symbolSize",!0));i[0]&&t.setItemVisual(e,"fromSymbol",i[0]),i[1]&&t.setItemVisual(e,"toSymbol",i[1]),r[0]&&t.setItemVisual(e,"fromSymbolSize",r[0]),r[1]&&t.setItemVisual(e,"toSymbolSize",r[1])}:null}}};var TL=function(){function t(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=C();this.canvas=t}return t.prototype.update=function(t,e,n,i,r,o){var a=this._getBrush(),s=this._getGradient(r,"inRange"),l=this._getGradient(r,"outOfRange"),u=this.pointSize+this.blurSize,h=this.canvas,c=h.getContext("2d"),p=t.length;h.width=e,h.height=n;for(var d=0;d0){var I=o(v)?s:l;v>0&&(v=v*S+w),_[x++]=I[M],_[x++]=I[M+1],_[x++]=I[M+2],_[x++]=I[M+3]*v*256}else x+=4}return c.putImageData(m,0,0),h},t.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=C()),e=this.pointSize+this.blurSize,n=2*e;t.width=n,t.height=n;var i=t.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-e,e,this.pointSize,0,2*Math.PI,!0),i.closePath(),i.fill(),t},t.prototype._getGradient=function(t,e){for(var n=this._gradientPixels,i=n[e]||(n[e]=new Uint8ClampedArray(1024)),r=[0,0,0,0],o=0,a=0;a<256;a++)t[e](a/255,!0,r),i[o++]=r[0],i[o++]=r[1],i[o++]=r[2],i[o++]=r[3];return i},t}();function CL(t){var e=t.dimensions;return"lng"===e[0]&&"lat"===e[1]}var AL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i;e.eachComponent("visualMap",(function(e){e.eachTargetSeries((function(n){n===t&&(i=e)}))})),this.group.removeAll(),this._incrementalDisplayable=null;var r=t.coordinateSystem;"cartesian2d"===r.type||"calendar"===r.type?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):CL(r)&&this._renderOnGeo(r,t,i,n)},e.prototype.incrementalPrepareRender=function(t,e,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,e,n,i){var r=e.coordinateSystem;r&&(CL(r)?this.render(e,n,i):this._renderOnCartesianAndCalendar(e,i,t.start,t.end,!0))},e.prototype._renderOnCartesianAndCalendar=function(t,e,n,i,r){var o,a,s,l,u=t.coordinateSystem;if(Wb(u,"cartesian2d")){var h=u.getAxis("x"),c=u.getAxis("y");0,o=h.getBandWidth(),a=c.getBandWidth(),s=h.scale.getExtent(),l=c.scale.getExtent()}for(var p=this.group,d=t.getData(),f=t.getModel(["emphasis","itemStyle"]).getItemStyle(),g=t.getModel(["blur","itemStyle"]).getItemStyle(),y=t.getModel(["select","itemStyle"]).getItemStyle(),v=eh(t),m=t.get(["emphasis","focus"]),_=t.get(["emphasis","blurScope"]),x=Wb(u,"cartesian2d")?[d.mapDimension("x"),d.mapDimension("y"),d.mapDimension("value")]:[d.mapDimension("time"),d.mapDimension("value")],b=n;bs[1]||Il[1])continue;var T=u.dataToPoint([M,I]);w=new os({shape:{x:Math.floor(Math.round(T[0])-o/2),y:Math.floor(Math.round(T[1])-a/2),width:Math.ceil(o),height:Math.ceil(a)},style:S})}else{if(isNaN(d.get(x[1],b)))continue;w=new os({z2:1,shape:u.dataToRect([d.get(x[0],b)]).contentShape,style:S})}var C=d.getItemModel(b);if(d.hasItemOption){var A=C.getModel("emphasis");f=A.getModel("itemStyle").getItemStyle(),g=C.getModel(["blur","itemStyle"]).getItemStyle(),y=C.getModel(["select","itemStyle"]).getItemStyle(),m=A.get("focus"),_=A.get("blurScope"),v=eh(C)}var D=t.getRawValue(b),L="-";D&&null!=D[2]&&(L=D[2]+""),th(w,v,{labelFetcher:t,labelDataIndex:b,defaultOpacity:S.opacity,defaultText:L}),w.ensureState("emphasis").style=f,w.ensureState("blur").style=g,w.ensureState("select").style=y,Js(w,m,_),w.incremental=r,r&&(w.states.emphasis.hoverLayer=!0),p.add(w),d.setItemGraphicEl(b,w)}},e.prototype._renderOnGeo=function(t,e,n,i){var r=n.targetVisuals.inRange,o=n.targetVisuals.outOfRange,a=e.getData(),s=this._hmLayer||this._hmLayer||new TL;s.blurSize=e.get("blurSize"),s.pointSize=e.get("pointSize"),s.minOpacity=e.get("minOpacity"),s.maxOpacity=e.get("maxOpacity");var l=t.getViewRect().clone(),u=t.getRoamTransform();l.applyTransform(u);var h=Math.max(l.x,0),c=Math.max(l.y,0),p=Math.min(l.width+l.x,i.getWidth()),d=Math.min(l.height+l.y,i.getHeight()),f=p-h,g=d-c,y=[a.mapDimension("lng"),a.mapDimension("lat"),a.mapDimension("value")],v=a.mapArray(y,(function(e,n,i){var r=t.dataToPoint([e,n]);return r[0]-=h,r[1]-=c,r.push(i),r})),m=n.getExtent(),_="visualMap.continuous"===n.type?function(t,e){var n=t[1]-t[0];return e=[(e[0]-t[0])/n,(e[1]-t[0])/n],function(t){return t>=e[0]&&t<=e[1]}}(m,n.option.range):function(t,e,n){var i=t[1]-t[0],r=(e=O(e,(function(e){return{interval:[(e.interval[0]-t[0])/i,(e.interval[1]-t[0])/i]}}))).length,o=0;return function(t){var i;for(i=o;i=0;i--){var a;if((a=e[i].interval)[0]<=t&&t<=a[1]){o=i;break}}return i>=0&&i0?1:o<0?-1:0}(n,o,r,i,c),function(t,e,n,i,r,o,a,s,l,u){var h,c=l.valueDim,p=l.categoryDim,d=Math.abs(n[p.wh]),f=t.getItemVisual(e,"symbolSize");h=F(f)?f.slice():null==f?["100%","100%"]:[f,f];h[p.index]=Zi(h[p.index],d),h[c.index]=Zi(h[c.index],i?d:Math.abs(o)),u.symbolSize=h,(u.symbolScale=[h[0]/s,h[1]/s])[c.index]*=(l.isHorizontal?-1:1)*a}(t,e,r,o,0,c.boundingLength,c.pxSign,u,i,c),function(t,e,n,i,r){var o=t.get(LL)||0;o&&(PL.attr({scaleX:e[0],scaleY:e[1],rotation:n}),PL.updateTransform(),o/=PL.getLineScale(),o*=e[i.valueDim.index]);r.valueLineWidth=o}(n,c.symbolScale,l,i,c);var p=c.symbolSize,d=n.get("symbolOffset");return F(d)&&(d=[Zi(d[0],p[0]),Zi(d[1],p[1])]),function(t,e,n,i,r,o,a,s,l,u,h,c){var p=h.categoryDim,d=h.valueDim,f=c.pxSign,g=Math.max(e[d.index]+s,0),y=g;if(i){var v=Math.abs(l),m=Q(t.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var x=Zi(m,e[d.index]),b=Math.max(g+2*x,0),w=_?0:2*x,S=cr(i),M=S?i:KL((v+w)/b);b=g+2*(x=(v-M*g)/2/(_?M:M-1)),w=_?0:2*x,S||"fixed"===i||(M=u?KL((Math.abs(u)+w)/b):0),y=M*b-w,c.repeatTimes=M,c.symbolMargin=x}var T=f*(y/2),C=c.pathPosition=[];C[p.index]=n[p.wh]/2,C[d.index]="start"===a?T:"end"===a?l-T:l/2,o&&(C[0]+=o[0],C[1]+=o[1]);var A=c.bundlePosition=[];A[p.index]=n[p.xy],A[d.index]=n[d.xy];var D=c.barRectShape=I({},n);D[d.wh]=f*Math.max(Math.abs(n[d.wh]),Math.abs(C[d.index]+T)),D[p.wh]=n[p.wh];var L=c.clipShape={};L[p.xy]=-n[p.xy],L[p.wh]=h.ecSize[p.wh],L[d.xy]=0,L[d.wh]=n[d.wh]}(n,p,r,o,0,d,s,c.valueLineWidth,c.boundingLength,c.repeatCutLength,i,c),c}function NL(t,e){return t.toGlobalCoord(t.dataToCoord(t.scale.parse(e)))}function EL(t){var e=t.symbolPatternSize,n=uy(t.symbolType,-e/2,-e/2,e,e);return n.attr({culling:!0}),"image"!==n.type&&n.setStyle({strokeNoScale:!0}),n}function zL(t,e,n,i){var r=t.__pictorialBundle,o=n.symbolSize,a=n.valueLineWidth,s=n.pathPosition,l=e.valueDim,u=n.repeatTimes||0,h=0,c=o[e.valueDim.index]+a+2*n.symbolMargin;for(ZL(t,(function(t){t.__pictorialAnimationIndex=h,t.__pictorialRepeatTimes=u,h0:i<0)&&(r=u-1-t),e[l.index]=c*(r-u/2+.5)+s[l.index],{x:e[0],y:e[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation}}}function BL(t,e,n,i){var r=t.__pictorialBundle,o=t.__pictorialMainPath;o?jL(o,null,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:n.symbolScale[0],scaleY:n.symbolScale[1],rotation:n.rotation},n,i):(o=t.__pictorialMainPath=EL(n),r.add(o),jL(o,{x:n.pathPosition[0],y:n.pathPosition[1],scaleX:0,scaleY:0,rotation:n.rotation},{scaleX:n.symbolScale[0],scaleY:n.symbolScale[1]},n,i))}function VL(t,e,n){var i=I({},e.barRectShape),r=t.__pictorialBarRect;r?jL(r,null,{shape:i},e,n):(r=t.__pictorialBarRect=new os({z2:2,shape:i,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),t.add(r))}function FL(t,e,n,i){if(n.symbolClip){var r=t.__pictorialClipPath,o=I({},n.clipShape),a=e.valueDim,s=n.animationModel,l=n.dataIndex;if(r)Ou(r,{shape:o},s,l);else{o[a.wh]=0,r=new os({shape:o}),t.__pictorialBundle.setClipPath(r),t.__pictorialClipPath=r;var u={};u[a.wh]=n.clipShape[a.wh],Ku[i?"updateProps":"initProps"](r,{shape:u},s,l)}}}function GL(t,e){var n=t.getItemModel(e);return n.getAnimationDelayParams=HL,n.isAnimationEnabled=WL,n}function HL(t){return{index:t.__pictorialAnimationIndex,count:t.__pictorialRepeatTimes}}function WL(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function YL(t,e,n,i){var r=new zi,o=new zi;return r.add(o),r.__pictorialBundle=o,o.x=n.bundlePosition[0],o.y=n.bundlePosition[1],n.symbolRepeat?zL(r,e,n):BL(r,0,n),VL(r,n,i),FL(r,e,n,i),r.__pictorialShapeStr=UL(t,n),r.__pictorialSymbolMeta=n,r}function XL(t,e,n,i){var r=i.__pictorialBarRect;r&&r.removeTextContent();var o=[];ZL(i,(function(t){o.push(t)})),i.__pictorialMainPath&&o.push(i.__pictorialMainPath),i.__pictorialClipPath&&(n=null),P(o,(function(t){Nu(t,{scaleX:0,scaleY:0},n,e,(function(){i.parent&&i.parent.remove(i)}))})),t.setItemGraphicEl(e,null)}function UL(t,e){return[t.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function ZL(t,e,n){P(t.__pictorialBundle.children(),(function(i){i!==t.__pictorialBarRect&&e.call(n,i)}))}function jL(t,e,n,i,r,o){e&&t.attr(e),i.symbolClip&&!r?n&&t.attr(n):n&&Ku[r?"updateProps":"initProps"](t,n,i.animationModel,i.dataIndex,o)}function qL(t,e,n){var i=n.dataIndex,r=n.itemModel,o=r.getModel("emphasis"),a=o.getModel("itemStyle").getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),l=r.getModel(["select","itemStyle"]).getItemStyle(),u=r.getShallow("cursor"),h=o.get("focus"),c=o.get("blurScope"),p=o.get("scale");ZL(t,(function(t){if(t instanceof Ja){var e=t.style;t.useStyle(I({image:e.image,x:e.x,y:e.y,width:e.width,height:e.height},n.style))}else t.useStyle(n.style);var i=t.ensureState("emphasis");i.style=a,p&&(i.scaleX=1.1*t.scaleX,i.scaleY=1.1*t.scaleY),t.ensureState("blur").style=s,t.ensureState("select").style=l,u&&(t.cursor=u),t.z2=n.z2}));var d=e.valueDim.posDesc[+(n.boundingLength>0)];th(t.__pictorialBarRect,eh(r),{labelFetcher:e.seriesModel,labelDataIndex:i,defaultText:_b(e.seriesModel.getData(),i),inheritColor:n.style.fill,defaultOpacity:n.style.opacity,defaultOutsidePosition:d}),Js(t,h,c)}function KL(t){var e=Math.round(t);return Math.abs(t-e)<1e-4?e:Math.ceil(t)}var $L=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.hasSymbolVisual=!0,n.defaultSymbol="roundRect",n}return n(e,t),e.prototype.getInitialData=function(e){return e.stack=null,t.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Th(iw.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(iw);var JL=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._layers=[],n}return n(e,t),e.prototype.render=function(t,e,n){var i=t.getData(),r=this,o=this.group,a=t.getLayerSeries(),s=i.getLayout("layoutInfo"),l=s.rect,u=s.boundaryGap;function h(t){return t.name}o.x=0,o.y=l.y+u[0];var c=new rm(this._layersSeries||[],a,h,h),p=[];function d(e,n,s){var l=r._layers;if("remove"!==e){for(var u,h,c=[],d=[],f=a[n].indices,g=0;go&&(o=s),i.push(s)}for(var u=0;uo&&(o=c)}return{y0:r,max:o}}(l),h=u.y0,c=n/u.max,p=o.length,d=o[0].indices.length,f=0;fMath.PI/2?"right":"left"):w&&"center"!==w?"left"===w?(v=r.r0+b,a>Math.PI/2&&(w="right")):"right"===w&&(v=r.r-b,a>Math.PI/2&&(w="left")):(v=(r.r+r.r0)/2,w="center"),d.style.align=w,d.style.verticalAlign=f(o,"verticalAlign")||"middle",d.x=v*s+r.cx,d.y=v*l+r.cy;var S=f(o,"rotate"),M=0;"radial"===S?(M=-a)<-Math.PI/2&&(M+=Math.PI):"tangential"===S?(M=Math.PI/2-a)>Math.PI/2?M-=Math.PI:M<-Math.PI/2&&(M+=Math.PI):"number"==typeof S&&(M=S*Math.PI/180),d.rotation=M})),h.dirtyStyle()},e}(Wl),ik="sunburstRootToNode",rk="sunburstHighlight";var ok=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this;this.seriesModel=t,this.api=n,this.ecModel=e;var o=t.getData(),a=o.tree.root,s=t.getViewRoot(),l=this.group,u=t.get("renderLabelForZeroData"),h=[];s.eachNode((function(t){h.push(t)}));var c=this._oldChildren||[];!function(i,r){if(0===i.length&&0===r.length)return;function s(t){return t.getId()}function h(s,h){!function(i,r){u||!i||i.getValue()||(i=null);if(i!==a&&r!==a)if(r&&r.piece)i?(r.piece.updateData(!1,i,t,e,n),o.setItemGraphicEl(i.dataIndex,r.piece)):function(t){if(!t)return;t.piece&&(l.remove(t.piece),t.piece=null)}(r);else if(i){var s=new nk(i,t,e,n);l.add(s),o.setItemGraphicEl(i.dataIndex,s)}}(null==s?null:i[s],null==h?null:r[h])}new rm(r,i,s,s).add(h).update(h).remove(V(h,null)).execute()}(h,c),function(i,o){o.depth>0?(r.virtualPiece?r.virtualPiece.updateData(!1,i,t,e,n):(r.virtualPiece=new nk(i,t,e,n),l.add(r.virtualPiece)),o.piece.off("click"),r.virtualPiece.on("click",(function(t){r._rootToNode(o.parentNode)}))):r.virtualPiece&&(l.remove(r.virtualPiece),r.virtualPiece=null)}(a,s),this._initEvents(),this._oldChildren=h},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",(function(e){var n=!1;t.seriesModel.getViewRoot().eachNode((function(i){if(!n&&i.piece&&i.piece===e.target){var r=i.getModel().get("nodeClick");if("rootToNode"===r)t._rootToNode(i);else if("link"===r){var o=i.getModel(),a=o.get("link");if(a)wc(a,o.get("target",!0)||"_blank")}n=!0}}))}))},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ik,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,e){var n=e.getData().getItemLayout(0);if(n){var i=t[0]-n.cx,r=t[1]-n.cy,o=Math.sqrt(i*i+r*r);return o<=n.r&&o>=n.r0}},e.type="sunburst",e}(yf),ak=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.ignoreStyleOnData=!0,n}return n(e,t),e.prototype.getInitialData=function(t,e){var n={name:t.name,children:t.data};sk(n);var i=O(t.levels||[],(function(t){return new Sh(t,this,e)}),this),r=mI.createTree(n,this,(function(t){t.wrapMethod("getItemModel",(function(t,e){var n=r.getNodeByDataIndex(e),o=i[n.depth];return o&&(t.parentModel=o),t}))}));return r.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(e){var n=t.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(e);return n.treePathInfo=CI(i,this),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var e=this.getRawData().tree.root;t&&(t===e||e.contains(t))||(this._viewRoot=e)},e.prototype.enableAriaDecal=function(){LI(this)},e.type="series.sunburst",e.defaultOption={zlevel:0,z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],levels:[],sort:"desc"},e}(rf);function sk(t){var e=0;P(t.children,(function(t){sk(t);var n=t.value;F(n)&&(n=n[0]),e+=n}));var n=t.value;F(n)&&(n=n[0]),(null==n||isNaN(n))&&(n=e),n<0&&(n=0),F(t.value)?t.value[0]=n:t.value=n}var lk=Math.PI/180;function uk(t,e,n){e.eachSeriesByType(t,(function(t){var e=t.get("center"),i=t.get("radius");F(i)||(i=[0,i]),F(e)||(e=[e,e]);var r=n.getWidth(),o=n.getHeight(),a=Math.min(r,o),s=Zi(e[0],r),l=Zi(e[1],o),u=Zi(i[0],a/2),h=Zi(i[1],a/2),c=-t.get("startAngle")*lk,p=t.get("minAngle")*lk,d=t.getData().tree.root,f=t.getViewRoot(),g=f.depth,y=t.get("sort");null!=y&&hk(f,y);var v=0;P(f.children,(function(t){!isNaN(t.getValue())&&v++}));var m=f.getValue(),_=Math.PI/(m||v)*2,x=f.depth>0,b=f.height-(x?-1:1),w=(h-u)/(b||1),S=t.get("clockwise"),M=t.get("stillShowZeroSum"),I=S?1:-1,T=function(t,e){if(t){var n=e;if(t!==d){var i=t.getValue(),r=0===m&&M?_:i*_;r1;)r=r.parentNode;var o=n.getColorFromPalette(r.name||r.dataIndex+"",e);return t.depth>1&&"string"==typeof o&&(o=$e(o,(t.depth-1)/(i-1)*.5)),o}(r,t,i.root.height)),I(n.ensureUniqueItemVisual(r.dataIndex,"style"),o)}))}))}function pk(t,e){return e=e||[0,0],O(["x","y"],(function(n,i){var r=this.getAxis(n),o=e[i],a=t[i]/2;return"category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a))}),this)}function dk(t,e){return e=e||[0,0],O([0,1],(function(n){var i=e[n],r=t[n]/2,o=[],a=[];return o[n]=i-r,a[n]=i+r,o[1-n]=a[1-n]=e[1-n],Math.abs(this.dataToPoint(o)[n]-this.dataToPoint(a)[n])}),this)}function fk(t,e){var n=this.getAxis(),i=e instanceof Array?e[0]:e,r=(t instanceof Array?t[0]:t)/2;return"category"===n.type?n.getBandWidth():Math.abs(n.dataToCoord(i-r)-n.dataToCoord(i+r))}function gk(t,e){return e=e||[0,0],O(["Radius","Angle"],(function(n,i){var r=this["get"+n+"Axis"](),o=e[i],a=t[i]/2,s="category"===r.type?r.getBandWidth():Math.abs(r.dataToCoord(o-a)-r.dataToCoord(o+a));return"Angle"===n&&(s=s*Math.PI/180),s}),this)}function yk(t,e,n,i){return t&&(t.legacy||!1!==t.legacy&&!n&&!i&&"tspan"!==e&&("text"===e||dt(t,"text")))}function vk(t,e,n){var i,r,o,a=t;if("text"===e)o=a;else{o={},dt(a,"text")&&(o.text=a.text),dt(a,"rich")&&(o.rich=a.rich),dt(a,"textFill")&&(o.fill=a.textFill),dt(a,"textStroke")&&(o.stroke=a.textStroke),r={type:"text",style:o,silent:!0},i={};var s=dt(a,"textPosition");n?i.position=s?a.textPosition:"inside":s&&(i.position=a.textPosition),dt(a,"textPosition")&&(i.position=a.textPosition),dt(a,"textOffset")&&(i.offset=a.textOffset),dt(a,"textRotation")&&(i.rotation=a.textRotation),dt(a,"textDistance")&&(i.distance=a.textDistance)}return mk(o,t),P(o.rich,(function(t){mk(t,t)})),{textConfig:i,textContent:r}}function mk(t,e){e&&(e.font=e.textFont||e.font,dt(e,"textStrokeWidth")&&(t.lineWidth=e.textStrokeWidth),dt(e,"textAlign")&&(t.align=e.textAlign),dt(e,"textVerticalAlign")&&(t.verticalAlign=e.textVerticalAlign),dt(e,"textLineHeight")&&(t.lineHeight=e.textLineHeight),dt(e,"textWidth")&&(t.width=e.textWidth),dt(e,"textHeight")&&(t.height=e.textHeight),dt(e,"textBackgroundColor")&&(t.backgroundColor=e.textBackgroundColor),dt(e,"textPadding")&&(t.padding=e.textPadding),dt(e,"textBorderColor")&&(t.borderColor=e.textBorderColor),dt(e,"textBorderWidth")&&(t.borderWidth=e.textBorderWidth),dt(e,"textBorderRadius")&&(t.borderRadius=e.textBorderRadius),dt(e,"textBoxShadowColor")&&(t.shadowColor=e.textBoxShadowColor),dt(e,"textBoxShadowBlur")&&(t.shadowBlur=e.textBoxShadowBlur),dt(e,"textBoxShadowOffsetX")&&(t.shadowOffsetX=e.textBoxShadowOffsetX),dt(e,"textBoxShadowOffsetY")&&(t.shadowOffsetY=e.textBoxShadowOffsetY))}function _k(t,e,n){var i=t;i.textPosition=i.textPosition||n.position||"inside",null!=n.offset&&(i.textOffset=n.offset),null!=n.rotation&&(i.textRotation=n.rotation),null!=n.distance&&(i.textDistance=n.distance);var r=i.textPosition.indexOf("inside")>=0,o=t.fill||"#000";xk(i,e);var a=null==i.textFill;return r?a&&(i.textFill=n.insideFill||"#fff",!i.textStroke&&n.insideStroke&&(i.textStroke=n.insideStroke),!i.textStroke&&(i.textStroke=o),null==i.textStrokeWidth&&(i.textStrokeWidth=2)):(a&&(i.textFill=n.outsideFill||o),!i.textStroke&&n.outsideStroke&&(i.textStroke=n.outsideStroke)),i.text=e.text,i.rich=e.rich,P(e.rich,(function(t){xk(t,t)})),i}function xk(t,e){e&&(dt(e,"fill")&&(t.textFill=e.fill),dt(e,"stroke")&&(t.textStroke=e.fill),dt(e,"lineWidth")&&(t.textStrokeWidth=e.lineWidth),dt(e,"font")&&(t.font=e.font),dt(e,"fontStyle")&&(t.fontStyle=e.fontStyle),dt(e,"fontWeight")&&(t.fontWeight=e.fontWeight),dt(e,"fontSize")&&(t.fontSize=e.fontSize),dt(e,"fontFamily")&&(t.fontFamily=e.fontFamily),dt(e,"align")&&(t.textAlign=e.align),dt(e,"verticalAlign")&&(t.textVerticalAlign=e.verticalAlign),dt(e,"lineHeight")&&(t.textLineHeight=e.lineHeight),dt(e,"width")&&(t.textWidth=e.width),dt(e,"height")&&(t.textHeight=e.height),dt(e,"backgroundColor")&&(t.textBackgroundColor=e.backgroundColor),dt(e,"padding")&&(t.textPadding=e.padding),dt(e,"borderColor")&&(t.textBorderColor=e.borderColor),dt(e,"borderWidth")&&(t.textBorderWidth=e.borderWidth),dt(e,"borderRadius")&&(t.textBorderRadius=e.borderRadius),dt(e,"shadowColor")&&(t.textBoxShadowColor=e.shadowColor),dt(e,"shadowBlur")&&(t.textBoxShadowBlur=e.shadowBlur),dt(e,"shadowOffsetX")&&(t.textBoxShadowOffsetX=e.shadowOffsetX),dt(e,"shadowOffsetY")&&(t.textBoxShadowOffsetY=e.shadowOffsetY),dt(e,"textShadowColor")&&(t.textShadowColor=e.textShadowColor),dt(e,"textShadowBlur")&&(t.textShadowBlur=e.textShadowBlur),dt(e,"textShadowOffsetX")&&(t.textShadowOffsetX=e.textShadowOffsetX),dt(e,"textShadowOffsetY")&&(t.textShadowOffsetY=e.textShadowOffsetY))}var bk=Ca.CMD,wk=2*Math.PI,Sk=["x","y"],Mk=["width","height"],Ik=[];function Tk(t,e){return Math.abs(t-e)<1e-5}function Ck(t){var e,n,i,r,o,a=t.data,s=t.len(),l=[],u=0,h=0,c=0,p=0;function d(t,n){e&&e.length>2&&l.push(e),e=[t,n]}function f(t,n,i,r){Tk(t,i)&&Tk(n,r)||e.push(t,n,i,r,i,r)}function g(t,n,i,r,o,a){var s=Math.abs(n-t),l=4*Math.tan(s/4)/3,u=nM:C2&&l.push(e),l}function Ak(t,e){var n=t.length,i=e.length;if(n===i)return[t,e];for(var r=n0)for(var b=i/n,w=-i/2;w<=i/2;w+=b){var S=Math.sin(w),M=Math.cos(w),I=0;for(_=0;_c.width?1:0,r=Mk[i],o=Sk[i],a=c[r]/e,s=c[o],l=0;li[1]&&i.reverse(),{coordSys:{type:"polar",cx:t.cx,cy:t.cy,r:i[1],r0:i[0]},api:{coord:function(i){var r=e.dataToRadius(i[0]),o=n.dataToAngle(i[1]),a=t.coordToPoint([r,o]);return a.push(r,o*Math.PI/180),a},size:B(gk,t)}}},calendar:function(t){var e=t.getRect(),n=t.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:t.getCellWidth(),cellHeight:t.getCellHeight(),rangeInfo:{start:n.start,end:n.end,weeks:n.weeks,dayCount:n.allDay}},api:{coord:function(e,n){return t.dataToPoint(e,n)}}}}},sP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,e){return Hm(this.getSource(),this)},e.prototype.getDataParams=function(e,n,i){var r=t.prototype.getDataParams.call(this,e,n);return i&&(r.info=Uk(i).info),r},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",zlevel:0,z:2,legendHoverLink:!0,clip:!1},e}(rf),lP=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this._data,o=t.getData(),a=this.group,s=AP(t,o,e,n),l=t.__transientTransitionOpt;if(!l||null!=l.from&&null!=l.to){var u=new WP(t,l),h=l?"multiple":"oneToOne";new rm(r?r.getIndices():[],o.getIndices(),uP(r,h,l&&l.from),uP(o,h,l&&l.to),null,h).add((function(e){LP(n,null,e,s(e,i),t,a,o,null)})).remove((function(e){VP(r.getItemGraphicEl(e),t,a)})).update((function(e,l){u.reset("oneToOne");var h=r.getItemGraphicEl(l);u.findAndAddFrom(h),u.hasFrom()&&(HP(h,a),h=null),LP(n,h,e,s(e,i),t,a,o,u),u.applyMorphing()})).updateManyToOne((function(e,l){u.reset("manyToOne");for(var h=0;h=0){!s&&(s=r[t]={});var f=z(l);for(c=0;c=0){var d=t.getAnimationStyleProps(),f=d?d.style:null;if(f){!a&&(a=r.style={});var g=z(i);for(h=0;h=p;d--)VP(e.childAt(d),r,e)}(t,e,n,i,r,s),l>=0?o.replaceAt(e,l):o.add(e),e}function PP(t,e){var n,i=Uk(t),r=e.type,o=e.shape,a=e.style;return null!=r&&r!==i.customGraphicType||"path"===r&&((n=o)&&(dt(n,"pathData")||dt(n,"d")))&&FP(o)!==i.customPathData||"image"===r&&dt(a,"image")&&a.image!==i.customImagePath}function OP(t,e,n){var i=e?RP(t,e):t,r=e?NP(t,i,Kk):t.style,o=t.type,a=i?i.textConfig:null,s=t.textContent,l=s?e?RP(s,e):s:null;if(r&&(n.isLegacy||yk(r,o,!!a,!!l))){n.isLegacy=!0;var u=vk(r,o,!e);!a&&u.textConfig&&(a=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var h=l;!h.type&&(h.type="text")}var c=e?n[e]:n.normal;c.cfg=a,c.conOpt=l}function RP(t,e){return e?t?t[e]:null:t}function NP(t,e,n){var i=e&&e.style;return null==i&&n===Kk&&t&&(i=t.styleEmphasis),i}function EP(t,e){var n=t&&t.name;return null!=n?n:"e\0\0"+e}function zP(t,e){var n=this.context,i=null!=t?n.newChildren[t]:null,r=null!=e?n.oldChildren[e]:null;kP(n.api,r,n.dataIndex,i,n.seriesModel,n.group,0,n.morphPreparation)}function BP(t){var e=this.context;VP(e.oldChildren[t],e.seriesModel,e.group)}function VP(t,e,n){if(t){var i=Uk(t).leaveToProps;i?Ou(t,i,e,{cb:function(){n.remove(t)}}):n.remove(t)}}function FP(t){return t&&(t.pathData||t.d)}function GP(t){return t&&t instanceof Za}function HP(t,e){t&&e.remove(t)}var WP=function(){function t(t,e){this._fromList=[],this._toList=[],this._toElOptionList=[],this._allPropsFinalList=[],this._toDataIndices=[],this._morphConfigList=[],this._seriesModel=t,this._transOpt=e}return t.prototype.hasFrom=function(){return!!this._fromList.length},t.prototype.findAndAddFrom=function(t){if(t&&(Uk(t).canMorph&&this._fromList.push(t),t.isGroup))for(var e=t.childrenRef(),n=0;n=n?i-a:o;this._manyToOneForSingleTo(r,a>=i?null:a,s)}else if("oneToMany"===t)for(var l=Math.max(1,Math.floor(n/i)),u=0,h=0;u=n?n-u:l;this._oneToManyForSingleFrom(u,c,h>=i?null:h)}},t.prototype._oneToOneForSingleTo=function(t,e){var n,i=this._toList[t],r=this._toElOptionList[t],o=this._toDataIndices[t],a=this._allPropsFinalList[t],s=this._fromList[e],l=this._getOrCreateMorphConfig(o),u=l.duration;if(s&&zk(s)){if(pP(i,a,r.style),u){var h=Bk([s],i,l,YP);this._processResultIndividuals(h,t,null)}}else{var c=u&&s&&(s!==i||(Ek(n=s)||zk(n)))?s:null,p={};fP("shape",i,c,r,p,!1),fP("extra",i,c,r,p,!1),yP(i,c,r,p,!1),vP(i,c,r,r.style,p,!1),pP(i,a,r.style),c&&Ok(c,i,l),dP(i,o,r,this._seriesModel,p,!1)}},t.prototype._manyToOneForSingleTo=function(t,e,n){var i=this._toList[t],r=this._toElOptionList[t];pP(i,this._allPropsFinalList[t],r.style);var o=this._getOrCreateMorphConfig(this._toDataIndices[t]);if(o.duration&&null!=e){for(var a=[],s=e;sa)return!0;if(o){var s=_S(t).seriesDataCount,l=i.getExtent();return Math.abs(l[0]-l[1])/s>a}return!1}return!0===n},t.prototype.makeElOption=function(t,e,n,i,r){},t.prototype.createPointerEl=function(t,e,n,i){var r=e.pointer;if(r){var o=XP(t).pointerEl=new Ku[r.type](UP(e.pointer));t.add(o)}},t.prototype.createLabelEl=function(t,e,n,i){if(e.label){var r=XP(t).labelEl=new ls(UP(e.label));t.add(r),$P(r,i)}},t.prototype.updatePointerEl=function(t,e,n){var i=XP(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},t.prototype.updateLabelEl=function(t,e,n,i){var r=XP(t).labelEl;r&&(r.setStyle(e.label.style),n(r,{x:e.label.x,y:e.label.y}),$P(r,i))},t.prototype._renderHandle=function(t){if(!this._dragging&&this.updateHandleTransform){var e,n=this._axisPointerModel,i=this._api.getZr(),r=this._handle,o=n.getModel("handle"),a=n.get("status");if(!o.get("show")||!a||"hide"===a)return r&&i.remove(r),void(this._handle=null);this._handle||(e=!0,r=this._handle=Uu(o.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(t){ee(t.event)},onmousedown:ZP(this._onHandleDragMove,this,0,0),drift:ZP(this._onHandleDragMove,this),ondragend:ZP(this._onHandleDragEnd,this)}),i.add(r)),QP(r,n,!1),r.setStyle(o.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var s=o.get("size");F(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Tf(this,"_doDispatchAxisPointer",o.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,e)}},t.prototype._moveHandleToValue=function(t,e){qP(this._axisPointerModel,!e&&this._moveAnimation,this._handle,JP(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},t.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(JP(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(JP(i)),XP(n).lastProp=null,this._doDispatchAxisPointer()}},t.prototype._doDispatchAxisPointer=function(){if(this._handle){var t=this._payloadInfo,e=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:e.axis.dim,axisIndex:e.componentIndex}]})}},t.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},t.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null)},t.prototype.doClear=function(){},t.prototype.buildLabel=function(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}},t}();function qP(t,e,n,i){KP(XP(n).lastProp,i)||(XP(n).lastProp=i,e?Ou(n,i,t):(n.stopAnimation(),n.attr(i)))}function KP(t,e){if(X(t)&&X(e)){var n=!0;return P(e,(function(e,i){n=n&&KP(t[i],e)})),!!n}return t===e}function $P(t,e){t[e.get(["label","show"])?"show":"hide"]()}function JP(t){return{x:t.x||0,y:t.y||0,rotation:t.rotation||0}}function QP(t,e,n){var i=e.get("z"),r=e.get("zlevel");t&&t.traverse((function(t){"group"!==t.type&&(null!=i&&(t.z=i),null!=r&&(t.zlevel=r),t.silent=n)}))}function tO(t){var e,n=t.get("type"),i=t.getModel(n+"Style");return"line"===n?(e=i.getLineStyle()).fill=null:"shadow"===n&&((e=i.getAreaStyle()).stroke=null),e}function eO(t,e,n,i,r){var o=nO(n.get("value"),e.axis,e.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),a=n.getModel("label"),s=pc(a.get("padding")||0),l=a.getFont(),u=Fn(o,l),h=r.position,c=u.width+s[1]+s[3],p=u.height+s[0]+s[2],d=r.align;"right"===d&&(h[0]-=c),"center"===d&&(h[0]-=c/2);var f=r.verticalAlign;"bottom"===f&&(h[1]-=p),"middle"===f&&(h[1]-=p/2),function(t,e,n,i){var r=i.getWidth(),o=i.getHeight();t[0]=Math.min(t[0]+e,r)-e,t[1]=Math.min(t[1]+n,o)-n,t[0]=Math.max(t[0],0),t[1]=Math.max(t[1],0)}(h,c,p,i);var g=a.get("backgroundColor");g&&"auto"!==g||(g=e.get(["axisLine","lineStyle","color"])),t.label={x:h[0],y:h[1],style:nh(a,{text:o,font:l,fill:a.getTextColor(),padding:s,backgroundColor:g}),z2:10}}function nO(t,e,n,i,r){t=e.scale.parse(t);var o=e.scale.getLabel({value:t},{precision:r.precision}),a=r.formatter;if(a){var s={value:W_(e,{value:t}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};P(i,(function(t){var e=n.getSeriesByIndex(t.seriesIndex),i=t.dataIndexInside,r=e&&e.getDataParams(i);r&&s.seriesData.push(r)})),H(a)?o=a.replace("{value}",o):G(a)&&(o=a(s))}return o}function iO(t,e,n){var i=[1,0,0,1,0,0];return _e(i,i,n.rotation),me(i,i,n.position),Fu([t.dataToCoord(e),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],i)}function rO(t,e,n,i,r,o){var a=hS.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=r.get(["label","margin"]),eO(e,i,r,o,{position:iO(i.axis,t,n),align:a.textAlign,verticalAlign:a.textVerticalAlign})}function oO(t,e,n){return{x1:t[n=n||0],y1:t[1-n],x2:e[n],y2:e[1-n]}}function aO(t,e,n){return{x:t[n=n||0],y:t[1-n],width:e[n],height:e[1-n]}}function sO(t,e,n,i,r,o){return{cx:t,cy:e,r0:n,r:i,startAngle:r,endAngle:o,clockwise:!0}}var lO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.grid,s=i.get("type"),l=uO(a,o).getOtherAxis(o).getGlobalExtent(),u=o.toGlobalCoord(o.dataToCoord(e,!0));if(s&&"none"!==s){var h=tO(i),c=hO[s](o,u,l);c.style=h,t.graphicKey=c.type,t.pointer=c}rO(e,t,nS(a.model,n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=nS(e.axis.grid.model,e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=iO(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.grid,a=r.getGlobalExtent(!0),s=uO(o,r).getOtherAxis(r).getGlobalExtent(),l="x"===r.dim?0:1,u=[t.x,t.y];u[l]+=e[l],u[l]=Math.min(a[1],u[l]),u[l]=Math.max(a[0],u[l]);var h=(s[1]+s[0])/2,c=[h,h];c[l]=u[l];return{x:u[0],y:u[1],rotation:t.rotation,cursorPoint:c,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][l]}},e}(jP);function uO(t,e){var n={};return n[e.dim+"AxisIndex"]=e.index,t.getCartesian(n)}var hO={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:oO([e,n[0]],[e,n[1]],cO(t))}},shadow:function(t,e,n){var i=Math.max(1,t.getBandWidth()),r=n[1]-n[0];return{type:"Rect",shape:aO([e-i/2,n[0]],[i,r],cO(t))}}};function cO(t){return"x"===t.dim?0:1}var pO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="axisPointer",e.defaultOption={show:"auto",zlevel:0,z:50,type:"line",snap:!1,triggerTooltip:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Nc),dO=Lr(),fO=P;function gO(t,e,n){if(!a.node){var i=e.getZr();dO(i).records||(dO(i).records={}),function(t,e){if(dO(t).initialized)return;function n(n,i){t.on(n,(function(n){var r=function(t){var e={showTip:[],hideTip:[]},n=function(i){var r=e[i.type];r?r.push(i):(i.dispatchAction=n,t.dispatchAction(i))};return{dispatchAction:n,pendings:e}}(e);fO(dO(t).records,(function(t){t&&i(t,n,r.dispatchAction)})),function(t,e){var n,i=t.showTip.length,r=t.hideTip.length;i?n=t.showTip[i-1]:r&&(n=t.hideTip[r-1]);n&&(n.dispatchAction=null,e.dispatchAction(n))}(r.pendings,e)}))}dO(t).initialized=!0,n("click",V(vO,"click")),n("mousemove",V(vO,"mousemove")),n("globalout",yO)}(i,e),(dO(i).records[t]||(dO(i).records[t]={})).handler=n}}function yO(t,e,n){t.handler("leave",null,n)}function vO(t,e,n,i){e.handler(t,n,i)}function mO(t,e){if(!a.node){var n=e.getZr();(dO(n).records||{})[t]&&(dO(n).records[t]=null)}}var _O=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=e.getComponent("tooltip"),r=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";gO("axisPointer",n,(function(t,e,n){"none"!==r&&("leave"===t||r.indexOf(t)>=0)&&n({type:"updateAxisPointer",currTrigger:t,x:e&&e.offsetX,y:e&&e.offsetY})}))},e.prototype.remove=function(t,e){mO("axisPointer",e)},e.prototype.dispose=function(t,e){mO("axisPointer",e)},e.type="axisPointer",e}(pf);function xO(t,e){var n,i=[],r=t.seriesIndex;if(null==r||!(n=e.getSeriesByIndex(r)))return{point:[]};var o=n.getData(),a=Dr(o,t);if(null==a||a<0||F(a))return{point:[]};var s=o.getItemGraphicEl(a),l=n.coordinateSystem;if(n.getTooltipPosition)i=n.getTooltipPosition(a)||[];else if(l&&l.dataToPoint)if(t.isStacked){var u=l.getBaseAxis(),h=l.getOtherAxis(u).dim,c=u.dim,p="x"===h||"radius"===h?1:0,d=o.mapDimension(c),f=[];f[p]=o.get(d,a),f[1-p]=o.get(o.getCalculationInfo("stackResultDimension"),a),i=l.dataToPoint(f)||[]}else i=l.dataToPoint(o.getValues(O(l.dimensions,(function(t){return o.mapDimension(t)})),a))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),i=[g.x+g.width/2,g.y+g.height/2]}return{point:i,el:s}}var bO=Lr();function wO(t,e,n){var i=t.currTrigger,r=[t.x,t.y],o=t,a=t.dispatchAction||B(n.dispatchAction,n),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){CO(r)&&(r=xO({seriesIndex:o.seriesIndex,dataIndex:o.dataIndex},e).point);var l=CO(r),u=o.axesInfo,h=s.axesInfo,c="leave"===i||CO(r),p={},d={},f={list:[],map:{}},g={showPointer:V(MO,d),showTooltip:V(IO,f)};P(s.coordSysMap,(function(t,e){var n=l||t.containPoint(r);P(s.coordSysAxesInfo[e],(function(t,e){var i=t.axis,o=function(t,e){for(var n=0;n<(t||[]).length;n++){var i=t[n];if(e.axis.dim===i.axisDim&&e.axis.model.componentIndex===i.axisIndex)return i}}(u,t);if(!c&&n&&(!u||o)){var a=o&&o.value;null!=a||l||(a=i.pointToData(r)),null!=a&&SO(t,a,g,!1,p)}}))}));var y={};return P(h,(function(t,e){var n=t.linkGroup;n&&!d[e]&&P(n.axesInfo,(function(e,i){var r=d[i];if(e!==t&&r){var o=r.value;n.mapper&&(o=t.axis.scale.parse(n.mapper(o,TO(e),TO(t)))),y[t.key]=o}}))})),P(y,(function(t,e){SO(h[e],t,g,!0,p)})),function(t,e,n){var i=n.axesInfo=[];P(e,(function(e,n){var r=e.axisPointerModel.option,o=t[n];o?(!e.useHandle&&(r.status="show"),r.value=o.value,r.seriesDataIndices=(o.payloadBatch||[]).slice()):!e.useHandle&&(r.status="hide"),"show"===r.status&&i.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:r.value})}))}(d,h,p),function(t,e,n,i){if(CO(e)||!t.list.length)return void i({type:"hideTip"});var r=((t.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};i({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:r.dataIndexInside,dataIndex:r.dataIndex,seriesIndex:r.seriesIndex,dataByCoordSys:t.list})}(f,r,t,a),function(t,e,n){var i=n.getZr(),r="axisPointerLastHighlights",o=bO(i)[r]||{},a=bO(i)[r]={};P(t,(function(t,e){var n=t.axisPointerModel.option;"show"===n.status&&P(n.seriesDataIndices,(function(t){var e=t.seriesIndex+" | "+t.dataIndex;a[e]=t}))}));var s=[],l=[];P(o,(function(t,e){!a[e]&&l.push(t)})),P(a,(function(t,e){!o[e]&&s.push(t)})),l.length&&n.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&n.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}(h,0,n),p}}function SO(t,e,n,i,r){var o=t.axis;if(!o.scale.isBlank()&&o.containData(e))if(t.involveSeries){var a=function(t,e){var n=e.axis,i=n.dim,r=t,o=[],a=Number.MAX_VALUE,s=-1;return P(e.seriesModels,(function(e,l){var u,h,c=e.getData().mapDimensionsAll(i);if(e.getAxisTooltipData){var p=e.getAxisTooltipData(c,t,n);h=p.dataIndices,u=p.nestestValue}else{if(!(h=e.getData().indicesOfNearest(c[0],t,"category"===n.type?.5:null)).length)return;u=e.getData().get(c[0],h[0])}if(null!=u&&isFinite(u)){var d=t-u,f=Math.abs(d);f<=a&&((f=0&&s<0)&&(a=f,s=d,r=u,o.length=0),P(h,(function(t){o.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})})))}})),{payloadBatch:o,snapToValue:r}}(e,t),s=a.payloadBatch,l=a.snapToValue;s[0]&&null==r.seriesIndex&&I(r,s[0]),!i&&t.snap&&o.containData(l)&&null!=l&&(e=l),n.showPointer(t,e,s),n.showTooltip(t,a,l)}else n.showPointer(t,e)}function MO(t,e,n,i){t[e.key]={value:n,payloadBatch:i}}function IO(t,e,n,i){var r=n.payloadBatch,o=e.axis,a=o.model,s=e.axisPointerModel;if(e.triggerTooltip&&r.length){var l=e.coordSys.model,u=bS(l),h=t.map[u];h||(h=t.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},t.list.push(h)),h.dataByAxis.push({axisDim:o.dim,axisIndex:a.componentIndex,axisType:a.type,axisId:a.id,value:i,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:r.slice()})}}function TO(t){var e=t.axis.model,n={},i=n.axisDim=t.axis.dim;return n.axisIndex=n[i+"AxisIndex"]=e.componentIndex,n.axisName=n[i+"AxisName"]=e.name,n.axisId=n[i+"AxisId"]=e.id,n}function CO(t){return!t||null==t[0]||isNaN(t[0])||null==t[1]||isNaN(t[1])}function AO(t){SS.registerAxisPointerClass("CartesianAxisPointer",lO),t.registerComponentModel(pO),t.registerComponentView(_O),t.registerPreprocessor((function(t){if(t){(!t.axisPointer||0===t.axisPointer.length)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!F(e)&&(t.axisPointer.link=[e])}})),t.registerProcessor(t.PRIORITY.PROCESSOR.STATISTIC,(function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=yS(t,e)})),t.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},wO)}var DO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis;"angle"===o.dim&&(this.animationThreshold=Math.PI/18);var a=o.polar,s=a.getOtherAxis(o).getExtent(),l=o.dataToCoord(e),u=i.get("type");if(u&&"none"!==u){var h=tO(i),c=LO[u](o,a,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}var p=function(t,e,n,i,r){var o=e.axis,a=o.dataToCoord(t),s=i.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l,u,h,c=i.getRadiusAxis().getExtent();if("radius"===o.dim){var p=[1,0,0,1,0,0];_e(p,p,s),me(p,p,[i.cx,i.cy]),l=Fu([a,-r],p);var d=e.getModel("axisLabel").get("rotate")||0,f=hS.innerTextLayout(s,d*Math.PI/180,-1);u=f.textAlign,h=f.textVerticalAlign}else{var g=c[1];l=i.coordToPoint([g+r,a]);var y=i.cx,v=i.cy;u=Math.abs(l[0]-y)/g<.3?"center":l[0]>y?"left":"right",h=Math.abs(l[1]-v)/g<.3?"middle":l[1]>v?"top":"bottom"}return{position:l,align:u,verticalAlign:h}}(e,n,0,a,i.get(["label","margin"]));eO(t,n,i,r,p)},e}(jP);var LO={line:function(t,e,n,i){return"angle"===t.dim?{type:"Line",shape:oO(e.coordToPoint([i[0],n]),e.coordToPoint([i[1],n]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:n}}},shadow:function(t,e,n,i){var r=Math.max(1,t.getBandWidth()),o=Math.PI/180;return"angle"===t.dim?{type:"Sector",shape:sO(e.cx,e.cy,i[0],i[1],(-n-r/2)*o,(r/2-n)*o)}:{type:"Sector",shape:sO(e.cx,e.cy,n-r/2,n+r/2,0,2*Math.PI)}}},kO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.findAxisModel=function(t){var e;return this.ecModel.eachComponent(t,(function(t){t.getCoordSysModel()===this&&(e=t)}),this),e},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={zlevel:0,z:0,center:["50%","50%"],radius:"80%"},e}(Nc),PO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Or).models[0]},e.type="polarAxis",e}(Nc);L(PO,j_);var OO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="angleAxis",e}(PO),RO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="radiusAxis",e}(PO),NO=function(t){function e(e,n){return t.call(this,"radius",e,n)||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e}(vx);NO.prototype.dataToRadius=vx.prototype.dataToCoord,NO.prototype.radiusToData=vx.prototype.coordToData;var EO=Lr(),zO=function(t){function e(e,n){return t.call(this,"angle",e,n||[0,360])||this}return n(e,t),e.prototype.pointToData=function(t,e){return this.polar.pointToData(t,e)["radius"===this.dim?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,e=t.getLabelModel(),n=t.scale,i=n.getExtent(),r=n.count();if(i[1]-i[0]<1)return 0;var o=i[0],a=t.dataToCoord(o+1)-t.dataToCoord(o),s=Math.abs(a),l=Fn(null==o?"":o+"",e.getFont(),"center","top"),u=Math.max(l.height,7)/s;isNaN(u)&&(u=1/0);var h=Math.max(0,Math.floor(u)),c=EO(t.model),p=c.lastAutoInterval,d=c.lastTickCount;return null!=p&&null!=d&&Math.abs(p-h)<=1&&Math.abs(d-r)<=1&&p>h?h=p:(c.lastTickCount=r,c.lastAutoInterval=h),h},e}(vx);zO.prototype.dataToAngle=vx.prototype.dataToCoord,zO.prototype.angleToData=vx.prototype.coordToData;var BO=function(){function t(t){this.dimensions=["radius","angle"],this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new NO,this._angleAxis=new zO,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return t.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},t.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},t.prototype.getAxis=function(t){return this["_"+t+"Axis"]},t.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},t.prototype.getAxesByScale=function(t){var e=[],n=this._angleAxis,i=this._radiusAxis;return n.scale.type===t&&e.push(n),i.scale.type===t&&e.push(i),e},t.prototype.getAngleAxis=function(){return this._angleAxis},t.prototype.getRadiusAxis=function(){return this._radiusAxis},t.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},t.prototype.getTooltipAxes=function(t){var e=null!=t&&"auto"!==t?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},t.prototype.dataToPoint=function(t,e){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)])},t.prototype.pointToData=function(t,e){var n=this.pointToCoord(t);return[this._radiusAxis.radiusToData(n[0],e),this._angleAxis.angleToData(n[1],e)]},t.prototype.pointToCoord=function(t){var e=t[0]-this.cx,n=t[1]-this.cy,i=this.getAngleAxis(),r=i.getExtent(),o=Math.min(r[0],r[1]),a=Math.max(r[0],r[1]);i.inverse?o=a-360:a=o+360;var s=Math.sqrt(e*e+n*n);e/=s,n/=s;for(var l=Math.atan2(-n,e)/Math.PI*180,u=la;)l+=360*u;return[s,l]},t.prototype.coordToPoint=function(t){var e=t[0],n=t[1]/180*Math.PI;return[Math.cos(n)*e+this.cx,-Math.sin(n)*e+this.cy]},t.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis().getExtent().slice();e[0]>e[1]&&e.reverse();var n=t.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:e[0],r:e[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(t,e){var n=t-this.cx,i=e-this.cy,r=n*n+i*i,o=this.r,a=this.r0;return r<=o*o&&r>=a*a}}},t.prototype.convertToPixel=function(t,e,n){return VO(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return VO(e)===this?this.pointToData(n):null},t}();function VO(t){var e=t.seriesModel,n=t.polarModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}function FO(t,e){var n=this,i=n.getAngleAxis(),r=n.getRadiusAxis();if(i.scale.setExtent(1/0,-1/0),r.scale.setExtent(1/0,-1/0),t.eachSeries((function(t){if(t.coordinateSystem===n){var e=t.getData();P(Z_(e,"radius"),(function(t){r.scale.unionExtentFromData(e,t)})),P(Z_(e,"angle"),(function(t){i.scale.unionExtentFromData(e,t)}))}})),F_(i.scale,i.model),F_(r.scale,r.model),"category"===i.type&&!i.onBand){var o=i.getExtent(),a=360/i.scale.count();i.inverse?o[1]+=a:o[1]-=a,i.setExtent(o[0],o[1])}}function GO(t,e){if(t.type=e.get("type"),t.scale=G_(e),t.onBand=e.get("boundaryGap")&&"category"===t.type,t.inverse=e.get("inverse"),function(t){return"angleAxis"===t.mainType}(e)){t.inverse=t.inverse!==e.get("clockwise");var n=e.get("startAngle");t.setExtent(n,n+(t.inverse?-360:360))}e.axis=t,t.model=e}var HO={dimensions:BO.prototype.dimensions,create:function(t,e){var n=[];return t.eachComponent("polar",(function(t,i){var r=new BO(i+"");r.update=FO;var o=r.getRadiusAxis(),a=r.getAngleAxis(),s=t.findAxisModel("radiusAxis"),l=t.findAxisModel("angleAxis");GO(o,s),GO(a,l),function(t,e,n){var i=e.get("center"),r=n.getWidth(),o=n.getHeight();t.cx=Zi(i[0],r),t.cy=Zi(i[1],o);var a=t.getRadiusAxis(),s=Math.min(r,o)/2,l=e.get("radius");null==l?l=[0,"100%"]:F(l)||(l=[0,l]);var u=[Zi(l[0],s),Zi(l[1],s)];a.inverse?a.setExtent(u[1],u[0]):a.setExtent(u[0],u[1])}(r,t,e),n.push(r),t.coordinateSystem=r,r.model=t})),t.eachSeries((function(t){if("polar"===t.get("coordinateSystem")){var e=t.getReferringComponents("polar",Or).models[0];0,t.coordinateSystem=e.coordinateSystem}})),n}},WO=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function YO(t,e,n){e[1]>e[0]&&(e=e.slice().reverse());var i=t.coordToPoint([e[0],n]),r=t.coordToPoint([e[1],n]);return{x1:i[0],y1:i[1],x2:r[0],y2:r[1]}}function XO(t){return t.getRadiusAxis().inverse?0:1}function UO(t){var e=t[0],n=t[t.length-1];e&&n&&Math.abs(Math.abs(e.coord-n.coord)-360)<1e-4&&t.pop()}var ZO=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.axisPointerClass="PolarAxisPointer",n}return n(e,t),e.prototype.render=function(t,e){if(this.group.removeAll(),t.get("show")){var n=t.axis,i=n.polar,r=i.getRadiusAxis().getExtent(),o=n.getTicksCoords(),a=n.getMinorTicksCoords(),s=O(n.getViewLabels(),(function(t){t=w(t);var e=n.scale,i="ordinal"===e.type?e.getRawOrdinalNumber(t.tickValue):t.tickValue;return t.coord=n.dataToCoord(i),t}));UO(s),UO(o),P(WO,(function(e){!t.get([e,"show"])||n.scale.isBlank()&&"axisLine"!==e||jO[e](this.group,t,i,o,a,r,s)}),this)}},e.type="angleAxis",e}(SS),jO={axisLine:function(t,e,n,i,r,o){var a,s=e.getModel(["axisLine","lineStyle"]),l=XO(n),u=l?0:1;(a=0===o[u]?new Tl({shape:{cx:n.cx,cy:n.cy,r:o[l]},style:s.getLineStyle(),z2:1,silent:!0}):new Xl({shape:{cx:n.cx,cy:n.cy,r:o[l],r0:o[u]},style:s.getLineStyle(),z2:1,silent:!0})).style.fill=null,t.add(a)},axisTick:function(t,e,n,i,r,o){var a=e.getModel("axisTick"),s=(a.get("inside")?-1:1)*a.get("length"),l=o[XO(n)],u=O(i,(function(t){return new tu({shape:YO(n,[l,l+s],t.coord)})}));t.add(Du(u,{style:T(a.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(t,e,n,i,r,o){if(r.length){for(var a=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(a.get("inside")?-1:1)*s.get("length"),u=o[XO(n)],h=[],c=0;cf?"left":"right",v=Math.abs(d[1]-g)/p<.3?"middle":d[1]>g?"top":"bottom";if(s&&s[c]){var m=s[c];X(m)&&m.textStyle&&(a=new Sh(m.textStyle,l,l.ecModel))}var _=new ls({silent:hS.isLabelSilent(e),style:nh(a,{x:d[0],y:d[1],fill:a.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:i.formattedLabel,align:y,verticalAlign:v})});if(t.add(_),h){var x=hS.makeAxisEventDataBase(e);x.targetType="axisLabel",x.value=i.rawLabel,ys(_).eventData=x}}),this)},splitLine:function(t,e,n,i,r,o){var a=e.getModel("splitLine").getModel("lineStyle"),s=a.get("color"),l=0;s=s instanceof Array?s:[s];for(var u=[],h=0;h=0?"p":"n",T=x;m&&(i[s][M]||(i[s][M]={p:x,n:x}),T=i[s][M][I]);var C=void 0,A=void 0,D=void 0,L=void 0;if("radius"===c.dim){var k=c.dataToCoord(S)-x,P=o.dataToCoord(M);Math.abs(k)1?(s.width=a,s.height=a/d):(s.height=a,s.width=a*d),s.y=o[1]-s.height/2,s.x=o[0]-s.width/2;else{var g=t.getBoxLayoutParams();g.aspect=d,s=Ac(g,{width:c,height:p})}this.setViewRect(s.x,s.y,s.width,s.height),this.setCenter(t.get("center")),this.setZoom(t.get("zoom"))}L(oR,QM);var lR=new(function(){function t(){this.dimensions=oR.prototype.dimensions}return t.prototype.create=function(t,e){var n=[];t.eachComponent("geo",(function(t,i){var r=t.get("map"),o=t.get("aspectScale"),a=!0,s=lg(r);s&&s[0]&&"svg"===s[0].type?(null==o&&(o=1),a=!1):null==o&&(o=.75);var l=new oR(r+i,r,t.get("nameMap"),a);l.aspectScale=o,l.zoomLimit=t.get("scaleLimit"),n.push(l),t.coordinateSystem=l,l.model=t,l.resize=sR,l.resize(t,e)})),t.eachSeries((function(t){if("geo"===t.get("coordinateSystem")){var e=t.get("geoIndex")||0;t.coordinateSystem=n[e]}}));var i={};return t.eachSeriesByType("map",(function(t){if(!t.getHostGeoModel()){var e=t.getMapType();i[e]=i[e]||[],i[e].push(t)}})),P(i,(function(t,i){var r=O(t,(function(t){return t.get("nameMap")})),o=new oR(i,i,M(r));o.zoomLimit=Q.apply(null,O(t,(function(t){return t.get("scaleLimit")}))),n.push(o),o.resize=sR,o.aspectScale=t[0].get("aspectScale"),o.resize(t[0],e),P(t,(function(t){t.coordinateSystem=o,function(t,e){P(e.get("geoCoord"),(function(e,n){t.addGeoCoord(n,e)}))}(o,t)}))})),n},t.prototype.getFilledRegions=function(t,e,n){for(var i=(t||[]).slice(),r=ht(),o=0;o=e.y&&t[1]<=e.y+e.height:n.contain(n.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},t.prototype.pointToData=function(t){var e=this.getAxis();return[e.coordToData(e.toLocalCoord(t["horizontal"===e.orient?0:1]))]},t.prototype.dataToPoint=function(t){var e=this.getAxis(),n=this.getRect(),i=[],r="horizontal"===e.orient?0:1;return t instanceof Array&&(t=t[0]),i[r]=e.toGlobalCoord(e.dataToCoord(+t)),i[1-r]=0===r?n.y+n.height/2:n.x+n.width/2,i},t.prototype.convertToPixel=function(t,e,n){return _R(e)===this?this.dataToPoint(n):null},t.prototype.convertFromPixel=function(t,e,n){return _R(e)===this?this.pointToData(n):null},t}();function _R(t){var e=t.seriesModel,n=t.singleAxisModel;return n&&n.coordinateSystem||e&&e.coordinateSystem}var xR={create:function(t,e){var n=[];return t.eachComponent("singleAxis",(function(i,r){var o=new mR(i,t,e);o.name="single_"+r,o.resize(i,e),i.coordinateSystem=o,n.push(o)})),t.eachSeries((function(t){if("singleAxis"===t.get("coordinateSystem")){var e=t.getReferringComponents("singleAxis",Or).models[0];t.coordinateSystem=e&&e.coordinateSystem}})),n},dimensions:mR.prototype.dimensions},bR=["x","y"],wR=["width","height"],SR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.makeElOption=function(t,e,n,i,r){var o=n.axis,a=o.coordinateSystem,s=TR(a,1-IR(o)),l=a.dataToPoint(e)[0],u=i.get("type");if(u&&"none"!==u){var h=tO(i),c=MR[u](o,l,s);c.style=h,t.graphicKey=c.type,t.pointer=c}rO(e,t,cR(n),n,i,r)},e.prototype.getHandleTransform=function(t,e,n){var i=cR(e,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var r=iO(e.axis,t,i);return{x:r[0],y:r[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,e,n,i){var r=n.axis,o=r.coordinateSystem,a=IR(r),s=TR(o,a),l=[t.x,t.y];l[a]+=e[a],l[a]=Math.min(s[1],l[a]),l[a]=Math.max(s[0],l[a]);var u=TR(o,1-a),h=(u[1]+u[0])/2,c=[h,h];return c[a]=l[a],{x:l[0],y:l[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(jP),MR={line:function(t,e,n){return{type:"Line",subPixelOptimize:!0,shape:oO([e,n[0]],[e,n[1]],IR(t))}},shadow:function(t,e,n){var i=t.getBandWidth(),r=n[1]-n[0];return{type:"Rect",shape:aO([e-i/2,n[0]],[i,r],IR(t))}}};function IR(t){return t.isHorizontal()?0:1}function TR(t,e){var n=t.getRect();return[n[bR[e]],n[bR[e]]+n[wR[e]]]}var CR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="single",e}(pf);var AR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(e,n,i){var r=Pc(e);t.prototype.init.apply(this,arguments),DR(e,r)},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),DR(this.option,e)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={zlevel:0,z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",nameMap:"en",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",nameMap:"en",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Nc);function DR(t,e){var n,i=t.cellSize;1===(n=F(i)?i:t.cellSize=[i,i]).length&&(n[1]=n[0]);var r=O([0,1],(function(t){return function(t,e){return null!=t[Ic[e][0]]||null!=t[Ic[e][1]]&&null!=t[Ic[e][2]]}(e,t)&&(n[t]="auto"),null!=n[t]&&"auto"!==n[t]}));kc(t,e,{type:"box",ignoreSize:r})}var LR={EN:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],CN:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},kR={EN:["S","M","T","W","T","F","S"],CN:["日","一","二","三","四","五","六"]},PR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){var i=this.group;i.removeAll();var r=t.coordinateSystem,o=r.getRangeInfo(),a=r.getOrient();this._renderDayRect(t,o,i),this._renderLines(t,o,a,i),this._renderYearText(t,o,a,i),this._renderMonthText(t,a,i),this._renderWeekText(t,o,a,i)},e.prototype._renderDayRect=function(t,e,n){for(var i=t.coordinateSystem,r=t.getModel("itemStyle").getItemStyle(),o=i.getCellWidth(),a=i.getCellHeight(),s=e.start.time;s<=e.end.time;s=i.getNextNDay(s,1).time){var l=i.dataToRect([s],!1).tl,u=new os({shape:{x:l[0],y:l[1],width:o,height:a},cursor:"default",style:r});n.add(u)}},e.prototype._renderLines=function(t,e,n,i){var r=this,o=t.coordinateSystem,a=t.getModel(["splitLine","lineStyle"]).getLineStyle(),s=t.get(["splitLine","show"]),l=a.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var u=e.start,h=0;u.time<=e.end.time;h++){p(u.formatedDate),0===h&&(u=o.getDateInfo(e.start.y+"-"+e.start.m));var c=u.date;c.setMonth(c.getMonth()+1),u=o.getDateInfo(c)}function p(e){r._firstDayOfMonth.push(o.getDateInfo(e)),r._firstDayPoints.push(o.dataToRect([e],!1).tl);var l=r._getLinePointsOfOneWeek(t,e,n);r._tlpoints.push(l[0]),r._blpoints.push(l[l.length-1]),s&&r._drawSplitline(l,a,i)}p(o.getNextNDay(e.end.time,1).formatedDate),s&&this._drawSplitline(r._getEdgesPoints(r._tlpoints,l,n),a,i),s&&this._drawSplitline(r._getEdgesPoints(r._blpoints,l,n),a,i)},e.prototype._getEdgesPoints=function(t,e,n){var i=[t[0].slice(),t[t.length-1].slice()],r="horizontal"===n?0:1;return i[0][r]=i[0][r]-e/2,i[1][r]=i[1][r]+e/2,i},e.prototype._drawSplitline=function(t,e,n){var i=new $l({z2:20,shape:{points:t},style:e});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,e,n){for(var i=t.coordinateSystem,r=i.getDateInfo(e),o=[],a=0;a<7;a++){var s=i.getNextNDay(r.time,a),l=i.dataToRect([s.time],!1);o[2*s.day]=l.tl,o[2*s.day+1]=l["horizontal"===n?"bl":"tr"]}return o},e.prototype._formatterLabel=function(t,e){return"string"==typeof t&&t?(n=t,P(e,(function(t,e){n=n.replace("{"+e+"}",i?gc(t):t)})),n):"function"==typeof t?t(e):e.nameMap;var n,i},e.prototype._yearTextPositionControl=function(t,e,n,i,r){var o=e[0],a=e[1],s=["center","bottom"];"bottom"===i?(a+=r,s=["center","top"]):"left"===i?o-=r:"right"===i?(o+=r,s=["center","top"]):a-=r;var l=0;return"left"!==i&&"right"!==i||(l=Math.PI/2),{rotation:l,x:o,y:a,style:{align:s[0],verticalAlign:s[1]}}},e.prototype._renderYearText=function(t,e,n,i){var r=t.getModel("yearLabel");if(r.get("show")){var o=r.get("margin"),a=r.get("position");a||(a="horizontal"!==n?"top":"left");var s=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],l=(s[0][0]+s[1][0])/2,u=(s[0][1]+s[1][1])/2,h="horizontal"===n?0:1,c={top:[l,s[h][1]],bottom:[l,s[1-h][1]],left:[s[1-h][0],u],right:[s[h][0],u]},p=e.start.y;+e.end.y>+e.start.y&&(p=p+"-"+e.end.y);var d=r.get("formatter"),f={start:e.start.y,end:e.end.y,nameMap:p},g=this._formatterLabel(d,f),y=new ls({z2:30,style:nh(r,{text:g})});y.attr(this._yearTextPositionControl(y,c[a],n,a,o)),i.add(y)}},e.prototype._monthTextPositionControl=function(t,e,n,i,r){var o="left",a="top",s=t[0],l=t[1];return"horizontal"===n?(l+=r,e&&(o="center"),"start"===i&&(a="bottom")):(s+=r,e&&(a="middle"),"start"===i&&(o="right")),{x:s,y:l,align:o,verticalAlign:a}},e.prototype._renderMonthText=function(t,e,n){var i=t.getModel("monthLabel");if(i.get("show")){var r=i.get("nameMap"),o=i.get("margin"),a=i.get("position"),s=i.get("align"),l=[this._tlpoints,this._blpoints];H(r)&&(r=LR[r.toUpperCase()]||[]);var u="start"===a?0:1,h="horizontal"===e?0:1;o="start"===a?-o:o;for(var c="center"===s,p=0;p=i.start.time&&n.timea.end.time&&t.reverse(),t},t.prototype._getRangeInfo=function(t){var e,n=[this.getDateInfo(t[0]),this.getDateInfo(t[1])];n[0].time>n[1].time&&(e=!0,n.reverse());var i=Math.floor(n[1].time/OR)-Math.floor(n[0].time/OR)+1,r=new Date(n[0].time),o=r.getDate(),a=n[1].date.getDate();r.setDate(o+i-1);var s=r.getDate();if(s!==a)for(var l=r.getTime()-n[1].time>0?1:-1;(s=r.getDate())!==a&&(r.getTime()-n[1].time)*l>0;)i-=l,r.setDate(s-l);var u=Math.floor((i+n[0].day+6)/7),h=e?1-u:u-1;return e&&n.reverse(),{range:[n[0].formatedDate,n[1].formatedDate],start:n[0],end:n[1],allDay:i,weeks:u,nthWeek:h,fweek:n[0].day,lweek:n[1].day}},t.prototype._getDateByWeeksAndDay=function(t,e,n){var i=this._getRangeInfo(n);if(t>i.weeks||0===t&&ei.lweek)return null;var r=7*(t-1)-i.fweek+e,o=new Date(i.start.time);return o.setDate(+i.start.d+r),this.getDateInfo(o)},t.create=function(e,n){var i=[];return e.eachComponent("calendar",(function(r){var o=new t(r,e,n);i.push(o),r.coordinateSystem=o})),e.eachSeries((function(t){"calendar"===t.get("coordinateSystem")&&(t.coordinateSystem=i[t.get("calendarIndex")||0])})),i},t.dimensions=["time","value"],t}();function NR(t){var e=t.calendarModel,n=t.seriesModel;return e?e.coordinateSystem:n?n.coordinateSystem:null}var ER=Lr(),zR={path:null,compoundPath:null,group:zi,image:Ja,text:ls},BR=function(t){var e=t.graphic;F(e)?e[0]&&e[0].elements?t.graphic=[t.graphic[0]]:t.graphic=[{elements:e}]:e&&!e.elements&&(t.graphic=[{elements:[e]}])},VR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.mergeOption=function(e,n){var i=this.option.elements;this.option.elements=null,t.prototype.mergeOption.call(this,e,n),this.option.elements=i},e.prototype.optionUpdated=function(t,e){var n=this.option,i=(e?n:t).elements,r=n.elements=e?[]:n.elements,o=[];this._flatten(i,o,null);var a=Sr(r,o,"normalMerge"),s=this._elOptionsToUpdate=[];P(a,(function(t,e){var n=t.newOption;n&&(s.push(n),function(t,e){var n=t.existing;if(e.id=t.keyInfo.id,!e.type&&n&&(e.type=n.type),null==e.parentId){var i=e.parentOption;i?e.parentId=i.id:n&&(e.parentId=n.parentId)}e.parentOption=null}(t,n),function(t,e,n){var i=I({},n),r=t[e],o=n.$action||"merge";if("merge"===o){if(r)S(r,i,!0),kc(r,i,{ignoreSize:!0}),Oc(n,r);else t[e]=i}else"replace"===o?t[e]=i:"remove"===o&&r&&(t[e]=null)}(r,e,n),function(t,e){if(!t)return;if(t.hv=e.hv=[WR(e,["left","right"]),WR(e,["top","bottom"])],"group"===t.type){var n=t,i=e;null==n.width&&(n.width=i.width=0),null==n.height&&(n.height=i.height=0)}}(r[e],n))}),this);for(var l=r.length-1;l>=0;l--)null==r[l]?r.splice(l,1):delete r[l].$action},e.prototype._flatten=function(t,e,n){P(t,(function(t){if(t){n&&(t.parentOption=n),e.push(t);var i=t.children;"group"===t.type&&i&&this._flatten(i,e,t),delete t.children}}),this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Nc),FR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(){this._elMap=ht()},e.prototype.render=function(t,e,n){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,n)},e.prototype._updateElements=function(t){var e=t.useElOptionsToUpdate();if(e){var n=this._elMap,i=this.group;P(e,(function(e){var r=Tr(e.id,null),o=null!=r?n.get(r):null,a=Tr(e.parentId,null),s=null!=a?n.get(a):i,l=e.type,u=e.style;"text"===l&&u&&e.hv&&e.hv[1]&&(u.textVerticalAlign=u.textBaseline=u.verticalAlign=u.align=null);var h=e.textContent,c=e.textConfig;if(u&&yk(u,l,!!c,!!h)){var p=vk(u,l,!0);!c&&p.textConfig&&(c=e.textConfig=p.textConfig),!h&&p.textContent&&(h=p.textContent)}var d=function(t){return t=I({},t),P(["id","parentId","$action","hv","bounding","textContent"].concat(Mc),(function(e){delete t[e]})),t}(e);var f=e.$action||"merge";"merge"===f?o?o.attr(d):GR(r,s,d,n):"replace"===f?(HR(o,n),GR(r,s,d,n)):"remove"===f&&HR(o,n);var g=n.get(r);if(g&&h)if("merge"===f){var y=g.getTextContent();y?y.attr(h):g.setTextContent(new ls(h))}else"replace"===f&&g.setTextContent(new ls(h));if(g){var v=ER(g);v.__ecGraphicWidthOption=e.width,v.__ecGraphicHeightOption=e.height,function(t,e,n){var i=ys(t).eventData;t.silent||t.ignore||i||(i=ys(t).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:t.name});i&&(i.info=n.info)}(g,t,e)}}))}},e.prototype._relocate=function(t,e){for(var n=t.option.elements,i=this.group,r=this._elMap,o=e.getWidth(),a=e.getHeight(),s=0;s=0;s--){var c,p,d;if(d=null!=(p=Tr((c=n[s]).id,null))?r.get(p):null){var f=d.parent;h=ER(f);Dc(d,c,f===i?{width:o,height:a}:{width:h.__ecGraphicWidth,height:h.__ecGraphicHeight},null,{hv:c.hv,boundingMode:c.bounding})}}},e.prototype._clear=function(){var t=this._elMap;t.each((function(e){HR(e,t)})),this._elMap=ht()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(pf);function GR(t,e,n,i){var r=n.type;var o=dt(zR,r)?zR[r]:Iu(r);var a=new o(n);e.add(a),i.set(t,a),ER(a).__ecGraphicId=t}function HR(t,e){var n=t&&t.parent;n&&("group"===t.type&&t.traverse((function(t){HR(t,e)})),e.removeKey(ER(t).__ecGraphicId),n.remove(t))}function WR(t,e){var n;return P(e,(function(e){null!=t[e]&&"auto"!==t[e]&&(n=!0)})),n}var YR=["x","y","radius","angle","single"],XR=["cartesian2d","polar","singleAxis"];function UR(t){return t+"Axis"}function ZR(t,e){var n,i=ht(),r=[],o=ht();t.eachComponent({mainType:"dataZoom",query:e},(function(t){o.get(t.uid)||s(t)}));do{n=!1,t.eachComponent("dataZoom",a)}while(n);function a(t){!o.get(t.uid)&&function(t){var e=!1;return t.eachTargetAxis((function(t,n){var r=i.get(t);r&&r[n]&&(e=!0)})),e}(t)&&(s(t),n=!0)}function s(t){o.set(t.uid,!0),r.push(t),t.eachTargetAxis((function(t,e){(i.get(t)||i.set(t,[]))[e]=!0}))}return r}function jR(t){var e=t.ecModel,n={infoList:[],infoMap:ht()};return t.eachTargetAxis((function(t,i){var r=e.getComponent(UR(t),i);if(r){var o=r.getCoordSysModel();if(o){var a=o.uid,s=n.infoMap.get(a);s||(s={model:o,axisModels:[]},n.infoList.push(s),n.infoMap.set(a,s)),s.axisModels.push(r)}}})),n}var qR=function(){function t(){this.indexList=[],this.indexMap=[]}return t.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},t}(),KR=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._autoThrottle=!0,n._noTarget=!0,n._rangePropMode=["percent","percent"],n}return n(e,t),e.prototype.init=function(t,e,n){var i=$R(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var e=$R(t);S(this.option,t,!0),S(this.settledOption,e,!0),this._doInit(e)},e.prototype._doInit=function(t){var e=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;P([["start","startValue"],["end","endValue"]],(function(t,i){"value"===this._rangePropMode[i]&&(e[t[0]]=n[t[0]]=null)}),this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),e=this._targetAxisInfoMap=ht();this._fillSpecifiedTargetAxis(e)?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(e,this._orient)),this._noTarget=!0,e.each((function(t){t.indexList.length&&(this._noTarget=!1)}),this)},e.prototype._fillSpecifiedTargetAxis=function(t){var e=!1;return P(YR,(function(n){var i=this.getReferringComponents(UR(n),Rr);if(i.specified){e=!0;var r=new qR;P(i.models,(function(t){r.add(t.componentIndex)})),t.set(n,r)}}),this),e},e.prototype._fillAutoTargetAxisByOrient=function(t,e){var n=this.ecModel,i=!0;if(i){var r="vertical"===e?"y":"x";o(n.findComponents({mainType:r+"Axis"}),r)}i&&o(n.findComponents({mainType:"singleAxis",filter:function(t){return t.get("orient",!0)===e}}),"single");function o(e,n){var r=e[0];if(r){var o=new qR;if(o.add(r.componentIndex),t.set(n,o),i=!1,"x"===n||"y"===n){var a=r.getReferringComponents("grid",Or).models[0];a&&P(e,(function(t){r.componentIndex!==t.componentIndex&&a===t.getReferringComponents("grid",Or).models[0]&&o.add(t.componentIndex)}))}}}i&&P(YR,(function(e){if(i){var r=n.findComponents({mainType:UR(e),filter:function(t){return"category"===t.get("type",!0)}});if(r[0]){var o=new qR;o.add(r[0].componentIndex),t.set(e,o),i=!1}}}),this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis((function(e){!t&&(t=e)}),this),"y"===t?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var e=this.ecModel.option;this.option.throttle=e.animation&&e.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var e=this._rangePropMode,n=this.get("rangeMode");P([["start","startValue"],["end","endValue"]],(function(i,r){var o=null!=t[i[0]],a=null!=t[i[1]];o&&!a?e[r]="percent":!o&&a?e[r]="value":n?e[r]=n[r]:o&&(e[r]="percent")}))},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis((function(e,n){null==t&&(t=this.ecModel.getComponent(UR(e),n))}),this),t},e.prototype.eachTargetAxis=function(t,e){this._targetAxisInfoMap.each((function(n,i){P(n.indexList,(function(n){t.call(e,i,n)}))}))},e.prototype.getAxisProxy=function(t,e){var n=this.getAxisModel(t,e);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,e){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[e])return this.ecModel.getComponent(UR(t),e)},e.prototype.setRawRange=function(t){var e=this.option,n=this.settledOption;P([["start","startValue"],["end","endValue"]],(function(i){null==t[i[0]]&&null==t[i[1]]||(e[i[0]]=n[i[0]]=t[i[0]],e[i[1]]=n[i[1]]=t[i[1]])}),this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var e=this.option;P(["start","startValue","end","endValue"],(function(n){e[n]=t[n]}))},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,e){if(null!=t||null!=e)return this.getAxisProxy(t,e).getDataValueWindow();var n=this.findRepresentativeAxisProxy();return n?n.getDataValueWindow():void 0},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var e,n=this._targetAxisInfoMap.keys(),i=0;i=0}(e)){var n=UR(this._dimName),i=e.getReferringComponents(n,Or).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}}),this),t},t.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},t.prototype.getMinMaxSpan=function(){return w(this._minMaxSpan)},t.prototype.calculateDataWindow=function(t){var e,n=this._dataExtent,i=this.getAxisModel().axis.scale,r=this._dataZoomModel.getRangePropMode(),o=[0,100],a=[],s=[];eN(["start","end"],(function(l,u){var h=t[l],c=t[l+"Value"];"percent"===r[u]?(null==h&&(h=o[u]),c=i.parse(Ui(h,o,n))):(e=!0,h=Ui(c=null==c?n[u]:i.parse(c),n,o)),s[u]=c,a[u]=h})),nN(s),nN(a);var l=this._minMaxSpan;function u(t,e,n,r,o){var a=o?"Span":"ValueSpan";tA(0,t,n,"all",l["min"+a],l["max"+a]);for(var s=0;s<2;s++)e[s]=Ui(t[s],n,r,!0),o&&(e[s]=i.parse(e[s]))}return e?u(s,a,n,o,!1):u(a,s,o,n,!0),{valueWindow:s,percentWindow:a}},t.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=function(t,e,n){var i=[1/0,-1/0];eN(n,(function(t){!function(t,e,n){e&&P(Z_(e,n),(function(n){var i=e.getApproximateExtent(n);i[0]t[1]&&(t[1]=i[1])}))}(i,t.getData(),e)}));var r=t.getAxisModel(),o=z_(r.axis.scale,r,i).calculate();return[o.min,o.max]}(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},t.prototype.filterData=function(t,e){if(t===this._dataZoomModel){var n=this._dimName,i=this.getTargetSeriesModels(),r=t.get("filterMode"),o=this._valueWindow;"none"!==r&&eN(i,(function(t){var e=t.getData(),i=e.mapDimensionsAll(n);i.length&&("weakFilter"===r?e.filterSelf((function(t){for(var n,r,a,s=0;so[1];if(u&&!h&&!c)return!0;u&&(a=!0),h&&(n=!0),c&&(r=!0)}return a&&n&&r})):eN(i,(function(n){if("empty"===r)t.setData(e=e.map(n,(function(t){return function(t){return t>=o[0]&&t<=o[1]}(t)?t:NaN})));else{var i={};i[n]=o,e.selectRange(i)}})),eN(i,(function(t){e.setApproximateExtent(o,t)})))}))}},t.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;eN(["min","max"],(function(i){var r=e.get(i+"Span"),o=e.get(i+"ValueSpan");null!=o&&(o=this.getAxisModel().axis.scale.parse(o)),null!=o?r=Ui(n[0]+o,n,[0,100],!0):null!=r&&(o=Ui(r,[0,100],n,!0)-n[0]),t[i+"Span"]=r,t[i+"ValueSpan"]=o}),this)},t.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=Ji(n,[0,500]);i=Math.min(i,20);var r=t.axis.scale.rawExtentInfo;0!==e[0]&&r.setDeterminedMinMax("min",+n[0].toFixed(i)),100!==e[1]&&r.setDeterminedMinMax("max",+n[1].toFixed(i)),r.freeze()}},t}();var rN={getTargetSeries:function(t){function e(e){t.eachComponent("dataZoom",(function(n){n.eachTargetAxis((function(i,r){var o=t.getComponent(UR(i),r);e(i,r,o,n)}))}))}e((function(t,e,n,i){n.__dzAxisProxy=null}));var n=[];e((function(e,i,r,o){r.__dzAxisProxy||(r.__dzAxisProxy=new iN(e,i,o,t),n.push(r.__dzAxisProxy))}));var i=ht();return P(n,(function(t){P(t.getTargetSeriesModels(),(function(t){i.set(t.uid,t)}))})),i},overallReset:function(t,e){t.eachComponent("dataZoom",(function(t){t.eachTargetAxis((function(e,n){t.getAxisProxy(e,n).reset(t)})),t.eachTargetAxis((function(n,i){t.getAxisProxy(n,i).filterData(t,e)}))})),t.eachComponent("dataZoom",(function(t){var e=t.findRepresentativeAxisProxy();if(e){var n=e.getDataPercentWindow(),i=e.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}}))}};var oN=!1;function aN(t){oN||(oN=!0,t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,rN),function(t){t.registerAction("dataZoom",(function(t,e){P(ZR(e,t),(function(e){e.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})}))}))}(t),t.registerSubTypeDefaulter("dataZoom",(function(){return"slider"})))}function sN(t){t.registerComponentModel(JR),t.registerComponentView(tN),aN(t)}var lN=function(){},uN={};function hN(t,e){uN[t]=e}function cN(t){return uN[t]}var pN=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(){t.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;P(this.option.feature,(function(t,n){var i=cN(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),S(t,i.defaultOption))}))},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,zlevel:0,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1}},e}(Nc);function dN(t,e){var n=pc(e.get("padding")),i=e.getItemStyle(["color","opacity"]);return i.fill=e.get("backgroundColor"),t=new os({shape:{x:t.x-n[3],y:t.y-n[0],width:t.width+n[1]+n[3],height:t.height+n[0]+n[2],r:e.get("borderRadius")},style:i,silent:!0,z2:-1})}var fN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){var r=this.group;if(r.removeAll(),t.get("show")){var o=+t.get("itemSize"),a=t.get("feature")||{},s=this._features||(this._features={}),l=[];P(a,(function(t,e){l.push(e)})),new rm(this._featureNames||[],l).add(u).update(u).remove(V(u,null)).execute(),this._featureNames=l,function(t,e,n){var i=e.getBoxLayoutParams(),r=e.get("padding"),o={width:n.getWidth(),height:n.getHeight()},a=Ac(i,o,r);Cc(e.get("orient"),t,e.get("itemGap"),a.width,a.height),Dc(t,i,o,r)}(r,t,n),r.add(dN(r.getBoundingRect(),t)),r.eachChild((function(t){var e=t.__title,i=t.ensureState("emphasis"),a=i.textConfig||(i.textConfig={}),s=t.getTextContent(),l=s&&s.states.emphasis;if(l&&!G(l)&&e){var u=l.style||(l.style={}),h=Fn(e,ls.makeFont(u)),c=t.x+r.x,p=!1;t.y+r.y+o+h.height>n.getHeight()&&(a.position="top",p=!0);var d=p?-5-h.height:o+8;c+h.width/2>n.getWidth()?(a.position=["100%",d],u.align="right"):c-h.width/2<0&&(a.position=[0,d],u.align="left")}}))}function u(u,h){var c,p=l[u],d=l[h],f=a[p],g=new Sh(f,t,t.ecModel);if(i&&null!=i.newTitle&&i.featureName===p&&(f.title=i.newTitle),p&&!d){if(function(t){return 0===t.indexOf("my")}(p))c={onclick:g.option.onclick,featureName:p};else{var y=cN(p);if(!y)return;c=new y}s[p]=c}else if(!(c=s[d]))return;if(c.uid=Ih("toolbox-feature"),c.model=g,c.ecModel=e,c.api=n,c instanceof lN){if(!p&&d)return void(c.dispose&&c.dispose(e,n));if(!g.get("show")||c.unusable)return void(c.remove&&c.remove(e,n))}!function(i,a,s){var l,u,h=i.getModel("iconStyle"),c=i.getModel(["emphasis","iconStyle"]),p=a instanceof lN&&a.getIcons?a.getIcons():i.get("icon"),d=i.get("title")||{};"string"==typeof p?(l={})[s]=p:l=p;"string"==typeof d?(u={})[s]=d:u=d;var f=i.iconPaths={};P(l,(function(s,l){var p=Uu(s,{},{x:-o/2,y:-o/2,width:o,height:o});p.setStyle(h.getItemStyle()),p.ensureState("emphasis").style=c.getItemStyle();var d=new ls({style:{text:u[l],align:c.get("textAlign"),borderRadius:c.get("textBorderRadius"),padding:c.get("textPadding"),fill:null},ignore:!0});p.setTextContent(d);var g=t.getModel("tooltip");g&&g.get("show")&&(p.tooltip=I({content:u[l],formatter:g.get("formatter",!0)||function(){return u[l]},formatterParams:{componentType:"toolbox",name:l,title:u[l],$vars:["name","title"]},position:g.get("position",!0)||"bottom"},g.option)),p.__title=u[l],p.on("mouseover",(function(){var e=c.getItemStyle(),n="vertical"===t.get("orient")?null==t.get("right")?"right":"left":null==t.get("bottom")?"bottom":"top";d.setStyle({fill:c.get("textFill")||e.fill||e.stroke||"#000",backgroundColor:c.get("textBackgroundColor")}),p.setTextConfig({position:c.get("textPosition")||n}),d.ignore=!t.get("showTitle"),Hs(this)})).on("mouseout",(function(){"emphasis"!==i.get(["iconStatus",l])&&Ws(this),d.hide()})),("emphasis"===i.get(["iconStatus",l])?Hs:Ws)(p),r.add(p),p.on("click",B(a.onclick,a,e,n,l)),f[l]=p}))}(g,c,p),g.setIconStatus=function(t,e){var n=this.option,i=this.iconPaths;n.iconStatus=n.iconStatus||{},n.iconStatus[t]=e,i[t]&&("emphasis"===e?Hs:Ws)(i[t])},c instanceof lN&&c.render&&c.render(g,e,n,i)}},e.prototype.updateView=function(t,e,n,i){P(this._features,(function(t){t instanceof lN&&t.updateView&&t.updateView(t.model,e,n,i)}))},e.prototype.remove=function(t,e){P(this._features,(function(n){n instanceof lN&&n.remove&&n.remove(t,e)})),this.group.removeAll()},e.prototype.dispose=function(t,e){P(this._features,(function(n){n instanceof lN&&n.dispose&&n.dispose(t,e)}))},e.type="toolbox",e}(pf);var gN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.onclick=function(t,e){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",r="svg"===e.getZr().painter.getType(),o=r?"svg":n.get("type",!0)||"png",s=e.getConnectedDataURL({type:o,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")});if("function"!=typeof MouseEvent||!a.browser.newEdge&&(a.browser.ie||a.browser.edge))if(window.navigator.msSaveOrOpenBlob||r){var l=s.split(","),u=l[0].indexOf("base64")>-1,h=r?decodeURIComponent(l[1]):l[1];u&&(h=atob(h));var c=i+"."+o;if(window.navigator.msSaveOrOpenBlob){for(var p=h.length,d=new Uint8Array(p);p--;)d[p]=h.charCodeAt(p);var f=new Blob([d]);window.navigator.msSaveOrOpenBlob(f,c)}else{var g=document.createElement("iframe");document.body.appendChild(g);var y=g.contentWindow,v=y.document;v.open("image/svg+xml","replace"),v.write(h),v.close(),y.focus(),v.execCommand("SaveAs",!0,c),document.body.removeChild(g)}}else{var m=n.get("lang"),_='',x=window.open();x.document.write(_),x.document.title=i}else{var b=document.createElement("a");b.download=i+"."+o,b.target="_blank",b.href=s;var w=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});b.dispatchEvent(w)}},e.getDefaultOption=function(t){return{show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocale(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],pixelRatio:1,lang:t.getLocale(["toolbox","saveAsImage","lang"])}},e}(lN);gN.prototype.unusable=!a.canvasSupported;var yN="__ec_magicType_stack__",vN=[["line","bar"],["stack"]],mN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getIcons=function(){var t=this.model,e=t.get("icon"),n={};return P(t.get("type"),(function(t){e[t]&&(n[t]=e[t])})),n},e.getDefaultOption=function(t){return{show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocale(["toolbox","magicType","title"]),option:{},seriesIndex:{}}},e.prototype.onclick=function(t,e,n){var i=this.model,r=i.get(["seriesIndex",n]);if(_N[n]){var o,a={series:[]};P(vN,(function(t){A(t,n)>=0&&P(t,(function(t){i.setIconStatus(t,"normal")}))})),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:null==r?null:{seriesIndex:r}},(function(t){var e=t.subType,r=t.id,o=_N[n](e,r,t,i);o&&(T(o,t.option),a.series.push(o));var s=t.coordinateSystem;if(s&&"cartesian2d"===s.type&&("line"===n||"bar"===n)){var l=s.getAxesByScale("ordinal")[0];if(l){var u=l.dim+"Axis",h=t.getReferringComponents(u,Or).models[0].componentIndex;a[u]=a[u]||[];for(var c=0;c<=h;c++)a[u][h]=a[u][h]||{};a[u][h].boundaryGap="bar"===n}}})),"stack"===n&&(o=S({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title)),e.dispatchAction({type:"changeMagicType",currentType:n,newOption:a,newTitle:o,featureName:"magicType"})}},e}(lN),_N={line:function(t,e,n,i){if("bar"===t)return S({id:e,type:"line",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","line"])||{},!0)},bar:function(t,e,n,i){if("line"===t)return S({id:e,type:"bar",data:n.get("data"),stack:n.get("stack"),markPoint:n.get("markPoint"),markLine:n.get("markLine")},i.get(["option","bar"])||{},!0)},stack:function(t,e,n,i){var r=n.get("stack")===yN;if("line"===t||"bar"===t)return i.setIconStatus("stack",r?"normal":"emphasis"),S({id:e,stack:r?"":yN},i.get(["option","stack"])||{},!0)}};Yv({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},(function(t,e){e.mergeOption(t.newOption)}));var xN=new Array(60).join("-"),bN="\t";function wN(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}var SN=new RegExp("[\t]+","g");function MN(t,e){var n=t.split(new RegExp("\n*"+xN+"\n*","g")),i={series:[]};return P(n,(function(t,n){if(function(t){if(t.slice(0,t.indexOf("\n")).indexOf(bN)>=0)return!0}(t)){var r=function(t){for(var e=t.split(/\n+/g),n=[],i=O(wN(e.shift()).split(SN),(function(t){return{name:t,data:[]}})),r=0;r=0)&&t(r,i._targetInfoList)}))}return t.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,(function(t,e,n){if((t.coordRanges||(t.coordRanges=[])).push(e),!t.coordRange){t.coordRange=e;var i=VN[t.brushType](0,n,e);t.__rangeOffset={offset:GN[t.brushType](i.values,t.range,[1,1]),xyMinMax:i.xyMinMax}}})),t},t.prototype.matchOutputRanges=function(t,e,n){P(t,(function(t){var i=this.findTargetInfo(t,e);i&&!0!==i&&P(i.coordSyses,(function(i){var r=VN[t.brushType](1,i,t.range);n(t,r.values,i,e)}))}),this)},t.prototype.setInputRanges=function(t,e){P(t,(function(t){var n,i,r,o,a,s=this.findTargetInfo(t,e);if(t.range=t.range||[],s&&!0!==s){t.panelId=s.panelId;var l=VN[t.brushType](0,s.coordSys,t.coordRange),u=t.__rangeOffset;t.range=u?GN[t.brushType](l.values,u.offset,(n=l.xyMinMax,i=u.xyMinMax,r=WN(n),o=WN(i),a=[r[0]/o[0],r[1]/o[1]],isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a)):l.values}}),this)},t.prototype.makePanelOpts=function(t,e){return O(this._targetInfoList,(function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:e?e(n):null,clipPath:nD(i),isTargetByCursor:rD(i,t,n.coordSysModel),getLinearBrushOtherExtent:iD(i)}}))},t.prototype.controlSeries=function(t,e,n){var i=this.findTargetInfo(t,n);return!0===i||i&&A(i.coordSyses,e.coordinateSystem)>=0},t.prototype.findTargetInfo=function(t,e){for(var n=this._targetInfoList,i=NN(e,t),r=0;rt[1]&&t.reverse(),t}function NN(t,e){return Pr(t,e,{includeMainTypes:PN})}var EN={grid:function(t,e){var n=t.xAxisModels,i=t.yAxisModels,r=t.gridModels,o=ht(),a={},s={};(n||i||r)&&(P(n,(function(t){var e=t.axis.grid.model;o.set(e.id,e),a[e.id]=!0})),P(i,(function(t){var e=t.axis.grid.model;o.set(e.id,e),s[e.id]=!0})),P(r,(function(t){o.set(t.id,t),a[t.id]=!0,s[t.id]=!0})),o.each((function(t){var r=t.coordinateSystem,o=[];P(r.getCartesians(),(function(t,e){(A(n,t.getAxis("x").model)>=0||A(i,t.getAxis("y").model)>=0)&&o.push(t)})),e.push({panelId:"grid--"+t.id,gridModel:t,coordSysModel:t,coordSys:o[0],coordSyses:o,getPanelRect:BN.grid,xAxisDeclared:a[t.id],yAxisDeclared:s[t.id]})})))},geo:function(t,e){P(t.geoModels,(function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:BN.geo})}))}},zN=[function(t,e){var n=t.xAxisModel,i=t.yAxisModel,r=t.gridModel;return!r&&n&&(r=n.axis.grid.model),!r&&i&&(r=i.axis.grid.model),r&&r===e.gridModel},function(t,e){var n=t.geoModel;return n&&n===e.geoModel}],BN={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var t=this.coordSys,e=t.getBoundingRect().clone();return e.applyTransform(Vu(t)),e}},VN={lineX:V(FN,0),lineY:V(FN,1),rect:function(t,e,n){var i=e[kN[t]]([n[0][0],n[1][0]]),r=e[kN[t]]([n[0][1],n[1][1]]),o=[RN([i[0],r[0]]),RN([i[1],r[1]])];return{values:o,xyMinMax:o}},polygon:function(t,e,n){var i=[[1/0,-1/0],[1/0,-1/0]];return{values:O(n,(function(n){var r=e[kN[t]](n);return i[0][0]=Math.min(i[0][0],r[0]),i[1][0]=Math.min(i[1][0],r[1]),i[0][1]=Math.max(i[0][1],r[0]),i[1][1]=Math.max(i[1][1],r[1]),r})),xyMinMax:i}}};function FN(t,e,n,i){var r=n.getAxis(["x","y"][t]),o=RN(O([0,1],(function(t){return e?r.coordToData(r.toLocalCoord(i[t])):r.toGlobalCoord(r.dataToCoord(i[t]))}))),a=[];return a[t]=o,a[1-t]=[NaN,NaN],{values:o,xyMinMax:a}}var GN={lineX:V(HN,0),lineY:V(HN,1),rect:function(t,e,n){return[[t[0][0]-n[0]*e[0][0],t[0][1]-n[0]*e[0][1]],[t[1][0]-n[1]*e[1][0],t[1][1]-n[1]*e[1][1]]]},polygon:function(t,e,n){return O(t,(function(t,i){return[t[0]-n[0]*e[i][0],t[1]-n[1]*e[i][1]]}))}};function HN(t,e,n,i){return[e[0]-i[t]*n[0],e[1]-i[t]*n[1]]}function WN(t){return t?[t[0][1]-t[0][0],t[1][1]-t[1][0]]:[NaN,NaN]}var YN,XN,UN=P,ZN=mr+"toolbox-dataZoom_",jN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n,i){this.brushController||(this.brushController=new IA(n.getZr()),this.brushController.on("brush",B(this._onBrush,this)).mount()),function(t,e,n,i,r){var o=n.isZoomActive;i&&"takeGlobalCursor"===i.type&&(o="dataZoomSelect"===i.key&&i.dataZoomSelectActive);n.isZoomActive=o,t.setIconStatus("zoom",o?"emphasis":"normal");var a=new ON(KN(t),e,{include:["grid"]}).makePanelOpts(r,(function(t){return t.xAxisDeclared&&!t.yAxisDeclared?"lineX":!t.xAxisDeclared&&t.yAxisDeclared?"lineY":"rect"}));n.brushController.setPanels(a).enableBrush(!(!o||!a.length)&&{brushType:"auto",brushStyle:t.getModel("brushStyle").getItemStyle()})}(t,e,this,i,n),function(t,e){t.setIconStatus("back",function(t){return DN(t).length}(e)>1?"emphasis":"normal")}(t,e)},e.prototype.onclick=function(t,e,n){qN[n].call(this)},e.prototype.remove=function(t,e){this.brushController.unmount()},e.prototype.dispose=function(t,e){this.brushController.dispose()},e.prototype._onBrush=function(t){var e=t.areas;if(t.isEnd&&e.length){var n={},i=this.ecModel;this.brushController.updateCovers([]),new ON(KN(this.model),i,{include:["grid"]}).matchOutputRanges(e,i,(function(t,e,n){if("cartesian2d"===n.type){var i=t.brushType;"rect"===i?(r("x",n,e[0]),r("y",n,e[1])):r({lineX:"x",lineY:"y"}[i],n,e)}})),function(t,e){var n=DN(t);CN(e,(function(e,i){for(var r=n.length-1;r>=0&&!n[r][i];r--);if(r<0){var o=t.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(o){var a=o.getPercentRange();n[0][i]={dataZoomId:i,start:a[0],end:a[1]}}}})),n.push(e)}(i,n),this._dispatchZoomAction(n)}function r(t,e,r){var o=e.getAxis(t),a=o.model,s=function(t,e,n){var i;return n.eachComponent({mainType:"dataZoom",subType:"select"},(function(n){n.getAxisModel(t,e.componentIndex)&&(i=n)})),i}(t,a,i),l=s.findRepresentativeAxisProxy(a).getMinMaxSpan();null==l.minValueSpan&&null==l.maxValueSpan||(r=tA(0,r.slice(),o.scale.getExtent(),0,l.minValueSpan,l.maxValueSpan)),s&&(n[s.id]={dataZoomId:s.id,startValue:r[0],endValue:r[1]})}},e.prototype._dispatchZoomAction=function(t){var e=[];UN(t,(function(t,n){e.push(w(t))})),e.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:e})},e.getDefaultOption=function(t){return{show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocale(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}}},e}(lN),qN={zoom:function(){var t=!this.isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:t})},back:function(){this._dispatchZoomAction(function(t){var e=DN(t),n=e[e.length-1];e.length>1&&e.pop();var i={};return CN(n,(function(t,n){for(var r=e.length-1;r>=0;r--)if(t=e[r][n]){i[n]=t;break}})),i}(this.ecModel))}};function KN(t){var e={xAxisIndex:t.get("xAxisIndex",!0),yAxisIndex:t.get("yAxisIndex",!0),xAxisId:t.get("xAxisId",!0),yAxisId:t.get("yAxisId",!0)};return null==e.xAxisIndex&&null==e.xAxisId&&(e.xAxisIndex="all"),null==e.yAxisIndex&&null==e.yAxisId&&(e.yAxisIndex="all"),e}YN="dataZoom",XN=function(t){var e=t.getComponent("toolbox",0);if(e){var n=e.getModel(["feature","dataZoom"]),i=[],r=Pr(t,KN(n));return UN(r.xAxisModels,(function(t){return o(t,"xAxis","xAxisIndex")})),UN(r.yAxisModels,(function(t){return o(t,"yAxis","yAxisIndex")})),i}function o(t,e,r){var o=t.componentIndex,a={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:ZN+e+o};a[r]=o,i.push(a)}},rt(null==ip.get(YN)&&XN),ip.set(YN,XN);var $N=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={zlevel:0,z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Nc);function JN(t){var e=t.get("confine");return null!=e?!!e:"richText"===t.get("renderMode")}var QN=["-ms-","-moz-","-o-","-webkit-",""];function tE(t,e,n){var i=[],r=t.get("transitionDuration"),o=t.get("backgroundColor"),s=t.get("shadowBlur"),l=t.get("shadowColor"),u=t.get("shadowOffsetX"),h=t.get("shadowOffsetY"),c=t.getModel("textStyle"),p=Jd(t,"html"),d=u+"px "+h+"px "+s+"px "+l;return i.push("box-shadow:"+d),e&&r&&i.push(function(t,e){var n="cubic-bezier(0.23, 1, 0.32, 1)",i="opacity "+t/2+"s "+n+",visibility "+t/2+"s "+n;return e||(i+=",left "+t+"s "+n+",top "+t+"s "+n),O(QN,(function(t){return t+"transition:"+i})).join(";")}(r,n)),o&&(a.canvasSupported?i.push("background-Color:"+o):(i.push("background-Color:#"+Je(o)),i.push("filter:alpha(opacity=70)"))),P(["width","color","radius"],(function(e){var n="border-"+e,r=cc(n),o=t.get(r);null!=o&&i.push(n+":"+o+("color"===e?"":"px"))})),i.push(function(t){var e=[],n=t.get("fontSize"),i=t.getTextColor();i&&e.push("color:"+i),e.push("font:"+t.getFont()),n&&e.push("line-height:"+Math.round(3*n/2)+"px");var r=t.get("textShadowColor"),o=t.get("textShadowBlur")||0,a=t.get("textShadowOffsetX")||0,s=t.get("textShadowOffsetY")||0;return r&&o&&e.push("text-shadow:"+a+"px "+s+"px "+o+"px "+r),P(["decoration","align"],(function(n){var i=t.get(n);i&&e.push("text-"+n+":"+i)})),e.join(";")}(c)),null!=p&&i.push("padding:"+pc(p).join("px ")+"px"),i.join(";")+";"}function eE(t,e,n,i,r){var o=e&&e.painter;if(n){var a=o&&o.getViewportRoot();a&&function(t,e,n,i,r){Xt(Yt,e,i,r,!0)&&Xt(t,n,Yt[0],Yt[1])}(t,a,document.body,i,r)}else{t[0]=i,t[1]=r;var s=o&&o.getViewportRootOffset();s&&(t[0]+=s.offsetLeft,t[1]+=s.offsetTop)}t[2]=t[0]/e.getWidth(),t[3]=t[1]/e.getHeight()}var nE=function(){function t(t,e,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._firstShow=!0,this._longHide=!0,a.wxa)return null;var i=document.createElement("div");i.domBelongToZr=!0,this.el=i;var r=this._zr=e.getZr(),o=this._appendToBody=n&&n.appendToBody;eE(this._styleCoord,r,o,e.getWidth()/2,e.getHeight()/2),o?document.body.appendChild(i):t.appendChild(i),this._container=t;var s=this;i.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},i.onmousemove=function(t){if(t=t||window.event,!s._enterable){var e=r.handler;Qt(r.painter.getViewportRoot(),t,!0),e.dispatch("mousemove",t)}},i.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return t.prototype.update=function(t){var e=this._container,n=e.currentStyle||document.defaultView.getComputedStyle(e),i=e.style;"absolute"!==i.position&&"absolute"!==n.position&&(i.position="relative"),t.get("alwaysShowContent")&&this._moveIfResized(),this.el.className=t.get("className")||""},t.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=this._styleCoord,r=n.offsetHeight/2;e=bc(e),n.style.cssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+tE(t,!this._firstShow,this._longHide)+";left:"+i[0]+"px;top:"+(i[1]-r)+"px;border-color: "+e+";"+(t.get("extraCssText")||""),n.style.display=n.innerHTML?"block":"none",n.style.pointerEvents=this._enterable?"auto":"none",this._show=!0,this._firstShow=!1,this._longHide=!1},t.prototype.setContent=function(t,e,n,i,r){if(null!=t){var o=this.el;if(H(r)&&"item"===n.get("trigger")&&!JN(n)&&(t+=function(t,e,n){if(!H(n)||"inside"===n)return"";e=bc(e);var i,r="left"===(i=n)?"right":"right"===i?"left":"top"===i?"bottom":"top",o="",a="";return A(["left","right"],r)>-1?(o=r+":-6px;top:50%;",a="translateY(-50%) rotate("+("left"===r?-225:-45)+"deg)"):(o=r+":-6px;left:50%;",a="translateX(-50%) rotate("+("top"===r?225:45)+"deg)"),'
                      '}(n.get("backgroundColor"),i,r)),H(t))o.innerHTML=t;else if(t){o.innerHTML="",F(t)||(t=[t]);for(var a=0;a=0?this._tryShow(n,i):"leave"===e&&this._hide(i))}),this))},e.prototype._keepShow=function(){var t=this._tooltipModel,e=this._ecModel,n=this._api;if(null!=this._lastX&&null!=this._lastY&&"none"!==t.get("triggerOn")){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){!n.isDisposed()&&i.manuallyShowTip(t,e,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})}))}},e.prototype.manuallyShowTip=function(t,e,n,i){if(i.from!==this.uid&&!a.node){var r=dE(i,n);this._ticket="";var o=i.dataByCoordSys;if(i.tooltip&&null!=i.x&&null!=i.y){var s=hE;s.x=i.x,s.y=i.y,s.update(),s.tooltip=i.tooltip,this._tryShow({offsetX:i.x,offsetY:i.y,target:s},r)}else if(o)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:o,tooltipOption:i.tooltipOption},r);else if(null!=i.seriesIndex){if(this._manuallyAxisShowTip(t,e,n,i))return;var l=xO(i,e),u=l.point[0],h=l.point[1];null!=u&&null!=h&&this._tryShow({offsetX:u,offsetY:h,position:i.position,target:l.el},r)}else null!=i.x&&null!=i.y&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},r))}},e.prototype.manuallyHideTip=function(t,e,n,i){var r=this._tooltipContent;!this._alwaysShowContent&&this._tooltipModel&&r.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(dE(i,n))},e.prototype._manuallyAxisShowTip=function(t,e,n,i){var r=i.seriesIndex,o=i.dataIndex,a=e.getComponent("axisPointer").coordSysAxesInfo;if(null!=r&&null!=o&&null!=a){var s=e.getSeriesByIndex(r);if(s)if("axis"===pE([s.getData().getItemModel(o),s,(s.coordinateSystem||{}).model,t]).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:r,dataIndex:o,position:i.position}),!0}},e.prototype._tryShow=function(t,e){var n=t.target;if(this._tooltipModel){this._lastX=t.offsetX,this._lastY=t.offsetY;var i=t.dataByCoordSys;i&&i.length?this._showAxisTooltip(i,t):n&&Jg(n,(function(t){return null!=ys(t).dataIndex}),!0)?(this._lastDataByCoordSys=null,this._showSeriesItemTooltip(t,n,e)):n&&n.tooltip?(this._lastDataByCoordSys=null,this._showComponentItemTooltip(t,n,e)):(this._lastDataByCoordSys=null,this._hide(e))}},e.prototype._showOrMove=function(t,e){var n=t.get("showDelay");e=B(e,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(e,n):e()},e.prototype._showAxisTooltip=function(t,e){var n=this._ecModel,i=this._tooltipModel,r=[e.offsetX,e.offsetY],o=pE([e.tooltipOption,i]),a=this._renderMode,s=[],l=Yd("section",{blocks:[],noHeader:!0}),u=[],h=new Qd;lE(t,(function(t){lE(t.dataByAxis,(function(t){var e=n.getComponent(t.axisDim+"Axis",t.axisIndex),i=t.value;if(e&&null!=i){var r=nO(i,e.axis,n,t.seriesDataIndices,t.valueLabelOpt),o=Yd("section",{header:r,noHeader:!ot(r),sortBlocks:!0,blocks:[]});l.blocks.push(o),P(t.seriesDataIndices,(function(l){var c=n.getSeriesByIndex(l.seriesIndex),p=l.dataIndexInside,d=c.getDataParams(p);d.axisDim=t.axisDim,d.axisIndex=t.axisIndex,d.axisType=t.axisType,d.axisId=t.axisId,d.axisValue=W_(e.axis,{value:i}),d.axisValueLabel=r,d.marker=h.makeTooltipMarker("item",bc(d.color),a);var f=vd(c.formatTooltip(p,!0,null));f.markupFragment&&o.blocks.push(f.markupFragment),f.markupText&&u.push(f.markupText),s.push(d)}))}}))})),l.blocks.reverse(),u.reverse();var c=e.position,p=o.get("order"),d=Zd(l,h,a,p,n.get("useUTC"),o.get("textStyle"));d&&u.unshift(d);var f="richText"===a?"\n\n":"
                      ",g=u.join(f);this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(t)?this._updatePosition(o,c,r[0],r[1],this._tooltipContent,s):this._showTooltipContent(o,g,s,Math.random()+"",r[0],r[1],c,null,h)}))},e.prototype._showSeriesItemTooltip=function(t,e,n){var i=Jg(e,(function(t){return null!=ys(t).dataIndex}),!0),r=this._ecModel,o=ys(i),a=o.seriesIndex,s=r.getSeriesByIndex(a),l=o.dataModel||s,u=o.dataIndex,h=o.dataType,c=l.getData(h),p=this._renderMode,d=pE([c.getItemModel(u),l,s&&(s.coordinateSystem||{}).model,this._tooltipModel]),f=d.get("trigger");if(null==f||"item"===f){var g=l.getDataParams(u,h),y=new Qd;g.marker=y.makeTooltipMarker("item",bc(g.color),p);var v=vd(l.formatTooltip(u,!1,h)),m=d.get("order"),_=v.markupFragment?Zd(v.markupFragment,y,p,m,r.get("useUTC"),d.get("textStyle")):v.markupText,x="item_"+l.name+"_"+u;this._showOrMove(d,(function(){this._showTooltipContent(d,_,g,x,t.offsetX,t.offsetY,t.position,t.target,y)})),n({type:"showTip",dataIndexInside:u,dataIndex:c.getRawIndex(u),seriesIndex:a,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,e,n){var i=e.tooltip;if(H(i)){i={content:i,formatter:i}}var r=new Sh(i,this._tooltipModel,this._ecModel),o=r.get("content"),a=Math.random()+"",s=new Qd;this._showOrMove(r,(function(){this._showTooltipContent(r,o,r.get("formatterParams")||{},a,t.offsetX,t.offsetY,t.position,e,s)})),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,e,n,i,r,o,a,s,l){if(this._ticket="",t.get("showContent")&&t.get("show")){var u=this._tooltipContent,h=t.get("formatter");a=a||t.get("position");var c=e,p=this._getNearestPoint([r,o],n,t.get("trigger"),t.get("borderColor"));if(h&&H(h)){var d=t.ecModel.get("useUTC"),f=F(n)?n[0]:n;c=h,f&&f.axisType&&f.axisType.indexOf("time")>=0&&(c=Zh(f.axisValue,c,d)),c=_c(c,n,!0)}else if(G(h)){var g=sE((function(e,i){e===this._ticket&&(u.setContent(i,l,t,p.color,a),this._updatePosition(t,a,r,o,u,n,s))}),this);this._ticket=i,c=h(n,i,g)}u.setContent(c,l,t,p.color,a),u.show(t,p.color),this._updatePosition(t,a,r,o,u,n,s)}},e.prototype._getNearestPoint=function(t,e,n,i){return"axis"===n||F(e)?{color:i||("html"===this._renderMode?"#fff":"none")}:F(e)?void 0:{color:i||e.color||e.borderColor}},e.prototype._updatePosition=function(t,e,n,i,r,o,a){var s=this._api.getWidth(),l=this._api.getHeight();e=e||t.get("position");var u=r.getSize(),h=t.get("align"),c=t.get("verticalAlign"),p=a&&a.getBoundingRect().clone();if(a&&p.applyTransform(a.transform),G(e)&&(e=e([n,i],o,r.el,p,{viewSize:[s,l],contentSize:u.slice()})),F(e))n=uE(e[0],s),i=uE(e[1],l);else if(X(e)){var d=e;d.width=u[0],d.height=u[1];var f=Ac(d,{width:s,height:l});n=f.x,i=f.y,h=null,c=null}else if(H(e)&&a){var g=function(t,e,n){var i=n[0],r=n[1],o=10,a=5,s=0,l=0,u=e.width,h=e.height;switch(t){case"inside":s=e.x+u/2-i/2,l=e.y+h/2-r/2;break;case"top":s=e.x+u/2-i/2,l=e.y-r-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+h+o;break;case"left":s=e.x-i-o-a,l=e.y+h/2-r/2;break;case"right":s=e.x+u+o+a,l=e.y+h/2-r/2}return[s,l]}(e,p,u);n=g[0],i=g[1]}else{g=function(t,e,n,i,r,o,a){var s=n.getOuterSize(),l=s.width,u=s.height;null!=o&&(t+l+o+2>i?t-=l+o:t+=o);null!=a&&(e+u+a>r?e-=u+a:e+=a);return[t,e]}(n,i,r,s,l,h?null:20,c?null:20);n=g[0],i=g[1]}if(h&&(n-=fE(h)?u[0]/2:"right"===h?u[0]:0),c&&(i-=fE(c)?u[1]/2:"bottom"===c?u[1]:0),JN(t)){g=function(t,e,n,i,r){var o=n.getOuterSize(),a=o.width,s=o.height;return t=Math.min(t+a,i)-a,e=Math.min(e+s,r)-s,t=Math.max(t,0),e=Math.max(e,0),[t,e]}(n,i,r,s,l);n=g[0],i=g[1]}r.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t){var e=this._lastDataByCoordSys,n=!!e&&e.length===t.length;return n&&lE(e,(function(e,i){var r=e.dataByAxis||[],o=(t[i]||{}).dataByAxis||[];(n=n&&r.length===o.length)&&lE(r,(function(t,e){var i=o[e]||{},r=t.seriesDataIndices||[],a=i.seriesDataIndices||[];(n=n&&t.value===i.value&&t.axisType===i.axisType&&t.axisId===i.axisId&&r.length===a.length)&&lE(r,(function(t,e){var i=a[e];n=n&&t.seriesIndex===i.seriesIndex&&t.dataIndex===i.dataIndex}))}))})),this._lastDataByCoordSys=t,!!n},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,e){a.node||(this._tooltipContent.dispose(),mO("itemTooltip",e))},e.type="tooltip",e}(pf);function pE(t){for(var e=t.pop();t.length;){var n=t.pop();n&&(n instanceof Sh&&(n=n.get("tooltip",!0)),H(n)&&(n={formatter:n}),e=new Sh(n,e,e.ecModel))}return e}function dE(t,e){return t.dispatchAction||B(e.dispatchAction,e)}function fE(t){return"center"===t||"middle"===t}var gE=["rect","polygon","keep","clear"];function yE(t,e){var n=_r(t?t.brush:[]);if(n.length){var i=[];P(n,(function(t){var e=t.hasOwnProperty("toolbox")?t.toolbox:[];e instanceof Array&&(i=i.concat(e))}));var r=t&&t.toolbox;F(r)&&(r=r[0]),r||(r={feature:{}},t.toolbox=[r]);var o=r.feature||(r.feature={}),a=o.brush||(o.brush={}),s=a.type||(a.type=[]);s.push.apply(s,i),function(t){var e={};P(t,(function(t){e[t]=1})),t.length=0,P(e,(function(e,n){t.push(n)}))}(s),e&&!s.length&&s.push.apply(s,gE)}}var vE=P;function mE(t){if(t)for(var e in t)if(t.hasOwnProperty(e))return!0}function _E(t,e,n){var i={};return vE(e,(function(e){var r,o=i[e]=((r=function(){}).prototype.__hidden=r.prototype,new r);vE(t[e],(function(t,i){if(jI.isValidType(i)){var r={type:i,visual:t};n&&n(r,e),o[i]=new jI(r),"opacity"===i&&((r=w(r)).type="colorAlpha",o.__hidden.__alphaForOpacity=new jI(r))}}))})),i}function xE(t,e,n){var i;P(n,(function(t){e.hasOwnProperty(t)&&mE(e[t])&&(i=!0)})),i&&P(n,(function(n){e.hasOwnProperty(n)&&mE(e[n])?t[n]=w(e[n]):delete t[n]}))}var bE={lineX:wE(0),lineY:wE(1),rect:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])},rect:function(t,e,n){return t&&n.boundingRect.intersect(t)}},polygon:{point:function(t,e,n){return t&&n.boundingRect.contain(t[0],t[1])&&J_(n.range,t[0],t[1])},rect:function(t,e,n){var i=n.range;if(!t||i.length<=1)return!1;var r=t.x,o=t.y,a=t.width,s=t.height,l=i[0];return!!(J_(i,r,o)||J_(i,r+a,o)||J_(i,r,o+s)||J_(i,r+a,o+s)||Rn.create(t).contain(l[0],l[1])||Zu(r,o,r+a,o,i)||Zu(r,o,r,o+s,i)||Zu(r+a,o,r+a,o+s,i)||Zu(r,o+s,r+a,o+s,i))||void 0}}};function wE(t){var e=["x","y"],n=["width","height"];return{point:function(e,n,i){if(e){var r=i.range;return SE(e[t],r)}},rect:function(i,r,o){if(i){var a=o.range,s=[i[e[t]],i[e[t]]+i[n[t]]];return s[1]e[0][1]&&(e[0][1]=o[0]),o[1]e[1][1]&&(e[1][1]=o[1])}return e&&PE(e)}};function PE(t){return new Rn(t[0][0],t[1][0],t[0][1]-t[0][0],t[1][1]-t[1][0])}var OE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.ecModel=t,this.api=e,this.model,(this._brushController=new IA(e.getZr())).on("brush",B(this._onBrush,this)).mount()},e.prototype.render=function(t,e,n,i){this.model=t,this._updateController(t,e,n,i)},e.prototype.updateTransform=function(t,e,n,i){CE(e),this._updateController(t,e,n,i)},e.prototype.updateVisual=function(t,e,n,i){this.updateTransform(t,e,n,i)},e.prototype.updateView=function(t,e,n,i){this._updateController(t,e,n,i)},e.prototype._updateController=function(t,e,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var e=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:e,areas:w(n),$from:e}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:e,areas:w(n),$from:e})},e.type="brush",e}(pf),RE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.areas=[],n.brushOption={},n}return n(e,t),e.prototype.optionUpdated=function(t,e){var n=this.option;!e&&xE(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:"#ddd"},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=O(t,(function(t){return NE(this.option,t)}),this))},e.prototype.setBrushOption=function(t){this.brushOption=NE(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Nc);function NE(t,e){return S({brushType:t.brushType,brushMode:t.brushMode,transformable:t.transformable,brushStyle:new Sh(t.brushStyle).getItemStyle(),removeOnClick:t.removeOnClick,z:t.z},e,!0)}var EE=["rect","polygon","lineX","lineY","keep","clear"],zE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.render=function(t,e,n){var i,r,o;e.eachComponent({mainType:"brush"},(function(t){i=t.brushType,r=t.brushOption.brushMode||"single",o=o||!!t.areas.length})),this._brushType=i,this._brushMode=r,P(t.get("type",!0),(function(e){t.setIconStatus(e,("keep"===e?"multiple"===r:"clear"===e?o:e===i)?"emphasis":"normal")}))},e.prototype.updateView=function(t,e,n){this.render(t,e,n)},e.prototype.getIcons=function(){var t=this.model,e=t.get("icon",!0),n={};return P(t.get("type",!0),(function(t){e[t]&&(n[t]=e[t])})),n},e.prototype.onclick=function(t,e,n){var i=this._brushType,r=this._brushMode;"clear"===n?(e.dispatchAction({type:"axisAreaSelect",intervals:[]}),e.dispatchAction({type:"brush",command:"clear",areas:[]})):e.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:"keep"===n?i:i!==n&&n,brushMode:"keep"===n?"multiple"===r?"single":"multiple":r}})},e.getDefaultOption=function(t){return{show:!0,type:EE.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocale(["toolbox","brush","title"])}},e}(lN);var BE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.type="title",e.defaultOption={zlevel:0,z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Nc),VE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.render=function(t,e,n){if(this.group.removeAll(),t.get("show")){var i=this.group,r=t.getModel("textStyle"),o=t.getModel("subtextStyle"),a=t.get("textAlign"),s=tt(t.get("textBaseline"),t.get("textVerticalAlign")),l=new ls({style:nh(r,{text:t.get("text"),fill:r.getTextColor()},{disableBox:!0}),z2:10}),u=l.getBoundingRect(),h=t.get("subtext"),c=new ls({style:nh(o,{text:h,fill:o.getTextColor(),y:u.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),f=t.get("triggerEvent",!0);l.silent=!p&&!f,c.silent=!d&&!f,p&&l.on("click",(function(){wc(p,"_"+t.get("target"))})),d&&c.on("click",(function(){wc(d,"_"+t.get("subtarget"))})),ys(l).eventData=ys(c).eventData=f?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(l),h&&i.add(c);var g=i.getBoundingRect(),y=t.getBoxLayoutParams();y.width=g.width,y.height=g.height;var v=Ac(y,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));a||("middle"===(a=t.get("left")||t.get("right"))&&(a="center"),"right"===a?v.x+=v.width:"center"===a&&(v.x+=v.width/2)),s||("center"===(s=t.get("top")||t.get("bottom"))&&(s="middle"),"bottom"===s?v.y+=v.height:"middle"===s&&(v.y+=v.height/2),s=s||"top"),i.x=v.x,i.y=v.y,i.markRedraw();var m={align:a,verticalAlign:s};l.setStyle(m),c.setStyle(m),g=i.getBoundingRect();var _=v.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var b=new os({shape:{x:g.x-_[3],y:g.y-_[0],width:g.width+_[1]+_[3],height:g.height+_[0]+_[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(b)}},e.type="title",e}(pf);var FE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode="box",n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(e){t.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){null==t&&(t=this.option.currentIndex);var e=this._data.count();this.option.loop?t=(t%e+e)%e:(t>=e&&(t=e-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t,e=this.option,n=e.data||[],i=e.axisType,r=this._names=[];"category"===i?(t=[],P(n,(function(e,n){var i,o=Tr(wr(e),"");X(e)?(i=w(e)).value=n:i=n,t.push(i),r.push(o)}))):t=n;var o={category:"ordinal",time:"time",value:"number"}[i]||"number";(this._data=new Pm([{name:"value",type:o}],this)).initData(t,r)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if("category"===this.get("axisType"))return this._names.slice()},e.type="timeline",e.defaultOption={zlevel:0,z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Nc),GE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline.slider",e.defaultOption=Th(FE.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(FE);L(GE,yd.prototype);var HE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="timeline",e}(pf),WE=function(t){function e(e,n,i,r){var o=t.call(this,e,n,i)||this;return o.type=r||"value",o}return n(e,t),e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return"horizontal"===this.model.get("orient")},e}(vx),YE=Math.PI,XE=Lr(),UE=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.init=function(t,e){this.api=e},e.prototype.render=function(t,e,n){if(this.model=t,this.api=n,this.ecModel=e,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),r=this._createGroup("_mainGroup"),o=this._createGroup("_labelGroup"),a=this._axis=this._createAxis(i,t);t.formatTooltip=function(t){return Yd("nameValue",{noName:!0,value:a.scale.getLabel({value:t})})},P(["AxisLine","AxisTick","Control","CurrentPointer"],(function(e){this["_render"+e](i,r,a,t)}),this),this._renderAxisLabel(i,o,a,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,e){var n,i,r,o,a=t.get(["label","position"]),s=t.get("orient"),l=function(t,e){return Ac(t.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},t.get("padding"))}(t,e),u={horizontal:"center",vertical:(n=null==a||"auto"===a?"horizontal"===s?l.y+l.height/2=0||"+"===n?"left":"right"},h={horizontal:n>=0||"+"===n?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:YE/2},p="vertical"===s?l.height:l.width,d=t.getModel("controlStyle"),f=d.get("show",!0),g=f?d.get("itemSize"):0,y=f?d.get("itemGap"):0,v=g+y,m=t.get(["label","rotate"])||0;m=m*YE/180;var _=d.get("position",!0),x=f&&d.get("showPlayBtn",!0),b=f&&d.get("showPrevBtn",!0),w=f&&d.get("showNextBtn",!0),S=0,M=p;"left"===_||"bottom"===_?(x&&(i=[0,0],S+=v),b&&(r=[S,0],S+=v),w&&(o=[M-g,0],M-=v)):(x&&(i=[M-g,0],M-=v),b&&(r=[0,0],S+=v),w&&(o=[M-g,0],M-=v));var I=[S,M];return t.get("inverse")&&I.reverse(),{viewRect:l,mainLength:p,orient:s,rotation:c[s],labelRotation:m,labelPosOpt:n,labelAlign:t.get(["label","align"])||u[s],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||h[s],playPosition:i,prevBtnPosition:r,nextBtnPosition:o,axisExtent:I,controlSize:g,controlGap:y}},e.prototype._position=function(t,e){var n=this._mainGroup,i=this._labelGroup,r=t.viewRect;if("vertical"===t.orient){var o=[1,0,0,1,0,0],a=r.x,s=r.y+r.height;me(o,o,[-a,-s]),_e(o,o,-YE/2),me(o,o,[a,s]),(r=r.clone()).applyTransform(o)}var l=y(r),u=y(n.getBoundingRect()),h=y(i.getBoundingRect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=l[0][0];var d,f=t.labelPosOpt;null==f||H(f)?(v(c,u,l,1,d="+"===f?0:1),v(p,h,l,1,1-d)):(v(c,u,l,1,d=f>=0?0:1),p[1]=c[1]+f);function g(t){t.originX=l[0][0]-t.x,t.originY=l[1][0]-t.y}function y(t){return[[t.x,t.x+t.width],[t.y,t.y+t.height]]}function v(t,e,n,i,r){t[i]+=n[i][r]-e[i][r]}n.setPosition(c),i.setPosition(p),n.rotation=i.rotation=t.rotation,g(n),g(i)},e.prototype._createAxis=function(t,e){var n=e.getData(),i=e.get("axisType"),r=function(t,e){if(e=e||t.get("type"))switch(e){case"category":return new Qm({ordinalMeta:t.getCategories(),extent:[1/0,-1/0]});case"time":return new g_({locale:t.ecModel.getLocaleModel(),useUTC:t.ecModel.get("useUTC")});default:return new e_}}(e,i);r.getTicks=function(){return n.mapArray(["value"],(function(t){return{value:t}}))};var o=n.getDataExtent("value");r.setExtent(o[0],o[1]),r.niceTicks();var a=new WE("value",r,t.axisExtent,i);return a.model=e,a},e.prototype._createGroup=function(t){var e=this[t]=new zi;return this.group.add(e),e},e.prototype._renderAxisLine=function(t,e,n,i){var r=n.getExtent();if(i.get(["lineStyle","show"])){var o=new tu({shape:{x1:r[0],y1:0,x2:r[1],y2:0},style:I({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});e.add(o);var a=this._progressLine=new tu({shape:{x1:r[0],x2:this._currentPointer?this._currentPointer.x:r[0],y1:0,y2:0},style:T({lineCap:"round",lineWidth:o.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});e.add(a)}},e.prototype._renderAxisTick=function(t,e,n,i){var r=this,o=i.getData(),a=n.scale.getTicks();this._tickSymbols=[],P(a,(function(t){var a=n.dataToCoord(t.value),s=o.getItemModel(t.value),l=s.getModel("itemStyle"),u=s.getModel(["emphasis","itemStyle"]),h=s.getModel(["progress","itemStyle"]),c={x:a,y:0,onclick:B(r._changeTimeline,r,t.value)},p=ZE(s,l,e,c);p.ensureState("emphasis").style=u.getItemStyle(),p.ensureState("progress").style=h.getItemStyle(),Js(p);var d=ys(p);s.get("tooltip")?(d.dataIndex=t.value,d.dataModel=i):d.dataIndex=d.dataModel=null,r._tickSymbols.push(p)}))},e.prototype._renderAxisLabel=function(t,e,n,i){var r=this;if(n.getLabelModel().get("show")){var o=i.getData(),a=n.getViewLabels();this._tickLabels=[],P(a,(function(i){var a=i.tickValue,s=o.getItemModel(a),l=s.getModel("label"),u=s.getModel(["emphasis","label"]),h=s.getModel(["progress","label"]),c=n.dataToCoord(i.tickValue),p=new ls({x:c,y:0,rotation:t.labelRotation-t.rotation,onclick:B(r._changeTimeline,r,a),silent:!1,style:nh(l,{text:i.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});p.ensureState("emphasis").style=nh(u),p.ensureState("progress").style=nh(h),e.add(p),Js(p),XE(p).dataIndex=a,r._tickLabels.push(p)}))}},e.prototype._renderControl=function(t,e,n,i){var r=t.controlSize,o=t.rotation,a=i.getModel("controlStyle").getItemStyle(),s=i.getModel(["emphasis","controlStyle"]).getItemStyle(),l=i.getPlayState(),u=i.get("inverse",!0);function h(t,n,l,u){if(t){var h=Yn(tt(i.get(["controlStyle",n+"BtnSize"]),r),r),c=function(t,e,n,i){var r=i.style,o=Uu(t.get(["controlStyle",e]),i||{},new Rn(n[0],n[1],n[2],n[3]));r&&o.setStyle(r);return o}(i,n+"Icon",[0,-h/2,h,h],{position:t,origin:[r/2,0],rotation:u?-o:0,rectHover:!0,style:a,onclick:l});c.ensureState("emphasis").style=s,e.add(c),Js(c)}}h(t.nextBtnPosition,"next",B(this._changeTimeline,this,u?"-":"+")),h(t.prevBtnPosition,"prev",B(this._changeTimeline,this,u?"+":"-")),h(t.playPosition,l?"stop":"play",B(this._handlePlayClick,this,!l),!0)},e.prototype._renderCurrentPointer=function(t,e,n,i){var r=i.getData(),o=i.getCurrentIndex(),a=r.getItemModel(o).getModel("checkpointStyle"),s=this,l={onCreate:function(t){t.draggable=!0,t.drift=B(s._handlePointerDrag,s),t.ondragend=B(s._handlePointerDragend,s),jE(t,s._progressLine,o,n,i,!0)},onUpdate:function(t){jE(t,s._progressLine,o,n,i)}};this._currentPointer=ZE(a,a,this._mainGroup,{},this._currentPointer,l)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,e,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,e){var n=this._toAxisCoord(t)[0],i=qi(this._axis.getExtent().slice());n>i[1]&&(n=i[1]),n=0&&(a[o]=+a[o].toFixed(c)),[a,h]}var iz={min:V(nz,"min"),max:V(nz,"max"),average:V(nz,"average"),median:V(nz,"median")};function rz(t,e){var n=t.getData(),i=t.coordinateSystem;if(e&&!function(t){return!isNaN(parseFloat(t.x))&&!isNaN(parseFloat(t.y))}(e)&&!F(e.coord)&&i){var r=i.dimensions,o=oz(e,n,i,t);if((e=w(e)).type&&iz[e.type]&&o.baseAxis&&o.valueAxis){var a=A(r,o.baseAxis.dim),s=A(r,o.valueAxis.dim),l=iz[e.type](n,o.baseDataDim,o.valueDataDim,a,s);e.coord=l[0],e.value=l[1]}else{for(var u=[null!=e.xAxis?e.xAxis:e.radiusAxis,null!=e.yAxis?e.yAxis:e.angleAxis],h=0;h<2;h++)iz[u[h]]&&(u[h]=lz(n,n.mapDimension(r[h]),u[h]));e.coord=u}}return e}function oz(t,e,n,i){var r={};return null!=t.valueIndex||null!=t.valueDim?(r.valueDataDim=null!=t.valueIndex?e.getDimension(t.valueIndex):t.valueDim,r.valueAxis=n.getAxis(function(t,e){var n=t.getData(),i=n.dimensions;e=n.getDimension(e);for(var r=0;r=0&&"number"==typeof l&&(l=+l.toFixed(Math.min(f,20))),p.coord[h]=d.coord[h]=l,r=[p,d,{type:a,valueIndex:i.valueIndex,value:l}]}else r=[]}var g=[rz(t,r[0]),rz(t,r[1]),I({},r[2])];return g[2].type=g[2].type||null,S(g[2],g[0]),S(g[2],g[1]),g};function yz(t){return!isNaN(t)&&!isFinite(t)}function vz(t,e,n,i){var r=1-t,o=i.dimensions[t];return yz(e[r])&&yz(n[r])&&e[t]===n[t]&&i.getAxis(o).containData(e[t])}function mz(t,e){if("cartesian2d"===t.type){var n=e[0].coord,i=e[1].coord;if(n&&i&&(vz(1,n,i,t)||vz(0,n,i,t)))return!0}return az(t,e[0])&&az(t,e[1])}function _z(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Zi(s.get("x"),r.getWidth()),u=Zi(s.get("y"),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(t.dimensions,e));else{var h=a.dimensions,c=t.get(h[0],e),p=t.get(h[1],e);o=a.dataToPoint([c,p])}if(Wb(a,"cartesian2d")){var d=a.getAxis("x"),f=a.getAxis("y");h=a.dimensions;yz(t.get(h[0],e))?o[0]=d.toGlobalCoord(d.getExtent()[n?0:1]):yz(t.get(h[1],e))&&(o[1]=f.toGlobalCoord(f.getExtent()[n?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];t.setItemLayout(e,o)}var xz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=tz.getMarkerModelFromSeries(t,"markLine");if(e){var i=e.getData(),r=fz(e).from,o=fz(e).to;r.each((function(e){_z(r,e,!0,t,n),_z(o,e,!1,t,n)})),i.each((function(t){i.setItemLayout(t,[r.getItemLayout(t),o.getItemLayout(t)])})),this.markerGroupMap.get(t.id).updateLayout()}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,new aC);this.group.add(l.group);var u=function(t,e,n){var i;i=t?O(t&&t.dimensions,(function(t){return T({name:t},e.getData().getDimensionInfo(e.getData().mapDimension(t))||{})})):[{name:"value",type:"float"}];var r=new Pm(i,n),o=new Pm(i,n),a=new Pm([],n),s=O(n.get("data"),V(gz,e,t,n));t&&(s=N(s,V(mz,t)));var l=t?sz:function(t){return t.value};return r.initData(O(s,(function(t){return t[0]})),null,l),o.initData(O(s,(function(t){return t[1]})),null,l),a.initData(O(s,(function(t){return t[2]}))),a.hasItemOption=!0,{from:r,to:o,line:a}}(r,t,e),h=u.from,c=u.to,p=u.line;fz(e).from=h,fz(e).to=c,e.setData(p);var d=e.get("symbol"),f=e.get("symbolSize");function g(e,n,r){var o=e.getItemModel(n);_z(e,n,r,t,i);var s=o.getModel("itemStyle").getItemStyle();null==s.fill&&(s.fill=dg(a,"color")),e.setItemVisual(n,{symbolRotate:o.get("symbolRotate"),symbolSize:o.get("symbolSize")||f[r?0:1],symbol:o.get("symbol",!0)||d[r?0:1],style:s})}F(d)||(d=[d,d]),F(f)||(f=[f,f]),u.from.each((function(t){g(h,t,!0),g(c,t,!1)})),p.each((function(t){var e=p.getItemModel(t).getModel("lineStyle").getLineStyle();p.setItemLayout(t,[h.getItemLayout(t),c.getItemLayout(t)]),null==e.stroke&&(e.stroke=h.getItemVisual(t,"style").fill),p.setItemVisual(t,{fromSymbolRotate:h.getItemVisual(t,"symbolRotate"),fromSymbolSize:h.getItemVisual(t,"symbolSize"),fromSymbol:h.getItemVisual(t,"symbol"),toSymbolRotate:c.getItemVisual(t,"symbolRotate"),toSymbolSize:c.getItemVisual(t,"symbolSize"),toSymbol:c.getItemVisual(t,"symbol"),style:e})})),l.updateData(p),u.line.eachItemGraphicEl((function(t,n){t.traverse((function(t){ys(t).dataModel=e}))})),this.markKeep(l),l.group.silent=e.get("silent")||t.get("silent")},e.type="markLine",e}(hz);var bz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.createMarkerModelFromSeries=function(t,n,i){return new e(t,n,i)},e.type="markArea",e.defaultOption={zlevel:0,z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(tz),wz=Lr(),Sz=function(t,e,n,i){var r=rz(t,i[0]),o=rz(t,i[1]),a=r.coord,s=o.coord;a[0]=Q(a[0],-1/0),a[1]=Q(a[1],-1/0),s[0]=Q(s[0],1/0),s[1]=Q(s[1],1/0);var l=M([{},r,o]);return l.coord=[r.coord,o.coord],l.x0=r.x,l.y0=r.y,l.x1=o.x,l.y1=o.y,l};function Mz(t){return!isNaN(t)&&!isFinite(t)}function Iz(t,e,n,i){var r=1-t;return Mz(e[r])&&Mz(n[r])}function Tz(t,e){var n=e.coord[0],i=e.coord[1];return!!(Wb(t,"cartesian2d")&&n&&i&&(Iz(1,n,i)||Iz(0,n,i)))||(az(t,{coord:n,x:e.x0,y:e.y0})||az(t,{coord:i,x:e.x1,y:e.y1}))}function Cz(t,e,n,i,r){var o,a=i.coordinateSystem,s=t.getItemModel(e),l=Zi(s.get(n[0]),r.getWidth()),u=Zi(s.get(n[1]),r.getHeight());if(isNaN(l)||isNaN(u)){if(i.getMarkerPosition)o=i.getMarkerPosition(t.getValues(n,e));else{var h=[d=t.get(n[0],e),f=t.get(n[1],e)];a.clampData&&a.clampData(h,h),o=a.dataToPoint(h,!0)}if(Wb(a,"cartesian2d")){var c=a.getAxis("x"),p=a.getAxis("y"),d=t.get(n[0],e),f=t.get(n[1],e);Mz(d)?o[0]=c.toGlobalCoord(c.getExtent()["x0"===n[0]?0:1]):Mz(f)&&(o[1]=p.toGlobalCoord(p.getExtent()["y0"===n[1]?0:1]))}isNaN(l)||(o[0]=l),isNaN(u)||(o[1]=u)}else o=[l,u];return o}var Az=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Dz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.updateTransform=function(t,e,n){e.eachSeries((function(t){var e=tz.getMarkerModelFromSeries(t,"markArea");if(e){var i=e.getData();i.each((function(e){var r=O(Az,(function(r){return Cz(i,e,r,t,n)}));i.setItemLayout(e,r),i.getItemGraphicEl(e).setShape("points",r)}))}}),this)},e.prototype.renderSeries=function(t,e,n,i){var r=t.coordinateSystem,o=t.id,a=t.getData(),s=this.markerGroupMap,l=s.get(o)||s.set(o,{group:new zi});this.group.add(l.group),this.markKeep(l);var u=function(t,e,n){var i,r,o=["x0","y0","x1","y1"];t?(i=O(t&&t.dimensions,(function(t){var n=e.getData();return T({name:t},n.getDimensionInfo(n.mapDimension(t))||{})})),r=new Pm(O(o,(function(t,e){return{name:t,type:i[e%2].type}})),n)):r=new Pm(i=[{name:"value",type:"float"}],n);var a=O(n.get("data"),V(Sz,e,t,n));t&&(a=N(a,V(Tz,t)));var s=t?function(t,e,n,i){return t.coord[Math.floor(i/2)][i%2]}:function(t){return t.value};return r.initData(a,null,s),r.hasItemOption=!0,r}(r,t,e);e.setData(u),u.each((function(e){var n=O(Az,(function(n){return Cz(u,e,n,t,i)})),o=!0;P(Az,(function(t){if(o){var n=u.get(t[0],e),i=u.get(t[1],e);(Mz(n)||r.getAxis("x").containData(n))&&(Mz(i)||r.getAxis("y").containData(i))&&(o=!1)}})),u.setItemLayout(e,{points:n,allClipped:o});var s=u.getItemModel(e).getModel("itemStyle").getItemStyle(),l=dg(a,"color");s.fill||(s.fill=l,"string"==typeof s.fill&&(s.fill=on(s.fill,.4))),s.stroke||(s.stroke=l),u.setItemVisual(e,"style",s)})),u.diff(wz(l).data).add((function(t){var e=u.getItemLayout(t);if(!e.allClipped){var n=new ql({shape:{points:e.points}});u.setItemGraphicEl(t,n),l.group.add(n)}})).update((function(t,n){var i=wz(l).data.getItemGraphicEl(n),r=u.getItemLayout(t);r.allClipped?i&&l.group.remove(i):(i?Ou(i,{shape:{points:r.points}},e,t):i=new ql({shape:{points:r.points}}),u.setItemGraphicEl(t,i),l.group.add(i))})).remove((function(t){var e=wz(l).data.getItemGraphicEl(t);l.group.remove(e)})).execute(),u.eachItemGraphicEl((function(t,n){var i=u.getItemModel(n),r=u.getItemVisual(n,"style");t.useStyle(u.getItemVisual(n,"style")),th(t,eh(i),{labelFetcher:e,labelDataIndex:n,defaultText:u.getName(n)||"",inheritColor:"string"==typeof r.fill?on(r.fill,1):"#000"}),nl(t,i),Js(t),ys(t).dataModel=e})),wz(l).data=u,l.group.silent=e.get("silent")||t.get("silent")},e.type="markArea",e}(hz);var Lz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.layoutMode={type:"box",ignoreSize:!0},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(e,n){t.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},e.prototype._updateSelector=function(t){var e=t.selector,n=this.ecModel;!0===e&&(e=t.selector=["all","inverse"]),F(e)&&P(e,(function(t,i){H(t)&&(t={type:t}),e[i]=S(t,function(t,e){return"all"===e?{type:"all",title:t.getLocale(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:t.getLocale(["legend","selector","inverse"])}:void 0}(n,t.type))}))},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&"single"===this.get("selectedMode")){for(var e=!1,n=0;n=0},e.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={zlevel:0,z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",itemStyle:{borderWidth:0},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:" sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Nc),kz=V,Pz=P,Oz=zi,Rz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.newlineDisabled=!1,n}return n(e,t),e.prototype.init=function(){this.group.add(this._contentGroup=new Oz),this.group.add(this._selectorGroup=new Oz),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,e,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),t.get("show",!0)){var r=t.get("align"),o=t.get("orient");r&&"auto"!==r||(r="right"===t.get("left")&&"vertical"===o?"right":"left");var a=t.get("selector",!0),s=t.get("selectorPosition",!0);!a||s&&"auto"!==s||(s="horizontal"===o?"end":"start"),this.renderInner(r,t,e,n,a,o,s);var l=t.getBoxLayoutParams(),u={width:n.getWidth(),height:n.getHeight()},h=t.get("padding"),c=Ac(l,u,h),p=this.layoutInner(t,r,c,i,a,s),d=Ac(T({width:p.width,height:p.height},l),u,h);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=dN(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,e,n,i,r,o,a){var s=this.getContentGroup(),l=ht(),u=e.get("selectedMode"),h=[];n.eachRawSeries((function(t){!t.get("legendHoverLink")&&h.push(t.id)})),Pz(e.getData(),(function(r,o){var a=r.get("name");if(!this.newlineDisabled&&(""===a||"\n"===a)){var c=new Oz;return c.newline=!0,void s.add(c)}var p=n.getSeriesByName(a)[0];if(!l.get(a)){if(p){var d=p.getData(),f=d.getVisual("style"),g=f[d.getVisual("drawType")]||f.fill,y=f.stroke,v=f.decal,m=d.getVisual("legendSymbol")||"roundRect",_=d.getVisual("symbol");this._createItem(a,o,r,e,m,_,t,g,y,v,u).on("click",kz(Ez,a,null,i,h)).on("mouseover",kz(Bz,p.name,null,i,h)).on("mouseout",kz(Vz,p.name,null,i,h)),l.set(a,!0)}else n.eachRawSeries((function(n){if(!l.get(a)&&n.legendVisualProvider){var s=n.legendVisualProvider;if(!s.containName(a))return;var c=s.indexOfName(a),p=s.getItemVisual(c,"style"),d=p.stroke,f=p.decal,g=p.fill,y=qe(p.fill);y&&0===y[3]&&(y[3]=.2,g=an(y,"rgba"));this._createItem(a,o,r,e,"roundRect",null,t,g,d,f,u).on("click",kz(Ez,null,a,i,h)).on("mouseover",kz(Bz,null,a,i,h)).on("mouseout",kz(Vz,null,a,i,h)),l.set(a,!0)}}),this);0}}),this),r&&this._createSelector(r,e,i,o,a)},e.prototype._createSelector=function(t,e,n,i,r){var o=this.getSelectorGroup();Pz(t,(function(t){var i=t.type,r=new ls({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===i?"legendAllSelect":"legendInverseSelect"})}});o.add(r),th(r,{normal:e.getModel("selectorLabel"),emphasis:e.getModel(["emphasis","selectorLabel"])},{defaultText:t.title}),Js(r)}))},e.prototype._createItem=function(t,e,n,i,r,o,a,s,l,u,h){var c=i.get("itemWidth"),p=i.get("itemHeight"),d=i.get("inactiveColor"),f=i.get("inactiveBorderColor"),g=i.get("symbolKeepAspect"),y=i.getModel("itemStyle"),v=i.isSelected(t),m=new Oz,_=n.getModel("textStyle"),x=n.get("icon"),b=n.getModel("tooltip"),w=b.parentModel,S=uy(r=x||r,0,0,c,p,v?s:d,null==g||g);if(m.add(Nz(S,r,y,l,f,u,v)),!x&&o&&(o!==r||"none"===o)){var M=.8*p;"none"===o&&(o="circle");var T=uy(o,(c-M)/2,(p-M)/2,M,M,v?s:d,null==g||g);m.add(Nz(T,o,y,l,f,u,v))}var C="left"===a?c+5:-5,A=a,D=i.get("formatter"),L=t;"string"==typeof D&&D?L=D.replace("{name}",null!=t?t:""):"function"==typeof D&&(L=D(t)),m.add(new ls({style:nh(_,{text:L,x:C,y:p/2,fill:v?_.getTextColor():d,align:A,verticalAlign:"middle"})}));var k=new os({shape:m.getBoundingRect(),invisible:!0});if(b.get("show")){var P={componentType:"legend",legendIndex:i.componentIndex,name:t,$vars:["name"]};k.tooltip=I({content:t,formatter:w.get("formatter",!0)||function(t){return t.name},formatterParams:P},b.option)}return m.add(k),m.eachChild((function(t){t.silent=!0})),k.silent=!h,this.getContentGroup().add(m),Js(m),m.__legendDataIndex=e,m},e.prototype.layoutInner=function(t,e,n,i,r,o){var a=this.getContentGroup(),s=this.getSelectorGroup();Cc(t.get("orient"),a,t.get("itemGap"),n.width,n.height);var l=a.getBoundingRect(),u=[-l.x,-l.y];if(s.markRedraw(),a.markRedraw(),r){Cc("horizontal",s,t.get("selectorItemGap",!0));var h=s.getBoundingRect(),c=[-h.x,-h.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,f=0===d?"width":"height",g=0===d?"height":"width",y=0===d?"y":"x";"end"===o?c[d]+=l[f]+p:u[d]+=h[f]+p,c[1-d]+=l[g]/2-h[g]/2,s.x=c[0],s.y=c[1],a.x=u[0],a.y=u[1];var v={x:0,y:0};return v[f]=l[f]+p+h[f],v[g]=Math.max(l[g],h[g]),v[y]=Math.min(0,h[y]+c[1-d]),v}return a.x=u[0],a.y=u[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(pf);function Nz(t,e,n,i,r,o,a){var s;return"line"!==e&&e.indexOf("empty")<0?(s=n.getItemStyle(),t.style.stroke=i,t.style.decal=o,a||(s.stroke=r)):s=n.getItemStyle(["borderWidth","borderColor"]),t.setStyle(s),t}function Ez(t,e,n,i){Vz(t,e,n,i),n.dispatchAction({type:"legendToggleSelect",name:null!=t?t:e}),Bz(t,e,n,i)}function zz(t){for(var e,n=t.getZr().storage.getDisplayList(),i=0,r=n.length;in[r],f=[-c.x,-c.y];e||(f[i]=l[s]);var g=[0,0],y=[-p.x,-p.y],v=tt(t.get("pageButtonGap",!0),t.get("itemGap",!0));d&&("end"===t.get("pageButtonPosition",!0)?y[i]+=n[r]-p[r]:g[i]+=p[r]+v);y[1-i]+=c[o]/2-p[o]/2,l.setPosition(f),u.setPosition(g),h.setPosition(y);var m={x:0,y:0};if(m[r]=d?n[r]:c[r],m[o]=Math.max(c[o],p[o]),m[a]=Math.min(0,p[a]+y[1-i]),u.__rectSize=n[r],d){var _={x:0,y:0};_[r]=Math.max(n[r]-p[r]-v,0),_[o]=m[o],u.setClipPath(new os({shape:_})),u.__rectSize=_[r]}else h.eachChild((function(t){t.attr({invisible:!0,silent:!0})}));var x=this._getPageInfo(t);return null!=x.pageIndex&&Ou(l,{x:x.contentPosition[0],y:x.contentPosition[1]},d?t:null),this._updatePageInfoView(t,x),m},e.prototype._pageGo=function(t,e,n){var i=this._getPageInfo(e)[t];null!=i&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:e.id})},e.prototype._updatePageInfoView=function(t,e){var n=this._controllerGroup;P(["pagePrev","pageNext"],(function(i){var r=null!=e[i+"DataIndex"],o=n.childOfName(i);o&&(o.setStyle("fill",r?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),o.cursor=r?"pointer":"default")}));var i=n.childOfName("pageText"),r=t.get("pageFormatter"),o=e.pageIndex,a=null!=o?o+1:0,s=e.pageCount;i&&r&&i.setStyle("text",H(r)?r.replace("{current}",null==a?"":a+"").replace("{total}",null==s?"":s+""):r({current:a,total:s}))},e.prototype._getPageInfo=function(t){var e=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,r=t.getOrient().index,o=Uz[r],a=Zz[r],s=this._findTargetItemIndex(e),l=n.children(),u=l[s],h=l.length,c=h?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!u)return p;var d=m(u);p.contentPosition[r]=-d.s;for(var f=s+1,g=d,y=d,v=null;f<=h;++f)(!(v=m(l[f]))&&y.e>g.s+i||v&&!_(v,g.s))&&(g=y.i>g.i?y:v)&&(null==p.pageNextDataIndex&&(p.pageNextDataIndex=g.i),++p.pageCount),y=v;for(f=s-1,g=d,y=d,v=null;f>=-1;--f)(v=m(l[f]))&&_(y,v.s)||!(g.i=e&&t.s<=e+i}},e.prototype._findTargetItemIndex=function(t){return this._showController?(this.getContentGroup().eachChild((function(i,r){var o=i.__legendDataIndex;null==n&&null!=o&&(n=r),o===t&&(e=r)})),null!=e?e:n):0;var e,n},e.type="legend.scroll",e}(Rz);function qz(t){em(Hz),t.registerComponentModel(Wz),t.registerComponentView(jz),function(t){t.registerAction("legendScroll","legendscroll",(function(t,e){var n=t.scrollDataIndex;null!=n&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},(function(t){t.setScrollDataIndex(n)}))}))}(t)}var Kz=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.inside",e.defaultOption=Th(KR.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(KR),$z=Lr();function Jz(t,e,n){$z(t).coordSysRecordMap.each((function(t){var i=t.dataZoomInfoMap.get(e.uid);i&&(i.getRange=n)}))}function Qz(t,e){if(e){t.removeKey(e.model.uid);var n=e.controller;n&&n.dispose()}}function tB(t,e){t.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function eB(t,e,n,i){return t.coordinateSystem.containPoint([n,i])}function nB(t){t.registerProcessor(t.PRIORITY.PROCESSOR.FILTER,(function(t,e){var n=$z(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=ht());i.each((function(t){t.dataZoomInfoMap=null})),t.eachComponent({mainType:"dataZoom",subType:"inside"},(function(t){P(jR(t).infoList,(function(n){var r=n.model.uid,o=i.get(r)||i.set(r,function(t,e){var n={model:e,containsPoint:V(eB,e),dispatchAction:V(tB,t),dataZoomInfoMap:null,controller:null},i=n.controller=new QS(t.getZr());return P(["pan","zoom","scrollMove"],(function(t){i.on(t,(function(e){var i=[];n.dataZoomInfoMap.each((function(r){if(e.isAvailableBehavior(r.model.option)){var o=(r.getRange||{})[t],a=o&&o(r.dzReferCoordSysInfo,n.model.mainType,n.controller,e);!r.model.get("disabled",!0)&&a&&i.push({dataZoomId:r.model.id,start:a[0],end:a[1]})}})),i.length&&n.dispatchAction(i)}))})),n}(e,n.model));(o.dataZoomInfoMap||(o.dataZoomInfoMap=ht())).set(t.uid,{dzReferCoordSysInfo:n,model:t,getRange:null})}))})),i.each((function(t){var e,n=t.controller,r=t.dataZoomInfoMap;if(r){var o=r.keys()[0];null!=o&&(e=r.get(o))}if(e){var a=function(t){var e,n="type_",i={type_true:2,type_move:1,type_false:0,type_undefined:-1},r=!0;return t.each((function(t){var o=t.model,a=!o.get("disabled",!0)&&(!o.get("zoomLock",!0)||"move");i[n+a]>i[n+e]&&(e=a),r=r&&o.get("preventDefaultMouseMove",!0)})),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!r}}}(r);n.enable(a.controlType,a.opt),n.setPointerChecker(t.containsPoint),Tf(t,"dispatchAction",e.model.get("throttle",!0),"fixRate")}else Qz(i,t)}))}))}var iB=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return n(e,t),e.prototype.render=function(e,n,i){t.prototype.render.apply(this,arguments),e.noTarget()?this._clear():(this.range=e.getPercentRange(),Jz(i,e,{pan:B(rB.pan,this),zoom:B(rB.zoom,this),scrollMove:B(rB.scrollMove,this)}))},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){!function(t,e){for(var n=$z(t).coordSysRecordMap,i=n.keys(),r=0;r0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(o[1]-o[0])+o[0],u=Math.max(1/i.scale,0);o[0]=(o[0]-l)*u+l,o[1]=(o[1]-l)*u+l;var h=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();return tA(0,o,[0,100],0,h.minSpan,h.maxSpan),this.range=o,r[0]!==o[0]||r[1]!==o[1]?o:void 0}},pan:oB((function(t,e,n,i,r,o){var a=aB[i]([o.oldX,o.oldY],[o.newX,o.newY],e,r,n);return a.signal*(t[1]-t[0])*a.pixel/a.pixelLength})),scrollMove:oB((function(t,e,n,i,r,o){return aB[i]([0,0],[o.scrollDelta,o.scrollDelta],e,r,n).signal*(t[1]-t[0])*o.scrollDelta}))};function oB(t){return function(e,n,i,r){var o=this.range,a=o.slice(),s=e.axisModels[0];if(s)return tA(t(a,s,e,n,i,r),a,[0,100],"all"),this.range=a,o[0]!==a[0]||o[1]!==a[1]?a:void 0}}var aB={grid:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem.getRect();return t=t||[0,0],"x"===o.dim?(a.pixel=e[0]-t[0],a.pixelLength=s.width,a.pixelStart=s.x,a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=s.height,a.pixelStart=s.y,a.signal=o.inverse?-1:1),a},polar:function(t,e,n,i,r){var o=n.axis,a={},s=r.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return t=t?s.pointToCoord(t):[0,0],e=s.pointToCoord(e),"radiusAxis"===n.mainType?(a.pixel=e[0]-t[0],a.pixelLength=l[1]-l[0],a.pixelStart=l[0],a.signal=o.inverse?1:-1):(a.pixel=e[1]-t[1],a.pixelLength=u[1]-u[0],a.pixelStart=u[0],a.signal=o.inverse?-1:1),a},singleAxis:function(t,e,n,i,r){var o=n.axis,a=r.model.coordinateSystem.getRect(),s={};return t=t||[0,0],"horizontal"===o.orient?(s.pixel=e[0]-t[0],s.pixelLength=a.width,s.pixelStart=a.x,s.signal=o.inverse?1:-1):(s.pixel=e[1]-t[1],s.pixelLength=a.height,s.pixelStart=a.y,s.signal=o.inverse?-1:1),s}};function sB(t){aN(t),t.registerComponentModel(Kz),t.registerComponentView(iB),nB(t)}var lB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Th(KR.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(KR),uB=os,hB="horizontal",cB="vertical",pB=["line","bar","candlestick","scatter"],dB={easing:"cubicOut",duration:100},fB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._displayables={},n}return n(e,t),e.prototype.init=function(t,e){this.api=e,this._onBrush=B(this._onBrush,this),this._onBrushEnd=B(this._onBrushEnd,this)},e.prototype.render=function(e,n,i,r){if(t.prototype.render.apply(this,arguments),Tf(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),!1!==e.get("show")){if(e.noTarget())return this._clear(),void this.group.removeAll();r&&"dataZoom"===r.type&&r.from===this.uid||this._buildView(),this._updateView()}else this.group.removeAll()},e.prototype.dispose=function(){this._clear(),t.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){var t,e,n;(n=(t=this)[e="_dispatchZoomAction"])&&n[wf]&&(t[e]=n[wf]);var i=this.api.getZr();i.off("mousemove",this._onBrush),i.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var e=this._displayables.sliderGroup=new zi;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(e),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,e=this.api,n=t.get("brushSelect")?7:0,i=this._findCoordRect(),r={width:e.getWidth(),height:e.getHeight()},o=this._orient===hB?{right:r.width-i.x-i.width,top:r.height-30-7-n,width:i.width,height:30}:{right:7,top:i.y,width:30,height:i.height},a=Pc(t.option);P(["right","top","width","height"],(function(t){"ph"===a[t]&&(a[t]=o[t])}));var s=Ac(a,r);this._location={x:s.x,y:s.y},this._size=[s.width,s.height],this._orient===cB&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,e=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),r=i&&i.get("inverse"),o=this._displayables.sliderGroup,a=(this._dataShadowInfo||{}).otherAxisInverse;o.attr(n!==hB||r?n===hB&&r?{scaleY:a?1:-1,scaleX:-1}:n!==cB||r?{scaleY:a?-1:1,scaleX:-1,rotation:Math.PI/2}:{scaleY:a?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:a?1:-1,scaleX:1});var s=t.getBoundingRect([o]);t.x=e.x-s.x,t.y=e.y-s.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,e=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new uB({silent:!0,shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var r=new uB({shape:{x:0,y:0,width:e[0],height:e[1]},style:{fill:"transparent"},z2:0,onclick:B(this._onClickPanel,this)}),o=this.api.getZr();i?(r.on("mousedown",this._onBrushStart,this),r.cursor="crosshair",o.on("mousemove",this._onBrush),o.on("mouseup",this._onBrushEnd)):(o.off("mousemove",this._onBrush),o.off("mouseup",this._onBrushEnd)),n.add(r)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],t){var e=this._size,n=t.series,i=n.getRawData(),r=n.getShadowDim?n.getShadowDim():t.otherDim;if(null!=r){var o=i.getDataExtent(r),a=.3*(o[1]-o[0]);o=[o[0]-a,o[1]+a];var s,l=[0,e[1]],u=[0,e[0]],h=[[e[0],0],[0,0]],c=[],p=u[1]/(i.count()-1),d=0,f=Math.round(i.count()/e[0]);i.each([r],(function(t,e){if(f>0&&e%f)d+=p;else{var n=null==t||isNaN(t)||""===t,i=n?0:Ui(t,o,l,!0);n&&!s&&e?(h.push([h[h.length-1][0],0]),c.push([c[c.length-1][0],0])):!n&&s&&(h.push([d,0]),c.push([d,0])),h.push([d,i]),c.push([d,i]),d+=p,s=n}}));for(var g=this.dataZoomModel,y=0;y<3;y++){var v=m(1===y);this._displayables.sliderGroup.add(v),this._displayables.dataShadowSegs.push(v)}}}function m(t){var e=g.getModel(t?"selectedDataBackground":"dataBackground"),n=new zi,i=new ql({shape:{points:h},segmentIgnoreThreshold:1,style:e.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),r=new $l({shape:{points:c},segmentIgnoreThreshold:1,style:e.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return n.add(i),n.add(r),n}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,e=t.get("showDataShadow");if(!1!==e){var n,i=this.ecModel;return t.eachTargetAxis((function(r,o){P(t.getAxisProxy(r,o).getTargetSeriesModels(),(function(t){if(!(n||!0!==e&&A(pB,t.get("type"))<0)){var a,s=i.getComponent(UR(r),o).axis,l={x:"y",y:"x",radius:"angle",angle:"radius"}[r],u=t.coordinateSystem;null!=l&&u.getOtherAxis&&(a=u.getOtherAxis(s).inverse),l=t.getData().mapDimension(l),n={thisAxis:s,series:t,thisDim:r,otherDim:l,otherAxisInverse:a}}}),this)}),this),n}},e.prototype._renderHandle=function(){var t=this.group,e=this._displayables,n=e.handles=[null,null],i=e.handleLabels=[null,null],r=this._displayables.sliderGroup,o=this._size,a=this.dataZoomModel,s=this.api,l=a.get("borderRadius")||0,u=a.get("brushSelect"),h=e.filler=new uB({silent:u,style:{fill:a.get("fillerColor")},textConfig:{position:"inside"}});r.add(h),r.add(new uB({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:o[0],height:o[1],r:l},style:{stroke:a.get("dataBackgroundColor")||a.get("borderColor"),lineWidth:1,fill:"rgba(0,0,0,0)"}})),P([0,1],(function(e){var o=a.get("handleIcon");!ay[o]&&o.indexOf("path://")<0&&(o="path://"+o);var s=uy(o,-1,0,2,2,null,!0);s.attr({cursor:gB(this._orient),draggable:!0,drift:B(this._onDragMove,this,e),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1),z2:5});var l=s.getBoundingRect(),u=a.get("handleSize");this._handleHeight=Zi(u,this._size[1]),this._handleWidth=l.width/l.height*this._handleHeight,s.setStyle(a.getModel("handleStyle").getItemStyle()),s.style.strokeNoScale=!0,s.rectHover=!0,s.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),Js(s);var h=a.get("handleColor");null!=h&&(s.style.fill=h),r.add(n[e]=s);var c=a.getModel("textStyle");t.add(i[e]=new ls({silent:!0,invisible:!0,style:{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:c.getTextColor(),font:c.getFont()},z2:10}))}),this);var c=h;if(u){var p=Zi(a.get("moveHandleSize"),o[1]),d=e.moveHandle=new os({style:a.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:o[1]-.5,height:p}}),f=.8*p,g=e.moveHandleIcon=uy(a.get("moveHandleIcon"),-f/2,-f/2,f,f,"#fff",!0);g.silent=!0,g.y=o[1]+p/2-.5,d.ensureState("emphasis").style=a.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(o[1]/2,Math.max(p,10));(c=e.moveZone=new os({invisible:!0,shape:{y:o[1]-y,height:p+y}})).on("mouseover",(function(){s.enterEmphasis(d)})).on("mouseout",(function(){s.leaveEmphasis(d)})),r.add(d),r.add(g),r.add(c)}c.attr({draggable:!0,cursor:gB(this._orient),drift:B(this._onDragMove,this,"all"),ondragstart:B(this._showDataInfo,this,!0),ondragend:B(this._onDragEnd,this),onmouseover:B(this._showDataInfo,this,!0),onmouseout:B(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),e=this._getViewExtent();this._handleEnds=[Ui(t[0],[0,100],e,!0),Ui(t[1],[0,100],e,!0)]},e.prototype._updateInterval=function(t,e){var n=this.dataZoomModel,i=this._handleEnds,r=this._getViewExtent(),o=n.findRepresentativeAxisProxy().getMinMaxSpan(),a=[0,100];tA(e,i,r,n.get("zoomLock")?"all":t,null!=o.minSpan?Ui(o.minSpan,a,r,!0):null,null!=o.maxSpan?Ui(o.maxSpan,a,r,!0):null);var s=this._range,l=this._range=qi([Ui(i[0],r,a,!0),Ui(i[1],r,a,!0)]);return!s||s[0]!==l[0]||s[1]!==l[1]},e.prototype._updateView=function(t){var e=this._displayables,n=this._handleEnds,i=qi(n.slice()),r=this._size;P([0,1],(function(t){var i=e.handles[t],o=this._handleHeight;i.attr({scaleX:o/2,scaleY:o/2,x:n[t]+(t?-1:1),y:r[1]/2-o/2})}),this),e.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:r[1]});var o={x:i[0],width:i[1]-i[0]};e.moveHandle&&(e.moveHandle.setShape(o),e.moveZone.setShape(o),e.moveZone.getBoundingRect(),e.moveHandleIcon&&e.moveHandleIcon.attr("x",o.x+o.width/2));for(var a=e.dataShadowSegs,s=[0,i[0],i[1],r[0]],l=0;le[0]||n[1]<0||n[1]>e[1])){var i=this._handleEnds,r=(i[0]+i[1])/2,o=this._updateInterval("all",n[0]-r);this._updateView(),o&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var e=t.offsetX,n=t.offsetY;this._brushStart=new In(e,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var e=this._displayables.brushRect;if(this._brushing=!1,e){e.attr("ignore",!0);var n=e.shape;if(!(+new Date-this._brushStartTime<200&&Math.abs(n.width)<5)){var i=this._getViewExtent(),r=[0,100];this._range=qi([Ui(n.x,i,r,!0),Ui(n.x+n.width,i,r,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ee(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,e){var n=this._displayables,i=this.dataZoomModel,r=n.brushRect;r||(r=n.brushRect=new uB({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(r)),r.attr("ignore",!1);var o=this._brushStart,a=this._displayables.sliderGroup,s=a.transformCoordToLocal(t,e),l=a.transformCoordToLocal(o.x,o.y),u=this._size;s[0]=Math.max(Math.min(u[0],s[0]),0),r.setShape({x:l[0],y:0,width:s[0]-l[0],height:u[1]})},e.prototype._dispatchZoomAction=function(t){var e=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?dB:null,start:e[0],end:e[1]})},e.prototype._findCoordRect=function(){var t,e=jR(this.dataZoomModel).infoList;if(!t&&e.length){var n=e[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),r=this.api.getHeight();t={x:.2*i,y:.2*r,width:.6*i,height:.6*r}}return t},e.type="dataZoom.slider",e}(QR);function gB(t){return"vertical"===t?"ns-resize":"ew-resize"}function yB(t){t.registerComponentModel(lB),t.registerComponentView(fB),aN(t)}var vB=function(t,e,n){var i=w((mB[t]||{})[e]);return n&&F(i)?i[i.length-1]:i},mB={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},_B=jI.mapVisual,xB=jI.eachVisual,bB=F,wB=P,SB=qi,MB=Ui,IB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n.stateList=["inRange","outOfRange"],n.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],n.layoutMode={type:"box",ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return n(e,t),e.prototype.init=function(t,e,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,e){var n=this.option;a.canvasSupported||(n.realtime=!1),!e&&xE(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var e=this.stateList;t=B(t,this),this.controllerVisuals=_E(this.option.controller,e,t),this.targetVisuals=_E(this.option.target,e,t)},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,e=[];return null==t||"all"===t?this.ecModel.eachSeries((function(t,n){e.push(n)})):e=_r(t),e},e.prototype.eachTargetSeries=function(t,e){P(this.getTargetSeriesIndices(),(function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(e,i)}),this)},e.prototype.isTargetSeries=function(t){var e=!1;return this.eachTargetSeries((function(n){n===t&&(e=!0)})),e},e.prototype.formatValueText=function(t,e,n){var i,r=this.option,o=r.precision,a=this.dataBound,s=r.formatter;n=n||["<",">"],F(t)&&(t=t.slice(),i=!0);var l=e?t:i?[u(t[0]),u(t[1])]:u(t);return H(s)?s.replace("{value}",i?l[0]:l).replace("{value2}",i?l[1]:l):G(s)?i?s(t[0],t[1]):s(t):i?t[0]===a[0]?n[0]+" "+l[1]:t[1]===a[1]?n[1]+" "+l[0]:l[0]+" - "+l[1]:l;function u(t){return t===a[0]?"min":t===a[1]?"max":(+t).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,e=SB([t.min,t.max]);this._dataExtent=e},e.prototype.getDataDimension=function(t){var e=this.option.dimension,n=t.dimensions;if(null!=e||n.length){if(null!=e)return t.getDimension(e);for(var i=t.dimensions,r=i.length-1;r>=0;r--){var o=i[r];if(!t.getDimensionInfo(o).isCalculationCoord)return o}}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,e=this.option,n={inRange:e.inRange,outOfRange:e.outOfRange},i=e.target||(e.target={}),r=e.controller||(e.controller={});S(i,n),S(r,n);var o=this.isCategory();function a(n){bB(e.color)&&!n.inRange&&(n.inRange={color:e.color.slice().reverse()}),n.inRange=n.inRange||{color:t.get("gradientColor")}}a.call(this,i),a.call(this,r),function(t,e,n){var i=t[e],r=t[n];i&&!r&&(r=t[n]={},wB(i,(function(t,e){if(jI.isValidType(e)){var n=vB(e,"inactive",o);null!=n&&(r[e]=n,"color"!==e||r.hasOwnProperty("opacity")||r.hasOwnProperty("colorAlpha")||(r.opacity=[0,0]))}})))}.call(this,i,"inRange","outOfRange"),function(t){var e=(t.inRange||{}).symbol||(t.outOfRange||{}).symbol,n=(t.inRange||{}).symbolSize||(t.outOfRange||{}).symbolSize,i=this.get("inactiveColor");wB(this.stateList,(function(r){var a=this.itemSize,s=t[r];s||(s=t[r]={color:o?i:[i]}),null==s.symbol&&(s.symbol=e&&w(e)||(o?"roundRect":["roundRect"])),null==s.symbolSize&&(s.symbolSize=n&&w(n)||(o?a[0]:[a[0],a[0]])),s.symbol=_B(s.symbol,(function(t){return"none"===t||"square"===t?"roundRect":t}));var l=s.symbolSize;if(null!=l){var u=-1/0;xB(l,(function(t){t>u&&(u=t)})),s.symbolSize=_B(l,(function(t){return MB(t,[0,u],[0,a[0]],!0)}))}}),this)}.call(this,r)},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,zlevel:0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Nc),TB=[20,140],CB=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual((function(t){t.mappingMethod="linear",t.dataExtent=this.getExtent()})),this._resetRange()},e.prototype.resetItemSize=function(){t.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(null==e[0]||isNaN(e[0]))&&(e[0]=TB[0]),(null==e[1]||isNaN(e[1]))&&(e[1]=TB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),e=this.option.range;!e||e.auto?(t.auto=1,this.option.range=t):F(e)&&(e[0]>e[1]&&e.reverse(),e[0]=Math.max(e[0],t[0]),e[1]=Math.min(e[1],t[1]))},e.prototype.completeVisualOption=function(){t.prototype.completeVisualOption.apply(this,arguments),P(this.stateList,(function(t){var e=this.option.controller[t].symbolSize;e&&e[0]!==e[1]&&(e[0]=e[1]/3)}),this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),e=qi((this.get("range")||[]).slice());return e[0]>t[1]&&(e[0]=t[1]),e[1]>t[1]&&(e[1]=t[1]),e[0]=n[1]||t<=e[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[];return this.eachTargetSeries((function(n){var i=[],r=n.getData();r.each(this.getDataDimension(r),(function(e,n){t[0]<=e&&e<=t[1]&&i.push(n)}),this),e.push({seriesId:n.id,dataIndex:i})}),this),e},e.prototype.getVisualMeta=function(t){var e=AB(this,"outOfRange",this.getExtent()),n=AB(this,"inRange",this.option.range.slice()),i=[];function r(e,n){i.push({value:e,color:t(e,n)})}for(var o=0,a=0,s=n.length,l=e.length;at[1])break;n.push({color:this.getControllerVisual(o,"color",e),offset:r/100})}return n.push({color:this.getControllerVisual(t[1],"color",e),offset:1}),n},e.prototype._createBarPoints=function(t,e){var n=this.visualMapModel.itemSize;return[[n[0]-e[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-e[1],t[1]]]},e.prototype._createBarGroup=function(t){var e=this._orient,n=this.visualMapModel.get("inverse");return new zi("horizontal"!==e||n?"horizontal"===e&&n?{scaleX:"bottom"===t?-1:1,rotation:-Math.PI/2}:"vertical"!==e||n?{scaleX:"left"===t?1:-1}:{scaleX:"left"===t?1:-1,scaleY:-1}:{scaleX:"bottom"===t?1:-1,rotation:Math.PI/2})},e.prototype._updateHandle=function(t,e){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,r=n.handleThumbs,o=n.handleLabels,a=i.itemSize,s=i.getExtent();RB([0,1],(function(l){var u=r[l];u.setStyle("fill",e.handlesColor[l]),u.y=t[l];var h=OB(t[l],[0,a[1]],s,!0),c=this.getControllerVisual(h,"symbolSize");u.scaleX=u.scaleY=c/a[0],u.x=a[0]-c/2;var p=Fu(n.handleLabelPoints[l],Vu(u,this.group));o[l].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[l]),verticalAlign:"middle",align:"vertical"===this._orient?this._applyTransform("left",n.mainGroup):"center"})}),this)}},e.prototype._showIndicator=function(t,e,n,i){var r=this.visualMapModel,o=r.getExtent(),a=r.itemSize,s=[0,a[1]],l=this._shapes,u=l.indicator;if(u){u.attr("invisible",!1);var h=this.getControllerVisual(t,"color",{convertOpacityToAlpha:!0}),c=this.getControllerVisual(t,"symbolSize"),p=OB(t,o,s,!0),d=a[0]-c/2,f={x:u.x,y:u.y};u.y=p,u.x=d;var g=Fu(l.indicatorLabelPoint,Vu(u,this.group)),y=l.indicatorLabel;y.attr("invisible",!1);var v=this._applyTransform("left",l.mainGroup),m="horizontal"===this._orient;y.setStyle({text:(n||"")+r.formatValueText(e),verticalAlign:m?v:"middle",align:m?"center":v});var _={x:d,y:p,style:{fill:h}},x={style:{x:g[0],y:g[1]}};if(r.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var b={duration:100,easing:"cubicInOut",additive:!0};u.x=f.x,u.y=f.y,u.animateTo(_,b),y.animateTo(x,b)}else u.attr(_),y.attr(x);this._firstShowIndicator=!1;var w=this._shapes.handleLabels;if(w)for(var S=0;Sr[1]&&(u[1]=1/0),e&&(u[0]===-1/0?this._showIndicator(l,u[1],"< ",a):u[1]===1/0?this._showIndicator(l,u[0],"> ",a):this._showIndicator(l,l,"≈ ",a));var h=this._hoverLinkDataIndices,c=[];(e||VB(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(u));var p=function(t,e){var n={},i={};return r(t||[],n),r(e||[],i,n),[o(n),o(i)];function r(t,e,n){for(var i=0,r=t.length;i0:t.splitNumber>0)&&!t.calculable?"piecewise":"continuous"})),t.registerAction(GB,HB),P(WB,(function(e){t.registerVisual(t.PRIORITY.VISUAL.COMPONENT,e)})),t.registerPreprocessor(UB))}function KB(t){t.registerComponentModel(CB),t.registerComponentView(zB),qB(t)}var $B=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n._pieceList=[],n}return n(e,t),e.prototype.optionUpdated=function(e,n){t.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var i=this._mode=this._determineMode();this._pieceList=[],JB[this._mode].call(this,this._pieceList),this._resetSelected(e,n);var r=this.option.categories;this.resetVisual((function(t,e){"categories"===i?(t.mappingMethod="category",t.categories=w(r)):(t.dataExtent=this.getExtent(),t.mappingMethod="piecewise",t.pieceList=O(this._pieceList,(function(t){return t=w(t),"inRange"!==e&&(t.visual=null),t})))}))},e.prototype.completeVisualOption=function(){var e=this.option,n={},i=jI.listVisualTypes(),r=this.isCategory();function o(t,e,n){return t&&t[e]&&t[e].hasOwnProperty(n)}P(e.pieces,(function(t){P(i,(function(e){t.hasOwnProperty(e)&&(n[e]=1)}))})),P(n,(function(t,n){var i=!1;P(this.stateList,(function(t){i=i||o(e,t,n)||o(e.target,t,n)}),this),!i&&P(this.stateList,(function(t){(e[t]||(e[t]={}))[n]=vB(n,"inRange"===t?"active":"inactive",r)}))}),this),t.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,e){var n=this.option,i=this._pieceList,r=(e?n:t).selected||{};if(n.selected=r,P(i,(function(t,e){var n=this.getSelectedMapKey(t);r.hasOwnProperty(n)||(r[n]=!0)}),this),"single"===n.selectedMode){var o=!1;P(i,(function(t,e){var n=this.getSelectedMapKey(t);r[n]&&(o?r[n]=!1:o=!0)}),this)}},e.prototype.getSelectedMapKey=function(t){return"categories"===this._mode?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=w(t)},e.prototype.getValueState=function(t){var e=jI.findPieceIndex(t,this._pieceList);return null!=e&&this.option.selected[this.getSelectedMapKey(this._pieceList[e])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var e=[],n=this._pieceList;return this.eachTargetSeries((function(i){var r=[],o=i.getData();o.each(this.getDataDimension(o),(function(e,i){jI.findPieceIndex(e,n)===t&&r.push(i)}),this),e.push({seriesId:i.id,dataIndex:r})}),this),e},e.prototype.getRepresentValue=function(t){var e;if(this.isCategory())e=t.value;else if(null!=t.value)e=t.value;else{var n=t.interval||[];e=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return e},e.prototype.getVisualMeta=function(t){if(!this.isCategory()){var e=[],n=["",""],i=this,r=this._pieceList.slice();if(r.length){var o=r[0].interval[0];o!==-1/0&&r.unshift({interval:[-1/0,o]}),(o=r[r.length-1].interval[1])!==1/0&&r.push({interval:[o,1/0]})}else r.push({interval:[-1/0,1/0]});var a=-1/0;return P(r,(function(t){var e=t.interval;e&&(e[0]>a&&s([a,e[0]],"outOfRange"),s(e.slice()),a=e[1])}),this),{stops:e,outerColors:n}}function s(r,o){var a=i.getRepresentValue({interval:r});o||(o=i.getValueState(a));var s=t(a,o);r[0]===-1/0?n[0]=s:r[1]===1/0?n[1]=s:e.push({value:r[0],color:s},{value:r[1],color:s})}},e.type="visualMap.piecewise",e.defaultOption=Th(IB.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(IB),JB={splitNumber:function(t){var e=this.option,n=Math.min(e.precision,20),i=this.getExtent(),r=e.splitNumber;r=Math.max(parseInt(r,10),1),e.splitNumber=r;for(var o=(i[1]-i[0])/r;+o.toFixed(n)!==o&&n<5;)n++;e.precision=n,o=+o.toFixed(n),e.minOpen&&t.push({interval:[-1/0,i[0]],close:[0,0]});for(var a=0,s=i[0];a","≥"][e[0]]];t.text=t.text||this.formatValueText(null!=t.value?t.value:t.interval,!1,n)}),this)}};function QB(t,e){var n=t.inverse;("vertical"===t.orient?!n:n)&&e.reverse()}var tV=function(t){function e(){var n=null!==t&&t.apply(this,arguments)||this;return n.type=e.type,n}return n(e,t),e.prototype.doRender=function(){var t=this.group;t.removeAll();var e=this.visualMapModel,n=e.get("textGap"),i=e.textStyleModel,r=i.getFont(),o=i.getTextColor(),a=this._getItemAlign(),s=e.itemSize,l=this._getViewData(),u=l.endsText,h=Q(e.get("showLabel",!0),!u);u&&this._renderEndsText(t,u[0],s,h,a),P(l.viewPieceList,(function(i){var l=i.piece,u=new zi;u.onclick=B(this._onItemClick,this,l),this._enableHoverLink(u,i.indexInModelPieceList);var c=e.getRepresentValue(l);if(this._createItemSymbol(u,c,[0,0,s[0],s[1]]),h){var p=this.visualMapModel.getValueState(c);u.add(new ls({style:{x:"right"===a?-n:s[0]+n,y:s[1]/2,text:l.text,verticalAlign:"middle",align:a,font:r,fill:o,opacity:"outOfRange"===p?.5:1}}))}t.add(u)}),this),u&&this._renderEndsText(t,u[1],s,h,a),Cc(e.get("orient"),t,e.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,e){var n=this;t.on("mouseover",(function(){return i("highlight")})).on("mouseout",(function(){return i("downplay")}));var i=function(t){var i=n.visualMapModel;i.option.hoverLink&&n.api.dispatchAction({type:t,batch:PB(i.findTargetDataIndices(e),i)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,e=t.option;if("vertical"===e.orient)return kB(t,this.api,t.itemSize);var n=e.align;return n&&"auto"!==n||(n="left"),n},e.prototype._renderEndsText=function(t,e,n,i,r){if(e){var o=new zi,a=this.visualMapModel.textStyleModel;o.add(new ls({style:{x:i?"right"===r?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?r:"center",text:e,font:a.getFont(),fill:a.getTextColor()}})),t.add(o)}},e.prototype._getViewData=function(){var t=this.visualMapModel,e=O(t.getPieceList(),(function(t,e){return{piece:t,indexInModelPieceList:e}})),n=t.get("text"),i=t.get("orient"),r=t.get("inverse");return("horizontal"===i?r:!r)?e.reverse():n&&(n=n.slice().reverse()),{viewPieceList:e,endsText:n}},e.prototype._createItemSymbol=function(t,e,n){t.add(uy(this.getControllerVisual(e,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(e,"color")))},e.prototype._onItemClick=function(t){var e=this.visualMapModel,n=e.option,i=w(n.selected),r=e.getSelectedMapKey(t);"single"===n.selectedMode?(i[r]=!0,P(i,(function(t,e){i[e]=e===r}))):i[r]=!i[r],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:i})},e.type="visualMap.piecewise",e}(DB);function eV(t){t.registerComponentModel($B),t.registerComponentView(tV),qB(t)}var nV={label:{enabled:!0},decal:{show:!1}},iV=Lr(),rV={};function oV(t,e){var n=t.getModel("aria");if(n.get("enabled")){var i=w(nV);S(i.label,t.getLocaleModel().get("aria"),!1),S(n.option,i,!1),function(){if(n.getModel("decal").get("show")){var e=ht();t.eachSeries((function(t){if(t.useColorPaletteOnData){var n=e.get(t.type);n||(n={},e.set(t.type,n)),iV(t).scope=n}})),t.eachRawSeries((function(e){if(!t.isSeriesFiltered(e))if("function"!=typeof e.enableAriaDecal){var n=e.getData();if(e.useColorPaletteOnData){var i=e.getRawData(),r={},o=iV(e).scope;n.each((function(t){var e=n.getRawIndex(t);r[e]=t}));var a=i.count();i.each((function(t){var s=r[t],l=i.getName(t)||t+"",h=hp(e.ecModel,l,o,a),c=n.getItemVisual(s,"decal");n.setItemVisual(s,"decal",u(c,h))}))}else{var s=hp(e.ecModel,e.name,rV,t.getSeriesCount()),l=n.getVisual("decal");n.setVisual("decal",u(l,s))}}else e.enableAriaDecal();function u(t,e){var n=t?I(I({},e),t):e;return n.dirty=!0,n}}))}}(),function(){var i=t.getLocaleModel().get("aria"),o=n.getModel("label");if(o.option=T(o.option,i),!o.get("enabled"))return;var a=e.getZr().dom;if(o.get("description"))return void a.setAttribute("aria-label",o.get("description"));var s,l=t.getSeriesCount(),u=o.get(["data","maxCount"])||10,h=o.get(["series","maxCount"])||10,c=Math.min(l,h);if(l<1)return;var p=function(){var e=t.get("title");e&&e.length&&(e=e[0]);return e&&e.text}();if(p){var d=o.get(["general","withTitle"]);s=r(d,{title:p})}else s=o.get(["general","withoutTitle"]);var f=[],g=l>1?o.get(["series","multiple","prefix"]):o.get(["series","single","prefix"]);s+=r(g,{seriesCount:l}),t.eachSeries((function(e,n){if(n1?o.get(["series","multiple",a]):o.get(["series","single",a]),{seriesId:e.seriesIndex,seriesName:e.get("name"),seriesType:(_=e.subType,t.getLocaleModel().get(["series","typeNames"])[_]||"自定义图")});var s=e.getData();if(s.count()>u)i+=r(o.get(["data","partialData"]),{displayCnt:u});else i+=o.get(["data","allData"]);for(var h=[],p=0;p":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},lV=function(){function t(t){if(null==(this._condVal=H(t)?new RegExp(t):$(t)?t:null)){var e="";0,yr(e)}}return t.prototype.evaluate=function(t){var e=typeof t;return"string"===e?this._condVal.test(t):"number"===e&&this._condVal.test(t+"")},t}(),uV=function(){function t(){}return t.prototype.evaluate=function(){return this.value},t}(),hV=function(){function t(){}return t.prototype.evaluate=function(){for(var t=this.children,e=0;eli') + ,path = url.replace(/(^http(s*):)|(\?[\s\S]*$)/g, ''); + + tabs.each(function(index){ + var li = $(this) + ,layid = li.attr('lay-id'); + + if(layid === url){ + matchTo = true; + tabsPage.index = index; + } + }); + + // 获取一级菜单ID + var first_id = $(".first-nav .layui-nav .layui-nav-item.activate").attr("data-id"); + //如果是控制台的快捷方式点进来 那么应该使用 menus_id, 否则就是从菜单点击 使用一级菜单绑定的ID + //值得注意的是 menus_id是在页面固定写死的, 如果你改变了菜单id 也要注意修改才行, 不然找不到菜单哦 FZR + first_id = menus_id === undefined ? first_id : menus_id; + + text = text || '新标签页'; + + if(setter.pageTabs){ + //如果未在选项卡中匹配到,则追加选项卡 + if(!matchTo){ + //延迟修复 Firefox 空白问题 + setTimeout(function(){ + $(APP_BODY).append([ + '
                      ' + ,'' + ,'
                      ' + ].join('')); + }, 10); + + tabsPage.index = tabs.length; + element.tabAdd(FILTER_TAB_TBAS, { + title: ''+ text +'' + ,id: url + ,attr: path + }); + + } + } else { + var iframe = admin.tabsBody(admin.tabsPage.index).find('.layadmin-iframe'); + iframe[0].contentWindow.location.href = url; + } + + //定位当前tabs + element.tabChange(FILTER_TAB_TBAS, url); + admin.tabsBodyChange(tabsPage.index, { + url: url + ,text: text + }); + } + + ,APP_BODY = '#LAY_app_body', FILTER_TAB_TBAS = 'layadmin-layout-tabs' + ,$ = layui.$, $win = $(window); + + //初始 + if(admin.screen() < 2) admin.sideFlexible(); + + //将模块根路径设置为 controller 目录 + layui.config({ + base: setter.base + 'modules/' + }); + + //扩展 lib 目录下的其它模块 + layui.each(setter.extend, function(index, item){ + var mods = {}; + mods[item] = '{/}' + setter.base + 'lib/extend/' + item; + layui.extend(mods); + }); + + view().autoRender(); + + //加载公共模块 + layui.use('common'); + + //对外输出 + exports('index', { + openTabsPage: openTabsPage + }); +}); diff --git a/public/static/layui-admin/dist/layuiadmin/lib/index备份.js b/public/static/layui-admin/dist/layuiadmin/lib/index备份.js new file mode 100755 index 0000000..d23714b --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/lib/index备份.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.extend({setter:"config",admin:"lib/admin",view:"lib/view"}).define(["setter","admin"],function(a){var e=layui.setter,i=layui.element,n=layui.admin,t=n.tabsPage,d=layui.view,l=function(a,d){var l,u=r("#LAY_app_tabsheader>li"),b=a.replace(/(^http(s*):)|(\?[\s\S]*$)/g,"");if(u.each(function(e){var i=r(this),n=i.attr("lay-id");n===a&&(l=!0,t.index=e)}),d=d||"新标签页",e.pageTabs)l||(setTimeout(function(){r(s).append(['
                      ','',"
                      "].join(""))},10),t.index=u.length,i.tabAdd(o,{title:""+d+"",id:a,attr:b}));else{var y=n.tabsBody(n.tabsPage.index).find(".layadmin-iframe");y[0].contentWindow.location.href=a}i.tabChange(o,a),n.tabsBodyChange(t.index,{url:a,text:d})},s="#LAY_app_body",o="layadmin-layout-tabs",r=layui.$;r(window);n.screen()<2&&n.sideFlexible(),layui.config({base:e.base+"modules/"}),layui.each(e.extend,function(a,i){var n={};n[i]="{/}"+e.base+"lib/extend/"+i,layui.extend(n)}),d().autoRender(),layui.use("common"),a("index",{openTabsPage:l})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/lib/view.js b/public/static/layui-admin/dist/layuiadmin/lib/view.js new file mode 100755 index 0000000..88cbb9b --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/lib/view.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(["laytpl","layer"],function(e){var t=layui.jquery,a=layui.laytpl,n=layui.layer,r=layui.setter,o=(layui.device(),layui.hint()),i=function(e){return new d(e)},s="LAY_app_body",d=function(e){this.id=e,this.container=t("#"+(e||s))};i.loading=function(e){e.append(this.elemLoad=t(''))},i.removeLoad=function(){this.elemLoad&&this.elemLoad.remove()},i.exit=function(e){layui.data(r.tableName,{key:r.request.tokenName,remove:!0}),e&&e()},i.req=function(e){var a=e.success,n=e.error,o=r.request,s=r.response,d=function(){return r.debug?"
                      URL:"+e.url:""};if(e.data=e.data||{},e.headers=e.headers||{},o.tokenName){var l="string"==typeof e.data?JSON.parse(e.data):e.data;e.data[o.tokenName]=o.tokenName in l?e.data[o.tokenName]:layui.data(r.tableName)[o.tokenName]||"",e.headers[o.tokenName]=o.tokenName in e.headers?e.headers[o.tokenName]:layui.data(r.tableName)[o.tokenName]||""}return delete e.success,delete e.error,t.ajax(t.extend({type:"get",dataType:"json",success:function(t){var n=s.statusCode;if(t[s.statusName]==n.ok)"function"==typeof e.done&&e.done(t);else if(t[s.statusName]==n.logout)i.exit();else{var r=["Error: "+(t[s.msgName]||"返回状态码异常"),d()].join("");i.error(r)}"function"==typeof a&&a(t)},error:function(e,t){var a=["请求异常,请重试
                      错误信息:"+t,d()].join("");i.error(a),"function"==typeof n&&n(res)}},e))},i.popup=function(e){var a=e.success,r=e.skin;return delete e.success,delete e.skin,n.open(t.extend({type:1,title:"提示",content:"",id:"LAY-system-view-popup",skin:"layui-layer-admin"+(r?" "+r:""),shadeClose:!0,closeBtn:!1,success:function(e,r){var o=t('ဆ');e.append(o),o.on("click",function(){n.close(r)}),"function"==typeof a&&a.apply(this,arguments)}},e))},i.error=function(e,a){return i.popup(t.extend({content:e,maxWidth:300,offset:"t",anim:6,id:"LAY_adminError"},a))},d.prototype.render=function(e,a){var n=this;layui.router();return e=r.views+e+r.engine,t("#"+s).children(".layadmin-loading").remove(),i.loading(n.container),t.ajax({url:e,type:"get",dataType:"html",data:{v:layui.cache.version},success:function(e){e="
                      "+e+"
                      ";var r=t(e).find("title"),o=r.text()||(e.match(/\([\s\S]*)\<\/title>/)||[])[1],s={title:o,body:e};r.remove(),n.params=a||{},n.then&&(n.then(s),delete n.then),n.parse(e),i.removeLoad(),n.done&&(n.done(s),delete n.done)},error:function(e){return i.removeLoad(),n.render.isError?i.error("请求视图文件异常,状态:"+e.status):(404===e.status?n.render("template/tips/404"):n.render("template/tips/error"),void(n.render.isError=!0))}}),n},d.prototype.parse=function(e,n,r){var s=this,d="object"==typeof e,l=d?e:t(e),u=d?e:l.find("*[template]"),c=function(e){var n=a(e.dataElem.html()),o=t.extend({params:p.params},e.res);e.dataElem.after(n.render(o)),"function"==typeof r&&r();try{e.done&&new Function("d",e.done)(o)}catch(i){console.error(e.dataElem[0],"\n存在错误回调脚本\n\n",i)}},p=layui.router();l.find("title").remove(),s.container[n?"after":"html"](l.children()),p.params=s.params||{};for(var y=u.length;y>0;y--)!function(){var e=u.eq(y-1),t=e.attr("lay-done")||e.attr("lay-then"),n=a(e.attr("lay-url")||"").render(p),r=a(e.attr("lay-data")||"").render(p),s=a(e.attr("lay-headers")||"").render(p);try{r=new Function("return "+r+";")()}catch(d){o.error("lay-data: "+d.message),r={}}try{s=new Function("return "+s+";")()}catch(d){o.error("lay-headers: "+d.message),s=s||{}}n?i.req({type:e.attr("lay-type")||"get",url:n,data:r,dataType:"json",headers:s,success:function(a){c({dataElem:e,res:a,done:t})}}):c({dataElem:e,done:t})}();return s},d.prototype.autoRender=function(e,a){var n=this;t(e||"body").find("*[template]").each(function(e,a){var r=t(this);n.container=r,n.parse(r,"refresh")})},d.prototype.send=function(e,t){var n=a(e||this.container.html()).render(t||{});return this.container.html(n),this},d.prototype.refresh=function(e){var t=this,a=t.container.next(),n=a.attr("lay-templateid");return t.id!=n?t:(t.parse(t.container,"refresh",function(){t.container.siblings('[lay-templateid="'+t.id+'"]:last').remove(),"function"==typeof e&&e()}),t)},d.prototype.then=function(e){return this.then=e,this},d.prototype.done=function(e){return this.done=e,this},e("view",i)}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/common.js b/public/static/layui-admin/dist/layuiadmin/modules/common.js new file mode 100755 index 0000000..e605257 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/common.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(function(e){var i=(layui.$,layui.layer,layui.laytpl,layui.setter,layui.view,layui.admin);i.events.logout=function(){i.req({url:layui.setter.base+"json/user/logout.js",type:"get",data:{},done:function(e){i.exit(function(){location.href="user/login.html"})}})},e("common",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/console.js b/public/static/layui-admin/dist/layuiadmin/modules/console.js new file mode 100755 index 0000000..abcee18 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/console.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(function(e){layui.use(["admin","carousel"],function(){var e=layui.$,t=(layui.admin,layui.carousel),a=layui.element,i=layui.device();e(".layadmin-carousel").each(function(){var a=e(this);t.render({elem:this,width:"100%",arrow:"none",interval:a.data("interval"),autoplay:a.data("autoplay")===!0,trigger:i.ios||i.android?"click":"hover",anim:a.data("anim")})}),a.render("progress")}),layui.use(["admin","carousel","echarts"],function(){var e=layui.$,t=layui.admin,a=layui.carousel,i=layui.echarts,l=[],n=[{title:{text:"今日流量趋势",x:"center",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{data:["",""]},xAxis:[{type:"category",boundaryGap:!1,data:["06:00","06:30","07:00","07:30","08:00","08:30","09:00","09:30","10:00","11:30","12:00","12:30","13:00","13:30","14:00","14:30","15:00","15:30","16:00","16:30","17:00","17:30","18:00","18:30","19:00","19:30","20:00","20:30","21:00","21:30","22:00","22:30","23:00","23:30"]}],yAxis:[{type:"value"}],series:[{name:"PV",type:"line",smooth:!0,itemStyle:{normal:{areaStyle:{type:"default"}}},data:[111,222,333,444,555,666,3333,33333,55555,66666,33333,3333,6666,11888,26666,38888,56666,42222,39999,28888,17777,9666,6555,5555,3333,2222,3111,6999,5888,2777,1666,999,888,777]},{name:"UV",type:"line",smooth:!0,itemStyle:{normal:{areaStyle:{type:"default"}}},data:[11,22,33,44,55,66,333,3333,5555,12666,3333,333,666,1188,2666,3888,6666,4222,3999,2888,1777,966,655,555,333,222,311,699,588,277,166,99,88,77]}]},{title:{text:"访客浏览器分布",x:"center",textStyle:{fontSize:14}},tooltip:{trigger:"item",formatter:"{a}
                      {b} : {c} ({d}%)"},legend:{orient:"vertical",x:"left",data:["Chrome","Firefox","IE 8.0","Safari","其它浏览器"]},series:[{name:"访问来源",type:"pie",radius:"55%",center:["50%","50%"],data:[{value:9052,name:"Chrome"},{value:1610,name:"Firefox"},{value:3200,name:"IE 8.0"},{value:535,name:"Safari"},{value:1700,name:"其它浏览器"}]}]},{title:{text:"最近一周新增的用户量",x:"center",textStyle:{fontSize:14}},tooltip:{trigger:"axis",formatter:"{b}
                      新增用户:{c}"},xAxis:[{type:"category",data:["11-07","11-08","11-09","11-10","11-11","11-12","11-13"]}],yAxis:[{type:"value"}],series:[{type:"line",data:[200,300,400,610,150,270,380]}]}],r=e("#LAY-index-dataview").children("div"),o=function(e){l[e]=i.init(r[e],layui.echartsTheme),l[e].setOption(n[e]),t.resize(function(){l[e].resize()})};if(r[0]){o(0);var d=0;a.on("change(LAY-index-dataview)",function(e){o(d=e.index)}),layui.admin.on("side",function(){setTimeout(function(){o(d)},300)}),layui.admin.on("hash(tab)",function(){layui.router().path.join("")||o(d)})}}),layui.use("table",function(){var e=(layui.$,layui.table);e.render({elem:"#LAY-index-topSearch",url:layui.setter.base+"json/console/top-search.js",page:!0,cols:[[{type:"numbers",fixed:"left"},{field:"keywords",title:"关键词",minWidth:300,templet:''},{field:"frequency",title:"搜索次数",minWidth:120,sort:!0},{field:"userNums",title:"用户数",sort:!0}]],skin:"line"}),e.render({elem:"#LAY-index-topCard",url:layui.setter.base+"json/console/top-card.js",page:!0,cellMinWidth:120,cols:[[{type:"numbers",fixed:"left"},{field:"title",title:"标题",minWidth:300,templet:''},{field:"username",title:"发帖者"},{field:"channel",title:"类别"},{field:"crt",title:"点击率",sort:!0}]],skin:"line"})}),e("console",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/contlist.js b/public/static/layui-admin/dist/layuiadmin/modules/contlist.js new file mode 100755 index 0000000..e845ab8 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/contlist.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(["table","form"],function(t){var e=layui.$,i=layui.table,n=layui.form;i.render({elem:"#LAY-app-content-list",url:layui.setter.base+"json/content/list.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"文章ID",sort:!0},{field:"label",title:"文章标签",minWidth:100},{field:"title",title:"文章标题"},{field:"author",title:"作者"},{field:"uploadtime",title:"上传时间",sort:!0},{field:"status",title:"发布状态",templet:"#buttonTpl",minWidth:80,align:"center"},{title:"操作",minWidth:150,align:"center",fixed:"right",toolbar:"#table-content-list"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-content-list)",function(t){var e=t.data;"del"===t.event?layer.confirm("确定删除此文章?",function(e){t.del(),layer.close(e)}):"edit"===t.event&&layer.open({type:2,title:"编辑文章",content:"../../../views/app/content/listform.html?id="+e.id,maxmin:!0,area:["550px","550px"],btn:["确定","取消"],yes:function(e,i){var l=window["layui-layer-iframe"+e],a=i.find("iframe").contents().find("#layuiadmin-app-form-edit");l.layui.form.on("submit(layuiadmin-app-form-edit)",function(i){var l=i.field;t.update({label:l.label,title:l.title,author:l.author,status:l.status}),n.render(),layer.close(e)}),a.trigger("click")}})}),i.render({elem:"#LAY-app-content-tags",url:layui.setter.base+"json/content/tags.js",cols:[[{type:"numbers",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"tags",title:"分类名",minWidth:100},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#layuiadmin-app-cont-tagsbar"}]],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-content-tags)",function(t){var i=t.data;if("del"===t.event)layer.confirm("确定删除此分类?",function(e){t.del(),layer.close(e)});else if("edit"===t.event){e(t.tr);layer.open({type:2,title:"编辑分类",content:"../../../views/app/content/tagsform.html?id="+i.id,area:["450px","200px"],btn:["确定","取消"],yes:function(e,i){var n=i.find("iframe").contents().find("#layuiadmin-app-form-tags"),l=n.find('input[name="tags"]').val();l.replace(/\s/g,"")&&(t.update({tags:l}),layer.close(e))},success:function(t,e){var n=t.find("iframe").contents().find("#layuiadmin-app-form-tags").click();n.find('input[name="tags"]').val(i.tags)}})}}),i.render({elem:"#LAY-app-content-comm",url:layui.setter.base+"json/content/comment.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"reviewers",title:"评论者",minWidth:100},{field:"content",title:"评论内容",minWidth:100},{field:"commtime",title:"评论时间",minWidth:100,sort:!0},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-content-com"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-content-comm)",function(t){t.data;"del"===t.event?layer.confirm("确定删除此条评论?",function(e){t.del(),layer.close(e)}):"edit"===t.event&&layer.open({type:2,title:"编辑评论",content:"../../../views/app/content/contform.html",area:["450px","300px"],btn:["确定","取消"],yes:function(t,e){var n=window["layui-layer-iframe"+t],l="layuiadmin-app-comm-submit",a=e.find("iframe").contents().find("#"+l);n.layui.form.on("submit("+l+")",function(e){e.field;i.reload("LAY-app-content-comm"),layer.close(t)}),a.trigger("click")},success:function(t,e){}})}),t("contlist",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/forum.js b/public/static/layui-admin/dist/layuiadmin/modules/forum.js new file mode 100755 index 0000000..a9965b1 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/forum.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(["table","form"],function(e){var t=layui.$,i=layui.table;layui.form;i.render({elem:"#LAY-app-forum-list",url:layui.setter.base+"json/forum/list.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"poster",title:"发帖人"},{field:"avatar",title:"头像",width:100,templet:"#imgTpl"},{field:"content",title:"发帖内容"},{field:"posttime",title:"发帖时间",sort:!0},{field:"top",title:"置顶",templet:"#buttonTpl",minWidth:80,align:"center"},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-forum-list"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-forum-list)",function(e){e.data;if("del"===e.event)layer.confirm("确定删除此条帖子?",function(t){e.del(),layer.close(t)});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑帖子",content:"../../../views/app/forum/listform.html",area:["550px","400px"],btn:["确定","取消"],resize:!1,yes:function(e,t){var l=window["layui-layer-iframe"+e],r="LAY-app-forum-submit",o=t.find("iframe").contents().find("#"+r);l.layui.form.on("submit("+r+")",function(t){t.field;i.reload("LAY-app-forum-list"),layer.close(e)}),o.trigger("click")},success:function(e,t){}})}}),i.render({elem:"#LAY-app-forumreply-list",url:layui.setter.base+"json/forum/replys.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"replyer",title:"回帖人"},{field:"cardid",title:"回帖ID",sort:!0},{field:"avatar",title:"头像",width:100,templet:"#imgTpl"},{field:"content",title:"回帖内容",width:200},{field:"replytime",title:"回帖时间",sort:!0},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-forum-replys"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!"}),i.on("tool(LAY-app-forumreply-list)",function(e){e.data;if("del"===e.event)layer.confirm("确定删除此条评论?",function(t){e.del(),layer.close(t)});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑评论",content:"../../../views/app/forum/replysform.html",area:["550px","350px"],btn:["确定","取消"],resize:!1,yes:function(t,i){var l=i.find("iframe").contents().find("#layuiadmin-form-replys"),r=l.find('textarea[name="content"]').val();e.update({content:r}),layer.close(t)},success:function(e,t){}})}}),e("forum",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/im.js b/public/static/layui-admin/dist/layuiadmin/modules/im.js new file mode 100755 index 0000000..d082352 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/im.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(["index","layim"],function(e){var a=layui.$,t=(layui.admin,layui.element,layui.router(),layui.layim),n=["您好,我现在有事不在,一会再和您联系。","你没发错吧?face[微笑] ","洗澡中,请勿打扰,偷窥请购票,个体四十,团体八折,订票电话:一般人我不告诉他!face[哈哈] ","你好,我是主人的美女秘书,有什么事就跟我说吧,等他回来我会转告他的。face[心] face[心] face[心] ","face[威武] face[威武] face[威武] face[威武] ","<(@ ̄︶ ̄@)>","你要和我说话?你真的要和我说话?你确定自己想说吗?你一定非说不可吗?那你说吧,这是自动回复。","face[黑线] 你慢慢说,别急……","(*^__^*) face[嘻嘻] ,是贤心吗?"];t.config({init:{url:layui.setter.base+"json/layim/getList.js",data:{}},members:{url:layui.setter.base+"json/layim/getMembers.js",data:{}},uploadImage:{url:"",type:""},uploadFile:{url:"",type:""},isAudio:!0,isVideo:!0,tool:[{alias:"code",title:"代码",icon:""}],initSkin:"3.jpg",msgbox:"/layim/demo/msgbox.html",find:"/layim/demo/find.html",chatLog:"/layim/demo/chatlog.html"}),t.on("online",function(e){layer.msg(e)}),t.on("sign",function(e){layer.msg(e)}),t.on("tool(code)",function(e){layer.prompt({title:"插入代码 - 工具栏扩展示例",formType:2,shade:0},function(a,t){layer.close(t),e("[pre class=layui-code]"+a+"[/pre]")})}),t.on("ready",function(e){t.msgbox(5)}),t.on("sendMessage",function(e){var a=e.to;"friend"===a.type&&t.setChatStatus('对方正在输入。。。'),setTimeout(function(){var e={};"group"===a.type?e={username:"模拟群员"+(100*Math.random()|0),avatar:layui.cache.dir+"images/face/"+(72*Math.random()|0)+".gif",id:a.id,type:a.type,content:n[9*Math.random()|0]}:(e={username:a.name,avatar:a.avatar,id:a.id,type:a.type,content:n[9*Math.random()|0]},t.setChatStatus('在线')),t.getMessage(e)},1e3)}),t.on("members",function(e){}),t.on("chatChange",function(e){var a=e.data.type;console.log(e.data.id),"friend"===a||"group"===a&&t.getMessage({system:!0,id:e.data.id,type:"group",content:"模拟群员"+(100*Math.random()|0)+"加入群聊"})});var a=layui.jquery,i={chat:function(){t.chat({name:"小闲",type:"friend",avatar:"//tva3.sinaimg.cn/crop.0.0.180.180.180/7f5f6861jw1e8qgp5bmzyj2050050aa8.jpg",id:1008612}),layer.msg("也就是说,此人可以不在好友面板里")},message:function(){t.getMessage({username:"贤心",avatar:"//tp1.sinaimg.cn/1571889140/180/40030060651/1",id:"100001",type:"friend",content:"嗨,你好!欢迎体验LayIM。演示标记:"+(new Date).getTime(),timestamp:(new Date).getTime()})},messageAudio:function(){t.getMessage({username:"林心如",avatar:"//tp3.sinaimg.cn/1223762662/180/5741707953/0",id:"76543",type:"friend",content:"audio[http://gddx.sc.chinaz.com/Files/DownLoad/sound1/201510/6473.mp3]",timestamp:(new Date).getTime()})},messageVideo:function(){t.getMessage({username:"林心如",avatar:"//tp3.sinaimg.cn/1223762662/180/5741707953/0",id:"76543",type:"friend",content:"video[http://www.w3school.com.cn//i/movie.ogg]",timestamp:(new Date).getTime()})},messageTemp:function(){t.getMessage({username:"小酱",avatar:"//tva1.sinaimg.cn/crop.7.0.736.736.50/bd986d61jw8f5x8bqtp00j20ku0kgabx.jpg",id:"198909151014",type:"friend",content:"临时:"+(new Date).getTime()})},add:function(){t.add({type:"friend",username:"麻花疼",avatar:"//tva1.sinaimg.cn/crop.0.0.720.720.180/005JKVuPjw8ers4osyzhaj30k00k075e.jpg",submit:function(e,a,t){layer.msg("好友申请已发送,请等待对方确认",{icon:1,shade:.5},function(){layer.close(t)})}})},addqun:function(){t.add({type:"group",username:"LayIM会员群",avatar:"//tva2.sinaimg.cn/crop.0.0.180.180.50/6ddfa27bjw1e8qgp5bmzyj2050050aa8.jpg",submit:function(e,a,t){layer.msg("申请已发送,请等待管理员确认",{icon:1,shade:.5},function(){layer.close(t)})}})},addFriend:function(){var e={type:"friend",id:1234560,username:"李彦宏",avatar:"//tva4.sinaimg.cn/crop.0.0.996.996.180/8b2b4e23jw8f14vkwwrmjj20ro0rpjsq.jpg",sign:"全球最大的中文搜索引擎"};t.setFriendGroup({type:e.type,username:e.username,avatar:e.avatar,group:t.cache().friend,submit:function(a,n){t.addList({type:e.type,username:e.username,avatar:e.avatar,groupid:a,id:e.id,sign:e.sign}),layer.close(n)}})},addGroup:function(){layer.msg("已成功把[Angular开发]添加到群组里",{icon:1}),t.addList({type:"group",avatar:"//tva3.sinaimg.cn/crop.64.106.361.361.50/7181dbb3jw8evfbtem8edj20ci0dpq3a.jpg",groupname:"Angular开发",id:"12333333",members:0})},removeFriend:function(){layer.msg("已成功删除[凤姐]",{icon:1}),t.removeList({id:121286,type:"friend"})},removeGroup:function(){layer.msg("已成功删除[前端群]",{icon:1}),t.removeList({id:101,type:"group"})},setGray:function(){t.setFriendStatus(168168,"offline"),layer.msg("已成功将好友[马小云]置灰",{icon:1})},unGray:function(){t.setFriendStatus(168168,"online"),layer.msg("成功取消好友[马小云]置灰状态",{icon:1})},kefu1:function(){t.chat({name:"在线客服一",type:"kefu",avatar:"//tp1.sinaimg.cn/5619439268/180/40030060651/1",id:1111111})},kefu2:function(){t.chat({name:"在线客服二",type:"kefu",avatar:"//tp1.sinaimg.cn/5619439268/180/40030060651/1",id:2222222})},mobile:function(){var e=layui.device(),a="/layim/demo/mobile.html";if(e.android||e.ios)return location.href=a;var t=layer.open({type:2,title:"移动版演示 (或手机扫右侧二维码预览)",content:a,area:["375px","667px"],shadeClose:!0,shade:.8,end:function(){layer.close(t+2)}});layer.photos({photos:{data:[{src:"http://cdn.layui.com/upload/2016_12/168_1481056358469_50288.png"}]},anim:0,shade:!1,success:function(e){e.css("margin-left","350px")}})}};a(".LAY-senior-im-chat-demo .layui-btn").on("click",function(){var e=a(this).data("type");i[e]?i[e].call(this):""}),e("im",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/like-select-input.js b/public/static/layui-admin/dist/layuiadmin/modules/like-select-input.js new file mode 100755 index 0000000..20f4739 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/like-select-input.js @@ -0,0 +1,46 @@ +var set_select = null; +layui.define(["jquery", "form"], function (exports) { + var $ = layui.$; + var ojb = { + init: function () { + $(document).on('input click','.input-select' ,function () { + var url = $(this).attr('data-url'); + let that = $(this); + clearTimeout(set_select); + set_select = setTimeout(function () { + $.get(url + '?keyword=' + $(that).val(), function (res) { + var data = res.data; + if (data.length == 0) { + that.next().hide(); + return; + } + var dd_exist = (that.parent().find('dl')).length == 0 ? false : true; + var html = dd_exist ? '' : '
                      '; + for (var i in data) { + html += '
                      ' + data[i] + '
                      '; + } + html += dd_exist ? '' :'
                      '; + if(dd_exist){ + that.parent().find('dl').html(html); + }else{ + that.after(html); + } + that.next().show(); + }); + }, 300); + }); + $(document).on('blur','.input-select', function () { + let that = this + setTimeout(function () { + $(that).next().hide() + }, 200) + }); + $(document).on('click', '.select-option dd', function () { + $(this).parents().prev().val($(this).text()); + $(this).parent().remove(); + }); + } + }; + ojb.init(); + exports("like-select-input", ojb); +}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/like.js b/public/static/layui-admin/dist/layuiadmin/modules/like.js new file mode 100755 index 0000000..9f4e671 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/like.js @@ -0,0 +1,218 @@ +var lock = {}; +var load = {}; +layui.define(["jquery", "form", "upload"], function (exports) { + $ = layui.$; + upload = layui.upload; + var ojb = { + ajax: function (json) { + var load_index = null; + if (json.beforeSend === undefined) { + if (lock[json.url.replace("/", "_")] !== undefined) { + return + } + lock[json.url.replace("/", "_")] = true; + json.beforeSend = function () { + load[json.url.replace("/", "_")] = setTimeout(function () { + load_index = layer.load(1, {shade: [0.1, "#fff"]}) + }, 1500) + } + } + if (json.error === undefined) { + json.error = function (res) { + layer.msg("网络错误", {offset: "240px", icon: 2, time: 1500}, function () { + return + }) + } + } + if (json.timeout === undefined) { + json.timeout = 30000 + } + if (json.type === undefined) { + json.type = "get" + } + json.complete = function (xhr, status) { + delete lock[json.url.replace("/", "_")]; + if (status == "timeout") { + layer.msg("请求超时,请重试", {offset: "240px", icon: 2, time: 1500}, function () { + if (load_index !== undefined) { + layer.close(load_index) + } + return + }); + return + } + clearTimeout(load[json.url.replace("/", "_")]); + if (load_index !== undefined) { + layer.close(load_index) + } + res = xhr.responseJSON; + if (res !== undefined && res.code == -1) { + window.location.href = window.location.href + } + if (res !== undefined && res.code == 0 && res.show == 1) { + layer.msg(res.msg, {offset: "240px", icon: 2, time: 1500}, function () { + return; + }) + } + }; + $.ajax(json) + }, imageUpload: function (element, upload_call_back,css, area, title) { + var area = (area === undefined) ? ["90%", "90%"] : area; + var title = (title === undefined) ? "上传图片" : title; + var css = css === undefined ? false : css; + var click_element = element; + if(css === true){ + $(element).addClass('upload-image-div'); + $(element).html('
                      + 添加图片'); + click_element = element+ ' .upload-image-a'; + } + $(document).on("click", click_element, function () { + var click_element = $(this); + if(css === true){ + click_element = click_element.parent(); + } + var windows = layer.open({type: 2, title: title, content: image_upload_url, area: area}); + window.callback = function (uri) { + upload_call_back(uri, click_element); + return uri + }; + window.callbackSetUri = function (uri) { + upload_call_back(uri, click_element); + layer.close(windows); + return uri + } + }) + }, showImg: function (url, xp) { + function getImageWidth(url, callback) { + var img = new Image(); + img.src = url; + if (img.complete) { + callback(img.width, img.height) + } else { + img.onload = function () { + callback(img.width, img.height) + } + } + } + xp === undefined ? 500 : xp; + getImageWidth(url, function (width, height) { + if (height > xp) { + var ratio = width / height; + height = xp; + width = height * ratio + } + if (width > xp) { + var ratio = height / width; + width = xp; + height = width * ratio + } + layer.closeAll(); + layer.open({ + type: 1, + closeBtn: 1, + shade: false, + title: false, + shadeClose: false, + area: ["auth", "auth"], + content: '' + }) + }) + }, + // 从URL中取出文件名(除去http网址, 根据存储对象) + getUrlFileName: function(url, domain) { + return url.replace(domain, ''); + // var data = url.split('/'); + // return data[data.length - 3] + '/' + data[data.length - 2] + '/' + data[data.length - 1]; + }, + videoUpload: function (element,url) { + $(element).addClass('upload-video-div'); + $(element).html(' + 添加视频'); + upload.render({ //允许上传的文件后缀 + elem: element + ,url: url //改成您自己的上传接口 + ,accept: 'file' //普通文件 + ,exts: 'mp3|mp4|AVI|mov|rmvb|rm|FLV|3GP|wav' + ,done: function(res){ + if (res.code === 1){ + var video = '
                      ' + + ' ' + +'x' + + '' + '
                      '; + + $(element).after(video); + $(element).hide(); + layer.msg('上传成功'); + } else { + layer.msg(res.msg); + } + } + }); + } + ,certUpload:function (element, url, domain) { + upload.render({ + elem: element + ,url: url + ,accept:'file' + ,exts:'pem|txt|doc' + ,done: function(res, index, upload) { + var html = '
                      \n' + + '' + + '' + + '
                      '; + $(element).prev().val(res.data.uri.replace(domain, '')); + $(element).after(html); + $(element).css('display','none'); + } + }); + }, + videoCallback: function(uris) { + var html = '
                        '; + for(let uri of uris) { + html += '
                      • '; + html += ''; + html += ''; + html += 'x'; + html += '
                      • '; + } + + html += '
                      '; + var videoParent = $('#video').parent(); + $('#video')[0].remove(); + videoParent.append(html); + + $('#video-container video').click(function() { + var video = $(this); + var uri = video.attr('src'); + layer.open({ + type: 2, + title: '查看视频', + content: '/admin/file_new/showVideo?uri='+uri, + area: ['90%', '90%'] + }); + }); + + // 删除视频按钮 + $('.video-del').click(function() { + $(this).parent().remove(); + var items = $('.video-item'); + if(items.length == 0) { + $('.upload-file-div').css('display', 'block'); + // 视频上传 + $('#video').click(function(){ + layer.open({ + type: 2, + title: '上传视频', + content: '/admin/file_new/lists?type=video', + area: ['90%', '90%'] + }); + }); + } + }); + } + }; + exports("like", ojb) +}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/like_area.js b/public/static/layui-admin/dist/layuiadmin/modules/like_area.js new file mode 100755 index 0000000..7b79ae6 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/like_area.js @@ -0,0 +1,43 @@ + +layui.define(["jquery", "form"], function (exports) { + var $ = layui.$; + var form = layui.form; + var ojb = { + init: function (province_lay_filte,city_lay_filte,district_lay_filte,province_name,city_name,district_name,province_id,city_id,district_id) { + function areaSelect(data, element) { + var html = ''; + for (var i in data) { + html += ""; + } + $(element).html(html); + form.render('select'); + return data[0]['id'] === undefined ? 0 : data[0]['id']; + } + var first_id = areaSelect(getAllProvince(), $("[name='"+province_name+"']")); + if(province_id !== undefined){ + $("[name='"+province_name+"']").val(province_id); + form.render('select'); + first_id= province_id; + } + first_id = areaSelect(getAreaChildren(first_id), $("[name='"+city_name+"']")); + if(city_id !== undefined){ + $("[name='"+city_name+"']").val(city_id); + form.render('select'); + first_id= city_id; + } + areaSelect(getAreaChildren(first_id), $("[name='"+district_name+"']")); + if(district_id !== undefined){ + $("[name='"+district_name+"']").val(district_id); + form.render('select'); + } + form.on('select('+province_lay_filte+')', function (data) { + var first_id = areaSelect(getAreaChildren(data['value']), $("[name='"+city_name+"']")); + areaSelect(getAreaChildren(first_id), $("[name='"+district_name+"']")); + }); + form.on('select('+city_lay_filte+')', function (data) { + areaSelect(getAreaChildren(data['value']), $("[name='"+district_name+"']")); + }); + } + }; + exports("like_area", ojb); +}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/likeedit.js b/public/static/layui-admin/dist/layuiadmin/modules/likeedit.js new file mode 100755 index 0000000..4d873b6 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/likeedit.js @@ -0,0 +1,276 @@ +layui.define(["layer", "form", "layedit"], function (t) { + var e = layui.$, i = layui.layer, a = layui.form, l = (layui.hint(), layui.device()), n = "layedit", + o = "layui-show", r = "layui-disabled", layedit=layui.layedit, c = function () { + var t = this; + t.index = 0, t.config = { + tool: ["strong", "italic", "underline", "del", "|", "left", "center", "right", "|", "link", "unlink", "face", "image"], + hideTool: [], + height: 500 + } + }; + c.prototype.set = function (t) { + var i = this; + return e.extend(!0, i.config, t), i + }, c.prototype.on = function (t, e) { + return layui.onevent(n, t, e) + }, c.prototype.build = function (t, i) { + i = i || {}; + var a = this, n = a.config, r = "layui-layedit", c = e("string" == typeof t ? "#" + t : t), + u = "LAY_layedit_" + ++a.index, d = c.next("." + r), y = e.extend({}, n, i), f = function () { + var t = [], e = {}; + return layui.each(y.hideTool, function (t, i) { + e[i] = !0 + }), layui.each(y.tool, function (i, a) { + C[a] && !e[a] && t.push(C[a]) + }), t.join("") + }(), + m = e(['
                      ', '
                      ' + f + "
                      ", '
                      ', '', "
                      ", "
                      "].join("")); + return l.ie && l.ie < 8 ? c.removeClass("layui-hide").addClass(o) : (d[0] && d.remove(), s.call(a, m, c[0], y), c.addClass("layui-hide").after(m), a.index) + }, c.prototype.getContent = function (t) { + var e = u(t); + if (e[0]) { + return d(e[0].document.body.innerHTML) + } + }, c.prototype.getText = function (t) { + var i = u(t); + if (i[0]) { + return e(i[0].document.body).text() + } + }, c.prototype.setContent = function (t, i, a) { + var l = u(t); + l[0] && (a ? e(l[0].document.body).append(i) : e(l[0].document.body).html(i), layedit.sync(t)) + }, c.prototype.sync = function (t) { + var i = u(t); + if (i[0]) { + var a = e("#" + i[1].attr("textarea")); + a.val(d(i[0].document.body.innerHTML)) + } + }, c.prototype.getSelection = function (t) { + var e = u(t); + if (e[0]) { + var i = m(e[0].document); + return document.selection ? i.text : i.toString() + } + }; + var s = function (t, i, a) { + var l = this, n = t.find("iframe"); + n.css({height: a.height}).on("load", function () { + var o = n.contents(), r = n.prop("contentWindow"), c = o.find("head"), + s = e([""].join("")), + u = o.find("body"); + c.append(s), u.attr("contenteditable", "true").css({"min-height": a.height}).html(i.value || ""), y.apply(l, [r, n, i, a]), g.call(l, r, t, a) + }) + }, u = function (t) { + var i = e("#LAY_layedit_" + t), a = i.prop("contentWindow"); + return [a, i] + }, d = function (t) { + return 8 == l.ie && (t = t.replace(/<.+>/g, function (t) { + return t.toLowerCase() + })), t + }, y = function (t, a, n, o) { + var r = t.document, c = e(r.body); + c.on("keydown", function (t) { + var e = t.keyCode; + if (13 === e) { + var a = m(r), l = p(a), n = l.parentNode; + if ("pre" === n.tagName.toLowerCase()) { + if (t.shiftKey) { + return + } + return i.msg("请暂时用shift+enter"), !1 + } + r.execCommand("formatBlock", !1, "

                      ") + } + }), e(n).parents("form").on("submit", function () { + var t = c.html(); + 8 == l.ie && (t = t.replace(/<.+>/g, function (t) { + return t.toLowerCase() + })), n.value = t + }), c.on("paste", function (e) { + r.execCommand("formatBlock", !1, "

                      "), setTimeout(function () { + f.call(t, c), n.value = c.html() + }, 100) + }) + }, f = function (t) { + var i = this; + i.document; + t.find("*[style]").each(function () { + var t = this.style.textAlign; + this.removeAttribute("style"), e(this).css({"text-align": t || ""}) + }), t.find("table").addClass("layui-table"), t.find("script,link").remove() + }, m = function (t) { + return t.selection ? t.selection.createRange() : t.getSelection().getRangeAt(0) + }, p = function (t) { + return t.endContainer || t.parentElement().childNodes[0] + }, v = function (t, i, a) { + var l = this.document, n = document.createElement(t); + for (var o in i) { + n.setAttribute(o, i[o]) + } + if (n.removeAttribute("text"), l.selection) { + var r = a.text || i.text; + if ("a" === t && !r) { + return + } + r && (n.innerHTML = r), a.pasteHTML(e(n).prop("outerHTML")), a.select() + } else { + var r = a.toString() || i.text; + if ("a" === t && !r) { + return + } + // r && (n.innerHTML = r), a.deleteContents(), a.insertNode(n) //这句是原来的代码, 会删除节点 + r && (n.innerHTML = r), a.insertNode(n) + } + }, h = function (t, i) { + var a = this.document, l = "layedit-tool-active", n = p(m(a)), o = function (e) { + return t.find(".layedit-tool-" + e) + }; + i && i[i.hasClass(l) ? "removeClass" : "addClass"](l), t.find(">i").removeClass(l), o("unlink").addClass(r), e(n).parents().each(function () { + var t = this.tagName.toLowerCase(), e = this.style.textAlign; + "b" !== t && "strong" !== t || o("b").addClass(l), "i" !== t && "em" !== t || o("i").addClass(l), "u" === t && o("u").addClass(l), "strike" === t && o("d").addClass(l), "p" === t && ("center" === e ? o("center").addClass(l) : "right" === e ? o("right").addClass(l) : o("left").addClass(l)), "a" === t && (o("link").addClass(l), o("unlink").removeClass(r)) + }) + }, g = function (t, a, l) { + var n = t.document, o = e(n.body), c = { + link: function (i) { + var a = p(i), l = e(a).parent(); + b.call(o, {href: l.attr("href"), target: l.attr("target")}, function (e) { + var a = l[0]; + "A" === a.tagName ? a.href = e.url : v.call(t, "a", {target: e.target, href: e.url, text: e.url}, i) + }) + }, unlink: function (t) { + n.execCommand("unlink") + }, face: function (e) { + x.call(this, function (i) { + v.call(t, "img", {src: i.src, alt: i.alt}, e) + }) + }, image: function (a) { + var n = this; + var windows = layer.open({type: 2, title: "上传图片", content: image_upload_url, area: ["90%", "90%"]}); + window.callback = function (uri) { + console.log(uri); + uri.forEach(function (item) { + v.call(t, "img", {src: item}, a) + }); + }; + window.callbackSetUri = function (uri) { + v.call(t, "img", {src: "/" + uri,}, a); + layer.close(windows) + } + }, code: function (e) { + k.call(o, function (i) { + v.call(t, "pre", {text: i.code, "lay-lang": i.lang}, e) + }) + }, help: function () { + i.open({ + type: 2, + title: "帮助", + area: ["600px", "380px"], + shadeClose: !0, + shade: 0.1, + skin: "layui-layer-msg", + content: ["http://www.layui.com/about/layedit/help.html", "no"] + }) + } + }, s = a.find(".layui-layedit-tool"), u = function () { + var i = e(this), a = i.attr("layedit-event"), l = i.attr("lay-command"); + if (!i.hasClass(r)) { + o.focus(); + var u = m(n); + u.commonAncestorContainer; + l ? (n.execCommand(l), /justifyLeft|justifyCenter|justifyRight/.test(l) && n.execCommand("formatBlock", !1, "

                      "), setTimeout(function () { + o.focus() + }, 10)) : c[a] && c[a].call(this, u), h.call(t, s, i) + } + }, d = /image/; + s.find(">i").on("mousedown", function () { + var t = e(this), i = t.attr("layedit-event"); + d.test(i) || u.call(this) + }).on("click", function () { + var t = e(this), i = t.attr("layedit-event"); + d.test(i) && u.call(this) + }), o.on("click", function () { + h.call(t, s), i.close(x.index) + }) + }, b = function (t, e) { + var l = this, n = i.open({ + type: 1, + id: "LAY_layedit_link", + area: "350px", + shade: 0.05, + shadeClose: !0, + moveType: 1, + title: "超链接", + skin: "layui-layer-msg", + content: ['

                        ', '
                      • ', '', '
                        ', '', "
                        ", "
                      • ", '
                      • ', '', '
                        ', '", '", "
                        ", "
                      • ", '
                      • ', '', '', "
                      • ", "
                      "].join(""), + success: function (t, n) { + var o = "submit(layedit-link-yes)"; + a.render("radio"), t.find(".layui-btn-primary").on("click", function () { + i.close(n), l.focus() + }), a.on(o, function (t) { + i.close(b.index), e && e(t.field) + }) + } + }); + b.index = n + }, x = function (t) { + var a = function () { + var t = ["[微笑]", "[嘻嘻]", "[哈哈]", "[可爱]", "[可怜]", "[挖鼻]", "[吃惊]", "[害羞]", "[挤眼]", "[闭嘴]", "[鄙视]", "[爱你]", "[泪]", "[偷笑]", "[亲亲]", "[生病]", "[太开心]", "[白眼]", "[右哼哼]", "[左哼哼]", "[嘘]", "[衰]", "[委屈]", "[吐]", "[哈欠]", "[抱抱]", "[怒]", "[疑问]", "[馋嘴]", "[拜拜]", "[思考]", "[汗]", "[困]", "[睡]", "[钱]", "[失望]", "[酷]", "[色]", "[哼]", "[鼓掌]", "[晕]", "[悲伤]", "[抓狂]", "[黑线]", "[阴险]", "[怒骂]", "[互粉]", "[心]", "[伤心]", "[猪头]", "[熊猫]", "[兔子]", "[ok]", "[耶]", "[good]", "[NO]", "[赞]", "[来]", "[弱]", "[草泥马]", "[神马]", "[囧]", "[浮云]", "[给力]", "[围观]", "[威武]", "[奥特曼]", "[礼物]", "[钟]", "[话筒]", "[蜡烛]", "[蛋糕]"], + e = {}; + return layui.each(t, function (t, i) { + e[i] = layui.cache.dir + "images/face/" + t + ".gif" + }), e + }(); + return x.hide = x.hide || function (t) { + "face" !== e(t.target).attr("layedit-event") && i.close(x.index) + }, x.index = i.tips(function () { + var t = []; + return layui.each(a, function (e, i) { + t.push('
                    • ' + e + '
                    • ') + }), '
                        ' + t.join("") + "
                      " + }(), this, { + tips: 1, time: 0, skin: "layui-box layui-util-face", maxWidth: 500, success: function (l, n) { + l.css({marginTop: -4, marginLeft: -10}).find(".layui-clear>li").on("click", function () { + t && t({src: a[this.title], alt: this.title}), i.close(n) + }), e(document).off("click", x.hide).on("click", x.hide) + } + }) + }, k = function (t) { + var e = this, l = i.open({ + type: 1, + id: "LAY_layedit_code", + area: "550px", + shade: 0.05, + shadeClose: !0, + moveType: 1, + title: "插入代码", + skin: "layui-layer-msg", + content: ['
                        ', '
                      • ', '', '
                        ', '", "
                        ", "
                      • ", '
                      • ', '', '
                        ', '', "
                        ", "
                      • ", '
                      • ', '', '', "
                      • ", "
                      "].join(""), + success: function (l, n) { + var o = "submit(layedit-code-yes)"; + a.render("select"), l.find(".layui-btn-primary").on("click", function () { + i.close(n), e.focus() + }), a.on(o, function (e) { + i.close(k.index), t && t(e.field) + }) + } + }); + k.index = l + }, C = { + html: '', + strong: '', + italic: '', + underline: '', + del: '', + "|": '', + left: '', + center: '', + right: '', + link: '', + unlink: '', + face: '', + image: '', + code: '', + help: '' + }, w = new c; + t("likeedit", w) +}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/message.js b/public/static/layui-admin/dist/layuiadmin/modules/message.js new file mode 100755 index 0000000..a24ead6 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/message.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(["admin","table","util"],function(e){var t=layui.$,i=(layui.admin,layui.table),l=(layui.element,{all:{text:"全部消息",id:"LAY-app-message-all"},notice:{text:"通知",id:"LAY-app-message-notice"},direct:{text:"私信",id:"LAY-app-message-direct"}}),a=function(e){return''+e.title};i.render({elem:"#LAY-app-message-all",url:layui.setter.base+"json/message/all.js",page:!0,cols:[[{type:"checkbox",fixed:"left"},{field:"title",title:"标题内容",minWidth:300,templet:a},{field:"time",title:"时间",width:170,templet:"
                      {{ layui.util.timeAgo(d.time) }}
                      "}]],skin:"line"}),i.render({elem:"#LAY-app-message-notice",url:layui.setter.base+"json/message/notice.js",page:!0,cols:[[{type:"checkbox",fixed:"left"},{field:"title",title:"标题内容",minWidth:300,templet:a},{field:"time",title:"时间",width:170,templet:"
                      {{ layui.util.timeAgo(d.time) }}
                      "}]],skin:"line"}),i.render({elem:"#LAY-app-message-direct",url:layui.setter.base+"json/message/direct.js",page:!0,cols:[[{type:"checkbox",fixed:"left"},{field:"title",title:"标题内容",minWidth:300,templet:a},{field:"time",title:"时间",width:170,templet:"
                      {{ layui.util.timeAgo(d.time) }}
                      "}]],skin:"line"});var d={del:function(e,t){var a=l[t],d=i.checkStatus(a.id),s=d.data;return 0===s.length?layer.msg("未选中行"):void layer.confirm("确定删除选中的数据吗?",function(){layer.msg("删除成功",{icon:1}),i.reload(a.id)})},ready:function(e,t){var a=l[t],d=i.checkStatus(a.id),s=d.data;return 0===s.length?layer.msg("未选中行"):(layer.msg("标记已读成功",{icon:1}),void i.reload(a.id))},readyAll:function(e,t){var i=l[t];layer.msg(i.text+":全部已读",{icon:1})}};t(".LAY-app-message-btns .layui-btn").on("click",function(){var e=t(this),i=e.data("events"),l=e.data("type");d[i]&&d[i].call(this,e,l)}),e("message",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/sample.js b/public/static/layui-admin/dist/layuiadmin/modules/sample.js new file mode 100755 index 0000000..dc76687 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/sample.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(function(e){var a=layui.admin;layui.use(["admin","carousel"],function(){var e=layui.$,a=(layui.admin,layui.carousel),l=layui.element,t=layui.device();e(".layadmin-carousel").each(function(){var l=e(this);a.render({elem:this,width:"100%",arrow:"none",interval:l.data("interval"),autoplay:l.data("autoplay")===!0,trigger:t.ios||t.android?"click":"hover",anim:l.data("anim")})}),l.render("progress")}),layui.use(["carousel","echarts"],function(){var e=layui.$,a=(layui.carousel,layui.echarts),l=[],t=[{title:{subtext:"完全实况球员数据",textStyle:{fontSize:14}},tooltip:{trigger:"axis"},legend:{x:"left",data:["罗纳尔多","舍普琴科"]},polar:[{indicator:[{text:"进攻",max:100},{text:"防守",max:100},{text:"体能",max:100},{text:"速度",max:100},{text:"力量",max:100},{text:"技巧",max:100}],radius:130}],series:[{type:"radar",center:["50%","50%"],itemStyle:{normal:{areaStyle:{type:"default"}}},data:[{value:[97,42,88,94,90,86],name:"舍普琴科"},{value:[97,32,74,95,88,92],name:"罗纳尔多"}]}]}],i=e("#LAY-index-pageone").children("div"),n=function(e){l[e]=a.init(i[e],layui.echartsTheme),l[e].setOption(t[e]),window.onresize=l[e].resize};i[0]&&n(0)}),layui.use(["carousel","echarts"],function(){var e=layui.$,a=(layui.carousel,layui.echarts),l=[],t=[{tooltip:{trigger:"axis"},calculable:!0,legend:{data:["访问量","下载量","平均访问量"]},xAxis:[{type:"category",data:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]}],yAxis:[{type:"value",name:"访问量",axisLabel:{formatter:"{value} 万"}},{type:"value",name:"下载量",axisLabel:{formatter:"{value} 万"}}],series:[{name:"访问量",type:"line",data:[900,850,950,1e3,1100,1050,1e3,1150,1250,1370,1250,1100]},{name:"下载量",type:"line",yAxisIndex:1,data:[850,850,800,950,1e3,950,950,1150,1100,1240,1e3,950]},{name:"平均访问量",type:"line",data:[870,850,850,950,1050,1e3,980,1150,1e3,1300,1150,1e3]}]}],i=e("#LAY-index-pagetwo").children("div"),n=function(e){l[e]=a.init(i[e],layui.echartsTheme),l[e].setOption(t[e]),window.onresize=l[e].resize};i[0]&&n(0)}),layui.use(["carousel","echarts"],function(){var e=layui.$,a=(layui.carousel,layui.echarts),l=[],t=[{title:{text:"全国的 layui 用户分布",subtext:"不完全统计"},tooltip:{trigger:"item"},dataRange:{orient:"horizontal",min:0,max:6e4,text:["高","低"],splitNumber:0},series:[{name:"全国的 layui 用户分布",type:"map",mapType:"china",selectedMode:"multiple",itemStyle:{normal:{label:{show:!0}},emphasis:{label:{show:!0}}},data:[{name:"西藏",value:60},{name:"青海",value:167},{name:"宁夏",value:210},{name:"海南",value:252},{name:"甘肃",value:502},{name:"贵州",value:570},{name:"新疆",value:661},{name:"云南",value:8890},{name:"重庆",value:10010},{name:"吉林",value:5056},{name:"山西",value:2123},{name:"天津",value:9130},{name:"江西",value:10170},{name:"广西",value:6172},{name:"陕西",value:9251},{name:"黑龙江",value:5125},{name:"内蒙古",value:1435},{name:"安徽",value:9530},{name:"北京",value:51919},{name:"福建",value:3756},{name:"上海",value:59190},{name:"湖北",value:37109},{name:"湖南",value:8966},{name:"四川",value:31020},{name:"辽宁",value:7222},{name:"河北",value:3451},{name:"河南",value:9693},{name:"浙江",value:62310},{name:"山东",value:39231},{name:"江苏",value:35911},{name:"广东",value:55891}]}]}],i=e("#LAY-index-pagethree").children("div"),n=function(e){l[e]=a.init(i[e],layui.echartsTheme),l[e].setOption(t[e]),window.onresize=l[e].resize};i[0]&&n(0)}),layui.use("table",function(){var e=(layui.$,layui.table);e.render({elem:"#LAY-index-prograss",url:layui.setter.base+"json/console/prograss.js",cols:[[{type:"checkbox",fixed:"left"},{field:"prograss",title:"任务"},{field:"time",title:"所需时间"},{field:"complete",title:"完成情况",templet:function(e){return"已完成"==e.complete?''+e.complete+"":"进行中"==e.complete?''+e.complete+"":''+e.complete+""}}]],skin:"line"})}),a.events.replyNote=function(e){var a=e.data("id");layer.prompt({title:"回复留言 ID:"+a,formType:2},function(e,a){layer.msg("得到:"+e),layer.close(a)})},e("sample",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/senior.js b/public/static/layui-admin/dist/layuiadmin/modules/senior.js new file mode 100755 index 0000000..c5dc8ab --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/senior.js @@ -0,0 +1,4 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(function(e){layui.use(["admin","carousel"],function(){var e=layui.$,a=(layui.admin,layui.carousel),t=layui.element,i=layui.device();e(".layadmin-carousel").each(function(){var t=e(this);a.render({elem:this,width:"100%",arrow:"none",interval:t.data("interval"),autoplay:t.data("autoplay")===!0,trigger:i.ios||i.android?"click":"hover",anim:t.data("anim")})}),t.render("progress")}),layui.use(["carousel","echarts"],function(){var e=layui.$,a=(layui.carousel,layui.echarts),t=[],i=[{title:{text:"未来一周气温变化",subtext:"纯属虚构"},tooltip:{trigger:"axis"},legend:{data:["最高气温","最低气温"]},calculable:!0,xAxis:[{type:"category",boundaryGap:!1,data:["周一","周二","周三","周四","周五","周六","周日"]}],yAxis:[{type:"value",axisLabel:{formatter:"{value} °C"}}],series:[{name:"最高气温",type:"line",data:[11,11,15,13,12,13,10],markPoint:{data:[{type:"max",name:"最大值"},{type:"min",name:"最小值"}]},markLine:{data:[{type:"average",name:"平均值"}]}},{name:"最低气温",type:"line",data:[1,-2,2,5,3,2,0],markPoint:{data:[{name:"周最低",value:-2,xAxis:1,yAxis:-1.5}]},markLine:{data:[{type:"average",name:"平均值"}]}}]}],n=e("#LAY-index-normline").children("div"),l=function(e){t[e]=a.init(n[e],layui.echartsTheme),t[e].setOption(i[e]),window.onresize=t[e].resize};if(n[0]){l(0);var r=[],o=[{tooltip:{trigger:"axis"},legend:{data:["邮件营销","联盟广告","视频广告","直接访问","搜索引擎"]},calculable:!0,xAxis:[{type:"category",boundaryGap:!1,data:["周一","周二","周三","周四","周五","周六","周日"]}],yAxis:[{type:"value"}],series:[{name:"邮件营销",type:"line",stack:"总量",data:[120,132,101,134,90,230,210]},{name:"联盟广告",type:"line",stack:"总量",data:[220,182,191,234,290,330,310]},{name:"视频广告",type:"line",stack:"总量",data:[150,232,201,154,190,330,410]},{name:"直接访问",type:"line",stack:"总量",data:[320,332,301,334,390,330,320]},{name:"搜索引擎",type:"line",stack:"总量",data:[820,932,901,934,1290,1330,1320]}]}],m=e("#LAY-index-heapline").children("div"),s=function(e){r[e]=a.init(m[e],layui.echartsTheme),r[e].setOption(o[e]),window.onresize=r[e].resize};if(m[0]){s(0);var y=[],d=[{title:{text:"双数值轴折线",subtext:"纯属虚构"},tooltip:{trigger:"axis",axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}},formatter:function(e){return e.seriesName+" : [ "+e.value[0]+", "+e.value[1]+" ]"}},legend:{data:["数据1","数据2"]},calculable:!0,xAxis:[{type:"value"}],yAxis:[{type:"value",axisLine:{lineStyle:{color:"#dc143c"}}}],series:[{name:"数据1",type:"line",data:[[1.5,10],[5,7],[8,8],[12,6],[11,12],[16,9],[14,6],[17,4],[19,9]],markPoint:{data:[{type:"max",name:"最大值",symbol:"emptyCircle",itemStyle:{normal:{color:"#dc143c",label:{position:"top"}}}},{type:"min",name:"最小值",symbol:"emptyCircle",itemStyle:{normal:{color:"#dc143c",label:{position:"bottom"}}}},{type:"max",name:"最大值",valueIndex:0,symbol:"emptyCircle",itemStyle:{normal:{color:"#1e90ff",label:{position:"right"}}}},{type:"min",name:"最小值",valueIndex:0,symbol:"emptyCircle",itemStyle:{normal:{color:"#1e90ff",label:{position:"left"}}}}]},markLine:{data:[{type:"max",name:"最大值",itemStyle:{normal:{color:"#dc143c"}}},{type:"min",name:"最小值",itemStyle:{normal:{color:"#dc143c"}}},{type:"average",name:"平均值",itemStyle:{normal:{color:"#dc143c"}}},{type:"max",name:"最大值",valueIndex:0,itemStyle:{normal:{color:"#1e90ff"}}},{type:"min",name:"最小值",valueIndex:0,itemStyle:{normal:{color:"#1e90ff"}}},{type:"average",name:"平均值",valueIndex:0,itemStyle:{normal:{color:"#1e90ff"}}}]}},{name:"数据2",type:"line",data:[[1,2],[2,3],[4,2],[7,5],[11,2],[18,3]]}]}],c=e("#LAY-index-diffline").children("div"),p=function(e){y[e]=a.init(c[e],layui.echartsTheme),y[e].setOption(d[e]),window.onresize=y[e].resize};if(c[0]){p(0);var u=[],x=[{tooltip:{trigger:"axis"},legend:{data:["邮件营销","联盟广告","视频广告","直接访问","搜索引擎"]},calculable:!0,xAxis:[{type:"category",boundaryGap:!1,data:["周一","周二","周三","周四","周五","周六","周日"]}],yAxis:[{type:"value"}],series:[{name:"邮件营销",type:"line",stack:"总量",itemStyle:{normal:{areaStyle:{type:"default"}}},data:[120,132,101,134,90,230,210]},{name:"联盟广告",type:"line",stack:"总量",itemStyle:{normal:{areaStyle:{type:"default"}}},data:[220,182,191,234,290,330,310]},{name:"视频广告",type:"line",stack:"总量",itemStyle:{normal:{areaStyle:{type:"default"}}},data:[150,232,201,154,190,330,410]},{name:"直接访问",type:"line",stack:"总量",itemStyle:{normal:{areaStyle:{type:"default"}}},data:[320,332,301,334,390,330,320]},{name:"搜索引擎",type:"line",stack:"总量",itemStyle:{normal:{areaStyle:{type:"default"}}},data:[820,932,901,934,1290,1330,1320]}]}],v=e("#LAY-index-heaparea").children("div"),b=function(e){u[e]=a.init(v[e],layui.echartsTheme),u[e].setOption(x[e]),window.onresize=u[e].resize};if(v[0]){b(0);var h=[],f=[{title:{text:"雨量流量关系图",x:"center"},tooltip:{trigger:"axis",formatter:function(e){return e[0].name+"
                      "+e[0].seriesName+" : "+e[0].value+" (m^3/s)
                      "+e[1].seriesName+" : "+-e[1].value+" (mm)"}},legend:{data:["流量","降雨量"],x:"left"},dataZoom:{show:!0,realtime:!0,start:0,end:100},xAxis:[{type:"category",boundaryGap:!1,axisLine:{onZero:!1},data:["2009/6/12 2:00","2009/6/12 3:00","2009/6/12 4:00","2009/6/12 5:00","2009/6/12 6:00","2009/6/12 7:00","2009/6/12 8:00","2009/6/12 9:00","2009/6/12 10:00","2009/6/12 11:00","2009/6/12 12:00","2009/6/12 13:00","2009/6/12 14:00","2009/6/12 15:00","2009/6/12 16:00","2009/6/12 17:00","2009/6/12 18:00","2009/6/12 19:00","2009/6/12 20:00","2009/6/12 21:00","2009/6/12 22:00","2009/6/12 23:00","2009/6/13 0:00","2009/6/13 1:00","2009/6/13 2:00","2009/6/13 3:00","2009/6/13 4:00","2009/6/13 5:00","2009/6/13 6:00","2009/6/13 7:00","2009/6/13 8:00","2009/6/13 9:00","2009/6/13 10:00","2009/6/13 11:00","2009/6/13 12:00","2009/6/13 13:00","2009/6/13 14:00","2009/6/13 15:00","2009/6/13 16:00","2009/6/13 17:00","2009/6/13 18:00","2009/6/13 19:00","2009/6/13 20:00","2009/6/13 21:00","2009/6/13 22:00","2009/6/13 23:00","2009/6/14 0:00","2009/6/14 1:00","2009/6/14 2:00","2009/6/14 3:00","2009/6/14 4:00","2009/6/14 5:00","2009/6/14 6:00","2009/6/14 7:00","2009/6/14 8:00","2009/6/14 9:00","2009/6/14 10:00","2009/6/14 11:00","2009/6/14 12:00","2009/6/14 13:00","2009/6/14 14:00","2009/6/14 15:00","2009/6/14 16:00","2009/6/14 17:00","2009/6/14 18:00","2009/6/14 19:00","2009/6/14 20:00","2009/6/14 21:00","2009/6/14 22:00","2009/6/14 23:00","2009/6/15 0:00","2009/6/15 1:00","2009/6/15 2:00","2009/6/15 3:00","2009/6/15 4:00","2009/6/15 5:00","2009/6/15 6:00","2009/6/15 7:00","2009/6/15 8:00","2009/6/15 9:00","2009/6/15 10:00","2009/6/15 11:00","2009/6/15 12:00","2009/6/15 13:00","2009/6/15 14:00","2009/6/15 15:00","2009/6/15 16:00","2009/6/15 17:00","2009/6/15 18:00","2009/6/15 19:00","2009/6/15 20:00","2009/6/15 21:00","2009/6/15 22:00","2009/6/15 23:00","2009/6/15 0:00","2009/6/16 1:00","2009/6/16 2:00","2009/6/16 3:00","2009/6/16 4:00","2009/6/16 5:00","2009/6/16 6:00","2009/6/16 7:00","2009/6/16 8:00","2009/6/16 9:00","2009/6/16 10:00","2009/6/16 11:00","2009/6/16 12:00","2009/6/16 13:00","2009/6/16 14:00","2009/6/16 15:00","2009/6/16 16:00","2009/6/16 17:00","2009/6/16 18:00","2009/6/16 19:00","2009/6/16 20:00","2009/6/16 21:00","2009/6/16 22:00","2009/6/16 23:00","2009/6/15 0:00","2009/6/17 1:00","2009/6/17 2:00","2009/6/17 3:00","2009/6/17 4:00","2009/6/17 5:00","2009/6/17 6:00","2009/6/17 7:00","2009/6/17 8:00","2009/6/17 9:00","2009/6/17 10:00","2009/6/17 11:00","2009/6/17 12:00","2009/6/17 13:00","2009/6/17 14:00","2009/6/17 15:00","2009/6/17 16:00","2009/6/17 17:00","2009/6/17 18:00","2009/6/17 19:00","2009/6/17 20:00","2009/6/17 21:00","2009/6/17 22:00","2009/6/17 23:00","2009/6/18 0:00","2009/6/18 1:00","2009/6/18 2:00","2009/6/18 3:00","2009/6/18 4:00","2009/6/18 5:00","2009/6/18 6:00","2009/6/18 7:00","2009/6/18 8:00","2009/6/18 9:00","2009/6/18 10:00","2009/6/18 11:00","2009/6/18 12:00","2009/6/18 13:00","2009/6/18 14:00","2009/6/18 15:00","2009/6/18 16:00","2009/6/18 17:00","2009/6/18 18:00","2009/6/18 19:00","2009/6/18 20:00","2009/6/18 21:00","2009/6/18 22:00","2009/6/18 23:00","2009/6/15 0:00","2009/6/19 1:00","2009/6/19 2:00","2009/6/19 3:00","2009/6/19 4:00","2009/6/19 5:00","2009/6/19 6:00","2009/6/19 7:00","2009/6/19 8:00","2009/6/19 9:00","2009/6/19 10:00","2009/6/19 11:00","2009/6/19 12:00","2009/6/19 13:00","2009/6/19 14:00","2009/6/19 15:00","2009/6/19 16:00","2009/6/19 17:00","2009/6/19 18:00","2009/6/19 19:00","2009/6/19 20:00","2009/6/19 21:00","2009/6/19 22:00","2009/6/19 23:00","2009/6/20 0:00","2009/6/20 1:00","2009/6/20 2:00","2009/6/20 3:00","2009/6/20 4:00","2009/6/20 5:00","2009/6/20 6:00","2009/6/20 7:00","2009/6/20 8:00","2009/6/20 9:00","2009/6/20 10:00","2009/6/20 11:00","2009/6/20 12:00","2009/6/20 13:00","2009/6/20 14:00","2009/6/20 15:00","2009/6/20 16:00","2009/6/20 17:00","2009/6/20 18:00","2009/6/20 19:00","2009/6/20 20:00","2009/6/20 21:00","2009/6/20 22:00","2009/6/20 23:00","2009/6/21 0:00","2009/6/21 1:00","2009/6/21 2:00","2009/6/21 3:00","2009/6/21 4:00","2009/6/21 5:00","2009/6/21 6:00","2009/6/21 7:00","2009/6/21 8:00","2009/6/21 9:00","2009/6/21 10:00","2009/6/21 11:00","2009/6/21 12:00","2009/6/21 13:00","2009/6/21 14:00","2009/6/21 15:00","2009/6/21 16:00","2009/6/21 17:00","2009/6/21 18:00","2009/6/21 19:00","2009/6/21 20:00","2009/6/21 21:00","2009/6/21 22:00","2009/6/21 23:00","2009/6/22 0:00","2009/6/22 1:00","2009/6/22 2:00","2009/6/22 3:00","2009/6/22 4:00","2009/6/22 5:00","2009/6/22 6:00","2009/6/22 7:00","2009/6/22 8:00","2009/6/22 9:00","2009/6/22 10:00","2009/6/22 11:00","2009/6/22 12:00","2009/6/22 13:00","2009/6/22 14:00","2009/6/22 15:00","2009/6/22 16:00","2009/6/22 17:00","2009/6/22 18:00","2009/6/22 19:00","2009/6/22 20:00","2009/6/22 21:00","2009/6/22 22:00","2009/6/22 23:00","2009/6/23 0:00","2009/6/23 1:00","2009/6/23 2:00","2009/6/23 3:00","2009/6/23 4:00","2009/6/23 5:00","2009/6/23 6:00","2009/6/23 7:00","2009/6/23 8:00","2009/6/23 9:00","2009/6/23 10:00","2009/6/23 11:00","2009/6/23 12:00","2009/6/23 13:00","2009/6/23 14:00","2009/6/23 15:00","2009/6/23 16:00","2009/6/23 17:00","2009/6/23 18:00","2009/6/23 19:00","2009/6/23 20:00","2009/6/23 21:00","2009/6/23 22:00","2009/6/23 23:00","2009/6/24 0:00","2009/6/24 1:00","2009/6/24 2:00","2009/6/24 3:00","2009/6/24 4:00","2009/6/24 5:00","2009/6/24 6:00","2009/6/24 7:00","2009/6/24 8:00","2009/6/24 9:00","2009/6/24 10:00","2009/6/24 11:00","2009/6/24 12:00","2009/6/24 13:00","2009/6/24 14:00","2009/6/24 15:00","2009/6/24 16:00","2009/6/24 17:00","2009/6/24 18:00","2009/6/24 19:00","2009/6/24 20:00","2009/6/24 21:00","2009/6/24 22:00","2009/6/24 23:00","2009/6/25 0:00","2009/6/25 1:00","2009/6/25 2:00","2009/6/25 3:00","2009/6/25 4:00","2009/6/25 5:00","2009/6/25 6:00","2009/6/25 7:00","2009/6/25 8:00","2009/6/25 9:00","2009/6/25 10:00","2009/6/25 11:00","2009/6/25 12:00","2009/6/25 13:00","2009/6/25 14:00","2009/6/25 15:00","2009/6/25 16:00","2009/6/25 17:00","2009/6/25 18:00","2009/6/25 19:00","2009/6/25 20:00","2009/6/25 21:00","2009/6/25 22:00","2009/6/25 23:00","2009/6/26 0:00","2009/6/26 1:00","2009/6/26 2:00","2009/6/26 3:00","2009/6/26 4:00","2009/6/26 5:00","2009/6/26 6:00","2009/6/26 7:00","2009/6/26 8:00","2009/6/26 9:00","2009/6/26 10:00","2009/6/26 11:00","2009/6/26 12:00","2009/6/26 13:00","2009/6/26 14:00","2009/6/26 15:00","2009/6/26 16:00","2009/6/26 17:00","2009/6/26 18:00","2009/6/26 19:00","2009/6/26 20:00","2009/6/26 21:00","2009/6/26 22:00","2009/6/26 23:00","2009/6/27 0:00","2009/6/27 1:00","2009/6/27 2:00","2009/6/27 3:00","2009/6/27 4:00","2009/6/27 5:00","2009/6/27 6:00","2009/6/27 7:00","2009/6/27 8:00","2009/6/27 9:00","2009/6/27 10:00","2009/6/27 11:00","2009/6/27 12:00","2009/6/27 13:00","2009/6/27 14:00","2009/6/27 15:00","2009/6/27 16:00","2009/6/27 17:00","2009/6/27 18:00","2009/6/27 19:00","2009/6/27 20:00","2009/6/27 21:00","2009/6/27 22:00","2009/6/27 23:00","2009/6/28 0:00","2009/6/28 1:00","2009/6/28 2:00","2009/6/28 3:00","2009/6/28 4:00","2009/6/28 5:00","2009/6/28 6:00","2009/6/28 7:00","2009/6/28 8:00","2009/6/28 9:00","2009/6/28 10:00","2009/6/28 11:00","2009/6/28 12:00","2009/6/28 13:00","2009/6/28 14:00","2009/6/28 15:00","2009/6/28 16:00","2009/6/28 17:00","2009/6/28 18:00","2009/6/28 19:00","2009/6/28 20:00","2009/6/28 21:00","2009/6/28 22:00","2009/6/28 23:00","2009/6/29 0:00","2009/6/29 1:00","2009/6/29 2:00","2009/6/29 3:00","2009/6/29 4:00","2009/6/29 5:00","2009/6/29 6:00","2009/6/29 7:00","2009/6/29 8:00","2009/6/29 9:00","2009/6/29 10:00","2009/6/29 11:00","2009/6/29 12:00","2009/6/29 13:00","2009/6/29 14:00","2009/6/29 15:00","2009/6/29 16:00","2009/6/29 17:00","2009/6/29 18:00","2009/6/29 19:00","2009/6/29 20:00","2009/6/29 21:00","2009/6/29 22:00","2009/6/29 23:00","2009/6/30 0:00","2009/6/30 1:00","2009/6/30 2:00","2009/6/30 3:00","2009/6/30 4:00","2009/6/30 5:00","2009/6/30 6:00","2009/6/30 7:00","2009/6/30 8:00","2009/6/30 9:00","2009/6/30 10:00","2009/6/30 11:00","2009/6/30 12:00","2009/6/30 13:00","2009/6/30 14:00","2009/6/30 15:00","2009/6/30 16:00","2009/6/30 17:00","2009/6/30 18:00","2009/6/30 19:00","2009/6/30 20:00","2009/6/30 21:00","2009/6/30 22:00","2009/6/30 23:00","2009/7/1 0:00","2009/7/1 1:00","2009/7/1 2:00","2009/7/1 3:00","2009/7/1 4:00","2009/7/1 5:00","2009/7/1 6:00","2009/7/1 7:00","2009/7/1 8:00","2009/7/1 9:00","2009/7/1 10:00","2009/7/1 11:00","2009/7/1 12:00","2009/7/1 13:00","2009/7/1 14:00","2009/7/1 15:00","2009/7/1 16:00","2009/7/1 17:00","2009/7/1 18:00","2009/7/1 19:00","2009/7/1 20:00","2009/7/1 21:00","2009/7/1 22:00","2009/7/1 23:00","2009/7/2 0:00","2009/7/2 1:00","2009/7/2 2:00","2009/7/2 3:00","2009/7/2 4:00","2009/7/2 5:00","2009/7/2 6:00","2009/7/2 7:00","2009/7/2 8:00","2009/7/2 9:00","2009/7/2 10:00","2009/7/2 11:00","2009/7/2 12:00","2009/7/2 13:00","2009/7/2 14:00","2009/7/2 15:00","2009/7/2 16:00","2009/7/2 17:00","2009/7/2 18:00","2009/7/2 19:00","2009/7/2 20:00","2009/7/2 21:00","2009/7/2 22:00","2009/7/2 23:00","2009/7/3 0:00","2009/7/3 1:00","2009/7/3 2:00","2009/7/3 3:00","2009/7/3 4:00","2009/7/3 5:00","2009/7/3 6:00","2009/7/3 7:00","2009/7/3 8:00","2009/7/3 9:00","2009/7/3 10:00","2009/7/3 11:00","2009/7/3 12:00","2009/7/3 13:00","2009/7/3 14:00","2009/7/3 15:00","2009/7/3 16:00","2009/7/3 17:00","2009/7/3 18:00","2009/7/3 19:00","2009/7/3 20:00","2009/7/3 21:00","2009/7/3 22:00","2009/7/3 23:00","2009/7/4 0:00","2009/7/4 1:00","2009/7/4 2:00","2009/7/4 3:00","2009/7/4 4:00","2009/7/4 5:00","2009/7/4 6:00","2009/7/4 7:00","2009/7/4 8:00","2009/7/4 9:00","2009/7/4 10:00","2009/7/4 11:00","2009/7/4 12:00","2009/7/4 13:00","2009/7/4 14:00","2009/7/4 15:00","2009/7/4 16:00","2009/7/4 17:00","2009/7/4 18:00","2009/7/4 19:00","2009/7/4 20:00","2009/7/4 21:00","2009/7/4 22:00","2009/7/4 23:00","2009/7/5 0:00","2009/7/5 1:00","2009/7/5 2:00","2009/7/5 3:00","2009/7/5 4:00","2009/7/5 5:00","2009/7/5 6:00","2009/7/5 7:00","2009/7/5 8:00","2009/7/5 9:00","2009/7/5 10:00","2009/7/5 11:00","2009/7/5 12:00","2009/7/5 13:00","2009/7/5 14:00","2009/7/5 15:00","2009/7/5 16:00","2009/7/5 17:00","2009/7/5 18:00","2009/7/5 19:00","2009/7/5 20:00","2009/7/5 21:00","2009/7/5 22:00","2009/7/5 23:00","2009/7/6 0:00","2009/7/6 1:00","2009/7/6 2:00","2009/7/6 3:00","2009/7/6 4:00","2009/7/6 5:00","2009/7/6 6:00","2009/7/6 7:00","2009/7/6 8:00","2009/7/6 9:00","2009/7/6 10:00","2009/7/6 11:00","2009/7/6 12:00","2009/7/6 13:00","2009/7/6 14:00","2009/7/6 15:00","2009/7/6 16:00","2009/7/6 17:00","2009/7/6 18:00","2009/7/6 19:00","2009/7/6 20:00","2009/7/6 21:00","2009/7/6 22:00","2009/7/6 23:00","2009/7/7 0:00","2009/7/7 1:00","2009/7/7 2:00","2009/7/7 3:00","2009/7/7 4:00","2009/7/7 5:00","2009/7/7 6:00","2009/7/7 7:00","2009/7/7 8:00","2009/7/7 9:00","2009/7/7 10:00","2009/7/7 11:00","2009/7/7 12:00","2009/7/7 13:00","2009/7/7 14:00","2009/7/7 15:00","2009/7/7 16:00","2009/7/7 17:00","2009/7/7 18:00","2009/7/7 19:00","2009/7/7 20:00","2009/7/7 21:00","2009/7/7 22:00","2009/7/7 23:00","2009/7/8 0:00","2009/7/8 1:00","2009/7/8 2:00","2009/7/8 3:00","2009/7/8 4:00","2009/7/8 5:00","2009/7/8 6:00","2009/7/8 7:00","2009/7/8 8:00","2009/7/8 9:00","2009/7/8 10:00","2009/7/8 11:00","2009/7/8 12:00","2009/7/8 13:00","2009/7/8 14:00","2009/7/8 15:00","2009/7/8 16:00","2009/7/8 17:00","2009/7/8 18:00","2009/7/8 19:00","2009/7/8 20:00","2009/7/8 21:00","2009/7/8 22:00","2009/7/8 23:00","2009/7/9 0:00","2009/7/9 1:00","2009/7/9 2:00","2009/7/9 3:00","2009/7/9 4:00","2009/7/9 5:00","2009/7/9 6:00","2009/7/9 7:00","2009/7/9 8:00","2009/7/9 9:00","2009/7/9 10:00","2009/7/9 11:00","2009/7/9 12:00","2009/7/9 13:00","2009/7/9 14:00","2009/7/9 15:00","2009/7/9 16:00","2009/7/9 17:00","2009/7/9 18:00","2009/7/9 19:00","2009/7/9 20:00","2009/7/9 21:00","2009/7/9 22:00","2009/7/9 23:00","2009/7/10 0:00","2009/7/10 1:00","2009/7/10 2:00","2009/7/10 3:00","2009/7/10 4:00","2009/7/10 5:00","2009/7/10 6:00","2009/7/10 7:00","2009/7/10 8:00","2009/7/10 9:00","2009/7/10 10:00","2009/7/10 11:00","2009/7/10 12:00","2009/7/10 13:00","2009/7/10 14:00","2009/7/10 15:00","2009/7/10 16:00","2009/7/10 17:00","2009/7/10 18:00","2009/7/10 19:00","2009/7/10 20:00","2009/7/10 21:00","2009/7/10 22:00","2009/7/10 23:00","2009/7/11 0:00","2009/7/11 1:00","2009/7/11 2:00","2009/7/11 3:00","2009/7/11 4:00","2009/7/11 5:00","2009/7/11 6:00","2009/7/11 7:00","2009/7/11 8:00","2009/7/11 9:00","2009/7/11 10:00","2009/7/11 11:00","2009/7/11 12:00","2009/7/11 13:00","2009/7/11 14:00","2009/7/11 15:00","2009/7/11 16:00","2009/7/11 17:00","2009/7/11 18:00","2009/7/11 19:00","2009/7/11 20:00","2009/7/11 21:00","2009/7/11 22:00","2009/7/11 23:00","2009/7/12 0:00","2009/7/12 1:00","2009/7/12 2:00","2009/7/12 3:00","2009/7/12 4:00","2009/7/12 5:00","2009/7/12 6:00","2009/7/12 7:00","2009/7/12 8:00","2009/7/12 9:00","2009/7/12 10:00","2009/7/12 11:00","2009/7/12 12:00","2009/7/12 13:00","2009/7/12 14:00","2009/7/12 15:00","2009/7/12 16:00","2009/7/12 17:00","2009/7/12 18:00","2009/7/12 19:00","2009/7/12 20:00","2009/7/12 21:00","2009/7/12 22:00","2009/7/12 23:00","2009/7/13 0:00","2009/7/13 1:00","2009/7/13 2:00","2009/7/13 3:00","2009/7/13 4:00","2009/7/13 5:00","2009/7/13 6:00","2009/7/13 7:00","2009/7/13 8:00","2009/7/13 9:00","2009/7/13 10:00","2009/7/13 11:00","2009/7/13 12:00","2009/7/13 13:00","2009/7/13 14:00","2009/7/13 15:00","2009/7/13 16:00","2009/7/13 17:00","2009/7/13 18:00","2009/7/13 19:00","2009/7/13 20:00","2009/7/13 21:00","2009/7/13 22:00","2009/7/13 23:00","2009/7/14 0:00","2009/7/14 1:00","2009/7/14 2:00","2009/7/14 3:00","2009/7/14 4:00","2009/7/14 5:00","2009/7/14 6:00","2009/7/14 7:00","2009/7/14 8:00","2009/7/14 9:00","2009/7/14 10:00","2009/7/14 11:00","2009/7/14 12:00","2009/7/14 13:00","2009/7/14 14:00","2009/7/14 15:00","2009/7/14 16:00","2009/7/14 17:00","2009/7/14 18:00","2009/7/14 19:00","2009/7/14 20:00","2009/7/14 21:00","2009/7/14 22:00","2009/7/14 23:00","2009/7/15 0:00","2009/7/15 1:00","2009/7/15 2:00","2009/7/15 3:00","2009/7/15 4:00","2009/7/15 5:00","2009/7/15 6:00","2009/7/15 7:00","2009/7/15 8:00","2009/7/15 9:00","2009/7/15 10:00","2009/7/15 11:00","2009/7/15 12:00","2009/7/15 13:00","2009/7/15 14:00","2009/7/15 15:00","2009/7/15 16:00","2009/7/15 17:00","2009/7/15 18:00","2009/7/15 19:00","2009/7/15 20:00","2009/7/15 21:00","2009/7/15 22:00","2009/7/15 23:00","2009/7/16 0:00","2009/7/16 1:00","2009/7/16 2:00","2009/7/16 3:00","2009/7/16 4:00","2009/7/16 5:00","2009/7/16 6:00","2009/7/16 7:00","2009/7/16 8:00","2009/7/16 9:00","2009/7/16 10:00","2009/7/16 11:00","2009/7/16 12:00","2009/7/16 13:00","2009/7/16 14:00","2009/7/16 15:00","2009/7/16 16:00","2009/7/16 17:00","2009/7/16 18:00","2009/7/16 19:00","2009/7/16 20:00","2009/7/16 21:00","2009/7/16 22:00","2009/7/16 23:00","2009/7/17 0:00","2009/7/17 1:00","2009/7/17 2:00","2009/7/17 3:00","2009/7/17 4:00","2009/7/17 5:00","2009/7/17 6:00","2009/7/17 7:00","2009/7/17 8:00","2009/7/17 9:00","2009/7/17 10:00","2009/7/17 11:00","2009/7/17 12:00","2009/7/17 13:00","2009/7/17 14:00","2009/7/17 15:00","2009/7/17 16:00","2009/7/17 17:00","2009/7/17 18:00","2009/7/17 19:00","2009/7/17 20:00","2009/7/17 21:00","2009/7/17 22:00","2009/7/17 23:00","2009/7/18 0:00","2009/7/18 1:00","2009/7/18 2:00","2009/7/18 3:00","2009/7/18 4:00","2009/7/18 5:00","2009/7/18 6:00","2009/7/18 7:00","2009/7/18 8:00","2009/7/18 9:00","2009/7/18 10:00","2009/7/18 11:00","2009/7/18 12:00","2009/7/18 13:00","2009/7/18 14:00","2009/7/18 15:00","2009/7/18 16:00","2009/7/18 17:00","2009/7/18 18:00","2009/7/18 19:00","2009/7/18 20:00","2009/7/18 21:00","2009/7/18 22:00","2009/7/18 23:00","2009/7/19 0:00","2009/7/19 1:00","2009/7/19 2:00","2009/7/19 3:00","2009/7/19 4:00","2009/7/19 5:00","2009/7/19 6:00","2009/7/19 7:00","2009/7/19 8:00","2009/7/19 9:00","2009/7/19 10:00","2009/7/19 11:00","2009/7/19 12:00","2009/7/19 13:00","2009/7/19 14:00","2009/7/19 15:00","2009/7/19 16:00","2009/7/19 17:00","2009/7/19 18:00","2009/7/19 19:00","2009/7/19 20:00","2009/7/19 21:00","2009/7/19 22:00","2009/7/19 23:00","2009/7/20 0:00","2009/7/20 1:00","2009/7/20 2:00","2009/7/20 3:00","2009/7/20 4:00","2009/7/20 5:00","2009/7/20 6:00","2009/7/20 7:00","2009/7/20 8:00","2009/7/20 9:00","2009/7/20 10:00","2009/7/20 11:00","2009/7/20 12:00","2009/7/20 13:00","2009/7/20 14:00","2009/7/20 15:00","2009/7/20 16:00","2009/7/20 17:00","2009/7/20 18:00","2009/7/20 19:00","2009/7/20 20:00","2009/7/20 21:00","2009/7/20 22:00","2009/7/20 23:00","2009/7/21 0:00","2009/7/21 1:00","2009/7/21 2:00","2009/7/21 3:00","2009/7/21 4:00","2009/7/21 5:00","2009/7/21 6:00","2009/7/21 7:00","2009/7/21 8:00","2009/7/21 9:00","2009/7/21 10:00","2009/7/21 11:00","2009/7/21 12:00","2009/7/21 13:00","2009/7/21 14:00","2009/7/21 15:00","2009/7/21 16:00","2009/7/21 17:00","2009/7/21 18:00","2009/7/21 19:00","2009/7/21 20:00","2009/7/21 21:00","2009/7/21 22:00","2009/7/21 23:00","2009/7/22 0:00","2009/7/22 1:00","2009/7/22 2:00","2009/7/22 3:00","2009/7/22 4:00","2009/7/22 5:00","2009/7/22 6:00","2009/7/22 7:00","2009/7/22 8:00","2009/7/22 9:00","2009/7/22 10:00","2009/7/22 11:00","2009/7/22 12:00","2009/7/22 13:00","2009/7/22 14:00","2009/7/22 15:00","2009/7/22 16:00","2009/7/22 17:00","2009/7/22 18:00","2009/7/22 19:00","2009/7/22 20:00","2009/7/22 21:00","2009/7/22 22:00","2009/7/22 23:00","2009/7/23 0:00","2009/7/23 1:00","2009/7/23 2:00","2009/7/23 3:00","2009/7/23 4:00","2009/7/23 5:00","2009/7/23 6:00","2009/7/23 7:00","2009/7/23 8:00","2009/7/23 9:00","2009/7/23 10:00","2009/7/23 11:00","2009/7/23 12:00","2009/7/23 13:00","2009/7/23 14:00","2009/7/23 15:00","2009/7/23 16:00","2009/7/23 17:00","2009/7/23 18:00","2009/7/23 19:00","2009/7/23 20:00","2009/7/23 21:00","2009/7/23 22:00","2009/7/23 23:00","2009/7/24 0:00","2009/7/24 1:00","2009/7/24 2:00","2009/7/24 3:00","2009/7/24 4:00","2009/7/24 5:00","2009/7/24 6:00","2009/7/24 7:00","2009/7/24 8:00","2009/7/24 9:00","2009/7/24 10:00","2009/7/24 11:00","2009/7/24 12:00","2009/7/24 13:00","2009/7/24 14:00","2009/7/24 15:00","2009/7/24 16:00","2009/7/24 17:00","2009/7/24 18:00","2009/7/24 19:00","2009/7/24 20:00","2009/7/24 21:00","2009/7/24 22:00","2009/7/24 23:00","2009/7/25 0:00","2009/7/25 1:00","2009/7/25 2:00","2009/7/25 3:00","2009/7/25 4:00","2009/7/25 5:00","2009/7/25 6:00","2009/7/25 7:00","2009/7/25 8:00","2009/7/25 9:00","2009/7/25 10:00","2009/7/25 11:00","2009/7/25 12:00","2009/7/25 13:00","2009/7/25 14:00","2009/7/25 15:00","2009/7/25 16:00","2009/7/25 17:00","2009/7/25 18:00","2009/7/25 19:00","2009/7/25 20:00","2009/7/25 21:00","2009/7/25 22:00","2009/7/25 23:00","2009/7/26 0:00","2009/7/26 1:00","2009/7/26 2:00","2009/7/26 3:00","2009/7/26 4:00","2009/7/26 5:00","2009/7/26 6:00","2009/7/26 7:00","2009/7/26 8:00","2009/7/26 9:00","2009/7/26 10:00","2009/7/26 11:00","2009/7/26 12:00","2009/7/26 13:00","2009/7/26 14:00","2009/7/26 15:00","2009/7/26 16:00","2009/7/26 17:00","2009/7/26 18:00","2009/7/26 19:00","2009/7/26 20:00","2009/7/26 21:00","2009/7/26 22:00","2009/7/26 23:00","2009/7/27 0:00","2009/7/27 1:00","2009/7/27 2:00","2009/7/27 3:00","2009/7/27 4:00","2009/7/27 5:00","2009/7/27 6:00","2009/7/27 7:00","2009/7/27 8:00","2009/7/27 9:00","2009/7/27 10:00","2009/7/27 11:00","2009/7/27 12:00","2009/7/27 13:00","2009/7/27 14:00","2009/7/27 15:00","2009/7/27 16:00","2009/7/27 17:00","2009/7/27 18:00","2009/7/27 19:00","2009/7/27 20:00","2009/7/27 21:00","2009/7/27 22:00","2009/7/27 23:00","2009/7/28 0:00","2009/7/28 1:00","2009/7/28 2:00","2009/7/28 3:00","2009/7/28 4:00","2009/7/28 5:00","2009/7/28 6:00","2009/7/28 7:00","2009/7/28 8:00","2009/7/28 9:00","2009/7/28 10:00","2009/7/28 11:00","2009/7/28 12:00","2009/7/28 13:00","2009/7/28 14:00","2009/7/28 15:00","2009/7/28 16:00","2009/7/28 17:00","2009/7/28 18:00","2009/7/28 19:00","2009/7/28 20:00","2009/7/28 21:00","2009/7/28 22:00","2009/7/28 23:00","2009/7/29 0:00","2009/7/29 1:00","2009/7/29 2:00","2009/7/29 3:00","2009/7/29 4:00","2009/7/29 5:00","2009/7/29 6:00","2009/7/29 7:00","2009/7/29 8:00","2009/7/29 9:00","2009/7/29 10:00","2009/7/29 11:00","2009/7/29 12:00","2009/7/29 13:00","2009/7/29 14:00","2009/7/29 15:00","2009/7/29 16:00","2009/7/29 17:00","2009/7/29 18:00","2009/7/29 19:00","2009/7/29 20:00","2009/7/29 21:00","2009/7/29 22:00","2009/7/29 23:00","2009/7/30 0:00","2009/7/30 1:00","2009/7/30 2:00","2009/7/30 3:00","2009/7/30 4:00","2009/7/30 5:00","2009/7/30 6:00","2009/7/30 7:00","2009/7/30 8:00","2009/7/30 9:00","2009/7/30 10:00","2009/7/30 11:00","2009/7/30 12:00","2009/7/30 13:00","2009/7/30 14:00","2009/7/30 15:00","2009/7/30 16:00","2009/7/30 17:00","2009/7/30 18:00","2009/7/30 19:00","2009/7/30 20:00","2009/7/30 21:00","2009/7/30 22:00","2009/7/30 23:00","2009/7/31 0:00","2009/7/31 1:00","2009/7/31 2:00","2009/7/31 3:00","2009/7/31 4:00","2009/7/31 5:00","2009/7/31 6:00","2009/7/31 7:00","2009/7/31 8:00","2009/7/31 9:00","2009/7/31 10:00","2009/7/31 11:00","2009/7/31 12:00","2009/7/31 13:00","2009/7/31 14:00","2009/7/31 15:00","2009/7/31 16:00","2009/7/31 17:00","2009/7/31 18:00","2009/7/31 19:00","2009/7/31 20:00","2009/7/31 21:00","2009/7/31 22:00","2009/7/31 23:00","2009/8/1 0:00","2009/8/1 1:00","2009/8/1 2:00","2009/8/1 3:00","2009/8/1 4:00","2009/8/1 5:00","2009/8/1 6:00","2009/8/1 7:00","2009/8/1 8:00","2009/8/1 9:00","2009/8/1 10:00","2009/8/1 11:00","2009/8/1 12:00","2009/8/1 13:00","2009/8/1 14:00","2009/8/1 15:00","2009/8/1 16:00","2009/8/1 17:00","2009/8/1 18:00","2009/8/1 19:00","2009/8/1 20:00","2009/8/1 21:00","2009/8/1 22:00","2009/8/1 23:00","2009/8/2 0:00","2009/8/2 1:00","2009/8/2 2:00","2009/8/2 3:00","2009/8/2 4:00","2009/8/2 5:00","2009/8/2 6:00","2009/8/2 7:00","2009/8/2 8:00","2009/8/2 9:00","2009/8/2 10:00","2009/8/2 11:00","2009/8/2 12:00","2009/8/2 13:00","2009/8/2 14:00","2009/8/2 15:00","2009/8/2 16:00","2009/8/2 17:00","2009/8/2 18:00","2009/8/2 19:00","2009/8/2 20:00","2009/8/2 21:00","2009/8/2 22:00","2009/8/2 23:00","2009/8/3 0:00","2009/8/3 1:00","2009/8/3 2:00","2009/8/3 3:00","2009/8/3 4:00","2009/8/3 5:00","2009/8/3 6:00","2009/8/3 7:00","2009/8/3 8:00","2009/8/3 9:00","2009/8/3 10:00","2009/8/3 11:00","2009/8/3 12:00","2009/8/3 13:00","2009/8/3 14:00","2009/8/3 15:00","2009/8/3 16:00","2009/8/3 17:00","2009/8/3 18:00","2009/8/3 19:00","2009/8/3 20:00","2009/8/3 21:00","2009/8/3 22:00","2009/8/3 23:00","2009/8/4 0:00","2009/8/4 1:00","2009/8/4 2:00","2009/8/4 3:00","2009/8/4 4:00","2009/8/4 5:00","2009/8/4 6:00","2009/8/4 7:00","2009/8/4 8:00","2009/8/4 9:00","2009/8/4 10:00","2009/8/4 11:00","2009/8/4 12:00","2009/8/4 13:00","2009/8/4 14:00","2009/8/4 15:00","2009/8/4 16:00","2009/8/4 17:00","2009/8/4 18:00","2009/8/4 19:00","2009/8/4 20:00","2009/8/4 21:00","2009/8/4 22:00","2009/8/4 23:00","2009/8/5 0:00","2009/8/5 1:00","2009/8/5 2:00","2009/8/5 3:00","2009/8/5 4:00","2009/8/5 5:00","2009/8/5 6:00","2009/8/5 7:00","2009/8/5 8:00","2009/8/5 9:00","2009/8/5 10:00","2009/8/5 11:00","2009/8/5 12:00","2009/8/5 13:00","2009/8/5 14:00","2009/8/5 15:00","2009/8/5 16:00","2009/8/5 17:00","2009/8/5 18:00","2009/8/5 19:00","2009/8/5 20:00","2009/8/5 21:00","2009/8/5 22:00","2009/8/5 23:00","2009/8/6 0:00","2009/8/6 1:00","2009/8/6 2:00","2009/8/6 3:00","2009/8/6 4:00","2009/8/6 5:00","2009/8/6 6:00","2009/8/6 7:00","2009/8/6 8:00","2009/8/6 9:00","2009/8/6 10:00","2009/8/6 11:00","2009/8/6 12:00","2009/8/6 13:00","2009/8/6 14:00","2009/8/6 15:00","2009/8/6 16:00","2009/8/6 17:00","2009/8/6 18:00","2009/8/6 19:00","2009/8/6 20:00","2009/8/6 21:00","2009/8/6 22:00","2009/8/6 23:00","2009/8/7 0:00","2009/8/7 1:00","2009/8/7 2:00","2009/8/7 3:00","2009/8/7 4:00","2009/8/7 5:00","2009/8/7 6:00","2009/8/7 7:00","2009/8/7 8:00","2009/8/7 9:00","2009/8/7 10:00","2009/8/7 11:00","2009/8/7 12:00","2009/8/7 13:00","2009/8/7 14:00","2009/8/7 15:00","2009/8/7 16:00","2009/8/7 17:00","2009/8/7 18:00","2009/8/7 19:00","2009/8/7 20:00","2009/8/7 21:00","2009/8/7 22:00","2009/8/7 23:00","2009/8/8 0:00","2009/8/8 1:00","2009/8/8 2:00","2009/8/8 3:00","2009/8/8 4:00","2009/8/8 5:00","2009/8/8 6:00","2009/8/8 7:00","2009/8/8 8:00","2009/8/8 9:00","2009/8/8 10:00","2009/8/8 11:00","2009/8/8 12:00","2009/8/8 13:00","2009/8/8 14:00","2009/8/8 15:00","2009/8/8 16:00","2009/8/8 17:00","2009/8/8 18:00","2009/8/8 19:00","2009/8/8 20:00","2009/8/8 21:00","2009/8/8 22:00","2009/8/8 23:00","2009/8/9 0:00","2009/8/9 1:00","2009/8/9 2:00","2009/8/9 3:00","2009/8/9 4:00","2009/8/9 5:00","2009/8/9 6:00","2009/8/9 7:00","2009/8/9 8:00","2009/8/9 9:00","2009/8/9 10:00","2009/8/9 11:00","2009/8/9 12:00","2009/8/9 13:00","2009/8/9 14:00","2009/8/9 15:00","2009/8/9 16:00","2009/8/9 17:00","2009/8/9 18:00","2009/8/9 19:00","2009/8/9 20:00","2009/8/9 21:00","2009/8/9 22:00","2009/8/9 23:00","2009/8/10 0:00","2009/8/10 1:00","2009/8/10 2:00","2009/8/10 3:00","2009/8/10 4:00","2009/8/10 5:00","2009/8/10 6:00","2009/8/10 7:00","2009/8/10 8:00","2009/8/10 9:00","2009/8/10 10:00","2009/8/10 11:00","2009/8/10 12:00","2009/8/10 13:00","2009/8/10 14:00","2009/8/10 15:00","2009/8/10 16:00","2009/8/10 17:00","2009/8/10 18:00","2009/8/10 19:00","2009/8/10 20:00","2009/8/10 21:00","2009/8/10 22:00","2009/8/10 23:00","2009/8/11 0:00","2009/8/11 1:00","2009/8/11 2:00","2009/8/11 3:00","2009/8/11 4:00","2009/8/11 5:00","2009/8/11 6:00","2009/8/11 7:00","2009/8/11 8:00","2009/8/11 9:00","2009/8/11 10:00","2009/8/11 11:00","2009/8/11 12:00","2009/8/11 13:00","2009/8/11 14:00","2009/8/11 15:00","2009/8/11 16:00","2009/8/11 17:00","2009/8/11 18:00","2009/8/11 19:00","2009/8/11 20:00","2009/8/11 21:00","2009/8/11 22:00","2009/8/11 23:00","2009/8/12 0:00","2009/8/12 1:00","2009/8/12 2:00","2009/8/12 3:00","2009/8/12 4:00","2009/8/12 5:00","2009/8/12 6:00","2009/8/12 7:00","2009/8/12 8:00","2009/8/12 9:00","2009/8/12 10:00","2009/8/12 11:00","2009/8/12 12:00","2009/8/12 13:00","2009/8/12 14:00","2009/8/12 15:00","2009/8/12 16:00","2009/8/12 17:00","2009/8/12 18:00","2009/8/12 19:00","2009/8/12 20:00","2009/8/12 21:00","2009/8/12 22:00","2009/8/12 23:00","2009/8/13 0:00","2009/8/13 1:00","2009/8/13 2:00","2009/8/13 3:00","2009/8/13 4:00","2009/8/13 5:00","2009/8/13 6:00","2009/8/13 7:00","2009/8/13 8:00","2009/8/13 9:00","2009/8/13 10:00","2009/8/13 11:00","2009/8/13 12:00","2009/8/13 13:00","2009/8/13 14:00","2009/8/13 15:00","2009/8/13 16:00","2009/8/13 17:00","2009/8/13 18:00","2009/8/13 19:00","2009/8/13 20:00","2009/8/13 21:00","2009/8/13 22:00","2009/8/13 23:00","2009/8/14 0:00","2009/8/14 1:00","2009/8/14 2:00","2009/8/14 3:00","2009/8/14 4:00","2009/8/14 5:00","2009/8/14 6:00","2009/8/14 7:00","2009/8/14 8:00","2009/8/14 9:00","2009/8/14 10:00","2009/8/14 11:00","2009/8/14 12:00","2009/8/14 13:00","2009/8/14 14:00","2009/8/14 15:00","2009/8/14 16:00","2009/8/14 17:00","2009/8/14 18:00","2009/8/14 19:00","2009/8/14 20:00","2009/8/14 21:00","2009/8/14 22:00","2009/8/14 23:00","2009/8/15 0:00","2009/8/15 1:00","2009/8/15 2:00","2009/8/15 3:00","2009/8/15 4:00","2009/8/15 5:00","2009/8/15 6:00","2009/8/15 7:00","2009/8/15 8:00","2009/8/15 9:00","2009/8/15 10:00","2009/8/15 11:00","2009/8/15 12:00","2009/8/15 13:00","2009/8/15 14:00","2009/8/15 15:00","2009/8/15 16:00","2009/8/15 17:00","2009/8/15 18:00","2009/8/15 19:00","2009/8/15 20:00","2009/8/15 21:00","2009/8/15 22:00","2009/8/15 23:00","2009/8/16 0:00","2009/8/16 1:00","2009/8/16 2:00","2009/8/16 3:00","2009/8/16 4:00","2009/8/16 5:00","2009/8/16 6:00","2009/8/16 7:00","2009/8/16 8:00","2009/8/16 9:00","2009/8/16 10:00","2009/8/16 11:00","2009/8/16 12:00","2009/8/16 13:00","2009/8/16 14:00","2009/8/16 15:00","2009/8/16 16:00","2009/8/16 17:00","2009/8/16 18:00","2009/8/16 19:00","2009/8/16 20:00","2009/8/16 21:00","2009/8/16 22:00","2009/8/16 23:00","2009/8/17 0:00","2009/8/17 1:00","2009/8/17 2:00","2009/8/17 3:00","2009/8/17 4:00","2009/8/17 5:00","2009/8/17 6:00","2009/8/17 7:00","2009/8/17 8:00","2009/8/17 9:00","2009/8/17 10:00","2009/8/17 11:00","2009/8/17 12:00","2009/8/17 13:00","2009/8/17 14:00","2009/8/17 15:00","2009/8/17 16:00","2009/8/17 17:00","2009/8/17 18:00","2009/8/17 19:00","2009/8/17 20:00","2009/8/17 21:00","2009/8/17 22:00","2009/8/17 23:00","2009/8/18 0:00","2009/8/18 1:00","2009/8/18 2:00","2009/8/18 3:00","2009/8/18 4:00","2009/8/18 5:00","2009/8/18 6:00","2009/8/18 7:00","2009/8/18 8:00","2009/8/18 9:00","2009/8/18 10:00","2009/8/18 11:00","2009/8/18 12:00","2009/8/18 13:00","2009/8/18 14:00","2009/8/18 15:00","2009/8/18 16:00","2009/8/18 17:00","2009/8/18 18:00","2009/8/18 19:00","2009/8/18 20:00","2009/8/18 21:00","2009/8/18 22:00","2009/8/18 23:00","2009/8/19 0:00","2009/8/19 1:00","2009/8/19 2:00","2009/8/19 3:00","2009/8/19 4:00","2009/8/19 5:00","2009/8/19 6:00","2009/8/19 7:00","2009/8/19 8:00","2009/8/19 9:00","2009/8/19 10:00","2009/8/19 11:00","2009/8/19 12:00","2009/8/19 13:00","2009/8/19 14:00","2009/8/19 15:00","2009/8/19 16:00","2009/8/19 17:00","2009/8/19 18:00","2009/8/19 19:00","2009/8/19 20:00","2009/8/19 21:00","2009/8/19 22:00","2009/8/19 23:00","2009/8/20 0:00","2009/8/20 1:00","2009/8/20 2:00","2009/8/20 3:00","2009/8/20 4:00","2009/8/20 5:00","2009/8/20 6:00","2009/8/20 7:00","2009/8/20 8:00","2009/8/20 9:00","2009/8/20 10:00","2009/8/20 11:00","2009/8/20 12:00","2009/8/20 13:00","2009/8/20 14:00","2009/8/20 15:00","2009/8/20 16:00","2009/8/20 17:00","2009/8/20 18:00","2009/8/20 19:00","2009/8/20 20:00","2009/8/20 21:00","2009/8/20 22:00","2009/8/20 23:00","2009/8/21 0:00","2009/8/21 1:00","2009/8/21 2:00","2009/8/21 3:00","2009/8/21 4:00","2009/8/21 5:00","2009/8/21 6:00","2009/8/21 7:00","2009/8/21 8:00","2009/8/21 9:00","2009/8/21 10:00","2009/8/21 11:00","2009/8/21 12:00","2009/8/21 13:00","2009/8/21 14:00","2009/8/21 15:00","2009/8/21 16:00","2009/8/21 17:00","2009/8/21 18:00","2009/8/21 19:00","2009/8/21 20:00","2009/8/21 21:00","2009/8/21 22:00","2009/8/21 23:00","2009/8/22 0:00","2009/8/22 1:00","2009/8/22 2:00","2009/8/22 3:00","2009/8/22 4:00","2009/8/22 5:00","2009/8/22 6:00","2009/8/22 7:00","2009/8/22 8:00","2009/8/22 9:00","2009/8/22 10:00","2009/8/22 11:00","2009/8/22 12:00","2009/8/22 13:00","2009/8/22 14:00","2009/8/22 15:00","2009/8/22 16:00","2009/8/22 17:00","2009/8/22 18:00","2009/8/22 19:00","2009/8/22 20:00","2009/8/22 21:00","2009/8/22 22:00","2009/8/22 23:00","2009/8/23 0:00","2009/8/23 1:00","2009/8/23 2:00","2009/8/23 3:00","2009/8/23 4:00","2009/8/23 5:00","2009/8/23 6:00","2009/8/23 7:00","2009/8/23 8:00","2009/8/23 9:00","2009/8/23 10:00","2009/8/23 11:00","2009/8/23 12:00","2009/8/23 13:00","2009/8/23 14:00","2009/8/23 15:00","2009/8/23 16:00","2009/8/23 17:00","2009/8/23 18:00","2009/8/23 19:00","2009/8/23 20:00","2009/8/23 21:00","2009/8/23 22:00","2009/8/23 23:00","2009/8/24 0:00","2009/8/24 1:00","2009/8/24 2:00","2009/8/24 3:00","2009/8/24 4:00","2009/8/24 5:00","2009/8/24 6:00","2009/8/24 7:00","2009/8/24 8:00","2009/8/24 9:00","2009/8/24 10:00","2009/8/24 11:00","2009/8/24 12:00","2009/8/24 13:00","2009/8/24 14:00","2009/8/24 15:00","2009/8/24 16:00","2009/8/24 17:00","2009/8/24 18:00","2009/8/24 19:00","2009/8/24 20:00","2009/8/24 21:00","2009/8/24 22:00","2009/8/24 23:00","2009/8/25 0:00","2009/8/25 1:00","2009/8/25 2:00","2009/8/25 3:00","2009/8/25 4:00","2009/8/25 5:00","2009/8/25 6:00","2009/8/25 7:00","2009/8/25 8:00","2009/8/25 9:00","2009/8/25 10:00","2009/8/25 11:00","2009/8/25 12:00","2009/8/25 13:00","2009/8/25 14:00","2009/8/25 15:00","2009/8/25 16:00","2009/8/25 17:00","2009/8/25 18:00","2009/8/25 19:00","2009/8/25 20:00","2009/8/25 21:00","2009/8/25 22:00","2009/8/25 23:00","2009/8/26 0:00","2009/8/26 1:00","2009/8/26 2:00","2009/8/26 3:00","2009/8/26 4:00","2009/8/26 5:00","2009/8/26 6:00","2009/8/26 7:00","2009/8/26 8:00","2009/8/26 9:00","2009/8/26 10:00","2009/8/26 11:00","2009/8/26 12:00","2009/8/26 13:00","2009/8/26 14:00","2009/8/26 15:00","2009/8/26 16:00","2009/8/26 17:00","2009/8/26 18:00","2009/8/26 19:00","2009/8/26 20:00","2009/8/26 21:00","2009/8/26 22:00","2009/8/26 23:00","2009/8/27 0:00","2009/8/27 1:00","2009/8/27 2:00","2009/8/27 3:00","2009/8/27 4:00","2009/8/27 5:00","2009/8/27 6:00","2009/8/27 7:00","2009/8/27 8:00","2009/8/27 9:00","2009/8/27 10:00","2009/8/27 11:00","2009/8/27 12:00","2009/8/27 13:00","2009/8/27 14:00","2009/8/27 15:00","2009/8/27 16:00","2009/8/27 17:00","2009/8/27 18:00","2009/8/27 19:00","2009/8/27 20:00","2009/8/27 21:00","2009/8/27 22:00","2009/8/27 23:00","2009/8/28 0:00","2009/8/28 1:00","2009/8/28 2:00","2009/8/28 3:00","2009/8/28 4:00","2009/8/28 5:00","2009/8/28 6:00","2009/8/28 7:00","2009/8/28 8:00","2009/8/28 9:00","2009/8/28 10:00","2009/8/28 11:00","2009/8/28 12:00","2009/8/28 13:00","2009/8/28 14:00","2009/8/28 15:00","2009/8/28 16:00","2009/8/28 17:00","2009/8/28 18:00","2009/8/28 19:00","2009/8/28 20:00","2009/8/28 21:00","2009/8/28 22:00","2009/8/28 23:00","2009/8/29 0:00","2009/8/29 1:00","2009/8/29 2:00","2009/8/29 3:00","2009/8/29 4:00","2009/8/29 5:00","2009/8/29 6:00","2009/8/29 7:00","2009/8/29 8:00","2009/8/29 9:00","2009/8/29 10:00","2009/8/29 11:00","2009/8/29 12:00","2009/8/29 13:00","2009/8/29 14:00","2009/8/29 15:00","2009/8/29 16:00","2009/8/29 17:00","2009/8/29 18:00","2009/8/29 19:00","2009/8/29 20:00","2009/8/29 21:00","2009/8/29 22:00","2009/8/29 23:00","2009/8/30 0:00","2009/8/30 1:00","2009/8/30 2:00","2009/8/30 3:00","2009/8/30 4:00","2009/8/30 5:00","2009/8/30 6:00","2009/8/30 7:00","2009/8/30 8:00","2009/8/30 9:00","2009/8/30 10:00","2009/8/30 11:00","2009/8/30 12:00","2009/8/30 13:00","2009/8/30 14:00","2009/8/30 15:00","2009/8/30 16:00","2009/8/30 17:00","2009/8/30 18:00","2009/8/30 19:00","2009/8/30 20:00","2009/8/30 21:00","2009/8/30 22:00","2009/8/30 23:00","2009/8/31 0:00","2009/8/31 1:00","2009/8/31 2:00","2009/8/31 3:00","2009/8/31 4:00","2009/8/31 5:00","2009/8/31 6:00","2009/8/31 7:00","2009/8/31 8:00","2009/8/31 9:00","2009/8/31 10:00","2009/8/31 11:00","2009/8/31 12:00","2009/8/31 13:00","2009/8/31 14:00","2009/8/31 15:00","2009/8/31 16:00","2009/8/31 17:00","2009/8/31 18:00","2009/8/31 19:00","2009/8/31 20:00","2009/8/31 21:00","2009/8/31 22:00","2009/8/31 23:00","2009/9/1 0:00","2009/9/1 1:00","2009/9/1 2:00","2009/9/1 3:00","2009/9/1 4:00","2009/9/1 5:00","2009/9/1 6:00","2009/9/1 7:00","2009/9/1 8:00","2009/9/1 9:00","2009/9/1 10:00","2009/9/1 11:00","2009/9/1 12:00","2009/9/1 13:00","2009/9/1 14:00","2009/9/1 15:00","2009/9/1 16:00","2009/9/1 17:00","2009/9/1 18:00","2009/9/1 19:00","2009/9/1 20:00","2009/9/1 21:00","2009/9/1 22:00","2009/9/1 23:00","2009/9/2 0:00","2009/9/2 1:00","2009/9/2 2:00","2009/9/2 3:00","2009/9/2 4:00","2009/9/2 5:00","2009/9/2 6:00","2009/9/2 7:00","2009/9/2 8:00","2009/9/2 9:00","2009/9/2 10:00","2009/9/2 11:00","2009/9/2 12:00","2009/9/2 13:00","2009/9/2 14:00","2009/9/2 15:00","2009/9/2 16:00","2009/9/2 17:00","2009/9/2 18:00","2009/9/2 19:00","2009/9/2 20:00","2009/9/2 21:00","2009/9/2 22:00","2009/9/2 23:00","2009/9/3 0:00","2009/9/3 1:00","2009/9/3 2:00","2009/9/3 3:00","2009/9/3 4:00","2009/9/3 5:00","2009/9/3 6:00","2009/9/3 7:00","2009/9/3 8:00","2009/9/3 9:00","2009/9/3 10:00","2009/9/3 11:00","2009/9/3 12:00","2009/9/3 13:00","2009/9/3 14:00","2009/9/3 15:00","2009/9/3 16:00","2009/9/3 17:00","2009/9/3 18:00","2009/9/3 19:00","2009/9/3 20:00","2009/9/3 21:00","2009/9/3 22:00","2009/9/3 23:00","2009/9/4 0:00","2009/9/4 1:00","2009/9/4 2:00","2009/9/4 3:00","2009/9/4 4:00","2009/9/4 5:00","2009/9/4 6:00","2009/9/4 7:00","2009/9/4 8:00","2009/9/4 9:00","2009/9/4 10:00","2009/9/4 11:00","2009/9/4 12:00","2009/9/4 13:00","2009/9/4 14:00","2009/9/4 15:00","2009/9/4 16:00","2009/9/4 17:00","2009/9/4 18:00","2009/9/4 19:00","2009/9/4 20:00","2009/9/4 21:00","2009/9/4 22:00","2009/9/4 23:00","2009/9/5 0:00","2009/9/5 1:00","2009/9/5 2:00","2009/9/5 3:00","2009/9/5 4:00","2009/9/5 5:00","2009/9/5 6:00","2009/9/5 7:00","2009/9/5 8:00","2009/9/5 9:00","2009/9/5 10:00","2009/9/5 11:00","2009/9/5 12:00","2009/9/5 13:00","2009/9/5 14:00","2009/9/5 15:00","2009/9/5 16:00","2009/9/5 17:00","2009/9/5 18:00","2009/9/5 19:00","2009/9/5 20:00","2009/9/5 21:00","2009/9/5 22:00","2009/9/5 23:00","2009/9/6 0:00","2009/9/6 1:00","2009/9/6 2:00","2009/9/6 3:00","2009/9/6 4:00","2009/9/6 5:00","2009/9/6 6:00","2009/9/6 7:00","2009/9/6 8:00","2009/9/6 9:00","2009/9/6 10:00","2009/9/6 11:00","2009/9/6 12:00","2009/9/6 13:00","2009/9/6 14:00","2009/9/6 15:00","2009/9/6 16:00","2009/9/6 17:00","2009/9/6 18:00","2009/9/6 19:00","2009/9/6 20:00","2009/9/6 21:00","2009/9/6 22:00","2009/9/6 23:00","2009/9/7 0:00","2009/9/7 1:00","2009/9/7 2:00","2009/9/7 3:00","2009/9/7 4:00","2009/9/7 5:00","2009/9/7 6:00","2009/9/7 7:00","2009/9/7 8:00","2009/9/7 9:00","2009/9/7 10:00","2009/9/7 11:00","2009/9/7 12:00","2009/9/7 13:00","2009/9/7 14:00","2009/9/7 15:00","2009/9/7 16:00","2009/9/7 17:00","2009/9/7 18:00","2009/9/7 19:00","2009/9/7 20:00","2009/9/7 21:00","2009/9/7 22:00","2009/9/7 23:00","2009/9/8 0:00","2009/9/8 1:00","2009/9/8 2:00","2009/9/8 3:00","2009/9/8 4:00","2009/9/8 5:00","2009/9/8 6:00","2009/9/8 7:00","2009/9/8 8:00","2009/9/8 9:00","2009/9/8 10:00","2009/9/8 11:00","2009/9/8 12:00","2009/9/8 13:00","2009/9/8 14:00","2009/9/8 15:00","2009/9/8 16:00","2009/9/8 17:00","2009/9/8 18:00","2009/9/8 19:00","2009/9/8 20:00","2009/9/8 21:00","2009/9/8 22:00","2009/9/8 23:00","2009/9/9 0:00","2009/9/9 1:00","2009/9/9 2:00","2009/9/9 3:00","2009/9/9 4:00","2009/9/9 5:00","2009/9/9 6:00","2009/9/9 7:00","2009/9/9 8:00","2009/9/9 9:00","2009/9/9 10:00","2009/9/9 11:00","2009/9/9 12:00","2009/9/9 13:00","2009/9/9 14:00","2009/9/9 15:00","2009/9/9 16:00","2009/9/9 17:00","2009/9/9 18:00","2009/9/9 19:00","2009/9/9 20:00","2009/9/9 21:00","2009/9/9 22:00","2009/9/9 23:00","2009/9/10 0:00","2009/9/10 1:00","2009/9/10 2:00","2009/9/10 3:00","2009/9/10 4:00","2009/9/10 5:00","2009/9/10 6:00","2009/9/10 7:00","2009/9/10 8:00","2009/9/10 9:00","2009/9/10 10:00","2009/9/10 11:00","2009/9/10 12:00","2009/9/10 13:00","2009/9/10 14:00","2009/9/10 15:00","2009/9/10 16:00","2009/9/10 17:00","2009/9/10 18:00","2009/9/10 19:00","2009/9/10 20:00","2009/9/10 21:00","2009/9/10 22:00","2009/9/10 23:00","2009/9/11 0:00","2009/9/11 1:00","2009/9/11 2:00","2009/9/11 3:00","2009/9/11 4:00","2009/9/11 5:00","2009/9/11 6:00","2009/9/11 7:00","2009/9/11 8:00","2009/9/11 9:00","2009/9/11 10:00","2009/9/11 11:00","2009/9/11 12:00","2009/9/11 13:00","2009/9/11 14:00","2009/9/11 15:00","2009/9/11 16:00","2009/9/11 17:00","2009/9/11 18:00","2009/9/11 19:00","2009/9/11 20:00","2009/9/11 21:00","2009/9/11 22:00","2009/9/11 23:00","2009/9/12 0:00","2009/9/12 1:00","2009/9/12 2:00","2009/9/12 3:00","2009/9/12 4:00","2009/9/12 5:00","2009/9/12 6:00","2009/9/12 7:00","2009/9/12 8:00","2009/9/12 9:00","2009/9/12 10:00","2009/9/12 11:00","2009/9/12 12:00","2009/9/12 13:00","2009/9/12 14:00","2009/9/12 15:00","2009/9/12 16:00","2009/9/12 17:00","2009/9/12 18:00","2009/9/12 19:00","2009/9/12 20:00","2009/9/12 21:00","2009/9/12 22:00","2009/9/12 23:00","2009/9/13 0:00","2009/9/13 1:00","2009/9/13 2:00","2009/9/13 3:00","2009/9/13 4:00","2009/9/13 5:00","2009/9/13 6:00","2009/9/13 7:00","2009/9/13 8:00","2009/9/13 9:00","2009/9/13 10:00","2009/9/13 11:00","2009/9/13 12:00","2009/9/13 13:00","2009/9/13 14:00","2009/9/13 15:00","2009/9/13 16:00","2009/9/13 17:00","2009/9/13 18:00","2009/9/13 19:00","2009/9/13 20:00","2009/9/13 21:00","2009/9/13 22:00","2009/9/13 23:00","2009/9/14 0:00","2009/9/14 1:00","2009/9/14 2:00","2009/9/14 3:00","2009/9/14 4:00","2009/9/14 5:00","2009/9/14 6:00","2009/9/14 7:00","2009/9/14 8:00","2009/9/14 9:00","2009/9/14 10:00","2009/9/14 11:00","2009/9/14 12:00","2009/9/14 13:00","2009/9/14 14:00","2009/9/14 15:00","2009/9/14 16:00","2009/9/14 17:00","2009/9/14 18:00","2009/9/14 19:00","2009/9/14 20:00","2009/9/14 21:00","2009/9/14 22:00","2009/9/14 23:00","2009/9/15 0:00","2009/9/15 1:00","2009/9/15 2:00","2009/9/15 3:00","2009/9/15 4:00","2009/9/15 5:00","2009/9/15 6:00","2009/9/15 7:00","2009/9/15 8:00","2009/9/15 9:00","2009/9/15 10:00","2009/9/15 11:00","2009/9/15 12:00","2009/9/15 13:00","2009/9/15 14:00","2009/9/15 15:00","2009/9/15 16:00","2009/9/15 17:00","2009/9/15 18:00","2009/9/15 19:00","2009/9/15 20:00","2009/9/15 21:00","2009/9/15 22:00","2009/9/15 23:00","2009/9/16 0:00","2009/9/16 1:00","2009/9/16 2:00","2009/9/16 3:00","2009/9/16 4:00","2009/9/16 5:00","2009/9/16 6:00","2009/9/16 7:00","2009/9/16 8:00","2009/9/16 9:00","2009/9/16 10:00","2009/9/16 11:00","2009/9/16 12:00","2009/9/16 13:00","2009/9/16 14:00","2009/9/16 15:00","2009/9/16 16:00","2009/9/16 17:00","2009/9/16 18:00","2009/9/16 19:00","2009/9/16 20:00","2009/9/16 21:00","2009/9/16 22:00","2009/9/16 23:00","2009/9/17 0:00","2009/9/17 1:00","2009/9/17 2:00","2009/9/17 3:00","2009/9/17 4:00","2009/9/17 5:00","2009/9/17 6:00","2009/9/17 7:00","2009/9/17 8:00","2009/9/17 9:00","2009/9/17 10:00","2009/9/17 11:00","2009/9/17 12:00","2009/9/17 13:00","2009/9/17 14:00","2009/9/17 15:00","2009/9/17 16:00","2009/9/17 17:00","2009/9/17 18:00","2009/9/17 19:00","2009/9/17 20:00","2009/9/17 21:00","2009/9/17 22:00","2009/9/17 23:00","2009/9/18 0:00","2009/9/18 1:00","2009/9/18 2:00","2009/9/18 3:00","2009/9/18 4:00","2009/9/18 5:00","2009/9/18 6:00","2009/9/18 7:00","2009/9/18 8:00","2009/9/18 9:00","2009/9/18 10:00","2009/9/18 11:00","2009/9/18 12:00","2009/9/18 13:00","2009/9/18 14:00","2009/9/18 15:00","2009/9/18 16:00","2009/9/18 17:00","2009/9/18 18:00","2009/9/18 19:00","2009/9/18 20:00","2009/9/18 21:00","2009/9/18 22:00","2009/9/18 23:00","2009/9/19 0:00","2009/9/19 1:00","2009/9/19 2:00","2009/9/19 3:00","2009/9/19 4:00","2009/9/19 5:00","2009/9/19 6:00","2009/9/19 7:00","2009/9/19 8:00","2009/9/19 9:00","2009/9/19 10:00","2009/9/19 11:00","2009/9/19 12:00","2009/9/19 13:00","2009/9/19 14:00","2009/9/19 15:00","2009/9/19 16:00","2009/9/19 17:00","2009/9/19 18:00","2009/9/19 19:00","2009/9/19 20:00","2009/9/19 21:00","2009/9/19 22:00","2009/9/19 23:00","2009/9/20 0:00","2009/9/20 1:00","2009/9/20 2:00","2009/9/20 3:00","2009/9/20 4:00","2009/9/20 5:00","2009/9/20 6:00","2009/9/20 7:00","2009/9/20 8:00","2009/9/20 9:00","2009/9/20 10:00","2009/9/20 11:00","2009/9/20 12:00","2009/9/20 13:00","2009/9/20 14:00","2009/9/20 15:00","2009/9/20 16:00","2009/9/20 17:00","2009/9/20 18:00","2009/9/20 19:00","2009/9/20 20:00","2009/9/20 21:00","2009/9/20 22:00","2009/9/20 23:00","2009/9/21 0:00","2009/9/21 1:00","2009/9/21 2:00","2009/9/21 3:00","2009/9/21 4:00","2009/9/21 5:00","2009/9/21 6:00","2009/9/21 7:00","2009/9/21 8:00","2009/9/21 9:00","2009/9/21 10:00","2009/9/21 11:00","2009/9/21 12:00","2009/9/21 13:00","2009/9/21 14:00","2009/9/21 15:00","2009/9/21 16:00","2009/9/21 17:00","2009/9/21 18:00","2009/9/21 19:00","2009/9/21 20:00","2009/9/21 21:00","2009/9/21 22:00","2009/9/21 23:00","2009/9/22 0:00","2009/9/22 1:00","2009/9/22 2:00","2009/9/22 3:00","2009/9/22 4:00","2009/9/22 5:00","2009/9/22 6:00","2009/9/22 7:00","2009/9/22 8:00","2009/9/22 9:00","2009/9/22 10:00","2009/9/22 11:00","2009/9/22 12:00","2009/9/22 13:00","2009/9/22 14:00","2009/9/22 15:00","2009/9/22 16:00","2009/9/22 17:00","2009/9/22 18:00","2009/9/22 19:00","2009/9/22 20:00","2009/9/22 21:00","2009/9/22 22:00","2009/9/22 23:00","2009/9/23 0:00","2009/9/23 1:00","2009/9/23 2:00","2009/9/23 3:00","2009/9/23 4:00","2009/9/23 5:00","2009/9/23 6:00","2009/9/23 7:00","2009/9/23 8:00","2009/9/23 9:00","2009/9/23 10:00","2009/9/23 11:00","2009/9/23 12:00","2009/9/23 13:00","2009/9/23 14:00","2009/9/23 15:00","2009/9/23 16:00","2009/9/23 17:00","2009/9/23 18:00","2009/9/23 19:00","2009/9/23 20:00","2009/9/23 21:00","2009/9/23 22:00","2009/9/23 23:00","2009/9/24 0:00","2009/9/24 1:00","2009/9/24 2:00","2009/9/24 3:00","2009/9/24 4:00","2009/9/24 5:00","2009/9/24 6:00","2009/9/24 7:00","2009/9/24 8:00","2009/9/24 9:00","2009/9/24 10:00","2009/9/24 11:00","2009/9/24 12:00","2009/9/24 13:00","2009/9/24 14:00","2009/9/24 15:00","2009/9/24 16:00","2009/9/24 17:00","2009/9/24 18:00","2009/9/24 19:00","2009/9/24 20:00","2009/9/24 21:00","2009/9/24 22:00","2009/9/24 23:00","2009/9/25 0:00","2009/9/25 1:00","2009/9/25 2:00","2009/9/25 3:00","2009/9/25 4:00","2009/9/25 5:00","2009/9/25 6:00","2009/9/25 7:00","2009/9/25 8:00","2009/9/25 9:00","2009/9/25 10:00","2009/9/25 11:00","2009/9/25 12:00","2009/9/25 13:00","2009/9/25 14:00","2009/9/25 15:00","2009/9/25 16:00","2009/9/25 17:00","2009/9/25 18:00","2009/9/25 19:00","2009/9/25 20:00","2009/9/25 21:00","2009/9/25 22:00","2009/9/25 23:00","2009/9/26 0:00","2009/9/26 1:00","2009/9/26 2:00","2009/9/26 3:00","2009/9/26 4:00","2009/9/26 5:00","2009/9/26 6:00","2009/9/26 7:00","2009/9/26 8:00","2009/9/26 9:00","2009/9/26 10:00","2009/9/26 11:00","2009/9/26 12:00","2009/9/26 13:00","2009/9/26 14:00","2009/9/26 15:00","2009/9/26 16:00","2009/9/26 17:00","2009/9/26 18:00","2009/9/26 19:00","2009/9/26 20:00","2009/9/26 21:00","2009/9/26 22:00","2009/9/26 23:00","2009/9/27 0:00","2009/9/27 1:00","2009/9/27 2:00","2009/9/27 3:00","2009/9/27 4:00","2009/9/27 5:00","2009/9/27 6:00","2009/9/27 7:00","2009/9/27 8:00","2009/9/27 9:00","2009/9/27 10:00","2009/9/27 11:00","2009/9/27 12:00","2009/9/27 13:00","2009/9/27 14:00","2009/9/27 15:00","2009/9/27 16:00","2009/9/27 17:00","2009/9/27 18:00","2009/9/27 19:00","2009/9/27 20:00","2009/9/27 21:00","2009/9/27 22:00","2009/9/27 23:00","2009/9/28 0:00","2009/9/28 1:00","2009/9/28 2:00","2009/9/28 3:00","2009/9/28 4:00","2009/9/28 5:00","2009/9/28 6:00","2009/9/28 7:00","2009/9/28 8:00","2009/9/28 9:00","2009/9/28 10:00","2009/9/28 11:00","2009/9/28 12:00","2009/9/28 13:00","2009/9/28 14:00","2009/9/28 15:00","2009/9/28 16:00","2009/9/28 17:00","2009/9/28 18:00","2009/9/28 19:00","2009/9/28 20:00","2009/9/28 21:00","2009/9/28 22:00","2009/9/28 23:00","2009/9/29 0:00","2009/9/29 1:00","2009/9/29 2:00","2009/9/29 3:00","2009/9/29 4:00","2009/9/29 5:00","2009/9/29 6:00","2009/9/29 7:00","2009/9/29 8:00","2009/9/29 9:00","2009/9/29 10:00","2009/9/29 11:00","2009/9/29 12:00","2009/9/29 13:00","2009/9/29 14:00","2009/9/29 15:00","2009/9/29 16:00","2009/9/29 17:00","2009/9/29 18:00","2009/9/29 19:00","2009/9/29 20:00","2009/9/29 21:00","2009/9/29 22:00","2009/9/29 23:00","2009/9/30 0:00","2009/9/30 1:00","2009/9/30 2:00","2009/9/30 3:00","2009/9/30 4:00","2009/9/30 5:00","2009/9/30 6:00","2009/9/30 7:00","2009/9/30 8:00","2009/9/30 9:00","2009/9/30 10:00","2009/9/30 11:00","2009/9/30 12:00","2009/9/30 13:00","2009/9/30 14:00","2009/9/30 15:00","2009/9/30 16:00","2009/9/30 17:00","2009/9/30 18:00","2009/9/30 19:00","2009/9/30 20:00","2009/9/30 21:00","2009/9/30 22:00","2009/9/30 23:00","2009/10/1 0:00","2009/10/1 1:00","2009/10/1 2:00","2009/10/1 3:00","2009/10/1 4:00","2009/10/1 5:00","2009/10/1 6:00","2009/10/1 7:00","2009/10/1 8:00","2009/10/1 9:00","2009/10/1 10:00","2009/10/1 11:00","2009/10/1 12:00","2009/10/1 13:00","2009/10/1 14:00","2009/10/1 15:00","2009/10/1 16:00","2009/10/1 17:00","2009/10/1 18:00","2009/10/1 19:00","2009/10/1 20:00","2009/10/1 21:00","2009/10/1 22:00","2009/10/1 23:00","2009/10/2 0:00","2009/10/2 1:00","2009/10/2 2:00","2009/10/2 3:00","2009/10/2 4:00","2009/10/2 5:00","2009/10/2 6:00","2009/10/2 7:00","2009/10/2 8:00","2009/10/2 9:00","2009/10/2 10:00","2009/10/2 11:00","2009/10/2 12:00","2009/10/2 13:00","2009/10/2 14:00","2009/10/2 15:00","2009/10/2 16:00","2009/10/2 17:00","2009/10/2 18:00","2009/10/2 19:00","2009/10/2 20:00","2009/10/2 21:00","2009/10/2 22:00","2009/10/2 23:00","2009/10/3 0:00","2009/10/3 1:00","2009/10/3 2:00","2009/10/3 3:00","2009/10/3 4:00","2009/10/3 5:00","2009/10/3 6:00","2009/10/3 7:00","2009/10/3 8:00","2009/10/3 9:00","2009/10/3 10:00","2009/10/3 11:00","2009/10/3 12:00","2009/10/3 13:00","2009/10/3 14:00","2009/10/3 15:00","2009/10/3 16:00","2009/10/3 17:00","2009/10/3 18:00","2009/10/3 19:00","2009/10/3 20:00","2009/10/3 21:00","2009/10/3 22:00","2009/10/3 23:00","2009/10/4 0:00","2009/10/4 1:00","2009/10/4 2:00","2009/10/4 3:00","2009/10/4 4:00","2009/10/4 5:00","2009/10/4 6:00","2009/10/4 7:00","2009/10/4 8:00","2009/10/4 9:00","2009/10/4 10:00","2009/10/4 11:00","2009/10/4 12:00","2009/10/4 13:00","2009/10/4 14:00","2009/10/4 15:00","2009/10/4 16:00","2009/10/4 17:00","2009/10/4 18:00","2009/10/4 19:00","2009/10/4 20:00","2009/10/4 21:00","2009/10/4 22:00","2009/10/4 23:00","2009/10/5 0:00","2009/10/5 1:00","2009/10/5 2:00","2009/10/5 3:00","2009/10/5 4:00","2009/10/5 5:00","2009/10/5 6:00","2009/10/5 7:00","2009/10/5 8:00","2009/10/5 9:00","2009/10/5 10:00","2009/10/5 11:00","2009/10/5 12:00","2009/10/5 13:00","2009/10/5 14:00","2009/10/5 15:00","2009/10/5 16:00","2009/10/5 17:00","2009/10/5 18:00","2009/10/5 19:00","2009/10/5 20:00","2009/10/5 21:00","2009/10/5 22:00","2009/10/5 23:00","2009/10/6 0:00","2009/10/6 1:00","2009/10/6 2:00","2009/10/6 3:00","2009/10/6 4:00","2009/10/6 5:00","2009/10/6 6:00","2009/10/6 7:00","2009/10/6 8:00","2009/10/6 9:00","2009/10/6 10:00","2009/10/6 11:00","2009/10/6 12:00","2009/10/6 13:00","2009/10/6 14:00","2009/10/6 15:00","2009/10/6 16:00","2009/10/6 17:00","2009/10/6 18:00","2009/10/6 19:00","2009/10/6 20:00","2009/10/6 21:00","2009/10/6 22:00","2009/10/6 23:00","2009/10/7 0:00","2009/10/7 1:00","2009/10/7 2:00","2009/10/7 3:00","2009/10/7 4:00","2009/10/7 5:00","2009/10/7 6:00","2009/10/7 7:00","2009/10/7 8:00","2009/10/7 9:00","2009/10/7 10:00","2009/10/7 11:00","2009/10/7 12:00","2009/10/7 13:00","2009/10/7 14:00","2009/10/7 15:00","2009/10/7 16:00","2009/10/7 17:00","2009/10/7 18:00","2009/10/7 19:00","2009/10/7 20:00","2009/10/7 21:00","2009/10/7 22:00","2009/10/7 23:00","2009/10/8 0:00","2009/10/8 1:00","2009/10/8 2:00","2009/10/8 3:00","2009/10/8 4:00","2009/10/8 5:00","2009/10/8 6:00","2009/10/8 7:00","2009/10/8 8:00","2009/10/8 9:00","2009/10/8 10:00","2009/10/8 11:00","2009/10/8 12:00","2009/10/8 13:00","2009/10/8 14:00","2009/10/8 15:00","2009/10/8 16:00","2009/10/8 17:00","2009/10/8 18:00","2009/10/8 19:00","2009/10/8 20:00","2009/10/8 21:00","2009/10/8 22:00","2009/10/8 23:00","2009/10/9 0:00","2009/10/9 1:00","2009/10/9 2:00","2009/10/9 3:00","2009/10/9 4:00","2009/10/9 5:00","2009/10/9 6:00","2009/10/9 7:00","2009/10/9 8:00","2009/10/9 9:00","2009/10/9 10:00","2009/10/9 11:00","2009/10/9 12:00","2009/10/9 13:00","2009/10/9 14:00","2009/10/9 15:00","2009/10/9 16:00","2009/10/9 17:00","2009/10/9 18:00","2009/10/9 19:00","2009/10/9 20:00","2009/10/9 21:00","2009/10/9 22:00","2009/10/9 23:00","2009/10/10 0:00","2009/10/10 1:00","2009/10/10 2:00","2009/10/10 3:00","2009/10/10 4:00","2009/10/10 5:00","2009/10/10 6:00","2009/10/10 7:00","2009/10/10 8:00","2009/10/10 9:00","2009/10/10 10:00","2009/10/10 11:00","2009/10/10 12:00","2009/10/10 13:00","2009/10/10 14:00","2009/10/10 15:00","2009/10/10 16:00","2009/10/10 17:00","2009/10/10 18:00","2009/10/10 19:00","2009/10/10 20:00","2009/10/10 21:00","2009/10/10 22:00","2009/10/10 23:00","2009/10/11 0:00","2009/10/11 1:00","2009/10/11 2:00","2009/10/11 3:00","2009/10/11 4:00","2009/10/11 5:00","2009/10/11 6:00","2009/10/11 7:00","2009/10/11 8:00","2009/10/11 9:00","2009/10/11 10:00","2009/10/11 11:00","2009/10/11 12:00","2009/10/11 13:00","2009/10/11 14:00","2009/10/11 15:00","2009/10/11 16:00","2009/10/11 17:00","2009/10/11 18:00","2009/10/11 19:00","2009/10/11 20:00","2009/10/11 21:00","2009/10/11 22:00","2009/10/11 23:00","2009/10/12 0:00","2009/10/12 1:00","2009/10/12 2:00","2009/10/12 3:00","2009/10/12 4:00","2009/10/12 5:00","2009/10/12 6:00","2009/10/12 7:00","2009/10/12 8:00","2009/10/12 9:00","2009/10/12 10:00","2009/10/12 11:00","2009/10/12 12:00","2009/10/12 13:00","2009/10/12 14:00","2009/10/12 15:00","2009/10/12 16:00","2009/10/12 17:00","2009/10/12 18:00","2009/10/12 19:00","2009/10/12 20:00","2009/10/12 21:00","2009/10/12 22:00","2009/10/12 23:00","2009/10/13 0:00","2009/10/13 1:00","2009/10/13 2:00","2009/10/13 3:00","2009/10/13 4:00","2009/10/13 5:00","2009/10/13 6:00","2009/10/13 7:00","2009/10/13 8:00","2009/10/13 9:00","2009/10/13 10:00","2009/10/13 11:00","2009/10/13 12:00","2009/10/13 13:00","2009/10/13 14:00","2009/10/13 15:00","2009/10/13 16:00","2009/10/13 17:00","2009/10/13 18:00","2009/10/13 19:00","2009/10/13 20:00","2009/10/13 21:00","2009/10/13 22:00","2009/10/13 23:00","2009/10/14 0:00","2009/10/14 1:00","2009/10/14 2:00","2009/10/14 3:00","2009/10/14 4:00","2009/10/14 5:00","2009/10/14 6:00","2009/10/14 7:00","2009/10/14 8:00","2009/10/14 9:00","2009/10/14 10:00","2009/10/14 11:00","2009/10/14 12:00","2009/10/14 13:00","2009/10/14 14:00","2009/10/14 15:00","2009/10/14 16:00","2009/10/14 17:00","2009/10/14 18:00","2009/10/14 19:00","2009/10/14 20:00","2009/10/14 21:00","2009/10/14 22:00","2009/10/14 23:00","2009/10/15 0:00","2009/10/15 1:00","2009/10/15 2:00","2009/10/15 3:00","2009/10/15 4:00","2009/10/15 5:00","2009/10/15 6:00","2009/10/15 7:00","2009/10/15 8:00","2009/10/15 9:00","2009/10/15 10:00","2009/10/15 11:00","2009/10/15 12:00","2009/10/15 13:00","2009/10/15 14:00","2009/10/15 15:00","2009/10/15 16:00","2009/10/15 17:00","2009/10/15 18:00","2009/10/15 19:00","2009/10/15 20:00","2009/10/15 21:00","2009/10/15 22:00","2009/10/15 23:00","2009/10/16 0:00","2009/10/16 1:00","2009/10/16 2:00","2009/10/16 3:00","2009/10/16 4:00","2009/10/16 5:00","2009/10/16 6:00","2009/10/16 7:00","2009/10/16 8:00","2009/10/16 9:00","2009/10/16 10:00","2009/10/16 11:00","2009/10/16 12:00","2009/10/16 13:00","2009/10/16 14:00","2009/10/16 15:00","2009/10/16 16:00","2009/10/16 17:00","2009/10/16 18:00","2009/10/16 19:00","2009/10/16 20:00","2009/10/16 21:00","2009/10/16 22:00","2009/10/16 23:00","2009/10/17 0:00","2009/10/17 1:00","2009/10/17 2:00","2009/10/17 3:00","2009/10/17 4:00","2009/10/17 5:00","2009/10/17 6:00","2009/10/17 7:00","2009/10/17 8:00","2009/10/17 9:00","2009/10/17 10:00","2009/10/17 11:00","2009/10/17 12:00","2009/10/17 13:00","2009/10/17 14:00","2009/10/17 15:00","2009/10/17 16:00","2009/10/17 17:00","2009/10/17 18:00","2009/10/17 19:00","2009/10/17 20:00","2009/10/17 21:00","2009/10/17 22:00","2009/10/17 23:00","2009/10/18 0:00","2009/10/18 1:00","2009/10/18 2:00","2009/10/18 3:00","2009/10/18 4:00","2009/10/18 5:00","2009/10/18 6:00","2009/10/18 7:00","2009/10/18 8:00"] +}],yAxis:[{name:"流量(m^3/s)",type:"value",max:500},{name:"降雨量(mm)",type:"value",axisLabel:{formatter:function(e){return-e}}}],series:[{name:"流量",type:"line",itemStyle:{normal:{areaStyle:{type:"default"}}},data:[.97,.96,.96,.95,.95,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.93,.92,.91,.9,.89,.88,.87,.87,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.87,.88,.9,.93,.96,.99,1.03,1.06,1.1,1.14,1.17,1.2,1.23,1.26,1.29,1.33,1.36,1.4,1.43,1.45,1.48,1.49,1.51,1.51,1.5,1.49,1.47,1.44,1.41,1.37,1.34,1.3,1.27,1.24,1.22,1.2,1.19,1.18,1.16,1.15,1.14,1.13,1.12,1.11,1.11,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.1,1.09,1.09,1.08,1.07,1.06,1.05,1.04,1.03,1.03,1.02,1.01,1.01,1,.99,.98,.97,.96,.96,.95,.95,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.93,.92,.91,.9,.89,.88,.87,.87,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.85,.84,.83,.82,.81,.8,.8,.79,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.77,.75,.73,.71,.68,.65,.63,.61,.59,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.57,.57,.57,.56,.55,.55,.54,.54,.53,.52,.52,.51,.51,.5,.5,.49,.48,.48,.47,.47,.47,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.46,.52,.67,.9,1.19,1.52,1.87,2.22,2.55,2.84,3.07,3.22,3.28,3.28,3.28,3.28,3.28,3.28,3.28,3.28,3.28,3.28,3.28,3.28,3.28,3.24,3.13,2.97,2.77,2.54,2.3,2.05,1.82,1.62,1.46,1.35,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.31,1.3,1.26,1.21,1.14,1.06,.97,.89,.81,.74,.69,.65,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.63,.63,.62,.62,.61,.6,.59,.59,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.59,.61,.63,.65,.68,.71,.73,.75,.77,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.77,.75,.73,.71,.68,.65,.63,.61,.59,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.58,.59,.59,.6,.61,.62,.62,.63,.63,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.65,.66,.68,.69,.71,.73,.74,.76,.77,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.78,.79,.81,.82,.84,.86,.88,.9,.92,.93,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.94,.93,.92,.91,.9,.89,.88,.87,.87,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.86,.85,.84,.82,.8,.78,.76,.75,.73,.72,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.72,.73,.74,.76,.78,.79,.82,.84,.86,.89,.91,.94,.97,1,1.02,1.05,1.08,1.11,1.14,1.17,1.19,1.22,1.25,1.27,1.29,1.31,1.33,1.35,1.36,1.38,1.39,1.39,1.4,1.4,1.4,1.39,1.37,1.35,1.32,1.29,1.26,1.22,1.18,1.14,1.1,1.05,1.01,.97,.93,.89,.85,.82,.78,.76,.74,.72,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.72,.73,.74,.75,.77,.78,.8,.82,.84,.87,.89,.92,.94,.97,.99,1.02,1.05,1.08,1.1,1.13,1.16,1.18,1.21,1.23,1.26,1.28,1.3,1.32,1.34,1.35,1.37,1.38,1.39,1.4,1.41,1.41,1.42,1.42,1.43,1.43,1.43,1.44,1.44,1.44,1.44,1.45,1.45,1.45,1.46,1.46,1.46,1.47,1.47,1.48,1.48,1.49,1.5,1.51,1.54,1.62,1.73,1.88,2.05,2.24,2.45,2.67,2.89,3.11,3.31,3.51,3.69,3.86,4.03,4.18,4.33,4.48,4.62,4.76,4.89,5.02,5.16,5.29,5.43,5.57,5.71,5.86,6.02,6.18,6.36,6.54,6.73,6.93,7.15,7.38,7.62,7.88,8.16,8.46,8.77,9.11,9.46,9.84,10.24,10.67,11.12,11.6,12.3,13.66,16,38.43,82.21,146.6,218.7,226,225.23,223.08,219.78,212,199.82,184.6,168,151.65,137.21,126.31,119.94,115.52,112.06,108.92,105.44,101,94.56,86.36,77.67,69.76,63.9,60.38,57.41,54.84,52.57,50.56,48.71,46.97,45.25,43.48,41.6,39.5,37.19,34.81,32.46,30.27,28.36,26.85,25.86,25.5,25.5,25.5,25.5,25.5,25.5,25.5,25.5,25.5,25.5,25.5,25.5,25.5,25.27,24.65,23.7,22.52,21.17,19.75,18.33,16.98,15.8,14.85,14.23,14,14.02,14.08,14.17,14.29,14.44,14.61,14.8,15.01,15.23,15.47,15.71,15.95,16.19,16.43,16.67,16.89,17.1,17.29,17.46,17.61,17.73,17.82,17.88,17.9,17.63,16.88,15.75,14.33,12.71,10.98,9.23,7.56,6.05,4.81,3.92,3.47,3.28,3.1,2.93,2.76,2.61,2.46,2.32,2.19,2.07,1.96,1.85,1.75,1.66,1.58,1.51,1.44,1.39,1.34,1.29,1.26,1.23,1.22,1.2,1.2,1.2,1.2,1.2,1.2,1.21,1.21,1.21,1.21,1.22,1.22,1.22,1.23,1.23,1.23,1.24,1.24,1.25,1.25,1.25,1.26,1.26,1.27,1.27,1.27,1.28,1.28,1.28,1.29,1.29,1.29,1.29,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.3,1.29,1.29,1.29,1.29,1.28,1.28,1.28,1.27,1.27,1.26,1.25,1.25,1.24,1.23,1.23,1.22,1.21,1.2,1.16,1.06,.95,.83,.74,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.71,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.7,.69,.69,.69,.69,.69,.69,.69,.69,.68,.68,.68,.68,.68,.68,.67,.67,.67,.67,.67,.67,.67,.66,.66,.66,.66,.66,.66,.66,.65,.65,.65,.65,.65,.65,.65,.65,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.65,.66,.68,.69,.71,.73,.74,.76,.77,.78,.78,.78,.78,.78,.78,.78,.78,.8,.86,.95,1.08,1.25,1.46,1.7,1.97,2.28,2.63,3.01,3.42,3.87,4.35,4.86,5.4,5.98,6.59,7.92,10.49,14.04,18.31,23.04,27.98,32.87,37.45,41.46,44.64,46.74,47.5,46.86,45.16,42.77,40.04,37.33,35,32.74,30.21,27.7,25.5,23.9,23.2,23.06,22.94,22.84,22.77,22.72,22.7,22.8,23.23,23.95,24.91,26.04,27.3,28.76,30.7,33.39,37.12,42.15,48.77,65.22,252.1,257,237.32,221.19,212,208.67,206.89,205.2,202.15,189.82,172,165.3,160.49,156.8,153.44,149.62,144.6,138.27,131,123.11,114.9,106.69,98.79,91.5,85.13,80,75.53,71.03,66.65,62.54,58.85,55.73,53.31,51.75,51.2,56.53,68.25,80,91.01,102.03,109,112.37,115.29,117.68,119.48,120.61,121,119.45,115.57,110.52,105.47,101.58,100,99.97,99.94,99.92,99.9,99.88,99.86,99.85,99.84,99.83,99.82,99.81,99.81,99.8,99.8,99.8,122.15,163.65,186,182.96,175.15,164.56,153.18,143,136,131.37,126.98,122.81,118.85,115.09,111.52,108.13,104.9,101.83,98.9,96.11,93.44,90.87,88.41,86.04,83.74,81.51,79.33,77.2,75.1,73.02,70.95,68.88,66.8,64.87,63.14,61.4,59.53,57.67,56,54.6,53.36,52.2,51.05,49.85,48.5,46.87,44.92,42.74,40.42,38.04,35.69,33.46,31.44,29.72,28.38,27.51,27.2,27.2,27.2,27.2,27.2,27.2,27.2,27.2,27.2,27.2,27.2,27.2,27.2,27.14,26.97,26.7,26.35,25.95,25.49,25.02,24.53,24.04,23.58,23.16,22.8,22.46,22.11,21.75,21.39,21.03,20.69,20.36,20.05,19.78,19.54,19.35,19.2,19.09,19,18.92,18.85,18.79,18.74,18.68,18.62,18.56,18.49,18.4,18.3,18.17,18.02,17.83,17.63,17.41,17.18,16.93,16.68,16.43,16.18,15.93,15.7,15.47,15.22,14.97,14.71,14.45,14.18,13.93,13.68,13.44,13.21,13,12.8,12.62,12.46,12.31,12.16,12.03,11.89,11.76,11.62,11.48,11.33,11.17,11,10.81,10.59,10.36,10.12,9.86,9.61,9.36,9.12,8.89,8.68,8.5,8.35,8.21,8.08,7.94,7.81,7.68,7.56,7.46,7.36,7.29,7.23,7.19,7.18,7.51,8.42,9.81,11.58,13.63,15.86,18.16,20.44,22.58,24.49,26.06,27.2,28.08,28.95,29.81,30.65,31.48,32.28,33.07,33.82,34.55,35.25,35.92,36.56,37.15,37.71,38.23,38.7,39.13,39.5,39.83,40.1,40.31,40.47,40.57,40.6,40.49,40.16,39.64,38.94,38.09,37.1,36,34.79,33.51,32.17,30.79,29.39,27.99,26.6,25.25,23.96,22.75,21.63,20.63,19.76,19.04,18.49,18.14,18,17.97,17.95,17.94,17.92,17.91,17.9,17.89,17.88,17.87,17.85,17.83,17.8,17.7,17.46,17.13,16.7,16.21,15.68,15.13,14.57,14.04,13.56,13.14,12.8,12.52,12.27,12.02,11.79,11.57,11.37,11.16,10.97,10.78,10.59,10.39,10.2,10.01,9.81,9.63,9.44,9.26,9.08,8.9,8.73,8.56,8.39,8.22,8.06,7.9,7.73,7.57,7.41,7.25,7.09,6.94,6.79,6.65,6.52,6.4,6.28,6.17,6.08,5.98,5.9,5.81,5.73,5.65,5.57,5.49,5.41,5.32,5.23,5.14,5.04,4.94,4.84,4.74,4.63,4.53,4.43,4.33,4.23,4.13,4.03,3.93,3.81,3.69,3.57,3.45,3.33,3.22,3.12,3.04,2.98,2.93,2.92,2.92,2.92,2.92,2.92,2.92,2.92,2.92,2.92,2.92,2.92,2.92,2.92,2.9,2.86,2.8,2.71,2.62,2.52,2.42,2.33,2.24,2.18,2.14,2.12,2.12,2.12,2.12,2.12,2.12,2.12,2.12,2.12,2.12,2.12,2.12,2.12,2.1,2.06,2,1.91,1.82,1.71,1.61,1.5,1.4,1.32,1.25,1.2,1.16,1.13,1.1,1.06,1.03,1,.97,.93,.9,.87,.85,.82,.79,.77,.74,.72,.69,.67,.65,.63,.61,.59,.58,.56,.54,.53,.52,.51,.5,.49,.48,.48,.47,.47,.46,.46,.47,.48,.5,.53,.56,.59,.62,.64,.67,.69,.7,.71,.71,.71,.71,.7,.7,.7,.69,.69,.69,.68,.68,.67,.67,.67,.66,.66,.65,.65,.65,.65,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.64,.65,.65,.65,.66,.66,.67,.68,.69,.69,.7,.71,.73,.74,.75,.76,.78,.8,.81,.83,.85,.87,.89,.92,.94,.97,.99,1.02,1.05,1.08,1.11,1.15,1.18,1.32,1.66,2.21,2.97,3.94,5.11,6.5,8.1,9.9,11.92,14.15,16.6,22.3,22.8,24.48,30.38,35.74,42.4,57.14,94.04,112.9,123.4,130.4,130,119.4,120.7,116.8,118.1,119.4,124.8,143.5,204,294,319.2,328.4,365,350.8,347.6,347.6,325,331.6,319.2,308,308,308,308,296.8,300,281,278.4,270.6,271,253.6,233.5,219.2,207.8,205.9,204,189.6,178.8,173.4,160,154.4,146,145,140.5,130.4,126.2,116.8,112.9,106.5,101.6,98.51,82.67,67.3,80.05,76.12,72.3,71.02,69.78,67.3,67.3,68.54,57.6,71.02,66.06,59.12,57.14,55.16,55.16,52.19,52.19,51.2,48.56,44.16,43,45.92,49.44,44.16,36.48,35.74,35,32.36,37.22,32.36,32.36,32.36,33.68,32.36,31.7,35.74,29.72,32.36,30.38,29.72,28.4,28.4,28.4,27.28,25.6,25.04,23.92,22.3,21.8,21.8,21.8,22.8,21.8,25.6,22.8,22.8,17.8,16.04,16.04,16.04,16.04,16.04,16.04,16.04,16.04,16.04,16.04,15.02,14,14.03,14.11,14.25,14.45,14.72,15.06,15.46,15.95,16.51,17.15,17.87,18.69,19.59,20.59,21.69,22.88,24.18,25.59,27.1,28.73,30.48,32.34,34.33,36.44,38.69,41.06,43.57,46.22,49.01,51.95,55.04,58.27,61.66,65.21,68.92,72.8,88.09,104.9,105.7,110.3,111.6,110.3,106.5,105.7,103.3,100,97.02,98.8,91.07,83.98,88.09,81.36,78.74,77.43,77.43,73.5,74.81,72.63,68.58,66.4,68.54,69.78,67.3,64.82,61.1,59.12,56.15,53.18,50.32,49.44,44.16,36.5,42.4,37.96,37.22,33.68,36.48,35.74,35,35,37.22,37.22,39.44,32.6,34.54,36.48,35.74,34.34,33.68,33.02,31.04,29.72,29.72,29.72,26.16,25.6,29.72,18.3,22.3,21.3,21.8,21.8,20.3,20.8,25.04,25.04,25.6,25.6,25.04,25.6,25.04,25.6,23.92,25.04,21.3,21.8,22.3,21.8,20.8,16.1,20.3,18.3,13.22,19.3,19.3,18.3,14.4,13.86,13.36,12.9,12.48,12.1,11.75,11.43,11.15,10.9,10.67,10.48,10.31,10.16,10.04,9.93,9.85,9.78,9.73,9.69,9.67,9.65,9.65,12.08,8.67,11.7,11.38,10.65,9.84,9.32,9.07,8.85,8.66,8.49,8.35,8.22,8.1,7.98,7.86,7.74,7.61,7.47,7.31,7.14,6.96,6.78,6.58,6.39,6.19,5.99,5.78,5.58,5.39,5.2,5.01,4.83,4.67,4.51,4.37,4.24,4.12,4.02,3.95,3.89,3.85,3.84,4.41,5.77,7.39,8.75,9.32,9.18,9,8.94,8.88,8.83,8.78,8.73,8.68,8.64,8.6,8.56,8.53,8.5,8.47,8.45,8.42,8.4,8.39,8.37,8.36,8.35,8.35,8.34,8.34,8.67,9.65,9.62,9.53,9.4,9.21,8.98,8.7,8.4,8.06,7.69,7.3,6.89,6.47,6.03,5.59,5.14,4.7,4.26,3.83,3.42,3.02,2.65,2.3,1.98,1.7,1.45,1.25,1.09,.99,.94,.92,.91,.89,.87,.85,.84,.82,.81,.79,.78,.77,.75,.74,.73,.72,.71,.7,.69,.68,.67,.66,.65,.64,.64,.63,.63,.62,.62,.61,.61,.61,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.6,.61,.61,.61,.61,.61,.61,.62,.62,.62,.62,.63,.63,.63,.63,.63,.64,.64,.64,.64,.64,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.65,.64,.63,.62,.6,.59,.57,.55,.54,.53,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.51,.51,.51,.5,.5,.49,.48,.47,.47,.46,.45,.45,.44,.43,.42,.42,.41,.41,.41,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.41,.42,.43,.44,.46,.48,.5,.53,.55,.58,.61,.64,.67,.7,.73,.77,.8,.83,.87,.9,.93,.96,.99,1.02,1.05,1.08,1.1,1.12,1.14,1.16,1.17,1.18,1.19,1.2,1.2,1.2,1.19,1.17,1.15,1.12,1.09,1.06,1.02,.98,.94,.9,.86,.82,.78,.74,.7,.66,.63,.6,.57,.55,.53,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.52,.51,.51,.5,.5,.49,.49,.48,.47,.47,.47,.46,.46,.45,.45,.45,.44,.44,.44,.43,.43,.43,.42,.42,.42,.41,.41,.41,.41,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.4,.41,.41,.41,.41,.41,.41,.41,.41,.41,.41,.41,.41,.41,.41,.41,.42,.42,.42,.42,.42,.42,.42,.42,.42,.43,.43,.43,.43,.43,.43,.44,.44,.44,.44,.44,.44,.45,.45,.45]},{name:"降雨量",type:"line",yAxisIndex:1,itemStyle:{normal:{areaStyle:{type:"default"}}},data:function(){for(var e=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.005,.017,.017,.017,.017,.011,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.021,.026,.03,.036,.036,.195,.221,.019,.013,.017,.03,.03,.03,.046,.045,.038,.084,.045,.045,.037,.034,.035,.036,.044,.052,.048,.109,.033,.029,.04,.042,.042,.042,.073,.076,.062,.066,.066,.075,.096,.128,.121,.128,.14,.226,.143,.097,.018,0,0,0,0,0,.018,.047,.054,.054,.054,.036,.185,.009,.038,.061,.077,.091,.126,.69,.182,.349,.231,.146,.128,.167,.1,.075,.071,.071,.117,.01,.002,.002,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.005,.026,.038,.038,.038,.076,.086,.109,.213,.276,.288,.297,.642,1.799,1.236,2.138,.921,.497,.685,.828,.41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.018,.024,.024,.024,.024,.006,.003,.046,.046,.046,.046,.043,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.204,.303,1.028,1.328,1.524,1.41,1.362,1.292,1.191,.529,.501,.944,1.81,2.899,.859,.126,.087,.047,0,0,0,0,.011,.028,.028,.028,.028,.017,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.099,.159,.297,.309,.309,.614,.818,1.436,1.195,.553,.542,.955,.898,.466,.386,.556,.388,.221,.192,.192,.187,.166,.18,.302,.158,.009,.009,.009,.009,.009,.007,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.004,.032,.032,.032,.032,.082,.149,.204,.247,.262,.49,.51,.533,.746,.847,2.393,1.188,1.114,.475,.043,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.017,.017,.021,.042,.079,.111,.126,.122,.133,.846,.102,.077,.067,.056,.005,0,0,0,0,0,0,0,0,0,0,0,0,0,.011,.017,.017,.017,.017,.006,0,0,0,0,0,.01,.03,.054,.067,.07,.25,.251,.494,.065,.054,.054,.064,.084,.077,.101,.132,.248,.069,.117,.115,.087,.326,.036,.009,.009,.009,.009,.009,.004,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.02,.039,.04,.04,.04,.229,.079,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.023,.069,.082,.082,.082,.503,.774,.038,.012,.012,.012,.016,.02,.028,.051,.06,.064,.19,.15,.164,.139,.13,.085,.031,.023,.022,.007,.005,.005,.001,0,.02,.048,.048,.053,.056,.036,.008,.008,.004,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.013,.017,.036,.068,.095,.233,.272,.377,.722,1.494,3.756,.954,.439,.442,.462,.373,.249,.214,.1,.044,.037,.023,.002,0,0,0,0,0,0,.02,.024,.024,.024,.024,.004,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.008,.017,.017,.045,.186,.308,.241,.241,.893,4.067,4.494,5.015,3.494,2.057,1.411,.718,.407,.313,.339,1.537,1.105,.218,.136,.03,.005,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.037,.448,1.2,1.309,1.309,1.425,1.223,.471,.767,.423,.273,.412,.646,.481,.239,.131,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.044,.15,.223,.388,.513,.883,2.828,4.786,5.959,4.95,6.434,6.319,3.35,2.806,4.204,1.395,1.015,1.015,.836,.74,.72,.615,.477,.192,.046,.007,.007,.007,.007,.007,.007,.007,.008,.005,.005,.005,.005,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.001,.012,.012,.012,.012,.011,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.002,.012,.028,.028,.028,.138,.092,.082,.082,.096,.719,.155,.042,.047,.129,.021,.021,.014,.009,.029,.067,.088,.095,.095,.138,.091,.032,.025,.025,.003,0,0,0,0,0,0,0,0,0,0,0,0,.002,.045,.228,.297,.325,.339,.581,1.244,.796,.517,.227,.053,.006,0,0,0,0,0,0,0,0,0,.003,.005,.005,.005,.005,.081,.129,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.014,.041,.041,.041,.041,.027,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.009,.017,.017,.017,.017,.355,.174,.009,.009,.012,.136,.208,.208,.208,.215,7.359,1.858,.458,.053,.053,.047,.045,.045,.059,.136,.188,.206,.21,.588,1.517,6.02,4.688,4.42,.624,.326,.359,.553,.899,.94,2.95,9.415,5.752,1.092,.096,.035,.026,.018,.015,.011,.011,.011,0,0,0,0,0,0,0,0,0,0,0,.056,.27,.314,.351,.354,.609,.796,1.857,.848,.538,.214,.178,.178,.201,.231,.227,.272,.397,.45,1.014,2.917,1.675,.081,.059,.059,.148,.075,.075,.078,.236,.784,.784,.784,.784,.741,.115,.058,.058,.058,.029,.015,.015,.015,.015,.012,.008,.604,.985,1.305,2.273,2.528,2.336,2.496,2.281,1.397,1.713,3.259,1.167,.745,.548,1.058,.684,.728,.392,.179,.283,.283,.46,.08,.099,.099,.099,.1,.143,.137,.238,.317,.262,.225,.792,.426,.332,.261,.11,.093,.102,.171,.292,.504,.605,1.745,2.485,1.964,.33,.171,.259,.242,.215,.366,.354,.205,.203,.262,.153,.13,.137,.362,.691,.295,.433,.154,.056,.053,.053,.053,.051,.047,.065,.078,.091,.206,.813,.102,.151,.05,.024,.004,.001,0,0,0,.021,.021,.021,.021,.021,.013,.013,.013,.013,.013,.013,.013,.013,.01,.01,.01,.01,.01,.01,.01,.01,.01,.01,.008,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.018,.021,.021,.021,.021,.003,0,0,0,0,0,0,0,0,0,.024,.173,.261,.267,.267,.534,1.354,1.772,.72,.218,.018,.018,.028,.036,.032,.194,.082,.035,.286,.027,.038,.038,.027,.021,.014,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.016,.017,.017,.031,.047,.043,.056,.104,.149,.179,.205,.328,.998,.522,1.851,3.727,3.273,2.204,1.169,1.006,1.179,.74,.741,1.065,.925,.671,.497,.431,.327,.277,.126,.581,.207,.359,2.485,.038,.036,.003,.003,.003,.003,.004,.098,.023,.021,.021,.022,.041,.041,.043,.045,.043,.014,.014,.014,.014,.014,.014,.014,.031,.046,.063,.119,.107,.092,.085,.065,.06,.054,.042,.039,.046,.044,.028,.028,.02,.013,.013,.013,.013,.016,.032,.031,.031,.031,.028,.011,.011,.011,.011,.011,.023,.024,.024,.024,.019,.015,.015,.015,.015,.015,.015,.013,.01,.01,.01,.01,.01,.01,.01,.01,.01,.01,.001,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.011,.017,.024,.026,.061,.172,.206,.213,.267,.511,.668,.157,.017,.017,.017,.046,.054,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.001,.017,.017,.017,.017,.016,0,0,0,0,0,0,0,0,0,.01,.017,.017,.017,.017,.012,.017,.017,.017,.017,.012,0,0,0,0,0,.003,.031,.066,.093,.112,.122,.202,.068,.041,.022,.011,0,0,0,0,0,0,0,0,0,0,0,.002,.005,.012,.021,.021,.019,.033,.03,.026,.026,.034,.095,.024,.024,.024,.023,.019,.018,.018,.018,.011,.03,.045,.044,.044,.044,.022,.009,.024,.033,.033,.033,.024,.009,0,0,0,0,0,0,.003,.017,.017,.017,.017,.014,0,0,0,0,0,.032,.032,.032,.032,.032,.005,.008,.009,.014,.014,.009,.005,.004,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.007,.009,.009,.009,.009,.043,.063,.084,.098,.101,.213,.334,.383,.43,.448,.511,.801,.835,1.642,1.614,1.496,1.496,1.476,1.068,.481,.22,.119,.099,.07,.072,.063,.076,.14,.205,.28,.297,.3,.479,.877,1.098,1.611,1.629,1.686,1.686,1.631,1.528,1.862,1.703,1.531,2.196,.395,.416,.453,.728,.917,.986,1.17,2.171,3.011,2.909,3.301,1.377,.778,.799,.947,1.039,.879,.76,1.372,1.674,1.674,1.68,1.823,1.793,1.162,.783,.216,.152,.152,.152,.049,0,0,0,.117,.127,.127,.127,.127,.127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.003,.005,.005,.005,.005,.003,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.309,.364,.364,.364,.364,.063,.01,.01,.01,.012,.015,.015,.11,.55,.824,.825,.829,1.39,1.429,1.342,1.43,1.636,1.717,2.135,2.203,3.191,3.022,1.589,.86,.807,.645,.595,.588,.557,.552,1.271,.708,.677,.629,.714,.203,.133,.061,.062,.018,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.001,.072,.29,.438,.53,.557,.873,1.039,1.04,.208,.049,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.03,.039,.039,.039,.039,.098,.008,.007,.007,.007,.007,.007,.007,.007,.007,.007,.056,.062,.065,.065,.065,.047,.216,.256,.315,.4,.502,.449,.47,.571,.814,1.153,.774,.202,.086,.075,.071,.032,.019,.003,.004,.004,.004,.004,.004,.004,.007,.072,.153,.256,.306,.404,.698,.733,.823,.715,.563,.404,.293,.217,.213,.202,.202,.294,.704,.797,1.359,1.101,.72,.514,.539,.434,.389,.387,.386,.375,.369,.319,.239,.183,.136,.062,.052,.096,.119,.119,.114,.127,.132,.139,.169,.191,.278,.254,.214,.237,.221,.143,.129,.125,.109,.1,.087,.06,.038,.029,.029,.028,.048,.053,.053,.111,.125,.102,.097,.097,.039,.02,.02,.02,.014,.004,.031,.043,.047,.052,.08,.144,.182,.176,.171,.149,.112,.025,0,0,0,0,0,0,0,.016,.031,.031,.031,.031,.015,0,0,0,0,0,.005,.005,.005,.005,.005,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.005,.005,.005,.005,.005,.001,0,0,0],a=e.length;a--;)e[a]*=-1;return e}()}]}],g=e("#LAY-index-area").children("div"),S=function(e){h[e]=a.init(g[e],layui.echartsTheme),h[e].setOption(f[e]),window.onresize=h[e].resize};if(g[0]){S(0);var A=[],w=[{title:{text:"对数轴示例",x:"center"},tooltip:{trigger:"item",formatter:"{a}
                      {b} : {c}"},legend:{x:"left",data:["2的指数","3的指数"]},xAxis:[{type:"category",name:"x",splitLine:{show:!1},data:["一","二","三","四","五","六","七","八","九"]}],yAxis:[{type:"log",name:"y"}],calculable:!0,series:[{name:"3的指数",type:"line",data:[1,3,9,27,81,247,741,2223,6669]},{name:"2的指数",type:"line",data:[1,2,4,8,16,32,64,128,256]}]}],k=e("#LAY-index-logline").children("div"),z=function(e){A[e]=a.init(k[e],layui.echartsTheme),A[e].setOption(w[e]),window.onresize=A[e].resize};k[0]&&z(0)}}}}}}),layui.use(["carousel","echarts"],function(){var e=layui.$,a=(layui.carousel,layui.echarts),t=[],i=[{title:{text:"某地区蒸发量和降水量",subtext:"纯属虚构"},tooltip:{trigger:"axis"},legend:{data:["蒸发量","降水量"]},calculable:!0,xAxis:[{type:"category",data:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]}],yAxis:[{type:"value"}],series:[{name:"蒸发量",type:"bar",data:[2,4.9,7,23.2,25.6,76.7,135.6,162.2,32.6,20,6.4,3.3],markPoint:{data:[{type:"max",name:"最大值"},{type:"min",name:"最小值"}]},markLine:{data:[{type:"average",name:"平均值"}]}},{name:"降水量",type:"bar",data:[2.6,5.9,9,26.4,28.7,70.7,175.6,182.2,48.7,18.8,6,2.3],markPoint:{data:[{name:"年最高",value:182.2,xAxis:7,yAxis:183,symbolSize:18},{name:"年最低",value:2.3,xAxis:11,yAxis:3}]},markLine:{data:[{type:"average",name:"平均值"}]}}]}],n=e("#LAY-index-normcol").children("div"),l=function(e){t[e]=a.init(n[e],layui.echartsTheme),t[e].setOption(i[e]),window.onresize=t[e].resize};if(n[0]){l(0);var r=[],o=[{tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:["直接访问","邮件营销","联盟广告","视频广告","搜索引擎","百度","谷歌","必应","其他"]},calculable:!0,xAxis:[{type:"category",data:["周一","周二","周三","周四","周五","周六","周日"]}],yAxis:[{type:"value"}],series:[{name:"直接访问",type:"bar",data:[320,332,301,334,390,330,320]},{name:"邮件营销",type:"bar",stack:"广告",data:[120,132,101,134,90,230,210]},{name:"联盟广告",type:"bar",stack:"广告",data:[220,182,191,234,290,330,310]},{name:"视频广告",type:"bar",stack:"广告",data:[150,232,201,154,190,330,410]},{name:"搜索引擎",type:"bar",data:[862,1018,964,1026,1679,1600,1570],markLine:{itemStyle:{normal:{lineStyle:{type:"dashed"}}},data:[[{type:"min"},{type:"max"}]]}},{name:"百度",type:"bar",barWidth:5,stack:"搜索引擎",data:[620,732,701,734,1090,1130,1120]},{name:"谷歌",type:"bar",stack:"搜索引擎",data:[120,132,101,134,290,230,220]},{name:"必应",type:"bar",stack:"搜索引擎",data:[60,72,71,74,190,130,110]},{name:"其他",type:"bar",stack:"搜索引擎",data:[62,82,91,84,109,110,120]}]}],m=e("#LAY-index-heapcol").children("div"),s=function(e){r[e]=a.init(m[e],layui.echartsTheme),r[e].setOption(o[e]),window.onresize=r[e].resize};if(m[0]){s(0);var y=[],d=[{title:{text:"双数值柱形图",subtext:"纯属虚构"},tooltip:{trigger:"axis",axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}},formatter:function(e){return e.seriesName+" : [ "+e.value[0]+", "+e.value[1]+" ]"}},legend:{data:["数据1","数据2"]},calculable:!0,xAxis:[{type:"value"}],yAxis:[{type:"value",axisLine:{lineStyle:{color:"#dc143c"}}}],series:[{name:"数据1",type:"bar",data:[[1.5,10],[5,7],[8,8],[12,6],[11,12],[16,9],[14,6],[17,4],[19,9]],markPoint:{data:[{type:"max",name:"最大值",symbol:"emptyCircle",itemStyle:{normal:{color:"#dc143c",label:{position:"top"}}}},{type:"min",name:"最小值",symbol:"emptyCircle",itemStyle:{normal:{color:"#dc143c",label:{position:"bottom"}}}},{type:"max",name:"最大值",valueIndex:0,symbol:"emptyCircle",itemStyle:{normal:{color:"#1e90ff",label:{position:"right"}}}},{type:"min",name:"最小值",valueIndex:0,symbol:"emptyCircle",itemStyle:{normal:{color:"#1e90ff",label:{position:"left"}}}}]},markLine:{data:[{type:"max",name:"最大值",itemStyle:{normal:{color:"#dc143c"}}},{type:"min",name:"最小值",itemStyle:{normal:{color:"#dc143c"}}},{type:"average",name:"平均值",itemStyle:{normal:{color:"#dc143c"}}},{type:"max",name:"最大值",valueIndex:0,itemStyle:{normal:{color:"#1e90ff"}}},{type:"min",name:"最小值",valueIndex:0,itemStyle:{normal:{color:"#1e90ff"}}},{type:"average",name:"平均值",valueIndex:0,itemStyle:{normal:{color:"#1e90ff"}}}]}},{name:"数据2",type:"bar",barHeight:10,data:[[1,2],[2,3],[4,4],[7,5],[11,11],[18,15]]}]}],c=e("#LAY-index-diffcol").children("div"),p=function(e){y[e]=a.init(c[e],layui.echartsTheme),y[e].setOption(d[e]),window.onresize=y[e].resize};if(c[0]){p(0);var u=[],x=[{title:{x:"center",text:"ECharts例子个数统计",subtext:"Rainbow bar example",link:"http://echarts.baidu.com/doc/example.html"},tooltip:{trigger:"item"},calculable:!0,grid:{borderWidth:0,y:80,y2:60},xAxis:[{type:"category",show:!1,data:["Line","Bar","Scatter","K","Pie","Radar","Chord","Force","Map","Gauge","Funnel"]}],yAxis:[{type:"value",show:!1}],series:[{name:"ECharts例子个数统计",type:"bar",itemStyle:{normal:{color:function(e){var a=["#C1232B","#B5C334","#FCCE10","#E87C25","#27727B","#FE8463","#9BCA63","#FAD860","#F3A43B","#60C0DD","#D7504B","#C6E579","#F4E001","#F0805A","#26C0C0"];return a[e.dataIndex]},label:{show:!0,position:"top",formatter:"{b}\n{c}"}}},data:[12,21,10,4,12,5,6,5,25,23,7],markPoint:{tooltip:{trigger:"item",backgroundColor:"rgba(0,0,0,0)",formatter:function(e){return''}},data:[{xAxis:0,y:350,name:"Line",symbolSize:20},{xAxis:1,y:350,name:"Bar",symbolSize:20},{xAxis:2,y:350,name:"Scatter",symbolSize:20},{xAxis:3,y:350,name:"K",symbolSize:20},{xAxis:4,y:350,name:"Pie",symbolSize:20},{xAxis:5,y:350,name:"Radar",symbolSize:20},{xAxis:6,y:350,name:"Chord",symbolSize:20},{xAxis:7,y:350,name:"Force",symbolSize:20},{xAxis:8,y:350,name:"Map",symbolSize:20},{xAxis:9,y:350,name:"Gauge",symbolSize:20},{xAxis:10,y:350,name:"Funnel",symbolSize:20}]}}]}],v=e("#LAY-index-colorline").children("div"),b=function(e){u[e]=a.init(v[e],layui.echartsTheme),u[e].setOption(x[e]),window.onresize=u[e].resize};if(v[0]){b(0);var h=[],f=[{title:{text:"世界人口总量",subtext:"数据来自网络"},tooltip:{trigger:"axis"},legend:{data:["2011年","2012年"]},calculable:!0,xAxis:[{type:"value",boundaryGap:[0,.01]}],yAxis:[{type:"category",data:["巴西","印尼","美国","印度","中国","世界人口(万)"]}],series:[{name:"2011年",type:"bar",data:[18203,23489,29034,104970,131744,630230]},{name:"2012年",type:"bar",data:[19325,23438,31e3,121594,134141,681807]}]}],g=e("#LAY-index-normbar").children("div"),S=function(e){h[e]=a.init(g[e],layui.echartsTheme),h[e].setOption(f[e]),window.onresize=h[e].resize};if(g[0]){S(0);var A=[],w=[{tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{data:["直接访问","邮件营销","联盟广告","视频广告","搜索引擎"]},calculable:!0,xAxis:[{type:"value"}],yAxis:[{type:"category",data:["周一","周二","周三","周四","周五","周六","周日"]}],series:[{name:"直接访问",type:"bar",stack:"总量",itemStyle:{normal:{label:{show:!0,position:"insideRight"}}},data:[320,302,301,334,390,330,320]},{name:"邮件营销",type:"bar",stack:"总量",itemStyle:{normal:{label:{show:!0,position:"insideRight"}}},data:[120,132,101,134,90,230,210]},{name:"联盟广告",type:"bar",stack:"总量",itemStyle:{normal:{label:{show:!0,position:"insideRight"}}},data:[220,182,191,234,290,330,310]},{name:"视频广告",type:"bar",stack:"总量",itemStyle:{normal:{label:{show:!0,position:"insideRight"}}},data:[150,212,201,154,190,330,410]},{name:"搜索引擎",type:"bar",stack:"总量",itemStyle:{normal:{label:{show:!0,position:"insideRight"}}},data:[820,832,901,934,1290,1330,1320]}]}],k=e("#LAY-index-heapbar").children("div"),z=function(e){A[e]=a.init(k[e],layui.echartsTheme),A[e].setOption(w[e]),window.onresize=A[e].resize};if(k[0]){z(0);var L=[],C={normal:{label:{position:"right"}}},P=[{title:{text:"交错正负轴标签",subtext:"From ExcelHome",sublink:"http://e.weibo.com/1341556070/AjwF2AgQm"},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},grid:{y:80,y2:30},xAxis:[{type:"value",position:"top",splitLine:{lineStyle:{type:"dashed"}}}],yAxis:[{type:"category",axisLine:{show:!1},axisLabel:{show:!1},axisTick:{show:!1},splitLine:{show:!1},data:["ten","nine","eight","seven","six","five","four","three","two","one"] +}],series:[{name:"生活费",type:"bar",stack:"总量",itemStyle:{normal:{color:"orange",borderRadius:5,label:{show:!0,position:"left",formatter:"{b}"}}},data:[{value:-.07,itemStyle:C},{value:-.09,itemStyle:C},.2,.44,{value:-.23,itemStyle:C},.08,{value:-.17,itemStyle:C},.47,{value:-.36,itemStyle:C},.18]}]}],T=e("#LAY-index-windline").children("div"),O=function(e){L[e]=a.init(T[e],layui.echartsTheme),L[e].setOption(P[e]),window.onresize=L[e].resize};T[0]&&O(0)}}}}}}}),layui.use(["carousel","echarts"],function(){var e=layui.$,a=(layui.carousel,layui.echarts),t=[],i=[{title:{text:"2011全国GDP(亿元)",subtext:"数据来自国家统计局"},tooltip:{trigger:"item"},dataRange:{orient:"horizontal",min:0,max:55e3,text:["高","低"],splitNumber:0},series:[{name:"2011全国GDP分布",type:"map",mapType:"china",mapLocation:{x:"center"},selectedMode:"multiple",itemStyle:{normal:{label:{show:!0}},emphasis:{label:{show:!0}}},data:[{name:"西藏",value:605.83},{name:"青海",value:1670.44},{name:"宁夏",value:2102.21},{name:"海南",value:2522.66},{name:"甘肃",value:5020.37},{name:"贵州",value:5701.84},{name:"新疆",value:6610.05},{name:"云南",value:8893.12},{name:"重庆",value:10011.37},{name:"吉林",value:10568.83},{name:"山西",value:11237.55},{name:"天津",value:11307.28},{name:"江西",value:11702.82},{name:"广西",value:11720.87},{name:"陕西",value:12512.3},{name:"黑龙江",value:12582},{name:"内蒙古",value:14359.88},{name:"安徽",value:15300.65},{name:"北京",value:16251.93,selected:!0},{name:"福建",value:17560.18},{name:"上海",value:19195.69,selected:!0},{name:"湖北",value:19632.26},{name:"湖南",value:19669.56},{name:"四川",value:21026.68},{name:"辽宁",value:22226.7},{name:"河北",value:24515.76},{name:"河南",value:26931.03},{name:"浙江",value:32318.85},{name:"山东",value:45361.85},{name:"江苏",value:49110.27},{name:"广东",value:53210.28,selected:!0}]}]}],n=e("#LAY-index-plat").children("div"),l=function(e){t[e]=a.init(n[e],layui.echartsTheme),t[e].setOption(i[e]),window.onresize=t[e].resize};n[0]&&l(0)}),e("senior",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/set.js b/public/static/layui-admin/dist/layuiadmin/modules/set.js new file mode 100755 index 0000000..fde9b81 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/set.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(["form","upload"],function(t){var i=layui.$,e=layui.layer,a=(layui.laytpl,layui.setter,layui.view,layui.admin),n=layui.form,s=layui.upload;i("body");n.verify({nickname:function(t,i){return new RegExp("^[a-zA-Z0-9_一-龥\\s·]+$").test(t)?/(^\_)|(\__)|(\_+$)/.test(t)?"用户名首尾不能出现下划线'_'":/^\d+\d+\d$/.test(t)?"用户名不能全为数字":void 0:"用户名不能有特殊字符"},pass:[/^[\S]{6,12}$/,"密码必须6到12位,且不能出现空格"],repass:function(t){if(t!==i("#LAY_password").val())return"两次密码输入不一致"}}),n.on("submit(set_website)",function(t){return e.msg(JSON.stringify(t.field)),!1}),n.on("submit(set_system_email)",function(t){return e.msg(JSON.stringify(t.field)),!1}),n.on("submit(setmyinfo)",function(t){return e.msg(JSON.stringify(t.field)),!1});var r=i("#LAY_avatarSrc");s.render({url:"/api/upload/",elem:"#LAY_avatarUpload",done:function(t){0==t.status?r.val(t.url):e.msg(t.msg,{icon:5})}}),a.events.avartatPreview=function(t){var i=r.val();e.photos({photos:{title:"查看头像",data:[{src:i}]},shade:.01,closeBtn:1,anim:5})},n.on("submit(setmypass)",function(t){return e.msg(JSON.stringify(t.field)),!1}),t("set",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/tree2.js b/public/static/layui-admin/dist/layuiadmin/modules/tree2.js new file mode 100755 index 0000000..56c8565 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/tree2.js @@ -0,0 +1,270 @@ +/** layui-v2.5.6 MIT License By https://www.layui.com */ +;layui.define( "form", function (e) { + "use strict"; + var i = layui.$, a = layui.form, n = layui.layer, t = "tree", r = { + config: {}, index: layui[t] ? layui[t].index + 1e4 : 0, set: function (e) { + var a = this; + return a.config = i.extend({}, a.config, e), a + }, on: function (e, i) { + return layui.onevent.call(this, t, e, i) + } + }, l = function () { + var e = this, i = e.config, a = i.id || e.index; + return l.that[a] = e, l.config[a] = i, { + config: i, reload: function (i) { + e.reload.call(e, i) + }, getChecked: function () { + return e.getChecked.call(e) + }, setChecked: function (i) { + return e.setChecked.call(e, i) + } + } + }, c = "layui-hide", d = "layui-disabled", s = "layui-tree-set", o = "layui-tree-iconClick", + h = "layui-icon-addition", u = "layui-icon-subtraction", p = "layui-tree-entry", f = "layui-tree-main", + y = "layui-tree-txt", v = "layui-tree-pack", C = "layui-tree-spread", k = "layui-tree-setLineShort", + m = "layui-tree-showLine", x = "layui-tree-lineExtend", b = function (e) { + var a = this; + a.index = ++r.index, a.config = i.extend({}, a.config, r.config, e), a.render() + }; + b.prototype.config = { + data: [], + showCheckbox: !1, + showLine: !0, + accordion: !1, + onlyIconControl: !1, + isJump: !1, + edit: !1, + text: {defaultNodeName: "未命名", none: "无数据"} + }, b.prototype.reload = function (e) { + var a = this; + layui.each(e, function (e, i) { + i.constructor === Array && delete a.config[e] + }), a.config = i.extend(!0, {}, a.config, e), a.render() + }, b.prototype.render = function () { + var e = this, a = e.config; + e.checkids = []; + var n = i('
                      '); + e.tree(n); + var t = a.elem = i(a.elem); + if (t[0]) { + if (e.key = a.id || e.index, e.elem = n, e.elemNone = i('
                      ' + a.text.none + "
                      "), t.html(e.elem), 0 == e.elem.find(".layui-tree-set").length) return e.elem.append(e.elemNone); + a.showCheckbox && e.renderForm("checkbox"), e.elem.find(".layui-tree-set").each(function () { + var e = i(this); + e.parent(".layui-tree-pack")[0] || e.addClass("layui-tree-setHide"), !e.next()[0] && e.parents(".layui-tree-pack").eq(1).hasClass("layui-tree-lineExtend") && e.addClass(k), e.next()[0] || e.parents(".layui-tree-set").eq(0).next()[0] || e.addClass(k) + }), e.events() + } + }, b.prototype.renderForm = function (e) { + a.render(e, "LAY-tree-" + this.index) + }, b.prototype.tree = function (e, a) { + var n = this, t = n.config, r = a || t.data; + layui.each(r, function (a, r) { + var l = r.children && r.children.length > 0, + o = i('
                      '), + h = i(['
                      ', '
                      ', '", function () { + if (!t.edit) return ""; + var e = { + add: '', + update: '', + del: '' + }, i = ['
                      ']; + return t.edit === !0 && (t.edit = ["update", "del"]), "object" == typeof t.edit ? (layui.each(t.edit, function (a, n) { + i.push(e[n] || "") + }), i.join("") + "
                      ") : void 0 + }(), "
                      "].join("")); + l && (h.append(o), n.tree(o, r.children)), e.append(h), h.prev("." + s)[0] && h.prev().children(".layui-tree-pack").addClass("layui-tree-showLine"), l || h.parent(".layui-tree-pack").addClass("layui-tree-lineExtend"), n.spread(h, r), t.showCheckbox && (r.checked && n.checkids.push(r.id), n.checkClick(h, r)), t.edit && n.operate(h, r) + }) + }, b.prototype.spread = function (e, a) { + var n = this, t = n.config, r = e.children("." + p), l = r.children("." + f), c = r.find("." + o), + k = r.find("." + y), m = t.onlyIconControl ? c : l, x = ""; + m.on("click", function (i) { + var a = e.children("." + v), + n = m.children(".layui-icon")[0] ? m.children(".layui-icon") : m.find(".layui-tree-icon").children(".layui-icon"); + if (a[0]) { + if (e.hasClass(C)) e.removeClass(C), a.slideUp(200), n.removeClass(u).addClass(h); else if (e.addClass(C), a.slideDown(200), n.addClass(u).removeClass(h), t.accordion) { + var r = e.siblings("." + s); + r.removeClass(C), r.children("." + v).slideUp(200), r.find(".layui-tree-icon").children(".layui-icon").removeClass(u).addClass(h) + } + } else x = "normal" + }), k.on("click", function () { + var n = i(this); + n.hasClass(d) || (x = e.hasClass(C) ? t.onlyIconControl ? "open" : "close" : t.onlyIconControl ? "close" : "open", t.click && t.click({ + elem: e, + state: x, + data: a + })) + }) + }, b.prototype.setCheckbox = function (e, i, a) { + var n = this, t = (n.config, a.prop("checked")); + if (!a.prop("disabled")) { + if ("object" == typeof i.children || e.find("." + v)[0]) { + var r = e.find("." + v).find('input[same="layuiTreeCheck"]'); + r.each(function () { + this.disabled || (this.checked = t) + }) + } + var l = function (e) { + if (e.parents("." + s)[0]) { + var i, a = e.parent("." + v), n = a.parent(), r = a.prev().find('input[same="layuiTreeCheck"]'); + t ? r.prop("checked", t) : (a.find('input[same="layuiTreeCheck"]').each(function () { + this.checked && (i = !0) + }), i || r.prop("checked", !1)), l(n) + } + }; + l(e), n.renderForm("checkbox") + } + }, b.prototype.checkClick = function (e, a) { + var n = this, t = n.config, r = e.children("." + p), l = r.children("." + f); + l.on("click", 'input[same="layuiTreeCheck"]+', function (r) { + layui.stope(r); + var l = i(this).prev(), c = l.prop("checked"); + l.prop("disabled") || (n.setCheckbox(e, a, l), t.oncheck && t.oncheck({elem: e, checked: c, data: a})) + }) + }, b.prototype.operate = function (e, a) { + var t = this, r = t.config, l = e.children("." + p), d = l.children("." + f); + l.children(".layui-tree-btnGroup").on("click", ".layui-icon", function (l) { + layui.stope(l); + var f = i(this).data("type"), b = e.children("." + v), g = {data: a, type: f, elem: e}; + + //自定义属性,替换 + if (r.customOperate) { + // console.log("自定义"); + r.operate && r.operate(g); + } else { + if ("add" == f) { + b[0] || (r.showLine ? (d.find("." + o).addClass("layui-tree-icon"), d.find("." + o).children(".layui-icon").addClass(h).removeClass("layui-icon-file")) : d.find(".layui-tree-iconArrow").removeClass(c), e.append('
                      ')); + var w = r.operate && r.operate(g), N = {}; + if (N.title = r.text.defaultNodeName, N.id = w, t.tree(e.children("." + v), [N]), r.showLine) if (b[0]) b.hasClass(x) || b.addClass(x), e.find("." + v).each(function () { + i(this).children("." + s).last().addClass(k) + }), b.children("." + s).last().prev().hasClass(k) ? b.children("." + s).last().prev().removeClass(k) : b.children("." + s).last().removeClass(k), !e.parent("." + v)[0] && e.next()[0] && b.children("." + s).last().removeClass(k); else { + var T = e.siblings("." + s), L = 1, A = e.parent("." + v); + layui.each(T, function (e, a) { + i(a).children("." + v)[0] || (L = 0) + }), 1 == L ? (T.children("." + v).addClass(m), T.children("." + v).children("." + s).removeClass(k), e.children("." + v).addClass(m), A.removeClass(x), A.children("." + s).last().children("." + v).children("." + s).last().addClass(k)) : e.children("." + v).children("." + s).addClass(k) + } + if (!r.showCheckbox) return; + if (d.find('input[same="layuiTreeCheck"]')[0].checked) { + var I = e.children("." + v).children("." + s).last(); + I.find('input[same="layuiTreeCheck"]')[0].checked = !0 + } + t.renderForm("checkbox") + } else if ("update" == f) { + var F = d.children("." + y).html(); + d.children("." + y).html(""), d.append(''), d.children(".layui-tree-editInput").val(F).focus(); + var j = function (e) { + var i = e.val().trim(); + i = i ? i : r.text.defaultNodeName, e.remove(), d.children("." + y).html(i), g.data.title = i, r.operate && r.operate(g) + }; + d.children(".layui-tree-editInput").blur(function () { + j(i(this)) + }), d.children(".layui-tree-editInput").on("keydown", function (e) { + 13 === e.keyCode && (e.preventDefault(), j(i(this))) + }) + } else n.confirm('确认删除该节点 "' + (a.title || "") + '" 吗?', function (a) { + if (r.operate && r.operate(g), g.status = "remove", n.close(a), !e.prev("." + s)[0] && !e.next("." + s)[0] && !e.parent("." + v)[0]) return e.remove(), void t.elem.append(t.elemNone); + if (e.siblings("." + s).children("." + p)[0]) { + if (r.showCheckbox) { + var l = function (e) { + if (e.parents("." + s)[0]) { + var a = e.siblings("." + s).children("." + p), n = e.parent("." + v).prev(), + r = n.find('input[same="layuiTreeCheck"]')[0], c = 1, d = 0; + 0 == r.checked && (a.each(function (e, a) { + var n = i(a).find('input[same="layuiTreeCheck"]')[0]; + 0 != n.checked || n.disabled || (c = 0), n.disabled || (d = 1) + }), 1 == c && 1 == d && (r.checked = !0, t.renderForm("checkbox"), l(n.parent("." + s)))) + } + }; + l(e) + } + if (r.showLine) { + var d = e.siblings("." + s), h = 1, f = e.parent("." + v); + layui.each(d, function (e, a) { + i(a).children("." + v)[0] || (h = 0) + }), 1 == h ? (b[0] || (f.removeClass(x), d.children("." + v).addClass(m), d.children("." + v).children("." + s).removeClass(k)), e.next()[0] ? f.children("." + s).last().children("." + v).children("." + s).last().addClass(k) : e.prev().children("." + v).children("." + s).last().addClass(k), e.next()[0] || e.parents("." + s)[1] || e.parents("." + s).eq(0).next()[0] || e.prev("." + s).addClass(k)) : !e.next()[0] && e.hasClass(k) && e.prev().addClass(k) + } + } else { + var y = e.parent("." + v).prev(); + if (r.showLine) { + y.find("." + o).removeClass("layui-tree-icon"), y.find("." + o).children(".layui-icon").removeClass(u).addClass("layui-icon-file"); + var w = y.parents("." + v).eq(0); + w.addClass(x), w.children("." + s).each(function () { + i(this).children("." + v).children("." + s).last().addClass(k) + }) + } else y.find(".layui-tree-iconArrow").addClass(c); + e.parents("." + s).eq(0).removeClass(C), e.parent("." + v).remove() + } + e.remove() + }) + } + + }) + }, b.prototype.events = function () { + var e = this, a = e.config; + e.elem.find(".layui-tree-checkedFirst"); + e.setChecked(e.checkids), e.elem.find(".layui-tree-search").on("keyup", function () { + var n = i(this), t = n.val(), r = n.nextAll(), l = []; + r.find("." + y).each(function () { + var e = i(this).parents("." + p); + if (i(this).html().indexOf(t) != -1) { + l.push(i(this).parent()); + var a = function (e) { + e.addClass("layui-tree-searchShow"), e.parent("." + v)[0] && a(e.parent("." + v).parent("." + s)) + }; + a(e.parent("." + s)) + } + }), r.find("." + p).each(function () { + var e = i(this).parent("." + s); + e.hasClass("layui-tree-searchShow") || e.addClass(c) + }), 0 == r.find(".layui-tree-searchShow").length && e.elem.append(e.elemNone), a.onsearch && a.onsearch({elem: l}) + }), e.elem.find(".layui-tree-search").on("keydown", function () { + i(this).nextAll().find("." + p).each(function () { + var e = i(this).parent("." + s); + e.removeClass("layui-tree-searchShow " + c) + }), i(".layui-tree-emptyText")[0] && i(".layui-tree-emptyText").remove() + }) + }, b.prototype.getChecked = function () { + var e = this, a = e.config, n = [], t = []; + e.elem.find(".layui-form-checked").each(function () { + n.push(i(this).prev()[0].value) + }); + var r = function (e, a) { + layui.each(e, function (e, t) { + layui.each(n, function (e, n) { + if (t.id == n) { + var l = i.extend({}, t); + return delete l.children, a.push(l), t.children && (l.children = [], r(t.children, l.children)), !0 + } + }) + }) + }; + return r(i.extend({}, a.data), t), t + }, b.prototype.setChecked = function (e) { + var a = this; + a.config; + a.elem.find("." + s).each(function (a, n) { + var t = i(this).data("id"), r = i(n).children("." + p).find('input[same="layuiTreeCheck"]'), l = r.next(); + if ("number" == typeof e) { + if (t == e) return r[0].checked || l.click(), !1 + } else "object" == typeof e && layui.each(e, function (e, i) { + if (i == t && !r[0].checked) return l.click(), !0 + }) + }) + }, l.that = {}, l.config = {}, r.reload = function (e, i) { + var a = l.that[e]; + return a.reload(i), l.call(a) + }, r.getChecked = function (e) { + var i = l.that[e]; + return i.getChecked() + }, r.setChecked = function (e, i) { + var a = l.that[e]; + return a.setChecked(i) + }, r.render = function (e) { + var i = new b(e); + return l.call(i) + }, e("tree2", r) +}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/user.js b/public/static/layui-admin/dist/layuiadmin/modules/user.js new file mode 100755 index 0000000..ad198fc --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/user.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define("form",function(e){var s=layui.$,t=(layui.layer,layui.laytpl,layui.setter,layui.view,layui.admin),i=layui.form,a=s("body");i.verify({nickname:function(e,s){return new RegExp("^[a-zA-Z0-9_一-龥\\s·]+$").test(e)?/(^\_)|(\__)|(\_+$)/.test(e)?"用户名首尾不能出现下划线'_'":/^\d+\d+\d$/.test(e)?"用户名不能全为数字":void 0:"用户名不能有特殊字符"},pass:[/^[\S]{6,12}$/,"密码必须6到12位,且不能出现空格"]}),t.sendAuthCode({elem:"#LAY-user-getsmscode",elemPhone:"#LAY-user-login-cellphone",elemVercode:"#LAY-user-login-vercode",ajax:{url:layui.setter.base+"json/user/sms.js"}}),a.on("click","#LAY-user-get-vercode",function(){s(this);this.src="https://www.oschina.net/action/user/captcha?t="+(new Date).getTime()}),e("user",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/useradmin.js b/public/static/layui-admin/dist/layuiadmin/modules/useradmin.js new file mode 100755 index 0000000..1502e7d --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/useradmin.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(["table","form"],function(e){var t=layui.$,i=layui.table;layui.form;i.render({elem:"#LAY-user-manage",url:layui.setter.base+"json/useradmin/webuser.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:100,title:"ID",sort:!0},{field:"username",title:"用户名",minWidth:100},{field:"avatar",title:"头像",width:100,templet:"#imgTpl"},{field:"phone",title:"手机"},{field:"email",title:"邮箱"},{field:"sex",width:80,title:"性别"},{field:"ip",title:"IP"},{field:"jointime",title:"加入时间",sort:!0},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-useradmin-webuser"}]],page:!0,limit:30,height:"full-220",text:"对不起,加载出现异常!"}),i.on("tool(LAY-user-manage)",function(e){e.data;if("del"===e.event)layer.prompt({formType:1,title:"敏感操作,请验证口令"},function(t,i){layer.close(i),layer.confirm("真的删除行么",function(t){e.del(),layer.close(t)})});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑用户",content:"../../../views/user/user/userform.html",maxmin:!0,area:["500px","450px"],btn:["确定","取消"],yes:function(e,t){var l=window["layui-layer-iframe"+e],r="LAY-user-front-submit",n=t.find("iframe").contents().find("#"+r);l.layui.form.on("submit("+r+")",function(t){t.field;i.reload("LAY-user-front-submit"),layer.close(e)}),n.trigger("click")},success:function(e,t){}})}}),i.render({elem:"#LAY-user-back-manage",url:layui.setter.base+"json/useradmin/mangadmin.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:80,title:"ID",sort:!0},{field:"loginname",title:"登录名"},{field:"telphone",title:"手机"},{field:"email",title:"邮箱"},{field:"role",title:"角色"},{field:"jointime",title:"加入时间",sort:!0},{field:"check",title:"审核状态",templet:"#buttonTpl",minWidth:80,align:"center"},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-useradmin-admin"}]],text:"对不起,加载出现异常!"}),i.on("tool(LAY-user-back-manage)",function(e){e.data;if("del"===e.event)layer.prompt({formType:1,title:"敏感操作,请验证口令"},function(t,i){layer.close(i),layer.confirm("确定删除此管理员?",function(t){console.log(e),e.del(),layer.close(t)})});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑管理员",content:"../../../views/user/administrators/adminform.html",area:["420px","420px"],btn:["确定","取消"],yes:function(e,t){var l=window["layui-layer-iframe"+e],r="LAY-user-back-submit",n=t.find("iframe").contents().find("#"+r);l.layui.form.on("submit("+r+")",function(t){t.field;i.reload("LAY-user-front-submit"),layer.close(e)}),n.trigger("click")},success:function(e,t){}})}}),i.render({elem:"#LAY-user-back-role",url:layui.setter.base+"json/useradmin/role.js",cols:[[{type:"checkbox",fixed:"left"},{field:"id",width:80,title:"ID",sort:!0},{field:"rolename",title:"角色名"},{field:"limits",title:"拥有权限"},{field:"descr",title:"具体描述"},{title:"操作",width:150,align:"center",fixed:"right",toolbar:"#table-useradmin-admin"}]],text:"对不起,加载出现异常!"}),i.on("tool(LAY-user-back-role)",function(e){e.data;if("del"===e.event)layer.confirm("确定删除此角色?",function(t){e.del(),layer.close(t)});else if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑角色",content:"../../../views/user/administrators/roleform.html",area:["500px","480px"],btn:["确定","取消"],yes:function(e,t){var l=window["layui-layer-iframe"+e],r=t.find("iframe").contents().find("#LAY-user-role-submit");l.layui.form.on("submit(LAY-user-role-submit)",function(t){t.field;i.reload("LAY-user-back-role"),layer.close(e)}),r.trigger("click")},success:function(e,t){}})}}),e("useradmin",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/modules/workorder.js b/public/static/layui-admin/dist/layuiadmin/modules/workorder.js new file mode 100755 index 0000000..7598bf3 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/modules/workorder.js @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + ;layui.define(["table","form","element"],function(e){var t=layui.$,i=layui.table,r=(layui.form,layui.element);i.render({elem:"#LAY-app-system-order",url:layui.setter.base+"json/workorder/demo.js",cols:[[{type:"numbers",fixed:"left"},{field:"orderid",width:100,title:"工单号",sort:!0},{field:"attr",width:100,title:"业务性质"},{field:"title",width:100,title:"工单标题",width:300},{field:"progress",title:"进度",width:200,align:"center",templet:"#progressTpl"},{field:"submit",width:100,title:"提交者"},{field:"accept",width:100,title:"受理人员"},{field:"state",title:"工单状态",templet:"#buttonTpl",minWidth:80,align:"center"},{title:"操作",align:"center",fixed:"right",toolbar:"#table-system-order"}]],page:!0,limit:10,limits:[10,15,20,25,30],text:"对不起,加载出现异常!",done:function(){r.render("progress")}}),i.on("tool(LAY-app-system-order)",function(e){e.data;if("edit"===e.event){t(e.tr);layer.open({type:2,title:"编辑工单",content:"../../../views/app/workorder/listform.html",area:["450px","450px"],btn:["确定","取消"],yes:function(e,t){var r=window["layui-layer-iframe"+e],l="LAY-app-workorder-submit",o=t.find("iframe").contents().find("#"+l);r.layui.form.on("submit("+l+")",function(t){t.field;i.reload("LAY-user-front-submit"),layer.close(e)}),o.trigger("click")},success:function(e,t){}})}}),e("workorder",{})}); \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/style/admin.css b/public/static/layui-admin/dist/layuiadmin/style/admin.css new file mode 100755 index 0000000..19f9d44 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/style/admin.css @@ -0,0 +1,536 @@ +/** + + @Name:layuiAdmin + @Author:贤心 + @Site:http://www.layui.com/admin/ + @License:LPPL + + */ + +html #layuicss-layuiAdmin{display: none; position: absolute; width: 1989px;} + + + + +/* 系统 */ +::-webkit-input-placeholder{color: #ccc} + +/** 滚动条 **/ +/* +::-webkit-scrollbar{width: 10px; height: 10px;} +::-webkit-scrollbar-button:vertical{display: none;} +::-webkit-scrollbar-track, ::-webkit-scrollbar-corner{background-color: #e2e2e2;} +::-webkit-scrollbar-thumb{border-radius: 0; background-color: rgba(0,0,0,.3);} +::-webkit-scrollbar-thumb:vertical:hover{background-color: rgba(0,0,0,.35);} +::-webkit-scrollbar-thumb:vertical:active{background-color: rgba(0,0,0,.38);} +*/ + + +/* 全局 */ +html{background-color: #f8f8f8; color: #666;} +*[template], +.layadmin-tabsbody-item{display: none;} +*[lay-href], +*[lay-tips], +*[layadmin-event]{cursor: pointer;} + +/* 重置布局结构 */ +.layui-layout-admin .layui-header{position: fixed; top: 0; left: 0; width: 100%; height: 50px;} + +/* +.layui-layout-admin .layui-header .layui-layout-right .layui-nav-item a{color: #fff;} +.layui-layout-admin .layui-header .layui-layout-right .layui-nav-item a cite{color: rgba(255,255,255,.7);} +*/ + +.layui-layout-admin .layui-header .layui-nav .layui-nav-child a{color: #333;} +.layui-layout-admin .layui-side{width: 220px; top: 0; z-index: 1001;} +.layui-layout-admin .layui-logo, +.layui-layout-admin .layui-header .layui-nav .layui-nav-item{height: 50px; line-height: 50px;} +.layui-layout-admin .layui-logo{position: fixed; left: 0; top: 0; z-index: 1002; width: 220px; height: 49px; padding: 0 15px; box-sizing: border-box; overflow: hidden; font-weight: 300; background-repeat: no-repeat; background-position: center center;} +.layui-layout-admin .layui-layout-left, +.layadmin-pagetabs, +.layui-layout-admin .layui-body, +.layui-layout-admin .layui-footer{left: 220px;} +.layadmin-pagetabs{position: fixed; top: 50px; right: 0; z-index: 999;} +.layadmin-pagetabs .layui-breadcrumb{padding: 0 15px;} +.layui-layout-admin .layui-body{position: fixed; top: 90px; bottom: 0;} +.layui-layout-admin .layui-body .layadmin-tabsbody-item{position: absolute; top: 0; bottom: 0; left: 0; right: 0; overflow: hidden;} +.layui-layout-admin .layui-header .layui-nav-img{width: 26px; height: 26px;} +.layui-layout-admin .layui-header .layui-nav-child{top: 55px;} +.layui-layout-admin .layui-header .layui-layout-right .layui-nav-child{left: auto; right: 0;} +.layui-layout-admin .layui-header .layui-nav .layui-nav-child dd.layui-this a, +.layui-layout-admin .layui-header .layui-nav .layui-nav-child dd.layui-this{background: none} + +/* 统一动画 */ +.layui-layout-admin .layui-header .layui-nav .layui-nav-item, +.layui-layout-admin .layui-layout-left, +.layadmin-pagetabs, +.layui-layout-admin .layui-body, +.layui-layout-admin .layui-footer, +.layui-layout-admin .layui-side, +.layui-layout-admin .layui-logo, +.layui-layout-admin .layui-header .layui-layout-right{transition: all .3s; -webkit-transition: all .3s;} + +/* 图标 */ +.layui-icon-login-qq{color: #3492ED;} +.layui-icon-login-wechat{color: #4DAF29;} +.layui-icon-login-weibo{color: #CF1900;} + +/* 重置表格风格 */ +/* +.layui-table th, +.layui-table td, +.layui-table[lay-skin="line"], +.layui-table[lay-skin="row"], +.layui-table-view, +.layui-table-header, +.layui-table-tool, +.layui-table-page, +.layui-table-fixed-r, +.layui-table-tips-main{border-color: #f6f6f6;} + +.layui-table thead tr, +.layui-table-header, +.layui-table-tool, +.layui-table-patch, +.layui-table-mend{background-color: #fff;} + +.layui-table[lay-even] tr:nth-child(even), +.layui-table tbody tr:hover, +.layui-table-hover, +.layui-table-click{background-color: #f8f8f8;} +*/ + +/* 表单 */ +.layui-form[wid100] .layui-form-label{width: 100px;} +.layui-form[wid100] .layui-input-block{margin-left: 130px;} +@media screen and (max-width: 450px){ + .layui-form[wid100] .layui-form-item .layui-input-inline{margin-left: 132px;} + .layui-form[wid100] .layui-form-item .layui-input-inline+.layui-form-mid{margin-left: 130px;} +} +.layui-form-item .layui-input-company{width: auto; padding-right: 10px; line-height: 38px;} + +/* 辅助 */ +.layadmin-flexible{} +.layui-bg-white{background-color: #fff;} +.layadmin-loading{position: absolute; left: 50%; top: 50%; margin: -16px -15px; font-size: 30px; color: #c2c2c2;} +.layadmin-fixed{position: fixed; left: 0; top: 0; z-index: 999;} +.layadmin-link{color: #029789!important;} +.layadmin-link:hover{opacity: 0.8;} + +/* 弹出面板 */ +.layui-layer-admin .layui-layer-title{height: 50px; line-height: 50px; border: none 0; background-color: #20222A; color: #fff;} +.layui-layer-admin i[close]{position: absolute; padding: 5px; right: 10px; top: 12px; color: #fff; cursor: pointer;} +.layui-layer-admin .layui-layer-content{padding: 20px; line-height: 22px;} +.layui-layer-admin .layui-layer-content cite{font-style: normal; color: #FF5722;} + +/* 右侧面板 */ +.layui-layer-adminRight{top: 50px !important; bottom: 0; box-shadow: 1px 1px 10px rgba(0,0,0,.1); border-radius: 0; overflow: auto;} + +/* 弹出便签 */ +.layadmin-note .layui-layer-content{padding: 0;} +.layadmin-note textarea{display: block; width: 300px; height: 132px; min-width: 300px; min-height: 132px; line-height: 20px; padding: 10px 20px; border: none; box-sizing: border-box; color: #666; word-wrap: break-word;} + +/* 头部导航 */ +.layui-layout-admin .layui-layout-left{padding: 0 10px;} +.layui-layout-admin .layui-layout-left .layui-nav-item{margin: 0 20px;} +.layui-layout-admin .layui-input-search{display: inline-block; vertical-align: middle; height: 32px; border: none; cursor: text;} +.layui-layout-admin .layui-layout-left a{padding: 0;} +.layui-layout-admin .layui-layout-right{padding: 0;} +.layui-header .layui-nav-item .layui-icon{position: relative; top: 1px; font-size: 16px;} +.layui-header .layui-nav-item:hover{} +.layui-header .layui-layout-right .layui-badge-dot{margin-left: 0px;} +.layui-header .layui-nav .layui-this:after, +.layui-layout-admin .layui-header .layui-nav-bar{top: 0 !important; bottom: auto; height: 3px; background-color: #fff; background-color: rgba(255,255,255,.3);} + +/* 遮罩 */ +.layadmin-body-shade{position: fixed; display: none; left: 0; right: 0; top: 0; bottom: 0; background-color: rgba(0,0,0,.3); z-index: 1000;} + +/* 侧边菜单 */ +.layui-side-menu .layui-side-scroll{width: 240px;} +.layui-side-menu .layui-nav{width: 220px; margin-top: 50px; background: none;} +.layui-side-menu .layui-nav .layui-nav-item a{height: 40px; line-height: 40px; padding-left: 45px; padding-right: 30px;} +.layui-side-menu .layui-nav .layui-nav-item > a{padding-top: 8px; padding-bottom: 8px;} +.layui-side-menu .layui-nav .layui-nav-item a:hover{background: none;} +.layui-side-menu .layui-nav .layui-nav-itemed > .layui-nav-child{padding: 5px 0;} +.layui-side-menu .layui-nav .layui-nav-item .layui-icon{position: absolute; top: 50%; left: 20px; margin-top: -19px;} +.layui-side-menu .layui-nav .layui-nav-child .layui-nav-child{background: none!important;} +.layui-side-menu .layui-nav .layui-nav-child .layui-nav-child a{padding-left: 60px} +.layui-side-menu .layui-nav .layui-nav-more{right: 15px;} + +/* 侧边菜单 - 平板移动设备 */ +@media screen and (max-width: 992px) { + .layui-layout-admin .layui-side{transform: translate3d(-220px, 0, 0); -webkit-transform: translate3d(-220px, 0, 0); width: 220px;} + .layui-layout-admin .layui-layout-left, + .layadmin-pagetabs, + .layui-layout-admin .layui-body, + .layui-layout-admin .layui-footer{left: 0;} +} + +/* 侧边收缩模式 */ +.layadmin-side-shrink .layui-layout-admin .layui-logo{width: 60px; background-image: url(res/logo.png); /*background-size: 20px;)*/} +.layadmin-side-shrink .layui-layout-admin .layui-logo span{display: none;} +.layadmin-side-shrink .layui-side{left: 0; width: 60px;} +.layadmin-side-shrink .layui-layout-admin .layui-layout-left, +.layadmin-side-shrink .layadmin-pagetabs, +.layadmin-side-shrink .layui-layout-admin .layui-body, +.layadmin-side-shrink .layui-layout-admin .layui-footer{left: 60px;} +.layadmin-side-shrink .layui-side-menu .layui-nav{position: static; width: 60px;} +.layadmin-side-shrink .layui-side-menu .layui-nav-item{position: static;} +.layadmin-side-shrink .layui-side-menu .layui-nav-item>a{padding-right: 0;} +.layadmin-side-shrink .layui-side-menu .layui-nav-item cite, +.layadmin-side-shrink .layui-side-menu .layui-nav > .layui-nav-item > a .layui-nav-more, +.layadmin-side-shrink .layui-side-menu .layui-nav > .layui-nav-item > .layui-nav-child{display: none; padding: 8px 0; width: 200px;} +.layadmin-side-shrink .layui-side-menu .layui-nav > .layui-nav-itemed>a{background: rgba(0,0,0,.3);} + +/* 移动端展开模式 */ +.layadmin-side-spread-sm .layui-layout-admin .layui-layout-left, +.layadmin-side-spread-sm .layadmin-pagetabs, +.layadmin-side-spread-sm .layui-layout-admin .layui-body, +.layadmin-side-spread-sm .layui-layout-admin .layui-footer{left: 0; transform: translate3d(220px, 0, 0); -webkit-transform: translate3d(220px, 0, 0);} +.layadmin-side-spread-sm .layui-layout-admin .layui-layout-right{transform: translate3d(220px, 0, 0); -webkit-transform: translate3d(220px, 0, 0);} +.layadmin-side-spread-sm .layui-side{transform: translate3d(0, 0, 0); -webkit-transform: translate3d(0, 0, 0);} +.layadmin-side-spread-sm .layadmin-body-shade{display: block; } + + +/* 页面标签 */ +.layadmin-pagetabs{height: 40px; line-height: 40px; padding: 0 80px 0 40px; /*border-bottom: 2px solid #292B34;*/ background-color: #fff; box-sizing: border-box; box-shadow: 0 1px 2px 0 rgba(0,0,0,.1);} +.layadmin-pagetabs .layadmin-tabs-control{position: absolute; top: 0; width: 40px; height: 100%; text-align: center; cursor: pointer; transition: all .3s; -webkit-transition: all .3s; box-sizing: border-box; border-left: 1px solid #f6f6f6;} +.layadmin-pagetabs .layadmin-tabs-control:hover{background-color: #f6f6f6;} +.layadmin-pagetabs .layui-icon-prev{left: 0; border-left: none; border-right: 1px solid #f6f6f6;} +.layadmin-pagetabs .layui-icon-next{right: 40px; right: 40px;} +.layadmin-pagetabs .layui-icon-down{right: 0;} +.layadmin-tabs-select.layui-nav{position: absolute; left: 0; top: 0; width: 100%; height: 100%; padding: 0; background: none;} +.layadmin-tabs-select.layui-nav .layui-nav-item{line-height: 40px;} +.layadmin-tabs-select.layui-nav .layui-nav-item>a{height: 40px;} +.layadmin-tabs-select.layui-nav .layui-nav-item a{color: #666;} +.layadmin-tabs-select.layui-nav .layui-nav-child{top: 40px; left: auto; right: 0;} +.layadmin-tabs-select.layui-nav .layui-nav-child dd.layui-this, +.layadmin-tabs-select.layui-nav .layui-nav-child dd.layui-this a{background-color: #f2f2f2!important; color: #333;} +.layadmin-tabs-select.layui-nav .layui-nav-more, +.layadmin-tabs-select.layui-nav .layui-nav-bar{display: none;} + +.layadmin-pagetabs .layui-tab{margin: 0; overflow: hidden;} +.layadmin-pagetabs .layui-tab-title{height: 40px; border: none;} +.layadmin-pagetabs .layui-tab-title li{min-width: 0; line-height: 40px; max-width: 160px; text-overflow: ellipsis; padding-right: 40px; overflow: hidden; border-right: 1px solid #f6f6f6; vertical-align: top;} +.layadmin-pagetabs .layui-tab-title li:first-child{ padding-right: 15px;} +.layadmin-pagetabs .layui-tab-title li:first-child .layui-tab-close{display: none;} +.layadmin-pagetabs .layui-tab-title li .layui-tab-close{position: absolute; right: 8px; top: 50%; margin: -7px 0 0 0; width: 16px; height: 16px; line-height: 16px; border-radius: 50%; font-size: 12px;} +.layadmin-pagetabs .layui-tab-title li:after{content:''; position: absolute; top: 0; left: 0; width: 0; height: 2px; border-radius: 0; background-color: #EBF4FF; transition: all .3s; -webkit-transition: all .3s;} +.layadmin-pagetabs .layui-tab-title li:hover:after{width: 100%;} + +/*.layadmin-pagetabs .layui-tab-title li:hover,*/ +/*.layadmin-pagetabs .layui-tab-title li.layui-this{background-color: #f6f6f6; }*/ +/*.layadmin-pagetabs .layui-tab-title li.layui-this:after{width: 100%; border: none; height: 2px; background-color: #292B34;}*/ + + +#LAY_app_tabsheader li:hover, +#LAY_app_tabsheader li.layui-this{ background-color: #EBF4FF; } +#LAY_app_tabsheader li.layui-this:after{width: 100%; border: none; height: 2px; background-color: #3A91FB !important;} +#LAY_app_tabsheader .layui-this { color: #3A91FB !important; } +.layui-tab #LAY_app_tabsheader li:after { background-color: #3A91FB !important; } + + + +/* 不开启页面标签时 */ +.layadmin-tabspage-none .layui-layout-admin .layui-header{border-bottom: none; box-shadow: 0 1px 2px 0 rgba(0,0,0,.05);} +.layadmin-tabspage-none .layui-layout-admin .layui-body{top: 50px;} +.layadmin-tabspage-none .layadmin-header{display: block;} +.layadmin-tabspage-none .layadmin-header .layui-breadcrumb{border-top: 1px solid #f6f6f6;} + +/* 底部固定区域 */ +.layui-layout-admin .layui-footer{padding: 10px 0; text-align: center;} + +/* 默认主题修饰 */ +.layui-layout-admin .layui-header{border-bottom: 1px solid #f6f6f6; box-sizing: border-box; background-color: #fff;} +.layui-layout-admin .layui-header a, +.layui-layout-admin .layui-header a cite{color: #333;} +.layui-layout-admin .layui-header a:hover{color: #000;} +.layui-layout-admin .layui-header .layui-nav .layui-nav-more{border-top-color: #666} +.layui-layout-admin .layui-header .layui-nav .layui-nav-mored{border-color: transparent; border-bottom-color: #666;} +.layui-layout-admin .layui-header .layui-nav .layui-this:after, +.layui-layout-admin .layui-header .layui-nav-bar{height: 2px; background-color: #20222A} +.layui-layout-admin .layui-logo{background-color: #20222A; box-shadow: 0 1px 2px 0 rgba(0,0,0,.15);} +.layui-layout-admin .layui-logo, +.layui-layout-admin .layui-logo a{color: #fff; color: rgba(255,255,255,.8)} +.layui-side-menu{box-shadow: 1px 0 2px 0 rgba(0,0,0,.05);} +.layui-layout-admin .layui-footer{box-shadow: 0 -1px 2px 0 rgba(0,0,0,.05);} + +.layui-side-menu, +.layadmin-setTheme-side{background-color: #20222A; color: #fff;} +.layadmin-setTheme-header{background-color: #fff;} + +.layui-layout-admin .layui-footer{background-color: #fff;} +.layui-tab-admin .layui-tab-title{background-color: #393D49; color: #fff;} + + +/* + + 格局 + +*/ + +.layui-fluid{padding: 15px;} +.layadmin-header{display: none; height: 50px; line-height: 50px; margin-bottom: 0; border-radius: 0;} +.layadmin-header .layui-breadcrumb{padding: 0 15px;} +.layui-card-header{position: relative;} +.layui-card-header .layui-icon{line-height: initial; position: absolute; right: 15px; top: 50%; margin-top: -7px;} +.layadmin-iframe{position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; bottom: 0;} + + +/* + + 控制台 + +*/ + + +/* 重置轮播样式 */ +.layadmin-carousel{height: 185px !important; background-color: #fff;} +.layadmin-carousel .layui-carousel-ind li{background-color: #e2e2e2;} +.layadmin-carousel .layui-carousel-ind li:hover{background-color: #c2c2c2;} +.layadmin-carousel .layui-carousel-ind li.layui-this{background-color: #999;} +.layadmin-carousel .layui-carousel, +.layadmin-carousel > *[carousel-item] > *{background-color: #fff;} +.layadmin-carousel .layui-col-space10{margin: 0;} +.layadmin-carousel .layui-carousel-ind{position: absolute; top: -41px; text-align: right;} +.layadmin-carousel .layui-carousel-ind ul{background: none;} + +/* 重置tab样式 */ +.layui-card .layui-tab-brief .layui-tab-title{height: 42px; border-bottom-color: #f6f6f6;} +.layui-card .layui-tab-brief .layui-tab-title li{margin: 0 15px; padding: 0; line-height: 42px;} +.layui-card .layui-tab-brief .layui-tab-title li.layui-this{color: #333;} +.layui-card .layui-tab-brief .layui-tab-title .layui-this:after{height: 43px;} +.layui-card .layui-tab-brief .layui-tab-content{padding: 15px;} +.layui-card .layui-table-view{margin: 0;} + +/* 快捷方式 */ +.layadmin-shortcut li{text-align: center;} +.layadmin-shortcut li .layui-icon{display: inline-block; width: 100%; height: 60px; line-height: 60px; text-align: center; border-radius: 2px; font-size: 30px; background-color: #F8F8F8; color: #333; transition: all .3s; -webkit-transition: all .3s;} +.layadmin-shortcut li cite{position: relative; top: 2px; display: block; color: #666; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size: 14px;} +.layadmin-shortcut li:hover .layui-icon{background-color: #f2f2f2;} + +/* 待办事项 */ +.layadmin-backlog .layadmin-backlog-body{display: block; padding: 10px 15px; background-color: #f8f8f8; color: #999; border-radius: 2px; transition: all .3s; -webkit-transition: all .3s;} +.layadmin-backlog-body h3{padding-bottom: 10px; font-size: 12px;} +.layadmin-backlog-body p cite{font-style: normal; font-size: 30px; font-weight: 300; color: #009688;} +.layadmin-backlog-body:hover{background-color: #f2f2f2; color: #888;} + +/* 数据概览 */ +.layadmin-dataview{height: 332px !important;} +.layadmin-dataview>*[carousel-item]:before{display: none;} +.layadmin-dataview>*[carousel-item]>div{height: 332px;} + +/* 控制台效果报告 */ +.layadmin-takerates{padding-top: 5px;} +.layadmin-takerates .layui-progress{margin: 50px 0 60px;} +.layadmin-takerates .layui-progress:last-child{margin-bottom: 10px;} +.layadmin-takerates .layui-progress h3{position: absolute; right: 0; top: -35px; color: #999; font-size: 14px;} +.layadmin-takerates .layui-progress-bar{text-align: left;} +.layadmin-takerates .layui-progress-text{top: -35px; line-height: 26px; font-size: 26px;} + +/* 产品动态 */ +.layadmin-news{height: 60px !important; padding: 5px 0;} +.layadmin-news a{display: block; line-height: 60px; text-align: center;} +.layadmin-news .layui-carousel-ind{height: 45px;} + +/* 文字列表 */ +.layadmin-list li{margin-bottom: 6px; padding-bottom: 6px; border-bottom-color: #f6f6f6; list-style-position: inside; list-style-type: disc;} +.layadmin-list li{text-overflow: ellipsis; overflow: hidden; white-space: nowrap;} +.layadmin-list li a{color: #666;} +.layadmin-list li a:hover{color: #009688;} +.layadmin-list li:last-child{border: none; padding: 0; margin: 0;} + +/* 文本区域 */ +.layadmin-text p{margin-bottom: 10px; text-indent: 2em;} +.layadmin-text p:last-child{margin: 0;} +.layadmin-font-em{font-size: 13px; color: #758697;} + + + + +/******************************** + + 其它主页开始 By star1029 + +*******************************/ + +/* 主页示例一 by star1029 */ +/* 进行中的项目 */ +.layui-card-header .layui-a-tips{position: absolute; right: 15px; color: #01AAED;} +.layuiadmin-card-text{background-color: #f8f8f8; color: #777; padding: 24px;} +.layuiadmin-card-text .layui-text-top{padding-bottom: 10px;} +.layuiadmin-card-text .layui-text-top i{margin-right: 10px; font-size: 24px; color: #009688;} +.layuiadmin-card-text .layui-text-top a{line-height: 24px; font-size: 16px; vertical-align: top;} +.layuiadmin-card-text .layui-text-center{height: 44px; line-height: 22px; margin-bottom: 10px; overflow: hidden;} +.layuiadmin-card-text .layui-text-bottom{position: relative;} +.layuiadmin-card-text .layui-text-bottom a{color: #777; font-size: 12px; text-overflow: ellipsis; word-break: break-all;} +.layuiadmin-card-text .layui-text-bottom span{color: #CCC; font-size: 12px; position: absolute; right: 0;} +.layuiadmin-card-text a:hover, +.layuiadmin-card-link a:hover, +.layuiadmin-card-team li a:hover{color: #01AAED; transition: all 300ms;} + +/* 动态 */ +.layuiadmin-card-status{padding: 0 10px 10px 10px;} +.layuiadmin-card-status dd{padding: 15px 0; border-bottom: 1px solid #EEE; display: -webkit-flex; display: flex;} +.layuiadmin-card-status dd:last-child{border: none;} +.layuiadmin-card-status dd div.layui-status-img, +.layuiadmin-card-team .layui-team-img{width: 32px; height: 32px; border-radius: 50%; background-color: #009688; margin-right: 15px;} +.layuiadmin-card-status dd div.layui-status-img a{width: 100%; height: 100%; display: inline-block; text-align: center; line-height: 32px;} +.layuiadmin-card-status dd div.layui-status-img img, +.layuiadmin-card-team .layui-team-img img{width: 50%; height: 50%;} +.layuiadmin-card-status dd div a{color: #01AAED;} +.layuiadmin-card-status dd div span{color: #BBB;} + +/* 便捷导航 */ +.layuiadmin-card-link{padding-left: 10px; font-size: 0} +.layuiadmin-card-link a{display: inline-block; width: 25%; color: #666; font-size: 14px; margin-bottom: 12px;} +.layuiadmin-card-link button{vertical-align: top;} +.layuiadmin-card-link button:hover{color: #009688;} + +/* 团队 */ +.layuiadmin-card-team li{padding: 10px 0 10px 10px;} +.layuiadmin-card-team .layui-team-img{display: inline-block; margin-right: 8px; width: 24px; height: 24px; text-align: center; line-height: 24px;} +.layuiadmin-card-team span{color: #777;} + + +/* 主页示例二 by star1029 */ +.layuiadmin-badge{position: absolute; top: 50%; margin-top: -9px; right: 15px; color: #01AAED; } +.layuiadmin-card-list{padding: 15px;} +.layuiadmin-card-list p.layuiadmin-big-font{font-size: 36px; color: #666; line-height: 36px; padding: 5px 0 10px; overflow: hidden; text-overflow: ellipsis; word-break: break-all; white-space: nowrap;} +.layuiadmin-card-list p.layuiadmin-normal-font{padding-bottom: 10px; font-size: 20px; color: #666; line-height: 24px;} +.layuiadmin-span-color{font-size: 14px; position: absolute; right: 15px;} +.layuiadmin-span-color i{padding-left: 5px;} +.layuiadmin-btn-group{position: absolute; right: 15px;} + +.layuiadmin-card-status li{position: relative; padding: 10px 0; border-bottom: 1px solid #EEE;} +.layuiadmin-card-status li h3{padding-bottom: 5px; font-weight: 700;} +.layuiadmin-card-status li p{padding-bottom: 10px;} +.layuiadmin-card-status li>span{color: #999;} +.layuiadmin-home2-usernote .layuiadmin-reply{display: none; position: absolute; right: 0; bottom: 12px;} +.layuiadmin-home2-usernote li:hover .layuiadmin-reply{display: block;} + +.layuiadmin-page-table td span{color: #2F4056;} +.layuiadmin-page-table td span.first{color: #FF5722;} +.layuiadmin-page-table td span.second{color: #FFB800;} +.layuiadmin-page-table td span.third{color: #5FB878;} + + +/****** 其它主页结束 By star1029 ******/ + + + + +/* + + 应用 + +*/ + + +/* 消息中心 */ +.layuiAdmin-msg-detail h1{font-size: 16px;} +.layuiAdmin-msg-detail .layui-card-header{height: auto; line-height: 30px; padding: 15px;} +.layuiAdmin-msg-detail .layui-card-header span{padding: 0 5px; color: #999;} +.layuiAdmin-msg-detail .layui-card-header span:first-child{padding-left: 0;} +.layuiAdmin-msg-detail .layui-card-body{padding: 15px;} + +/* 文章列表 */ +.layuiadmin-content-bread{padding-bottom: 20px;} + +/* 进度条样式 */ +.layuiadmin-order-progress{position: relative; top: 12px;} + + + + +/* + + 系统 + +*/ + + +/* 头部图标重置 */ +.layui-card-header.layuiadmin-card-header-auto{padding-top: 15px; padding-bottom: 15px; height: auto;} +.layuiadmin-card-header-auto i.layuiadmin-button-btn{position: relative; right: 0; top: 0; vertical-align: middle;} +.layuiadmin-card-header-auto .layui-form-item:last-child{margin-bottom: 0;} + + +/* 主题设置 */ +.layadmin-setTheme{padding: 15px; overflow-x: hidden;} +.layadmin-setTheme>h5{padding: 20px 0 10px; color: #000;} +.layadmin-setTheme>h5:first-child{padding-top: 0;} +.layadmin-setTheme-color{width: 330px; font-size: 0;} +.layadmin-setTheme-color li{position: relative; display: inline-block; vertical-align: top; width: 80px; height: 50px; margin: 0 15px 15px 0; background-color: #f2f2f2; cursor: pointer; font-size: 12px; color: #666;} +.layadmin-setTheme-color li:after{content: ''; position: absolute; z-index: 20; top: 50%; left: 50%; width: 1px; height: 0; border: 1px solid #f2f2f2; transition: all .3s; -webkit-transition: all .3s; opacity: 0;} +.layadmin-setTheme-color li.layui-this:after, +.layadmin-setTheme-color li:hover:after{width: 100%; height: 100%; padding: 4px; top: -5px; left: -5px; border-color: #5FB878; opacity: 1;} + +.layadmin-setTheme-header{position: relative; z-index: 10; height: 10px; border-top: 1px solid #f2f2f2; border-right: 1px solid #f2f2f2;} +.layadmin-setTheme-side{position: absolute; left: 0; top: 0; width: 20px; height: 100%; z-index: 11; box-shadow: 1px 0 2px 0 rgba(0,0,0,.05);} +.layadmin-setTheme-logo{position: absolute; left: 0; top: 0; width: 100%; height: 10px; box-shadow: 0 1px 2px 0 rgba(0,0,0,.15);} +.layadmin-form-right{text-align: right;} + + +/* 关于 */ +.layadmin-about p{margin-bottom: 10px;} + +/* 菜单列表 */ +.layadmin-menu-list .layui-card-header{height: 50px; line-height: 50px; font-size: 16px;} +.layadmin-menu-list .layui-card-header:active{background-color: #f2f2f2;} +.layadmin-menu-list .layui-card-header .layui-icon{position: relative; top: 1px; left: 0; display: inline-block; margin: 0 10px 0; font-size: 18px;} + + +/* 动画 */ +@-webkit-keyframes layui-rl{ /* 从右往左滑入 */ + from {-webkit-transform: translate3d(100%, 0, 0);} + to {-webkit-transform: translate3d(0, 0, 0);} +} +@keyframes layui-rl{ + from {transform: translate3d(100%, 0, 0);} + to {transform: translate3d(0, 0, 0);} +} +.layui-anim-rl{-webkit-animation-name: layui-rl; animation-name: layui-rl;} + +@-webkit-keyframes layui-lr{ /* 从右往左滑入 */ + from {-webkit-transform: translate3d(0 0, 0); opacity: 1;} + to {-webkit-transform: translate3d(100%, 0, 0); opacity: 1;} +} +@keyframes layui-lr{ + from {transform: translate3d(0, 0, 0);} + to {transform: translate3d(100%, 0, 0);} +} +.layui-anim-lr{-webkit-animation-name: layui-lr; animation-name: layui-lr;} + +.layui-anim-rl.layer-anim-close{-webkit-animation-name: layui-lr; animation-name: layui-lr;} + + +/* 提示页 */ +.layadmin-tips{margin-top: 30px; text-align: center;} +.layadmin-tips .layui-icon[face]{display: inline-block; font-size: 300px; color: #393D49;} +.layadmin-tips .layui-text{width: 500px; margin: 30px auto; padding-top: 20px; border-top: 5px solid #009688; font-size: 16px;} +.layadmin-tips h1{font-size: 100px; line-height: 100px; color: #009688;} +.layadmin-tips .layui-text .layui-anim{display: inline-block;} + + +/* + + 响应式补充 + +*/ + +@media screen and (max-width: 768px) { + + /* 产品清单模板 */ + .layadmin-panel-selection{margin: 0; width: auto;} + + /* 导航 */ + .layui-body .layui-nav .layui-nav-item{display: block;} + + /* 主体容器 */ + .layui-layout-admin .layui-body .layadmin-tabsbody-item{-webkit-overflow-scrolling: touch; overflow: auto;} +} + + + diff --git a/public/static/layui-admin/dist/layuiadmin/style/like.css b/public/static/layui-admin/dist/layuiadmin/style/like.css new file mode 100755 index 0000000..f3886e9 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/style/like.css @@ -0,0 +1,199 @@ +.upload-image-div{ + height: 80px; + width: 80px; + float: left; + opacity: 1; + position: relative; + border:1px dashed #a0a0a0; + background-image:url('../layui/images/other/image.png'); + background-repeat: no-repeat; + background-position: 50% 35%; + margin: 4px; + text-align: center; +} +.upload-image-a{ + cursor: pointer; + position: absolute; + z-index: 100; + top: 58px; + right: -10%; + width: 100px; + height: 20px; + font-size: 8px; + line-height: 16px; + text-align: center; + border-radius: 10px; + color: #4e8bff; +} +.upload-image-a:hover +{ + color: #0641cb; +} +.upload-video-div{ + height: 80px; + width: 80px; + float: left; + opacity: 1; + position: relative; + border:1px dashed #a0a0a0; + background-image:url('../layui/images/other/video.png'); + background-repeat: no-repeat; + background-position: 50% 35%; + margin: 4px; + text-align: center; +} +.upload-video-a{ + cursor: pointer; + position: absolute; + z-index: 100; + top: 58px; + right: -10%; + width: 100px; + height: 20px; + font-size: 8px; + line-height: 16px; + text-align: center; + border-radius: 10px; + color: #4e8bff; +} +.upload-video-a:hover +{ + color: #0641cb; +} + + +.like-layui-collapse { + border-width: 1px; + border-style: dashed; + border-radius: 2px; + border-color: #c4c4c4; +} +.like-layui-colla-title { + position: relative; + height: 42px; + line-height: 42px; + padding: 0 15px 0 35px; + color: #333; + background-color: #ffffff; + cursor: pointer; + font-size: 14px; + overflow: hidden; +} +.like-layui-colla-title:hover { + color: #2ba1fc; +} + + +.like-layui-form-label{ + margin: 20px; + padding-left: 5px; + border-left: solid #2ba1fc 8px; + text-align: left; + width: 100px +} +.like-layui-elem-quote { + margin-bottom: 10px; + padding: 15px; + line-height: 22px; + border-left: 5px solid #2ba1fc; + border-radius: 0 2px 2px 0; + background-color: #f2f2f2; +} + +.layui-form-select dl dd.layui-this { + background-color: #1E9FFF; +} + +.layui-form-onswitch { + border-color: #1E9FFF; + background-color: #1E9FFF; +} + +.layui-laypage .layui-laypage-curr .layui-laypage-em { + position: absolute; + left: -1px; + top: -1px; + padding: 1px; + width: 100%; + height: 100%; + background-color: #1E9FFF; +} + +.info_footer { + text-align: center; + bottom: 20px; + left: 40%; + font-size:14px; + color:rgba(112,112,112,1); + font-weight:400; + margin-bottom: 12px; +} +.layui-form-radioed>i { + color: #1E9FFF; +} +.layui-form-radio>i:hover, .layui-form-radioed>i { + color: #1E9FFF; +} +.layui-form-checked[lay-skin=primary] i { + border-color: #1E9FFF!important; + background-color: #1E9FFF; + color: #fff; +} +.layui-form-checkbox[lay-skin=primary]:hover i { + border-color: #1E9FFF; + color: #fff; +} +.layui-btn-primary:hover { + border-color: #1E9FFF; + color: #333; +} + +/* 新文件上传 */ +.upload-file-div { + float: left; + width: 80px; + height:80px; + border: 1px dashed #a0a0a0; +} +.video-style { + background: url(/static/plug/layui-admin/dist/layuiadmin/layui/images/other/video.png); +} +.upload-file-title { + color: #4e8bff; + position: relative; + top:50px; + right: -10%; + font-size: 8px; +} + +#video-container { + float: left; + width: 500px; +} + +#video-container li { + float: left; + position: relative; + margin-right: 5px; +} + + +#video-container li:hover .video-del { + display: inline-block; +} + +.video-del { + display: none; + width: 18px; + height: 18px; + line-height: 18px; + background: rgba(33,33,33,0.2); + color: #fff; + text-align: center; + border-radius: 50%; + font-size: 14px; + position: absolute; + right: -9px; + top: -9px; + box-sizing: border-box; +} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/style/login.css b/public/static/layui-admin/dist/layuiadmin/style/login.css new file mode 100755 index 0000000..30fb615 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/style/login.css @@ -0,0 +1,55 @@ +/** + + @Name:layuiAdmin 登入注册页 + @Author:贤心 + @Site:http://www.layui.com/admin/ + @License:GPL-2 + + */ + +html,body,#LAY_app{height:100%;} +.layui-layout-body{overflow: auto;} + +#LAY-user-login, +.layadmin-user-display-show{display: block !important;} +.layadmin-user-login{position: relative; left: 0; top: 0; padding: 110px 0; min-height: 100%; box-sizing: border-box;} +.layadmin-user-login-main{width: 375px; margin: 0 auto; box-sizing: border-box;} +.layadmin-user-login-box{padding: 20px;} +.layadmin-user-login-header{text-align: center;} +.layadmin-user-login-header h2{margin-bottom: 10px; font-weight: 300; font-size: 30px; color: #000;} +.layadmin-user-login-header p{font-weight: 300; color: #999;} + +.layadmin-user-login-body .layui-form-item{position: relative;} +.layadmin-user-login-icon{position: absolute; left: 1px; top: 1px; width: 38px; line-height: 36px; text-align: center; color: #d2d2d2;} +.layadmin-user-login-body .layui-form-item .layui-input{padding-left: 38px;} +.layadmin-user-login-codeimg{max-height: 38px; width: 100%; cursor: pointer; box-sizing: border-box;} + +.layadmin-user-login-other{position: relative; font-size: 0; line-height: 38px; padding-top: 20px;} +.layadmin-user-login-other>*{display: inline-block; vertical-align: middle; margin-right: 10px; font-size: 14px;} +.layadmin-user-login-other .layui-icon{position: relative; top: 2px; font-size: 26px;} +.layadmin-user-login-other a:hover{opacity: 0.8;} + +.layadmin-user-jump-change{float: right;} + +.layadmin-user-login-footer{position: absolute; left: 0; bottom: 0; width: 100%; line-height: 30px; padding: 20px; text-align: center; box-sizing: border-box; color: rgba(0,0,0,.5)} +.layadmin-user-login-footer span{padding: 0 5px;} +.layadmin-user-login-footer a{padding: 0 5px; color: rgba(0,0,0,.5);} +.layadmin-user-login-footer a:hover{color: rgba(0,0,0,1);} + +/* 有背景图时 */ +.layadmin-user-login-main[bgimg]{background-color: #fff; box-shadow: 0 0 5px rgba(0,0,0,0.05);} + +/* 主题背景 */ +.ladmin-user-login-theme{position: fixed; bottom: 0; left: 0; width: 100%; text-align: center;} +.ladmin-user-login-theme ul{display: inline-block; padding: 5px; background-color: #fff;} +.ladmin-user-login-theme ul li{display: inline-block; vertical-align: top; width: 64px; height: 43px; cursor: pointer; transition: all .3s; -webkit-transition: all .3s; background-color: #f2f2f2;} +.ladmin-user-login-theme ul li:hover{opacity: 0.9} + +@media screen and (max-width: 768px) { + .layadmin-user-login{padding-top: 60px;} + .layadmin-user-login-main{width: 300px;} + .layadmin-user-login-box{padding: 10px;} +} + + + diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/admin.css b/public/static/layui-admin/dist/layuiadmin/style/res/admin.css new file mode 100755 index 0000000..009185f --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/style/res/admin.css @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + html #layuicss-layuiAdmin{display:none;position:absolute;width:1989px}::-webkit-input-placeholder{color:#ccc}html{background-color:#f2f2f2;color:#666}.layadmin-tabsbody-item,[template]{display:none}[lay-href],[lay-tips],[layadmin-event]{cursor:pointer}.layui-layout-admin .layui-header{position:fixed;top:0;left:0;width:100%;height:50px}.layui-layout-admin .layui-header .layui-nav .layui-nav-child a{color:#333}.layui-layout-admin .layui-side{width:220px;top:0;z-index:1001}.layui-layout-admin .layui-header .layui-nav .layui-nav-item,.layui-layout-admin .layui-logo{height:50px;line-height:50px}.layui-layout-admin .layui-logo{position:fixed;left:0;top:0;z-index:1002;width:220px;height:49px;padding:0 15px;box-sizing:border-box;overflow:hidden;font-weight:300;background-repeat:no-repeat;background-position:center center}.layadmin-pagetabs,.layui-layout-admin .layui-body,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-layout-left{left:220px}.layadmin-pagetabs{position:fixed;top:50px;right:0;z-index:999}.layadmin-pagetabs .layui-breadcrumb{padding:0 15px}.layui-layout-admin .layui-body{position:fixed;top:90px;bottom:0}.layui-layout-admin .layui-body .layadmin-tabsbody-item{position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden}.layui-layout-admin .layui-header .layui-nav-img{width:26px;height:26px}.layui-layout-admin .layui-header .layui-nav-child{top:55px}.layui-layout-admin .layui-header .layui-layout-right .layui-nav-child{left:auto;right:0}.layui-layout-admin .layui-header .layui-nav .layui-nav-child dd.layui-this,.layui-layout-admin .layui-header .layui-nav .layui-nav-child dd.layui-this a{background:0 0}.layadmin-pagetabs,.layui-layout-admin .layui-body,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-header .layui-layout-right,.layui-layout-admin .layui-header .layui-nav .layui-nav-item,.layui-layout-admin .layui-layout-left,.layui-layout-admin .layui-logo,.layui-layout-admin .layui-side{transition:all .3s;-webkit-transition:all .3s}.layui-icon-login-qq{color:#3492ED}.layui-icon-login-wechat{color:#4DAF29}.layui-icon-login-weibo{color:#CF1900}.layui-form[wid100] .layui-form-label{width:100px}.layui-form[wid100] .layui-input-block{margin-left:130px}@media screen and (max-width:450px){.layui-form[wid100] .layui-form-item .layui-input-inline{margin-left:132px}.layui-form[wid100] .layui-form-item .layui-input-inline+.layui-form-mid{margin-left:130px}}.layui-form-item .layui-input-company{width:auto;padding-right:10px;line-height:38px}.layui-bg-white{background-color:#fff}.layadmin-loading{position:absolute;left:50%;top:50%;margin:-16px -15px;font-size:30px;color:#c2c2c2}.layadmin-fixed{position:fixed;left:0;top:0;z-index:999}.layadmin-link{color:#029789!important}.layadmin-link:hover{opacity:.8}.layui-layer-admin .layui-layer-title{height:50px;line-height:50px;border:0;background-color:#20222A;color:#fff}.layui-layer-admin i[close]{position:absolute;padding:5px;right:10px;top:12px;color:#fff;cursor:pointer}.layui-layer-admin .layui-layer-content{padding:20px;line-height:22px}.layui-layer-admin .layui-layer-content cite{font-style:normal;color:#FF5722}.layui-layer-adminRight{top:50px!important;bottom:0;box-shadow:1px 1px 10px rgba(0,0,0,.1);border-radius:0;overflow:auto}.layadmin-note .layui-layer-content{padding:0}.layadmin-note textarea{display:block;width:300px;height:132px;min-width:300px;min-height:132px;line-height:20px;padding:10px 20px;border:none;box-sizing:border-box;color:#666;word-wrap:break-word}.layui-layout-admin .layui-layout-left{padding:0 10px}.layui-layout-admin .layui-layout-left .layui-nav-item{margin:0 20px}.layui-layout-admin .layui-input-search{display:inline-block;vertical-align:middle;height:32px;border:none;cursor:text}.layui-layout-admin .layui-layout-left a,.layui-layout-admin .layui-layout-right{padding:0}.layui-header .layui-nav-item .layui-icon{position:relative;top:1px;font-size:16px}.layui-header .layui-layout-right .layui-badge-dot{margin-left:0}.layui-header .layui-nav .layui-this:after,.layui-layout-admin .layui-header .layui-nav-bar{top:0!important;bottom:auto;height:3px;background-color:#fff;background-color:rgba(255,255,255,.3)}.layadmin-body-shade{position:fixed;display:none;left:0;right:0;top:0;bottom:0;background-color:rgba(0,0,0,.3);z-index:1000}.layui-side-menu .layui-side-scroll{width:240px}.layui-side-menu .layui-nav{width:220px;margin-top:50px;background:0 0}.layui-side-menu .layui-nav .layui-nav-item a{height:40px;line-height:40px;padding-left:45px;padding-right:30px}.layui-side-menu .layui-nav .layui-nav-item>a{padding-top:8px;padding-bottom:8px}.layui-side-menu .layui-nav .layui-nav-item a:hover{background:0 0}.layui-side-menu .layui-nav .layui-nav-itemed>.layui-nav-child{padding:5px 0}.layui-side-menu .layui-nav .layui-nav-item .layui-icon{position:absolute;top:50%;left:20px;margin-top:-19px}.layui-side-menu .layui-nav .layui-nav-child .layui-nav-child{background:0 0!important}.layui-side-menu .layui-nav .layui-nav-child .layui-nav-child a{padding-left:60px}.layui-side-menu .layui-nav .layui-nav-more{right:15px}@media screen and (max-width:992px){.layui-layout-admin .layui-side{transform:translate3d(-220px,0,0);-webkit-transform:translate3d(-220px,0,0);width:220px}.layadmin-pagetabs,.layui-layout-admin .layui-body,.layui-layout-admin .layui-footer,.layui-layout-admin .layui-layout-left{left:0}}.layadmin-side-shrink .layui-layout-admin .layui-logo{width:60px;background-image:url(res/logo.png)}.layadmin-side-shrink .layui-layout-admin .layui-logo span{display:none}.layadmin-side-shrink .layui-side{left:0;width:60px}.layadmin-side-shrink .layadmin-pagetabs,.layadmin-side-shrink .layui-layout-admin .layui-body,.layadmin-side-shrink .layui-layout-admin .layui-footer,.layadmin-side-shrink .layui-layout-admin .layui-layout-left{left:60px}.layadmin-side-shrink .layui-side-menu .layui-nav{position:static;width:60px}.layadmin-side-shrink .layui-side-menu .layui-nav-item{position:static}.layadmin-side-shrink .layui-side-menu .layui-nav-item>a{padding-right:0}.layadmin-side-shrink .layui-side-menu .layui-nav-item cite,.layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-item>.layui-nav-child,.layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-item>a .layui-nav-more{display:none;padding:8px 0;width:200px}.layadmin-side-shrink .layui-side-menu .layui-nav>.layui-nav-itemed>a{background:rgba(0,0,0,.3)}.layadmin-side-spread-sm .layadmin-pagetabs,.layadmin-side-spread-sm .layui-layout-admin .layui-body,.layadmin-side-spread-sm .layui-layout-admin .layui-footer,.layadmin-side-spread-sm .layui-layout-admin .layui-layout-left{left:0;transform:translate3d(220px,0,0);-webkit-transform:translate3d(220px,0,0)}.layadmin-side-spread-sm .layui-layout-admin .layui-layout-right{transform:translate3d(220px,0,0);-webkit-transform:translate3d(220px,0,0)}.layadmin-side-spread-sm .layui-side{transform:translate3d(0,0,0);-webkit-transform:translate3d(0,0,0)}.layadmin-side-spread-sm .layadmin-body-shade{display:block}.layadmin-pagetabs .layui-tab-title li:first-child .layui-tab-close,.layadmin-tabs-select.layui-nav .layui-nav-bar,.layadmin-tabs-select.layui-nav .layui-nav-more{display:none}.layadmin-pagetabs{height:40px;line-height:40px;padding:0 80px 0 40px;background-color:#fff;box-sizing:border-box;box-shadow:0 1px 2px 0 rgba(0,0,0,.1)}.layadmin-pagetabs .layadmin-tabs-control{position:absolute;top:0;width:40px;height:100%;text-align:center;cursor:pointer;transition:all .3s;-webkit-transition:all .3s;box-sizing:border-box;border-left:1px solid #f6f6f6}.layadmin-pagetabs .layadmin-tabs-control:hover{background-color:#f6f6f6}.layadmin-pagetabs .layui-icon-prev{left:0;border-left:none;border-right:1px solid #f6f6f6}.layadmin-pagetabs .layui-icon-next{right:40px}.layadmin-pagetabs .layui-icon-down{right:0}.layadmin-tabs-select.layui-nav{position:absolute;left:0;top:0;width:100%;height:100%;padding:0;background:0 0}.layadmin-tabs-select.layui-nav .layui-nav-item{line-height:40px}.layadmin-tabs-select.layui-nav .layui-nav-item>a{height:40px}.layadmin-tabs-select.layui-nav .layui-nav-item a{color:#666}.layadmin-tabs-select.layui-nav .layui-nav-child{top:40px;left:auto;right:0}.layadmin-tabs-select.layui-nav .layui-nav-child dd.layui-this,.layadmin-tabs-select.layui-nav .layui-nav-child dd.layui-this a{background-color:#f2f2f2!important;color:#333}.layadmin-pagetabs .layui-tab{margin:0;overflow:hidden}.layadmin-pagetabs .layui-tab-title{height:40px;border:none}.layadmin-pagetabs .layui-tab-title li{min-width:0;line-height:40px;max-width:160px;text-overflow:ellipsis;padding-right:40px;overflow:hidden;border-right:1px solid #f6f6f6;vertical-align:top}.layadmin-pagetabs .layui-tab-title li:first-child{padding-right:15px}.layadmin-pagetabs .layui-tab-title li .layui-tab-close{position:absolute;right:8px;top:50%;margin:-7px 0 0;width:16px;height:16px;line-height:16px;border-radius:50%;font-size:12px}.layadmin-pagetabs .layui-tab-title li:after{content:'';position:absolute;top:0;left:0;width:0;height:2px;border-radius:0;background-color:#292B34;transition:all .3s;-webkit-transition:all .3s}.layadmin-pagetabs .layui-tab-title li:hover:after{width:100%}.layadmin-pagetabs .layui-tab-title li.layui-this,.layadmin-pagetabs .layui-tab-title li:hover{background-color:#f6f6f6}.layadmin-pagetabs .layui-tab-title li.layui-this:after{width:100%;border:none;height:2px;background-color:#292B34}.layadmin-tabspage-none .layui-layout-admin .layui-header{border-bottom:none;box-shadow:0 1px 2px 0 rgba(0,0,0,.05)}.layadmin-tabspage-none .layui-layout-admin .layui-body{top:50px}.layadmin-tabspage-none .layadmin-header{display:block}.layadmin-tabspage-none .layadmin-header .layui-breadcrumb{border-top:1px solid #f6f6f6}.layui-layout-admin .layui-header{border-bottom:1px solid #f6f6f6;box-sizing:border-box;background-color:#fff}.layui-layout-admin .layui-header a,.layui-layout-admin .layui-header a cite{color:#333}.layui-layout-admin .layui-header a:hover{color:#000}.layui-layout-admin .layui-header .layui-nav .layui-nav-more{border-top-color:#666}.layui-layout-admin .layui-header .layui-nav .layui-nav-mored{border-color:transparent transparent #666}.layui-layout-admin .layui-header .layui-nav .layui-this:after,.layui-layout-admin .layui-header .layui-nav-bar{height:2px;background-color:#20222A}.layui-layout-admin .layui-logo{background-color:#20222A;box-shadow:0 1px 2px 0 rgba(0,0,0,.15)}.layui-layout-admin .layui-logo,.layui-layout-admin .layui-logo a{color:#fff;color:rgba(255,255,255,.8)}.layui-side-menu{box-shadow:1px 0 2px 0 rgba(0,0,0,.05)}.layui-layout-admin .layui-footer{padding:10px 0;text-align:center;box-shadow:0 -1px 2px 0 rgba(0,0,0,.05)}.layadmin-setTheme-side,.layui-side-menu{background-color:#20222A;color:#fff}.layadmin-setTheme-header,.layui-layout-admin .layui-footer{background-color:#fff}.layui-tab-admin .layui-tab-title{background-color:#393D49;color:#fff}.layui-fluid{padding:15px}.layadmin-header{display:none;height:50px;line-height:50px;margin-bottom:0;border-radius:0}.layadmin-header .layui-breadcrumb{padding:0 15px}.layui-card-header{position:relative}.layui-card-header .layui-icon{line-height:initial;position:absolute;right:15px;top:50%;margin-top:-7px}.layadmin-iframe{position:absolute;width:100%;height:100%;left:0;top:0;right:0;bottom:0}.layadmin-carousel{height:185px!important;background-color:#fff}.layadmin-carousel .layui-carousel-ind li{background-color:#e2e2e2}.layadmin-carousel .layui-carousel-ind li:hover{background-color:#c2c2c2}.layadmin-carousel .layui-carousel-ind li.layui-this{background-color:#999}.layadmin-carousel .layui-carousel,.layadmin-carousel>[carousel-item]>*{background-color:#fff}.layadmin-carousel .layui-col-space10{margin:0}.layadmin-carousel .layui-carousel-ind{position:absolute;top:-41px;text-align:right}.layadmin-carousel .layui-carousel-ind ul{background:0 0}.layui-card .layui-tab-brief .layui-tab-title{height:42px;border-bottom-color:#f6f6f6}.layui-card .layui-tab-brief .layui-tab-title li{margin:0 15px;padding:0;line-height:42px}.layui-card .layui-tab-brief .layui-tab-title li.layui-this{color:#333}.layui-card .layui-tab-brief .layui-tab-title .layui-this:after{height:43px}.layui-card .layui-tab-brief .layui-tab-content{padding:15px}.layui-card .layui-table-view{margin:0}.layadmin-shortcut li{text-align:center}.layadmin-shortcut li .layui-icon{display:inline-block;width:100%;height:60px;line-height:60px;text-align:center;border-radius:2px;font-size:30px;background-color:#F8F8F8;color:#333;transition:all .3s;-webkit-transition:all .3s}.layadmin-shortcut li cite{position:relative;top:2px;display:block;color:#666;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;font-size:14px}.layadmin-shortcut li:hover .layui-icon{background-color:#f2f2f2}.layadmin-backlog .layadmin-backlog-body{display:block;padding:10px 15px;background-color:#f8f8f8;color:#999;border-radius:2px;transition:all .3s;-webkit-transition:all .3s}.layadmin-backlog-body h3{padding-bottom:10px;font-size:12px}.layadmin-backlog-body p cite{font-style:normal;font-size:30px;font-weight:300;color:#009688}.layadmin-backlog-body:hover{background-color:#f2f2f2;color:#888}.layadmin-dataview{height:332px!important}.layadmin-dataview>[carousel-item]:before{display:none}.layadmin-dataview>[carousel-item]>div{height:332px}.layadmin-takerates{padding-top:5px}.layadmin-takerates .layui-progress{margin:50px 0 60px}.layadmin-takerates .layui-progress:last-child{margin-bottom:10px}.layadmin-takerates .layui-progress h3{position:absolute;right:0;top:-35px;color:#999;font-size:14px}.layadmin-takerates .layui-progress-bar{text-align:left}.layadmin-takerates .layui-progress-text{top:-35px;line-height:26px;font-size:26px}.layadmin-news{height:60px!important;padding:5px 0}.layadmin-news a{display:block;line-height:60px;text-align:center}.layadmin-news .layui-carousel-ind{height:45px}.layadmin-list li{margin-bottom:6px;padding-bottom:6px;border-bottom-color:#f6f6f6;list-style-position:inside;list-style-type:disc;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.layadmin-list li a{color:#666}.layadmin-list li a:hover{color:#009688}.layadmin-list li:last-child{border:none;padding:0;margin:0}.layadmin-text p{margin-bottom:10px;text-indent:2em}.layadmin-text p:last-child{margin:0}.layadmin-font-em{font-size:13px;color:#758697}.layui-card-header .layui-a-tips{position:absolute;right:15px;color:#01AAED}.layuiadmin-card-text{background-color:#f8f8f8;color:#777;padding:24px}.layuiadmin-card-text .layui-text-top{padding-bottom:10px}.layuiadmin-card-text .layui-text-top i{margin-right:10px;font-size:24px;color:#009688}.layuiadmin-card-text .layui-text-top a{line-height:24px;font-size:16px;vertical-align:top}.layuiadmin-card-text .layui-text-center{height:44px;line-height:22px;margin-bottom:10px;overflow:hidden}.layuiadmin-card-text .layui-text-bottom{position:relative}.layuiadmin-card-text .layui-text-bottom a{color:#777;font-size:12px;text-overflow:ellipsis;word-break:break-all}.layuiadmin-card-text .layui-text-bottom span{color:#CCC;font-size:12px;position:absolute;right:0}.layuiadmin-badge,.layuiadmin-btn-group,.layuiadmin-span-color{position:absolute;right:15px}.layuiadmin-card-link a:hover,.layuiadmin-card-team li a:hover,.layuiadmin-card-text a:hover{color:#01AAED;transition:all .3s}.layuiadmin-card-status{padding:0 10px 10px}.layuiadmin-card-status dd{padding:15px 0;border-bottom:1px solid #EEE;display:-webkit-flex;display:flex}.layuiadmin-card-status dd:last-child{border:none}.layuiadmin-card-status dd div.layui-status-img,.layuiadmin-card-team .layui-team-img{width:32px;height:32px;border-radius:50%;background-color:#009688;margin-right:15px}.layuiadmin-card-status dd div.layui-status-img a{width:100%;height:100%;display:inline-block;text-align:center;line-height:32px}.layuiadmin-card-status dd div.layui-status-img img,.layuiadmin-card-team .layui-team-img img{width:50%;height:50%}.layuiadmin-card-status dd div a{color:#01AAED}.layuiadmin-card-status dd div span{color:#BBB}.layuiadmin-card-link{padding-left:10px;font-size:0}.layuiadmin-card-link a{display:inline-block;width:25%;color:#666;font-size:14px;margin-bottom:12px}.layuiadmin-card-link button{vertical-align:top}.layuiadmin-card-link button:hover{color:#009688}.layuiadmin-card-team li{padding:10px 0 10px 10px}.layuiadmin-card-team .layui-team-img{display:inline-block;margin-right:8px;width:24px;height:24px;text-align:center;line-height:24px}.layuiadmin-card-team span{color:#777}.layuiadmin-badge{top:50%;margin-top:-9px;color:#01AAED}.layuiadmin-card-list{padding:15px}.layuiadmin-card-list p.layuiadmin-big-font{font-size:36px;color:#666;line-height:36px;padding:5px 0 10px;overflow:hidden;text-overflow:ellipsis;word-break:break-all;white-space:nowrap}.layuiadmin-card-list p.layuiadmin-normal-font{padding-bottom:10px;font-size:20px;color:#666;line-height:24px}.layuiadmin-span-color{font-size:14px}.layuiadmin-span-color i{padding-left:5px}.layuiadmin-card-status li{position:relative;padding:10px 0;border-bottom:1px solid #EEE}.layuiadmin-card-status li h3{padding-bottom:5px;font-weight:700}.layuiadmin-card-status li p{padding-bottom:10px}.layuiadmin-card-status li>span{color:#999}.layuiadmin-home2-usernote .layuiadmin-reply{display:none;position:absolute;right:0;bottom:12px}.layuiadmin-home2-usernote li:hover .layuiadmin-reply{display:block}.layuiadmin-page-table td span{color:#2F4056}.layuiadmin-page-table td span.first{color:#FF5722}.layuiadmin-page-table td span.second{color:#FFB800}.layuiadmin-page-table td span.third{color:#5FB878}.layuiAdmin-msg-detail h1{font-size:16px}.layuiAdmin-msg-detail .layui-card-header{height:auto;line-height:30px;padding:15px}.layuiAdmin-msg-detail .layui-card-header span{padding:0 5px;color:#999}.layuiAdmin-msg-detail .layui-card-header span:first-child{padding-left:0}.layuiAdmin-msg-detail .layui-card-body{padding:15px}.layuiadmin-content-bread{padding-bottom:20px}.layuiadmin-order-progress{position:relative;top:12px}.layui-card-header.layuiadmin-card-header-auto{padding-top:15px;padding-bottom:15px;height:auto}.layuiadmin-card-header-auto i.layuiadmin-button-btn{position:relative;right:0;top:0;vertical-align:middle}.layuiadmin-card-header-auto .layui-form-item:last-child{margin-bottom:0}.layadmin-setTheme{padding:15px;overflow-x:hidden}.layadmin-setTheme>h5{padding:20px 0 10px;color:#000}.layadmin-setTheme>h5:first-child{padding-top:0}.layadmin-setTheme-color{width:330px;font-size:0}.layadmin-setTheme-color li{position:relative;display:inline-block;vertical-align:top;width:80px;height:50px;margin:0 15px 15px 0;background-color:#f2f2f2;cursor:pointer;font-size:12px;color:#666}.layadmin-setTheme-color li:after{content:'';position:absolute;z-index:20;top:50%;left:50%;width:1px;height:0;border:1px solid #f2f2f2;transition:all .3s;-webkit-transition:all .3s;opacity:0}.layadmin-setTheme-color li.layui-this:after,.layadmin-setTheme-color li:hover:after{width:100%;height:100%;padding:4px;top:-5px;left:-5px;border-color:#5FB878;opacity:1}.layadmin-setTheme-header{position:relative;z-index:10;height:10px;border-top:1px solid #f2f2f2;border-right:1px solid #f2f2f2}.layadmin-setTheme-side{position:absolute;left:0;top:0;width:20px;height:100%;z-index:11;box-shadow:1px 0 2px 0 rgba(0,0,0,.05)}.layadmin-setTheme-logo{position:absolute;left:0;top:0;width:100%;height:10px;box-shadow:0 1px 2px 0 rgba(0,0,0,.15)}.layadmin-form-right{text-align:right}.layadmin-about p{margin-bottom:10px}.layadmin-menu-list .layui-card-header{height:50px;line-height:50px;font-size:16px}.layadmin-menu-list .layui-card-header:active{background-color:#f2f2f2}.layadmin-menu-list .layui-card-header .layui-icon{position:relative;top:1px;left:0;display:inline-block;margin:0 10px;font-size:18px}@-webkit-keyframes layui-rl{from{-webkit-transform:translate3d(100%,0,0)}to{-webkit-transform:translate3d(0,0,0)}}@keyframes layui-rl{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}.layui-anim-rl{-webkit-animation-name:layui-rl;animation-name:layui-rl}@-webkit-keyframes layui-lr{from{-webkit-transform:translate3d(0 0,0);opacity:1}to{-webkit-transform:translate3d(100%,0,0);opacity:1}}@keyframes layui-lr{from{transform:translate3d(0,0,0)}to{transform:translate3d(100%,0,0)}}.layui-anim-lr,.layui-anim-rl.layer-anim-close{-webkit-animation-name:layui-lr;animation-name:layui-lr}.layadmin-tips{margin-top:30px;text-align:center}.layadmin-tips .layui-icon[face]{display:inline-block;font-size:300px;color:#393D49}.layadmin-tips .layui-text{width:500px;margin:30px auto;padding-top:20px;border-top:5px solid #009688;font-size:16px}.layadmin-tips h1{font-size:100px;line-height:100px;color:#009688}.layadmin-tips .layui-text .layui-anim{display:inline-block}@media screen and (max-width:768px){.layadmin-panel-selection{margin:0;width:auto}.layui-body .layui-nav .layui-nav-item{display:block}.layui-layout-admin .layui-body .layadmin-tabsbody-item{-webkit-overflow-scrolling:touch;overflow:auto}} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/bg-none.jpg b/public/static/layui-admin/dist/layuiadmin/style/res/bg-none.jpg new file mode 100755 index 0000000..b7c9e7b Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/style/res/bg-none.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/layui-logo.jpg b/public/static/layui-admin/dist/layuiadmin/style/res/layui-logo.jpg new file mode 100755 index 0000000..da24fdf Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/style/res/layui-logo.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/login.css b/public/static/layui-admin/dist/layuiadmin/style/res/login.css new file mode 100755 index 0000000..c3d87ae --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/style/res/login.css @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + #LAY_app,body,html{height:100%}.layui-layout-body{overflow:auto}#LAY-user-login,.layadmin-user-display-show{display:block!important}.layadmin-user-login{position:relative;left:0;top:0;padding:110px 0;min-height:100%;box-sizing:border-box}.layadmin-user-login-main{width:375px;margin:0 auto;box-sizing:border-box}.layadmin-user-login-box{padding:20px}.layadmin-user-login-header{text-align:center}.layadmin-user-login-header h2{margin-bottom:10px;font-weight:300;font-size:30px;color:#000}.layadmin-user-login-header p{font-weight:300;color:#999}.layadmin-user-login-body .layui-form-item{position:relative}.layadmin-user-login-icon{position:absolute;left:1px;top:1px;width:38px;line-height:36px;text-align:center;color:#d2d2d2}.layadmin-user-login-body .layui-form-item .layui-input{padding-left:38px}.layadmin-user-login-codeimg{max-height:38px;width:100%;cursor:pointer;box-sizing:border-box}.layadmin-user-login-other{position:relative;font-size:0;line-height:38px;padding-top:20px}.layadmin-user-login-other>*{display:inline-block;vertical-align:middle;margin-right:10px;font-size:14px}.layadmin-user-login-other .layui-icon{position:relative;top:2px;font-size:26px}.layadmin-user-login-other a:hover{opacity:.8}.layadmin-user-jump-change{float:right}.layadmin-user-login-footer{position:absolute;left:0;bottom:0;width:100%;line-height:30px;padding:20px;text-align:center;box-sizing:border-box;color:rgba(0,0,0,.5)}.layadmin-user-login-footer span{padding:0 5px}.layadmin-user-login-footer a{padding:0 5px;color:rgba(0,0,0,.5)}.layadmin-user-login-footer a:hover{color:rgba(0,0,0,1)}.layadmin-user-login-main[bgimg]{background-color:#fff;box-shadow:0 0 5px rgba(0,0,0,.05)}.ladmin-user-login-theme{position:fixed;bottom:0;left:0;width:100%;text-align:center}.ladmin-user-login-theme ul{display:inline-block;padding:5px;background-color:#fff}.ladmin-user-login-theme ul li{display:inline-block;vertical-align:top;width:64px;height:43px;cursor:pointer;transition:all .3s;-webkit-transition:all .3s;background-color:#f2f2f2}.ladmin-user-login-theme ul li:hover{opacity:.9}@media screen and (max-width:768px){.layadmin-user-login{padding-top:60px}.layadmin-user-login-main{width:300px}.layadmin-user-login-box{padding:10px}} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/logo-black.png b/public/static/layui-admin/dist/layuiadmin/style/res/logo-black.png new file mode 100755 index 0000000..73e5ebc Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/style/res/logo-black.png differ diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/logo.png b/public/static/layui-admin/dist/layuiadmin/style/res/logo.png new file mode 100755 index 0000000..ac1e00b Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/style/res/logo.png differ diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/template.css b/public/static/layui-admin/dist/layuiadmin/style/res/template.css new file mode 100755 index 0000000..fac75a7 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/style/res/template.css @@ -0,0 +1,2 @@ +/** layuiAdmin.std-v2020.1.24 LPPL License By https://www.layui.com/admin/ */ + .layadmin-panel-selection{width:768px;margin:30px auto}.layadmin-panel-selection .layui-panel-window{padding:30px 50px;border-top-color:#ddd;text-align:center}.layadmin-panel-selection .layui-panel-window h2{padding-bottom:15px;font-size:18px}.layadmin-panel-selection .layui-panel-window ul{margin-top:15px;text-align:left}.layadmin-homepage-panel .text-center,.layadmin-maillist-fluid .layadmin-text-center{text-align:center}.layadmin-panel-selection .layui-btn-container{margin-top:30px}.layadmin-panel-selection .layui-btn-container .layui-btn{width:100%}.layadmin-maillist-fluid .layadmin-contact-box{padding:20px;background-color:#fff;border:1px solid #e7eaec;overflow:hidden}.layadmin-maillist-fluid .layadmin-text-center img{max-width:80%;border-radius:50%;margin-top:5px}.layadmin-maillist-fluid .layadmin-font-blod{font-weight:600}.layadmin-maillist-fluid .layadmin-maillist-img{margin-top:5px}.layadmin-maillist-fluid .layadmin-title{margin:5px 0 10px}.layadmin-maillist-fluid .layadmin-textimg{line-height:25px;margin-bottom:10px}.layadmin-maillist-fluid .layadmin-address{line-height:1.5;margin-bottom:20px}.layadmin-maillist-fluid .layadmin-padding-left20{padding-left:20px}.layadmin-homepage-shadow{box-shadow:0 1px 1px rgba(0,0,0,.05);background-color:#fff;border-radius:0;border:1px solid #e7ecf3}.layadmin-homepage-panel{margin-bottom:15px}.layadmin-homepage-information{padding:15px;border-bottom:1px solid #e9e9e9}.layadmin-homepage-pad-ver{padding-top:15px;padding-bottom:15px}.layadmin-homepage-pad-img{box-shadow:0 0 0 4px rgba(0,0,0,.1);border-radius:50%}.layadmin-homepage-font{font-weight:600;color:#2b425b;font-size:1.2em}.layadmin-homepage-min-font{margin:5px 0 10px;font-size:.9em;color:#afb9c3}.layadmin-homepage-pad-ver a{line-height:1.1em;font-size:1.3em;vertical-align:middle;cursor:pointer;background-color:transparent;color:inherit;padding:6px 12px}.layadmin-homepage-pad-ver a:hover{background:#5FB878;color:#fff}.layadmin-homepage-about{padding:15px;font-weight:600;color:#2b425b}.layadmin-homepage-list-group{font-size:.9em;line-height:1.25;margin-bottom:5px}.layadmin-homepage-list-group li{padding:5px 15px;border:1px solid transparent;margin-bottom:-1px;border-width:1px 0;border-radius:0;background-color:transparent;color:inherit}.layadmin-homepage-list-group li i{font-size:1.333em;line-height:1.095em;vertical-align:middle;margin-right:4px}.layadmin-homepage-list-group li a.color{color:#337ab7}.layadmin-homepage-pad-hor{padding-left:15px;padding-right:15px;border-bottom:15px;color:#758697;text-indent:20px}.layadmin-homepage-list-inline{margin-left:15px;margin-right:15px;padding-bottom:20px}.layadmin-homepage-list-inline a{display:inline-block}.layadmin-homepage-list-inline .layui-btn{font-size:.9em;line-height:1.42857;vertical-align:middle;height:auto;padding:4px 7px;margin:0 10px 10px 0}.layadmin-homepage-text-center{text-align:center;margin-bottom:15px}.layadmin-homepage-padding15{padding:15px;margin-bottom:15px}.layadmin-homepage-padding8{padding:0 8px}.layadmin-homepage-paddingmb{margin:0 -7.5px}.layadmin-homepage-content{margin-left:15px;padding:0}.layadmin-homepage-content .new-section-xs{margin:12px 0;color:inherit;border:0!important;height:0;box-sizing:content-box}.layadmin-homepage-content .h4{font-size:16px;font-weight:600;color:#2b425b}.layadmin-homepage-content small{color:#afb9c3}.layadmin-homepage-text-center .layui-icon{color:#FFB800;padding-right:5px}.layadmin-homepage-padding15 .layui-col-sm5 a{font-size:11px;height:auto;line-height:1.5;padding:5px 10px;float:right}.layadmin-homepage-padding15 .layui-btn-normal{margin:0 15px}.layadmin-homepage-list-imgtxt .layui-col-sm10,.layadmin-homepage-list-imgtxt .layui-col-sm2{background:0 0}.layadmin-homepage-list-imgtxt .panel-body{padding:15px 20px 25px;overflow:hidden;margin-bottom:15px}.layadmin-homepage-list-imgtxt .panel-body .media-left{display:block;float:left;vertical-align:top;padding-right:10px}.layadmin-homepage-list-imgtxt .panel-body .media-left img{border-radius:50%}.layadmin-homepage-list-imgtxt .media-body{width:auto;display:block;overflow:hidden}.layadmin-homepage-list-imgtxt .media-body .pad-btm{padding-bottom:15px}.layadmin-homepage-list-imgtxt .media-body .pad-btm p:first-child{padding-bottom:5px}.layadmin-homepage-list-imgtxt .media-body .min-font{margin-bottom:10px}.layadmin-homepage-list-imgtxt .media-body .min-font .layui-breadcrumb a{font-size:11px}.layui-breadcrumb span[lay-separator]{margin:0 5px}.layadmin-homepage-list-imgtxt .media-body .pad-btm .fontColor a{font-weight:600;color:#337ab7}.layadmin-homepage-list-imgtxt .media-body .pad-btm .fontColor span{color:#758697;font-weight:600}.layadmin-homepage-list-imgtxt .media-body .h-img{display:block;max-width:100%;height:auto;margin-top:10px}.layadmin-homepage-list-imgtxt .img-xs{width:32px;height:32px;border-radius:50%}.layadmin-homepage-list-imgtxt .media-body .media{margin-top:15px;overflow:hidden}.layadmin-homepage-list-imgtxt .media-body .media .media-right{float:right;padding-top:10px}.layadmin-homepage-list-imgtxt .media-body .media .media-right .list-inline{margin-bottom:10px}.layadmin-homepage-list-imgtxt .media-body .media .list-inline li{padding:0 5px;display:inline-block}.layadmin-homepage-list-imgtxt .media-body .media .media-right .list-inline li span{font-weight:600}.layadmin-homepage-list-imgtxt .media-body .media .media-left{display:block;overflow:hidden;width:auto}.layadmin-homepage-list-imgtxt .media-body .media .media-left .font-blod{font-weight:700;color:#758697}.layadmin-homepage-list-imgtxt .media-body .media-list{padding-top:15px;margin-top:15px;border-top:1px solid #e9e9e9}.layadmin-homepage-list-imgtxt .media-body .media-list .media-item{padding-bottom:15px;margin-top:15px}.layadmin-homepage-list-imgtxt .media-body .media-list .media-item-left{display:inline-block;padding-right:10px;margin-bottom:5px}.layadmin-homepage-list-imgtxt .media-body .media-list .media-item-left img{display:block;float:left}.layadmin-homepage-list-imgtxt .media-body .media-list .media-text{overflow:hidden;width:auto;display:inline-block}.layadmin-homepage-list-imgtxt .media-body .media-list .media-text a{margin-right:10px;font-weight:600;display:inline-block}.layadmin-homepage-list-imgtxt .media-body .media-list .media-text div:nth-child(2){margin-top:5px}.layadmin-homepage-list-imgtxt .media-body .media-list .layui-btn{height:24px;line-height:24px;font-size:12px;padding:0 20px;margin-bottom:10px}.homepage-top .layui-card-body img{width:100%}.homepage-top .layui-card-body .margin-top10{margin-top:10px}.homepage-top .layui-card-body .layui-btn{width:100%;display:block}.homepage-top{padding-bottom:20px}.layadmin-privateletterlist-item{position:relative;display:block;padding:10px 15px}.homepage-bottom .layui-card-body{padding:0}.homepage-bottom .layui-card-body img{width:32px;height:32px;border-radius:50%;margin-top:10px}.homepage-bottom .layui-card-body .meida-left{display:table-cell;padding-right:10px}.homepage-bottom .layui-card-body .meida-right{display:table-cell;vertical-align:top}.homepage-bottom .layui-card-body a:hover{background:#F2F2F2}.homepage-bottom .layui-card-body{background:#fff}.layui-card-header .panel-title .layui-icon{position:relative;left:0;right:0}.layadmin-cmdlist-fluid{padding-bottom:60px}.cmdlist-container{background:#fff;border:1px solid transparent}.cmdlist-container:hover{border:1px solid #e8e8e8}.cmdlist-container img{width:100%}.cmdlist-text{padding:20px}.cmdlist-text .info{height:40px;font-size:14px;line-height:20px;width:100%;overflow:hidden;color:#666;margin-bottom:10px}.cmdlist-text .price{font-size:14px}.cmdlist-text .price b{margin-right:20px}.cmdlist-text .price p{display:inline-block}.cmdlist-text .flow{text-align:right;float:right}#demo0{text-align:center}.layadmin-message-fluid .layui-col-md12{background:#fff;height:auto;padding-bottom:50px}.layadmin-message-fluid .layui-input-block{margin-left:0}.layadmin-message-fluid .layui-form{padding:45px 40px 0}.layadmin-message-fluid .layui-form-label{text-align:left;font-size:18px;padding-left:10px}.layadmin-message-fluid .layui-textarea{min-height:100px;font-size:16px}.layadmin-message-fluid .layui-input-right{float:right}.layadmin-messag-icon{overflow:hidden;float:left;margin-top:4px}.layadmin-messag-icon .layui-icon{font-size:24px;line-height:30px;margin-right:15px;color:#C4CBCF}.message-content{padding:0 40px}.message-content .media-body{margin-bottom:60px}.message-content .media-body .pad-btm{padding-bottom:0}.message-content .media-left{float:left;margin-right:10px}.message-content .media-left img{border-radius:50%}.message-text{padding-top:10px}.message-content-btn{text-align:center}.message-content .layui-btn{height:auto;line-height:26px;padding:5px 30px;font-size:16px}.layadmin-serach-main .layui-card-header{height:auto;line-height:24px;padding:15px}.layadmin-serach-list{margin-bottom:10px;padding:10px 0;border-bottom:1px solid #f6f6f6}.layadmin-serach-list h3{padding:10px 0}.layadmin-serach-list h3 .layui-badge{top:-2px}.layadmin-serach-list p{color:#666}.layadmin-serach-list li{margin-bottom:20px;padding-bottom:20px;clear:both}.layui-serachlist-cover{float:left;margin-right:15px}.layui-serachlist-cover img{width:90px;height:90px}.layadmin-caller{background:#fff;padding:30px}.layadmin-caller em{font-style:normal}.layadmin-caller .caller-fl{float:left}.layadmin-caller .caller-fr{float:right}.layadmin-caller .caller-seach{position:relative;padding-bottom:40px}.layadmin-caller .caller-seach .caller-icon{font-size:18px;position:absolute;top:9px}.layadmin-caller .caller-seach-icon{left:6px}.layadmin-caller .caller-dump-icon{right:6px;cursor:pointer}.layadmin-caller .caller-pl32{padding:0 32px}.layadmin-caller .caller-tab{margin:0}.layadmin-caller .caller-contar{padding-bottom:20px}.layadmin-caller .caller-contar .caller-item{padding:25px 0;overflow:hidden;border-bottom:1px solid #e0e0e0}.layadmin-caller .caller-contar .caller-item .caller-main{margin-left:20px}.layadmin-caller .caller-contar .caller-item .caller-main p{line-height:100%;padding:8px 0}.layadmin-caller .caller-contar .caller-item .caller-main p:first-child{padding-top:0}.layadmin-caller .caller-contar .caller-item .caller-main em{margin-left:5px}.layadmin-caller .caller-contar .caller-item .caller-main .caller-adds i{padding-right:5px;margin:0}.layadmin-caller .caller-contar .caller-item .caller-main .caller-adds{padding-bottom:12px}.layadmin-caller .caller-contar .caller-iconset i{margin:0 5px}.layadmin-caller .caller-contar .caller-iconset i:first-child{margin-left:0}.layadmin-caller .caller-contar button{margin-top:22px}.layadmin-caller .caller-contar .caller-img{width:40px;height:40px;border-radius:100%} \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/template/character.jpg b/public/static/layui-admin/dist/layuiadmin/style/res/template/character.jpg new file mode 100755 index 0000000..ba5e4d1 Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/style/res/template/character.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/template/huge.jpg b/public/static/layui-admin/dist/layuiadmin/style/res/template/huge.jpg new file mode 100755 index 0000000..ce8acbd Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/style/res/template/huge.jpg differ diff --git a/public/static/layui-admin/dist/layuiadmin/style/res/template/portrait.png b/public/static/layui-admin/dist/layuiadmin/style/res/template/portrait.png new file mode 100755 index 0000000..a6760af Binary files /dev/null and b/public/static/layui-admin/dist/layuiadmin/style/res/template/portrait.png differ diff --git a/public/static/layui-admin/dist/layuiadmin/style/template.css b/public/static/layui-admin/dist/layuiadmin/style/template.css new file mode 100755 index 0000000..599e607 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/style/template.css @@ -0,0 +1,186 @@ +/** + + @Name:layuiAdmin + @Author:贤心 + @Site:http://www.layui.com/admin/ + @License:LPPL + + */ + + + +/******************************** + + 模板开始 By xuzhiwen + +*******************************/ + + +/* 产品版本选择面板 */ +.layadmin-panel-selection{width: 768px; margin: 30px auto;} +.layadmin-panel-selection .layui-panel-window{padding: 30px 50px; border-top-color: #ddd; text-align: center;} +.layadmin-panel-selection .layui-panel-window h2{padding-bottom: 15px; font-size: 18px;} +.layadmin-panel-selection .layui-panel-window ul{margin-top: 15px; text-align: left;} +.layadmin-panel-selection .layui-btn-container{margin-top: 30px;} +.layadmin-panel-selection .layui-btn-container .layui-btn{width: 100%;} + +/* 通讯录面板 */ +.layadmin-maillist-fluid .layadmin-contact-box{padding:20px;background-color: #fff; + border: 1px solid #e7eaec;overflow: hidden;} +.layadmin-maillist-fluid .layadmin-text-center{text-align: center;} +.layadmin-maillist-fluid .layadmin-text-center img{max-width: 80%;border-radius: 50%;margin-top: 5px;} +.layadmin-maillist-fluid .layadmin-font-blod{font-weight: 600;} +.layadmin-maillist-fluid .layadmin-maillist-img{margin-top: 5px;} +.layadmin-maillist-fluid .layadmin-title{margin:5px 0 10px 0;} +.layadmin-maillist-fluid .layadmin-textimg{line-height: 25px;margin-bottom: 10px;} +.layadmin-maillist-fluid .layadmin-address{line-height: 1.5;margin-bottom: 20px;} +.layadmin-maillist-fluid .layadmin-padding-left20{padding-left: 20px;} + +/* 个人主页 */ +.layadmin-homepage-shadow{box-shadow: 0 1px 1px rgba(0,0,0,.05);background-color: #fff;border-bottom: 1px solid rgba(0,0,0,0.17);border-radius: 0;border: 1px solid #e7ecf3;} +.layadmin-homepage-panel{margin-bottom: 15px;} +.layadmin-homepage-panel .text-center{text-align: center;} +.layadmin-homepage-information{padding: 15px; border-bottom: 1px solid #e9e9e9;} +.layadmin-homepage-pad-ver{ padding-top: 15px;padding-bottom: 15px;} +.layadmin-homepage-pad-img{box-shadow: 0 0 0 4px rgba(0,0,0,0.1);border-radius: 50%;} +.layadmin-homepage-font{font-weight: 600;color: #2b425b;font-size: 1.2em;} +.layadmin-homepage-min-font{margin:5px 0 10px 0;font-size: 0.9em;color: #afb9c3;} +.layadmin-homepage-pad-ver a{line-height: 1.1em;font-size: 1.3em;vertical-align: middle; cursor: pointer;background-color: transparent;color: inherit;padding: 6px 12px;} +.layadmin-homepage-pad-ver a:hover{background: #5FB878; color:#fff;} + +.layadmin-homepage-about{padding: 15px;font-weight: 600;color: #2b425b;} +.layadmin-homepage-list-group{font-size: 0.9em;line-height: 1.25;margin-bottom: 5px;} +.layadmin-homepage-list-group li{ padding: 5px 15px;border: 1px solid #ddd;margin-bottom: -1px;border-width: 1px 0;border-radius: 0; background-color: transparent;border-color: transparent;color: inherit;} +.layadmin-homepage-list-group li i{font-size: 1.333em;line-height: 1.095em;vertical-align: middle; margin-right: 4px;} +.layadmin-homepage-list-group li a.color{color:#337ab7;} +.layadmin-homepage-pad-hor{ padding-left: 15px; padding-right: 15px;border-bottom: 15px;color: #758697; text-indent:20px;} +.layadmin-homepage-list-inline{margin-left: 15px;margin-right: 15px;padding-bottom: 20px} +.layadmin-homepage-list-inline a{display: inline-block;} +.layadmin-homepage-list-inline .layui-btn{font-size: .9em;line-height: 1.42857;vertical-align: middle;height: auto;padding:4px 7px;margin-left: 0px;margin:0 10px 10px 0;} + +/* 左侧个人信息区域 */ +.layadmin-homepage-text-center{text-align: center;margin-bottom: 15px;} +.layadmin-homepage-padding15{padding:15px;margin-bottom: 15px;} +.layadmin-homepage-padding8{padding: 0 8px;} +.layadmin-homepage-paddingmb{margin-bottom: 15px;margin: 0 -7.5px;} +.layadmin-homepage-content{margin-left: 15px;padding: 0;} +.layadmin-homepage-content .new-section-xs{margin: 12px 0;color: inherit;border: 0!important;height: 0px;box-sizing: content-box;} +.layadmin-homepage-content .h4{font-size: 16px;font-weight: 600;color: #2b425b;} +.layadmin-homepage-content small{color: #afb9c3} +.layadmin-homepage-text-center .layui-icon{color:#FFB800;padding-right:5px;} +.layadmin-homepage-padding15 .layui-col-sm5 a{font-size: 11px;height: auto;line-height: 1.5;padding:5px 10px;float: right;} +.layadmin-homepage-padding15 .layui-btn-normal{margin:0 15px;} +.layadmin-homepage-list-imgtxt .layui-col-sm10,.layadmin-homepage-list-imgtxt .layui-col-sm2{background: none} +.layadmin-homepage-list-imgtxt .panel-body{padding: 15px 20px 25px;overflow: hidden;margin-bottom: 15px;} +.layadmin-homepage-list-imgtxt .panel-body .media-left{display: block;float: left;vertical-align: top;padding-right: 10px;} +.layadmin-homepage-list-imgtxt .panel-body .media-left img{border-radius: 50%;} +.layadmin-homepage-list-imgtxt .media-body{width: auto;display: block;overflow: hidden;} +.layadmin-homepage-list-imgtxt .media-body .pad-btm{padding-bottom: 15px;} +.layadmin-homepage-list-imgtxt .media-body .pad-btm p:first-child{padding-bottom: 5px;} +.layadmin-homepage-list-imgtxt .media-body .min-font{margin-bottom: 10px;} +.layadmin-homepage-list-imgtxt .media-body .min-font .layui-breadcrumb a{font-size: 11px;} +.layui-breadcrumb span[lay-separator]{margin:0 5px;} +.layadmin-homepage-list-imgtxt .media-body .pad-btm .fontColor a{font-weight: 600;color: #337ab7;} +.layadmin-homepage-list-imgtxt .media-body .pad-btm .fontColor span{color: #758697;font-weight: 600;} +.layadmin-homepage-list-imgtxt .media-body .h-img{display: block;max-width: 100%;height: auto;margin-top: 10px;} +.layadmin-homepage-list-imgtxt .img-xs{width: 32px;height: 32px;border-radius: 50%;} +.layadmin-homepage-list-imgtxt .media-body .media{margin-top: 15px;overflow: hidden;} +.layadmin-homepage-list-imgtxt .media-body .media .media-right{float: right;padding-top: 10px;} +.layadmin-homepage-list-imgtxt .media-body .media .media-right .list-inline{margin-bottom: 10px;} +.layadmin-homepage-list-imgtxt .media-body .media .list-inline li{padding:0 5px;display: inline-block;} +.layadmin-homepage-list-imgtxt .media-body .media .media-right .list-inline li span{font-weight: 600;} +.layadmin-homepage-list-imgtxt .media-body .media .media-left{display: block;overflow: hidden;width: auto;} +.layadmin-homepage-list-imgtxt .media-body .media .media-left .font-blod{font-weight: 700;color: #758697;} +.layadmin-homepage-list-imgtxt .media-body .media-list{padding-top: 15px;margin-top: 15px;border-top: 1px solid #e9e9e9;} +.layadmin-homepage-list-imgtxt .media-body .media-list .media-item{padding-bottom: 15px;margin-top: 15px;} +.layadmin-homepage-list-imgtxt .media-body .media-list .media-item-left{display:inline-block;padding-right: 10px;margin-bottom: 5px;} +.layadmin-homepage-list-imgtxt .media-body .media-list .media-item-left img{display: block;float: left;} +.layadmin-homepage-list-imgtxt .media-body .media-list .media-text{overflow: hidden;width: auto;display: inline-block;} +.layadmin-homepage-list-imgtxt .media-body .media-list .media-text a{margin-right: 10px;font-weight: 600;display: inline-block;} +.layadmin-homepage-list-imgtxt .media-body .media-list .media-text div:nth-child(2){margin-top: 5px;} +.layadmin-homepage-list-imgtxt .media-body .media-list .layui-btn{height: 24px;line-height: 24px;font-size: 12px;padding:0 20px;margin-bottom: 10px;} +.layadmin-homepage-list-imgtxt .media-body .media-list .layui-btn{height: 24px;line-height: 24px;font-size: 12px;padding:0 20px;margin-bottom: 10px;} + +/* 个人内容区域 */ + +.homepage-top .layui-card-body img{width: 100%} +.homepage-top .layui-card-body .margin-top10{margin-top: 10px;} +.homepage-top .layui-card-body .layui-btn{width: 100%;display: block;} +.homepage-top{padding-bottom: 20px;} +.layadmin-privateletterlist-item{position: relative;display: block;padding: 10px 15px;} +.homepage-bottom .layui-card-body{padding:0;} +.homepage-bottom .layui-card-body img{width: 32px;height: 32px;border-radius: 50%;margin-top: 10px;} +.homepage-bottom .layui-card-body .meida-left{display: table-cell;padding-right: 10px;} +.homepage-bottom .layui-card-body .meida-right{display: table-cell;vertical-align: top;} +.homepage-bottom .layui-card-body a:hover{background: #F2F2F2;} +.homepage-bottom .layui-card-body{background: #fff;} +.layui-card-header .panel-title .layui-icon{position: relative;left: 0;right: 0px;} + +/* 右侧信息栏 */ +.layadmin-cmdlist-fluid{padding-bottom: 60px;} +.cmdlist-container{background: #fff;border:1px solid transparent;} +.cmdlist-container:hover{border:1px solid #e8e8e8;} +.cmdlist-container img{width: 100%;} +.cmdlist-text{padding:20px;} +.cmdlist-text .info{height: 40px;font-size: 14px;line-height: 20px;width: 100%;overflow: hidden;color: #666;margin-bottom:10px;} +.cmdlist-text .price{font-size: 14px;} +.cmdlist-text .price b{margin-right: 20px;} +.cmdlist-text .price p{display: inline-block;} +.cmdlist-text .flow{text-align: right;float: right;} +#demo0{text-align: center;} + +/* 商品列表 */ +.layadmin-message-fluid .layui-col-md12{background: #fff;height: auto;padding-bottom: 50px;} +.layadmin-message-fluid .layui-input-block{margin-left: 0;} +.layadmin-message-fluid .layui-form{padding:45px 40px 0 40px;} +.layadmin-message-fluid .layui-form-label{text-align: left;font-size: 18px;padding-left: 10px;} +.layadmin-message-fluid .layui-textarea{min-height: 100px;font-size: 16px;} +.layadmin-message-fluid .layui-input-right{float: right;} +.layadmin-messag-icon{overflow: hidden;float: left;} +.layadmin-messag-icon .layui-icon{font-size: 24px;line-height: 30px;margin-right: 15px;color: #C4CBCF;} +.layadmin-messag-icon{margin-top: 4px;} +.message-content{padding:0 40px;} +.message-content .media-body{margin-bottom: 60px;} +.message-content .media-body .pad-btm{padding-bottom: 0;} +.message-content .media-left{float: left;margin-right: 10px;} +.message-content .media-left img{border-radius: 50%;} +.message-text{padding-top: 10px;} +.message-content-btn{text-align: center;} +.message-content .layui-btn{height: auto;line-height: 26px; padding: 5px 30px; font-size: 16px;} + +/* 搜索结果页面 */ +.layadmin-serach-main .layui-card-header{height: auto; line-height: 24px; padding: 15px;} +.layadmin-serach-list{margin-bottom: 10px; padding: 10px 0; border-bottom: 1px solid #f6f6f6;} +.layadmin-serach-list h3{padding: 10px 0;} +.layadmin-serach-list h3 .layui-badge{top: -2px;} +.layadmin-serach-list p{color: #666;} +.layadmin-serach-list li{margin-bottom: 20px; padding-bottom: 20px; clear: both;} +.layui-serachlist-cover{float: left; margin-right: 15px;} +.layui-serachlist-cover img{width: 90px; height: 90px;} + + + +/* 用户列表开始 */ +.layadmin-caller{background: #fff;padding: 30px;} +.layadmin-caller em{font-style: normal;} +.layadmin-caller .caller-fl{float: left;} +.layadmin-caller .caller-fr{float: right;} +.layadmin-caller .caller-seach{position: relative;padding-bottom:40px;} +.layadmin-caller .caller-seach .caller-icon{font-size: 18px;position: absolute;top: 9px;} +.layadmin-caller .caller-seach-icon{left: 6px;} +.layadmin-caller .caller-dump-icon{right: 6px;cursor: pointer;} +.layadmin-caller .caller-pl32{padding:0 32px;} +.layadmin-caller .caller-tab{margin:0;} +.layadmin-caller .caller-contar{padding-bottom:20px;} +.layadmin-caller .caller-contar .caller-item{padding:25px 0;overflow: hidden;border-bottom: 1px solid #e0e0e0;} +.layadmin-caller .caller-contar .caller-item .caller-main{margin-left: 20px;} +.layadmin-caller .caller-contar .caller-item .caller-main p{line-height: 100%;padding:8px 0;} +.layadmin-caller .caller-contar .caller-item .caller-main p:first-child{padding-top:0;} +.layadmin-caller .caller-contar .caller-item .caller-main em{margin-left: 5px;} +.layadmin-caller .caller-contar .caller-item .caller-main .caller-adds i{padding-right: 5px;margin:0;} +.layadmin-caller .caller-contar .caller-item .caller-main .caller-adds{padding-bottom:12px;} +.layadmin-caller .caller-contar .caller-iconset i{margin:0 5px;} +.layadmin-caller .caller-contar .caller-iconset i:first-child{margin-left: 0;} +.layadmin-caller .caller-contar button{margin-top: 22px;} +.layadmin-caller .caller-contar .caller-img{width: 40px;height: 40px;border-radius: 100%;} +/****** 模板结束 By xuzhiwen ******/ \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/tpl/layim/demo.html b/public/static/layui-admin/dist/layuiadmin/tpl/layim/demo.html new file mode 100755 index 0000000..249bc79 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/tpl/layim/demo.html @@ -0,0 +1,25 @@ +
                      + + + + + + +
                      + + + + + + + + +
                      + + + + + + + +
                      \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/tpl/system/about.html b/public/static/layui-admin/dist/layuiadmin/tpl/system/about.html new file mode 100755 index 0000000..42b3471 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/tpl/system/about.html @@ -0,0 +1,22 @@ + +
                      版本信息
                      +
                      + + +
                      + +
                      关于版权
                      +
                      + +
                      + layuiAdmin 受国家计算机软件著作权保护(登记号:2018SR410669),必须经官网授权才可获得源文件使用权。不得恶意分享产品源代码、二次转售等,违者将承担相应的法律责任。 +

                      详见:《layui 付费产品服务条款》 +
                      +

                      © 2018 layui.com 版权所有

                      +
                      \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/tpl/system/get.html b/public/static/layui-admin/dist/layuiadmin/tpl/system/get.html new file mode 100755 index 0000000..7585a7e --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/tpl/system/get.html @@ -0,0 +1,61 @@ + + + + + + + 授权获得 layuiAdmin + + + + + + + + +
                      +
                      +
                      +
                      +

                      专业版

                      +
                        +
                      • 始终基于全新的 layui 版本
                      • +
                      • 单页面应用,所有操作无需跳转
                      • +
                      • 支持前后端分离开发模式
                      • +
                      • 面向全屏幕尺寸的响应式适配能力
                      • +
                      • 灵活的主题色配置
                      • +
                      • 专属的开发者文档,助你快速掌握
                      • +
                      • 版本的持续更新,集大众之所需
                      • +
                      • 专属的会员群,与同道中人隔空交流
                      • +
                      • layui 社区 VIP 标识
                      • +
                      • 不限制域名、不限制应用的项目数量
                      • +
                      + +
                      +
                      +
                      + 你所获得的不仅仅是一款高精品的后台管理模板系统,更是一项关于时间与效率的高收益回报 +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/tpl/system/more.html b/public/static/layui-admin/dist/layuiadmin/tpl/system/more.html new file mode 100755 index 0000000..c1f570b --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/tpl/system/more.html @@ -0,0 +1,22 @@ + + + diff --git a/public/static/layui-admin/dist/layuiadmin/tpl/system/theme.html b/public/static/layui-admin/dist/layuiadmin/tpl/system/theme.html new file mode 100755 index 0000000..9c497fa --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/tpl/system/theme.html @@ -0,0 +1,43 @@ + + + + + + diff --git a/public/static/layui-admin/dist/layuiadmin/tpl/system/หตร๗.txt b/public/static/layui-admin/dist/layuiadmin/tpl/system/หตร๗.txt new file mode 100755 index 0000000..e9d0a23 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/tpl/system/หตร๗.txt @@ -0,0 +1,3 @@ + +注意: +该目录存放的是 layuiAdmin 的系统模板碎片,很多界面需要依赖到它,切勿随意剔除。 \ No newline at end of file diff --git a/public/static/layui-admin/dist/layuiadmin/tpl/หตร๗.txt b/public/static/layui-admin/dist/layuiadmin/tpl/หตร๗.txt new file mode 100755 index 0000000..d4d4a31 --- /dev/null +++ b/public/static/layui-admin/dist/layuiadmin/tpl/หตร๗.txt @@ -0,0 +1,3 @@ + +注意: +该目录存放的是 layuiAdmin 的动态模板碎片 \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/content/comment.html b/public/static/layui-admin/dist/views/app/content/comment.html new file mode 100755 index 0000000..d472146 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/content/comment.html @@ -0,0 +1,113 @@ + + + + + + + layuiAdmin 内容系统 - 评论管理 + + + + + + + + +
                      +
                      +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      +
                      +
                      + +
                      +
                      + +
                      +
                      +
                      + + + + + + diff --git a/public/static/layui-admin/dist/views/app/content/contform.html b/public/static/layui-admin/dist/views/app/content/contform.html new file mode 100755 index 0000000..244c7c4 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/content/contform.html @@ -0,0 +1,44 @@ + + + + + + + layuiAdmin 评论管理 iframe 框 + + + + + + + + +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/content/list.html b/public/static/layui-admin/dist/views/app/content/list.html new file mode 100755 index 0000000..99c1c93 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/content/list.html @@ -0,0 +1,147 @@ + + + + + + + layuiAdmin 内容系统 - 文章列表 + + + + + + + + +
                      +
                      +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      + +
                      +
                      + + +
                      +
                      + + +
                      +
                      +
                      + + + + + diff --git a/public/static/layui-admin/dist/views/app/content/listform.html b/public/static/layui-admin/dist/views/app/content/listform.html new file mode 100755 index 0000000..80f81bd --- /dev/null +++ b/public/static/layui-admin/dist/views/app/content/listform.html @@ -0,0 +1,82 @@ + + + + + + + layuiAdmin 文章管理 iframe 框 + + + + + + + +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + + +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/content/tags.html b/public/static/layui-admin/dist/views/app/content/tags.html new file mode 100755 index 0000000..ab179c7 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/content/tags.html @@ -0,0 +1,66 @@ + + + + + + layuiAdmin 内容系统-分类管理 + + + + + + + + +
                      +
                      +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      + + + + + diff --git a/public/static/layui-admin/dist/views/app/content/tagsform.html b/public/static/layui-admin/dist/views/app/content/tagsform.html new file mode 100755 index 0000000..5ed7579 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/content/tagsform.html @@ -0,0 +1,38 @@ + + + + + + + layuiAdmin 分类管理 iframe 框 + + + + + + + + + +
                      +
                      + +
                      + +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/forum/list.html b/public/static/layui-admin/dist/views/app/forum/list.html new file mode 100755 index 0000000..75abf3d --- /dev/null +++ b/public/static/layui-admin/dist/views/app/forum/list.html @@ -0,0 +1,132 @@ + + + + + + + layuiAdmin 社区系统-帖子列表 + + + + + + + + +
                      +
                      +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      + +
                      +
                      + +
                      +
                      + + + +
                      +
                      +
                      + + + + + diff --git a/public/static/layui-admin/dist/views/app/forum/listform.html b/public/static/layui-admin/dist/views/app/forum/listform.html new file mode 100755 index 0000000..4bff190 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/forum/listform.html @@ -0,0 +1,71 @@ + + + + + + + layuiAdmin 帖子管理 iframe 框 + + + + + + + + +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      + +
                      +
                      + +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/forum/replys.html b/public/static/layui-admin/dist/views/app/forum/replys.html new file mode 100755 index 0000000..729b524 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/forum/replys.html @@ -0,0 +1,107 @@ + + + + + + + layuiAdmin 社区系统-回帖列表 + + + + + + + + +
                      +
                      +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      +
                      +
                      + +
                      +
                      + + +
                      +
                      +
                      + + + + + diff --git a/public/static/layui-admin/dist/views/app/forum/replysform.html b/public/static/layui-admin/dist/views/app/forum/replysform.html new file mode 100755 index 0000000..0abb751 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/forum/replysform.html @@ -0,0 +1,49 @@ + + + + + + + layuiAdmin 回帖管理 iframe 框 + + + + + + + + +
                      +
                      + +
                      + +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/message/detail.html b/public/static/layui-admin/dist/views/app/message/detail.html new file mode 100755 index 0000000..ceae24b --- /dev/null +++ b/public/static/layui-admin/dist/views/app/message/detail.html @@ -0,0 +1,54 @@ + + + + + + + 消息详情标题 + + + + + + + + +
                      +
                      + +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/message/index.html b/public/static/layui-admin/dist/views/app/message/index.html new file mode 100755 index 0000000..ec9576c --- /dev/null +++ b/public/static/layui-admin/dist/views/app/message/index.html @@ -0,0 +1,69 @@ + + + + + + + 消息中心 + + + + + + + + +
                      +
                      +
                      +
                        +
                      • 全部消息
                      • +
                      • 通知6
                      • +
                      • 私信
                      • +
                      +
                      + +
                      +
                      + + + +
                      + +
                      +
                      +
                      + +
                      + + + +
                      + +
                      +
                      +
                      + +
                      + + + +
                      + +
                      +
                      +
                      +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/workorder/list.html b/public/static/layui-admin/dist/views/app/workorder/list.html new file mode 100755 index 0000000..01f2c92 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/workorder/list.html @@ -0,0 +1,97 @@ + + + + + + + layuiAdmin 工单系统 + + + + + + + + +
                      +
                      +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      +
                      +
                      +
                      +
                      + + + +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/workorder/listform.html b/public/static/layui-admin/dist/views/app/workorder/listform.html new file mode 100755 index 0000000..f5139af --- /dev/null +++ b/public/static/layui-admin/dist/views/app/workorder/listform.html @@ -0,0 +1,75 @@ + + + + + + + layuiAdmin 工单管理 iframe 框 + + + + + + + +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      + +
                      +
                      +
                      + +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/app/หตร๗.txt b/public/static/layui-admin/dist/views/app/หตร๗.txt new file mode 100755 index 0000000..1f8f3e5 --- /dev/null +++ b/public/static/layui-admin/dist/views/app/หตร๗.txt @@ -0,0 +1,2 @@ + +该目录存放【应用】的视图文件 \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/anim/index.html b/public/static/layui-admin/dist/views/component/anim/index.html new file mode 100755 index 0000000..91398f9 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/anim/index.html @@ -0,0 +1,127 @@ + + + + + + + 动画 + + + + + + + + +
                      +
                      + 主页 + 组件 + 动画 +
                      +
                      + + + +
                      +
                      +
                      +
                      +
                      点击演示动画
                      +
                      + +
                        +
                      • +
                        从最底部往上滑入
                        +
                        layui-anim-up
                        +
                      • +
                      • +
                        微微往上滑入
                        +
                        layui-anim-upbit
                        +
                      • +
                      • +
                        平滑放大
                        +
                        layui-anim-scale
                        +
                      • +
                      • +
                        弹簧式放大
                        +
                        layui-anim-scaleSpring
                        +
                      • +
                      +
                        +
                      • +
                        渐现
                        +
                        layui-anim-fadein
                        +
                      • +
                      • +
                        渐隐
                        +
                        layui-anim-fadeout
                        +
                      • +
                      • +
                        360度旋转
                        +
                        layui-anim-rotate
                        +
                      • +
                      • +
                        循环动画
                        +
                        追加:layui-anim-loop
                        +
                      • +
                      + +
                      +
                      +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/auxiliar/index.html b/public/static/layui-admin/dist/views/component/auxiliar/index.html new file mode 100755 index 0000000..0d2abb8 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/auxiliar/index.html @@ -0,0 +1,116 @@ + + + + + + + 辅助元素 + + + + + + + + + +
                      +
                      + 主页 + 组件 + 辅助 +
                      +
                      + + + +
                      +
                      +
                      +
                      +
                      引用区块
                      +
                      +
                      这个貌似不用多介绍,因为你已经在太多的地方都看到
                      + +
                      + 猿强,则国强。国强,则猿更强! +
                      ——孟子(好囖。。其实这特喵的是我说的) +
                      +
                      +
                      +
                      +
                      字段集区块
                      +
                      + +
                      + 爱好 +
                      + 你可以在这里放任何内容,比如表单神马的 +
                      +
                      + +
                      + +
                      + 带标题的横线 +
                      + +
                      +
                      +
                      +
                      分割线
                      +
                      + + 默认分割线 +
                      + + 赤色分割线 +
                      + + 橙色分割线 +
                      + + 墨绿分割线 +
                      + + 青色分割线 +
                      + + 蓝色分割线 +
                      + + 黑色分割线 +
                      + + 灰色分割线 +
                      + +
                      +
                      +
                      +
                      纯圆角
                      +
                      + +
                      + +
                      + +
                      +
                      +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/badge/index.html b/public/static/layui-admin/dist/views/component/badge/index.html new file mode 100755 index 0000000..52aa646 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/badge/index.html @@ -0,0 +1,103 @@ + + + + + + + 徽章 + + + + + + + + + +
                      +
                      +
                      +
                      +
                      小徽章大家族
                      +
                      + +
                      小圆点: + + + + + + + + + +

                      常规弧形徽章: + + 6 + 99 + 61728 + 赤 + 橙 + 绿 + 青 + 蓝 + 黑 + 灰 + +

                      边框徽章: + + 6 + Hot + +

                      + +
                      +
                      +
                      +
                      +
                      +
                      与其它元素的搭配
                      +
                      + +
                      + + + + +

                      + +
                        <-- 小Tips:这里有没有发现,设置导航靠右对齐(或居中对齐)其实非常简单 --> +
                      • + 控制台9 +
                      • +
                      • + 个人中心 +
                      • +
                      +
                      + +
                      +
                        +
                      • 网站设置
                      • +
                      • 用户管理
                      • +
                      • 最新邮件99+
                      • +
                      +
                      +
                      + +
                      +
                      +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/button/index.html b/public/static/layui-admin/dist/views/component/button/index.html new file mode 100755 index 0000000..cca9f06 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/button/index.html @@ -0,0 +1,185 @@ + + + + + + + 按钮 + + + + + + + + +
                      +
                      +
                      +
                      +
                      按钮主题
                      +
                      +
                      + + + + + + +
                      +
                      +
                      +
                      +
                      按钮尺寸
                      +
                      +
                      + + + + + +
                      + + + + + + +
                      + + + + + +
                      +
                      +
                      +
                      +
                      按钮图标
                      +
                      +
                      + + + + + + + +
                      + + + + + + + + +
                      + + + + + + + + +
                      + + + + + + + + +
                      + + + + + + + +
                      +
                      +
                      +
                      +
                      +
                      +
                      按钮圆角
                      +
                      +
                      + + + + + + +
                      +
                      +
                      +
                      +
                      按钮混搭
                      +
                      +
                      + + 跳转的按钮 + + + +
                      +
                      +
                      +
                      +
                      按钮组合
                      +
                      +
                      +
                      + + + +
                      +
                      +
                      +
                      + + + + +
                      +
                      + + + + +
                      +
                      +
                      +
                      +
                      +
                      按钮铺满
                      +
                      +
                      + + + + +
                      +
                      +
                      +
                      + +
                      +
                      + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/carousel/index.html b/public/static/layui-admin/dist/views/component/carousel/index.html new file mode 100755 index 0000000..325ebf2 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/carousel/index.html @@ -0,0 +1,237 @@ + + + + + + + 轮播 + + + + + + + + + + +
                      +
                      + 主页 + 组件 + 轮播 +
                      +
                      + + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/code/index.html b/public/static/layui-admin/dist/views/component/code/index.html new file mode 100755 index 0000000..5049be5 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/code/index.html @@ -0,0 +1,159 @@ + + + + + + + 代码修饰 + + + + + + + + +
                      + +
                      + +
                      +
                      +
                      +
                      +
                      默认修饰
                      +
                      +
                      //在里面存放任意的代码
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[];
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); 
                      +};
                      +            
                      +
                      +
                      + +
                      +
                      notepad风格
                      +
                      +
                      //代码区域
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[];
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); 
                      +};
                      +            
                      +
                      +
                      + +
                      +
                      代码中的代码
                      +
                      +
                      //代码区域
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[];
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); 
                      +};
                      +      
                      //代码区域
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[];
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); 
                      +};
                      +      
                      +
                      + +
                      //代码区域
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[];
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); 
                      +};
                      +      
                      //代码区域
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[];
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); 
                      +};
                      +
                      //代码区域
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[];
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); 
                      +};
                      +
                      //代码区域
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[];
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); 
                      +};
                      +
                      //代码区域
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[];
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); 
                      +};
                      +            
                      +
                      +
                      +
                      +
                      +
                      +
                      + +
                      +
                      固定高度
                      +
                      +
                      //代码区域
                      +Lay.fn.event = function(modName, events, params){
                      +  var that = this, result = null, filter = events.match(/\(.*\)$/)||[]; //提取事件过滤器
                      +  var set = (events = modName + '.'+ events).replace(filter, ''); //获取事件本体名
                      +  var callback = function(_, item){
                      +    var res = item && item.call(that, params);
                      +    res === false && result === null && (result = false);
                      +  };
                      +  layui.each(config.event[set], callback);
                      +  filter[0] && layui.each(config.event[events], callback); //执行过滤器中的事件
                      +  return result;
                      +};
                      +            
                      +
                      +
                      + +
                      +
                      XXX
                      +
                      + +
                      +
                      + +
                      +
                      XXX
                      +
                      + +
                      +
                      + +
                      +
                      XXX
                      +
                      + +
                      +
                      + +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/colorpicker/index.html b/public/static/layui-admin/dist/views/component/colorpicker/index.html new file mode 100755 index 0000000..3a1343e --- /dev/null +++ b/public/static/layui-admin/dist/views/component/colorpicker/index.html @@ -0,0 +1,208 @@ + + + + + + + 颜色选择器组件 + + + + + + + + + + +
                      +
                      +
                      +
                      +
                      常规使用
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      表单赋值
                      +
                      +
                      +
                      +
                      + +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      RGB / RGBA 色值
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      透明度选择
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      预定义颜色项
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      全功能和回调的使用
                      +
                      + +
                      +
                      +
                      +
                      +
                      颜色框尺寸
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      +
                      + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/flow/index.html b/public/static/layui-admin/dist/views/component/flow/index.html new file mode 100755 index 0000000..3f513de --- /dev/null +++ b/public/static/layui-admin/dist/views/component/flow/index.html @@ -0,0 +1,142 @@ + + + + + + + 流加载 + + + + + + + + + + + +
                      + +
                      + +
                      +
                      +
                      +
                      +
                      信息流 - 滚动加载
                      +
                      +
                        +
                        +
                        +
                        + +
                        +
                        +
                        信息流 - 手工加载
                        +
                        +
                          +
                          +
                          +
                          + +
                          +
                          +
                          图片懒加载
                          +
                          +
                          + + + + + + + + + + + + + + + +
                          +
                          +
                          +
                          + +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/form/element.html b/public/static/layui-admin/dist/views/component/form/element.html new file mode 100755 index 0000000..74e11ef --- /dev/null +++ b/public/static/layui-admin/dist/views/component/form/element.html @@ -0,0 +1,243 @@ + + + + + + + 表单元素 + + + + + + + + +
                          +
                          +
                          +
                          +
                          输入框
                          +
                          +
                          + +
                          +
                          + +
                          +
                          + +
                          +
                          +
                          +
                          +
                          下拉选择框
                          +
                          +
                          + +
                          +
                          + +
                          +
                          + +
                          +
                          + +
                          +
                          + +
                          +
                          +
                          +
                          +
                          复选框
                          +
                          +
                          + + + +
                          +
                          + + + + +
                          +
                          +
                          +
                          +
                          开关
                          +
                          +
                          + + + + +
                          +
                          +
                          +
                          +
                          单选框
                          +
                          +
                          + + + +
                          +
                          +
                          +
                          +
                          +
                          +
                          文本域
                          +
                          +
                          + +
                          +
                          +
                          +
                          +
                          响应式组合
                          +
                          +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          + +
                          + + + + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + + + + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          + + +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/form/group.html b/public/static/layui-admin/dist/views/component/form/group.html new file mode 100755 index 0000000..26334ca --- /dev/null +++ b/public/static/layui-admin/dist/views/component/form/group.html @@ -0,0 +1,302 @@ + + + + + + + 表单组合 + + + + + + + + +
                          +
                          +
                          表单组合
                          +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          + +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          请填写6到12位密码
                          +
                          + +
                          +
                          + +
                          + +
                          +
                          -
                          +
                          + +
                          +
                          +
                          + +
                          + +
                          + +
                          +
                          + + +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          + +
                          +
                          + +
                          +
                          + +
                          +
                          +
                          此处只是演示联动排版,并未做联动交互
                          +
                          +
                          +
                          + +
                          + +
                          + + + +
                          +
                          + +
                          + +
                          + + + +
                          +
                          + +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + + + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          +
                          +
                          + + + + + + diff --git a/public/static/layui-admin/dist/views/component/grid/all.html b/public/static/layui-admin/dist/views/component/grid/all.html new file mode 100755 index 0000000..1cd1b3c --- /dev/null +++ b/public/static/layui-admin/dist/views/component/grid/all.html @@ -0,0 +1,84 @@ + + + + + + + 全端复杂组合 + + + + + + + + + + +
                          +
                          +
                          + +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/grid/list.html b/public/static/layui-admin/dist/views/component/grid/list.html new file mode 100755 index 0000000..88b4bc6 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/grid/list.html @@ -0,0 +1,127 @@ + + + + + + + 等比例列表排列 + + + + + + + + + + + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/grid/mobile-pc.html b/public/static/layui-admin/dist/views/component/grid/mobile-pc.html new file mode 100755 index 0000000..f6c8b13 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/grid/mobile-pc.html @@ -0,0 +1,84 @@ + + + + + + + 移动桌面组合 + + + + + + + + + + +
                          +
                          +
                          + +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/grid/mobile.html b/public/static/layui-admin/dist/views/component/grid/mobile.html new file mode 100755 index 0000000..d567c67 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/grid/mobile.html @@ -0,0 +1,116 @@ + + + + + + + 按移动端排列 + + + + + + + + + + +
                          +
                          +
                          + +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/grid/speed-dial.html b/public/static/layui-admin/dist/views/component/grid/speed-dial.html new file mode 100755 index 0000000..89d5825 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/grid/speed-dial.html @@ -0,0 +1,95 @@ + + + + + + + 九宫格 + + + + + + + + + + +
                          +
                          +
                          + +
                          +
                          1
                          +
                          +
                          +
                          +
                          +
                          2
                          +
                          +
                          +
                          +
                          +
                          3
                          +
                          +
                          +
                          +
                          +
                          4
                          +
                          +
                          +
                          +
                          +
                          5
                          +
                          +
                          +
                          +
                          +
                          6
                          +
                          +
                          +
                          +
                          +
                          7
                          +
                          +
                          +
                          +
                          +
                          8
                          +
                          +
                          +
                          +
                          +
                          9
                          +
                          +
                          +
                          +
                          + + + + + + diff --git a/public/static/layui-admin/dist/views/component/grid/stack.html b/public/static/layui-admin/dist/views/component/grid/stack.html new file mode 100755 index 0000000..e4720e6 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/grid/stack.html @@ -0,0 +1,143 @@ + + + + + + + 低于桌面堆叠排列 + + + + + + + + + + +
                          +
                          +
                          + +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/laydate/demo1.html b/public/static/layui-admin/dist/views/component/laydate/demo1.html new file mode 100755 index 0000000..1871660 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/laydate/demo1.html @@ -0,0 +1,343 @@ + + + + + + + layDate 日期组件功能演示一 + + + + + + + + +
                          + +
                          + +
                          +
                          +
                          +
                          +
                          常规用法
                          +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          + +
                          +
                          +
                          五大选择器
                          +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          + +
                          +
                          +
                          范围选择
                          +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          + +
                          +
                          +
                          自定义格式
                          +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          + +
                          +
                          +
                          同时绑定多个
                          +
                          +
                          +
                          +
                          + +
                          +
                          + +
                          +
                          + +
                          +
                          +
                          +
                          +
                          +
                          + + + +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/laydate/demo2.html b/public/static/layui-admin/dist/views/component/laydate/demo2.html new file mode 100755 index 0000000..14b0ee1 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/laydate/demo2.html @@ -0,0 +1,295 @@ + + + + + + + layDate 日期组件功能演示二 + + + + + + + + + +
                          + +
                          + +
                          +
                          +
                          +
                          +
                          公历节日和自定义重要日子
                          +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          + +
                          +
                          +
                          + +
                          +
                          +
                          控制可选的日期与时间
                          +
                          +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          + 这里以控制在9:30-17:30为例 +
                          +
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          其它功能示例
                          +
                          +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          + +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          + +
                          + +
                          + +
                          +
                          +
                          + +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/laydate/special-demo.html b/public/static/layui-admin/dist/views/component/laydate/special-demo.html new file mode 100755 index 0000000..3d466b6 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/laydate/special-demo.html @@ -0,0 +1,93 @@ + + + + + + + layDate 日期组件功能演示 + + + + + + + + + +
                          + +
                          + +
                          +
                          +
                          +
                          +
                          联动范围选择
                          +
                          +
                          +
                          +
                          + +
                          + +
                          +
                          + - +
                          +
                          + +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/laydate/theme.html b/public/static/layui-admin/dist/views/component/laydate/theme.html new file mode 100755 index 0000000..a95c224 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/laydate/theme.html @@ -0,0 +1,191 @@ + + + + + + + layDate 日期组件功能演示 + + + + + + + + + + +
                          + +
                          + +
                          +
                          +
                          +
                          +
                          自定义按钮主题
                          +
                          +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          + +
                          + +
                          +
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          直接嵌套显示
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + + + +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/layer/list.html b/public/static/layui-admin/dist/views/component/layer/list.html new file mode 100755 index 0000000..9b8189a --- /dev/null +++ b/public/static/layui-admin/dist/views/component/layer/list.html @@ -0,0 +1,511 @@ + + + + + + + layer 组件功能演示 + + + + + + + + + + + + + +
                          +
                          +
                          +
                          +
                          弹层之美
                          +
                          + +
                          + layer 是 layui 中最广为人知的组件,它可以轻松应对 Web 应用开发中的各类复杂的弹出交互。有人说使用 layer 是一种情怀,一旦用上了,就离不开了。有多少人是因为 layer 才选择 layui 的呢,有一种信仰,叫:无条件相信 +
                          + +
                          +
                          + +
                          +
                          弹层类型
                          +
                          + +
                          + + + + + + + + + +
                          + +
                          +
                          +
                          +
                          常规使用
                          +
                          + +
                          + + + + + + + + + + + + + + + + +
                          + +
                          +
                          +
                          +
                          +
                          +
                          信息框
                          +
                          + +
                          + + + + + + + +
                          + +
                          +
                          +
                          +
                          +
                          +
                          页面层与iframe层
                          +
                          + +
                          + + + +
                          + +
                          +
                          +
                          +
                          +
                          +
                          加载层
                          +
                          + +
                          + + + + +
                          + +
                          +
                          +
                          +
                          +
                          +
                          tips层
                          +
                          + +
                          + + + + + +
                          + +
                          +
                          +
                          +
                          +
                          +
                          其它示例
                          +
                          + +
                          + + +
                          + +
                          +
                          +
                          +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/layer/special-demo.html b/public/static/layui-admin/dist/views/component/layer/special-demo.html new file mode 100755 index 0000000..5d2b141 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/layer/special-demo.html @@ -0,0 +1,167 @@ + + + + + + + layer 组件特殊示例 + + + + + + + + + + + + + +
                          +
                          +
                          +
                          +
                          场景
                          +
                          + +
                          + + + +
                          + +
                          +
                          +
                          +
                          +
                          +
                          坐标
                          +
                          + +
                          + + + + + + + + + +
                          + +
                          +
                          +
                          +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/layer/theme.html b/public/static/layui-admin/dist/views/component/layer/theme.html new file mode 100755 index 0000000..e6451f0 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/layer/theme.html @@ -0,0 +1,102 @@ + + + + + + + layer 组件风格定制 + + + + + + + + + + + + + +
                          +
                          +
                          +
                          +
                          风格定制
                          +
                          + +
                          + + +
                          + +
                          +
                          +
                          +
                          +
                          +
                          + + 持续增加中 + +
                          +
                          +
                          +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/laypage/demo1.html b/public/static/layui-admin/dist/views/component/laypage/demo1.html new file mode 100755 index 0000000..0d95528 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/laypage/demo1.html @@ -0,0 +1,176 @@ + + + + + + + 功能演示1 - 通用分页组件 + + + + + + + + + + + +
                          +
                          +
                          +
                          +
                          总页数低于页码总数
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          总页数大于页码总数
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          自定义主题 - 颜色随意定义
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          自定义首页、尾页、上一页、下一页文本
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          不显示首页尾页
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          开启HASH
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          只显示上一页、下一页
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/laypage/demo2.html b/public/static/layui-admin/dist/views/component/laypage/demo2.html new file mode 100755 index 0000000..2ad4c71 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/laypage/demo2.html @@ -0,0 +1,177 @@ + + + + + + + 功能演示2 - 通用分页组件 + + + + + + + + + + + +
                          +
                          +
                          +
                          +
                          显示完整功能
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          自定义排版
                          +
                          +
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          自定义每页条数的选择项
                          +
                          +
                          +
                          +
                          +
                          + +
                          +
                          +
                          将一段已知数组分页展示
                          +
                          +
                          +
                            +
                            +
                            +
                            + +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/laytpl/index.html b/public/static/layui-admin/dist/views/component/laytpl/index.html new file mode 100755 index 0000000..c8ed873 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/laytpl/index.html @@ -0,0 +1,138 @@ + + + + + + + 模板引擎 + + + + + + + + + + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            在线调试
                            +
                            +
                            + +
                            + 数据 + 模版 +
                            + + + + +
                            +
                            +

                            视图结果

                            +
                            +
                            + +
                            +
                            + +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/nav/index.html b/public/static/layui-admin/dist/views/component/nav/index.html new file mode 100755 index 0000000..e3d301f --- /dev/null +++ b/public/static/layui-admin/dist/views/component/nav/index.html @@ -0,0 +1,218 @@ + + + + + + + 导航 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            水平导航菜单
                            + +
                            +
                            +
                            导航带徽章和图片
                            +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            面包屑
                            + +
                            +
                            +
                            +
                            + + + + + + diff --git a/public/static/layui-admin/dist/views/component/panel/index.html b/public/static/layui-admin/dist/views/component/panel/index.html new file mode 100755 index 0000000..2627bd2 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/panel/index.html @@ -0,0 +1,188 @@ + + + + + + + 面板 + + + + + + + + + +
                            +
                            +
                            +
                            +
                            折叠面板
                            +
                            +
                            +
                            +

                            为什么JS社区大量采用未发布或者未广泛支持的语言特性?

                            +
                            +

                            有不少其他答案说是因为JS太差。我下面的答案已经说了,这不是根本性的原因。但除此之外,我还要纠正一些对JS具体问题的误解。JS当初是被作为脚本语言设计的,所以某些问题并不是JS设计得差或者是JS设计者的失误。比如var的作用域问题,并不是“错误”,而是当时绝大部分脚本语言都是这样的,如perl/php/sh等。模块的问题也是,脚本语言几乎都没有模块/命名空间功能。弱类型、for-in之类的问题也是,只不过现在用那些老的脚本语言的人比较少,所以很多人都误以为是JS才有的坑。另外有人说JS是半残语言,满足不了开发需求,1999年就该死。半残这个嘛,就夸张了。JS虽然有很多问题,但是设计总体还是优秀的。——来自知乎@贺师俊

                            +
                            +
                            +
                            +

                            为什么前端工程师多不愿意用 Bootstrap 框架?

                            +
                            +

                            因为不适合。如果希望开发长期的项目或者制作产品类网站,那么就需要实现特定的设计,为了在维护项目中可以方便地按设计师要求快速修改样式,肯定会逐步编写出各种业务组件、工具类,相当于为项目自行开发一套框架。——来自知乎@Kayo

                            +
                            +
                            +
                            +

                            layui 更适合哪些开发者?

                            +
                            +

                            在前端技术快速变革的今天,layui 仍然坚持语义化的组织模式,甚至于模块理念都是采用类AMD组织形式,并非是有意与时代背道而驰。layui 认为以jQuery为核心的开发方式还没有到完全消亡的时候,而早期市面上基于jQuery的UI都普通做得差强人意,所以需要有一个新的UI去重新为这一领域注入活力,并采用一些更科学的架构方式。 +

                            + 因此准确地说,layui 更多是面向那些追求开发简单的前端工程师们,以及所有层次的服务端程序员。

                            +
                            +
                            +
                            +

                            贤心是男是女?

                            +
                            +

                            man! 所以这个问题不要再出现了。。。

                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            手风琴折叠
                            +
                            +
                            +
                            +

                            layui 更适合哪些开发者?

                            +
                            +

                            在前端技术快速变革的今天,layui 仍然坚持语义化的组织模式,甚至于模块理念都是采用类AMD组织形式,并非是有意与时代背道而驰。layui 认为以jQuery为核心的开发方式还没有到完全消亡的时候,而早期市面上基于jQuery的UI都普通做得差强人意,所以需要有一个新的UI去重新为这一领域注入活力,并采用一些更科学的架构方式。 +
                            + 因此准确地说,layui 更多是面向那些追求开发简单的前端工程师们,以及所有层次的服务端程序员。

                            +
                            +
                            +
                            +

                            为什么JS社区大量采用未发布或者未广泛支持的语言特性?

                            +
                            +

                            有不少其他答案说是因为JS太差。我下面的答案已经说了,这不是根本性的原因。但除此之外,我还要纠正一些对JS具体问题的误解。JS当初是被作为脚本语言设计的,所以某些问题并不是JS设计得差或者是JS设计者的失误。比如var的作用域问题,并不是“错误”,而是当时绝大部分脚本语言都是这样的,如perl/php/sh等。模块的问题也是,脚本语言几乎都没有模块/命名空间功能。弱类型、for-in之类的问题也是,只不过现在用那些老的脚本语言的人比较少,所以很多人都误以为是JS才有的坑。另外有人说JS是半残语言,满足不了开发需求,1999年就该死。半残这个嘛,就夸张了。JS虽然有很多问题,但是设计总体还是优秀的。——来自知乎@贺师俊

                            +
                            +
                            +
                            +

                            为什么前端工程师多不愿意用 Bootstrap 框架?

                            +
                            +

                            因为不适合。如果希望开发长期的项目或者制作产品类网站,那么就需要实现特定的设计,为了在维护项目中可以方便地按设计师要求快速修改样式,肯定会逐步编写出各种业务组件、工具类,相当于为项目自行开发一套框架。——来自知乎@Kayo

                            +
                            +
                            +
                            +

                            贤心是男是女?

                            +
                            +

                            man! 所以这个问题不要再出现了。。。

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            折叠面板嵌套
                            +
                            +
                            +
                            +

                            文豪

                            +
                            + +
                            +
                            +

                            唐代

                            +
                            + +
                            +
                            +

                            杜甫

                            +
                            + 伟大的诗人 +
                            +
                            +
                            +

                            李白

                            +
                            +

                            据说是韩国人

                            +
                            +
                            +
                            +

                            王勃

                            +
                            +

                            千古绝唱《滕王阁序》

                            +
                            +
                            +
                            + +
                            +
                            +
                            +

                            宋代

                            +
                            +

                            比如苏轼、李清照

                            +
                            +
                            +
                            +

                            当代

                            +
                            +

                            比如贤心

                            +
                            +
                            +
                            +
                            +
                            +
                            +

                            科学家

                            +
                            +

                            伟大的科学家

                            +
                            +
                            +
                            +

                            艺术家

                            +
                            +

                            浑身散发着艺术细胞

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            卡片面板
                            +
                            + 就是当前这个 +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/progress/index.html b/public/static/layui-admin/dist/views/component/progress/index.html new file mode 100755 index 0000000..da77f44 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/progress/index.html @@ -0,0 +1,170 @@ + + + + + + + 进度条 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            默认进度条
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            更多颜色进度条
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            动态改变进度
                            +
                            + +
                            +
                            +
                            + +
                            + + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            显示进度比文本
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/rate/index.html b/public/static/layui-admin/dist/views/component/rate/index.html new file mode 100755 index 0000000..57cbb45 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/rate/index.html @@ -0,0 +1,188 @@ + + + + + + + 评分 + + + + + + + + +
                            +
                            +
                            +
                            +
                            基础效果
                            +
                            +
                            +
                            +
                            +
                            +
                            显示文字
                            +
                            +
                            +
                            +
                            +
                            +
                            半星效果
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            自定义主题色
                            +
                            +
                              +
                            • +
                            • +
                            • +
                            • +
                            • +
                            +
                            +
                            +
                            +
                            +
                            +
                            只读
                            +
                            +
                            +
                            +
                            +
                            +
                            自定义内容
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            自定义长度
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/slider/index.html b/public/static/layui-admin/dist/views/component/slider/index.html new file mode 100755 index 0000000..6880dae --- /dev/null +++ b/public/static/layui-admin/dist/views/component/slider/index.html @@ -0,0 +1,234 @@ + + + + + + + 滑块组件 + + + + + + + + +
                            + +
                            + + + +
                            +
                            +
                            +
                            +
                            基础效果
                            +
                            +
                            +
                            +
                            +
                            +
                            定义初始值
                            +
                            +
                            +
                            +
                            +
                            +
                            设置最大最小值
                            +
                            +
                            +
                            +
                            +
                            +
                            设置步长
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            设置提示文本
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            开启输入框
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            开启范围选择
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            垂直滑块
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            自定义颜色
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            禁用滑块
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/auto.html b/public/static/layui-admin/dist/views/component/table/auto.html new file mode 100755 index 0000000..64c9c2f --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/auto.html @@ -0,0 +1,67 @@ + + + + + + + 列宽自动分配 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            列宽自动分配
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/cellEdit.html b/public/static/layui-admin/dist/views/component/table/cellEdit.html new file mode 100755 index 0000000..b9fd228 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/cellEdit.html @@ -0,0 +1,74 @@ + + + + + + + 开启单元格编辑 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            开启单元格编辑
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/cellEvent.html b/public/static/layui-admin/dist/views/component/table/cellEvent.html new file mode 100755 index 0000000..5d0c47c --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/cellEvent.html @@ -0,0 +1,85 @@ + + + + + + + 监听单元格事件 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            监听单元格事件
                            +
                            +
                            点击下面表格中的【签名列】,以演示单元格事件
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/checkbox.html b/public/static/layui-admin/dist/views/component/table/checkbox.html new file mode 100755 index 0000000..d357bdb --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/checkbox.html @@ -0,0 +1,68 @@ + + + + + + + 开启复选框 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            开启复选框
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/data.html b/public/static/layui-admin/dist/views/component/table/data.html new file mode 100755 index 0000000..998791b --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/data.html @@ -0,0 +1,159 @@ + + + + + + + 赋值已知数据 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            赋值已知数据
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/fixed.html b/public/static/layui-admin/dist/views/component/table/fixed.html new file mode 100755 index 0000000..9c4ac06 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/fixed.html @@ -0,0 +1,71 @@ + + + + + + + 固定列 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            固定列
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/form.html b/public/static/layui-admin/dist/views/component/table/form.html new file mode 100755 index 0000000..32ba4f5 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/form.html @@ -0,0 +1,100 @@ + + + + + + + 加入表单元素 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            加入表单元素
                            +
                            +
                            + + + + + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/height.html b/public/static/layui-admin/dist/views/component/table/height.html new file mode 100755 index 0000000..0befbb7 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/height.html @@ -0,0 +1,69 @@ + + + + + + + 高度最大适应 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            高度最大适应
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/initSort.html b/public/static/layui-admin/dist/views/component/table/initSort.html new file mode 100755 index 0000000..99da60a --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/initSort.html @@ -0,0 +1,66 @@ + + + + + + + 设置初始排序 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            设置初始排序
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/onrow.html b/public/static/layui-admin/dist/views/component/table/onrow.html new file mode 100755 index 0000000..a79af93 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/onrow.html @@ -0,0 +1,85 @@ + + + + + + + 监听行事件 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            监听行事件
                            +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/operate.html b/public/static/layui-admin/dist/views/component/table/operate.html new file mode 100755 index 0000000..18c0ed7 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/operate.html @@ -0,0 +1,125 @@ + + + + + + + 数据操作 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            数据操作
                            +
                            +
                            + + + +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/page.html b/public/static/layui-admin/dist/views/component/table/page.html new file mode 100755 index 0000000..796d349 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/page.html @@ -0,0 +1,75 @@ + + + + + + + 开启分页 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            开启分页
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/parseData.html b/public/static/layui-admin/dist/views/component/table/parseData.html new file mode 100755 index 0000000..a1e0989 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/parseData.html @@ -0,0 +1,83 @@ + + + + + + + 解析任意数据格式 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            解析任意数据格式
                            +
                            +
                            + 尽管本示例中的原始数据:demo3.js,并不符合 table 组件默认规定的数据格式,但从 layui 2.4.0 开始,新增的 parseData 回调可以将原始的任意格式的数据重新解析成 table 组件规定的数据格式。具体可以点击上方查看代码。 +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/radio.html b/public/static/layui-admin/dist/views/component/table/radio.html new file mode 100755 index 0000000..92074af --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/radio.html @@ -0,0 +1,89 @@ + + + + + + + 开启单选框 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            开启单选框
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/reload.html b/public/static/layui-admin/dist/views/component/table/reload.html new file mode 100755 index 0000000..3d5133f --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/reload.html @@ -0,0 +1,105 @@ + + + + + + + 数据表格的重载 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            数据表格的重载
                            +
                            + +
                            + 搜索ID: +
                            + +
                            + +
                            + +
                            + +
                            此处由于是静态模拟数据,所以搜索后重载的结果没变,这并非是 BUG。实际使用时改成真实接口并根据搜索的字段筛选出对应的数据即可。
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/resetPage.html b/public/static/layui-admin/dist/views/component/table/resetPage.html new file mode 100755 index 0000000..937bbec --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/resetPage.html @@ -0,0 +1,76 @@ + + + + + + + 自定义分页 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            自定义分页
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/simple.html b/public/static/layui-admin/dist/views/component/table/simple.html new file mode 100755 index 0000000..ab1a963 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/simple.html @@ -0,0 +1,66 @@ + + + + + + + 简单用法 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            简单用法
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/static.html b/public/static/layui-admin/dist/views/component/table/static.html new file mode 100755 index 0000000..aa6b5d9 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/static.html @@ -0,0 +1,327 @@ + + + + + + + 静态表格 + + + + + + + + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            默认风格
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            人物民族出场时间格言
                            贤心汉族1989-10-14人生似修行
                            张爱玲汉族1920-09-30于千万人之中遇见你所遇见的人,于千万年之中,时间的无涯的荒野里…
                            Helen Keller拉丁美裔1880-06-27 Life is either a daring adventure or nothing.
                            岳飞汉族1103-北宋崇宁二年教科书再滥改,也抹不去“民族英雄”的事实
                            孟子华夏族(汉族)公元前-372年猿强,则国强。国强,则猿更强!
                            +
                            +
                            +
                            +
                            +
                            +
                            行边框风格
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            人物民族出场时间格言
                            贤心汉族1989-10-14人生似修行
                            张爱玲汉族1920-09-30于千万人之中遇见你所遇见的人,于千万年之中,时间的无涯的荒野里…
                            Helen Keller拉丁美裔1880-06-27 Life is either a daring adventure or nothing.
                            岳飞汉族1103-北宋崇宁二年教科书再滥改,也抹不去“民族英雄”的事实
                            孟子华夏族(汉族)公元前-372年猿强,则国强。国强,则猿更强!
                            +
                            +
                            +
                            +
                            +
                            +
                            列边框风格
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            人物民族出场时间格言
                            贤心汉族1989-10-14人生似修行
                            张爱玲汉族1920-09-30于千万人之中遇见你所遇见的人,于千万年之中,时间的无涯的荒野里…
                            Helen Keller拉丁美裔1880-06-27 Life is either a daring adventure or nothing.
                            岳飞汉族1103-北宋崇宁二年教科书再滥改,也抹不去“民族英雄”的事实
                            孟子华夏族(汉族)公元前-372年猿强,则国强。国强,则猿更强!
                            +
                            +
                            +
                            +
                            +
                            +
                            无边框风格
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            人物民族出场时间格言
                            贤心汉族1989-10-14人生似修行
                            张爱玲汉族1920-09-30于千万人之中遇见你所遇见的人,于千万年之中,时间的无涯的荒野里…
                            Helen Keller拉丁美裔1880-06-27 Life is either a daring adventure or nothing.
                            岳飞汉族1103-北宋崇宁二年教科书再滥改,也抹不去“民族英雄”的事实
                            孟子华夏族(汉族)公元前-372年猿强,则国强。国强,则猿更强!
                            +
                            +
                            +
                            +
                            +
                            +
                            其它尺寸
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            昵称加入时间签名
                            贤心2016-11-29人生就像是一场修行
                            许闲心2016-11-28于千万人之中遇见你所遇见的人,于千万年之中,时间的无涯的荒野里…
                            sentsin2016-11-27 Life is either a daring adventure or nothing.
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            昵称加入时间签名
                            贤心2016-11-29人生就像是一场修行
                            许闲心2016-11-28于千万人之中遇见你所遇见的人,于千万年之中,时间的无涯的荒野里…
                            sentsin2016-11-27 Life is either a daring adventure or nothing.
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/style.html b/public/static/layui-admin/dist/views/component/table/style.html new file mode 100755 index 0000000..94b34db --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/style.html @@ -0,0 +1,81 @@ + + + + + + + 设置单元格样式 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            设置单元格样式
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/thead.html b/public/static/layui-admin/dist/views/component/table/thead.html new file mode 100755 index 0000000..8f4f3ba --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/thead.html @@ -0,0 +1,114 @@ + + + + + + + 复杂表头 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            复杂表头
                            +
                            +
                            + 常用两级表头 +
                            + + + + + + + + + + + + + + + + +
                            联系人地址金额操作
                            省市区
                            + +
                            + +
                            + 更多级表头(可以无限极) +
                            + + + + + + + + + + + + + + + + + + + + + + +
                            联系人金额地址1地址2操作
                            省市详细省市
                            街道小区单元
                            + + + +
                            +
                            注:上述例子读取的均是静态模拟数据
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/toolbar.html b/public/static/layui-admin/dist/views/component/table/toolbar.html new file mode 100755 index 0000000..d4a9072 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/toolbar.html @@ -0,0 +1,127 @@ + + + + + + + 开启头部工具栏 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            开启头部工具栏
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/tostatic.html b/public/static/layui-admin/dist/views/component/table/tostatic.html new file mode 100755 index 0000000..ceb4f9b --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/tostatic.html @@ -0,0 +1,93 @@ + + + + + + + 转化静态表格 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            转化静态表格
                            +
                            + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            昵称加入时间签名
                            贤心12016-11-28人生就像是一场修行 A
                            贤心22016-11-29人生就像是一场修行 B
                            贤心32016-11-30人生就像是一场修行 C
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/table/totalRow.html b/public/static/layui-admin/dist/views/component/table/totalRow.html new file mode 100755 index 0000000..0b17d6c --- /dev/null +++ b/public/static/layui-admin/dist/views/component/table/totalRow.html @@ -0,0 +1,97 @@ + + + + + + + 开启合计行 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            开启合计行
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/tabs/index.html b/public/static/layui-admin/dist/views/component/tabs/index.html new file mode 100755 index 0000000..6f1d32e --- /dev/null +++ b/public/static/layui-admin/dist/views/component/tabs/index.html @@ -0,0 +1,196 @@ + + + + + + + 选项卡组件 + + + + + + + + + +
                            +
                            +
                            +
                            +
                            默认风格
                            +
                            +
                            +
                              +
                            • 网站设置
                            • +
                            • 用户管理
                            • +
                            • 权限分配
                            • +
                            • 商品管理
                            • +
                            • 订单管理
                            • +
                            +
                            +
                            + 1. 高度默认自适应,也可以随意固宽。 +
                            2. Tab进行了响应式处理,所以无需担心数量多少。 +
                            +
                            内容2
                            +
                            内容3
                            +
                            内容4
                            +
                            内容5
                            +
                            +
                            +
                            +
                            +
                            +
                            简洁风格
                            +
                            +
                            +
                              +
                            • 网站设置
                            • +
                            • 用户管理
                            • +
                            • 权限分配
                            • +
                            • 商品管理
                            • +
                            • 订单管理
                            • +
                            +
                            +
                            + 你也可以监听 tab 事件 +
                            +
                            内容2
                            +
                            内容3
                            +
                            内容4
                            +
                            内容5
                            +
                            +
                            +
                            +
                            +
                            +
                            卡片风格
                            +
                            +
                            +
                              +
                            • 网站设置
                            • +
                            • 用户管理
                            • +
                            • 权限分配
                            • +
                            • 商品管理
                            • +
                            • 订单管理
                            • +
                            +
                            +
                            默认宽度是相对于父元素100%适应的,你也可以固定宽度。
                            +
                            2
                            +
                            3
                            +
                            4
                            +
                            5
                            +
                            6
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            动态操作
                            +
                            +
                            +
                              +
                            • 网站设置
                            • +
                            • 用户管理
                            • +
                            • 权限分配
                            • +
                            • 商品管理
                            • +
                            • 订单管理
                            • +
                            +
                            +
                            内容1
                            +
                            内容2
                            +
                            内容3
                            +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            记录状态
                            +
                            +
                            +
                              +
                            • 网站设置
                            • +
                            • 用户管理
                            • +
                            • 权限分配
                            • +
                            • 商品管理
                            • +
                            • 订单管理
                            • +
                            +
                            +
                            + 点击该Tab的任一标题,观察地址栏变化,再刷新页面。选项卡将会自动定位到上一次切换的项 +
                            +
                            内容2
                            +
                            内容3
                            +
                            内容4
                            +
                            内容5
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + + diff --git a/public/static/layui-admin/dist/views/component/temp.html b/public/static/layui-admin/dist/views/component/temp.html new file mode 100755 index 0000000..338d0d1 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/temp.html @@ -0,0 +1,52 @@ + + + + + + + 简单用法 - 数据表格 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            XXX
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/timeline/index.html b/public/static/layui-admin/dist/views/component/timeline/index.html new file mode 100755 index 0000000..0716926 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/timeline/index.html @@ -0,0 +1,126 @@ + + + + + + + 时间线 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            常规时间线
                            +
                            + +
                              +
                            • + +
                              +

                              12月28日

                              +

                              + 一直以来,layui 秉承无偿开源的初心,虔诚致力于服务各层次前后端 Web 开发者,在商业横飞的当今时代,这一信念从未动摇。即便身单力薄,仍然重拾决心,埋头造轮,以尽可能地填补产品本身的缺口。在过去的一段的时间,我一直在寻求持久之道,已维持你眼前所见的一切。而 layuiAdmin 是我们尝试解决的手段之一。我相信真正有爱于 layui 生态的你,定然不会错过这一拥抱吧。 +

                              +


                              子曰:君子不用防,小人防不住。请务必通过官网正规渠道,获得 layuiAdmin!

                              +
                              +
                            • +
                            • + +
                              +

                              12月25日

                              +

                              又是一年 “圣诞节”,2018 向我们正在走来

                              +
                                +
                              • 叮叮当,叮叮当,铃儿响叮当
                              • +
                              • 今晚滑雪多快乐,我们坐在雪橇上
                              • +
                              +
                              +
                            • +
                            • + +
                              +

                              12月24日

                              +

                              + 美丽的夜晚,都是祈祷的人们。
                              他们等待着第二天,收到圣诞老人的礼物。

                              +

                              +
                              平安夜,天赐平安。愿真善美的事物都能永恒。
                              +
                              +
                            • +
                            • + +
                              +
                              过去
                              +
                              +
                            • +
                            + +
                            +
                            +
                            +
                            +
                            +
                            简约时间线
                            +
                            + +
                              +
                            • + +
                              +
                              + 2018年,layui 5.0 发布,并发展成为中国最受欢迎的前端 UI 框架(期望) +
                              +
                              +
                            • +
                            • + +
                              +
                              2017年,layui 里程碑版本 2.0 发布
                              +
                              +
                            • +
                            • + +
                              +
                              2016年,layui 首个版本发布
                              +
                              +
                            • +
                            • + +
                              +
                              2015年,layui 孵化
                              +
                              +
                            • +
                            • + +
                              +
                              更久前,轮子时代。维护几个独立组件:layer等
                              +
                              +
                            • +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/transfer/index.html b/public/static/layui-admin/dist/views/component/transfer/index.html new file mode 100755 index 0000000..eb06460 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/transfer/index.html @@ -0,0 +1,203 @@ + + + + + + + 穿梭框组件 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            基础效果
                            +
                            +
                            +
                            +
                            +
                            +
                            定义标题及数据源
                            +
                            +
                            +
                            +
                            +
                            +
                            初始右侧数据集合
                            +
                            +
                            +
                            +
                            +
                            +
                            显示搜索框
                            +
                            +
                            +
                            +
                            +
                            +
                            数据格式解析
                            +
                            +
                            +
                            +
                            +
                            +
                            穿梭时的回调
                            +
                            +
                            +
                            +
                            +
                            +
                            实例调用
                            +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/tree/index.html b/public/static/layui-admin/dist/views/component/tree/index.html new file mode 100755 index 0000000..f3beca4 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/tree/index.html @@ -0,0 +1,450 @@ + + + + + + + 树形组件 + + + + + + + + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            基本演示
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            +
                            常规用法
                            +
                            +
                            +
                            +
                            +
                            +
                            无连接线风格
                            +
                            +
                            +
                            +
                            +
                            +
                            仅节点左侧图标控制收缩
                            +
                            +
                            +
                            +
                            +
                            +
                            手风琴模式
                            +
                            +
                            +
                            +
                            +
                            +
                            点击节点新窗口跳转
                            +
                            +
                            +
                            +
                            +
                            +
                            开启复选框
                            +
                            +
                            +
                            +
                            +
                            +
                            开启节点操作图标
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/upload/demo1.html b/public/static/layui-admin/dist/views/component/upload/demo1.html new file mode 100755 index 0000000..74141f3 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/upload/demo1.html @@ -0,0 +1,217 @@ + + + + + + + 功能演示一 - 上传组件 + + + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            普通图片上传
                            +
                            +
                            + +
                            + +

                            +
                            +
                            +
                            + 为节省服务器开销,以下示例均未配置真实上传接口,所以每次上传都会报提示:请求上传接口出现异常,这属于正常现象。 +
                            +
                            +
                            +
                            + +
                            +
                            +
                            上传多张图片
                            +
                            +
                            + +
                            + 预览图: +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            指定允许上传的文件类型
                            +
                            + + + + +
                            +
                            +
                            + +
                            +
                            +
                            设定文件大小限制
                            +
                            + +
                            + 这里以限制 60KB 为例 +
                            +
                            +
                            +
                            + +
                            +
                            +
                            同时绑定多个元素,并将属性设定在元素上
                            +
                            + + + +
                            +
                            +
                            + +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/upload/demo2.html b/public/static/layui-admin/dist/views/component/upload/demo2.html new file mode 100755 index 0000000..8274f40 --- /dev/null +++ b/public/static/layui-admin/dist/views/component/upload/demo2.html @@ -0,0 +1,185 @@ + + + + + + + 功能演示二 - 上传组件 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            选完文件后不自动上传
                            +
                            +
                            + + +
                            +
                            +
                            +
                            + +
                            +
                            +
                            拖拽上传
                            +
                            +
                            + +

                            点击上传,或将文件拖拽到此处

                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            高级应用:制作一个多文件列表
                            +
                            +
                            + +
                            + + + + + + + + +
                            文件名大小状态操作
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            +
                            绑定原始文件域
                            +
                            + +
                            +
                            +
                            + +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/util/index.html b/public/static/layui-admin/dist/views/component/util/index.html new file mode 100755 index 0000000..3c706cf --- /dev/null +++ b/public/static/layui-admin/dist/views/component/util/index.html @@ -0,0 +1,108 @@ + + + + + + + 工具模块 - 组件 + + + + + + + + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            倒计时
                            +
                            + 请选择要计算的日期: +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            某个时间在当前时间的多久前
                            +
                            + 请选择要计算的日期: +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/component/หตร๗.txt b/public/static/layui-admin/dist/views/component/หตร๗.txt new file mode 100755 index 0000000..951755f --- /dev/null +++ b/public/static/layui-admin/dist/views/component/หตร๗.txt @@ -0,0 +1,2 @@ + +该目录存放【组件】的视图文件 \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/home/console.html b/public/static/layui-admin/dist/views/home/console.html new file mode 100755 index 0000000..e580752 --- /dev/null +++ b/public/static/layui-admin/dist/views/home/console.html @@ -0,0 +1,329 @@ + + + + + + + layuiAdmin 控制台主页一 + + + + + + + + +
                            +
                            +
                            +
                            + + +
                            +
                            +
                            数据概览
                            +
                            + + + +
                            +
                            +
                            +
                            +
                              +
                            • 今日热搜
                            • +
                            • 今日热帖
                            • +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            版本信息
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + +
                            当前版本 + + 检查更新 +
                            基于框架 + +
                            主要特色零门槛 / 响应式 / 清爽 / 极简
                            获取渠道 + +
                            +
                            +
                            + +
                            +
                            效果报告
                            +
                            +
                            +

                            转化率(日同比 28% )

                            +
                            +
                            +
                            +

                            签到率(日同比 11% )

                            +
                            +
                            +
                            +
                            + +
                            +
                            实时监控
                            +
                            +
                            +

                            CPU使用率

                            +
                            +
                            +
                            +

                            内存占用率

                            +
                            +
                            +
                            +
                            + + + +
                            +
                            + 作者心语 + +
                            +
                            +

                            一直以来,layui 秉承无偿开源的初心,虔诚致力于服务各层次前后端 Web 开发者,在商业横飞的当今时代,这一信念从未动摇。即便身单力薄,仍然重拾决心,埋头造轮,以尽可能地填补产品本身的缺口。

                            +

                            在过去的一段的时间,我一直在寻求持久之道,已维持你眼前所见的一切。而 layuiAdmin 是我们尝试解决的手段之一。我相信真正有爱于 layui 生态的你,定然不会错过这一拥抱吧。

                            +

                            子曰:君子不用防,小人防不住。请务必通过官网正规渠道,获得 layuiAdmin!

                            +

                            —— 贤心(layui.com)

                            +
                            +
                            +
                            + +
                            +
                            + + + + + + diff --git a/public/static/layui-admin/dist/views/home/homepage1.html b/public/static/layui-admin/dist/views/home/homepage1.html new file mode 100755 index 0000000..8152e88 --- /dev/null +++ b/public/static/layui-admin/dist/views/home/homepage1.html @@ -0,0 +1,206 @@ + + + + + + + layuiAdmin 主页示例模板一 + + + + + + + + +
                            +
                            +
                            +
                            +
                            + 最近更新 + 全部更新 +
                            +
                            +
                            +
                            +
                            + +

                            修复开启 isLazyimg:true 后, 图片懒加载但是图片不存在的报错问题

                            +

                            流加载7 天前

                            +
                            +
                            +
                            +
                            + +

                            修复开启 size 参数后,文件超出规定大小时,提示信息有误的问题

                            +

                            文件上传7 天前

                            +
                            +
                            +
                            +
                            + +

                            增加 form.val(filter, fields)方法,用于给指定表单集合的元素初始赋值

                            +

                            表单7 天前

                            +
                            +
                            +
                            +
                            + +

                            对 select 组件新增上下键(↑ ↓)回车键(Enter)选择功能

                            +

                            表单7 天前

                            +
                            +
                            +
                            +
                            + +

                            优化 switch 开关组件,让其能根据文本自由伸缩宽

                            +

                            表单7 天前

                            +
                            +
                            +
                            +
                            + +

                            修复 checkbox 复选框组件在高分辨屏下出现的样式不雅问题

                            +

                            表单7 天前

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            动态
                            +
                            +
                            +
                            +
                            +
                            +

                            胡歌 在 layuiadmin专区 回答问题

                            + 几秒前 +
                            +
                            +
                            +
                            +
                            +

                            彭于晏 在 layuiadmin专区 进行了 提问

                            + 2天前 +
                            +
                            +
                            +
                            +
                            +

                            贤心 将 layui 更新至 2.3.0 版本

                            + 7天前 +
                            +
                            +
                            +
                            +
                            +

                            吴尊 在 Fly社区 发布了 建议

                            + 7天前 +
                            +
                            +
                            +
                            +
                            +

                            许上进 在 Fly社区 发布了 建议

                            + 8天前 +
                            +
                            +
                            +
                            +
                            +

                            小蚊子 在 layuiadmin专区 进行了 提问

                            + 8天前 +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            便捷导航
                            +
                            + +
                            +
                            +
                            +
                            八卦新闻
                            +
                            + + + +
                            +
                            + +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/home/homepage2.html b/public/static/layui-admin/dist/views/home/homepage2.html new file mode 100755 index 0000000..b6ae2cd --- /dev/null +++ b/public/static/layui-admin/dist/views/home/homepage2.html @@ -0,0 +1,323 @@ + + + + + + + layuiAdmin 主页示例模板二 + + + + + + + + +
                            +
                            + +
                            +
                            +
                            + 访问量 + 周 +
                            +
                            +

                            9,999,666

                            +

                            + 总计访问量 + 88万 +

                            +
                            +
                            +
                            +
                            +
                            +
                            + 下载 + 月 +
                            +
                            +

                            33,555

                            +

                            + 新下载 + 10% +

                            +
                            +
                            +
                            +
                            +
                            +
                            + 收入 + 年 +
                            +
                            + +

                            999,666

                            +

                            + 总收入 + *** +

                            +
                            +
                            +
                            +
                            +
                            +
                            + 活跃用户 + 月 +
                            +
                            + +

                            66,666

                            +

                            + 最近一个月 + 15% +

                            +
                            +
                            +
                            +
                            +
                            +
                            + 访问量 +
                            + 去年 + 今年 +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +

                            月访问数

                            + 同上期增长 +
                            +
                            +
                            +
                            +
                            +

                            月下载数

                            + 同上期增长 +
                            +
                            +
                            +
                            +
                            +

                            月收入

                            + 同上期增长 +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            用户留言
                            +
                            +
                              +
                            • +

                              贤心

                              +

                              作为 layui 官方推出的后台模板,从初版的饱受争议,到后续的埋头丰富,逐步占据了国内后台系统应用的主要市场。

                              + 5月30日 00:00 + 回复 +
                            • +
                            • +

                              诸葛亮

                              +

                              皓首匹夫!苍髯老贼!你枉活九十有六,一生未立寸功,只会摇唇鼓舌!助曹为虐!一条断脊之犬,还敢在我军阵前狺狺狂吠,我从未见过有如此厚颜无耻之人!

                              + 5月02日 00:00 + 回复 +
                            • +
                            • +

                              胡歌

                              +

                              你以为只要长得漂亮就有男生喜欢?你以为只要有了钱漂亮妹子就自己贴上来了?你以为学霸就能找到好工作?我告诉你吧,这些都是真的!

                              + 5月11日 00:00 + 回复 +
                            • +
                            • +

                              杜甫

                              +

                              人才虽高,不务学问,不能致圣。刘向十日画一水,五日画一石。

                              + 4月11日 00:00 + 回复 +
                            • +
                            • +

                              鲁迅

                              +

                              路本是无所谓有和无的,走的人多了,就没路了。。

                              + 4月28日 00:00 + 回复 +
                            • +
                            • +

                              张爱玲

                              +

                              于千万人之中遇到你所要遇到的人,于千万年之中,时间的无涯的荒野中,没有早一步,也没有晚一步,刚巧赶上了,那也没有别的话好说,唯有轻轻的问一声:“噢,原来你也在这里?”

                              + 4月11日 00:00 + 回复 +
                            • +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            本周活跃用户列表
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            用户名最后登录时间状态获得赞
                            胡歌 11:20在线22
                            彭于晏 10:40在线21
                            靳东 01:30离线66
                            吴尊 21:18离线45
                            许上进 09:30在线21
                            小蚊子 21:18在线45
                            贤心 09:30在线21
                            +
                            +
                            +
                            +
                            +
                            +
                            项目进展
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            用户全国分布
                            +
                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            排名地区人数
                            1浙江62310
                            2上海59190
                            3广东55891
                            4北京51919
                            5山东39231
                            6湖北37109
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/iframe/layer/iframe.html b/public/static/layui-admin/dist/views/iframe/layer/iframe.html new file mode 100755 index 0000000..e216786 --- /dev/null +++ b/public/static/layui-admin/dist/views/iframe/layer/iframe.html @@ -0,0 +1,83 @@ + + + + + + + layer iframe 示例 + + + + + + + + + + +
                            + + + + +
                            + + + + + diff --git a/public/static/layui-admin/dist/views/index.html b/public/static/layui-admin/dist/views/index.html new file mode 100755 index 0000000..4e08d4f --- /dev/null +++ b/public/static/layui-admin/dist/views/index.html @@ -0,0 +1,499 @@ + + + + + + + layuiAdmin std - 通用后台管理模板系统(iframe标准版) + + + + + + + + + + +
                            +
                            +
                            + + + +
                            + + +
                            +
                            + + + +
                            +
                            + + +
                            +
                            +
                            + +
                            +
                              +
                            • +
                            +
                            +
                            + + + +
                            +
                            + +
                            +
                            + + +
                            +
                            +
                            + + + + + + + + + + diff --git a/public/static/layui-admin/dist/views/senior/echarts/bar.html b/public/static/layui-admin/dist/views/senior/echarts/bar.html new file mode 100755 index 0000000..df8b686 --- /dev/null +++ b/public/static/layui-admin/dist/views/senior/echarts/bar.html @@ -0,0 +1,121 @@ + + + + + + + Echarts集成 - 柱状图 + + + + + + + + +
                            +
                            +
                            +
                            +
                            标准柱状图
                            +
                            + + + +
                            +
                            +
                            +
                            堆积柱状图
                            +
                            + + + +
                            +
                            +
                            +
                            不等距柱形图
                            +
                            + + + +
                            +
                            +
                            +
                            彩虹柱形图
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            +
                            标准条形图
                            +
                            + + + +
                            +
                            +
                            +
                            堆积条形图
                            +
                            + + + +
                            +
                            +
                            +
                            旋风条形图
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            + + + + + + + + diff --git a/public/static/layui-admin/dist/views/senior/echarts/line.html b/public/static/layui-admin/dist/views/senior/echarts/line.html new file mode 100755 index 0000000..3c39462 --- /dev/null +++ b/public/static/layui-admin/dist/views/senior/echarts/line.html @@ -0,0 +1,111 @@ + + + + + + + Echarts集成 - 折线图 + + + + + + + + +
                            +
                            +
                            +
                            +
                            标准折线图
                            +
                            + + + +
                            +
                            +
                            +
                            堆积折线图
                            +
                            + + + +
                            +
                            +
                            +
                            不等距折线图
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            +
                            堆积面积图
                            +
                            + + + +
                            +
                            +
                            +
                            面积图
                            +
                            + + + +
                            +
                            +
                            +
                            对数轴
                            +
                            + + + +
                            +
                            +
                            + +
                            +
                            + + + + + + + + + diff --git a/public/static/layui-admin/dist/views/senior/echarts/map.html b/public/static/layui-admin/dist/views/senior/echarts/map.html new file mode 100755 index 0000000..17c794b --- /dev/null +++ b/public/static/layui-admin/dist/views/senior/echarts/map.html @@ -0,0 +1,45 @@ + + + + + + + Echarts集成 - 地图 + + + + + + + + +
                            +
                            +
                            +
                            +
                            地图
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            + + + + + + diff --git a/public/static/layui-admin/dist/views/senior/im/index.html b/public/static/layui-admin/dist/views/senior/im/index.html new file mode 100755 index 0000000..7761127 --- /dev/null +++ b/public/static/layui-admin/dist/views/senior/im/index.html @@ -0,0 +1,476 @@ + + + + + + + LayIM 社交聊天 + + + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            面板外的操作示例
                            +
                            + +
                            + + + + + + +
                            + + + + + + + + +
                            + + + + + + + +
                            + +
                            +
                            +
                            +
                            +
                            + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/senior/หตร๗.txt b/public/static/layui-admin/dist/views/senior/หตร๗.txt new file mode 100755 index 0000000..559f97d --- /dev/null +++ b/public/static/layui-admin/dist/views/senior/หตร๗.txt @@ -0,0 +1,2 @@ + +该目录存放【高级】的视图文件 \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/set/system/email.html b/public/static/layui-admin/dist/views/set/system/email.html new file mode 100755 index 0000000..0b68092 --- /dev/null +++ b/public/static/layui-admin/dist/views/set/system/email.html @@ -0,0 +1,78 @@ + + + + + + + 邮件服务 + + + + + + + + +
                            +
                            +
                            +
                            +
                            邮件服务
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            如:smtp.163.com
                            +
                            +
                            + +
                            + +
                            +
                            一般为 25 或 465
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/set/system/website.html b/public/static/layui-admin/dist/views/set/system/website.html new file mode 100755 index 0000000..2a1cc94 --- /dev/null +++ b/public/static/layui-admin/dist/views/set/system/website.html @@ -0,0 +1,105 @@ + + + + + + + 网站设置 + + + + + + + + +
                            +
                            +
                            +
                            +
                            网站设置
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            分钟
                            +
                            本地开发一般推荐设置为 0,线上环境建议设置为 10。
                            +
                            +
                            + +
                            + +
                            +
                            KB
                            +
                            提示:1 M = 1024 KB
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/set/user/info.html b/public/static/layui-admin/dist/views/set/user/info.html new file mode 100755 index 0000000..939def2 --- /dev/null +++ b/public/static/layui-admin/dist/views/set/user/info.html @@ -0,0 +1,109 @@ + + + + + + + 设置我的资料 + + + + + + + + +
                            +
                            +
                            +
                            +
                            设置我的资料
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            当前角色不可更改为其它角色
                            +
                            +
                            + +
                            + +
                            +
                            不可修改。一般用于后台登入名
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + + +
                            +
                            +
                            + +
                            + +
                            +
                            + + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            + + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/set/user/password.html b/public/static/layui-admin/dist/views/set/user/password.html new file mode 100755 index 0000000..aa70e72 --- /dev/null +++ b/public/static/layui-admin/dist/views/set/user/password.html @@ -0,0 +1,65 @@ + + + + + + + 设置我的密码 + + + + + + + + +
                            +
                            +
                            +
                            +
                            修改密码
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            6到16个字符
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/set/หตร๗.txt b/public/static/layui-admin/dist/views/set/หตร๗.txt new file mode 100755 index 0000000..c40b515 --- /dev/null +++ b/public/static/layui-admin/dist/views/set/หตร๗.txt @@ -0,0 +1,2 @@ + +该目录存放【设置】的视图文件 \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/system/หตร๗.txt b/public/static/layui-admin/dist/views/system/หตร๗.txt new file mode 100755 index 0000000..46923e0 --- /dev/null +++ b/public/static/layui-admin/dist/views/system/หตร๗.txt @@ -0,0 +1,3 @@ + +注意: +该目录存放的是 layuiAdmin 的系统模板碎片,很多界面需要依赖到它,请勿剔除。 \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/addresslist.html b/public/static/layui-admin/dist/views/template/addresslist.html new file mode 100755 index 0000000..ce9b804 --- /dev/null +++ b/public/static/layui-admin/dist/views/template/addresslist.html @@ -0,0 +1,357 @@ + + + + + + + 通讯录 + + + + + + + + + + +
                            +
                            + + + + + + + + + +
                            +
                            + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/caller.html b/public/static/layui-admin/dist/views/template/caller.html new file mode 100755 index 0000000..a31bf60 --- /dev/null +++ b/public/static/layui-admin/dist/views/template/caller.html @@ -0,0 +1,177 @@ + + + + + + + 搜索 + + + + + + + + + +
                            +
                            +
                            + + + +
                            +
                            +
                              +
                            • 所有联系人
                            • +
                            • 联系方式
                            • +
                            • 联系地址
                            • +
                            +
                            +
                            +
                            + +
                            +

                            胡歌 最近联系:1 小时前

                            +

                            浙江省广州市越秀区中山六路109

                            +
                            + + + +
                            +
                            + +
                            +
                            + +
                            +

                            胡歌 最近联系:1 小时前

                            +

                            浙江省广州市越秀区中山六路109

                            +
                            + + + +
                            +
                            + +
                            +
                            + +
                            +

                            胡歌 最近联系:1 小时前

                            +

                            浙江省广州市越秀区中山六路109

                            +
                            + + + +
                            +
                            + +
                            +
                            + +
                            +

                            胡歌 最近联系:1 小时前

                            +

                            浙江省广州市越秀区中山六路109

                            +
                            + + + +
                            +
                            + +
                            +
                            + +
                            +

                            胡歌 最近联系:1 小时前

                            +

                            浙江省广州市越秀区中山六路109

                            +
                            + + + +
                            +
                            + +
                            +
                            + +
                            +

                            胡歌 最近联系:1 小时前

                            +

                            浙江省广州市越秀区中山六路109

                            +
                            + + + +
                            +
                            + +
                            +
                            + +
                            +

                            胡歌 最近联系:1 小时前

                            +

                            浙江省广州市越秀区中山六路109

                            +
                            + + + +
                            +
                            + +
                            +
                            + +
                            +

                            胡歌 最近联系:1 小时前

                            +

                            浙江省广州市越秀区中山六路109

                            +
                            + + + +
                            +
                            + +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/goodslist.html b/public/static/layui-admin/dist/views/template/goodslist.html new file mode 100755 index 0000000..0c727b4 --- /dev/null +++ b/public/static/layui-admin/dist/views/template/goodslist.html @@ -0,0 +1,414 @@ + + + + + + + 商品列表 + + + + + + + + + + +
                            +
                            + + + + + + + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/msgboard.html b/public/static/layui-admin/dist/views/template/msgboard.html new file mode 100755 index 0000000..8f4591b --- /dev/null +++ b/public/static/layui-admin/dist/views/template/msgboard.html @@ -0,0 +1,99 @@ + + + + + + + 留言板 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            +
                            + + + +
                            +

                            胡歌

                            +

                            + + + 从移动 + 11分钟前 + +

                            +
                            +

                            历经打磨,@索尼中国 再献新作品—OLED电视A8F完美诞生。很开心一起参加了A8F的“首映礼”![鼓掌]正如我们演员对舞台的热爱,索尼对科技与艺术的追求才创造出了让人惊喜的作品。作为A1兄弟款,A8F沿袭了黑科技“屏幕发声技术”和高清画质,色彩的出众表现和高端音质,让人在体验的时候如同身临其境。A8F,这次的“视帝”要颁发给你! 索尼官网预售: O网页链接 索尼旗舰店预售:

                            +
                            +
                            + + + +
                            +

                            胡歌

                            +

                            + + + 从移动 + 11分钟前 + +

                            +
                            +

                            历经打磨,@索尼中国 再献新作品—OLED电视A8F完美诞生。很开心一起参加了A8F的“首映礼”![鼓掌]正如我们演员对舞台的热爱,索尼对科技与艺术的追求才创造出了让人惊喜的作品。作为A1兄弟款,A8F沿袭了黑科技“屏幕发声技术”和高清画质,色彩的出众表现和高端音质,让人在体验的时候如同身临其境。A8F,这次的“视帝”要颁发给你! 索尼官网预售: O网页链接 索尼旗舰店预售:

                            +
                            +
                            + 更多 +
                            +
                            + +
                            +
                            +
                            + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/personalpage.html b/public/static/layui-admin/dist/views/template/personalpage.html new file mode 100755 index 0000000..bb402b6 --- /dev/null +++ b/public/static/layui-admin/dist/views/template/personalpage.html @@ -0,0 +1,376 @@ + + + + + + + 个人主页 + + + + + + + + + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +

                            胡歌

                            +

                            中国知名演员

                            +
                            + + + + +
                            + +
                            +
                            +

                            + 关于我 +

                            + +
                            + 胡歌喜欢摄影,也喜欢写字,他视角独特,充满着奇思妙想。他有着极丰富的情感,和对生活的热情,他能点燃观众心中爱的火焰;胡歌积极、乐观、坚强,他脚踏实地地做好每一件事,真诚地对待身边每一个人 +
                            +

                            + 技能 +

                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +

                            52K

                            + 关注 +
                            +
                            +

                            72K

                            + 以下 +
                            +
                            +

                            5343

                            + 照片 +
                            +
                            +

                            4.5

                            + 排行 +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + +
                            +
                            +

                            胡歌为普通照片添加了新的照片

                            +

                            + + + 从移动 + 11分钟前 + +

                            +
                            +

                            历经打磨,@索尼中国 再献新作品—OLED电视A8F完美诞生。很开心一起参加了A8F的“首映礼”![鼓掌]正如我们演员对舞台的热爱,索尼对科技与艺术的追求才创造出了让人惊喜的作品。作为A1兄弟款,A8F沿袭了黑科技“屏幕发声技术”和高清画质,色彩的出众表现和高端音质,让人在体验的时候如同身临其境。A8F,这次的“视帝”要颁发给你! 索尼官网预售: O网页链接 索尼旗舰店预售:

                            + +
                            +
                            +
                              +
                            • + + 107 +
                            • +
                            • + + 95 +
                            • +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + + + +
                            +
                            + 胡歌 + 3月21日 19:56 +
                            +
                            一次难忘更难得的拍摄经历 谢谢
                            +
                            +
                            +
                            + + + +
                            +
                            + 胡歌 + 3月21日 19:56 +
                            +
                            一次难忘更难得的拍摄经历 谢谢
                            +
                            +
                            +
                            + + + +
                            +
                            + 胡歌 + 3月21日 19:56 +
                            +
                            一次难忘更难得的拍摄经历 谢谢
                            +
                            +
                            + 更多 +
                            +
                            +
                            +
                            + + + +
                            +
                            +

                            胡歌为普通照片添加了新的照片

                            +

                            + + + 从移动 + 11分钟前 + +

                            +
                            +

                            历经打磨,@索尼中国 再献新作品—OLED电视A8F完美诞生。很开心一起参加了A8F的“首映礼”![鼓掌]正如我们演员对舞台的热爱,索尼对科技与艺术的追求才创造出了让人惊喜的作品。作为A1兄弟款,A8F沿袭了黑科技“屏幕发声技术”和高清画质,色彩的出众表现和高端音质,让人在体验的时候如同身临其境。A8F,这次的“视帝”要颁发给你! 索尼官网预售: O网页链接 索尼旗舰店预售:

                            +
                            +
                            +
                              +
                            • + + 107 +
                            • +
                            • + + 95 +
                            • +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/search.html b/public/static/layui-admin/dist/views/template/search.html new file mode 100755 index 0000000..640f79e --- /dev/null +++ b/public/static/layui-admin/dist/views/template/search.html @@ -0,0 +1,102 @@ + + + + + + + 搜索 + + + + + + + + + +
                            +
                            +
                            +
                            +
                            +

                            + 关键词 查询到 + 66 个结果 +

                            +

                            耗时:350ms

                            +
                            +
                            + +
                              +
                            • +
                              +

                              心姐是男是女?

                              +

                              江湖上关于心姐 的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。

                              +
                              +
                            • +
                            • + + + +
                              +

                              layuiAdmin 成为国内颇受欢迎的通用后台模板解决方案

                              +

                              作为 layui 官方推出的后台模板,从初版的饱受争议,到后续的埋头丰富,逐步用行动赢得了许多人的关注。目前 layuiAdmin 在国内后台系统应用市场,占据了相当大的份额,几乎已成为开发者的不二选择。这得益于 layui 本身所积累的用户规模,更得益于开发团队的付出,用我们的方式,用心做好一款产品。

                              +
                              +
                            • +
                            • +
                              +

                              心姐是男是女?

                              +

                              江湖上关于心姐 的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。

                              +

                              + 前端 + 性别 + 谜 +

                              +
                              +
                            • +
                            • +
                              +

                              + 热点 + layuiAdmin 通用后台模板 +

                              +

                              作为 layui 官方推出的后台模板,从初版的饱受争议,到后续的埋头丰富,逐步用行动赢得了许多人的关注。目前 layuiAdmin 在国内后台系统应用市场,占据了相当大的份额,几乎已成为开发者的不二选择。这得益于 layui 本身所积累的用户规模,更得益于开发团队的付出,用我们的方式,用心做好一款产品。

                              +
                              +
                            • +
                            • +
                              +

                              心姐是男是女?

                              +

                              江湖上关于心姐 的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。江湖上关于心姐的性别一直是个谜。。

                              +
                              +
                            • +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/temp.html b/public/static/layui-admin/dist/views/template/temp.html new file mode 100755 index 0000000..63c17c0 --- /dev/null +++ b/public/static/layui-admin/dist/views/template/temp.html @@ -0,0 +1,50 @@ + + + + + + + XXX + + + + + + + + +
                            +
                            +
                            +
                            +
                            YYY
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            +
                            ZZZ
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/tips/404.html b/public/static/layui-admin/dist/views/template/tips/404.html new file mode 100755 index 0000000..d0e6b33 --- /dev/null +++ b/public/static/layui-admin/dist/views/template/tips/404.html @@ -0,0 +1,37 @@ + + + + + 404 页面不存在 + + + + + + + + + +
                            +
                            + +
                            +

                            + 4 + 0 + 4 +

                            +
                            +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/tips/error.html b/public/static/layui-admin/dist/views/template/tips/error.html new file mode 100755 index 0000000..fc28a0f --- /dev/null +++ b/public/static/layui-admin/dist/views/template/tips/error.html @@ -0,0 +1,36 @@ + + + + + 出错了 + + + + + + + + + +
                            +
                            + + +
                            + 好像出错了呢 +
                            + +
                            +
                            + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/template/หตร๗.txt b/public/static/layui-admin/dist/views/template/หตร๗.txt new file mode 100755 index 0000000..a294d39 --- /dev/null +++ b/public/static/layui-admin/dist/views/template/หตร๗.txt @@ -0,0 +1,2 @@ + +该目录存放【模板】的视图文件 \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/user/administrators/adminform.html b/public/static/layui-admin/dist/views/user/administrators/adminform.html new file mode 100755 index 0000000..0151483 --- /dev/null +++ b/public/static/layui-admin/dist/views/user/administrators/adminform.html @@ -0,0 +1,63 @@ + + + + + + + layuiAdmin 管理员 iframe 框 + + + + + + + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/user/administrators/list.html b/public/static/layui-admin/dist/views/user/administrators/list.html new file mode 100755 index 0000000..1291c4c --- /dev/null +++ b/public/static/layui-admin/dist/views/user/administrators/list.html @@ -0,0 +1,172 @@ + + + + + + + layuiAdmin 后台管理员 + + + + + + + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            + + +
                            + +
                            + + +
                            +
                            +
                            + + + + + + diff --git a/public/static/layui-admin/dist/views/user/administrators/role.html b/public/static/layui-admin/dist/views/user/administrators/role.html new file mode 100755 index 0000000..f356ade --- /dev/null +++ b/public/static/layui-admin/dist/views/user/administrators/role.html @@ -0,0 +1,137 @@ + + + + + + + layuiAdmin 角色管理 + + + + + + + + +
                            +
                            +
                            +
                            +
                            + 角色筛选 +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + +
                            + +
                            + + +
                            +
                            +
                            + + + + + + diff --git a/public/static/layui-admin/dist/views/user/administrators/roleform.html b/public/static/layui-admin/dist/views/user/administrators/roleform.html new file mode 100755 index 0000000..e162101 --- /dev/null +++ b/public/static/layui-admin/dist/views/user/administrators/roleform.html @@ -0,0 +1,70 @@ + + + + + + + layuiAdmin 角色管理 iframe 框 + + + + + + + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + + + + + + + + + + + + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/user/forget.html b/public/static/layui-admin/dist/views/user/forget.html new file mode 100755 index 0000000..5364a51 --- /dev/null +++ b/public/static/layui-admin/dist/views/user/forget.html @@ -0,0 +1,151 @@ + + + + + + + 忘记密码 - layuiAdmin + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/user/login.html b/public/static/layui-admin/dist/views/user/login.html new file mode 100755 index 0000000..b3e7fc9 --- /dev/null +++ b/public/static/layui-admin/dist/views/user/login.html @@ -0,0 +1,143 @@ + + + + + + + 登入 - layuiAdmin + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/user/reg.html b/public/static/layui-admin/dist/views/user/reg.html new file mode 100755 index 0000000..07a7697 --- /dev/null +++ b/public/static/layui-admin/dist/views/user/reg.html @@ -0,0 +1,133 @@ + + + + + + + 注册 - layuiAdmin + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/user/user/list.html b/public/static/layui-admin/dist/views/user/user/list.html new file mode 100755 index 0000000..1b1aa48 --- /dev/null +++ b/public/static/layui-admin/dist/views/user/user/list.html @@ -0,0 +1,161 @@ + + + + + + + layuiAdmin 网站用户 + + + + + + + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            + + +
                            + +
                            + + +
                            +
                            +
                            + + + + + diff --git a/public/static/layui-admin/dist/views/user/user/userform.html b/public/static/layui-admin/dist/views/user/user/userform.html new file mode 100755 index 0000000..b671b8c --- /dev/null +++ b/public/static/layui-admin/dist/views/user/user/userform.html @@ -0,0 +1,77 @@ + + + + + + + layuiAdmin 网站用户 iframe 框 + + + + + + + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            + +
                            +
                            + + + + + \ No newline at end of file diff --git a/public/static/layui-admin/dist/views/user/หตร๗.txt b/public/static/layui-admin/dist/views/user/หตร๗.txt new file mode 100755 index 0000000..ba22b0a --- /dev/null +++ b/public/static/layui-admin/dist/views/user/หตร๗.txt @@ -0,0 +1,2 @@ + +该目录存放【用户】的视图文件 \ No newline at end of file diff --git a/public/static/layui-admin/gulpfile.js b/public/static/layui-admin/gulpfile.js new file mode 100755 index 0000000..da6d987 --- /dev/null +++ b/public/static/layui-admin/gulpfile.js @@ -0,0 +1,160 @@ +/** + layuiAdmin std 构建 +*/ + +var pkg = require('./package.json'); +var inds = pkg.independents; + +var gulp = require('gulp'); +var uglify = require('gulp-uglify'); +var minify = require('gulp-minify-css'); +var concat = require('gulp-concat'); +var rename = require('gulp-rename'); +var replace = require('gulp-replace'); +var header = require('gulp-header'); +var del = require('del'); +var gulpif = require('gulp-if'); +var minimist = require('minimist'); + +//获取参数 +var argv = require('minimist')(process.argv.slice(2), { + default: { + ver: 'all' + } +}) + +//注释 +,note = [ + '/** <%= pkg.name %>-v<%= pkg.version %> <%= pkg.license %> License By <%= pkg.homepage %> */\n <%= js %>' + ,{pkg: pkg, js: ';'} +] + +,destDir = './dist' //构建的目标目录 +,releaseDir = '../pack/layuiAdmin.pack/'+ pkg.name +'-v' + pkg.version //发行版本目录 + +//任务 +,task = { + //压缩 JS + minjs: function(){ + var src = [ + './src/layuiadmin/**/*.js' + ,'!./src/layuiadmin/json/**/*.js' + ,'!./src/layuiadmin/layui/**/*.js' + ,'!./src/layuiadmin/config.js' + ,'!./src/layuiadmin/lib/extend/echarts.js' + ]; + + return gulp.src(src).pipe(uglify()) + .pipe(header.apply(null, note)) + .pipe(gulp.dest(destDir + '/layuiadmin')); + } + + //压缩 CSS + ,mincss: function(){ + var src = [ + './src/layuiadmin/**/*.css' + ,'!./src/layuiadmin/layui/**/*.css' + ] + ,noteNew = JSON.parse(JSON.stringify(note)); + + + noteNew[1].js = ''; + + return gulp.src(src).pipe(minify({ + compatibility: 'ie7' + })).pipe(header.apply(null, noteNew)) + .pipe(gulp.dest(destDir + '/layuiadmin')); + } + + //复制文件夹 + ,mv: function(){ + gulp.src('./src/layuiadmin/json/**/*') + .pipe(gulp.dest(destDir + '/layuiadmin/json')); + + gulp.src('./src/layuiadmin/lib/extend/echarts.js') + .pipe(gulp.dest(destDir + '/layuiadmin/lib/extend')); + + gulp.src('./src/layuiadmin/config.js') + .pipe(gulp.dest(destDir + '/layuiadmin')); + + gulp.src('./src/layuiadmin/tpl/**/*') + .pipe(gulp.dest(destDir + '/layuiadmin/tpl')); + + gulp.src('./src/layuiadmin/style/res/**/*') + .pipe(gulp.dest(destDir + '/layuiadmin/style/res')); + + gulp.src('./src/layuiadmin/style/res/*') + .pipe(gulp.dest(destDir + '/layuiadmin/style/res')); + + return gulp.src('./src/views/**/*') + .pipe(gulp.dest(destDir + '/views')); + } + + //复制 layui + ,layui: function(){ + return gulp.src('../../../../res/layui/rc/**/*') + .pipe(gulp.dest('./dev-std/layuiadmin/layui')) + .pipe(gulp.dest('./src/layuiadmin/layui')) + .pipe(gulp.dest('./dist/layuiadmin/layui')) + } +}; + + +//清理 +gulp.task('clear', function(cb) { + return del(['./dist/*'], cb); +}); + +gulp.task('minjs', task.minjs); +gulp.task('mincss', task.mincss); +gulp.task('mv', task.mv); +gulp.task('layui', task.layui); + +gulp.task('src', function(){ //命令:gulp src + return gulp.src('./dev-std/**/*') + .pipe(gulp.dest('./src')); +}); + +//构建核心源文件 +gulp.task('default', ['clear', 'src'], function(){ //命令:gulp + for(var key in task){ + task[key](); + } +}); + +//发行 - layuiAdmin 官方使用 +gulp.task('release', ['layui'], function(){ //命令:gulp && gulp release + + //复制核心文件 + gulp.src('./dist/**/*') + .pipe(gulp.dest(releaseDir + '/dist')); + + gulp.src('./src/**/*') + .pipe(gulp.dest(releaseDir + '/src')); + + //复制帮助文件 + gulp.src([ + './帮助/*' + ,'!./帮助/说明.txt' + ]).pipe(gulp.dest(releaseDir + '/帮助')); + + gulp.src([ + './帮助/说明.txt' + ]).pipe(gulp.dest(releaseDir)); + + //说明 + gulp.src('../pack/说明.txt') + .pipe(gulp.dest('../pack/layuiAdmin.pack')); + + //复制 gulpfile + return gulp.src([ + 'gulpfile.js' + ,'package.json' + ]).pipe(gulp.dest(releaseDir)); +}); + + + + + + diff --git a/public/static/layui-admin/package.json b/public/static/layui-admin/package.json new file mode 100755 index 0000000..abe8a1f --- /dev/null +++ b/public/static/layui-admin/package.json @@ -0,0 +1,26 @@ +{ + "name": "layuiAdmin.std", + "version": "2020.1.24", + "description": "通用后台管理模板系统", + "license": "LPPL", + "author": [ + "xianxin " + ], + "homepage": "https://www.layui.com/admin/", + "devDependencies": { + "chai": "^4.1.1", + "del": "^2.2.2", + "gulp": "^3.9.1", + "gulp-concat": "^2.6.0 ", + "gulp-header": "^1.8.8", + "gulp-if": "^2.0.1", + "gulp-minify-css": "^1.2.4", + "gulp-rename": "^1.2.2", + "gulp-replace": "^0.6.1", + "gulp-uglify": "^1.5.4", + "minimist": "^1.2.0", + "mocha": "^3.2.0", + "sinon": "^3.2.1", + "sinon-chai": "^2.13.0" + } +} diff --git a/public/static/layui-admin/说明.txt b/public/static/layui-admin/说明.txt new file mode 100755 index 0000000..bc0e3aa --- /dev/null +++ b/public/static/layui-admin/说明.txt @@ -0,0 +1,34 @@ +layuiAdmin std(iframe版) + +# 关于产品 +layuiAdmin std 是一款由 layui 官方出品的高质量付费产品,可用于快速开发通用型后台管理系统。 + +# 运行说明: +直接运行入口文件即可: src/views/index.html + + +# 目录说明: +dist/ 经过打包压缩后的文件,一般用于正式环境使用 +src/ 源代码,一般用于开发环境 + +# 源码构建 +项目可采用 gulp 构建,gulpfile.js 是任务脚本,package.json 是任务配置文件 +step1:确保你的电脑已经安装好了 Node.js +step2: 命令行安装 gulp:npm install gulp -g +step3:切换到 layuiAdmin 项目根目录(即 gulpfile.js 所在目录),命令行安装任务所依赖的包:npm install +安装完成后,即可直接执行命令:gulp +即可完成 src 到 dist 目录的构建 + + +# 官网地址: +http://www.layui.com/admin/ + + +# 版权须知 +layuiAdmin 受国家计算机软件著作权保护, +未经官网正规渠道授权擅自公开产品源文件、 +以及直接对产品二次出售的, +我们将保留追究法律责任的权利。 + +© 2018 layui.com 版权所有 + diff --git a/public/uploads/attachment/20190822/02fce9aecd6cadf6e019e988ad8703ce.png b/public/uploads/attachment/20190822/02fce9aecd6cadf6e019e988ad8703ce.png new file mode 100755 index 0000000..c129ea7 Binary files /dev/null and b/public/uploads/attachment/20190822/02fce9aecd6cadf6e019e988ad8703ce.png differ diff --git a/public/uploads/attachment/20190822/1771ce624eccb96aad992df540126d3b.png b/public/uploads/attachment/20190822/1771ce624eccb96aad992df540126d3b.png new file mode 100755 index 0000000..d31c2bc Binary files /dev/null and b/public/uploads/attachment/20190822/1771ce624eccb96aad992df540126d3b.png differ diff --git a/public/uploads/attachment/20190822/56644a9f283c058cd371316e186ef48a.png b/public/uploads/attachment/20190822/56644a9f283c058cd371316e186ef48a.png new file mode 100755 index 0000000..8a9f4f0 Binary files /dev/null and b/public/uploads/attachment/20190822/56644a9f283c058cd371316e186ef48a.png differ diff --git a/public/uploads/attachment/20190822/65e4ad92ece9fdb7f3822ba4fc322bf6.png b/public/uploads/attachment/20190822/65e4ad92ece9fdb7f3822ba4fc322bf6.png new file mode 100755 index 0000000..1641c12 Binary files /dev/null and b/public/uploads/attachment/20190822/65e4ad92ece9fdb7f3822ba4fc322bf6.png differ diff --git a/public/uploads/attachment/20190822/6dcc15ea1701c449e63e6856f0931e2a.png b/public/uploads/attachment/20190822/6dcc15ea1701c449e63e6856f0931e2a.png new file mode 100755 index 0000000..486b051 Binary files /dev/null and b/public/uploads/attachment/20190822/6dcc15ea1701c449e63e6856f0931e2a.png differ diff --git a/public/uploads/attachment/20190822/72031bafedeba534d1e862b8d717f8db.png b/public/uploads/attachment/20190822/72031bafedeba534d1e862b8d717f8db.png new file mode 100755 index 0000000..20df52b Binary files /dev/null and b/public/uploads/attachment/20190822/72031bafedeba534d1e862b8d717f8db.png differ diff --git a/public/uploads/attachment/20190822/cf5137087d29f94a6a605e5c820e09cd.png b/public/uploads/attachment/20190822/cf5137087d29f94a6a605e5c820e09cd.png new file mode 100755 index 0000000..b1f5edf Binary files /dev/null and b/public/uploads/attachment/20190822/cf5137087d29f94a6a605e5c820e09cd.png differ diff --git a/public/uploads/attachment/20190822/d0b153352b15ea7097403c563e9c3be4.png b/public/uploads/attachment/20190822/d0b153352b15ea7097403c563e9c3be4.png new file mode 100755 index 0000000..e0fefb2 Binary files /dev/null and b/public/uploads/attachment/20190822/d0b153352b15ea7097403c563e9c3be4.png differ diff --git a/public/uploads/attachment/20190822/e144023adba5d6b2bf2d2b8c552f9263.png b/public/uploads/attachment/20190822/e144023adba5d6b2bf2d2b8c552f9263.png new file mode 100755 index 0000000..d3c270a Binary files /dev/null and b/public/uploads/attachment/20190822/e144023adba5d6b2bf2d2b8c552f9263.png differ diff --git a/public/uploads/attachment/20190822/f0a7cd43074283b428b0a33ecfca5f9d.png b/public/uploads/attachment/20190822/f0a7cd43074283b428b0a33ecfca5f9d.png new file mode 100755 index 0000000..57a4255 Binary files /dev/null and b/public/uploads/attachment/20190822/f0a7cd43074283b428b0a33ecfca5f9d.png differ diff --git a/public/uploads/attachment/20190830/11b99e997c97c1fd4eb5beb111659fa4.png b/public/uploads/attachment/20190830/11b99e997c97c1fd4eb5beb111659fa4.png new file mode 100755 index 0000000..25d395d Binary files /dev/null and b/public/uploads/attachment/20190830/11b99e997c97c1fd4eb5beb111659fa4.png differ diff --git a/public/uploads/attachment/20190830/2e59c895d2b6b071c9d15f4fcf5d2608.png b/public/uploads/attachment/20190830/2e59c895d2b6b071c9d15f4fcf5d2608.png new file mode 100755 index 0000000..eac87e1 Binary files /dev/null and b/public/uploads/attachment/20190830/2e59c895d2b6b071c9d15f4fcf5d2608.png differ diff --git a/public/uploads/attachment/20190830/b3ff1fed5dfbf33b331a42669e7a43a1.png b/public/uploads/attachment/20190830/b3ff1fed5dfbf33b331a42669e7a43a1.png new file mode 100755 index 0000000..eb9951a Binary files /dev/null and b/public/uploads/attachment/20190830/b3ff1fed5dfbf33b331a42669e7a43a1.png differ diff --git a/public/uploads/attachment/20190831/c6d8a98b07e99e0bd858c730fa2b9fae.png b/public/uploads/attachment/20190831/c6d8a98b07e99e0bd858c730fa2b9fae.png new file mode 100755 index 0000000..9d1f9f7 Binary files /dev/null and b/public/uploads/attachment/20190831/c6d8a98b07e99e0bd858c730fa2b9fae.png differ diff --git a/public/uploads/attachment/20190831/cbe91c6a248b7d9537f508d44ea7f5d1.png b/public/uploads/attachment/20190831/cbe91c6a248b7d9537f508d44ea7f5d1.png new file mode 100755 index 0000000..0d8ff05 Binary files /dev/null and b/public/uploads/attachment/20190831/cbe91c6a248b7d9537f508d44ea7f5d1.png differ diff --git a/public/uploads/attachment/20190831/e248dc8ef0a89a92d41a31f1284af2e7.png b/public/uploads/attachment/20190831/e248dc8ef0a89a92d41a31f1284af2e7.png new file mode 100755 index 0000000..44d2f1e Binary files /dev/null and b/public/uploads/attachment/20190831/e248dc8ef0a89a92d41a31f1284af2e7.png differ diff --git a/public/uploads/attachment/20190831/ee357efd26b1335a06ecd94d0b21f5f4.png b/public/uploads/attachment/20190831/ee357efd26b1335a06ecd94d0b21f5f4.png new file mode 100755 index 0000000..27a5d68 Binary files /dev/null and b/public/uploads/attachment/20190831/ee357efd26b1335a06ecd94d0b21f5f4.png differ diff --git a/public/uploads/attachment/20190902/157bb3d5f3f5b7a1218dd83315714419.jpg b/public/uploads/attachment/20190902/157bb3d5f3f5b7a1218dd83315714419.jpg new file mode 100755 index 0000000..6a0f9c4 Binary files /dev/null and b/public/uploads/attachment/20190902/157bb3d5f3f5b7a1218dd83315714419.jpg differ diff --git a/public/uploads/attachment/20190902/191d4f47bfad131ef580ec1b3c37a8cd.jpg b/public/uploads/attachment/20190902/191d4f47bfad131ef580ec1b3c37a8cd.jpg new file mode 100755 index 0000000..95e2181 Binary files /dev/null and b/public/uploads/attachment/20190902/191d4f47bfad131ef580ec1b3c37a8cd.jpg differ diff --git a/public/uploads/attachment/20190902/292a9c8ea68fcb44e4ee411eafe9df31.jpg b/public/uploads/attachment/20190902/292a9c8ea68fcb44e4ee411eafe9df31.jpg new file mode 100755 index 0000000..229725d Binary files /dev/null and b/public/uploads/attachment/20190902/292a9c8ea68fcb44e4ee411eafe9df31.jpg differ diff --git a/public/uploads/attachment/20190902/6a673f554c694a41971fca94c7503315.jpg b/public/uploads/attachment/20190902/6a673f554c694a41971fca94c7503315.jpg new file mode 100755 index 0000000..b322ae4 Binary files /dev/null and b/public/uploads/attachment/20190902/6a673f554c694a41971fca94c7503315.jpg differ diff --git a/public/uploads/attachment/20190902/76fe4ddb5c1e4a4c1bd021c2d6137b57.jpg b/public/uploads/attachment/20190902/76fe4ddb5c1e4a4c1bd021c2d6137b57.jpg new file mode 100755 index 0000000..db6e1b9 Binary files /dev/null and b/public/uploads/attachment/20190902/76fe4ddb5c1e4a4c1bd021c2d6137b57.jpg differ diff --git a/public/uploads/attachment/20190902/c67d5693b095642aeae3d452e9e4dc92.jpg b/public/uploads/attachment/20190902/c67d5693b095642aeae3d452e9e4dc92.jpg new file mode 100755 index 0000000..58c523f Binary files /dev/null and b/public/uploads/attachment/20190902/c67d5693b095642aeae3d452e9e4dc92.jpg differ diff --git a/public/uploads/attachment/20190904/3efe89ba8a7f0974526c7960d63c29dc.png b/public/uploads/attachment/20190904/3efe89ba8a7f0974526c7960d63c29dc.png new file mode 100755 index 0000000..a280b7e Binary files /dev/null and b/public/uploads/attachment/20190904/3efe89ba8a7f0974526c7960d63c29dc.png differ diff --git a/public/uploads/attachment/20190904/4e18636803cb153206858e75f9aacf6f.png b/public/uploads/attachment/20190904/4e18636803cb153206858e75f9aacf6f.png new file mode 100755 index 0000000..57a4255 Binary files /dev/null and b/public/uploads/attachment/20190904/4e18636803cb153206858e75f9aacf6f.png differ diff --git a/public/uploads/attachment/20190904/4fa1b91bc2c1ac584973e2e27ef168ae.jpeg b/public/uploads/attachment/20190904/4fa1b91bc2c1ac584973e2e27ef168ae.jpeg new file mode 100755 index 0000000..9186b4c Binary files /dev/null and b/public/uploads/attachment/20190904/4fa1b91bc2c1ac584973e2e27ef168ae.jpeg differ diff --git a/public/uploads/attachment/20190904/93ca011934a4e90f22b31b86854eb9a5.jpg b/public/uploads/attachment/20190904/93ca011934a4e90f22b31b86854eb9a5.jpg new file mode 100755 index 0000000..f1f2767 Binary files /dev/null and b/public/uploads/attachment/20190904/93ca011934a4e90f22b31b86854eb9a5.jpg differ diff --git a/public/uploads/attachment/20190904/ad5511e4a9e7755de9af19c1ed5649b6.jpg b/public/uploads/attachment/20190904/ad5511e4a9e7755de9af19c1ed5649b6.jpg new file mode 100755 index 0000000..a8c4f7b Binary files /dev/null and b/public/uploads/attachment/20190904/ad5511e4a9e7755de9af19c1ed5649b6.jpg differ diff --git a/public/uploads/attachment/20190904/fb9dcf8c0f8349210246a46618824c4a.png b/public/uploads/attachment/20190904/fb9dcf8c0f8349210246a46618824c4a.png new file mode 100755 index 0000000..c129ea7 Binary files /dev/null and b/public/uploads/attachment/20190904/fb9dcf8c0f8349210246a46618824c4a.png differ diff --git a/public/uploads/attachment/20211124/07871258bf9fd02febf83570d9bb18f5.png b/public/uploads/attachment/20211124/07871258bf9fd02febf83570d9bb18f5.png new file mode 100755 index 0000000..dba658c Binary files /dev/null and b/public/uploads/attachment/20211124/07871258bf9fd02febf83570d9bb18f5.png differ diff --git a/public/uploads/attachment/20211124/07871258bf9fd02febf83570d9bb18f5_750_461.png b/public/uploads/attachment/20211124/07871258bf9fd02febf83570d9bb18f5_750_461.png new file mode 100755 index 0000000..d09ac94 Binary files /dev/null and b/public/uploads/attachment/20211124/07871258bf9fd02febf83570d9bb18f5_750_461.png differ diff --git a/public/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg b/public/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg new file mode 100755 index 0000000..f6f6142 Binary files /dev/null and b/public/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg differ diff --git a/public/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg b/public/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg new file mode 100755 index 0000000..6fffbf9 Binary files /dev/null and b/public/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg differ diff --git a/public/uploads/attachment/20211124/4a0604cbfc29e2104a8ea02838f74f99.png b/public/uploads/attachment/20211124/4a0604cbfc29e2104a8ea02838f74f99.png new file mode 100755 index 0000000..dba658c Binary files /dev/null and b/public/uploads/attachment/20211124/4a0604cbfc29e2104a8ea02838f74f99.png differ diff --git a/public/uploads/attachment/20211124/4a0604cbfc29e2104a8ea02838f74f99_750_461.png b/public/uploads/attachment/20211124/4a0604cbfc29e2104a8ea02838f74f99_750_461.png new file mode 100755 index 0000000..d09ac94 Binary files /dev/null and b/public/uploads/attachment/20211124/4a0604cbfc29e2104a8ea02838f74f99_750_461.png differ diff --git a/public/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png b/public/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png new file mode 100755 index 0000000..dba658c Binary files /dev/null and b/public/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png differ diff --git a/public/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png b/public/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png new file mode 100755 index 0000000..956f4f0 Binary files /dev/null and b/public/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png differ diff --git a/public/uploads/attachment/20211124/6ce1866130d2800bf67603ca71412ace.png b/public/uploads/attachment/20211124/6ce1866130d2800bf67603ca71412ace.png new file mode 100755 index 0000000..dba658c Binary files /dev/null and b/public/uploads/attachment/20211124/6ce1866130d2800bf67603ca71412ace.png differ diff --git a/public/uploads/attachment/20211124/b426b10c428d4ac24b2dcbea7f1f7a91.png b/public/uploads/attachment/20211124/b426b10c428d4ac24b2dcbea7f1f7a91.png new file mode 100755 index 0000000..dba658c Binary files /dev/null and b/public/uploads/attachment/20211124/b426b10c428d4ac24b2dcbea7f1f7a91.png differ diff --git a/public/uploads/attachment/20211124/b426b10c428d4ac24b2dcbea7f1f7a91_750_461.png b/public/uploads/attachment/20211124/b426b10c428d4ac24b2dcbea7f1f7a91_750_461.png new file mode 100755 index 0000000..956f4f0 Binary files /dev/null and b/public/uploads/attachment/20211124/b426b10c428d4ac24b2dcbea7f1f7a91_750_461.png differ diff --git a/public/uploads/attachment/20211124/ba8f5f202178fc76f8cd792b90ea717f.png b/public/uploads/attachment/20211124/ba8f5f202178fc76f8cd792b90ea717f.png new file mode 100755 index 0000000..dba658c Binary files /dev/null and b/public/uploads/attachment/20211124/ba8f5f202178fc76f8cd792b90ea717f.png differ diff --git a/public/uploads/attachment/20211124/ba8f5f202178fc76f8cd792b90ea717f_750_461.png b/public/uploads/attachment/20211124/ba8f5f202178fc76f8cd792b90ea717f_750_461.png new file mode 100755 index 0000000..d09ac94 Binary files /dev/null and b/public/uploads/attachment/20211124/ba8f5f202178fc76f8cd792b90ea717f_750_461.png differ diff --git a/public/uploads/attachment/20211124/e7762b187771afb2271c6088620718d5.png b/public/uploads/attachment/20211124/e7762b187771afb2271c6088620718d5.png new file mode 100755 index 0000000..dba658c Binary files /dev/null and b/public/uploads/attachment/20211124/e7762b187771afb2271c6088620718d5.png differ diff --git a/public/uploads/attachment/20211124/e7762b187771afb2271c6088620718d5_750_461.png b/public/uploads/attachment/20211124/e7762b187771afb2271c6088620718d5_750_461.png new file mode 100755 index 0000000..d09ac94 Binary files /dev/null and b/public/uploads/attachment/20211124/e7762b187771afb2271c6088620718d5_750_461.png differ diff --git a/public/uploads/attachment/20211124/ede938d62a2e396f31abb57ea2af9700.png b/public/uploads/attachment/20211124/ede938d62a2e396f31abb57ea2af9700.png new file mode 100755 index 0000000..dba658c Binary files /dev/null and b/public/uploads/attachment/20211124/ede938d62a2e396f31abb57ea2af9700.png differ diff --git a/public/uploads/attachment/20211124/ede938d62a2e396f31abb57ea2af9700_750_461.png b/public/uploads/attachment/20211124/ede938d62a2e396f31abb57ea2af9700_750_461.png new file mode 100755 index 0000000..d09ac94 Binary files /dev/null and b/public/uploads/attachment/20211124/ede938d62a2e396f31abb57ea2af9700_750_461.png differ diff --git a/public/uploads/attachment/20211130/0d22b931bff501c2e11c19a13017e55b.jpg b/public/uploads/attachment/20211130/0d22b931bff501c2e11c19a13017e55b.jpg new file mode 100755 index 0000000..f6f6142 Binary files /dev/null and b/public/uploads/attachment/20211130/0d22b931bff501c2e11c19a13017e55b.jpg differ diff --git a/public/uploads/attachment/20211130/5e508286a5a4e801d738d7199dadd660.jpg b/public/uploads/attachment/20211130/5e508286a5a4e801d738d7199dadd660.jpg new file mode 100755 index 0000000..f6f6142 Binary files /dev/null and b/public/uploads/attachment/20211130/5e508286a5a4e801d738d7199dadd660.jpg differ diff --git a/public/uploads/attachment/20211130/e0fd3ca54619bd110412aadd30c5d0bf.jpg b/public/uploads/attachment/20211130/e0fd3ca54619bd110412aadd30c5d0bf.jpg new file mode 100755 index 0000000..f6f6142 Binary files /dev/null and b/public/uploads/attachment/20211130/e0fd3ca54619bd110412aadd30c5d0bf.jpg differ diff --git a/public/uploads/attachment/20211130/e0fd3ca54619bd110412aadd30c5d0bf_200_200.jpg b/public/uploads/attachment/20211130/e0fd3ca54619bd110412aadd30c5d0bf_200_200.jpg new file mode 100755 index 0000000..3a91418 Binary files /dev/null and b/public/uploads/attachment/20211130/e0fd3ca54619bd110412aadd30c5d0bf_200_200.jpg differ diff --git a/public/uploads/attachment/20211201/33398edcb757497469e67d1e511859b1.png b/public/uploads/attachment/20211201/33398edcb757497469e67d1e511859b1.png new file mode 100755 index 0000000..e4e9e7f Binary files /dev/null and b/public/uploads/attachment/20211201/33398edcb757497469e67d1e511859b1.png differ diff --git a/public/uploads/attachment/20211201/90e06d35343f6184ff1c28f9e591d16f.png b/public/uploads/attachment/20211201/90e06d35343f6184ff1c28f9e591d16f.png new file mode 100755 index 0000000..e4e9e7f Binary files /dev/null and b/public/uploads/attachment/20211201/90e06d35343f6184ff1c28f9e591d16f.png differ diff --git a/public/uploads/attachment/20211211/028eab6cec6e05ff545a4ad75f23bc69.png b/public/uploads/attachment/20211211/028eab6cec6e05ff545a4ad75f23bc69.png new file mode 100755 index 0000000..e4e9e7f Binary files /dev/null and b/public/uploads/attachment/20211211/028eab6cec6e05ff545a4ad75f23bc69.png differ diff --git a/public/uploads/attachment/20211211/1e9f3a800baff5e7bcf64ac46ed41e0e.png b/public/uploads/attachment/20211211/1e9f3a800baff5e7bcf64ac46ed41e0e.png new file mode 100755 index 0000000..84f9e91 Binary files /dev/null and b/public/uploads/attachment/20211211/1e9f3a800baff5e7bcf64ac46ed41e0e.png differ diff --git a/public/uploads/attachment/20211211/5bf527a979e4436a4441b69f1b5d8ca0.png b/public/uploads/attachment/20211211/5bf527a979e4436a4441b69f1b5d8ca0.png new file mode 100755 index 0000000..e4e9e7f Binary files /dev/null and b/public/uploads/attachment/20211211/5bf527a979e4436a4441b69f1b5d8ca0.png differ diff --git a/public/uploads/attachment/20211211/8d2e30097444d1d12e31d668c2962ee9.png b/public/uploads/attachment/20211211/8d2e30097444d1d12e31d668c2962ee9.png new file mode 100755 index 0000000..84f9e91 Binary files /dev/null and b/public/uploads/attachment/20211211/8d2e30097444d1d12e31d668c2962ee9.png differ diff --git a/public/uploads/attachment/20211211/cd9ea4031e0246ddfb3b53c6fa8b72bb.png b/public/uploads/attachment/20211211/cd9ea4031e0246ddfb3b53c6fa8b72bb.png new file mode 100755 index 0000000..e4e9e7f Binary files /dev/null and b/public/uploads/attachment/20211211/cd9ea4031e0246ddfb3b53c6fa8b72bb.png differ diff --git a/public/uploads/attachment/20211216/353bb62ee3b019bd60728ece8930f1c8.jpg b/public/uploads/attachment/20211216/353bb62ee3b019bd60728ece8930f1c8.jpg new file mode 100755 index 0000000..f98357a Binary files /dev/null and b/public/uploads/attachment/20211216/353bb62ee3b019bd60728ece8930f1c8.jpg differ diff --git a/public/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png b/public/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png new file mode 100755 index 0000000..dde7686 Binary files /dev/null and b/public/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png differ diff --git a/public/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f.png b/public/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f.png new file mode 100755 index 0000000..dde7686 Binary files /dev/null and b/public/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f.png differ diff --git a/public/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f_370_478.png b/public/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f_370_478.png new file mode 100755 index 0000000..6f06e82 Binary files /dev/null and b/public/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f_370_478.png differ diff --git a/public/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png b/public/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png new file mode 100755 index 0000000..dde7686 Binary files /dev/null and b/public/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png differ diff --git a/public/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png b/public/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png new file mode 100755 index 0000000..6f06e82 Binary files /dev/null and b/public/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png differ diff --git a/public/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79.png b/public/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79.png new file mode 100755 index 0000000..dde7686 Binary files /dev/null and b/public/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79.png differ diff --git a/public/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79_370_478.png b/public/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79_370_478.png new file mode 100755 index 0000000..6f06e82 Binary files /dev/null and b/public/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79_370_478.png differ diff --git a/public/uploads/ueditor/20190905/647b169ba495d3433712e8885e59d15a.jpg b/public/uploads/ueditor/20190905/647b169ba495d3433712e8885e59d15a.jpg new file mode 100755 index 0000000..229725d Binary files /dev/null and b/public/uploads/ueditor/20190905/647b169ba495d3433712e8885e59d15a.jpg differ diff --git a/public/uploads/ueditor/20190905/c4a611b592ffb4976ba2bdbff57ce8ef.jpg b/public/uploads/ueditor/20190905/c4a611b592ffb4976ba2bdbff57ce8ef.jpg new file mode 100755 index 0000000..229725d Binary files /dev/null and b/public/uploads/ueditor/20190905/c4a611b592ffb4976ba2bdbff57ce8ef.jpg differ diff --git a/public/uploads/ueditor/20211124/bd8f243a28c1bdde73ff567a81b5d6bb.png b/public/uploads/ueditor/20211124/bd8f243a28c1bdde73ff567a81b5d6bb.png new file mode 100755 index 0000000..dba658c Binary files /dev/null and b/public/uploads/ueditor/20211124/bd8f243a28c1bdde73ff567a81b5d6bb.png differ diff --git a/public/uploads/ueditor/scrawl/98a6ef3f7dfd1c2154cb3add3df28f74.png b/public/uploads/ueditor/scrawl/98a6ef3f7dfd1c2154cb3add3df28f74.png new file mode 100755 index 0000000..64cba09 Binary files /dev/null and b/public/uploads/ueditor/scrawl/98a6ef3f7dfd1c2154cb3add3df28f74.png differ diff --git a/route/route.php b/route/route.php new file mode 100755 index 0000000..442f1fc --- /dev/null +++ b/route/route.php @@ -0,0 +1,142 @@ + +// +---------------------------------------------------------------------- + + +use think\facade\Route; + +//api模块路由 +Route::domain('dgg-jimai-api', function () { + + //首页 + Route::rule('home','api/index/home'); + //模式下商品 + Route::rule('pattern_goods','api/index/pattern_goods'); + + //商品分类 + Route::rule('category_list','api/goods/category_list'); + //商品列表 + Route::rule('goods_list','api/goods/goods_list'); + //商品详情 + Route::rule('goods_info','api/goods/goods_info'); + //愿望清单列表 + Route::rule('collectgoods_list','api/goods/collectgoods_list'); + //操作愿望清单 + Route::rule('handlecollectgoods','api/goods/handlecollectgoods'); + + + + //添加购物车 + Route::rule('caet-add','api/cart/add'); + //删除购物车 + Route::rule('caet-del','api/cart/del'); + //变动购物车数量 + Route::rule('caet-change','api/cart/change'); + //购物车选中状态 + Route::rule('caet-selected','api/cart/selected'); + //购物车列表 + Route::rule('caet-lists','api/cart/lists'); + //购物车商品数量 + Route::rule('caet-cartnum','api/cart/cartnum'); + + + //下单接口 + Route::rule('order-buy','api/order/buy'); + //预支付 + Route::rule('order-prepay','api/payment/prepay'); + //支付回调 + Route::rule('order-wxnotify','api/payment/wxnotify'); + + //寄卖流程参数 + Route::rule('order-consignment_config','api/order/consignment_config'); + //上传图片 + Route::rule('icon','api/order/icon'); + //提交寄卖单 + Route::rule('order-consignment_buy','api/order/consignment_buy'); + + //寄卖订单列表(审核中,待上架,已上架,取消/退回) + Route::rule('order-consignment_list','api/order/consignment_list'); + //寄卖订单列表(已售出) + Route::rule('order-consignment_sold','api/order/consignment_sold'); + //寄卖订单详情 + Route::rule('order-consignment_detail','api/order/consignment_detail'); + //寄卖订单取消 + Route::rule('order-consignment_cancel','api/order/consignment_cancel'); + //寄卖订单确认估价 + Route::rule('order-consignment_confirm','api/order/consignment_confirm'); + + + //授权登陆 + Route::rule('login','api/auth/login'); + //用户中心 + Route::rule('u-center','api/user/center'); + //我的消息 + Route::rule('u-notice','api/user/notice'); + //我的订单列表 + Route::rule('u-order','api/user/order'); + //我的订单详情 + Route::rule('u-orderdetail','api/user/orderdetail'); + //取消我的订单 + Route::rule('u-ordercancel','api/user/ordercancel'); + //我的订单确认收货 + Route::rule('u-orderconfirm','api/user/orderconfirm'); + + + //我的地址列表 + Route::rule('u-addresslists','api/useraddress/lists'); + //我的地址默认 + Route::rule('u-addresssetdefault','api/useraddress/setdefault'); + //我的地址添加 + Route::rule('u-addressadd','api/useraddress/add'); + //我的地址编辑 + Route::rule('u-addressedit','api/useraddress/update'); + //我的地址删除 + Route::rule('u-addressdel','api/useraddress/del'); + + + + + //收益统计 + Route::rule('u-profit_census','api/user/profit_census'); + //提现记录 + Route::rule('u-withdraw','api/user/withdraw'); + //积分记录 + Route::rule('u-accountlog','api/user/account_log'); + //邀请记录 + Route::rule('u-invitation_user','api/user/invitation_user'); + //用户中心 + Route::rule('u-userhome','api/user/userhome'); + //账户列表 + Route::rule('u-account_list','api/user/account_list'); + //添加账户 + Route::rule('u-account_add','api/user/account_add'); + //删除账户 + Route::rule('u-account_dal','api/user/account_dal'); + //提现申请 + Route::rule('u-wthdrawal','api/user/wthdrawal'); + //领取体验设备 + Route::rule('u-experience','api/user/experience'); + + //miss路由 + Route::miss(function (){ + return json([ + 'code' => 404, + 'msg' => '接口不存在', + 'data' => '', + ], 404); + }); +}); + + +Route::alias('region','\yupoxiong\region\RegionController'); + +return [ + +]; diff --git a/runtime/cache/0a/aad14e2ef5a565c44b8268a1045767.php b/runtime/cache/0a/aad14e2ef5a565c44b8268a1045767.php new file mode 100755 index 0000000..0b57051 --- /dev/null +++ b/runtime/cache/0a/aad14e2ef5a565c44b8268a1045767.php @@ -0,0 +1,4 @@ + +think_serialize:a:0:{} \ No newline at end of file diff --git a/runtime/cache/18/f542d7f5990723b3a70e8f8eb92599.php b/runtime/cache/18/f542d7f5990723b3a70e8f8eb92599.php new file mode 100755 index 0000000..a9ff90c --- /dev/null +++ b/runtime/cache/18/f542d7f5990723b3a70e8f8eb92599.php @@ -0,0 +1,4 @@ + +1638438004 \ No newline at end of file diff --git a/runtime/cache/28/365bdfbf53eba473f4f4649670e6bd.php b/runtime/cache/28/365bdfbf53eba473f4f4649670e6bd.php new file mode 100755 index 0000000..b2cc4bc --- /dev/null +++ b/runtime/cache/28/365bdfbf53eba473f4f4649670e6bd.php @@ -0,0 +1,4 @@ + +1638361065 \ No newline at end of file diff --git a/runtime/cache/29/1e276ee4f4518cc1910ca775404375.php b/runtime/cache/29/1e276ee4f4518cc1910ca775404375.php new file mode 100755 index 0000000..b452fac --- /dev/null +++ b/runtime/cache/29/1e276ee4f4518cc1910ca775404375.php @@ -0,0 +1,4 @@ + +think_serialize:a:34:{i:0;a:2:{s:2:"id";i:44311;s:4:"name";s:9:"北京市";}i:1;a:2:{s:2:"id";i:42430;s:4:"name";s:9:"天津市";}i:2;a:2:{s:2:"id";i:32459;s:4:"name";s:9:"河北省";}i:3;a:2:{s:2:"id";i:44662;s:4:"name";s:9:"山西省";}i:4;a:2:{s:2:"id";i:4605;s:4:"name";s:18:"内蒙古自治区";}i:5;a:2:{s:2:"id";i:11049;s:4:"name";s:9:"辽宁省";}i:6;a:2:{s:2:"id";i:41336;s:4:"name";s:9:"吉林省";}i:7;a:2:{s:2:"id";i:5949;s:4:"name";s:12:"黑龙江省";}i:8;a:2:{s:2:"id";i:17710;s:4:"name";s:9:"上海市";}i:9;a:2:{s:2:"id";i:14721;s:4:"name";s:9:"江苏省";}i:10;a:2:{s:2:"id";i:30996;s:4:"name";s:9:"浙江省";}i:11;a:2:{s:2:"id";i:21376;s:4:"name";s:9:"安徽省";}i:12;a:2:{s:2:"id";i:23129;s:4:"name";s:9:"福建省";}i:13;a:2:{s:2:"id";i:29105;s:4:"name";s:9:"江西省";}i:14;a:2:{s:2:"id";i:12729;s:4:"name";s:9:"山东省";}i:15;a:2:{s:2:"id";i:1916;s:4:"name";s:9:"河南省";}i:16;a:2:{s:2:"id";i:9444;s:4:"name";s:9:"湖北省";}i:17;a:2:{s:2:"id";i:24407;s:4:"name";s:9:"湖南省";}i:18;a:2:{s:2:"id";i:1;s:4:"name";s:9:"广东省";}i:19;a:2:{s:2:"id";i:27406;s:4:"name";s:21:"广西壮族自治区";}i:20;a:2:{s:2:"id";i:26610;s:4:"name";s:9:"海南省";}i:21;a:2:{s:2:"id";i:19539;s:4:"name";s:9:"重庆市";}i:22;a:2:{s:2:"id";i:36495;s:4:"name";s:9:"四川省";}i:23;a:2:{s:2:"id";i:17957;s:4:"name";s:9:"贵州省";}i:24;a:2:{s:2:"id";i:42753;s:4:"name";s:9:"云南省";}i:25;a:2:{s:2:"id";i:20605;s:4:"name";s:15:"西藏自治区";}i:26;a:2:{s:2:"id";i:16281;s:4:"name";s:9:"陕西省";}i:27;a:2:{s:2:"id";i:34977;s:4:"name";s:9:"甘肃省";}i:28;a:2:{s:2:"id";i:26935;s:4:"name";s:9:"青海省";}i:29;a:2:{s:2:"id";i:28814;s:4:"name";s:21:"宁夏回族自治区";}i:30;a:2:{s:2:"id";i:7917;s:4:"name";s:24:"新疆维吾尔自治区";}i:31;a:2:{s:2:"id";i:34967;s:4:"name";s:9:"台湾省";}i:32;a:2:{s:2:"id";i:34948;s:4:"name";s:21:"香港特别行政区";}i:33;a:2:{s:2:"id";i:34968;s:4:"name";s:21:"澳门特别行政区";}} \ No newline at end of file diff --git a/runtime/cache/2f/e82ce53f7420d3b32c83ea50c1a186.php b/runtime/cache/2f/e82ce53f7420d3b32c83ea50c1a186.php new file mode 100755 index 0000000..da7a8b4 --- /dev/null +++ b/runtime/cache/2f/e82ce53f7420d3b32c83ea50c1a186.php @@ -0,0 +1,4 @@ + +1638451652 \ No newline at end of file diff --git a/runtime/cache/3a/3f6a01c1fd9cdc440436fadb0b09ee.php b/runtime/cache/3a/3f6a01c1fd9cdc440436fadb0b09ee.php new file mode 100755 index 0000000..6c23fd8 --- /dev/null +++ b/runtime/cache/3a/3f6a01c1fd9cdc440436fadb0b09ee.php @@ -0,0 +1,4 @@ + +think_serialize:a:1:{i:0;a:2:{s:2:"id";i:42431;s:4:"name";s:12:"天津城区";}} \ No newline at end of file diff --git a/runtime/cache/3d/b800a94b35e11149a183bb426ed7e6.php b/runtime/cache/3d/b800a94b35e11149a183bb426ed7e6.php new file mode 100755 index 0000000..b0d50cb --- /dev/null +++ b/runtime/cache/3d/b800a94b35e11149a183bb426ed7e6.php @@ -0,0 +1,4 @@ + +1639486892 \ No newline at end of file diff --git a/runtime/cache/3d/f4eb1ed8cccf3a48ae11788701a631.php b/runtime/cache/3d/f4eb1ed8cccf3a48ae11788701a631.php new file mode 100755 index 0000000..e02911a --- /dev/null +++ b/runtime/cache/3d/f4eb1ed8cccf3a48ae11788701a631.php @@ -0,0 +1,4 @@ + +1639539331 \ No newline at end of file diff --git a/runtime/cache/6b/17df033dce77fd995f769dac81f3fe.php b/runtime/cache/6b/17df033dce77fd995f769dac81f3fe.php new file mode 100755 index 0000000..0dab399 --- /dev/null +++ b/runtime/cache/6b/17df033dce77fd995f769dac81f3fe.php @@ -0,0 +1,4 @@ + +think_serialize:a:22:{i:0;a:2:{s:2:"id";i:1707;s:4:"name";s:9:"广州市";}i:1;a:2:{s:2:"id";i:1145;s:4:"name";s:9:"韶关市";}i:2;a:2:{s:2:"id";i:331;s:4:"name";s:9:"深圳市";}i:3;a:2:{s:2:"id";i:782;s:4:"name";s:9:"珠海市";}i:4;a:2:{s:2:"id";i:2;s:4:"name";s:9:"汕头市";}i:5;a:2:{s:2:"id";i:79;s:4:"name";s:9:"佛山市";}i:6;a:2:{s:2:"id";i:694;s:4:"name";s:9:"江门市";}i:7;a:2:{s:2:"id";i:547;s:4:"name";s:9:"湛江市";}i:8;a:2:{s:2:"id";i:887;s:4:"name";s:9:"茂名市";}i:9;a:2:{s:2:"id";i:126;s:4:"name";s:9:"肇庆市";}i:10;a:2:{s:2:"id";i:242;s:4:"name";s:9:"惠州市";}i:11;a:2:{s:2:"id";i:1018;s:4:"name";s:9:"梅州市";}i:12;a:2:{s:2:"id";i:818;s:4:"name";s:9:"汕尾市";}i:13;a:2:{s:2:"id";i:1423;s:4:"name";s:9:"河源市";}i:14;a:2:{s:2:"id";i:471;s:4:"name";s:9:"阳江市";}i:15;a:2:{s:2:"id";i:1530;s:4:"name";s:9:"清远市";}i:16;a:2:{s:2:"id";i:1387;s:4:"name";s:9:"东莞市";}i:17;a:2:{s:2:"id";i:1891;s:4:"name";s:9:"中山市";}i:18;a:2:{s:2:"id";i:330;s:4:"name";s:12:"东沙群岛";}i:19;a:2:{s:2:"id";i:410;s:4:"name";s:9:"潮州市";}i:20;a:2:{s:2:"id";i:1272;s:4:"name";s:9:"揭阳市";}i:21;a:2:{s:2:"id";i:1629;s:4:"name";s:9:"云浮市";}} \ No newline at end of file diff --git a/runtime/cache/6f/39a5aa69af641b0541a753540c4034.php b/runtime/cache/6f/39a5aa69af641b0541a753540c4034.php new file mode 100755 index 0000000..b436a3c --- /dev/null +++ b/runtime/cache/6f/39a5aa69af641b0541a753540c4034.php @@ -0,0 +1,4 @@ + +{"name":"\u540e\u53f0\u7ba1\u7406\u7cfb\u7edf","author":"\u5bc4\u5356","version":"0.1","short_name":"\u540e\u53f0"} \ No newline at end of file diff --git a/runtime/cache/76/8de6eb3fc762fbcdb0966ce349e957.php b/runtime/cache/76/8de6eb3fc762fbcdb0966ce349e957.php new file mode 100755 index 0000000..0b57051 --- /dev/null +++ b/runtime/cache/76/8de6eb3fc762fbcdb0966ce349e957.php @@ -0,0 +1,4 @@ + +think_serialize:a:0:{} \ No newline at end of file diff --git a/runtime/cache/9b/e7bca05dde8828589ae68f5ea10e53.php b/runtime/cache/9b/e7bca05dde8828589ae68f5ea10e53.php new file mode 100755 index 0000000..b6cb495 --- /dev/null +++ b/runtime/cache/9b/e7bca05dde8828589ae68f5ea10e53.php @@ -0,0 +1,4 @@ + +1638418631 \ No newline at end of file diff --git a/runtime/cache/c2/8f8e670a5512017774bc024556c558.php b/runtime/cache/c2/8f8e670a5512017774bc024556c558.php new file mode 100755 index 0000000..7c65001 --- /dev/null +++ b/runtime/cache/c2/8f8e670a5512017774bc024556c558.php @@ -0,0 +1,4 @@ + +think_serialize:a:12:{i:0;a:2:{s:2:"id";i:42456;s:4:"name";s:15:"常州道街道";}i:1;a:2:{s:2:"id";i:42466;s:4:"name";s:15:"唐家口街道";}i:2;a:2:{s:2:"id";i:42465;s:4:"name";s:15:"大王庄街道";}i:3;a:2:{s:2:"id";i:42464;s:4:"name";s:15:"向阳楼街道";}i:4;a:2:{s:2:"id";i:42463;s:4:"name";s:15:"鲁山道街道";}i:5;a:2:{s:2:"id";i:42462;s:4:"name";s:12:"东新街道";}i:6;a:2:{s:2:"id";i:42461;s:4:"name";s:15:"富民路街道";}i:7;a:2:{s:2:"id";i:42460;s:4:"name";s:15:"二号桥街道";}i:8;a:2:{s:2:"id";i:42459;s:4:"name";s:15:"中山门街道";}i:9;a:2:{s:2:"id";i:42458;s:4:"name";s:15:"上杭路街道";}i:10;a:2:{s:2:"id";i:42457;s:4:"name";s:12:"春华街道";}i:11;a:2:{s:2:"id";i:42467;s:4:"name";s:15:"大直沽街道";}} \ No newline at end of file diff --git a/runtime/cache/c3/dfda85ae860b85be40fd6d092133e6.php b/runtime/cache/c3/dfda85ae860b85be40fd6d092133e6.php new file mode 100755 index 0000000..b452fac --- /dev/null +++ b/runtime/cache/c3/dfda85ae860b85be40fd6d092133e6.php @@ -0,0 +1,4 @@ + +think_serialize:a:34:{i:0;a:2:{s:2:"id";i:44311;s:4:"name";s:9:"北京市";}i:1;a:2:{s:2:"id";i:42430;s:4:"name";s:9:"天津市";}i:2;a:2:{s:2:"id";i:32459;s:4:"name";s:9:"河北省";}i:3;a:2:{s:2:"id";i:44662;s:4:"name";s:9:"山西省";}i:4;a:2:{s:2:"id";i:4605;s:4:"name";s:18:"内蒙古自治区";}i:5;a:2:{s:2:"id";i:11049;s:4:"name";s:9:"辽宁省";}i:6;a:2:{s:2:"id";i:41336;s:4:"name";s:9:"吉林省";}i:7;a:2:{s:2:"id";i:5949;s:4:"name";s:12:"黑龙江省";}i:8;a:2:{s:2:"id";i:17710;s:4:"name";s:9:"上海市";}i:9;a:2:{s:2:"id";i:14721;s:4:"name";s:9:"江苏省";}i:10;a:2:{s:2:"id";i:30996;s:4:"name";s:9:"浙江省";}i:11;a:2:{s:2:"id";i:21376;s:4:"name";s:9:"安徽省";}i:12;a:2:{s:2:"id";i:23129;s:4:"name";s:9:"福建省";}i:13;a:2:{s:2:"id";i:29105;s:4:"name";s:9:"江西省";}i:14;a:2:{s:2:"id";i:12729;s:4:"name";s:9:"山东省";}i:15;a:2:{s:2:"id";i:1916;s:4:"name";s:9:"河南省";}i:16;a:2:{s:2:"id";i:9444;s:4:"name";s:9:"湖北省";}i:17;a:2:{s:2:"id";i:24407;s:4:"name";s:9:"湖南省";}i:18;a:2:{s:2:"id";i:1;s:4:"name";s:9:"广东省";}i:19;a:2:{s:2:"id";i:27406;s:4:"name";s:21:"广西壮族自治区";}i:20;a:2:{s:2:"id";i:26610;s:4:"name";s:9:"海南省";}i:21;a:2:{s:2:"id";i:19539;s:4:"name";s:9:"重庆市";}i:22;a:2:{s:2:"id";i:36495;s:4:"name";s:9:"四川省";}i:23;a:2:{s:2:"id";i:17957;s:4:"name";s:9:"贵州省";}i:24;a:2:{s:2:"id";i:42753;s:4:"name";s:9:"云南省";}i:25;a:2:{s:2:"id";i:20605;s:4:"name";s:15:"西藏自治区";}i:26;a:2:{s:2:"id";i:16281;s:4:"name";s:9:"陕西省";}i:27;a:2:{s:2:"id";i:34977;s:4:"name";s:9:"甘肃省";}i:28;a:2:{s:2:"id";i:26935;s:4:"name";s:9:"青海省";}i:29;a:2:{s:2:"id";i:28814;s:4:"name";s:21:"宁夏回族自治区";}i:30;a:2:{s:2:"id";i:7917;s:4:"name";s:24:"新疆维吾尔自治区";}i:31;a:2:{s:2:"id";i:34967;s:4:"name";s:9:"台湾省";}i:32;a:2:{s:2:"id";i:34948;s:4:"name";s:21:"香港特别行政区";}i:33;a:2:{s:2:"id";i:34968;s:4:"name";s:21:"澳门特别行政区";}} \ No newline at end of file diff --git a/runtime/cache/c8/6e96d134b6490a6956f890d399eb0e.php b/runtime/cache/c8/6e96d134b6490a6956f890d399eb0e.php new file mode 100755 index 0000000..0b57051 --- /dev/null +++ b/runtime/cache/c8/6e96d134b6490a6956f890d399eb0e.php @@ -0,0 +1,4 @@ + +think_serialize:a:0:{} \ No newline at end of file diff --git a/runtime/cache/df/0fee3b25589ed1a3cf8effda21fc06.php b/runtime/cache/df/0fee3b25589ed1a3cf8effda21fc06.php new file mode 100755 index 0000000..6e2cff6 --- /dev/null +++ b/runtime/cache/df/0fee3b25589ed1a3cf8effda21fc06.php @@ -0,0 +1,4 @@ + +think_serialize:a:16:{i:0;a:2:{s:2:"id";i:42448;s:4:"name";s:9:"和平区";}i:1;a:2:{s:2:"id";i:42455;s:4:"name";s:9:"河东区";}i:2;a:2:{s:2:"id";i:42528;s:4:"name";s:9:"河西区";}i:3;a:2:{s:2:"id";i:42673;s:4:"name";s:9:"南开区";}i:4;a:2:{s:2:"id";i:42517;s:4:"name";s:9:"河北区";}i:5;a:2:{s:2:"id";i:42720;s:4:"name";s:9:"红桥区";}i:6;a:2:{s:2:"id";i:42468;s:4:"name";s:9:"东丽区";}i:7;a:2:{s:2:"id";i:42686;s:4:"name";s:9:"西青区";}i:8;a:2:{s:2:"id";i:42432;s:4:"name";s:9:"津南区";}i:9;a:2:{s:2:"id";i:42731;s:4:"name";s:9:"北辰区";}i:10;a:2:{s:2:"id";i:42634;s:4:"name";s:9:"武清区";}i:11;a:2:{s:2:"id";i:42486;s:4:"name";s:9:"宝坻区";}i:12;a:2:{s:2:"id";i:42564;s:4:"name";s:12:"滨海新区";}i:13;a:2:{s:2:"id";i:42700;s:4:"name";s:9:"宁河区";}i:14;a:2:{s:2:"id";i:42542;s:4:"name";s:9:"静海区";}i:15;a:2:{s:2:"id";i:42606;s:4:"name";s:9:"蓟州区";}} \ No newline at end of file diff --git a/runtime/log/202112/11.log b/runtime/log/202112/11.log new file mode 100755 index 0000000..2dc493d --- /dev/null +++ b/runtime/log/202112/11.log @@ -0,0 +1,166 @@ +--------------------------------------------------------------- + +[2021-12-11T18:44:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.450787s] [吞吐率:0.69req/s] [内存消耗:4,546.81kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127792s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086835s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084093s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087004s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.086869s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087971s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085196s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085396s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083778s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085952s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'goods_item.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-11T18:46:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.580264s] [吞吐率:0.63req/s] [内存消耗:4,563.73kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.141972s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094800s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094572s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095633s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.093632s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.095525s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092934s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.096905s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.095673s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.095907s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.093510s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.097793s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.093313s ] +[ error ] [8]未定义数组索引: S[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/GoodsController.php:151] +--------------------------------------------------------------- + +[2021-12-11T18:47:00+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.883723s] [吞吐率:0.53req/s] [内存消耗:4,809.43kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131545s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090467s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090287s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090845s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.088484s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.090064s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089072s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090153s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088449s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.089907s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.088255s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090350s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.087518s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.090133s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.088438s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.090474s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.094657s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.088720s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088990s ] +--------------------------------------------------------------- + +[2021-12-11T19:14:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/index.html?_pjax=%23pjax-container +[运行时间:1.058549s] [吞吐率:0.94req/s] [内存消耗:4,624.13kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.141787s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094553s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092744s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095119s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/index' LIMIT 1 [ RunTime:0.093270s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.095142s ] +[ sql ] [ SQL ] SELECT `id`,`name`,`parent_id` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.093452s ] diff --git a/runtime/log/202112/12.log b/runtime/log/202112/12.log new file mode 100755 index 0000000..105e8e7 --- /dev/null +++ b/runtime/log/202112/12.log @@ -0,0 +1,30026 @@ +--------------------------------------------------------------- + +[2021-12-12T09:50:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/add.html?_pjax=%23pjax-container +[运行时间:1.399684s] [吞吐率:0.71req/s] [内存消耗:4,634.77kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/add.html [ array ( + 0 => 'cat_list', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.193513s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090347s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088514s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089923s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/add' LIMIT 1 [ RunTime:0.088513s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.092272s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.088846s ] +--------------------------------------------------------------- + +[2021-12-12T09:50:06+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/index.html?_pjax=%23pjax-container +[运行时间:0.791825s] [吞吐率:1.26req/s] [内存消耗:4,463.36kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.161896s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089220s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084681s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086248s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/index' LIMIT 1 [ RunTime:0.086011s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.085576s ] +[ sql ] [ SQL ] SELECT `id`,`name`,`parent_id` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.083645s ] +--------------------------------------------------------------- + +[2021-12-12T09:57:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.146375s] [吞吐率:0.87req/s] [内存消耗:4,758.55kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132583s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088979s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085655s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086186s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.088605s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086618s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.089705s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.084702s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.085793s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.086274s ] +--------------------------------------------------------------- + +[2021-12-12T09:57:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.785338s] [吞吐率:0.56req/s] [内存消耗:4,780.55kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.139001s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092845s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091503s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089819s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.089608s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.091286s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088856s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088702s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.091839s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.090612s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.089864s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089905s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.088490s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.089605s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.092492s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.092034s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.089133s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.087347s ] +--------------------------------------------------------------- + +[2021-12-12T09:57:37+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.979456s] [吞吐率:0.51req/s] [内存消耗:4,662.08kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3207', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarythWKN7yt8GGL3vgo', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '3', + ), + 2 => + array ( + 0 => '2', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => 'e893e4b5bfdfdb28fcfa980370a8f363', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.141628s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087673s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085867s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085153s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.084887s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.091073s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639274255) [ RunTime:0.086077s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.084707s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('71374c2bouAfcB2PmTiJt2vtOe51Q/3zaWmM/4yDvUJU3lUZhVSZQ97G+K1B4/0phNkhPzf28zn54x5vqgMMULvMPEdqCvi9nqpe05XzdGkwJ9hm0oPokgo3HJLAfiuXECh0Jtr+rApipeHiSKdLKcQ/ffqjCKDHi5XtF/g/d/4J053dFndyMB9zS7t5ECoO1/t+jVv6mLPEGUFUL4nJ0cg/0avo6koCiOg3EFIES1tYoYGZ++Qhc3CBZq/4ltrpbsQfMJvcJr3K6nrgZWdWvdK+lSbVvm2nmxYBv0dku+NdSy2vFuEeAunAZf38mMYbnf/U/OLm6SCTBGsKvUcWsARI3FXlycsh0OXH+T1lNF9h3ZPJQ4zy7yU8sdFM3+Jd5eXuzq4QFJbJG8KfeFIDt3Twzw+XjXddnY05q3JNXrEW10nlmeSPLKGdPX8gOBphXtF0L8UlrLXRujLcogJUNxlKyj4H2FnJ3KDjsZg75sT7LqGXETN3yW0BbPwbRQ60vT02TnJ3PxAlc96zEJCCd5g0L7uNASWy281Ub+NJMiTx5SG2sRFqmf5Z0msGGtVtql5hXDhY82RELknydRboTbDgLQow2y44+EvVDQBI6YyEwMlWG95p2ap+jYu7Ghm+L+3L7+d58CZEB/BCe1SPW4iD9ZTajHi14waDTVy3GgZIu8m3aNaW3821O68OQO8ovGfFAkolHyvOwBWQ+hYRbz8WF+0cDqJ9DXD3Tft/8Pk2XL3+TBO3KC68ajq1by7j/fKFMaF1sqeANSg9t3eW4uLduUWBi7akE8F9rsPiOLg0VxoTa2rQgXI8qvebvpIueQVq5nREDHx7XCwDGz6Lr9bff01WMQ+ibFasXKwKzF+nM+Z2QgZJqSXQcXQK2ZoB3kwSxPP2J73vplsKtixniWLBk5RoMw1nWlSIvfiQsk5wlxcAxF1lYffhvo4ZUkkjM8eu4ZGyyMNz6bGSLHS6nUZSSCPqSTYDBsDin3WrnSqOGuFzbduX0QBS6rZYJroETrwUEAIOAjXvKldWcAh3a0Kn+eNELtYCZQ1lUPKFtNkZlP5lKIL3CiVW/WgSGd/AdGmVMJWgTbgySj2yvyArq/jYHX+X5g9YybuMTmWbLVB7jOzDBcz7uyXmwzI/fbrPoVebqLY7D5kKvnegkxGGcFtlrsEYFuGIpSLonYb90zMCHz2ELarLHQ9GUEOjCleIFbPDHYlQubcLEb7H3uzy27Cfv0RGvcRZz3mEmwGsMcujlcjtit0ymiexJEkrnpNBw3duR9FvwRm1LzRvf2xdYvJua01T4S19vGYkwN/DIzlYOpHV7KSsAyumm+d/dB7XS5iSzH/L1R2Ipu8HZktySItpD7V9FZshM5U/aa6bKWwrW1c/Q/3+c6jXnQO30ZyjZX9hfpUZEHWg9hrad0DqixWLdwibW6YEqevtV02lQSC/KomcsBvcKXGL3Z18' , 155) [ RunTime:0.084201s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087531s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085492s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639274256 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.084632s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085833s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084076s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084091s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083636s ] +--------------------------------------------------------------- + +[2021-12-12T09:57:41+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.157232s] [吞吐率:6.36req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T09:58:37+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.963148s] [吞吐率:0.51req/s] [内存消耗:4,657.54kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3207', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary2P8zo9SoUNh0aaKn', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '3', + ), + 2 => + array ( + 0 => '2', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => 'e893e4b5bfdfdb28fcfa980370a8f363', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135562s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088232s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089361s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088736s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.089445s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.088237s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639274315) [ RunTime:0.087421s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.087536s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('21d296d0TEBL6YT33+zxySZd3P7SG3bJNiEN1YFyXkLvd4EsdogTX7gFjGs8CnF/dk4QzlHg3mMxTdDbjGkI802NZ4IIHd8dT5wOaVNh3m02jdzQPU6yNT3OdTVOhav6YXUgrtYNzEAtDYKogCyN5EBSfSWArVduw9u5aPidX8cHIARrifx2VcumNjabSCKFCz4zJS9jqylQcHLwml1156CbcnjjburXLrocIL9dYCu/o2A1vq6XAUg0czC8pVjLKmsqiGCpKyDsScpQgK62ypyXfgeTTCMgiodo3fOtxkFvChfHKzK+35wIu0tJogok+IztbNdQlWhZWIEUFGYyYjEXKEwS+jT954h5oQHCm8Cn84zHjWTfMnoxBWkFIKw/8X9FjCWZPjz8yIlyobxZv7ExPhOsAxEDjAu6XYE02TyvHGMHnXJu3rAibbTo6AgFQ8d4Uv4G5iasisc+SCFgepnDEWghJlt2gukyQhJLrRWgHEaFXdYlF8ZsCHxh7h7QR9pJkw5dRbgkN9IMccHAeFfnX2R4olDrsr0jm8XQYxFSCihsy2YopNJL3wFPqb5+4JK6fKxgj5cigmFiBXgKjbMpN2tsMR5KdhhXd0IOcxtQdxkVJIu/bJb5b9k4KyEYeu8b046OyyPitoN35cKdoMtWxp/CZ7w1vEvuKrW+SNORzy9AZHzMt0v3ch1akOf9chKxhkoCbpoOj5A5itEAhC6ICjxS4KNoJYIWH/LQ+5WIrLwiVKb7G5lEXxNU3pza//xkzLmJbal0u8ludJ3nEh0PrXn17MORje6jZuVX91v/DNJL5BZDDgjONWsFIZSvIgyAJfuLsoqje8D2Bvgj37MGFerUmrlt4vyKiUGnqFKa5s5lhjrTqp4snGLHQTh3YpFj4a2xRj7OuHYQlLmCZPz6Xr7xiJTzsJ7I52AvNA1xwv2lhj7Pm6txbqsHgQ5vt7Pv7XzM6wJMaaq/w3/oV7IBKUb9XKdkhETCzBBsIJCxm28uf8arDOyH0ZeaO+1IhA8QLf2w3JBrtaAW6O5TnmQwy4U9VORQnlG0G+iFiKieWeUUaGD9aO2DE+xGRWVzcohqwBouR8CVLIeg1OPNp+J/nevios/KI/trEvuZjgdZ13dyZP9UG/E4QXXX4wHupgSMUDdVPQ6aKnhVFdGASlRZMAEAxAx6slcLp3xw14c7heqAo88zRRvBS/4YMgid2i759S/RfyCHfUD1IH6dn2E/VxZL7VvESKhVRkX/68XqMxhlH1XfpHzOYh5NKwQiK0qdoE9w0N07YndYzRX6RP9ffUwsz8VSehcJZdHG2D9993+KVaD6nk90oKz+TDCCcmUMiyoLIAWGPhbg3oV8CdKsW2Tj8sxcW2+9Dhjiruy8dQzRQ5vcPr7iJPTSg6BUmPtld+yNrE3N9O6izkfxbWu8vWMTACJtga8z3lWCdQmznV0Qt5IYTAU4ZprZ' , 156) [ RunTime:0.087292s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085854s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083750s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639274316 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.085093s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085673s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084434s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083446s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.089046s ] +--------------------------------------------------------------- + +[2021-12-12T10:01:05+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:2.190544s] [吞吐率:0.46req/s] [内存消耗:4,677.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3207', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryHtUNNfLppDyl2dcF', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '3', + ), + 2 => + array ( + 0 => '2', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => 'e893e4b5bfdfdb28fcfa980370a8f363', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.139130s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089149s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089159s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088801s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.087380s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.088405s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639274463) [ RunTime:0.086746s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.088125s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('80d6424cpsrUSm/ua9TFY7ZH2mVFMgYYN1jAC+WPDFxn9iROqvZITeieoIDfhxfnY9uDYCANHn6zfxsM15fF3ERPGQtIx2wJMZzzDv8bwbY53k4Vs1BPl8pDTfk/SNdl7WPfFY4K6gcPjMzLDxYUTiYOGsc+h8lhUL8Ol431SlJh1v7TC9Sr4kzXQ9zzD91I8Gl2wvCopdk9KFxi8IzmKROv06mOWuLXsuR7jwGIFawEYs6/h2RJGf1Apd9gJoOIcu0njER7qCJiVz5Jde3MwyIgrC/fMX4gGeoAhbExhDqo9AnxszaEwJ7blYslCaXEJSqeMVOlRGlVDfJdV0KrPZHtPHC5Nv9nyN9iuwOZqi6eQDmJlkDQXe9MvTUfZ15gmQIXj4OE+x+szr1v0K0xxLERSmEXSLRp5lvzoJOpm0EbekhWi9WLeBfhSdWgLWw0PUV0wQYCuKViJ/llAKP6KKYvfApsqSh0GCsSB/kulCDtr6bXqLHJ0RdPDhT3AmMRTCiOPRnT+3sdc4S5LtLx7OEPrm9sefhLbBY8BFOOoEGP3O8PFfkp/LK2T0nLvmSGjiUhKtKO1Sd/YOIAmuwH/Fqy7wXJWf+AohPQCUfgPsV08nB47Ncq1022G43zKMtF8XaX1uqKkh7yr/polUEz+Bxmg0bB7mz7Xi3Wf13dml93l9yZ60i6bIDxpqehN2xgydJjYMgKGPtNm7Z38hEjcHoLdFPSGu5vEj9rH743yu8zvGuxewHJSJST3ROBK5ZHHD2+B3/ClkllrCuzvmTJDXZMl5BhAdQWyjS5mVecU5lL+k+8ANtecXQFRjBr8SYkVsycHyY6OWg7pqBBkjrdepe1+YpNcy3gvS+l4ZunMunnJeL7nCMbWJXU1JTcYlMFwmEciAl2+UdFXjCYVzhAW4vUEjcRF9YU0J7s6Rw0yEEQykyVH4r4RKRTWdlQ3l4C3+QAVhX1lZxofMoQbFDTlUIEicnIgZoDDwVHnBMxfZ0BSXQfVJAVN7S+F4VngNAmymSryc2hEIyyWD5JVhHJpTeX7dvwImZZav+Zu14e1A5kO0uzdVaya2uQR5qZJPYmn/1UJs/StK89b4+r7P5d/Eu/jMFcieGMMPSiyRDO0lTQPrOpAS19cuwBmiZb3jvwdTHQILMDBunOrzMRsJlhDGeveexMu/7oGv+y1t2M29CqFWrUBuWprWPU3ik+/kxjC9Zg6KfzUR4HmekBBW9ZYbWPI1pNXL+q8n57GgT1+7uC5dq1LgibhryuDIABEzdcnRShpC5u3ORj3QDXGjkGuiuXEqy50fOyxIR+L9le7OJvlmMeqzXyJMkG1b39Wd8SVNB5U8d0xzIww6m/SpxoY63nnYlKtWgIen4qJDPW4eBC36hFyXlHz4u8THhazHn1/rvWTfG742ar06O0VvnNdbzoa/91O9z3bwP5bKv1oTd5uym9JJbithXqgjGU' , 157) [ RunTime:0.087854s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.090457s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088200s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639274464 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.084475s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087702s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086277s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086724s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086449s ] +--------------------------------------------------------------- + +[2021-12-12T10:02:04+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.822334s] [吞吐率:0.55req/s] [内存消耗:4,677.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3207', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryODvUjIVoAqbVHfwV', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '3', + ), + 2 => + array ( + 0 => '2', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => 'e893e4b5bfdfdb28fcfa980370a8f363', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133631s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088232s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086104s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087646s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.092173s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.087370s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639274522) [ RunTime:0.088927s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.090448s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('c7245b3cd0e/1WHG5EbDEzLhJhy4W9F8lFgBeVXjFwyD9PvksruivoktOPmPzktZCHaFFAwBZ9Pi3JgsaxJkmyyUSytoVbri6nB9KXwJZDaLgiUXVu/8GrlwHHaAzZJMtLMdYXXLaGMMrIemkITBgPjKtQ4RG9FtWXBcWnnwObAXnMMFcawWzAmgccbS9IQXGK3JlYQQBV2BfWRaGAq97Z5zoDRCEqstW32aXv8U0gsOipalBASe38BUHkS1Gpa+DbK1fshO+sBkXo2eyFr8JgccCERpu2PW2xHcyCHtkENzMdNQyJVRzgDRcegRoNNp8bF6RA95UfnDZkwO0KaUuUW32gBThfp6itcGRzMeSMt2h+mwDfEyt9cMzauD7/E4M3NlF6vcg6tqsZJhEdpDMUH7qbvt0J3VTmhDyroC9PguhwHTxF0qQ0VtKJ+iPFOrZSwEk+bltZWDknWuAT3oK6tzn58ML0RfzXy0WFH6CG8GCNTZBGmkEaA49nWHlGGwwzzMp0Q5ztkcApeTh5F1j3IHnGXtLsYFmPmXEzLbLVOgoLgEtWAesMuPt7ldRpPOPWa6LUQLuyr10Ct4FXb4BjmRe2eX5t4GYpDYHC1+WbF7NIQhbAfGUuDYjoDqp8a14ss21iqH16b+6lC5rpoml10jDGAyjzBCVZbHl3/Tq+FdLFnrLkGXb/OA1q9QM0353vLjvAssPy4AwRg8yClJaVGlUfF1glaTFJKkc/hyGS3FjgfN53GM8f4Ym6imBZYGt2Po9ppDQPsZMcICa39nRryUHSvJWKOQcSlrbpCHRSNWvPoJigjPSMcQz/uwFpzG9voZxAsb5tZuHrPd4t5+wbrMFV7Lonp0dHtypyxG3gXc61SkxmWkwhqUr+DX7FnYAdvoIZsFOR0Z4suUpOMeOvZ61Afdl+o4YjSp8U0Mnh50vO2XOxldWLK0SdFm1uw4xa3sXNDdw9I+cGBOd7jQrcFalDj+EPTU7cNGnXOfqMchmplaDqVwEhifJvPEjT4ev300+obDwGr3VCt1yo7olXahoIzZwWUVna4RejUDlERBp5NzBWig3drgq1t4j/l7loBhivZLCwDj1hbvU+Euqd5K3xVRJ0nIiIxMNVtKdzRsheido4sz+JdgvAjDjTXK7SEAE0vvv1M1/n1z5ayiBRxDqniI5FqM5c48kg42+/a0/OXrds4c5WN1YWhAl9tmMezCO+SO7r3bpWbLnxPPYotIBitUzhh3jxluZum+EHuiLTHj6dArQRfGEjDVS2wQftmIxry2VmX579/bsfn1MGZBjIRVNADYmhFuKvjLVH89qmvIvRJBsH6o7epmZMXsA3H3Py496FphBh+hdAvxPCfrNm+RIhJORdvDq2V5NsGqrlvC11tmIpI660zZ0Q5tXFz8bWA5cA1/a3e/Eww11YjuD34fp2gY844095hKoPc7g9j3KSivRA5OeXzH' , 158) [ RunTime:0.085996s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086862s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086502s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639274523 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.083933s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085057s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083418s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084356s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.090760s ] +--------------------------------------------------------------- + +[2021-12-12T10:02:08+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.764164s] [吞吐率:0.57req/s] [内存消耗:5,065.31kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130296s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085506s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085835s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085794s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.084114s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085037s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082958s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086943s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083715s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.084303s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.084824s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084624s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.084243s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.086169s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.084945s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.085045s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.083760s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.082844s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082424s ] +--------------------------------------------------------------- + +[2021-12-12T10:02:10+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.904728s] [吞吐率:1.11req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T10:02:17+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:2.162894s] [吞吐率:0.46req/s] [内存消耗:4,678.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3695', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryUeABPNw0gp0ePV5M', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '3', + ), + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => 'e9b66aa8c928d77ba98064fe0d7388a9', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.138577s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088200s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090217s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088104s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.084920s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.100851s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639274535) [ RunTime:0.103807s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.090369s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('0f388e48ysla3o2iEN9lyv9kAJPbwtZ6Zys84QnlP3rQRoteT4ShKFEnAG5KUn8DesywBPHtkiAg0v89RIuyAHJ1Ygb9ZFVpEA5VP7KRJc80lISKDcuLf3nEm5lF2Ir94cAelDN5/O5nBc2ILk3/OlGwScNoytU5WXLDfow7za2txJXiwCi3ZwYJSEd7MtSY+p7xpuqAKEfAn3JRDwURLcyaf33/qz8UxW6zGnLSqkdzWLiLAmA4M7SENxrg/5VqYxnn1UKGJnhvPsqcQyIllzBXyBb/OXKWxaVoIrqI7QLCNs9c3yQqbtftwTlZraUePXYclteRkAKZBfseP/Agaef1dNKTpeq8l8ym9fWxIOQiRtOSMEwlVJwpaqXXz43pAWpPCvwgoy2wGErerteBSC/ictjIxQbuvnwZLJry15cj5iULSSCKrPy/0kuj2HhDNd6bdGwl4A6XGahJtdjwFsynJ4J8TnQazsqS2n3mMM/dtep7qc1HITFEvuUsRZqBhhKvIHxSus1hw1PhbXpUv1Nk5ZqTyYEa2PeXvI1gN8anb0DOenT+P8JGWvwHYsCgzNI/0rLwfwvRvGgly8BhvmMJq68qzysYd/x+78+V8QA4L9JfksuXMWBwEo3E9YPpCNlsXek/PpF8Oehw8IfxYJQGrj2ln9sxNwOuENKqk0hm33YMjv46u80pSqk42+RzUWsoqpeVcmci5l40yKN/OnrYOltOCLuJdkt9FdMi6IWkbM7joNGPtFhKz+4Yx5UWxzG2AVz6OQCW1zFgkGVTeJEvpi0DDH2MEV1NI4J3fPgavj1wabz3yNwrNpeTmwstFAVFknj+c7ueosXLF3w1YOybHKqe8KubujNdkfOkbnin8zfG6gaztpVpgLS5Azhr0adn22f+lHoTkOc2ggFqCT64L4Ql48xm5ZdkuU5J3H5ONjxzbFqzNBiYyXebneLUkp7ZxLmfSrxF7PJVWXgKxkEUxWLesdtsEhChNVBibrMxwLoCUVkbQ7mX2ZBUUuWIkaylarwot8BXrfdyAxfblXMzrCykLSCMRnqMXtt87+lFD6jrDiJ2IYnsNuuXw3jV/oV+ZiljosVoe+thPt7WwCKLI8HYf4wOcM84r6y+lq200y8EGv4DWHYf2HghlZjzncuwDNxxz0SAaQj6Lmx0TBVzvvMbOXrslLJ+O/ODq7stTuBv7qSZ1Q4rtMJYCg5G8ojyrlLit2FuV6OJL5+7noDMfZxtgBe/9LTf1Qpx53EDbXIjtHzgH2b/K7aC5cTfO5M/llV5CnKbBagJ/pZ9HE7j+YblKKgtldSnrfFk0klGI/v4nwa7JsvhuqBW4THNJXclpvDePxozgnKvb/beQT0qgk1U+nR3k+l6R019NUl2ApRJU2eUAgG1y1BUyijXJpBT0WwPYk4M01Cj3Nh6VHX9Sjd6/wzqqm3PKALJEJMITUCRH7az0UDBaMX0wYofaqD43/XaSWoDXg9F7wcxjwc1tdtODTNPZMVMHgFV8ItJeeVtJwrO' , 159) [ RunTime:0.086247s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087623s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086392s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639274536 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.090340s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088513s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084924s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086184s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087214s ] +--------------------------------------------------------------- + +[2021-12-12T10:03:58+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:2.129494s] [吞吐率:0.47req/s] [内存消耗:4,710.81kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3695', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary6PcGK5ja6MPCdzvE', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '3', + ), + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => 'e9b66aa8c928d77ba98064fe0d7388a9', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123831s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083639s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083940s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082956s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.081664s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.082843s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639274637) [ RunTime:0.081401s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.085869s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('0c4c4b98Neo/4lXGWsV/oyLbtVpOIGSoCqF25ogyJVBdZcR+TdBxDhNuIeLYAy4h+35JRUM7y1Gi9TteDTTDPZzW0S4RMxtsJUvT2Rl7calGj/4IOX0oxf3JpQ9ZbEPxKjIujp1AfJTQQskZKRBtZ8405Bh2Q6QbgSegCSS+JcKU01bAdJqA+PdscgFIwD2cQtwgRY4/ljP68f6cXvG5eYMmjGFTlcvn+gftaRaH2RJSr3DDbz8ky752vR1q+csXugKS0Y8U86fYmGYnVUiM0dNRU8YQ7juJUa2hJYCuEnWTifG8I+D8MZNOX5GVENjRmdN0zH3Q2YAg5Ibj2Te49Vb65vyq1gLeZIpxuKE/hJHb3Jxl2q5ddGkhrZ2tR0b4o4y/X3sy2Z2f+KPar3nGom+KIuyIX0SBdxrhoUBVcn2A8WHC4IBJFhcV60SM9k+/5HVtteb7YJg/0bNsQNSLGv4Ir/oz9L37KHw7MrFxJJRfry3tPAHSY8MAS3fV6PRaD7MZNy4myoyy1M0Jhlh5cFy3zNwb4d2HT+5aZwTkNZ1wGiUouRe21UcDgIWfYsLk52yw3aRzU5K1xZGaCqscYlxJ8sPlkQpjw1gQaW9dV6CbqVfVwIgQ2pARa7C8Ax2CxS5Hu9x/Bewr9EK06PljyMeFl0JyLgF3s5eR03OXJX0C+Kr5Z4sGWiW5x9fUCMra8CLHeittwvzYq3CojeEqtoWDlTYkrlQBW5Q0K4lEpFkz7iT99kR7OjJyIXbUFD/9q5CKzpwvkQw2wEO3zzDraqx9cj6xiuhTmnxnLepwwD/VdVSbYIa04jhAYiXj2BKt+Bowu/phIprUBnHdV27dHHY3yYaqzo1Oy5DXUUZ13aTWVxDeLloH2a47641Ix6x3WgQtFnfXoD5OhDWxfvFVMC/wMkzcT1UiFQEJQx04y/CAHuGKlHl4a6lVq8XqY5TLFGLQfcYUZdqO3D++Tj6xIQcTpauwVkkRwm3VausIe0lL5fWSdvWwBNIDT+8ve9LqX0mBff9l9jXltYjpP/lzJqtA1Grp4eNw3wJAmwGGvUMOUVfLCueXeznbsKW5BIZp0rtxfjB6pJKA61uARfGD4HgX/4vCpGTNWXNqIYgzyZaQ5htdXNa8f/aXVVzGDu6lQfkp77hEFtz5Iw60wwSjvlR6UQOrI0Y6k6ggvGjU4/GVyKrd8Avhv6CN7Yz0GsgP5TPtL8B7UdsUOdURskSVcZArBeHApVYBccwTL/zezIfTHcEgC7xEnf4GRANzhiliy80r8MvBT3mbHRl1Kl3Zpg2qvvC5yNdsoUzudHgylwSqITayrFoCTXt/M8APgnqran18SiUQcVgGtFzBPTOHBalJEibIwOEz4P5htANU+zVn1vnoyb857KXpbuVbbG4GZdZjNNS3ww0Id2l+fFnxZqqKnvXm5w877Oeo2a+g5x2nww7DB5cimQWqFdZ8MNzG7TP9pmnxSd7Gbg94CCNhCIxNt4+jf7WU61uUlvL00G09uXotqLYc' , 160) [ RunTime:0.083277s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.082766s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086393s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639274637 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.084090s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083113s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082977s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081827s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082937s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.083850s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'S' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.083445s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('S' , 2 , 1) [ RunTime:0.088370s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.084486s ] +--------------------------------------------------------------- + +[2021-12-12T10:04:15+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:2.259933s] [吞吐率:0.44req/s] [内存消耗:4,675.77kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3695', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryiI7SqpV028G6XAqH', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '3', + ), + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => 'e9b66aa8c928d77ba98064fe0d7388a9', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132183s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083252s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079991s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083699s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.082027s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.084816s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639274654) [ RunTime:0.081818s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.087659s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('ba1bbe5eUrhAyhu8YqDJufeEYqY5hi7i4j5FNXH+1WDVxGTxtRL6XEcRWrjsJwCn/kDPxwhQrwoOQMDFClRyj3J5Nb6mRe4i2wFk8QEm6axKPhAdvmTC7CzFicVVgrHdgd9vTJ+Gg43C5DewLn9w+vJcBIiTGvLGLkWzeq19gbnYx+KfGU0ehRpO1zH5JP7YzuCUYOAqWqN8susX23KIf1C3z+tc1Yvg/jh7o5PX3I+DV07tyAcDVWZcbWhzNd+WaYS/gxZx84aZWbmJCqxMNrvQKKbjeYiTZdPnAwyGbudw134DI6Q2cMOyAFlyK0O0Fb6lY8hAUz7j4iP8lM1kryQZVUeqf68YN30y0SasvXcb0hDWuhO5InBUj9IC1Hhi+UEeWJRJkt61HJTCgFc73u2QTigCPcnCHAKV4qq74ko4FiQrddUblgixW+RzanwP11FtroGOjP5DxLilQwax78ywP4fWVVBTTmB51280IlQuHk4RMsIf4gsBEQA7KZbvgz0Vv+/vkf4KXbQQaG96qaIQJnKfz54dUWmMqrEJWZBse+pbtjFbEhXVYvcZNZEb3XDBHZCi8oLnrQ9cC9M6v++8rV+41CFdF9fI/4YmLUpou5MfGBxHm9ac162c6mp+HbLp7yj++bUHE00mPdIuXkMT7VYU46VJOzVwD95HCnkwNfqBmMBycazyoT/iR9ONs7duTnPWRim0lqJQ3PXoQgjllvffsaphM56ahguSi2WdGQo0VQIFDQEjBMXWxCOhLqpAuXxq5tlSEwk+fe1blcLIYfsJIF/IFNFRIm6/dldUFNDSqC3jGQ+rtyNCjka2GywiLdYplgjK2g7eaOfccVrxmgI6zrWvbDA/zIAWT1vpuzw7bF3ZKnneFesDwD6j0Ih01Bicl8/iCFx1uMj35R2wUqBI4Ay4NDhsHzvqUgbkfB+7kkccCinwU5vdJgK+Kmf4Q+gsJ+Of0D/wysdXq6860eO+N146mxkJ84h7bdPiIz0wgEzUDwYaxUVZgiZeIV0AViPakdt8iCNr+8DDjy0GsJfP3cJ9iR3H2Wgdsr2xFvNlsomEEgd1v7vJRbgjwODElITSXleBQmE4lGxEusnJlnfcVCvEbVDyJcK11L9hrip+P3lW6ZB5svPLdzxUNQ6albjZla3sQDX/XFUpxQeN9C1Zk1CxQ8UB5hIKxL4kvhfH8wIzQp6zUdQOlGC4y03B9gdogexiPlM2y4getFsV1KhpSbEt4n+uaEmqKoQKWhYNLnVqEDJkMQodzZ+GtBDz555NDk/7SFRrDiU/xB01H5LYQdEeaWYJVdh7CNwOrsZECNbAXLoN0Y52ozufnoPXQiRi43psxUVuvfN8ADdWdK9RyG3NVKx3czKG3W4fgzrb86TN7dltySnSNQ+j5kHvzZQhvISrwGb/zqWcIbELKc1lKcFMcKVYmHA+HwT4YinI9azxj/j8D+vSKTVFJQj74lYjAwlBqdDC2RYmejpvZdEdYJ9O6EyJjxTvXElJneSlL+oA' , 161) [ RunTime:0.081120s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.081300s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079201s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639274655 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.079148s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080551s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078207s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086773s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079287s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.081319s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'S' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.087201s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('S' , 2 , 1) [ RunTime:0.081661s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.080578s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 3 WHERE `spec_value` = 'M' AND `goods_id` = 2 [ RunTime:0.082777s ] +--------------------------------------------------------------- + +[2021-12-12T10:04:17+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.102793s] [吞吐率:0.91req/s] [内存消耗:4,758.65kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.157514s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087255s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084828s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084769s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.083847s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086573s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.084963s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.084832s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.087549s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.082782s ] +--------------------------------------------------------------- + +[2021-12-12T10:04:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.710987s] [吞吐率:0.58req/s] [内存消耗:4,781.00kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129594s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086423s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090452s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086062s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.086551s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084007s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082187s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085032s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082823s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.088074s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.082266s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083936s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.083361s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.083836s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.082211s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.087820s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.089384s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.082872s ] +--------------------------------------------------------------- + +[2021-12-12T10:05:12+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:4.202452s] [吞吐率:0.24req/s] [内存消耗:4,681.65kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3695', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryIqzFb5XXBQ9RX0j7', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '3', + ), + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => 'fdb94bf9a266d5789dbd74438247d244', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.141743s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088576s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086586s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087772s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.090256s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.087099s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639274709) [ RunTime:0.085017s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.086853s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('2005ada7U+5HA+WpR18Z6fc/w92FGTEgtn77efuVx4XWCN29v/JeTU79nktwCPMAKhJyrW4n3gj6ee/AVtvDgiSSULzk6PW074vSScpxAd4ruJ0ro0fO9XdMfzVH7sUCjOAk/OC7j62znD4A7yirFaHhvsOhe6aMKI34/GshGiYWtdTQNEBI7LY6cqgDqve5bS7EBfMeVPLUkrR9P58sKh/nC1t6lCUaKgzQzfySu2S8BCqESGsz+y8iJfH+Z7zj7i22/GOn4juen/8S3VrlxsolST/06+E7S/kj986Uy2oz0EgeQ+WtyviV2E4SuCXpBE1yg60mUo3BPHbxVA6vudBY+3LKJj+s5GNSbow047f23xa7D1NM+Gdrn9FqO+LDXiiCz5i5njaXT5WqHCtyV9GPq6T2eHxJHtuQJYzIl+lFbrMIiyyXMYyM7jwAm//prJ/Jfc47S9Ad+F/EC3CPReXSnRPgwmF0tyG+au6dV8Q/K5W0mqOdS1pnAaqLomdiZingNwJxabI17E9yiaasdOKwqMu5EheXG+Sa4CEfq5uQ8Bi+d9lPaZ4lZZg5EgD9DvSJX+irDwQqQpyFJ6+NChJDTI7AW3WaaOeSyS3KxB3C96FJhSbijSTPn3IjKJMh7IlQUMLROZCc1aOuO/ktA98jcyyV3DRuALlNkOLJSD3J8A4wP+NmN/cGTbFQhr4qSkadJa4+HnPW+UsTkxlj0A1F34JwD++ccSENQicZsJeMUlF3C5qDK4JRLQzqPf/rbtAl93kV/ChlO5ZzuLD0PJ+yRo9C2wI2zXWmg2w/3/1aT3M3IAqA3s0JporHuAALPFQXEeInEvg+X7U7t+088qPn2iZhFqSoQIUAGCIcT9X0mC2GdJWvhyAUw3fKdRtEwwNe6G0nqiXun4rpqmJEo7gkJCARxxbM2+aIA7BaP82ur/k2RjDJq7IakGJZrPp2rauBTsb1gsHA38vDIuP183tS7YJ6FtbEl16aX+jcWWlqggQ5RGzo81aMtV+OZHAdXTUZ6yN2qn+x4VxlCF/kougjLPgRf/IJdcVxWTdlt3MMIzFq+gT5b7f06/NBIqwVsQE1+6lylXE2POMGEvzx1oVrDqPLKutwtCk4VrIKIBLlM/ChpDnU8oufxxR77gBFvBVu9+oiO5AUVN1BNlSfwqoRkfPfG3YeNXAJk0GnJ2P8dUwhL6GD32sI2T80Y3i26of/KbXSvLSYD80Lv2V5dFSQSoteckpPi+C+ygszZjtG0hzZ87ObTNLhTEiVvnEYWxrFl+kAQOKi8tXa6RjaSXSV/syo13cuMT3HC+HiR+xqSn8hAjZIPgGbygjIyx+EjlwT6j+pqukJBPMxFdCeNcIV7qBHNi/cbMxv7LJBO/0QfFJoDI612LgD9qWWIY/WZYnf2NMPLA1mImVVm/OFL5Rc8V8OeEd7rOVR6mH7rcsp4nzsOvsD3Dm1PyovSJsrRvIfT9TzajqUwqonOjHzdIwE7H17ovhucN1TL4LtDf/3PokdYzR8' , 162) [ RunTime:0.085706s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.091255s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088905s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639274710 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.084010s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085009s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084347s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.224841s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.218202s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.262087s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'S' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.177445s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 1 WHERE `spec_value` = 'S' AND `goods_id` = 2 [ RunTime:0.294917s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.170174s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 3 WHERE `spec_value` = 'M' AND `goods_id` = 2 [ RunTime:0.206188s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'L' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.084433s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('L' , 2 , 0) [ RunTime:0.086276s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XL' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.088633s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('XL' , 2 , 0) [ RunTime:0.085324s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XXL' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.088176s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('XXL' , 2 , 0) [ RunTime:0.088841s ] +--------------------------------------------------------------- + +[2021-12-12T10:05:14+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.100129s] [吞吐率:0.91req/s] [内存消耗:4,758.65kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122569s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083703s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080505s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081356s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.080890s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.081114s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.080443s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.091160s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.080275s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.080751s ] +--------------------------------------------------------------- + +[2021-12-12T10:05:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.711641s] [吞吐率:0.58req/s] [内存消耗:4,781.00kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128114s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085331s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084720s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085510s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.089944s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085727s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087531s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085238s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083926s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.086170s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.084854s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084705s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.084500s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.083474s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.082230s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.085432s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.082342s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.082686s ] +--------------------------------------------------------------- + +[2021-12-12T10:06:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.734142s] [吞吐率:0.58req/s] [内存消耗:5,064.80kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126815s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086627s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082503s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084289s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.084097s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.082916s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084955s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083784s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081897s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.081775s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.080609s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082264s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.079641s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.083157s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.081819s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.083912s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.080344s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.080120s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080836s ] +--------------------------------------------------------------- + +[2021-12-12T10:06:50+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:2.788613s] [吞吐率:0.36req/s] [内存消耗:4,681.65kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3695', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarybnCLesj4nRRPlWMQ', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '3', + ), + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '4', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => '33a50d17e184a465b4b02164609fde93', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133045s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090870s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085035s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086417s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.084169s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.088067s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639274807) [ RunTime:0.084441s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.085194s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('dc34e407d759jrE3e7lfQrUa/PfLIRpMDZuIHVkxxZE02sBlxPdaxz+XR8l9IxJfB3nfd0UsCfrN2pEHg7noiCIdLTnvMtDxVLL+6I+5NmnAqJX0QVycedpbSlxOZ2GPgy4w/GPP7H+2Id2eOdE6XAysIyYTyzDSv+vUBBzvoCvAt/ouu8gHdGiRDWWI9Ugh7vnNPvf0ZZv/FK1bGcFY1TqDwQ0o5ghH+UwdE0Cam1PTrDtOvPoUvnzsrpx0mw8ehGPQ24zotM9UmHzpAINNq0m4nN4mKQI66p7y/0pxsiB4m+g6T03MjNMWyT1yfaTdC67WHsH79X+6Wg/LP8HLiqzmH6SyHQWdY9v4ndzArdOSEqZUK+MPMdoBL2Y8H9DeDcQsG2sbQlEypIrJ/Bb3PazGYlE3SGG4Kx7vB12h81ASfoI1+C5HryDWoElU3iqtvEgvG1sbZwFj+iNYFBOTJdX9oCXEv7m36OkcwEGPp1zmm9umjdc+BtwpBK4E6d157P5Tzctn5YEBDViNJGoffvNZMXIN3iXqEIGQy5Nqjygs8Xzxctwhn2OW1TxbI0c2dJkvzfZyMbCCclYjQ2ywc/W/noowaAYXlAjIsIeir1SpMA2F0WJFM2Cgs1bZe43NHLAIuXq/5KRGk9nmXC7jomg7dW8HFWLRsGgLiwpXkuNR9xJWK1K77ALSv+N/f9dMFOI6uc1gzWA8KcOMvoMH6r2E41kfLvFRvUoTbLgmsJQk1N6oc8YjfYsJRXuHZehZIW+VTDIp47qtYX7Fuu7a1N+7PaLZXqUw/lyLx+K0OzGJI0FL2Rht9SfChI4ezOzv5Loa2JobSmJGbVp87A9xv8RCSszfdhfgIJlwIkcjc7TJdqMT7vQYac9ujpujBadA+xYbF8n0KUZ1+l2fA2TPCk53fkdD1w6G9gdrqYbWPyVFSEKiGmDaQ8AvH4ROZvKT3zezveMD+jL7PB9xGodo9qg+8LfqJZHT9kJkzTLsHgV5I0FqqRjTH7bQnmMIFO1eZ0N/2nqEOA7qf+vSY0QMe3i8tOk2Ye7gXgHyv1Frb5MneF/2259tEaIS9ViMIKoogm0ooWY6j2086rKBHNPgGG/e8uJTR2rfXTfi6nznprNOyf7c4ZK2bm8r1pWFgx4CL/zbcDfxB/hfmMpwduhYNWK79nAqsrmpYxa6OzMCqJ2fI6yEXEu/W9XgC31zhitlby50lwJiOOS169yrAqlxpekjktzoahtg5AWKir/H6Ph6FJmOg8Md/j18TA7v3k0upisH/dvlA/phUEWNZ48rEaBFKt0ULgkEtRxiA3/Bxor/j99I4Rz6jc1FDfhFl5LnAFjc6846D+ccG1wZU42fTpChTfgNpMin7sp1VxNQMb0XT7t8oREYgcRN7V+7iMrNbjqaySNa0jRFVpTap9YhmmQLYyWRM78UCuSHBEFISznYXxxb2+MtH5//RL7z/geGlkbS6pVZx16Jo3FnLgrBlpW3qERRnyceeYTwqArTgBIbDLZJBzIF' , 163) [ RunTime:0.083108s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084931s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083094s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639274808 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.082609s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084966s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082055s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082209s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081642s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.086839s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'S' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.085331s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 1 WHERE `spec_value` = 'S' AND `goods_id` = 2 [ RunTime:0.083104s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.084280s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 3 WHERE `spec_value` = 'M' AND `goods_id` = 2 [ RunTime:0.086927s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'L' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.085995s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 0 WHERE `spec_value` = 'L' AND `goods_id` = 2 [ RunTime:0.084722s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XL' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.085840s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 4 WHERE `spec_value` = 'XL' AND `goods_id` = 2 [ RunTime:0.085382s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XXL' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.084900s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 0 WHERE `spec_value` = 'XXL' AND `goods_id` = 2 [ RunTime:0.084847s ] +--------------------------------------------------------------- + +[2021-12-12T10:06:51+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:0.993285s] [吞吐率:1.01req/s] [内存消耗:4,758.65kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125831s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085888s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092519s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082871s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.087083s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.082975s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.081715s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.082958s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.082772s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.086016s ] +--------------------------------------------------------------- + +[2021-12-12T10:06:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.695005s] [吞吐率:0.59req/s] [内存消耗:4,781.00kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135290s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086848s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085053s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087378s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.085429s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088117s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094050s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088346s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088484s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.088449s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.087850s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087826s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.087022s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.087278s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.085961s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.087975s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.087880s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.087652s ] +--------------------------------------------------------------- + +[2021-12-12T10:07:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.744327s] [吞吐率:0.57req/s] [内存消耗:5,064.80kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127013s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087241s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084922s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.083809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084647s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082925s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083960s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081297s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.083639s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.086796s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084344s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.083827s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.087846s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.082083s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.083830s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.087071s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.087522s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083959s ] +--------------------------------------------------------------- + +[2021-12-12T10:07:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:1.757240s] [吞吐率:0.57req/s] [内存消耗:5,064.80kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127341s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084327s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085884s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087393s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.088514s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084647s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084498s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085780s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082372s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085234s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.081032s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086330s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.082592s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.084518s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.089018s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.088421s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.085820s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.084195s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084192s ] +--------------------------------------------------------------- + +[2021-12-12T10:08:14+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/index.html?_pjax=%23pjax-container +[运行时间:0.718507s] [吞吐率:1.39req/s] [内存消耗:4,463.36kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129372s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086593s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085090s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086394s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/index' LIMIT 1 [ RunTime:0.089476s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.084997s ] +[ sql ] [ SQL ] SELECT `id`,`name`,`parent_id` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.082805s ] +--------------------------------------------------------------- + +[2021-12-12T10:08:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/edit/id/1.html?_pjax=%23pjax-container +[运行时间:0.859722s] [吞吐率:1.16req/s] [内存消耗:4,480.69kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/add.html [ array ( + 0 => 'data', + 1 => 'cat_list', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128093s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088764s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086183s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085281s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/edit' LIMIT 1 [ RunTime:0.087905s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.083252s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 1 ) AND `goods_category`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086108s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.085866s ] +--------------------------------------------------------------- + +[2021-12-12T10:08:30+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods_category/edit/id/1.html +[运行时间:1.397664s] [吞吐率:0.72req/s] [内存消耗:4,481.91kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '366', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryrhS25Ch5JqTSsH10', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/edit/id/1.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'parent_id' => '0', + 'name' => '上衣', + '__token__' => '0a5906f7a03ffc3205f2515b6a13fd37', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134178s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094953s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087603s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084015s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/edit' LIMIT 1 [ RunTime:0.084999s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.084252s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品分类' , 'POST' , 'admin/goods_category/edit/id/1.html' , '127.0.0.1' , 1639274909) [ RunTime:0.081559s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.083375s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('ec8c5e98qt4Fqg36xEeTRrEG9iBEFsslRPi9fw6+yfGEIQukqlfTLiB29TJKExSVQYzkD4eD+hbBNSj7HcYrpQWTn3p3g/VHKPcHUoj+GT5hlyOdMmcqs1ZctUcl7P6xGHPLlFFDgI8OrrlWkIFpiYuoW5s6TwZG5l89DJDeXA' , 164) [ RunTime:0.088563s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.083572s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 1 ) AND `goods_category`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086704s ] +[ sql ] [ SQL ] UPDATE `goods_category` SET `parent_id` = 0 , `name` = '上衣' , `update_time` = 1639274910 WHERE ( `id` = 1 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.081403s ] +--------------------------------------------------------------- + +[2021-12-12T10:08:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/index.html?_pjax=%23pjax-container +[运行时间:0.733959s] [吞吐率:1.36req/s] [内存消耗:4,463.35kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130481s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092986s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090845s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091737s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/index' LIMIT 1 [ RunTime:0.087054s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.087870s ] +[ sql ] [ SQL ] SELECT `id`,`name`,`parent_id` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.087713s ] +--------------------------------------------------------------- + +[2021-12-12T10:08:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/edit/id/2.html?_pjax=%23pjax-container +[运行时间:0.811234s] [吞吐率:1.23req/s] [内存消耗:4,480.65kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/add.html [ array ( + 0 => 'data', + 1 => 'cat_list', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131364s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087204s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085810s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087393s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/edit' LIMIT 1 [ RunTime:0.084468s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.088630s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084756s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.088659s ] +--------------------------------------------------------------- + +[2021-12-12T10:08:45+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods_category/edit/id/2.html +[运行时间:1.348229s] [吞吐率:0.74req/s] [内存消耗:4,481.91kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '364', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryIBsHIMX1cZgVsWIx', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'parent_id' => '1', + 'name' => 'T恤', + '__token__' => '6367cb43a09825262f32e94578eae782', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125590s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083125s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083710s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089113s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/edit' LIMIT 1 [ RunTime:0.081526s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.081747s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品分类' , 'POST' , 'admin/goods_category/edit/id/2.html' , '127.0.0.1' , 1639274924) [ RunTime:0.087865s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.083197s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('2ada1f80ymFvkKfF2WAkBsm4vu6Gl6Yu3T/wRRXJGjfgWHaQavgkWaBS7YCkh4nPa2hHJwCQsP4QoJqm3kE0z28TOED/SCf9Gfr+NexwSD66oSlK8R700rqOYtEnBjCjg4tXRyNfyY2lmj46s95i4zcmHAvsPZ4t+g0' , 165) [ RunTime:0.080603s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.082537s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080676s ] +[ sql ] [ SQL ] UPDATE `goods_category` SET `parent_id` = 1 , `name` = 'T恤' , `update_time` = 1639274925 WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.080106s ] +--------------------------------------------------------------- + +[2021-12-12T10:08:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/index.html?_pjax=%23pjax-container +[运行时间:0.703421s] [吞吐率:1.42req/s] [内存消耗:4,464.28kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126691s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084040s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082208s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082197s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/index' LIMIT 1 [ RunTime:0.085731s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.081049s ] +[ sql ] [ SQL ] SELECT `id`,`name`,`parent_id` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.084713s ] +--------------------------------------------------------------- + +[2021-12-12T10:08:49+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/edit/id/3.html?_pjax=%23pjax-container +[运行时间:0.797563s] [吞吐率:1.25req/s] [内存消耗:4,481.61kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/add.html [ array ( + 0 => 'data', + 1 => 'cat_list', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127051s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084859s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083545s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087138s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/edit' LIMIT 1 [ RunTime:0.080790s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.084901s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 3 ) AND `goods_category`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082886s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.082234s ] +--------------------------------------------------------------- + +[2021-12-12T10:09:08+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods_category/edit/id/3.html +[运行时间:1.534159s] [吞吐率:0.65req/s] [内存消耗:4,481.91kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '366', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryGsydEurA0s2sajMO', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/edit/id/3.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'parent_id' => '1', + 'name' => '毛衣', + '__token__' => '2d794ce10979b72c78ba52168a14292c', + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132435s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.111694s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084916s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085313s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/edit' LIMIT 1 [ RunTime:0.084989s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.086269s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品分类' , 'POST' , 'admin/goods_category/edit/id/3.html' , '127.0.0.1' , 1639274947) [ RunTime:0.092214s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.127277s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('9963a1e1Zy+cgA3ruTEsm8Kg9JX3+JOF9c4s0gTwghHj32WRw6EgTjF8rsXVuD+h4KNMyX5A/9p7OOyk//C727R02nDeBANKEIteDXwMD0hcL2Gx8b8LteOzphsD9hLevYAkN7gDZAKV8rARrMBXDTmjINbaFonTFJkOHuN3eA' , 166) [ RunTime:0.083180s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.085294s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 3 ) AND `goods_category`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085417s ] +[ sql ] [ SQL ] UPDATE `goods_category` SET `parent_id` = 1 , `name` = '毛衣' , `update_time` = 1639274948 WHERE ( `id` = 3 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.086295s ] +--------------------------------------------------------------- + +[2021-12-12T10:09:09+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/index.html?_pjax=%23pjax-container +[运行时间:0.752063s] [吞吐率:1.33req/s] [内存消耗:4,464.27kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136080s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090458s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088599s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088096s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/index' LIMIT 1 [ RunTime:0.087198s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.088367s ] +[ sql ] [ SQL ] SELECT `id`,`name`,`parent_id` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.087336s ] +--------------------------------------------------------------- + +[2021-12-12T10:09:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/edit/id/4.html?_pjax=%23pjax-container +[运行时间:0.826773s] [吞吐率:1.21req/s] [内存消耗:4,481.60kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/add.html [ array ( + 0 => 'data', + 1 => 'cat_list', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130576s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085176s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085178s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087688s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/edit' LIMIT 1 [ RunTime:0.086487s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.086471s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 4 ) AND `goods_category`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084926s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.084791s ] +--------------------------------------------------------------- + +[2021-12-12T10:09:21+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods_category/edit/id/4.html +[运行时间:1.372075s] [吞吐率:0.73req/s] [内存消耗:4,481.91kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '366', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXnlfsid1NbbqJRxw', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/edit/id/4.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'parent_id' => '0', + 'name' => '夹克', + '__token__' => 'd08bf249517a24081b97384ebbda40b1', + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131504s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085847s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084393s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084289s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/edit' LIMIT 1 [ RunTime:0.086140s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.083580s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品分类' , 'POST' , 'admin/goods_category/edit/id/4.html' , '127.0.0.1' , 1639274960) [ RunTime:0.080490s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.082780s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('92d2055dXic0/INaQQD8Vgiug41SbG1D5p5BQ1IUcoRr7bGq7hGvm1eWCIQnANdnzlgh/At0GVkfKm2cz84SKB8awqdhiGZhwK1pvFb6MtkLyqaa1NZHMlH4iRZFS2jjMIYZ1kr51TlMbQuyospzyKJ5A4blQQWGl8ojo0LSbA' , 167) [ RunTime:0.081694s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.082718s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 4 ) AND `goods_category`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081067s ] +[ sql ] [ SQL ] UPDATE `goods_category` SET `parent_id` = 0 , `name` = '夹克' , `update_time` = 1639274961 WHERE ( `id` = 4 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.080575s ] +--------------------------------------------------------------- + +[2021-12-12T10:09:22+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/index.html?_pjax=%23pjax-container +[运行时间:0.740698s] [吞吐率:1.35req/s] [内存消耗:4,464.27kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135430s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088766s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087484s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087291s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/index' LIMIT 1 [ RunTime:0.085966s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.087803s ] +[ sql ] [ SQL ] SELECT `id`,`name`,`parent_id` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.087055s ] +--------------------------------------------------------------- + +[2021-12-12T10:09:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:0.961872s] [吞吐率:1.04req/s] [内存消耗:4,758.64kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125756s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083174s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082422s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083090s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.084919s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085937s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.082184s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.081641s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.083692s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.079914s ] +--------------------------------------------------------------- + +[2021-12-12T10:09:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.709778s] [吞吐率:0.58req/s] [内存消耗:4,781.94kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133276s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090110s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090728s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088833s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.087651s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088829s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088875s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.091623s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087245s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.090682s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.087059s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087870s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.087417s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.087529s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.087755s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.088726s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.085379s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.087315s ] +--------------------------------------------------------------- + +[2021-12-12T10:13:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin/slide/index.html?_pjax=%23pjax-container +[运行时间:1.502505s] [吞吐率:0.67req/s] [内存消耗:4,834.67kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/slide/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136440s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087760s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086305s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088819s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/slide/index' LIMIT 1 [ RunTime:0.086293s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `slide` [ RunTime:0.088719s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `slide` WHERE `slide`.`delete_time` = 0 [ RunTime:0.090441s ] +[ sql ] [ SQL ] SELECT * FROM `slide` WHERE `slide`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.088426s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.089035s ] +[ sql ] [ SQL ] SELECT `name` FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086876s ] +[ sql ] [ SQL ] SELECT `name` FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086834s ] +[ sql ] [ SQL ] SELECT `name` FROM `goods` WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087889s ] +--------------------------------------------------------------- + +[2021-12-12T10:15:49+08:00] 127.0.0.1 GET www.dggjimai.com/admin/slide/edit/id/3.html?_pjax=%23pjax-container +[运行时间:0.703806s] [吞吐率:1.42req/s] [内存消耗:4,671.45kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/slide/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/slide/add.html [ array ( + 0 => 'data', + 1 => 'jump_type', + 2 => 'banner_list', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.118990s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.080982s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078868s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.079984s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/slide/edit' LIMIT 1 [ RunTime:0.083238s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `slide` [ RunTime:0.079486s ] +[ sql ] [ SQL ] SELECT * FROM `slide` WHERE ( `id` = 3 ) AND `slide`.`delete_time` = 0 LIMIT 1 [ RunTime:0.076257s ] +--------------------------------------------------------------- + +[2021-12-12T10:28:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/shop_config/website.html?_pjax=%23pjax-container +[运行时间:1.206157s] [吞吐率:0.83req/s] [内存消耗:4,654.66kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/slide/edit/id/3.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/shop_config/website.html [ array ( + 0 => 'config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126619s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085367s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088233s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086186s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.081074s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086948s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.081078s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.081003s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086312s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.080387s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.081254s ] +--------------------------------------------------------------- + +[2021-12-12T10:29:18+08:00] 127.0.0.1 POST www.dggjimai.com/admin/shop_config/website.html +[运行时间:1.466141s] [吞吐率:0.68req/s] [内存消耗:4,364.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1002', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryHRwD093Cm21pXkGz', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/website.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'APPID' => '1', + 'APPSECRET' => '2', + 'img_url' => '3', + 'channel' => '淘宝/天猫,品牌专柜,买手店,代购', + 'size' => 'S,M,L,XL,XXL', + 'size_img' => '/uploads/attachment/20211211/8d2e30097444d1d12e31d668c2962ee9.png', + '__token__' => '70b18281287bb7c1d19da451dcbb040c', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128555s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087197s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083483s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085741s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.082489s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083006s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.087988s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '1' , `update_time` = 1639276157 WHERE `type` = 'website' AND `name` = 'APPID' [ RunTime:0.086158s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.082919s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '2' , `update_time` = 1639276157 WHERE `type` = 'website' AND `name` = 'APPSECRET' [ RunTime:0.085861s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081929s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '3' , `update_time` = 1639276158 WHERE `type` = 'website' AND `name` = 'img_url' [ RunTime:0.082984s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.081478s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = 'S,M,L,XL,XXL' , `update_time` = 1639276158 WHERE `type` = 'website' AND `name` = 'size' [ RunTime:0.083141s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.080204s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '/uploads/attachment/20211211/8d2e30097444d1d12e31d668c2962ee9.png' , `update_time` = 1639276158 WHERE `type` = 'website' AND `name` = 'size_img' [ RunTime:0.083135s ] +--------------------------------------------------------------- + +[2021-12-12T10:29:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/shop_config/website.html?_pjax=%23pjax-container +[运行时间:0.994254s] [吞吐率:1.01req/s] [内存消耗:4,490.59kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/website.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/shop_config/website.html [ array ( + 0 => 'config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122601s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084332s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080217s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082217s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.080345s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.081816s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.080123s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.080161s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085182s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.080718s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.081466s ] +--------------------------------------------------------------- + +[2021-12-12T10:30:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/shop_config/website.html +[运行时间:1.489309s] [吞吐率:0.67req/s] [内存消耗:4,525.43kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/shop_config/website.html [ array ( + 0 => 'config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123433s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083648s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081469s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082290s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.081289s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.080840s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.080674s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.079233s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084350s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.083575s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.081600s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'channel' LIMIT 1 [ RunTime:0.083267s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081170s ] +--------------------------------------------------------------- + +[2021-12-12T10:30:25+08:00] 127.0.0.1 POST www.dggjimai.com/admin/shop_config/website.html +[运行时间:1.672267s] [吞吐率:0.60req/s] [内存消耗:4,365.45kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1002', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryzUeVJGl1ks1wgaqe', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/website.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'APPID' => '1', + 'APPSECRET' => '2', + 'img_url' => '3', + 'channel' => '淘宝/天猫,品牌专柜,买手店,代购', + 'size' => 'S,M,L,XL,XXL', + 'size_img' => '/uploads/attachment/20211211/8d2e30097444d1d12e31d668c2962ee9.png', + '__token__' => '1a0e00c311cef1234fe556962b385166', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127379s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086449s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082663s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089018s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.088733s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084684s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.082980s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '1' , `update_time` = 1639276224 WHERE `type` = 'website' AND `name` = 'APPID' [ RunTime:0.085116s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.081873s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '2' , `update_time` = 1639276224 WHERE `type` = 'website' AND `name` = 'APPSECRET' [ RunTime:0.084956s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082984s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '3' , `update_time` = 1639276224 WHERE `type` = 'website' AND `name` = 'img_url' [ RunTime:0.085796s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.083311s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = 'S,M,L,XL,XXL' , `update_time` = 1639276224 WHERE `type` = 'website' AND `name` = 'size' [ RunTime:0.085122s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.082974s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '/uploads/attachment/20211211/8d2e30097444d1d12e31d668c2962ee9.png' , `update_time` = 1639276224 WHERE `type` = 'website' AND `name` = 'size_img' [ RunTime:0.084376s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'channel' LIMIT 1 [ RunTime:0.081749s ] +[ sql ] [ SQL ] INSERT INTO `shop_config` (`type` , `name` , `value`) VALUES ('website' , 'channel' , '淘宝/天猫,品牌专柜,买手店,代购') [ RunTime:0.091104s ] +--------------------------------------------------------------- + +[2021-12-12T10:30:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/shop_config/website.html?_pjax=%23pjax-container +[运行时间:1.116050s] [吞吐率:0.90req/s] [内存消耗:4,491.23kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/website.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/shop_config/website.html [ array ( + 0 => 'config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128892s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087446s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083504s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087089s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.083557s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088084s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.083746s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.081658s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083146s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.081934s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.081615s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'channel' LIMIT 1 [ RunTime:0.081833s ] +--------------------------------------------------------------- + +[2021-12-12T10:30:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/shop_config/website.html +[运行时间:1.251207s] [吞吐率:0.80req/s] [内存消耗:4,525.51kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/shop_config/website.html [ array ( + 0 => 'config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133275s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089191s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086888s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093198s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.087161s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088171s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.088577s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.086474s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088001s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.088005s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.087118s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'channel' LIMIT 1 [ RunTime:0.087799s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085963s ] +--------------------------------------------------------------- + +[2021-12-12T10:31:04+08:00] 127.0.0.1 POST www.dggjimai.com/admin/shop_config/website.html +[运行时间:1.771832s] [吞吐率:0.56req/s] [内存消耗:4,366.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1002', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryH9R2BtNq9Orrqfsj', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/website.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'APPID' => '1', + 'APPSECRET' => '2', + 'img_url' => '3', + 'channel' => '淘宝/天猫,品牌专柜,买手店,代购', + 'size' => 'S,M,L,XL,XXL', + 'size_img' => '/uploads/attachment/20211211/8d2e30097444d1d12e31d668c2962ee9.png', + '__token__' => '4e4f3e6e4e73aa6449033a31cedd9b60', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132329s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085806s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083697s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088017s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.084670s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085094s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.083551s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '1' , `update_time` = 1639276262 WHERE `type` = 'website' AND `name` = 'APPID' [ RunTime:0.086849s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.083208s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '2' , `update_time` = 1639276263 WHERE `type` = 'website' AND `name` = 'APPSECRET' [ RunTime:0.085807s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083843s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '3' , `update_time` = 1639276263 WHERE `type` = 'website' AND `name` = 'img_url' [ RunTime:0.088433s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.165368s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = 'S,M,L,XL,XXL' , `update_time` = 1639276263 WHERE `type` = 'website' AND `name` = 'size' [ RunTime:0.087448s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.082840s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '/uploads/attachment/20211211/8d2e30097444d1d12e31d668c2962ee9.png' , `update_time` = 1639276263 WHERE `type` = 'website' AND `name` = 'size_img' [ RunTime:0.086070s ] +[ sql ] [ SQL ] SELECT * FROM `shop_config` WHERE `type` = 'website' AND `name` = 'channel' LIMIT 1 [ RunTime:0.083737s ] +[ sql ] [ SQL ] UPDATE `shop_config` SET `value` = '淘宝/天猫,品牌专柜,买手店,代购' , `update_time` = 1639276263 WHERE `type` = 'website' AND `name` = 'channel' [ RunTime:0.094190s ] +--------------------------------------------------------------- + +[2021-12-12T10:31:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/shop_config/website.html?_pjax=%23pjax-container +[运行时间:1.156142s] [吞吐率:0.86req/s] [内存消耗:4,491.23kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/website.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/shop_config/website.html [ array ( + 0 => 'config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131774s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085641s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086618s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085815s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.089271s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086157s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.084850s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.085731s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.090014s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.085372s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.084667s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'channel' LIMIT 1 [ RunTime:0.087349s ] +--------------------------------------------------------------- + +[2021-12-12T12:28:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_role/index.html?_pjax=%23pjax-container +[运行时间:1.216784s] [吞吐率:0.82req/s] [内存消耗:4,571.10kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/website.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_role/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.143351s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092856s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096866s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095982s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_role/index' LIMIT 1 [ RunTime:0.091300s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_role` [ RunTime:0.094261s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `admin_role` [ RunTime:0.090850s ] +[ sql ] [ SQL ] SELECT * FROM `admin_role` ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.090621s ] +--------------------------------------------------------------- + +[2021-12-12T12:28:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.701577s] [吞吐率:1.43req/s] [内存消耗:4,577.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_role/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135171s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085885s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084775s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091325s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.084088s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084238s ] +--------------------------------------------------------------- + +[2021-12-12T12:28:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/add.html?_pjax=%23pjax-container +[运行时间:0.647943s] [吞吐率:1.54req/s] [内存消耗:4,507.09kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/add.html [ array ( + 0 => 'parents', + 1 => 'log_method', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133698s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088338s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084994s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084639s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/add' LIMIT 1 [ RunTime:0.083457s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083082s ] +--------------------------------------------------------------- + +[2021-12-12T12:28:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.816921s] [吞吐率:1.22req/s] [内存消耗:4,577.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131968s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087492s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089055s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088971s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.085318s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090153s ] +--------------------------------------------------------------- + +[2021-12-12T12:28:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html +[运行时间:0.957293s] [吞吐率:1.04req/s] [内存消耗:4,588.94kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132517s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083928s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080832s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084551s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.081175s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081814s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081149s ] +--------------------------------------------------------------- + +[2021-12-12T12:28:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/add.html?_pjax=%23pjax-container +[运行时间:0.640728s] [吞吐率:1.56req/s] [内存消耗:4,507.09kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/add.html [ array ( + 0 => 'parents', + 1 => 'log_method', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131558s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089694s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084713s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086740s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/add' LIMIT 1 [ RunTime:0.090381s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085271s ] +--------------------------------------------------------------- + +[2021-12-12T12:29:26+08:00] 127.0.0.1 POST www.dggjimai.com/admin/admin_menu/add.html +[运行时间:1.991946s] [吞吐率:0.50req/s] [内存消耗:4,467.95kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1068', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBqMdFMzJePGe33X8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'parent_id' => '0', + 'name' => '订单模块', + 'url' => 'admin/order/module', + 'icon' => 'fa-list', + 'sort_id' => '1000', + 'is_show' => '1', + 'log_method' => '不记录', + 'is_more' => '0', + 'more_name' => '', + '__token__' => '50758ef5b0b22b314d1e6ac68a118c4c', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.165869s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.544739s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089730s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088737s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/add' LIMIT 1 [ RunTime:0.092736s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.090542s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '添加菜单' , 'POST' , 'admin/admin_menu/add.html' , '127.0.0.1' , 1639283365) [ RunTime:0.090081s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.090931s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('78b6280cI0SPTjJ26+gTreEV35AMrAaYX1xSc0IbUXZez1dbaR8/AW8YW7q+cGfJXhe3qIUoCniB8vG/jE4/HPYdDv1oXcJFaQaF8Og8SuQ6FsZxlqHBwTvlEdLknpnfyt/cYyOWq/gx1O7CT8aWfDgBFOMI4kyzEqiwW/LVt2M8rNgoishBzcpQr1Hv0DjiNneo3Vvs3PE0m2c1jLgFfounKlMcRV7ByfQhenRGvkC2RbHRl4PYa/0nwCr0t94fW3maImKro6vwxLBKS9/zLgY81Ej7vuOZypus6FMPT+avi5N/tCbhZzc9dJUtvuu0u4EhDJJMCJcKpdlNCtOJ29+iyPs73IwtNq0fyUNe' , 168) [ RunTime:0.093551s ] +[ sql ] [ SQL ] SELECT `id` FROM `admin_menu` WHERE `url` = 'admin/order/module' LIMIT 1 [ RunTime:0.086947s ] +[ sql ] [ SQL ] INSERT INTO `admin_menu` (`parent_id` , `name` , `url` , `icon` , `sort_id` , `is_show` , `log_method`) VALUES (0 , '订单模块' , 'admin/order/module' , 'fa-list' , 1000 , 1 , '不记录') [ RunTime:0.085854s ] +--------------------------------------------------------------- + +[2021-12-12T12:29:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.695590s] [吞吐率:1.44req/s] [内存消耗:4,582.11kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132714s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090992s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086153s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088690s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.086512s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.097342s ] +--------------------------------------------------------------- + +[2021-12-12T12:29:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/edit/id/58.html?_pjax=%23pjax-container +[运行时间:0.979301s] [吞吐率:1.02req/s] [内存消耗:4,493.92kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '58', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/add.html [ array ( + 0 => 'data', + 1 => 'parents', + 2 => 'log_method', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132916s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089707s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084206s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086713s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/edit' LIMIT 1 [ RunTime:0.089789s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `id` = 58 LIMIT 1 [ RunTime:0.083582s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.326421s ] +--------------------------------------------------------------- + +[2021-12-12T12:29:42+08:00] 127.0.0.1 POST www.dggjimai.com/admin/admin_menu/edit/id/58.html +[运行时间:1.557392s] [吞吐率:0.64req/s] [内存消耗:4,464.81kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '878', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryM0xrBlieDrgJmccM', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/edit/id/58.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'parent_id' => '131', + 'name' => '订单管理', + 'url' => 'admin/order/index', + 'icon' => 'fa-list', + 'sort_id' => '1000', + 'is_show' => '1', + 'log_method' => '不记录', + '__token__' => '58846853ef3e2d611fd45704a3bb7985', + 'id' => '58', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.142046s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090748s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088714s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095660s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/edit' LIMIT 1 [ RunTime:0.088966s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.091598s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改菜单' , 'POST' , 'admin/admin_menu/edit/id/58.html' , '127.0.0.1' , 1639283381) [ RunTime:0.088639s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.090811s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('717955b76BxT05kygMS3Dng7s8jKoFlqwZGlHOfzO8KosgzRR5veRup8F9nP0kMk8jyKlggQehKKycitjZoU1yPJSM7nmJBlJXj/+yaC0sQbAyx+Na4drjwDuyQtkxRL/ues9HEgFCrELlOub2hZxNqOo7tvLVrT5n+IvY607ROhL+MRjqf7qhIR2QbK5jUlEZUizNwDdHwiTFnutAZhAy2PTDFs2APkACZAWo0sa8jThsYE+1DTegsj7eZa5CWJutCAmhuU23wQK2tORkL1NCPX05UEhNWf4LTZYyg9g0Eu9ng2hi5+harbInZvRI+ggaCq4TH2GRu6iyxt' , 169) [ RunTime:0.088790s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `id` = 58 LIMIT 1 [ RunTime:0.094022s ] +[ sql ] [ SQL ] SELECT `id` FROM `admin_menu` WHERE `url` = 'admin/order/index' AND `id` <> 58 LIMIT 1 [ RunTime:0.090571s ] +[ sql ] [ SQL ] UPDATE `admin_menu` SET `parent_id` = 131 WHERE `id` = 58 [ RunTime:0.091254s ] +--------------------------------------------------------------- + +[2021-12-12T12:29:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.685805s] [吞吐率:1.46req/s] [内存消耗:4,582.11kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132872s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088326s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090447s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087737s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.089870s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090880s ] +--------------------------------------------------------------- + +[2021-12-12T12:29:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/index.html?_pjax=%23pjax-container +[运行时间:0.618048s] [吞吐率:1.62req/s] [内存消耗:4,432.61kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/index.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136856s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089427s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086776s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088472s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/index' LIMIT 1 [ RunTime:0.088455s ] +--------------------------------------------------------------- + +[2021-12-12T12:29:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/add.html?_pjax=%23pjax-container +[运行时间:0.746514s] [吞吐率:1.34req/s] [内存消耗:4,728.25kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/generate/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/add.html [ array ( + 0 => 'table', + 1 => 'menus', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130853s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087770s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085087s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087054s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/add' LIMIT 1 [ RunTime:0.083992s ] +[ sql ] [ SQL ] SHOW TABLES [ RunTime:0.084754s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085344s ] +--------------------------------------------------------------- + +[2021-12-12T12:29:58+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/getField +[运行时间:0.793208s] [吞吐率:1.26req/s] [内存消耗:4,601.95kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '22', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => 'consignment_order', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.142050s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.121732s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091975s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.094526s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/getfield' LIMIT 1 [ RunTime:0.092078s ] +[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `consignment_order` [ RunTime:0.092475s ] +[ sql ] [ SQL ] SHOW TABLE STATUS LIKE 'consignment_order' [ RunTime:0.089780s ] +--------------------------------------------------------------- + +[2021-12-12T12:30:52+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/create +[运行时间:1.965925s] [吞吐率:0.51req/s] [内存消耗:4,773.81kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '32964', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryzblQaq0Wy88nQ6TL', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'table_name' => 'consignment_order', + 'cn_name' => '寄卖订单', + 'auto_class_name' => '1', + 'list_delete' => '1', + 'list_create' => '1', + 'list_refresh' => '1', + 'create_menu' => '131', + 'create_menu_list' => + array ( + 0 => '2', + 1 => '3', + 2 => '4', + ), + 'create_controller' => '1', + 'controller_name' => 'ConsignmentOrder', + 'controller_action_list' => + array ( + 0 => '1', + 1 => '2', + 2 => '3', + 3 => '4', + ), + 'create_model' => '1', + 'model_name' => 'ConsignmentOrder', + 'auto_timestamp' => '1', + 'soft_delete' => '1', + 'create_validate' => '1', + 'validate_name' => 'ConsignmentOrder', + 'field_name' => + array ( + 2 => + array ( + 0 => 'id', + ), + 3 => + array ( + 0 => 'order_sn', + ), + 4 => + array ( + 0 => 'user_id', + ), + 5 => + array ( + 0 => 'order_status', + ), + 6 => + array ( + 0 => 'is_return', + ), + 7 => + array ( + 0 => 'consignee', + ), + 8 => + array ( + 0 => 'address', + ), + 9 => + array ( + 0 => 'mobile', + ), + 10 => + array ( + 0 => 'th_consignee', + ), + 11 => + array ( + 0 => 'th_address', + ), + 12 => + array ( + 0 => 'th_mobile', + ), + 13 => + array ( + 0 => 'goods_price', + ), + 14 => + array ( + 0 => 'cancel_time', + ), + 15 => + array ( + 0 => 'create_time', + ), + 16 => + array ( + 0 => 'update_time', + ), + ), + 'field_type' => + array ( + 2 => + array ( + 0 => 'int(10)', + ), + 3 => + array ( + 0 => 'varchar(20)', + ), + 4 => + array ( + 0 => 'int(8) unsigned', + ), + 5 => + array ( + 0 => 'tinyint(1) unsigned', + ), + 6 => + array ( + 0 => 'tinyint(1)', + ), + 7 => + array ( + 0 => 'varchar(60)', + ), + 8 => + array ( + 0 => 'varchar(255)', + ), + 9 => + array ( + 0 => 'varchar(60)', + ), + 10 => + array ( + 0 => 'varchar(60)', + ), + 11 => + array ( + 0 => 'varchar(255)', + ), + 12 => + array ( + 0 => 'int(60)', + ), + 13 => + array ( + 0 => 'decimal(10,2)', + ), + 14 => + array ( + 0 => 'int(10)', + ), + 15 => + array ( + 0 => 'int(10) unsigned', + ), + 16 => + array ( + 0 => 'int(10) unsigned', + ), + ), + 'form_name' => + array ( + 2 => + array ( + 0 => 'ID', + ), + 3 => + array ( + 0 => '订单编号', + ), + 4 => + array ( + 0 => '用户id', + ), + 5 => + array ( + 0 => '订单状态;0-审核中;1-待上架;2-已上架;3-已取消', + ), + 6 => + array ( + 0 => '是否退回', + ), + 7 => + array ( + 0 => '收货人', + ), + 8 => + array ( + 0 => '地址', + ), + 9 => + array ( + 0 => '手机', + ), + 10 => + array ( + 0 => '退回收货人', + ), + 11 => + array ( + 0 => '退回地址', + ), + 12 => + array ( + 0 => '退回电话', + ), + 13 => + array ( + 0 => '订单商品总价', + ), + 14 => + array ( + 0 => '订单取消时间', + ), + 15 => + array ( + 0 => '下单时间', + ), + 16 => + array ( + 0 => '更新时间', + ), + ), + 'form_type' => + array ( + 2 => + array ( + 0 => 'number', + ), + 3 => + array ( + 0 => 'text', + ), + 4 => + array ( + 0 => 'select', + ), + 5 => + array ( + 0 => 'text', + ), + 6 => + array ( + 0 => 'switch', + ), + 7 => + array ( + 0 => 'text', + ), + 8 => + array ( + 0 => 'text', + ), + 9 => + array ( + 0 => 'mobile', + ), + 10 => + array ( + 0 => 'text', + ), + 11 => + array ( + 0 => 'text', + ), + 12 => + array ( + 0 => 'text', + ), + 13 => + array ( + 0 => 'number', + ), + 14 => + array ( + 0 => 'datetime', + ), + 15 => + array ( + 0 => 'datetime', + ), + 16 => + array ( + 0 => 'datetime', + ), + ), + 'form_validate' => + array ( + 2 => + array ( + 0 => 'required', + ), + 3 => + array ( + 0 => 'required', + ), + 4 => + array ( + 0 => 'required', + ), + 5 => + array ( + 0 => 'required', + ), + 6 => + array ( + 0 => 'required', + ), + 7 => + array ( + 0 => 'required', + ), + 8 => + array ( + 0 => 'required', + ), + 9 => + array ( + 0 => 'required', + ), + 10 => + array ( + 0 => 'required', + ), + 11 => + array ( + 0 => 'required', + ), + 12 => + array ( + 0 => 'required', + ), + 13 => + array ( + 0 => 'required', + ), + 14 => + array ( + 0 => 'required', + ), + 15 => + array ( + 0 => 'required', + ), + 16 => + array ( + 0 => 'required', + ), + ), + 'field_default' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '0', + ), + 5 => + array ( + 0 => '0', + ), + 6 => + array ( + 0 => '0', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + 12 => + array ( + 0 => '', + ), + 13 => + array ( + 0 => '0.00', + ), + 14 => + array ( + 0 => '', + ), + 15 => + array ( + 0 => '', + ), + 16 => + array ( + 0 => '', + ), + ), + 'getter_setter' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => 'switch', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + 12 => + array ( + 0 => '', + ), + 13 => + array ( + 0 => '', + ), + 14 => + array ( + 0 => 'datetime', + ), + 15 => + array ( + 0 => '', + ), + 16 => + array ( + 0 => '', + ), + ), + 'is_relation' => + array ( + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + 5 => + array ( + 0 => '0', + ), + 6 => + array ( + 0 => '0', + ), + 7 => + array ( + 0 => '0', + ), + 8 => + array ( + 0 => '0', + ), + 9 => + array ( + 0 => '0', + ), + 10 => + array ( + 0 => '0', + ), + 11 => + array ( + 0 => '0', + ), + 12 => + array ( + 0 => '0', + ), + 13 => + array ( + 0 => '0', + ), + 14 => + array ( + 0 => '0', + ), + 15 => + array ( + 0 => '0', + ), + 16 => + array ( + 0 => '0', + ), + ), + 'relation_type' => + array ( + 2 => + array ( + 0 => '1', + ), + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + 9 => + array ( + 0 => '1', + ), + 10 => + array ( + 0 => '1', + ), + 11 => + array ( + 0 => '1', + ), + 12 => + array ( + 0 => '1', + ), + 13 => + array ( + 0 => '1', + ), + 14 => + array ( + 0 => '1', + ), + 15 => + array ( + 0 => '1', + ), + 16 => + array ( + 0 => '1', + ), + ), + 'relation_show' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + 12 => + array ( + 0 => '', + ), + 13 => + array ( + 0 => '', + ), + 14 => + array ( + 0 => '', + ), + 15 => + array ( + 0 => '', + ), + 16 => + array ( + 0 => '', + ), + ), + 'relation_table' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + 12 => + array ( + 0 => '', + ), + 13 => + array ( + 0 => '', + ), + 14 => + array ( + 0 => '', + ), + 15 => + array ( + 0 => '', + ), + 16 => + array ( + 0 => '', + ), + ), + 'field_scene' => + array ( + 2 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 3 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 4 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 5 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 6 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 7 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 8 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 9 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 10 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 11 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 12 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 13 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 14 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 15 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 16 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + ), + 'is_list' => + array ( + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + 9 => + array ( + 0 => '1', + ), + 10 => + array ( + 0 => '1', + ), + 11 => + array ( + 0 => '1', + ), + 12 => + array ( + 0 => '1', + ), + 13 => + array ( + 0 => '1', + ), + 14 => + array ( + 0 => '1', + ), + 15 => + array ( + 0 => '1', + ), + ), + 'is_form' => + array ( + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + 9 => + array ( + 0 => '1', + ), + 10 => + array ( + 0 => '1', + ), + 11 => + array ( + 0 => '1', + ), + 12 => + array ( + 0 => '1', + ), + 13 => + array ( + 0 => '1', + ), + ), + 'is_search' => + array ( + 9 => + array ( + 0 => '1', + ), + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.215966s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092482s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089804s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093354s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/create' LIMIT 1 [ RunTime:0.090642s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.101566s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '生成操作' , 'POST' , 'admin/generate/create' , '127.0.0.1' , 1639283451) [ RunTime:0.088540s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.090342s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('e2d9f66am8fsCZW53cFU/mca+pecNHt87lw25h6M+oITWH4FGa6kGOlTy7rkE0L/qfx8V5yAlCjNSieEEdcimc4p08APe5Lavewe+BI02KUKNtf4k5vwn1u9u32mg26Htt3Bh61KJP9QBLpCUJUXTQpJ2Ba6/ghae50cUG1xxo56p+Kn+/XaNrtxhGEbqTQNOgYOpjk/miS4bl7m5vjbmGCcDijSWW9EBu17iIvHh9uLmF51vDk4EXzfX6VKKdZp34m17CbPzXhvZDhXBqDkoyPPS70oipxTRBvYDKZoRZ4OwVmI5VlOTjHsa7g/f8AXKG5A80WCqsgNMGXR0W5X6CwbT1+08n+9Q+6/H0OnqauHPo6sutFEkLBrLKMo1YqN9P0nYcxBSSP0B9CiwMPqwN4ZVwxanRL7eNen0ZOwAhEr5lgxU0gC6DVNsQI7dI00eSqxjhXhrlWgNna5HMh/fttGokEZkrNde2m4ZGnQtyIGrbg2NDGGG7Yun5iMQ0z1HNS+cZ7Pj94Hutr0VjFa1WLUWRu+l7AiOFWhI1W5BM0NPOwh9A7L4Boymod3iDfAPFoIXqOqr1kdbSRcmSc/zCcIMYi3V3H0Eb9KmpaCScgXKGqEzRRb803KSkRnzqcURUawMEKOLHMi6cQTBg8PAKoYV6kXVe1wn5dtnh8rpR8R3Jv4JUYXKfg2WgmrVCOv/NVHdIZTSfO+Zco3kfT7H2/F6Pk2t8+bpxx1MBGJm9hxrgaNTIfFzPe3ONSzcVsWgZEeuyw6qvYpxhV8EopD3uOoNHU1pgW9xnXRJ1OhtJZbZm9+EC8yjit28b4ueNf8TpEdniurSO5XQU5GRIWHDL+93bSfrirj7h9CH3CpXKB5kEMGvyU0Srcg+cSnVi9i/gwH3i2RSRA/72aLm25JO8aKUPuOmzFVrVzvwTnR7hrT+JJ4ITIQ8bViHjGqw920nk/1vpxKU2ycdn7w+Z4nj7Gxh7hKd/vaauNUbLetVQqZpHzwxk7Khxy3260Ba6UZRh7cXNlRTTjvzWl2WyIX9cB9WpoI51x3P9SgWmGI0zxSP1f3SHyAiL1Fgiusyu4Mz6w58Lq85loE7avKZxe3Vm3ZbLYVZW5mT43NDdIlwUbd7MfCvH1LR+PF8bWZNiat7S4M1TggA3ZO/xpDCODTmdZwYqmtmszE2IwWqWVGrC7BVuIcHiGxUt6L//dyUrLFuDN4q8WDRDJMI+FTbEYUlLlYxUYQlqAM2huXYPgXz8/hDGhAqC/1LCel+9izDrl9BbKvuwwz46giDNjDTUP/owFZjJaO6tKhp30s3d5ArhqO4zquPvGdFiZk7wc2B8vK4YYNS58b56Y3tjDqara0/I0Djbz7Qg7bN1b5Ubf2VsoH4OiESyTA+pf1wlOZfDfR+to3c9Ubm1Jj/8zXGREMv7CFS/T83bPOSc5ifU3WBNC4HTr52j8RGanCk/vL672wjwAOrhrBTa+TOqXWMS8hJzldOZKHo3DBhUtok035nR2PI5iAZBbVmxyPKL9KkpuJHQUhNw7Udkv52xBRZANEv2vGGukX1eWVmOIHpbH+L7/sJ4s2sUc8PvCIEyKp9LMgBoZOezNhckmd/M7YkqrK9lZe4v/YwMtbktj9msfa/W18S00orQ0KovEkQMFMHPNUczNKFNvDCwV2jdb74hqcU1MeDIs24iimXCqnhyMRJaV6+Am4mjALijJIYywTg1ewJ8CK+xvbP+XUEGq0KauFCXT51kAkCrOj5BPQGVdEZTjsbazk3O0mw9ZUWStkoT9cxjlCLLrA6oiOxTKb5//iLz5JuS30fIzykSFK3uCkrz8cI0bF8EkxEpnL+AEbDL+8DTX2miYYzGQS0NqH/tgzTW2bCSKsTP2kJu19dhSGMbl3E5PiRAgu8AqhF5W9/cbow+xh/gWC6iffwHHHPUA5QjXZAcDXv9gCuQTQADZVLz7USBJDhgp7wvVOCJ34BPuHFjjmrinZJT4zPuoK8FMIfaN7bLuVEnx2/q1j5ImOtpfFy6H3R/dFMWu1EgHeygyLMkp1FQ8qYuUZuQatOTEc/iUiTqHNbVNYMggRnCUfMSPLbFSVQYyzmOWIM+Vlng4hXzaFwgp4st0TyaD6QCWsu1kXAb6UnobJoktGvlJf95/epXsA92JhFj943DDjJwRKYohuminS1o50SXQitrOcicjpQjhYWOsGLfYo+l2NK+dBLD4KHiA68LN5F2TP3Ql4u4GILdPVjZK2gNzaT3gp12cjibgOAkiS7wXm1+9VeYCfd9J42d/sES4Roj8mSGFLvMwTagx+6WXagIvt55RIrx4e7JdcZuXqaDVZ/L0U5ytk2IqYYdb0y+5Ukn1Vlh5YxOop429YJPxUlWfQqu8akFVyj96MHU51wSg5hvdlS0g2lFV0Y++hJCySdoKRBFK+dJVC0pgEwaEHmoWoH6NKsBitO4JRVtk2A2B4b3axar9Gllsfz5TtvfzELOFKecCRxdmqaUGB+PrSnjyK6iL5JIO5Z2WBd2VTMilMh6758ijrikl01MqULfGG8pPZnMbwr+fO2gK6YmmvXU4/OGQ7MoNTUboxdjbklCFPc6X0JMldG5qO6aTbzSgjrBgF0215KZeccqdKPHhcaAk7GBMBV2O8Y673bhNaoH5ckjaI9m3aadXlEjhvS4FaaA+VKS4EA/Qwk+rcIlrl2PxVYN6hnoB691TitHnpAHj/5AtmMrlWlAhRIfppvzVdeLDY5HXJcmwQ/soZR+zUi97ot1Y9GnmiXU2mWq75R1Rnl1hAE+ofokOlEC0S3Oh51cw46SVM7Sp/waqYaLqMyiS1vYJW+EdjAqSV78tpe6f1yOq8Sb4IIWMFp94cNKqe14vglPTZmNfH5k8Q05FwPu33cnwlvYgQpwsKlIDTrl7H4tlL28tF/x8JZlPSuO3AcC+Q9uuk3e+ZOnbuqjs+CaabZw8TcKDwFVG6+LbPN2NGVazIf2nzrppJCYBZ+Yn2QpKMGxRy6PIb22JyC2luSX3xJHSEILAXJjqSaTiMhebr4pa8P5N9NnCqS0Pdt3E2tuEAbJS1VbVNOhl3HtwDLS04eeV16vRgBlue/er0l22tvSpZ/20gz/iWDbc4IWtIc0UE0jR2YjxLfXACXTRwjiPq898JjlIXte41/Kh1IPEo8+To0oe3utKnLQ5HP74TVwy2+KYf53NRgRVN5dDXfiNstuqRj8tlplWOr1aenZXH0VTRTlKtTmydYCEC7lPIzYJk1CLQTl8hkbmLofI33yE76xRU/z/FpxSWIdV7TXjLtWgta7gMbqV6LEm4/Y/uJKaUNVpGV6ycXuVua6peTUVJWoBhZDOncxxFR2R/um/tmfySkG0Z+l6Hc+eq0w2krcGMW4A9dg1pXqDP1sGYKycLaO+M90UKm45tJiyHJQtvxgN9RqRvRQjSXojK0dbnk+x1XVX+p4ZDxbVsc1UzXac4oI//noQndyRRo0uRs38rHWp2t38be0+hkPbDLrLwFO5jWnYUDSIx9yRYEimww2rX+cdqQdMbrqfFIhj1Rd8EqwbBq7GAEtS1wU0lmNVOYEtgg0P3w4+/jzPGxod+qZ+XF/en5N9Ub3pcYo0M8qn0cWSE6NDddUW78mf5KVhxH+n6cgdY8Kxhcii/cm817+wCR052Iknq3yCZglwRi0pF+VyfiywEljPhoH1rGaQnXmxyLZ/bSYEE9jt4z3bJrIBLhMWPXx5IUlwDmLYSe1RuY7RXV9F/vTAC/NrH2kfzygWZBOy6RjY+kkcy9DAHXPDHza/oX9thNgm4E3lrTKzc6eGZoR/D0GX1DBxMg1CC5rxtIgcaOIiskYTYT22/R91hMtk3iybylMMtYK97U1Ky7Pqutnpal3/edv1zNWCau5Z6vUEDazUv7RS3/JN8SoE4p/6Q+aqYVW3Va+QKaRa7BMj4sWngwKWEEuq8Ai98ikTwWvwxtih5B42a9ZUJObMXx5CyGPgf7+diy/8xeAY2fLe7oTU8KSkE3Elk9x5aqJJtesjBwEA3TVh1Gm62tNDnlSnwUeb145BNI6MdxKtvzGU7KzBPqlCSkvl2l+c1Da0vHuTwyvn+bqeMHGauJtLN2sx5B5gYn9btt0X6NoPrXcb9lBEfMTBAv6b52oqzIbk76a1jxCW3PXpMHXQtXAniuxQQ0GOS6sjIdHupd43zKyNSrQPI9KaL6RSXyHISvsWTITscy6jY9ruhRY++i+zcv0ACwsGgoqRTmQlz4ZjCYKwlGNNwegcUXTo91rLtbb002tB/eJwyAt91K9cXPKz80sIKzQDCq5RX44dwDrRFc/QFVP/OUrlsb1JrVAVkfsWK/7BBk/1NRoZPYYE0wZXJwlvgx9HhINGQfN5zQokFcCvFSw/h8nNufpZ40r84RSuu29qGhDmVTb9bMVhOZbDO2PSBAkozQemXZKhj2PsN2zBjyrNq4klyIdRpXKGOQw59e/9LnvYAp/k8njJJgBBywMs2QFyEDQaZRmkjUoEExajw0TX6i2fVXLC3QZtzbYREH9SEzn4EN+P7fVga2ggZDG8LsRcEgkly0RoNb+8ps639WgfeNr7+jnH7EZUzWba91bCjS80469XgjraIy0ZKZBDc38aYX04X3VK+WGp8Qnq5S5i4Se+PthN20GdWRGOQQsikIIwHZCd7x3LCxg9Sxy4Me8R5xbjmAnq5kJm+TD7vwj8U95FJKJlXUqxhOrcmARPoJjGVIzl2FxJWOF1RPULNhxpWnHzolB8DXgYDOnIfD5KCr8SGZKLqkZuxCsO6CJCID2G1d4GyK2vQ+3T32KiU4x119IH8xZbYcDzMVhHR/U9OyZpzyKJD7JEgcNTWcoRTcB6NXa0m55pmz9Hca1O/kuWpm4WWGs7jT/xi3Cak4wJ/RbKUllLEdPoX1JnmNj7cR80bn/DVYzRnd9Sg1Lcu7z5upMKF1be/Ve/x4P+p4BgiYR1iek36iRTl8663dVaaLMDy/TY4K/pDjX2OsoUim9mNIV8lb2TGmHYA+UKxvRLxxaeZ+z9Xo97i0SS09vB2mnxLRzYi/BTbGMCLaJp0OzpuwVjmN0IHpXogum/VgxicApFlbm+Cg/Q6nhZJtIFRozrBE8IOiqyz04Gx6RsrWZeQZ/fLv0IDqVKyCFF3xvUzStfA8NlZqCXKLX6ePsdzlwpj2VPk4wHN01LH8d8vq4QOr5q8VCi/689lJIO05APT17RE4sgXJ5eaNwm9LxgKcq16dm631cRvEYM94b3EYA1YtlKTSLL8zHh8GgOLrK7RSVEObLYBJbgVdtF/fel6BUyBgUrJ6fv5Q0stQKEsnaTkY5uEgXcYMTxL3DF6T7uebpxO8iZMAQmCz3yu4Kxf24wJlmWjh/2+v6QyEdPv7aXtKbwBbT0GsSjiJhjBa4VDJp45pB8r4DHoqxd9KJquJkIriNHW1XuCi0192JnJ77HZWFO3a28VC2RcDL+pgbhSlKxSU663LKJH83ibzNppEWB8vNrK5iO2KBYxNVzY2Ol32B5Js4uoKxmggWFbG/yIFP75MqWKo1WCUMVC0TPswcSOJEMwM7J6r13N7BJGWlAPVN/ZzL40BZ3I+P/CeTQMnmXgkLy12VIyTbNYKF+jn/faKUz7bGvPYHZ4/RJFGFo9eRmmwDvt7ZaUgJXpSlC59sdjjU7U6n1YrmF0VoOcOu0zXQzKPyV7pgEU4HtBeCzRCvFVIDOqCAaHNVMTfkVBFLrNTyB3aJMa9RE4w5Lc0P9Ixv85CgRbBgKi2rzDX5ULecI1AoOfDE4QGPzAEhEKX+3cQVgCt0pdNItzw/uyv7GlvNKUudGP5H5My1sMQZhcbtz/WXdXdrZEoacJm1l2hyfPJA+vA197SyUwRy+q2cQcDb/YFzgV7HRsIcGy5pg1waV2Y5PBclH1xYUCvmNviea2aXmK3sDI/ff7PsontRo7SFINdwsrfNlaGUC+ldWIyHzipmAj6zEjGzWMDzxSDfeLX57a5iwmdtDoVwKoYdCR3ahh/XVTj/vH+8lGvmRZNb1ys/4UFoIgi6l7mAMtSum9dducLpA/Sn1NFQZXsVCG6AJrK3ILsDKdCG91hYHd9AQxyKh4Wox6U8z4XkG+tdgFkh9C9PEYkcrLseZSfzoA/33Of+vtnRWdfa0HRZERBI+Gg19RK1T1HzrxuHWbW9q8h4fl8qneigtH+fbgI0/bcKcJqlvuj2oSiNAH8y/ibsaqHL4nRjv1' , 170) [ RunTime:0.131591s ] +[ sql ] [ SQL ] INSERT INTO `admin_menu` (`parent_id` , `name` , `url` , `icon` , `is_show` , `log_method`) VALUES (131 , '寄卖订单管理' , 'admin/consignment_order/index' , 'fa-list' , 1 , '不记录') [ RunTime:0.092323s ] +[ sql ] [ SQL ] INSERT INTO `admin_menu` (`parent_id` , `name` , `url` , `icon` , `is_show` , `log_method`) VALUES (132 , '添加寄卖订单' , 'admin/consignment_order/add' , 'fa-plus' , 0 , 'POST') [ RunTime:0.087617s ] +[ sql ] [ SQL ] INSERT INTO `admin_menu` (`parent_id` , `name` , `url` , `icon` , `is_show` , `log_method`) VALUES (132 , '修改寄卖订单' , 'admin/consignment_order/edit' , 'fa-pencil' , 0 , 'POST') [ RunTime:0.088883s ] +[ sql ] [ SQL ] INSERT INTO `admin_menu` (`parent_id` , `name` , `url` , `icon` , `is_show` , `log_method`) VALUES (132 , '删除寄卖订单' , 'admin/consignment_order/del' , 'fa-trash' , 0 , 'POST') [ RunTime:0.090379s ] +--------------------------------------------------------------- + +[2021-12-12T12:31:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/add.html +[运行时间:0.824193s] [吞吐率:1.21req/s] [内存消耗:4,749.31kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/add.html [ array ( + 0 => 'table', + 1 => 'menus', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125458s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084919s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082974s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082629s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/add' LIMIT 1 [ RunTime:0.081805s ] +[ sql ] [ SQL ] SHOW TABLES [ RunTime:0.079674s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079839s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080823s ] +--------------------------------------------------------------- + +[2021-12-12T12:31:14+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/getField +[运行时间:0.755514s] [吞吐率:1.32req/s] [内存消耗:4,592.03kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '28', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => 'consignment_order_goods', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134343s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.112128s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085593s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085845s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/getfield' LIMIT 1 [ RunTime:0.087850s ] +[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `consignment_order_goods` [ RunTime:0.087927s ] +[ sql ] [ SQL ] SHOW TABLE STATUS LIKE 'consignment_order_goods' [ RunTime:0.085156s ] +--------------------------------------------------------------- + +[2021-12-12T12:31:39+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/create +[运行时间:1.179271s] [吞吐率:0.85req/s] [内存消耗:4,755.19kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '22553', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryEzyspGe1t2TpRsim', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'table_name' => 'consignment_order_goods', + 'cn_name' => '订单商品表', + 'auto_class_name' => '1', + 'list_delete' => '1', + 'list_create' => '1', + 'list_refresh' => '1', + 'create_menu' => '-1', + 'create_menu_list' => + array ( + 0 => '2', + 1 => '3', + 2 => '4', + ), + 'create_controller' => '1', + 'controller_name' => 'ConsignmentOrderGoods', + 'controller_action_list' => + array ( + 0 => '1', + ), + 'create_model' => '1', + 'model_name' => 'ConsignmentOrderGoods', + 'auto_timestamp' => '1', + 'soft_delete' => '1', + 'create_validate' => '0', + 'validate_name' => 'ConsignmentOrderGoods', + 'field_name' => + array ( + 2 => + array ( + 0 => 'id', + ), + 3 => + array ( + 0 => 'order_id', + ), + 4 => + array ( + 0 => 'goods_id', + ), + 5 => + array ( + 0 => 'item_value', + ), + 6 => + array ( + 0 => 'goods_name', + ), + 7 => + array ( + 0 => 'goods_price', + ), + 8 => + array ( + 0 => 'evaluation_price', + ), + 9 => + array ( + 0 => 'refund_status', + ), + 10 => + array ( + 0 => 'refund_remarks', + ), + 11 => + array ( + 0 => 'create_time', + ), + ), + 'field_type' => + array ( + 2 => + array ( + 0 => 'int(10)', + ), + 3 => + array ( + 0 => 'int(10)', + ), + 4 => + array ( + 0 => 'int(10)', + ), + 5 => + array ( + 0 => 'varchar(100)', + ), + 6 => + array ( + 0 => 'varchar(64)', + ), + 7 => + array ( + 0 => 'decimal(10,2)', + ), + 8 => + array ( + 0 => 'decimal(10,2)', + ), + 9 => + array ( + 0 => 'tinyint(1)', + ), + 10 => + array ( + 0 => 'varchar(600)', + ), + 11 => + array ( + 0 => 'int(10)', + ), + ), + 'form_name' => + array ( + 2 => + array ( + 0 => 'ID', + ), + 3 => + array ( + 0 => '订单id', + ), + 4 => + array ( + 0 => '商品id', + ), + 5 => + array ( + 0 => '规格值', + ), + 6 => + array ( + 0 => '商品名称', + ), + 7 => + array ( + 0 => '商品价格', + ), + 8 => + array ( + 0 => '估计商品价格', + ), + 9 => + array ( + 0 => '审核状态;0-审核中;1-申请退款;2-审核成功;3-审核失败;', + ), + 10 => + array ( + 0 => '失败原因', + ), + 11 => + array ( + 0 => '创建时间', + ), + ), + 'is_list' => + array ( + 2 => + array ( + 0 => '1', + ), + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + 9 => + array ( + 0 => '1', + ), + 10 => + array ( + 0 => '1', + ), + 11 => + array ( + 0 => '1', + ), + ), + 'form_type' => + array ( + 2 => + array ( + 0 => 'number', + ), + 3 => + array ( + 0 => 'select', + ), + 4 => + array ( + 0 => 'select', + ), + 5 => + array ( + 0 => 'text', + ), + 6 => + array ( + 0 => 'text', + ), + 7 => + array ( + 0 => 'number', + ), + 8 => + array ( + 0 => 'number', + ), + 9 => + array ( + 0 => 'text', + ), + 10 => + array ( + 0 => 'text', + ), + 11 => + array ( + 0 => 'datetime', + ), + ), + 'form_validate' => + array ( + 2 => + array ( + 0 => 'required', + ), + 3 => + array ( + 0 => 'required', + ), + 4 => + array ( + 0 => 'required', + ), + 5 => + array ( + 0 => 'required', + ), + 6 => + array ( + 0 => 'required', + ), + 7 => + array ( + 0 => 'required', + ), + 8 => + array ( + 0 => 'required', + ), + 9 => + array ( + 0 => 'required', + ), + 10 => + array ( + 0 => 'required', + ), + 11 => + array ( + 0 => 'required', + ), + ), + 'field_default' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '0.00', + ), + 8 => + array ( + 0 => '0.00', + ), + 9 => + array ( + 0 => '0', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '0', + ), + ), + 'getter_setter' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + ), + 'is_relation' => + array ( + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + 5 => + array ( + 0 => '0', + ), + 6 => + array ( + 0 => '0', + ), + 7 => + array ( + 0 => '0', + ), + 8 => + array ( + 0 => '0', + ), + 9 => + array ( + 0 => '0', + ), + 10 => + array ( + 0 => '0', + ), + 11 => + array ( + 0 => '0', + ), + ), + 'relation_type' => + array ( + 2 => + array ( + 0 => '1', + ), + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + 9 => + array ( + 0 => '1', + ), + 10 => + array ( + 0 => '1', + ), + 11 => + array ( + 0 => '1', + ), + ), + 'relation_show' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + ), + 'relation_table' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + ), + 'field_scene' => + array ( + 2 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 3 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 4 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 5 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 6 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 7 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 8 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 9 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 10 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 11 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + ), + 'is_form' => + array ( + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + 9 => + array ( + 0 => '1', + ), + 10 => + array ( + 0 => '1', + ), + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129600s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085721s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089416s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084256s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/create' LIMIT 1 [ RunTime:0.083750s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.083876s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '生成操作' , 'POST' , 'admin/generate/create' , '127.0.0.1' , 1639283498) [ RunTime:0.081878s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.086547s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('0cf8c5fcwYagwWrCCVcW3kBwIuvWO4cJksu6lkSQwoaDstEzHcYAPxUJwa6GEyk8kxKfOwxM0/Zbas6CxbPPrbigBUMVOM98Py55ZfGVDolSUE32cNFp2QhSAtaE2JxKvokkNjSRsGOgP3Bejpz074B4TobfLNFBoWO/kBZBdyVPmvv5awrJvqpn/jVv+RUMFgymPU/x4QJ/Hhk/Coxd2g6MOzk9ha8nT1uOqyNuNLFnrxPcYFGaH4EE4TSk+noXyYOThlxuCYF556ovcwYPehITYRXxIurE1dlkB4ufkaGkA6bQ/eCcj02abnM9vecj4UC4SvxOvRN4r77IG0UAMH9xIYnvEqXRvJNPl9dXN4J29x0bCFJX3WX87FLUuEKvKmGnK9JU7lnBS7ImVp5G0BeuC0T3BQXPSIijX2+vZK/zs5XRABQlctT5bmsAPaxTh7EeePCpcRByzLCjuOspc40n3W5xoOSuvZzyHPBSMJ74WFA7aFsP3gHnuT0kXLGWWBOeA/lhmafbGEYzNbDRv+0GH7H7FP+MAbTDhs5hNbyruRGGYJ8PCwi/i6cb/AzDKwJAym+Ol+bzrgsNjNg8i+VkmCozj9aDH3q6ccJ/Xe8YuuHBc606rABKql4rUhldO14dLdA1+xD7XKVuZMPWoANMk0T3V8iyAKsbbq/NU4pAiMX93Ip5cB8Y+u9LLQME6GhEzzgS7OCyQPLDtg1LwxyeLGgMbAxBptKi9CSWLsAsiVGGXLRKgPrAHfTWVm14k17OZK02pBqU6iOiDp9p/oqd77UnqMQcHQ9BsCPWI2UtaRYPkT8luzuQxOmjZmbN24s6KVhD3HcIU88WQ8IQm9A0XQrG4HCEBJC5H336AorTUpGYnvNpzm/S11feL5NJQyARv1D1BndT9zA8JyOXUnK2SXI+QNepgTUu0npSLxTcImb3b++xmJodBfHVP3rGFFLmQBhi6RzZM86tLAiNlVQRJNVjLs0Om3bRBQO/rQ8TxFijH81ns1TeSeykEBDME11/CpFEL4Rguwlv/4eYq4CT6/8WbP1DHGHTyZeIideAHU4hMONbP4etRHgVbroZ+uqccW7GvvNHJ5s+RD0wRJ2pwpSFMhxtCs3SDB+Kqv+bJ+L7uIQPcLMHKJc42aEuoPQSefq3Xh886Q9DWSAT5/XGK74LWiAkcYGjOc4YNOSt93lr4F9j2+u/Gvy81oe+rMbn52wsaZpzT4WYiOslOKjeX/FutMmCD5rikVFheX3W3qGwpbMrk2VNGelRveVFYkheRIemFbtfd1iaopF1Axbi+HQUFmEv/6UFMdAxh263Qd54qsZ3o7/EIsT36wydIBsr3U5V5phU2IRv7c9gZQmjb4YON/XdRazeiaVONCT77mk8gyIt0s9wrkr+NPpojnfGiAg009/hr02UEcJadwWumkxooeBOKmL/+0Fr22zQCRpu+AQgkRCJJfkmltHUnhHQ74jdf32pBCy+FhBr9RkoXrtjsd4qqlOR3QfJuwr0tQOqNxpH3a8TP7CYycvRfVKarJfpJA3yr7arHbzWOeRiGW/DPWno57DNs8UX+27FIhaF7UGfKJbZR78hkPm6uHs0+ggT3Vj6WtTGj/F0I1YaWgZ9MlMU1v9HNuX8RMunokjPa6cfvJVVYkWnwFeRhlbkTNO+lgu0EZxQmr2xkeToaNQh+1SlhOBec8z6KETovq7TuE+q02CC6aYXKUGhtyBKU94KUF/ZDmZ2fo7n5ZuqMKA1LxjWPWJwDL7x9ugCU035KoglnCKBzUQOPNH32NQnnKqG9DoKlqLUlR6W4UHbvflffb5IQH4RgV+EvcNJnaVqxxwCIdmduJNXfQd05HDOvSRR9w4S+B3g7G7uGpwbCoTxyEs+MEHdx/ZkPd9xjpO3r16uryWg/dThaqvvd0IanxOdwtRhqAfeq4wg+BRKutpnXISHF0SUEo+fKzUkCxtjoXsni2qF7byk2LSoeHLBMNmaWJvDo1IO5kz86qGzDwCOsdNG9/y9Qzpu/3iiOo1rYGxyRkp7VnSV07xycAj9yYItJ4coRVFlcLCdDShZ8VzdUf2JomPUFYotODWe70UEfK4pxcTItF+6zIdhibzY8VQWdt4LlYS7rs0IMfAGEjEfdqK7qdh+/FPmBpXq5RqcrVLHN3JopC0UtVWuHFZDKWcS/MI+7v6JTKPdPP2Q8fLV48bLvoNaiL3sCN+dAOmA9c/Ut4YWDS4X5VVs2MwfprskA12lsjogyNwHZeeZwR3cLJ5PgEJx5i0HwuHi+cxsOXIT2ONXFOHIuJ10WsEXNgN8jq7Va3epzo8v5ozH2xv913+zYtG25yWmCUMTl5k/jY7KBCnDM1ZkUcrxTOGggcgfJZdx7LCjr+9k3O7YAI3NsWAqfF9Auw5LYY+w1NE7ByPmgrYNR1qJ6Bx4GcABsWsz8JizAgKZrZuTbqAV4wMNA53r+MeidFe9M1q2uEsYh0VpFphtYV/f3xeEFMKnXwtsXMnQhP7kc/WbrDPiGaSIQEixlLlzQ8MWWxkNx7M7nT+YeZgyAJcmU4m8V0yOxRf3etPhqnQvehEebf7Sc/u73w7nF+pvVAV5FCCV1Kw0ey9uItY7t2XrQP9QOCzkf7l1CjYZxApQM+X85jADB18rZ2DF+vouRezUtfS88Jjjyz1q44jCWOq28in5CY9eo6yPMwLpdrKayBv26pO1M0FAxMb2azT3FExks/7+b89ThiVUY2oJc05gPFe1Hrs3zs70UvvdT6jrl4Az2qy8LOCVjtbj6OI208seTVwErgBPoT9NkaA9Pbpl6InkVl64O3MWrTMk2I8E0MnrF/l3bYzlQF305iAsvBFITy8i79GlZoYHO7iNm0SGFNs9w1BxxCXOUe62TsUHq8ZEAsJLyaKovwcoM4k6lenk2whaoCMh510jeW4ZuaLzYCH4V+qwhlt24Kv5WKv19g+KBga/mLKM5qoV78G+d0OCcMTqUbDnJ4GpZa8F05tiNR+7FlI3xNtTCu5XevAc/Gf1QruJNgceb9F3xsw8BwAMAl1YKjGaZJuNGCmwihjmjiXqigzLeXW4S2LBdvsFyFpDDIXhqcjmbj8ZCCmvl9tPE3KIbktlM67Qnh+iWcvngYASU5iDW+79c+yoslF5DxWq0AqIR9NOSAU7pCBVHGgVPAimk6ID3wYak8O5MNMTR2l6WOmaTLjNkHrYQp1KTqNQ0DwRN9iX+UNlL+EFNIBseFGVwRoPYgZQg38NDpumR7bcGt47oE4yWti6vdcUgQy+cv9kLN/6Suj0yuA5r16k31y9POYkcVF6BXkddfQnmW6fj7WovmGyN+UpZ/HDaP8NuOOub0BHNgi4314ROGc6dg1llmdXHwmNp6CYZ9lmGVndlPYu7SvxTW9JENi9Ak7ZyANGmUFxXCc98c7j0kPYDhM6GTsvgj/PTo/HlAceS56DOWcb7yKzV1+KWByuLKFRw7j7ilc9EUVg9s7IIhC2hmHG/c2IDn+5rUyedPW7ejiVhMmNoJQ7lcDXD3moq/w8ki+BejS1qhcrCpfGe06orQagnDN7hKGHKAu5pr8gCXa7MaV0b9x4Hjw+KXCwQ9Ve/wnMLQ9+/8CySZw5uXOWgb/3Fm/gT0yqdqT5J7u4sv6BjaEUIKejcSweLkdTb+ijms70hcHrbTDBto4KmWxtdHHwePm7vBOF1PcLO0uwWtnM6wPF49tvr7WWfcxb1+aj5NKRNTdYj2g4u8wSwBbOU/uysBGVYFqsjFsx65r0BBzSA250lITCKLB5jhvFfOKDI1ykD1c8MrPbe8NcsSXvnd8YOFHjCVs4AdjDCkr4QcL2XwT9LreEtDf4TbTbeCrmH3/aWx7iZkaPx4jcA7NEw0mMxjI9/4H78b08W3B83yZMedYnUhZ5dgo4KMPImByNX4OXKBTf6uBas7gnAf/Zws9MDH7nF+YSZRH3HmkeoKKsg+mwBuU3WwB85ENW7Sp6wzefnS9rdsupkEjvhThqs0eaarfzwXoIuC7e5HrJ/HN7SfHuYMSfQ7XX79GQwodq5AoNDGckzLjYahICtY1j97WPiGJjbnPFRDDk20rspZNGLBUfpFYpdVi9uVTjD3O7UdG2AUZZtyAAuv7CuDrxbeQ+JvLdd699HIChxy/uLG6kpL+CaLc8k+X5s39b9RP5S0xM69RIjwMTNxxlvTRGR2zI1bHFsJGm+4J3FnsfTcZAjJnjMmd/5i1R05aLnPmFHL/FDvxo7smSwqOd1a5FdEHZ6t7s7xOwoFA7muUPjiz0/gHR25NW/o499/W9MarHUUXFcEmtvcZn8wZ2AxKhAA/fNOo+dWUYmQx2+R0+BiXfYOQGNvbI8oizHnweyXGfbCWgWhHOTmJuPIM7vQ//X9g7XIfGVY+jH5xuKJ0gIlPYE6vjD4lJt8VacQ7mcmYBx8f2xo+ZfC45LyqiCx6tQd26M8PMUkLb9IgY4KReH3DmwL7B' , 171) [ RunTime:0.083814s ] +--------------------------------------------------------------- + +[2021-12-12T12:31:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/add.html +[运行时间:0.884414s] [吞吐率:1.13req/s] [内存消耗:4,749.31kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/add.html [ array ( + 0 => 'table', + 1 => 'menus', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132517s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087185s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086855s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.104284s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/add' LIMIT 1 [ RunTime:0.086045s ] +[ sql ] [ SQL ] SHOW TABLES [ RunTime:0.085159s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089254s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087039s ] +--------------------------------------------------------------- + +[2021-12-12T12:31:48+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/getField +[运行时间:0.752295s] [吞吐率:1.33req/s] [内存消耗:4,592.02kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '26', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => 'consignment_order_log', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132881s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090056s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086746s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093628s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/getfield' LIMIT 1 [ RunTime:0.088374s ] +[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `consignment_order_log` [ RunTime:0.092544s ] +[ sql ] [ SQL ] SHOW TABLE STATUS LIKE 'consignment_order_log' [ RunTime:0.089551s ] +--------------------------------------------------------------- + +[2021-12-12T12:32:04+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/create +[运行时间:1.153215s] [吞吐率:0.87req/s] [内存消耗:4,725.93kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '16249', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryPVYPcrW3IoJI9ttG', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'table_name' => 'consignment_order_log', + 'cn_name' => '订单流程表', + 'auto_class_name' => '1', + 'list_delete' => '1', + 'list_create' => '1', + 'list_refresh' => '1', + 'create_menu' => '-1', + 'create_menu_list' => + array ( + 0 => '2', + 1 => '3', + 2 => '4', + ), + 'create_controller' => '1', + 'controller_name' => 'ConsignmentOrderLog', + 'controller_action_list' => + array ( + 0 => '1', + ), + 'create_model' => '1', + 'model_name' => 'ConsignmentOrderLog', + 'auto_timestamp' => '1', + 'soft_delete' => '1', + 'create_validate' => '0', + 'validate_name' => 'ConsignmentOrderLog', + 'field_name' => + array ( + 2 => + array ( + 0 => 'id', + ), + 3 => + array ( + 0 => 'log_sn', + ), + 4 => + array ( + 0 => 'user_id', + ), + 5 => + array ( + 0 => 'order_id', + ), + 6 => + array ( + 0 => 'remark', + ), + 7 => + array ( + 0 => 'extra', + ), + 8 => + array ( + 0 => 'create_time', + ), + ), + 'field_type' => + array ( + 2 => + array ( + 0 => 'int(11)', + ), + 3 => + array ( + 0 => 'varchar(32)', + ), + 4 => + array ( + 0 => 'int(11)', + ), + 5 => + array ( + 0 => 'int(11)', + ), + 6 => + array ( + 0 => 'varchar(255)', + ), + 7 => + array ( + 0 => 'varchar(255)', + ), + 8 => + array ( + 0 => 'int(10) unsigned', + ), + ), + 'form_name' => + array ( + 2 => + array ( + 0 => 'ID', + ), + 3 => + array ( + 0 => '流程单号(20位)', + ), + 4 => + array ( + 0 => '用户id', + ), + 5 => + array ( + 0 => '订单id', + ), + 6 => + array ( + 0 => '说明', + ), + 7 => + array ( + 0 => '额外的字段说明', + ), + 8 => + array ( + 0 => '变动时间', + ), + ), + 'is_list' => + array ( + 2 => + array ( + 0 => '1', + ), + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + ), + 'form_type' => + array ( + 2 => + array ( + 0 => 'number', + ), + 3 => + array ( + 0 => 'text', + ), + 4 => + array ( + 0 => 'select', + ), + 5 => + array ( + 0 => 'select', + ), + 6 => + array ( + 0 => 'text', + ), + 7 => + array ( + 0 => 'text', + ), + 8 => + array ( + 0 => 'datetime', + ), + ), + 'form_validate' => + array ( + 2 => + array ( + 0 => 'required', + ), + 3 => + array ( + 0 => 'required', + ), + 4 => + array ( + 0 => 'required', + ), + 5 => + array ( + 0 => 'required', + ), + 6 => + array ( + 0 => 'required', + ), + 7 => + array ( + 0 => 'required', + ), + 8 => + array ( + 0 => 'required', + ), + ), + 'field_default' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + ), + 'getter_setter' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + ), + 'is_relation' => + array ( + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + 5 => + array ( + 0 => '0', + ), + 6 => + array ( + 0 => '0', + ), + 7 => + array ( + 0 => '0', + ), + 8 => + array ( + 0 => '0', + ), + ), + 'relation_type' => + array ( + 2 => + array ( + 0 => '1', + ), + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + ), + 'relation_show' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + ), + 'relation_table' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + ), + 'field_scene' => + array ( + 2 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 3 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 4 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 5 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 6 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 7 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 8 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + ), + 'is_form' => + array ( + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.145992s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.099782s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087915s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088058s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/create' LIMIT 1 [ RunTime:0.089188s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.094719s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '生成操作' , 'POST' , 'admin/generate/create' , '127.0.0.1' , 1639283523) [ RunTime:0.088645s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.087742s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('63aec716MJX0LDUfkMv3tT+x8MQxKST+Fz/oWYFS1Wg11IKHyS1Ko80ikNae2Isa2MS973jrn3IWWSvSlMqA/Flm0F0KB2N392NcXMmPxBd5NqVCulLk8YJCnN1FNxugGxJ8ckwE7mOf2oIQGdhwN0V+qwjfR8EnM3azwgf/I1VWpuA4BaDmgLL7P+/D8Vs3w7GWG0C3a5kkuEQwpZmasZH1+CxNRipcoWf0lfkKt8pOevTylCQ9uBQSYEuPM09+/ZWHmPKt7aAn5EtvdWRoTc/PpTNSyPXYckoRoS0nSWk1LyKGKyvzrakZnNhfs+uBeeegLB+MOxlUncGkDJ25AZhboeCI17ll/aGlQIFwJ6FhHnn2+HEoNKKVuqEbpLWCUStXCtZV/7Zytw0d3CzfKm1COmIlO6wbT5wUmvKMVBdlFMUYdvGEf90txIYOgpmA84E9XgnGcLlchXEm9lJeXxjv5TujHrQBkhoHhXoK7f8nTWmaUOUggMzKYAVA36HFNrVVMnhr7NXqWbGOYbomyD/SY06mthe7/a33/wSEcZxaHhhBX2Stlit3IzUwjZ0mH4efCAUTzNSnSBUM/uXd7BxiPM7nB0nQrcYRgLtadWlz3KWVl94pBJo+5dSg8ffk8BPWPYbZVmsOLd7GVoHnSEk+eLqqAXzCVrLQg4vQ9UD2s5IkjwBYneXL5VkL4rqiXx1BxBSkqWyFPv/kofozL57oByN6tVDsCP5Cjq52hTf26Q/ja33IdAXzpAwgTyg1ZncB/LVdFLrWta6VKMJ56BgE6U1y3Lj7eTNpuYqWTE4UOx1cvaEBmHERvGyeYja5MzGRUdb9eRs0wWiuvY4QFKqZQwVzsc3XrZ/G0wrTVerPfpwRbYYsFEMkwgVTrQr0OlEB3lq9nf+a1ITDtEzqHRWQb6vdIiDSqhSZeEQevkJ24t/EzeQ4aSqm+7afOfBKu2gUF3cxpq1ExDQ5Jkjw3JTscggxOCuunAKvPV7gHaZR3Gp23xLzndBlHc8p+1dIOdNgblpEJHGriN56UfLYV/XYIU6uKfsUV9Trd+JdiV2MD+lgkd1OMpfaWvx1AiUtginA/PMQ1Wks0NSHaFp5RlBcXecFF4c6ywvDNShvGEAWUDJ+YsSOJcOftlYp1BdW1OWrbids/HIXH6rGxj7hgv+xWiCew2OmF85hz4J0hM6kL6ZPYG1d3t8ZIl7fMcOdERmvR7v3NT8lese11yoehoUftpjXoZviOuIksSOZAdVrrdchYmqxkXbLTUmFS/bTOA3cvGqVjM8rlWwdSQMq1eIHSqjY5cJG/udM8ot7wTTFMnhmIiHWcgCpGusaELyMc8ippmHctQV97h+5hAUrtDCD4z8eVCCjEfUKn3x8WOBaTBSUuIcL15Ho/y9K3j4FiWNpB2E2f+SKyNz+NLQ2aSNcC8REnfufMaHBgQ9ZY0hR+VqDCaeBbGZnZm802bCqzrywd7DnQBGYtLLnjT/1mnMpT35+WzC6VkcfcWfifIMjorEgNp1EfZn2s6xPKzoKmFMRUv8S/y2D9XcgYe5Z1g75q1nAYPu05bs+9zihb4XsSOyLHvPN1VKTRBETvB2dMOcqKqFS8d7bUvxmEy1yXyuWgtwCJN14svGbPppY0RjqqMcXzlrOAyj3EFsviARmXrJc1i9VxASFLJHawzAH1XEXmu4yhBWpkqqKj/+g1AJ5lWnt5D1Nzul0H/tsj+vyBu15ArSWYGNfjIRcAVGL/hSZk6NzYO3Mhbec4gPGXKdSPoxQQlW0PhCRuBmNRWjqRBkaJKuz+68eSIz6VTXOJrYE7kGy2vaH0iBvKOBoOEyMYPm/eyXAh8qwEGN8XARbxfgWPy+ljMj/vKenvjUNelhQM9RcFRUGDYkbaRQBs0JEwHJ6A80fFE3odMYIfCqU0AEAXJHqbHR95cQDNlyhHFPuaySgZv16wzni4qzs+EToSD1Ip8GOyRBCLRdOP3BPl6RcR6KhbXRMgIwSB42tQ6pPT+OfbWkeQnxQiAzGrHPIlwhR9i3diWqvN18j6Tos00EMHZbVbSgHu8qEFoWjoPNuO4T9WynR0H22UOIuzIol67JWLQM9pULBYqyPcDlfuf8nyEU/blTn9PLoEi/z5Q52aCvGbzqMqHtIOiVCm1hZ5cB0N3ovTJy3FVNh4jW50yBAlQey9mSevtuJV/Aun9xCIOBmVq23lRMb1YlqA60+TflxnC85Za0rFnwFvA03sX6PhR4+3PaSP5kbI6DRGQhvlHfThueJ0ZdPJ7mggvvp7ODBjhhwjzcQ/KEikQiL/6QQMf1AhchfG+RvsZO8TsL0QfoINNKVrHVr9C7atBNjSDLQa7A1OJcdcf6dz1gE+VOD6/uKUitXEj/8X1jYZaitdakMRw2v9hbox7p6gKNLqzMH+IPn4z/b4pSsHgFJaZR8PjYM5JVaaPoD/gHWZgAqmdgtJ/WScPGpfu61vGxksqNtJ2ph5Dua52MdCcTM1M5bQ6SyM9JSj1fwkfu5gHC82z8yFK+oKGFelOwZYzIQsfuIdJL3nkXepqsAOUM22kd8qopZ6WVdIQsCJmMMFfowNTg9iZr0eVf1gtUbSVrkwEzvjJX9FurdLHVsANVYzi67llihLtx+SBxUnsVJ7VXpkydCuVev1A9xni8BNAqPTmuRuQq+PL3ngS5uHRsn/JX0IEgfkTZe6zWT9IeZQKY1cADNA//csTZ4IWLBdJSjZTQDMuDy0NeVmVpIaT3bAc9XQqQEw5HPrJQbVTLfI2svjxumjdBGLiN3G+Z/RtMqtnNGrjd2tydBHP65n+A93KeLZIpy8wB80bRnwkwGUAPU3L84zznXBAz/+zMVlGAMnWIqwjA5d68RfwJBUX44XXHcw0rO5QiquxBmAARzGg1T+ODCos4avn2LxF5EF4uX7pyb0dBMDCIM2uS45LuQhxXWURWRn67F6yJXDS5YiYk2J3soPG7J/i48OHNeS+IDwP8xiZEJcykrMjzj8qoJXRYyuuybRZOWkBpk7HoE55iD0MleoDLPNxl7iYNdd5G9ukX8jOF2c3SNKmRb0ZMuiBPPmCO29Ue8tCCP2+O04Vuq64Fyk4hbhCswmoHarBHGV65+7XwmDY1crN1L8K07Hs+CJ+CJTrujaMoz+WoJd7qI2jKSoumNwgFrubtvO/OwswBYBF+MQDabn73X0qrTLHLG3Ra3txyNZct7SoVGu4PKgQUWFlhRTeXOGToHw0HzymrWkJOvOXK+' , 172) [ RunTime:0.089999s ] +--------------------------------------------------------------- + +[2021-12-12T12:33:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/add.html +[运行时间:1.130448s] [吞吐率:0.88req/s] [内存消耗:4,749.31kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/add.html [ array ( + 0 => 'table', + 1 => 'menus', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127113s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086224s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083026s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085498s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/add' LIMIT 1 [ RunTime:0.082435s ] +[ sql ] [ SQL ] SHOW TABLES [ RunTime:0.083039s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083062s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083843s ] +--------------------------------------------------------------- + +[2021-12-12T12:33:47+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.640164s] [吞吐率:1.56req/s] [内存消耗:4,590.79kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124487s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089197s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082531s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083546s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.082129s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090604s ] +--------------------------------------------------------------- + +[2021-12-12T12:34:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:0.687075s] [吞吐率:1.46req/s] [内存消耗:4,483.00kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131404s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087376s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083770s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087146s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.089610s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087436s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'o.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T12:34:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.645793s] [吞吐率:1.55req/s] [内存消耗:4,482.76kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124747s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082217s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081859s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081452s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.080064s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083112s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'o.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T12:34:49+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.856736s] [吞吐率:1.17req/s] [内存消耗:4,721.48kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123287s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081951s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080192s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084123s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081263s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081645s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087074s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086805s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081187s ] +[ error ] [0]类的属性不存在:app\common\model\Order->order_no[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T12:36:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.015117s] [吞吐率:0.99req/s] [内存消耗:4,909.88kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131041s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089322s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084455s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.163292s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085339s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085651s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084155s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086174s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084823s ] +[ error ] [0]类的属性不存在:app\common\model\Order->order_no[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T12:37:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.859238s] [吞吐率:1.16req/s] [内存消耗:4,916.26kb] [文件加载:193] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129993s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083030s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081599s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084091s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.080669s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083247s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080962s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082037s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083782s ] +[ error ] [8]未定义数组索引: order_type[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:35] +--------------------------------------------------------------- + +[2021-12-12T12:39:09+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.875404s] [吞吐率:1.14req/s] [内存消耗:4,916.24kb] [文件加载:193] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.121815s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085426s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086873s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.080967s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.082751s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.080472s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.079633s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.078066s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.078465s ] +[ error ] [8]未定义数组下标: 0[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:35] +--------------------------------------------------------------- + +[2021-12-12T12:40:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.092049s] [吞吐率:0.92req/s] [内存消耗:4,687.26kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.141239s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094266s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095006s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.094155s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.092622s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090691s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089237s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.089299s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088467s ] +--------------------------------------------------------------- + +[2021-12-12T12:49:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.216997s] [吞吐率:0.82req/s] [内存消耗:4,917.01kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126134s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087249s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085921s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083080s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081320s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082464s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080227s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080083s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080441s ] +--------------------------------------------------------------- + +[2021-12-12T12:50:15+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.096140s] [吞吐率:10.40req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T12:50:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.993634s] [吞吐率:1.01req/s] [内存消耗:4,919.01kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135169s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087977s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.097953s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086770s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083790s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086920s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084415s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083791s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084022s ] +--------------------------------------------------------------- + +[2021-12-12T12:50:53+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.099386s] [吞吐率:10.06req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T12:52:17+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.299036s] [吞吐率:0.77req/s] [内存消耗:4,939.01kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133712s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089590s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086088s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088426s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085482s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087366s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089030s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086382s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.095633s ] +--------------------------------------------------------------- + +[2021-12-12T12:52:18+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.155360s] [吞吐率:6.44req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T12:53:51+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.954973s] [吞吐率:1.05req/s] [内存消耗:4,939.01kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129411s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085204s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.102086s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087023s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.086444s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085118s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086748s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084484s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082923s ] +--------------------------------------------------------------- + +[2021-12-12T12:54:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.975853s] [吞吐率:1.02req/s] [内存消耗:4,939.01kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127846s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085851s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083294s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085975s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.082680s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083441s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086542s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084575s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083623s ] +--------------------------------------------------------------- + +[2021-12-12T12:56:18+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.018500s] [吞吐率:0.98req/s] [内存消耗:4,943.38kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124877s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.104963s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093052s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083950s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081930s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087104s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084008s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081853s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081184s ] +--------------------------------------------------------------- + +[2021-12-12T12:57:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.048429s] [吞吐率:0.95req/s] [内存消耗:4,709.41kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.141271s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.099571s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095104s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093844s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.092738s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.095622s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.100520s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.094684s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.092409s ] +--------------------------------------------------------------- + +[2021-12-12T12:58:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.952829s] [吞吐率:1.05req/s] [内存消耗:4,709.41kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130199s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086118s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085632s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085664s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.086175s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087560s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084365s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085335s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085357s ] +--------------------------------------------------------------- + +[2021-12-12T12:58:07+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.105734s] [吞吐率:9.46req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T12:58:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.029377s] [吞吐率:0.97req/s] [内存消耗:4,709.41kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128602s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086511s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085350s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085545s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084419s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086620s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.090496s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084673s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085388s ] +--------------------------------------------------------------- + +[2021-12-12T12:58:56+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.062828s] [吞吐率:15.92req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T12:59:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.923678s] [吞吐率:1.08req/s] [内存消耗:4,943.88kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127357s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085917s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083311s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088252s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085183s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083398s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080994s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086249s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083978s ] +--------------------------------------------------------------- + +[2021-12-12T12:59:36+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.142709s] [吞吐率:7.01req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T13:02:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.955203s] [吞吐率:1.05req/s] [内存消耗:4,959.88kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129337s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089340s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082049s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084087s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083272s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085107s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.088089s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081894s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082360s ] +--------------------------------------------------------------- + +[2021-12-12T13:02:37+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.053648s] [吞吐率:18.64req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T13:02:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html +[运行时间:0.731025s] [吞吐率:1.37req/s] [内存消耗:4,601.75kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130115s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086677s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087048s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091127s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.085607s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085347s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084325s ] +--------------------------------------------------------------- + +[2021-12-12T13:02:47+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.116705s] [吞吐率:8.57req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T13:02:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:0.937244s] [吞吐率:1.07req/s] [内存消耗:4,689.36kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.226659s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090197s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085855s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087226s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084889s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087821s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089495s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.089999s ] +--------------------------------------------------------------- + +[2021-12-12T13:03:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.684180s] [吞吐率:1.46req/s] [内存消耗:4,590.79kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136985s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087130s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085284s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086441s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.095007s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085717s ] +--------------------------------------------------------------- + +[2021-12-12T13:03:14+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:0.824423s] [吞吐率:1.21req/s] [内存消耗:4,689.36kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130272s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088457s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084959s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086516s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.086345s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087796s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083721s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.090060s ] +--------------------------------------------------------------- + +[2021-12-12T13:04:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.041674s] [吞吐率:0.96req/s] [内存消耗:4,999.88kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124388s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083040s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085179s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088521s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.110440s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089563s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083273s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087258s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081778s ] +--------------------------------------------------------------- + +[2021-12-12T13:07:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.026937s] [吞吐率:0.97req/s] [内存消耗:4,881.23kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135981s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087575s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086312s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089369s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.106622s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085849s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089482s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084338s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085258s ] +--------------------------------------------------------------- + +[2021-12-12T13:10:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.913998s] [吞吐率:1.09req/s] [内存消耗:4,881.70kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134092s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089615s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086877s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086022s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.086211s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088053s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089675s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087841s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084668s ] +--------------------------------------------------------------- + +[2021-12-12T13:11:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.884372s] [吞吐率:1.13req/s] [内存消耗:4,885.60kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124797s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085894s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087199s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084080s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.088952s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086099s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081650s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.079164s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081092s ] +--------------------------------------------------------------- + +[2021-12-12T13:12:09+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.007493s] [吞吐率:0.99req/s] [内存消耗:4,687.63kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.140189s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.114870s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.115819s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.097641s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.092270s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090623s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.091604s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087834s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.092932s ] +--------------------------------------------------------------- + +[2021-12-12T13:12:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.939324s] [吞吐率:1.06req/s] [内存消耗:4,924.45kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125696s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086716s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.103255s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083729s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081193s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081387s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080460s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.079348s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083340s ] +[ error ] [0]类的属性不存在:app\common\model\Order->status[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T13:12:47+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.892115s] [吞吐率:1.12req/s] [内存消耗:4,886.38kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127196s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087445s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085125s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083901s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.086551s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082832s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.088334s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082862s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085359s ] +--------------------------------------------------------------- + +[2021-12-12T13:13:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.882367s] [吞吐率:1.13req/s] [内存消耗:4,886.26kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134556s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085781s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084565s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086261s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085095s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085417s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086249s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084099s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083393s ] +--------------------------------------------------------------- + +[2021-12-12T13:14:04+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.975919s] [吞吐率:1.02req/s] [内存消耗:4,886.26kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.142972s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.096680s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.098266s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.098229s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.093779s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.096988s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.091754s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.097322s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090992s ] +--------------------------------------------------------------- + +[2021-12-12T13:14:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.917755s] [吞吐率:1.09req/s] [内存消耗:4,886.26kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126947s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089952s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086339s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084247s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087117s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085903s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083229s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084124s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083705s ] +--------------------------------------------------------------- + +[2021-12-12T13:16:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.224270s] [吞吐率:0.82req/s] [内存消耗:4,886.44kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134124s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089858s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088603s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087498s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.088198s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088534s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086310s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084776s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089727s ] +--------------------------------------------------------------- + +[2021-12-12T13:16:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.030109s] [吞吐率:0.97req/s] [内存消耗:4,886.44kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128135s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.187265s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092416s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.104591s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084167s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084371s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.090183s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082265s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081601s ] +--------------------------------------------------------------- + +[2021-12-12T13:16:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.962326s] [吞吐率:1.04req/s] [内存消耗:4,886.44kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.166489s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.099164s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086774s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089602s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.086419s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088305s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089666s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086155s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087661s ] +--------------------------------------------------------------- + +[2021-12-12T13:16:56+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.893097s] [吞吐率:1.12req/s] [内存消耗:4,886.50kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129295s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091941s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088894s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086763s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.088328s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087700s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083407s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083680s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084045s ] +--------------------------------------------------------------- + +[2021-12-12T13:21:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.739848s] [吞吐率:1.35req/s] [内存消耗:4,418.88kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130463s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085422s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083054s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085825s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083076s ] +[ error ] [0]method not exist:app\common\model\Order->orderGoods[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Query.php:180] +--------------------------------------------------------------- + +[2021-12-12T13:22:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.555552s] [吞吐率:1.80req/s] [内存消耗:4,469.81kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129571s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088146s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088933s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084083s ] +[ error ] [0]致命错误: Class 'app\common\model\OrderGoods' not found[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/relation/HasMany.php:35] +--------------------------------------------------------------- + +[2021-12-12T13:24:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.673480s] [吞吐率:1.48req/s] [内存消耗:4,469.81kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127719s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087350s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084884s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086332s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085693s ] +[ error ] [0]致命错误: Class 'app\common\model\OrderGoods' not found[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/relation/HasMany.php:35] +--------------------------------------------------------------- + +[2021-12-12T13:25:22+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.525338s] [吞吐率:1.90req/s] [内存消耗:4,469.80kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126580s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085099s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083185s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089022s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083059s ] +[ error ] [0]致命错误: Class 'app\common\model\OrderGoods' not found[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/relation/HasMany.php:35] +--------------------------------------------------------------- + +[2021-12-12T13:26:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.880001s] [吞吐率:1.14req/s] [内存消耗:4,469.80kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.170931s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085553s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082653s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085300s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083935s ] +[ error ] [0]致命错误: Class 'app\common\model\OrderGoods' not found[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/relation/HasMany.php:35] +--------------------------------------------------------------- + +[2021-12-12T13:28:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.070894s] [吞吐率:0.93req/s] [内存消耗:4,617.17kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128853s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083923s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083082s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081918s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083844s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085063s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081710s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.078109s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081523s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'order_goods.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T13:28:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.289601s] [吞吐率:0.78req/s] [内存消耗:4,675.51kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135309s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091294s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089114s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090381s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087767s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090552s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.090049s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087220s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089253s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.089397s ] +[ error ] [8]未定义变量: lists[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:69] +--------------------------------------------------------------- + +[2021-12-12T13:29:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.996513s] [吞吐率:1.00req/s] [内存消耗:4,669.05kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134323s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088715s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091455s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092777s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.088034s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085238s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083229s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082979s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085729s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084255s ] +[ error ] [0]类的属性不存在:app\common\model\OrderGoods->goods_info[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T13:30:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.077917s] [吞吐率:0.93req/s] [内存消耗:4,966.55kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125672s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087576s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083174s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086482s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085354s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084289s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081096s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080273s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084256s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083067s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080386s ] +--------------------------------------------------------------- + +[2021-12-12T13:30:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/%7B%7B%20item.image%20%7D%7D +[运行时间:0.638849s] [吞吐率:1.57req/s] [内存消耗:4,448.13kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132291s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088893s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086981s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090632s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/{{ item.image }}' LIMIT 1 [ RunTime:0.088043s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088033s ] +--------------------------------------------------------------- + +[2021-12-12T13:32:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.216724s] [吞吐率:0.82req/s] [内存消耗:4,966.68kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133319s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089718s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084191s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086110s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084140s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085051s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082246s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083762s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084198s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082889s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082973s ] +--------------------------------------------------------------- + +[2021-12-12T13:32:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/%7B%7Bitem1.thumb_image%7D%7D +[运行时间:0.783019s] [吞吐率:1.28req/s] [内存消耗:4,448.13kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126943s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085795s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094552s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087213s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/{{item1.thumb_image}}' LIMIT 1 [ RunTime:0.083366s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081972s ] +--------------------------------------------------------------- + +[2021-12-12T13:32:25+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.211748s] [吞吐率:4.72req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T13:32:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.131676s] [吞吐率:0.88req/s] [内存消耗:4,966.68kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134084s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089011s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088704s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091995s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.086228s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088041s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085644s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087811s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087717s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086010s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085002s ] +--------------------------------------------------------------- + +[2021-12-12T13:32:40+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.086357s] [吞吐率:11.58req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T13:32:41+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/%7Bitem1.thumb_image%7D +[运行时间:1.133588s] [吞吐率:0.88req/s] [内存消耗:4,448.13kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.292534s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.138275s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087742s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090386s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/{item1.thumb_image}' LIMIT 1 [ RunTime:0.128730s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090516s ] +--------------------------------------------------------------- + +[2021-12-12T13:32:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.220526s] [吞吐率:0.82req/s] [内存消耗:4,995.53kb] [文件加载:194] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.141453s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.121214s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083188s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089401s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.089797s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084270s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082124s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084168s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085936s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.089408s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082703s ] +[ error ] [0]类的属性不存在:app\common\model\OrderGoods->thumb_image[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T13:33:17+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.070310s] [吞吐率:0.93req/s] [内存消耗:4,793.34kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131393s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.098466s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085813s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.088122s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084528s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082600s ] +[ sql ] [ SQL ] SELECT `o`.*,`mi`.`thumb_image`,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087255s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085357s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086293s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083198s ] +[ error ] [0]类的属性不存在:app\common\model\OrderGoods->thumb_image[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T13:33:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:3.069991s] [吞吐率:0.33req/s] [内存消耗:4,794.49kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133607s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089961s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087224s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089398s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.093493s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.091572s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089189s ] +[ sql ] [ SQL ] SELECT `o`.*,`mi`.`thumb_image`,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.088541s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.091017s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.093370s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089343s ] +[ error ] [0]类的属性不存在:app\common\model\OrderGoods->thumb_image[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T13:34:02+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.081293s] [吞吐率:0.92req/s] [内存消耗:4,548.20kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.144337s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.101966s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.098339s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095840s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087532s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.094629s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087693s ] +[ sql ] [ SQL ] SELECT `o`.*,`mi`.`thumb_image`,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.091844s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090951s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088380s ] +--------------------------------------------------------------- + +[2021-12-12T13:39:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.395016s] [吞吐率:0.72req/s] [内存消耗:4,570.30kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135202s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094437s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086805s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090273s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087556s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088444s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087751s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086590s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090645s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087198s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087939s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086308s ] +--------------------------------------------------------------- + +[2021-12-12T13:39:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.296500s] [吞吐率:0.77req/s] [内存消耗:4,988.17kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132942s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092193s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085013s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086203s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081063s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083948s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082929s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082137s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085793s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082216s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083128s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080955s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082938s ] +--------------------------------------------------------------- + +[2021-12-12T13:39:21+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.320565s] [吞吐率:3.12req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T13:39:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.276760s] [吞吐率:0.78req/s] [内存消耗:4,570.30kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.137791s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088844s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087562s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086927s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.089229s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088280s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083925s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084903s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089091s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085942s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085674s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082946s ] +--------------------------------------------------------------- + +[2021-12-12T13:40:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.124923s] [吞吐率:0.89req/s] [内存消耗:4,573.73kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125134s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093255s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082518s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084160s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081062s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088214s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080233s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082454s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082361s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082365s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082720s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080839s ] +--------------------------------------------------------------- + +[2021-12-12T13:40:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.266048s] [吞吐率:0.79req/s] [内存消耗:4,781.95kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124289s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.141544s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080982s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083901s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081558s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082484s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081219s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.079421s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.080929s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079280s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081033s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079487s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081176s ] +--------------------------------------------------------------- + +[2021-12-12T13:40:42+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.107920s] [吞吐率:9.27req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T13:41:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.228709s] [吞吐率:0.81req/s] [内存消耗:4,988.28kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129968s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087651s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085720s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086479s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083710s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085488s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082582s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083463s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084769s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082586s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086242s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082256s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.091219s ] +--------------------------------------------------------------- + +[2021-12-12T13:41:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.232736s] [吞吐率:0.81req/s] [内存消耗:4,988.56kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124150s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086483s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080916s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083722s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081992s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083495s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084688s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081836s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082788s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082828s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083547s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082850s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082038s ] +--------------------------------------------------------------- + +[2021-12-12T13:42:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.294313s] [吞吐率:0.77req/s] [内存消耗:4,989.28kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135914s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091052s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089675s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093171s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.088237s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.091187s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089068s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.089005s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089023s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.089155s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090665s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086031s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.092379s ] +--------------------------------------------------------------- + +[2021-12-12T13:43:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.217899s] [吞吐率:0.82req/s] [内存消耗:4,989.31kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124582s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083153s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.099484s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083602s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083595s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081585s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080796s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080345s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081966s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081915s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082223s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087179s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079056s ] +--------------------------------------------------------------- + +[2021-12-12T13:43:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.295505s] [吞吐率:0.77req/s] [内存消耗:4,989.31kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130871s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086795s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085105s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088573s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085428s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089546s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086136s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084690s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086457s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086083s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088319s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087746s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085441s ] +--------------------------------------------------------------- + +[2021-12-12T13:43:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.272805s] [吞吐率:0.79req/s] [内存消耗:4,989.63kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124265s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088599s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087884s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.096072s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.086679s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082614s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.096210s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083954s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081497s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081320s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082843s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080860s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082550s ] +--------------------------------------------------------------- + +[2021-12-12T13:44:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.457024s] [吞吐率:0.69req/s] [内存消耗:4,989.63kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130044s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084834s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082376s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087858s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081485s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.322209s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083777s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081189s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082409s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080337s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.091200s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082725s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083253s ] +--------------------------------------------------------------- + +[2021-12-12T13:44:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.273285s] [吞吐率:0.79req/s] [内存消耗:4,989.31kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129314s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089191s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086860s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091054s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.093105s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088060s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087013s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086741s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.091206s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086936s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086522s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085137s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085368s ] +--------------------------------------------------------------- + +[2021-12-12T13:45:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.322055s] [吞吐率:0.76req/s] [内存消耗:4,786.20kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131481s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089423s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084187s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087292s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084321s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086833s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083787s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083902s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085510s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085599s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086212s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084830s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086165s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085891s ] +--------------------------------------------------------------- + +[2021-12-12T13:48:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.753079s] [吞吐率:0.57req/s] [内存消耗:5,023.13kb] [文件加载:195] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123878s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.169909s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.099552s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088069s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.101111s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.162027s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086531s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080360s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.079847s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079420s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.100047s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.220666s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.098234s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081989s ] +[ error ] [0]类的属性不存在:app\common\model\Order->delivery_address[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T13:50:22+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.352083s] [吞吐率:0.74req/s] [内存消耗:4,819.89kb] [文件加载:193] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135176s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091224s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093158s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089911s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087004s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090506s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085220s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087384s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087975s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086485s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086928s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089871s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085377s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085156s ] +[ error ] [0]类的属性不存在:app\common\model\Order->delivery_address[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T13:54:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.524233s] [吞吐率:0.66req/s] [内存消耗:4,826.68kb] [文件加载:194] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131247s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089461s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090254s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087237s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.091142s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089105s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087276s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086206s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087529s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086046s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089958s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087051s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086768s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086552s ] +[ error ] [0]致命错误: Class 'app\common\model\Db' not found[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:47] +--------------------------------------------------------------- + +[2021-12-12T13:54:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.436443s] [吞吐率:0.70req/s] [内存消耗:4,787.22kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128967s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083218s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085862s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082605s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.079324s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081759s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.078943s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081323s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082106s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084956s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079613s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080413s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080937s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081018s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.079664s ] +--------------------------------------------------------------- + +[2021-12-12T13:55:18+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.595594s] [吞吐率:0.63req/s] [内存消耗:4,994.68kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133558s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093704s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090344s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092772s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.089955s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.092801s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.088661s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.089323s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.093695s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.089175s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.092760s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087728s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087301s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088258s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.092425s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087229s ] +--------------------------------------------------------------- + +[2021-12-12T13:55:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.526515s] [吞吐率:0.66req/s] [内存消耗:4,994.68kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128755s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089835s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088625s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087555s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087080s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088988s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085623s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086391s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088963s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087517s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088082s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085975s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086771s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085038s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087988s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086801s ] +--------------------------------------------------------------- + +[2021-12-12T13:58:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.522343s] [吞吐率:0.66req/s] [内存消耗:4,995.06kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132405s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086194s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088115s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086446s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.082735s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087264s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085717s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086038s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083635s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085536s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084816s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083849s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083258s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083851s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083588s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085334s ] +--------------------------------------------------------------- + +[2021-12-12T13:58:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:1.460782s] [吞吐率:0.68req/s] [内存消耗:4,760.12kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131558s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087202s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088108s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088813s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.089515s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088214s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.092535s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.095167s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084244s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085005s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085033s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091269s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083629s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083428s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.089399s ] +--------------------------------------------------------------- + +[2021-12-12T13:58:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:1.465047s] [吞吐率:0.68req/s] [内存消耗:4,760.12kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129652s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087605s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087035s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087421s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085625s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090087s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084713s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085958s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087438s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087972s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087825s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085190s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.123228s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.089148s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084920s ] +--------------------------------------------------------------- + +[2021-12-12T13:59:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.555254s] [吞吐率:0.64req/s] [内存消耗:4,995.06kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.137716s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093871s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093709s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.099991s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087371s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088304s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086925s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085707s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086120s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084589s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086311s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084966s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085441s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087961s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086207s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084091s ] +--------------------------------------------------------------- + +[2021-12-12T13:59:17+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.106009s] [吞吐率:9.43req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T13:59:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.811292s] [吞吐率:0.55req/s] [内存消耗:4,995.15kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.157026s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.137556s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094215s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.096865s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085241s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085070s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085691s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087923s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.095556s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.092894s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086980s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083211s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092145s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081788s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083915s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084190s ] +--------------------------------------------------------------- + +[2021-12-12T13:59:37+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.057878s] [吞吐率:17.28req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T13:59:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:0.964643s] [吞吐率:1.04req/s] [内存消耗:4,453.66kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.146731s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.103857s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083506s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095857s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.150822s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.100969s ] +--------------------------------------------------------------- + +[2021-12-12T13:59:44+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.057564s] [吞吐率:17.37req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:00:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.149276s] [吞吐率:0.87req/s] [内存消耗:4,453.66kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135532s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087149s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087019s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088115s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.091075s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090960s ] +--------------------------------------------------------------- + +[2021-12-12T14:01:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.618352s] [吞吐率:0.62req/s] [内存消耗:4,787.73kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138080s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093842s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090455s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091776s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.093588s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.091610s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087879s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.088188s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.092110s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.096052s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090142s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088524s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090030s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.091095s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.090616s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.089138s ] +--------------------------------------------------------------- + +[2021-12-12T14:01:41+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:0.627712s] [吞吐率:1.59req/s] [内存消耗:4,492.43kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124684s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082260s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081956s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082421s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.080833s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081298s ] +[ error ] [0]模板文件不存在:/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/layout2.html[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/Template.php:1243] +--------------------------------------------------------------- + +[2021-12-12T14:02:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:0.668650s] [吞吐率:1.50req/s] [内存消耗:4,582.29kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132445s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091701s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088822s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087470s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087482s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087580s ] +--------------------------------------------------------------- + +[2021-12-12T14:03:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:0.656515s] [吞吐率:1.52req/s] [内存消耗:4,599.63kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128531s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086118s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083310s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085810s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085115s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083850s ] +--------------------------------------------------------------- + +[2021-12-12T14:04:02+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:0.716670s] [吞吐率:1.40req/s] [内存消耗:4,695.36kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.147407s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093202s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092158s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091615s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.091578s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090635s ] +[ error ] [8]未定义变量: detail[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/2cecbf307bb2a2f20f68478a2a89a5fc.php:120] +--------------------------------------------------------------- + +[2021-12-12T14:05:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:0.820896s] [吞吐率:1.22req/s] [内存消耗:4,545.32kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132379s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088140s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088541s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087349s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085050s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090078s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083736s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085173s ] +[ error ] [0]类的属性不存在:app\common\model\Order->order_type_text[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T14:06:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:0.853027s] [吞吐率:1.17req/s] [内存消耗:4,734.81kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.137240s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092269s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087115s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088407s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.086929s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088188s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087655s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088657s ] +[ error ] [0]类的属性不存在:app\common\model\Order->user[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T14:07:47+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:0.633191s] [吞吐率:1.58req/s] [内存消耗:4,424.03kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.223853s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084614s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082757s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084516s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083625s ] +[ error ] [0]method not exist:app\common\model\Order->user[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Query.php:180] +--------------------------------------------------------------- + +[2021-12-12T14:08:17+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:0.920160s] [吞吐率:1.09req/s] [内存消耗:4,609.62kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133988s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087627s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086769s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086522s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085026s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087095s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086896s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086846s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'level' in 'field list'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T14:08:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.077926s] [吞吐率:0.93req/s] [内存消耗:4,734.20kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131621s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087132s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091784s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085441s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087050s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086851s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086612s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088796s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084570s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086614s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088015s ] +[ error ] [8]未定义变量: data[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:102] +--------------------------------------------------------------- + +[2021-12-12T14:08:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.161271s] [吞吐率:0.86req/s] [内存消耗:4,853.74kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128470s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085868s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083975s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085141s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083774s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084878s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085001s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084774s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082840s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083569s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083580s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080721s ] +[ error ] [0]类的属性不存在:app\common\model\User->sex[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T14:09:15+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.357653s] [吞吐率:0.74req/s] [内存消耗:5,041.05kb] [文件加载:194] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133034s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092146s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089928s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086904s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.089170s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088589s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084402s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085870s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085140s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084781s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085157s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084661s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083044s ] +[ error ] [0]类的属性不存在:app\common\model\OrderGoods->goods_image[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T14:09:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.020252s] [吞吐率:0.98req/s] [内存消耗:4,734.98kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.120825s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081480s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079343s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082358s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.080439s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081392s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083976s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080894s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079547s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.080683s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084890s ] +[ error ] [8]未定义变量: mimodel[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:100] +--------------------------------------------------------------- + +[2021-12-12T14:10:00+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.610386s] [吞吐率:0.62req/s] [内存消耗:4,872.97kb] [文件加载:193] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132600s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092570s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088859s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087884s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.084713s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086850s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085010s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085582s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084053s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085111s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083869s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084877s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083725s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083282s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083512s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.088824s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083829s ] +[ error ] [0]类的属性不存在:app\common\model\OrderGoods->goods_image[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T14:11:15+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.576226s] [吞吐率:0.63req/s] [内存消耗:5,058.34kb] [文件加载:197] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131610s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088219s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089863s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084571s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.084640s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085501s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082333s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084210s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082256s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084109s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082934s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083693s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081823s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082661s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084461s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084136s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083386s ] +[ error ] [8]未定义变量: front_version[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/2cecbf307bb2a2f20f68478a2a89a5fc.php:261] +--------------------------------------------------------------- + +[2021-12-12T14:11:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.588593s] [吞吐率:0.63req/s] [内存消耗:4,998.59kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129531s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088928s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087775s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088314s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085966s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087941s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083560s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087770s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084292s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085411s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083155s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085034s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082897s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084341s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083028s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085211s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083125s ] +--------------------------------------------------------------- + +[2021-12-12T14:11:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.634956s] [吞吐率:1.57req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122308s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082276s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080043s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082203s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.080055s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079096s ] +--------------------------------------------------------------- + +[2021-12-12T14:12:04+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.600449s] [吞吐率:0.62req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134928s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088670s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087983s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086489s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087274s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087032s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088972s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088296s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086401s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088583s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086115s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085640s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085668s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084215s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083670s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085790s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085004s ] +--------------------------------------------------------------- + +[2021-12-12T14:12:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.614816s] [吞吐率:1.63req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126653s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086578s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085448s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083655s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.083848s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082315s ] +--------------------------------------------------------------- + +[2021-12-12T14:12:16+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.987650s] [吞吐率:0.50req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133087s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088149s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086541s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091198s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085999s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085732s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086012s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088883s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087112s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085547s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082610s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084122s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083430s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083310s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.196786s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.206199s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.227216s ] +--------------------------------------------------------------- + +[2021-12-12T14:12:17+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:1.011863s] [吞吐率:0.99req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.382752s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.208158s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082461s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086613s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.085684s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083067s ] +--------------------------------------------------------------- + +[2021-12-12T14:13:04+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:1.237217s] [吞吐率:0.81req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:14:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.588947s] [吞吐率:0.63req/s] [内存消耗:4,998.34kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.120092s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083599s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079216s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.080742s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.078726s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.080169s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079740s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081068s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078385s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081044s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086616s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.079999s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084796s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078199s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.078603s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.080001s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.077478s ] +--------------------------------------------------------------- + +[2021-12-12T14:14:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.684048s] [吞吐率:1.46req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129527s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086982s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087408s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088903s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.090932s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085507s ] +--------------------------------------------------------------- + +[2021-12-12T14:15:13+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.348158s] [吞吐率:2.87req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:15:52+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.062631s] [吞吐率:15.97req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:18:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.978603s] [吞吐率:0.51req/s] [内存消耗:4,998.34kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126007s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.101400s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083678s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085943s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085094s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087314s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080839s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083595s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081775s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083069s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082762s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085608s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087002s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080674s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081703s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081893s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084351s ] +--------------------------------------------------------------- + +[2021-12-12T14:18:06+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.224869s] [吞吐率:4.45req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:18:07+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.726331s] [吞吐率:1.38req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.142564s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091584s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087029s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088052s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.090677s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085707s ] +--------------------------------------------------------------- + +[2021-12-12T14:18:45+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:2.104440s] [吞吐率:0.48req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127805s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083705s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081941s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085788s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.082122s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085642s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081799s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083578s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081307s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088152s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082149s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084357s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081091s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082980s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082671s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083466s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086187s ] +--------------------------------------------------------------- + +[2021-12-12T14:18:46+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.436016s] [吞吐率:2.29req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:18:47+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.997038s] [吞吐率:1.00req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133153s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089220s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082099s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093298s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.084463s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085872s ] +--------------------------------------------------------------- + +[2021-12-12T14:18:56+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:2.125967s] [吞吐率:0.47req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.166666s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085604s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090818s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086975s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.093584s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086906s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083375s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086210s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087006s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084676s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.089233s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089131s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084925s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084511s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083333s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084958s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086372s ] +--------------------------------------------------------------- + +[2021-12-12T14:18:56+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.048748s] [吞吐率:20.51req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:18:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.784980s] [吞吐率:1.27req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.137315s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092252s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090579s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.151710s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.090272s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.095842s ] +--------------------------------------------------------------- + +[2021-12-12T14:19:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.702875s] [吞吐率:0.59req/s] [内存消耗:4,791.16kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138492s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088733s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087220s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088428s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087634s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088314s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085827s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.095036s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089695s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087078s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088814s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086425s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086444s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087914s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.090483s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.091552s ] +--------------------------------------------------------------- + +[2021-12-12T14:19:23+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.109537s] [吞吐率:9.13req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:19:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.673275s] [吞吐率:0.60req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135744s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088941s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086086s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088685s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087382s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088024s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086625s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087161s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085330s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087611s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085205s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087146s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085671s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085327s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087317s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087974s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085487s ] +--------------------------------------------------------------- + +[2021-12-12T14:19:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.696812s] [吞吐率:1.44req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131095s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087337s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085922s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089168s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.086635s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085207s ] +--------------------------------------------------------------- + +[2021-12-12T14:19:31+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.062726s] [吞吐率:15.94req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:20:13+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.506016s] [吞吐率:0.66req/s] [内存消耗:4,791.16kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130307s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090036s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083711s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087362s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084127s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085143s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086204s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.096656s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084741s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085111s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087059s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084542s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083554s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083762s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087545s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084545s ] +--------------------------------------------------------------- + +[2021-12-12T14:20:13+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.038094s] [吞吐率:26.25req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:20:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.658073s] [吞吐率:0.60req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.149450s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087455s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082856s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084782s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.081551s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082822s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081642s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084032s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080206s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084150s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082951s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085851s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085386s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082454s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080194s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082719s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081948s ] +--------------------------------------------------------------- + +[2021-12-12T14:20:19+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.045398s] [吞吐率:22.03req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:20:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.685934s] [吞吐率:1.46req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124635s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084673s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079652s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085701s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.079844s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080392s ] +--------------------------------------------------------------- + +[2021-12-12T14:20:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.837013s] [吞吐率:0.54req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.140941s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092893s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095635s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.111972s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.098332s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088676s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087196s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089981s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.089098s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087721s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088577s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086894s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091276s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085095s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088286s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.089276s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085593s ] +--------------------------------------------------------------- + +[2021-12-12T14:20:50+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.071133s] [吞吐率:14.06req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:20:51+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.766000s] [吞吐率:1.31req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129551s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085149s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083140s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085926s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.129685s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087717s ] +--------------------------------------------------------------- + +[2021-12-12T14:21:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.825507s] [吞吐率:0.55req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135035s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094737s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.114180s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087912s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087873s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089818s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087012s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088037s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087957s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.091336s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088529s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086835s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086860s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086403s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086582s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.090053s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084638s ] +--------------------------------------------------------------- + +[2021-12-12T14:21:11+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.044521s] [吞吐率:22.46req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:21:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.737711s] [吞吐率:1.36req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129989s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085179s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085881s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087370s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.091399s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084800s ] +--------------------------------------------------------------- + +[2021-12-12T14:21:45+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.725087s] [吞吐率:0.58req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134917s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085883s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088693s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.097191s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.086891s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085917s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090988s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086477s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085995s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084020s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084102s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085362s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091228s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083565s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085855s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085561s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082992s ] +--------------------------------------------------------------- + +[2021-12-12T14:21:45+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.051827s] [吞吐率:19.29req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:21:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.734749s] [吞吐率:1.36req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130017s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086120s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083184s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086673s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.083696s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084942s ] +--------------------------------------------------------------- + +[2021-12-12T14:22:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:2.337769s] [吞吐率:0.43req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133916s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.097649s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083044s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088987s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.090513s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085943s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083539s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090263s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083831s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083779s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.095014s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.118532s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086631s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082425s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083736s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084313s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082396s ] +--------------------------------------------------------------- + +[2021-12-12T14:22:20+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.230034s] [吞吐率:4.35req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:22:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.738239s] [吞吐率:1.35req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130815s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092538s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088452s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088934s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.085150s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085293s ] +--------------------------------------------------------------- + +[2021-12-12T14:23:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.940064s] [吞吐率:0.52req/s] [内存消耗:4,998.47kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123342s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084749s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081325s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085115s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.081731s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083524s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083535s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080300s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080011s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.080476s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.078252s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.079978s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084295s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083699s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079148s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.080102s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083079s ] +--------------------------------------------------------------- + +[2021-12-12T14:23:11+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.056913s] [吞吐率:17.57req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:23:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.696686s] [吞吐率:1.44req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126813s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085416s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093049s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.084320s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083465s ] +--------------------------------------------------------------- + +[2021-12-12T14:24:18+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.387078s] [吞吐率:2.58req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:25:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.895715s] [吞吐率:0.53req/s] [内存消耗:4,996.88kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.146763s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089383s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087272s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092815s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.094633s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.091431s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.091253s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084997s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086665s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088711s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.091947s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088001s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083280s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083263s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085920s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083972s ] +--------------------------------------------------------------- + +[2021-12-12T14:25:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.674459s] [吞吐率:1.48req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125687s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085453s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082435s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084775s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.087833s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084625s ] +--------------------------------------------------------------- + +[2021-12-12T14:26:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.607789s] [吞吐率:0.62req/s] [内存消耗:4,819.84kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128842s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087725s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085319s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089843s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085699s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086912s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090037s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087845s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083625s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086524s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086643s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087904s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088077s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085771s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086984s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086492s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084528s ] +--------------------------------------------------------------- + +[2021-12-12T14:26:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.625371s] [吞吐率:1.60req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125379s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083527s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081226s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084972s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.081438s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081184s ] +--------------------------------------------------------------- + +[2021-12-12T14:28:32+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.398760s] [吞吐率:2.51req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:29:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.455507s] [吞吐率:0.69req/s] [内存消耗:4,791.21kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128284s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085867s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085087s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085187s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.082507s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083405s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080765s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081256s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082185s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086010s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082244s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079671s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081848s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081211s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082536s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081154s ] +--------------------------------------------------------------- + +[2021-12-12T14:29:26+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.049353s] [吞吐率:20.26req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:29:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.620166s] [吞吐率:0.62req/s] [内存消耗:4,996.53kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130735s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088568s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085447s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089819s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087048s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087142s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084715s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090072s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086834s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085559s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083180s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085473s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083050s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084204s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083703s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085252s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.090376s ] +--------------------------------------------------------------- + +[2021-12-12T14:29:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.793983s] [吞吐率:1.26req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133767s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086648s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085465s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087516s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.084253s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084933s ] +--------------------------------------------------------------- + +[2021-12-12T14:31:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.724832s] [吞吐率:0.58req/s] [内存消耗:4,996.53kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.140848s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091679s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088403s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090706s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.089847s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090847s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086945s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090776s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.092853s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.091700s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087910s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090480s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087983s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090490s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089758s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.089318s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086934s ] +--------------------------------------------------------------- + +[2021-12-12T14:31:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.694163s] [吞吐率:1.44req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125062s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083704s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082789s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083402s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.080740s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080597s ] +--------------------------------------------------------------- + +[2021-12-12T14:33:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.870928s] [吞吐率:0.53req/s] [内存消耗:4,996.53kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129930s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085654s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083064s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087473s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083957s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085846s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084206s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085114s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082596s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085488s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085289s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085287s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089805s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082508s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084607s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084880s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.093642s ] +--------------------------------------------------------------- + +[2021-12-12T14:33:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.704325s] [吞吐率:1.42req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125487s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082531s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089397s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082967s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.079364s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081466s ] +--------------------------------------------------------------- + +[2021-12-12T14:34:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.559361s] [吞吐率:0.64req/s] [内存消耗:4,819.65kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131621s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.095957s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085444s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082286s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.081692s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083514s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081141s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083273s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080507s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082619s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080156s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082575s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081105s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081458s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081689s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082663s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.079092s ] +--------------------------------------------------------------- + +[2021-12-12T14:34:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.615081s] [吞吐率:1.63req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128759s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089154s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083332s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085807s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.082383s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082837s ] +--------------------------------------------------------------- + +[2021-12-12T14:37:32+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.182097s] [吞吐率:5.49req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:38:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.616393s] [吞吐率:0.62req/s] [内存消耗:4,988.86kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125491s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086153s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083833s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085580s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.166430s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086165s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083066s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083436s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080016s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083972s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080403s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084132s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081087s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079194s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082514s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082102s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081922s ] +--------------------------------------------------------------- + +[2021-12-12T14:38:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.600054s] [吞吐率:1.67req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.121902s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081419s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081287s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083814s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.084972s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080241s ] +--------------------------------------------------------------- + +[2021-12-12T14:38:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.530849s] [吞吐率:0.65req/s] [内存消耗:4,816.08kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.120993s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086488s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081028s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081972s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.081186s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082608s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079883s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082576s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080891s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082851s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082645s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082876s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081539s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.077635s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.078204s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.099457s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.077611s ] +--------------------------------------------------------------- + +[2021-12-12T14:38:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.654407s] [吞吐率:1.53req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130202s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086871s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084734s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085557s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.083906s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.097368s ] +--------------------------------------------------------------- + +[2021-12-12T14:39:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.862321s] [吞吐率:0.54req/s] [内存消耗:4,988.61kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132510s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089354s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087748s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090428s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087869s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087705s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085695s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088038s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.092627s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089677s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086977s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086958s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085637s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085438s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084599s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087094s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085295s ] +--------------------------------------------------------------- + +[2021-12-12T14:39:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.631385s] [吞吐率:1.58req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124167s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083278s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081451s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083752s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.082622s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081110s ] +--------------------------------------------------------------- + +[2021-12-12T14:39:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.550949s] [吞吐率:0.64req/s] [内存消耗:4,791.21kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133036s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088973s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.129538s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089912s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.086048s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087927s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085654s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087066s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087435s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084616s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088691s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086812s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086787s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086046s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087362s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084910s ] +--------------------------------------------------------------- + +[2021-12-12T14:39:50+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.065230s] [吞吐率:15.33req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:39:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.531163s] [吞吐率:0.65req/s] [内存消耗:4,815.95kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127401s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086315s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083600s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083061s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.088426s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085340s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081324s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085662s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083724s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085404s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079136s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083538s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081130s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083479s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080887s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083376s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080172s ] +--------------------------------------------------------------- + +[2021-12-12T14:39:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.586924s] [吞吐率:1.70req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.121762s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083757s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085555s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082930s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.083122s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081309s ] +--------------------------------------------------------------- + +[2021-12-12T14:41:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.854395s] [吞吐率:0.54req/s] [内存消耗:4,988.61kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131581s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087803s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091128s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087121s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085803s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086422s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085665s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088401s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085330s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086175s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085223s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090873s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086018s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.098000s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086399s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085636s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082726s ] +--------------------------------------------------------------- + +[2021-12-12T14:41:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.js +[运行时间:0.645892s] [吞吐率:1.55req/s] [内存消耗:4,455.31kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130775s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091361s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086912s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092762s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index.js' LIMIT 1 [ RunTime:0.089578s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085710s ] +--------------------------------------------------------------- + +[2021-12-12T14:45:00+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.942610s] [吞吐率:0.51req/s] [内存消耗:4,988.97kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130268s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086929s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085050s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090409s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083732s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086698s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082751s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084859s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082767s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.093526s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083554s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.091523s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092453s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.112463s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080546s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.094878s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086227s ] +--------------------------------------------------------------- + +[2021-12-12T14:45:08+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.128624s] [吞吐率:7.77req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:45:16+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.628325s] [吞吐率:0.61req/s] [内存消耗:4,816.23kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129227s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093074s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084078s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086777s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087346s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085399s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084371s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086464s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.090487s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085485s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088775s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084260s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082907s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081141s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083479s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083506s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081944s ] +--------------------------------------------------------------- + +[2021-12-12T14:45:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.737856s] [吞吐率:0.58req/s] [内存消耗:4,988.97kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.157396s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090897s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089091s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090769s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.089327s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090197s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089993s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.093746s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087170s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090638s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088218s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089406s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092091s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087611s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088312s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.088809s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087550s ] +--------------------------------------------------------------- + +[2021-12-12T14:46:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.615508s] [吞吐率:0.62req/s] [内存消耗:4,988.97kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133663s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088638s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085279s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088317s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085369s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086735s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085137s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085995s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084338s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085239s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086979s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085417s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082664s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083715s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083774s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084511s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.088245s ] +--------------------------------------------------------------- + +[2021-12-12T14:47:49+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.530657s] [吞吐率:0.65req/s] [内存消耗:4,989.19kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.121211s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.080240s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080858s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081516s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.081953s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082696s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078553s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080296s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078410s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.080215s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.076668s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.078251s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081109s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079140s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082275s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081866s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082317s ] +--------------------------------------------------------------- + +[2021-12-12T14:47:50+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/lib/index.js?v=2.6.6.20211117 +[运行时间:0.157258s] [吞吐率:6.36req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:48:11+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.078079s] [吞吐率:12.81req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:48:16+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.615295s] [吞吐率:0.62req/s] [内存消耗:4,816.45kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130294s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086051s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085755s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087767s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.090027s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084937s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085051s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086634s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084579s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086767s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085500s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088819s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084057s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083738s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082539s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085937s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087295s ] +--------------------------------------------------------------- + +[2021-12-12T14:48:16+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/lib/index.js?v=2.6.6.20211117 +[运行时间:0.144219s] [吞吐率:6.93req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:49:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.760765s] [吞吐率:0.57req/s] [内存消耗:4,989.38kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126495s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084909s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084259s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083918s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.081066s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083826s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080589s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083151s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085824s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083150s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081431s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083148s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081833s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084473s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080297s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081337s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080173s ] +--------------------------------------------------------------- + +[2021-12-12T14:49:33+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/style/like.css?v=2.6.6.20211117 +[运行时间:0.070052s] [吞吐率:14.28req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:49:33+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/index.js?v=2.6.6.20211117 +[运行时间:0.055515s] [吞吐率:18.01req/s] [内存消耗:2,246.69kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:49:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.640665s] [吞吐率:0.61req/s] [内存消耗:4,989.38kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135155s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087348s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085576s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086997s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.090103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086906s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083915s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089942s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.090129s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087304s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085162s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086283s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096878s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084517s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085929s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086952s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084550s ] +--------------------------------------------------------------- + +[2021-12-12T14:49:54+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/index.js?v=2.6.6.20211117 +[运行时间:0.054728s] [吞吐率:18.27req/s] [内存消耗:2,246.69kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:50:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.560394s] [吞吐率:0.64req/s] [内存消耗:4,816.64kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125522s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.095271s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085620s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083964s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083377s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086886s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082485s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084309s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.089779s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087424s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083660s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083672s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084176s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083304s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081783s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083207s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080281s ] +--------------------------------------------------------------- + +[2021-12-12T14:50:05+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/index.js?v=2.6.6.20211117 +[运行时间:0.039290s] [吞吐率:25.45req/s] [内存消耗:2,246.69kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:50:10+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.148955s] [吞吐率:6.71req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:51:15+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.626941s] [吞吐率:0.61req/s] [内存消耗:4,989.38kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125992s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086188s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082953s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084772s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.081939s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084283s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083825s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084409s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086535s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084437s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081384s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083555s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089422s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088540s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082387s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084476s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080688s ] +--------------------------------------------------------------- + +[2021-12-12T14:51:15+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/lib/index.js?v=2.6.6.20211117 +[运行时间:0.036554s] [吞吐率:27.36req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:51:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:2.490586s] [吞吐率:0.40req/s] [内存消耗:4,989.38kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124695s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085837s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084687s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.080925s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082626s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082787s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084096s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082404s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085499s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083505s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086454s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082783s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082880s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084650s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084347s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087925s ] +--------------------------------------------------------------- + +[2021-12-12T14:52:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.631290s] [吞吐率:0.61req/s] [内存消耗:4,816.64kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136895s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089487s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087972s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089673s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087626s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088739s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094110s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086896s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.091845s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088528s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083694s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085637s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085652s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083665s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086843s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086321s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084015s ] +--------------------------------------------------------------- + +[2021-12-12T14:52:07+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:0.667295s] [吞吐率:1.50req/s] [内存消耗:4,456.84kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133381s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093133s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088484s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088558s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.088076s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087186s ] +--------------------------------------------------------------- + +[2021-12-12T14:55:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.798399s] [吞吐率:0.56req/s] [内存消耗:5,026.22kb] [文件加载:195] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125104s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085661s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083008s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083630s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.081365s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086397s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083500s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082772s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081123s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084225s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082593s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086510s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085663s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079470s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081030s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082167s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.079687s ] +[ error ] [0]类的属性不存在:app\common\model\OrderGoods->goods_image[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T14:56:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.738509s] [吞吐率:0.58req/s] [内存消耗:5,032.52kb] [文件加载:197] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.144956s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.099563s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091216s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093946s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.100492s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.093548s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092641s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.094456s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.091628s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.095989s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.091661s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.092699s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091722s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092472s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.094622s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.091208s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.096757s ] +[ error ] [8]未定义变量: express[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/e6266d45db3278f17e4e1ffe3702b1e5.php:140] +--------------------------------------------------------------- + +[2021-12-12T14:56:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.629777s] [吞吐率:0.61req/s] [内存消耗:4,972.35kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136294s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091189s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086118s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088938s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.087687s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088395s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085904s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088582s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085217s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089715s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085224s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086694s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083755s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084528s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085374s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086776s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083628s ] +--------------------------------------------------------------- + +[2021-12-12T14:56:42+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/lib/index.js?v=2.6.6.20211117 +[运行时间:0.047500s] [吞吐率:21.05req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T14:56:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.524970s] [吞吐率:0.66req/s] [内存消耗:4,972.35kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123751s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083712s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085025s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082553s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.080350s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082553s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081436s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085741s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080504s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082681s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083958s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081040s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081996s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079124s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080197s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.080404s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084182s ] +--------------------------------------------------------------- + +[2021-12-12T14:56:57+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/lib/index.js?v=2.6.6.20211117 +[运行时间:0.060187s] [吞吐率:16.61req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T15:56:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:2.093717s] [吞吐率:0.48req/s] [内存消耗:4,972.73kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.139313s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091587s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093328s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091812s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.087576s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087189s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086756s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086783s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084315s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087494s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084885s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087780s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085464s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093225s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085766s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087086s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085043s ] +--------------------------------------------------------------- + +[2021-12-12T15:56:32+08:00] 127.0.0.1 GET www.dggjimai.com/static/plug/layui-admin/dist/layuiadmin/lib/index.js?v=2.6.6.20211117 +[运行时间:0.059160s] [吞吐率:16.90req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T15:56:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.806818s] [吞吐率:0.55req/s] [内存消耗:4,972.73kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.139000s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091195s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089161s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090019s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.088290s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090004s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089959s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.091835s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.088252s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090010s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.092159s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090776s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088353s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094517s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088868s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.089997s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086695s ] +--------------------------------------------------------------- + +[2021-12-12T15:57:04+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.615441s] [吞吐率:0.62req/s] [内存消耗:4,972.23kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126189s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083323s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081291s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083958s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.081849s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.080811s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079674s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082722s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079911s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083394s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079910s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084461s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080423s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081002s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081476s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081060s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.088044s ] +--------------------------------------------------------------- + +[2021-12-12T15:57:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.653495s] [吞吐率:0.60req/s] [内存消耗:4,991.25kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134853s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084200s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083364s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084765s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087234s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085414s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083667s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084768s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082019s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085407s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082896s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084481s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082314s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084979s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082535s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084496s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081420s ] +--------------------------------------------------------------- + +[2021-12-12T15:57:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.784467s] [吞吐率:0.56req/s] [内存消耗:4,991.50kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.143723s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092282s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090486s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093142s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.089751s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.095555s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091757s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.091323s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087946s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090729s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.093885s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090897s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087738s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088078s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090172s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.091919s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.088199s ] +--------------------------------------------------------------- + +[2021-12-12T15:57:41+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.651580s] [吞吐率:0.61req/s] [内存消耗:4,818.84kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133367s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084961s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089619s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087041s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.082653s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086125s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083753s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086433s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082365s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087579s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.089665s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086261s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082272s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082735s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084541s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.088011s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082920s ] +--------------------------------------------------------------- + +[2021-12-12T15:57:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.516092s] [吞吐率:0.66req/s] [内存消耗:4,815.19kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124424s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082712s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081320s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081972s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.082787s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084128s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079858s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084589s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081610s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081161s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079466s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082538s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080089s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080617s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080782s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.080876s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.078766s ] +--------------------------------------------------------------- + +[2021-12-12T15:57:47+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.620484s] [吞吐率:1.61req/s] [内存消耗:4,459.28kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125296s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086947s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084580s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091422s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.083850s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082243s ] +--------------------------------------------------------------- + +[2021-12-12T15:58:13+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.320370s] [吞吐率:3.12req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T15:58:17+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.702307s] [吞吐率:1.42req/s] [内存消耗:4,459.28kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128317s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082662s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081600s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082528s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.084302s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079915s ] +--------------------------------------------------------------- + +[2021-12-12T15:58:21+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.768872s] [吞吐率:1.30req/s] [内存消耗:4,459.28kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127273s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.176993s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087858s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088174s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.084282s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.097261s ] +--------------------------------------------------------------- + +[2021-12-12T16:04:01+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.897672s] [吞吐率:1.11req/s] [内存消耗:4,386.36kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.200120s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085041s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087534s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088366s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.087116s ] +[ error ] [0]方法参数错误:id[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/Container.php:480] +--------------------------------------------------------------- + +[2021-12-12T16:04:20+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.641168s] [吞吐率:1.56req/s] [内存消耗:4,395.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.140441s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094487s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095253s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093461s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.091080s ] +--------------------------------------------------------------- + +[2021-12-12T16:04:27+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.530407s] [吞吐率:1.89req/s] [内存消耗:4,395.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131887s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086923s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089548s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087576s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.086386s ] +--------------------------------------------------------------- + +[2021-12-12T16:04:53+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.057284s] [吞吐率:17.46req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T16:04:56+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.568533s] [吞吐率:1.76req/s] [内存消耗:4,395.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126890s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085066s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086605s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084541s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.086973s ] +--------------------------------------------------------------- + +[2021-12-12T16:06:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.644692s] [吞吐率:0.61req/s] [内存消耗:4,974.59kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133627s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088012s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086678s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088488s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.087341s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086498s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083533s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085505s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083945s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084791s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083368s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084645s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084857s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084597s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087589s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.089356s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083127s ] +--------------------------------------------------------------- + +[2021-12-12T16:06:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.596103s] [吞吐率:0.63req/s] [内存消耗:4,974.59kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134481s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090202s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088387s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092820s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.086938s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087292s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086217s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089425s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085762s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087080s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086001s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086953s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084051s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083548s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086181s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085527s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082495s ] +--------------------------------------------------------------- + +[2021-12-12T16:06:46+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.543482s] [吞吐率:1.84req/s] [内存消耗:4,395.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136051s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093207s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088910s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090466s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.089832s ] +--------------------------------------------------------------- + +[2021-12-12T16:06:53+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.532767s] [吞吐率:1.88req/s] [内存消耗:4,395.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130085s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091888s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087683s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087436s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.086851s ] +--------------------------------------------------------------- + +[2021-12-12T16:06:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.566898s] [吞吐率:0.64req/s] [内存消耗:4,974.59kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128447s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090471s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083287s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085321s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.084042s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084783s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085020s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.088251s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086140s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080517s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085353s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089876s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083083s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083199s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084330s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087358s ] +--------------------------------------------------------------- + +[2021-12-12T16:07:00+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.620308s] [吞吐率:1.61req/s] [内存消耗:4,395.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127305s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089904s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086261s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086101s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.088516s ] +--------------------------------------------------------------- + +[2021-12-12T16:07:04+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.505861s] [吞吐率:1.98req/s] [内存消耗:4,395.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124111s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087652s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082246s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083707s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.081254s ] +--------------------------------------------------------------- + +[2021-12-12T16:12:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/index.html?_pjax=%23pjax-container +[运行时间:0.772538s] [吞吐率:1.29req/s] [内存消耗:4,432.61kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/index.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133729s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088413s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086310s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087874s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/index' LIMIT 1 [ RunTime:0.085719s ] +--------------------------------------------------------------- + +[2021-12-12T16:12:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/add.html?_pjax=%23pjax-container +[运行时间:0.766913s] [吞吐率:1.30req/s] [内存消耗:4,728.48kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/generate/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/add.html [ array ( + 0 => 'table', + 1 => 'menus', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138853s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087968s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085363s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087423s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/add' LIMIT 1 [ RunTime:0.085703s ] +[ sql ] [ SQL ] SHOW TABLES [ RunTime:0.086102s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087818s ] +--------------------------------------------------------------- + +[2021-12-12T16:12:46+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/getField +[运行时间:0.727467s] [吞吐率:1.37req/s] [内存消耗:4,595.81kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '15', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => 'hcy_notice', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.119370s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083042s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081449s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.080836s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/getfield' LIMIT 1 [ RunTime:0.081935s ] +[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `hcy_notice` [ RunTime:0.081628s ] +[ sql ] [ SQL ] SHOW TABLE STATUS LIKE 'hcy_notice' [ RunTime:0.077926s ] +--------------------------------------------------------------- + +[2021-12-12T16:13:39+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/gettable.html +[运行时间:0.843885s] [吞吐率:1.18req/s] [内存消耗:4,542.55kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '0', + 'accept' => '*/*', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'x-requested-with' => 'XMLHttpRequest', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.141096s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094398s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094653s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095783s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/gettable' LIMIT 1 [ RunTime:0.095390s ] +[ sql ] [ SQL ] SHOW TABLES [ RunTime:0.089398s ] +--------------------------------------------------------------- + +[2021-12-12T16:13:42+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/getField +[运行时间:0.753116s] [吞吐率:1.33req/s] [内存消耗:4,595.76kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '11', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => 'notice', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125469s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.098191s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083197s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082999s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/getfield' LIMIT 1 [ RunTime:0.080795s ] +[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `notice` [ RunTime:0.082177s ] +[ sql ] [ SQL ] SHOW TABLE STATUS LIKE 'notice' [ RunTime:0.079641s ] +--------------------------------------------------------------- + +[2021-12-12T16:14:02+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/create +[运行时间:1.114932s] [吞吐率:0.90req/s] [内存消耗:4,753.85kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '20877', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBiFQRePtYmYqcJy0', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'table_name' => 'notice', + 'cn_name' => '消息', + 'auto_class_name' => '1', + 'list_delete' => '1', + 'list_create' => '1', + 'list_refresh' => '1', + 'create_menu' => '-1', + 'create_menu_list' => + array ( + 0 => '2', + 1 => '3', + 2 => '4', + ), + 'create_controller' => '0', + 'controller_name' => 'Notice', + 'controller_action_list' => + array ( + 0 => '1', + 1 => '2', + 2 => '3', + 3 => '4', + ), + 'create_model' => '1', + 'model_name' => 'Notice', + 'auto_timestamp' => '1', + 'soft_delete' => '1', + 'create_validate' => '0', + 'validate_name' => 'Notice', + 'field_name' => + array ( + 11 => + array ( + 0 => 'id', + ), + 12 => + array ( + 0 => 'user_id', + ), + 13 => + array ( + 0 => 'title', + ), + 14 => + array ( + 0 => 'content', + ), + 15 => + array ( + 0 => 'read', + ), + 16 => + array ( + 0 => 'create_time', + ), + 17 => + array ( + 0 => 'receive_type', + ), + 18 => + array ( + 0 => 'send_type', + ), + 19 => + array ( + 0 => 'extra', + ), + ), + 'field_type' => + array ( + 11 => + array ( + 0 => 'int(10) unsigned', + ), + 12 => + array ( + 0 => 'int(10) unsigned', + ), + 13 => + array ( + 0 => 'varchar(50)', + ), + 14 => + array ( + 0 => 'text', + ), + 15 => + array ( + 0 => 'tinyint(1)', + ), + 16 => + array ( + 0 => 'int(10)', + ), + 17 => + array ( + 0 => 'tinyint(1)', + ), + 18 => + array ( + 0 => 'tinyint(1)', + ), + 19 => + array ( + 0 => 'varchar(255)', + ), + ), + 'form_name' => + array ( + 11 => + array ( + 0 => 'ID', + ), + 12 => + array ( + 0 => '用户id', + ), + 13 => + array ( + 0 => '标题', + ), + 14 => + array ( + 0 => '内容', + ), + 15 => + array ( + 0 => '已读状态;0-未读,1-已读', + ), + 16 => + array ( + 0 => '创建时间', + ), + 17 => + array ( + 0 => '通知接收对象类型 1-平台 2-会员 3-游客', + ), + 18 => + array ( + 0 => '通知发送类型 1-系统通知 4-微信小程序', + ), + 19 => + array ( + 0 => '其他', + ), + ), + 'is_list' => + array ( + 11 => + array ( + 0 => '1', + ), + 12 => + array ( + 0 => '1', + ), + 13 => + array ( + 0 => '1', + ), + 15 => + array ( + 0 => '1', + ), + 16 => + array ( + 0 => '1', + ), + 17 => + array ( + 0 => '1', + ), + 18 => + array ( + 0 => '1', + ), + 19 => + array ( + 0 => '1', + ), + ), + 'form_type' => + array ( + 11 => + array ( + 0 => 'number', + ), + 12 => + array ( + 0 => 'select', + ), + 13 => + array ( + 0 => 'text', + ), + 14 => + array ( + 0 => 'editor', + ), + 15 => + array ( + 0 => 'text', + ), + 16 => + array ( + 0 => 'datetime', + ), + 17 => + array ( + 0 => 'text', + ), + 18 => + array ( + 0 => 'text', + ), + 19 => + array ( + 0 => 'text', + ), + ), + 'form_validate' => + array ( + 11 => + array ( + 0 => 'required', + ), + 12 => + array ( + 0 => 'required', + ), + 13 => + array ( + 0 => 'required', + ), + 14 => + array ( + 0 => 'required', + ), + 15 => + array ( + 0 => 'required', + ), + 16 => + array ( + 0 => 'required', + ), + 17 => + array ( + 0 => 'required', + ), + 18 => + array ( + 0 => 'required', + ), + 19 => + array ( + 0 => 'required', + ), + ), + 'field_default' => + array ( + 11 => + array ( + 0 => '', + ), + 12 => + array ( + 0 => '', + ), + 13 => + array ( + 0 => '', + ), + 14 => + array ( + 0 => '', + ), + 15 => + array ( + 0 => '0', + ), + 16 => + array ( + 0 => '', + ), + 17 => + array ( + 0 => '', + ), + 18 => + array ( + 0 => '', + ), + 19 => + array ( + 0 => '', + ), + ), + 'getter_setter' => + array ( + 11 => + array ( + 0 => '', + ), + 12 => + array ( + 0 => '', + ), + 13 => + array ( + 0 => '', + ), + 14 => + array ( + 0 => '', + ), + 15 => + array ( + 0 => '', + ), + 16 => + array ( + 0 => '', + ), + 17 => + array ( + 0 => '', + ), + 18 => + array ( + 0 => '', + ), + 19 => + array ( + 0 => '', + ), + ), + 'is_relation' => + array ( + 11 => + array ( + 0 => '0', + ), + 12 => + array ( + 0 => '0', + ), + 13 => + array ( + 0 => '0', + ), + 14 => + array ( + 0 => '0', + ), + 15 => + array ( + 0 => '0', + ), + 16 => + array ( + 0 => '0', + ), + 17 => + array ( + 0 => '0', + ), + 18 => + array ( + 0 => '0', + ), + 19 => + array ( + 0 => '0', + ), + ), + 'relation_type' => + array ( + 11 => + array ( + 0 => '1', + ), + 12 => + array ( + 0 => '1', + ), + 13 => + array ( + 0 => '1', + ), + 14 => + array ( + 0 => '1', + ), + 15 => + array ( + 0 => '1', + ), + 16 => + array ( + 0 => '1', + ), + 17 => + array ( + 0 => '1', + ), + 18 => + array ( + 0 => '1', + ), + 19 => + array ( + 0 => '1', + ), + ), + 'relation_show' => + array ( + 11 => + array ( + 0 => '', + ), + 12 => + array ( + 0 => '', + ), + 13 => + array ( + 0 => '', + ), + 14 => + array ( + 0 => '', + ), + 15 => + array ( + 0 => '', + ), + 16 => + array ( + 0 => '', + ), + 17 => + array ( + 0 => '', + ), + 18 => + array ( + 0 => '', + ), + 19 => + array ( + 0 => '', + ), + ), + 'relation_table' => + array ( + 11 => + array ( + 0 => '', + ), + 12 => + array ( + 0 => '', + ), + 13 => + array ( + 0 => '', + ), + 14 => + array ( + 0 => '', + ), + 15 => + array ( + 0 => '', + ), + 16 => + array ( + 0 => '', + ), + 17 => + array ( + 0 => '', + ), + 18 => + array ( + 0 => '', + ), + 19 => + array ( + 0 => '', + ), + ), + 'field_scene' => + array ( + 11 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 12 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 13 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 14 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 15 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 16 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 17 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 18 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 19 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + ), + 'is_form' => + array ( + 12 => + array ( + 0 => '1', + ), + 13 => + array ( + 0 => '1', + ), + 14 => + array ( + 0 => '1', + ), + 15 => + array ( + 0 => '1', + ), + 17 => + array ( + 0 => '1', + ), + 18 => + array ( + 0 => '1', + ), + 19 => + array ( + 0 => '1', + ), + ), + 'is_search' => + array ( + 13 => + array ( + 0 => '1', + ), + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126023s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086461s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083478s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086716s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/create' LIMIT 1 [ RunTime:0.087418s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.089611s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '生成操作' , 'POST' , 'admin/generate/create' , '127.0.0.1' , 1639296841) [ RunTime:0.082503s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.083882s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('cca88d48NIIGMPvqfZcZbmbSHnnFUjtXJIHjFkni+9XXLOLZMp+2TBEuH+OzTgM+zJnE61mRSF1OThdcvUKOQU3g1CDvsinHkwvVK1B/iPzkDdUFibUnDSeDwd7f0dsOvHlppiAZJIrE1sFhrt6dF1n3w9Gyv+UHGG3JnsRm3MHPF2XL+oB8TUh/5hR7yex53QZVE/spdjqAfsrrjCYijkMyQpplK6NyPXlO08vFuzB/5FEV23Fe1N7brzmBiYjMORtKM4my+lC1XvGY8m0phdlDeRHT1Z+gUt06LLFtj63CoCPDrFipyzYlr3jh3JLyCLFry8i3CEei1PHeB+r1Ot6eSop/7QtUCzbf6voZY8xk5suANSsd8pRSb5bf5LK22nQiKpF7i+FO7bTshMBQTrgX+7kwy3iTIAInXa3K00OHetngo8NgRQwasgVSH9NK2A2sGgZgxa9O39mcgMnrIMHXWLvQDPpPZRSoUUnyCHFL56bg9u6JwSvannSdF6/UVjK0AnnPCydyE62ejvO9LqfjdP/FXWh9AXoVT2LeMxSvV8VQ+Ok3g+sxh3iBCTYrgaI6BkQ37xT6jD3sslLS63XRj1+TEG5HSp9l4nwO/ARfvQao2T2FswStARt/7+//yHsdrlTWtoB9hhwo4FJ2JFcG+utRCxIWQ0PwijflqJvtLQpImCPi4Qh6DdWF2lvXRzb6FT56NKuSp3/Idy3XsbJTPr/uL1ovdMiuUg7gZC9pL6W3zMGcTk1m7eFp4BSNI93D+J+GPiLY7nA2fWMYm3c7RNAS1oJLb8wAbWxjBpoeL5Udy3aiOcai1LVYErJAG5HGTdw+LzvT3GkD7kj/kwPSYlcg66n6Tust/umKG3wR5fvM/wdku2XWsdtgWTKvtvcvoB3FNU/SA70KR/4Kc0tjowC6VkEXsaowhE6qTgmxODfrq6BppASeceKSoDcOvfq55DMczguOeNUhvOIqb2UIHKavmwh4vf2p1kj0Pa0aor2RYe18TB51drHr0yAMVw3Rv0IZtfAhlerOkW8kFV6K2ZZo0j4Dr3R2Jg5AD1yzCAbMkJLglkzcy/HIjVfEkV42Rq49LkA6/oqVTvU8EQyKUV9AH8floaHTw7I6OUrYU2LxVhp6KTbJL6+YUxWFIc10q1F4TUld6YD7QA16giwYeOa+5/Bo1Wc7Za5F8p45DxtcNrPiWitRL7Hdyr+EZp5raIlX1KepauyXEV2c5ewDl7oqa+tYJWEmNplD5X//ch5dc+l3r2Os+e3vVm74rlAM4sTG90XP2G7Nmb+gAI8nWJxMvuvF4bmpZ1Rwe0gfMOouVgisQMtGx+pGPGBYholMgalhtGSoaZS7oopudxkt0FKL7tD4UcBCmmhO5ck69HYeFJvyhrsBHsbygiFQcA7hQKihQVmGTVIF/pfBjEIlmp0hnVlPj13OPVuRHtYUdkYLTATgob5PZ/RH5QGXiX7m/7IynckaCXu2gt33oiCT2RCGsyEeAD094OR8oLsHdvQjP5LTN48DopFWfvCXlnTHWvEK9gKoj0kPUMUWeoh/6vz4Qj2hoZH65SZ13+jsHPLzYDL4WVDxiQ0dBEMgA7JW7O+LyaP0zFef2sK0ViPz7+9RPFLubUy/IwnxRB3pWAlagP6Ghiitkpzoa9U26DRYRoMsNkMDKpQnXk9bMbnBfEFnt8RvfYRRW+6NdOm1ojb5u8NmH5DZTmPit6cCUCG9OR3DsnQM8Ps7qOjKRKy4AyPblD/V52iMDia9G2n16lQv0G5GW18q/cr5ruU577FM7WYdl7sgy1lQXmThhAbYuDrz05Z32Ka8QwDeM3VnRuPQa3MnmwyMf3vBPLtwPdM5Jgalmah3f6Rg1JDr+hhxxQO6ht7IU4/OWW4WxIogBf2pKD02A2QrbmeOJp2yeW3OzSOIaA4AxgnInwIApyIeW4IXxAqSGirBtZ28oY7q1ijys18YtqnuNlq2pBhznQ/QOfpQHa+Kd+BQ2xQI8gIAeEK5oMhMSREuu1a9jaZtjbWqh3cM+ohQpkLEdlhnUNE8SpasFW67osRYpekmnFNoucs4EJ15lqC2jTLuCFBWti+IcVpype5EfA8NNmmSpcmCXU87BAgBRkci3oOeZmMi9XTy90BaKFpYH+QY4xiC92rT+Q8lPMZ6vO4UCKGTkfYRY3bHzvEwjscL78XSa+Ls+HpdpoJWytkbnszFEYu6X/lEXixrl8sJpNVZjRxcWqU4lXatb2SAiJ0MG9jcvc+6227mtYkikxW2tFBbbjPCrFTEg6tJdSp+3VikLaOZkxUl1dlCk5qsAVEryooFsWztT0iPQhc+sXgjQqL7a/Xl+gk+SgLkyvHUGxtb/v+fHqDjacIyuiokwsVaYvgu6A+pOLgIXAtqgFN/EBxvKyVaSc9fdZJMoc0FZBJBfksDCoPMCY9KpkdyvLcSYXPig6rsdm+gxRokwktp3mMrbHDyC/lwRzMgtzZTNkiTT3vN1EgUyEmUkvcGZKJE1b542tAuPp8zpe6gs+96mpQ6AIMUhy82qJt+PFHFWky2E6lHhiR0taIGKjWyztBiZo3OxXFFlzt2g8t2WwLglmtuKPuqKdcJkZyoHoE5g5200bC1r4ksooDqMScgXDRuIJiWCyULAAYhIDkysu36blfSGZNB1RxGexulMvd15B7Lh9DEE0QrKKk5RtJvb/1XznFRZFtnO6tFhGC9Frzm/aFUj1lSRYZq7P8pzbiTHfikBGj6qXNZQ0s/fYmNoSQ5I1sI8N8JPzPBXWmf68x2XSBjQF3NWC+hrGnSXM0Rmp8tGUCbkeBsrpX5F3KgTMplYy7Y3VnBvc91lS9eSNFcLuGbZQHN8GxlIYAYrNlTuvrZfPmBBXW2nuyb0okip6UBKAe+8a3iP/vnLKMRaNYdO/3kQILLeVOeYVacrV7zP/MhKMHSjjDfAqSRiveNzoFrWFvr855JodezQ5a+Vpcb6o32zFfJZ2kk4OUaBMk1/2EPraB0szhSq/MqhaIKa8doDRFnYvV1bXyMFrsbFRilrV2y68jlftW1+McnCEOjQSoOoDejY8hhOhDtflubnrsD0+QVn8r6j7X2Bq2r5FQLCDx1EG4arga0CNQhozsJo4Wv2kSYFOkdMo++ramNz2dH/HY7e6tvBgHDAHI3L/gAlvs2huXZt/2GYAdFS4joXY3TBhZljVn8auR1zrAtke2WEeuF14G/8S4jDwM6QVVquXr6jrwBtSXTqG+d+zycEhV7F4FPvdVQF1xjx5323F0/sn8Ok9dhWQplT5ZaLpBHC/fGXyZp99iGliYqZXTiw1FuBOme1lNIxGpfT2MJaJIoURscEShlYZaS32RqYIEJQfY/oaJjns/HjoATKO4wJCjKCvd2Sr7E7PnruMivCZu/JZW7Rm/dEUZp3mVNc1UFrEZq4tw3gEkLNsP76DJmZyurDw43IE73OdPG6YwHXuo8/gum+DruOLaPIy+yIWiOe4tDYJuCULsn+LRcgXWdDXoGgw7sTK9g9JHlqJzJEVjFvejNZgRxpPwH4bcbrTV6P5E/S1LT29vLclXc1ExrSRri8DWJfS3Ql97PruGrjUwJ5J2dCHKJPqX2uljwQHVwbzSdXi4i8Mom/kJ0mMZgbP6/ZVh9nuOE6dmZEVh7P7rh0D5DB0xWfjwI/kGUDpgQJ4gTTMDeImijYmzcoJP/b8RR3YBewJ8Z7k/+XsMhEn7uvX6/+BvjQylCiJrfmB4qnezXmYxKhkc0w2+hQJoXiOKDCPtjAgHcWWBXfXkFsXZZZmzd63xGc5zeXO5OetC0g/a9rYFsEqtSGZjtJ3irC5M/v4kpC3AfyC57AwlUy8xJbjf7DROgKCvWzoTpuWrobEyzkjaYpkr0Cgm2zdlNLQI7mCYAAVtSZKB5GtW4amlgH4TsDl1TNHeHvuhlSyMXFMg6angI94GVPh6ktndBw0fwx33yQJuohJiJrvAMIcKmwdzK/xD83P0z7bOBmKQDaskbZaySVvl4D4Hqy63adBQ0Pxls2HNFpYwn19Z/SVdDBBlO2mkVzZ10XRcYgkor6LHHz40qtSnVWQzCvxvz+jhwmIEoSGcFiZn7OnKwr5IfzoL1izN0971qDso4GNxJf4f9uwn2e0whE5MS4tHFJlsZx0wnOaiHRKFC0PuFMrMQmNtLRvYa13e13va/WIuuLQ0' , 173) [ RunTime:0.085279s ] +--------------------------------------------------------------- + +[2021-12-12T16:30:02+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/index.html?_pjax=%23pjax-container +[运行时间:0.814415s] [吞吐率:1.23req/s] [内存消耗:4,432.61kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/index.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133910s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086564s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085512s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087264s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/index' LIMIT 1 [ RunTime:0.086701s ] +--------------------------------------------------------------- + +[2021-12-12T16:30:04+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/add.html?_pjax=%23pjax-container +[运行时间:0.733049s] [吞吐率:1.36req/s] [内存消耗:4,728.52kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/generate/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/add.html [ array ( + 0 => 'table', + 1 => 'menus', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125061s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083464s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080732s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088585s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/add' LIMIT 1 [ RunTime:0.080389s ] +[ sql ] [ SQL ] SHOW TABLES [ RunTime:0.081228s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080619s ] +--------------------------------------------------------------- + +[2021-12-12T16:30:40+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/gettable.html +[运行时间:0.984696s] [吞吐率:1.02req/s] [内存消耗:4,542.66kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '0', + 'accept' => '*/*', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'x-requested-with' => 'XMLHttpRequest', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136620s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091934s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089441s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090954s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/gettable' LIMIT 1 [ RunTime:0.091257s ] +[ sql ] [ SQL ] SHOW TABLES [ RunTime:0.091240s ] +--------------------------------------------------------------- + +[2021-12-12T16:30:44+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/getField +[运行时间:0.721605s] [吞吐率:1.39req/s] [内存消耗:4,588.16kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '19', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => 'notice_setting', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.120313s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.115814s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079433s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.080073s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/getfield' LIMIT 1 [ RunTime:0.078068s ] +[ sql ] [ SQL ] SHOW FULL COLUMNS FROM `notice_setting` [ RunTime:0.080924s ] +[ sql ] [ SQL ] SHOW TABLE STATUS LIKE 'notice_setting' [ RunTime:0.079423s ] +--------------------------------------------------------------- + +[2021-12-12T16:30:59+08:00] 127.0.0.1 POST www.dggjimai.com/admin/generate/create +[运行时间:1.881662s] [吞吐率:0.53req/s] [内存消耗:4,750.05kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '22468', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXWh7m3FKD2GFVjvA', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'table_name' => 'notice_setting', + 'cn_name' => '消息模版', + 'auto_class_name' => '1', + 'list_delete' => '1', + 'list_create' => '1', + 'list_refresh' => '1', + 'create_menu' => '-1', + 'create_menu_list' => + array ( + 0 => '2', + 1 => '3', + 2 => '4', + ), + 'create_controller' => '0', + 'controller_name' => 'NoticeSetting', + 'controller_action_list' => + array ( + 0 => '1', + 1 => '2', + 2 => '3', + 3 => '4', + ), + 'create_model' => '1', + 'model_name' => 'NoticeSetting', + 'auto_timestamp' => '1', + 'soft_delete' => '1', + 'create_validate' => '0', + 'validate_name' => 'NoticeSetting', + 'field_name' => + array ( + 2 => + array ( + 0 => 'id', + ), + 3 => + array ( + 0 => 'scene', + ), + 4 => + array ( + 0 => 'desc', + ), + 5 => + array ( + 0 => 'type', + ), + 6 => + array ( + 0 => 'variable', + ), + 7 => + array ( + 0 => 'system_notice', + ), + 8 => + array ( + 0 => 'sms_notice', + ), + 9 => + array ( + 0 => 'oa_notice', + ), + 10 => + array ( + 0 => 'mnp_notice', + ), + 11 => + array ( + 0 => 'support', + ), + ), + 'field_type' => + array ( + 2 => + array ( + 0 => 'int(11)', + ), + 3 => + array ( + 0 => 'int(10)', + ), + 4 => + array ( + 0 => 'varchar(255)', + ), + 5 => + array ( + 0 => 'tinyint(1)', + ), + 6 => + array ( + 0 => 'varchar(255)', + ), + 7 => + array ( + 0 => 'text', + ), + 8 => + array ( + 0 => 'text', + ), + 9 => + array ( + 0 => 'text', + ), + 10 => + array ( + 0 => 'text', + ), + 11 => + array ( + 0 => 'char(10)', + ), + ), + 'form_name' => + array ( + 2 => + array ( + 0 => 'ID', + ), + 3 => + array ( + 0 => '场景', + ), + 4 => + array ( + 0 => '场景描述', + ), + 5 => + array ( + 0 => '通知对象;1-会员;2-平台', + ), + 6 => + array ( + 0 => '场景变量', + ), + 7 => + array ( + 0 => '系统通知设置', + ), + 8 => + array ( + 0 => '短信通知设置', + ), + 9 => + array ( + 0 => '公众号通知设置', + ), + 10 => + array ( + 0 => '小程序通知设置', + ), + 11 => + array ( + 0 => '支持类型', + ), + ), + 'is_list' => + array ( + 2 => + array ( + 0 => '1', + ), + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 11 => + array ( + 0 => '1', + ), + ), + 'form_type' => + array ( + 2 => + array ( + 0 => 'number', + ), + 3 => + array ( + 0 => 'text', + ), + 4 => + array ( + 0 => 'text', + ), + 5 => + array ( + 0 => 'text', + ), + 6 => + array ( + 0 => 'text', + ), + 7 => + array ( + 0 => 'editor', + ), + 8 => + array ( + 0 => 'editor', + ), + 9 => + array ( + 0 => 'editor', + ), + 10 => + array ( + 0 => 'editor', + ), + 11 => + array ( + 0 => 'text', + ), + ), + 'form_validate' => + array ( + 2 => + array ( + 0 => 'required', + ), + 3 => + array ( + 0 => 'required', + ), + 4 => + array ( + 0 => 'required', + ), + 5 => + array ( + 0 => 'required', + ), + 6 => + array ( + 0 => 'required', + ), + 7 => + array ( + 0 => 'required', + ), + 8 => + array ( + 0 => 'required', + ), + 9 => + array ( + 0 => 'required', + ), + 10 => + array ( + 0 => 'required', + ), + 11 => + array ( + 0 => 'required', + ), + ), + 'field_default' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + ), + 'getter_setter' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + ), + 'is_relation' => + array ( + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + 5 => + array ( + 0 => '0', + ), + 6 => + array ( + 0 => '0', + ), + 7 => + array ( + 0 => '0', + ), + 8 => + array ( + 0 => '0', + ), + 9 => + array ( + 0 => '0', + ), + 10 => + array ( + 0 => '0', + ), + 11 => + array ( + 0 => '0', + ), + ), + 'relation_type' => + array ( + 2 => + array ( + 0 => '1', + ), + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + 9 => + array ( + 0 => '1', + ), + 10 => + array ( + 0 => '1', + ), + 11 => + array ( + 0 => '1', + ), + ), + 'relation_show' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + ), + 'relation_table' => + array ( + 2 => + array ( + 0 => '', + ), + 3 => + array ( + 0 => '', + ), + 4 => + array ( + 0 => '', + ), + 5 => + array ( + 0 => '', + ), + 6 => + array ( + 0 => '', + ), + 7 => + array ( + 0 => '', + ), + 8 => + array ( + 0 => '', + ), + 9 => + array ( + 0 => '', + ), + 10 => + array ( + 0 => '', + ), + 11 => + array ( + 0 => '', + ), + ), + 'field_scene' => + array ( + 2 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 3 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 4 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 5 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 6 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 7 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 8 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 9 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 10 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + 11 => + array ( + 0 => 'admin_add', + 1 => 'admin_edit', + 2 => 'api_add', + 3 => 'api_edit', + 4 => 'index_add', + 5 => 'index_edit', + ), + ), + 'is_form' => + array ( + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '1', + ), + 5 => + array ( + 0 => '1', + ), + 6 => + array ( + 0 => '1', + ), + 7 => + array ( + 0 => '1', + ), + 8 => + array ( + 0 => '1', + ), + 9 => + array ( + 0 => '1', + ), + 10 => + array ( + 0 => '1', + ), + 11 => + array ( + 0 => '1', + ), + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.296026s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.309483s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.300424s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.217050s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/create' LIMIT 1 [ RunTime:0.089257s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.090950s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '生成操作' , 'POST' , 'admin/generate/create' , '127.0.0.1' , 1639297858) [ RunTime:0.088784s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.088393s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('8a071840rNnCZKPJIXqpqXGd0Rv/DD/HUWlT0vFT8ZULae7+RtrSiJfAL1t/YKZgFHznDSPWlzJWxXJbGRUBy7g5EhbK+OPi45JFZV/zf10SMrcg/cR3ATxExAj1BR2s6nqj60aIXY0UnY85ks/NCRHRzr8MLIhEkJzXaqpFtFsgMnAW4LB19vU9JHmUu0QqUsReuhQImEKgl2lrLwr2AyWkmsNsF+2iH/bJBZp+/I8lbL4fc9JrWt+SAVWmQXs962kHl4a9gJvbRmDjb8EXO97MWj+Ak916hF4x9Jc2M/91ZzN90zWk9KJWfmMGmSSb0Pd8O00faJhBZxQSFiRixX6cETxjbgaglxeCjyIBnAO77bVPvFRPYKN8IFBoWd2JukC4B0Droc2AH+xyVqsTv/nmiRGj5+yqTTvLAoB1Zkn8VP0BgpIDjqEnd4P/iQiEwiJztgCLvSis/6IVJOyrxHv4z4HCqGCANoI7O27fv1VoECMW+kkhjo0Oay5zoMUux9uDBGnXkiSjNisyMApWeKJXRZV6AuaYk/fzSgydBJjVj9iYt+mIHyPiat1xyonpRiTrPfuZeNCZnFCFMARuD4z0xN48SGTlgvfj/ZhSHNNBB+YDSxBs5Xurxyc2GeOf5y9oVuIxY4yICCmNe+3dziQLMzWu3CgytykKGAvj4SzdqZyGR5tFaHodrgHM6Jizyvaa6sIrSb9dgKweECxt5esR0yzZdnOCl8xJ03JzGQtyOqZXhY64HeXGGTStqyaVMrbaCC2sdn4GBYYpSOKXEmBHeDQOnH4EU9/cLgoodo/nNFEwTjEY8DOzxQhZP6xcY2NgL4A3opPO7F+8OjX03AvrvDhhXPun3Nv1EofwVlDlX8OW+whLUirPNBl4SpntnNTBRGdwmYoC/mQ1Za3qkLI76MmTKwgIRpzIuwEgFjVkWnLQvIcNsqe2OjpCvp8bdjDEKUDJplmzmPvLGJgsw6/BbbzGibZQP3RWGofRXeLap2Gfu+9I+S88gday366YXcvPqcjg22jrf6BdrND/fQSrymuGLGfvipjc9yOGnjvbv1Z1TmoLp1Gvo9kwIgaN1hcde8YNf1DBcXLJBmmh+Usg/XLgXmoip/g3miFohGs/HXLsJucLfNHSZx/fESXagd+UiouQIwM7BvFFhtbS+0TN0dTZaGJ7t/8mewkCSkh7w2k+GpjvlDDAEi4Txl6tD6ot9GhsNv7B7PkKZahLvDgqaZ5f8cy526nxERvEsU9lOCv4G+ZIZeax35DR3hxmqXvAYVZS3iK80lphNNl6/5RxpfayEELHUl+p1MU+ajWUBTyCbTjS/vAbRQOOjIAF5pYxV3Hm7qCo5OICDc8WCyLw18/zKPCiwD2uEyLL1w9q7B6v5y0MzNOZRyzm8vC51F8PS7g2P9WGEt+GHZgLRrpZgr2Rb0IkGAPaj9Gve+cZEEeZiXagf0/9J1eU3zMwjLVxWdXhPS3+cowM1LjQ/5+/VYPR4BtZrYADF6pxcUL+P/s4Hb+pyJI7t7d2qZfonpwEa7wH48UB1ErADMSl1+Y+52V7yP6icg74aM6DvtEYkqA2uRW1n46SWWiWc9wf9SQRz7dV+SzCrOXrHpne+2V7c/AuErQqAfFce8k8E43CLKU8kfzfbBU0+HxD1lin/JDLtyB6uKcYviC/ApXspEgMq5yrhfPJtkI4mUAX/yiQkI+WKQ2DHfmd6TwKlPWu738jtSzwgKU7FevEARij6c9pHX8SaJ9QZkuu9VeRJmlCkVtaJ//NV5QtvhBoh91I/mSeUbSRK3vACE1QufBetw7LI3sYz5OvaiPHB9ee5sf/SXdjH+batrCgi60Hd+LYh8O84DI1r3O1XlOM0pZjP1WW0D3h3UwjCrZS0Z62S9vLlbKYJGOCsuuLl8Wib1sAFBBNgxpfnVO6tmm0KWZbNBb/W9qasBbzB2ZMoIV7Wd5roKA02hZwMqE7e2BE7VdmN1Lw4RVCGMP0+HchMDfinJweA7MxvP+iNhDOk8AKI7H525sg6jJPwg+PjFUEzvzCe73MB9fo69sjNVI2YpwlJS4OoM0cKWUHYrm08YhfE6AZOFh0Z9BUn7TFSHlugy81OFjKBIpt2m32ceRT8B4vr04Y7K2yTSHCsqQPYSMBrqd18jBtCsqwwg85Dn8ZBsuYq8I4DnB09pyuYBdm9UNcLFGWBYbol4dsDfU3K7YAOkDdjuwY53a0qBaYBKur4m3LyugsAV8a1gUA29KkX8t7Ownc0WpVx7GSP3q/rg4lrjokKBYREEHY6KnYruPf716L6JWl2zkxxHApT81LlQ0CXdUFtQKIOSkQPXkN6iqpzGiZBCZsAeXIxciOUr+A4F/Q29y10W985D/guLH2B1bm8vGAgebTv2x3lF8zCO+vtVP7zFdR0LdexzPSpRF8saCfKSBuBu1k+gepbCOpoS/z37a8YqT9qLhLw2TxMRJEp/+cdkY+tPamL5v57FgtNDauMnOMSmlTQisRzYSRyiKFYENS1xr60k3Wz694XtdJ17hfOoRrZ0fjvnIDYugign6p+Qec5HW9UKTDiFSlMTLeA1lG5fDpPe8tBN4xSzf565ZNRrmw5ggJ2HqcWkdtabg1XtmmnC5Yv+BLXyU8mCmvINgNNiXcEca3P1Ecixwy9I2jd0i0gJhHYgVQBiFqGbCfP/LEqypdJh7iGUg320CFciSrVEEzkAbxqgM2fnEu/uZ+muYRtY007Ue9EOoQis2TN9P7L8nGyeaAk9j4G9/FtQnnuoYGVngoTlsaTBCtulCkAbpNks7NyksL2cbK/VKwG23+az9VsZv2RfpsurNIUb6wDKgpYyWfNkI3H4uv4wRtE6D+h5nDgzLHOjfZnS7Ww3L0rEr/YxHNgJMEOU99dsVSgBUqYKYylkGnt84jWfZ9f/UEUwE/3lYVbErenjj2LIG6+etgzZydq58mgSSMlGCtonXgk95K0HYRd/c9ETgDs/iGgEGyCGoHSojvebcxd7op/NVW6C3/bY6bavZTPq69NLhqou5SSrag3fmjhrA4KxU15doz53DPDgNXs7gQAOkTWcJUnFrs6Mn9rp54CCp28WThfboErl3zb/WjgSdNHTx6uKXrGV8iNOOQFS9UIN5xjKPBrOVHqiecGqvmfHodDyw/NLxYa1nM9h30uByaiKOcAW14dg3MBim9UsQUSbF6FlwuHeJNez+i+8BKU+POW5cqXFtjbEZ0hO4U1SC28R2h3PKm7B2WOcIr63eaadku2AeVuuOdrr2ZENPZzZRgSZHzV25FXk2vqCI9P6d7l0oGzfmewJ87ensDheRfMACVlXppzR3plEBuVyYMA7HK6VKZz3MaiR1ajGna5OomvA+w3+crRwfLqHOPZb8R9PjdsOCng7eZ6EPGMJyR2mADbopM9rChV57Iqu06Lfx7k1Ki+K7HQdHgUl5Ove/ESKxQ7l85Iimsyuthek3C4GF+TSjsu5L3NeeKtDDrEHSeQ4W76ijcXTnUwuFGh18zGkZoX1eCh0oE5Nig5l5f3ytqFYxQSmIBxFM/0u/nJx0/IHUGdW+FCw/lHbpE80QCrpj1qETjIpjOpFQzBC3wK1jR/w/gtEYrYqAN2mlrwJsTxJ4+QWePJ0gl+Zn4IWwLK1sstP169TPsDk63ul7AA/OEueRK/+Tzs636MWZ5RbOjL36WbCxq5of+zvs0SlNjPZ5ddVLtSEmbVtvv4YMQmr+xMXHqZ9YP4Q6yHBtVHXzb7inB80YVuQp6WxAx5bKKDJqGGL0sEw/WQfeMYMXFl2JFiRpfBQ7CwvnYwg/LbJTr61W9iO8UWOp1o5lCSBEGQeUVpYpE/seGw9KpK4wZ+hjc6IhOoDmdi/60ntHm0BmlAg0ZEJHyTM/jy/p+g9g/oanBPd7Dk1X2iCFcPuwppQbzKgmJpmFJfxnpbewsY9eDnXjcf7BV4+z823C7rH1+Nty3QJNoGzapsrG1WpIpzu+hPi0emD+sr7/cNN6TWjrU7mPlCb2dvatdcz7GW9BkPG++F6xQNuBvaIojaZkcXeLJ5kIazaf/3CH+rjLVG7KS7TUh+JWIPiqv33ovTPVoz5ML5LEn+1V/iXnlfnwbKii2q2n7Q49WvYBEag6cctb151NXkYIedPFUFCTwPUYYndVbJSVhxzEINkcxgFPvBKcGfDy2TL2IZRqE8Gp46PUyJShGjV/4heQKJnVGKTc2DKRnUux7UFLmumz6WR82RH6Y4JKwmHlXKToq9+hhGqjZJT7nAknwW7r9kUZl2PtuVhly7CU' , 174) [ RunTime:0.090171s ] +--------------------------------------------------------------- + +[2021-12-12T16:40:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:0.246140s] [吞吐率:4.06req/s] [内存消耗:2,709.11kb] [文件加载:153] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ error ] [0]语法解析错误: syntax error, unexpected 'Order' (T_STRING)[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:149] +--------------------------------------------------------------- + +[2021-12-12T16:40:41+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.079196s] [吞吐率:12.63req/s] [内存消耗:2,709.04kb] [文件加载:153] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ error ] [0]语法解析错误: syntax error, unexpected 'Order' (T_STRING)[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:149] +--------------------------------------------------------------- + +[2021-12-12T16:41:06+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.091300s] [吞吐率:10.95req/s] [内存消耗:2,709.12kb] [文件加载:153] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ error ] [0]语法解析错误: syntax error, unexpected '$model' (T_VARIABLE)[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:149] +--------------------------------------------------------------- + +[2021-12-12T16:41:15+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.066755s] [吞吐率:14.98req/s] [内存消耗:2,709.02kb] [文件加载:153] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ error ] [0]语法解析错误: syntax error, unexpected ','[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:148] +--------------------------------------------------------------- + +[2021-12-12T16:41:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.617585s] [吞吐率:1.62req/s] [内存消耗:4,391.84kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.141761s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.100117s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089759s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089286s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.091218s ] +[ error ] [0]Class app\common\model\Order does not exist[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/Container.php:467] +--------------------------------------------------------------- + +[2021-12-12T16:41:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:0.597394s] [吞吐率:1.67req/s] [内存消耗:4,391.84kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127341s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085595s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092990s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086163s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085505s ] +[ error ] [0]Class app\common\model\Order does not exist[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/Container.php:467] +--------------------------------------------------------------- + +[2021-12-12T16:43:16+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.558223s] [吞吐率:0.64req/s] [内存消耗:4,800.05kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130464s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084817s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.106429s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086788s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084038s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086306s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082613s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083600s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084362s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084673s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085112s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083707s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082286s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081700s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084945s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081893s ] +--------------------------------------------------------------- + +[2021-12-12T16:43:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.543201s] [吞吐率:0.65req/s] [内存消耗:4,824.13kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126048s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084864s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080660s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083342s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083578s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082731s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080341s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082320s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080443s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083782s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080207s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082664s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081636s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081062s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082099s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.080869s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080909s ] +--------------------------------------------------------------- + +[2021-12-12T16:43:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.616903s] [吞吐率:0.62req/s] [内存消耗:4,820.73kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.144332s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088950s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087353s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086622s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.086529s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084420s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082904s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088962s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084618s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085880s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082612s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084948s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082510s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083284s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083616s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087478s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084280s ] +--------------------------------------------------------------- + +[2021-12-12T16:43:27+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.062352s] [吞吐率:16.04req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T16:43:31+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.495136s] [吞吐率:2.02req/s] [内存消耗:4,399.17kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '36', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '', + 'invoice_no' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.120403s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.080813s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079914s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082076s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.079273s ] +--------------------------------------------------------------- + +[2021-12-12T16:43:41+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.124588s] [吞吐率:0.89req/s] [内存消耗:4,618.05kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '42', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '111', + 'invoice_no' => '222', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.141656s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092031s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092345s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.094174s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.088963s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.096327s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087384s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089332s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088052s ] +[ sql ] [ SQL ] UPDATE `order` SET `order_status` = 2 , `shipping_time` = 1639298621 , `invoice_name` = '111' , `invoice_no` = '222' , `update_time` = 1639298621 WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.088288s ] +[ error ] [8]未定义变量: param[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:87] +--------------------------------------------------------------- + +[2021-12-12T16:44:49+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.916123s] [吞吐率:1.09req/s] [内存消耗:4,582.21kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '42', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '111', + 'invoice_no' => '222', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135129s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089416s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086985s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087931s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.084484s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089911s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085821s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087210s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086023s ] +[ error ] [0]致命错误: Call to undefined method app\admin\controller\OrderController::_success()[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:142] +--------------------------------------------------------------- + +[2021-12-12T16:45:48+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.923718s] [吞吐率:1.08req/s] [内存消耗:4,534.26kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '42', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '111', + 'invoice_no' => '222', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134891s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091873s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086354s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086568s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.088186s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088226s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081925s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085918s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082118s ] +--------------------------------------------------------------- + +[2021-12-12T16:45:51+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.811320s] [吞吐率:0.55req/s] [内存消耗:4,824.21kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.142270s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092665s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092268s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095364s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.094879s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.097156s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092011s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090547s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.091482s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.094397s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.091589s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.094905s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090954s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091856s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.091378s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.094162s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.090567s ] +--------------------------------------------------------------- + +[2021-12-12T16:46:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.582864s] [吞吐率:0.63req/s] [内存消耗:4,824.13kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128345s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085170s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089165s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086641s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083960s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085600s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083093s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083996s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082008s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083927s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083226s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084964s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083495s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085731s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083346s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084350s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082130s ] +--------------------------------------------------------------- + +[2021-12-12T16:46:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.583015s] [吞吐率:0.63req/s] [内存消耗:4,820.73kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123269s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081040s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083119s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.079962s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.090062s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.080934s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079597s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084197s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084016s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081481s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079723s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082179s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083407s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079112s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080889s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081544s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.078754s ] +--------------------------------------------------------------- + +[2021-12-12T16:46:34+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.228869s] [吞吐率:0.81req/s] [内存消耗:4,534.26kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '40', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '11', + 'invoice_no' => '22', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.139231s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.099585s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089483s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.107673s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.095014s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.111539s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087121s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087027s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083320s ] +--------------------------------------------------------------- + +[2021-12-12T16:46:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:2.311582s] [吞吐率:0.43req/s] [内存消耗:4,824.21kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.187237s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087027s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079486s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082271s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.079801s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.080928s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081028s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080773s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078580s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.080258s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083912s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080426s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078585s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078112s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079327s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081377s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.078552s ] +--------------------------------------------------------------- + +[2021-12-12T16:47:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:2.003705s] [吞吐率:0.50req/s] [内存消耗:4,820.73kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129229s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086860s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084330s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084817s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.083690s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084195s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081829s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085225s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082396s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.092358s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082420s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.092047s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080887s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084260s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081510s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087248s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.100192s ] +--------------------------------------------------------------- + +[2021-12-12T16:47:43+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.916198s] [吞吐率:1.09req/s] [内存消耗:4,534.26kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '40', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '11', + 'invoice_no' => '22', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135172s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085137s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084082s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087104s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.084162s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086788s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083878s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084995s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083339s ] +--------------------------------------------------------------- + +[2021-12-12T16:47:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.644996s] [吞吐率:0.61req/s] [内存消耗:4,824.21kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.137703s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087601s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087352s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085098s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.082922s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084927s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084355s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084742s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086921s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085184s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082449s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085082s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083027s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082271s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084000s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084771s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084159s ] +--------------------------------------------------------------- + +[2021-12-12T16:49:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.593588s] [吞吐率:0.63req/s] [内存消耗:4,820.73kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129974s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090627s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084520s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085339s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.088981s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088542s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084454s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084655s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.089059s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090663s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081920s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083877s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082879s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082619s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083520s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084610s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082478s ] +--------------------------------------------------------------- + +[2021-12-12T16:49:30+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.920783s] [吞吐率:1.09req/s] [内存消耗:4,534.24kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '1', + 'invoice_no' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127668s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085032s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084295s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.113437s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.087713s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084374s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088502s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084954s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083255s ] +--------------------------------------------------------------- + +[2021-12-12T16:49:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.556388s] [吞吐率:0.64req/s] [内存消耗:4,824.21kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125092s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083495s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080145s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081633s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.082382s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082028s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079718s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.095792s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078688s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083519s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079077s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081744s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078830s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084975s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079372s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081384s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.078744s ] +--------------------------------------------------------------- + +[2021-12-12T16:49:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.651364s] [吞吐率:0.61req/s] [内存消耗:4,820.44kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127637s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081263s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078854s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.161406s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.079483s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.080648s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078979s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080158s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079395s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.079912s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079851s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081830s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080261s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081548s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084166s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081283s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081332s ] +--------------------------------------------------------------- + +[2021-12-12T16:49:54+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.937874s] [吞吐率:1.07req/s] [内存消耗:4,511.06kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134784s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088241s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091477s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088856s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.086006s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.101390s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090167s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088718s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087359s ] +--------------------------------------------------------------- + +[2021-12-12T16:50:47+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.060806s] [吞吐率:0.94req/s] [内存消耗:4,511.12kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130136s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.138054s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.097972s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.104371s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.118455s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088031s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088955s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083191s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082365s ] +--------------------------------------------------------------- + +[2021-12-12T16:51:07+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.992169s] [吞吐率:1.01req/s] [内存消耗:4,511.12kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.158175s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.095495s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095655s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095296s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.091259s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090496s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088575s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087200s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.094671s ] +--------------------------------------------------------------- + +[2021-12-12T16:51:45+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:0.898385s] [吞吐率:1.11req/s] [内存消耗:4,518.81kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128505s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088604s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091181s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087916s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.085320s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086894s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083656s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086317s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085820s ] +--------------------------------------------------------------- + +[2021-12-12T16:52:34+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.361435s] [吞吐率:0.73req/s] [内存消耗:4,694.03kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133094s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.149432s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082156s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082343s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.081210s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081926s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085135s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084550s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081179s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.089164s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'notice_setting.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T16:52:55+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.152671s] [吞吐率:0.87req/s] [内存消耗:4,690.59kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124742s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086152s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087374s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084808s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.088908s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.111488s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082903s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082996s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086674s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.099707s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.116256s ] +[ error ] [0]致命错误: Using $this when not in object context[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Notice.php:29] +--------------------------------------------------------------- + +[2021-12-12T16:53:14+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.102728s] [吞吐率:0.91req/s] [内存消耗:4,690.59kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130216s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088401s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096716s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085049s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.085741s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089372s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093670s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086908s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.090219s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.084088s ] +[ error ] [0]致命错误: Using $this when not in object context[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Notice.php:29] +--------------------------------------------------------------- + +[2021-12-12T16:54:00+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.332067s] [吞吐率:0.75req/s] [内存消耗:4,690.53kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124818s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.188944s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083327s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088258s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.084700s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082704s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083191s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082694s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083254s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.085101s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.082289s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.085041s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.079368s ] +[ error ] [8]未定义数组索引: total_num[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Notice.php:82] +--------------------------------------------------------------- + +[2021-12-12T16:55:22+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.375794s] [吞吐率:0.73req/s] [内存消耗:4,578.67kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123024s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083744s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083314s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088603s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.085054s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086652s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078645s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.080858s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.101963s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.082030s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.081645s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.084000s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.084306s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081573s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.077732s ] +--------------------------------------------------------------- + +[2021-12-12T16:57:06+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.638499s] [吞吐率:0.61req/s] [内存消耗:4,594.66kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.162881s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.126251s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085638s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085231s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.083549s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085243s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081920s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084270s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085237s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.083815s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.081950s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.082332s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.086708s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084389s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.083728s ] +--------------------------------------------------------------- + +[2021-12-12T16:58:24+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.389601s] [吞吐率:0.72req/s] [内存消耗:4,586.76kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126627s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083121s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085642s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092582s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.089013s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082445s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085351s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087248s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081590s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.081875s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.080857s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.089269s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.080057s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082547s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.080395s ] +--------------------------------------------------------------- + +[2021-12-12T16:58:50+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.226524s] [吞吐率:0.82req/s] [内存消耗:4,565.72kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.144426s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.182055s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.113901s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091319s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.082531s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090649s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081807s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084972s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084064s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.084399s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.081137s ] +--------------------------------------------------------------- + +[2021-12-12T17:00:49+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.127123s] [吞吐率:0.89req/s] [内存消耗:4,565.72kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129098s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.097140s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.131101s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089764s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.086966s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081834s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080389s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081069s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079811s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.081381s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.085214s ] +--------------------------------------------------------------- + +[2021-12-12T17:01:37+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.272158s] [吞吐率:0.79req/s] [内存消耗:4,565.72kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136670s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.158487s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096919s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.107857s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.104716s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.092123s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088523s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.091414s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.092194s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.091361s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.086951s ] +--------------------------------------------------------------- + +[2021-12-12T17:02:16+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.098314s] [吞吐率:0.91req/s] [内存消耗:4,565.72kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126529s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086239s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084366s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085493s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.098748s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.109054s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083150s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090953s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082481s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.086730s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.083808s ] +--------------------------------------------------------------- + +[2021-12-12T17:02:58+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.577907s] [吞吐率:0.63req/s] [内存消耗:4,565.72kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.144190s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.140364s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089947s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090185s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.091709s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089454s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.099227s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.095968s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087298s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.235576s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.090353s ] +--------------------------------------------------------------- + +[2021-12-12T17:03:30+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.117262s] [吞吐率:0.90req/s] [内存消耗:4,567.70kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133322s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083992s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084765s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083595s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.093661s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083868s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095780s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083369s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080063s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.082548s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.080143s ] +--------------------------------------------------------------- + +[2021-12-12T17:04:17+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.598692s] [吞吐率:0.63req/s] [内存消耗:4,588.31kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135303s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.103178s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.098286s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.099908s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.097055s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.100347s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092815s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088410s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087479s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.087544s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.088479s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.088186s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.092878s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.094058s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.093991s ] +--------------------------------------------------------------- + +[2021-12-12T17:09:35+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.633288s] [吞吐率:0.61req/s] [内存消耗:4,722.84kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123086s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094301s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084240s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082695s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.086419s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083632s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082004s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082397s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086798s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.083033s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.089012s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.083718s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.082039s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083619s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.083957s ] +[ error ] [0]method not exist:app\common\model\Notice->getTitleByScene[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Query.php:180] +--------------------------------------------------------------- + +[2021-12-12T17:13:09+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.522971s] [吞吐率:0.66req/s] [内存消耗:4,725.29kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124060s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083137s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084670s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083155s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.088098s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.080911s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078215s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.079327s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082842s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.113922s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.078346s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.080945s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.081893s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080457s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.078397s ] +[ error ] [0]method not exist:app\common\model\Notice->getReceiveTypeByScene[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Query.php:180] +--------------------------------------------------------------- + +[2021-12-12T17:13:30+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.535334s] [吞吐率:0.65req/s] [内存消耗:4,728.80kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128984s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094951s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.161871s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088077s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.086197s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087123s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084661s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086254s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.090027s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.087660s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.085526s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.087872s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.085157s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089010s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.087212s ] +[ error ] [0]致命错误: Undefined class constant 'NOTICE_PLATFORM_SCENE'[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Notice.php:153] +--------------------------------------------------------------- + +[2021-12-12T17:15:54+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.643604s] [吞吐率:0.61req/s] [内存消耗:4,730.73kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134178s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.199125s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083140s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088471s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.088302s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088210s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083173s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080762s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.082603s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.088700s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.083287s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.082052s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082760s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.093432s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.085820s ] +[ error ] [0]数据表字段不存在:[scene][/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Builder.php:138] +--------------------------------------------------------------- + +[2021-12-12T17:16:59+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.420604s] [吞吐率:0.70req/s] [内存消耗:4,622.42kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133089s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088212s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096291s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.103255s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.087399s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082901s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084011s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086111s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.077635s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.079488s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 100 LIMIT 1 [ RunTime:0.077600s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.077744s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.077930s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.079315s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.080179s ] +--------------------------------------------------------------- + +[2021-12-12T17:17:49+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.482029s] [吞吐率:0.67req/s] [内存消耗:4,623.05kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.168901s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.095933s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094223s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093616s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.086946s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084202s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082583s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083905s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084425s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.084128s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 101 LIMIT 1 [ RunTime:0.082103s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.086493s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.094414s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085296s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081272s ] +--------------------------------------------------------------- + +[2021-12-12T17:19:26+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.614428s] [吞吐率:0.62req/s] [内存消耗:4,582.98kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123511s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.188126s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084611s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.082651s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.079076s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078717s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.078862s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.076460s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.078724s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 101 LIMIT 1 [ RunTime:0.078623s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081132s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.079048s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080885s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.083514s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.078288s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已发货' , '测试001您好!您的订单202111061732419347已于2021-11-06 17:32发货完成,物流单号1,快递名称 {shipping_name}。' , 101 , 2 , 1 , '' , 1639300766) [ RunTime:0.085835s ] +--------------------------------------------------------------- + +[2021-12-12T17:20:22+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.599240s] [吞吐率:0.63req/s] [内存消耗:4,583.02kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127640s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088074s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095466s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084638s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.090576s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086951s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082335s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083603s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081550s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.083616s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 101 LIMIT 1 [ RunTime:0.082775s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081257s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.081211s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084344s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081996s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.084586s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已发货' , '测试001您好!您的订单202111061732419347已于2021-11-06 17:32发货完成,物流单号1,快递名称 2。' , 101 , 2 , 1 , '' , 1639300822) [ RunTime:0.085338s ] +--------------------------------------------------------------- + +[2021-12-12T17:21:15+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.738484s] [吞吐率:0.58req/s] [内存消耗:4,638.44kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130784s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085405s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083504s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084833s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.081809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083450s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081558s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084425s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081634s ] +[ sql ] [ SQL ] UPDATE `order` SET `order_status` = 2 , `shipping_time` = 1639300874 , `invoice_name` = '2' , `invoice_no` = '1' , `update_time` = 1639300874 WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.081795s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.083470s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 101 LIMIT 1 [ RunTime:0.086018s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.084490s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.087872s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085695s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.082529s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.085840s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已发货' , '测试001您好!您的订单202111061732419347已于2021-11-06 17:32发货完成,物流单号1,快递名称 2。' , 101 , 2 , 1 , '' , 1639300875) [ RunTime:0.090506s ] +--------------------------------------------------------------- + +[2021-12-12T17:21:51+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.839123s] [吞吐率:0.54req/s] [内存消耗:4,661.62kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '2', + 'invoice_no' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.142806s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.096076s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090655s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088782s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.088079s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088502s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087886s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087461s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086034s ] +[ sql ] [ SQL ] UPDATE `order` SET `shipping_time` = 1639300910 , `invoice_name` = '2' , `invoice_no` = '1' , `update_time` = 1639300910 WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.087510s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.088323s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 101 LIMIT 1 [ RunTime:0.095069s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.087361s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.088812s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089983s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.085478s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.087823s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已发货' , '测试001您好!您的订单202111061732419347已于2021-11-06 17:32发货完成,物流单号1,快递名称 2。' , 101 , 2 , 1 , '' , 1639300910) [ RunTime:0.093779s ] +--------------------------------------------------------------- + +[2021-12-12T17:21:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.744532s] [吞吐率:0.57req/s] [内存消耗:4,824.40kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.213123s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088852s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086596s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089288s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085352s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088524s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085884s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086251s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085189s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087944s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085146s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088305s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084513s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086490s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086328s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087157s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.088647s ] +--------------------------------------------------------------- + +[2021-12-12T17:25:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.922915s] [吞吐率:0.52req/s] [内存消耗:4,998.95kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122496s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084737s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084305s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081950s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083287s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082848s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083954s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083179s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078791s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089361s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082838s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082097s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082067s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087098s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081749s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082268s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081463s ] +--------------------------------------------------------------- + +[2021-12-12T17:26:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.614632s] [吞吐率:0.62req/s] [内存消耗:4,824.94kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133432s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091085s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088007s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087322s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.086188s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.091652s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085014s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086606s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084492s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085591s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085186s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085446s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084815s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084098s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083889s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085268s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084183s ] +--------------------------------------------------------------- + +[2021-12-12T17:27:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.545983s] [吞吐率:0.65req/s] [内存消耗:4,824.94kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132965s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.105101s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082273s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083844s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.082446s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082598s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080633s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083903s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082548s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.080872s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.077957s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080514s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078400s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078412s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.078677s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081612s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.077942s ] +--------------------------------------------------------------- + +[2021-12-12T17:29:16+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.517610s] [吞吐率:0.66req/s] [内存消耗:5,009.88kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127016s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085172s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082624s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086517s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.082944s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084717s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084331s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.088033s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085096s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082145s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084447s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083910s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080722s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081444s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084526s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081310s ] +--------------------------------------------------------------- + +[2021-12-12T17:30:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.481588s] [吞吐率:0.67req/s] [内存消耗:5,010.00kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122168s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087211s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083413s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084587s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081259s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085645s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080570s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081327s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081768s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081292s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082642s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083092s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081173s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080002s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082171s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.079813s ] +--------------------------------------------------------------- + +[2021-12-12T17:33:02+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.607837s] [吞吐率:0.62req/s] [内存消耗:5,009.77kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.213462s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082702s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082190s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082379s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084832s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083638s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.079400s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.079300s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081008s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081483s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086703s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087954s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086988s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082342s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080260s ] +--------------------------------------------------------------- + +[2021-12-12T17:33:06+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.566902s] [吞吐率:0.64req/s] [内存消耗:4,824.94kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134886s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085290s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082347s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085507s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083506s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084468s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081130s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086625s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081364s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083444s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081109s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084623s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083622s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081226s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081063s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083336s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083357s ] +--------------------------------------------------------------- + +[2021-12-12T17:33:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.609683s] [吞吐率:0.62req/s] [内存消耗:4,820.51kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134361s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090030s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088409s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087729s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.086354s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088676s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085301s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.091671s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084974s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089385s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086341s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087512s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086660s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086304s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085398s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086469s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086019s ] +--------------------------------------------------------------- + +[2021-12-12T17:34:16+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.053803s] [吞吐率:18.59req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T17:34:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.555561s] [吞吐率:0.64req/s] [内存消耗:5,010.28kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133733s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090234s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083556s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.098047s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.090333s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086924s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083785s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082090s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084289s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083433s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084120s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083129s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088347s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081708s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084123s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082707s ] +--------------------------------------------------------------- + +[2021-12-12T17:34:39+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.061662s] [吞吐率:16.22req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T17:34:45+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=1 +[运行时间:1.647168s] [吞吐率:0.61req/s] [内存消耗:4,820.51kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128685s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085458s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095319s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086243s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.086066s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087053s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086212s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087109s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083704s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088462s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083423s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084759s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084188s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082773s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085925s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084183s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084383s ] +--------------------------------------------------------------- + +[2021-12-12T17:34:52+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/deliveryhandle.html +[运行时间:1.772297s] [吞吐率:0.56req/s] [内存消耗:4,661.21kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '38', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/delivery.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', + 'invoice_name' => '1', + 'invoice_no' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.145153s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083558s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082342s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087031s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/deliveryhandle' LIMIT 1 [ RunTime:0.083027s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084444s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083965s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081455s ] +[ sql ] [ SQL ] UPDATE `order` SET `order_status` = 2 , `shipping_time` = 1639301691 , `invoice_name` = '1' , `invoice_no` = '2' , `update_time` = 1639301691 WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.081649s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.084100s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 101 LIMIT 1 [ RunTime:0.081251s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081495s ] +[ sql ] [ SQL ] SELECT `g`.`name` FROM `order_goods` `og` INNER JOIN `goods` `g` ON `og`.`goods_id`=`g`.`id` WHERE `og`.`order_id` = 1 LIMIT 1 [ RunTime:0.087037s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083917s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.084425s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.083350s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已发货' , '测试001您好!您的订单202111061732419347已于2021-11-06 17:32发货完成,物流单号2,快递名称 1。' , 101 , 2 , 1 , '' , 1639301692) [ RunTime:0.087729s ] +--------------------------------------------------------------- + +[2021-12-12T17:34:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.531395s] [吞吐率:0.65req/s] [内存消耗:4,801.17kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.120792s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082172s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080166s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.094349s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.082788s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081590s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.079805s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082609s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081912s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.078605s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080780s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079907s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080183s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079420s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.080350s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.077155s ] +--------------------------------------------------------------- + +[2021-12-12T17:36:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.560145s] [吞吐率:0.64req/s] [内存消耗:5,029.26kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129169s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085610s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084660s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085309s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083725s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083791s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081512s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084332s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084280s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081241s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081654s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082071s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081720s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083044s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084455s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080122s ] +--------------------------------------------------------------- + +[2021-12-12T17:40:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.459908s] [吞吐率:0.68req/s] [内存消耗:5,010.84kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125483s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084622s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082535s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083733s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.080331s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084554s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081263s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080674s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085624s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080713s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082674s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082284s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081633s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082438s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082619s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080706s ] +--------------------------------------------------------------- + +[2021-12-12T17:40:08+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.053049s] [吞吐率:18.85req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T17:43:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.517387s] [吞吐率:0.66req/s] [内存消耗:5,050.16kb] [文件加载:197] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.164889s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085883s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080515s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083029s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081199s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083762s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080205s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082295s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082608s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081481s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080734s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079119s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.077970s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080378s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.080128s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.078190s ] +[ error ] [8]未定义变量: detail[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/bc32ed14905b128c0801e0822e3f166e.php:384] +--------------------------------------------------------------- + +[2021-12-12T17:43:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.512235s] [吞吐率:0.66req/s] [内存消耗:5,011.01kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132451s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087591s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083572s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086931s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.081933s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084112s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082301s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083273s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084527s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084392s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085700s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081582s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082435s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082366s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083934s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081830s ] +--------------------------------------------------------------- + +[2021-12-12T17:43:45+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.034987s] [吞吐率:28.58req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T17:44:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.546942s] [吞吐率:0.65req/s] [内存消耗:5,011.05kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129985s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.103298s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.107727s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087098s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084523s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083383s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086708s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.088918s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081375s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082767s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081486s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080853s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080291s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084025s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082522s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.079757s ] +--------------------------------------------------------------- + +[2021-12-12T17:44:24+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.184386s] [吞吐率:5.42req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T17:44:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.825332s] [吞吐率:0.55req/s] [内存消耗:4,998.35kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138757s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.098054s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091416s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093527s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.091163s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.094150s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.099941s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.096901s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.088257s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.095481s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.091147s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089004s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090288s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092649s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088346s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.095411s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087390s ] +--------------------------------------------------------------- + +[2021-12-12T17:44:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.613279s] [吞吐率:0.62req/s] [内存消耗:4,824.75kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131385s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087389s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085783s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089353s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.085158s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085546s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084234s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086776s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084937s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087161s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087442s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085618s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084775s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082313s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083070s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085871s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083730s ] +--------------------------------------------------------------- + +[2021-12-12T17:48:54+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/confirm.html +[运行时间:0.915683s] [吞吐率:1.09req/s] [内存消耗:4,414.43kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '10', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129718s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088973s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087508s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092050s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/confirm' LIMIT 1 [ RunTime:0.084757s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086960s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083193s ] +[ sql ] [ SQL ] UPDATE `order` SET `order_status` = 3 , `confirm_take_time` = 1639302534 , `update_time` = 1639302534 WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.084486s ] +[ error ] [0]致命错误: Call to undefined method app\admin\controller\OrderController::_success()[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:158] +--------------------------------------------------------------- + +[2021-12-12T17:48:57+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.074815s] [吞吐率:13.37req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T17:49:04+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/confirm.html +[运行时间:0.943340s] [吞吐率:1.06req/s] [内存消耗:4,413.73kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '10', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130060s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089250s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085021s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084539s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/confirm' LIMIT 1 [ RunTime:0.083370s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084345s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084264s ] +[ sql ] [ SQL ] UPDATE `order` SET `confirm_take_time` = 1639302543 , `update_time` = 1639302543 WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.086937s ] +[ error ] [0]致命错误: Call to undefined method app\admin\controller\OrderController::_success()[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/OrderController.php:158] +--------------------------------------------------------------- + +[2021-12-12T17:49:22+08:00] 127.0.0.1 POST www.dggjimai.com/admin/order/confirm.html +[运行时间:0.921653s] [吞吐率:1.09req/s] [内存消耗:4,365.78kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '10', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.207917s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.080994s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078275s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082872s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/confirm' LIMIT 1 [ RunTime:0.081949s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084566s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079789s ] +[ sql ] [ SQL ] UPDATE `order` SET `confirm_take_time` = 1639302561 , `update_time` = 1639302561 WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.078680s ] +--------------------------------------------------------------- + +[2021-12-12T17:49:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.467812s] [吞吐率:0.68req/s] [内存消耗:4,803.71kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125994s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084076s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084154s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086809s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.082054s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083533s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080915s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082873s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082515s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082228s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085172s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086284s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081002s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080499s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082011s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086351s ] +--------------------------------------------------------------- + +[2021-12-12T17:49:25+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.098957s] [吞吐率:10.11req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T17:49:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.665665s] [吞吐率:0.60req/s] [内存消耗:4,826.52kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134720s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.096326s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088326s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.094273s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087850s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.092818s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087550s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090055s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.090407s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087873s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085954s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090418s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085794s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095222s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086977s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.090141s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.093493s ] +--------------------------------------------------------------- + +[2021-12-12T17:49:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.574113s] [吞吐率:0.64req/s] [内存消耗:4,826.52kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129392s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086365s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081283s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084496s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083523s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083974s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081924s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083357s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081130s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084518s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080710s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088547s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082359s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083676s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081942s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086841s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083588s ] +--------------------------------------------------------------- + +[2021-12-12T17:49:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89%E6%96%87%E5%85%B7&order_type=&start_time=&end_time=&_pjax=%23pjax-container +[运行时间:0.756538s] [吞吐率:1.32req/s] [内存消耗:4,644.34kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光文具', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134476s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087782s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092476s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091647s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087178s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087186s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'o.goods_name' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T17:50:00+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89%E6%96%87%E5%85%B7&order_type=&start_time=&end_time= +[运行时间:0.686084s] [吞吐率:1.46req/s] [内存消耗:4,643.71kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光文具', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132665s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086579s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085478s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084648s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.082246s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085881s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'o.goods_name' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T17:50:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89%E6%96%87%E5%85%B7&order_type=&start_time=&end_time= +[运行时间:1.479153s] [吞吐率:0.68req/s] [内存消耗:4,805.54kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光文具', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => 'data', + 7 => 'page', + 8 => 'total', + 9 => 'debug', + 10 => 'cookie_prefix', + 11 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131676s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091151s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084044s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086925s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083109s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087948s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光文具%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083862s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光文具%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084195s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084351s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085123s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086621s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084665s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084580s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082454s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084575s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.081534s ] +--------------------------------------------------------------- + +[2021-12-12T17:50:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89%E6%96%87%E5%85%B71&order_type=&start_time=&end_time=&_pjax=%23pjax-container +[运行时间:0.844920s] [吞吐率:1.18req/s] [内存消耗:4,755.67kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89%E6%96%87%E5%85%B7&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光文具1', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => '_pjax', + 7 => 'data', + 8 => 'page', + 9 => 'total', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125106s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091461s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081298s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082920s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.079745s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084750s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光文具1%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080126s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光文具1%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.079936s ] +--------------------------------------------------------------- + +[2021-12-12T17:50:49+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89%E6%96%87%E5%85%B7&order_type=&start_time=&end_time=&_pjax=%23pjax-container +[运行时间:1.535596s] [吞吐率:0.65req/s] [内存消耗:4,779.05kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89%E6%96%87%E5%85%B71&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光文具', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => '_pjax', + 7 => 'data', + 8 => 'page', + 9 => 'total', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.139320s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093313s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.122412s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091675s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.090424s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.091474s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光文具%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.090016s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光文具%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.088665s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.091444s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088759s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090809s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090650s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088829s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.090179s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087436s ] +--------------------------------------------------------------- + +[2021-12-12T17:51:09+08:00] 127.0.0.1 GET www.dggjimai.com/admin/generate/index.html?_pjax=%23pjax-container +[运行时间:0.539380s] [吞吐率:1.85req/s] [内存消耗:4,432.97kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89%E6%96%87%E5%85%B7&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/generate/index.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126874s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083192s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082304s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081950s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/generate/index' LIMIT 1 [ RunTime:0.079143s ] +--------------------------------------------------------------- + +[2021-12-12T17:51:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.655985s] [吞吐率:1.52req/s] [内存消耗:4,590.79kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/generate/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134618s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089732s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087477s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090751s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.086215s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088396s ] +--------------------------------------------------------------- + +[2021-12-12T17:51:14+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/add.html?_pjax=%23pjax-container +[运行时间:0.645244s] [吞吐率:1.55req/s] [内存消耗:4,507.31kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/add.html [ array ( + 0 => 'parents', + 1 => 'log_method', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128297s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084937s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079740s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086991s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/add' LIMIT 1 [ RunTime:0.087137s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080118s ] +--------------------------------------------------------------- + +[2021-12-12T17:51:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.663062s] [吞吐率:1.51req/s] [内存消耗:4,590.79kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129821s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094380s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085367s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085576s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.089387s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083935s ] +--------------------------------------------------------------- + +[2021-12-12T17:53:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html +[运行时间:1.039729s] [吞吐率:0.96req/s] [内存消耗:4,605.83kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.142983s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087282s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082803s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084354s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.089062s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084789s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082713s ] +--------------------------------------------------------------- + +[2021-12-12T17:54:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:0.682876s] [吞吐率:1.46req/s] [内存消耗:4,480.73kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127822s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085023s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081940s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083503s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.083857s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084138s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'consignment_order.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T17:54:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:0.667037s] [吞吐率:1.50req/s] [内存消耗:4,480.47kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128509s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084047s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082917s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084117s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.087277s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085724s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'consignment_order.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T17:55:56+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:0.946848s] [吞吐率:1.06req/s] [内存消耗:4,861.59kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128796s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086823s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091534s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086314s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.089767s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084559s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 [ RunTime:0.082865s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.084156s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084744s ] +--------------------------------------------------------------- + +[2021-12-12T17:56:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.043437s] [吞吐率:0.96req/s] [内存消耗:4,932.12kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132044s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087462s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084604s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087594s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.086714s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085726s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 [ RunTime:0.084791s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.082836s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083485s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->order_status_text[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T17:57:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:0.859785s] [吞吐率:1.16req/s] [内存消耗:4,723.50kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126965s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085130s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086176s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083933s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.082188s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084542s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 [ RunTime:0.081168s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.081579s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081401s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->total_amount[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T17:58:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:0.909118s] [吞吐率:1.10req/s] [内存消耗:4,723.52kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129764s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082017s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081394s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083023s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.079768s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081266s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 [ RunTime:0.080452s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.081461s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083062s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->avatar[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:00:09+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.021295s] [吞吐率:0.98req/s] [内存消耗:4,724.66kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.141318s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087071s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088693s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087885s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.083469s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085672s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 [ RunTime:0.082867s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `consignment_order`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.127600s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082864s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->avatar[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:01:02+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.047434s] [吞吐率:0.95req/s] [内存消耗:4,623.71kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.144769s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.097342s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092475s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093928s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.089527s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.091214s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.090014s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.090765s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.097656s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'consignment_order_goods.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T18:01:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.054796s] [吞吐率:0.95req/s] [内存消耗:4,805.84kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129728s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084805s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082847s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087166s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.083496s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085375s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082894s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.089112s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083821s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082604s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087569s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrderGoods->img[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:10:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:0.820727s] [吞吐率:1.22req/s] [内存消耗:4,427.98kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130556s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087916s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082509s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084880s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.086240s ] +[ error ] [0]method not exist:app\common\model\ConsignmentOrder->consignmentOrderGoods[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Query.php:180] +--------------------------------------------------------------- + +[2021-12-12T18:10:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.101402s] [吞吐率:0.91req/s] [内存消耗:5,013.41kb] [文件加载:194] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126674s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.080829s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078929s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.080017s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.079811s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083465s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085298s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084518s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080613s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079092s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.078221s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrderGoods->goods_num[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:11:15+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.126861s] [吞吐率:0.89req/s] [内存消耗:5,013.05kb] [文件加载:194] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130262s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085554s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082685s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088028s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.082973s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083494s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083149s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083126s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086064s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084056s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086548s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->delivery_address[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:12:08+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.141241s] [吞吐率:0.88req/s] [内存消耗:4,812.48kb] [文件加载:193] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135634s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088630s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086499s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090916s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.086466s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088653s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087329s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088022s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085780s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085713s ] +[ error ] [0]致命错误: Class 'app\common\model\Db' not found[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/ConsignmentOrder.php:58] +--------------------------------------------------------------- + +[2021-12-12T18:12:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.058416s] [吞吐率:0.94req/s] [内存消耗:4,812.48kb] [文件加载:193] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127179s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083215s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085677s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088926s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.081390s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083359s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081415s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081567s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084403s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082115s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083284s ] +[ error ] [0]致命错误: Class 'app\common\model\Db' not found[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/ConsignmentOrder.php:58] +--------------------------------------------------------------- + +[2021-12-12T18:12:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.052187s] [吞吐率:0.95req/s] [内存消耗:4,813.92kb] [文件加载:194] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127420s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087178s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080901s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083538s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.081058s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081194s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082246s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083267s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081244s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.078662s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079029s ] +[ error ] [8]未定义数组索引: province[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/ConsignmentOrder.php:59] +--------------------------------------------------------------- + +[2021-12-12T18:13:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.068504s] [吞吐率:0.94req/s] [内存消耗:4,980.25kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127775s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085969s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087102s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085448s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.083015s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084114s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083675s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082837s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084103s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082070s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082551s ] +--------------------------------------------------------------- + +[2021-12-12T18:13:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.095328s] [吞吐率:0.91req/s] [内存消耗:4,980.25kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131467s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088109s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.110676s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086873s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.088215s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087489s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083080s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085023s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087626s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085189s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083683s ] +--------------------------------------------------------------- + +[2021-12-12T18:17:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.482815s] [吞吐率:0.67req/s] [内存消耗:4,984.80kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129984s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085143s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082582s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085435s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.082611s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085909s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082604s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.088376s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088127s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085270s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084771s ] +--------------------------------------------------------------- + +[2021-12-12T18:17:22+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.679955s] [吞吐率:0.60req/s] [内存消耗:5,025.59kb] [文件加载:194] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.325466s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094549s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088934s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090772s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.205745s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089181s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.088801s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.090104s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.093057s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086875s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084579s ] +[ error ] [0]语法解析错误: syntax error, unexpected 'eq' (T_STRING)[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/fe63730b8931f4627b3583cb42f362b9.php:383] +--------------------------------------------------------------- + +[2021-12-12T18:17:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.059730s] [吞吐率:0.94req/s] [内存消耗:5,023.95kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124490s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082788s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081253s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084773s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.082185s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082769s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082660s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087519s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083007s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080884s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079804s ] +[ error ] [8]未定义变量: detail[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/fe63730b8931f4627b3583cb42f362b9.php:383] +--------------------------------------------------------------- + +[2021-12-12T18:18:06+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.161897s] [吞吐率:0.86req/s] [内存消耗:4,984.79kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134201s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.109466s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095130s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092674s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.088623s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.090907s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087533s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.092429s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.091652s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085144s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085344s ] +--------------------------------------------------------------- + +[2021-12-12T18:18:51+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.027156s] [吞吐率:0.97req/s] [内存消耗:4,986.78kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123523s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084235s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083512s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.079553s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.087611s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081479s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.078696s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083606s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.078563s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081016s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.077415s ] +--------------------------------------------------------------- + +[2021-12-12T18:19:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=&_pjax=%23pjax-container +[运行时间:1.054807s] [吞吐率:0.95req/s] [内存消耗:4,742.31kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => '_pjax', + 7 => 'data', + 8 => 'page', + 9 => 'total', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.174390s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087322s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084041s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085570s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.083519s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085446s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089411s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082966s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084562s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082761s ] +--------------------------------------------------------------- + +[2021-12-12T18:19:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%891&order_type=&start_time=&end_time=&_pjax=%23pjax-container +[运行时间:0.937796s] [吞吐率:1.07req/s] [内存消耗:4,731.71kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光1', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => '_pjax', + 7 => 'data', + 8 => 'page', + 9 => 'total', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.199599s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090264s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092748s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.099217s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.089545s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089650s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光1%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089724s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光1%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087299s ] +--------------------------------------------------------------- + +[2021-12-12T18:19:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=&_pjax=%23pjax-container +[运行时间:1.001502s] [吞吐率:1.00req/s] [内存消耗:4,742.66kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%891&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => '_pjax', + 7 => 'data', + 8 => 'page', + 9 => 'total', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131185s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.100425s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081038s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082739s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.080754s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082514s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081295s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081294s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083941s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085112s ] +--------------------------------------------------------------- + +[2021-12-12T18:19:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.626806s] [吞吐率:0.61req/s] [内存消耗:4,826.63kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132943s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092687s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086237s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089867s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087102s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087146s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085163s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086804s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087344s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088009s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086501s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086841s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084328s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086470s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086150s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.088131s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085212s ] +--------------------------------------------------------------- + +[2021-12-12T18:21:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time= +[运行时间:1.097414s] [吞吐率:0.91req/s] [内存消耗:4,775.73kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => 'data', + 7 => 'page', + 8 => 'total', + 9 => 'debug', + 10 => 'cookie_prefix', + 11 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126572s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084859s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082895s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083579s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.085391s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083242s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081701s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.088739s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081624s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085888s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080906s ] +--------------------------------------------------------------- + +[2021-12-12T18:39:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time= +[运行时间:1.716417s] [吞吐率:0.58req/s] [内存消耗:4,989.49kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => 'data', + 7 => 'page', + 8 => 'total', + 9 => 'debug', + 10 => 'cookie_prefix', + 11 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135884s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091758s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089171s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087705s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.089848s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085946s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.089953s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.090993s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090746s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088438s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084029s ] +--------------------------------------------------------------- + +[2021-12-12T18:41:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time= +[运行时间:1.114782s] [吞吐率:0.90req/s] [内存消耗:4,984.50kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => 'data', + 7 => 'page', + 8 => 'total', + 9 => 'debug', + 10 => 'cookie_prefix', + 11 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127719s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088318s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084420s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085524s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.084487s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084965s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085374s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081793s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084726s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083280s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084123s ] +--------------------------------------------------------------- + +[2021-12-12T18:46:08+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:2.399426s] [吞吐率:0.42req/s] [内存消耗:4,827.23kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.298862s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.257076s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.213983s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087043s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087289s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086464s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083675s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086372s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083393s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084826s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085385s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084768s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084748s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082386s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083946s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084919s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082227s ] +--------------------------------------------------------------- + +[2021-12-12T18:47:07+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.684190s] [吞吐率:0.59req/s] [内存消耗:4,827.23kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133301s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088584s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084769s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086759s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.087339s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086344s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083837s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086496s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084105s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086348s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088503s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086021s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084268s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084470s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084081s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086250s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084814s ] +--------------------------------------------------------------- + +[2021-12-12T18:47:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time= +[运行时间:1.191946s] [吞吐率:0.84req/s] [内存消耗:4,976.94kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => 'data', + 7 => 'page', + 8 => 'total', + 9 => 'debug', + 10 => 'cookie_prefix', + 11 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132369s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087039s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086654s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084883s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.084832s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085106s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.088133s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.089298s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086559s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083658s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083203s ] +--------------------------------------------------------------- + +[2021-12-12T18:47:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:0.570852s] [吞吐率:1.75req/s] [内存消耗:4,417.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129129s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087634s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086909s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087620s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.082635s ] +[ error ] [0]Class app\admin\controller\MallImage does not exist[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/Container.php:467] +--------------------------------------------------------------- + +[2021-12-12T18:48:08+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:3.570393s] [吞吐率:0.28req/s] [内存消耗:4,746.12kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:1.401741s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088456s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087338s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086775s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.084161s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085642s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083138s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084631s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.088957s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085772s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088026s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085060s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085436s ] +[ error ] [8]未定义变量: mi_info[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/ConsignmentOrderController.php:94] +--------------------------------------------------------------- + +[2021-12-12T18:48:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.379469s] [吞吐率:0.72req/s] [内存消耗:5,030.47kb] [文件加载:195] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130779s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088512s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085348s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085290s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083773s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085018s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087509s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084676s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081998s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084194s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081422s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085735s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082356s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085174s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->pay_time[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:48:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.457232s] [吞吐率:0.69req/s] [内存消耗:5,030.32kb] [文件加载:195] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132724s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086343s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084506s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085658s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.084692s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086187s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086209s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086296s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083387s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086539s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082533s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085851s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084015s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083486s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->delivery_address[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:51:09+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:2.041753s] [吞吐率:0.49req/s] [内存消耗:5,029.05kb] [文件加载:195] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.344619s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.213301s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082294s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084393s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.082020s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083925s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081284s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083519s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082374s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085667s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081098s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083143s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080976s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082558s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->invoice_no[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:51:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.403143s] [吞吐率:0.71req/s] [内存消耗:5,029.01kb] [文件加载:195] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131704s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087872s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088129s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088108s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.085641s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087490s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085097s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087161s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085341s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087219s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087446s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086874s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085922s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087151s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->order_goods[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:52:04+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.269922s] [吞吐率:0.79req/s] [内存消耗:5,028.99kb] [文件加载:195] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.121207s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082757s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082916s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082153s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.081450s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082498s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079927s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081233s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081329s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081191s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084041s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081099s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079886s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080346s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrderGoods->img[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:55:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.592644s] [吞吐率:0.63req/s] [内存消耗:5,038.63kb] [文件加载:197] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128899s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085660s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084880s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086147s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083102s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087086s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084012s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084743s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087851s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089455s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086342s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084560s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084036s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084447s ] +[ error ] [8]未定义数组索引: ori_image[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/43b0bbc24aac33245d5c697d3b42eb57.php:157] +--------------------------------------------------------------- + +[2021-12-12T18:56:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.514559s] [吞吐率:0.66req/s] [内存消耗:4,859.91kb] [文件加载:193] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128308s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082648s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080346s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084129s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.081076s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081889s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081758s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081595s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082529s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082027s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082836s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083826s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079957s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080556s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrderGoods->img[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:56:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.307529s] [吞吐率:0.76req/s] [内存消耗:5,032.09kb] [文件加载:195] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127984s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085128s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081296s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082046s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.087199s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081681s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079887s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081299s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079363s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082065s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079015s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081408s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079237s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.078290s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrder->goods_price[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T18:57:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.488817s] [吞吐率:0.67req/s] [内存消耗:4,982.99kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133091s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091173s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082141s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084585s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.081972s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082307s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082152s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085091s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082660s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084248s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080133s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080059s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081137s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079193s ] +--------------------------------------------------------------- + +[2021-12-12T18:58:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.558987s] [吞吐率:0.64req/s] [内存消耗:4,810.82kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136940s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086555s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085895s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088716s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.085400s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086459s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085241s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085959s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083905s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087200s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086620s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084996s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084038s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083429s ] +--------------------------------------------------------------- + +[2021-12-12T18:58:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time= +[运行时间:1.088897s] [吞吐率:0.92req/s] [内存消耗:4,976.84kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '晨光', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => 'data', + 7 => 'page', + 8 => 'total', + 9 => 'debug', + 10 => 'cookie_prefix', + 11 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127272s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085808s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085687s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085482s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.082832s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085277s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081990s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%晨光%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083934s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083802s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082104s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083791s ] +--------------------------------------------------------------- + +[2021-12-12T18:58:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.297252s] [吞吐率:0.77req/s] [内存消耗:4,810.82kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127424s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081970s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080498s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081766s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.085656s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082178s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079091s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082173s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079877s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081268s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079779s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081673s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085300s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081700s ] +--------------------------------------------------------------- + +[2021-12-12T18:59:00+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.304834s] [吞吐率:3.28req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T18:59:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.456787s] [吞吐率:0.69req/s] [内存消耗:4,982.99kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125335s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082971s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081365s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084416s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.084726s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085885s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080348s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082537s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079132s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080904s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083877s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084065s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079376s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.118396s ] +--------------------------------------------------------------- + +[2021-12-12T19:00:11+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.062740s] [吞吐率:15.94req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T19:00:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.310936s] [吞吐率:0.76req/s] [内存消耗:4,982.99kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132544s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084846s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087862s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084610s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.088615s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083541s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085421s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082628s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082315s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084198s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081797s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084437s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087219s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081121s ] +--------------------------------------------------------------- + +[2021-12-12T19:00:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.377019s] [吞吐率:0.73req/s] [内存消耗:4,982.99kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135508s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092133s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088187s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089620s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.089327s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088694s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088028s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086890s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085358s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.092410s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085086s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087514s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085086s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086433s ] +--------------------------------------------------------------- + +[2021-12-12T19:01:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.279757s] [吞吐率:0.78req/s] [内存消耗:4,983.02kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.121406s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081778s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079349s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081329s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.079716s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081205s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078200s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080057s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078154s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081410s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081424s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081641s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080632s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079075s ] +--------------------------------------------------------------- + +[2021-12-12T19:04:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.482766s] [吞吐率:0.67req/s] [内存消耗:4,983.48kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124777s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082102s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089387s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084420s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.082648s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089024s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081674s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081056s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078944s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088012s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080120s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081610s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078761s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081225s ] +--------------------------------------------------------------- + +[2021-12-12T19:04:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.355104s] [吞吐率:0.74req/s] [内存消耗:4,983.41kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130803s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087122s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086551s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088170s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.086030s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086003s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085624s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087194s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084784s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086335s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085098s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085650s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085239s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084310s ] +--------------------------------------------------------------- + +[2021-12-12T19:05:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.492731s] [吞吐率:0.67req/s] [内存消耗:4,983.63kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.229126s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092302s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088588s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091561s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.088894s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.090909s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091271s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089487s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.088065s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090032s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088546s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090643s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.090894s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087711s ] +--------------------------------------------------------------- + +[2021-12-12T19:06:10+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.308634s] [吞吐率:0.76req/s] [内存消耗:4,983.51kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126143s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085127s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082936s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084009s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.088256s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085276s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080580s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083284s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080762s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083440s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080475s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082875s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082927s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087668s ] +--------------------------------------------------------------- + +[2021-12-12T19:06:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.401359s] [吞吐率:0.71req/s] [内存消耗:4,983.29kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.140980s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.096729s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090377s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089479s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.094497s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.090314s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090127s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087750s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087557s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086427s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089613s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086322s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086683s ] +--------------------------------------------------------------- + +[2021-12-12T19:06:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.396825s] [吞吐率:0.72req/s] [内存消耗:4,983.29kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130766s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084754s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083286s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086796s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083551s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085209s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083483s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085733s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083211s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084077s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083110s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084548s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081794s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085074s ] +--------------------------------------------------------------- + +[2021-12-12T19:06:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.394098s] [吞吐率:0.72req/s] [内存消耗:4,814.88kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136019s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086429s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087232s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085615s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083356s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084638s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081511s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084535s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081324s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085337s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081862s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084007s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081832s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082824s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083900s ] +--------------------------------------------------------------- + +[2021-12-12T19:08:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.388674s] [吞吐率:0.72req/s] [内存消耗:4,980.48kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134412s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.096377s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079815s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083729s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.079702s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081509s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079782s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080901s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080429s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080070s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079297s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082818s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080160s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084035s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079911s ] +--------------------------------------------------------------- + +[2021-12-12T19:08:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/examine.html?id=1 +[运行时间:0.640046s] [吞吐率:1.56req/s] [内存消耗:4,463.81kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127876s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092354s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085514s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085459s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/examine' LIMIT 1 [ RunTime:0.083582s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084614s ] +--------------------------------------------------------------- + +[2021-12-12T19:08:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/examine.html?id=1 +[运行时间:0.635663s] [吞吐率:1.57req/s] [内存消耗:4,463.81kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132055s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087842s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086587s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086987s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/examine' LIMIT 1 [ RunTime:0.087328s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084379s ] +--------------------------------------------------------------- + +[2021-12-12T19:09:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.418162s] [吞吐率:0.71req/s] [内存消耗:4,980.48kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132298s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089623s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084906s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085596s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.084295s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085652s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096981s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086188s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083946s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084943s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084816s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084489s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083448s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082284s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083371s ] +--------------------------------------------------------------- + +[2021-12-12T19:09:06+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/examine.html?id=1 +[运行时间:0.652709s] [吞吐率:1.53req/s] [内存消耗:4,463.81kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134590s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088019s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085512s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088783s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/examine' LIMIT 1 [ RunTime:0.084456s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085245s ] +--------------------------------------------------------------- + +[2021-12-12T19:09:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/examine.html?id=1 +[运行时间:0.602404s] [吞吐率:1.66req/s] [内存消耗:4,463.81kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124693s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085563s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080528s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083456s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/examine' LIMIT 1 [ RunTime:0.079747s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079902s ] +--------------------------------------------------------------- + +[2021-12-12T19:20:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.460020s] [吞吐率:0.68req/s] [内存消耗:4,766.40kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133526s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086336s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085151s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087529s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.085094s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086827s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081871s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084772s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081908s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084256s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082517s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084054s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'consignment_order_log.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-12T19:21:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.900159s] [吞吐率:0.53req/s] [内存消耗:5,063.89kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128808s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085608s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083041s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085256s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.086143s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086030s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081814s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084019s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081561s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084105s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081902s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083977s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085704s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085649s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083308s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082093s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085830s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrderLog->content[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T19:22:13+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.618056s] [吞吐率:0.62req/s] [内存消耗:5,063.48kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122862s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083556s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080903s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081948s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.092447s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081868s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079796s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081476s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084257s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083948s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079259s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.080953s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.087574s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081579s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079222s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079448s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079978s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrderLog->log_remark[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-12T19:22:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.654060s] [吞吐率:0.60req/s] [内存消耗:5,014.59kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136004s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089048s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085069s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087629s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.086391s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088917s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088212s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084923s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086055s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085322s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089907s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085045s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085106s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086384s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084661s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082881s ] +--------------------------------------------------------------- + +[2021-12-12T19:25:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/examine.html?id=1 +[运行时间:1.010058s] [吞吐率:0.99req/s] [内存消耗:4,463.81kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135861s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091389s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090665s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089777s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/examine' LIMIT 1 [ RunTime:0.089023s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088464s ] +--------------------------------------------------------------- + +[2021-12-12T19:26:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.694002s] [吞吐率:0.59req/s] [内存消耗:5,016.90kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130661s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086400s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084735s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086483s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.085899s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087078s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090531s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085517s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083376s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088248s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083600s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086321s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.083856s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087076s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083782s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083165s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085076s ] +--------------------------------------------------------------- + +[2021-12-12T19:26:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.571296s] [吞吐率:0.64req/s] [内存消耗:5,017.15kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127707s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084125s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087160s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083295s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.081904s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084920s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079849s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081515s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079218s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081906s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079226s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084624s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.080283s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081927s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080027s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079906s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081811s ] +--------------------------------------------------------------- + +[2021-12-12T19:26:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.516913s] [吞吐率:0.66req/s] [内存消耗:4,844.19kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122643s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085180s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079797s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084563s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.080581s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081071s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078853s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082065s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080013s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081692s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081357s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081055s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.078728s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081223s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078985s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079172s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081706s ] +--------------------------------------------------------------- + +[2021-12-12T19:28:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:2.052773s] [吞吐率:0.49req/s] [内存消耗:5,017.04kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.141973s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093830s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091325s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093054s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.090800s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.093166s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090152s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.091430s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.090087s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.091672s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.093321s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.092762s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.090341s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.092243s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.092200s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.090582s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.093274s ] +--------------------------------------------------------------- + +[2021-12-12T19:28:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.644501s] [吞吐率:0.61req/s] [内存消耗:5,017.04kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133897s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087219s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085924s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090128s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.086991s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088908s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084627s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086911s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084918s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088190s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084984s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086600s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.096501s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088122s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085362s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088340s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086942s ] +--------------------------------------------------------------- + +[2021-12-12T19:28:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.544301s] [吞吐率:0.65req/s] [内存消耗:5,017.15kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129892s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085744s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081164s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082865s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.082156s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083809s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080354s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082160s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082747s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081824s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083989s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085854s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.083014s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082837s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080773s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082587s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080934s ] +--------------------------------------------------------------- + +[2021-12-12T19:29:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.556636s] [吞吐率:0.64req/s] [内存消耗:4,844.30kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122413s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084754s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079749s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083982s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083878s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082502s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089134s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084532s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080539s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085275s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081428s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082967s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.080990s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081722s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080932s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081863s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080876s ] +--------------------------------------------------------------- + +[2021-12-12T19:29:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.686814s] [吞吐率:0.59req/s] [内存消耗:4,998.16kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.148383s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094293s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088190s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090734s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.098932s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.090264s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087468s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089112s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.090090s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090476s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087551s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089705s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.089577s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.095370s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087059s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088275s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087957s ] +--------------------------------------------------------------- + +[2021-12-12T19:32:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.711543s] [吞吐率:0.58req/s] [内存消耗:5,042.98kb] [文件加载:197] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.145357s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089109s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086810s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090519s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.088000s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089391s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086229s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089162s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087983s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088509s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088810s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089056s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.087752s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089387s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088192s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086977s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087495s ] +[ error ] [8]未定义数组索引: condition[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/template/taglib/Cx.php:245] +--------------------------------------------------------------- + +[2021-12-12T19:33:18+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.586878s] [吞吐率:0.63req/s] [内存消耗:5,057.16kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131482s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088408s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084489s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084568s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.082017s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085754s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082086s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085444s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082875s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084360s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083617s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084364s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.081450s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084545s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082289s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081712s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082841s ] +[ error ] [0]语法解析错误: syntax error, unexpected 'else' (T_ELSE)[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php:153] +--------------------------------------------------------------- + +[2021-12-12T19:33:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.571013s] [吞吐率:0.64req/s] [内存消耗:5,042.98kb] [文件加载:197] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127896s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085061s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083270s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084884s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.085853s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086519s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082835s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084791s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083485s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083938s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088332s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084101s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.083845s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085615s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080573s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081766s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083127s ] +[ error ] [8]未定义数组索引: condition[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/template/taglib/Cx.php:245] +--------------------------------------------------------------- + +[2021-12-12T19:34:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.552746s] [吞吐率:0.64req/s] [内存消耗:5,057.34kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125207s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091604s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082385s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084429s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.080692s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082448s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091908s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084465s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080688s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082804s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081593s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084867s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.084853s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082638s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082631s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081338s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082782s ] +[ error ] [0]语法解析错误: syntax error, unexpected 'elseif' (T_ELSEIF)[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php:151] +--------------------------------------------------------------- + +[2021-12-12T19:34:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.582543s] [吞吐率:0.63req/s] [内存消耗:5,056.85kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130391s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086674s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088452s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083054s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.084867s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082898s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081633s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083020s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081830s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085215s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084273s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082477s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.082136s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083178s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080479s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086510s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083073s ] +[ error ] [0]语法解析错误: syntax error, unexpected 'else' (T_ELSE)[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php:151] +--------------------------------------------------------------- + +[2021-12-12T19:34:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.684320s] [吞吐率:0.59req/s] [内存消耗:5,057.34kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133153s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087504s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084572s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088986s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.084716s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087117s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084630s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086877s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084312s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086819s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084802s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085747s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085634s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089437s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084660s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.089474s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087229s ] +[ error ] [0]语法解析错误: syntax error, unexpected 'elseif' (T_ELSEIF)[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php:151] +--------------------------------------------------------------- + +[2021-12-12T19:36:06+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.823169s] [吞吐率:0.55req/s] [内存消耗:5,057.10kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138850s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091279s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090701s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090458s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.085624s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089582s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087443s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090292s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087048s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088601s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086850s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087721s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.086727s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089435s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084773s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084206s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085908s ] +[ error ] [0]语法解析错误: syntax error, unexpected 'elseif' (T_ELSEIF)[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php:151] +--------------------------------------------------------------- + +[2021-12-12T19:36:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.658466s] [吞吐率:0.60req/s] [内存消耗:5,057.10kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.235651s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084413s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087049s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086517s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.082951s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084370s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080680s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085310s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081342s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085887s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081974s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084154s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.082323s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084543s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081120s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080390s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081296s ] +[ error ] [0]语法解析错误: syntax error, unexpected 'elseif' (T_ELSEIF)[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php:151] +--------------------------------------------------------------- + +[2021-12-12T19:37:13+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.572072s] [吞吐率:0.64req/s] [内存消耗:5,057.10kb] [文件加载:196] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127307s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084564s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082243s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084337s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.081080s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082522s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080612s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083515s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081430s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082120s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081841s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084489s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.081704s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083174s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084559s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087518s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080662s ] +[ error ] [0]语法解析错误: syntax error, unexpected 'elseif' (T_ELSEIF)[/Library/WebServer/Documents/dggxiangmu/dggjimai/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php:151] +--------------------------------------------------------------- + +[2021-12-12T19:38:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.726731s] [吞吐率:0.58req/s] [内存消耗:5,002.63kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125048s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085355s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082399s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082373s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.079830s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082558s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080010s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084062s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080651s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081511s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081950s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081732s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.082764s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081828s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080739s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078721s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082434s ] +--------------------------------------------------------------- + +[2021-12-12T19:38:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.668874s] [吞吐率:0.60req/s] [内存消耗:5,002.63kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129998s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088750s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084859s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086751s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.083693s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087153s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085787s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084237s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086047s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086880s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083523s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084068s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.083393s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084688s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084113s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.098321s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083290s ] +--------------------------------------------------------------- + +[2021-12-12T19:40:17+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.578906s] [吞吐率:0.63req/s] [内存消耗:5,003.42kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131375s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.097982s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082603s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089027s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.083969s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085233s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084121s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083579s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081282s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082829s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084940s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082377s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.081627s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082575s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083549s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082449s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082662s ] +--------------------------------------------------------------- + +[2021-12-12T19:42:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.814363s] [吞吐率:0.55req/s] [内存消耗:5,012.92kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134616s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085551s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083421s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084351s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.089766s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086051s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082010s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084101s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081941s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084064s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082575s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084377s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.083556s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087040s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085493s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082861s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082191s ] +--------------------------------------------------------------- + +[2021-12-12T19:43:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.617700s] [吞吐率:0.62req/s] [内存消耗:5,012.92kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134925s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091055s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088227s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087721s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.090826s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085283s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085834s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085977s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084059s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085831s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.089553s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085623s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.088983s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083999s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084511s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084266s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083683s ] +--------------------------------------------------------------- + +[2021-12-12T19:44:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.618208s] [吞吐率:0.62req/s] [内存消耗:5,012.92kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132356s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091686s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086058s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087528s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.088753s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086568s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086433s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088504s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.091764s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087360s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083985s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086671s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085040s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085874s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084933s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085065s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085908s ] +--------------------------------------------------------------- + +[2021-12-12T19:47:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.826457s] [吞吐率:0.55req/s] [内存消耗:5,013.29kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124747s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081861s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084230s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083567s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.086785s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085447s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081987s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082247s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078671s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080834s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084350s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081398s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.080238s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082423s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087413s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081786s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082033s ] +--------------------------------------------------------------- + +[2021-12-12T19:48:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.614317s] [吞吐率:0.62req/s] [内存消耗:5,018.34kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135065s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093259s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085024s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085574s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.084561s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087605s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084394s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084042s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083628s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083927s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083811s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084340s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.083132s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084712s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082194s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083635s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084287s ] +--------------------------------------------------------------- + +[2021-12-12T19:48:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.537855s] [吞吐率:0.65req/s] [内存消耗:5,018.34kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127818s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083236s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088352s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085594s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.080723s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083348s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081855s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084760s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081898s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081187s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081389s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081838s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.080528s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082784s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082224s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080490s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080035s ] +--------------------------------------------------------------- + +[2021-12-12T19:49:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.496284s] [吞吐率:0.67req/s] [内存消耗:4,843.98kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126222s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084909s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079955s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.080812s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.080437s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082260s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080633s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080461s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081277s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080473s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081160s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081476s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.079103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081535s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080525s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079984s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079295s ] +--------------------------------------------------------------- + +[2021-12-12T19:49:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.612991s] [吞吐率:0.62req/s] [内存消耗:4,843.98kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.148855s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087870s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085330s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087073s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.084750s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085814s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083563s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085941s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083667s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088439s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083148s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086896s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085834s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086280s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086324s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083844s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081302s ] +--------------------------------------------------------------- + +[2021-12-12T19:52:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.913220s] [吞吐率:0.52req/s] [内存消耗:5,013.34kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122803s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081119s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079545s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081433s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.079569s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083323s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078292s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081195s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.077710s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083346s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079633s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.080363s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.078441s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080264s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.077724s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079731s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082073s ] +--------------------------------------------------------------- + +[2021-12-12T19:54:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:1.326878s] [吞吐率:0.75req/s] [内存消耗:4,935.84kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%99%A8%E5%85%89&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132808s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086156s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087277s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086994s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.087039s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087750s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.088768s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083817s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086567s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086056s ] +--------------------------------------------------------------- + +[2021-12-12T19:54:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.598937s] [吞吐率:0.63req/s] [内存消耗:4,847.42kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131600s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086264s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084302s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089986s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.085907s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086920s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083795s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085846s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083851s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085844s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084565s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085767s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.082939s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084782s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081547s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084568s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084822s ] +--------------------------------------------------------------- + +[2021-12-12T19:54:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:1.432380s] [吞吐率:0.70req/s] [内存消耗:4,970.36kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133994s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085695s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083686s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088634s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083178s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085604s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083673s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084828s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087452s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084974s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089603s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082682s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085097s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083470s ] +--------------------------------------------------------------- + +[2021-12-12T19:54:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:1.010022s] [吞吐率:0.99req/s] [内存消耗:4,742.05kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124607s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083975s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.095809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082489s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.089796s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085707s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.079925s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082438s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087480s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082049s ] +--------------------------------------------------------------- + +[2021-12-12T19:55:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:1.383095s] [吞吐率:0.72req/s] [内存消耗:4,777.25kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125334s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083071s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081612s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083026s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.082279s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082208s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.079957s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.079664s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081487s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080669s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081353s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081591s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079879s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083111s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080515s ] +--------------------------------------------------------------- + +[2021-12-12T19:55:15+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:0.979791s] [吞吐率:1.02req/s] [内存消耗:4,742.05kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132515s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086472s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088894s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087673s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.083872s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085213s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082905s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083370s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090128s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082900s ] +--------------------------------------------------------------- + +[2021-12-12T19:55:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:1.431910s] [吞吐率:0.70req/s] [内存消耗:4,777.25kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131658s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087370s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085468s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087733s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085174s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088350s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085704s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086503s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087000s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084446s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086935s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084994s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084428s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.088505s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084432s ] +--------------------------------------------------------------- + +[2021-12-12T19:55:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:1.052801s] [吞吐率:0.95req/s] [内存消耗:4,742.05kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134096s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089575s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.097116s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090786s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.086277s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.095810s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.092365s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085239s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.094476s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087688s ] +--------------------------------------------------------------- + +[2021-12-12T19:55:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.623695s] [吞吐率:0.62req/s] [内存消耗:4,848.47kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134861s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.128122s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085158s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086068s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.084388s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087045s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083691s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085421s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082967s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086262s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084265s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085272s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085828s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085055s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083316s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087562s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083225s ] +--------------------------------------------------------------- + +[2021-12-12T19:55:47+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.620945s] [吞吐率:0.62req/s] [内存消耗:4,847.42kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134085s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087548s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086020s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092934s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.085268s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087755s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084672s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087334s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.089878s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087237s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084895s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.088707s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085676s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087353s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086257s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087850s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085019s ] +--------------------------------------------------------------- + +[2021-12-12T20:04:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.800833s] [吞吐率:0.56req/s] [内存消耗:5,017.95kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128308s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086484s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084107s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085448s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.083771s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085649s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084223s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084698s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082637s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085609s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082526s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084129s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.081842s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082499s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082695s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085203s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081266s ] +--------------------------------------------------------------- + +[2021-12-12T20:08:44+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.432857s] [吞吐率:2.31req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T20:08:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.913407s] [吞吐率:0.52req/s] [内存消耗:4,848.06kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135854s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089419s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090072s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.156850s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.087349s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.090730s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087043s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089964s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.088140s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089526s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087047s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.088877s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.087927s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.091283s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088784s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088318s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089516s ] +--------------------------------------------------------------- + +[2021-12-12T20:09:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.605854s] [吞吐率:0.62req/s] [内存消耗:5,018.20kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.139413s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088724s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084435s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087040s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.090569s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086691s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084513s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.091249s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084220s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086810s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087608s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087496s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.084527s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086049s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086900s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086762s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084488s ] +--------------------------------------------------------------- + +[2021-12-12T20:09:42+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:0.772353s] [吞吐率:1.29req/s] [内存消耗:4,355.07kb] [文件加载:173] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '26', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'evaluation_price' => '1111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126150s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084042s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083907s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085309s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.082168s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088136s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082113s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082227s ] +--------------------------------------------------------------- + +[2021-12-12T20:10:16+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:0.936456s] [吞吐率:1.07req/s] [内存消耗:4,355.92kb] [文件加载:173] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '26', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'evaluation_price' => '1111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.119818s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081766s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078796s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.080915s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.079976s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.079442s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.077460s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '1111' , `refund_status` = 1 WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086898s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081548s ] +--------------------------------------------------------------- + +[2021-12-12T20:28:09+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:1.951719s] [吞吐率:0.51req/s] [内存消耗:4,439.42kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '26', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'evaluation_price' => '1111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134592s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086828s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086104s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089907s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.084686s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085285s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084198s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `refund_status` = 1 WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083612s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083913s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088357s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083165s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 1 , `total_amount` = 1118 , `update_time` = 1639312088 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.089804s ] +[ error ] [8]未定义变量: after_sale[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/ConsignmentOrderController.php:146] +--------------------------------------------------------------- + +[2021-12-12T20:28:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.922939s] [吞吐率:0.52req/s] [内存消耗:4,851.66kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.137564s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089412s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086277s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088932s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.093192s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089054s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086104s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089002s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087262s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088581s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088683s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089072s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.088579s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.092377s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087002s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085720s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085115s ] +--------------------------------------------------------------- + +[2021-12-12T20:29:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.687013s] [吞吐率:0.59req/s] [内存消耗:4,851.66kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.137826s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088518s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089358s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088512s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.087393s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088801s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084111s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087142s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086476s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086433s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086188s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087847s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.084041s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086727s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087047s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083875s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083741s ] +--------------------------------------------------------------- + +[2021-12-12T20:29:26+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:1.919554s] [吞吐率:0.52req/s] [内存消耗:4,561.20kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'evaluation_price' => '111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125067s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082593s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080055s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082022s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.079839s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081983s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081157s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '111' , `refund_status` = 1 WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079176s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079479s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082180s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084825s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `total_amount` = 1229 , `update_time` = 1639312166 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.079811s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081475s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台已估价' , '' , 1639312166) [ RunTime:0.079402s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.085864s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.080040s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081979s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083005s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.080311s ] +[ error ] [8]未定义数组索引: order_id[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Notice.php:101] +--------------------------------------------------------------- + +[2021-12-12T20:29:30+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.103995s] [吞吐率:9.62req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T20:32:09+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:2.102739s] [吞吐率:0.48req/s] [内存消耗:4,857.99kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.137774s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084585s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082956s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084553s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.081468s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084660s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084396s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085499s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082219s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084835s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084925s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084031s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085812s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085373s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083000s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083419s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083496s ] +--------------------------------------------------------------- + +[2021-12-12T20:32:18+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:1.990846s] [吞吐率:0.50req/s] [内存消耗:4,570.43kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '26', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'evaluation_price' => '1111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127062s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092102s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081178s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082936s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.080774s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081387s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080834s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '1111' , `refund_status` = 1 WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087678s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082233s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082397s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079333s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `total_amount` = 2340 , `update_time` = 1639312337 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.080288s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082497s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台已估价' , '' , 1639312337) [ RunTime:0.082963s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.083231s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.081720s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.078980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082973s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.082199s ] +[ error ] [0]致命错误: Call to undefined function app\admin\controller\client_error()[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/controller/ConsignmentOrderController.php:165] +--------------------------------------------------------------- + +[2021-12-12T20:32:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.680163s] [吞吐率:0.60req/s] [内存消耗:4,857.89kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135853s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087506s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084805s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088470s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.088083s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086573s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090205s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087435s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086107s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087110s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.090182s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087333s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.083656s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085413s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084318s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083723s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085391s ] +--------------------------------------------------------------- + +[2021-12-12T20:32:43+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:2.065529s] [吞吐率:0.48req/s] [内存消耗:4,522.41kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '26', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'evaluation_price' => '1111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.140038s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093089s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090292s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092941s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.089163s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090350s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087339s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '1111' , `refund_status` = 1 WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087348s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.092923s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088945s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087710s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `total_amount` = 2340 , `update_time` = 1639312362 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.087322s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089710s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台已估价' , '' , 1639312363) [ RunTime:0.087824s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.088882s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.087719s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.087086s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088408s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.088233s ] +--------------------------------------------------------------- + +[2021-12-12T20:34:48+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:2.342768s] [吞吐率:0.43req/s] [内存消耗:4,490.41kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '26', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'evaluation_price' => '1111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125638s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085503s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.101707s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088780s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.082963s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083943s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081631s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '1111' , `refund_status` = 1 WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082461s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084214s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084773s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082890s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `total_amount` = 2340 , `update_time` = 1639312487 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.081883s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083877s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台已估价' , '' , 1639312487) [ RunTime:0.083049s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.084458s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.083052s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.080339s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087692s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081987s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.081930s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已估计' , '测试001您好!您的订单202111061732419347已于2021-11-06 17:32已完成,请前往确认估价。' , 102 , 2 , 1 , '' , 1639312488) [ RunTime:0.084934s ] +--------------------------------------------------------------- + +[2021-12-12T20:34:51+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.618082s] [吞吐率:0.62req/s] [内存消耗:4,860.18kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132639s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090985s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086032s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087133s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.085369s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086330s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084478s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089950s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084658s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087492s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086066s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087193s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085504s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088627s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085259s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084251s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084856s ] +--------------------------------------------------------------- + +[2021-12-12T20:35:02+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.096919s] [吞吐率:0.91req/s] [内存消耗:4,782.35kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138724s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087797s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083892s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084223s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.087569s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084730s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081826s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081711s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083298s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083606s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088325s ] +--------------------------------------------------------------- + +[2021-12-12T20:35:07+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.683238s] [吞吐率:0.59req/s] [内存消耗:4,861.10kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127154s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087890s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086732s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085037s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.082578s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084352s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082404s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085196s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082051s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086326s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082147s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084042s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.082028s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084558s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082352s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083600s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085401s ] +--------------------------------------------------------------- + +[2021-12-12T20:42:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.278896s] [吞吐率:0.78req/s] [内存消耗:4,782.39kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130674s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086303s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084262s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087109s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.086561s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087194s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085539s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085304s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085508s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083687s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083191s ] +--------------------------------------------------------------- + +[2021-12-12T20:42:14+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.682089s] [吞吐率:0.59req/s] [内存消耗:4,861.14kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135558s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094607s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089438s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090842s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.087601s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.091634s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086649s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088791s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087030s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.091385s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088140s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089127s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.087151s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089085s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087294s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088338s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087058s ] +--------------------------------------------------------------- + +[2021-12-12T20:42:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.603538s] [吞吐率:0.62req/s] [内存消耗:5,030.77kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131163s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088188s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090422s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086876s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.093300s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087569s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084064s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086059s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084517s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086432s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084977s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086438s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085399s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085951s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084995s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085847s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084181s ] +--------------------------------------------------------------- + +[2021-12-12T20:42:26+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:1.108604s] [吞吐率:0.90req/s] [内存消耗:4,444.09kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'evaluation_price' => '111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.142637s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094765s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.098210s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091649s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.090827s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.098496s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091605s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '111' , `refund_status` = 1 WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088582s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087902s ] +--------------------------------------------------------------- + +[2021-12-12T20:42:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.522102s] [吞吐率:0.66req/s] [内存消耗:4,860.72kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126318s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082949s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082791s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085518s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.090168s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083162s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081591s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083015s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080826s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083278s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080701s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081657s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.081551s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081720s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082499s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080575s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081597s ] +--------------------------------------------------------------- + +[2021-12-12T20:44:22+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.788351s] [吞吐率:0.56req/s] [内存消耗:5,037.85kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129647s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089376s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084363s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088218s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.085346s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088201s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083546s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085718s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086575s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088480s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085456s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.084944s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087531s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083525s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084024s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085351s ] +--------------------------------------------------------------- + +[2021-12-12T20:44:33+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.099183s] [吞吐率:10.08req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T20:44:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.627801s] [吞吐率:0.61req/s] [内存消耗:5,038.35kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132876s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092197s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087618s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086160s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.095511s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086240s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083734s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085255s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083455s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085674s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082423s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084576s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.087322s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087045s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082532s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082185s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084179s ] +--------------------------------------------------------------- + +[2021-12-12T20:45:00+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/refuse.html +[运行时间:2.122353s] [吞吐率:0.47req/s] [内存消耗:4,555.90kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '17', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', + 'remark' => '11111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126744s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084591s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083521s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082935s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/refuse' LIMIT 1 [ RunTime:0.086357s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087203s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083382s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `refund_status` = 2 , `refund_remarks` = '11111' WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081568s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081484s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083206s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082860s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 1 , `update_time` = 1639313099 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.097599s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083250s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台已估价' , '' , 1639313100) [ RunTime:0.082492s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.085386s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.081929s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081552s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083884s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081338s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.083425s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已估计' , '测试001您好!您的订单202111061732419347已于2021-11-06 17:32已完成,请前往确认估价。' , 102 , 2 , 1 , '' , 1639313100) [ RunTime:0.083164s ] +--------------------------------------------------------------- + +[2021-12-12T20:45:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.695863s] [吞吐率:0.59req/s] [内存消耗:4,869.76kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127922s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087124s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085530s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089933s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.082873s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087770s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084119s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088281s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085423s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087433s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084819s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085326s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.086826s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085564s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086013s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084550s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084686s ] +--------------------------------------------------------------- + +[2021-12-12T20:45:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.039564s] [吞吐率:0.96req/s] [内存消耗:4,788.72kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125942s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087051s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083316s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086403s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.084277s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085627s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081290s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082802s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084385s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081249s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081730s ] +--------------------------------------------------------------- + +[2021-12-12T20:45:51+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.050724s] [吞吐率:0.95req/s] [内存消耗:4,788.72kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129317s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087674s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082369s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085259s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.083897s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082783s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.079689s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.088086s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082593s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080054s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079772s ] +--------------------------------------------------------------- + +[2021-12-12T20:45:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.588774s] [吞吐率:0.63req/s] [内存消耗:4,870.43kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130125s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090865s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081773s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084080s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.083974s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084065s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081347s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083756s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081896s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085523s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081418s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.088181s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.081965s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083128s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084503s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084193s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082934s ] +--------------------------------------------------------------- + +[2021-12-12T20:46:01+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/refuse.html +[运行时间:2.115813s] [吞吐率:0.47req/s] [内存消耗:4,555.90kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '16', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', + 'remark' => '1111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126313s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084185s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082750s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086834s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/refuse' LIMIT 1 [ RunTime:0.085315s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085611s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083239s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `refund_status` = 2 , `refund_remarks` = '1111' WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082620s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083810s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087187s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081834s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 1 , `update_time` = 1639313160 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.082696s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083878s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台已估价' , '' , 1639313160) [ RunTime:0.081795s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.093941s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.082994s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.080284s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083638s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.080397s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.088756s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已估计' , '测试001您好!您的订单202111061732419347已于2021-11-06 17:32已完成,请前往确认估价。' , 102 , 2 , 1 , '' , 1639313161) [ RunTime:0.084806s ] +--------------------------------------------------------------- + +[2021-12-12T20:46:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.146339s] [吞吐率:0.87req/s] [内存消耗:4,788.73kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129448s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086781s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084020s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085092s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.085191s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086467s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084980s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.090633s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086321s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088562s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083352s ] +--------------------------------------------------------------- + +[2021-12-12T20:46:08+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.624733s] [吞吐率:0.62req/s] [内存消耗:4,871.89kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134682s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091556s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086180s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088321s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.087565s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088902s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084543s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090383s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086838s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090682s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.091262s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086901s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085191s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086940s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087486s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086629s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085741s ] +--------------------------------------------------------------- + +[2021-12-12T20:46:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.045251s] [吞吐率:0.96req/s] [内存消耗:4,788.73kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128856s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086911s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082910s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083493s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.083578s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084178s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081922s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083559s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083220s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080321s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081201s ] +--------------------------------------------------------------- + +[2021-12-12T20:46:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.624153s] [吞吐率:0.62req/s] [内存消耗:4,871.89kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131726s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090022s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084417s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088224s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.084087s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087330s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083627s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087686s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084079s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088305s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083005s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087192s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.084726s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087412s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084743s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083482s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084707s ] +--------------------------------------------------------------- + +[2021-12-12T20:47:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.662167s] [吞吐率:0.60req/s] [内存消耗:5,049.31kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133748s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088384s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093387s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088240s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.087294s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089308s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087181s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089735s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.088213s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089204s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084453s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085937s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.090159s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087559s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088043s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087693s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085205s ] +--------------------------------------------------------------- + +[2021-12-12T20:47:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.646380s] [吞吐率:0.61req/s] [内存消耗:4,872.64kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135857s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086140s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087351s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088084s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.084351s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086734s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086203s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085910s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086267s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086421s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084722s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087531s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.087957s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086652s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084518s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083882s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085547s ] +--------------------------------------------------------------- + +[2021-12-12T20:48:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.590652s] [吞吐率:0.63req/s] [内存消耗:5,049.22kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134669s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089653s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086870s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084923s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.085897s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085707s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082456s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084386s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082346s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085096s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082172s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.088462s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.082559s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085590s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082123s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083364s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082868s ] +--------------------------------------------------------------- + +[2021-12-12T20:48:09+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.651059s] [吞吐率:0.61req/s] [内存消耗:4,872.64kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128491s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086533s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084256s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087065s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.082970s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085548s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082958s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086894s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082992s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085214s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082690s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085409s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.083127s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084812s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082392s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082615s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083150s ] +--------------------------------------------------------------- + +[2021-12-12T20:48:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.603396s] [吞吐率:0.62req/s] [内存消耗:5,049.06kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.189243s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.080995s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080186s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082467s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.078899s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082308s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079149s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080739s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079967s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080356s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081013s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081400s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.078808s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081575s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079593s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083866s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079014s ] +--------------------------------------------------------------- + +[2021-12-12T20:48:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.100403s] [吞吐率:0.91req/s] [内存消耗:4,788.73kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129193s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090708s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084327s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085957s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.090216s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.091475s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087144s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085300s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.092126s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087943s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084995s ] +--------------------------------------------------------------- + +[2021-12-12T20:48:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.620985s] [吞吐率:0.62req/s] [内存消耗:4,872.64kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.140293s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087036s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085509s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090939s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.087664s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088155s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084588s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086479s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085586s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086274s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084500s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086704s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.086189s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087181s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086744s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084719s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085722s ] +--------------------------------------------------------------- + +[2021-12-12T20:48:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.553530s] [吞吐率:0.64req/s] [内存消耗:4,871.89kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129434s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084527s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082671s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085918s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.082559s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085466s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083261s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083653s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082122s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086896s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083835s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084936s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.082985s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083757s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082617s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082382s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082771s ] +--------------------------------------------------------------- + +[2021-12-12T20:49:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.581711s] [吞吐率:0.63req/s] [内存消耗:4,872.64kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131071s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089315s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082789s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085207s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.084850s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086661s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084581s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084507s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085701s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084529s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083863s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086710s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.081677s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084130s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084675s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083142s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085605s ] +--------------------------------------------------------------- + +[2021-12-12T20:49:08+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:2.151605s] [吞吐率:0.46req/s] [内存消耗:4,555.06kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', + 'evaluation_price' => '222', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132648s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088858s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088437s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088093s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.085659s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089854s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084863s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '222' , `refund_status` = 1 WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085596s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085943s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087088s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085309s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 1 , `total_amount` = 2562 , `update_time` = 1639313347 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.085929s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.088082s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台已估价' , '' , 1639313347) [ RunTime:0.085710s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.088286s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.085994s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.086254s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.092511s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.087001s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.087743s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已估计' , '测试001您好!您的订单202111061732419347已于2021-11-06 17:32已完成,请前往确认估价。' , 102 , 2 , 1 , '' , 1639313348) [ RunTime:0.088029s ] +--------------------------------------------------------------- + +[2021-12-12T20:49:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.685771s] [吞吐率:0.59req/s] [内存消耗:4,874.18kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136527s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090874s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088702s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089007s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.086677s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.091861s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086967s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089516s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087406s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090314s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087192s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.088658s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.089213s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089759s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086555s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088728s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089171s ] +--------------------------------------------------------------- + +[2021-12-12T20:49:15+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.517278s] [吞吐率:0.66req/s] [内存消耗:4,874.85kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122949s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084955s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080666s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082908s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.085862s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087264s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080238s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080954s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078501s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081015s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.078512s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.080926s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.084210s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081735s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085228s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078531s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079332s ] +--------------------------------------------------------------- + +[2021-12-12T20:49:22+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:0.993431s] [吞吐率:1.01req/s] [内存消耗:4,788.73kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.121595s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.080966s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080791s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082939s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.079508s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083794s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.079747s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082193s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080444s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.078480s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.078372s ] +--------------------------------------------------------------- + +[2021-12-12T20:49:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.603841s] [吞吐率:0.62req/s] [内存消耗:4,874.10kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.149020s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.106724s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084887s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085066s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.082067s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084982s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082517s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084421s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081790s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086176s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083207s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084707s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085114s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085780s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082719s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082185s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085030s ] +--------------------------------------------------------------- + +[2021-12-12T20:50:22+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:0.964456s] [吞吐率:1.04req/s] [内存消耗:4,755.86kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128153s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087200s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086382s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086527s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.080734s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084557s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081384s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086616s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084518s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081815s ] +--------------------------------------------------------------- + +[2021-12-12T20:50:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:1.723658s] [吞吐率:0.58req/s] [内存消耗:4,777.25kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.143852s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.095937s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094090s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095234s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.091035s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.094350s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.093137s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.095841s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.092387s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.090495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.091587s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090312s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089341s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.093674s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.089746s ] +--------------------------------------------------------------- + +[2021-12-12T20:50:41+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:0.993276s] [吞吐率:1.01req/s] [内存消耗:4,755.84kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128687s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086676s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084486s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085854s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.084101s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085981s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083805s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.089329s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085721s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083459s ] +--------------------------------------------------------------- + +[2021-12-12T20:50:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.624689s] [吞吐率:1.60req/s] [内存消耗:4,595.14kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123025s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083046s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082043s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081161s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.084433s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080917s ] +--------------------------------------------------------------- + +[2021-12-12T20:51:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/edit/id/115.html?_pjax=%23pjax-container +[运行时间:0.715880s] [吞吐率:1.40req/s] [内存消耗:4,494.21kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '115', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/add.html [ array ( + 0 => 'data', + 1 => 'parents', + 2 => 'log_method', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126085s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084213s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082652s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084530s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/edit' LIMIT 1 [ RunTime:0.082048s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `id` = 115 LIMIT 1 [ RunTime:0.081064s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`sort_id` FROM `admin_menu` WHERE `id` <> 0 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084210s ] +--------------------------------------------------------------- + +[2021-12-12T20:51:38+08:00] 127.0.0.1 POST www.dggjimai.com/admin/admin_menu/edit/id/115.html +[运行时间:1.459579s] [吞吐率:0.69req/s] [内存消耗:4,464.94kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '891', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryK5LdMwrlA0xYg9HS', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/edit/id/115.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'parent_id' => '113', + 'name' => '资金记录', + 'url' => 'admin/account_log/integrallist', + 'icon' => 'fa-list', + 'sort_id' => '1000', + 'is_show' => '1', + 'log_method' => '不记录', + '__token__' => 'f5fab8c3ed4612f746cdd0d43c1f4857', + 'id' => '115', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131623s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.150958s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083151s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084769s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/edit' LIMIT 1 [ RunTime:0.082177s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.084558s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改菜单' , 'POST' , 'admin/admin_menu/edit/id/115.html' , '127.0.0.1' , 1639313497) [ RunTime:0.081448s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.088626s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('2eb259f3YcnoSU1zqKAyjFZSBNsgIuPUHwFCzt5M3gzzbCiEKUVjd8NiIWjnyhOWjCqjjR/W7avshLFEgNnFCS2HY6az0th7dlginkGyh7wO/siG7dtVN6CMjq+po5mngAJksMxMcCf8mBFJIQZvGPaNBJ97YFIb50Ru2+hsyqVHVUw74gDP/Ho8bkSchINOWMibJ9FlVW4rhsEcUSl5E5P3rM52RPtCHQcanlyJ+dWde8250zZd9YGq/pKua9tVN2DPBqvoFSpJt+LAxBVOZCXaofN2aqlmGdHqg/7/00FWeHFxtP7O0M8Iw84Mz/DeDkJpAj7fuVA5Z6A2Rst2zZOFK2/Orkv5C6U' , 175) [ RunTime:0.082122s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `id` = 115 LIMIT 1 [ RunTime:0.081549s ] +[ sql ] [ SQL ] SELECT `id` FROM `admin_menu` WHERE `url` = 'admin/account_log/integrallist' AND `id` <> 115 LIMIT 1 [ RunTime:0.085363s ] +[ sql ] [ SQL ] UPDATE `admin_menu` SET `name` = '资金记录' WHERE `id` = 115 [ RunTime:0.081189s ] +--------------------------------------------------------------- + +[2021-12-12T20:51:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.620370s] [吞吐率:1.61req/s] [内存消耗:4,595.13kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131349s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085512s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085021s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085218s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.084276s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082057s ] +--------------------------------------------------------------- + +[2021-12-12T20:51:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/account_log/integrallist.html?_pjax=%23pjax-container +[运行时间:0.792767s] [吞吐率:1.26req/s] [内存消耗:4,840.45kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/account_log/integrallist.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'source_type_list', + 5 => 'debug', + 6 => 'cookie_prefix', + 7 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122448s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081604s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082441s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081141s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/account_log/integrallist' LIMIT 1 [ RunTime:0.080295s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `account_log` [ RunTime:0.081561s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `account_log` `al` INNER JOIN `user` `u` ON `u`.`id`=`al`.`user_id` [ RunTime:0.078560s ] +[ sql ] [ SQL ] SELECT `al`.*,`u`.`mobile`,`u`.`nickname`,u.sn as user_sn,`u`.`avatar` FROM `account_log` `al` INNER JOIN `user` `u` ON `u`.`id`=`al`.`user_id` ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.083887s ] +--------------------------------------------------------------- + +[2021-12-12T20:51:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/lists.html?_pjax=%23pjax-container +[运行时间:0.934939s] [吞吐率:1.07req/s] [内存消耗:4,939.52kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/account_log/integrallist.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/withdraw/lists.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'type_list', + 5 => 'status_list', + 6 => 'debug', + 7 => 'cookie_prefix', + 8 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134975s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088680s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092363s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.098779s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/lists' LIMIT 1 [ RunTime:0.101297s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `withdraw_apply` [ RunTime:0.103290s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `withdraw_apply` `w` INNER JOIN `user` `u` ON `u`.`id`=`w`.`user_id` [ RunTime:0.109117s ] +[ sql ] [ SQL ] SELECT `w`.*,`u`.`mobile`,`u`.`nickname`,u.sn as user_sn,`u`.`avatar` FROM `withdraw_apply` `w` INNER JOIN `user` `u` ON `u`.`id`=`w`.`user_id` ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.117501s ] +--------------------------------------------------------------- + +[2021-12-12T20:52:00+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/review.html?id=12 +[运行时间:0.692581s] [吞吐率:1.44req/s] [内存消耗:4,623.77kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '12', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/withdraw/review.html [ array ( + 0 => 'id', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.146130s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094454s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092307s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.098234s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/review' LIMIT 1 [ RunTime:0.090869s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.091775s ] +--------------------------------------------------------------- + +[2021-12-12T20:52:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/index.js +[运行时间:0.627022s] [吞吐率:1.59req/s] [内存消耗:4,454.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/review.html?id=12', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128580s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087296s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083131s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086119s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/index.js' LIMIT 1 [ RunTime:0.084867s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.091428s ] +--------------------------------------------------------------- + +[2021-12-12T20:52:06+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/review.html?id=12 +[运行时间:0.635475s] [吞吐率:1.57req/s] [内存消耗:4,469.88kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '12', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/withdraw/review.html [ array ( + 0 => 'id', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124451s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083932s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082008s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085726s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/review' LIMIT 1 [ RunTime:0.082104s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081742s ] +--------------------------------------------------------------- + +[2021-12-12T20:52:07+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/index.js +[运行时间:0.657003s] [吞吐率:1.52req/s] [内存消耗:4,454.95kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/review.html?id=12', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130305s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088355s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083724s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087611s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/index.js' LIMIT 1 [ RunTime:0.086334s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084744s ] +--------------------------------------------------------------- + +[2021-12-12T20:52:45+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/review.html?id=12 +[运行时间:0.979822s] [吞吐率:1.02req/s] [内存消耗:4,624.01kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '12', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/withdraw/review.html [ array ( + 0 => 'id', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131864s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087948s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084431s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088744s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/review' LIMIT 1 [ RunTime:0.086427s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083431s ] +--------------------------------------------------------------- + +[2021-12-12T20:52:51+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/review.html?id=11 +[运行时间:0.618346s] [吞吐率:1.62req/s] [内存消耗:4,469.88kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '11', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/withdraw/review.html [ array ( + 0 => 'id', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126096s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084272s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081556s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084232s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/review' LIMIT 1 [ RunTime:0.081447s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081307s ] +--------------------------------------------------------------- + +[2021-12-12T20:53:00+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/review.html?id=12 +[运行时间:0.630472s] [吞吐率:1.59req/s] [内存消耗:4,469.88kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '12', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/withdraw/review.html [ array ( + 0 => 'id', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128201s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084610s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082048s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082525s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/review' LIMIT 1 [ RunTime:0.081352s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080796s ] +--------------------------------------------------------------- + +[2021-12-12T20:53:03+08:00] 127.0.0.1 POST www.dggjimai.com/admin/withdraw/refuse.html +[运行时间:1.711021s] [吞吐率:0.58req/s] [内存消耗:4,415.70kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '21', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/review.html?id=12', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '12', + 'description' => '111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.164785s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085442s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092144s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090566s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/refuse' LIMIT 1 [ RunTime:0.094462s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `withdraw_apply` [ RunTime:0.083340s ] +[ sql ] [ SQL ] SELECT * FROM `withdraw_apply` WHERE `id` = 12 LIMIT 1 [ RunTime:0.081069s ] +[ sql ] [ SQL ] UPDATE `withdraw_apply` SET `status` = 3 , `update_time` = 1639313582 , `description` = '111' WHERE `id` = 12 [ RunTime:0.083000s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083425s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086823s ] +[ sql ] [ SQL ] UPDATE `user` SET `integral` = `integral` + 100 , `update_time` = 1639313583 WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084841s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083749s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `account_log` [ RunTime:0.084287s ] +[ sql ] [ SQL ] SELECT * FROM `account_log` WHERE `log_sn` = '202112122053037763' LIMIT 1 [ RunTime:0.081648s ] +[ sql ] [ SQL ] INSERT INTO `account_log` (`log_sn` , `user_id` , `source_type` , `source_id` , `source_sn` , `change_amount` , `left_amount` , `remark` , `extra` , `change_type` , `create_time`) VALUES ('202112122053037763' , 1 , 130 , 12 , '202112022246538839' , '100.00' , '104.00' , '' , '' , 1 , 1639313583) [ RunTime:0.081321s ] +--------------------------------------------------------------- + +[2021-12-12T20:53:05+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/lists.html +[运行时间:0.889349s] [吞吐率:1.12req/s] [内存消耗:4,682.40kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/withdraw/lists.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'type_list', + 4 => 'status_list', + 5 => 'debug', + 6 => 'cookie_prefix', + 7 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129554s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088907s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084958s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087732s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/lists' LIMIT 1 [ RunTime:0.088584s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `withdraw_apply` [ RunTime:0.086595s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `withdraw_apply` `w` INNER JOIN `user` `u` ON `u`.`id`=`w`.`user_id` [ RunTime:0.083087s ] +[ sql ] [ SQL ] SELECT `w`.*,`u`.`mobile`,`u`.`nickname`,u.sn as user_sn,`u`.`avatar` FROM `withdraw_apply` `w` INNER JOIN `user` `u` ON `u`.`id`=`w`.`user_id` ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.089970s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085265s ] +--------------------------------------------------------------- + +[2021-12-12T20:53:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/review.html?id=11 +[运行时间:0.626867s] [吞吐率:1.60req/s] [内存消耗:4,469.88kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '11', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/withdraw/review.html [ array ( + 0 => 'id', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125538s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088351s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084329s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084615s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/review' LIMIT 1 [ RunTime:0.082818s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081479s ] +--------------------------------------------------------------- + +[2021-12-12T20:53:15+08:00] 127.0.0.1 POST www.dggjimai.com/admin/withdraw/confirm.html +[运行时间:0.874510s] [吞吐率:1.14req/s] [内存消耗:4,349.43kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '23', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/review.html?id=11', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '11', + 'description' => '22222', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.122534s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.098379s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080408s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.080993s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/confirm' LIMIT 1 [ RunTime:0.084975s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `withdraw_apply` [ RunTime:0.081818s ] +[ sql ] [ SQL ] SELECT * FROM `withdraw_apply` WHERE `id` = 11 LIMIT 1 [ RunTime:0.083485s ] +[ sql ] [ SQL ] UPDATE `withdraw_apply` SET `status` = 2 , `update_time` = 1639313595 , `description` = '22222' WHERE `id` = 11 [ RunTime:0.080232s ] +--------------------------------------------------------------- + +[2021-12-12T20:53:17+08:00] 127.0.0.1 GET www.dggjimai.com/admin/withdraw/lists.html +[运行时间:0.870870s] [吞吐率:1.15req/s] [内存消耗:4,682.43kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/withdraw/lists.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'type_list', + 4 => 'status_list', + 5 => 'debug', + 6 => 'cookie_prefix', + 7 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126344s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084841s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082698s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083746s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/withdraw/lists' LIMIT 1 [ RunTime:0.082490s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `withdraw_apply` [ RunTime:0.083762s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `withdraw_apply` `w` INNER JOIN `user` `u` ON `u`.`id`=`w`.`user_id` [ RunTime:0.082155s ] +[ sql ] [ SQL ] SELECT `w`.*,`u`.`mobile`,`u`.`nickname`,u.sn as user_sn,`u`.`avatar` FROM `withdraw_apply` `w` INNER JOIN `user` `u` ON `u`.`id`=`w`.`user_id` ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.082666s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081906s ] +--------------------------------------------------------------- + +[2021-12-12T20:53:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/user/index.html?_pjax=%23pjax-container +[运行时间:3.131409s] [吞吐率:0.32req/s] [内存消耗:4,803.06kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/withdraw/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/user/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134627s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093611s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088985s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089503s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/user/index' LIMIT 1 [ RunTime:0.090115s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089490s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `user`.`delete_time` = 0 [ RunTime:0.094816s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `user`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.090235s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092565s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 8 OR `second_leader` = 8 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.096923s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.094127s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 8 ) AND `order`.`delete_time` = 0 [ RunTime:0.094645s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086788s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 7 OR `second_leader` = 7 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.085472s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 7 ) AND `order`.`delete_time` = 0 [ RunTime:0.085905s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086408s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 6 OR `second_leader` = 6 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.086056s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 6 ) AND `order`.`delete_time` = 0 [ RunTime:0.086687s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 4 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086107s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 5 OR `second_leader` = 5 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.085998s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 5 ) AND `order`.`delete_time` = 0 [ RunTime:0.086232s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 3 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084587s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 4 OR `second_leader` = 4 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.086262s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 4 ) AND `order`.`delete_time` = 0 [ RunTime:0.086474s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 2 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086990s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 3 OR `second_leader` = 3 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.088382s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 3 ) AND `order`.`delete_time` = 0 [ RunTime:0.087572s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089380s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 2 OR `second_leader` = 2 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.088116s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 2 ) AND `order`.`delete_time` = 0 [ RunTime:0.087505s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087432s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 1 OR `second_leader` = 1 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.087656s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.092181s ] +--------------------------------------------------------------- + +[2021-12-12T20:54:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/user/index.html +[运行时间:2.968344s] [吞吐率:0.34req/s] [内存消耗:5,045.01kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/user/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132615s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087749s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086362s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084803s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/user/index' LIMIT 1 [ RunTime:0.083108s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084913s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `user`.`delete_time` = 0 [ RunTime:0.083231s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `user`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.082133s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084302s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 8 OR `second_leader` = 8 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.084072s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084269s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 8 ) AND `order`.`delete_time` = 0 [ RunTime:0.082995s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082824s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 7 OR `second_leader` = 7 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.081054s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 7 ) AND `order`.`delete_time` = 0 [ RunTime:0.081443s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080657s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 6 OR `second_leader` = 6 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.080757s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 6 ) AND `order`.`delete_time` = 0 [ RunTime:0.081250s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 4 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080626s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 5 OR `second_leader` = 5 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.081179s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 5 ) AND `order`.`delete_time` = 0 [ RunTime:0.080973s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 3 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080562s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 4 OR `second_leader` = 4 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.081482s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 4 ) AND `order`.`delete_time` = 0 [ RunTime:0.080496s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 2 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081266s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 3 OR `second_leader` = 3 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.081055s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 3 ) AND `order`.`delete_time` = 0 [ RunTime:0.082875s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082506s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 2 OR `second_leader` = 2 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.082754s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 2 ) AND `order`.`delete_time` = 0 [ RunTime:0.082164s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083156s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 1 OR `second_leader` = 1 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.083330s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.084113s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085842s ] +--------------------------------------------------------------- + +[2021-12-12T20:55:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/user/index.html +[运行时间:3.191384s] [吞吐率:0.31req/s] [内存消耗:4,822.80kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/user/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123565s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084303s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082463s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082533s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/user/index' LIMIT 1 [ RunTime:0.081999s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081937s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `user`.`delete_time` = 0 [ RunTime:0.084011s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `user`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.080061s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079867s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 8 OR `second_leader` = 8 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.081622s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082556s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 8 ) AND `order`.`delete_time` = 0 [ RunTime:0.083672s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084092s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 7 OR `second_leader` = 7 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.079460s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 7 ) AND `order`.`delete_time` = 0 [ RunTime:0.078394s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078261s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 6 OR `second_leader` = 6 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.078105s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 6 ) AND `order`.`delete_time` = 0 [ RunTime:0.078406s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 4 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085348s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 5 OR `second_leader` = 5 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.079500s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 5 ) AND `order`.`delete_time` = 0 [ RunTime:0.084770s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 3 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080826s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 4 OR `second_leader` = 4 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.082356s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 4 ) AND `order`.`delete_time` = 0 [ RunTime:0.080740s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 2 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081977s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 3 OR `second_leader` = 3 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.081296s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 3 ) AND `order`.`delete_time` = 0 [ RunTime:0.080272s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082347s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 2 OR `second_leader` = 2 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.085213s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 2 ) AND `order`.`delete_time` = 0 [ RunTime:0.082290s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080325s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 1 OR `second_leader` = 1 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.079827s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.081378s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081182s ] +--------------------------------------------------------------- + +[2021-12-12T20:56:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.687228s] [吞吐率:1.46req/s] [内存消耗:4,595.13kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.140387s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091231s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089250s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.094782s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.089493s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088599s ] +--------------------------------------------------------------- + +[2021-12-12T20:56:39+08:00] 127.0.0.1 POST www.dggjimai.com/admin/admin_menu/del.html +[运行时间:1.346090s] [吞吐率:0.74req/s] [内存消耗:4,447.95kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '6', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '117', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.223514s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089734s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092559s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088543s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/del' LIMIT 1 [ RunTime:0.085181s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.088310s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '删除菜单' , 'POST' , 'admin/admin_menu/del.html' , '127.0.0.1' , 1639313799) [ RunTime:0.085512s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.089259s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('3749e52dKWRCL6ATajl+63oaK6EkX7wS487X7AktYAOzAhuHuJQWoEFfMfI' , 176) [ RunTime:0.083675s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `parent_id` = 117 LIMIT 1 [ RunTime:0.082168s ] +[ sql ] [ SQL ] DELETE FROM `admin_menu` WHERE `id` = 117 [ RunTime:0.084722s ] +--------------------------------------------------------------- + +[2021-12-12T20:56:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_menu/index.html?_pjax=%23pjax-container +[运行时间:0.590912s] [吞吐率:1.69req/s] [内存消耗:4,590.97kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_menu/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123684s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.080935s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078957s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082592s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_menu/index' LIMIT 1 [ RunTime:0.080252s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080148s ] +--------------------------------------------------------------- + +[2021-12-12T20:56:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/phase_config/index.html?_pjax=%23pjax-container +[运行时间:0.831894s] [吞吐率:1.20req/s] [内存消耗:4,576.62kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/phase_config/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134868s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088280s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090755s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086512s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/phase_config/index' LIMIT 1 [ RunTime:0.084959s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `phase_config` [ RunTime:0.086018s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `phase_config` WHERE `phase_config`.`delete_time` = 0 [ RunTime:0.085013s ] +[ sql ] [ SQL ] SELECT * FROM `phase_config` WHERE `phase_config`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.083737s ] +--------------------------------------------------------------- + +[2021-12-12T20:56:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin/slide/index.html?_pjax=%23pjax-container +[运行时间:1.221614s] [吞吐率:0.82req/s] [内存消耗:4,668.26kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/phase_config/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/slide/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131883s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085449s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086442s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085871s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/slide/index' LIMIT 1 [ RunTime:0.082578s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `slide` [ RunTime:0.085336s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `slide` WHERE `slide`.`delete_time` = 0 [ RunTime:0.082116s ] +[ sql ] [ SQL ] SELECT * FROM `slide` WHERE `slide`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.087825s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.089851s ] +[ sql ] [ SQL ] SELECT `name` FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082111s ] +[ sql ] [ SQL ] SELECT `name` FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084557s ] +[ sql ] [ SQL ] SELECT `name` FROM `goods` WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083420s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/slide/edit/id/3.html?_pjax=%23pjax-container +[运行时间:0.749292s] [吞吐率:1.33req/s] [内存消耗:4,496.93kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/slide/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/slide/add.html [ array ( + 0 => 'data', + 1 => 'jump_type', + 2 => 'banner_list', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131439s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087937s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085603s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086501s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/slide/edit' LIMIT 1 [ RunTime:0.088901s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `slide` [ RunTime:0.088940s ] +[ sql ] [ SQL ] SELECT * FROM `slide` WHERE ( `id` = 3 ) AND `slide`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084933s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:14+08:00] 127.0.0.1 POST www.dggjimai.com/admin/pub/getslidetargetdata.html +[运行时间:0.559688s] [吞吐率:1.79req/s] [内存消耗:4,380.51kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '9', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/slide/edit/id/3.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'type_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132603s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.101723s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/pub/getslidetargetdata' LIMIT 1 [ RunTime:0.088367s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.090727s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.088643s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:16+08:00] 127.0.0.1 POST www.dggjimai.com/admin/slide/edit/id/3.html +[运行时间:1.385255s] [吞吐率:0.72req/s] [内存消耗:4,492.05kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1059', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary8ohJbONeAHEPhp8n', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/slide/edit/id/3.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '22', + 'describe' => '1111', + 'alias' => 'goods', + 'img' => '/uploads/attachment/20211201/33398edcb757497469e67d1e511859b1.png', + 'jump_type' => '1', + 'jump_target' => '1', + 'sort_number' => '1000', + '__token__' => 'f35a99a60daca96f9b719373fb7f7bbe', + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.145001s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082761s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079556s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.079933s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/slide/edit' LIMIT 1 [ RunTime:0.084424s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.080585s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改轮播' , 'POST' , 'admin/slide/edit/id/3.html' , '127.0.0.1' , 1639313835) [ RunTime:0.086573s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.081077s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('ba5f3220D9wxO6MEC7RCcdCsq2xy4osANN6Q/dywAt2FO5sOu+GQs/na6vTmTWRrpP4lLry01mVGdbS01wJL+0aZFtI8ydnFnofAjrfXHwg/unkgF5krb9sk7ZfKKy9glbSs+kOWHu/HB6U9JlnACU0RLBldJdKzV4GSexwAn4fmtcWpLYTO8Z7aa5HvtyWAJkxiNHBlGbtXnTeQh07mshWWRNEuyO/+D4Njmmv5dUrvQeIIewxcVTT+jQQVb5QeWzSNLDLe7OmQV5jXhb+UxP0XrTcc5DMl/AC4EkxNhgRf4oSVc+Ox8mfuQvaNTbi2jAjB++xHwooQMVvp5SjE5Tsniyggt4cjV5zXaQ' , 177) [ RunTime:0.079226s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `slide` [ RunTime:0.081302s ] +[ sql ] [ SQL ] SELECT * FROM `slide` WHERE ( `id` = 3 ) AND `slide`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079019s ] +[ sql ] [ SQL ] UPDATE `slide` SET `describe` = '1111' , `jump_target` = '1' , `update_time` = 1639313836 WHERE ( `id` = 3 ) AND `slide`.`delete_time` = 0 [ RunTime:0.080134s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:17+08:00] 127.0.0.1 GET www.dggjimai.com/admin/slide/index.html?_pjax=%23pjax-container +[运行时间:1.121844s] [吞吐率:0.89req/s] [内存消耗:4,668.26kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/slide/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/slide/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127183s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088841s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082157s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083692s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/slide/index' LIMIT 1 [ RunTime:0.083397s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `slide` [ RunTime:0.084699s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `slide` WHERE `slide`.`delete_time` = 0 [ RunTime:0.081172s ] +[ sql ] [ SQL ] SELECT * FROM `slide` WHERE `slide`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.084378s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.083001s ] +[ sql ] [ SQL ] SELECT `name` FROM `goods` WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080887s ] +[ sql ] [ SQL ] SELECT `name` FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082718s ] +[ sql ] [ SQL ] SELECT `name` FROM `goods` WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083572s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/slide/edit/id/3.html?_pjax=%23pjax-container +[运行时间:0.714508s] [吞吐率:1.40req/s] [内存消耗:4,496.93kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/slide/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/slide/add.html [ array ( + 0 => 'data', + 1 => 'jump_type', + 2 => 'banner_list', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126746s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084771s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081884s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084608s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/slide/edit' LIMIT 1 [ RunTime:0.083060s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `slide` [ RunTime:0.087211s ] +[ sql ] [ SQL ] SELECT * FROM `slide` WHERE ( `id` = 3 ) AND `slide`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084472s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.006145s] [吞吐率:0.99req/s] [内存消耗:4,759.28kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/slide/edit/id/3.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122780s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081618s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080716s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081267s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.081028s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.080833s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.080347s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.078511s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.081597s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.079776s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_brand/index.html?_pjax=%23pjax-container +[运行时间:0.811674s] [吞吐率:1.23req/s] [内存消耗:4,579.70kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_brand/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127571s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088112s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083948s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088403s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_brand/index' LIMIT 1 [ RunTime:0.085618s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.083399s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.082607s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.083467s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_brand/edit/id/2.html?_pjax=%23pjax-container +[运行时间:0.786443s] [吞吐率:1.27req/s] [内存消耗:4,489.16kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_brand/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_brand/add.html [ array ( + 0 => 'data', + 1 => 'capital', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.139393s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094793s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092684s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095124s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_brand/edit' LIMIT 1 [ RunTime:0.092897s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.102051s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE ( `id` = 2 ) AND `goods_brand`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090270s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_index/index.html?_pjax=%23pjax-container +[运行时间:0.849601s] [吞吐率:1.18req/s] [内存消耗:4,591.13kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_brand/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_index/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130317s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089548s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087108s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090879s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_index/index' LIMIT 1 [ RunTime:0.086103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_index` [ RunTime:0.088480s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods_index` WHERE `goods_index`.`delete_time` = 0 [ RunTime:0.088838s ] +[ sql ] [ SQL ] SELECT * FROM `goods_index` WHERE `goods_index`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.085985s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_index/edit/id/4.html?_pjax=%23pjax-container +[运行时间:0.894471s] [吞吐率:1.12req/s] [内存消耗:4,825.32kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_index/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_index/add.html [ array ( + 0 => 'data', + 1 => 'number', + 2 => 'goods_list', + 3 => 'goods_ids', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125200s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084983s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083833s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083546s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_index/edit' LIMIT 1 [ RunTime:0.089401s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_index` [ RunTime:0.084535s ] +[ sql ] [ SQL ] SELECT * FROM `goods_index` WHERE ( `id` = 4 ) AND `goods_index`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085129s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.083885s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.081493s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:47+08:00] 127.0.0.1 GET www.dggjimai.com/admin/shop_config/policy.html?_pjax=%23pjax-container +[运行时间:0.824010s] [吞吐率:1.21req/s] [内存消耗:4,485.73kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_index/edit/id/4.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/shop_config/policy.html [ array ( + 0 => 'config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130852s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086558s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087859s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086404s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/policy' LIMIT 1 [ RunTime:0.084940s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085201s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'policy' AND `name` = 'procedure' LIMIT 1 [ RunTime:0.083599s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'policy' AND `name` = 'rule' LIMIT 1 [ RunTime:0.082839s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/editor/server.html?action=config&&noCache=1639313867632 +[运行时间:0.449693s] [吞吐率:2.22req/s] [内存消耗:4,311.44kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/policy.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'action' => 'config', + 'noCache' => '1639313867632', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128830s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084805s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/editor/server' LIMIT 1 [ RunTime:0.084385s ] +[ error ] [0]致命错误: Call to a member function getShowMenu() on null[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/traits/AdminTree.php:211] +--------------------------------------------------------------- + +[2021-12-12T20:57:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/editor/server.html?action=config&&noCache=1639313867595 +[运行时间:0.528787s] [吞吐率:1.89req/s] [内存消耗:4,311.44kb] [文件加载:176] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => '*/*', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/policy.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'action' => 'config', + 'noCache' => '1639313867595', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.141188s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084798s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/editor/server' LIMIT 1 [ RunTime:0.084364s ] +[ error ] [0]致命错误: Call to a member function getShowMenu() on null[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/traits/AdminTree.php:211] +--------------------------------------------------------------- + +[2021-12-12T20:57:49+08:00] 127.0.0.1 GET www.dggjimai.com/admin/shop_config/withdraw.html?_pjax=%23pjax-container +[运行时间:1.013112s] [吞吐率:0.99req/s] [内存消耗:4,487.53kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/policy.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/shop_config/withdraw.html [ array ( + 0 => 'config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123907s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084964s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082494s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083853s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/withdraw' LIMIT 1 [ RunTime:0.081323s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084901s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'withdraw' AND `name` = 'min_withdraw' LIMIT 1 [ RunTime:0.083169s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'withdraw' AND `name` = 'max_withdraw' LIMIT 1 [ RunTime:0.099580s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'withdraw' AND `name` = 'poundage' LIMIT 1 [ RunTime:0.081979s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'withdraw' AND `name` = 'poundage_type' LIMIT 1 [ RunTime:0.081069s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/shop_config/website.html?_pjax=%23pjax-container +[运行时间:1.163285s] [吞吐率:0.86req/s] [内存消耗:4,491.88kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/withdraw.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/shop_config/website.html [ array ( + 0 => 'config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132385s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088038s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091063s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086632s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/shop_config/website' LIMIT 1 [ RunTime:0.085781s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086053s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPID' LIMIT 1 [ RunTime:0.087759s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'APPSECRET' LIMIT 1 [ RunTime:0.087019s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084522s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.084002s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.091568s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'channel' LIMIT 1 [ RunTime:0.083938s ] +--------------------------------------------------------------- + +[2021-12-12T20:57:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/phase_config/index.html?_pjax=%23pjax-container +[运行时间:0.861421s] [吞吐率:1.16req/s] [内存消耗:4,576.62kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/website.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/phase_config/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135818s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088671s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091971s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089761s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/phase_config/index' LIMIT 1 [ RunTime:0.092346s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `phase_config` [ RunTime:0.088030s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `phase_config` WHERE `phase_config`.`delete_time` = 0 [ RunTime:0.085874s ] +[ sql ] [ SQL ] SELECT * FROM `phase_config` WHERE `phase_config`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.085186s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_role/index.html?_pjax=%23pjax-container +[运行时间:0.822356s] [吞吐率:1.22req/s] [内存消耗:4,571.10kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/phase_config/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_role/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128668s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085041s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081970s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085289s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_role/index' LIMIT 1 [ RunTime:0.082729s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_role` [ RunTime:0.085601s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `admin_role` [ RunTime:0.082679s ] +[ sql ] [ SQL ] SELECT * FROM `admin_role` ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.090052s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:04+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_role/access/id/2.html?_pjax=%23pjax-container +[运行时间:0.822358s] [吞吐率:1.22req/s] [内存消耗:4,719.78kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_role/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_role/access.html [ array ( + 0 => 'data', + 1 => 'html', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129979s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089172s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085364s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087261s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_role/access' LIMIT 1 [ RunTime:0.085618s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_role` [ RunTime:0.086578s ] +[ sql ] [ SQL ] SELECT * FROM `admin_role` WHERE `id` = 2 LIMIT 1 [ RunTime:0.086383s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089509s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:16+08:00] 127.0.0.1 POST www.dggjimai.com/admin/admin_role/access/id/2.html +[运行时间:1.426255s] [吞吐率:0.70req/s] [内存消耗:4,471.34kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '6488', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary1txlBrQhy9fubNvT', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/admin_role/access/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'url' => + array ( + 0 => '1', + 1 => '75', + 2 => '76', + 3 => '77', + 4 => '78', + 5 => '19', + 6 => '20', + 7 => '21', + 8 => '22', + 9 => '23', + 10 => '24', + 11 => '25', + 12 => '33', + 13 => '46', + 14 => '47', + 15 => '48', + 16 => '49', + 17 => '50', + 18 => '51', + 19 => '52', + 20 => '53', + 21 => '119', + 22 => '120', + 23 => '121', + 24 => '122', + 25 => '123', + 26 => '124', + 27 => '125', + 28 => '126', + 29 => '107', + 30 => '110', + 31 => '111', + 32 => '118', + 33 => '127', + 34 => '128', + 35 => '129', + 36 => '130', + 37 => '113', + 38 => '114', + 39 => '115', + 40 => '116', + 41 => '131', + 42 => '58', + 43 => '59', + 44 => '136', + 45 => '137', + 46 => '132', + 47 => '133', + 48 => '134', + 49 => '135', + 50 => '2', + 51 => '3', + 52 => '4', + 53 => '5', + 54 => '6', + 55 => '7', + 56 => '8', + 57 => '9', + 58 => '10', + 59 => '11', + 60 => '12', + 61 => '13', + 62 => '14', + 63 => '15', + 64 => '16', + 65 => '17', + 66 => '18', + ), + '__token__' => '82efaa39bf62de58c1bc7783fe1f90c3', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131804s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088533s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085884s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087842s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_role/access' LIMIT 1 [ RunTime:0.085109s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.088552s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '角色授权' , 'POST' , 'admin/admin_role/access/id/2.html' , '127.0.0.1' , 1639313895) [ RunTime:0.086352s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.086766s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('3e74cb2f3YK7PVYmHzUEB2ehYTF4czXv+Th+MTLIXf+wxW1/KI4MiywTxrNY8slqU0jo4dcrXumkPoXgJNPSQ6r6FLnq76s4m4RDEXZAvlQNTygDs112sF1dX+768QnKVOVX+dnJZlJJNOwdYwMMFKsDJ1pEOjTNW/oQK8QKOaVo/DyI2ctzH9WlKIY+UrpcM+JurwmvGVlIB2doLQNEet5JJN4acjtWGDuXX1jCfAO5pyLb2AOyDtTARkCtoOzTSIHAqNy7sJywolJIxNyuQNekKvz2nwgtATFSl+Rjw23uFIwxXXpBvRze7/9Ww108BilpjxPJ0leVvpEX0qBnbnyiKd3jDFGBK64D7KblovTNHsXCMMokymCVR6c/jJTtUYe9Id55vki1WCdZP2Tcn6pbWHjnhWZQWvNg6q8k8X7P/63Kl9Sx3hkJP7LOOxD4NMb1bLDNuWMQ54E7KunoxEfR2cCht0Opri9DvUeaJKF+9+4aCCNESkxM1Iqc7Pe0Wn9AWoRCy7n0kviZ1VUpZK7Qv0YxBmQtSQNd7jeQPaHlWfntNqaFt/p9S9Ly0CQ6ToBwUI1L6u1DlWjQs012dBLE' , 178) [ RunTime:0.083921s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_role` [ RunTime:0.087204s ] +[ sql ] [ SQL ] SELECT * FROM `admin_role` WHERE `id` = 2 LIMIT 1 [ RunTime:0.091243s ] +[ sql ] [ SQL ] UPDATE `admin_role` SET `url` = '1,75,76,77,78,19,20,21,22,23,24,25,33,46,47,48,49,50,51,52,53,119,120,121,122,123,124,125,126,107,110,111,118,127,128,129,130,113,114,115,116,131,58,59,136,137,132,133,134,135,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18' WHERE `id` = 2 [ RunTime:0.086462s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:17+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_role/index.html?_pjax=%23pjax-container +[运行时间:0.832173s] [吞吐率:1.20req/s] [内存消耗:4,571.16kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_role/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_role/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126839s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087322s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086347s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086610s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_role/index' LIMIT 1 [ RunTime:0.083613s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_role` [ RunTime:0.084143s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `admin_role` [ RunTime:0.083260s ] +[ sql ] [ SQL ] SELECT * FROM `admin_role` ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.081689s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_user/index.html?_pjax=%23pjax-container +[运行时间:1.426826s] [吞吐率:0.70req/s] [内存消耗:4,812.96kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_role/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_user/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.140609s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093306s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091127s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095804s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_user/index' LIMIT 1 [ RunTime:0.095238s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `admin_user` WHERE `admin_user`.`delete_time` = 0 [ RunTime:0.092016s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE `admin_user`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.093073s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_role` [ RunTime:0.093503s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` = 2 [ RunTime:0.089428s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` = 2 [ RunTime:0.089347s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` = 2 [ RunTime:0.089272s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` IN (1,2) [ RunTime:0.088936s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` IN (1,2) [ RunTime:0.090552s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` IN (1,2) [ RunTime:0.088669s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_user/edit/id/2.html?_pjax=%23pjax-container +[运行时间:0.931119s] [吞吐率:1.07req/s] [内存消耗:4,709.35kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_user/add.html [ array ( + 0 => 'data', + 1 => 'role', + 2 => 'debug', + 3 => 'cookie_prefix', + 4 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132679s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088512s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084006s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087398s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_user/edit' LIMIT 1 [ RunTime:0.086816s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 2 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084886s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_role` [ RunTime:0.089887s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` [ RunTime:0.085876s ] +[ sql ] [ SQL ] SELECT * FROM `admin_role` [ RunTime:0.084869s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:30+08:00] 127.0.0.1 POST www.dggjimai.com/admin/admin_user/edit/id/2.html +[运行时间:1.642213s] [吞吐率:0.61req/s] [内存消耗:4,464.96kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '665', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryqSBgDA0W9WNod5jX', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/admin_user/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'role' => + array ( + 0 => '2', + ), + 'nickname' => '管理员', + 'username' => 'admin', + 'password' => '123456', + 'status' => '1', + '__token__' => '0472b53a250c24112520aabcf9bef16e', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133924s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089355s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094986s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090373s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_user/edit' LIMIT 1 [ RunTime:0.089598s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.090594s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改用户' , 'POST' , 'admin/admin_user/edit/id/2.html' , '127.0.0.1' , 1639313909) [ RunTime:0.087061s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.089935s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('859f7168n8ehbsvcSvNSSEGqjndgTE6e++KIAyBiBK5e3jXY1BHUOir/hjEEyIFYnwfr/6iEszrXUI4WqA7Cq3rSypcLMFVJDn0SAs6ml/A693Kp+S/3LYsq/nJpMbEZFOuFWFru6ygjcmOYxYKTdkfGEC75uRtSJIg5G++mIxhGzYDx7/a8iBVANIXYZZmRZDGuZp4iLGDEzYIo8mXPwoY4ofMFt5dwTLFAX7zQaSFm+WBKn3tH5k4c' , 179) [ RunTime:0.089879s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 2 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088615s ] +[ sql ] [ SQL ] SELECT `id` FROM `admin_user` WHERE ( `username` = 'admin' AND `id` <> 2 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087619s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 2 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087192s ] +[ sql ] [ SQL ] UPDATE `admin_user` SET `password` = '$2y$10$HAq/i4kWWiLBFbvHy8EfEeCIB0RmYlefgIzJYMPlMC/xqJJsMSdW6' WHERE ( `id` = 2 ) AND `admin_user`.`delete_time` = 0 [ RunTime:0.087238s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/admin_user/index.html?_pjax=%23pjax-container +[运行时间:1.339071s] [吞吐率:0.75req/s] [内存消耗:4,578.28kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/admin_user/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138588s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089389s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086615s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089053s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/admin_user/index' LIMIT 1 [ RunTime:0.086345s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `admin_user` WHERE `admin_user`.`delete_time` = 0 [ RunTime:0.086923s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE `admin_user`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.091020s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_role` [ RunTime:0.088036s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` = 2 [ RunTime:0.086231s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` = 2 [ RunTime:0.086138s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` = 2 [ RunTime:0.085556s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` IN (1,2) [ RunTime:0.085275s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` IN (1,2) [ RunTime:0.087177s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `admin_role` WHERE `id` IN (1,2) [ RunTime:0.087496s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:1.431320s] [吞吐率:0.70req/s] [内存消耗:4,777.20kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/admin_user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128539s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089743s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082899s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084940s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.084132s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084260s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084506s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082146s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085356s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083952s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086595s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085582s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081388s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084006s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082420s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:47+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=1 +[运行时间:1.611525s] [吞吐率:0.62req/s] [内存消耗:4,827.09kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130346s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085550s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082532s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086770s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.083503s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084760s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 1 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082698s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083645s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082138s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084827s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082329s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084432s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082190s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082163s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084033s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084194s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.112721s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:0.973337s] [吞吐率:1.03req/s] [内存消耗:4,755.80kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126493s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084396s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084865s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082330s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.081212s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083568s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085381s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081503s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082791s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080999s ] +--------------------------------------------------------------- + +[2021-12-12T20:58:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.647638s] [吞吐率:0.61req/s] [内存消耗:4,874.06kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133931s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090410s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088768s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088870s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.087611s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088835s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086439s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088165s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086781s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090557s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085960s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089666s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085891s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088441s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087661s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088720s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086321s ] +--------------------------------------------------------------- + +[2021-12-12T21:14:22+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:2.176448s] [吞吐率:0.46req/s] [内存消耗:4,814.48kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.155339s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086020s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089403s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089358s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083285s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087451s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081504s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082641s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086439s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082671s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082931s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085537s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080750s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083146s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082259s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081324s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081943s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087091s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086462s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.079351s ] +--------------------------------------------------------------- + +[2021-12-12T21:14:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:1.061399s] [吞吐率:0.94req/s] [内存消耗:4,797.94kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131845s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087262s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084383s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085429s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.084087s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088554s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.091071s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082591s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083783s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (4,3,2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083404s ] +--------------------------------------------------------------- + +[2021-12-12T21:15:02+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=4 +[运行时间:2.689570s] [吞吐率:0.37req/s] [内存消耗:4,847.02kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.143231s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092713s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090020s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.094957s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.090665s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.092126s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 4 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089306s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.092838s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.094062s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.092067s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.091486s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.367171s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 4 ORDER BY `id` DESC [ RunTime:0.226679s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.223831s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 7 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.340054s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.297541s ] +--------------------------------------------------------------- + +[2021-12-12T21:15:07+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=4 +[运行时间:1.507923s] [吞吐率:0.66req/s] [内存消耗:4,846.27kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130132s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086920s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082242s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085802s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.081876s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089631s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 4 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082685s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085971s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082359s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085293s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084410s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084262s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 4 ORDER BY `id` DESC [ RunTime:0.082531s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086517s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 7 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082983s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085545s ] +--------------------------------------------------------------- + +[2021-12-12T21:17:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.199456s] [吞吐率:0.83req/s] [内存消耗:5,045.45kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130843s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086618s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086027s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086344s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.086213s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086893s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085966s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.095600s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087969s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (4,3,2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.094345s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087564s ] +--------------------------------------------------------------- + +[2021-12-12T21:17:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=3 +[运行时间:1.615966s] [吞吐率:0.62req/s] [内存消耗:4,851.46kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126493s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085939s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081898s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085120s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.081180s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086890s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082174s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085594s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083891s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084286s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088964s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083125s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.083215s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084195s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082836s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083243s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082763s ] +--------------------------------------------------------------- + +[2021-12-12T21:17:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=2 +[运行时间:1.664890s] [吞吐率:0.60req/s] [内存消耗:4,851.54kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125726s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.120906s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082933s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083989s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083177s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084498s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083459s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085579s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.106923s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084385s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081641s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084143s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.081914s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084218s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085913s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086027s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.097218s ] +--------------------------------------------------------------- + +[2021-12-12T21:18:16+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:1.956127s] [吞吐率:0.51req/s] [内存消耗:5,015.70kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128652s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085588s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086581s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084442s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.087445s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086274s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082558s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084004s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084082s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088238s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084437s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090602s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082506s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082145s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082797s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082617s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084230s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085280s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082799s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082191s ] +--------------------------------------------------------------- + +[2021-12-12T21:18:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=4 +[运行时间:1.462979s] [吞吐率:0.68req/s] [内存消耗:4,821.66kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131140s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084174s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082601s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082472s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.079591s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081554s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 4 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096055s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080905s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079796s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081370s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 4 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080736s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081786s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079605s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080305s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081790s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.079657s ] +--------------------------------------------------------------- + +[2021-12-12T21:18:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/delivery.html?id=4 +[运行时间:1.582358s] [吞吐率:0.63req/s] [内存消耗:4,817.41kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/delivery.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135516s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.145487s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085985s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089667s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/delivery' LIMIT 1 [ RunTime:0.083540s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.091460s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 4 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088854s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087172s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084069s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085915s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 4 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084700s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086235s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083930s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084992s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087707s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084188s ] +--------------------------------------------------------------- + +[2021-12-12T21:18:53+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.144137s] [吞吐率:6.94req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T21:19:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:2.078837s] [吞吐率:0.48req/s] [内存消耗:5,050.48kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.146514s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.126717s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084392s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092962s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.126659s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085733s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083141s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085592s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085467s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084845s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086058s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084183s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084787s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084043s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085334s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083804s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084310s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086035s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.083816s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085759s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085050s ] +--------------------------------------------------------------- + +[2021-12-12T21:19:26+08:00] 127.0.0.1 GET www.dggjimai.com/static/admin/plugins/bootstrap-colorpicker/css/bootstrap-colorpicker.min.css.map +[运行时间:0.057457s] [吞吐率:17.40req/s] [内存消耗:2,246.76kb] [文件加载:138] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-12T21:19:49+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/detail.html?id=3 +[运行时间:1.539621s] [吞吐率:0.65req/s] [内存消耗:4,826.93kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123226s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083224s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081850s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081680s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/detail' LIMIT 1 [ RunTime:0.086292s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083832s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `id` = 3 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080882s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082592s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079942s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084612s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` = 3 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082015s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084585s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079231s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079859s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082416s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085476s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.079787s ] +--------------------------------------------------------------- + +[2021-12-12T21:19:56+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:0.982639s] [吞吐率:1.02req/s] [内存消耗:4,797.91kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126229s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082039s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082597s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084935s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.082612s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084195s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083941s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.081786s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083262s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (4,3,2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.090226s ] +--------------------------------------------------------------- + +[2021-12-12T21:20:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=2 +[运行时间:2.463548s] [吞吐率:0.41req/s] [内存消耗:4,852.29kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128705s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085716s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086602s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083949s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.082949s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082403s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081032s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081949s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.224795s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.226618s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.223499s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.188320s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.209067s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.260088s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.172374s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080157s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080091s ] +--------------------------------------------------------------- + +[2021-12-12T21:20:08+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=3 +[运行时间:1.546687s] [吞吐率:0.65req/s] [内存消耗:4,852.21kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128256s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086426s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082266s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085594s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.083035s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084301s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083958s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085171s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082458s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085227s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082684s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084175s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.083103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084218s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082890s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087345s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083265s ] +--------------------------------------------------------------- + +[2021-12-12T21:20:12+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=4 +[运行时间:1.451236s] [吞吐率:0.69req/s] [内存消耗:4,847.02kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125793s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083111s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081981s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084997s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.083194s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084113s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 4 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080611s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083380s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081532s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083746s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088137s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083990s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 4 ORDER BY `id` DESC [ RunTime:0.082125s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083516s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 7 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082347s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084633s ] +--------------------------------------------------------------- + +[2021-12-12T21:20:16+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.576229s] [吞吐率:0.63req/s] [内存消耗:4,874.12kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127209s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085087s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082843s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085669s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083231s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085542s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082142s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086357s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082945s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084078s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082982s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089519s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.085236s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084097s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082693s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087537s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083153s ] +--------------------------------------------------------------- + +[2021-12-12T21:20:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=4 +[运行时间:1.469085s] [吞吐率:0.68req/s] [内存消耗:4,847.02kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124680s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090001s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080769s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081350s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.080803s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082066s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 4 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078107s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080479s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078540s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080060s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080234s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.080329s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 4 ORDER BY `id` DESC [ RunTime:0.079499s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080413s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 7 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078702s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079350s ] +--------------------------------------------------------------- + +[2021-12-12T21:20:41+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:2.112222s] [吞吐率:0.47req/s] [内存消耗:4,555.03kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=4', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '7', + 'evaluation_price' => '111', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130863s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084781s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082977s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084996s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.082791s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086785s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 7 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082529s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '111' , `refund_status` = 1 WHERE ( `id` = 7 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082105s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 4 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082198s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085976s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 4 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082981s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 1 , `total_amount` = 111 , `update_time` = 1639315240 WHERE ( `id` = 4 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.082755s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084760s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (4 , '平台已估价' , '' , 1639315240) [ RunTime:0.083865s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.091799s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.085781s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 4 LIMIT 1 [ RunTime:0.091774s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087504s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.087831s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.086113s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已估计' , '测试001您好!您的订单202111061732419343已于2021-11-06 17:32已完成,请前往确认估价。' , 102 , 2 , 1 , '' , 1639315241) [ RunTime:0.083100s ] +--------------------------------------------------------------- + +[2021-12-12T21:20:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.056234s] [吞吐率:0.95req/s] [内存消耗:4,824.04kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128808s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085502s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082666s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083201s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.083087s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085330s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082645s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.088006s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084233s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (4,3,2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082247s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081579s ] +--------------------------------------------------------------- + +[2021-12-12T21:20:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=4 +[运行时间:1.467966s] [吞吐率:0.68req/s] [内存消耗:4,849.34kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125603s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089112s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082088s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083825s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083028s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083560s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 4 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080553s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083932s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081490s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082323s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080743s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082290s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 4 ORDER BY `id` DESC [ RunTime:0.080809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082657s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 7 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081059s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081644s ] +--------------------------------------------------------------- + +[2021-12-12T21:21:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=3 +[运行时间:1.714327s] [吞吐率:0.58req/s] [内存消耗:4,851.46kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.142637s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090000s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087057s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089199s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.086227s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088497s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086172s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087619s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084982s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087483s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087197s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087945s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.086167s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087380s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085554s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086940s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085551s ] +--------------------------------------------------------------- + +[2021-12-12T21:21:18+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=2 +[运行时间:1.522373s] [吞吐率:0.66req/s] [内存消耗:4,851.54kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123391s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083437s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079765s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082624s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.081189s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082380s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083792s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083026s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081334s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082812s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084859s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087503s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.082820s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081643s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081230s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080541s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083135s ] +--------------------------------------------------------------- + +[2021-12-12T21:22:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=3 +[运行时间:1.568174s] [吞吐率:0.64req/s] [内存消耗:4,852.21kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125165s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085212s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082883s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084350s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.081394s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085434s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081611s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084529s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081902s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083572s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086304s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082374s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.081790s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082949s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082721s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081095s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081388s ] +--------------------------------------------------------------- + +[2021-12-12T21:22:16+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:1.082935s] [吞吐率:0.92req/s] [内存消耗:4,450.38kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '23', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=3', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '5', + 'evaluation_price' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131882s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088899s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.116006s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089265s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.094370s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089003s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 5 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090280s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '1' , `refund_status` = 1 WHERE ( `id` = 5 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086929s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 3 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087156s ] +--------------------------------------------------------------- + +[2021-12-12T21:22:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=3 +[运行时间:1.553417s] [吞吐率:0.64req/s] [内存消耗:4,852.29kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=3', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128483s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083545s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081469s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082676s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.086190s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086298s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083753s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082850s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080336s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083256s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080363s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082139s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.080559s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082334s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086941s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079745s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080896s ] +--------------------------------------------------------------- + +[2021-12-12T21:22:24+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:2.068903s] [吞吐率:0.48req/s] [内存消耗:4,555.02kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '23', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=3', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '6', + 'evaluation_price' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126424s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086648s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084076s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086031s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.083070s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085212s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 6 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082328s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '2' , `refund_status` = 1 WHERE ( `id` = 6 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081753s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 3 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082237s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085392s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081862s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 1 , `total_amount` = 2 , `update_time` = 1639315343 WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.081945s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084970s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (3 , '平台已估价' , '' , 1639315343) [ RunTime:0.083917s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.085954s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.083709s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 3 LIMIT 1 [ RunTime:0.082137s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083964s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.082885s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.084673s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已估计' , '测试001您好!您的订单202111061732419342已于2021-11-06 17:32已完成,请前往确认估价。' , 102 , 2 , 1 , '' , 1639315344) [ RunTime:0.081452s ] +--------------------------------------------------------------- + +[2021-12-12T21:22:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.166921s] [吞吐率:0.86req/s] [内存消耗:4,824.04kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124566s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081984s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080596s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083561s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.081500s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081549s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080035s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.079645s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082631s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (4,3,2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082872s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081138s ] +--------------------------------------------------------------- + +[2021-12-12T21:22:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=3 +[运行时间:1.582991s] [吞吐率:0.63req/s] [内存消耗:4,854.52kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136609s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093933s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082482s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085121s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.081455s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084259s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081908s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083448s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081413s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086619s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083503s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083430s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.081602s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083516s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086979s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088384s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087046s ] +--------------------------------------------------------------- + +[2021-12-12T21:22:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=2 +[运行时间:1.669563s] [吞吐率:0.60req/s] [内存消耗:4,851.54kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131975s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088697s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088443s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089117s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.092844s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089861s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088557s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.093099s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087335s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090948s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.089040s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.090987s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.090872s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.091684s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088927s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.089807s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088838s ] +--------------------------------------------------------------- + +[2021-12-12T21:23:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=3 +[运行时间:1.556900s] [吞吐率:0.64req/s] [内存消耗:4,854.52kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129114s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086498s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084459s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086211s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083073s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086450s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086680s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086715s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082426s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084753s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082260s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084389s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.081609s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085137s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082973s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082828s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083714s ] +--------------------------------------------------------------- + +[2021-12-12T21:23:45+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=3 +[运行时间:1.936514s] [吞吐率:0.52req/s] [内存消耗:5,027.88kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.148334s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.109064s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091021s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093952s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.094859s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.180172s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091763s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.100808s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087573s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089487s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.104702s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.094768s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.085918s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088082s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086171s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084534s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.119966s ] +--------------------------------------------------------------- + +[2021-12-12T21:24:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=3 +[运行时间:1.804904s] [吞吐率:0.55req/s] [内存消耗:4,854.46kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129592s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086236s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083219s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087936s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083910s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089127s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082831s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086830s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085958s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085278s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081519s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084032s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.084737s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084956s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085721s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082492s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082217s ] +--------------------------------------------------------------- + +[2021-12-12T21:25:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=3 +[运行时间:1.606323s] [吞吐率:0.62req/s] [内存消耗:4,854.46kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132737s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087608s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083143s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085100s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.090429s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086850s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081619s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087963s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084515s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085943s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081892s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085953s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.082512s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084132s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082226s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082693s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081818s ] +--------------------------------------------------------------- + +[2021-12-12T21:25:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:2.013844s] [吞吐率:0.50req/s] [内存消耗:4,814.58kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/generate/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.199927s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090296s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084603s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090599s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.093309s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.094052s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085336s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085066s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086386s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087506s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086397s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086377s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083146s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084055s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083234s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083343s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085870s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084792s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085125s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084953s ] +--------------------------------------------------------------- + +[2021-12-12T21:25:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.809142s] [吞吐率:0.55req/s] [内存消耗:4,833.38kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/admin_menu/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.120344s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083390s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082393s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.079991s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.080128s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081147s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082539s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.078998s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082996s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082703s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.078867s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.076286s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083613s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081671s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085683s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.076241s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.077784s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.078611s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.077048s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.075688s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085605s ] +--------------------------------------------------------------- + +[2021-12-12T21:25:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:1.025347s] [吞吐率:0.98req/s] [内存消耗:4,797.91kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126174s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082561s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081524s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085133s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.081670s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084163s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082395s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082540s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083824s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (4,3,2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082826s ] +--------------------------------------------------------------- + +[2021-12-12T21:25:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=3 +[运行时间:1.589809s] [吞吐率:0.63req/s] [内存消耗:4,854.46kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131000s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086682s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085785s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087339s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.085971s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086995s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084467s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084268s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082289s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084145s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082056s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.088831s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.082214s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084483s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083481s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084193s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.093364s ] +--------------------------------------------------------------- + +[2021-12-12T21:25:47+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=3 +[运行时间:1.555206s] [吞吐率:0.64req/s] [内存消耗:4,855.27kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=3', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123558s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082463s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085671s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082057s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.090588s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082516s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080714s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081521s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082644s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082648s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079841s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082756s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.085357s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080615s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079562s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081201s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082238s ] +--------------------------------------------------------------- + +[2021-12-12T21:25:54+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:2.110935s] [吞吐率:0.47req/s] [内存消耗:4,554.96kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '23', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=3', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '6', + 'evaluation_price' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128488s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088661s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083072s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084591s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.087358s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090089s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 6 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083985s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `refund_status` = 1 WHERE ( `id` = 6 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084110s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 3 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087651s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084414s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082038s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 1 , `total_amount` = 4 , `update_time` = 1639315553 WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.083218s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084342s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (3 , '平台已估价' , '' , 1639315553) [ RunTime:0.083707s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.083523s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.081823s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 3 LIMIT 1 [ RunTime:0.082816s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089478s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.081405s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.082446s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已估计' , '测试001您好!您的订单202111061732419342已于2021-11-06 17:32已完成,请前往确认估价。' , 102 , 2 , 1 , '' , 1639315554) [ RunTime:0.086311s ] +--------------------------------------------------------------- + +[2021-12-12T21:25:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=3 +[运行时间:1.589056s] [吞吐率:0.63req/s] [内存消耗:4,856.75kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/detail.html?id=3', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122323s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084529s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080663s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085763s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.090323s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088085s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081354s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083122s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079696s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081009s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080354s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081363s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.080209s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080349s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084844s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078945s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082726s ] +--------------------------------------------------------------- + +[2021-12-12T21:26:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=3 +[运行时间:1.698018s] [吞吐率:0.59req/s] [内存消耗:5,027.88kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136017s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.098414s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090345s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088825s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.089164s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088453s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 3 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086670s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.091058s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.089109s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089512s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.089211s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.093936s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 3 ORDER BY `id` DESC [ RunTime:0.092050s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089410s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086642s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.092738s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088414s ] +--------------------------------------------------------------- + +[2021-12-12T21:26:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=2 +[运行时间:1.552872s] [吞吐率:0.64req/s] [内存消耗:4,852.30kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128227s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087910s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082643s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086424s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.083288s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.090867s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082833s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084658s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082496s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084405s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082643s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084186s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.083812s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084821s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083228s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082613s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082804s ] +--------------------------------------------------------------- + +[2021-12-12T21:26:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.029194s] [吞吐率:0.97req/s] [内存消耗:4,759.30kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130276s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087307s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087283s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088484s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.085916s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087700s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.085620s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.085495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.086594s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.084367s ] +--------------------------------------------------------------- + +[2021-12-12T21:26:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.728996s] [吞吐率:0.58req/s] [内存消耗:4,782.58kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134505s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090298s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087922s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088881s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.087991s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087093s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085927s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.097226s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084533s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087822s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.084760s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087797s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.085157s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.086980s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.085980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.086945s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.084713s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.084994s ] diff --git a/runtime/log/202112/13.log b/runtime/log/202112/13.log new file mode 100755 index 0000000..377b392 --- /dev/null +++ b/runtime/log/202112/13.log @@ -0,0 +1,1869 @@ +--------------------------------------------------------------- + +[2021-12-13T20:13:43+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.908083s] [吞吐率:1.10req/s] [内存消耗:4,320.21kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '438', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryKkmLCOJVifP8GZKg', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'Acne Studios', + 1 => 'Nanushka', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.183939s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086021s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083697s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085167s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Nanushka%' OR `gb`.`name` LIKE '%Nanushka%' OR `gc`.`name` LIKE '%Nanushka%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.083085s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Nanushka%' OR `gb`.`name` LIKE '%Nanushka%' OR `gc`.`name` LIKE '%Nanushka%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.081716s ] +--------------------------------------------------------------- + +[2021-12-13T20:14:09+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.695243s] [吞吐率:1.44req/s] [内存消耗:4,321.58kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '438', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryYMid7AS52evBSKyh', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'Acne Studios', + 1 => 'Nanushka', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133747s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086779s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087994s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088626s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Acne Studios%' OR `gb`.`name` LIKE '%Acne Studios%' OR `gc`.`name` LIKE '%Acne Studios%') or( `spec_value` LIKE '%Nanushka%' OR `gb`.`name` LIKE '%Nanushka%' OR `gc`.`name` LIKE '%Nanushka%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.092966s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Acne Studios%' OR `gb`.`name` LIKE '%Acne Studios%' OR `gc`.`name` LIKE '%Acne Studios%') or( `spec_value` LIKE '%Nanushka%' OR `gb`.`name` LIKE '%Nanushka%' OR `gc`.`name` LIKE '%Nanushka%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.085734s ] +--------------------------------------------------------------- + +[2021-12-13T20:14:31+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.704837s] [吞吐率:1.42req/s] [内存消耗:4,321.42kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '431', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryPfBphwfQnQwem2iO', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'Acne Studios', + 1 => 'M', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131750s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085454s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085019s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087809s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Acne Studios%' OR `gb`.`name` LIKE '%Acne Studios%' OR `gc`.`name` LIKE '%Acne Studios%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.086013s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Acne Studios%' OR `gb`.`name` LIKE '%Acne Studios%' OR `gc`.`name` LIKE '%Acne Studios%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.084554s ] +--------------------------------------------------------------- + +[2021-12-13T20:15:01+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.893086s] [吞吐率:1.12req/s] [内存消耗:4,321.42kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '431', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryGflqflQC4IcasMvb', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'Acne Studios', + 1 => 'M', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131273s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084233s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082994s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087827s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Acne Studios%' OR `gb`.`name` LIKE '%Acne Studios%' OR `gc`.`name` LIKE '%Acne Studios%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.083182s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Acne Studios%' OR `gb`.`name` LIKE '%Acne Studios%' OR `gc`.`name` LIKE '%Acne Studios%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.082751s ] +--------------------------------------------------------------- + +[2021-12-13T20:15:53+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.978896s] [吞吐率:1.02req/s] [内存消耗:4,320.68kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '427', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarybStiRoQo4Rwv4X3N', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'Nanushka', + 1 => 'M', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.145635s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090915s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089337s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.091390s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Nanushka%' OR `gb`.`name` LIKE '%Nanushka%' OR `gc`.`name` LIKE '%Nanushka%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.089100s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Nanushka%' OR `gb`.`name` LIKE '%Nanushka%' OR `gc`.`name` LIKE '%Nanushka%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.089866s ] +--------------------------------------------------------------- + +[2021-12-13T20:16:09+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.696022s] [吞吐率:1.44req/s] [内存消耗:4,321.05kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '427', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryuTAFdAs5PAvqCgXz', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'Nanushka', + 1 => 'M', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129916s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083916s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081959s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.083224s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Nanushka%' OR `gb`.`name` LIKE '%Nanushka%' OR `gc`.`name` LIKE '%Nanushka%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.083759s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%Nanushka%' OR `gb`.`name` LIKE '%Nanushka%' OR `gc`.`name` LIKE '%Nanushka%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.089004s ] +--------------------------------------------------------------- + +[2021-12-13T20:17:32+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.886271s] [吞吐率:1.13req/s] [内存消耗:4,321.20kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '420', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary6iqKXuDGVsgXOUMR', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'S', + 1 => 'M', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130432s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086584s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.095750s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088000s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%S%' OR `gb`.`name` LIKE '%S%' OR `gc`.`name` LIKE '%S%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.090031s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%S%' OR `gb`.`name` LIKE '%S%' OR `gc`.`name` LIKE '%S%') or( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.085119s ] +--------------------------------------------------------------- + +[2021-12-13T20:17:43+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.834067s] [吞吐率:1.20req/s] [内存消耗:4,321.20kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '421', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary70V9taanddBuNyx7', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'XLL', + 1 => '', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.214879s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.081696s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.090315s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.083370s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%XLL%' OR `gb`.`name` LIKE '%XLL%' OR `gc`.`name` LIKE '%XLL%') or( `spec_value` LIKE '%%' OR `gb`.`name` LIKE '%%' OR `gc`.`name` LIKE '%%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.084830s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%XLL%' OR `gb`.`name` LIKE '%XLL%' OR `gc`.`name` LIKE '%XLL%') or( `spec_value` LIKE '%%' OR `gb`.`name` LIKE '%%' OR `gc`.`name` LIKE '%%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.085092s ] +--------------------------------------------------------------- + +[2021-12-13T20:18:10+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.781768s] [吞吐率:1.28req/s] [内存消耗:4,304.33kb] [文件加载:167] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '326', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryVoWPumHNWfnA88oH', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'XLLL', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134853s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083967s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091285s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085872s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%XLLL%' OR `gb`.`name` LIKE '%XLLL%' OR `gc`.`name` LIKE '%XLLL%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.081368s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%XLLL%' OR `gb`.`name` LIKE '%XLLL%' OR `gc`.`name` LIKE '%XLLL%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.081705s ] +--------------------------------------------------------------- + +[2021-12-13T20:18:20+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:1.426620s] [吞吐率:0.70req/s] [内存消耗:4,304.33kb] [文件加载:167] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '326', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary5BK4FQXPsymIvTcU', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'XLLL', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.174282s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085035s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.103103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.089370s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%XLLL%' OR `gb`.`name` LIKE '%XLLL%' OR `gc`.`name` LIKE '%XLLL%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.573091s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%XLLL%' OR `gb`.`name` LIKE '%XLLL%' OR `gc`.`name` LIKE '%XLLL%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.170575s ] +--------------------------------------------------------------- + +[2021-12-13T20:18:34+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.684566s] [吞吐率:1.46req/s] [内存消耗:4,321.20kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/index/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '420', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryJAPThMKAIkVZiPld', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'M', + 1 => 'S', + ), +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136298s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088256s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086965s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.101134s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') or( `spec_value` LIKE '%S%' OR `gb`.`name` LIKE '%S%' OR `gc`.`name` LIKE '%S%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.096151s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') or( `spec_value` LIKE '%S%' OR `gb`.`name` LIKE '%S%' OR `gc`.`name` LIKE '%S%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.087062s ] +--------------------------------------------------------------- + +[2021-12-13T20:53:12+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.544580s] [吞吐率:1.84req/s] [内存消耗:4,264.71kb] [文件加载:166] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryqeh3HMjSugg2GLW4', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127772s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085434s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084181s ] +[ error ] [0]Class app\api\controller\MallImage does not exist[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/Container.php:467] +--------------------------------------------------------------- + +[2021-12-13T20:54:43+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.797243s] [吞吐率:1.25req/s] [内存消耗:4,312.49kb] [文件加载:171] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarydW6XFnqGESpcoW1s', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.140794s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.095063s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.096224s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.093695s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'attr' in 'field list'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-13T20:57:08+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:4.580272s] [吞吐率:0.22req/s] [内存消耗:4,312.63kb] [文件加载:171] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary7L3eDu0Uvc3NwCoV', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123551s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.096836s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.079956s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.108578s ] +[ error ] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'name' in field list is ambiguous[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-13T20:57:53+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.901224s] [吞吐率:1.11req/s] [内存消耗:4,312.63kb] [文件加载:171] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryTv8Xy7yGdz6TO8OW', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129537s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089005s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087354s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085930s ] +[ error ] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in field list is ambiguous[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-13T20:58:02+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.615893s] [吞吐率:1.62req/s] [内存消耗:4,312.66kb] [文件加载:171] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarycRXv6SwhEyBcVLwx', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135184s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.094375s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087349s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088181s ] +[ error ] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-13T20:58:11+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.813300s] [吞吐率:1.23req/s] [内存消耗:4,331.02kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryzOfBkRjUzTOX2ExR', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127371s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087086s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.092777s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086178s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086494s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.094283s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082921s ] +--------------------------------------------------------------- + +[2021-12-13T21:00:08+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.757180s] [吞吐率:1.32req/s] [内存消耗:4,331.02kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarySVWLhTnOyVY78eey', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129175s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089482s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085972s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.083216s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081160s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084700s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080633s ] +--------------------------------------------------------------- + +[2021-12-13T21:00:19+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.770097s] [吞吐率:1.30req/s] [内存消耗:4,331.27kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary8FyPsMbaHfEdAkWC', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130706s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086877s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085130s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.089742s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086217s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088207s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084433s ] +--------------------------------------------------------------- + +[2021-12-13T21:03:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.097931s] [吞吐率:10.21req/s] [内存消耗:2,712.40kb] [文件加载:149] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryt2z5x6GErulfS8S5', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ error ] [0]语法解析错误: syntax error, unexpected '='[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/IndexController.php:189] +--------------------------------------------------------------- + +[2021-12-13T21:03:49+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.651057s] [吞吐率:1.54req/s] [内存消耗:4,317.41kb] [文件加载:171] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBvPYSNnPOAA7Ghkn', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131269s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.118953s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.094534s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087342s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086008s ] +[ error ] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-13T21:03:59+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.945089s] [吞吐率:1.06req/s] [内存消耗:4,336.55kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryQMhDBwBnkd4QHBUZ', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.220619s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092285s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087155s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086636s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086066s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.083560s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084797s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084551s ] +--------------------------------------------------------------- + +[2021-12-13T21:04:32+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.819142s] [吞吐率:1.22req/s] [内存消耗:4,336.55kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryYgpBJ2xmsTAlwXdH', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131361s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084152s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085199s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085328s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082018s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.081951s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087124s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080950s ] +--------------------------------------------------------------- + +[2021-12-13T21:04:51+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.842007s] [吞吐率:1.19req/s] [内存消耗:4,336.55kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryz0lh8Xq3mlDphT43', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130715s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087893s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081301s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084717s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082944s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.082430s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086288s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082333s ] +--------------------------------------------------------------- + +[2021-12-13T21:15:14+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.940901s] [吞吐率:1.06req/s] [内存消耗:4,336.93kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryhWtqeFEgpCK9mT9w', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127239s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087528s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.092760s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086519s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083021s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.086295s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085138s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083455s ] +--------------------------------------------------------------- + +[2021-12-13T21:15:29+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.811856s] [吞吐率:1.23req/s] [内存消耗:4,336.62kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryIRXYIK4bEa8z6LUd', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124285s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082891s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084077s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.081673s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080013s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.079780s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083452s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084287s ] +--------------------------------------------------------------- + +[2021-12-13T21:18:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%B5%8B%E8%AF%954&order_type=&start_time=&end_time= +[运行时间:1.335265s] [吞吐率:0.75req/s] [内存消耗:4,825.23kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%B5%8B%E8%AF%954&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'search_key' => 'order_sn', + 'keyword' => '', + 'goods_name' => '测试4', + 'order_type' => '', + 'start_time' => '', + 'end_time' => '', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'search_key', + 1 => 'keyword', + 2 => 'goods_name', + 3 => 'order_type', + 4 => 'start_time', + 5 => 'end_time', + 6 => 'data', + 7 => 'page', + 8 => 'total', + 9 => 'debug', + 10 => 'cookie_prefix', + 11 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130541s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087635s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087745s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.085671s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086696s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%测试4%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084389s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `g`.`goods_name` LIKE '%测试4%' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084227s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088445s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083015s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084335s ] +--------------------------------------------------------------- + +[2021-12-13T21:18:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:0.956321s] [吞吐率:1.05req/s] [内存消耗:4,768.89kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html?search_key=order_sn&keyword=&goods_name=%E6%B5%8B%E8%AF%954&order_type=&start_time=&end_time=', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123515s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085058s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081622s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083544s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.081066s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.083825s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.081337s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.081097s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.085341s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.082563s ] +--------------------------------------------------------------- + +[2021-12-13T21:18:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.682039s] [吞吐率:0.59req/s] [内存消耗:4,794.80kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124559s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082373s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081384s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083432s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.081318s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.082771s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083941s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082007s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080775s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.084121s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.084753s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083934s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.082874s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.082894s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.081354s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.082044s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.082507s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.081227s ] +--------------------------------------------------------------- + +[2021-12-13T21:19:32+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:2.848950s] [吞吐率:0.35req/s] [内存消耗:4,692.13kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3818', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary2aWgo8YrB2BruMCg', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3', + 'code' => '2', + 'goods_category_id' => '2', + 'brand_id' => '2', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 1 => '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19_750_461.jpg', + ), + 'ori_fm_img' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png', + 'thumb_img_f' => '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '0', + ), + 1 => + array ( + 0 => '0', + ), + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '1', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => 'M码 +Width 52 cm +Length 62 cm', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => '1c5a9e4a2ee200f59067379f762ddbe5', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128588s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088286s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090351s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085270s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.083256s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.083919s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639401570) [ RunTime:0.084266s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.083426s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('4f2ee931WVrf+n3aNQC5cLotYNDckbNUZ55J9tZ7eC9cVjrXE9c8aG4/0AiQzRmkMP+wF0ytNVtvY5PN/YUqsgWDIJOdTsD8QObgsZbUpsogC1TiOJVJ0Sl+xWGS0fOJdKzupoPMt4y7iSEcL7qPUvr49PuXLch1J0MUmQgHhjygKHxbBb67MIAgt+gnezt8pgXbTGkk9dnvZAK83ekW/z88uMlOZcz7Z1JuQS1kSBlAo1xjYgRZ24WWBym4M6M2qN2dKsNoo+5UHugjpsA9L3tVC6XRX+hZ/iiL2v2aW4mPyegbAhjz7o91IXtBDwKRRdZqRXJv8fsrcMutiYeDtMmvBNh7uo/buBbnIlHE0IY2fS+VhPg6hboJZfixo7zF8mDhmigaAdc+gjeySf3lN933HMGBvtAEZfJcHVeq5R5b91y+uSMKUNsuj5kPyqu2yjPv94SohRGQFlk7CCmN+c3f/B7xl+YVTPLWZgbc3kAb4urr4uhh8s0qHv6o4NksUjtoR0c8fGxF5ZVJZgjILcSpaOvYR/cELNAQLgZ/7V8/qiod55f4igvZE06IhAGSTXyPIakD9OxDcWS4EZpNyQi1BpXKETxN5KWJGajmcKX9BHDAVtaZCCTj868RBldYoXhBrhDqtluPEN8kr02YAvi+bhU3oT5eZCreCcaAmEM59KkFXdeEc0SYVqSYKCRtRodb0kngPhmJFtDpd09GdLt4xNh3Lw9oyMkLwVf0xYxds4P6B/cRCu/viK/PNGEhYGpi15xfhPwFZMLcccMsnYWduHLgnOReaGDQksWEOj/spVfObkPPbvlI7lKzmPOTCOVUzf8pPRRW7XOL/g/Os3028qJnnLi2rbfMa0SY/zRDKq7k1cG8LVBTW8WYLJaLtn3UR0N943bVSfHdXK0vZY9uIwRTdAi5UXnP6bFH6O85NFTYkf1h8mzh9ziTbSP7BriyxGeJNhVtBA+ncXV3j5eKqoQFGl06yIOwXBe0X8/FM5GblE49oGSYFC/r5HdZLj6SWW8JThRxpCo7XkbtJEK0S90cOMHet+A3SfYWV06TeiiTCnpGz38TFutd+Hv9q21n6A0+iNNHidvnjH7CoDnWpjYcI8If76+yReMauOdmxwdT5QMdNWULguNJEOZ/EKTBrBB1SE9gOLfxJPsJr+ef0zm4T6i8BxTFvObhSC+fHgyCNkifwGZGnsJ5GFYgIRrvsmtiV1CKq84BRSLV6NWvfNIdOe3Nf0+WFDRGdT0QEkESZJGw0RqElk4/Z0D9OtBv2oJGfk0EftH0QTNSw/To2V/zEY1DQivRpCuadUZx9H0VaVTtytKsj8r02EYcoHCy2P+cbxmuDN9Unt6jy5OYlHdYa5xX1E3cc/D3GLv6aA8kyWre/82tkKpQ/8BH6rJt3jcro8rK05j5tGLy291i56EF+jpxP8OC2UACZvrnT/Ux5ihvIRRm2wJtxYomKYHvVAME8HHeCbD1ZYRiX36xFTlttMeX1bF8EFVFKuMOgjxWNlp5VjJj0k3d94pw9al64ww07PWZw4pi/BtkhkyvN26wb/yQbaMXmrugholvsngjm1KISg' , 209) [ RunTime:0.084444s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086402s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081085s ] +[ sql ] [ SQL ] UPDATE `goods` SET `goods_size` = 'M码 +Width 52 cm +Length 62 cm' , `update_time` = 1639401571 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.081789s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083244s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082344s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081108s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 0 WHERE ( `ori_image` = '/uploads/attachment/20211124/27df77fadbe8fedd149e09bd83a43a19.jpg' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085570s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.082688s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'S' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.079855s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 0 WHERE `spec_value` = 'S' AND `goods_id` = 2 [ RunTime:0.084763s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.085289s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 0 WHERE `spec_value` = 'M' AND `goods_id` = 2 [ RunTime:0.081552s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'L' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.084974s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 0 WHERE `spec_value` = 'L' AND `goods_id` = 2 [ RunTime:0.087758s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XL' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.090267s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 1 WHERE `spec_value` = 'XL' AND `goods_id` = 2 [ RunTime:0.088826s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XXL' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.116735s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 0 WHERE `spec_value` = 'XXL' AND `goods_id` = 2 [ RunTime:0.089761s ] +--------------------------------------------------------------- + +[2021-12-13T21:19:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.059004s] [吞吐率:0.94req/s] [内存消耗:4,768.55kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129765s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086193s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085917s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084016s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.084449s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.099325s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.085349s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.087674s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.087919s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.082696s ] +--------------------------------------------------------------- + +[2021-12-13T21:19:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.758383s] [吞吐率:0.57req/s] [内存消耗:4,794.84kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133705s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093500s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088772s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091432s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.086200s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.089656s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086664s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.098732s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087593s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.089967s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.089225s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.095083s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.088250s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.090794s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.089589s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.095640s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.089711s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.091765s ] +--------------------------------------------------------------- + +[2021-12-13T21:19:43+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.943625s] [吞吐率:1.06req/s] [内存消耗:4,336.77kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryJFpYu1IjVK35LCnA', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.119991s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.106338s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.103341s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.082382s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079302s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.087543s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083232s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082220s ] +--------------------------------------------------------------- + +[2021-12-13T21:20:11+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.819018s] [吞吐率:1.22req/s] [内存消耗:4,336.77kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryG19NLEYnYrOen6IH', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125050s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082387s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088729s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085983s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084596s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.083894s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083804s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082135s ] +--------------------------------------------------------------- + +[2021-12-13T21:20:25+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.830004s] [吞吐率:1.20req/s] [内存消耗:4,336.73kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary3A0QXqDt5Txgih2p', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.120500s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082024s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.079181s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.081639s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081803s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.079647s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080951s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078587s ] +--------------------------------------------------------------- + +[2021-12-13T21:20:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.800876s] [吞吐率:1.25req/s] [内存消耗:4,336.73kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary2IZEIWp9irkMDfIy', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127603s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082673s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081300s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.096631s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085100s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.091413s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080297s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082003s ] +--------------------------------------------------------------- + +[2021-12-13T21:20:52+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:0.778315s] [吞吐率:1.28req/s] [内存消耗:4,336.73kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryIWR9BoNoVmcYAUAP', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123732s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083411s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080341s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.082346s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081960s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.080148s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081988s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079726s ] +--------------------------------------------------------------- + +[2021-12-13T21:24:36+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:1.038574s] [吞吐率:0.96req/s] [内存消耗:4,337.18kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryGoTHSOXnAoWPDb8X', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132990s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088292s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087624s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.092386s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size` FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096121s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name,pc.name as phase_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 LEFT JOIN `phase_config` `pc` ON `pc`.`id`=`g`.`phase_id` WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.085644s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087196s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087077s ] +--------------------------------------------------------------- + +[2021-12-13T21:25:24+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:1.059024s] [吞吐率:0.94req/s] [内存消耗:4,337.09kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarytRpcjx9CAiE5BbBQ', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125586s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082796s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.098591s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085798s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size`,pc.name as phase_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `phase_config` `pc` ON `pc`.`id`=`g`.`phase_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081020s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.082124s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086275s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080778s ] +--------------------------------------------------------------- + +[2021-12-13T21:35:10+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:2.032639s] [吞吐率:0.49req/s] [内存消耗:4,406.40kb] [文件加载:172] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarykyQzNqu6kBANDgpF', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128804s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086603s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.096357s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087887s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size`,pc.name as phase_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `phase_config` `pc` ON `pc`.`id`=`g`.`phase_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083220s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.084978s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085286s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082339s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.082856s ] +[ error ] [0]类的属性不存在:app\common\model\Goods->id[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-13T21:35:31+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:1.284858s] [吞吐率:0.78req/s] [内存消耗:4,376.27kb] [文件加载:170] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryJUWmijStar2UQunU', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126655s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084935s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083742s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.082415s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size`,pc.name as phase_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `phase_config` `pc` ON `pc`.`id`=`g`.`phase_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081322s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.082337s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083306s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084042s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.080701s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.082442s ] +[ sql ] [ SQL ] SELECT `id`,`spec_value`,`stock` FROM `goods_item` WHERE `goods_id` = d06ce35bB1fMCoW+gCF4T+qytRYUbiyG29hB49M2UnK9 [ RunTime:0.078668s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `phase_config` [ RunTime:0.080693s ] +[ sql ] [ SQL ] SELECT `name`,`describe` FROM `phase_config` WHERE `phase_config`.`delete_time` = 0 [ RunTime:0.080401s ] +--------------------------------------------------------------- + +[2021-12-13T21:36:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:1.225012s] [吞吐率:0.82req/s] [内存消耗:4,376.18kb] [文件加载:170] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryUPvSiqupJsvJKS7B', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127105s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083809s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084177s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085891s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size`,pc.name as phase_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `phase_config` `pc` ON `pc`.`id`=`g`.`phase_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083474s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.088379s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082331s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083070s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.081711s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085732s ] +[ sql ] [ SQL ] SELECT `id`,`spec_value`,`stock` FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.081813s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `phase_config` [ RunTime:0.080900s ] +[ sql ] [ SQL ] SELECT `name`,`describe` FROM `phase_config` WHERE `phase_config`.`delete_time` = 0 [ RunTime:0.080572s ] +--------------------------------------------------------------- + +[2021-12-13T21:37:53+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_info +[运行时间:1.263838s] [吞吐率:0.79req/s] [内存消耗:4,376.18kb] [文件加载:170] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_info', + 'route' => 'api/index/goods_info', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarywmMxWY0VuiyahFRE', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'gid' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128114s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087681s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084833s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087002s ] +[ sql ] [ SQL ] SELECT g.name as goods_name,`price`,g.id as goods_id,`detail`,gb.name as brand_name,`model`,`collocation_goods`,`original_price`,`goods_size`,pc.name as phase_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `phase_config` `pc` ON `pc`.`id`=`g`.`phase_id` WHERE ( `g`.`id` = '2' AND `status` = 1 ) AND `g`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083990s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 WHERE ( `g`.`id` IN ('1','2') ) AND `g`.`delete_time` = 0 [ RunTime:0.083156s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085870s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image` FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083672s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size_img' LIMIT 1 [ RunTime:0.082386s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.083100s ] +[ sql ] [ SQL ] SELECT `id`,`spec_value`,`stock` FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.083852s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `phase_config` [ RunTime:0.083512s ] +[ sql ] [ SQL ] SELECT `name`,`describe` FROM `phase_config` WHERE `phase_config`.`delete_time` = 0 [ RunTime:0.081892s ] diff --git a/runtime/log/202112/14.log b/runtime/log/202112/14.log new file mode 100755 index 0000000..dc00851 --- /dev/null +++ b/runtime/log/202112/14.log @@ -0,0 +1,908 @@ +--------------------------------------------------------------- + +[2021-12-14T21:23:17+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.975571s] [吞吐率:1.03req/s] [内存消耗:4,447.59kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryU9VXzAdYD4906R9x', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136063s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092095s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089950s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088019s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087861s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.087262s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `is_default` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.090469s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.092252s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091679s ] +[ error ] [0]variable type error: array[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/Response.php:403] +--------------------------------------------------------------- + +[2021-12-14T21:24:01+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.755509s] [吞吐率:1.32req/s] [内存消耗:4,348.13kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryHuycDNvmdfGDJjcz', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127911s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083943s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082017s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.090605s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.085100s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.085109s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `is_default` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.084655s ] +--------------------------------------------------------------- + +[2021-12-14T21:24:43+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.039039s] [吞吐率:0.96req/s] [内存消耗:4,388.15kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary17yOFLPFfp0R8361', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.138083s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092725s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088249s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088807s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.092399s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.088459s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `is_default` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.088040s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089314s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087996s ] +--------------------------------------------------------------- + +[2021-12-14T21:25:40+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.918297s] [吞吐率:1.09req/s] [内存消耗:4,412.79kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarylibOlo1B2ojfcF3W', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127582s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084062s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082641s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086931s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.082269s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.084578s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `is_default` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.081466s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085737s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085327s ] +--------------------------------------------------------------- + +[2021-12-14T21:31:08+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.526187s] [吞吐率:0.66req/s] [内存消耗:4,465.28kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryrVRjpXKXxVWLdKgO', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132590s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086334s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082794s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.083615s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.084209s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.084970s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `is_default` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.082285s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083696s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.163107s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.084069s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.083918s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083144s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083034s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084399s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112142131085952' LIMIT 1 [ RunTime:0.081330s ] +[ error ] [8]未定义数组索引: remark[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:209] +--------------------------------------------------------------- + +[2021-12-14T21:31:22+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.637923s] [吞吐率:0.61req/s] [内存消耗:4,465.31kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '271', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarycpLMMJMOEecvxdTe', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131404s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087593s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089024s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.089289s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087900s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.087558s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `is_default` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.086246s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086396s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.168730s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.087981s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.085678s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084770s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086393s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.172511s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112142131214303' LIMIT 1 [ RunTime:0.087025s ] +[ error ] [8]未定义数组索引: remark[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:209] +--------------------------------------------------------------- + +[2021-12-14T21:31:50+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.850787s] [吞吐率:1.18req/s] [内存消耗:4,419.54kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryjNGxVbHP5G5FToq0', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127082s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084383s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082323s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.085635s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.082676s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.084108s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'del' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-14T21:35:19+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.807002s] [吞吐率:1.24req/s] [内存消耗:4,413.68kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryB6ymWYm8xhsNugpo', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127897s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086355s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084312s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086168s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.092284s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.084372s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'del' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-14T21:46:00+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.822726s] [吞吐率:1.22req/s] [内存消耗:4,416.77kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryzwezeNgLhcdAv71I', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133440s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089172s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086490s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.087344s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087691s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.087032s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'del' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-14T21:48:07+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.816402s] [吞吐率:1.22req/s] [内存消耗:4,414.30kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryMraVQH1DCQpM6H3W', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132171s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088685s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087323s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086358s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087768s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.086090s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'del' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-14T21:49:17+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.792693s] [吞吐率:1.26req/s] [内存消耗:4,414.30kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarye4cCzDyOwcL8Ie44', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126986s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.094418s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088304s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.082383s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.083364s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.082257s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'del' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-14T21:49:28+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.707517s] [吞吐率:1.41req/s] [内存消耗:4,414.30kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXdMc8zs17P4ZmJtA', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136215s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089534s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.090023s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.089833s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.092921s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.089681s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'del' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-14T21:50:17+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.554946s] [吞吐率:0.64req/s] [内存消耗:4,460.25kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary0FpAAE9ht1DtYybJ', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133360s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090955s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089664s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086465s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.085277s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.086882s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.089410s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085420s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.167508s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.086507s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.085915s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086060s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089426s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084781s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112142150166090' LIMIT 1 [ RunTime:0.084410s ] +[ error ] [8]未定义数组索引: remark[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:211] +--------------------------------------------------------------- + +[2021-12-14T21:50:45+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.555593s] [吞吐率:0.64req/s] [内存消耗:4,460.25kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryTZGw1sNExi4dNULe', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131996s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087600s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085279s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086863s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.084814s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.086758s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.084836s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.088221s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.168835s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.088583s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.092605s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085515s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084736s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085785s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112142150454300' LIMIT 1 [ RunTime:0.083207s ] +[ error ] [8]未定义数组索引: remark[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:211] +--------------------------------------------------------------- + +[2021-12-14T21:51:40+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.362096s] [吞吐率:0.42req/s] [内存消耗:4,453.25kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryWfbVSgsEQDU9rUPF', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125288s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084374s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082687s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.083539s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.082640s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.084313s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.087538s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082455s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.163243s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.089222s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.217394s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.227904s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082058s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.185566s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112142151395122' LIMIT 1 [ RunTime:0.169778s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112142151395122' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 9596 , 9596 , 9596 , 4 , '' , 1639489899) [ RunTime:0.261602s ] +[ error ] [0]致命错误: Class 'app\common\model\Db' not found[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/OrderGoods.php:25] +--------------------------------------------------------------- + +[2021-12-14T21:52:09+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.305160s] [吞吐率:0.43req/s] [内存消耗:4,417.48kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryfIHMin1ieD5CbEXt', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136079s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090598s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.090041s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088814s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087450s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.089086s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.088968s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086971s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.181016s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.089047s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.090581s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087128s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088938s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089981s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112142152086394' LIMIT 1 [ RunTime:0.085611s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112142152086394' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 9596 , 9596 , 9596 , 4 , '' , 1639489928) [ RunTime:0.088275s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087901s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+4 , `stock` = stock-4 WHERE `id` = 2 [ RunTime:0.089584s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.088340s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 4 WHERE `goods_id` = 2 AND `spec_value` = 'M' [ RunTime:0.087056s ] +[ sql ] [ SQL ] SELECT `id`,`stock` FROM `goods` WHERE `id` = 2 [ RunTime:0.087059s ] +[ sql ] [ SQL ] DELETE FROM `cart` WHERE `user_id` = 1 AND `selected` = 1 AND `item_value` = 'M' [ RunTime:0.088164s ] +--------------------------------------------------------------- + +[2021-12-14T21:52:34+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.605237s] [吞吐率:0.62req/s] [内存消耗:4,436.25kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryE4cIPpq6POKDm92Y', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126272s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084379s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081154s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.083016s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.085239s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.084286s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.083173s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084928s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.203806s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.085890s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.086856s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082636s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080727s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081726s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112142152343577' LIMIT 1 [ RunTime:0.080642s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112142152343577' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 0 , 0 , 0 , 0 , '' , 1639489954) [ RunTime:0.080274s ] +[ error ] [8]未定义变量: goods_data[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:261] +--------------------------------------------------------------- + +[2021-12-14T21:54:28+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.247342s] [吞吐率:0.80req/s] [内存消耗:4,839.83kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary87knPLymZg5Bl2oT', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.139461s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090680s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086781s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.089977s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.088108s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.090381s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.088521s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087507s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.174973s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.088678s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.089491s ] +--------------------------------------------------------------- + +[2021-12-14T21:54:54+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.963095s] [吞吐率:1.04req/s] [内存消耗:4,287.43kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarybVA0T2aFqtRShJKX', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', + 'item_value' => 'M', + 'goods_num' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131382s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086208s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085000s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.089296s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 2 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.086168s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085891s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.083707s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 2 , 1 , 'M' , 1639490094) [ RunTime:0.087344s ] +--------------------------------------------------------------- + +[2021-12-14T21:55:02+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.268638s] [吞吐率:0.44req/s] [内存消耗:4,417.99kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryUSsy8wMGgn6pDBeM', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133063s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088058s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086647s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.089023s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.115114s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.088343s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.085921s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087036s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.171767s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.088521s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.088514s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087742s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088423s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088803s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112142155017364' LIMIT 1 [ RunTime:0.085618s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112142155017364' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 2399 , 2399 , 2399 , 1 , '' , 1639490101) [ RunTime:0.088567s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086669s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+1 , `stock` = stock-1 WHERE `id` = 2 [ RunTime:0.088463s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087011s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 1 WHERE `goods_id` = 2 AND `spec_value` = 'M' [ RunTime:0.085716s ] +[ sql ] [ SQL ] SELECT `id`,`stock` FROM `goods` WHERE `id` = 2 [ RunTime:0.086081s ] +[ sql ] [ SQL ] DELETE FROM `cart` WHERE `user_id` = 1 AND `selected` = 1 AND `item_value` = 'M' [ RunTime:0.089982s ] diff --git a/runtime/log/202112/15.log b/runtime/log/202112/15.log new file mode 100755 index 0000000..0f75b21 --- /dev/null +++ b/runtime/log/202112/15.log @@ -0,0 +1,5462 @@ +--------------------------------------------------------------- + +[2021-12-15T12:11:27+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.516792s] [吞吐率:1.94req/s] [内存消耗:4,294.07kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '414', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarylHl6gYWrV1XAt1b0', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.122820s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083626s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081209s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.084129s ] +[ sql ] [ SQL ] DELETE FROM `goods_collect` WHERE `goods_id` = 1 AND `user_id` = 1 [ RunTime:0.082728s ] +--------------------------------------------------------------- + +[2021-12-15T12:11:38+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.555690s] [吞吐率:1.80req/s] [内存消耗:4,294.77kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '415', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryg7RMlIXfYyfz3TPO', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129142s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088502s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087182s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.089140s ] +[ sql ] [ SQL ] INSERT INTO `goods_collect` (`user_id` , `goods_id` , `create_time`) VALUES (1 , 1 , 1639541497) [ RunTime:0.090686s ] +--------------------------------------------------------------- + +[2021-12-15T12:11:41+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.564801s] [吞吐率:1.77req/s] [内存消耗:4,294.77kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '415', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryF4eKDrWBVdb1eMnQ', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130724s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.093056s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.094831s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.092931s ] +[ sql ] [ SQL ] INSERT INTO `goods_collect` (`user_id` , `goods_id` , `create_time`) VALUES (1 , 1 , 1639541500) [ RunTime:0.093456s ] +--------------------------------------------------------------- + +[2021-12-15T12:14:02+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.146361s] [吞吐率:6.83req/s] [内存消耗:2,739.33kb] [文件加载:149] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '415', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryqV3RMh2ass2t44PG', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '1', +) +[ error ] [0]语法解析错误: syntax error, unexpected '}', expecting ';'[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/GoodsController.php:240] +--------------------------------------------------------------- + +[2021-12-15T12:14:11+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.750667s] [吞吐率:1.33req/s] [内存消耗:4,295.24kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '415', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryecaSPzNvKKhxz8xq', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.185661s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086813s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084535s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.085086s ] +[ sql ] [ SQL ] SELECT * FROM `goods_collect` WHERE `user_id` = 1 AND `goods_id` = 1 LIMIT 1 [ RunTime:0.082885s ] +[ sql ] [ SQL ] INSERT INTO `goods_collect` (`user_id` , `goods_id` , `create_time`) VALUES (1 , 1 , 1639541651) [ RunTime:0.086069s ] +--------------------------------------------------------------- + +[2021-12-15T12:14:23+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.651210s] [吞吐率:1.54req/s] [内存消耗:4,326.65kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '415', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary1YbagvpAJQHr1AAN', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125865s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082292s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085174s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.082880s ] +[ sql ] [ SQL ] SELECT * FROM `goods_collect` WHERE `user_id` = 1 AND `goods_id` = 1 LIMIT 1 [ RunTime:0.083203s ] +--------------------------------------------------------------- + +[2021-12-15T12:14:28+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.546226s] [吞吐率:1.83req/s] [内存消耗:4,294.11kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '415', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXdQSLL0Ls2X4bsGh', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129253s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087289s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084132s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.086022s ] +[ sql ] [ SQL ] DELETE FROM `goods_collect` WHERE `goods_id` = 1 AND `user_id` = 1 [ RunTime:0.092283s ] +--------------------------------------------------------------- + +[2021-12-15T12:14:31+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.519880s] [吞吐率:1.92req/s] [内存消耗:4,294.11kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '415', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryv31b6RztfevqU9Uv', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.122663s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083751s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088057s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.084719s ] +[ sql ] [ SQL ] DELETE FROM `goods_collect` WHERE `goods_id` = 1 AND `user_id` = 1 [ RunTime:0.081611s ] +--------------------------------------------------------------- + +[2021-12-15T12:14:48+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.631168s] [吞吐率:1.58req/s] [内存消耗:4,295.24kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '415', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryaOGI8kRvMi47avGI', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125513s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086200s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088844s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.085172s ] +[ sql ] [ SQL ] SELECT * FROM `goods_collect` WHERE `user_id` = 1 AND `goods_id` = 1 LIMIT 1 [ RunTime:0.083957s ] +[ sql ] [ SQL ] INSERT INTO `goods_collect` (`user_id` , `goods_id` , `create_time`) VALUES (1 , 1 , 1639541688) [ RunTime:0.086867s ] +--------------------------------------------------------------- + +[2021-12-15T12:15:01+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/collectgoods_list +[运行时间:0.861908s] [吞吐率:1.16req/s] [内存消耗:4,390.49kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'collectgoods_list', + 'route' => 'api/goods/collectgoods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryrNQAELsALUkXROj7', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130997s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084404s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088455s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.085125s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods_collect` `gc` INNER JOIN `goods` `g` ON `g`.`id`=`gc`.`goods_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=gc.goods_id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE `g`.`status` = 1 AND `user_id` = 1 [ RunTime:0.086286s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods_collect` `gc` INNER JOIN `goods` `g` ON `g`.`id`=`gc`.`goods_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=gc.goods_id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` WHERE `g`.`status` = 1 AND `user_id` = 1 ORDER BY `g`.`sort_number` ASC LIMIT 0,12 [ RunTime:0.083063s ] +--------------------------------------------------------------- + +[2021-12-15T12:24:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-notice +[运行时间:0.512301s] [吞吐率:1.95req/s] [内存消耗:4,379.31kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-notice', + 'route' => 'api/user/notice', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryB6eApeEqLe30OxCA', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129455s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086061s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084956s ] +[ error ] [0]Class app\api\controller\Notice does not exist[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/Container.php:467] +--------------------------------------------------------------- + +[2021-12-15T12:25:01+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-notice +[运行时间:0.526556s] [吞吐率:1.90req/s] [内存消耗:4,473.61kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-notice', + 'route' => 'api/user/notice', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXxVFiXqIGuzhQpKG', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125229s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082019s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080067s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.081759s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'notice.delete_time' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-15T12:25:35+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-notice +[运行时间:0.543570s] [吞吐率:1.84req/s] [内存消耗:4,445.97kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-notice', + 'route' => 'api/user/notice', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryA3zhPopmtLr2CO2Y', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129732s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086643s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085591s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.089328s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `notice` WHERE `user_id` = 1 AND `send_type` = 1 AND `receive_type` IN (2,3) [ RunTime:0.083807s ] +[ error ] [8]未定义变量: gcmodel[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/UserController.php:38] +--------------------------------------------------------------- + +[2021-12-15T12:25:49+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-notice +[运行时间:0.682872s] [吞吐率:1.46req/s] [内存消耗:4,467.91kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-notice', + 'route' => 'api/user/notice', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryqCWIihBBAag9vNZB', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134712s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089265s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091978s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.088639s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `notice` WHERE `user_id` = 1 AND `send_type` = 1 AND `receive_type` IN (2,3) [ RunTime:0.090960s ] +[ sql ] [ SQL ] SELECT `title`,`content` FROM `notice` WHERE `user_id` = 1 AND `send_type` = 1 AND `receive_type` IN (2,3) ORDER BY `create_time` DESC LIMIT 0,12 [ RunTime:0.085968s ] +--------------------------------------------------------------- + +[2021-12-15T12:26:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-notice +[运行时间:0.616260s] [吞吐率:1.62req/s] [内存消耗:4,448.96kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-notice', + 'route' => 'api/user/notice', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '316', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryqV3B0HzNvSdvQR87', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127714s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085075s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087721s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.085780s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `notice` WHERE `user_id` = 2 AND `send_type` = 1 AND `receive_type` IN (2,3) [ RunTime:0.083417s ] +[ sql ] [ SQL ] SELECT `title`,`content` FROM `notice` WHERE `user_id` = 2 AND `send_type` = 1 AND `receive_type` IN (2,3) ORDER BY `create_time` DESC LIMIT 0,12 [ RunTime:0.082708s ] +--------------------------------------------------------------- + +[2021-12-15T12:33:59+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.855266s] [吞吐率:1.17req/s] [内存消耗:4,606.24kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary1uh6b3Bd4ZSpwRej', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.148351s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091737s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.092779s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.092315s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT `o`.`order_sn`,`o`.`order_status`,count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.091355s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.090933s ] +[ error ] [0]类的属性不存在:app\common\model\Order->order_id[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-15T12:34:50+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.615529s] [吞吐率:1.62req/s] [内存消耗:4,606.34kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarycHg3svlEZwt3oj0S', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126309s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082408s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084433s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084029s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.084715s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,o.id as order_id FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.080766s ] +[ error ] [0]类的属性不存在:app\common\model\Order->id[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-15T12:36:29+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.826540s] [吞吐率:1.21req/s] [内存消耗:4,685.19kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarywNDcRyvx7P2nJChd', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128006s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086463s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084394s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085912s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083647s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.084093s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084886s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084014s ] +[ error ] [8]未定义变量: mimodel[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/UserController.php:91] +--------------------------------------------------------------- + +[2021-12-15T12:37:10+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:1.372507s] [吞吐率:0.73req/s] [内存消耗:4,597.23kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryTml1Fu24LSjxwqBm', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129645s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084927s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084562s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086619s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083654s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.084721s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086258s ] +[ sql ] [ SQL ] SELECT * FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.090549s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084625s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083376s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082409s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086801s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081598s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080735s ] +--------------------------------------------------------------- + +[2021-12-15T12:40:51+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.791178s] [吞吐率:1.26req/s] [内存消耗:4,702.11kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarySVm2DRI27kHm9Z2D', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128043s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085647s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084770s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086367s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.084417s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.083552s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086308s ] +[ sql ] [ SQL ] SELECT `id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price` FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083286s ] +[ error ] [0]类的属性不存在:app\common\model\OrderGoods->order_id[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-15T12:41:19+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.782179s] [吞吐率:1.28req/s] [内存消耗:4,702.22kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary6MDvmf7g9WMOIJFI', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128078s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085374s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081889s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083963s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.082852s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.082559s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084195s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price` FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079897s ] +[ error ] [0]类的属性不存在:app\common\model\OrderGoods->order_id[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-15T12:45:43+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.916903s] [吞吐率:1.09req/s] [内存消耗:4,604.52kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryDBa2ghByc4LaZAVF', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125180s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084196s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082622s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083804s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.080846s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.083067s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082440s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.080818s ] +--------------------------------------------------------------- + +[2021-12-15T12:46:13+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.810665s] [吞吐率:1.23req/s] [内存消耗:4,604.52kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryEXpX9vPbZweGdJhf', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127761s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085855s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082445s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087313s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.085735s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.085796s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.085215s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083971s ] +--------------------------------------------------------------- + +[2021-12-15T12:46:28+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.782063s] [吞吐率:1.28req/s] [内存消耗:4,604.52kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryiaAQz2lQXEhAFXhB', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125877s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085325s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081391s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085853s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.082252s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.081278s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083944s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082076s ] +--------------------------------------------------------------- + +[2021-12-15T12:48:06+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.814111s] [吞吐率:1.23req/s] [内存消耗:4,604.52kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryEtJFG2rld74H0mZy', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130914s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086778s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083519s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085685s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.085134s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.083664s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087540s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086150s ] +--------------------------------------------------------------- + +[2021-12-15T12:50:01+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.870702s] [吞吐率:1.15req/s] [内存消耗:4,604.58kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarygXARgm6xuHbDZSCG', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133602s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090636s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085781s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088272s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.088034s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.091941s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.100595s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (4,3,1) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088239s ] +--------------------------------------------------------------- + +[2021-12-15T12:57:42+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.772410s] [吞吐率:1.29req/s] [内存消耗:4,572.97kb] [文件加载:191] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '458', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryTzCmQrrnXi8Sm8f5', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_type' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128523s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.124411s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084419s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086853s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'o.order_type' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-15T12:58:26+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.731369s] [吞吐率:1.37req/s] [内存消耗:4,591.39kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryWIH0r2DjdP5T4elv', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126537s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084902s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085577s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.104170s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.087622s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.088805s ] +--------------------------------------------------------------- + +[2021-12-15T12:58:41+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.904143s] [吞吐率:1.11req/s] [内存消耗:4,603.35kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryVW2KNnv9rLYAe7Fu', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '1,2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.121948s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084346s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.078563s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.134558s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','2') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.081440s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','2') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.078422s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082612s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (4,3) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.077760s ] +--------------------------------------------------------------- + +[2021-12-15T12:59:03+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.901334s] [吞吐率:1.11req/s] [内存消耗:4,602.45kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryfgJSX0R8jJuGfqnN', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126043s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090791s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084206s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090307s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '3' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083981s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '3' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.084833s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.080997s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.084263s ] +--------------------------------------------------------------- + +[2021-12-15T13:10:01+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:1.367008s] [吞吐率:0.73req/s] [内存消耗:4,592.92kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarygEft66xzFWkWN3kx', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '66d75a98/RAkeMXOv6foKYgog9kMcbJ1JKCa5JPlKuce', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136105s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091768s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.135091s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.228723s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '1' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096867s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086454s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.098607s ] +--------------------------------------------------------------- + +[2021-12-15T13:12:31+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:1.021585s] [吞吐率:0.98req/s] [内存消耗:4,593.77kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarykESVURhSchfbQYHU', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '66d75a98/RAkeMXOv6foKYgog9kMcbJ1JKCa5JPlKuce', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.138442s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.095238s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091861s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.094676s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '1' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088499s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089686s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.089902s ] +--------------------------------------------------------------- + +[2021-12-15T13:21:51+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.871298s] [吞吐率:1.15req/s] [内存消耗:4,594.66kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarywbSQa5k9VYO0IBcB', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '66d75a98/RAkeMXOv6foKYgog9kMcbJ1JKCa5JPlKuce', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133223s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089595s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087391s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088217s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '1' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085666s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087501s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 1 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083957s ] +--------------------------------------------------------------- + +[2021-12-15T13:22:40+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.768344s] [吞吐率:1.30req/s] [内存消耗:4,601.38kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryaW7SByX7OvYZC6TH', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '1,2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123833s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082410s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081930s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083289s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','2') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.082296s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','2') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.080410s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081711s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (4,3) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.079588s ] +--------------------------------------------------------------- + +[2021-12-15T13:22:55+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.892678s] [吞吐率:1.12req/s] [内存消耗:4,594.15kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAoYG8qmBd2v72B1L', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '506b56bcCtmjSSqa12cVXGRM+fNEwibFMtfZEkaZsf1V', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126885s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087078s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082877s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085070s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '4' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083508s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084690s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`original_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 4 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081836s ] +--------------------------------------------------------------- + +[2021-12-15T13:23:41+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.178820s] [吞吐率:5.59req/s] [内存消耗:2,987.55kb] [文件加载:167] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryPZHiosBuixiHHeWY', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiIwYzY5YTFkZjEyOTMyYWRmMjA2MzBiYzY4Y2ViMmVlNSIsImlhdCI6MTYzOTQ4Njk2NywibmJmIjoxNjM5NDg2OTY3LCJleHAiOjE2Mzk0OTQxNjcsInVpZCI6MX0.TgJVleOWfg_DcdpGzqNelxgnQVFSzlrzLsBlVTwBAYI', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', + 'item_value' => 'M', + 'goods_num' => '3', +) +--------------------------------------------------------------- + +[2021-12-15T13:23:59+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.820969s] [吞吐率:1.22req/s] [内存消耗:4,296.61kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryC7T5kWj9fLzvfVLi', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => 'bd72ddaaLnYfLS+0mm354D1XTZsgEj+FcfS3O22d+dpc', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129765s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090837s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084567s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088600s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 2 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.085132s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085761s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.083506s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 2 , 3 , 'M' , 1639545839) [ RunTime:0.092092s ] +--------------------------------------------------------------- + +[2021-12-15T13:24:12+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.715186s] [吞吐率:1.40req/s] [内存消耗:4,348.57kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/goods/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '608', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAq5ASr1Z9GndJmmA', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'M', + 1 => 'S', + ), + 'sort' => '', + 'order' => 'price', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.140372s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089386s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086638s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088753s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') or( `spec_value` LIKE '%S%' OR `gb`.`name` LIKE '%S%' OR `gc`.`name` LIKE '%S%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.086021s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') or( `spec_value` LIKE '%S%' OR `gb`.`name` LIKE '%S%' OR `gc`.`name` LIKE '%S%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `price` LIMIT 0,12 [ RunTime:0.086477s ] +--------------------------------------------------------------- + +[2021-12-15T13:24:29+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.857056s] [吞吐率:1.17req/s] [内存消耗:4,295.27kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary3kpdBEydEmv30G3U', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '2a63b611k+8fB7Cdo9ywSgPZLH1fJ+1GCi7jfknZt7tK', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.121812s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.080791s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.078590s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.081252s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 2 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.078797s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.081945s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.078707s ] +[ sql ] [ SQL ] UPDATE `cart` SET `goods_num` = 6 , `update_time` = 1639545869 WHERE `id` = 5 [ RunTime:0.083531s ] +--------------------------------------------------------------- + +[2021-12-15T13:24:50+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.731519s] [吞吐率:1.37req/s] [内存消耗:4,326.67kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryuXPmNvGc3etWrp4s', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130182s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086628s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085340s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.087088s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.087784s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087474s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.084391s ] +--------------------------------------------------------------- + +[2021-12-15T13:25:00+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.681648s] [吞吐率:1.47req/s] [内存消耗:4,326.67kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXB5AsIWnsL8rLXFA', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'S', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126804s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083326s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082552s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.084212s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'S' LIMIT 1 [ RunTime:0.087684s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.083986s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'S' LIMIT 1 [ RunTime:0.080513s ] +--------------------------------------------------------------- + +[2021-12-15T13:25:19+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.768751s] [吞吐率:1.30req/s] [内存消耗:4,326.67kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary46d4D0lstes02Lst', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'S', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.138728s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.099327s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.092323s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.092685s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'S' LIMIT 1 [ RunTime:0.091470s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.093740s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'S' LIMIT 1 [ RunTime:0.094091s ] +--------------------------------------------------------------- + +[2021-12-15T13:25:30+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.838645s] [吞吐率:1.19req/s] [内存消耗:4,296.61kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarykmQyKGMxlKGSNHHA', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'S', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.139529s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091737s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087297s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.091587s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'S' LIMIT 1 [ RunTime:0.087462s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.088604s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'S' LIMIT 1 [ RunTime:0.087490s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 1 , 3 , 'S' , 1639545930) [ RunTime:0.095503s ] +--------------------------------------------------------------- + +[2021-12-15T13:25:36+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-lists +[运行时间:0.048956s] [吞吐率:20.43req/s] [内存消耗:2,988.92kb] [文件加载:167] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-lists', + 'route' => 'api/cart/lists', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarya56lOOSZyYecckMD', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiJiYjRjNjdjM2MxYjQzN2QxZGE2ZDY1NWMxZjU3YzFmMyIsImlhdCI6MTYzOTQ3ODIyNSwibmJmIjoxNjM5NDc4MjI1LCJleHAiOjE2Mzk0ODU0MjUsInVpZCI6MX0.wz-qjfXgdz8IiFoL6UE6GK-CXMe8i9RNXNiSVA5Uzpo', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', +) +--------------------------------------------------------------- + +[2021-12-15T13:27:08+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.841147s] [吞吐率:0.54req/s] [内存消耗:4,829.95kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryiIeuBWy8shq6ZMV0', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132882s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091631s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084572s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086792s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.084427s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.087480s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.082836s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085715s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.341763s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.288313s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.250944s ] +--------------------------------------------------------------- + +[2021-12-15T13:27:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.964304s] [吞吐率:0.34req/s] [内存消耗:4,429.74kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryj9sAtEDWLyC3EeNK', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133286s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089419s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085420s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088176s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.085571s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.089419s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.087011s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086084s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.339332s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.291065s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.249858s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085675s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082671s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085075s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151327202246' LIMIT 1 [ RunTime:0.085090s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151327202246' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 24291 , 24291 , 24291 , 9 , '' , 1639546040) [ RunTime:0.083041s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086228s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+6 , `stock` = stock-6 WHERE `id` = 2 [ RunTime:0.083051s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085467s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 6 WHERE `goods_id` = 2 AND `spec_value` = 'M' [ RunTime:0.082748s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+3 , `stock` = stock-3 WHERE `id` = 1 [ RunTime:0.084009s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 3 WHERE `goods_id` = 1 AND `spec_value` = 'S' [ RunTime:0.082899s ] +[ sql ] [ SQL ] SELECT `id`,`stock` FROM `goods` WHERE `id` IN (2,1) [ RunTime:0.082967s ] +[ sql ] [ SQL ] DELETE FROM `cart` WHERE `user_id` = 1 AND `selected` = 1 AND `item_value` IN ('M','S') [ RunTime:0.083344s ] +--------------------------------------------------------------- + +[2021-12-15T13:27:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.638156s] [吞吐率:1.57req/s] [内存消耗:4,589.42kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryPldsKK3whhCEJzkX', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129179s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087020s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085037s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088119s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.084395s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.084615s ] +--------------------------------------------------------------- + +[2021-12-15T13:28:07+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.641826s] [吞吐率:1.56req/s] [内存消耗:4,589.42kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryFeLmJAqdf3LjwdBk', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127596s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085539s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086600s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.092236s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.087755s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.081855s ] +--------------------------------------------------------------- + +[2021-12-15T13:28:44+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.636261s] [吞吐率:1.57req/s] [内存消耗:4,589.42kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary8Ip7sCPyEWUedHZ6', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129086s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087220s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086163s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086690s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.082810s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.082281s ] +--------------------------------------------------------------- + +[2021-12-15T13:29:06+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.400393s] [吞吐率:2.50req/s] [内存消耗:4,418.36kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary5Omeu8CaBNnLUAba', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130938s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087287s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091218s ] +--------------------------------------------------------------- + +[2021-12-15T13:29:31+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.646029s] [吞吐率:1.55req/s] [内存消耗:4,589.42kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryHc7NkdejTIKUApgH', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127318s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086360s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089022s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085527s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083358s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.083942s ] +--------------------------------------------------------------- + +[2021-12-15T13:31:27+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.696777s] [吞吐率:1.44req/s] [内存消耗:4,326.67kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary4BfeiI8sR1A2An1h', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'S', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127128s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083197s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081266s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.083303s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'S' LIMIT 1 [ RunTime:0.088091s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.083150s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'S' LIMIT 1 [ RunTime:0.080589s ] +--------------------------------------------------------------- + +[2021-12-15T13:31:37+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.805287s] [吞吐率:1.24req/s] [内存消耗:4,296.61kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarymr5M25GJQHUE9HdH', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'S', + 'goods_num' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131744s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087388s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089029s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088068s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'S' LIMIT 1 [ RunTime:0.084777s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087892s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'S' LIMIT 1 [ RunTime:0.083650s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 1 , 2 , 'S' , 1639546296) [ RunTime:0.089168s ] +--------------------------------------------------------------- + +[2021-12-15T13:31:44+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.741730s] [吞吐率:0.36req/s] [内存消耗:4,428.54kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryY8tKpQ90o8LB8KlW', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131150s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091023s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085429s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086458s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.084822s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.092799s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.084461s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087659s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.338359s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.289353s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.248588s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086104s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083255s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085677s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151331435758' LIMIT 1 [ RunTime:0.084860s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151331435758' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 6598 , 6598 , 6598 , 2 , '' , 1639546303) [ RunTime:0.082884s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085608s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+2 , `stock` = stock-2 WHERE `id` = 1 [ RunTime:0.087688s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.088309s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 2 WHERE `goods_id` = 1 AND `spec_value` = 'S' [ RunTime:0.082767s ] +[ sql ] [ SQL ] SELECT `id`,`stock` FROM `goods` WHERE `id` = 1 [ RunTime:0.082967s ] +[ sql ] [ SQL ] DELETE FROM `cart` WHERE `user_id` = 1 AND `selected` = 1 AND `item_value` = 'S' [ RunTime:0.084701s ] +--------------------------------------------------------------- + +[2021-12-15T13:33:35+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.845261s] [吞吐率:1.18req/s] [内存消耗:4,326.67kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary3ouZ6Wziupz382OK', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'S', + 'goods_num' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.231274s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.093682s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088977s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.092675s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'S' LIMIT 1 [ RunTime:0.089333s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.093287s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'S' LIMIT 1 [ RunTime:0.088943s ] +--------------------------------------------------------------- + +[2021-12-15T13:33:40+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.722631s] [吞吐率:1.38req/s] [内存消耗:4,326.67kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarycqwujstnqu4Ly4vN', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'S', + 'goods_num' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133601s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088549s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085604s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.089980s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'S' LIMIT 1 [ RunTime:0.087352s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087605s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'S' LIMIT 1 [ RunTime:0.086524s ] +--------------------------------------------------------------- + +[2021-12-15T13:33:48+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.709529s] [吞吐率:1.41req/s] [内存消耗:4,326.67kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary0xwzqTV8dnMvp1jX', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130104s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087083s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085637s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.087911s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.087001s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.092861s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.085350s ] +--------------------------------------------------------------- + +[2021-12-15T13:34:02+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.787559s] [吞吐率:1.27req/s] [内存消耗:4,296.61kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarywc9KpMQAOw3WZFF9', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129552s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084881s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084820s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.085836s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.083862s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.084530s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.082433s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 1 , 3 , 'M' , 1639546442) [ RunTime:0.084917s ] +--------------------------------------------------------------- + +[2021-12-15T13:34:09+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.190683s] [吞吐率:0.46req/s] [内存消耗:4,387.40kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary8f4RTU49IjE1tYtl', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.184937s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088156s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082615s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.085360s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.082699s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.084976s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.082196s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084617s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.333093s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.286940s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.248201s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084499s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083003s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086614s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151334099913' LIMIT 1 [ RunTime:0.081996s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151334099913' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 9897 , 9897 , 9897 , 3 , '' , 1639546449) [ RunTime:0.082432s ] +--------------------------------------------------------------- + +[2021-12-15T13:34:34+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.239904s] [吞吐率:0.45req/s] [内存消耗:4,387.40kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryO7NiIoFHzBCy7pU0', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134476s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088719s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.089208s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087674s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.088973s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.095575s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087041s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.347876s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.302847s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.260001s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.091672s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091629s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089504s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151334336876' LIMIT 1 [ RunTime:0.086644s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151334336876' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 9897 , 9897 , 9897 , 3 , '' , 1639546474) [ RunTime:0.085552s ] +--------------------------------------------------------------- + +[2021-12-15T13:37:00+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.395700s] [吞吐率:0.42req/s] [内存消耗:4,405.17kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryYVBjn4lTqCzA7efx', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132650s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092537s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088398s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.087913s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087031s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.088075s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.085353s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086193s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.339372s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.294487s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.252025s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086850s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083577s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087862s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151337001902' LIMIT 1 [ RunTime:0.084341s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151337001902' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 9897 , 9897 , 9897 , 3 , '' , 1639546620) [ RunTime:0.085025s ] +--------------------------------------------------------------- + +[2021-12-15T13:37:12+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.283270s] [吞吐率:0.44req/s] [内存消耗:4,387.95kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryQj599XQPv4OyrlgX', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123360s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083022s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080120s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.083612s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.182505s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.082573s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.081701s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082361s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.324470s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.277847s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.242176s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081130s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079965s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081562s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151337125457' LIMIT 1 [ RunTime:0.081130s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151337125457' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 9897 , 9897 , 9897 , 3 , '' , 1639546632) [ RunTime:0.081057s ] +--------------------------------------------------------------- + +[2021-12-15T13:38:15+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-lists +[运行时间:0.055538s] [吞吐率:18.01req/s] [内存消耗:2,988.92kb] [文件加载:167] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-lists', + 'route' => 'api/cart/lists', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBMMpJ2J3UgvBIaM4', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiJiYjRjNjdjM2MxYjQzN2QxZGE2ZDY1NWMxZjU3YzFmMyIsImlhdCI6MTYzOTQ3ODIyNSwibmJmIjoxNjM5NDc4MjI1LCJleHAiOjE2Mzk0ODU0MjUsInVpZCI6MX0.wz-qjfXgdz8IiFoL6UE6GK-CXMe8i9RNXNiSVA5Uzpo', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', +) +--------------------------------------------------------------- + +[2021-12-15T13:38:31+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.782910s] [吞吐率:1.28req/s] [内存消耗:4,295.27kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAo5J8LDE8tM24XkQ', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '6af8c97f9qEqzZDID2+b13qg/FUS/5MgCR+xqRi/L3YU', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.122506s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083626s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086773s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.082932s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 1 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.081218s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.083981s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.080776s ] +[ sql ] [ SQL ] UPDATE `cart` SET `goods_num` = 6 , `update_time` = 1639546710 WHERE `id` = 8 [ RunTime:0.087237s ] +--------------------------------------------------------------- + +[2021-12-15T13:38:35+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.788403s] [吞吐率:1.27req/s] [内存消耗:4,296.61kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryZ3ZyUaspon4hKHtU', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '2a63b611k+8fB7Cdo9ywSgPZLH1fJ+1GCi7jfknZt7tK', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126450s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084129s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081761s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.083603s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 2 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.081164s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085999s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.084975s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 2 , 3 , 'M' , 1639546715) [ RunTime:0.084340s ] +--------------------------------------------------------------- + +[2021-12-15T13:38:57+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.304494s] [吞吐率:0.43req/s] [内存消耗:4,419.46kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAgBmHpCJSsA5fomm', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127378s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085571s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087458s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.087852s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.083789s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.083393s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.081706s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.083904s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.324001s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.282561s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.241539s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082727s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080716s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083462s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151338561062' LIMIT 1 [ RunTime:0.083241s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151338561062' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 26991 , 26991 , 26991 , 9 , '' , 1639546737) [ RunTime:0.082155s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081689s ] +[ sql ] [ SQL ] INSERT INTO `order_goods` (`order_id` , `goods_id` , `goods_img` , `item_value` , `brand_name` , `goods_name` , `goods_num` , `goods_price` , `total_price` , `original_price` , `create_time`) VALUES ( 1,2,'/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png','M','Nanushka','格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3',3,'2399.00',7197,'0.00',1639546737 ) , ( 1,1,'/uploads/attachment/20211124/b426b10c428d4ac24b2dcbea7f1f7a91_750_461.png','M','Acne Studios','小米全面屏电视E55A 55英寸L55M5-AZ 4K超高清HDR',6,'3299.00',19794,'0.00',1639546737 ) [ RunTime:0.080030s ] +--------------------------------------------------------------- + +[2021-12-15T13:40:42+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:3.105130s] [吞吐率:0.32req/s] [内存消耗:4,436.50kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '369', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary9zwbpnuBuoa7kKIg', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127044s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083951s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083025s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.085752s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.080733s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.085117s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.081288s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082978s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.324948s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.283970s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.243169s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086915s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081115s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084363s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151340408951' LIMIT 1 [ RunTime:0.081246s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151340408951' , 1 , '测试' , 360000 , 360100 , 360102 , '测试测试' , '17761236475' , 26991 , 26991 , 26991 , 9 , '' , 1639546841) [ RunTime:0.081560s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082867s ] +[ sql ] [ SQL ] INSERT INTO `order_goods` (`order_id` , `goods_id` , `goods_img` , `item_value` , `brand_name` , `goods_name` , `goods_num` , `goods_price` , `total_price` , `original_price` , `create_time`) VALUES ( 2,2,'/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png','M','Nanushka','格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3',3,'2399.00',7197,'0.00',1639546841 ) , ( 2,1,'/uploads/attachment/20211124/b426b10c428d4ac24b2dcbea7f1f7a91_750_461.png','M','Acne Studios','小米全面屏电视E55A 55英寸L55M5-AZ 4K超高清HDR',6,'3299.00',19794,'0.00',1639546841 ) [ RunTime:0.080072s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.082896s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+3 , `stock` = stock-3 WHERE `id` = 2 [ RunTime:0.080181s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.083165s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 3 WHERE `goods_id` = 2 AND `spec_value` = 'M' [ RunTime:0.080470s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+6 , `stock` = stock-6 WHERE `id` = 1 [ RunTime:0.084595s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 6 WHERE `goods_id` = 1 AND `spec_value` = 'M' [ RunTime:0.080531s ] +[ sql ] [ SQL ] SELECT `id`,`stock` FROM `goods` WHERE `id` IN (2,1) [ RunTime:0.081648s ] +[ sql ] [ SQL ] DELETE FROM `cart` WHERE `user_id` = 1 AND `selected` = 1 AND `item_value` = 'M' [ RunTime:0.086185s ] +--------------------------------------------------------------- + +[2021-12-15T13:41:51+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.978296s] [吞吐率:1.02req/s] [内存消耗:4,601.47kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary5EhGKSDLGhNbzxtx', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128003s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087143s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084712s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085434s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.084129s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.083768s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083174s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088228s ] +--------------------------------------------------------------- + +[2021-12-15T13:42:08+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.720944s] [吞吐率:1.39req/s] [内存消耗:4,595.65kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryTW2IZP5LNDvQC2FT', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136535s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085379s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085544s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086185s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083429s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090137s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085442s ] +--------------------------------------------------------------- + +[2021-12-15T13:43:32+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.868233s] [吞吐率:1.15req/s] [内存消耗:4,596.08kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarysItbyEV0bmuQ7DBb', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131219s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088785s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084325s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089262s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084093s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.089817s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085409s ] +--------------------------------------------------------------- + +[2021-12-15T13:45:15+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.865547s] [吞吐率:1.16req/s] [内存消耗:4,702.59kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAIeScPV3i3pq4C3U', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128682s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085631s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082987s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087302s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082996s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086467s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082691s ] +[ error ] [8]未定义数组索引: province[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:67] +--------------------------------------------------------------- + +[2021-12-15T13:46:42+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.919400s] [吞吐率:1.09req/s] [内存消耗:4,600.05kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryzn8UEdR46pNNcjxI', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130059s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088747s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084612s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088269s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time`,`province`,`city`,`district`,`address`,`mobile`,`consignee` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088045s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090336s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087221s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.093075s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.086893s ] +--------------------------------------------------------------- + +[2021-12-15T13:47:48+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.719929s] [吞吐率:1.39req/s] [内存消耗:4,702.77kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryWFAfoTAAs4iHFtGb', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128910s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084876s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081826s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088687s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time`,`province`,`city`,`district`,`address`,`mobile`,`consignee` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083974s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082769s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.086029s ] +[ error ] [8]未定义数组索引: province[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:67] +--------------------------------------------------------------- + +[2021-12-15T13:48:09+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.725523s] [吞吐率:1.38req/s] [内存消耗:4,702.77kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryENwKUIZCUs2F7lEB', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129964s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087121s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084872s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086503s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time`,`province`,`city`,`district`,`address`,`mobile`,`consignee` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085917s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088755s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.090742s ] +[ error ] [8]未定义数组索引: province[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:67] +--------------------------------------------------------------- + +[2021-12-15T13:48:19+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.926544s] [吞吐率:1.08req/s] [内存消耗:4,600.05kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarynPTxEwYB6SkoxvBY', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129840s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086910s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088496s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.090760s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time`,`province`,`city`,`district`,`address`,`mobile`,`consignee` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090640s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.086887s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085081s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.088325s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.084455s ] +--------------------------------------------------------------- + +[2021-12-15T13:52:28+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.926716s] [吞吐率:1.08req/s] [内存消耗:4,602.38kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryIABiKThAp6Aa0A3l', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126202s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089131s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085105s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088832s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.081883s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.081787s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084012s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.082095s ] +--------------------------------------------------------------- + +[2021-12-15T14:14:04+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-ordercancel +[运行时间:0.729277s] [吞吐率:1.37req/s] [内存消耗:4,586.29kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-ordercancel', + 'route' => 'api/user/ordercancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryrhlACmHOXtfnPaWf', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131521s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087503s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088565s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086693s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'del' in 'where clause'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-15T14:14:15+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-ordercancel +[运行时间:0.843268s] [吞吐率:1.19req/s] [内存消耗:4,593.38kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-ordercancel', + 'route' => 'api/user/ordercancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary6sAi2lO6H06httuT', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130851s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.094100s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084735s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084238s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088015s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.090059s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.083752s ] +--------------------------------------------------------------- + +[2021-12-15T14:15:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-ordercancel +[运行时间:0.625629s] [吞吐率:1.60req/s] [内存消耗:4,465.11kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-ordercancel', + 'route' => 'api/user/ordercancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryCCcJrx3UO2dUjPhQ', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124508s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084123s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081575s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083366s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083104s ] +--------------------------------------------------------------- + +[2021-12-15T14:29:27+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-ordercancel +[运行时间:0.892950s] [吞吐率:1.12req/s] [内存消耗:4,430.16kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-ordercancel', + 'route' => 'api/user/ordercancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary6EmrcIjqUs4GRNcj', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129694s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087420s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091743s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088726s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085717s ] +[ sql ] [ SQL ] UPDATE `order` SET `cancel_time` = 1639549767 , `order_status` = 4 WHERE ( `id` = 2 ) AND `order`.`delete_time` = 0 [ RunTime:0.086250s ] +--------------------------------------------------------------- + +[2021-12-15T14:29:57+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-ordercancel +[运行时间:0.687107s] [吞吐率:1.46req/s] [内存消耗:4,464.45kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-ordercancel', + 'route' => 'api/user/ordercancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryuBkNN3aU2s7fVi8p', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127385s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085591s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083125s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085454s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082810s ] +--------------------------------------------------------------- + +[2021-12-15T14:30:11+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.643539s] [吞吐率:1.55req/s] [内存消耗:4,598.56kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryfPiRj6wxKfBQMw20', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128708s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087098s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085469s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087726s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.086531s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.085904s ] +--------------------------------------------------------------- + +[2021-12-15T14:30:18+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.735119s] [吞吐率:1.36req/s] [内存消耗:4,710.01kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBPR5xgZUG7Qhol7q', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132126s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086377s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084621s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086545s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time`,`province`,`city`,`district`,`address`,`mobile`,`consignee` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087638s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.088682s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.087147s ] +[ error ] [8]未定义数组下标: 4[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:47] +--------------------------------------------------------------- + +[2021-12-15T14:30:45+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderdetail +[运行时间:0.870061s] [吞吐率:1.15req/s] [内存消耗:4,607.32kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderdetail', + 'route' => 'api/user/orderdetail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary1GqQYFoezsb6zBwY', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129623s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083483s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087459s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083199s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id`,`o`.`pay_time`,`total_amount`,`shipping_time`,`invoice_name`,`invoice_no`,`transaction_id`,`user_remark`,`confirm_take_time`,`cancel_time`,`o`.`create_time`,`province`,`city`,`district`,`address`,`mobile`,`consignee` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081839s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083845s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 2 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081118s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085726s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080086s ] +--------------------------------------------------------------- + +[2021-12-15T15:28:42+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresslists +[运行时间:0.593927s] [吞吐率:1.68req/s] [内存消耗:4,304.83kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresslists', + 'route' => 'api/useraddress/addresslists', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryHKp4CNY8venGa9YM', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127468s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092642s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084063s ] +--------------------------------------------------------------- + +[2021-12-15T15:29:11+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresslists +[运行时间:0.467623s] [吞吐率:2.14req/s] [内存消耗:4,304.83kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresslists', + 'route' => 'api/useraddress/addresslists', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryhcBJPI0jU39UwwXj', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130306s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087012s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087065s ] +--------------------------------------------------------------- + +[2021-12-15T15:29:34+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresslists +[运行时间:0.397944s] [吞吐率:2.51req/s] [内存消耗:4,309.19kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresslists', + 'route' => 'api/useraddress/lists', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAquyFylWirA4EBkF', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129148s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087440s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088995s ] +[ error ] [8]未定义变量: request[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/UseraddressController.php:24] +--------------------------------------------------------------- + +[2021-12-15T15:30:07+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresslists +[运行时间:1.462660s] [吞吐率:0.68req/s] [内存消耗:4,805.91kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresslists', + 'route' => 'api/useraddress/lists', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '360', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBQMvUyAL4JsLPTrn', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127509s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084266s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082549s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.083189s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `user_id` = 1 [ RunTime:0.087302s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082665s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.321500s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.279147s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.239660s ] +--------------------------------------------------------------- + +[2021-12-15T15:43:59+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresssetdefault +[运行时间:0.531585s] [吞吐率:1.88req/s] [内存消耗:4,314.20kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresssetdefault', + 'route' => 'api/useraddress/setdefault', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '268', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryj1gf2CGVVhdkYsuq', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.145280s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.107691s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080619s ] +[ error ] [8]未定义变量: request[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/UseraddressController.php:27] +--------------------------------------------------------------- + +[2021-12-15T15:44:13+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresssetdefault +[运行时间:0.754447s] [吞吐率:1.33req/s] [内存消耗:4,310.54kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresssetdefault', + 'route' => 'api/useraddress/setdefault', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '268', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryZ8ky1zZmbi8GUHcs', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134090s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089187s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086237s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.088888s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 0 WHERE `user_id` = 1 [ RunTime:0.085213s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 1 WHERE `id` = 1 AND `user_id` = 1 [ RunTime:0.086227s ] +--------------------------------------------------------------- + +[2021-12-15T15:44:24+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresssetdefault +[运行时间:0.699669s] [吞吐率:1.43req/s] [内存消耗:4,310.54kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresssetdefault', + 'route' => 'api/useraddress/setdefault', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '268', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXXeiFbB8Zg6pJBRW', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131664s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083718s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081448s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.085660s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 0 WHERE `user_id` = 1 [ RunTime:0.084165s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 1 WHERE `id` = 2 AND `user_id` = 1 [ RunTime:0.083949s ] +--------------------------------------------------------------- + +[2021-12-15T15:44:54+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresslists +[运行时间:0.533893s] [吞吐率:1.87req/s] [内存消耗:4,325.77kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresslists', + 'route' => 'api/useraddress/lists', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '134', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarykmAamn0Yyk4V0cJw', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133272s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084320s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082982s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.085199s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `user_id` = 2 [ RunTime:0.082568s ] +--------------------------------------------------------------- + +[2021-12-15T15:57:48+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressadd +[运行时间:0.728975s] [吞吐率:1.37req/s] [内存消耗:4,313.04kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressadd', + 'route' => 'api/useraddress/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '799', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryRDbx01vRSNBGI2YI', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.194053s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.164371s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.145243s ] +[ error ] [0]Class app\api\controller\UserAddressValidate does not exist[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/Container.php:467] +--------------------------------------------------------------- + +[2021-12-15T15:58:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressadd +[运行时间:0.415991s] [吞吐率:2.40req/s] [内存消耗:4,403.52kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressadd', + 'route' => 'api/useraddress/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '799', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryVnkOIfD6Aebdj6VK', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124613s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084455s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080317s ] +[ error ] [8]未定义数组索引: is_default[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/UserAddress.php:87] +--------------------------------------------------------------- + +[2021-12-15T15:58:34+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressadd +[运行时间:0.953677s] [吞吐率:1.05req/s] [内存消耗:4,339.69kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressadd', + 'route' => 'api/useraddress/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '896', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary975PmzYSGykVGP09', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', + 'is_default' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126491s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.332911s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085002s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.089282s ] +[ sql ] [ SQL ] SELECT * FROM `user_address` WHERE `user_id` = 1 [ RunTime:0.082180s ] +[ sql ] [ SQL ] INSERT INTO `user_address` (`user_id` , `contact` , `telephone` , `province_id` , `city_id` , `district_id` , `address` , `is_default` , `create_time`) VALUES (1 , '测试' , '17761236475' , 360000 , 360100 , 360102 , '测试地址' , 0 , 1639555114) [ RunTime:0.087138s ] +--------------------------------------------------------------- + +[2021-12-15T15:58:53+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressadd +[运行时间:0.356270s] [吞吐率:2.81req/s] [内存消耗:4,307.23kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressadd', + 'route' => 'api/useraddress/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '792', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryZXLPvc9WKRJ7GCGo', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试', + 'telephone' => '17761236475', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', + 'is_default' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124319s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.081372s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086538s ] +--------------------------------------------------------------- + +[2021-12-15T15:59:40+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressadd +[运行时间:0.707931s] [吞吐率:1.41req/s] [内存消耗:4,339.60kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressadd', + 'route' => 'api/useraddress/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '897', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBwDDMAMBBZ5ipRxL', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', + 'is_default' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129544s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083974s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081538s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.085676s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 0 WHERE `user_id` = 1 [ RunTime:0.086017s ] +[ sql ] [ SQL ] INSERT INTO `user_address` (`user_id` , `contact` , `telephone` , `province_id` , `city_id` , `district_id` , `address` , `is_default` , `create_time`) VALUES (1 , '测试' , '17761236475' , 360000 , 360100 , 360102 , '测试地址' , 1 , 1639555179) [ RunTime:0.082291s ] +--------------------------------------------------------------- + +[2021-12-15T15:59:51+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressadd +[运行时间:0.711897s] [吞吐率:1.40req/s] [内存消耗:4,339.60kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressadd', + 'route' => 'api/useraddress/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '897', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary4shSJ7IOs7j2GZzo', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', + 'is_default' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127177s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085695s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086389s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.083272s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 0 WHERE `user_id` = 1 [ RunTime:0.087751s ] +[ sql ] [ SQL ] INSERT INTO `user_address` (`user_id` , `contact` , `telephone` , `province_id` , `city_id` , `district_id` , `address` , `is_default` , `create_time`) VALUES (1 , '测试' , '17761236475' , 360000 , 360100 , 360102 , '测试地址' , 1 , 1639555191) [ RunTime:0.090965s ] +--------------------------------------------------------------- + +[2021-12-15T16:02:43+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressedit +[运行时间:0.483106s] [吞吐率:2.07req/s] [内存消耗:4,320.72kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressedit', + 'route' => 'api/useraddress/edit', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '993', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryDN9uB6XRuaVc22MV', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试111111', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', + 'is_default' => '1', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.156973s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.158797s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.106489s ] +--------------------------------------------------------------- + +[2021-12-15T16:03:08+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressedit +[运行时间:0.397443s] [吞吐率:2.52req/s] [内存消耗:4,325.10kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressedit', + 'route' => 'api/useraddress/update', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '993', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary6IsQReV6rMWNJCdG', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试111111', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', + 'is_default' => '1', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126574s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087685s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083170s ] +[ error ] [8]未定义变量: request[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/UseraddressController.php:57] +--------------------------------------------------------------- + +[2021-12-15T16:03:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressedit +[运行时间:0.722723s] [吞吐率:1.38req/s] [内存消耗:4,349.36kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressedit', + 'route' => 'api/useraddress/update', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '993', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarynk0i5MBgupoVyIxD', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试111111', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', + 'is_default' => '1', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126454s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.106813s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082928s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.084014s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 0 WHERE `user_id` = 1 [ RunTime:0.082596s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `contact` = '测试111111' , `telephone` = '17761236475' , `province_id` = 360000 , `city_id` = 360100 , `district_id` = 360102 , `address` = '测试地址' , `is_default` = 1 , `update_time` = 1639555401 WHERE `id` = 1 AND `user_id` = 1 [ RunTime:0.084720s ] +--------------------------------------------------------------- + +[2021-12-15T16:03:36+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressedit +[运行时间:0.685968s] [吞吐率:1.46req/s] [内存消耗:4,349.36kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressedit', + 'route' => 'api/useraddress/update', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '993', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary36UoDPYBjdjaRNWT', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试111111', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', + 'is_default' => '1', + 'id' => '5', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.119555s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084895s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081169s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.082345s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 0 WHERE `user_id` = 1 [ RunTime:0.078744s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `contact` = '测试111111' , `telephone` = '17761236475' , `province_id` = 360000 , `city_id` = 360100 , `district_id` = 360102 , `address` = '测试地址' , `is_default` = 1 , `update_time` = 1639555415 WHERE `id` = 5 AND `user_id` = 1 [ RunTime:0.092876s ] +--------------------------------------------------------------- + +[2021-12-15T16:03:44+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressedit +[运行时间:0.716792s] [吞吐率:1.40req/s] [内存消耗:4,349.36kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressedit', + 'route' => 'api/useraddress/update', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '993', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryvRhBeh3cEALfN34y', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'contact' => '测试111111', + 'telephone' => '17761236475', + 'province_id' => '360000', + 'city_id' => '360100', + 'district_id' => '360102', + 'address' => '测试地址', + 'is_default' => '1', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130952s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088261s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.090318s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.091028s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 0 WHERE `user_id` = 1 [ RunTime:0.085083s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `contact` = '测试111111' , `telephone` = '17761236475' , `province_id` = 360000 , `city_id` = 360100 , `district_id` = 360102 , `address` = '测试地址' , `is_default` = 1 , `update_time` = 1639555424 WHERE `id` = 1 AND `user_id` = 1 [ RunTime:0.088541s ] +--------------------------------------------------------------- + +[2021-12-15T16:09:58+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressdel +[运行时间:0.519561s] [吞吐率:1.92req/s] [内存消耗:4,332.41kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressdel', + 'route' => 'api/useraddress/del', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '268', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarydxujGf3TDqAYzbGB', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127982s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091453s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082184s ] +[ error ] [8]未定义变量: request[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/UseraddressController.php:73] +--------------------------------------------------------------- + +[2021-12-15T16:10:11+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressdel +[运行时间:0.547875s] [吞吐率:1.83req/s] [内存消耗:4,351.85kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressdel', + 'route' => 'api/useraddress/del', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '268', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryCn92K9umy9M7Ncy8', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125441s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086224s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083056s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.083602s ] +[ sql ] [ SQL ] DELETE FROM `user_address` WHERE `id` = 2 AND `user_id` = 1 [ RunTime:0.087720s ] +--------------------------------------------------------------- + +[2021-12-15T16:10:27+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addressdel +[运行时间:0.559338s] [吞吐率:1.79req/s] [内存消耗:4,351.85kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addressdel', + 'route' => 'api/useraddress/del', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '268', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryLBV0BFTWDOyZFifr', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'id' => '8', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.141329s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088859s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086792s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.088328s ] +[ sql ] [ SQL ] DELETE FROM `user_address` WHERE `id` = 8 AND `user_id` = 1 [ RunTime:0.088141s ] +--------------------------------------------------------------- + +[2021-12-15T16:10:49+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresssetdefault +[运行时间:0.833080s] [吞吐率:1.20req/s] [内存消耗:4,337.21kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresssetdefault', + 'route' => 'api/useraddress/setdefault', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '268', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarygyuBcPo5lPpx8075', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.225270s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091239s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.093537s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.088394s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 0 WHERE `user_id` = 1 [ RunTime:0.092368s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 1 WHERE `id` = 2 AND `user_id` = 1 [ RunTime:0.092933s ] +--------------------------------------------------------------- + +[2021-12-15T16:11:00+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-addresssetdefault +[运行时间:0.895551s] [吞吐率:1.12req/s] [内存消耗:4,337.21kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-addresssetdefault', + 'route' => 'api/useraddress/setdefault', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '268', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarywAn7K5PzAHhU3GPh', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130772s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088884s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.099130s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.096292s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 0 WHERE `user_id` = 1 [ RunTime:0.089602s ] +[ sql ] [ SQL ] UPDATE `user_address` SET `is_default` = 1 WHERE `id` = 1 AND `user_id` = 1 [ RunTime:0.085209s ] +--------------------------------------------------------------- + +[2021-12-15T16:15:24+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.932385s] [吞吐率:0.52req/s] [内存消耗:4,882.95kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary8h5aOH2LBAJTVJBM', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127286s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086745s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083510s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086182s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087909s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.087337s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.081848s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.095331s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.331921s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.289077s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.249562s ] +--------------------------------------------------------------- + +[2021-12-15T16:15:36+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.956276s] [吞吐率:1.05req/s] [内存消耗:4,313.04kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryLmLsB13d27fMHHzP', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '2a63b611k+8fB7Cdo9ywSgPZLH1fJ+1GCi7jfknZt7tK', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125139s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084296s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086657s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086111s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 2 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.082962s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.082593s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.082226s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 2 , 3 , 'M' , 1639556135) [ RunTime:0.086579s ] +--------------------------------------------------------------- + +[2021-12-15T16:15:43+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.924365s] [吞吐率:0.34req/s] [内存消耗:4,467.02kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryjIjBZLQi3XcR6YAu', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125365s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085463s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081448s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.085608s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087729s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.083794s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.086948s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081938s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.330155s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.281724s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.277787s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080329s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078564s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082144s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151615427206' LIMIT 1 [ RunTime:0.085212s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151615427206' , 1 , '测试111111' , 360000 , 360100 , 360102 , '测试地址' , '17761236475' , 7197 , 7197 , 7197 , 3 , '' , 1639556142) [ RunTime:0.081280s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081248s ] +[ sql ] [ SQL ] INSERT INTO `order_goods` (`order_id` , `goods_id` , `goods_img` , `item_value` , `brand_name` , `goods_name` , `goods_num` , `goods_price` , `total_price` , `original_price` , `create_time`) VALUES ( 3,2,'/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png','M','Nanushka','格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3',3,'2399.00',7197,'0.00',1639556142 ) [ RunTime:0.078399s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.080010s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+3 , `stock` = stock-3 WHERE `id` = 2 [ RunTime:0.079589s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.081922s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 3 WHERE `goods_id` = 2 AND `spec_value` = 'M' [ RunTime:0.079181s ] +[ sql ] [ SQL ] SELECT `id`,`stock` FROM `goods` WHERE `id` = 2 [ RunTime:0.078607s ] +[ sql ] [ SQL ] DELETE FROM `cart` WHERE `user_id` = 1 AND `selected` = 1 AND `item_value` = 'M' [ RunTime:0.080677s ] +--------------------------------------------------------------- + +[2021-12-15T16:16:24+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.633067s] [吞吐率:0.61req/s] [内存消耗:4,858.99kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryoJXAv2gxd0kAXvmL', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128606s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087097s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084205s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.085178s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.084522s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.092571s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.094676s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084452s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.286727s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.243628s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.247331s ] +--------------------------------------------------------------- + +[2021-12-15T16:19:57+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.743231s] [吞吐率:0.57req/s] [内存消耗:4,859.41kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAe2Nk4X66l24eYSd', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130339s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086431s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084763s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088309s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.090599s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.086970s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.087280s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.085603s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.300001s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.252201s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.250862s ] +--------------------------------------------------------------- + +[2021-12-15T16:20:47+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.633611s] [吞吐率:1.58req/s] [内存消耗:4,344.38kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryu9wSZxVBR9imSpAX', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129030s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086425s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083485s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086817s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.085526s ] +--------------------------------------------------------------- + +[2021-12-15T16:21:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.530630s] [吞吐率:1.88req/s] [内存消耗:4,371.41kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryix8xQTTzv4bSCwX1', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126170s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083499s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081480s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.081617s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.081947s ] +--------------------------------------------------------------- + +[2021-12-15T16:21:36+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.672151s] [吞吐率:1.49req/s] [内存消耗:4,371.41kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXgKJdCaYzwUBQf6E', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126887s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085930s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085311s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.084640s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.083692s ] +--------------------------------------------------------------- + +[2021-12-15T16:21:42+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.810118s] [吞吐率:1.23req/s] [内存消耗:4,313.04kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary5GkmILBLGMIqBcfp', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '2a63b611k+8fB7Cdo9ywSgPZLH1fJ+1GCi7jfknZt7tK', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131076s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086798s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085736s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088542s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 2 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.086153s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085588s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.084381s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 2 , 3 , 'M' , 1639556502) [ RunTime:0.091821s ] +--------------------------------------------------------------- + +[2021-12-15T16:21:48+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.641185s] [吞吐率:0.61req/s] [内存消耗:4,885.05kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryHGfltbr4ajUqcfJ6', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133682s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088169s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086986s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.092609s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.086229s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.087179s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.090745s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.088555s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.297037s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.255522s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.256084s ] +--------------------------------------------------------------- + +[2021-12-15T16:23:10+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.674849s] [吞吐率:0.60req/s] [内存消耗:4,885.00kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarycd6RYtn1bthK9UHB', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.121640s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.080532s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.079569s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.083543s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087439s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.081819s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.079845s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082005s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.278142s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.238897s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.233958s ] +--------------------------------------------------------------- + +[2021-12-15T16:23:18+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.745257s] [吞吐率:0.57req/s] [内存消耗:4,927.44kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary8iNF8EZbt03H20RR', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131855s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088644s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086076s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088519s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087247s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.087937s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.085150s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.088147s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.306680s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.299031s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.256941s ] +[ error ] [8]未定义数组索引: goods_lists[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:189] +--------------------------------------------------------------- + +[2021-12-15T16:23:50+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.578149s] [吞吐率:0.63req/s] [内存消耗:4,927.44kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryeiqtPM7xGXQBBVsv', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129308s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085092s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081514s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.082693s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.088231s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.081589s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.079606s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084361s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.278298s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.238273s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.240420s ] +[ error ] [8]未定义数组索引: goods_lists[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:189] +--------------------------------------------------------------- + +[2021-12-15T16:24:00+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.594492s] [吞吐率:1.68req/s] [内存消耗:4,347.93kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarygRA7BHVVkSkXvzzl', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126836s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092829s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.078455s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.079794s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.078005s ] +--------------------------------------------------------------- + +[2021-12-15T16:24:16+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.662587s] [吞吐率:0.60req/s] [内存消耗:4,927.49kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarySK5TFA6AUDhSgHD0', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130173s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087373s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085718s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.087642s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.086427s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.091573s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.085903s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087466s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.303658s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.249998s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.248699s ] +[ error ] [8]未定义数组索引: goods_lists[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/common/model/Order.php:190] +--------------------------------------------------------------- + +[2021-12-15T16:24:55+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.680647s] [吞吐率:0.37req/s] [内存消耗:4,469.08kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary6Rh0TGC6DaURn4D2', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.119845s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.080241s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082961s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.081006s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.080602s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.081489s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.079480s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.080878s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.277086s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.236476s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.246171s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081101s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.077705s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081765s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151624547540' LIMIT 1 [ RunTime:0.078687s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151624547540' , 1 , '测试111111' , 360000 , 360100 , 360102 , '测试地址' , '17761236475' , 7197 , 7197 , 7197 , 3 , '' , 1639556694) [ RunTime:0.078220s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.080011s ] +[ sql ] [ SQL ] INSERT INTO `order_goods` (`order_id` , `goods_id` , `goods_img` , `item_value` , `brand_name` , `goods_name` , `goods_num` , `goods_price` , `total_price` , `original_price` , `create_time`) VALUES ( 4,2,'/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png','M','Nanushka','格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3',3,'2399.00',7197,'0.00',1639556694 ) [ RunTime:0.079127s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.080368s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+3 , `stock` = stock-3 WHERE `id` = 2 [ RunTime:0.082762s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.079707s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 3 WHERE `goods_id` = 2 AND `spec_value` = 'M' [ RunTime:0.079238s ] +[ sql ] [ SQL ] SELECT `id`,`stock` FROM `goods` WHERE `id` = 2 [ RunTime:0.080381s ] +[ sql ] [ SQL ] DELETE FROM `cart` WHERE `user_id` = 1 AND `selected` = 1 AND `item_value` = 'M' [ RunTime:0.083195s ] +--------------------------------------------------------------- + +[2021-12-15T16:25:03+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.541247s] [吞吐率:1.85req/s] [内存消耗:4,371.36kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryjdT5BENVco7RdLF5', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125172s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091249s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084157s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.087281s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.087095s ] +--------------------------------------------------------------- + +[2021-12-15T16:25:25+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.792154s] [吞吐率:1.26req/s] [内存消耗:4,313.04kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryWBozC632HFUHOkUu', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '2a63b611k+8fB7Cdo9ywSgPZLH1fJ+1GCi7jfknZt7tK', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127793s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087628s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081062s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.086360s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 2 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.084787s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.083307s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.082189s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 2 , 3 , 'M' , 1639556724) [ RunTime:0.086251s ] +--------------------------------------------------------------- + +[2021-12-15T16:25:36+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.700294s] [吞吐率:0.37req/s] [内存消耗:4,469.08kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary7MQZeLVGXoDYPf1E', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124234s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082138s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080190s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.082636s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.080834s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.082713s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.084628s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081823s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.283232s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.244721s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.241409s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083778s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080166s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082483s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112151625350853' LIMIT 1 [ RunTime:0.080770s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112151625350853' , 1 , '测试111111' , 360000 , 360100 , 360102 , '测试地址' , '17761236475' , 7197 , 7197 , 7197 , 3 , '' , 1639556735) [ RunTime:0.080441s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082733s ] +[ sql ] [ SQL ] INSERT INTO `order_goods` (`order_id` , `goods_id` , `goods_img` , `item_value` , `brand_name` , `goods_name` , `goods_num` , `goods_price` , `total_price` , `original_price` , `create_time`) VALUES ( 5,2,'/uploads/attachment/20211124/6092c886bcd1653e765eb6d0fc13d19b_750_461.png','M','Nanushka','格力京逸(GREE)小1匹 壁挂式卧室空调挂机KFR-23GW/DbD3',3,'2399.00',7197,'0.00',1639556735 ) [ RunTime:0.091543s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.080698s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+3 , `stock` = stock-3 WHERE `id` = 2 [ RunTime:0.080665s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.081952s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 3 WHERE `goods_id` = 2 AND `spec_value` = 'M' [ RunTime:0.080246s ] +[ sql ] [ SQL ] SELECT `id`,`stock` FROM `goods` WHERE `id` = 2 [ RunTime:0.079106s ] +[ sql ] [ SQL ] DELETE FROM `cart` WHERE `user_id` = 1 AND `selected` = 1 AND `item_value` = 'M' [ RunTime:0.086979s ] +--------------------------------------------------------------- + +[2021-12-15T16:26:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.674488s] [吞吐率:1.48req/s] [内存消耗:4,371.36kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarytSpaB8C0de4RA3nQ', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131114s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086774s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091251s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.089392s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.084550s ] +--------------------------------------------------------------- + +[2021-12-15T16:28:51+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/handlecollectgoods +[运行时间:0.709669s] [吞吐率:1.41req/s] [内存消耗:4,345.93kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'handlecollectgoods', + 'route' => 'api/goods/handlecollectgoods', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '415', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryWF75Umqh7U8S3VUp', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '7174e5f0V9IzOtMCvz/GbGrDeO1LKVEI4jQCC6zXqO0I', + 'is_collect' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127898s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085970s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083454s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_collect` [ RunTime:0.087855s ] +[ sql ] [ SQL ] SELECT * FROM `goods_collect` WHERE `user_id` = 1 AND `goods_id` = 1 LIMIT 1 [ RunTime:0.084137s ] diff --git a/runtime/log/202112/16.log b/runtime/log/202112/16.log new file mode 100755 index 0000000..11c8e03 --- /dev/null +++ b/runtime/log/202112/16.log @@ -0,0 +1,230 @@ +--------------------------------------------------------------- + +[2021-12-16T18:46:10+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_buy +[运行时间:0.810450s] [吞吐率:1.23req/s] [内存消耗:4,423.88kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_buy', + 'route' => 'api/order/consignment_buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1980', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary1sTAMuLUq0iAw4o9', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'json_value' => '[{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]}]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123005s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084538s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080117s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.081181s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.083016s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112161846102690' LIMIT 1 [ RunTime:0.081488s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `order_status` , `create_time`) VALUES ('202112161846102690' , 1 , 0 , 1639651570) [ RunTime:0.079454s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.082236s ] +[ error ] [0]数据表字段不存在:[phase_name][/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Builder.php:138] +--------------------------------------------------------------- + +[2021-12-16T18:47:06+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_buy +[运行时间:1.534142s] [吞吐率:0.65req/s] [内存消耗:4,393.77kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_buy', + 'route' => 'api/order/consignment_buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1980', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryYkxAKgjgVuznCJTe', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'json_value' => '[{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]}]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.119350s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.081110s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.078863s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.078452s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085192s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112161847050200' LIMIT 1 [ RunTime:0.081372s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081693s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order` (`order_sn` , `user_id` , `order_status` , `create_time`) VALUES ('202112161847050200' , 1 , 0 , 1639651625) [ RunTime:0.079684s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082936s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (5 , 'M' , '寄卖A' , '100' , '耐克' , '全新' , '大衣' , '淘宝' , 1639651625) [ RunTime:0.080834s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (5 , 'M' , '寄卖A' , '100' , '耐克' , '全新' , '大衣' , '淘宝' , 1639651626) [ RunTime:0.079334s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (5 , 'M' , '寄卖A' , '100' , '耐克' , '全新' , '大衣' , '淘宝' , 1639651626) [ RunTime:0.078556s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082425s ] +[ sql ] [ SQL ] INSERT INTO `mall_image` (`type` , `union_id` , `thumb_image` , `ori_image` , `create_time`) VALUES ( 2,8,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,8,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,8,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,8,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,8,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,8,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,9,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,9,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,9,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,9,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,9,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,9,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,10,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,10,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,10,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,10,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,10,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) , ( 2,10,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639651626 ) [ RunTime:0.083777s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081813s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (5 , '寄卖下单成功' , '24小时内平台估价' , 1639651626) [ RunTime:0.079446s ] +--------------------------------------------------------------- + +[2021-12-16T18:50:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:1.113060s] [吞吐率:0.90req/s] [内存消耗:4,874.18kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/shop_config/website.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.117232s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.079983s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.077445s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.080041s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.079167s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.082025s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.077829s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080512s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081205s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (5,4,3,2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080425s ] +--------------------------------------------------------------- + +[2021-12-16T18:50:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=5 +[运行时间:1.626987s] [吞吐率:0.61req/s] [内存消耗:5,151.95kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '5', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123895s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086185s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079778s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083683s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.079925s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085166s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 5 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080815s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083231s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080313s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083761s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 5 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081180s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082640s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 5 ORDER BY `id` DESC [ RunTime:0.080813s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081562s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 8 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079885s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 9 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079923s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 10 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080731s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080212s ] +--------------------------------------------------------------- + +[2021-12-16T18:55:11+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_buy +[运行时间:1.687120s] [吞吐率:0.59req/s] [内存消耗:4,393.82kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_buy', + 'route' => 'api/order/consignment_buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1980', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary2bEkvLnduzsPF562', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'json_value' => '[{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]}]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124066s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083631s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080818s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.082393s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084299s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112161855109302' LIMIT 1 [ RunTime:0.083621s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084125s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order` (`order_sn` , `user_id` , `order_status` , `create_time`) VALUES ('202112161855109302' , 1 , 0 , 1639652110) [ RunTime:0.080443s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085428s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (6 , 'M' , '寄卖A' , '100' , '耐克' , '全新' , '大衣' , '淘宝' , 1639652110) [ RunTime:0.081239s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (6 , 'M' , '寄卖A' , '100' , '耐克' , '全新' , '大衣' , '淘宝' , 1639652111) [ RunTime:0.081173s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (6 , 'M' , '寄卖A' , '100' , '耐克' , '全新' , '大衣' , '淘宝' , 1639652111) [ RunTime:0.081557s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082786s ] +[ sql ] [ SQL ] INSERT INTO `mall_image` (`type` , `union_id` , `thumb_image` , `ori_image` , `create_time`) VALUES ( 2,11,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,11,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,11,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,11,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,11,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,11,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,12,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,12,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,12,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,12,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,12,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,12,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,13,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,13,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,13,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,13,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,13,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) , ( 2,13,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639652111 ) [ RunTime:0.082183s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084148s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (6 , '寄卖下单成功' , '24小时内平台估价' , 1639652111) [ RunTime:0.083320s ] diff --git a/runtime/log/202112/17.log b/runtime/log/202112/17.log new file mode 100755 index 0000000..99ba750 --- /dev/null +++ b/runtime/log/202112/17.log @@ -0,0 +1,10157 @@ +--------------------------------------------------------------- + +[2021-12-17T10:26:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/lists.html?_pjax=%23pjax-container +[运行时间:0.877343s] [吞吐率:1.14req/s] [内存消耗:4,582.38kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/finance/lists.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.178598s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088125s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082383s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085385s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/lists' LIMIT 1 [ RunTime:0.080793s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/month_order_amount.png +[运行时间:0.898461s] [吞吐率:1.11req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.212007s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087263s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082240s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084926s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.200200s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084168s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/refund_num.png +[运行时间:1.566661s] [吞吐率:0.64req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.225882s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088952s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088058s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090502s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.093545s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087969s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/total_user_money.png +[运行时间:2.236220s] [吞吐率:0.45req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.173726s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092256s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087091s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087740s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.086951s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086807s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/refund_amount.png +[运行时间:2.936525s] [吞吐率:0.34req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.212259s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082995s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082634s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081179s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.078151s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079798s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/order_num.png +[运行时间:3.616980s] [吞吐率:0.28req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132864s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087564s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082958s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085074s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.084132s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082434s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/total_order_amount.png +[运行时间:4.273345s] [吞吐率:0.23req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.168463s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086307s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084433s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085790s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.084783s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082945s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/have_withdraw_earnings.png +[运行时间:3.986520s] [吞吐率:0.25req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126405s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085131s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085558s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082730s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.080746s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082185s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/total_user_integral.png +[运行时间:3.867092s] [吞吐率:0.26req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131091s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088774s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084949s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088007s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.087321s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.094158s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/distribution_earnings.png +[运行时间:3.724843s] [吞吐率:0.27req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134292s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086285s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082597s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085468s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.084036s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083962s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/distribution_have_withdraw.png +[运行时间:3.634680s] [吞吐率:0.28req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.120942s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081641s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079705s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081383s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.081047s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080875s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:35+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/month_earnings.png +[运行时间:3.608502s] [吞吐率:0.28req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131782s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088234s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092053s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088240s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.095308s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087413s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/wait_earnings.png +[运行时间:3.615349s] [吞吐率:0.28req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128834s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085068s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083000s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.117503s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.122224s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082559s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:36+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/able_earnings.png +[运行时间:3.807751s] [吞吐率:0.26req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.209597s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089630s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085654s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090600s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.164356s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085844s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:40+08:00] 127.0.0.1 GET www.dggjimai.com/admin/user/index.html?_pjax=%23pjax-container +[运行时间:6.867972s] [吞吐率:0.15req/s] [内存消耗:4,812.22kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/user/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.291320s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.118827s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.106554s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.158342s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/user/index' LIMIT 1 [ RunTime:0.081601s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.116039s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `user`.`delete_time` = 0 [ RunTime:0.114054s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `user`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.082218s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.208282s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 7 OR `second_leader` = 7 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.083302s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.100131s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 7 ) AND `order`.`delete_time` = 0 [ RunTime:0.150628s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083778s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 6 OR `second_leader` = 6 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.198534s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 6 ) AND `order`.`delete_time` = 0 [ RunTime:0.085273s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 4 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.196193s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 5 OR `second_leader` = 5 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.083722s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 5 ) AND `order`.`delete_time` = 0 [ RunTime:0.082054s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 3 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.213338s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 4 OR `second_leader` = 4 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.081518s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 4 ) AND `order`.`delete_time` = 0 [ RunTime:0.082353s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 2 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081303s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 3 OR `second_leader` = 3 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.081452s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 3 ) AND `order`.`delete_time` = 0 [ RunTime:0.081806s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085660s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 2 OR `second_leader` = 2 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.081565s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 2 ) AND `order`.`delete_time` = 0 [ RunTime:0.080808s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080773s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 1 OR `second_leader` = 1 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.082617s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.082886s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:41+08:00] 127.0.0.1 GET www.dggjimai.com/admin/user/__PUBLIC__/static/common/image/finance/month_order_amount.png +[运行时间:6.916582s] [吞吐率:0.14req/s] [内存消耗:4,478.06kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.155369s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087187s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088385s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087449s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/user/public' LIMIT 1 [ RunTime:0.091513s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085429s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/user/__PUBLIC__/static/common/image/finance/refund_amount.png +[运行时间:7.270366s] [吞吐率:0.14req/s] [内存消耗:4,478.05kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132041s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086913s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085907s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.373427s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/user/public' LIMIT 1 [ RunTime:0.098006s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.111597s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:42+08:00] 127.0.0.1 GET www.dggjimai.com/admin/user/__PUBLIC__/static/common/image/finance/refund_num.png +[运行时间:7.262829s] [吞吐率:0.14req/s] [内存消耗:4,478.05kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131595s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088416s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086931s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088837s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/user/public' LIMIT 1 [ RunTime:0.086158s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087519s ] +--------------------------------------------------------------- + +[2021-12-17T10:26:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/user/__PUBLIC__/static/common/image/finance/total_user_money.png +[运行时间:7.221280s] [吞吐率:0.14req/s] [内存消耗:4,478.05kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132998s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090280s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086454s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087792s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/user/public' LIMIT 1 [ RunTime:0.086223s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085196s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:18+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/lists.html?_pjax=%23pjax-container +[运行时间:0.526692s] [吞吐率:1.90req/s] [内存消耗:4,421.81kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/finance/lists.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128997s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084184s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080597s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084366s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/lists' LIMIT 1 [ RunTime:0.081991s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:18+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/total_order_amount.png +[运行时间:0.701498s] [吞吐率:1.43req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131236s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088977s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084680s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088372s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.085202s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085195s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/refund_amount.png +[运行时间:1.264132s] [吞吐率:0.79req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126838s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083311s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080835s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083020s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.080149s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085949s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/total_user_money.png +[运行时间:1.847541s] [吞吐率:0.54req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128349s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085519s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083292s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085335s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.084472s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088876s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/month_order_amount.png +[运行时间:2.483688s] [吞吐率:0.40req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133790s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.117908s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080368s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081550s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.087104s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090160s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/refund_num.png +[运行时间:3.038826s] [吞吐率:0.33req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124408s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083263s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079940s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086997s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.082948s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081524s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/order_num.png +[运行时间:3.620844s] [吞吐率:0.28req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124724s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085153s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083114s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082274s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.082710s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080696s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:22+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/distribution_have_withdraw.png +[运行时间:3.505338s] [吞吐率:0.29req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126114s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084691s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085268s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088535s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.089485s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088375s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/have_withdraw_earnings.png +[运行时间:3.544019s] [吞吐率:0.28req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124225s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084194s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088076s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083932s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.089143s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083168s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/total_user_integral.png +[运行时间:3.603963s] [吞吐率:0.28req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131605s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089203s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087695s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086557s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.136015s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088647s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/wait_earnings.png +[运行时间:3.679921s] [吞吐率:0.27req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134740s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.181107s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088172s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091943s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.087150s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087635s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/distribution_earnings.png +[运行时间:3.694652s] [吞吐率:0.27req/s] [内存消耗:4,448.20kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126510s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084110s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083078s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084152s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.081498s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.090484s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/month_earnings.png +[运行时间:3.732931s] [吞吐率:0.27req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133005s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086648s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083648s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086876s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.088610s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086469s ] +--------------------------------------------------------------- + +[2021-12-17T10:28:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/finance/__PUBLIC__/static/common/image/finance/able_earnings.png +[运行时间:3.694142s] [吞吐率:0.27req/s] [内存消耗:4,448.19kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129891s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084802s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089911s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086196s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/finance/public' LIMIT 1 [ RunTime:0.083995s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084679s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.032525s] [吞吐率:0.97req/s] [内存消耗:4,778.50kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/finance/lists.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128615s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085799s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085147s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084268s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.082884s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084563s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.081840s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.081852s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.082250s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.082011s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/total_order_amount.png +[运行时间:1.570211s] [吞吐率:0.64req/s] [内存消耗:4,477.41kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.122016s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084545s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080088s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084236s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.081857s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080895s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/order_num.png +[运行时间:2.178737s] [吞吐率:0.46req/s] [内存消耗:4,477.40kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132176s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090029s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088918s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089033s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.087972s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087168s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/refund_amount.png +[运行时间:2.786491s] [吞吐率:0.36req/s] [内存消耗:4,477.40kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.136313s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092983s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089461s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095271s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.086595s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087722s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/month_order_amount.png +[运行时间:3.364894s] [吞吐率:0.30req/s] [内存消耗:4,477.41kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123693s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083722s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082320s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085987s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.082955s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082671s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/refund_num.png +[运行时间:3.927756s] [吞吐率:0.25req/s] [内存消耗:4,477.40kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126982s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084573s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083117s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085734s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.084262s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084327s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/total_user_money.png +[运行时间:3.496203s] [吞吐率:0.29req/s] [内存消耗:4,477.40kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127405s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086326s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084063s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084910s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.082261s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081655s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:27+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/total_user_integral.png +[运行时间:3.499995s] [吞吐率:0.29req/s] [内存消耗:4,477.41kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124502s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082284s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085909s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083903s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.080161s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079714s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/able_earnings.png +[运行时间:3.496805s] [吞吐率:0.29req/s] [内存消耗:4,477.40kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130051s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087646s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086405s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087769s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.085441s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.092543s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_category/index.html?_pjax=%23pjax-container +[运行时间:3.580704s] [吞吐率:0.28req/s] [内存消耗:4,475.39kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_category/index.html [ array ( + 0 => 'data', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130010s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085975s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081799s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085377s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_category/index' LIMIT 1 [ RunTime:0.082803s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.085593s ] +[ sql ] [ SQL ] SELECT `id`,`name`,`parent_id` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.082785s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/have_withdraw_earnings.png +[运行时间:3.627735s] [吞吐率:0.28req/s] [内存消耗:4,477.41kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138369s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093074s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093422s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091782s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.088100s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088078s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/month_earnings.png +[运行时间:3.605972s] [吞吐率:0.28req/s] [内存消耗:4,477.40kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123124s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082968s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082179s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082965s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.082430s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080399s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:30+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/distribution_earnings.png +[运行时间:3.631860s] [吞吐率:0.28req/s] [内存消耗:4,477.41kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130561s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086230s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090219s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085633s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.084721s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084260s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:31+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/wait_earnings.png +[运行时间:3.673210s] [吞吐率:0.27req/s] [内存消耗:4,477.40kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135556s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086228s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086033s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093543s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.083626s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082111s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods_brand/index.html?_pjax=%23pjax-container +[运行时间:3.816981s] [吞吐率:0.26req/s] [内存消耗:4,590.18kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_category/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods_brand/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129560s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090371s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084005s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087252s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods_brand/index' LIMIT 1 [ RunTime:0.085863s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.086661s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.084742s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.086894s ] +--------------------------------------------------------------- + +[2021-12-17T10:29:32+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/__PUBLIC__/static/common/image/finance/distribution_have_withdraw.png +[运行时间:4.434137s] [吞吐率:0.23req/s] [内存消耗:4,477.41kb] [文件加载:178] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'finance', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.144186s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092414s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086912s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091939s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/public' LIMIT 1 [ RunTime:0.086173s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086075s ] +--------------------------------------------------------------- + +[2021-12-17T11:21:52+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.525469s] [吞吐率:1.90req/s] [内存消耗:4,419.52kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryWIuA9B09nQMp1NsY', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127687s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085318s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082319s ] +[ error ] [0]method not exist:app\common\model\ConsignmentOrder->orderGoods[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Query.php:180] +--------------------------------------------------------------- + +[2021-12-17T11:29:59+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.960359s] [吞吐率:1.04req/s] [内存消耗:4,523.28kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary3qph2DkmPgCVyJDY', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.165400s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084923s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086974s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085307s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.082370s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.083454s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085442s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (6,5,3) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083615s ] +--------------------------------------------------------------- + +[2021-12-17T11:30:18+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.890295s] [吞吐率:1.12req/s] [内存消耗:4,523.28kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryDOYPm3hCoNArABsA', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.166093s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087417s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.090743s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086954s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.084942s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.082921s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090611s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (6,5,3) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081116s ] +--------------------------------------------------------------- + +[2021-12-17T11:31:53+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.836847s] [吞吐率:1.19req/s] [内存消耗:4,523.78kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryunnbpDmbhImSLj5X', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.137037s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.096603s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086270s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088324s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.086724s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.085240s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087443s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (6,5,3) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084599s ] +--------------------------------------------------------------- + +[2021-12-17T11:33:03+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.888988s] [吞吐率:1.12req/s] [内存消耗:4,523.83kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary10iKvJb87UuPnRNI', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130111s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086401s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.108380s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086920s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.084260s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.084814s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086791s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (6,5,3) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.099571s ] +--------------------------------------------------------------- + +[2021-12-17T11:33:40+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.837642s] [吞吐率:1.19req/s] [内存消耗:4,523.83kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary66QXWMvCHJmPZl7R', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125309s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084739s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082414s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085213s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083741s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.081155s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082506s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (6,5,3) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080580s ] +--------------------------------------------------------------- + +[2021-12-17T11:34:45+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.810996s] [吞吐率:1.23req/s] [内存消耗:4,523.83kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryuygEKUFCnTglNrYB', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127860s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084719s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083728s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084411s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.084706s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.081982s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090532s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (6,5,3) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081138s ] +--------------------------------------------------------------- + +[2021-12-17T11:37:25+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.688941s] [吞吐率:1.45req/s] [内存消耗:4,423.52kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '453', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryQetDQGxKZ32DdgCx', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.226746s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089228s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089272s ] +[ error ] [8]未定义数组索引: order_status[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/OrderController.php:136] +--------------------------------------------------------------- + +[2021-12-17T11:40:44+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.872073s] [吞吐率:1.15req/s] [内存消耗:4,525.13kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryMZtRRL9ueV4hsAHi', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.167447s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.094679s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.092263s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086794s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.082484s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.082849s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086764s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (6,5,3) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086458s ] +--------------------------------------------------------------- + +[2021-12-17T11:40:51+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.682367s] [吞吐率:1.47req/s] [内存消耗:4,516.61kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryTAzBuMQUylCfiqZW', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.168420s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086037s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085043s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086269s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','3','4','5','6') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083407s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','3','4','5','6') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.089131s ] +--------------------------------------------------------------- + +[2021-12-17T11:41:01+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.821234s] [吞吐率:1.22req/s] [内存消耗:4,525.13kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXu2Gd9pZ1BhuXVDR', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130271s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085637s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083947s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.101786s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.091681s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.082928s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084560s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (6,5,3) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082631s ] +--------------------------------------------------------------- + +[2021-12-17T12:35:09+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.701716s] [吞吐率:1.43req/s] [内存消耗:4,419.45kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryNLAyzyxv7w0cW6E7', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130503s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088108s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085871s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087772s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `o` ON `cog`.`order_id`=o.id and order_status=2 WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.085792s ] +[ error ] [8]未定义变量: model[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/OrderController.php:214] +--------------------------------------------------------------- + +[2021-12-17T12:35:19+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.715586s] [吞吐率:1.40req/s] [内存消耗:4,483.23kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary36MswSDQYL9YQ11g', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.226282s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087522s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084763s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086039s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `o` ON `cog`.`order_id`=o.id and order_status=2 WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.085502s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `o` ON `cog`.`order_id`=o.id and order_status=2 WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.084915s ] +[ error ] [0]类的属性不存在:app\common\model\ConsignmentOrderGoods->order_status_text[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/model/concern/Attribute.php:559] +--------------------------------------------------------------- + +[2021-12-17T12:35:30+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.653920s] [吞吐率:1.53req/s] [内存消耗:4,447.51kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary459CHqKHXEe4RbiG', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132821s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089288s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087884s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086557s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `o` ON `cog`.`order_id`=o.id and order_status=2 WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083719s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `o` ON `cog`.`order_id`=o.id and order_status=2 WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.085693s ] +--------------------------------------------------------------- + +[2021-12-17T12:38:47+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.704951s] [吞吐率:1.42req/s] [内存消耗:4,425.29kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryfBBEqtXz3PfPOBk1', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.169111s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089497s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085233s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088458s ] +[ error ] [10501]SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'order_status' in on clause is ambiguous[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-17T12:39:29+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.784738s] [吞吐率:1.27req/s] [内存消耗:4,483.15kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAC8Up5rkgkrLJxqu', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128157s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087013s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085067s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086067s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.085686s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 ORDER BY `cog`.`id` DESC LIMIT 0,12 [ RunTime:0.083549s ] +--------------------------------------------------------------- + +[2021-12-17T15:28:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:2.235116s] [吞吐率:0.45req/s] [内存消耗:4,872.46kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods_brand/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.159040s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082581s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081405s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083760s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.079014s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082201s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083052s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083923s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.081098s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (5,4,3,2) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.085656s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083029s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090297s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084072s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084558s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080037s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083249s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.080834s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080125s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080319s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080282s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080116s ] +--------------------------------------------------------------- + +[2021-12-17T15:32:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:2.321568s] [吞吐率:0.43req/s] [内存消耗:4,896.26kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/auth/login.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.170673s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089259s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.094809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090202s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.093086s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089853s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087650s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.087573s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.091944s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (5,4,3,2) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.088297s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088914s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086504s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086407s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092385s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086656s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085425s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085153s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.087546s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087459s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.087782s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.089621s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.085245s ] +--------------------------------------------------------------- + +[2021-12-17T15:32:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html +[运行时间:1.958210s] [吞吐率:0.51req/s] [内存消耗:4,896.26kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/auth/login.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125329s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083132s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082442s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082312s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.085148s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081866s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.085007s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080658s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.084222s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` IN (5,4,3,2) ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.081586s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081040s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082366s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078696s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078369s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085362s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079232s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.078638s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081514s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.078958s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.080740s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.078978s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.077713s ] +--------------------------------------------------------------- + +[2021-12-17T15:32:30+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.689868s] [吞吐率:1.45req/s] [内存消耗:4,483.15kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAwCdOAYZaliBNAgD', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125880s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086191s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083808s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088547s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.080495s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 ORDER BY `cog`.`id` DESC LIMIT 0,12 [ RunTime:0.082327s ] +--------------------------------------------------------------- + +[2021-12-17T15:32:45+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.632462s] [吞吐率:1.58req/s] [内存消耗:4,483.15kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarycqOliY69lBNJB7zE', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125317s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084644s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082559s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086195s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.080655s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 ORDER BY `cog`.`id` DESC LIMIT 0,12 [ RunTime:0.081445s ] +--------------------------------------------------------------- + +[2021-12-17T16:09:54+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.960226s] [吞吐率:1.04req/s] [内存消耗:4,352.02kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary2rVbgX06Tkazr2p9', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '2a63b611k+8fB7Cdo9ywSgPZLH1fJ+1GCi7jfknZt7tK', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.165667s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087226s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089652s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.089384s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 2 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.086137s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.086530s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.081370s ] +--------------------------------------------------------------- + +[2021-12-17T16:10:07+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.209563s] [吞吐率:0.83req/s] [内存消耗:4,779.05kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.167865s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085359s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083407s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083886s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.083122s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084655s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.082658s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.083263s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.086005s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.081150s ] +--------------------------------------------------------------- + +[2021-12-17T16:10:11+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.731981s] [吞吐率:0.58req/s] [内存消耗:4,797.98kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131993s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089068s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085934s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090284s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.084952s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088473s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089262s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086880s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.089320s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.086908s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.085010s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087589s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.084614s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.086475s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.090763s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.087595s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.088794s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.088825s ] +--------------------------------------------------------------- + +[2021-12-17T16:10:30+08:00] 127.0.0.1 POST www.dggjimai.com/admin/file/icon.html +[运行时间:1.205370s] [吞吐率:0.83req/s] [内存消耗:4,456.16kb] [文件加载:175] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '243354', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBebpQgX7BUlevSFk', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'type' => '1', + 'width' => '370', + 'heigh' => '478', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.168458s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087118s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/file/icon' LIMIT 1 [ RunTime:0.083278s ] +--------------------------------------------------------------- + +[2021-12-17T16:10:49+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/2.html +[运行时间:2.683174s] [吞吐率:0.37req/s] [内存消耗:4,700.80kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3423', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary2ldbHMgvKYOCdGHs', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '测试A', + 'code' => '2', + 'goods_category_id' => '2', + 'brand_id' => '2', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f.png', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f_370_478.png', + ), + 'ori_fm_img' => '/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f.png', + 'thumb_img_f' => '/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f_370_478.png', + 'original_price' => '0.00', + 'price' => '2399.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + 2 => + array ( + 0 => '3', + ), + 3 => + array ( + 0 => '4', + ), + 4 => + array ( + 0 => '5', + ), + ), + 'detail' => 'Quis dignissim tellus adipiscing dolor. Odio enim urna, in diam eget porta aenean vivamus senectus. Dictum dolor mi sodales montes, pretium gravida.', + 'model' => '11', + 'goods_size' => 'M码 +Width 52 cm +Length 62 cm', + 'goods_ids' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + ), + '__token__' => '8dbf32ea62e8334955c4080bdc5b0c37', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129571s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088015s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085456s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088298s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.082483s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.085382s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/2.html' , '127.0.0.1' , 1639728647) [ RunTime:0.083059s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.084551s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('a77f2535AuUJl+8csj19+dTLzpKnle8ckBr6Zxae6pAPIrONzGBOCb/LFI6nFTc9/a5noBfmGLLIegI4Rs9XURhymaFqdbSIz70n2JWHZL0s8FnmSgjVsPWaPpYl7XhEb4JCVE74+1GsVdDoc/GUBA1jJuJ1OB0WrupW8sVX9a+DB8T4NoaHTQdWSHHl3qN9kXzAfQgJ9vL32yoGk7GON+0cxFO/pkP8SCfliC1zdAr3kIW9BmIpZZuoqEZSbeuhHODuQY2zMEGSSa+PH6q7JDr9X4jWF+wjzOXpAn77DqG8w/TaFbSH48rJ8n1AGlnBdz57Gm17I6Xjwa7rdG9qHlZ1KDI8anbMmcLa5bmNJ8OvLbRXV6qxreAGiPtBXz9y7fAVq9LGVG3D1qbAsqaeB3GMKcPbbOqrpNs1r9O42H6j1W5sktR/VMp5jwUpSeFA2DxgpXT+sVMZTGHHehfYG8LMtINbpMxu98IEuPEXkgrFvlb4765QD6U2GCkQofF3eDwZ0cLSbxRa3bnqHwHbezCxtGkNWov0n8OM+LzJ+A6Jqzc/KCNk+JBBNiWLqnTv593E1LDj2BaPXLbWBA5Jq0CwO/7H6hsfN2cC3QXgz+StXjgIOjaEds82SLi8mkDgkgETwcJrkUCdMflQEk99DFHsnnwV21Ut5nqTKoPznLCMPvq0M3QQA54FnN3An6+Z+MPYj0xOkLp1ycbObuDJglFVUNoq+xmgPPliVDojCU7XRCJi0yCcRNX2hZtv7HWsQa+p8RIXZNVMbcd29vbHmPBn59pl3RSO4DY0Lpd3ms+a4Pya8oxA/v8x7YSje8kr+voxHPTVXBSjfFBf3rWncyZlJaEUVc0PaBcUCZmhz1aEFhZyJxwIxeLFmXByaB6/YCUf6X1u98sLtUQHhJgudgNgIQqpPFZTdjL73zQ8oS0wfmSNb5VrCTRkh90NuZgHlMbOEU0791EGWhszJmfGa/0gGyKRVJ1oJ+xyQ+gtVaUsUVv1shkCQSFW1n10Nuvv+c8BW4Dxu8XquAj9if5mwrok8y5ckRP9qiHvRAtnnl6iKVFL+AjEK0dadYcaqFgnRbk+TR/6N1b/dDyQb4hQYWX8Li1Nu1mnuRijTff4+gtMA8b17FNgnb1otNCCCSNnnTVk5m2E32CEGsKB6KJPvQqoZV7z18X524T9LxQyxJCKJaRFOFD99ocbK90MWC4t+/37810r7u6GGo8szRF9SCfhVw' , 212) [ RunTime:0.081923s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087137s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082327s ] +[ sql ] [ SQL ] UPDATE `goods` SET `name` = '测试A' , `update_time` = 1639728648 WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 [ RunTime:0.081940s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084192s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082081s ] +[ sql ] [ SQL ] INSERT INTO `mall_image` (`ori_image` , `thumb_image` , `is_cover` , `type` , `union_id` , `create_time` , `update_time`) VALUES ('/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f.png' , '/uploads/attachment/20211217/6c5f725325defb88099d97c83584b34f_370_478.png' , 1 , 1 , 2 , 1639728648 , 1639728648) [ RunTime:0.087462s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085363s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'S' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.082343s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('S' , 2 , 1) [ RunTime:0.082227s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.083416s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('M' , 2 , 2) [ RunTime:0.083919s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'L' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.082468s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('L' , 2 , 3) [ RunTime:0.082006s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XL' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.080810s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('XL' , 2 , 4) [ RunTime:0.081213s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XXL' AND `goods_id` = 2 LIMIT 1 [ RunTime:0.083143s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('XXL' , 2 , 5) [ RunTime:0.083679s ] +--------------------------------------------------------------- + +[2021-12-17T16:10:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.003565s] [吞吐率:1.00req/s] [内存消耗:4,778.99kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133276s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083779s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083045s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083148s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.082663s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086840s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.090058s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.087996s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.088214s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.084288s ] +--------------------------------------------------------------- + +[2021-12-17T16:10:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/1.html?_pjax=%23pjax-container +[运行时间:1.658943s] [吞吐率:0.60req/s] [内存消耗:4,797.39kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128905s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085968s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083427s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085593s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.083126s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087184s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082545s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085665s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088326s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.084997s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 [ RunTime:0.083228s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087382s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.083266s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.087557s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.084741s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.085867s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.084062s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.089544s ] +--------------------------------------------------------------- + +[2021-12-17T16:11:03+08:00] 127.0.0.1 POST www.dggjimai.com/admin/file/icon.html +[运行时间:1.187684s] [吞吐率:0.84req/s] [内存消耗:4,456.16kb] [文件加载:175] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '243354', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarycjwK6UByz94xEtNE', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/1.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'type' => '1', + 'width' => '370', + 'heigh' => '478', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.164640s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083365s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/file/icon' LIMIT 1 [ RunTime:0.085175s ] +--------------------------------------------------------------- + +[2021-12-17T16:11:18+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/1.html +[运行时间:2.784633s] [吞吐率:0.36req/s] [内存消耗:4,700.23kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3228', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary8ArZSD9B80CETi0T', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/1.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '小米全面屏电视E55A 55英寸L55M5-AZ 4K超高清HDR', + 'code' => '1', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79.png', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79_370_478.png', + ), + 'ori_fm_img' => '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79.png', + 'thumb_img_f' => '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79_370_478.png', + 'original_price' => '0.00', + 'price' => '3299.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + 2 => + array ( + 0 => '3', + ), + 3 => + array ( + 0 => '4', + ), + 4 => + array ( + 0 => '5', + ), + ), + 'detail' => '

                            小米电视,性价比之王

                            ', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 1 => + array ( + 0 => '', + ), + ), + '__token__' => '2ac969eb11b4fa953dff0e388457b492', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134820s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.094520s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089230s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089644s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.087464s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.091071s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/1.html' , '127.0.0.1' , 1639728675) [ RunTime:0.087166s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.089788s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('541d27dcY9KpKAQNuvoAMDVE5iNnQaM/GbcCawhDjkWHd6dNAoFHeQhTLpfD00bh8uGQlPb7I35MCbZAeRjxJZgd41TZ6MmLnp1PDv+XilhT9+7N2M7rVr7xzOHvnXDdp+TYY8VDceG60DsJVCsZYfSJS7JiavDcRET9IGZNKiqRlQcTxaByOlT+qfpI0MOMOaF/ooM9MWC/1k35LMhshQtcrck+tqzhoSV57+KVLHz/XgbqmYlu1NG3yLb6yU6Xo1J4D3+BYyaGBOxc0kxKqEvXQNJ8LVmMifuJ5bCQ2BKaJe7dV+q3SGmiwMVS2Vj72dw25pzcQRygjp7+YDBlVlZMuf2Ugvc7e6cBedL0IQ774hweCojj8jxDm95Mk+hLQF3t2lQ5fSnaOZt7xI1qImsRkqHufw81G5Y0EQ4QxKxnzhS2RTwz+HDGmKPOq6IK1pqMExDiyuNPbfmWU5WyKkwaUQWxDOrAFiRVRZScdv3z42ffxzjJcbmZpkOWbq4pXc0xuoLCSSk1dZlxdfSjCe/98MiCC12fBWYAPOGMCyH6J7t4u229UJyWs8qNC2eUGIvP1864sLcUFwCVSrnT+IBTQr9lbTZGT2rwcjNdHR/SjCCog0Y7t8iSU2uZ8ugWwhTpCRixKmYZ0lAbKNYrwDgZX2+EY6ULWW8Swe1QYQxImT6rHdtrbwThJVwL23Gm5gkVhPHxBmIuSh7iADNX9xl3XBha2bEwLuA1Wx834YpbNjOAev1KuTJ6N+/SYBM82NPJnsi0E7bURLfr/dFYz3vFDTx/M07fEEYk+sUSOCqnrYFgsHJsHbO1oE5qz4V111SgukMY1hFgnn6+QxUCBZg+0afZhyiotK2A7Q3m+G6pi2h2YNgeXcsovwTOg34/bYwLuZOBL/CwRq+s57IIJCu2f04RS8DhEvqTX1lVxDNz8/7fN+x8MBkCSVTsxcbid2/jVBSZ8AVwVimsOeynhpWqzfq6/nCf+fYgVciE3g6UyNp1yvv31tkhTcB3wNRBgj0ov5iUDTcas7zO1oi1Y2l+fUmkRlbzQALaG7QQqrio8/STjbtfYmGJzmFlJUYs6VJB7ikI3EnZKhrHIvIfE7ADxjcdqBgzLlNHZlw6Zftjg8cW/iFCDhY9B9kUSLFEvarf9E+DuS75kU+zyYOiuesqIqps5q/Uyn0' , 213) [ RunTime:0.084699s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088401s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085937s ] +[ sql ] [ SQL ] UPDATE `goods` SET `update_time` = 1639728676 WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 [ RunTime:0.085096s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088500s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086956s ] +[ sql ] [ SQL ] INSERT INTO `mall_image` (`ori_image` , `thumb_image` , `is_cover` , `type` , `union_id` , `create_time` , `update_time`) VALUES ('/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79.png' , '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79_370_478.png' , 1 , 1 , 1 , 1639728676 , 1639728676) [ RunTime:0.090666s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087746s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'S' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.084875s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('S' , 1 , 1) [ RunTime:0.090395s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.087499s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('M' , 1 , 2) [ RunTime:0.085244s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'L' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.086033s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('L' , 1 , 3) [ RunTime:0.086205s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XL' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.084962s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('XL' , 1 , 4) [ RunTime:0.088318s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XXL' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.085161s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('XXL' , 1 , 5) [ RunTime:0.085415s ] +--------------------------------------------------------------- + +[2021-12-17T16:11:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.046250s] [吞吐率:0.96req/s] [内存消耗:4,778.99kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131398s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087806s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085239s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086114s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.086571s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087754s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.086209s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.084478s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.086987s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.084904s ] +--------------------------------------------------------------- + +[2021-12-17T16:11:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/2.html?_pjax=%23pjax-container +[运行时间:1.648978s] [吞吐率:0.61req/s] [内存消耗:4,803.81kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132186s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086183s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084566s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086645s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.083535s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084913s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 2 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084881s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083763s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082562s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.084235s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 [ RunTime:0.083770s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084412s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.083925s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.084400s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.086953s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.085202s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.083970s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.082866s ] +--------------------------------------------------------------- + +[2021-12-17T16:11:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:0.837161s] [吞吐率:1.19req/s] [内存消耗:4,803.18kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/2.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133146s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087687s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096084s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091075s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.087486s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089986s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.087036s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.089415s ] +--------------------------------------------------------------- + +[2021-12-17T16:11:59+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_buy +[运行时间:1.663661s] [吞吐率:0.60req/s] [内存消耗:4,418.79kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_buy', + 'route' => 'api/order/consignment_buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1980', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryxEPxHCHfQo0cuocr', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'json_value' => '[{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]}]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132779s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089773s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091360s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.085540s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088039s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112171611576136' LIMIT 1 [ RunTime:0.086531s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085888s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order` (`order_sn` , `user_id` , `order_status` , `create_time`) VALUES ('202112171611576136' , 1 , 0 , 1639728718) [ RunTime:0.089104s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086601s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `goods_img` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (1 , 'M' , '寄卖A' , '100' , '/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png' , '耐克' , '全新' , '大衣' , '淘宝' , 1639728718) [ RunTime:0.084157s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `goods_img` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (1 , 'M' , '寄卖A' , '100' , '/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png' , '耐克' , '全新' , '大衣' , '淘宝' , 1639728718) [ RunTime:0.083756s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `goods_img` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (1 , 'M' , '寄卖A' , '100' , '/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png' , '耐克' , '全新' , '大衣' , '淘宝' , 1639728718) [ RunTime:0.084007s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088113s ] +[ sql ] [ SQL ] INSERT INTO `mall_image` (`type` , `union_id` , `thumb_image` , `ori_image` , `create_time`) VALUES ( 2,1,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,1,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,1,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,1,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,1,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,1,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,2,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,2,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,2,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,2,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,2,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,2,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,3,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,3,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,3,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,3,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,3,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) , ( 2,3,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728718 ) [ RunTime:0.083968s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087040s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '寄卖下单成功' , '24小时内平台估价' , 1639728718) [ RunTime:0.084208s ] +--------------------------------------------------------------- + +[2021-12-17T16:12:04+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:1.128366s] [吞吐率:0.89req/s] [内存消耗:4,821.84kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131443s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087120s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.143697s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087746s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.088545s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088275s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.082903s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084568s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087410s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082737s ] +--------------------------------------------------------------- + +[2021-12-17T16:12:09+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.787173s] [吞吐率:0.56req/s] [内存消耗:5,150.68kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132056s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089284s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086270s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088932s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.085350s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.163324s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089266s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087415s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084611s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088386s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.089875s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087799s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.087994s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088314s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084485s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086668s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086129s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085267s ] +--------------------------------------------------------------- + +[2021-12-17T16:12:17+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:1.477634s] [吞吐率:0.68req/s] [内存消耗:4,625.58kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'evaluation_price' => '100', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124681s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091617s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082240s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083789s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.081294s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.082204s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '寄卖订单审核同意' , 'POST' , 'admin/consignment_order/agree.html' , '127.0.0.1' , 1639728736) [ RunTime:0.082218s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.083544s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('2dca4bd8unpT4mJEQtHX8RirbrOc/LC8ZRb+isW06NdrjxIqDifUYscYyDrZvrev6REO/M7SRQaUpvDnra1SjTKWbQ' , 214) [ RunTime:0.080587s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080373s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083915s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '100' , `refund_status` = 1 WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.078882s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084322s ] +--------------------------------------------------------------- + +[2021-12-17T16:12:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.671017s] [吞吐率:0.60req/s] [内存消耗:4,971.98kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129704s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086974s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085186s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086214s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.083877s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086887s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085129s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087364s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.088150s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087524s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087357s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086434s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.084488s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085514s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085653s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084735s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083894s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087239s ] +--------------------------------------------------------------- + +[2021-12-17T16:12:25+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:1.506109s] [吞吐率:0.66req/s] [内存消耗:4,625.58kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', + 'evaluation_price' => '100', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130890s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085663s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088307s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085041s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.084033s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.084471s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '寄卖订单审核同意' , 'POST' , 'admin/consignment_order/agree.html' , '127.0.0.1' , 1639728744) [ RunTime:0.086082s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.084328s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('f067bbe9pKHFC+xj5CJzDpFQsYEtfyPcdrwJYssnU4syIygznN/nVjyrHcyEKOnBXcTV3pXQBDJcGETi6FPQk0/pnw' , 215) [ RunTime:0.081901s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084675s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086800s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '100' , `refund_status` = 1 WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082282s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082002s ] +--------------------------------------------------------------- + +[2021-12-17T16:12:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=1 +[运行时间:1.637092s] [吞吐率:0.61req/s] [内存消耗:4,971.98kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131092s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084657s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082594s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095385s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.083603s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085660s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081783s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084326s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083901s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083836s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085688s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087090s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.082347s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084076s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082386s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084004s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086657s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.079698s ] +--------------------------------------------------------------- + +[2021-12-17T16:12:35+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:2.772647s] [吞吐率:0.36req/s] [内存消耗:4,791.08kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', + 'evaluation_price' => '100', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131006s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087626s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092238s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088129s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.085980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.088568s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '寄卖订单审核同意' , 'POST' , 'admin/consignment_order/agree.html' , '127.0.0.1' , 1639728752) [ RunTime:0.086051s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.087585s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('3a1af15cni79Lvv8z6t4DvPTEBaL5IE+ImGyEIVHCCTmzw1PUh038k6QN+jRkl894QkOtr4bNChUDPBQy1yumSl+ww' , 216) [ RunTime:0.087473s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087824s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.092139s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '100' , `refund_status` = 1 WHERE ( `id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085060s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085290s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088993s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085788s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 3 , `total_amount` = 100 , `update_time` = 1639728754 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.085366s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087764s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台已估价' , '' , 1639728754) [ RunTime:0.084582s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.087880s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.085474s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.084201s ] +[ sql ] [ SQL ] SELECT `goods_name` FROM `consignment_order_goods` WHERE `order_id` = 1 LIMIT 1 [ RunTime:0.083991s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088431s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.086337s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.089048s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已估计' , '测试001您好!您的订单202112171611576136已于2021-12-17 16:11已完成,请前往确认估价。' , 102 , 2 , 1 , '' , 1639728754) [ RunTime:0.090693s ] +--------------------------------------------------------------- + +[2021-12-17T16:12:37+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.125286s] [吞吐率:0.89req/s] [内存消耗:4,854.13kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128426s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083477s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081261s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085831s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.086586s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083390s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081145s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080765s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083814s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084679s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087019s ] +--------------------------------------------------------------- + +[2021-12-17T16:12:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.008268s] [吞吐率:0.99req/s] [内存消耗:4,854.13kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126463s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084520s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079982s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082954s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.079853s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083369s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080100s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080376s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082559s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082272s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080401s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/shelves.html?id=1 +[运行时间:1.715588s] [吞吐率:0.58req/s] [内存消耗:5,119.41kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/shelves.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129292s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087769s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084851s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088318s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelves' LIMIT 1 [ RunTime:0.083042s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086805s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082332s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084060s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083883s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.093523s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082740s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084968s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.083171s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085707s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084093s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082832s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087904s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.088425s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:17+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/shelveshandle.html +[运行时间:2.289490s] [吞吐率:0.44req/s] [内存消耗:4,638.02kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '15', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', + 'goods_sn' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127734s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084666s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082945s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085210s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelveshandle' LIMIT 1 [ RunTime:0.083289s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084346s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081595s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084800s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `code` = '1' ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083212s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `goods_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081768s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `goods_id` = 1 , `refund_status` = 4 WHERE ( `id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082074s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084031s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083669s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082459s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084073s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台上架商品' , '商品名称:寄卖A' , 1639728796) [ RunTime:0.081677s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.086362s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 105 LIMIT 1 [ RunTime:0.081735s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.082119s ] +[ sql ] [ SQL ] SELECT `goods_name` FROM `consignment_order_goods` WHERE `order_id` = 1 LIMIT 1 [ RunTime:0.082388s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084975s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.083201s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.086333s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单商品上架' , '测试001您好!您的商品寄卖A已于2021-12-17 16:11已安排上架,请前往查看。' , 105 , 2 , 1 , '' , 1639728796) [ RunTime:0.086005s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:20+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/shelves.html?id=1 +[运行时间:1.743012s] [吞吐率:0.57req/s] [内存消耗:4,956.30kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/shelves.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135658s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090693s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087235s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093430s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelves' LIMIT 1 [ RunTime:0.087386s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089427s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085711s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090189s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086002s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090014s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.091579s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.091279s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.086371s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089395s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086501s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087296s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087922s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086719s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:25+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/shelveshandle.html +[运行时间:2.319723s] [吞吐率:0.43req/s] [内存消耗:4,638.02kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '15', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', + 'goods_sn' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133650s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087958s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085213s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087497s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelveshandle' LIMIT 1 [ RunTime:0.084400s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086468s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083008s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084867s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `code` = '2' ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084228s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `goods_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084100s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `goods_id` = 2 , `refund_status` = 4 WHERE ( `id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084744s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087800s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085270s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083549s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085030s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台上架商品' , '商品名称:寄卖A' , 1639728804) [ RunTime:0.085148s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.085119s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 105 LIMIT 1 [ RunTime:0.082985s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.082513s ] +[ sql ] [ SQL ] SELECT `goods_name` FROM `consignment_order_goods` WHERE `order_id` = 1 LIMIT 1 [ RunTime:0.083623s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086423s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.082664s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.084446s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单商品上架' , '测试001您好!您的商品寄卖A已于2021-12-17 16:11已安排上架,请前往查看。' , 105 , 2 , 1 , '' , 1639728805) [ RunTime:0.088437s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:28+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/shelves.html?id=1 +[运行时间:1.709545s] [吞吐率:0.58req/s] [内存消耗:4,958.53kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/shelves.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135572s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089688s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089681s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089481s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelves' LIMIT 1 [ RunTime:0.086409s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.096204s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086001s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088373s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084755s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087595s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.090294s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.098568s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.087809s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086514s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086235s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085275s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086649s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087439s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/user/index.html?_pjax=%23pjax-container +[运行时间:2.823032s] [吞吐率:0.35req/s] [内存消耗:4,812.79kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/user/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129350s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085860s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085900s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086705s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/user/index' LIMIT 1 [ RunTime:0.083765s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085964s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `user`.`delete_time` = 0 [ RunTime:0.091628s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `user`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.083912s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082984s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 7 OR `second_leader` = 7 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.165533s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085181s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 7 ) AND `order`.`delete_time` = 0 [ RunTime:0.086823s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088374s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 6 OR `second_leader` = 6 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.084241s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 6 ) AND `order`.`delete_time` = 0 [ RunTime:0.083172s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 4 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085279s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 5 OR `second_leader` = 5 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.090375s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 5 ) AND `order`.`delete_time` = 0 [ RunTime:0.087406s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 3 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087468s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 4 OR `second_leader` = 4 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.095001s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 4 ) AND `order`.`delete_time` = 0 [ RunTime:0.086500s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 2 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089415s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 3 OR `second_leader` = 3 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.090043s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 3 ) AND `order`.`delete_time` = 0 [ RunTime:0.084120s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085625s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 2 OR `second_leader` = 2 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.089238s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 2 ) AND `order`.`delete_time` = 0 [ RunTime:0.085372s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile` FROM `user` WHERE ( `id` = 0 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083985s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE ( ( `first_leader` = 1 OR `second_leader` = 1 ) ) AND `user`.`delete_time` = 0 [ RunTime:0.094200s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE ( `user_id` = 1 ) AND `order`.`delete_time` = 0 [ RunTime:0.084313s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:39+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.572774s] [吞吐率:0.64req/s] [内存消耗:4,778.99kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/user/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132527s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087999s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085642s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087392s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.084733s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085632s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.086111s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.083869s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.085328s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.082759s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:41+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/add.html?_pjax=%23pjax-container +[运行时间:1.214003s] [吞吐率:0.82req/s] [内存消耗:4,784.69kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'goods_category_list', + 1 => 'brand_list', + 2 => 'imgurl_list', + 3 => 'number', + 4 => 'collocation_goods', + 5 => 'size_list', + 6 => 'goods_list', + 7 => 'debug', + 8 => 'cookie_prefix', + 9 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123096s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085310s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079811s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082860s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/add' LIMIT 1 [ RunTime:0.080390s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083049s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.082907s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.082429s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.084033s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.085189s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.087957s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084259s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.082571s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:0.966433s] [吞吐率:1.03req/s] [内存消耗:4,778.99kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126318s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085033s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083621s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084952s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.085027s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084679s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.086961s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.084941s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.090961s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.084187s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:48+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/1.html?_pjax=%23pjax-container +[运行时间:1.675159s] [吞吐率:0.60req/s] [内存消耗:4,799.34kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131247s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089370s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086736s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088050s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.084769s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087016s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085659s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089553s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085168s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.086903s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 1 [ RunTime:0.086470s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086974s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.085487s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.085793s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.086436s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.088920s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.090520s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.086223s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:58+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/edit/id/1.html +[运行时间:2.701411s] [吞吐率:0.37req/s] [内存消耗:4,699.52kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3178', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryWYFYjbnzZ78SfVhn', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/1.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '测试B', + 'code' => '1', + 'goods_category_id' => '2', + 'brand_id' => '1', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79.png', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79_370_478.png', + ), + 'ori_fm_img' => '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79.png', + 'thumb_img_f' => '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79_370_478.png', + 'original_price' => '0.00', + 'price' => '3299.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + 2 => + array ( + 0 => '3', + ), + 3 => + array ( + 0 => '4', + ), + 4 => + array ( + 0 => '5', + ), + ), + 'detail' => '

                            小米电视,性价比之王

                            ', + 'model' => '11', + 'goods_size' => '', + 'goods_ids' => + array ( + 1 => + array ( + 0 => '', + ), + ), + '__token__' => '9804afff5ae30a8f86b055db1dbeb44d', + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134201s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088679s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085445s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090503s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.085757s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.087772s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '修改产品' , 'POST' , 'admin/goods/edit/id/1.html' , '127.0.0.1' , 1639728836) [ RunTime:0.085838s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.087904s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('f3b6a7bafN8i9SZ0pDKhnn1gz8+tjrDUf+VWB77vwg+BwHaPK/+r7swJI7J1nvJ1KR+y4zh7+s/HuLoXgbOs2vhsH92GKOnZLvvVKjL8SX1Nc3gXJkWAoGVnYsvnoocXTw/f8shpnCKavyO5SHzVw7zJm/52uEgHsQS3hewSvHL+p920Zthq0nT6bXsjIyGAywBaRRLhDkSgY6t7arvLvAsv4Rzr1IlLGp1lMakqrPLSheQz8ZDbswbojYAN6Yoeoe5KJJwZxYmLZx7ChPKf+22PqZ2eDIoBLqFHGmc49g9qknm6oNMsafKZJBZdhg4dISTy51Cdj/4PZLXOLmTr3kx/hOS4sBj7c8+8ZV3lJ+kltqr1tafGagW8KRRcvda2j/TJmkr9yMWtDnb0xZWZAUtTIjBUAYjITPttS4MyHMSXqCG3RFU7G7cQP6WH3q6zPYK755MSbBGj0TwRQPHNFgsAdyZHFVkV9PKiA7NxNYiMuscDwnEvorL7vtVtS2wsDQ1XBntJ1ic2WoYGiTsdMKjt38EETrKrP8OXVD0iH8Ptkwrs+IDjR0vOoqfL2mCIg0ZfcQSeeoDXx94bN39eJpHqFpyyVqk2YxP4DhgHkSAT1RmqOS7RnEI59B3sVKMxrJrj29t1VtkkjqpHciFG+XOTHp2jrYKMFuWAHV8nNZGcQQWOOQ5VBP/P2laxU6sf4TxI6m3qQk1TB/glfL4W3poyTkXO++KYWHQLvLHCaFXAkjPPLyc4MMzU/c11bQAkjcfAdU7XUCp+1NHeks6FSBr+PbZoGpDC44R6bgmYEb9qu3rB2X/i/xiZFsxuczhVWYaQ/+qmhJczaqwmu6q9fzjcmCS5MuPcpyfjD0rLDSe8olgetQ5e2cmMIVfKbjstE1hyfrvNAy5+hxB9iWr9j0cUYarcaeIlbcnJGvDjk/Mk0vBJPaP1qPsNRbnK9Aef4mufC518XUoPPS8yKaaGQpXu1KvA7Fz6UUdab6LT7YEa9miS7tKOQMjnVIapTY42zFZXBtX6NrTM9BPVkBbM1tKZHjAampMelb07a1MKscgBWiVg96FCluMO' , 217) [ RunTime:0.085692s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086408s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084867s ] +[ sql ] [ SQL ] UPDATE `goods` SET `name` = '测试B' , `update_time` = 1639728837 WHERE ( `id` = 1 ) AND `goods`.`delete_time` = 0 [ RunTime:0.087356s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088690s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 1 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086421s ] +[ sql ] [ SQL ] UPDATE `mall_image` SET `is_cover` = 1 WHERE ( `ori_image` = '/uploads/attachment/20211217/dc41a1076c9ab95dfd2986386feb4d79.png' ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084545s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.086449s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'S' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.086418s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 1 WHERE `spec_value` = 'S' AND `goods_id` = 1 [ RunTime:0.085517s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.085418s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 2 WHERE `spec_value` = 'M' AND `goods_id` = 1 [ RunTime:0.091979s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'L' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.086081s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 3 WHERE `spec_value` = 'L' AND `goods_id` = 1 [ RunTime:0.086688s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XL' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.083329s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 4 WHERE `spec_value` = 'XL' AND `goods_id` = 1 [ RunTime:0.083366s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XXL' AND `goods_id` = 1 LIMIT 1 [ RunTime:0.083503s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = 5 WHERE `spec_value` = 'XXL' AND `goods_id` = 1 [ RunTime:0.094251s ] +--------------------------------------------------------------- + +[2021-12-17T16:13:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.015292s] [吞吐率:0.98req/s] [内存消耗:4,778.93kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130842s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088343s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086023s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.092798s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.090643s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.089494s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.088074s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.085971s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.090189s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.088720s ] +--------------------------------------------------------------- + +[2021-12-17T16:14:02+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/add.html?_pjax=%23pjax-container +[运行时间:1.236982s] [吞吐率:0.81req/s] [内存消耗:4,784.63kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'goods_category_list', + 1 => 'brand_list', + 2 => 'imgurl_list', + 3 => 'number', + 4 => 'collocation_goods', + 5 => 'size_list', + 6 => 'goods_list', + 7 => 'debug', + 8 => 'cookie_prefix', + 9 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130612s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087744s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083752s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086002s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/add' LIMIT 1 [ RunTime:0.085940s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085536s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.089748s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.083948s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.084640s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.088482s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.086290s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.089367s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.084034s ] +--------------------------------------------------------------- + +[2021-12-17T16:14:19+08:00] 127.0.0.1 POST www.dggjimai.com/admin/file/icon.html +[运行时间:1.266880s] [吞吐率:0.79req/s] [内存消耗:4,456.16kb] [文件加载:175] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '243354', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryceUxC9BvbhGWmqs4', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'type' => '1', + 'width' => '370', + 'heigh' => '478', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130338s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086501s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/file/icon' LIMIT 1 [ RunTime:0.083635s ] +--------------------------------------------------------------- + +[2021-12-17T16:14:29+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/add.html +[运行时间:1.169672s] [吞吐率:0.85req/s] [内存消耗:4,551.75kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3138', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarySPSBiRSlOVdwkAbw', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '测试C', + 'code' => '3', + 'goods_category_id' => '2', + 'brand_id' => '2', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png', + ), + 'ori_fm_img' => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png', + 'thumb_img_f' => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png', + 'original_price' => '1.00', + 'price' => '100.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '0', + ), + 1 => + array ( + 0 => '0', + ), + 2 => + array ( + 0 => '0', + ), + 3 => + array ( + 0 => '0', + ), + 4 => + array ( + 0 => '0', + ), + ), + 'detail' => '', + 'model' => '', + 'goods_size' => '', + 'goods_ids' => + array ( + 1 => + array ( + 0 => '', + ), + ), + '__token__' => 'f4e1b72e35c896b55d2b21401ec41fdd', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.139289s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.096841s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090473s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093340s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/add' LIMIT 1 [ RunTime:0.097931s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.092162s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '添加产品' , 'POST' , 'admin/goods/add.html' , '127.0.0.1' , 1639728868) [ RunTime:0.090813s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.094064s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('70b65d15mlwdNoLa7kvULtTqbbc9ju6yKjSu4sG96WXM3YsJe6RrnGsotSs0GRyf89ts3pmzVYqmMiB5MV4jVgTv7wfrXCzsmK13wqXCF1Ax2hp2Xe9jVfHH948/VF8zyCPftWT6aP7/fuvr/TExDGNDOWAzf+8+whfIi6lT4xfdQU/SD2Z7CqtwcQ1h0iflTgp2Gsrujrtw3g6KEtvtJA7SzpRaEBXAWxvEQ1zGbFU/iudG0OVv3+Az61eIXFt6aI0xPlCiLcs+Q0786ocb8RNHlECf7qvDVVKqprfgdGJSl2AIuFeeDD1rSyud0vvFyX7aIBZKoQpgSnmtEeJO0slkJRdmXQoqxaKEki9lKjh14if8sMpBA/gDZXIvhJjNrg4dH9gujz+TqOG+oSqjvfpccYn+H2+1AZOPrSoeY/muvwT/DzlXVzFGFCcXpaWlk0pCQrhiifweTIzfVYLLxPBtrTrJ6KX9AKq/4hcvkKXdYpFkg+aKU9dO0j7XjVF1zhIDg+ZZCSfOWJssZq1ToVcAIs/RBRDMJJNcH/eRmJw3ZaBmd5A5jRGe5aZNb3aicqIRa1ZjdyFbW6BtbZLwVDbOJhyDnCgaM2l1H4PiNkCu6AGOTbVfJAx8in52GWuND9rUqwYHCt9xTXchqGKCdVCWxQLfl06AZpJASSpwRINlxbKLLjbCB8en+9KRev72NccN944zGuk5tdcSOqSXkoBN40EMm580Yo3lTwteF2kMQtE4/Q2RvyXNfFuEeKTNfLSr1+BNPQ9XDmZ2UmZNoF2Jf2sUrzvk6B9xJHWvRPQygrkuWooBFuQXFkcQTZ0NtuTT56AxarOVL9lYEBhlDAPcpctkXyGhT+UaN4A2W5ht5DP2lxSAEsTBFEUeyUJpeaLwUkQPNKExc4EGBmNm2XuSmznpEF3G99ZfddKjDS0cslwSWGvl7nJfXxt3fV54RwDw9TZms9D6SQ' , 218) [ RunTime:0.090238s ] +--------------------------------------------------------------- + +[2021-12-17T16:14:43+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/add.html +[运行时间:1.095978s] [吞吐率:0.91req/s] [内存消耗:4,551.75kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3138', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryjfTNaKQ11Te0Ehn8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '测试C', + 'code' => '3', + 'goods_category_id' => '2', + 'brand_id' => '2', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png', + ), + 'ori_fm_img' => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png', + 'thumb_img_f' => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png', + 'original_price' => '1.00', + 'price' => '100.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + 2 => + array ( + 0 => '3', + ), + 3 => + array ( + 0 => '4', + ), + 4 => + array ( + 0 => '5', + ), + ), + 'detail' => '', + 'model' => '', + 'goods_size' => '', + 'goods_ids' => + array ( + 1 => + array ( + 0 => '', + ), + ), + '__token__' => 'f4e1b72e35c896b55d2b21401ec41fdd', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135701s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092677s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089437s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091748s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/add' LIMIT 1 [ RunTime:0.087402s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.089639s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '添加产品' , 'POST' , 'admin/goods/add.html' , '127.0.0.1' , 1639728882) [ RunTime:0.087875s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.088740s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('576d6850VF/etwwpd/k3Fts5MtTeN46mrgzDgFs/5KvCUAkKBbBnowmDyJdn4cy1MZuclQXTcSG1Q7KGUpBlOhLs6gpGFv9FUOHidF4AYfW0uxvxjIyvOrx4DkQYOt/cIPQkgK2weaAW37nUa07ghJaRaoO6vbC6e+7Ej7y3pINcVRCsD4++MG6v+831tX2pKBjRPjKCAKM2GdiJn9G9lKToxXW1tLuZHSli3HERlwyn++VpmHy3827MfRxoAKqMtnSNvi8QVKjIGLW+jkmvgIe51rkaqXhu/ZuGOWg1HCuVZ5H+AYm6rc+XvZ/yNKXlm6kHPp0UTUdu4FwE2IgyTYeJjvM6IJt7Gu9xB2pOUQLbvM7My0nUU+qaLwiI4GotTmEW7saaMdcXkdNXr8LaPqdUfX1xKlBoQWd+Spp6HaUdMjdgdQmELXneo1TbXIV2VzKihjp9yGtB2WBq7JMSXt/lZsH6yAUcWQ588Veqkz7mhPdbjLhlsghB+0Z3hMshg6Z1fghUI/tdBZx7uXdOJyd7Ovcd9cK9kx/LpgGh34JhvTZkdR32Xcl+McjkeU0591xsXYEDWhnK7yRBnqXVoVdepGALSZ/kV+fXPKtTDdJ/b0D0dIvjdLrn3cI8VIFi1d0ibA78WsvrzyrTXYz9tmO8JQtSnHYtkJqrx7mU6UQtFom+1ntw5TM0t2yi4Bg89SP0QMwgqWEGFA1TQAnyLkjsT7AH5LUE78GjdJJRx5wlJVYZhQkZZcQP8/oN1Utf3QdTBf7rU6S1dh3ZLhqtTkhsWd4il+9/Kj5aGzE2Wxw5yuw1CmUyp5Ntg3tnXoNBKpCGB+/W8EMpj/DBMLH0a9ocD+/Nynxz8Pd50BeKOEnIGuxhd9AW+lRoQOdlaILE3xPBblh2Pr1npZ7tYZOgV3X0G0wlIu/7+/TRxBYMF7JGNsUuW54Ex3I6Ooz9bzE67leMOYBBj4QdPw' , 219) [ RunTime:0.090957s ] +--------------------------------------------------------------- + +[2021-12-17T16:14:55+08:00] 127.0.0.1 POST www.dggjimai.com/admin/goods/add.html +[运行时间:2.556988s] [吞吐率:0.39req/s] [内存消耗:4,574.68kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '3149', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryEAYafEabMw94WUek', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/goods/add.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'name' => '测试C', + 'code' => '3', + 'goods_category_id' => '2', + 'brand_id' => '2', + 'ori_img' => + array ( + 0 => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png', + ), + 'thumb_img' => + array ( + 0 => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png', + ), + 'ori_fm_img' => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png', + 'thumb_img_f' => '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png', + 'original_price' => '1.00', + 'price' => '100.00', + 'status' => '1', + 'sort_number' => '1000', + 'size' => + array ( + 0 => + array ( + 0 => 'S', + ), + 1 => + array ( + 0 => 'M', + ), + 2 => + array ( + 0 => 'L', + ), + 3 => + array ( + 0 => 'XL', + ), + 4 => + array ( + 0 => 'XXL', + ), + ), + 'number' => + array ( + 0 => + array ( + 0 => '1', + ), + 1 => + array ( + 0 => '2', + ), + 2 => + array ( + 0 => '3', + ), + 3 => + array ( + 0 => '4', + ), + 4 => + array ( + 0 => '5', + ), + ), + 'detail' => '1111', + 'model' => '111', + 'goods_size' => '1111', + 'goods_ids' => + array ( + 1 => + array ( + 0 => '', + ), + ), + '__token__' => 'f4e1b72e35c896b55d2b21401ec41fdd', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131347s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089351s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085625s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089395s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/add' LIMIT 1 [ RunTime:0.084301s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.086862s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '添加产品' , 'POST' , 'admin/goods/add.html' , '127.0.0.1' , 1639728893) [ RunTime:0.085554s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.087529s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('07ea87094FrT38at36I/KggZrQ8dWMW0XJZTlnPNwHdRrdkbkhl7XkiDKu+qiyaM8TLMLNwEgQOvGO+07yULvQulu0XyulHAZd7oXYSgXOFZ55uSUBGpvcr7FIuAGWfOiP95AByt8graxiFQzA2dXJDXdtwTNmiS2jgkNQ3k9pEf9rKJFgD4h/QVLRrfFUHEXJtcqoyO1YTZHR/3fLPHVg1hE2pMLE/MzisAbijwLWSEFNwUYaeeeK6Iala6RteDvrFlKvdvbyaCbSwVzHbnf8Mmc0HnbAT4OXeDNHvjypLFTvsHUp4B7Jk4RnOHvdARAfHLvxB+rhq6Za6pmMOmbnJVPld8O4R2fRbLn4zGohiMuMIgmixCtpJI60fIMlIsgI3Cnh9dXfAxgHxYQlxbhde6lHdiAry/2Y8ccY31vEwju9NIZcCJsJamdlPkCAnI3LlGiSw1p7Zr8COR/oL8+B+JkXW22kMkMMfyCaXXpykUr3kD44iJimkCppHqqC5meBljP+7hvtfZwUpNfFtIH2QOm3xyyigp2qJXDoS45jiu2sxeUrEypnQ+gDzLBzHDKxyBDuzjO+wgRK2qwWqunDKxD29g4kZeLya54rsZNQlA4+IyY/vixbzTCayN4bMx3R5X19sgnKvkqdghFh5i37rKdoX1oQnKnYdDxamSWRbXXqPcGQ/xMWk9aM0SdxAoO+SuLG0APh6kWvZzNNofdci54eEXDB9u/anwcaVfQTw0fOncmbP5Bf/hkyLA6XgYjE1HI1w0xy3O1307h64Aavlv+2yAyUxqiUtw4aIWhvDcMnE+OVsQHPUp2o6ZRIX8U91haLvqW02xPbZchILi8PywNamYsCbc5BBe1mzsKlvRMnkzuuVdQRsrr6tPJ0hDeLHwD2Ie6C3RpBV7MZu1JS1qyhuT4lVnGk9EkNtWe5UMQ/6PSCzdWjbPFDzJhqSAtCU+L57RjdcJTP1S8LF0eac6yrx3' , 220) [ RunTime:0.084656s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088200s ] +[ sql ] [ SQL ] INSERT INTO `goods` (`name` , `code` , `goods_category_id` , `brand_id` , `original_price` , `price` , `status` , `sort_number` , `detail` , `model` , `goods_size` , `collocation_goods` , `create_time` , `update_time`) VALUES ('测试C' , '3' , 2 , 2 , '1.00' , '100.00' , 1 , 1000 , '1111' , '111' , '1111' , '[]' , 1639728894 , 1639728894) [ RunTime:0.085313s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.086559s ] +[ sql ] [ SQL ] INSERT INTO `mall_image` (`ori_image` , `thumb_image` , `is_cover` , `type` , `union_id` , `create_time` , `update_time`) VALUES ('/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b.png' , '/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png' , 1 , 1 , 5 , 1639728894 , 1639728894) [ RunTime:0.089812s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087121s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'S' AND `goods_id` = 5 LIMIT 1 [ RunTime:0.085194s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('S' , 5 , 1) [ RunTime:0.084716s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 5 LIMIT 1 [ RunTime:0.090935s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('M' , 5 , 2) [ RunTime:0.082416s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'L' AND `goods_id` = 5 LIMIT 1 [ RunTime:0.089307s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('L' , 5 , 3) [ RunTime:0.090319s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XL' AND `goods_id` = 5 LIMIT 1 [ RunTime:0.084140s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('XL' , 5 , 4) [ RunTime:0.084509s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'XXL' AND `goods_id` = 5 LIMIT 1 [ RunTime:0.087481s ] +[ sql ] [ SQL ] INSERT INTO `goods_item` (`spec_value` , `goods_id` , `stock`) VALUES ('XXL' , 5 , 5) [ RunTime:0.086266s ] +--------------------------------------------------------------- + +[2021-12-17T16:14:56+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:0.997425s] [吞吐率:1.00req/s] [内存消耗:4,781.75kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.130246s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088964s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086623s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087487s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.087169s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086136s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.084955s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.085071s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.083996s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.081756s ] +--------------------------------------------------------------- + +[2021-12-17T16:15:00+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:0.942542s] [吞吐率:1.06req/s] [内存消耗:4,821.82kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.123165s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081083s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080254s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081494s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.078983s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081484s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.079257s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084250s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081235s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083846s ] +--------------------------------------------------------------- + +[2021-12-17T16:15:04+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/shelves.html?id=1 +[运行时间:1.691448s] [吞吐率:0.59req/s] [内存消耗:4,958.45kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/shelves.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134153s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089435s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086300s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088369s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelves' LIMIT 1 [ RunTime:0.085474s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088014s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085605s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087255s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.089103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086586s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085064s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087812s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.084503s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087009s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085690s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084383s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086754s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085476s ] +--------------------------------------------------------------- + +[2021-12-17T16:15:10+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/shelveshandle.html +[运行时间:2.477560s] [吞吐率:0.40req/s] [内存消耗:4,639.45kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '15', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=1', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '3', + 'goods_sn' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131561s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092678s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087497s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087610s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelveshandle' LIMIT 1 [ RunTime:0.084864s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086214s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084153s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.088047s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `code` = '3' ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084334s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `goods_id` = 5 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084216s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `goods_id` = 5 , `refund_status` = 4 WHERE ( `id` = 3 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085950s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 1 AND `refund_status` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084380s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086683s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085243s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 2 , `update_time` = 1639728909 WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.084100s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087331s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (1 , '平台上架商品' , '商品名称:寄卖A' , 1639728909) [ RunTime:0.083122s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.089268s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 105 LIMIT 1 [ RunTime:0.085399s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 1 LIMIT 1 [ RunTime:0.085290s ] +[ sql ] [ SQL ] SELECT `goods_name` FROM `consignment_order_goods` WHERE `order_id` = 1 LIMIT 1 [ RunTime:0.083783s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086661s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.083937s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.086367s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单商品上架' , '测试001您好!您的商品寄卖A已于2021-12-17 16:11已安排上架,请前往查看。' , 105 , 2 , 1 , '' , 1639728910) [ RunTime:0.093991s ] +--------------------------------------------------------------- + +[2021-12-17T16:15:13+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.099301s] [吞吐率:0.91req/s] [内存消耗:4,854.13kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132081s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087887s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085095s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087886s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.084360s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087311s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086622s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.091449s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086651s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088611s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084023s ] +--------------------------------------------------------------- + +[2021-12-17T16:15:19+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=1 +[运行时间:1.745301s] [吞吐率:0.57req/s] [内存消耗:4,980.00kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '1', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.139110s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090021s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087217s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090040s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.086391s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089339s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 1 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086239s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089171s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.092723s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090783s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.089940s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089635s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 1 ORDER BY `id` DESC [ RunTime:0.089755s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089391s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 1 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088745s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 2 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086394s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 3 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087020s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.086687s ] +--------------------------------------------------------------- + +[2021-12-17T16:15:25+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_buy +[运行时间:1.628290s] [吞吐率:0.61req/s] [内存消耗:4,418.79kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_buy', + 'route' => 'api/order/consignment_buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1980', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary9jBsfkAqzZRh1NQv', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'json_value' => '[{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]},{"goods_name":"寄卖A","goods_price":"100","item_value":"M","brand_name":"耐克","phase_name":"全新","class_name":"大衣","channel_name":"淘宝","img":["/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png","/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png"]}]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133285s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089361s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086045s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.086470s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085933s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112171615245253' LIMIT 1 [ RunTime:0.083773s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086352s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order` (`order_sn` , `user_id` , `order_status` , `create_time`) VALUES ('202112171615245253' , 1 , 0 , 1639728924) [ RunTime:0.086226s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088115s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `goods_img` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (2 , 'M' , '寄卖A' , '100' , '/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png' , '耐克' , '全新' , '大衣' , '淘宝' , 1639728924) [ RunTime:0.082894s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `goods_img` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (2 , 'M' , '寄卖A' , '100' , '/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png' , '耐克' , '全新' , '大衣' , '淘宝' , 1639728924) [ RunTime:0.085947s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_goods` (`order_id` , `item_value` , `goods_name` , `goods_price` , `goods_img` , `brand_name` , `phase_name` , `class_name` , `channel_name` , `create_time`) VALUES (2 , 'M' , '寄卖A' , '100' , '/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png' , '耐克' , '全新' , '大衣' , '淘宝' , 1639728924) [ RunTime:0.087639s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085571s ] +[ sql ] [ SQL ] INSERT INTO `mall_image` (`type` , `union_id` , `thumb_image` , `ori_image` , `create_time`) VALUES ( 2,4,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,4,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,4,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,4,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,4,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,4,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,5,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,5,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,5,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,5,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,5,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,5,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,6,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,6,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,6,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,6,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,6,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) , ( 2,6,'/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png','/uploads/attachment/20211216/f88f74e24ae17b5531117197aa2070fb.png',1639728924 ) [ RunTime:0.084183s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085346s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '寄卖下单成功' , '24小时内平台估价' , 1639728924) [ RunTime:0.082291s ] +--------------------------------------------------------------- + +[2021-12-17T16:15:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.753350s] [吞吐率:1.33req/s] [内存消耗:4,352.13kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryL03r3rBazWFUTBAh', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => '2a63b611k+8fB7Cdo9ywSgPZLH1fJ+1GCi7jfknZt7tK', + 'item_value' => 'M', + 'goods_num' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.137772s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092574s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089404s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.091917s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 2 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.088562s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.090974s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 2 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.089542s ] +--------------------------------------------------------------- + +[2021-12-17T16:15:52+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/goods_list +[运行时间:0.775373s] [吞吐率:1.29req/s] [内存消耗:4,374.22kb] [文件加载:168] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'goods_list', + 'route' => 'api/goods/goods_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '608', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryDUEPlrsgQ8JGnXZ7', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', +) +[ info ] [ PARAM ] array ( + 'size' => '', + 'page' => '', + 'keyword' => + array ( + 0 => 'M', + 1 => 'S', + ), + 'sort' => '', + 'order' => 'price', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.139103s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.093588s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.092390s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.095673s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') or( `spec_value` LIKE '%S%' OR `gb`.`name` LIKE '%S%' OR `gc`.`name` LIKE '%S%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ) `_group_count_` [ RunTime:0.091617s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as img,`g`.`name`,`g`.`price`,g.id as goods_id,gb.name as brand_name FROM `goods` `g` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=g.id and is_cover=1 and mi.type=1 INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` INNER JOIN `goods_item` `gi` ON `gi`.`goods_id`=`g`.`id` INNER JOIN `goods_category` `gc` ON `gc`.`id`=`g`.`goods_category_id` WHERE ( `status` = 1 AND `gi`.`stock` > 0 AND ( ( `spec_value` LIKE '%M%' OR `gb`.`name` LIKE '%M%' OR `gc`.`name` LIKE '%M%') or( `spec_value` LIKE '%S%' OR `gb`.`name` LIKE '%S%' OR `gc`.`name` LIKE '%S%') ) ) AND `g`.`delete_time` = 0 GROUP BY `g`.`id` ORDER BY `price` LIMIT 0,12 [ RunTime:0.091139s ] +--------------------------------------------------------------- + +[2021-12-17T16:16:05+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-add +[运行时间:0.807287s] [吞吐率:1.24req/s] [内存消耗:4,322.06kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-add', + 'route' => 'api/cart/add', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '512', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryJswfWXuBOEQ8WyE5', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'goods_id' => 'ab381e47nuG8OIF6xcARkCudq1oiJ6CA9SLFYnVosZE5', + 'item_value' => 'M', + 'goods_num' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129603s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087618s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083136s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.087634s ] +[ sql ] [ SQL ] SELECT * FROM `cart` WHERE `user_id` = 1 AND `goods_id` = 5 AND `item_value` = 'M' LIMIT 1 [ RunTime:0.084839s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.084159s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 5 AND `spec_value` = 'M' LIMIT 1 [ RunTime:0.083480s ] +[ sql ] [ SQL ] INSERT INTO `cart` (`user_id` , `goods_id` , `goods_num` , `item_value` , `create_time`) VALUES (1 , 5 , 1 , 'M' , 1639728965) [ RunTime:0.093423s ] +--------------------------------------------------------------- + +[2021-12-17T16:16:12+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.209133s] [吞吐率:0.83req/s] [内存消耗:4,926.85kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '466', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarykiCB9eByA5vhFe5E', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => 'info', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136706s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090153s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.093118s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.091587s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.088359s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.090801s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.089002s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.090602s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.179219s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.091346s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.091715s ] +--------------------------------------------------------------- + +[2021-12-17T16:16:23+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.692598s] [吞吐率:0.59req/s] [内存消耗:4,481.66kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryu5SJtzmWqbbUudL0', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127291s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085958s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082317s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.084030s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.082208s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.085055s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.082901s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084343s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.163187s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.086207s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.087165s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085726s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081760s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.086300s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112171616237656' LIMIT 1 [ RunTime:0.081589s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112171616237656' , 1 , '测试111111' , 360000 , 360100 , 360102 , '测试地址' , '17761236475' , 100 , 100 , 100 , 1 , '' , 1639728983) [ RunTime:0.083004s ] +--------------------------------------------------------------- + +[2021-12-17T16:16:41+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:1.079099s] [吞吐率:0.93req/s] [内存消耗:4,781.77kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138376s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091374s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090483s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.093272s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.087783s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.092196s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.087555s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.089901s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.091055s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.091809s ] +--------------------------------------------------------------- + +[2021-12-17T16:16:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/5.html?_pjax=%23pjax-container +[运行时间:1.703867s] [吞吐率:0.59req/s] [内存消耗:4,802.03kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '5', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133440s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092590s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087681s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088733s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.089492s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.095904s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 5 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084292s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088501s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 5 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088077s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087926s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 5 [ RunTime:0.085638s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087017s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.086129s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.088037s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.085612s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.088825s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.085243s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.085896s ] +--------------------------------------------------------------- + +[2021-12-17T16:16:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/index.html?_pjax=%23pjax-container +[运行时间:0.969122s] [吞吐率:1.03req/s] [内存消耗:4,781.75kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/5.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127608s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085726s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083910s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086572s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/index' LIMIT 1 [ RunTime:0.083499s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086076s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.083402s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 ORDER BY `id` DESC LIMIT 0,10 [ RunTime:0.089091s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.086372s ] +[ sql ] [ SQL ] SELECT * FROM `goods_category` WHERE ( `id` = 2 ) AND `goods_category`.`delete_time` = 0 [ RunTime:0.084318s ] +--------------------------------------------------------------- + +[2021-12-17T16:16:55+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/5.html?_pjax=%23pjax-container +[运行时间:1.671861s] [吞吐率:0.60req/s] [内存消耗:4,802.03kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', + 'id' => '5', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132445s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087665s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085350s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089077s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.084495s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087744s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 5 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088417s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087195s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 5 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084773s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087705s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 5 [ RunTime:0.084061s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088345s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.084571s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.087556s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.084831s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.088426s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.089849s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.086851s ] +--------------------------------------------------------------- + +[2021-12-17T16:17:05+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.551085s] [吞吐率:0.64req/s] [内存消耗:4,481.66kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryyYswNhc8ZrznmfLU', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.122961s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.081806s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.078869s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.081705s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.078988s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.083014s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.079542s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081681s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.163820s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.081324s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.082808s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081989s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080529s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084081s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112171617051202' LIMIT 1 [ RunTime:0.078562s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112171617051202' , 1 , '测试111111' , 360000 , 360100 , 360102 , '测试地址' , '17761236475' , 100 , 100 , 100 , 1 , '' , 1639729025) [ RunTime:0.078485s ] +--------------------------------------------------------------- + +[2021-12-17T16:38:37+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.899510s] [吞吐率:0.53req/s] [内存消耗:4,481.66kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryTGa296R6KsbTx6cS', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.165011s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088956s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083218s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.084945s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.084602s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.084489s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.083168s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084965s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.204371s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.084690s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.083775s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084726s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081871s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084010s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112171638370597' LIMIT 1 [ RunTime:0.081834s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112171638370597' , 1 , '测试111111' , 360000 , 360100 , 360102 , '测试地址' , '17761236475' , 100 , 100 , 100 , 1 , '' , 1639730317) [ RunTime:0.084716s ] +--------------------------------------------------------------- + +[2021-12-17T16:39:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.708322s] [吞吐率:0.59req/s] [内存消耗:4,482.22kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryJA5nXrEAm1EOHCwi', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126089s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082963s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081341s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.083610s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.079831s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.082108s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.080049s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.081461s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.167653s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.082175s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.083284s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081215s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080754s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082028s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112171639213886' LIMIT 1 [ RunTime:0.080061s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112171639213886' , 1 , '测试111111' , 360000 , 360100 , 360102 , '测试地址' , '17761236475' , 100 , 100 , 100 , 1 , '' , 1639730361) [ RunTime:0.081191s ] +--------------------------------------------------------------- + +[2021-12-17T18:22:02+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:1.966672s] [吞吐率:0.51req/s] [内存消耗:4,485.30kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryoCG0QkgonbDAN1uB', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.166019s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087779s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.079169s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.081537s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.080094s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.081594s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 5 LIMIT 1 [ RunTime:0.079130s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.080963s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.078613s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.082724s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.171322s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.082753s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.082201s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081142s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078690s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.081741s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112171822016233' LIMIT 1 [ RunTime:0.078134s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112171822016233' , 1 , '测试111111' , 360000 , 360100 , 360102 , '测试地址' , '17761236475' , 100 , 100 , 100 , 1 , '' , 1639736521) [ RunTime:0.080325s ] +--------------------------------------------------------------- + +[2021-12-17T18:22:34+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:0.917716s] [吞吐率:1.09req/s] [内存消耗:4,391.59kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarynJgFARkhMMNtZpeN', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.160684s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084760s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081724s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.098561s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.081284s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.085729s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 5 LIMIT 1 [ RunTime:0.083326s ] +--------------------------------------------------------------- + +[2021-12-17T18:22:46+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-buy +[运行时间:2.862362s] [吞吐率:0.35req/s] [内存消耗:4,511.32kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-buy', + 'route' => 'api/order/buy', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryNfBcu3wWbU87Qmw0', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'remark' => '', + 'address_id' => '1', + 'action' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.168809s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091625s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.092446s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.088689s ] +[ sql ] [ SQL ] SELECT mi.thumb_image as goods_img,g.name as goods_name,g.price as goods_price,g.id as goods_id,gb.name as brand_name,`c`.`goods_num`,`item_value`,`g`.`status`,`g`.`stock`,`g`.`original_price` FROM `cart` `c` INNER JOIN `goods` `g` ON `g`.`id`=`c`.`goods_id` INNER JOIN `goods_brand` `gb` ON `gb`.`id`=`g`.`brand_id` LEFT JOIN `mall_image` `mi` ON `mi`.`union_id`=c.goods_id and is_cover=1 and mi.type=1 WHERE `c`.`user_id` = '1' AND `selected` = 1 [ RunTime:0.085072s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087144s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `spec_value` = 'M' AND `goods_id` = 5 LIMIT 1 [ RunTime:0.084171s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user_address` [ RunTime:0.087719s ] +[ sql ] [ SQL ] SELECT `id`,`contact`,`telephone`,`province_id`,`city_id`,`district_id`,`address`,`is_default` FROM `user_address` WHERE `id` = 1 AND `user_id` = 1 LIMIT 1 [ RunTime:0.081294s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.086349s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.171037s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.084026s ] +[ sql ] [ SQL ] SELECT `id`,`name` FROM `dev_region` [ RunTime:0.088056s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.093275s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085365s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085405s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE `order_sn` = '202112171822450016' LIMIT 1 [ RunTime:0.096818s ] +[ sql ] [ SQL ] INSERT INTO `order` (`order_sn` , `user_id` , `consignee` , `province` , `city` , `district` , `address` , `mobile` , `total_goods_price` , `order_amount` , `total_amount` , `total_num` , `user_remark` , `create_time`) VALUES ('202112171822450016' , 1 , '测试111111' , 360000 , 360100 , 360102 , '测试地址' , '17761236475' , 100 , 100 , 100 , 1 , '' , 1639736565) [ RunTime:0.086824s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.100221s ] +[ sql ] [ SQL ] INSERT INTO `order_goods` (`order_id` , `goods_id` , `goods_img` , `item_value` , `brand_name` , `goods_name` , `goods_num` , `goods_price` , `total_price` , `original_price` , `create_time`) VALUES ( 6,5,'/uploads/attachment/20211217/78e276a205bd2abc0b615ff4b40e2f9b_370_478.png','M','Nanushka','测试C',1,'100.00',100,'1.00',1639736565 ) [ RunTime:0.102875s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.138270s ] +[ sql ] [ SQL ] UPDATE `goods` SET `order_num` = order_num+1 , `stock` = stock-1 WHERE `id` = 5 [ RunTime:0.096139s ] +[ sql ] [ SQL ] UPDATE `goods_item` SET `stock` = `stock` - 1 WHERE `goods_id` = 5 AND `spec_value` = 'M' [ RunTime:0.136637s ] +[ sql ] [ SQL ] SELECT `id`,`stock` FROM `goods` WHERE `id` = 5 [ RunTime:0.100294s ] +[ sql ] [ SQL ] UPDATE `goods` SET `status` = 0 WHERE `id` = 5 [ RunTime:0.089759s ] +[ sql ] [ SQL ] DELETE FROM `cart` WHERE `user_id` = 1 AND `selected` = 1 AND `item_value` = 'M' [ RunTime:0.090023s ] +--------------------------------------------------------------- + +[2021-12-17T18:23:06+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.745213s] [吞吐率:1.34req/s] [内存消耗:4,485.74kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryq3EBVhAyHuCwuyHY', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.165436s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086062s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085988s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.119423s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.089141s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 ORDER BY `cog`.`id` DESC LIMIT 0,12 [ RunTime:0.089770s ] +--------------------------------------------------------------- + +[2021-12-17T18:23:26+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.659077s] [吞吐率:1.52req/s] [内存消耗:4,483.15kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBq7BNMzIcsBvBUg2', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.163293s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086670s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085828s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083530s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083736s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 ORDER BY `cog`.`id` DESC LIMIT 0,12 [ RunTime:0.082195s ] +--------------------------------------------------------------- + +[2021-12-17T18:23:33+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.642611s] [吞吐率:1.56req/s] [内存消耗:4,485.74kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryjFAKJHRO2r2Cp8Xd', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130043s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089372s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091950s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088720s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083307s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 ORDER BY `cog`.`id` DESC LIMIT 0,12 [ RunTime:0.082670s ] +--------------------------------------------------------------- + +[2021-12-17T18:26:36+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_sold +[运行时间:0.747545s] [吞吐率:1.34req/s] [内存消耗:4,445.40kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_sold', + 'route' => 'api/order/consignment_sold', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryTygNUBFrdMKylmMI', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126915s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084085s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085541s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086370s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.087685s ] +[ sql ] [ SQL ] SELECT `cog`.`item_value`,`cog`.`goods_name`,`cog`.`goods_img`,`cog`.`goods_price`,`cog`.`brand_name`,`cog`.`phase_name`,`cog`.`class_name`,`cog`.`channel_name` FROM `consignment_order_goods` `cog` INNER JOIN `consignment_order` `co` ON `cog`.`order_id`=co.id and co.order_status=2 INNER JOIN `order_goods` `og` ON `og`.`goods_id`=`cog`.`goods_id` INNER JOIN `order` `o` ON `og`.`order_id`=o.id and o.order_status in (1,2,3) WHERE ( `o`.`user_id` = '1' ) AND `cog`.`delete_time` = 0 ORDER BY `cog`.`id` DESC LIMIT 0,12 [ RunTime:0.081883s ] +--------------------------------------------------------------- + +[2021-12-17T18:30:16+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:1.023961s] [吞吐率:0.98req/s] [内存消耗:4,543.23kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryl6t3v2KzkKKlX7Tc', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128353s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089021s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087597s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084308s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.083577s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.083873s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084505s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084621s ] +--------------------------------------------------------------- + +[2021-12-17T18:31:13+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-consignment_detail +[运行时间:0.207378s] [吞吐率:4.82req/s] [内存消耗:2,268.72kb] [文件加载:134] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => '', + 'route' => + Closure::__set_state(array( + )), + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary04pARyQuv4KHzjAy', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +--------------------------------------------------------------- + +[2021-12-17T18:31:27+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-consignment_detail +[运行时间:0.042561s] [吞吐率:23.50req/s] [内存消耗:2,268.72kb] [文件加载:134] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => '', + 'route' => + Closure::__set_state(array( + )), + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarym2L0mf8R6byrOSHh', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +--------------------------------------------------------------- + +[2021-12-17T18:33:35+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.521891s] [吞吐率:1.92req/s] [内存消耗:4,460.20kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryCzEEjzskisNFJPe1', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123155s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082327s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082721s ] +[ error ] [0]method not exist:app\common\model\Order->consignmentOrderGoods[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Query.php:180] +--------------------------------------------------------------- + +[2021-12-17T18:33:48+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.575517s] [吞吐率:1.74req/s] [内存消耗:4,422.09kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryifq1JCeN9OICO9YY', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129487s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092198s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085480s ] +[ error ] [0]method not exist:app\common\model\ConsignmentOrderGoods->consignmentOrderGoods[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Query.php:180] +--------------------------------------------------------------- + +[2021-12-17T18:33:57+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.531981s] [吞吐率:1.88req/s] [内存消耗:4,519.06kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary2wvciNhHesmXvqBU', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126946s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087294s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083555s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086179s ] +[ error ] [10501]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'o.pay_time' in 'field list'[/Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/library/think/db/Connection.php:687] +--------------------------------------------------------------- + +[2021-12-17T18:34:09+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.734870s] [吞吐率:1.36req/s] [内存消耗:4,538.06kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary4AgAaHfJdb4DbMf3', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128243s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086523s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084709s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085800s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084426s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086077s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083033s ] +--------------------------------------------------------------- + +[2021-12-17T18:35:12+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.769946s] [吞吐率:1.30req/s] [内存消耗:4,538.12kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarylMzqY6bOhZcOYemO', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131196s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087110s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089848s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087233s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085398s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086061s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.086382s ] +--------------------------------------------------------------- + +[2021-12-17T18:35:33+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.740817s] [吞吐率:1.35req/s] [内存消耗:4,539.91kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBWMBRsIyEd8EJsCw', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133340s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082731s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089006s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083646s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081426s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084017s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088017s ] +--------------------------------------------------------------- + +[2021-12-17T18:35:43+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.734893s] [吞吐率:1.36req/s] [内存消耗:4,539.86kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary0S8l7wvPMbd0a5Hp', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127543s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084729s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082381s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.096276s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082430s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084587s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084856s ] +--------------------------------------------------------------- + +[2021-12-17T18:36:19+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:1.124316s] [吞吐率:0.89req/s] [内存消耗:4,729.98kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarye1r74BxKPfmTa26N', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.133748s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092314s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087150s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088582s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086947s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088479s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086381s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088112s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085992s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087666s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.086540s ] +--------------------------------------------------------------- + +[2021-12-17T18:37:11+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:1.108276s] [吞吐率:0.90req/s] [内存消耗:4,730.04kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryiKfnBy7AgHDm9d7i', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129994s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.092687s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084320s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088181s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083897s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085118s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083883s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085391s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082945s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084820s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.095908s ] +--------------------------------------------------------------- + +[2021-12-17T18:37:35+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.909205s] [吞吐率:1.10req/s] [内存消耗:4,558.52kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryanTVH0ogEFGJri0Q', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125733s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084551s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088054s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086661s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081596s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083490s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083407s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081477s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.083087s ] +--------------------------------------------------------------- + +[2021-12-17T18:38:16+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.950044s] [吞吐率:1.05req/s] [内存消耗:4,558.52kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryh5jr45H0sQLPmHYI', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135022s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089384s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087702s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.091129s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089053s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089712s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088202s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089289s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.095282s ] +--------------------------------------------------------------- + +[2021-12-17T18:39:35+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.987627s] [吞吐率:1.01req/s] [内存消耗:4,558.52kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryF8I3sacLToNSL19f', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124183s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086080s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083825s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085295s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082301s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086032s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080006s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086246s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.083723s ] +--------------------------------------------------------------- + +[2021-12-17T18:44:00+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:1.159517s] [吞吐率:0.86req/s] [内存消耗:4,558.52kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarysFkkv5TW7Wx1ReCv', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.219445s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087850s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084368s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086280s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082710s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090907s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083007s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085829s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.083039s ] +--------------------------------------------------------------- + +[2021-12-17T18:48:03+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_cancel +[运行时间:0.757746s] [吞吐率:1.32req/s] [内存消耗:4,418.90kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_cancel', + 'route' => 'api/order/consignment_cancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryooVLKELwPCKkzA73', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128371s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086494s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085956s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085360s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.097164s ] +--------------------------------------------------------------- + +[2021-12-17T18:48:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_cancel +[运行时间:0.581705s] [吞吐率:1.72req/s] [内存消耗:4,399.53kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_cancel', + 'route' => 'api/order/consignment_cancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryHlHq0hlYbvDpMD1H', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134114s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087624s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087175s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088258s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087662s ] +--------------------------------------------------------------- + +[2021-12-17T18:49:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_cancel +[运行时间:0.757964s] [吞吐率:1.32req/s] [内存消耗:4,386.09kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_cancel', + 'route' => 'api/order/consignment_cancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryby3v0AdDZdjBAKE8', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130580s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089384s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089076s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089013s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088663s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `cancel_time` = 1639738161 , `order_status` = 8 WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.087145s ] +--------------------------------------------------------------- + +[2021-12-17T18:49:37+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.875179s] [吞吐率:1.14req/s] [内存消耗:4,564.50kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryyJPNzJAgt1z5VfrV', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128093s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084109s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088199s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086981s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083181s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083656s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080386s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082874s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.082396s ] +--------------------------------------------------------------- + +[2021-12-17T18:51:09+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_cancel +[运行时间:0.765653s] [吞吐率:1.31req/s] [内存消耗:4,422.95kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_cancel', + 'route' => 'api/order/consignment_cancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryEkv2IBwLDWFDtTJD', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.231471s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083997s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088254s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085558s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084050s ] +--------------------------------------------------------------- + +[2021-12-17T18:51:19+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_cancel +[运行时间:0.548708s] [吞吐率:1.82req/s] [内存消耗:4,422.95kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_cancel', + 'route' => 'api/order/consignment_cancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarySnKI3tyuaFymaEY8', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126412s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086054s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083871s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083969s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081514s ] +--------------------------------------------------------------- + +[2021-12-17T18:51:35+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_cancel +[运行时间:0.555880s] [吞吐率:1.80req/s] [内存消耗:4,422.95kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_cancel', + 'route' => 'api/order/consignment_cancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary24DzDSrwIjlgBzYr', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129764s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084884s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083905s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.092961s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085011s ] +--------------------------------------------------------------- + +[2021-12-17T18:52:37+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_cancel +[运行时间:0.916425s] [吞吐率:1.09req/s] [内存消耗:4,406.16kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_cancel', + 'route' => 'api/order/consignment_cancel', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundarywkfkBw9sgp2meNDY', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124651s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082959s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081793s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083377s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082773s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `cancel_time` = 1639738356 , `order_status` = 8 WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.083975s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084394s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '寄卖订单已取消' , '' , 1639738357) [ RunTime:0.080315s ] +--------------------------------------------------------------- + +[2021-12-17T18:52:42+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.900906s] [吞吐率:1.11req/s] [内存消耗:4,568.72kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryBHE7u2W4OarQjGPo', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132113s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091030s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084608s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085434s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084115s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086264s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082105s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.089558s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.086664s ] +--------------------------------------------------------------- + +[2021-12-17T19:01:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderconfirm +[运行时间:0.722908s] [吞吐率:1.38req/s] [内存消耗:4,499.09kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderconfirm', + 'route' => 'api/user/orderconfirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryVmG023zfyZwzjPfd', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126126s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083933s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087243s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087312s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080347s ] +--------------------------------------------------------------- + +[2021-12-17T19:01:58+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderconfirm +[运行时间:2.380286s] [吞吐率:0.42req/s] [内存消耗:4,473.03kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderconfirm', + 'route' => 'api/user/orderconfirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryF6Z5ETM1PesHn6Bx', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'e54676d1v+EHlqIdVxXejPe/ZtmXSDx4G8nqZ00+ucEC', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130772s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086840s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089008s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085959s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093031s ] +--------------------------------------------------------------- + +[2021-12-17T19:02:10+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.677601s] [吞吐率:1.48req/s] [内存消耗:4,633.71kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '460', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryVBtsJzMqcddWlMzj', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132952s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090863s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086952s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.089348s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.087053s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.087306s ] +--------------------------------------------------------------- + +[2021-12-17T19:02:24+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-order +[运行时间:0.801745s] [吞吐率:1.25req/s] [内存消耗:4,644.31kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-order', + 'route' => 'api/user/order', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '462', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryisS7BkXGcICmQexy', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'order_status' => '1,2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.123040s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082936s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080924s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.082546s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','2') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.080784s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `order` `o` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','2') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.080469s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.083141s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 6 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.078377s ] +--------------------------------------------------------------- + +[2021-12-17T19:02:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderconfirm +[运行时间:0.710337s] [吞吐率:1.41req/s] [内存消耗:4,477.15kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderconfirm', + 'route' => 'api/user/orderconfirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryaUhT3k0D6YRqpuOH', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'f4f02477/dMJN4FHwDABljkh5aTzY9E49so23llE3yUx', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130317s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086627s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086335s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.087323s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 6 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085706s ] +--------------------------------------------------------------- + +[2021-12-17T19:02:48+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/u-orderconfirm +[运行时间:0.779367s] [吞吐率:1.28req/s] [内存消耗:4,465.69kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'u-orderconfirm', + 'route' => 'api/user/orderconfirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryW1rwpub7iShKEgBI', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'f4f02477/dMJN4FHwDABljkh5aTzY9E49so23llE3yUx', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136234s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088124s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085775s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088765s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 6 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085357s ] +[ sql ] [ SQL ] UPDATE `order` SET `confirm_take_time` = 1639738968 , `order_status` = 3 WHERE ( `id` = 6 ) AND `order`.`delete_time` = 0 [ RunTime:0.086641s ] +--------------------------------------------------------------- + +[2021-12-17T19:05:45+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:1.057474s] [吞吐率:0.95req/s] [内存消耗:4,576.12kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryGKSEMkz8ReLiOJQy', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132097s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085395s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088015s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083976s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083552s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081968s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079934s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081810s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.080253s ] +--------------------------------------------------------------- + +[2021-12-17T19:20:29+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.538333s] [吞吐率:1.86req/s] [内存消耗:4,485.10kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryqj4LEgPQyYKEki0O', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', + 'goods_id' => '[\'f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf\',\'02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic\',\'d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29\']', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136751s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090482s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087143s ] +[ error ] [2]Invalid argument supplied for foreach()[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/OrderController.php:346] +--------------------------------------------------------------- + +[2021-12-17T19:21:30+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.579750s] [吞吐率:1.72req/s] [内存消耗:4,485.00kb] [文件加载:186] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryuLLyY3YkX9l9BPX9', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', + 'goods_id' => '[\'f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf\',\'02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic\',\'d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29\']', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.138872s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.094735s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088978s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.087505s ] +[ error ] [2]count(): Parameter must be an array or an object that implements Countable[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/api/controller/OrderController.php:347] +--------------------------------------------------------------- + +[2021-12-17T19:21:55+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.435941s] [吞吐率:2.29req/s] [内存消耗:4,416.07kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryXaHm9Xqu8bWjAPhN', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', + 'goods_id' => '[\'f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf\',\'02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic\',\'d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29\']', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136234s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.090220s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089095s ] +--------------------------------------------------------------- + +[2021-12-17T19:23:32+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.431976s] [吞吐率:2.31req/s] [内存消耗:4,426.87kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryNyxAdM7JeN9DzHOY', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', + 'goods_id' => '[\'f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf\',\'02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic\',\'d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29\']', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.174015s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.094996s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088556s ] +--------------------------------------------------------------- + +[2021-12-17T19:23:59+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.374402s] [吞吐率:2.67req/s] [内存消耗:4,426.87kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryy1yrzt51WnrBOPZ9', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129824s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086845s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085401s ] +--------------------------------------------------------------- + +[2021-12-17T19:24:09+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.423815s] [吞吐率:2.36req/s] [内存消耗:4,416.67kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryIajYrqeAPoheTmYf', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.170585s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086917s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087353s ] +--------------------------------------------------------------- + +[2021-12-17T19:24:19+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.786168s] [吞吐率:1.27req/s] [内存消耗:4,503.05kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAVHck1GfvAoFExXm', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.173357s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089182s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089233s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.090602s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.089294s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088969s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089478s ] +--------------------------------------------------------------- + +[2021-12-17T19:24:39+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.847647s] [吞吐率:1.18req/s] [内存消耗:4,477.54kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryOl33f0j3uHSvZiuE', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131817s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087662s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083147s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.085741s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.082645s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.084791s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082850s ] +--------------------------------------------------------------- + +[2021-12-17T19:24:54+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.718253s] [吞吐率:1.39req/s] [内存消耗:4,557.84kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryB8omq2DDFLXXg5QZ', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.169899s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086766s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091038s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.098229s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.091824s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` = '0' ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.083980s ] +--------------------------------------------------------------- + +[2021-12-17T19:25:04+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:0.659477s] [吞吐率:1.52req/s] [内存消耗:4,560.38kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary52nOviuCz3pPCRd1', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.163967s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083946s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082463s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086701s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','3','4','5','6') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.082239s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','3','4','5','6') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.084284s ] +--------------------------------------------------------------- + +[2021-12-17T19:25:34+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_list +[运行时间:1.021726s] [吞吐率:0.98req/s] [内存消耗:4,566.85kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_list', + 'route' => 'api/order/consignment_list', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '454', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryX7RxsNQpDncKSKNA', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'size' => '', + 'page' => '', + 'status' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.131072s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088243s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084605s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086617s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','3','4','5','6') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC ) `_group_count_` [ RunTime:0.084470s ] +[ sql ] [ SQL ] SELECT `o`.`order_sn`,`o`.`order_status`,`o`.`id` FROM `consignment_order` `o` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE ( `o`.`user_id` = '1' AND `o`.`order_status` IN ('1','3','4','5','6') ) AND `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC LIMIT 0,12 [ RunTime:0.084201s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.093093s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083994s ] +--------------------------------------------------------------- + +[2021-12-17T19:25:47+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.782813s] [吞吐率:1.28req/s] [内存消耗:4,477.54kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryNKBSflyJo8btIzWh', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.140311s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.095177s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.092182s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.092007s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.092116s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.093237s ] +[ sql ] [ SQL ] SELECT * FROM `order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090288s ] +--------------------------------------------------------------- + +[2021-12-17T19:26:10+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.842588s] [吞吐率:1.19req/s] [内存消耗:4,427.41kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryHmQBJI5ByUeqnHej', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132522s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088930s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.088862s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.089116s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.084335s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084662s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084362s ] +--------------------------------------------------------------- + +[2021-12-17T19:26:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.977887s] [吞吐率:1.02req/s] [内存消耗:4,459.13kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryz9wLYfBlEmHcqE0R', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125440s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.084981s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083214s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.091362s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.083214s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085024s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083508s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `update_time` = 1639740381 , `order_status` = 4 WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.083876s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085981s ] +--------------------------------------------------------------- + +[2021-12-17T19:26:41+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:1.053900s] [吞吐率:0.95req/s] [内存消耗:4,459.48kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryVoZI3sAiXq2r1AEc', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.122787s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082757s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080720s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.079655s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.079870s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081345s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079046s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `update_time` = 1639740401 , `order_status` = 4 WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.078305s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080397s ] +--------------------------------------------------------------- + +[2021-12-17T19:27:11+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:1.091165s] [吞吐率:0.92req/s] [内存消耗:4,425.54kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '554', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryo0DD1g5ZHz3yWgHN', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135431s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088365s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084821s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.087227s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.086605s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086887s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085754s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `update_time` = 1639740430 , `order_status` = 4 WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.085138s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085221s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `is_confirm` = 1 WHERE ( `id` IN (4,5,6) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084882s ] +--------------------------------------------------------------- + +[2021-12-17T20:04:27+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.560439s] [吞吐率:1.78req/s] [内存消耗:4,447.59kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1226', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryr8ZbMi6uzSsFWyPI', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '1', + 'consignee' => '', + 'address' => '', + 'mobile' => '', + 'th_consignee' => '', + 'th_address' => '', + 'th_mobile' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.139397s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.091608s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.089150s ] +--------------------------------------------------------------- + +[2021-12-17T20:04:44+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.637513s] [吞吐率:1.57req/s] [内存消耗:4,447.72kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1255', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryauF2h4EQOMHkzt7G', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '1', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '', + 'th_address' => '', + 'th_mobile' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.125997s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086882s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082096s ] +--------------------------------------------------------------- + +[2021-12-17T20:04:52+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:1.105543s] [吞吐率:0.90req/s] [内存消耗:4,431.25kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1255', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryYbqI5r386xVgAhEk', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '0', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '', + 'th_address' => '', + 'th_mobile' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132345s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088057s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087606s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.087315s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.085393s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089361s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090324s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `update_time` = 1639742691 , `order_status` = 4 , `is_return` = 0 , `consignee` = '测试' , `address` = '测试地址' , `mobile` = '17761236475' , `th_consignee` = '' , `th_address` = '' , `th_mobile` = '' WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.084456s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.092508s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `is_confirm` = 1 WHERE ( `id` IN (4,5,6) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085174s ] +--------------------------------------------------------------- + +[2021-12-17T20:05:04+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.732184s] [吞吐率:1.37req/s] [内存消耗:4,455.78kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1255', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryCkLD0orZYpjpxLSN', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '0', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '', + 'th_address' => '', + 'th_mobile' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129911s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086792s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084679s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.088157s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.084237s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088739s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082067s ] +--------------------------------------------------------------- + +[2021-12-17T20:05:17+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.391641s] [吞吐率:2.55req/s] [内存消耗:4,447.72kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1255', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryAxYBozcsvURUHpqa', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '1', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '', + 'th_address' => '', + 'th_mobile' => '', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127783s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.081451s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081769s ] +--------------------------------------------------------------- + +[2021-12-17T20:05:36+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:1.246337s] [吞吐率:0.80req/s] [内存消耗:4,431.50kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1296', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary5ZFmUEIH0ul20BqD', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '1', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '退回测试', + 'th_address' => '退回地址测试', + 'th_mobile' => '17761236475', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.132191s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.089724s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.086887s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.089554s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.091346s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089681s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084837s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `update_time` = 1639742736 , `order_status` = 4 , `is_return` = 1 , `consignee` = '测试' , `address` = '测试地址' , `mobile` = '17761236475' , `th_consignee` = '退回测试' , `th_address` = '退回地址测试' , `th_mobile` = '17761236475' WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.089529s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086420s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `is_confirm` = 1 WHERE ( `id` IN (4,5,6) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083458s ] +--------------------------------------------------------------- + +[2021-12-17T20:05:52+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.718759s] [吞吐率:1.39req/s] [内存消耗:4,455.94kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1296', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryRxum7GhA3JqUEism', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '0', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '退回测试', + 'th_address' => '退回地址测试', + 'th_mobile' => '17761236475', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.134637s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085379s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083461s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.083803s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.081437s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083744s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084210s ] +--------------------------------------------------------------- + +[2021-12-17T20:09:22+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.874817s] [吞吐率:1.14req/s] [内存消耗:4,458.26kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1419', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary7l9Hv40mAkXpFL7f', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '0', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '退回测试', + 'th_address' => '退回地址测试', + 'th_mobile' => '17761236475', + 'takeparts_time' => '2021-10-11 15:00-16:22', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.126381s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.088328s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084244s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.082794s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.088933s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089602s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080295s ] +--------------------------------------------------------------- + +[2021-12-17T20:09:31+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:1.097033s] [吞吐率:0.91req/s] [内存消耗:4,433.56kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1419', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary6Eg7oFaGqsBfRjAn', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '0', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '退回测试', + 'th_address' => '退回地址测试', + 'th_mobile' => '17761236475', + 'takeparts_time' => '2021-10-11 15:00-16:22', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.139646s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.087717s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.085154s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.085428s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.084415s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088265s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082061s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `update_time` = 1639742970 , `order_status` = 4 , `is_return` = 0 , `consignee` = '测试' , `address` = '测试地址' , `mobile` = '17761236475' , `th_consignee` = '退回测试' , `th_address` = '退回地址测试' , `th_mobile` = '17761236475' , `takeparts_time` = '2021-10-11 15:00-16:22' WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.082326s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089077s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `is_confirm` = 1 WHERE ( `id` IN (4,5,6) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081684s ] +--------------------------------------------------------------- + +[2021-12-17T20:11:14+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:1.418669s] [吞吐率:0.70req/s] [内存消耗:4,449.05kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1419', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary4vkNPfSUL5V5XKZv', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '0', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '退回测试', + 'th_address' => '退回地址测试', + 'th_mobile' => '17761236475', + 'takeparts_time' => '2021-10-11 15:00-16:22', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.130968s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086664s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.083592s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.085181s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.084162s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085279s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083401s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `update_time` = 1639743073 , `order_status` = 4 , `is_return` = 0 , `consignee` = '测试' , `address` = '测试地址' , `mobile` = '17761236475' , `th_consignee` = '退回测试' , `th_address` = '退回地址测试' , `th_mobile` = '17761236475' , `takeparts_time` = '2021-10-11 15:00-16:22' WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.084905s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087115s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `is_confirm` = 1 WHERE ( `id` IN (4,5,6) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083983s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.086434s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '您确认评估价格进行寄卖' , '' , 1639743074) [ RunTime:0.084992s ] +--------------------------------------------------------------- + +[2021-12-17T20:12:14+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:0.696668s] [吞吐率:1.44req/s] [内存消耗:4,458.34kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1419', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryjsJYuji2xSMvVJEs', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '1', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '退回测试', + 'th_address' => '退回地址测试', + 'th_mobile' => '17761236475', + 'takeparts_time' => '2021-10-11 15:00-16:22', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129275s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.086704s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.082949s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.083593s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.083591s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083487s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082044s ] +--------------------------------------------------------------- + +[2021-12-17T20:12:28+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:1.294214s] [吞吐率:0.77req/s] [内存消耗:4,449.05kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1419', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryB4KzhPyD9MX78V4y', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '1', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '退回测试', + 'th_address' => '退回地址测试', + 'th_mobile' => '17761236475', + 'takeparts_time' => '2021-10-11 15:00-16:22', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.162965s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.082878s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.084677s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.081682s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.085247s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083154s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082389s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `update_time` = 1639743147 , `order_status` = 4 , `is_return` = 1 , `consignee` = '测试' , `address` = '测试地址' , `mobile` = '17761236475' , `th_consignee` = '退回测试' , `th_address` = '退回地址测试' , `th_mobile` = '17761236475' , `takeparts_time` = '2021-10-11 15:00-16:22' WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.082658s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089178s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `is_confirm` = 1 WHERE ( `id` IN (4,5,6) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082517s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085268s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '您确认评估价格进行寄卖' , '' , 1639743148) [ RunTime:0.080957s ] +--------------------------------------------------------------- + +[2021-12-17T20:20:49+08:00] 127.0.0.1 GET www.dggjimai.com/admin/goods/edit/id/5.html +[运行时间:3.001978s] [吞吐率:0.33req/s] [内存消耗:4,834.05kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '5', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/goods/add.html [ array ( + 0 => 'data', + 1 => 'goods_category_list', + 2 => 'brand_list', + 3 => 'ori_img', + 4 => 'thumb_img', + 5 => 'imgurl_list', + 6 => 'number', + 7 => 'collocation_goods', + 8 => 'size_list', + 9 => 'goods_list', + 10 => 'debug', + 11 => 'cookie_prefix', + 12 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.134096s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.231011s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.213702s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.228322s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/goods/edit' LIMIT 1 [ RunTime:0.169982s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.198474s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `id` = 5 ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.428771s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084656s ] +[ sql ] [ SQL ] SELECT `thumb_image`,`ori_image`,`is_cover` FROM `mall_image` WHERE ( `type` = 1 AND `union_id` = 5 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082351s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_item` [ RunTime:0.087662s ] +[ sql ] [ SQL ] SELECT * FROM `goods_item` WHERE `goods_id` = 5 [ RunTime:0.088757s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.085397s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'size' LIMIT 1 [ RunTime:0.084703s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_category` [ RunTime:0.085695s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name` FROM `goods_category` WHERE `goods_category`.`delete_time` = 0 [ RunTime:0.083507s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_brand` [ RunTime:0.086609s ] +[ sql ] [ SQL ] SELECT * FROM `goods_brand` WHERE `goods_brand`.`delete_time` = 0 [ RunTime:0.084151s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE `goods`.`delete_time` = 0 [ RunTime:0.084768s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084161s ] +--------------------------------------------------------------- + +[2021-12-17T20:20:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/order/index.html?_pjax=%23pjax-container +[运行时间:1.329638s] [吞吐率:0.75req/s] [内存消耗:4,827.16kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/goods/edit/id/5.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129678s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087050s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084172s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089775s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/order/index' LIMIT 1 [ RunTime:0.083842s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.085066s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086550s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.085399s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order_goods` [ RunTime:0.087194s ] +[ sql ] [ SQL ] SELECT `goods_id`,`item_value`,`goods_name`,`goods_img`,`brand_name`,`goods_num`,`goods_price`,`total_price`,`order_id`,`id` FROM `order_goods` WHERE ( `order_id` = 6 ) AND `order_goods`.`delete_time` = 0 [ RunTime:0.092092s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.084491s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 1 AND `is_cover` = 1 ) AND `mall_image`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081596s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `dev_region` [ RunTime:0.084356s ] +[ sql ] [ SQL ] SELECT `name` FROM `dev_region` WHERE `id` IN (360000,360100,360102) ORDER BY `level` ASC [ RunTime:0.082481s ] +--------------------------------------------------------------- + +[2021-12-17T20:20:56+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html?_pjax=%23pjax-container +[运行时间:0.987886s] [吞吐率:1.01req/s] [内存消耗:4,859.85kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'accept' => 'text/html, */*; q=0.01', + 'x-requested-with' => 'XMLHttpRequest', + 'x-pjax' => 'true', + 'x-pjax-container' => '#pjax-container', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'referer' => 'http://www.dggjimai.com/admin/order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + '_pjax' => '#pjax-container', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => '_pjax', + 1 => 'data', + 2 => 'page', + 3 => 'total', + 4 => 'debug', + 5 => 'cookie_prefix', + 6 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.129359s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088007s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084283s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086691s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.086375s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085960s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.083155s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.086400s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084445s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083038s ] +--------------------------------------------------------------- + +[2021-12-17T20:21:01+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/pickup.html?id=2 +[运行时间:1.600943s] [吞吐率:0.62req/s] [内存消耗:5,143.87kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/pickup.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125013s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084664s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083255s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081938s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/pickup' LIMIT 1 [ RunTime:0.080546s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081898s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080572s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.080354s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.083407s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080467s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.078476s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.080583s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.076301s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081315s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078970s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.076911s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078862s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084580s ] +--------------------------------------------------------------- + +[2021-12-17T20:21:24+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/pickup.html?id=2 +[运行时间:1.730728s] [吞吐率:0.58req/s] [内存消耗:5,143.87kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/pickup.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.133732s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.091154s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.096478s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087532s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/pickup' LIMIT 1 [ RunTime:0.091031s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088603s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086973s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.088113s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086123s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087200s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085861s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087762s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.085726s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.088483s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086102s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086755s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087191s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087526s ] +--------------------------------------------------------------- + +[2021-12-17T20:22:56+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.031204s] [吞吐率:0.97req/s] [内存消耗:4,882.36kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125075s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085686s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085140s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085188s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.082906s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083664s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081870s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.079984s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083626s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080343s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082666s ] +--------------------------------------------------------------- + +[2021-12-17T20:23:04+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/pickup.html?id=2 +[运行时间:1.758619s] [吞吐率:0.57req/s] [内存消耗:5,144.05kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/pickup.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.135150s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092291s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089468s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090557s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/pickup' LIMIT 1 [ RunTime:0.090892s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089861s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091898s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089892s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.087493s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089177s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.092630s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.090090s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.088460s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.090439s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.089167s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087331s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087812s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089419s ] +--------------------------------------------------------------- + +[2021-12-17T20:25:16+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/pickup.html?id=2 +[运行时间:1.717196s] [吞吐率:0.58req/s] [内存消耗:5,144.12kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/pickup.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.217182s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083790s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084586s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088104s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/pickup' LIMIT 1 [ RunTime:0.087724s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083518s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080978s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083942s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081144s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083160s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080223s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.082862s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.079477s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.082081s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.079289s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086552s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082200s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081561s ] +--------------------------------------------------------------- + +[2021-12-17T20:25:34+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/pickup.html?id=2 +[运行时间:1.643833s] [吞吐率:0.61req/s] [内存消耗:5,144.12kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/pickup.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125990s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086801s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085892s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086488s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/pickup' LIMIT 1 [ RunTime:0.082581s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083832s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081146s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083595s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081192s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082510s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080622s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084608s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.086164s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083337s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080641s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087803s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080498s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080467s ] +--------------------------------------------------------------- + +[2021-12-17T20:26:29+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.059301s] [吞吐率:0.94req/s] [内存消耗:4,882.36kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126805s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086520s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084107s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084489s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.084058s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084815s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.080501s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084507s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090147s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081615s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081897s ] +--------------------------------------------------------------- + +[2021-12-17T20:26:33+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=2 +[运行时间:1.653835s] [吞吐率:0.60req/s] [内存消耗:5,164.88kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.128098s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085747s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082656s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083920s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.086664s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084834s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080711s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.084290s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.082145s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083414s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082187s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085559s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.082455s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083689s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081247s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083441s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086036s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083308s ] +--------------------------------------------------------------- + +[2021-12-17T20:26:41+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:1.623044s] [吞吐率:0.62req/s] [内存消耗:4,627.98kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', + 'evaluation_price' => '100', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.238795s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088261s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086640s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089257s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.085055s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.087500s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '寄卖订单审核同意' , 'POST' , 'admin/consignment_order/agree.html' , '127.0.0.1' , 1639744000) [ RunTime:0.083985s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.087953s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('f7fb4631qtoK5nP1dWRYUTVqVVt3NF/Vwq7LO0Tb7vDasbWR3NKQNewhjIDabhE6VICZhV9VN/7YkzvpGAM17U9Smw' , 221) [ RunTime:0.083458s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084997s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082675s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '100' , `refund_status` = 1 WHERE ( `id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082685s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 2 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.084033s ] +--------------------------------------------------------------- + +[2021-12-17T20:26:44+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=2 +[运行时间:1.731904s] [吞吐率:0.58req/s] [内存消耗:4,985.86kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.169898s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.096250s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085765s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086073s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.086537s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089675s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085957s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089546s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084338s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088053s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087643s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087372s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.084409s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085897s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083908s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083951s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086449s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083609s ] +--------------------------------------------------------------- + +[2021-12-17T20:26:51+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:1.479842s] [吞吐率:0.68req/s] [内存消耗:4,627.98kb] [文件加载:185] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '5', + 'evaluation_price' => '100', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.124566s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.082647s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082704s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083551s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.080770s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.082646s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '寄卖订单审核同意' , 'POST' , 'admin/consignment_order/agree.html' , '127.0.0.1' , 1639744010) [ RunTime:0.085013s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.082442s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('24644cd8VJyUw2NSVOhs8NVZz679wAHVDevpmoCNp5noYQnRAsXS5H1l+G7xOazzStZgvCxm2uKBUDd+LbB2U70V6g' , 222) [ RunTime:0.084032s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089778s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 5 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081617s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '100' , `refund_status` = 1 WHERE ( `id` = 5 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081497s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 2 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082142s ] +--------------------------------------------------------------- + +[2021-12-17T20:26:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/examine.html?id=2 +[运行时间:1.631423s] [吞吐率:0.61req/s] [内存消耗:4,985.86kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/examine.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.127004s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087284s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.089880s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084817s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/examine' LIMIT 1 [ RunTime:0.092264s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085142s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083007s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.083626s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085415s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083611s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081212s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083785s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.088759s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083147s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083200s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081480s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080659s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082842s ] +--------------------------------------------------------------- + +[2021-12-17T20:27:00+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/agree.html +[运行时间:2.578401s] [吞吐率:0.39req/s] [内存消耗:4,795.48kb] [文件加载:189] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '25', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/examine.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '6', + 'evaluation_price' => '100', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.122387s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084369s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079621s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082412s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/agree' LIMIT 1 [ RunTime:0.080631s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.082136s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `log_method` , `url` , `log_ip` , `create_time`) VALUES (1 , '寄卖订单审核同意' , 'POST' , 'admin/consignment_order/agree.html' , '127.0.0.1' , 1639744018) [ RunTime:0.080029s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.082787s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('173e57b3Y0e8IFeQ8XVI70Au5S2vDecj+NbXiunH+Nrjd0letyeJ/A/GY+UCCIuD77V32a7R1OAjnlpdf30CS7HtLA' , 223) [ RunTime:0.079970s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.081432s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 6 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079318s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `evaluation_price` = '100' , `refund_status` = 1 WHERE ( `id` = 6 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079493s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 2 AND `refund_status` = 0 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079257s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081901s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080116s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 3 , `total_amount` = 100 , `update_time` = 1639744019 WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.085302s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.080931s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '平台已估价' , '' , 1639744019) [ RunTime:0.079311s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.081321s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 102 LIMIT 1 [ RunTime:0.078758s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 2 LIMIT 1 [ RunTime:0.082787s ] +[ sql ] [ SQL ] SELECT `goods_name` FROM `consignment_order_goods` WHERE `order_id` = 2 LIMIT 1 [ RunTime:0.080283s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081719s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.079891s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.081121s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单已估计' , '测试001您好!您的订单202112171615245253已于2021-12-17 16:15已完成,请前往确认估价。' , 102 , 2 , 1 , '' , 1639744020) [ RunTime:0.078699s ] +--------------------------------------------------------------- + +[2021-12-17T20:27:03+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.128775s] [吞吐率:0.89req/s] [内存消耗:4,882.36kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126513s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085314s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083480s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084217s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.084024s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084912s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081157s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.083538s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082934s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081272s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084633s ] +--------------------------------------------------------------- + +[2021-12-17T20:27:17+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_confirm +[运行时间:1.224189s] [吞吐率:0.82req/s] [内存消耗:4,449.05kb] [文件加载:183] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_confirm', + 'route' => 'api/order/consignment_confirm', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '1419', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryPuSl4KxMoMAgH5p0', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => '7c6c4fa6eqlqjKSaooopAA7gWLyJJwWTUFcSJmw+XB5B', + 'goods_id' => '["f6f5fc559hpSZlqqpxAZdmregF2xOSIuJB4ZIAmdxGhf","02ecc73fNAx/gyqwN4cKcrIkYjoQS2SZ9qxbleVeTuic","d47424e2yMuBw3rrEs1sdxldWuMXvdCeQ7e6IaDekc29"]', + 'is_return' => '1', + 'consignee' => '测试', + 'address' => '测试地址', + 'mobile' => '17761236475', + 'th_consignee' => '退回测试', + 'th_address' => '退回地址测试', + 'th_mobile' => '17761236475', + 'takeparts_time' => '2021-10-11 15:00-16:22', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.118982s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.080625s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.080397s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.079847s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'jmnum' LIMIT 1 [ RunTime:0.079751s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.081944s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `user_id` = 1 AND `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.078451s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `update_time` = 1639744036 , `order_status` = 4 , `is_return` = 1 , `consignee` = '测试' , `address` = '测试地址' , `mobile` = '17761236475' , `th_consignee` = '退回测试' , `th_address` = '退回地址测试' , `th_mobile` = '17761236475' , `takeparts_time` = '2021-10-11 15:00-16:22' WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.078192s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080261s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `is_confirm` = 1 WHERE ( `id` IN (4,5,6) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.078592s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.080826s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '您确认评估价格进行寄卖' , '' , 1639744037) [ RunTime:0.078648s ] +--------------------------------------------------------------- + +[2021-12-17T20:27:21+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.091869s] [吞吐率:0.92req/s] [内存消耗:4,882.36kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.167717s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086920s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086711s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087241s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.086068s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086010s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.084193s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.084069s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.090046s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085677s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083466s ] +--------------------------------------------------------------- + +[2021-12-17T20:27:26+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/pickup.html?id=2 +[运行时间:1.782635s] [吞吐率:0.56req/s] [内存消耗:4,972.56kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/pickup.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.219723s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086920s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.086307s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088806s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/pickup' LIMIT 1 [ RunTime:0.087099s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.089909s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084530s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086013s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.084563s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086981s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.085068s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.088511s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.086694s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085788s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084797s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084515s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084070s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.084118s ] +--------------------------------------------------------------- + +[2021-12-17T20:28:23+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/pickup.html?id=2 +[运行时间:1.582944s] [吞吐率:0.63req/s] [内存消耗:5,148.47kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/pickup.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126516s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084319s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080796s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081111s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/pickup' LIMIT 1 [ RunTime:0.079032s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.080832s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080496s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081161s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.078786s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.080724s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.079837s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081163s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.081278s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080608s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078489s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078901s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.078758s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.078629s ] +--------------------------------------------------------------- + +[2021-12-17T20:28:35+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/pickuphandle.html +[运行时间:1.826735s] [吞吐率:0.55req/s] [内存消耗:4,557.73kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '42', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/pickup.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'order_id' => '2', + 'invoice_name' => '111', + 'invoice_no' => '222', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.121009s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.081102s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084293s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.081852s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/pickuphandle' LIMIT 1 [ RunTime:0.079112s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083765s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079101s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 5 , `update_time` = 1639744114 WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.079453s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081090s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '平台安排取货' , '物流公司:111,物流单号:222' , 1639744114) [ RunTime:0.078696s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.080527s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 103 LIMIT 1 [ RunTime:0.084421s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 2 LIMIT 1 [ RunTime:0.079083s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.083689s ] +[ sql ] [ SQL ] SELECT `goods_name` FROM `consignment_order_goods` WHERE `order_id` = 2 LIMIT 1 [ RunTime:0.080173s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081285s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.080694s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.081383s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单取货' , '测试001您好!您的订单202112171615245253已于2021-12-17 16:15已安排取货,物流单号222,快递名称 111。' , 103 , 2 , 1 , '' , 1639744115) [ RunTime:0.083795s ] +--------------------------------------------------------------- + +[2021-12-17T20:28:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.135740s] [吞吐率:0.88req/s] [内存消耗:4,882.36kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126186s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083648s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088111s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085561s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.081911s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084550s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.086437s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.080730s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085508s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081628s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083192s ] +--------------------------------------------------------------- + +[2021-12-17T20:28:43+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=2 +[运行时间:1.634064s] [吞吐率:0.61req/s] [内存消耗:5,175.59kb] [文件加载:192] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125750s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086196s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085878s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.082438s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.083407s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083561s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079727s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082232s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.079857s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082351s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080738s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.081738s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.080019s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.081833s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081870s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082101s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081978s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080960s ] +--------------------------------------------------------------- + +[2021-12-17T20:28:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/shelves.html?id=2 +[运行时间:1.617168s] [吞吐率:0.62req/s] [内存消耗:4,972.23kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/shelves.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.125791s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.083989s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081894s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086201s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelves' LIMIT 1 [ RunTime:0.081815s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.083486s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080694s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.082781s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.080592s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.082880s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081589s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087363s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.082391s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.083272s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.083385s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085072s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.080944s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.082734s ] +--------------------------------------------------------------- + +[2021-12-17T20:28:55+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/shelveshandle.html +[运行时间:0.942273s] [吞吐率:1.06req/s] [内存消耗:4,464.17kb] [文件加载:177] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '15', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', + 'goods_sn' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128895s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086208s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083966s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087060s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelveshandle' LIMIT 1 [ RunTime:0.083782s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.085511s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082240s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.086637s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `code` = '1' ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082026s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `goods_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088302s ] +--------------------------------------------------------------- + +[2021-12-17T20:29:25+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/shelves.html?id=2 +[运行时间:1.887440s] [吞吐率:0.53req/s] [内存消耗:4,972.23kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/shelves.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.228517s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.089942s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087123s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088917s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelves' LIMIT 1 [ RunTime:0.087902s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.091391s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093541s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.089266s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.086425s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089037s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.091208s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.093383s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.087389s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.089075s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.088192s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086215s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086605s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.087054s ] +--------------------------------------------------------------- + +[2021-12-17T20:29:35+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/shelveshandle.html +[运行时间:2.423960s] [吞吐率:0.41req/s] [内存消耗:4,642.41kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '15', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '4', + 'goods_sn' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.135383s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.092731s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088869s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.087815s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelveshandle' LIMIT 1 [ RunTime:0.099314s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.088266s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085688s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.087895s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `code` = '1' ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085665s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `goods_id` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088696s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `goods_id` = 1 , `refund_status` = 4 WHERE ( `id` = 4 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.087255s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 2 AND `refund_status` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.090252s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.086610s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.087119s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.087306s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '平台上架商品' , '商品名称:寄卖A' , 1639744174) [ RunTime:0.084670s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.087999s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 105 LIMIT 1 [ RunTime:0.089555s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 2 LIMIT 1 [ RunTime:0.090380s ] +[ sql ] [ SQL ] SELECT `goods_name` FROM `consignment_order_goods` WHERE `order_id` = 2 LIMIT 1 [ RunTime:0.086515s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.090136s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.086941s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.089904s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单商品上架' , '测试001您好!您的商品寄卖A已于2021-12-17 16:15已安排上架,请前往查看。' , 105 , 2 , 1 , '' , 1639744174) [ RunTime:0.087901s ] +--------------------------------------------------------------- + +[2021-12-17T20:29:38+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/shelves.html?id=2 +[运行时间:1.691560s] [吞吐率:0.59req/s] [内存消耗:4,974.54kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/shelves.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.131488s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.087003s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085982s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.089348s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelves' LIMIT 1 [ RunTime:0.084889s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.087603s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088859s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.085894s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085595s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086981s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083544s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.085679s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.084216s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.085287s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082572s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.084046s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.111270s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.083541s ] +--------------------------------------------------------------- + +[2021-12-17T20:29:43+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/shelveshandle.html +[运行时间:2.287502s] [吞吐率:0.44req/s] [内存消耗:4,642.41kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '15', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '5', + 'goods_sn' => '2', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.129008s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086096s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.083175s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.086612s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelveshandle' LIMIT 1 [ RunTime:0.082466s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.086255s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 5 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082483s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.084030s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `code` = '2' ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.084401s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `goods_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082487s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `goods_id` = 2 , `refund_status` = 4 WHERE ( `id` = 5 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082979s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 2 AND `refund_status` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.082504s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084864s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082557s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.084290s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '平台上架商品' , '商品名称:寄卖A' , 1639744182) [ RunTime:0.083795s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.083618s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 105 LIMIT 1 [ RunTime:0.082693s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 2 LIMIT 1 [ RunTime:0.083757s ] +[ sql ] [ SQL ] SELECT `goods_name` FROM `consignment_order_goods` WHERE `order_id` = 2 LIMIT 1 [ RunTime:0.082151s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087029s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.086771s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.084976s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单商品上架' , '测试001您好!您的商品寄卖A已于2021-12-17 16:15已安排上架,请前往查看。' , 105 , 2 , 1 , '' , 1639744183) [ RunTime:0.084178s ] +--------------------------------------------------------------- + +[2021-12-17T20:29:46+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/shelves.html?id=2 +[运行时间:1.616825s] [吞吐率:0.62req/s] [内存消耗:4,977.09kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/shelves.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.124909s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.085741s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.080511s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083913s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelves' LIMIT 1 [ RunTime:0.087328s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085537s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.079052s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.081909s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.081925s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.089881s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.080311s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083767s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.085797s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.080878s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086977s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.082017s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.081277s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.080645s ] +--------------------------------------------------------------- + +[2021-12-17T20:29:51+08:00] 127.0.0.1 POST www.dggjimai.com/admin/consignment_order/shelveshandle.html +[运行时间:2.395134s] [吞吐率:0.42req/s] [内存消耗:4,643.85kb] [文件加载:184] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '15', + 'accept' => '*/*', + 'x-requested-with' => 'XMLHttpRequest', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'content-type' => 'application/x-www-form-urlencoded; charset=UTF-8', + 'origin' => 'http://www.dggjimai.com', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/shelves.html?id=2', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '6', + 'goods_sn' => '3', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.127173s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.086243s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082103s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.083643s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/shelveshandle' LIMIT 1 [ RunTime:0.081644s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.084353s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `id` = 6 ) AND `consignment_order_goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082527s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods` [ RunTime:0.085051s ] +[ sql ] [ SQL ] SELECT * FROM `goods` WHERE ( `code` = '3' ) AND `goods`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082801s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `goods_id` = 5 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.081448s ] +[ sql ] [ SQL ] UPDATE `consignment_order_goods` SET `goods_id` = 5 , `refund_status` = 4 WHERE ( `id` = 6 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083367s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `consignment_order_goods` WHERE ( `order_id` = 2 AND `refund_status` = 1 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083766s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.084498s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.081817s ] +[ sql ] [ SQL ] UPDATE `consignment_order` SET `order_status` = 2 , `update_time` = 1639744190 WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 [ RunTime:0.082171s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.083734s ] +[ sql ] [ SQL ] INSERT INTO `consignment_order_log` (`order_id` , `remark` , `extra` , `create_time`) VALUES (2 , '平台上架商品' , '商品名称:寄卖A' , 1639744190) [ RunTime:0.082980s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice_setting` [ RunTime:0.084509s ] +[ sql ] [ SQL ] SELECT * FROM `notice_setting` WHERE `scene` = 105 LIMIT 1 [ RunTime:0.082355s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE `id` = 2 LIMIT 1 [ RunTime:0.081420s ] +[ sql ] [ SQL ] SELECT `goods_name` FROM `consignment_order_goods` WHERE `order_id` = 2 LIMIT 1 [ RunTime:0.082501s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086721s ] +[ sql ] [ SQL ] SELECT * FROM `user` WHERE `id` = 1 LIMIT 1 [ RunTime:0.083370s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `notice` [ RunTime:0.083922s ] +[ sql ] [ SQL ] INSERT INTO `notice` (`user_id` , `title` , `content` , `scene` , `receive_type` , `send_type` , `extra` , `create_time`) VALUES (1 , '订单商品上架' , '测试001您好!您的商品寄卖A已于2021-12-17 16:15已安排上架,请前往查看。' , 105 , 2 , 1 , '' , 1639744191) [ RunTime:0.084620s ] +--------------------------------------------------------------- + +[2021-12-17T20:29:54+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/index.html +[运行时间:1.087407s] [吞吐率:0.92req/s] [内存消耗:4,882.36kb] [文件加载:188] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'cache-control' => 'max-age=0', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/index.html [ array ( + 0 => 'data', + 1 => 'page', + 2 => 'total', + 3 => 'debug', + 4 => 'cookie_prefix', + 5 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.126744s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.084618s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.082361s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.084907s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/index' LIMIT 1 [ RunTime:0.082828s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.085039s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM ( SELECT count(*) AS think_count FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ) `_group_count_` [ RunTime:0.081905s ] +[ sql ] [ SQL ] SELECT `o`.*,`u`.`mobile`,`u`.`nickname`,`u`.`sn`,`u`.`avatar` FROM `consignment_order` `o` INNER JOIN `user` `u` ON `u`.`id`=`o`.`user_id` INNER JOIN `consignment_order_goods` `g` ON `g`.`order_id`=`o`.`id` WHERE `o`.`delete_time` = 0 GROUP BY `o`.`id` ORDER BY `o`.`id` DESC,`id` DESC LIMIT 0,10 [ RunTime:0.082089s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087521s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` IN (2,1) ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.083134s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.081723s ] +--------------------------------------------------------------- + +[2021-12-17T20:29:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin/consignment_order/detail.html?id=2 +[运行时间:1.714822s] [吞吐率:0.58req/s] [内存消耗:4,998.68kb] [文件加载:190] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'connection' => 'keep-alive', + 'upgrade-insecure-requests' => '1', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9', + 'referer' => 'http://www.dggjimai.com/admin/consignment_order/index.html', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN,zh;q=0.9', + 'cookie' => 'PHPSESSID=cbaedf47b288e8595509392b9b5ab3de', +) +[ info ] [ PARAM ] array ( + 'id' => '2', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/consignment_order/detail.html [ array ( + 0 => 'detail', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.132468s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088087s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.088268s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.088107s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/consignment_order/detail' LIMIT 1 [ RunTime:0.085862s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.088235s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` WHERE ( `id` = 2 ) AND `consignment_order`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085821s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086798s ] +[ sql ] [ SQL ] SELECT `id`,`sn`,`nickname`,`avatar`,`mobile`,`create_time` FROM `user` WHERE ( `id` = 1 ) AND `user`.`delete_time` = 0 [ RunTime:0.085461s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.087391s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.089773s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.088290s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.087445s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `mall_image` [ RunTime:0.087081s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 4 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.086809s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 5 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.085620s ] +[ sql ] [ SQL ] SELECT * FROM `mall_image` WHERE ( `union_id` = 6 AND `type` = 2 ) AND `mall_image`.`delete_time` = 0 [ RunTime:0.087383s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.085928s ] +--------------------------------------------------------------- + +[2021-12-17T20:30:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/order-consignment_detail +[运行时间:0.956637s] [吞吐率:1.05req/s] [内存消耗:4,590.68kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'order-consignment_detail', + 'route' => 'api/order/consignment_detail', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'host' => 'dgg-jimai-api.dggjimai.com', + 'connection' => 'keep-alive', + 'content-length' => '317', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-encoding' => 'gzip, deflate', + 'accept-language' => 'zh-CN', + 'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundaryo5EAOtKr8tIjZfVO', + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiI4NTIyYTY5NzJkNWI2NTczMTNmZDJjYjRiNmJlMjg1YSIsImlhdCI6MTYzOTUzOTYyNCwibmJmIjoxNjM5NTM5NjI0LCJleHAiOjE2NDIxMzE2MjQsInVpZCI6MX0.KOQXmww0gDTxwVPGLGU7JnhaAxk8t0VxLlUgl2SpXQU', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'order_id' => 'b09c04ddU4PudOQzqVcBso4baoV9lXjM7MobEohmblCh', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.136892s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.095247s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.090117s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order` [ RunTime:0.091933s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order` `o` WHERE ( `o`.`user_id` = '1' AND `o`.`id` = '2' ) AND `o`.`delete_time` = 0 LIMIT 1 [ RunTime:0.091661s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_goods` [ RunTime:0.091666s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_goods` WHERE ( `order_id` = 2 ) AND `consignment_order_goods`.`delete_time` = 0 [ RunTime:0.088859s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `consignment_order_log` [ RunTime:0.093408s ] +[ sql ] [ SQL ] SELECT * FROM `consignment_order_log` WHERE `order_id` = 2 ORDER BY `id` DESC [ RunTime:0.088522s ] diff --git a/runtime/log/202112/22.log b/runtime/log/202112/22.log new file mode 100644 index 0000000..61a02a2 --- /dev/null +++ b/runtime/log/202112/22.log @@ -0,0 +1,295 @@ +--------------------------------------------------------------- + +[2021-12-22T14:29:59+08:00] 127.0.0.1 GET www.dggjimai.com/admin/auth/login.html +[运行时间:0.444514s] [吞吐率:2.25req/s] [内存消耗:4,179.02kb] [文件加载:182] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', + 'cache-control' => 'max-age=0', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/auth/login.html [ array ( + 0 => 'login_config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.153371s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.101768s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/auth/login' LIMIT 1 [ RunTime:0.106892s ] +--------------------------------------------------------------- + +[2021-12-22T14:32:45+08:00] 127.0.0.1 POST www.dggjimai.com/admin/auth/login.html +[运行时间:1.349495s] [吞吐率:0.74req/s] [内存消耗:4,161.44kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'application/json, text/javascript, */*; q=0.01', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'x-requested-with' => 'XMLHttpRequest', + 'content-type' => 'multipart/form-data; boundary=---------------------------55502917516652293911367359968', + 'content-length' => '596', + 'origin' => 'http://www.dggjimai.com', + 'connection' => 'keep-alive', + 'referer' => 'http://www.dggjimai.com/admin/auth/login.html', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', +) +[ info ] [ PARAM ] array ( + 'username' => 'superadmin', + 'password' => '123456', + '__token__' => '19a82efd7708d0170ef6ecd59d22fb1d', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.161853s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.107761s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/auth/login' LIMIT 1 [ RunTime:0.092499s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.093548s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `username` = 'superadmin' ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.108215s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log` [ RunTime:0.104599s ] +[ sql ] [ SQL ] INSERT INTO `admin_log` (`admin_user_id` , `name` , `url` , `log_method` , `log_ip` , `create_time`) VALUES (1 , '登录' , 'admin/auth/login' , 'POST' , '127.0.0.1' , 1640154765) [ RunTime:0.112590s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_log_data` [ RunTime:0.093888s ] +[ sql ] [ SQL ] INSERT INTO `admin_log_data` (`data` , `admin_log_id`) VALUES ('20816106U+jxRXPhnlsx4vtAov70m8iwdF0/BnEh61xH8SflqIgvOd0tdfHpyEwVnEEVxlQc1iinF7H8fb1L2hBIxB1O8ctND++E6A3zd9FwSsdX/mWc64kCChFKJepop3Ig6C3IiUXN1mwqXBz+GowNqUNqZc+ilqN69w' , 224) [ RunTime:0.094483s ] +--------------------------------------------------------------- + +[2021-12-22T14:32:47+08:00] 127.0.0.1 GET www.dggjimai.com/admin/index/index.html +[运行时间:1.782590s] [吞吐率:0.56req/s] [内存消耗:4,316.13kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'referer' => 'http://www.dggjimai.com/admin/auth/login.html', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/index/index.html [ array ( + 0 => 'res', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.161778s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.101778s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.090957s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091513s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/index/index' LIMIT 1 [ RunTime:0.088314s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.088139s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.091731s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640016000 AND 1640102399 [ RunTime:0.089057s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 [ RunTime:0.085766s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.088078s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640016000 AND 1640102399 [ RunTime:0.085370s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 [ RunTime:0.091339s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.087479s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.104426s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `create_time` BETWEEN 1640016000 AND 1640102399 [ RunTime:0.083630s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` [ RunTime:0.090499s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.098088s ] +--------------------------------------------------------------- + +[2021-12-22T14:32:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin/index/__PUBLIC__/static/common/image/workbench/goods.png +[运行时间:0.883778s] [吞吐率:1.13req/s] [内存消耗:4,269.34kb] [文件加载:181] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'image/avif,image/webp,*/*', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'referer' => 'http://www.dggjimai.com/admin/index/index.html', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'workbench', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.151912s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.088365s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.114423s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.091068s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/index/public' LIMIT 1 [ RunTime:0.094727s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.169077s ] +--------------------------------------------------------------- + +[2021-12-22T14:32:51+08:00] 127.0.0.1 GET www.dggjimai.com/admin/index/__PUBLIC__/static/common/image/workbench/coupon.png +[运行时间:1.577375s] [吞吐率:0.63req/s] [内存消耗:4,103.95kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'image/avif,image/webp,*/*', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'referer' => 'http://www.dggjimai.com/admin/index/index.html', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'workbench', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.145793s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.098126s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.099340s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.094288s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/index/public' LIMIT 1 [ RunTime:0.093618s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.094616s ] +--------------------------------------------------------------- + +[2021-12-22T14:32:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/index/__PUBLIC__/static/common/image/workbench/seckill.png +[运行时间:2.294312s] [吞吐率:0.44req/s] [内存消耗:4,103.95kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'image/avif,image/webp,*/*', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'referer' => 'http://www.dggjimai.com/admin/index/index.html', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'workbench', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.178317s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.100529s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.093802s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.102547s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/index/public' LIMIT 1 [ RunTime:0.106886s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.100437s ] +--------------------------------------------------------------- + +[2021-12-22T14:32:52+08:00] 127.0.0.1 GET www.dggjimai.com/admin/index/__PUBLIC__/static/common/image/workbench/order.png +[运行时间:2.942239s] [吞吐率:0.34req/s] [内存消耗:4,103.95kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'image/avif,image/webp,*/*', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'referer' => 'http://www.dggjimai.com/admin/index/index.html', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'workbench', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.139857s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.119825s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085839s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.096358s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/index/public' LIMIT 1 [ RunTime:0.088752s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089425s ] +--------------------------------------------------------------- + +[2021-12-22T14:32:53+08:00] 127.0.0.1 GET www.dggjimai.com/admin/index/__PUBLIC__/static/common/image/workbench/user.png +[运行时间:3.627426s] [吞吐率:0.28req/s] [内存消耗:4,103.95kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'image/avif,image/webp,*/*', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'referer' => 'http://www.dggjimai.com/admin/index/index.html', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', +) +[ info ] [ PARAM ] array ( + 'static' => 'common', + 'image' => 'workbench', +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/template/404.html [ array ( + 0 => 'debug', + 1 => 'cookie_prefix', + 2 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.138037s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.098186s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.085969s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.090737s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/index/public' LIMIT 1 [ RunTime:0.088094s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.142319s ] +--------------------------------------------------------------- + +[2021-12-22T14:56:41+08:00] 127.0.0.1 GET www.dggjimai.com/ +[运行时间:0.255601s] [吞吐率:3.91req/s] [内存消耗:2,623.69kb] [文件加载:157] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', +) +[ info ] [ PARAM ] array ( +) +[ error ] [2]Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/dggxiangmu/dggjimai/public/index.php:14)[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/index/controller/IndexController.php:18] diff --git a/runtime/log/202112/23.log b/runtime/log/202112/23.log new file mode 100644 index 0000000..56c0692 --- /dev/null +++ b/runtime/log/202112/23.log @@ -0,0 +1,351 @@ +--------------------------------------------------------------- + +[2021-12-23T15:10:14+08:00] 127.0.0.1 GET www.dggjimai.com/ +[运行时间:0.192955s] [吞吐率:5.18req/s] [内存消耗:2,624.08kb] [文件加载:157] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', + 'cache-control' => 'max-age=0', +) +[ info ] [ PARAM ] array ( +) +[ error ] [2]Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/dggxiangmu/dggjimai/public/index.php:14)[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/index/controller/IndexController.php:18] +--------------------------------------------------------------- + +[2021-12-23T15:10:15+08:00] 127.0.0.1 GET www.dggjimai.com/ +[运行时间:0.079318s] [吞吐率:12.61req/s] [内存消耗:2,624.08kb] [文件加载:157] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', + 'cache-control' => 'max-age=0', +) +[ info ] [ PARAM ] array ( +) +[ error ] [2]Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/dggxiangmu/dggjimai/public/index.php:14)[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/index/controller/IndexController.php:18] +--------------------------------------------------------------- + +[2021-12-23T15:10:16+08:00] 127.0.0.1 GET www.dggjimai.com/ +[运行时间:0.065559s] [吞吐率:15.25req/s] [内存消耗:2,624.08kb] [文件加载:157] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', + 'cache-control' => 'max-age=0', +) +[ info ] [ PARAM ] array ( +) +[ error ] [2]Cannot modify header information - headers already sent by (output started at /Library/WebServer/Documents/dggxiangmu/dggjimai/public/index.php:14)[/Library/WebServer/Documents/dggxiangmu/dggjimai/application/index/controller/IndexController.php:18] +--------------------------------------------------------------- + +[2021-12-23T15:10:48+08:00] 127.0.0.1 GET www.dggjimai.com/ +[运行时间:0.139481s] [吞吐率:7.17req/s] [内存消耗:2,476.74kb] [文件加载:150] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', + 'cache-control' => 'max-age=0', +) +[ info ] [ PARAM ] array ( +) +--------------------------------------------------------------- + +[2021-12-23T15:10:50+08:00] 127.0.0.1 GET www.dggjimai.com/admin +[运行时间:1.838170s] [吞吐率:0.54req/s] [内存消耗:4,129.33kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', + 'cache-control' => 'max-age=0', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/index/index.html [ array ( + 0 => 'res', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.151366s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.100346s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.097989s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.098297s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/index/index' LIMIT 1 [ RunTime:0.096028s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.100482s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640188800 AND 1640275199 [ RunTime:0.095762s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.096466s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 [ RunTime:0.096386s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640188800 AND 1640275199 [ RunTime:0.097968s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.096474s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 [ RunTime:0.097002s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.099025s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `create_time` BETWEEN 1640188800 AND 1640275199 [ RunTime:0.095777s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.096302s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` [ RunTime:0.095517s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.099221s ] +--------------------------------------------------------------- + +[2021-12-23T15:10:51+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/goods.png +[运行时间:0.164306s] [吞吐率:6.09req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T15:10:51+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/seckill.png +[运行时间:0.213727s] [吞吐率:4.68req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T15:10:51+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/coupon.png +[运行时间:0.201601s] [吞吐率:4.96req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T15:10:51+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/order.png +[运行时间:0.234150s] [吞吐率:4.27req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T15:10:51+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/user.png +[运行时间:0.265348s] [吞吐率:3.77req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:30:04+08:00] 127.0.0.1 GET www.dggjimai.com/ +[运行时间:0.083435s] [吞吐率:11.99req/s] [内存消耗:2,476.35kb] [文件加载:150] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', +) +[ info ] [ PARAM ] array ( +) +--------------------------------------------------------------- + +[2021-12-23T16:30:06+08:00] 127.0.0.1 GET www.dggjimai.com/admin +[运行时间:2.061813s] [吞吐率:0.49req/s] [内存消耗:4,128.94kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/index/index.html [ array ( + 0 => 'res', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.156940s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.146783s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.118370s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.109524s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/index/index' LIMIT 1 [ RunTime:0.101530s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.135527s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640188800 AND 1640275199 [ RunTime:0.107208s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.114024s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 [ RunTime:0.102487s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640188800 AND 1640275199 [ RunTime:0.103407s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.147103s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 [ RunTime:0.105421s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.110755s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `create_time` BETWEEN 1640188800 AND 1640275199 [ RunTime:0.100678s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.099898s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` [ RunTime:0.103762s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.103267s ] +--------------------------------------------------------------- + +[2021-12-23T16:30:06+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/coupon.png +[运行时间:0.066878s] [吞吐率:14.95req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:30:06+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/goods.png +[运行时间:0.122291s] [吞吐率:8.18req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:30:06+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/order.png +[运行时间:0.123616s] [吞吐率:8.09req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:30:06+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/seckill.png +[运行时间:0.116780s] [吞吐率:8.56req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:30:06+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/user.png +[运行时间:0.113719s] [吞吐率:8.79req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:56+08:00] 127.0.0.1 GET www.dggjimai.com/ +[运行时间:0.137667s] [吞吐率:7.26req/s] [内存消耗:2,476.35kb] [文件加载:150] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', +) +[ info ] [ PARAM ] array ( +) +--------------------------------------------------------------- + +[2021-12-23T16:48:58+08:00] 127.0.0.1 GET www.dggjimai.com/admin +[运行时间:1.692475s] [吞吐率:0.59req/s] [内存消耗:4,128.94kb] [文件加载:179] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/index/index.html [ array ( + 0 => 'res', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.177360s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_user` [ RunTime:0.090567s ] +[ sql ] [ SQL ] SELECT * FROM `admin_user` WHERE ( `id` = 1 ) AND `admin_user`.`delete_time` = 0 LIMIT 1 [ RunTime:0.097948s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.085931s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/index/index' LIMIT 1 [ RunTime:0.090418s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `order` [ RunTime:0.091558s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640188800 AND 1640275199 [ RunTime:0.082830s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.087292s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `order` WHERE `order_status` = 1 [ RunTime:0.084129s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640188800 AND 1640275199 [ RunTime:0.091718s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 AND `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.085525s ] +[ sql ] [ SQL ] SELECT SUM(`total_amount`) AS tp_sum FROM `order` WHERE `order_status` = 1 [ RunTime:0.087923s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `user` [ RunTime:0.086307s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `create_time` BETWEEN 1640188800 AND 1640275199 [ RunTime:0.084710s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` WHERE `create_time` BETWEEN 1640102400 AND 1640188799 [ RunTime:0.087889s ] +[ sql ] [ SQL ] SELECT COUNT(*) AS tp_count FROM `user` [ RunTime:0.089072s ] +[ sql ] [ SQL ] SELECT `id`,`parent_id`,`name`,`url`,`icon`,`sort_id` FROM `admin_menu` WHERE `is_show` = 1 ORDER BY `sort_id` ASC,`id` ASC [ RunTime:0.089391s ] +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/seckill.png +[运行时间:0.070452s] [吞吐率:14.19req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/order.png +[运行时间:0.068905s] [吞吐率:14.51req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/goods.png +[运行时间:0.061382s] [吞吐率:16.29req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/user.png +[运行时间:0.068483s] [吞吐率:14.60req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/coupon.png +[运行时间:0.089021s] [吞吐率:11.23req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/user.png +[运行时间:0.093098s] [吞吐率:10.74req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/goods.png +[运行时间:0.100950s] [吞吐率:9.91req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/seckill.png +[运行时间:0.056453s] [吞吐率:17.71req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/coupon.png +[运行时间:0.062606s] [吞吐率:15.97req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +--------------------------------------------------------------- + +[2021-12-23T16:48:59+08:00] 127.0.0.1 GET www.dggjimai.com/__PUBLIC__/static/common/image/workbench/order.png +[运行时间:0.099677s] [吞吐率:10.03req/s] [内存消耗:2,151.93kb] [文件加载:139] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php diff --git a/runtime/log/202112/24.log b/runtime/log/202112/24.log new file mode 100644 index 0000000..cf82494 --- /dev/null +++ b/runtime/log/202112/24.log @@ -0,0 +1,76 @@ +--------------------------------------------------------------- + +[2021-12-24T22:58:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/home +[运行时间:1.110069s] [吞吐率:0.90req/s] [内存消耗:4,127.70kb] [文件加载:187] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'home', + 'route' => 'api/index/home', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'accept' => '*/*', + 'accept-encoding' => 'gzip, deflate, br', + 'accept-language' => 'zh-CN', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'connection' => 'keep-alive', + 'content-type' => 'multipart/form-data; boundary=--------------------------101047505153893878592088', + 'host' => 'dgg-jimai-api.dggjimai.com', + 'content-length' => '0', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.177743s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.097334s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.091232s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `slide` [ RunTime:0.089266s ] +[ sql ] [ SQL ] SELECT * FROM `slide` WHERE ( ( alias="carousel" ) ) AND `slide`.`delete_time` = 0 ORDER BY `sort_number` DESC LIMIT 6 [ RunTime:0.085491s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.087662s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_index` [ RunTime:0.086541s ] +[ sql ] [ SQL ] SELECT * FROM `goods_index` WHERE ( `status` = 1 ) AND `goods_index`.`delete_time` = 0 ORDER BY `sort_number` ASC [ RunTime:0.087948s ] +--------------------------------------------------------------- + +[2021-12-24T23:01:14+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/home +[运行时间:0.847191s] [吞吐率:1.18req/s] [内存消耗:4,031.60kb] [文件加载:171] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'home', + 'route' => 'api/index/home', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'accept' => '*/*', + 'accept-encoding' => 'gzip, deflate, br', + 'accept-language' => 'zh-CN', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'connection' => 'keep-alive', + 'content-type' => 'multipart/form-data; boundary=--------------------------309855864747369575811051', + 'host' => 'dgg-jimai-api.dggjimai.com', + 'content-length' => '0', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.128796s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.083565s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081824s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `slide` [ RunTime:0.081648s ] +[ sql ] [ SQL ] SELECT * FROM `slide` WHERE ( ( alias="carousel" ) ) AND `slide`.`delete_time` = 0 ORDER BY `sort_number` DESC LIMIT 6 [ RunTime:0.079567s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.081557s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `goods_index` [ RunTime:0.081828s ] +[ sql ] [ SQL ] SELECT * FROM `goods_index` WHERE ( `status` = 1 ) AND `goods_index`.`delete_time` = 0 ORDER BY `sort_number` ASC [ RunTime:0.083547s ] diff --git a/runtime/log/202112/25.log b/runtime/log/202112/25.log new file mode 100644 index 0000000..57bdcdc --- /dev/null +++ b/runtime/log/202112/25.log @@ -0,0 +1,195 @@ +--------------------------------------------------------------- + +[2021-12-25T16:33:45+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-selected +[运行时间:1.205722s] [吞吐率:0.83req/s] [内存消耗:3,817.65kb] [文件加载:165] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-selected', + 'route' => 'api/cart/selected', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'accept' => '*/*', + 'accept-encoding' => 'gzip, deflate, br', + 'accept-language' => 'zh-CN', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'connection' => 'keep-alive', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiJiYjRjNjdjM2MxYjQzN2QxZGE2ZDY1NWMxZjU3YzFmMyIsImlhdCI6MTYzOTQ3ODIyNSwibmJmIjoxNjM5NDc4MjI1LCJleHAiOjE2Mzk0ODU0MjUsInVpZCI6MX0.wz-qjfXgdz8IiFoL6UE6GK-CXMe8i9RNXNiSVA5Uzpo', + 'content-type' => 'multipart/form-data; boundary=--------------------------833739538820244410031961', + 'host' => 'dgg-jimai-api.dggjimai.com', + 'content-length' => '460', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'cart_id' => '47fa476aRThTqiLKmAPKYV/XeXHAPDG4F7kc1yjMAL7F', + 'selected' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.279645s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.156948s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.162140s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.154111s ] +[ sql ] [ SQL ] UPDATE `cart` SET `selected` = 0 , `update_time` = 1640421225 WHERE `id` = 2 AND `user_id` = 1 [ RunTime:0.152688s ] +--------------------------------------------------------------- + +[2021-12-25T16:34:57+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-selected +[运行时间:1.451804s] [吞吐率:0.69req/s] [内存消耗:3,817.65kb] [文件加载:165] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-selected', + 'route' => 'api/cart/selected', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'accept' => '*/*', + 'accept-encoding' => 'gzip, deflate, br', + 'accept-language' => 'zh-CN', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'connection' => 'keep-alive', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiJiYjRjNjdjM2MxYjQzN2QxZGE2ZDY1NWMxZjU3YzFmMyIsImlhdCI6MTYzOTQ3ODIyNSwibmJmIjoxNjM5NDc4MjI1LCJleHAiOjE2Mzk0ODU0MjUsInVpZCI6MX0.wz-qjfXgdz8IiFoL6UE6GK-CXMe8i9RNXNiSVA5Uzpo', + 'content-type' => 'multipart/form-data; boundary=--------------------------630128059789534353354347', + 'host' => 'dgg-jimai-api.dggjimai.com', + 'content-length' => '460', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'cart_id' => '47fa476aRThTqiLKmAPKYV/XeXHAPDG4F7kc1yjMAL7F', + 'selected' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.330084s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.161799s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.153394s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.154425s ] +[ sql ] [ SQL ] UPDATE `cart` SET `selected` = 0 , `update_time` = 1640421296 WHERE `id` = 2 AND `user_id` = 1 [ RunTime:0.150501s ] +--------------------------------------------------------------- + +[2021-12-25T16:35:03+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-selected +[运行时间:1.149326s] [吞吐率:0.87req/s] [内存消耗:3,817.65kb] [文件加载:165] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-selected', + 'route' => 'api/cart/selected', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'accept' => '*/*', + 'accept-encoding' => 'gzip, deflate, br', + 'accept-language' => 'zh-CN', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'connection' => 'keep-alive', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiJiYjRjNjdjM2MxYjQzN2QxZGE2ZDY1NWMxZjU3YzFmMyIsImlhdCI6MTYzOTQ3ODIyNSwibmJmIjoxNjM5NDc4MjI1LCJleHAiOjE2Mzk0ODU0MjUsInVpZCI6MX0.wz-qjfXgdz8IiFoL6UE6GK-CXMe8i9RNXNiSVA5Uzpo', + 'content-type' => 'multipart/form-data; boundary=--------------------------796199372372173317587515', + 'host' => 'dgg-jimai-api.dggjimai.com', + 'content-length' => '460', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'cart_id' => '47fa476aRThTqiLKmAPKYV/XeXHAPDG4F7kc1yjMAL7F', + 'selected' => '1', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.229624s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.188709s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.154445s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.171559s ] +[ sql ] [ SQL ] UPDATE `cart` SET `selected` = 1 , `update_time` = 1640421302 WHERE `id` = 2 AND `user_id` = 1 [ RunTime:0.243474s ] +--------------------------------------------------------------- + +[2021-12-25T16:35:12+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-selected +[运行时间:1.518970s] [吞吐率:0.66req/s] [内存消耗:3,817.65kb] [文件加载:165] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-selected', + 'route' => 'api/cart/selected', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'accept' => '*/*', + 'accept-encoding' => 'gzip, deflate, br', + 'accept-language' => 'zh-CN', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'connection' => 'keep-alive', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiJiYjRjNjdjM2MxYjQzN2QxZGE2ZDY1NWMxZjU3YzFmMyIsImlhdCI6MTYzOTQ3ODIyNSwibmJmIjoxNjM5NDc4MjI1LCJleHAiOjE2Mzk0ODU0MjUsInVpZCI6MX0.wz-qjfXgdz8IiFoL6UE6GK-CXMe8i9RNXNiSVA5Uzpo', + 'content-type' => 'multipart/form-data; boundary=--------------------------119287611429334079107177', + 'host' => 'dgg-jimai-api.dggjimai.com', + 'content-length' => '460', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'cart_id' => '47fa476aRThTqiLKmAPKYV/XeXHAPDG4F7kc1yjMAL7F', + 'selected' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.186631s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.277674s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.234742s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.375312s ] +[ sql ] [ SQL ] UPDATE `cart` SET `selected` = 0 , `update_time` = 1640421312 WHERE `id` = 2 AND `user_id` = 1 [ RunTime:0.348300s ] +--------------------------------------------------------------- + +[2021-12-25T16:35:21+08:00] 127.0.0.1 POST dgg-jimai-api.dggjimai.com/caet-selected +[运行时间:1.047696s] [吞吐率:0.95req/s] [内存消耗:3,817.65kb] [文件加载:165] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( + 'rule' => 'caet-selected', + 'route' => 'api/cart/selected', + 'option' => + array ( + 'merge_rule_regex' => false, + ), + 'var' => + array ( + ), +) +[ info ] [ HEADER ] array ( + 'origin' => 'http://dgg-jimai-api.dggjimai.com', + 'accept' => '*/*', + 'accept-encoding' => 'gzip, deflate, br', + 'accept-language' => 'zh-CN', + 'user-agent' => 'ApiPOST Runtime +https://www.apipost.cn', + 'connection' => 'keep-alive', + 'token' => 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJpc3MiLCJhdWQiOiJhdWQiLCJqdGkiOiJiYjRjNjdjM2MxYjQzN2QxZGE2ZDY1NWMxZjU3YzFmMyIsImlhdCI6MTYzOTQ3ODIyNSwibmJmIjoxNjM5NDc4MjI1LCJleHAiOjE2Mzk0ODU0MjUsInVpZCI6MX0.wz-qjfXgdz8IiFoL6UE6GK-CXMe8i9RNXNiSVA5Uzpo', + 'content-type' => 'multipart/form-data; boundary=--------------------------978151276366769071520541', + 'host' => 'dgg-jimai-api.dggjimai.com', + 'content-length' => '460', +) +[ info ] [ PARAM ] array ( + 'uid' => '465f91fejJh/L7IqfSBww3ddZHHvH5mUS5mw6qGbVWkN', + 'cart_id' => '47fa476aRThTqiLKmAPKYV/XeXHAPDG4F7kc1yjMAL7F', + 'selected' => '0', +) +[ info ] [ DB ] INIT mysql +[ sql ] [ DB ] CONNECT:[ UseTime:0.226850s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `shop_config` [ RunTime:0.183849s ] +[ sql ] [ SQL ] SELECT `value` FROM `shop_config` WHERE `type` = 'website' AND `name` = 'img_url' LIMIT 1 [ RunTime:0.155582s ] +[ sql ] [ SQL ] SHOW COLUMNS FROM `cart` [ RunTime:0.181562s ] +[ sql ] [ SQL ] UPDATE `cart` SET `selected` = 0 , `update_time` = 1640421321 WHERE `id` = 2 AND `user_id` = 1 [ RunTime:0.199401s ] diff --git a/runtime/log/202112/27.log b/runtime/log/202112/27.log new file mode 100644 index 0000000..f97408c --- /dev/null +++ b/runtime/log/202112/27.log @@ -0,0 +1,67 @@ +--------------------------------------------------------------- + +[2021-12-27T18:09:57+08:00] 127.0.0.1 GET www.dggjimai.com/ +[运行时间:0.278050s] [吞吐率:3.60req/s] [内存消耗:2,476.35kb] [文件加载:150] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', +) +[ info ] [ PARAM ] array ( +) +--------------------------------------------------------------- + +[2021-12-27T18:09:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin +[运行时间:0.073417s] [吞吐率:13.62req/s] [内存消耗:2,747.52kb] [文件加载:162] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', +) +[ info ] [ PARAM ] array ( +) +--------------------------------------------------------------- + +[2021-12-27T18:09:57+08:00] 127.0.0.1 GET www.dggjimai.com/admin/auth/login.html +[运行时间:0.452768s] [吞吐率:2.21req/s] [内存消耗:4,029.33kb] [文件加载:180] +[ info ] [ LANG ] /Library/WebServer/Documents/dggxiangmu/dggjimai/thinkphp/lang/zh-cn.php +[ info ] [ ROUTE ] array ( +) +[ info ] [ HEADER ] array ( + 'host' => 'www.dggjimai.com', + 'user-agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0', + 'accept' => 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8', + 'accept-language' => 'zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2', + 'accept-encoding' => 'gzip, deflate', + 'connection' => 'keep-alive', + 'cookie' => 'PHPSESSID=0f88a31db07536568cfe2307633a2554', + 'upgrade-insecure-requests' => '1', +) +[ info ] [ PARAM ] array ( +) +[ info ] [ DB ] INIT mysql +[ info ] [ VIEW ] /Library/WebServer/Documents/dggxiangmu/dggjimai/application/admin/view/auth/login.html [ array ( + 0 => 'login_config', + 1 => 'debug', + 2 => 'cookie_prefix', + 3 => 'admin', +) ] +[ sql ] [ DB ] CONNECT:[ UseTime:0.146346s ] mysql:host=114.215.82.135;port=3306;dbname=dgg_jimai;charset=utf8mb4 +[ sql ] [ SQL ] SHOW COLUMNS FROM `admin_menu` [ RunTime:0.095361s ] +[ sql ] [ SQL ] SELECT * FROM `admin_menu` WHERE `url` = 'admin/auth/login' LIMIT 1 [ RunTime:0.092891s ] diff --git a/runtime/temp/004392e70623fd3dcd92b87a984dce47.php b/runtime/temp/004392e70623fd3dcd92b87a984dce47.php new file mode 100755 index 0000000..6f6fb30 --- /dev/null +++ b/runtime/temp/004392e70623fd3dcd92b87a984dce47.php @@ -0,0 +1,261 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +

                            404

                            +
                            +

                            哎呀!找不到页面。

                            +

                            + 我们找不到您要查找的页面。 + 同时,您可以

                            返回上一页 或者 去首页 +

                            +
                            +
                            +
                            + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0130392df6039df02d720826bb8c0de6.php b/runtime/temp/0130392df6039df02d720826bb8c0de6.php new file mode 100755 index 0000000..e0f31d3 --- /dev/null +++ b/runtime/temp/0130392df6039df02d720826bb8c0de6.php @@ -0,0 +1,409 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + +
                            + + ID名称简介图片是否启用创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0198aab747e4a4b973ffd3ca987b1858.php b/runtime/temp/0198aab747e4a4b973ffd3ca987b1858.php new file mode 100755 index 0000000..b2ba771 --- /dev/null +++ b/runtime/temp/0198aab747e4a4b973ffd3ca987b1858.php @@ -0,0 +1,397 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + +
                            +
                            + + +
                            + +
                            + + +
                            +
                            + + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + + + + +
                            +
                            +
                            +
                            + +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/01d086187d4560ff6076b2a9a10948bc.php b/runtime/temp/01d086187d4560ff6076b2a9a10948bc.php new file mode 100755 index 0000000..e362812 --- /dev/null +++ b/runtime/temp/01d086187d4560ff6076b2a9a10948bc.php @@ -0,0 +1,366 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + +
                            + +ID名称编码创建时间操作
                            + + + + + + 的数据吗' data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/02ff5eadbd620754d94263921e887193.php b/runtime/temp/02ff5eadbd620754d94263921e887193.php new file mode 100755 index 0000000..3c4b854 --- /dev/null +++ b/runtime/temp/02ff5eadbd620754d94263921e887193.php @@ -0,0 +1,407 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + +
                            + + ID名称简介图片是否启用创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0519e234498e5b9ed2a284015bf9248c.php b/runtime/temp/0519e234498e5b9ed2a284015bf9248c.php new file mode 100755 index 0000000..92e06b8 --- /dev/null +++ b/runtime/temp/0519e234498e5b9ed2a284015bf9248c.php @@ -0,0 +1,495 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            +
                            + + + + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + +
                            +
                            提现单号
                            +
                            +
                            用户信息
                            +
                            +
                            收款账户信息
                            +
                            提现金额信息
                            提现状态
                            审核备注
                            创建时间
                            操作
                            +
                            +
                            +
                            + +
                            +

                            用户编号:

                            +

                            用户昵称:

                            +

                            用户手机:

                            +
                            +
                            +
                            +
                            +
                            +

                            提现方式:

                            +

                            提现姓名:

                            +

                            提现手机:

                            +

                            提现账户:

                            + +

                            提现开户:

                            + +
                            +
                            +
                            +
                            +
                            +

                            用户提现金额:

                            +

                            手续费:

                            +

                            用户到账金额:

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + 审核 + + +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0a321b07c8fc33ed33a6e11c516520e3.php b/runtime/temp/0a321b07c8fc33ed33a6e11c516520e3.php new file mode 100755 index 0000000..af19d61 --- /dev/null +++ b/runtime/temp/0a321b07c8fc33ed33a6e11c516520e3.php @@ -0,0 +1,261 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +

                            404

                            +
                            +

                            哎呀!找不到页面。

                            +

                            + 我们找不到您要查找的页面。 + 同时,您可以

                            返回上一页 或者 去首页 +

                            +
                            +
                            +
                            + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0ad4c9808a7113e1b78f074b9f86daa2.php b/runtime/temp/0ad4c9808a7113e1b78f074b9f86daa2.php new file mode 100755 index 0000000..828fea3 --- /dev/null +++ b/runtime/temp/0ad4c9808a7113e1b78f074b9f86daa2.php @@ -0,0 +1,619 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + + +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                              +
                            • 基本设置
                            • +
                            • 商品详情
                            • +
                            • 分销设置
                            • +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + + + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + 4 +
                            +
                            +
                            +
                            + + +
                            +
                            +
                            +
                            + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0bf595331e4fda5be5cabb4da5faedfb.php b/runtime/temp/0bf595331e4fda5be5cabb4da5faedfb.php new file mode 100755 index 0000000..1674cfe --- /dev/null +++ b/runtime/temp/0bf595331e4fda5be5cabb4da5faedfb.php @@ -0,0 +1,392 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + +
                            + + ID昵称账号角色是否启用操作
                            + + + $role): ?> + + + + + + + + 的数据吗' data-url=""> + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0c7e8d3d3260a10fd9074bdf83e01dc0.php b/runtime/temp/0c7e8d3d3260a10fd9074bdf83e01dc0.php new file mode 100755 index 0000000..a43b832 --- /dev/null +++ b/runtime/temp/0c7e8d3d3260a10fd9074bdf83e01dc0.php @@ -0,0 +1,379 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + checked type="checkbox" /> + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0cdee197b72b1d8624fdbd024d570822.php b/runtime/temp/0cdee197b72b1d8624fdbd024d570822.php new file mode 100755 index 0000000..21a6f7f --- /dev/null +++ b/runtime/temp/0cdee197b72b1d8624fdbd024d570822.php @@ -0,0 +1,364 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            + +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + + + +
                            ID订单编号下单用户订单金额收货人姓名收货手机号收货地址支付渠道支付状态发货状态下单时间操作
                            + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0d068369eb4a32a0595038bb434bbd10.php b/runtime/temp/0d068369eb4a32a0595038bb434bbd10.php new file mode 100755 index 0000000..831f878 --- /dev/null +++ b/runtime/temp/0d068369eb4a32a0595038bb434bbd10.php @@ -0,0 +1,458 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            +
                            + + +
                            +
                            +
                            + + +
                            + +
                            +
                            + +
                            +
                            +
                            + + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + +
                            + +
                            + +
                            +
                            + + + +
                            + +
                            + + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/0e41a8aff3f00409f646a0babdb3e375.php b/runtime/temp/0e41a8aff3f00409f646a0babdb3e375.php new file mode 100755 index 0000000..a97f46b --- /dev/null +++ b/runtime/temp/0e41a8aff3f00409f646a0babdb3e375.php @@ -0,0 +1,1055 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +

                            代码自动生成

                            +
                            + + +
                            +
                            +
                            + + + +
                            + +
                            + + +
                            + +
                            + + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            +
                            + + +
                            +
                            + +
                            + + + +
                            + + +
                            + + +
                            + +
                            +
                            + + +
                            +
                            + +
                            + + +
                            + +
                            + + +
                            + +
                            + + +
                            +
                            +
                            + + +
                            +
                            +
                            + + +
                            + +
                            + + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            + + +
                            +
                            +
                            + + +
                            + + +
                            + + +
                            +
                            + + +
                            + + +
                            + + + + + + + + + + + + + + + + + +
                            操作字段类型名称列表搜索表单表单类型表单验证更多
                            +
                            + +
                            +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + +
                            + + +
                            + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/1297c66b919723594f08a3c2edd986b5.php b/runtime/temp/1297c66b919723594f08a3c2edd986b5.php new file mode 100755 index 0000000..eb34ae7 --- /dev/null +++ b/runtime/temp/1297c66b919723594f08a3c2edd986b5.php @@ -0,0 +1,472 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                              +
                            • + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + checked> + checked> +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/12bb592cf830a86fd63619b5f588cc0d.php b/runtime/temp/12bb592cf830a86fd63619b5f588cc0d.php new file mode 100755 index 0000000..b55d85f --- /dev/null +++ b/runtime/temp/12bb592cf830a86fd63619b5f588cc0d.php @@ -0,0 +1,296 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + + + + + + + + + + + + + + + + + + +
                            + + ID菜单名称url父级ID图标排序状态日志记录方式操作
                            +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/15d8463f0b45fb827affe886885ff48b.php b/runtime/temp/15d8463f0b45fb827affe886885ff48b.php new file mode 100755 index 0000000..0d765c3 --- /dev/null +++ b/runtime/temp/15d8463f0b45fb827affe886885ff48b.php @@ -0,0 +1,274 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + 代码自动生成 + 点击跳转 +
                            +
                            +
                            + +
                            +
                            + +
                            + 表单字段生成 + 点击跳转 +
                            +
                            +
                            + +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/1643a94ac5152af6d518f0b339b39b7e.php b/runtime/temp/1643a94ac5152af6d518f0b339b39b7e.php new file mode 100755 index 0000000..f676b8e --- /dev/null +++ b/runtime/temp/1643a94ac5152af6d518f0b339b39b7e.php @@ -0,0 +1,326 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/1988eed73bf1da1276da2e2f8066b9a0.php b/runtime/temp/1988eed73bf1da1276da2e2f8066b9a0.php new file mode 100755 index 0000000..7c67969 --- /dev/null +++ b/runtime/temp/1988eed73bf1da1276da2e2f8066b9a0.php @@ -0,0 +1,422 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + +
                            +
                            +
                            订单概况
                            +
                            +
                            +
                            +
                            + +
                            本月订单金额(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            订单总金额(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            订单总数(笔)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            退款订单总额(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            退款订单总数(笔)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            +
                            +
                            会员概况
                            +
                            +
                            +
                            +
                            + +
                            会员余额(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            会员积分
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            会员可提现佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            会员已提现佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + + +
                            +
                            +
                            分销概况
                            +
                            +
                            +
                            +
                            + +
                            本月分销佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            分销总佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            提现中佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            已提现佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/1de9fb3cc119ee222cbd09b8fce9b4f3.php b/runtime/temp/1de9fb3cc119ee222cbd09b8fce9b4f3.php new file mode 100755 index 0000000..abb442f --- /dev/null +++ b/runtime/temp/1de9fb3cc119ee222cbd09b8fce9b4f3.php @@ -0,0 +1,418 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            +
                            + + + + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + +
                            流水单号(20位)会员昵称会员编号手机号码来源类型来源单号变动总数剩余总数变动时间
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/1f3092da77982eab489624c0c230e741.php b/runtime/temp/1f3092da77982eab489624c0c230e741.php new file mode 100755 index 0000000..7fda2bc --- /dev/null +++ b/runtime/temp/1f3092da77982eab489624c0c230e741.php @@ -0,0 +1,373 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + +
                            + + ID名称图片创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/1f528efffecd7782ef7302d919f9d9fb.php b/runtime/temp/1f528efffecd7782ef7302d919f9d9fb.php new file mode 100755 index 0000000..d36e1d5 --- /dev/null +++ b/runtime/temp/1f528efffecd7782ef7302d919f9d9fb.php @@ -0,0 +1,327 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + +
                            + + ID名称操作
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/22097117a87eb8355630852bee43eb5d.php b/runtime/temp/22097117a87eb8355630852bee43eb5d.php new file mode 100755 index 0000000..21fd90d --- /dev/null +++ b/runtime/temp/22097117a87eb8355630852bee43eb5d.php @@ -0,0 +1,329 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + +
                            + + ID名称操作
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2210bc46ca61bbb34b534d2d30b524a3.php b/runtime/temp/2210bc46ca61bbb34b534d2d30b524a3.php new file mode 100755 index 0000000..915fe78 --- /dev/null +++ b/runtime/temp/2210bc46ca61bbb34b534d2d30b524a3.php @@ -0,0 +1,366 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + $item): ?> + + + + + + + + + + +
                            + +名称描述添加时间操作
                            + + + + + + 的数据吗' data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/23a9125deeac5660389513769a7f67ff.php b/runtime/temp/23a9125deeac5660389513769a7f67ff.php new file mode 100755 index 0000000..8b25fc1 --- /dev/null +++ b/runtime/temp/23a9125deeac5660389513769a7f67ff.php @@ -0,0 +1,400 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + 运营数据 + 更新时间: +
                            +
                            +
                            +
                            +
                            +
                            + 成交订单(笔) + 今日 +
                            +
                            +

                            +

                            昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >

                            + +
                            成交订单总量(笔)
                            +
                            +
                            +
                            +
                            +
                            +
                            + 销售金额(元) + 今日 +
                            +
                            +

                            + +

                            昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >

                            +
                            销售总额(元)
                            +
                            +
                            +
                            +
                            +
                            +
                            + 新增会员(人) + 今日 +
                            +
                            +

                            +

                            昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >

                            +
                            会员总量(人)
                            +
                            +
                            +
                            + + + +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2610a0a47385ec3697c6c48d251ba74c.php b/runtime/temp/2610a0a47385ec3697c6c48d251ba74c.php new file mode 100755 index 0000000..4f26638 --- /dev/null +++ b/runtime/temp/2610a0a47385ec3697c6c48d251ba74c.php @@ -0,0 +1,457 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + +
                            +
                            用户信息
                            +
                            +
                            订单信息
                            +
                            +
                            商品信息
                            +
                            购买数量
                            结束时间
                            产生收益
                            创建时间
                            +
                            + +
                            +

                            用户编号:

                            +

                            用户昵称:

                            +

                            用户手机:

                            +
                            +
                            +
                            +
                            +
                            +

                            订单编号:

                            +

                            订单类型:

                            +

                            订单金额:

                            +
                            +
                            +
                            +
                            +
                            +

                            设备名称:

                            +

                            设备规格:M

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/261492977be39a65689579e0c471c045.php b/runtime/temp/261492977be39a65689579e0c471c045.php new file mode 100755 index 0000000..48c8fd6 --- /dev/null +++ b/runtime/temp/261492977be39a65689579e0c471c045.php @@ -0,0 +1,315 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + + 会员提现需满足最低提现金额,才能提交提现申请。 +
                            + +
                            +
                            + +
                            + + 会员提现允许的最高提现金额。 +
                            + +
                            +
                            + +
                            + checked> + checked> +
                            +
                            +
                            + +
                            + + 会员提现时收取的手续费。 +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2aa4b29a927bac30bb9b1684a442cdd1.php b/runtime/temp/2aa4b29a927bac30bb9b1684a442cdd1.php new file mode 100755 index 0000000..862d242 --- /dev/null +++ b/runtime/temp/2aa4b29a927bac30bb9b1684a442cdd1.php @@ -0,0 +1,503 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                              +
                            • + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2aa7d989ff11b4df47ad87a203174ecd.php b/runtime/temp/2aa7d989ff11b4df47ad87a203174ecd.php new file mode 100755 index 0000000..00f557f --- /dev/null +++ b/runtime/temp/2aa7d989ff11b4df47ad87a203174ecd.php @@ -0,0 +1,320 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2bd954b07bf2bd33a16be742a41da912.php b/runtime/temp/2bd954b07bf2bd33a16be742a41da912.php new file mode 100755 index 0000000..e564ae3 --- /dev/null +++ b/runtime/temp/2bd954b07bf2bd33a16be742a41da912.php @@ -0,0 +1,411 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            + 头像 +

                            +

                            +

                            + $role): ?> + + +

                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2c5419c1ce3612e0cca660a9ac7c38ff.php b/runtime/temp/2c5419c1ce3612e0cca660a9ac7c38ff.php new file mode 100755 index 0000000..b44c0ad --- /dev/null +++ b/runtime/temp/2c5419c1ce3612e0cca660a9ac7c38ff.php @@ -0,0 +1,527 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + + +
                            +
                            +
                            +
                            +
                            + + + + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2cecbf307bb2a2f20f68478a2a89a5fc.php b/runtime/temp/2cecbf307bb2a2f20f68478a2a89a5fc.php new file mode 100755 index 0000000..0a10c26 --- /dev/null +++ b/runtime/temp/2cecbf307bb2a2f20f68478a2a89a5fc.php @@ -0,0 +1,301 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + +
                            + + + +
                            + +
                            + + +
                            +
                            + 订单信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            + 会员信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            + 收货信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            + 快递信息 +
                            +
                            + isEmpty())): ?> +
                            + +
                            暂无物流信息
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            + 商品信息 +
                            +
                            + +
                            + + + + + + + + + + + + + + + + $goods): ?> + + + + + + + + + + + +
                            商品信息价格(元)数量
                            +
                            +
                            + +
                            +
                            +

                            +
                            +

                            +
                            +
                            +
                            ¥
                            +

                            商品金额:¥

                            +

                            应付金额:¥

                            +
                            +
                            + + + +
                            +
                            + 订单操作 +
                            +
                            + +
                            +
                            + + + + + + + + +
                            +
                            +
                            +
                            + + + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/2d0f7580c982bee50c864deca489cca0.php b/runtime/temp/2d0f7580c982bee50c864deca489cca0.php new file mode 100755 index 0000000..977c04e --- /dev/null +++ b/runtime/temp/2d0f7580c982bee50c864deca489cca0.php @@ -0,0 +1,329 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2dec0c6b90400e4e601a4917fe0cb673.php b/runtime/temp/2dec0c6b90400e4e601a4917fe0cb673.php new file mode 100755 index 0000000..db2dd48 --- /dev/null +++ b/runtime/temp/2dec0c6b90400e4e601a4917fe0cb673.php @@ -0,0 +1,386 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            + +
                            +
                            + + + + + + + + + + +
                            操作设备产品数量到期时间
                            +
                            +
                            +
                            + + +
                            +
                            +
                            +
                            + + + + + + + + + + +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2e32599ef0883baa8dade41ddb521174.php b/runtime/temp/2e32599ef0883baa8dade41ddb521174.php new file mode 100755 index 0000000..7bb5d56 --- /dev/null +++ b/runtime/temp/2e32599ef0883baa8dade41ddb521174.php @@ -0,0 +1,359 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            + + +
                            +
                            +
                            +
                            +

                            本Demo的微信相关功能都基于 EasyWeChat 扩展包,该扩展包几乎包含所有微信开发相关功能。有关微信开发的注意事项/坑个人总结了以下几点,希望对大家有所帮助:

                            +
                              +
                            1. + 配置好微信公众平台/微信支付/企业微信相关配置。例如:app_id,app_secret,token,aes_key,IP白名单,授权域名,扫码通知地址等等。 +
                            2. +
                            3. + 确保配置和自己的环境一致。有可能会犯的错误:配置的是http,实际是https;配置的是xxx.com域名,实际是www.xxx.com域名。 +
                            4. +
                            5. + 确保程序的参数配置和微信公众平台/微信支付/企业微信相关配置一致,例如app_id,app_secret等 +
                            6. +
                            7. + 公众号/企业微信类的确保自己的域名已备案,并且没有被腾讯拉入黑名单;小程序确保域名备案的同时必须为https。 +
                            8. +
                            9. + 验证文件在框架中应该放置在 /public 目录下;关于各种目录的配置,注意微信的规则。 +
                            10. +
                            11. + EasyWeChat扩展包的结果有时候可能不需要 return ,有时候却需要,同时要结合自己的框架版本来尝试。 +
                            12. +
                            13. + 类似于支付通知,授权登录跳转的url记得关闭登录验证或token验证之类的限制,否则可能会收不到通知/授权登录失败。 +
                            14. +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +

                            示例方法如下,具体可直接查看 WeChatController 控制器源代码

                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            功能方法
                            服务端验证server
                            接收 & 回复用户消息msg
                            获取用户信息user
                            发送模版消息templateMsg
                            拉黑用户block
                            统一下单pay
                            根据微信订单号退款refundByTransactionId
                            根据商户订单号退款refundByOutTradeNo
                            发送普通红包redPacket
                            +
                            + +
                            +
                            +
                            + + +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/2f04b3ece4ee514a19239da28cf75298.php b/runtime/temp/2f04b3ece4ee514a19239da28cf75298.php new file mode 100755 index 0000000..5b89bf4 --- /dev/null +++ b/runtime/temp/2f04b3ece4ee514a19239da28cf75298.php @@ -0,0 +1,360 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + $item): ?> + + + + + + + + +
                            + +名称操作
                            + + + + + + 的数据吗' data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/30312c0e06c1c7786ab47c123d590b03.php b/runtime/temp/30312c0e06c1c7786ab47c123d590b03.php new file mode 100755 index 0000000..e662311 --- /dev/null +++ b/runtime/temp/30312c0e06c1c7786ab47c123d590b03.php @@ -0,0 +1,314 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                              +
                            • 积分规则
                            • +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/3179745d35894ebcffbf82820017c581.php b/runtime/temp/3179745d35894ebcffbf82820017c581.php new file mode 100755 index 0000000..dde474b --- /dev/null +++ b/runtime/temp/3179745d35894ebcffbf82820017c581.php @@ -0,0 +1,412 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + +
                            + + ID名称所属分类售价规格库存排序(升序)是否上架创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/36a9e9ca3d2f4e6381a12abd9b6dd9cb.php b/runtime/temp/36a9e9ca3d2f4e6381a12abd9b6dd9cb.php new file mode 100755 index 0000000..50c92ec --- /dev/null +++ b/runtime/temp/36a9e9ca3d2f4e6381a12abd9b6dd9cb.php @@ -0,0 +1,400 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + 运营数据 + 更新时间: +
                            +
                            +
                            +
                            +
                            +
                            + 成交订单(笔) + 今日 +
                            +
                            +

                            +

                            昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >

                            + +
                            成交订单总量(笔)
                            +
                            +
                            +
                            +
                            +
                            +
                            + 销售金额(元) + 今日 +
                            +
                            +

                            + +

                            昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >

                            +
                            销售总额(元)
                            +
                            +
                            +
                            +
                            +
                            +
                            + 新增会员(人) + 今日 +
                            +
                            +

                            +

                            昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >

                            +
                            会员总量(人)
                            +
                            +
                            +
                            + + + +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/399b7e8179603d0def1effd94d8eadf0.php b/runtime/temp/399b7e8179603d0def1effd94d8eadf0.php new file mode 100755 index 0000000..5306f74 --- /dev/null +++ b/runtime/temp/399b7e8179603d0def1effd94d8eadf0.php @@ -0,0 +1,40 @@ + + + + + BearAdmin + + + + + + + + + + + + + +
                            +

                            BearAdmin

                            +

                            &一款基于ThinkPHP5.1+AdminLTE的后台快速开发管理系统 

                            +

                            Go→

                            +

                            Github

                            +

                            + Gitee +

                            +
                            + + + + diff --git a/runtime/temp/3a4989fa4eb7ced529079656e2bd896e.php b/runtime/temp/3a4989fa4eb7ced529079656e2bd896e.php new file mode 100755 index 0000000..415ae42 --- /dev/null +++ b/runtime/temp/3a4989fa4eb7ced529079656e2bd896e.php @@ -0,0 +1,236 @@ + + + + + + + + <?php echo htmlentities($admin['title']); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'OneWeekBackend')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/temp/3c049bafaca900f56fee3c18f7943902.php b/runtime/temp/3c049bafaca900f56fee3c18f7943902.php new file mode 100755 index 0000000..aafa3d2 --- /dev/null +++ b/runtime/temp/3c049bafaca900f56fee3c18f7943902.php @@ -0,0 +1,369 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + + + + + + + + + + + + + + + + + $list): ?> + + + + + + + + + + + + +
                            ID用户操作URL请求方式IP日期操作
                            adminUser->nickname); ?> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/3da73821bf8efbc88abdf784f5ecb205.php b/runtime/temp/3da73821bf8efbc88abdf784f5ecb205.php new file mode 100755 index 0000000..70561a4 --- /dev/null +++ b/runtime/temp/3da73821bf8efbc88abdf784f5ecb205.php @@ -0,0 +1,261 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +

                            404

                            +
                            +

                            哎呀!找不到页面。

                            +

                            + 我们找不到您要查找的页面。 + 同时,您可以

                            返回上一页 或者 去首页 +

                            +
                            +
                            +
                            + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/3defb647f1e704e304840d2b4f8a7d65.php b/runtime/temp/3defb647f1e704e304840d2b4f8a7d65.php new file mode 100755 index 0000000..e136aae --- /dev/null +++ b/runtime/temp/3defb647f1e704e304840d2b4f8a7d65.php @@ -0,0 +1,723 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + + +
                            + +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            + + +
                            + +
                            + + +
                            + +
                            + + +
                            +
                            + + checked type="checkbox"/> + +
                            + +
                            +
                            +
                            +
                            +
                            + + +
                            + +
                            + + +
                            + +
                            + + +
                            +
                            + + +
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            +
                            +
                            + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + + +
                            + +
                            +
                            + + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/418bfbfd86a3ed133fafdfa7126ba301.php b/runtime/temp/418bfbfd86a3ed133fafdfa7126ba301.php new file mode 100755 index 0000000..e9626a8 --- /dev/null +++ b/runtime/temp/418bfbfd86a3ed133fafdfa7126ba301.php @@ -0,0 +1,382 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + + + + +
                            + +ID标题发布人所属分类简介是否置顶是否热门缩略图排序浏览数发布时间操作
                            + + + + + + 的数据吗' data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/43b0bbc24aac33245d5c697d3b42eb57.php b/runtime/temp/43b0bbc24aac33245d5c697d3b42eb57.php new file mode 100755 index 0000000..7353549 --- /dev/null +++ b/runtime/temp/43b0bbc24aac33245d5c697d3b42eb57.php @@ -0,0 +1,299 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + +
                            + + + +
                            + +
                            + + +
                            +
                            + 订单信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            + 会员信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            + 取货信息 +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            + 退货信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            无需退回
                            +
                            + +
                            +
                            + 商品信息 +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + $goods): ?> + + + + + + + + + + + + + + +
                            图片商品名称商品信息估计备注状态
                            +
                            + $img): ?> +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +

                            购买价格:

                            +

                            尺寸:

                            +

                            品牌:

                            +

                            品类:

                            +

                            品相:

                            +

                            购买渠道:

                            +
                            +
                            +
                            +
                            + ¥ +
                            +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +

                            商品总估计金额:¥

                            +
                            +
                            + + + +
                            +
                            + 订单操作 +
                            +
                            + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + 订单流程 +
                            +
                            +
                            +
                            +
                              + $vo): $mod = ($i % 2 );++$i;?> +
                            • + +
                              +

                              ()

                              + + isEmpty()))): ?> +

                              + +
                              +
                            • + +
                            +
                            +
                            +
                            +
                            + + + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/44ce86ca5d41b0ef461480ce2e440aa0.php b/runtime/temp/44ce86ca5d41b0ef461480ce2e440aa0.php new file mode 100755 index 0000000..b3038fa --- /dev/null +++ b/runtime/temp/44ce86ca5d41b0ef461480ce2e440aa0.php @@ -0,0 +1,495 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +

                            你好,:

                            + 欢迎来到,左侧为菜单区域,右侧为功能区。 +
                            +
                            +
                            + + + +
                            +
                            +
                            + + + +
                            + 后台用户 + +
                            +
                            +
                            + +
                            +
                            + + + +
                            + 后台角色 + +
                            +
                            +
                            + +
                            +
                            + + + +
                            + 后台菜单 + +
                            +
                            +
                            + +
                            + +
                            +
                            + + + + +
                            + 操作日志 + +
                            +
                            +
                            + +
                            + + +
                            +
                            + +
                            +
                            +

                            访问信息

                            +
                            +
                            + + + + + + + + + + + + + + + + + +
                            用户系统用户IP
                            浏览器所在城市
                            +
                            +
                            + +
                            +
                            +

                            系统信息

                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            服务器系统服务器IP
                            PHP版本运行内存限制
                            最大文件上传限制单次上传数量限制
                            最大POST限制项目磁盘剩余容量
                            ThinkPHP版本后台系统版本
                            MySql版本PHP当前运行模式
                            PHP当前时区PHP当前时间
                            +
                            +
                            + +
                            + + +
                            +
                            +
                            +

                            依赖关系

                            +
                            +
                            + + + $item): ?> + + + + + $item): ?> + + + + + + +
                            +
                            +
                            +
                            +
                            + +
                            + + + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/47f75dc606ee0ba6f5a7b40d23b773cd.php b/runtime/temp/47f75dc606ee0ba6f5a7b40d23b773cd.php new file mode 100755 index 0000000..a912e28 --- /dev/null +++ b/runtime/temp/47f75dc606ee0ba6f5a7b40d23b773cd.php @@ -0,0 +1,472 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                              +
                            • + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + checked> + checked> +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/48d8f1ded01cfbf13b3b171db50884cd.php b/runtime/temp/48d8f1ded01cfbf13b3b171db50884cd.php new file mode 100755 index 0000000..16670d9 --- /dev/null +++ b/runtime/temp/48d8f1ded01cfbf13b3b171db50884cd.php @@ -0,0 +1,147 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + +
                            + + +
                            +
                            + +
                            + +
                            + + +
                            +
                            +
                            + +
                            审核拒绝后,提现金额会全部退回佣金账户
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + + +
                            +
                            +
                            + + +
                            + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/48f866c7d9406c21ff2b4b9e9ba49eb9.php b/runtime/temp/48f866c7d9406c21ff2b4b9e9ba49eb9.php new file mode 100755 index 0000000..05a947b --- /dev/null +++ b/runtime/temp/48f866c7d9406c21ff2b4b9e9ba49eb9.php @@ -0,0 +1,274 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + 代码自动生成 + 点击跳转 +
                            +
                            +
                            + +
                            +
                            + +
                            + 表单字段生成 + 点击跳转 +
                            +
                            +
                            + +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/490cc98cd65aea69f95671561d2a5676.php b/runtime/temp/490cc98cd65aea69f95671561d2a5676.php new file mode 100755 index 0000000..7f9d887 --- /dev/null +++ b/runtime/temp/490cc98cd65aea69f95671561d2a5676.php @@ -0,0 +1,347 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/4b2b87e60c99a372c40c4e44930a353f.php b/runtime/temp/4b2b87e60c99a372c40c4e44930a353f.php new file mode 100755 index 0000000..97274b0 --- /dev/null +++ b/runtime/temp/4b2b87e60c99a372c40c4e44930a353f.php @@ -0,0 +1,236 @@ + + + + + + + + <?php echo htmlentities($admin['title']); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'OneWeekBackend')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/temp/4d339159fe9bbac72f5304fec771be6e.php b/runtime/temp/4d339159fe9bbac72f5304fec771be6e.php new file mode 100755 index 0000000..0d8f0bc --- /dev/null +++ b/runtime/temp/4d339159fe9bbac72f5304fec771be6e.php @@ -0,0 +1,343 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/4da9dc61f3c71c13db4c85475974bf11.php b/runtime/temp/4da9dc61f3c71c13db4c85475974bf11.php new file mode 100755 index 0000000..fa156b5 --- /dev/null +++ b/runtime/temp/4da9dc61f3c71c13db4c85475974bf11.php @@ -0,0 +1,766 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + + +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                              +
                            • 基本设置
                            • +
                            • 尺码库存
                            • +
                            • 商品详情
                            • +
                            • 精品搭配
                            • +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + + + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + + + + + + + + + $item1): ?> + + + + + + +
                            尺码库存
                            + + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + + + + + + + + + $item1): ?> + + + + + + +
                            商品名称操作
                            + + + + 追加 + 删除 +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + +
                            +
                            +
                            +
                            + + + + + + + + +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/53401cdb1de674a6bff1e97227abf848.php b/runtime/temp/53401cdb1de674a6bff1e97227abf848.php new file mode 100755 index 0000000..4e78337 --- /dev/null +++ b/runtime/temp/53401cdb1de674a6bff1e97227abf848.php @@ -0,0 +1,1055 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +

                            代码自动生成

                            +
                            + + +
                            +
                            +
                            + + + +
                            + +
                            + + +
                            + +
                            + + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            +
                            + + +
                            +
                            + +
                            + + + +
                            + + +
                            + + +
                            + +
                            +
                            + + +
                            +
                            + +
                            + + +
                            + +
                            + + +
                            + +
                            + + +
                            +
                            +
                            + + +
                            +
                            +
                            + + +
                            + +
                            + + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            + + +
                            +
                            +
                            + + +
                            + + +
                            + + +
                            +
                            + + +
                            + + +
                            + + + + + + + + + + + + + + + + + +
                            操作字段类型名称列表搜索表单表单类型表单验证更多
                            +
                            + +
                            +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + +
                            + + +
                            + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/5b63cfa829268cac30c524bed87823cb.php b/runtime/temp/5b63cfa829268cac30c524bed87823cb.php new file mode 100755 index 0000000..7dec71e --- /dev/null +++ b/runtime/temp/5b63cfa829268cac30c524bed87823cb.php @@ -0,0 +1,400 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + 运营数据 + 更新时间: +
                            +
                            +
                            +
                            +
                            +
                            + 成交订单(笔) + 今日 +
                            +
                            +

                            +

                            昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >

                            + +
                            成交订单总量(笔)
                            +
                            +
                            +
                            +
                            +
                            +
                            + 销售金额(元) + 今日 +
                            +
                            +

                            + +

                            昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >

                            +
                            销售总额(元)
                            +
                            +
                            +
                            +
                            +
                            +
                            + 新增会员(人) + 今日 +
                            +
                            +

                            +

                            昨日: + style="color: #009688" = 0): ?> style="color: #FA2828" >

                            +
                            会员总量(人)
                            +
                            +
                            +
                            + + + +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/5c76964d40c28a21f6c3aa82851af32e.php b/runtime/temp/5c76964d40c28a21f6c3aa82851af32e.php new file mode 100755 index 0000000..8a2a6fd --- /dev/null +++ b/runtime/temp/5c76964d40c28a21f6c3aa82851af32e.php @@ -0,0 +1,368 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + +
                            + +栏目名称排序(升序)是否上架创建时间操作
                            + + + + + + 的数据吗' data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/5ecce8cad813aaee5e5f1b2a4508433b.php b/runtime/temp/5ecce8cad813aaee5e5f1b2a4508433b.php new file mode 100755 index 0000000..021bc98 --- /dev/null +++ b/runtime/temp/5ecce8cad813aaee5e5f1b2a4508433b.php @@ -0,0 +1,359 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            + checked type="checkbox" /> + +
                            +
                            + +
                            + +
                            + checked type="checkbox" /> + +
                            +
                            + +
                            + +
                            + checked type="checkbox" /> + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/5ff766031480dd9b09849f87b9f88268.php b/runtime/temp/5ff766031480dd9b09849f87b9f88268.php new file mode 100755 index 0000000..d585d56 --- /dev/null +++ b/runtime/temp/5ff766031480dd9b09849f87b9f88268.php @@ -0,0 +1,413 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + + + + + + + + + + $item1): ?> + + + + + + + +
                            操作规格名称排序
                            + 追加 + 删除 + + + + +
                            +
                            +
                            + + +
                            +
                            +
                            +
                            + + + + + + + + +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/612edde70fee3bbfe3c8b31d0948398b.php b/runtime/temp/612edde70fee3bbfe3c8b31d0948398b.php new file mode 100755 index 0000000..a194861 --- /dev/null +++ b/runtime/temp/612edde70fee3bbfe3c8b31d0948398b.php @@ -0,0 +1,320 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/614e97609d261934425b1baf2d26d9b9.php b/runtime/temp/614e97609d261934425b1baf2d26d9b9.php new file mode 100755 index 0000000..c646e4f --- /dev/null +++ b/runtime/temp/614e97609d261934425b1baf2d26d9b9.php @@ -0,0 +1,314 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                              +
                            • 积分规则
                            • +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/61b48d0671dcc6c3934bc43d39eef235.php b/runtime/temp/61b48d0671dcc6c3934bc43d39eef235.php new file mode 100755 index 0000000..ef7a3bf --- /dev/null +++ b/runtime/temp/61b48d0671dcc6c3934bc43d39eef235.php @@ -0,0 +1,399 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + +
                            +
                            + + +
                            + +
                            + + +
                            +
                            + + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + + + + +
                            +
                            +
                            +
                            + +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/64008a67d4770e05ca8d32bd43383994.php b/runtime/temp/64008a67d4770e05ca8d32bd43383994.php new file mode 100755 index 0000000..95561e2 --- /dev/null +++ b/runtime/temp/64008a67d4770e05ca8d32bd43383994.php @@ -0,0 +1,330 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + +
                            + + ID名称操作
                            +
                            + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/64766c68a2c90e8caf600c9e49b9cfab.php b/runtime/temp/64766c68a2c90e8caf600c9e49b9cfab.php new file mode 100755 index 0000000..657ecaa --- /dev/null +++ b/runtime/temp/64766c68a2c90e8caf600c9e49b9cfab.php @@ -0,0 +1,327 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + +
                            + + ID名称操作
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/6699a723712e50fb81cbb5fe0fc2b0fa.php b/runtime/temp/6699a723712e50fb81cbb5fe0fc2b0fa.php new file mode 100755 index 0000000..ac1e5e8 --- /dev/null +++ b/runtime/temp/6699a723712e50fb81cbb5fe0fc2b0fa.php @@ -0,0 +1,425 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + + + + + + + + +
                            + +ID照片姓名部门职位工号手机号邮箱生日入职日期是否为老板是否所属部门领导排序是否启用创建时间操作
                            + + + + + + 的数据吗' data-url=""> + + + + 的数据吗' data-url=""> + + + + 的数据吗' data-url=""> + + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/6a14fbfe3d1ce438e7c223fa6b3c649e.php b/runtime/temp/6a14fbfe3d1ce438e7c223fa6b3c649e.php new file mode 100755 index 0000000..8ec6e03 --- /dev/null +++ b/runtime/temp/6a14fbfe3d1ce438e7c223fa6b3c649e.php @@ -0,0 +1,336 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            + + +
                            +
                            +
                            + +
                            + +
                            +
                            + + +
                            +
                            +
                            + +
                            + +
                            + + + +
                            +
                            +
                            + +
                            +
                            +
                            + 点击上传 + +
                            + 最大不超过2MB +
                            +
                            +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            + +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/6a5124a1ea495d3acb303fe2c596804c.php b/runtime/temp/6a5124a1ea495d3acb303fe2c596804c.php new file mode 100755 index 0000000..11ee7bf --- /dev/null +++ b/runtime/temp/6a5124a1ea495d3acb303fe2c596804c.php @@ -0,0 +1,418 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + + + + + +
                            + + ID图片名称所属分类品牌原价售价重量(克)库存排序(升序)是否上架创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/6a6fb1a2ecbacae95ad8048c8914b758.php b/runtime/temp/6a6fb1a2ecbacae95ad8048c8914b758.php new file mode 100755 index 0000000..f038b20 --- /dev/null +++ b/runtime/temp/6a6fb1a2ecbacae95ad8048c8914b758.php @@ -0,0 +1,390 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + +
                            + + ID昵称账号角色是否启用操作
                            + + + $role): ?> + + + + + + + + 的数据吗' data-url=""> + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/6c85cabfeb55988c16eebdf9d16fb180.php b/runtime/temp/6c85cabfeb55988c16eebdf9d16fb180.php new file mode 100755 index 0000000..53165d4 --- /dev/null +++ b/runtime/temp/6c85cabfeb55988c16eebdf9d16fb180.php @@ -0,0 +1,271 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + +
                            + + + +
                            + +
                            + +
                            +
                            + 取货信息 +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            + 退货信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            无需退回
                            +
                            + +
                            +
                            + 商品信息 +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + $goods): ?> + + + + + + + + + + +
                            图片商品名称商品信息估价状态
                            +
                            + $img): ?> +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +

                            购买价格:

                            +

                            尺寸:

                            +

                            品牌:

                            +

                            品类:

                            +

                            品相:

                            +

                            购买渠道:

                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            + 已同意估价 +
                            + +
                            + 未同意估价 +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            + 取货物流 +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            + + +
                            +
                            +
                            +
                            + + + + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/6edeac7c16d288d99914b8df677e1f4d.php b/runtime/temp/6edeac7c16d288d99914b8df677e1f4d.php new file mode 100755 index 0000000..b21011e --- /dev/null +++ b/runtime/temp/6edeac7c16d288d99914b8df677e1f4d.php @@ -0,0 +1,381 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + + + + +
                            +

                            【name; ?>】授权

                            + +
                            +
                            +
                            +
                            +
                            + + + + +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/6fa6a931bed4fe2b4627d9bfaed41d67.php b/runtime/temp/6fa6a931bed4fe2b4627d9bfaed41d67.php new file mode 100755 index 0000000..a066913 --- /dev/null +++ b/runtime/temp/6fa6a931bed4fe2b4627d9bfaed41d67.php @@ -0,0 +1,381 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + +
                            + + ID名称图片跳转类型跳转目标排序创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/71565ac436349bd65ab466c6dc363265.php b/runtime/temp/71565ac436349bd65ab466c6dc363265.php new file mode 100755 index 0000000..7586f7d --- /dev/null +++ b/runtime/temp/71565ac436349bd65ab466c6dc363265.php @@ -0,0 +1,392 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + +
                            + + ID昵称账号角色是否启用操作
                            + + + $role): ?> + + + + + + + + 的数据吗' data-url=""> + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/72e13a4e37e7e503497a90dc2a5953f3.php b/runtime/temp/72e13a4e37e7e503497a90dc2a5953f3.php new file mode 100755 index 0000000..d80d958 --- /dev/null +++ b/runtime/temp/72e13a4e37e7e503497a90dc2a5953f3.php @@ -0,0 +1,419 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                              +
                            • 寄卖流程
                            • +
                            • 寄卖规则
                            • +
                            • 联系我们
                            • +
                            • 社群与交流
                            • +
                            • 隐私政策
                            • +
                            • 条款与条件
                            • +
                            • 寄卖成功提醒
                            • +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/74c30e534e54adcc101814239a618596.php b/runtime/temp/74c30e534e54adcc101814239a618596.php new file mode 100755 index 0000000..95a015b --- /dev/null +++ b/runtime/temp/74c30e534e54adcc101814239a618596.php @@ -0,0 +1,1055 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +

                            代码自动生成

                            +
                            + + +
                            +
                            +
                            + + + +
                            + +
                            + + +
                            + +
                            + + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            +
                            + + +
                            +
                            + +
                            + + + +
                            + + +
                            + + +
                            + +
                            +
                            + + +
                            +
                            + +
                            + + +
                            + +
                            + + +
                            + +
                            + + +
                            +
                            +
                            + + +
                            +
                            +
                            + + +
                            + +
                            + + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            + + +
                            +
                            +
                            + + +
                            + + +
                            + + +
                            +
                            + + +
                            + + +
                            + + + + + + + + + + + + + + + + + +
                            操作字段类型名称列表搜索表单表单类型表单验证更多
                            +
                            + +
                            +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + + + + +
                            + + +
                            + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/79a45a3d6f22ff022c5bd020763ba1d5.php b/runtime/temp/79a45a3d6f22ff022c5bd020763ba1d5.php new file mode 100755 index 0000000..b300120 --- /dev/null +++ b/runtime/temp/79a45a3d6f22ff022c5bd020763ba1d5.php @@ -0,0 +1,370 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + +
                            + +品牌名称品牌首字母是否显示排序创建时间操作
                            + + + + + + 的数据吗' data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/7d96143ede6b0764137771229e4acd41.php b/runtime/temp/7d96143ede6b0764137771229e4acd41.php new file mode 100755 index 0000000..141a237 --- /dev/null +++ b/runtime/temp/7d96143ede6b0764137771229e4acd41.php @@ -0,0 +1,397 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            + + + + + + + + + + + + + $item): ?> + + + + + + + + + + +
                            + + ID名称简介是否启用操作
                            + + + + + + + + + + 的数据吗' + data-url=""> + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/7e2e82b29ea7c66383998a22f20a5444.php b/runtime/temp/7e2e82b29ea7c66383998a22f20a5444.php new file mode 100755 index 0000000..b50d62c --- /dev/null +++ b/runtime/temp/7e2e82b29ea7c66383998a22f20a5444.php @@ -0,0 +1,412 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + +
                            + + ID名称所属分类售价规格库存排序(升序)是否上架创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/81c02f9374f0e3156ae6bc1ae8e3f872.php b/runtime/temp/81c02f9374f0e3156ae6bc1ae8e3f872.php new file mode 100755 index 0000000..83bcaa4 --- /dev/null +++ b/runtime/temp/81c02f9374f0e3156ae6bc1ae8e3f872.php @@ -0,0 +1,526 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/81c47c2865fc58352e6b0c501b49843b.php b/runtime/temp/81c47c2865fc58352e6b0c501b49843b.php new file mode 100755 index 0000000..0a14c21 --- /dev/null +++ b/runtime/temp/81c47c2865fc58352e6b0c501b49843b.php @@ -0,0 +1,314 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +

                            发送结果

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/822f3cf9e22e8f61719bd736388531ff.php b/runtime/temp/822f3cf9e22e8f61719bd736388531ff.php new file mode 100755 index 0000000..aee223d --- /dev/null +++ b/runtime/temp/822f3cf9e22e8f61719bd736388531ff.php @@ -0,0 +1,327 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + +
                            + + ID名称操作
                            +
                            + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/82b05ddecce6a759567776bf5de7a80c.php b/runtime/temp/82b05ddecce6a759567776bf5de7a80c.php new file mode 100755 index 0000000..df1ef1d --- /dev/null +++ b/runtime/temp/82b05ddecce6a759567776bf5de7a80c.php @@ -0,0 +1,410 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + +
                            + + ID名称所属分类售价总库存排序(升序)是否上架创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/83c6df342413e7d02be711c159b43c3e.php b/runtime/temp/83c6df342413e7d02be711c159b43c3e.php new file mode 100755 index 0000000..fe39bbe --- /dev/null +++ b/runtime/temp/83c6df342413e7d02be711c159b43c3e.php @@ -0,0 +1,315 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + + 会员提现需满足最低提现金额,才能提交提现申请。 +
                            + +
                            +
                            + +
                            + + 会员提现允许的最高提现金额。 +
                            + +
                            +
                            + +
                            + checked> + checked> +
                            +
                            +
                            + +
                            + + 会员提现时收取的手续费。 +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/83f917bda531a2cb05610bdae391cbf5.php b/runtime/temp/83f917bda531a2cb05610bdae391cbf5.php new file mode 100755 index 0000000..4891b6a --- /dev/null +++ b/runtime/temp/83f917bda531a2cb05610bdae391cbf5.php @@ -0,0 +1,488 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + checked type="checkbox" /> + +
                            +
                            + +
                            + +
                            + checked type="checkbox" /> + +
                            +
                            + +
                            + +
                            + data-initial-preview="" type="file" class="form-control field-image" > +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            + + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/8ce96d2ccf9fdb84dec78e0d6b3894eb.php b/runtime/temp/8ce96d2ccf9fdb84dec78e0d6b3894eb.php new file mode 100755 index 0000000..8a4cfb7 --- /dev/null +++ b/runtime/temp/8ce96d2ccf9fdb84dec78e0d6b3894eb.php @@ -0,0 +1,397 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            + + + + + + + + + + + + + $item): ?> + + + + + + + + + + +
                            + + ID名称简介是否启用操作
                            + + + + + + + + + + 的数据吗' + data-url=""> + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/8e00cde16466ac17d1f48848ea9edd93.php b/runtime/temp/8e00cde16466ac17d1f48848ea9edd93.php new file mode 100755 index 0000000..d19ea5d --- /dev/null +++ b/runtime/temp/8e00cde16466ac17d1f48848ea9edd93.php @@ -0,0 +1,381 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + +
                            + + ID名称图片跳转类型跳转目标排序创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/90b7a9f6399f5cd362ae3b9ae3e30cb2.php b/runtime/temp/90b7a9f6399f5cd362ae3b9ae3e30cb2.php new file mode 100755 index 0000000..94e74da --- /dev/null +++ b/runtime/temp/90b7a9f6399f5cd362ae3b9ae3e30cb2.php @@ -0,0 +1,399 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + +
                            +
                            + + +
                            + +
                            + + +
                            +
                            + + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + + + + +
                            +
                            +
                            +
                            + +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/923f6b76fd7936e9ee797826e53591ee.php b/runtime/temp/923f6b76fd7936e9ee797826e53591ee.php new file mode 100755 index 0000000..a3eb344 --- /dev/null +++ b/runtime/temp/923f6b76fd7936e9ee797826e53591ee.php @@ -0,0 +1,40 @@ + + + + + BearAdmin + + + + + + + + + + + + + +
                            +

                            BearAdmin

                            +

                            &一款基于ThinkPHP5.1+AdminLTE的后台快速开发管理系统 

                            +

                            Go→

                            +

                            Github

                            +

                            + Gitee +

                            +
                            + + + + diff --git a/runtime/temp/92ce4fe6e0ffd7b98486d7b6cd264737.php b/runtime/temp/92ce4fe6e0ffd7b98486d7b6cd264737.php new file mode 100755 index 0000000..862bbd3 --- /dev/null +++ b/runtime/temp/92ce4fe6e0ffd7b98486d7b6cd264737.php @@ -0,0 +1,40 @@ + + + + + BearAdmin + + + + + + + + + + + + + +
                            +

                            BearAdmin

                            +

                            &一款基于ThinkPHP5.1+AdminLTE的后台快速开发管理系统 

                            +

                            Go→

                            +

                            Github

                            +

                            + Gitee +

                            +
                            + + + + diff --git a/runtime/temp/9378304ec679e3f8f80d15c791d97e53.php b/runtime/temp/9378304ec679e3f8f80d15c791d97e53.php new file mode 100755 index 0000000..dc61bd5 --- /dev/null +++ b/runtime/temp/9378304ec679e3f8f80d15c791d97e53.php @@ -0,0 +1,365 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + $item): ?> + + + + + + + + + + +
                            + +ID名称创建时间操作
                            + + + + + + 的数据吗' data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/9432cdfc34be3259f2fec0c22f643865.php b/runtime/temp/9432cdfc34be3259f2fec0c22f643865.php new file mode 100755 index 0000000..e990928 --- /dev/null +++ b/runtime/temp/9432cdfc34be3259f2fec0c22f643865.php @@ -0,0 +1,509 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                              +
                            • + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/944285b202c5a2139cd2fe1a1ab74528.php b/runtime/temp/944285b202c5a2139cd2fe1a1ab74528.php new file mode 100755 index 0000000..124f124 --- /dev/null +++ b/runtime/temp/944285b202c5a2139cd2fe1a1ab74528.php @@ -0,0 +1,413 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            + 头像 +

                            +

                            +

                            + $role): ?> + + +

                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/96f9d553a18f3231f074f626de1815a2.php b/runtime/temp/96f9d553a18f3231f074f626de1815a2.php new file mode 100755 index 0000000..d8134ac --- /dev/null +++ b/runtime/temp/96f9d553a18f3231f074f626de1815a2.php @@ -0,0 +1,458 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            +
                            + + +
                            +
                            +
                            + + +
                            + +
                            +
                            + +
                            +
                            +
                            + + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + +
                            + +
                            + +
                            +
                            + + + +
                            + +
                            + + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/9727c31891dd25a4108fae0db45c4d86.php b/runtime/temp/9727c31891dd25a4108fae0db45c4d86.php new file mode 100755 index 0000000..64ee16f --- /dev/null +++ b/runtime/temp/9727c31891dd25a4108fae0db45c4d86.php @@ -0,0 +1,329 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + +
                            + + ID名称操作
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/98b3c4ff4fb93242dabc9398a0775641.php b/runtime/temp/98b3c4ff4fb93242dabc9398a0775641.php new file mode 100755 index 0000000..0407887 --- /dev/null +++ b/runtime/temp/98b3c4ff4fb93242dabc9398a0775641.php @@ -0,0 +1,194 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + +
                            + + + +
                            + +
                            + +
                            +
                            + 商品信息 +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + $goods): ?> + + + + + + + + +
                            图片商品名称商品信息操作
                            +
                            + $img): ?> +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +

                            购买价格:

                            +

                            尺寸:

                            +

                            品牌:

                            +

                            品类:

                            +

                            品相:

                            +

                            购买渠道:

                            +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            + + + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/9d78a99c18ef21db82e003301747d7df.php b/runtime/temp/9d78a99c18ef21db82e003301747d7df.php new file mode 100755 index 0000000..392ccdd --- /dev/null +++ b/runtime/temp/9d78a99c18ef21db82e003301747d7df.php @@ -0,0 +1,472 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + checked> + checked> + checked> +
                            +
                            +
                            + +
                            + + + + + + + + + $item1): ?> + + + + + + +
                            商品名称操作
                            + + + + 追加 + 删除 +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + checked type="checkbox" /> + +
                            +
                            + + +
                            + + +
                            +
                            +
                            +
                            +
                            + + + + + + + +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/9f1fd0aa1dc7669b70d8234051ab0f87.php b/runtime/temp/9f1fd0aa1dc7669b70d8234051ab0f87.php new file mode 100755 index 0000000..1687355 --- /dev/null +++ b/runtime/temp/9f1fd0aa1dc7669b70d8234051ab0f87.php @@ -0,0 +1,442 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + +
                            + + ID头像用户等级用户名手机号昵称是否启用创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/a045e9977e4fe456fabf09b878a174d2.php b/runtime/temp/a045e9977e4fe456fabf09b878a174d2.php new file mode 100755 index 0000000..cffd0d0 --- /dev/null +++ b/runtime/temp/a045e9977e4fe456fabf09b878a174d2.php @@ -0,0 +1,236 @@ + + + + + + + + <?php echo htmlentities($admin['title']); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'OneWeekBackend')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/temp/a1d4e60642f6b835e5c2db5d8f891359.php b/runtime/temp/a1d4e60642f6b835e5c2db5d8f891359.php new file mode 100755 index 0000000..3407daa --- /dev/null +++ b/runtime/temp/a1d4e60642f6b835e5c2db5d8f891359.php @@ -0,0 +1,329 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + +
                            + + ID名称操作
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/a83f3931cb0a5ea199029f5bec1163b3.php b/runtime/temp/a83f3931cb0a5ea199029f5bec1163b3.php new file mode 100755 index 0000000..6112b1d --- /dev/null +++ b/runtime/temp/a83f3931cb0a5ea199029f5bec1163b3.php @@ -0,0 +1,515 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + +
                            + + +
                            用户信息
                            +
                            +
                            用户等级
                            +
                            +
                            可提现积分
                            +
                            +
                            设备数量
                            +
                            +
                            上级推荐人
                            +
                            推荐下级人数
                            注册时间
                            +
                            操作
                            +
                            + + +
                            + +
                            +

                            用户编号:

                            +

                            用户昵称:

                            +

                            用户手机:

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + +
                            +

                            用户编号:

                            +

                            用户昵称:

                            +

                            用户手机:

                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            + + 修改 + + + 分配设备 + + + 的数据吗' + data-url=""> + 禁用 + + + 的数据吗' + data-url=""> + 启用 + + +
                            + +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/a9e57152b04add4e700c694554953f5c.php b/runtime/temp/a9e57152b04add4e700c694554953f5c.php new file mode 100755 index 0000000..5d8b2b3 --- /dev/null +++ b/runtime/temp/a9e57152b04add4e700c694554953f5c.php @@ -0,0 +1,335 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/af3a517b5ef4fdb4aea217d0b9591c92.php b/runtime/temp/af3a517b5ef4fdb4aea217d0b9591c92.php new file mode 100755 index 0000000..d707ae4 --- /dev/null +++ b/runtime/temp/af3a517b5ef4fdb4aea217d0b9591c92.php @@ -0,0 +1,261 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +

                            404

                            +
                            +

                            哎呀!找不到页面。

                            +

                            + 我们找不到您要查找的页面。 + 同时,您可以

                            返回上一页 或者 去首页 +

                            +
                            +
                            +
                            + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/b208449c7be3f6e4674ab37f36934143.php b/runtime/temp/b208449c7be3f6e4674ab37f36934143.php new file mode 100755 index 0000000..4107fd1 --- /dev/null +++ b/runtime/temp/b208449c7be3f6e4674ab37f36934143.php @@ -0,0 +1,236 @@ + + + + + + + + <?php echo htmlentities($admin['title']); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'OneWeekBackend')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/temp/b22f159b01fa4d944a522fef5a1e3042.php b/runtime/temp/b22f159b01fa4d944a522fef5a1e3042.php new file mode 100755 index 0000000..222ac8b --- /dev/null +++ b/runtime/temp/b22f159b01fa4d944a522fef5a1e3042.php @@ -0,0 +1,408 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +

                            前端生成二维码

                            +
                            + + +
                            +
                            +
                            +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +

                            生成结果

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + +
                            +
                            + +
                            +

                            PHP生成二维码

                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +

                            生成结果

                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + + + + + +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/b77ef641e1a16f32561a8512f4601252.php b/runtime/temp/b77ef641e1a16f32561a8512f4601252.php new file mode 100755 index 0000000..f24cf3d --- /dev/null +++ b/runtime/temp/b77ef641e1a16f32561a8512f4601252.php @@ -0,0 +1,637 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + + +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                              +
                            • 基本设置
                            • +
                            • 商品详情
                            • +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + + + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + + +
                            +
                            +
                            +
                            + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/b9a7b02a74574b9f76719f1c149b51d6.php b/runtime/temp/b9a7b02a74574b9f76719f1c149b51d6.php new file mode 100755 index 0000000..eb6f3c5 --- /dev/null +++ b/runtime/temp/b9a7b02a74574b9f76719f1c149b51d6.php @@ -0,0 +1,140 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + +
                            + + +
                            + +
                            +
                            +
                            +
                              +
                            • 余额调整
                            • +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + + +
                            +
                            +
                            + +
                            + + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/ba3f5fb7ff81d44e9ffcb54685cb4ac6.php b/runtime/temp/ba3f5fb7ff81d44e9ffcb54685cb4ac6.php new file mode 100755 index 0000000..1874f53 --- /dev/null +++ b/runtime/temp/ba3f5fb7ff81d44e9ffcb54685cb4ac6.php @@ -0,0 +1,333 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/ba8514d8366dae3d00addb4ed784cf05.php b/runtime/temp/ba8514d8366dae3d00addb4ed784cf05.php new file mode 100755 index 0000000..1e397a1 --- /dev/null +++ b/runtime/temp/ba8514d8366dae3d00addb4ed784cf05.php @@ -0,0 +1,381 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + data-initial-preview="" type="file" + class="form-control field-image" > +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/baab3be00eccd6fb51c44d19b9f4d0b8.php b/runtime/temp/baab3be00eccd6fb51c44d19b9f4d0b8.php new file mode 100755 index 0000000..4b9750e --- /dev/null +++ b/runtime/temp/baab3be00eccd6fb51c44d19b9f4d0b8.php @@ -0,0 +1,236 @@ + + + + + + + + <?php echo htmlentities($admin['title']); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'OneWeekBackend')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/temp/bc32ed14905b128c0801e0822e3f166e.php b/runtime/temp/bc32ed14905b128c0801e0822e3f166e.php new file mode 100755 index 0000000..3cd1fa6 --- /dev/null +++ b/runtime/temp/bc32ed14905b128c0801e0822e3f166e.php @@ -0,0 +1,542 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + + + + + + + + + + + + $item): ?> + + + + + + + + + +
                            +
                            订单信息
                            +
                            +
                            用户信息
                            +
                            +
                            商品信息
                            +
                            +
                            收货信息
                            +
                            操作
                            +
                            +
                            +

                            订单编号:

                            +

                            订单状态:

                            +

                            订单金额:

                            +

                            下单时间:

                            +
                            +
                            +
                            +
                            + +
                            +

                            用户编号:

                            +

                            用户昵称:

                            +

                            用户手机:

                            +
                            +
                            +
                            + $item1): ?> +
                            + +
                            + + ¥ +
                            + + 件 +
                            +
                            + +
                            +
                            +
                            +

                            收货人:

                            +

                            手机号码:

                            +

                            收货地址:

                            +
                            +
                            +
                            +
                            + + + + + + +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/bcccf289406e038698d49be9bc4d2bc3.php b/runtime/temp/bcccf289406e038698d49be9bc4d2bc3.php new file mode 100755 index 0000000..2681be0 --- /dev/null +++ b/runtime/temp/bcccf289406e038698d49be9bc4d2bc3.php @@ -0,0 +1,424 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/bf16129287401232877718cb3278b343.php b/runtime/temp/bf16129287401232877718cb3278b343.php new file mode 100755 index 0000000..4a60ea1 --- /dev/null +++ b/runtime/temp/bf16129287401232877718cb3278b343.php @@ -0,0 +1,365 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + $item): ?> + + + + + + + + + + +
                            + +ID名称创建时间操作
                            + + + + + + 的数据吗' data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/c1bbcbcaf7ca31606b5c1dcd110e73a8.php b/runtime/temp/c1bbcbcaf7ca31606b5c1dcd110e73a8.php new file mode 100755 index 0000000..d88990a --- /dev/null +++ b/runtime/temp/c1bbcbcaf7ca31606b5c1dcd110e73a8.php @@ -0,0 +1,345 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/c39cf8c517fc220fb9bd18b89029c306.php b/runtime/temp/c39cf8c517fc220fb9bd18b89029c306.php new file mode 100755 index 0000000..15d70cf --- /dev/null +++ b/runtime/temp/c39cf8c517fc220fb9bd18b89029c306.php @@ -0,0 +1,433 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + data-initial-preview="" type="file" + class="form-control field-image" > +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/c421dc59df51f2b11166866e1823099d.php b/runtime/temp/c421dc59df51f2b11166866e1823099d.php new file mode 100755 index 0000000..13bca6d --- /dev/null +++ b/runtime/temp/c421dc59df51f2b11166866e1823099d.php @@ -0,0 +1,369 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + + + + + + + + + + + + + + + + + $list): ?> + + + + + + + + + + + + +
                            ID用户操作URL请求方式IP日期操作
                            adminUser->nickname); ?> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/c46fb554bddd4a0f693547420f648a63.php b/runtime/temp/c46fb554bddd4a0f693547420f648a63.php new file mode 100755 index 0000000..e501728 --- /dev/null +++ b/runtime/temp/c46fb554bddd4a0f693547420f648a63.php @@ -0,0 +1,233 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + +
                            + + + +
                            + +
                            + +
                            +
                            + 取货信息 +
                            +
                            +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            + 退货信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            无需退回
                            +
                            + +
                            +
                            + 商品信息 +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + $goods): ?> + + + + + + + + +
                            图片商品名称商品信息操作
                            +
                            + $img): ?> +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +

                            购买价格:

                            +

                            尺寸:

                            +

                            品牌:

                            +

                            品类:

                            +

                            品相:

                            +

                            购买渠道:

                            +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                            + + + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/c5d2d84719a4b606206c34edbbd09e49.php b/runtime/temp/c5d2d84719a4b606206c34edbbd09e49.php new file mode 100755 index 0000000..d23c307 --- /dev/null +++ b/runtime/temp/c5d2d84719a4b606206c34edbbd09e49.php @@ -0,0 +1,380 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + + + + +
                            + +ID用户姓名手机号省市区街道详细地址是否默认创建时间操作
                            + + + + + + 的数据吗' data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/c608f6a65c7acfa2879dab2b3477f185.php b/runtime/temp/c608f6a65c7acfa2879dab2b3477f185.php new file mode 100755 index 0000000..7e34100 --- /dev/null +++ b/runtime/temp/c608f6a65c7acfa2879dab2b3477f185.php @@ -0,0 +1,274 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + +
                            + 代码自动生成 + 点击跳转 +
                            +
                            +
                            + +
                            +
                            + +
                            + 表单字段生成 + 点击跳转 +
                            +
                            +
                            + +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/c61f2898fb8e57afe2b7149fc21ea93b.php b/runtime/temp/c61f2898fb8e57afe2b7149fc21ea93b.php new file mode 100755 index 0000000..6427dbc --- /dev/null +++ b/runtime/temp/c61f2898fb8e57afe2b7149fc21ea93b.php @@ -0,0 +1,209 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + +
                            +
                            + +
                            + +
                            + + +
                            +
                            +
                            + +
                            审核拒绝后,提现金额会全部退回佣金账户
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + + +
                            +
                            +
                            + + +
                            + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/c656dd49758c8dbfe53de2ca99d2ba71.php b/runtime/temp/c656dd49758c8dbfe53de2ca99d2ba71.php new file mode 100755 index 0000000..9f670f3 --- /dev/null +++ b/runtime/temp/c656dd49758c8dbfe53de2ca99d2ba71.php @@ -0,0 +1,422 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + +
                            +
                            +
                            订单概况
                            +
                            +
                            +
                            +
                            + +
                            本月订单金额(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            订单总金额(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            订单总数(笔)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            退款订单总额(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            退款订单总数(笔)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            +
                            +
                            会员概况
                            +
                            +
                            +
                            +
                            + +
                            会员余额(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            会员积分
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            会员可提现佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            会员已提现佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + + +
                            +
                            +
                            分销概况
                            +
                            +
                            +
                            +
                            + +
                            本月分销佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            分销总佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            提现中佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            + +
                            已提现佣金(元)
                            +
                            + +

                            1

                            +
                            +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/c7190158ad2a0e70ba0b5c484253b89a.php b/runtime/temp/c7190158ad2a0e70ba0b5c484253b89a.php new file mode 100755 index 0000000..7dd0938 --- /dev/null +++ b/runtime/temp/c7190158ad2a0e70ba0b5c484253b89a.php @@ -0,0 +1,381 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + + + + +
                            +

                            【name; ?>】授权

                            + +
                            +
                            +
                            +
                            +
                            + + + + +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/c746f7cbc8a515dc2e0218dbab8e6da1.php b/runtime/temp/c746f7cbc8a515dc2e0218dbab8e6da1.php new file mode 100755 index 0000000..172acb6 --- /dev/null +++ b/runtime/temp/c746f7cbc8a515dc2e0218dbab8e6da1.php @@ -0,0 +1,494 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +

                            你好,:

                            + 欢迎来到,左侧为菜单区域,右侧为功能区。 +
                            +
                            +
                            + + + +
                            +
                            +
                            + + + +
                            + 后台用户 + +
                            +
                            +
                            + +
                            +
                            + + + +
                            + 后台角色 + +
                            +
                            +
                            + +
                            +
                            + + + +
                            + 后台菜单 + +
                            +
                            +
                            + +
                            + +
                            +
                            + + + + +
                            + 操作日志 + +
                            +
                            +
                            + +
                            + + +
                            +
                            + +
                            +
                            +

                            访问信息

                            +
                            +
                            + + + + + + + + + + + + + + + + + +
                            用户系统用户IP
                            浏览器所在城市
                            +
                            +
                            + +
                            +
                            +

                            系统信息

                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            服务器系统服务器IP
                            PHP版本运行内存限制
                            最大文件上传限制单次上传数量限制
                            最大POST限制项目磁盘剩余容量
                            ThinkPHP版本后台系统版本
                            MySql版本PHP当前运行模式
                            PHP当前时区PHP当前时间
                            +
                            +
                            + +
                            + + +
                            +
                            +
                            +

                            依赖关系

                            +
                            +
                            + + + $item): ?> + + + + + $item): ?> + + + + + + +
                            +
                            +
                            +
                            +
                            + +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/c7b7683e25c7d5a54b9f8aaff2590dae.php b/runtime/temp/c7b7683e25c7d5a54b9f8aaff2590dae.php new file mode 100755 index 0000000..1dd8b4e --- /dev/null +++ b/runtime/temp/c7b7683e25c7d5a54b9f8aaff2590dae.php @@ -0,0 +1,296 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + + + + + + + + + + + + + + + + + + +
                            + + ID菜单名称url父级ID图标排序状态日志记录方式操作
                            +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/cd3367801629ec6765eafe20c5c36ebb.php b/runtime/temp/cd3367801629ec6765eafe20c5c36ebb.php new file mode 100755 index 0000000..6f9909b --- /dev/null +++ b/runtime/temp/cd3367801629ec6765eafe20c5c36ebb.php @@ -0,0 +1,413 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            + 头像 +

                            +

                            +

                            + $role): ?> + + +

                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php b/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php new file mode 100755 index 0000000..fb2a11b --- /dev/null +++ b/runtime/temp/ce8ecc9e12adf5d8127ce76862c569c1.php @@ -0,0 +1,273 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + +
                            + + + +
                            + +
                            + +
                            +
                            + 取货信息 +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            + 退货信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            无需退回
                            +
                            + +
                            +
                            + 商品信息 +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + $goods): ?> + + + + + + + + +
                            图片商品名称商品信息操作
                            +
                            + $img): ?> +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +

                            购买价格:

                            +

                            尺寸:

                            +

                            品牌:

                            +

                            品类:

                            +

                            品相:

                            +

                            购买渠道:

                            +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/d112b38d2916e192569347d402ab8ffd.php b/runtime/temp/d112b38d2916e192569347d402ab8ffd.php new file mode 100755 index 0000000..7cf2e42 --- /dev/null +++ b/runtime/temp/d112b38d2916e192569347d402ab8ffd.php @@ -0,0 +1,341 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/d37914ba03bc26e81f6068b1b7351c81.php b/runtime/temp/d37914ba03bc26e81f6068b1b7351c81.php new file mode 100755 index 0000000..ab56b3c --- /dev/null +++ b/runtime/temp/d37914ba03bc26e81f6068b1b7351c81.php @@ -0,0 +1,418 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            +
                            + + + + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + +
                            流水单号(20位)会员昵称会员编号手机号码来源类型来源单号变动总数剩余总数变动时间
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/d41b160c460be4dd3ee8660ea187db57.php b/runtime/temp/d41b160c460be4dd3ee8660ea187db57.php new file mode 100755 index 0000000..ec971ac --- /dev/null +++ b/runtime/temp/d41b160c460be4dd3ee8660ea187db57.php @@ -0,0 +1,381 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + +
                            + + ID名称图片跳转类型跳转目标排序创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/db717213f788d904396d7e40b8819b5c.php b/runtime/temp/db717213f788d904396d7e40b8819b5c.php new file mode 100755 index 0000000..8bf49b2 --- /dev/null +++ b/runtime/temp/db717213f788d904396d7e40b8819b5c.php @@ -0,0 +1,369 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + + + + + + + + + + + + + + + + + $list): ?> + + + + + + + + + + + + +
                            ID用户操作URL请求方式IP日期操作
                            adminUser->nickname); ?> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/dd0e8021b0341fd83e817605b2639fc0.php b/runtime/temp/dd0e8021b0341fd83e817605b2639fc0.php new file mode 100755 index 0000000..edd8c55 --- /dev/null +++ b/runtime/temp/dd0e8021b0341fd83e817605b2639fc0.php @@ -0,0 +1,397 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            + + + + + + + + + + + + + $item): ?> + + + + + + + + + + +
                            + + ID名称简介是否启用操作
                            + + + + + + + + + + 的数据吗' + data-url=""> + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/e02ecfe643e6d8db4003d82dfc47a91b.php b/runtime/temp/e02ecfe643e6d8db4003d82dfc47a91b.php new file mode 100755 index 0000000..dd4e839 --- /dev/null +++ b/runtime/temp/e02ecfe643e6d8db4003d82dfc47a91b.php @@ -0,0 +1,418 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + +
                            + + +
                            + +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + + + + + +
                            + + ID图片名称所属分类品牌原价售价重量(克)库存排序(升序)是否上架创建时间操作
                            + + + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/e36eb1afe42271d845632f25a7797fdb.php b/runtime/temp/e36eb1afe42271d845632f25a7797fdb.php new file mode 100755 index 0000000..be799ce --- /dev/null +++ b/runtime/temp/e36eb1afe42271d845632f25a7797fdb.php @@ -0,0 +1,446 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + + +
                            + +
                            + +
                            +
                            +
                            + +
                            + + 多个购买渠道请用英文逗号分隔 +
                            +
                            +
                            + +
                            + + 寄卖满XX件才可下单 +
                            +
                            +
                            + +
                            + + 多个尺寸请用英文逗号分隔 +
                            +
                            +
                            + +
                              +
                            • + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/e44d36ddca4257579a334fe530885259.php b/runtime/temp/e44d36ddca4257579a334fe530885259.php new file mode 100755 index 0000000..707c947 --- /dev/null +++ b/runtime/temp/e44d36ddca4257579a334fe530885259.php @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            +
                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            日志摘要
                            日志ID
                            操作用户adminUser->nickname); ?>
                            操作
                            url
                            类型
                            ip
                            日期
                            数据详情
                            +
                            +
                            +
                            +
                            +
                            +
                            \ No newline at end of file diff --git a/runtime/temp/e6266d45db3278f17e4e1ffe3702b1e5.php b/runtime/temp/e6266d45db3278f17e4e1ffe3702b1e5.php new file mode 100755 index 0000000..1060b7a --- /dev/null +++ b/runtime/temp/e6266d45db3278f17e4e1ffe3702b1e5.php @@ -0,0 +1,218 @@ + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + +
                            + + + +
                            + +
                            + + +
                            +
                            + 收货信息 +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + + +
                            +
                            + 商品信息 +
                            +
                            + +
                            + + + + + + + + + + + + + + + + $goods): ?> + + + + + + + +
                            商品信息价格(元)数量
                            +
                            +
                            + +
                            +
                            +

                            +
                            +

                            +
                            +
                            +
                            ¥
                            +
                            + +
                            +
                            + 快递配送 +
                            +
                            + + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            + + +
                            +
                            +
                            +
                            + + + + +
                            + + + + + \ No newline at end of file diff --git a/runtime/temp/ea2b43c0efd4291c5463fce50a50f898.php b/runtime/temp/ea2b43c0efd4291c5463fce50a50f898.php new file mode 100755 index 0000000..eebedbe --- /dev/null +++ b/runtime/temp/ea2b43c0efd4291c5463fce50a50f898.php @@ -0,0 +1,494 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            + + +
                            +
                            +
                            +

                            你好,:

                            + 欢迎来到,左侧为菜单区域,右侧为功能区。 +
                            +
                            +
                            + + + +
                            +
                            +
                            + + + +
                            + 后台用户 + +
                            +
                            +
                            + +
                            +
                            + + + +
                            + 后台角色 + +
                            +
                            +
                            + +
                            +
                            + + + +
                            + 后台菜单 + +
                            +
                            +
                            + +
                            + +
                            +
                            + + + + +
                            + 操作日志 + +
                            +
                            +
                            + +
                            + + +
                            +
                            + +
                            +
                            +

                            访问信息

                            +
                            +
                            + + + + + + + + + + + + + + + + + +
                            用户系统用户IP
                            浏览器所在城市
                            +
                            +
                            + +
                            +
                            +

                            系统信息

                            +
                            +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            服务器系统服务器IP
                            PHP版本运行内存限制
                            最大文件上传限制单次上传数量限制
                            最大POST限制项目磁盘剩余容量
                            ThinkPHP版本后台系统版本
                            MySql版本PHP当前运行模式
                            PHP当前时区PHP当前时间
                            +
                            +
                            + +
                            + + +
                            +
                            +
                            +

                            依赖关系

                            +
                            +
                            + + + $item): ?> + + + + + $item): ?> + + + + + + +
                            +
                            +
                            +
                            +
                            + +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/ea72211e538214c2a078e0a870e24a39.php b/runtime/temp/ea72211e538214c2a078e0a870e24a39.php new file mode 100755 index 0000000..0ccd2d8 --- /dev/null +++ b/runtime/temp/ea72211e538214c2a078e0a870e24a39.php @@ -0,0 +1,381 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + +
                            +
                            +
                            +
                            + + + + +
                            +

                            【name; ?>】授权

                            + +
                            +
                            +
                            +
                            +
                            + + + + +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + +
                            +
                            + + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/ec3fe84ad80333179baaed567d6d8ff1.php b/runtime/temp/ec3fe84ad80333179baaed567d6d8ff1.php new file mode 100755 index 0000000..a74b4b7 --- /dev/null +++ b/runtime/temp/ec3fe84ad80333179baaed567d6d8ff1.php @@ -0,0 +1,343 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/f05ad18c2263d7f6f99278132d052784.php b/runtime/temp/f05ad18c2263d7f6f99278132d052784.php new file mode 100755 index 0000000..4b18dc8 --- /dev/null +++ b/runtime/temp/f05ad18c2263d7f6f99278132d052784.php @@ -0,0 +1,296 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + + + + + + + + + + + + + + + + + + +
                            + + ID菜单名称url父级ID图标排序状态日志记录方式操作
                            +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/f2d9f6dbcdd87e5581da67b9cff6779e.php b/runtime/temp/f2d9f6dbcdd87e5581da67b9cff6779e.php new file mode 100755 index 0000000..d2fa2ba --- /dev/null +++ b/runtime/temp/f2d9f6dbcdd87e5581da67b9cff6779e.php @@ -0,0 +1,637 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + + +
                            +
                            +
                            + + + +
                            +
                            +
                            +
                              +
                            • 基本设置
                            • +
                            • 商品详情
                            • +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + + + +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + +
                            + +
                            + checked type="checkbox"/> + +
                            +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + + +
                            +
                            +
                            +
                            + + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/f3d6a6ca8fbe2d6a1de4bab279abec0d.php b/runtime/temp/f3d6a6ca8fbe2d6a1de4bab279abec0d.php new file mode 100755 index 0000000..0903983 --- /dev/null +++ b/runtime/temp/f3d6a6ca8fbe2d6a1de4bab279abec0d.php @@ -0,0 +1,40 @@ + + + + + BearAdmin + + + + + + + + + + + + + +
                            +

                            BearAdmin

                            +

                            &一款基于ThinkPHP5.1+AdminLTE的后台快速开发管理系统 

                            +

                            Go→

                            +

                            Github

                            +

                            + Gitee +

                            +
                            + + + + diff --git a/runtime/temp/f5b488376f5690f11cfc96a92e7f1f83.php b/runtime/temp/f5b488376f5690f11cfc96a92e7f1f83.php new file mode 100755 index 0000000..061b5dc --- /dev/null +++ b/runtime/temp/f5b488376f5690f11cfc96a92e7f1f83.php @@ -0,0 +1,392 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + +
                            + + ID昵称账号角色是否启用操作
                            + + + $role): ?> + + + + + + + + 的数据吗' data-url=""> + + + + + 的数据吗' + data-url=""> + + + + 的数据吗' + data-url=""> + + + +
                            +
                            + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/f6e6515077c0b17eb6596dd9e35705f7.php b/runtime/temp/f6e6515077c0b17eb6596dd9e35705f7.php new file mode 100755 index 0000000..7cdf61c --- /dev/null +++ b/runtime/temp/f6e6515077c0b17eb6596dd9e35705f7.php @@ -0,0 +1,339 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            +
                            +
                            +
                            + + + +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + data-initial-preview="" type="file" class="form-control field-image" > +
                            +
                            + + +
                            + + +
                            +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/f921e9c60f73462d4e20174722ee091c.php b/runtime/temp/f921e9c60f73462d4e20174722ee091c.php new file mode 100755 index 0000000..964454b --- /dev/null +++ b/runtime/temp/f921e9c60f73462d4e20174722ee091c.php @@ -0,0 +1,495 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + +
                            +
                            + + + + +
                            +
                            + +
                            + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + +
                            +
                            提现单号
                            +
                            +
                            用户信息
                            +
                            +
                            收款账户信息
                            +
                            提现金额信息
                            提现状态
                            审核备注
                            创建时间
                            操作
                            +
                            +
                            +
                            + +
                            +

                            用户编号:

                            +

                            用户昵称:

                            +

                            用户手机:

                            +
                            +
                            +
                            +
                            +
                            +

                            提现方式:

                            +

                            提现姓名:

                            +

                            提现手机:

                            +

                            提现账户:

                            + +

                            提现开户:

                            + +
                            +
                            +
                            +
                            +
                            +

                            用户提现金额:

                            +

                            手续费:

                            +

                            用户到账金额:

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + + 审核 + + +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/f9a6537754190cfe980e78bf4b23c67e.php b/runtime/temp/f9a6537754190cfe980e78bf4b23c67e.php new file mode 100755 index 0000000..93725c0 --- /dev/null +++ b/runtime/temp/f9a6537754190cfe980e78bf4b23c67e.php @@ -0,0 +1,514 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + +
                            + + +
                            用户信息
                            +
                            +
                            用户等级
                            +
                            +
                            可提现金额
                            +
                            +
                            设备数量
                            +
                            注册时间
                            +
                            操作
                            +
                            + + +
                            + +
                            +

                            用户编号:

                            +

                            用户昵称:

                            +

                            用户手机:

                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + + 修改 + + '> + 账户调整 + + + 的数据吗' + data-url=""> + 禁用 + + + 的数据吗' + data-url=""> + 启用 + + +
                            + +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/fc266dc09feb512a679e6d0806d44832.php b/runtime/temp/fc266dc09feb512a679e6d0806d44832.php new file mode 100755 index 0000000..fd36845 --- /dev/null +++ b/runtime/temp/fc266dc09feb512a679e6d0806d44832.php @@ -0,0 +1,236 @@ + + + + + + + + <?php echo htmlentities($admin['title']); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'OneWeekBackend')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runtime/temp/fd724911bed56f534e4eb5a80ecb4ef2.php b/runtime/temp/fd724911bed56f534e4eb5a80ecb4ef2.php new file mode 100755 index 0000000..a65e766 --- /dev/null +++ b/runtime/temp/fd724911bed56f534e4eb5a80ecb4ef2.php @@ -0,0 +1,356 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + +
                            + +
                            + +
                            +
                            + + + + +
                            + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $item): ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            基本信息
                            订单ID订单号订单金额下单人[]下单时间
                            支付信息
                            应付金额支付方式实付金额支付状态付款时间
                            商品信息
                            名称价格数量小记
                            收货信息
                            发货状态收货人姓名订收货人手机号收货地址快递单号[]
                            +
                            + + + + +
                            +
                            +
                            + +
                            + + +
                            + + + +
                            + + Copyright © 2019 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/runtime/temp/fe63730b8931f4627b3583cb42f362b9.php b/runtime/temp/fe63730b8931f4627b3583cb42f362b9.php new file mode 100755 index 0000000..80138ae --- /dev/null +++ b/runtime/temp/fe63730b8931f4627b3583cb42f362b9.php @@ -0,0 +1,576 @@ + + + + + + + + + + + + <?php echo htmlentities((isset($admin['title']) && ($admin['title'] !== '')?$admin['title']:'Admin')); ?> | <?php echo htmlentities((isset($admin['name']) && ($admin['name'] !== '')?$admin['name']:'Admin')); ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
                            + + + + + + +
                            + + +
                            + + + + + + + + + + + +
                            + + +
                            +

                            + +

                            + +
                            + +get('error_message')): ?> + + +get('success_message')): ?> + + + + + + + +
                            + + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            + +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            + +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            +
                            + +
                            +
                            +
                            +
                            + + + + + + + + + + + + + $item): ?> + + + + + + + + + + +
                            +
                            订单信息
                            +
                            +
                            用户信息
                            +
                            +
                            商品信息
                            +
                            +
                            取货信息
                            +
                            +
                            退货信息
                            +
                            操作
                            +
                            +
                            +

                            订单编号:

                            +

                            订单状态:

                            +

                            订单金额:

                            +

                            下单时间:

                            +
                            +
                            +
                            +
                            + +
                            +

                            用户编号:

                            +

                            用户昵称:

                            +

                            用户手机:

                            +
                            +
                            +
                            + $item1): ?> +
                            +
                            + + ¥ +
                            + +
                            +
                            + +
                            +
                            +
                            +

                            取货人:

                            +

                            手机号码:

                            +

                            取货地址:

                            +
                            +
                            +
                            + +
                            +
                            +

                            退货人:

                            +

                            手机号码:

                            +

                            退货地址:

                            +
                            +
                            + + 无需退回 + +
                            +
                            + + + + + + + + + + +
                            +
                            +
                            + + + + +
                            +
                            +
                            +
                            + + +
                            + + + +
                            + + Copyright © 2020 . All rights + reserved. +
                            + + + + + + + +
                            + +
                            + + + + \ No newline at end of file diff --git a/think b/think new file mode 100755 index 0000000..6a923b3 --- /dev/null +++ b/think @@ -0,0 +1,22 @@ +#!/usr/bin/env php + +// +---------------------------------------------------------------------- + +namespace think; + +// 加载基础文件 +require __DIR__ . '/thinkphp/base.php'; + +// 应用初始化 +Container::get('app')->path(__DIR__ . '/application/')->initialize(); + +// 控制台初始化 +Console::init(); \ No newline at end of file diff --git a/thinkphp/.gitignore b/thinkphp/.gitignore new file mode 100755 index 0000000..f7775ba --- /dev/null +++ b/thinkphp/.gitignore @@ -0,0 +1,8 @@ +/vendor +composer.phar +composer.lock +.DS_Store +Thumbs.db +/phpunit.xml +/.idea +/.vscode \ No newline at end of file diff --git a/thinkphp/.htaccess b/thinkphp/.htaccess new file mode 100755 index 0000000..3418e55 --- /dev/null +++ b/thinkphp/.htaccess @@ -0,0 +1 @@ +deny from all \ No newline at end of file diff --git a/thinkphp/CONTRIBUTING.md b/thinkphp/CONTRIBUTING.md new file mode 100755 index 0000000..6cefcb3 --- /dev/null +++ b/thinkphp/CONTRIBUTING.md @@ -0,0 +1,119 @@ +如何贡献我的源代码 +=== + +此文档介绍了 ThinkPHP 团队的组成以及运转机制,您提交的代码将给 ThinkPHP 项目带来什么好处,以及如何才能加入我们的行列。 + +## 通过 Github 贡献代码 + +ThinkPHP 目前使用 Git 来控制程序版本,如果你想为 ThinkPHP 贡献源代码,请先大致了解 Git 的使用方法。我们目前把项目托管在 GitHub 上,任何 GitHub 用户都可以向我们贡献代码。 + +参与的方式很简单,`fork`一份 ThinkPHP 的代码到你的仓库中,修改后提交,并向我们发起`pull request`申请,我们会及时对代码进行审查并处理你的申请并。审查通过后,你的代码将被`merge`进我们的仓库中,这样你就会自动出现在贡献者名单里了,非常方便。 + +我们希望你贡献的代码符合: + +* ThinkPHP 的编码规范 +* 适当的注释,能让其他人读懂 +* 遵循 Apache2 开源协议 + +**如果想要了解更多细节或有任何疑问,请继续阅读下面的内容** + +### 注意事项 + +* 本项目代码格式化标准选用 [**PSR-2**](http://www.kancloud.cn/thinkphp/php-fig-psr/3141); +* 类名和类文件名遵循 [**PSR-4**](http://www.kancloud.cn/thinkphp/php-fig-psr/3144); +* 对于 Issues 的处理,请使用诸如 `fix #xxx(Issue ID)` 的 commit title 直接关闭 issue。 +* 系统会自动在 PHP 5.4 5.5 5.6 7.0 和 HHVM 上测试修改,其中 HHVM 下的测试容许报错,请确保你的修改符合 PHP 5.4 ~ 5.6 和 PHP 7.0 的语法规范; +* 管理员不会合并造成 CI faild 的修改,若出现 CI faild 请检查自己的源代码或修改相应的[单元测试文件](tests); + +## GitHub Issue + +GitHub 提供了 Issue 功能,该功能可以用于: + +* 提出 bug +* 提出功能改进 +* 反馈使用体验 + +该功能不应该用于: + + * 提出修改意见(涉及代码署名和修订追溯问题) + * 不友善的言论 + +## 快速修改 + +**GitHub 提供了快速编辑文件的功能** + +1. 登录 GitHub 帐号; +2. 浏览项目文件,找到要进行修改的文件; +3. 点击右上角铅笔图标进行修改; +4. 填写 `Commit changes` 相关内容(Title 必填); +5. 提交修改,等待 CI 验证和管理员合并。 + +**若您需要一次提交大量修改,请继续阅读下面的内容** + +## 完整流程 + +1. `fork`本项目; +2. 克隆(`clone`)你 `fork` 的项目到本地; +3. 新建分支(`branch`)并检出(`checkout`)新分支; +4. 添加本项目到你的本地 git 仓库作为上游(`upstream`); +5. 进行修改,若你的修改包含方法或函数的增减,请记得修改[单元测试文件](tests); +6. 变基(衍合 `rebase`)你的分支到上游 master 分支; +7. `push` 你的本地仓库到 GitHub; +8. 提交 `pull request`; +9. 等待 CI 验证(若不通过则重复 5~7,GitHub 会自动更新你的 `pull request`); +10. 等待管理员处理,并及时 `rebase` 你的分支到上游 master 分支(若上游 master 分支有修改)。 + +*若有必要,可以 `git push -f` 强行推送 rebase 后的分支到自己的 `fork`* + +*绝对不可以使用 `git push -f` 强行推送修改到上游* + +### 注意事项 + +* 若对上述流程有任何不清楚的地方,请查阅 GIT 教程,如 [这个](http://backlogtool.com/git-guide/cn/); +* 对于代码**不同方面**的修改,请在自己 `fork` 的项目中**创建不同的分支**(原因参见`完整流程`第9条备注部分); +* 变基及交互式变基操作参见 [Git 交互式变基](http://pakchoi.me/2015/03/17/git-interactive-rebase/) + +## 推荐资源 + +### 开发环境 + +* XAMPP for Windows 5.5.x +* WampServer (for Windows) +* upupw Apache PHP5.4 ( for Windows) + +或自行安装 + +- Apache / Nginx +- PHP 5.4 ~ 5.6 +- MySQL / MariaDB + +*Windows 用户推荐添加 PHP bin 目录到 PATH,方便使用 composer* + +*Linux 用户自行配置环境, Mac 用户推荐使用内置 Apache 配合 Homebrew 安装 PHP 和 MariaDB* + +### 编辑器 + +Sublime Text 3 + phpfmt 插件 + +phpfmt 插件参数 + +```json +{ + "autocomplete": true, + "enable_auto_align": true, + "format_on_save": true, + "indent_with_space": true, + "psr1_naming": false, + "psr2": true, + "version": 4 +} +``` + +或其他 编辑器 / IDE 配合 PSR2 自动格式化工具 + +### Git GUI + +* SourceTree +* GitHub Desktop + +或其他 Git 图形界面客户端 diff --git a/thinkphp/LICENSE.txt b/thinkphp/LICENSE.txt new file mode 100755 index 0000000..774fa76 --- /dev/null +++ b/thinkphp/LICENSE.txt @@ -0,0 +1,32 @@ + +ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 +版权所有Copyright © 2006-2018 by ThinkPHP (http://thinkphp.cn) +All rights reserved。 +ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 + +Apache Licence是著名的非盈利开源组织Apache采用的协议。 +该协议和BSD类似,鼓励代码共享和尊重原作者的著作权, +允许代码修改,再作为开源或商业软件发布。需要满足 +的条件: +1. 需要给代码的用户一份Apache Licence ; +2. 如果你修改了代码,需要在被修改的文件中说明; +3. 在延伸的代码中(修改和有源代码衍生的代码中)需要 +带有原来代码中的协议,商标,专利声明和其他原来作者规 +定需要包含的说明; +4. 如果再发布的产品中包含一个Notice文件,则在Notice文 +件中需要带有本协议内容。你可以在Notice中增加自己的 +许可,但不可以表现为对Apache Licence构成更改。 +具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0 + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/thinkphp/README.md b/thinkphp/README.md new file mode 100755 index 0000000..b2a791b --- /dev/null +++ b/thinkphp/README.md @@ -0,0 +1,93 @@ +![](https://box.kancloud.cn/5a0aaa69a5ff42657b5c4715f3d49221) + +ThinkPHP 5.1(LTS) —— 12载初心,你值得信赖的PHP框架 +=============== + +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/top-think/framework/badges/quality-score.png?b=5.1)](https://scrutinizer-ci.com/g/top-think/framework/?branch=5.1) +[![Build Status](https://travis-ci.org/top-think/framework.svg?branch=master)](https://travis-ci.org/top-think/framework) +[![Total Downloads](https://poser.pugx.org/topthink/framework/downloads)](https://packagist.org/packages/topthink/framework) +[![Latest Stable Version](https://poser.pugx.org/topthink/framework/v/stable)](https://packagist.org/packages/topthink/framework) +[![PHP Version](https://img.shields.io/badge/php-%3E%3D5.6-8892BF.svg)](http://www.php.net/) +[![License](https://poser.pugx.org/topthink/framework/license)](https://packagist.org/packages/topthink/framework) + +ThinkPHP5.1对底层架构做了进一步的改进,减少依赖,其主要特性包括: + + + 采用容器统一管理对象 + + 支持Facade + + 更易用的路由 + + 注解路由支持 + + 路由跨域请求支持 + + 验证类增强 + + 配置和路由目录独立 + + 取消系统常量 + + 类库别名机制 + + 模型和数据库增强 + + 依赖注入完善 + + 支持PSR-3日志规范 + + 中间件支持(`V5.1.6+`) + + 支持`Swoole`/`Workerman`运行(`V5.1.18+`) + +官方已经正式宣布`5.1.27`版本为LTS版本。 + +### 废除的功能: + + + 聚合模型 + + 内置控制器扩展类 + + 模型自动验证 + +> ThinkPHP5.1的运行环境要求PHP5.6+。 + + +## 安装 + +使用composer安装 + +~~~ +composer create-project topthink/think tp +~~~ + +启动服务 + +~~~ +cd tp +php think run +~~~ + +然后就可以在浏览器中访问 + +~~~ +http://localhost:8000 +~~~ + +更新框架 +~~~ +composer update topthink/framework +~~~ + + +## 在线手册 + ++ [完全开发手册](https://www.kancloud.cn/manual/thinkphp5_1/content) ++ [升级指导](https://www.kancloud.cn/manual/thinkphp5_1/354155) + +## 命名规范 + +`ThinkPHP5.1`遵循PSR-2命名规范和PSR-4自动加载规范。 + +## 参与开发 + +请参阅 [ThinkPHP5 核心框架包](https://github.com/top-think/framework)。 + +## 版权信息 + +ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 + +本项目包含的第三方源码和二进制文件之版权信息另行标注。 + +版权所有Copyright © 2006-2018 by ThinkPHP (http://thinkphp.cn) + +All rights reserved。 + +ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。 + +更多细节参阅 [LICENSE.txt](LICENSE.txt) diff --git a/thinkphp/base.php b/thinkphp/base.php new file mode 100755 index 0000000..d7238cc --- /dev/null +++ b/thinkphp/base.php @@ -0,0 +1,52 @@ + +// +---------------------------------------------------------------------- +namespace think; + +// 载入Loader类 +require __DIR__ . '/library/think/Loader.php'; + +// 注册自动加载 +Loader::register(); + +// 注册错误和异常处理机制 +Error::register(); + +// 实现日志接口 +if (interface_exists('Psr\Log\LoggerInterface')) { + interface LoggerInterface extends \Psr\Log\LoggerInterface + {} +} else { + interface LoggerInterface + {} +} + +// 注册类库别名 +Loader::addClassAlias([ + 'App' => facade\App::class, + 'Build' => facade\Build::class, + 'Cache' => facade\Cache::class, + 'Config' => facade\Config::class, + 'Cookie' => facade\Cookie::class, + 'Db' => Db::class, + 'Debug' => facade\Debug::class, + 'Env' => facade\Env::class, + 'Facade' => Facade::class, + 'Hook' => facade\Hook::class, + 'Lang' => facade\Lang::class, + 'Log' => facade\Log::class, + 'Request' => facade\Request::class, + 'Response' => facade\Response::class, + 'Route' => facade\Route::class, + 'Session' => facade\Session::class, + 'Url' => facade\Url::class, + 'Validate' => facade\Validate::class, + 'View' => facade\View::class, +]); diff --git a/thinkphp/composer.json b/thinkphp/composer.json new file mode 100755 index 0000000..cc4fca9 --- /dev/null +++ b/thinkphp/composer.json @@ -0,0 +1,35 @@ +{ + "name": "topthink/framework", + "description": "the new thinkphp framework", + "type": "think-framework", + "keywords": [ + "framework", + "thinkphp", + "ORM" + ], + "homepage": "http://thinkphp.cn/", + "license": "Apache-2.0", + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + }, + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "require": { + "php": ">=5.6.0", + "topthink/think-installer": "2.*" + }, + "require-dev": { + "phpunit/phpunit": "^5.0|^6.0", + "johnkary/phpunit-speedtrap": "^1.0", + "mikey179/vfsStream": "~1.6", + "phploc/phploc": "2.*", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "2.*", + "phpdocumentor/reflection-docblock": "^2.0" + } +} diff --git a/thinkphp/convention.php b/thinkphp/convention.php new file mode 100755 index 0000000..1d85e56 --- /dev/null +++ b/thinkphp/convention.php @@ -0,0 +1,327 @@ + [ + // 应用名称 + 'app_name' => '', + // 应用地址 + 'app_host' => '', + // 应用调试模式 + 'app_debug' => false, + // 应用Trace + 'app_trace' => false, + // 应用模式状态 + 'app_status' => '', + // 是否HTTPS + 'is_https' => false, + // 入口自动绑定模块 + 'auto_bind_module' => false, + // 注册的根命名空间 + 'root_namespace' => [], + // 默认输出类型 + 'default_return_type' => 'html', + // 默认AJAX 数据返回格式,可选json xml ... + 'default_ajax_return' => 'json', + // 默认JSONP格式返回的处理方法 + 'default_jsonp_handler' => 'jsonpReturn', + // 默认JSONP处理方法 + 'var_jsonp_handler' => 'callback', + // 默认时区 + 'default_timezone' => 'Asia/Shanghai', + // 是否开启多语言 + 'lang_switch_on' => false, + // 默认验证器 + 'default_validate' => '', + // 默认语言 + 'default_lang' => 'zh-cn', + + // +---------------------------------------------------------------------- + // | 模块设置 + // +---------------------------------------------------------------------- + + // 自动搜索控制器 + 'controller_auto_search' => false, + // 操作方法前缀 + 'use_action_prefix' => false, + // 操作方法后缀 + 'action_suffix' => '', + // 默认的空控制器名 + 'empty_controller' => 'Error', + // 默认的空模块名 + 'empty_module' => '', + // 默认模块名 + 'default_module' => 'index', + // 是否支持多模块 + 'app_multi_module' => true, + // 禁止访问模块 + 'deny_module_list' => ['common'], + // 默认控制器名 + 'default_controller' => 'Index', + // 默认操作名 + 'default_action' => 'index', + // 是否自动转换URL中的控制器和操作名 + 'url_convert' => true, + // 默认的访问控制器层 + 'url_controller_layer' => 'controller', + // 应用类库后缀 + 'class_suffix' => false, + // 控制器类后缀 + 'controller_suffix' => false, + + // +---------------------------------------------------------------------- + // | URL请求设置 + // +---------------------------------------------------------------------- + + // 默认全局过滤方法 用逗号分隔多个 + 'default_filter' => '', + // PATHINFO变量名 用于兼容模式 + 'var_pathinfo' => 's', + // 兼容PATH_INFO获取 + 'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'], + // HTTPS代理标识 + 'https_agent_name' => '', + // IP代理获取标识 + 'http_agent_ip' => 'HTTP_X_REAL_IP', + // URL伪静态后缀 + 'url_html_suffix' => 'html', + // 域名根,如thinkphp.cn + 'url_domain_root' => '', + // 表单请求类型伪装变量 + 'var_method' => '_method', + // 表单ajax伪装变量 + 'var_ajax' => '_ajax', + // 表单pjax伪装变量 + 'var_pjax' => '_pjax', + // 是否开启请求缓存 true自动缓存 支持设置请求缓存规则 + 'request_cache' => false, + // 请求缓存有效期 + 'request_cache_expire' => null, + // 全局请求缓存排除规则 + 'request_cache_except' => [], + + // +---------------------------------------------------------------------- + // | 路由设置 + // +---------------------------------------------------------------------- + + // pathinfo分隔符 + 'pathinfo_depr' => '/', + // URL普通方式参数 用于自动生成 + 'url_common_param' => false, + // URL参数方式 0 按名称成对解析 1 按顺序解析 + 'url_param_type' => 0, + // 是否开启路由延迟解析 + 'url_lazy_route' => false, + // 是否强制使用路由 + 'url_route_must' => false, + // 合并路由规则 + 'route_rule_merge' => false, + // 路由是否完全匹配 + 'route_complete_match' => false, + // 使用注解路由 + 'route_annotation' => false, + // 默认的路由变量规则 + 'default_route_pattern' => '\w+', + // 是否开启路由缓存 + 'route_check_cache' => false, + // 路由缓存的Key自定义设置(闭包),默认为当前URL和请求类型的md5 + 'route_check_cache_key' => '', + // 路由缓存的设置 + 'route_cache_option' => [], + + // +---------------------------------------------------------------------- + // | 异常及错误设置 + // +---------------------------------------------------------------------- + + // 默认跳转页面对应的模板文件 + 'dispatch_success_tmpl' => __DIR__ . '/tpl/dispatch_jump.tpl', + 'dispatch_error_tmpl' => __DIR__ . '/tpl/dispatch_jump.tpl', + // 异常页面的模板文件 + 'exception_tmpl' => __DIR__ . '/tpl/think_exception.tpl', + // 错误显示信息,非调试模式有效 + 'error_message' => '页面错误!请稍后再试~', + // 显示错误信息 + 'show_error_msg' => false, + // 异常处理handle类 留空使用 \think\exception\Handle + 'exception_handle' => '', + ], + + // +---------------------------------------------------------------------- + // | 模板设置 + // +---------------------------------------------------------------------- + + 'template' => [ + // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 + 'auto_rule' => 1, + // 模板引擎类型 支持 php think 支持扩展 + 'type' => 'Think', + // 视图基础目录,配置目录为所有模块的视图起始目录 + 'view_base' => '', + // 当前模板的视图目录 留空为自动获取 + 'view_path' => '', + // 模板后缀 + 'view_suffix' => 'html', + // 模板文件名分隔符 + 'view_depr' => DIRECTORY_SEPARATOR, + // 模板引擎普通标签开始标记 + 'tpl_begin' => '{', + // 模板引擎普通标签结束标记 + 'tpl_end' => '}', + // 标签库标签开始标记 + 'taglib_begin' => '{', + // 标签库标签结束标记 + 'taglib_end' => '}', + ], + + // +---------------------------------------------------------------------- + // | 日志设置 + // +---------------------------------------------------------------------- + + 'log' => [ + // 日志记录方式,内置 file socket 支持扩展 + 'type' => 'File', + // 日志保存目录 + //'path' => LOG_PATH, + // 日志记录级别 + 'level' => [], + // 是否记录trace信息到日志 + 'record_trace' => false, + // 是否JSON格式记录 + 'json' => false, + ], + + // +---------------------------------------------------------------------- + // | Trace设置 开启 app_trace 后 有效 + // +---------------------------------------------------------------------- + + 'trace' => [ + // 内置Html Console 支持扩展 + 'type' => 'Html', + 'file' => __DIR__ . '/tpl/page_trace.tpl', + ], + + // +---------------------------------------------------------------------- + // | 缓存设置 + // +---------------------------------------------------------------------- + + 'cache' => [ + // 驱动方式 + 'type' => 'File', + // 缓存保存目录 + //'path' => CACHE_PATH, + // 缓存前缀 + 'prefix' => '', + // 缓存有效期 0表示永久缓存 + 'expire' => 0, + ], + + // +---------------------------------------------------------------------- + // | 会话设置 + // +---------------------------------------------------------------------- + + 'session' => [ + 'id' => '', + // SESSION_ID的提交变量,解决flash上传跨域 + 'var_session_id' => '', + // SESSION 前缀 + 'prefix' => 'think', + // 驱动方式 支持redis memcache memcached + 'type' => '', + // 是否自动开启 SESSION + 'auto_start' => true, + 'httponly' => true, + 'secure' => false, + ], + + // +---------------------------------------------------------------------- + // | Cookie设置 + // +---------------------------------------------------------------------- + + 'cookie' => [ + // cookie 名称前缀 + 'prefix' => '', + // cookie 保存时间 + 'expire' => 0, + // cookie 保存路径 + 'path' => '/', + // cookie 有效域名 + 'domain' => '', + // cookie 启用安全传输 + 'secure' => false, + // httponly设置 + 'httponly' => '', + // 是否使用 setcookie + 'setcookie' => true, + ], + + // +---------------------------------------------------------------------- + // | 数据库设置 + // +---------------------------------------------------------------------- + + 'database' => [ + // 数据库类型 + 'type' => 'mysql', + // 数据库连接DSN配置 + 'dsn' => '', + // 服务器地址 + 'hostname' => '127.0.0.1', + // 数据库名 + 'database' => '', + // 数据库用户名 + 'username' => 'root', + // 数据库密码 + 'password' => '', + // 数据库连接端口 + 'hostport' => '', + // 数据库连接参数 + 'params' => [], + // 数据库编码默认采用utf8 + 'charset' => 'utf8', + // 数据库表前缀 + 'prefix' => '', + // 数据库调试模式 + 'debug' => false, + // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) + 'deploy' => 0, + // 数据库读写是否分离 主从式有效 + 'rw_separate' => false, + // 读写分离后 主服务器数量 + 'master_num' => 1, + // 指定从服务器序号 + 'slave_no' => '', + // 是否严格检查字段是否存在 + 'fields_strict' => true, + // 数据集返回类型 + 'resultset_type' => 'array', + // 自动写入时间戳字段 + 'auto_timestamp' => false, + // 时间字段取出后的默认时间格式 + 'datetime_format' => 'Y-m-d H:i:s', + // 是否需要进行SQL性能分析 + 'sql_explain' => false, + // 查询对象 + 'query' => '\\think\\db\\Query', + ], + + //分页配置 + 'paginate' => [ + 'type' => 'bootstrap', + 'var_page' => 'page', + 'list_rows' => 15, + ], + + //控制台配置 + 'console' => [ + 'name' => 'Think Console', + 'version' => '0.1', + 'user' => null, + 'auto_path' => '', + ], + + // 中间件配置 + 'middleware' => [ + 'default_namespace' => 'app\\http\\middleware\\', + ], +]; diff --git a/thinkphp/helper.php b/thinkphp/helper.php new file mode 100755 index 0000000..72b9e9f --- /dev/null +++ b/thinkphp/helper.php @@ -0,0 +1,726 @@ + +// +---------------------------------------------------------------------- + +//------------------------ +// ThinkPHP 助手函数 +//------------------------- + +use think\Container; +use think\Db; +use think\exception\HttpException; +use think\exception\HttpResponseException; +use think\facade\Cache; +use think\facade\Config; +use think\facade\Cookie; +use think\facade\Debug; +use think\facade\Env; +use think\facade\Hook; +use think\facade\Lang; +use think\facade\Log; +use think\facade\Request; +use think\facade\Route; +use think\facade\Session; +use think\facade\Url; +use think\Response; +use think\route\RuleItem; + +if (!function_exists('abort')) { + /** + * 抛出HTTP异常 + * @param integer|Response $code 状态码 或者 Response对象实例 + * @param string $message 错误信息 + * @param array $header 参数 + */ + function abort($code, $message = null, $header = []) + { + if ($code instanceof Response) { + throw new HttpResponseException($code); + } else { + throw new HttpException($code, $message, null, $header); + } + } +} + +if (!function_exists('action')) { + /** + * 调用模块的操作方法 参数格式 [模块/控制器/]操作 + * @param string $url 调用地址 + * @param string|array $vars 调用参数 支持字符串和数组 + * @param string $layer 要调用的控制层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @return mixed + */ + function action($url, $vars = [], $layer = 'controller', $appendSuffix = false) + { + return app()->action($url, $vars, $layer, $appendSuffix); + } +} + +if (!function_exists('app')) { + /** + * 快速获取容器中的实例 支持依赖注入 + * @param string $name 类名或标识 默认获取当前应用实例 + * @param array $args 参数 + * @param bool $newInstance 是否每次创建新的实例 + * @return mixed|\think\App + */ + function app($name = 'think\App', $args = [], $newInstance = false) + { + return Container::get($name, $args, $newInstance); + } +} + +if (!function_exists('behavior')) { + /** + * 执行某个行为(run方法) 支持依赖注入 + * @param mixed $behavior 行为类名或者别名 + * @param mixed $args 参数 + * @return mixed + */ + function behavior($behavior, $args = null) + { + return Hook::exec($behavior, $args); + } +} + +if (!function_exists('bind')) { + /** + * 绑定一个类到容器 + * @access public + * @param string $abstract 类标识、接口 + * @param mixed $concrete 要绑定的类、闭包或者实例 + * @return Container + */ + function bind($abstract, $concrete = null) + { + return Container::getInstance()->bindTo($abstract, $concrete); + } +} + +if (!function_exists('cache')) { + /** + * 缓存管理 + * @param mixed $name 缓存名称,如果为数组表示进行缓存设置 + * @param mixed $value 缓存值 + * @param mixed $options 缓存参数 + * @param string $tag 缓存标签 + * @return mixed + */ + function cache($name, $value = '', $options = null, $tag = null) + { + if (is_array($options)) { + // 缓存操作的同时初始化 + Cache::connect($options); + } elseif (is_array($name)) { + // 缓存初始化 + return Cache::connect($name); + } + + if ('' === $value) { + // 获取缓存 + return 0 === strpos($name, '?') ? Cache::has(substr($name, 1)) : Cache::get($name); + } elseif (is_null($value)) { + // 删除缓存 + return Cache::rm($name); + } + + // 缓存数据 + if (is_array($options)) { + $expire = isset($options['expire']) ? $options['expire'] : null; //修复查询缓存无法设置过期时间 + } else { + $expire = is_numeric($options) ? $options : null; //默认快捷缓存设置过期时间 + } + + if (is_null($tag)) { + return Cache::set($name, $value, $expire); + } else { + return Cache::tag($tag)->set($name, $value, $expire); + } + } +} + +if (!function_exists('call')) { + /** + * 调用反射执行callable 支持依赖注入 + * @param mixed $callable 支持闭包等callable写法 + * @param array $args 参数 + * @return mixed + */ + function call($callable, $args = []) + { + return Container::getInstance()->invoke($callable, $args); + } +} + +if (!function_exists('class_basename')) { + /** + * 获取类名(不包含命名空间) + * + * @param string|object $class + * @return string + */ + function class_basename($class) + { + $class = is_object($class) ? get_class($class) : $class; + return basename(str_replace('\\', '/', $class)); + } +} + +if (!function_exists('class_uses_recursive')) { + /** + *获取一个类里所有用到的trait,包括父类的 + * + * @param $class + * @return array + */ + function class_uses_recursive($class) + { + if (is_object($class)) { + $class = get_class($class); + } + + $results = []; + $classes = array_merge([$class => $class], class_parents($class)); + foreach ($classes as $class) { + $results += trait_uses_recursive($class); + } + + return array_unique($results); + } +} + +if (!function_exists('config')) { + /** + * 获取和设置配置参数 + * @param string|array $name 参数名 + * @param mixed $value 参数值 + * @return mixed + */ + function config($name = '', $value = null) + { + if (is_null($value) && is_string($name)) { + if ('.' == substr($name, -1)) { + return Config::pull(substr($name, 0, -1)); + } + + return 0 === strpos($name, '?') ? Config::has(substr($name, 1)) : Config::get($name); + } else { + return Config::set($name, $value); + } + } +} + +if (!function_exists('container')) { + /** + * 获取容器对象实例 + * @return Container + */ + function container() + { + return Container::getInstance(); + } +} + +if (!function_exists('controller')) { + /** + * 实例化控制器 格式:[模块/]控制器 + * @param string $name 资源地址 + * @param string $layer 控制层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @return \think\Controller + */ + function controller($name, $layer = 'controller', $appendSuffix = false) + { + return app()->controller($name, $layer, $appendSuffix); + } +} + +if (!function_exists('cookie')) { + /** + * Cookie管理 + * @param string|array $name cookie名称,如果为数组表示进行cookie设置 + * @param mixed $value cookie值 + * @param mixed $option 参数 + * @return mixed + */ + function cookie($name, $value = '', $option = null) + { + if (is_array($name)) { + // 初始化 + Cookie::init($name); + } elseif (is_null($name)) { + // 清除 + Cookie::clear($value); + } elseif ('' === $value) { + // 获取 + return 0 === strpos($name, '?') ? Cookie::has(substr($name, 1), $option) : Cookie::get($name); + } elseif (is_null($value)) { + // 删除 + return Cookie::delete($name); + } else { + // 设置 + return Cookie::set($name, $value, $option); + } + } +} + +if (!function_exists('db')) { + /** + * 实例化数据库类 + * @param string $name 操作的数据表名称(不含前缀) + * @param array|string $config 数据库配置参数 + * @param bool $force 是否强制重新连接 + * @return \think\db\Query + */ + function db($name = '', $config = [], $force = true) + { + return Db::connect($config, $force)->name($name); + } +} + +if (!function_exists('debug')) { + /** + * 记录时间(微秒)和内存使用情况 + * @param string $start 开始标签 + * @param string $end 结束标签 + * @param integer|string $dec 小数位 如果是m 表示统计内存占用 + * @return mixed + */ + function debug($start, $end = '', $dec = 6) + { + if ('' == $end) { + Debug::remark($start); + } else { + return 'm' == $dec ? Debug::getRangeMem($start, $end) : Debug::getRangeTime($start, $end, $dec); + } + } +} + +if (!function_exists('download')) { + /** + * 获取\think\response\Download对象实例 + * @param string $filename 要下载的文件 + * @param string $name 显示文件名 + * @param bool $content 是否为内容 + * @param integer $expire 有效期(秒) + * @return \think\response\Download + */ + function download($filename, $name = '', $content = false, $expire = 360, $openinBrowser = false) + { + return Response::create($filename, 'download')->name($name)->isContent($content)->expire($expire)->openinBrowser($openinBrowser); + } +} + +if (!function_exists('dump')) { + /** + * 浏览器友好的变量输出 + * @param mixed $var 变量 + * @param boolean $echo 是否输出 默认为true 如果为false 则返回输出字符串 + * @param string $label 标签 默认为空 + * @return void|string + */ + function dump($var, $echo = true, $label = null) + { + return Debug::dump($var, $echo, $label); + } +} + +if (!function_exists('env')) { + /** + * 获取环境变量值 + * @access public + * @param string $name 环境变量名(支持二级 .号分割) + * @param string $default 默认值 + * @return mixed + */ + function env($name = null, $default = null) + { + return Env::get($name, $default); + } +} + +if (!function_exists('exception')) { + /** + * 抛出异常处理 + * + * @param string $msg 异常消息 + * @param integer $code 异常代码 默认为0 + * @param string $exception 异常类 + * + * @throws Exception + */ + function exception($msg, $code = 0, $exception = '') + { + $e = $exception ?: '\think\Exception'; + throw new $e($msg, $code); + } +} + +if (!function_exists('halt')) { + /** + * 调试变量并且中断输出 + * @param mixed $var 调试变量或者信息 + */ + function halt($var) + { + dump($var); + + throw new HttpResponseException(new Response); + } +} + +if (!function_exists('input')) { + /** + * 获取输入数据 支持默认值和过滤 + * @param string $key 获取的变量名 + * @param mixed $default 默认值 + * @param string $filter 过滤方法 + * @return mixed + */ + function input($key = '', $default = null, $filter = '') + { + if (0 === strpos($key, '?')) { + $key = substr($key, 1); + $has = true; + } + + if ($pos = strpos($key, '.')) { + // 指定参数来源 + $method = substr($key, 0, $pos); + if (in_array($method, ['get', 'post', 'put', 'patch', 'delete', 'route', 'param', 'request', 'session', 'cookie', 'server', 'env', 'path', 'file'])) { + $key = substr($key, $pos + 1); + } else { + $method = 'param'; + } + } else { + // 默认为自动判断 + $method = 'param'; + } + + if (isset($has)) { + return request()->has($key, $method, $default); + } else { + return request()->$method($key, $default, $filter); + } + } +} + +if (!function_exists('json')) { + /** + * 获取\think\response\Json对象实例 + * @param mixed $data 返回的数据 + * @param integer $code 状态码 + * @param array $header 头部 + * @param array $options 参数 + * @return \think\response\Json + */ + function json($data = [], $code = 200, $header = [], $options = []) + { + return Response::create($data, 'json', $code, $header, $options); + } +} + +if (!function_exists('jsonp')) { + /** + * 获取\think\response\Jsonp对象实例 + * @param mixed $data 返回的数据 + * @param integer $code 状态码 + * @param array $header 头部 + * @param array $options 参数 + * @return \think\response\Jsonp + */ + function jsonp($data = [], $code = 200, $header = [], $options = []) + { + return Response::create($data, 'jsonp', $code, $header, $options); + } +} + +if (!function_exists('lang')) { + /** + * 获取语言变量值 + * @param string $name 语言变量名 + * @param array $vars 动态变量值 + * @param string $lang 语言 + * @return mixed + */ + function lang($name, $vars = [], $lang = '') + { + return Lang::get($name, $vars, $lang); + } +} + +if (!function_exists('model')) { + /** + * 实例化Model + * @param string $name Model名称 + * @param string $layer 业务层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @return \think\Model + */ + function model($name = '', $layer = 'model', $appendSuffix = false) + { + return app()->model($name, $layer, $appendSuffix); + } +} + +if (!function_exists('parse_name')) { + /** + * 字符串命名风格转换 + * type 0 将Java风格转换为C的风格 1 将C风格转换为Java的风格 + * @param string $name 字符串 + * @param integer $type 转换类型 + * @param bool $ucfirst 首字母是否大写(驼峰规则) + * @return string + */ + function parse_name($name, $type = 0, $ucfirst = true) + { + if ($type) { + $name = preg_replace_callback('/_([a-zA-Z])/', function ($match) { + return strtoupper($match[1]); + }, $name); + + return $ucfirst ? ucfirst($name) : lcfirst($name); + } else { + return strtolower(trim(preg_replace("/[A-Z]/", "_\\0", $name), "_")); + } + } +} + +if (!function_exists('redirect')) { + /** + * 获取\think\response\Redirect对象实例 + * @param mixed $url 重定向地址 支持Url::build方法的地址 + * @param array|integer $params 额外参数 + * @param integer $code 状态码 + * @return \think\response\Redirect + */ + function redirect($url = [], $params = [], $code = 302) + { + if (is_integer($params)) { + $code = $params; + $params = []; + } + + return Response::create($url, 'redirect', $code)->params($params); + } +} + +if (!function_exists('request')) { + /** + * 获取当前Request对象实例 + * @return Request + */ + function request() + { + return app('request'); + } +} + +if (!function_exists('response')) { + /** + * 创建普通 Response 对象实例 + * @param mixed $data 输出数据 + * @param int|string $code 状态码 + * @param array $header 头信息 + * @param string $type + * @return Response + */ + function response($data = '', $code = 200, $header = [], $type = 'html') + { + return Response::create($data, $type, $code, $header); + } +} + +if (!function_exists('route')) { + /** + * 路由注册 + * @param string $rule 路由规则 + * @param mixed $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + function route($rule, $route, $option = [], $pattern = []) + { + return Route::rule($rule, $route, '*', $option, $pattern); + } +} + +if (!function_exists('session')) { + /** + * Session管理 + * @param string|array $name session名称,如果为数组表示进行session设置 + * @param mixed $value session值 + * @param string $prefix 前缀 + * @return mixed + */ + function session($name, $value = '', $prefix = null) + { + if (is_array($name)) { + // 初始化 + Session::init($name); + } elseif (is_null($name)) { + // 清除 + Session::clear($value); + } elseif ('' === $value) { + // 判断或获取 + return 0 === strpos($name, '?') ? Session::has(substr($name, 1), $prefix) : Session::get($name, $prefix); + } elseif (is_null($value)) { + // 删除 + return Session::delete($name, $prefix); + } else { + // 设置 + return Session::set($name, $value, $prefix); + } + } +} + +if (!function_exists('token')) { + /** + * 生成表单令牌 + * @param string $name 令牌名称 + * @param mixed $type 令牌生成方法 + * @return string + */ + function token($name = '__token__', $type = 'md5') + { + $token = Request::token($name, $type); + + return ''; + } +} + +if (!function_exists('trace')) { + /** + * 记录日志信息 + * @param mixed $log log信息 支持字符串和数组 + * @param string $level 日志级别 + * @return array|void + */ + function trace($log = '[think]', $level = 'log') + { + if ('[think]' === $log) { + return Log::getLog(); + } else { + Log::record($log, $level); + } + } +} + +if (!function_exists('trait_uses_recursive')) { + /** + * 获取一个trait里所有引用到的trait + * + * @param string $trait + * @return array + */ + function trait_uses_recursive($trait) + { + $traits = class_uses($trait); + foreach ($traits as $trait) { + $traits += trait_uses_recursive($trait); + } + + return $traits; + } +} + +if (!function_exists('url')) { + /** + * Url生成 + * @param string $url 路由地址 + * @param string|array $vars 变量 + * @param bool|string $suffix 生成的URL后缀 + * @param bool|string $domain 域名 + * @return string + */ + function url($url = '', $vars = '', $suffix = true, $domain = false) + { + return Url::build($url, $vars, $suffix, $domain); + } +} + +if (!function_exists('validate')) { + /** + * 实例化验证器 + * @param string $name 验证器名称 + * @param string $layer 业务层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @return \think\Validate + */ + function validate($name = '', $layer = 'validate', $appendSuffix = false) + { + return app()->validate($name, $layer, $appendSuffix); + } +} + +if (!function_exists('view')) { + /** + * 渲染模板输出 + * @param string $template 模板文件 + * @param array $vars 模板变量 + * @param integer $code 状态码 + * @param callable $filter 内容过滤 + * @return \think\response\View + */ + function view($template = '', $vars = [], $code = 200, $filter = null) + { + return Response::create($template, 'view', $code)->assign($vars)->filter($filter); + } +} + +if (!function_exists('widget')) { + /** + * 渲染输出Widget + * @param string $name Widget名称 + * @param array $data 传入的参数 + * @return mixed + */ + function widget($name, $data = []) + { + $result = app()->action($name, $data, 'widget'); + + if (is_object($result)) { + $result = $result->getContent(); + } + + return $result; + } +} + +if (!function_exists('xml')) { + /** + * 获取\think\response\Xml对象实例 + * @param mixed $data 返回的数据 + * @param integer $code 状态码 + * @param array $header 头部 + * @param array $options 参数 + * @return \think\response\Xml + */ + function xml($data = [], $code = 200, $header = [], $options = []) + { + return Response::create($data, 'xml', $code, $header, $options); + } +} + +if (!function_exists('yaconf')) { + /** + * 获取yaconf配置 + * + * @param string $name 配置参数名 + * @param mixed $default 默认值 + * @return mixed + */ + function yaconf($name, $default = null) + { + return Config::yaconf($name, $default); + } +} diff --git a/thinkphp/lang/zh-cn.php b/thinkphp/lang/zh-cn.php new file mode 100755 index 0000000..1e05082 --- /dev/null +++ b/thinkphp/lang/zh-cn.php @@ -0,0 +1,144 @@ + +// +---------------------------------------------------------------------- + +// 核心中文语言包 +return [ + // 系统错误提示 + 'Undefined variable' => '未定义变量', + 'Undefined index' => '未定义数组索引', + 'Undefined offset' => '未定义数组下标', + 'Parse error' => '语法解析错误', + 'Type error' => '类型错误', + 'Fatal error' => '致命错误', + 'syntax error' => '语法错误', + + // 框架核心错误提示 + 'dispatch type not support' => '不支持的调度类型', + 'method param miss' => '方法参数错误', + 'method not exists' => '方法不存在', + 'function not exists' => '函数不存在', + 'file not exists' => '文件不存在', + 'module not exists' => '模块不存在', + 'controller not exists' => '控制器不存在', + 'class not exists' => '类不存在', + 'property not exists' => '类的属性不存在', + 'template not exists' => '模板文件不存在', + 'illegal controller name' => '非法的控制器名称', + 'illegal action name' => '非法的操作名称', + 'url suffix deny' => '禁止的URL后缀访问', + 'Route Not Found' => '当前访问路由未定义或不匹配', + 'Undefined db type' => '未定义数据库类型', + 'variable type error' => '变量类型错误', + 'PSR-4 error' => 'PSR-4 规范错误', + 'not support total' => '简洁模式下不能获取数据总数', + 'not support last' => '简洁模式下不能获取最后一页', + 'error session handler' => '错误的SESSION处理器类', + 'not allow php tag' => '模板不允许使用PHP语法', + 'not support' => '不支持', + 'redisd master' => 'Redisd 主服务器错误', + 'redisd slave' => 'Redisd 从服务器错误', + 'must run at sae' => '必须在SAE运行', + 'memcache init error' => '未开通Memcache服务,请在SAE管理平台初始化Memcache服务', + 'KVDB init error' => '没有初始化KVDB,请在SAE管理平台初始化KVDB服务', + 'fields not exists' => '数据表字段不存在', + 'where express error' => '查询表达式错误', + 'order express error' => '排序表达式错误', + 'no data to update' => '没有任何数据需要更新', + 'miss data to insert' => '缺少需要写入的数据', + 'not support data' => '不支持的数据表达式', + 'miss complex primary data' => '缺少复合主键数据', + 'miss update condition' => '缺少更新条件', + 'model data Not Found' => '模型数据不存在', + 'table data not Found' => '表数据不存在', + 'delete without condition' => '没有条件不会执行删除操作', + 'miss relation data' => '缺少关联表数据', + 'tag attr must' => '模板标签属性必须', + 'tag error' => '模板标签错误', + 'cache write error' => '缓存写入失败', + 'sae mc write error' => 'SAE mc 写入错误', + 'route name not exists' => '路由标识不存在(或参数不够)', + 'invalid request' => '非法请求', + 'bind attr has exists' => '模型的属性已经存在', + 'relation data not exists' => '关联数据不存在', + 'relation not support' => '关联不支持', + 'chunk not support order' => 'Chunk不支持调用order方法', + 'route pattern error' => '路由变量规则定义错误', + 'route behavior will not support' => '路由行为废弃(使用中间件替代)', + 'closure not support cache(true)' => '使用闭包查询不支持cache(true),请指定缓存Key', + + // 上传错误信息 + 'unknown upload error' => '未知上传错误!', + 'file write error' => '文件写入失败!', + 'upload temp dir not found' => '找不到临时文件夹!', + 'no file to uploaded' => '没有文件被上传!', + 'only the portion of file is uploaded' => '文件只有部分被上传!', + 'upload File size exceeds the maximum value' => '上传文件大小超过了最大值!', + 'upload write error' => '文件上传保存错误!', + 'has the same filename: {:filename}' => '存在同名文件:{:filename}', + 'upload illegal files' => '非法上传文件', + 'illegal image files' => '非法图片文件', + 'extensions to upload is not allowed' => '上传文件后缀不允许', + 'mimetype to upload is not allowed' => '上传文件MIME类型不允许!', + 'filesize not match' => '上传文件大小不符!', + 'directory {:path} creation failed' => '目录 {:path} 创建失败!', + + 'The middleware must return Response instance' => '中间件方法必须返回Response对象实例', + 'The queue was exhausted, with no response returned' => '中间件队列为空', + // Validate Error Message + ':attribute require' => ':attribute不能为空', + ':attribute must' => ':attribute必须', + ':attribute must be numeric' => ':attribute必须是数字', + ':attribute must be integer' => ':attribute必须是整数', + ':attribute must be float' => ':attribute必须是浮点数', + ':attribute must be bool' => ':attribute必须是布尔值', + ':attribute not a valid email address' => ':attribute格式不符', + ':attribute not a valid mobile' => ':attribute格式不符', + ':attribute must be a array' => ':attribute必须是数组', + ':attribute must be yes,on or 1' => ':attribute必须是yes、on或者1', + ':attribute not a valid datetime' => ':attribute不是一个有效的日期或时间格式', + ':attribute not a valid file' => ':attribute不是有效的上传文件', + ':attribute not a valid image' => ':attribute不是有效的图像文件', + ':attribute must be alpha' => ':attribute只能是字母', + ':attribute must be alpha-numeric' => ':attribute只能是字母和数字', + ':attribute must be alpha-numeric, dash, underscore' => ':attribute只能是字母、数字和下划线_及破折号-', + ':attribute not a valid domain or ip' => ':attribute不是有效的域名或者IP', + ':attribute must be chinese' => ':attribute只能是汉字', + ':attribute must be chinese or alpha' => ':attribute只能是汉字、字母', + ':attribute must be chinese,alpha-numeric' => ':attribute只能是汉字、字母和数字', + ':attribute must be chinese,alpha-numeric,underscore, dash' => ':attribute只能是汉字、字母、数字和下划线_及破折号-', + ':attribute not a valid url' => ':attribute不是有效的URL地址', + ':attribute not a valid ip' => ':attribute不是有效的IP地址', + ':attribute must be dateFormat of :rule' => ':attribute必须使用日期格式 :rule', + ':attribute must be in :rule' => ':attribute必须在 :rule 范围内', + ':attribute be notin :rule' => ':attribute不能在 :rule 范围内', + ':attribute must between :1 - :2' => ':attribute只能在 :1 - :2 之间', + ':attribute not between :1 - :2' => ':attribute不能在 :1 - :2 之间', + 'size of :attribute must be :rule' => ':attribute长度不符合要求 :rule', + 'max size of :attribute must be :rule' => ':attribute长度不能超过 :rule', + 'min size of :attribute must be :rule' => ':attribute长度不能小于 :rule', + ':attribute cannot be less than :rule' => ':attribute日期不能小于 :rule', + ':attribute cannot exceed :rule' => ':attribute日期不能超过 :rule', + ':attribute not within :rule' => '不在有效期内 :rule', + 'access IP is not allowed' => '不允许的IP访问', + 'access IP denied' => '禁止的IP访问', + ':attribute out of accord with :2' => ':attribute和确认字段:2不一致', + ':attribute cannot be same with :2' => ':attribute和比较字段:2不能相同', + ':attribute must greater than or equal :rule' => ':attribute必须大于等于 :rule', + ':attribute must greater than :rule' => ':attribute必须大于 :rule', + ':attribute must less than or equal :rule' => ':attribute必须小于等于 :rule', + ':attribute must less than :rule' => ':attribute必须小于 :rule', + ':attribute must equal :rule' => ':attribute必须等于 :rule', + ':attribute has exists' => ':attribute已存在', + ':attribute not conform to the rules' => ':attribute不符合指定规则', + 'invalid Request method' => '无效的请求类型', + 'invalid token' => '令牌数据无效', + 'not conform to the rules' => '规则错误', +]; diff --git a/thinkphp/library/think/App.php b/thinkphp/library/think/App.php new file mode 100755 index 0000000..7766555 --- /dev/null +++ b/thinkphp/library/think/App.php @@ -0,0 +1,981 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\exception\ClassNotFoundException; +use think\exception\HttpResponseException; +use think\route\Dispatch; + +/** + * App 应用管理 + */ +class App extends Container +{ + const VERSION = '5.1.38 LTS'; + + /** + * 当前模块路径 + * @var string + */ + protected $modulePath; + + /** + * 应用调试模式 + * @var bool + */ + protected $appDebug = true; + + /** + * 应用开始时间 + * @var float + */ + protected $beginTime; + + /** + * 应用内存初始占用 + * @var integer + */ + protected $beginMem; + + /** + * 应用类库命名空间 + * @var string + */ + protected $namespace = 'app'; + + /** + * 应用类库后缀 + * @var bool + */ + protected $suffix = false; + + /** + * 严格路由检测 + * @var bool + */ + protected $routeMust; + + /** + * 应用类库目录 + * @var string + */ + protected $appPath; + + /** + * 框架目录 + * @var string + */ + protected $thinkPath; + + /** + * 应用根目录 + * @var string + */ + protected $rootPath; + + /** + * 运行时目录 + * @var string + */ + protected $runtimePath; + + /** + * 配置目录 + * @var string + */ + protected $configPath; + + /** + * 路由目录 + * @var string + */ + protected $routePath; + + /** + * 配置后缀 + * @var string + */ + protected $configExt; + + /** + * 应用调度实例 + * @var Dispatch + */ + protected $dispatch; + + /** + * 绑定模块(控制器) + * @var string + */ + protected $bindModule; + + /** + * 初始化 + * @var bool + */ + protected $initialized = false; + + public function __construct($appPath = '') + { + $this->thinkPath = dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR; + $this->path($appPath); + } + + /** + * 绑定模块或者控制器 + * @access public + * @param string $bind + * @return $this + */ + public function bind($bind) + { + $this->bindModule = $bind; + return $this; + } + + /** + * 设置应用类库目录 + * @access public + * @param string $path 路径 + * @return $this + */ + public function path($path) + { + $this->appPath = $path ? realpath($path) . DIRECTORY_SEPARATOR : $this->getAppPath(); + + return $this; + } + + /** + * 初始化应用 + * @access public + * @return void + */ + public function initialize() + { + if ($this->initialized) { + return; + } + + $this->initialized = true; + $this->beginTime = microtime(true); + $this->beginMem = memory_get_usage(); + + $this->rootPath = dirname($this->appPath) . DIRECTORY_SEPARATOR; + $this->runtimePath = $this->rootPath . 'runtime' . DIRECTORY_SEPARATOR; + $this->routePath = $this->rootPath . 'route' . DIRECTORY_SEPARATOR; + $this->configPath = $this->rootPath . 'config' . DIRECTORY_SEPARATOR; + + static::setInstance($this); + + $this->instance('app', $this); + + // 加载环境变量配置文件 + if (is_file($this->rootPath . '.env')) { + $this->env->load($this->rootPath . '.env'); + } + + $this->configExt = $this->env->get('config_ext', '.php'); + + // 加载惯例配置文件 + $this->config->set(include $this->thinkPath . 'convention.php'); + + // 设置路径环境变量 + $this->env->set([ + 'think_path' => $this->thinkPath, + 'root_path' => $this->rootPath, + 'app_path' => $this->appPath, + 'config_path' => $this->configPath, + 'route_path' => $this->routePath, + 'runtime_path' => $this->runtimePath, + 'extend_path' => $this->rootPath . 'extend' . DIRECTORY_SEPARATOR, + 'vendor_path' => $this->rootPath . 'vendor' . DIRECTORY_SEPARATOR, + ]); + + $this->namespace = $this->env->get('app_namespace', $this->namespace); + $this->env->set('app_namespace', $this->namespace); + + // 注册应用命名空间 + Loader::addNamespace($this->namespace, $this->appPath); + + // 初始化应用 + $this->init(); + + // 开启类名后缀 + $this->suffix = $this->config('app.class_suffix'); + + // 应用调试模式 + $this->appDebug = $this->env->get('app_debug', $this->config('app.app_debug')); + $this->env->set('app_debug', $this->appDebug); + + if (!$this->appDebug) { + ini_set('display_errors', 'Off'); + } elseif (PHP_SAPI != 'cli') { + //重新申请一块比较大的buffer + if (ob_get_level() > 0) { + $output = ob_get_clean(); + } + ob_start(); + if (!empty($output)) { + echo $output; + } + } + + // 注册异常处理类 + if ($this->config('app.exception_handle')) { + Error::setExceptionHandler($this->config('app.exception_handle')); + } + + // 注册根命名空间 + if (!empty($this->config('app.root_namespace'))) { + Loader::addNamespace($this->config('app.root_namespace')); + } + + // 加载composer autofile文件 + Loader::loadComposerAutoloadFiles(); + + // 注册类库别名 + Loader::addClassAlias($this->config->pull('alias')); + + // 数据库配置初始化 + Db::init($this->config->pull('database')); + + // 设置系统时区 + date_default_timezone_set($this->config('app.default_timezone')); + + // 读取语言包 + $this->loadLangPack(); + + // 路由初始化 + $this->routeInit(); + } + + /** + * 初始化应用或模块 + * @access public + * @param string $module 模块名 + * @return void + */ + public function init($module = '') + { + // 定位模块目录 + $module = $module ? $module . DIRECTORY_SEPARATOR : ''; + $path = $this->appPath . $module; + + // 加载初始化文件 + if (is_file($path . 'init.php')) { + include $path . 'init.php'; + } elseif (is_file($this->runtimePath . $module . 'init.php')) { + include $this->runtimePath . $module . 'init.php'; + } else { + // 加载行为扩展文件 + if (is_file($path . 'tags.php')) { + $tags = include $path . 'tags.php'; + if (is_array($tags)) { + $this->hook->import($tags); + } + } + + // 加载公共文件 + if (is_file($path . 'common.php')) { + include_once $path . 'common.php'; + } + + if ('' == $module) { + // 加载系统助手函数 + include $this->thinkPath . 'helper.php'; + } + + // 加载中间件 + if (is_file($path . 'middleware.php')) { + $middleware = include $path . 'middleware.php'; + if (is_array($middleware)) { + $this->middleware->import($middleware); + } + } + + // 注册服务的容器对象实例 + if (is_file($path . 'provider.php')) { + $provider = include $path . 'provider.php'; + if (is_array($provider)) { + $this->bindTo($provider); + } + } + + // 自动读取配置文件 + if (is_dir($path . 'config')) { + $dir = $path . 'config' . DIRECTORY_SEPARATOR; + } elseif (is_dir($this->configPath . $module)) { + $dir = $this->configPath . $module; + } + + $files = isset($dir) ? scandir($dir) : []; + + foreach ($files as $file) { + if ('.' . pathinfo($file, PATHINFO_EXTENSION) === $this->configExt) { + $this->config->load($dir . $file, pathinfo($file, PATHINFO_FILENAME)); + } + } + } + + $this->setModulePath($path); + + if ($module) { + // 对容器中的对象实例进行配置更新 + $this->containerConfigUpdate($module); + } + } + + protected function containerConfigUpdate($module) + { + $config = $this->config->get(); + + // 注册异常处理类 + if ($config['app']['exception_handle']) { + Error::setExceptionHandler($config['app']['exception_handle']); + } + + Db::init($config['database']); + $this->middleware->setConfig($config['middleware']); + $this->route->setConfig($config['app']); + $this->request->init($config['app']); + $this->cookie->init($config['cookie']); + $this->view->init($config['template']); + $this->log->init($config['log']); + $this->session->setConfig($config['session']); + $this->debug->setConfig($config['trace']); + $this->cache->init($config['cache'], true); + + // 加载当前模块语言包 + $this->lang->load($this->appPath . $module . DIRECTORY_SEPARATOR . 'lang' . DIRECTORY_SEPARATOR . $this->request->langset() . '.php'); + + // 模块请求缓存检查 + $this->checkRequestCache( + $config['app']['request_cache'], + $config['app']['request_cache_expire'], + $config['app']['request_cache_except'] + ); + } + + /** + * 执行应用程序 + * @access public + * @return Response + * @throws Exception + */ + public function run() + { + try { + // 初始化应用 + $this->initialize(); + + // 监听app_init + $this->hook->listen('app_init'); + + if ($this->bindModule) { + // 模块/控制器绑定 + $this->route->bind($this->bindModule); + } elseif ($this->config('app.auto_bind_module')) { + // 入口自动绑定 + $name = pathinfo($this->request->baseFile(), PATHINFO_FILENAME); + if ($name && 'index' != $name && is_dir($this->appPath . $name)) { + $this->route->bind($name); + } + } + + // 监听app_dispatch + $this->hook->listen('app_dispatch'); + + $dispatch = $this->dispatch; + + if (empty($dispatch)) { + // 路由检测 + $dispatch = $this->routeCheck()->init(); + } + + // 记录当前调度信息 + $this->request->dispatch($dispatch); + + // 记录路由和请求信息 + if ($this->appDebug) { + $this->log('[ ROUTE ] ' . var_export($this->request->routeInfo(), true)); + $this->log('[ HEADER ] ' . var_export($this->request->header(), true)); + $this->log('[ PARAM ] ' . var_export($this->request->param(), true)); + } + + // 监听app_begin + $this->hook->listen('app_begin'); + + // 请求缓存检查 + $this->checkRequestCache( + $this->config('request_cache'), + $this->config('request_cache_expire'), + $this->config('request_cache_except') + ); + + $data = null; + } catch (HttpResponseException $exception) { + $dispatch = null; + $data = $exception->getResponse(); + } + + $this->middleware->add(function (Request $request, $next) use ($dispatch, $data) { + return is_null($data) ? $dispatch->run() : $data; + }); + + $response = $this->middleware->dispatch($this->request); + + // 监听app_end + $this->hook->listen('app_end', $response); + + return $response; + } + + protected function getRouteCacheKey() + { + if ($this->config->get('route_check_cache_key')) { + $closure = $this->config->get('route_check_cache_key'); + $routeKey = $closure($this->request); + } else { + $routeKey = md5($this->request->baseUrl(true) . ':' . $this->request->method()); + } + + return $routeKey; + } + + protected function loadLangPack() + { + // 读取默认语言 + $this->lang->range($this->config('app.default_lang')); + + if ($this->config('app.lang_switch_on')) { + // 开启多语言机制 检测当前语言 + $this->lang->detect(); + } + + $this->request->setLangset($this->lang->range()); + + // 加载系统语言包 + $this->lang->load([ + $this->thinkPath . 'lang' . DIRECTORY_SEPARATOR . $this->request->langset() . '.php', + $this->appPath . 'lang' . DIRECTORY_SEPARATOR . $this->request->langset() . '.php', + ]); + } + + /** + * 设置当前地址的请求缓存 + * @access public + * @param string $key 缓存标识,支持变量规则 ,例如 item/:name/:id + * @param mixed $expire 缓存有效期 + * @param array $except 缓存排除 + * @param string $tag 缓存标签 + * @return void + */ + public function checkRequestCache($key, $expire = null, $except = [], $tag = null) + { + $cache = $this->request->cache($key, $expire, $except, $tag); + + if ($cache) { + $this->setResponseCache($cache); + } + } + + public function setResponseCache($cache) + { + list($key, $expire, $tag) = $cache; + + if (strtotime($this->request->server('HTTP_IF_MODIFIED_SINCE')) + $expire > $this->request->server('REQUEST_TIME')) { + // 读取缓存 + $response = Response::create()->code(304); + throw new HttpResponseException($response); + } elseif ($this->cache->has($key)) { + list($content, $header) = $this->cache->get($key); + + $response = Response::create($content)->header($header); + throw new HttpResponseException($response); + } + } + + /** + * 设置当前请求的调度信息 + * @access public + * @param Dispatch $dispatch 调度信息 + * @return $this + */ + public function dispatch(Dispatch $dispatch) + { + $this->dispatch = $dispatch; + return $this; + } + + /** + * 记录调试信息 + * @access public + * @param mixed $msg 调试信息 + * @param string $type 信息类型 + * @return void + */ + public function log($msg, $type = 'info') + { + $this->appDebug && $this->log->record($msg, $type); + } + + /** + * 获取配置参数 为空则获取所有配置 + * @access public + * @param string $name 配置参数名(支持二级配置 .号分割) + * @return mixed + */ + public function config($name = '') + { + return $this->config->get($name); + } + + /** + * 路由初始化 导入路由定义规则 + * @access public + * @return void + */ + public function routeInit() + { + // 路由检测 + $files = scandir($this->routePath); + foreach ($files as $file) { + if (strpos($file, '.php')) { + $filename = $this->routePath . $file; + // 导入路由配置 + $rules = include $filename; + if (is_array($rules)) { + $this->route->import($rules); + } + } + } + + if ($this->route->config('route_annotation')) { + // 自动生成路由定义 + if ($this->appDebug) { + $suffix = $this->route->config('controller_suffix') || $this->route->config('class_suffix'); + $this->build->buildRoute($suffix); + } + + $filename = $this->runtimePath . 'build_route.php'; + + if (is_file($filename)) { + include $filename; + } + } + } + + /** + * URL路由检测(根据PATH_INFO) + * @access public + * @return Dispatch + */ + public function routeCheck() + { + // 检测路由缓存 + if (!$this->appDebug && $this->config->get('route_check_cache')) { + $routeKey = $this->getRouteCacheKey(); + $option = $this->config->get('route_cache_option'); + + if ($option && $this->cache->connect($option)->has($routeKey)) { + return $this->cache->connect($option)->get($routeKey); + } elseif ($this->cache->has($routeKey)) { + return $this->cache->get($routeKey); + } + } + + // 获取应用调度信息 + $path = $this->request->path(); + + // 是否强制路由模式 + $must = !is_null($this->routeMust) ? $this->routeMust : $this->route->config('url_route_must'); + + // 路由检测 返回一个Dispatch对象 + $dispatch = $this->route->check($path, $must); + + if (!empty($routeKey)) { + try { + if ($option) { + $this->cache->connect($option)->tag('route_cache')->set($routeKey, $dispatch); + } else { + $this->cache->tag('route_cache')->set($routeKey, $dispatch); + } + } catch (\Exception $e) { + // 存在闭包的时候缓存无效 + } + } + + return $dispatch; + } + + /** + * 设置应用的路由检测机制 + * @access public + * @param bool $must 是否强制检测路由 + * @return $this + */ + public function routeMust($must = false) + { + $this->routeMust = $must; + return $this; + } + + /** + * 解析模块和类名 + * @access protected + * @param string $name 资源地址 + * @param string $layer 验证层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @return array + */ + protected function parseModuleAndClass($name, $layer, $appendSuffix) + { + if (false !== strpos($name, '\\')) { + $class = $name; + $module = $this->request->module(); + } else { + if (strpos($name, '/')) { + list($module, $name) = explode('/', $name, 2); + } else { + $module = $this->request->module(); + } + + $class = $this->parseClass($module, $layer, $name, $appendSuffix); + } + + return [$module, $class]; + } + + /** + * 实例化应用类库 + * @access public + * @param string $name 类名称 + * @param string $layer 业务层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @param string $common 公共模块名 + * @return object + * @throws ClassNotFoundException + */ + public function create($name, $layer, $appendSuffix = false, $common = 'common') + { + $guid = $name . $layer; + + if ($this->__isset($guid)) { + return $this->__get($guid); + } + + list($module, $class) = $this->parseModuleAndClass($name, $layer, $appendSuffix); + + if (class_exists($class)) { + $object = $this->__get($class); + } else { + $class = str_replace('\\' . $module . '\\', '\\' . $common . '\\', $class); + if (class_exists($class)) { + $object = $this->__get($class); + } else { + throw new ClassNotFoundException('class not exists:' . $class, $class); + } + } + + $this->__set($guid, $class); + + return $object; + } + + /** + * 实例化(分层)模型 + * @access public + * @param string $name Model名称 + * @param string $layer 业务层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @param string $common 公共模块名 + * @return Model + * @throws ClassNotFoundException + */ + public function model($name = '', $layer = 'model', $appendSuffix = false, $common = 'common') + { + return $this->create($name, $layer, $appendSuffix, $common); + } + + /** + * 实例化(分层)控制器 格式:[模块名/]控制器名 + * @access public + * @param string $name 资源地址 + * @param string $layer 控制层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @param string $empty 空控制器名称 + * @return object + * @throws ClassNotFoundException + */ + public function controller($name, $layer = 'controller', $appendSuffix = false, $empty = '') + { + list($module, $class) = $this->parseModuleAndClass($name, $layer, $appendSuffix); + + if (class_exists($class)) { + return $this->make($class, true); + } elseif ($empty && class_exists($emptyClass = $this->parseClass($module, $layer, $empty, $appendSuffix))) { + return $this->make($emptyClass, true); + } + + throw new ClassNotFoundException('class not exists:' . $class, $class); + } + + /** + * 实例化验证类 格式:[模块名/]验证器名 + * @access public + * @param string $name 资源地址 + * @param string $layer 验证层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @param string $common 公共模块名 + * @return Validate + * @throws ClassNotFoundException + */ + public function validate($name = '', $layer = 'validate', $appendSuffix = false, $common = 'common') + { + $name = $name ?: $this->config('default_validate'); + + if (empty($name)) { + return new Validate; + } + + return $this->create($name, $layer, $appendSuffix, $common); + } + + /** + * 数据库初始化 + * @access public + * @param mixed $config 数据库配置 + * @param bool|string $name 连接标识 true 强制重新连接 + * @return \think\db\Query + */ + public function db($config = [], $name = false) + { + return Db::connect($config, $name); + } + + /** + * 远程调用模块的操作方法 参数格式 [模块/控制器/]操作 + * @access public + * @param string $url 调用地址 + * @param string|array $vars 调用参数 支持字符串和数组 + * @param string $layer 要调用的控制层名称 + * @param bool $appendSuffix 是否添加类名后缀 + * @return mixed + * @throws ClassNotFoundException + */ + public function action($url, $vars = [], $layer = 'controller', $appendSuffix = false) + { + $info = pathinfo($url); + $action = $info['basename']; + $module = '.' != $info['dirname'] ? $info['dirname'] : $this->request->controller(); + $class = $this->controller($module, $layer, $appendSuffix); + + if (is_scalar($vars)) { + if (strpos($vars, '=')) { + parse_str($vars, $vars); + } else { + $vars = [$vars]; + } + } + + return $this->invokeMethod([$class, $action . $this->config('action_suffix')], $vars); + } + + /** + * 解析应用类的类名 + * @access public + * @param string $module 模块名 + * @param string $layer 层名 controller model ... + * @param string $name 类名 + * @param bool $appendSuffix + * @return string + */ + public function parseClass($module, $layer, $name, $appendSuffix = false) + { + $name = str_replace(['/', '.'], '\\', $name); + $array = explode('\\', $name); + $class = Loader::parseName(array_pop($array), 1) . ($this->suffix || $appendSuffix ? ucfirst($layer) : ''); + $path = $array ? implode('\\', $array) . '\\' : ''; + + return $this->namespace . '\\' . ($module ? $module . '\\' : '') . $layer . '\\' . $path . $class; + } + + /** + * 获取框架版本 + * @access public + * @return string + */ + public function version() + { + return static::VERSION; + } + + /** + * 是否为调试模式 + * @access public + * @return bool + */ + public function isDebug() + { + return $this->appDebug; + } + + /** + * 获取模块路径 + * @access public + * @return string + */ + public function getModulePath() + { + return $this->modulePath; + } + + /** + * 设置模块路径 + * @access public + * @param string $path 路径 + * @return void + */ + public function setModulePath($path) + { + $this->modulePath = $path; + $this->env->set('module_path', $path); + } + + /** + * 获取应用根目录 + * @access public + * @return string + */ + public function getRootPath() + { + return $this->rootPath; + } + + /** + * 获取应用类库目录 + * @access public + * @return string + */ + public function getAppPath() + { + if (is_null($this->appPath)) { + $this->appPath = Loader::getRootPath() . 'application' . DIRECTORY_SEPARATOR; + } + + return $this->appPath; + } + + /** + * 获取应用运行时目录 + * @access public + * @return string + */ + public function getRuntimePath() + { + return $this->runtimePath; + } + + /** + * 获取核心框架目录 + * @access public + * @return string + */ + public function getThinkPath() + { + return $this->thinkPath; + } + + /** + * 获取路由目录 + * @access public + * @return string + */ + public function getRoutePath() + { + return $this->routePath; + } + + /** + * 获取应用配置目录 + * @access public + * @return string + */ + public function getConfigPath() + { + return $this->configPath; + } + + /** + * 获取配置后缀 + * @access public + * @return string + */ + public function getConfigExt() + { + return $this->configExt; + } + + /** + * 获取应用类库命名空间 + * @access public + * @return string + */ + public function getNamespace() + { + return $this->namespace; + } + + /** + * 设置应用类库命名空间 + * @access public + * @param string $namespace 命名空间名称 + * @return $this + */ + public function setNamespace($namespace) + { + $this->namespace = $namespace; + return $this; + } + + /** + * 是否启用类库后缀 + * @access public + * @return bool + */ + public function getSuffix() + { + return $this->suffix; + } + + /** + * 获取应用开启时间 + * @access public + * @return float + */ + public function getBeginTime() + { + return $this->beginTime; + } + + /** + * 获取应用初始内存占用 + * @access public + * @return integer + */ + public function getBeginMem() + { + return $this->beginMem; + } + +} diff --git a/thinkphp/library/think/Build.php b/thinkphp/library/think/Build.php new file mode 100755 index 0000000..7a531d7 --- /dev/null +++ b/thinkphp/library/think/Build.php @@ -0,0 +1,415 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class Build +{ + /** + * 应用对象 + * @var App + */ + protected $app; + + /** + * 应用目录 + * @var string + */ + protected $basePath; + + public function __construct(App $app) + { + $this->app = $app; + $this->basePath = $this->app->getAppPath(); + } + + /** + * 根据传入的build资料创建目录和文件 + * @access public + * @param array $build build列表 + * @param string $namespace 应用类库命名空间 + * @param bool $suffix 类库后缀 + * @return void + */ + public function run(array $build = [], $namespace = 'app', $suffix = false) + { + // 锁定 + $lockfile = $this->basePath . 'build.lock'; + + if (is_writable($lockfile)) { + return; + } elseif (!touch($lockfile)) { + throw new Exception('应用目录[' . $this->basePath . ']不可写,目录无法自动生成!
                            请手动生成项目目录~', 10006); + } + + foreach ($build as $module => $list) { + if ('__dir__' == $module) { + // 创建目录列表 + $this->buildDir($list); + } elseif ('__file__' == $module) { + // 创建文件列表 + $this->buildFile($list); + } else { + // 创建模块 + $this->module($module, $list, $namespace, $suffix); + } + } + + // 解除锁定 + unlink($lockfile); + } + + /** + * 创建目录 + * @access protected + * @param array $list 目录列表 + * @return void + */ + protected function buildDir($list) + { + foreach ($list as $dir) { + $this->checkDirBuild($this->basePath . $dir); + } + } + + /** + * 创建文件 + * @access protected + * @param array $list 文件列表 + * @return void + */ + protected function buildFile($list) + { + foreach ($list as $file) { + if (!is_dir($this->basePath . dirname($file))) { + // 创建目录 + mkdir($this->basePath . dirname($file), 0755, true); + } + + if (!is_file($this->basePath . $file)) { + file_put_contents($this->basePath . $file, 'php' == pathinfo($file, PATHINFO_EXTENSION) ? "basePath . $module)) { + // 创建模块目录 + mkdir($this->basePath . $module); + } + + if (basename($this->app->getRuntimePath()) != $module) { + // 创建配置文件和公共文件 + $this->buildCommon($module); + // 创建模块的默认页面 + $this->buildHello($module, $namespace, $suffix); + } + + if (empty($list)) { + // 创建默认的模块目录和文件 + $list = [ + '__file__' => ['common.php'], + '__dir__' => ['controller', 'model', 'view', 'config'], + ]; + } + + // 创建子目录和文件 + foreach ($list as $path => $file) { + $modulePath = $this->basePath . $module . DIRECTORY_SEPARATOR; + if ('__dir__' == $path) { + // 生成子目录 + foreach ($file as $dir) { + $this->checkDirBuild($modulePath . $dir); + } + } elseif ('__file__' == $path) { + // 生成(空白)文件 + foreach ($file as $name) { + if (!is_file($modulePath . $name)) { + file_put_contents($modulePath . $name, 'php' == pathinfo($name, PATHINFO_EXTENSION) ? "checkDirBuild(dirname($filename)); + $content = ''; + break; + default: + // 其他文件 + $content = "app->getNameSpace(); + $content = 'app->config('app.url_controller_layer'); + } + + if ($this->app->config('app.app_multi_module')) { + $modules = glob($this->basePath . '*', GLOB_ONLYDIR); + + foreach ($modules as $module) { + $module = basename($module); + + if (in_array($module, $this->app->config('app.deny_module_list'))) { + continue; + } + + $path = $this->basePath . $module . DIRECTORY_SEPARATOR . $layer . DIRECTORY_SEPARATOR; + $content .= $this->buildDirRoute($path, $namespace, $module, $suffix, $layer); + } + } else { + $path = $this->basePath . $layer . DIRECTORY_SEPARATOR; + $content .= $this->buildDirRoute($path, $namespace, '', $suffix, $layer); + } + + $filename = $this->app->getRuntimePath() . 'build_route.php'; + file_put_contents($filename, $content); + + return $filename; + } + + /** + * 生成子目录控制器类的路由规则 + * @access protected + * @param string $path 控制器目录 + * @param string $namespace 应用命名空间 + * @param string $module 模块 + * @param bool $suffix 类库后缀 + * @param string $layer 控制器层目录名 + * @return string + */ + protected function buildDirRoute($path, $namespace, $module, $suffix, $layer) + { + $content = ''; + $controllers = glob($path . '*.php'); + + foreach ($controllers as $controller) { + $controller = basename($controller, '.php'); + + $class = new \ReflectionClass($namespace . '\\' . ($module ? $module . '\\' : '') . $layer . '\\' . $controller); + + if (strpos($layer, '\\')) { + // 多级控制器 + $level = str_replace(DIRECTORY_SEPARATOR, '.', substr($layer, 11)); + $controller = $level . '.' . $controller; + $length = strlen(strstr($layer, '\\', true)); + } else { + $length = strlen($layer); + } + + if ($suffix) { + $controller = substr($controller, 0, -$length); + } + + $content .= $this->getControllerRoute($class, $module, $controller); + } + + $subDir = glob($path . '*', GLOB_ONLYDIR); + + foreach ($subDir as $dir) { + $content .= $this->buildDirRoute($dir . DIRECTORY_SEPARATOR, $namespace, $module, $suffix, $layer . '\\' . basename($dir)); + } + + return $content; + } + + /** + * 生成控制器类的路由规则 + * @access protected + * @param string $class 控制器完整类名 + * @param string $module 模块名 + * @param string $controller 控制器名 + * @return string + */ + protected function getControllerRoute($class, $module, $controller) + { + $content = ''; + $comment = $class->getDocComment(); + + if (false !== strpos($comment, '@route(')) { + $comment = $this->parseRouteComment($comment); + $route = ($module ? $module . '/' : '') . $controller; + $comment = preg_replace('/route\(\s?([\'\"][\-\_\/\:\<\>\?\$\[\]\w]+[\'\"])\s?\)/is', 'Route::resource(\1,\'' . $route . '\')', $comment); + $content .= PHP_EOL . $comment; + } elseif (false !== strpos($comment, '@alias(')) { + $comment = $this->parseRouteComment($comment, '@alias('); + $route = ($module ? $module . '/' : '') . $controller; + $comment = preg_replace('/alias\(\s?([\'\"][\-\_\/\w]+[\'\"])\s?\)/is', 'Route::alias(\1,\'' . $route . '\')', $comment); + $content .= PHP_EOL . $comment; + } + + $methods = $class->getMethods(\ReflectionMethod::IS_PUBLIC); + + foreach ($methods as $method) { + $comment = $this->getMethodRouteComment($module, $controller, $method); + if ($comment) { + $content .= PHP_EOL . $comment; + } + } + + return $content; + } + + /** + * 解析路由注释 + * @access protected + * @param string $comment + * @param string $tag + * @return string + */ + protected function parseRouteComment($comment, $tag = '@route(') + { + $comment = substr($comment, 3, -2); + $comment = explode(PHP_EOL, substr(strstr(trim($comment), $tag), 1)); + $comment = array_map(function ($item) {return trim(trim($item), ' \t*');}, $comment); + + if (count($comment) > 1) { + $key = array_search('', $comment); + $comment = array_slice($comment, 0, false === $key ? 1 : $key); + } + + $comment = implode(PHP_EOL . "\t", $comment) . ';'; + + if (strpos($comment, '{')) { + $comment = preg_replace_callback('/\{\s?.*?\s?\}/s', function ($matches) { + return false !== strpos($matches[0], '"') ? '[' . substr(var_export(json_decode($matches[0], true), true), 7, -1) . ']' : $matches[0]; + }, $comment); + } + return $comment; + } + + /** + * 获取方法的路由注释 + * @access protected + * @param string $module 模块 + * @param string $controller 控制器名 + * @param \ReflectMethod $reflectMethod + * @return string|void + */ + protected function getMethodRouteComment($module, $controller, $reflectMethod) + { + $comment = $reflectMethod->getDocComment(); + + if (false !== strpos($comment, '@route(')) { + $comment = $this->parseRouteComment($comment); + $action = $reflectMethod->getName(); + + if ($suffix = $this->app->config('app.action_suffix')) { + $action = substr($action, 0, -strlen($suffix)); + } + + $route = ($module ? $module . '/' : '') . $controller . '/' . $action; + $comment = preg_replace('/route\s?\(\s?([\'\"][\-\_\/\:\<\>\?\$\[\]\w]+[\'\"])\s?\,?\s?[\'\"]?(\w+?)[\'\"]?\s?\)/is', 'Route::\2(\1,\'' . $route . '\')', $comment); + $comment = preg_replace('/route\s?\(\s?([\'\"][\-\_\/\:\<\>\?\$\[\]\w]+[\'\"])\s?\)/is', 'Route::rule(\1,\'' . $route . '\')', $comment); + + return $comment; + } + } + + /** + * 创建模块的欢迎页面 + * @access protected + * @param string $module 模块名 + * @param string $namespace 应用类库命名空间 + * @param bool $suffix 类库后缀 + * @return void + */ + protected function buildHello($module, $namespace, $suffix = false) + { + $filename = $this->basePath . ($module ? $module . DIRECTORY_SEPARATOR : '') . 'controller' . DIRECTORY_SEPARATOR . 'Index' . ($suffix ? 'Controller' : '') . '.php'; + if (!is_file($filename)) { + $content = file_get_contents($this->app->getThinkPath() . 'tpl' . DIRECTORY_SEPARATOR . 'default_index.tpl'); + $content = str_replace(['{$app}', '{$module}', '{layer}', '{$suffix}'], [$namespace, $module ? $module . '\\' : '', 'controller', $suffix ? 'Controller' : ''], $content); + $this->checkDirBuild(dirname($filename)); + + file_put_contents($filename, $content); + } + } + + /** + * 创建模块的公共文件 + * @access protected + * @param string $module 模块名 + * @return void + */ + protected function buildCommon($module) + { + $filename = $this->app->getConfigPath() . ($module ? $module . DIRECTORY_SEPARATOR : '') . 'app.php'; + $this->checkDirBuild(dirname($filename)); + + if (!is_file($filename)) { + file_put_contents($filename, "basePath . ($module ? $module . DIRECTORY_SEPARATOR : '') . 'common.php'; + + if (!is_file($filename)) { + file_put_contents($filename, " +// +---------------------------------------------------------------------- + +namespace think; + +use think\cache\Driver; + +/** + * Class Cache + * + * @package think + * + * @mixin Driver + * @mixin \think\cache\driver\File + */ +class Cache +{ + /** + * 缓存实例 + * @var array + */ + protected $instance = []; + + /** + * 缓存配置 + * @var array + */ + protected $config = []; + + /** + * 操作句柄 + * @var object + */ + protected $handler; + + public function __construct(array $config = []) + { + $this->config = $config; + $this->init($config); + } + + /** + * 连接缓存 + * @access public + * @param array $options 配置数组 + * @param bool|string $name 缓存连接标识 true 强制重新连接 + * @return Driver + */ + public function connect(array $options = [], $name = false) + { + if (false === $name) { + $name = md5(serialize($options)); + } + + if (true === $name || !isset($this->instance[$name])) { + $type = !empty($options['type']) ? $options['type'] : 'File'; + + if (true === $name) { + $name = md5(serialize($options)); + } + + $this->instance[$name] = Loader::factory($type, '\\think\\cache\\driver\\', $options); + } + + return $this->instance[$name]; + } + + /** + * 自动初始化缓存 + * @access public + * @param array $options 配置数组 + * @param bool $force 强制更新 + * @return Driver + */ + public function init(array $options = [], $force = false) + { + if (is_null($this->handler) || $force) { + + if ('complex' == $options['type']) { + $default = $options['default']; + $options = isset($options[$default['type']]) ? $options[$default['type']] : $default; + } + + $this->handler = $this->connect($options); + } + + return $this->handler; + } + + public static function __make(Config $config) + { + return new static($config->pull('cache')); + } + + public function getConfig() + { + return $this->config; + } + + public function setConfig(array $config) + { + $this->config = array_merge($this->config, $config); + } + + /** + * 切换缓存类型 需要配置 cache.type 为 complex + * @access public + * @param string $name 缓存标识 + * @return Driver + */ + public function store($name = '') + { + if ('' !== $name && 'complex' == $this->config['type']) { + return $this->connect($this->config[$name], strtolower($name)); + } + + return $this->init(); + } + + public function __call($method, $args) + { + return call_user_func_array([$this->init(), $method], $args); + } + +} diff --git a/thinkphp/library/think/Collection.php b/thinkphp/library/think/Collection.php new file mode 100755 index 0000000..8251fc8 --- /dev/null +++ b/thinkphp/library/think/Collection.php @@ -0,0 +1,552 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use ArrayAccess; +use ArrayIterator; +use Countable; +use IteratorAggregate; +use JsonSerializable; + +class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable +{ + /** + * 数据集数据 + * @var array + */ + protected $items = []; + + public function __construct($items = []) + { + $this->items = $this->convertToArray($items); + } + + public static function make($items = []) + { + return new static($items); + } + + /** + * 是否为空 + * @access public + * @return bool + */ + public function isEmpty() + { + return empty($this->items); + } + + public function toArray() + { + return array_map(function ($value) { + return ($value instanceof Model || $value instanceof self) ? $value->toArray() : $value; + }, $this->items); + } + + public function all() + { + return $this->items; + } + + /** + * 合并数组 + * + * @access public + * @param mixed $items + * @return static + */ + public function merge($items) + { + return new static(array_merge($this->items, $this->convertToArray($items))); + } + + /** + * 交换数组中的键和值 + * + * @access public + * @return static + */ + public function flip() + { + return new static(array_flip($this->items)); + } + + /** + * 按指定键整理数据 + * + * @access public + * @param mixed $items 数据 + * @param string $indexKey 键名 + * @return array + */ + public function dictionary($items = null, &$indexKey = null) + { + if ($items instanceof self || $items instanceof Paginator) { + $items = $items->all(); + } + + $items = is_null($items) ? $this->items : $items; + + if ($items && empty($indexKey)) { + $indexKey = is_array($items[0]) ? 'id' : $items[0]->getPk(); + } + + if (isset($indexKey) && is_string($indexKey)) { + return array_column($items, null, $indexKey); + } + + return $items; + } + + /** + * 比较数组,返回差集 + * + * @access public + * @param mixed $items 数据 + * @param string $indexKey 指定比较的键名 + * @return static + */ + public function diff($items, $indexKey = null) + { + if ($this->isEmpty() || is_scalar($this->items[0])) { + return new static(array_diff($this->items, $this->convertToArray($items))); + } + + $diff = []; + $dictionary = $this->dictionary($items, $indexKey); + + if (is_string($indexKey)) { + foreach ($this->items as $item) { + if (!isset($dictionary[$item[$indexKey]])) { + $diff[] = $item; + } + } + } + + return new static($diff); + } + + /** + * 比较数组,返回交集 + * + * @access public + * @param mixed $items 数据 + * @param string $indexKey 指定比较的键名 + * @return static + */ + public function intersect($items, $indexKey = null) + { + if ($this->isEmpty() || is_scalar($this->items[0])) { + return new static(array_diff($this->items, $this->convertToArray($items))); + } + + $intersect = []; + $dictionary = $this->dictionary($items, $indexKey); + + if (is_string($indexKey)) { + foreach ($this->items as $item) { + if (isset($dictionary[$item[$indexKey]])) { + $intersect[] = $item; + } + } + } + + return new static($intersect); + } + + /** + * 返回数组中所有的键名 + * + * @access public + * @return array + */ + public function keys() + { + $current = current($this->items); + + if (is_scalar($current)) { + $array = $this->items; + } elseif (is_array($current)) { + $array = $current; + } else { + $array = $current->toArray(); + } + + return array_keys($array); + } + + /** + * 删除数组的最后一个元素(出栈) + * + * @access public + * @return mixed + */ + public function pop() + { + return array_pop($this->items); + } + + /** + * 通过使用用户自定义函数,以字符串返回数组 + * + * @access public + * @param callable $callback + * @param mixed $initial + * @return mixed + */ + public function reduce(callable $callback, $initial = null) + { + return array_reduce($this->items, $callback, $initial); + } + + /** + * 以相反的顺序返回数组。 + * + * @access public + * @return static + */ + public function reverse() + { + return new static(array_reverse($this->items)); + } + + /** + * 删除数组中首个元素,并返回被删除元素的值 + * + * @access public + * @return mixed + */ + public function shift() + { + return array_shift($this->items); + } + + /** + * 在数组结尾插入一个元素 + * @access public + * @param mixed $value + * @param mixed $key + * @return void + */ + public function push($value, $key = null) + { + if (is_null($key)) { + $this->items[] = $value; + } else { + $this->items[$key] = $value; + } + } + + /** + * 把一个数组分割为新的数组块. + * + * @access public + * @param int $size + * @param bool $preserveKeys + * @return static + */ + public function chunk($size, $preserveKeys = false) + { + $chunks = []; + + foreach (array_chunk($this->items, $size, $preserveKeys) as $chunk) { + $chunks[] = new static($chunk); + } + + return new static($chunks); + } + + /** + * 在数组开头插入一个元素 + * @access public + * @param mixed $value + * @param mixed $key + * @return void + */ + public function unshift($value, $key = null) + { + if (is_null($key)) { + array_unshift($this->items, $value); + } else { + $this->items = [$key => $value] + $this->items; + } + } + + /** + * 给每个元素执行个回调 + * + * @access public + * @param callable $callback + * @return $this + */ + public function each(callable $callback) + { + foreach ($this->items as $key => $item) { + $result = $callback($item, $key); + + if (false === $result) { + break; + } elseif (!is_object($item)) { + $this->items[$key] = $result; + } + } + + return $this; + } + + /** + * 用回调函数处理数组中的元素 + * @access public + * @param callable|null $callback + * @return static + */ + public function map(callable $callback) + { + return new static(array_map($callback, $this->items)); + } + + /** + * 用回调函数过滤数组中的元素 + * @access public + * @param callable|null $callback + * @return static + */ + public function filter(callable $callback = null) + { + if ($callback) { + return new static(array_filter($this->items, $callback)); + } + + return new static(array_filter($this->items)); + } + + /** + * 根据字段条件过滤数组中的元素 + * @access public + * @param string $field 字段名 + * @param mixed $operator 操作符 + * @param mixed $value 数据 + * @return static + */ + public function where($field, $operator, $value = null) + { + if (is_null($value)) { + $value = $operator; + $operator = '='; + } + + return $this->filter(function ($data) use ($field, $operator, $value) { + if (strpos($field, '.')) { + list($field, $relation) = explode('.', $field); + + $result = isset($data[$field][$relation]) ? $data[$field][$relation] : null; + } else { + $result = isset($data[$field]) ? $data[$field] : null; + } + + switch (strtolower($operator)) { + case '===': + return $result === $value; + case '!==': + return $result !== $value; + case '!=': + case '<>': + return $result != $value; + case '>': + return $result > $value; + case '>=': + return $result >= $value; + case '<': + return $result < $value; + case '<=': + return $result <= $value; + case 'like': + return is_string($result) && false !== strpos($result, $value); + case 'not like': + return is_string($result) && false === strpos($result, $value); + case 'in': + return is_scalar($result) && in_array($result, $value, true); + case 'not in': + return is_scalar($result) && !in_array($result, $value, true); + case 'between': + list($min, $max) = is_string($value) ? explode(',', $value) : $value; + return is_scalar($result) && $result >= $min && $result <= $max; + case 'not between': + list($min, $max) = is_string($value) ? explode(',', $value) : $value; + return is_scalar($result) && $result > $max || $result < $min; + case '==': + case '=': + default: + return $result == $value; + } + }); + } + + /** + * 返回数据中指定的一列 + * @access public + * @param mixed $columnKey 键名 + * @param mixed $indexKey 作为索引值的列 + * @return array + */ + public function column($columnKey, $indexKey = null) + { + return array_column($this->items, $columnKey, $indexKey); + } + + /** + * 对数组排序 + * + * @access public + * @param callable|null $callback + * @return static + */ + public function sort(callable $callback = null) + { + $items = $this->items; + + $callback = $callback ?: function ($a, $b) { + return $a == $b ? 0 : (($a < $b) ? -1 : 1); + + }; + + uasort($items, $callback); + + return new static($items); + } + + /** + * 指定字段排序 + * @access public + * @param string $field 排序字段 + * @param string $order 排序 + * @param bool $intSort 是否为数字排序 + * @return $this + */ + public function order($field, $order = null, $intSort = true) + { + return $this->sort(function ($a, $b) use ($field, $order, $intSort) { + $fieldA = isset($a[$field]) ? $a[$field] : null; + $fieldB = isset($b[$field]) ? $b[$field] : null; + + if ($intSort) { + return 'desc' == strtolower($order) ? $fieldB >= $fieldA : $fieldA >= $fieldB; + } else { + return 'desc' == strtolower($order) ? strcmp($fieldB, $fieldA) : strcmp($fieldA, $fieldB); + } + }); + } + + /** + * 将数组打乱 + * + * @access public + * @return static + */ + public function shuffle() + { + $items = $this->items; + + shuffle($items); + + return new static($items); + } + + /** + * 截取数组 + * + * @access public + * @param int $offset + * @param int $length + * @param bool $preserveKeys + * @return static + */ + public function slice($offset, $length = null, $preserveKeys = false) + { + return new static(array_slice($this->items, $offset, $length, $preserveKeys)); + } + + // ArrayAccess + public function offsetExists($offset) + { + return array_key_exists($offset, $this->items); + } + + public function offsetGet($offset) + { + return $this->items[$offset]; + } + + public function offsetSet($offset, $value) + { + if (is_null($offset)) { + $this->items[] = $value; + } else { + $this->items[$offset] = $value; + } + } + + public function offsetUnset($offset) + { + unset($this->items[$offset]); + } + + //Countable + public function count() + { + return count($this->items); + } + + //IteratorAggregate + public function getIterator() + { + return new ArrayIterator($this->items); + } + + //JsonSerializable + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * 转换当前数据集为JSON字符串 + * @access public + * @param integer $options json参数 + * @return string + */ + public function toJson($options = JSON_UNESCAPED_UNICODE) + { + return json_encode($this->toArray(), $options); + } + + public function __toString() + { + return $this->toJson(); + } + + /** + * 转换成数组 + * + * @access public + * @param mixed $items + * @return array + */ + protected function convertToArray($items) + { + if ($items instanceof self) { + return $items->all(); + } + + return (array) $items; + } +} diff --git a/thinkphp/library/think/Config.php b/thinkphp/library/think/Config.php new file mode 100755 index 0000000..bec6222 --- /dev/null +++ b/thinkphp/library/think/Config.php @@ -0,0 +1,398 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use Yaconf; + +class Config implements \ArrayAccess +{ + /** + * 配置参数 + * @var array + */ + protected $config = []; + + /** + * 配置前缀 + * @var string + */ + protected $prefix = 'app'; + + /** + * 配置文件目录 + * @var string + */ + protected $path; + + /** + * 配置文件后缀 + * @var string + */ + protected $ext; + + /** + * 是否支持Yaconf + * @var bool + */ + protected $yaconf; + + /** + * 构造方法 + * @access public + */ + public function __construct($path = '', $ext = '.php') + { + $this->path = $path; + $this->ext = $ext; + $this->yaconf = class_exists('Yaconf'); + } + + public static function __make(App $app) + { + $path = $app->getConfigPath(); + $ext = $app->getConfigExt(); + return new static($path, $ext); + } + + /** + * 设置开启Yaconf + * @access public + * @param bool|string $yaconf 是否使用Yaconf + * @return void + */ + public function setYaconf($yaconf) + { + if ($this->yaconf) { + $this->yaconf = $yaconf; + } + } + + /** + * 设置配置参数默认前缀 + * @access public + * @param string $prefix 前缀 + * @return void + */ + public function setDefaultPrefix($prefix) + { + $this->prefix = $prefix; + } + + /** + * 解析配置文件或内容 + * @access public + * @param string $config 配置文件路径或内容 + * @param string $type 配置解析类型 + * @param string $name 配置名(如设置即表示二级配置) + * @return mixed + */ + public function parse($config, $type = '', $name = '') + { + if (empty($type)) { + $type = pathinfo($config, PATHINFO_EXTENSION); + } + + $object = Loader::factory($type, '\\think\\config\\driver\\', $config); + + return $this->set($object->parse(), $name); + } + + /** + * 加载配置文件(多种格式) + * @access public + * @param string $file 配置文件名 + * @param string $name 一级配置名 + * @return mixed + */ + public function load($file, $name = '') + { + if (is_file($file)) { + $filename = $file; + } elseif (is_file($this->path . $file . $this->ext)) { + $filename = $this->path . $file . $this->ext; + } + + if (isset($filename)) { + return $this->loadFile($filename, $name); + } elseif ($this->yaconf && Yaconf::has($file)) { + return $this->set(Yaconf::get($file), $name); + } + + return $this->config; + } + + /** + * 获取实际的yaconf配置参数 + * @access protected + * @param string $name 配置参数名 + * @return string + */ + protected function getYaconfName($name) + { + if ($this->yaconf && is_string($this->yaconf)) { + return $this->yaconf . '.' . $name; + } + + return $name; + } + + /** + * 获取yaconf配置 + * @access public + * @param string $name 配置参数名 + * @param mixed $default 默认值 + * @return mixed + */ + public function yaconf($name, $default = null) + { + if ($this->yaconf) { + $yaconfName = $this->getYaconfName($name); + + if (Yaconf::has($yaconfName)) { + return Yaconf::get($yaconfName); + } + } + + return $default; + } + + protected function loadFile($file, $name) + { + $name = strtolower($name); + $type = pathinfo($file, PATHINFO_EXTENSION); + + if ('php' == $type) { + return $this->set(include $file, $name); + } elseif ('yaml' == $type && function_exists('yaml_parse_file')) { + return $this->set(yaml_parse_file($file), $name); + } + + return $this->parse($file, $type, $name); + } + + /** + * 检测配置是否存在 + * @access public + * @param string $name 配置参数名(支持多级配置 .号分割) + * @return bool + */ + public function has($name) + { + if (false === strpos($name, '.')) { + $name = $this->prefix . '.' . $name; + } + + return !is_null($this->get($name)); + } + + /** + * 获取一级配置 + * @access public + * @param string $name 一级配置名 + * @return array + */ + public function pull($name) + { + $name = strtolower($name); + + if ($this->yaconf) { + $yaconfName = $this->getYaconfName($name); + + if (Yaconf::has($yaconfName)) { + $config = Yaconf::get($yaconfName); + return isset($this->config[$name]) ? array_merge($this->config[$name], $config) : $config; + } + } + + return isset($this->config[$name]) ? $this->config[$name] : []; + } + + /** + * 获取配置参数 为空则获取所有配置 + * @access public + * @param string $name 配置参数名(支持多级配置 .号分割) + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name = null, $default = null) + { + if ($name && false === strpos($name, '.')) { + $name = $this->prefix . '.' . $name; + } + + // 无参数时获取所有 + if (empty($name)) { + return $this->config; + } + + if ('.' == substr($name, -1)) { + return $this->pull(substr($name, 0, -1)); + } + + if ($this->yaconf) { + $yaconfName = $this->getYaconfName($name); + + if (Yaconf::has($yaconfName)) { + return Yaconf::get($yaconfName); + } + } + + $name = explode('.', $name); + $name[0] = strtolower($name[0]); + $config = $this->config; + + // 按.拆分成多维数组进行判断 + foreach ($name as $val) { + if (isset($config[$val])) { + $config = $config[$val]; + } else { + return $default; + } + } + + return $config; + } + + /** + * 设置配置参数 name为数组则为批量设置 + * @access public + * @param string|array $name 配置参数名(支持三级配置 .号分割) + * @param mixed $value 配置值 + * @return mixed + */ + public function set($name, $value = null) + { + if (is_string($name)) { + if (false === strpos($name, '.')) { + $name = $this->prefix . '.' . $name; + } + + $name = explode('.', $name, 3); + + if (count($name) == 2) { + $this->config[strtolower($name[0])][$name[1]] = $value; + } else { + $this->config[strtolower($name[0])][$name[1]][$name[2]] = $value; + } + + return $value; + } elseif (is_array($name)) { + // 批量设置 + if (!empty($value)) { + if (isset($this->config[$value])) { + $result = array_merge($this->config[$value], $name); + } else { + $result = $name; + } + + $this->config[$value] = $result; + } else { + $result = $this->config = array_merge($this->config, $name); + } + } else { + // 为空直接返回 已有配置 + $result = $this->config; + } + + return $result; + } + + /** + * 移除配置 + * @access public + * @param string $name 配置参数名(支持三级配置 .号分割) + * @return void + */ + public function remove($name) + { + if (false === strpos($name, '.')) { + $name = $this->prefix . '.' . $name; + } + + $name = explode('.', $name, 3); + + if (count($name) == 2) { + unset($this->config[strtolower($name[0])][$name[1]]); + } else { + unset($this->config[strtolower($name[0])][$name[1]][$name[2]]); + } + } + + /** + * 重置配置参数 + * @access public + * @param string $prefix 配置前缀名 + * @return void + */ + public function reset($prefix = '') + { + if ('' === $prefix) { + $this->config = []; + } else { + $this->config[$prefix] = []; + } + } + + /** + * 设置配置 + * @access public + * @param string $name 参数名 + * @param mixed $value 值 + */ + public function __set($name, $value) + { + return $this->set($name, $value); + } + + /** + * 获取配置参数 + * @access public + * @param string $name 参数名 + * @return mixed + */ + public function __get($name) + { + return $this->get($name); + } + + /** + * 检测是否存在参数 + * @access public + * @param string $name 参数名 + * @return bool + */ + public function __isset($name) + { + return $this->has($name); + } + + // ArrayAccess + public function offsetSet($name, $value) + { + $this->set($name, $value); + } + + public function offsetExists($name) + { + return $this->has($name); + } + + public function offsetUnset($name) + { + $this->remove($name); + } + + public function offsetGet($name) + { + return $this->get($name); + } +} diff --git a/thinkphp/library/think/Console.php b/thinkphp/library/think/Console.php new file mode 100755 index 0000000..22f3e2c --- /dev/null +++ b/thinkphp/library/think/Console.php @@ -0,0 +1,829 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\console\Command; +use think\console\command\Help as HelpCommand; +use think\console\Input; +use think\console\input\Argument as InputArgument; +use think\console\input\Definition as InputDefinition; +use think\console\input\Option as InputOption; +use think\console\Output; +use think\console\output\driver\Buffer; + +class Console +{ + + private $name; + private $version; + + /** @var Command[] */ + private $commands = []; + + private $wantHelps = false; + + private $catchExceptions = true; + private $autoExit = true; + private $definition; + private $defaultCommand; + + private static $defaultCommands = [ + 'help' => "think\\console\\command\\Help", + 'list' => "think\\console\\command\\Lists", + 'build' => "think\\console\\command\\Build", + 'clear' => "think\\console\\command\\Clear", + 'make:command' => "think\\console\\command\\make\\Command", + 'make:controller' => "think\\console\\command\\make\\Controller", + 'make:model' => "think\\console\\command\\make\\Model", + 'make:middleware' => "think\\console\\command\\make\\Middleware", + 'make:validate' => "think\\console\\command\\make\\Validate", + 'optimize:autoload' => "think\\console\\command\\optimize\\Autoload", + 'optimize:config' => "think\\console\\command\\optimize\\Config", + 'optimize:schema' => "think\\console\\command\\optimize\\Schema", + 'optimize:route' => "think\\console\\command\\optimize\\Route", + 'run' => "think\\console\\command\\RunServer", + 'version' => "think\\console\\command\\Version", + 'route:list' => "think\\console\\command\\RouteList", + ]; + + /** + * Console constructor. + * @access public + * @param string $name 名称 + * @param string $version 版本 + * @param null|string $user 执行用户 + */ + public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN', $user = null) + { + $this->name = $name; + $this->version = $version; + + if ($user) { + $this->setUser($user); + } + + $this->defaultCommand = 'list'; + $this->definition = $this->getDefaultInputDefinition(); + } + + /** + * 设置执行用户 + * @param $user + */ + public function setUser($user) + { + if (DIRECTORY_SEPARATOR == '\\') { + return; + } + + $user = posix_getpwnam($user); + if ($user) { + posix_setuid($user['uid']); + posix_setgid($user['gid']); + } + } + + /** + * 初始化 Console + * @access public + * @param bool $run 是否运行 Console + * @return int|Console + */ + public static function init($run = true) + { + static $console; + + if (!$console) { + $config = Container::get('config')->pull('console'); + $console = new self($config['name'], $config['version'], $config['user']); + + $commands = $console->getDefinedCommands($config); + + // 添加指令集 + $console->addCommands($commands); + } + + if ($run) { + // 运行 + return $console->run(); + } else { + return $console; + } + } + + /** + * @access public + * @param array $config + * @return array + */ + public function getDefinedCommands(array $config = []) + { + $commands = self::$defaultCommands; + + if (!empty($config['auto_path']) && is_dir($config['auto_path'])) { + // 自动加载指令类 + $files = scandir($config['auto_path']); + + if (count($files) > 2) { + $beforeClass = get_declared_classes(); + + foreach ($files as $file) { + if (pathinfo($file, PATHINFO_EXTENSION) == 'php') { + include $config['auto_path'] . $file; + } + } + + $afterClass = get_declared_classes(); + $commands = array_merge($commands, array_diff($afterClass, $beforeClass)); + } + } + + $file = Container::get('env')->get('app_path') . 'command.php'; + + if (is_file($file)) { + $appCommands = include $file; + + if (is_array($appCommands)) { + $commands = array_merge($commands, $appCommands); + } + } + + return $commands; + } + + /** + * @access public + * @param string $command + * @param array $parameters + * @param string $driver + * @return Output|Buffer + */ + public static function call($command, array $parameters = [], $driver = 'buffer') + { + $console = self::init(false); + + array_unshift($parameters, $command); + + $input = new Input($parameters); + $output = new Output($driver); + + $console->setCatchExceptions(false); + $console->find($command)->run($input, $output); + + return $output; + } + + /** + * 执行当前的指令 + * @access public + * @return int + * @throws \Exception + * @api + */ + public function run() + { + $input = new Input(); + $output = new Output(); + + $this->configureIO($input, $output); + + try { + $exitCode = $this->doRun($input, $output); + } catch (\Exception $e) { + if (!$this->catchExceptions) { + throw $e; + } + + $output->renderException($e); + + $exitCode = $e->getCode(); + if (is_numeric($exitCode)) { + $exitCode = (int) $exitCode; + if (0 === $exitCode) { + $exitCode = 1; + } + } else { + $exitCode = 1; + } + } + + if ($this->autoExit) { + if ($exitCode > 255) { + $exitCode = 255; + } + + exit($exitCode); + } + + return $exitCode; + } + + /** + * 执行指令 + * @access public + * @param Input $input + * @param Output $output + * @return int + */ + public function doRun(Input $input, Output $output) + { + if (true === $input->hasParameterOption(['--version', '-V'])) { + $output->writeln($this->getLongVersion()); + + return 0; + } + + $name = $this->getCommandName($input); + + if (true === $input->hasParameterOption(['--help', '-h'])) { + if (!$name) { + $name = 'help'; + $input = new Input(['help']); + } else { + $this->wantHelps = true; + } + } + + if (!$name) { + $name = $this->defaultCommand; + $input = new Input([$this->defaultCommand]); + } + + $command = $this->find($name); + + $exitCode = $this->doRunCommand($command, $input, $output); + + return $exitCode; + } + + /** + * 设置输入参数定义 + * @access public + * @param InputDefinition $definition + */ + public function setDefinition(InputDefinition $definition) + { + $this->definition = $definition; + } + + /** + * 获取输入参数定义 + * @access public + * @return InputDefinition The InputDefinition instance + */ + public function getDefinition() + { + return $this->definition; + } + + /** + * Gets the help message. + * @access public + * @return string A help message. + */ + public function getHelp() + { + return $this->getLongVersion(); + } + + /** + * 是否捕获异常 + * @access public + * @param bool $boolean + * @api + */ + public function setCatchExceptions($boolean) + { + $this->catchExceptions = (bool) $boolean; + } + + /** + * 是否自动退出 + * @access public + * @param bool $boolean + * @api + */ + public function setAutoExit($boolean) + { + $this->autoExit = (bool) $boolean; + } + + /** + * 获取名称 + * @access public + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 设置名称 + * @access public + * @param string $name + */ + public function setName($name) + { + $this->name = $name; + } + + /** + * 获取版本 + * @access public + * @return string + * @api + */ + public function getVersion() + { + return $this->version; + } + + /** + * 设置版本 + * @access public + * @param string $version + */ + public function setVersion($version) + { + $this->version = $version; + } + + /** + * 获取完整的版本号 + * @access public + * @return string + */ + public function getLongVersion() + { + if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion()) { + return sprintf('%s version %s', $this->getName(), $this->getVersion()); + } + + return 'Console Tool'; + } + + /** + * 注册一个指令 (便于动态创建指令) + * @access public + * @param string $name 指令名 + * @return Command + */ + public function register($name) + { + return $this->add(new Command($name)); + } + + /** + * 添加指令集 + * @access public + * @param array $commands + */ + public function addCommands(array $commands) + { + foreach ($commands as $key => $command) { + if (is_subclass_of($command, "\\think\\console\\Command")) { + // 注册指令 + $this->add($command, is_numeric($key) ? '' : $key); + } + } + } + + /** + * 注册一个指令(对象) + * @access public + * @param mixed $command 指令对象或者指令类名 + * @param string $name 指令名 留空则自动获取 + * @return mixed + */ + public function add($command, $name) + { + if ($name) { + $this->commands[$name] = $command; + return; + } + + if (is_string($command)) { + $command = new $command(); + } + + $command->setConsole($this); + + if (!$command->isEnabled()) { + $command->setConsole(null); + return; + } + + if (null === $command->getDefinition()) { + throw new \LogicException(sprintf('Command class "%s" is not correctly initialized. You probably forgot to call the parent constructor.', get_class($command))); + } + + $this->commands[$command->getName()] = $command; + + foreach ($command->getAliases() as $alias) { + $this->commands[$alias] = $command; + } + + return $command; + } + + /** + * 获取指令 + * @access public + * @param string $name 指令名称 + * @return Command + * @throws \InvalidArgumentException + */ + public function get($name) + { + if (!isset($this->commands[$name])) { + throw new \InvalidArgumentException(sprintf('The command "%s" does not exist.', $name)); + } + + $command = $this->commands[$name]; + + if (is_string($command)) { + $command = new $command(); + } + + $command->setConsole($this); + + if ($this->wantHelps) { + $this->wantHelps = false; + + /** @var HelpCommand $helpCommand */ + $helpCommand = $this->get('help'); + $helpCommand->setCommand($command); + + return $helpCommand; + } + + return $command; + } + + /** + * 某个指令是否存在 + * @access public + * @param string $name 指令名称 + * @return bool + */ + public function has($name) + { + return isset($this->commands[$name]); + } + + /** + * 获取所有的命名空间 + * @access public + * @return array + */ + public function getNamespaces() + { + $namespaces = []; + foreach ($this->commands as $name => $command) { + if (is_string($command)) { + $namespaces = array_merge($namespaces, $this->extractAllNamespaces($name)); + } else { + $namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName())); + + foreach ($command->getAliases() as $alias) { + $namespaces = array_merge($namespaces, $this->extractAllNamespaces($alias)); + } + } + + } + + return array_values(array_unique(array_filter($namespaces))); + } + + /** + * 查找注册命名空间中的名称或缩写。 + * @access public + * @param string $namespace + * @return string + * @throws \InvalidArgumentException + */ + public function findNamespace($namespace) + { + $allNamespaces = $this->getNamespaces(); + $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { + return preg_quote($matches[1]) . '[^:]*'; + }, $namespace); + $namespaces = preg_grep('{^' . $expr . '}', $allNamespaces); + + if (empty($namespaces)) { + $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); + + if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) { + if (1 == count($alternatives)) { + $message .= "\n\nDid you mean this?\n "; + } else { + $message .= "\n\nDid you mean one of these?\n "; + } + + $message .= implode("\n ", $alternatives); + } + + throw new \InvalidArgumentException($message); + } + + $exact = in_array($namespace, $namespaces, true); + if (count($namespaces) > 1 && !$exact) { + throw new \InvalidArgumentException(sprintf('The namespace "%s" is ambiguous (%s).', $namespace, $this->getAbbreviationSuggestions(array_values($namespaces)))); + } + + return $exact ? $namespace : reset($namespaces); + } + + /** + * 查找指令 + * @access public + * @param string $name 名称或者别名 + * @return Command + * @throws \InvalidArgumentException + */ + public function find($name) + { + $allCommands = array_keys($this->commands); + + $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { + return preg_quote($matches[1]) . '[^:]*'; + }, $name); + + $commands = preg_grep('{^' . $expr . '}', $allCommands); + + if (empty($commands) || count(preg_grep('{^' . $expr . '$}', $commands)) < 1) { + if (false !== $pos = strrpos($name, ':')) { + $this->findNamespace(substr($name, 0, $pos)); + } + + $message = sprintf('Command "%s" is not defined.', $name); + + if ($alternatives = $this->findAlternatives($name, $allCommands)) { + if (1 == count($alternatives)) { + $message .= "\n\nDid you mean this?\n "; + } else { + $message .= "\n\nDid you mean one of these?\n "; + } + $message .= implode("\n ", $alternatives); + } + + throw new \InvalidArgumentException($message); + } + + $exact = in_array($name, $commands, true); + if (count($commands) > 1 && !$exact) { + $suggestions = $this->getAbbreviationSuggestions(array_values($commands)); + + throw new \InvalidArgumentException(sprintf('Command "%s" is ambiguous (%s).', $name, $suggestions)); + } + + return $this->get($exact ? $name : reset($commands)); + } + + /** + * 获取所有的指令 + * @access public + * @param string $namespace 命名空间 + * @return Command[] + * @api + */ + public function all($namespace = null) + { + if (null === $namespace) { + return $this->commands; + } + + $commands = []; + foreach ($this->commands as $name => $command) { + if ($this->extractNamespace($name, substr_count($namespace, ':') + 1) === $namespace) { + $commands[$name] = $command; + } + } + + return $commands; + } + + /** + * 获取可能的指令名 + * @access public + * @param array $names + * @return array + */ + public static function getAbbreviations($names) + { + $abbrevs = []; + foreach ($names as $name) { + for ($len = strlen($name); $len > 0; --$len) { + $abbrev = substr($name, 0, $len); + $abbrevs[$abbrev][] = $name; + } + } + + return $abbrevs; + } + + /** + * 配置基于用户的参数和选项的输入和输出实例。 + * @access protected + * @param Input $input 输入实例 + * @param Output $output 输出实例 + */ + protected function configureIO(Input $input, Output $output) + { + if (true === $input->hasParameterOption(['--ansi'])) { + $output->setDecorated(true); + } elseif (true === $input->hasParameterOption(['--no-ansi'])) { + $output->setDecorated(false); + } + + if (true === $input->hasParameterOption(['--no-interaction', '-n'])) { + $input->setInteractive(false); + } + + if (true === $input->hasParameterOption(['--quiet', '-q'])) { + $output->setVerbosity(Output::VERBOSITY_QUIET); + } else { + if ($input->hasParameterOption('-vvv') || $input->hasParameterOption('--verbose=3') || $input->getParameterOption('--verbose') === 3) { + $output->setVerbosity(Output::VERBOSITY_DEBUG); + } elseif ($input->hasParameterOption('-vv') || $input->hasParameterOption('--verbose=2') || $input->getParameterOption('--verbose') === 2) { + $output->setVerbosity(Output::VERBOSITY_VERY_VERBOSE); + } elseif ($input->hasParameterOption('-v') || $input->hasParameterOption('--verbose=1') || $input->hasParameterOption('--verbose') || $input->getParameterOption('--verbose')) { + $output->setVerbosity(Output::VERBOSITY_VERBOSE); + } + } + } + + /** + * 执行指令 + * @access protected + * @param Command $command 指令实例 + * @param Input $input 输入实例 + * @param Output $output 输出实例 + * @return int + * @throws \Exception + */ + protected function doRunCommand(Command $command, Input $input, Output $output) + { + return $command->run($input, $output); + } + + /** + * 获取指令的基础名称 + * @access protected + * @param Input $input + * @return string + */ + protected function getCommandName(Input $input) + { + return $input->getFirstArgument(); + } + + /** + * 获取默认输入定义 + * @access protected + * @return InputDefinition + */ + protected function getDefaultInputDefinition() + { + return new InputDefinition([ + new InputArgument('command', InputArgument::REQUIRED, 'The command to execute'), + new InputOption('--help', '-h', InputOption::VALUE_NONE, 'Display this help message'), + new InputOption('--version', '-V', InputOption::VALUE_NONE, 'Display this console version'), + new InputOption('--quiet', '-q', InputOption::VALUE_NONE, 'Do not output any message'), + new InputOption('--verbose', '-v|vv|vvv', InputOption::VALUE_NONE, 'Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug'), + new InputOption('--ansi', '', InputOption::VALUE_NONE, 'Force ANSI output'), + new InputOption('--no-ansi', '', InputOption::VALUE_NONE, 'Disable ANSI output'), + new InputOption('--no-interaction', '-n', InputOption::VALUE_NONE, 'Do not ask any interactive question'), + ]); + } + + public static function addDefaultCommands(array $classnames) + { + self::$defaultCommands = array_merge(self::$defaultCommands, $classnames); + } + + /** + * 获取可能的建议 + * @access private + * @param array $abbrevs + * @return string + */ + private function getAbbreviationSuggestions($abbrevs) + { + return sprintf('%s, %s%s', $abbrevs[0], $abbrevs[1], count($abbrevs) > 2 ? sprintf(' and %d more', count($abbrevs) - 2) : ''); + } + + /** + * 返回命名空间部分 + * @access public + * @param string $name 指令 + * @param string $limit 部分的命名空间的最大数量 + * @return string + */ + public function extractNamespace($name, $limit = null) + { + $parts = explode(':', $name); + array_pop($parts); + + return implode(':', null === $limit ? $parts : array_slice($parts, 0, $limit)); + } + + /** + * 查找可替代的建议 + * @access private + * @param string $name + * @param array|\Traversable $collection + * @return array + */ + private function findAlternatives($name, $collection) + { + $threshold = 1e3; + $alternatives = []; + + $collectionParts = []; + foreach ($collection as $item) { + $collectionParts[$item] = explode(':', $item); + } + + foreach (explode(':', $name) as $i => $subname) { + foreach ($collectionParts as $collectionName => $parts) { + $exists = isset($alternatives[$collectionName]); + if (!isset($parts[$i]) && $exists) { + $alternatives[$collectionName] += $threshold; + continue; + } elseif (!isset($parts[$i])) { + continue; + } + + $lev = levenshtein($subname, $parts[$i]); + if ($lev <= strlen($subname) / 3 || '' !== $subname && false !== strpos($parts[$i], $subname)) { + $alternatives[$collectionName] = $exists ? $alternatives[$collectionName] + $lev : $lev; + } elseif ($exists) { + $alternatives[$collectionName] += $threshold; + } + } + } + + foreach ($collection as $item) { + $lev = levenshtein($name, $item); + if ($lev <= strlen($name) / 3 || false !== strpos($item, $name)) { + $alternatives[$item] = isset($alternatives[$item]) ? $alternatives[$item] - $lev : $lev; + } + } + + $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { + return $lev < 2 * $threshold; + }); + asort($alternatives); + + return array_keys($alternatives); + } + + /** + * 设置默认的指令 + * @access public + * @param string $commandName The Command name + */ + public function setDefaultCommand($commandName) + { + $this->defaultCommand = $commandName; + } + + /** + * 返回所有的命名空间 + * @access private + * @param string $name + * @return array + */ + private function extractAllNamespaces($name) + { + $parts = explode(':', $name, -1); + $namespaces = []; + + foreach ($parts as $part) { + if (count($namespaces)) { + $namespaces[] = end($namespaces) . ':' . $part; + } else { + $namespaces[] = $part; + } + } + + return $namespaces; + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['commands'], $data['definition']); + + return $data; + } +} diff --git a/thinkphp/library/think/Container.php b/thinkphp/library/think/Container.php new file mode 100755 index 0000000..cd7954c --- /dev/null +++ b/thinkphp/library/think/Container.php @@ -0,0 +1,568 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use ArrayAccess; +use ArrayIterator; +use Closure; +use Countable; +use InvalidArgumentException; +use IteratorAggregate; +use ReflectionClass; +use ReflectionException; +use ReflectionFunction; +use ReflectionMethod; +use think\exception\ClassNotFoundException; + +/** + * @package think + * @property Build $build + * @property Cache $cache + * @property Config $config + * @property Cookie $cookie + * @property Debug $debug + * @property Env $env + * @property Hook $hook + * @property Lang $lang + * @property Middleware $middleware + * @property Request $request + * @property Response $response + * @property Route $route + * @property Session $session + * @property Template $template + * @property Url $url + * @property Validate $validate + * @property View $view + * @property route\RuleName $rule_name + * @property Log $log + */ +class Container implements ArrayAccess, IteratorAggregate, Countable +{ + /** + * 容器对象实例 + * @var Container + */ + protected static $instance; + + /** + * 容器中的对象实例 + * @var array + */ + protected $instances = []; + + /** + * 容器绑定标识 + * @var array + */ + protected $bind = [ + 'app' => App::class, + 'build' => Build::class, + 'cache' => Cache::class, + 'config' => Config::class, + 'cookie' => Cookie::class, + 'debug' => Debug::class, + 'env' => Env::class, + 'hook' => Hook::class, + 'lang' => Lang::class, + 'log' => Log::class, + 'middleware' => Middleware::class, + 'request' => Request::class, + 'response' => Response::class, + 'route' => Route::class, + 'session' => Session::class, + 'template' => Template::class, + 'url' => Url::class, + 'validate' => Validate::class, + 'view' => View::class, + 'rule_name' => route\RuleName::class, + // 接口依赖注入 + 'think\LoggerInterface' => Log::class, + ]; + + /** + * 容器标识别名 + * @var array + */ + protected $name = []; + + /** + * 获取当前容器的实例(单例) + * @access public + * @return static + */ + public static function getInstance() + { + if (is_null(static::$instance)) { + static::$instance = new static; + } + + return static::$instance; + } + + /** + * 设置当前容器的实例 + * @access public + * @param object $instance + * @return void + */ + public static function setInstance($instance) + { + static::$instance = $instance; + } + + /** + * 获取容器中的对象实例 + * @access public + * @param string $abstract 类名或者标识 + * @param array|true $vars 变量 + * @param bool $newInstance 是否每次创建新的实例 + * @return object + */ + public static function get($abstract, $vars = [], $newInstance = false) + { + return static::getInstance()->make($abstract, $vars, $newInstance); + } + + /** + * 绑定一个类、闭包、实例、接口实现到容器 + * @access public + * @param string $abstract 类标识、接口 + * @param mixed $concrete 要绑定的类、闭包或者实例 + * @return Container + */ + public static function set($abstract, $concrete = null) + { + return static::getInstance()->bindTo($abstract, $concrete); + } + + /** + * 移除容器中的对象实例 + * @access public + * @param string $abstract 类标识、接口 + * @return void + */ + public static function remove($abstract) + { + return static::getInstance()->delete($abstract); + } + + /** + * 清除容器中的对象实例 + * @access public + * @return void + */ + public static function clear() + { + return static::getInstance()->flush(); + } + + /** + * 绑定一个类、闭包、实例、接口实现到容器 + * @access public + * @param string|array $abstract 类标识、接口 + * @param mixed $concrete 要绑定的类、闭包或者实例 + * @return $this + */ + public function bindTo($abstract, $concrete = null) + { + if (is_array($abstract)) { + $this->bind = array_merge($this->bind, $abstract); + } elseif ($concrete instanceof Closure) { + $this->bind[$abstract] = $concrete; + } elseif (is_object($concrete)) { + if (isset($this->bind[$abstract])) { + $abstract = $this->bind[$abstract]; + } + $this->instances[$abstract] = $concrete; + } else { + $this->bind[$abstract] = $concrete; + } + + return $this; + } + + /** + * 绑定一个类实例当容器 + * @access public + * @param string $abstract 类名或者标识 + * @param object|\Closure $instance 类的实例 + * @return $this + */ + public function instance($abstract, $instance) + { + if ($instance instanceof \Closure) { + $this->bind[$abstract] = $instance; + } else { + if (isset($this->bind[$abstract])) { + $abstract = $this->bind[$abstract]; + } + + $this->instances[$abstract] = $instance; + } + + return $this; + } + + /** + * 判断容器中是否存在类及标识 + * @access public + * @param string $abstract 类名或者标识 + * @return bool + */ + public function bound($abstract) + { + return isset($this->bind[$abstract]) || isset($this->instances[$abstract]); + } + + /** + * 判断容器中是否存在对象实例 + * @access public + * @param string $abstract 类名或者标识 + * @return bool + */ + public function exists($abstract) + { + if (isset($this->bind[$abstract])) { + $abstract = $this->bind[$abstract]; + } + + return isset($this->instances[$abstract]); + } + + /** + * 判断容器中是否存在类及标识 + * @access public + * @param string $name 类名或者标识 + * @return bool + */ + public function has($name) + { + return $this->bound($name); + } + + /** + * 创建类的实例 + * @access public + * @param string $abstract 类名或者标识 + * @param array|true $vars 变量 + * @param bool $newInstance 是否每次创建新的实例 + * @return object + */ + public function make($abstract, $vars = [], $newInstance = false) + { + if (true === $vars) { + // 总是创建新的实例化对象 + $newInstance = true; + $vars = []; + } + + $abstract = isset($this->name[$abstract]) ? $this->name[$abstract] : $abstract; + + if (isset($this->instances[$abstract]) && !$newInstance) { + return $this->instances[$abstract]; + } + + if (isset($this->bind[$abstract])) { + $concrete = $this->bind[$abstract]; + + if ($concrete instanceof Closure) { + $object = $this->invokeFunction($concrete, $vars); + } else { + $this->name[$abstract] = $concrete; + return $this->make($concrete, $vars, $newInstance); + } + } else { + $object = $this->invokeClass($abstract, $vars); + } + + if (!$newInstance) { + $this->instances[$abstract] = $object; + } + + return $object; + } + + /** + * 删除容器中的对象实例 + * @access public + * @param string|array $abstract 类名或者标识 + * @return void + */ + public function delete($abstract) + { + foreach ((array) $abstract as $name) { + $name = isset($this->name[$name]) ? $this->name[$name] : $name; + + if (isset($this->instances[$name])) { + unset($this->instances[$name]); + } + } + } + + /** + * 获取容器中的对象实例 + * @access public + * @return array + */ + public function all() + { + return $this->instances; + } + + /** + * 清除容器中的对象实例 + * @access public + * @return void + */ + public function flush() + { + $this->instances = []; + $this->bind = []; + $this->name = []; + } + + /** + * 执行函数或者闭包方法 支持参数调用 + * @access public + * @param mixed $function 函数或者闭包 + * @param array $vars 参数 + * @return mixed + */ + public function invokeFunction($function, $vars = []) + { + try { + $reflect = new ReflectionFunction($function); + + $args = $this->bindParams($reflect, $vars); + + return call_user_func_array($function, $args); + } catch (ReflectionException $e) { + throw new Exception('function not exists: ' . $function . '()'); + } + } + + /** + * 调用反射执行类的方法 支持参数绑定 + * @access public + * @param mixed $method 方法 + * @param array $vars 参数 + * @return mixed + */ + public function invokeMethod($method, $vars = []) + { + try { + if (is_array($method)) { + $class = is_object($method[0]) ? $method[0] : $this->invokeClass($method[0]); + $reflect = new ReflectionMethod($class, $method[1]); + } else { + // 静态方法 + $reflect = new ReflectionMethod($method); + } + + $args = $this->bindParams($reflect, $vars); + + return $reflect->invokeArgs(isset($class) ? $class : null, $args); + } catch (ReflectionException $e) { + if (is_array($method) && is_object($method[0])) { + $method[0] = get_class($method[0]); + } + + throw new Exception('method not exists: ' . (is_array($method) ? $method[0] . '::' . $method[1] : $method) . '()'); + } + } + + /** + * 调用反射执行类的方法 支持参数绑定 + * @access public + * @param object $instance 对象实例 + * @param mixed $reflect 反射类 + * @param array $vars 参数 + * @return mixed + */ + public function invokeReflectMethod($instance, $reflect, $vars = []) + { + $args = $this->bindParams($reflect, $vars); + + return $reflect->invokeArgs($instance, $args); + } + + /** + * 调用反射执行callable 支持参数绑定 + * @access public + * @param mixed $callable + * @param array $vars 参数 + * @return mixed + */ + public function invoke($callable, $vars = []) + { + if ($callable instanceof Closure) { + return $this->invokeFunction($callable, $vars); + } + + return $this->invokeMethod($callable, $vars); + } + + /** + * 调用反射执行类的实例化 支持依赖注入 + * @access public + * @param string $class 类名 + * @param array $vars 参数 + * @return mixed + */ + public function invokeClass($class, $vars = []) + { + try { + $reflect = new ReflectionClass($class); + + if ($reflect->hasMethod('__make')) { + $method = new ReflectionMethod($class, '__make'); + + if ($method->isPublic() && $method->isStatic()) { + $args = $this->bindParams($method, $vars); + return $method->invokeArgs(null, $args); + } + } + + $constructor = $reflect->getConstructor(); + + $args = $constructor ? $this->bindParams($constructor, $vars) : []; + + return $reflect->newInstanceArgs($args); + + } catch (ReflectionException $e) { + throw new ClassNotFoundException('class not exists: ' . $class, $class); + } + } + + /** + * 绑定参数 + * @access protected + * @param \ReflectionMethod|\ReflectionFunction $reflect 反射类 + * @param array $vars 参数 + * @return array + */ + protected function bindParams($reflect, $vars = []) + { + if ($reflect->getNumberOfParameters() == 0) { + return []; + } + + // 判断数组类型 数字数组时按顺序绑定参数 + reset($vars); + $type = key($vars) === 0 ? 1 : 0; + $params = $reflect->getParameters(); + + foreach ($params as $param) { + $name = $param->getName(); + $lowerName = Loader::parseName($name); + $class = $param->getClass(); + + if ($class) { + $args[] = $this->getObjectParam($class->getName(), $vars); + } elseif (1 == $type && !empty($vars)) { + $args[] = array_shift($vars); + } elseif (0 == $type && isset($vars[$name])) { + $args[] = $vars[$name]; + } elseif (0 == $type && isset($vars[$lowerName])) { + $args[] = $vars[$lowerName]; + } elseif ($param->isDefaultValueAvailable()) { + $args[] = $param->getDefaultValue(); + } else { + throw new InvalidArgumentException('method param miss:' . $name); + } + } + + return $args; + } + + /** + * 获取对象类型的参数值 + * @access protected + * @param string $className 类名 + * @param array $vars 参数 + * @return mixed + */ + protected function getObjectParam($className, &$vars) + { + $array = $vars; + $value = array_shift($array); + + if ($value instanceof $className) { + $result = $value; + array_shift($vars); + } else { + $result = $this->make($className); + } + + return $result; + } + + public function __set($name, $value) + { + $this->bindTo($name, $value); + } + + public function __get($name) + { + return $this->make($name); + } + + public function __isset($name) + { + return $this->bound($name); + } + + public function __unset($name) + { + $this->delete($name); + } + + public function offsetExists($key) + { + return $this->__isset($key); + } + + public function offsetGet($key) + { + return $this->__get($key); + } + + public function offsetSet($key, $value) + { + $this->__set($key, $value); + } + + public function offsetUnset($key) + { + $this->__unset($key); + } + + //Countable + public function count() + { + return count($this->instances); + } + + //IteratorAggregate + public function getIterator() + { + return new ArrayIterator($this->instances); + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['instances'], $data['instance']); + + return $data; + } +} diff --git a/thinkphp/library/think/Controller.php b/thinkphp/library/think/Controller.php new file mode 100755 index 0000000..966eaaa --- /dev/null +++ b/thinkphp/library/think/Controller.php @@ -0,0 +1,287 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\exception\ValidateException; +use traits\controller\Jump; + +class Controller +{ + use Jump; + + /** + * 视图类实例 + * @var \think\View + */ + protected $view; + + /** + * Request实例 + * @var \think\Request + */ + protected $request; + + /** + * 验证失败是否抛出异常 + * @var bool + */ + protected $failException = false; + + /** + * 是否批量验证 + * @var bool + */ + protected $batchValidate = false; + + /** + * 前置操作方法列表(即将废弃) + * @var array $beforeActionList + */ + protected $beforeActionList = []; + + /** + * 控制器中间件 + * @var array + */ + protected $middleware = []; + + /** + * 构造方法 + * @access public + */ + public function __construct(App $app = null) + { + $this->app = $app ?: Container::get('app'); + $this->request = $this->app['request']; + $this->view = $this->app['view']; + + // 控制器初始化 + $this->initialize(); + + $this->registerMiddleware(); + + // 前置操作方法 即将废弃 + foreach ((array) $this->beforeActionList as $method => $options) { + is_numeric($method) ? + $this->beforeAction($options) : + $this->beforeAction($method, $options); + } + } + + // 初始化 + protected function initialize() + {} + + // 注册控制器中间件 + public function registerMiddleware() + { + foreach ($this->middleware as $key => $val) { + if (!is_int($key)) { + $only = $except = null; + + if (isset($val['only'])) { + $only = array_map(function ($item) { + return strtolower($item); + }, $val['only']); + } elseif (isset($val['except'])) { + $except = array_map(function ($item) { + return strtolower($item); + }, $val['except']); + } + + if (isset($only) && !in_array($this->request->action(), $only)) { + continue; + } elseif (isset($except) && in_array($this->request->action(), $except)) { + continue; + } else { + $val = $key; + } + } + + $this->app['middleware']->controller($val); + } + } + + /** + * 前置操作 + * @access protected + * @param string $method 前置操作方法名 + * @param array $options 调用参数 ['only'=>[...]] 或者['except'=>[...]] + */ + protected function beforeAction($method, $options = []) + { + if (isset($options['only'])) { + if (is_string($options['only'])) { + $options['only'] = explode(',', $options['only']); + } + + $only = array_map(function ($val) { + return strtolower($val); + }, $options['only']); + + if (!in_array($this->request->action(), $only)) { + return; + } + } elseif (isset($options['except'])) { + if (is_string($options['except'])) { + $options['except'] = explode(',', $options['except']); + } + + $except = array_map(function ($val) { + return strtolower($val); + }, $options['except']); + + if (in_array($this->request->action(), $except)) { + return; + } + } + + call_user_func([$this, $method]); + } + + /** + * 加载模板输出 + * @access protected + * @param string $template 模板文件名 + * @param array $vars 模板输出变量 + * @param array $config 模板参数 + * @return mixed + */ + protected function fetch($template = '', $vars = [], $config = []) + { + return Response::create($template, 'view')->assign($vars)->config($config); + } + + /** + * 渲染内容输出 + * @access protected + * @param string $content 模板内容 + * @param array $vars 模板输出变量 + * @param array $config 模板参数 + * @return mixed + */ + protected function display($content = '', $vars = [], $config = []) + { + return Response::create($content, 'view')->assign($vars)->config($config)->isContent(true); + } + + /** + * 模板变量赋值 + * @access protected + * @param mixed $name 要显示的模板变量 + * @param mixed $value 变量的值 + * @return $this + */ + protected function assign($name, $value = '') + { + $this->view->assign($name, $value); + + return $this; + } + + /** + * 视图过滤 + * @access protected + * @param Callable $filter 过滤方法或闭包 + * @return $this + */ + protected function filter($filter) + { + $this->view->filter($filter); + + return $this; + } + + /** + * 初始化模板引擎 + * @access protected + * @param array|string $engine 引擎参数 + * @return $this + */ + protected function engine($engine) + { + $this->view->engine($engine); + + return $this; + } + + /** + * 设置验证失败后是否抛出异常 + * @access protected + * @param bool $fail 是否抛出异常 + * @return $this + */ + protected function validateFailException($fail = true) + { + $this->failException = $fail; + + return $this; + } + + /** + * 验证数据 + * @access protected + * @param array $data 数据 + * @param string|array $validate 验证器名或者验证规则数组 + * @param array $message 提示信息 + * @param bool $batch 是否批量验证 + * @param mixed $callback 回调方法(闭包) + * @return array|string|true + * @throws ValidateException + */ + protected function validate($data, $validate, $message = [], $batch = false, $callback = null) + { + if (is_array($validate)) { + $v = $this->app->validate(); + $v->rule($validate); + } else { + if (strpos($validate, '.')) { + // 支持场景 + list($validate, $scene) = explode('.', $validate); + } + $v = $this->app->validate($validate); + if (!empty($scene)) { + $v->scene($scene); + } + } + + // 是否批量验证 + if ($batch || $this->batchValidate) { + $v->batch(true); + } + + if (is_array($message)) { + $v->message($message); + } + + if ($callback && is_callable($callback)) { + call_user_func_array($callback, [$v, &$data]); + } + + if (!$v->check($data)) { + if ($this->failException) { + throw new ValidateException($v->getError()); + } + return $v->getError(); + } + + return true; + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app'], $data['request']); + + return $data; + } +} diff --git a/thinkphp/library/think/Cookie.php b/thinkphp/library/think/Cookie.php new file mode 100755 index 0000000..6a9fb1e --- /dev/null +++ b/thinkphp/library/think/Cookie.php @@ -0,0 +1,268 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class Cookie +{ + /** + * 配置参数 + * @var array + */ + protected $config = [ + // cookie 名称前缀 + 'prefix' => '', + // cookie 保存时间 + 'expire' => 0, + // cookie 保存路径 + 'path' => '/', + // cookie 有效域名 + 'domain' => '', + // cookie 启用安全传输 + 'secure' => false, + // httponly设置 + 'httponly' => false, + // 是否使用 setcookie + 'setcookie' => true, + ]; + + /** + * 构造方法 + * @access public + */ + public function __construct(array $config = []) + { + $this->init($config); + } + + /** + * Cookie初始化 + * @access public + * @param array $config + * @return void + */ + public function init(array $config = []) + { + $this->config = array_merge($this->config, array_change_key_case($config)); + + if (!empty($this->config['httponly']) && PHP_SESSION_ACTIVE != session_status()) { + ini_set('session.cookie_httponly', 1); + } + } + + public static function __make(Config $config) + { + return new static($config->pull('cookie')); + } + + /** + * 设置或者获取cookie作用域(前缀) + * @access public + * @param string $prefix + * @return string|void + */ + public function prefix($prefix = '') + { + if (empty($prefix)) { + return $this->config['prefix']; + } + + $this->config['prefix'] = $prefix; + } + + /** + * Cookie 设置、获取、删除 + * + * @access public + * @param string $name cookie名称 + * @param mixed $value cookie值 + * @param mixed $option 可选参数 可能会是 null|integer|string + * @return void + */ + public function set($name, $value = '', $option = null) + { + // 参数设置(会覆盖黙认设置) + if (!is_null($option)) { + if (is_numeric($option)) { + $option = ['expire' => $option]; + } elseif (is_string($option)) { + parse_str($option, $option); + } + + $config = array_merge($this->config, array_change_key_case($option)); + } else { + $config = $this->config; + } + + $name = $config['prefix'] . $name; + + // 设置cookie + if (is_array($value)) { + array_walk_recursive($value, [$this, 'jsonFormatProtect'], 'encode'); + $value = 'think:' . json_encode($value); + } + + $expire = !empty($config['expire']) ? $_SERVER['REQUEST_TIME'] + intval($config['expire']) : 0; + + if ($config['setcookie']) { + $this->setCookie($name, $value, $expire, $config); + } + + $_COOKIE[$name] = $value; + } + + /** + * Cookie 设置保存 + * + * @access public + * @param string $name cookie名称 + * @param mixed $value cookie值 + * @param array $option 可选参数 + * @return void + */ + protected function setCookie($name, $value, $expire, $option = []) + { + setcookie($name, $value, $expire, $option['path'], $option['domain'], $option['secure'], $option['httponly']); + } + + /** + * 永久保存Cookie数据 + * @access public + * @param string $name cookie名称 + * @param mixed $value cookie值 + * @param mixed $option 可选参数 可能会是 null|integer|string + * @return void + */ + public function forever($name, $value = '', $option = null) + { + if (is_null($option) || is_numeric($option)) { + $option = []; + } + + $option['expire'] = 315360000; + + $this->set($name, $value, $option); + } + + /** + * 判断Cookie数据 + * @access public + * @param string $name cookie名称 + * @param string|null $prefix cookie前缀 + * @return bool + */ + public function has($name, $prefix = null) + { + $prefix = !is_null($prefix) ? $prefix : $this->config['prefix']; + $name = $prefix . $name; + + return isset($_COOKIE[$name]); + } + + /** + * Cookie获取 + * @access public + * @param string $name cookie名称 留空获取全部 + * @param string|null $prefix cookie前缀 + * @return mixed + */ + public function get($name = '', $prefix = null) + { + $prefix = !is_null($prefix) ? $prefix : $this->config['prefix']; + $key = $prefix . $name; + + if ('' == $name) { + if ($prefix) { + $value = []; + foreach ($_COOKIE as $k => $val) { + if (0 === strpos($k, $prefix)) { + $value[$k] = $val; + } + } + } else { + $value = $_COOKIE; + } + } elseif (isset($_COOKIE[$key])) { + $value = $_COOKIE[$key]; + + if (0 === strpos($value, 'think:')) { + $value = substr($value, 6); + $value = json_decode($value, true); + array_walk_recursive($value, [$this, 'jsonFormatProtect'], 'decode'); + } + } else { + $value = null; + } + + return $value; + } + + /** + * Cookie删除 + * @access public + * @param string $name cookie名称 + * @param string|null $prefix cookie前缀 + * @return void + */ + public function delete($name, $prefix = null) + { + $config = $this->config; + $prefix = !is_null($prefix) ? $prefix : $config['prefix']; + $name = $prefix . $name; + + if ($config['setcookie']) { + $this->setcookie($name, '', $_SERVER['REQUEST_TIME'] - 3600, $config); + } + + // 删除指定cookie + unset($_COOKIE[$name]); + } + + /** + * Cookie清空 + * @access public + * @param string|null $prefix cookie前缀 + * @return void + */ + public function clear($prefix = null) + { + // 清除指定前缀的所有cookie + if (empty($_COOKIE)) { + return; + } + + // 要删除的cookie前缀,不指定则删除config设置的指定前缀 + $config = $this->config; + $prefix = !is_null($prefix) ? $prefix : $config['prefix']; + + if ($prefix) { + // 如果前缀为空字符串将不作处理直接返回 + foreach ($_COOKIE as $key => $val) { + if (0 === strpos($key, $prefix)) { + if ($config['setcookie']) { + $this->setcookie($key, '', $_SERVER['REQUEST_TIME'] - 3600, $config); + } + unset($_COOKIE[$key]); + } + } + } + + return; + } + + private function jsonFormatProtect(&$val, $key, $type = 'encode') + { + if (!empty($val) && true !== $val) { + $val = 'decode' == $type ? urldecode($val) : urlencode($val); + } + } + +} diff --git a/thinkphp/library/think/Db.php b/thinkphp/library/think/Db.php new file mode 100755 index 0000000..9280eac --- /dev/null +++ b/thinkphp/library/think/Db.php @@ -0,0 +1,197 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\db\Connection; + +/** + * Class Db + * @package think + * @method \think\db\Query master() static 从主服务器读取数据 + * @method \think\db\Query readMaster(bool $all = false) static 后续从主服务器读取数据 + * @method \think\db\Query table(string $table) static 指定数据表(含前缀) + * @method \think\db\Query name(string $name) static 指定数据表(不含前缀) + * @method \think\db\Expression raw(string $value) static 使用表达式设置数据 + * @method \think\db\Query where(mixed $field, string $op = null, mixed $condition = null) static 查询条件 + * @method \think\db\Query whereRaw(string $where, array $bind = []) static 表达式查询 + * @method \think\db\Query whereExp(string $field, string $condition, array $bind = []) static 字段表达式查询 + * @method \think\db\Query when(mixed $condition, mixed $query, mixed $otherwise = null) static 条件查询 + * @method \think\db\Query join(mixed $join, mixed $condition = null, string $type = 'INNER') static JOIN查询 + * @method \think\db\Query view(mixed $join, mixed $field = null, mixed $on = null, string $type = 'INNER') static 视图查询 + * @method \think\db\Query field(mixed $field, boolean $except = false) static 指定查询字段 + * @method \think\db\Query fieldRaw(string $field, array $bind = []) static 指定查询字段 + * @method \think\db\Query union(mixed $union, boolean $all = false) static UNION查询 + * @method \think\db\Query limit(mixed $offset, integer $length = null) static 查询LIMIT + * @method \think\db\Query order(mixed $field, string $order = null) static 查询ORDER + * @method \think\db\Query orderRaw(string $field, array $bind = []) static 查询ORDER + * @method \think\db\Query cache(mixed $key = null , integer $expire = null) static 设置查询缓存 + * @method \think\db\Query withAttr(string $name,callable $callback = null) static 使用获取器获取数据 + * @method mixed value(string $field) static 获取某个字段的值 + * @method array column(string $field, string $key = '') static 获取某个列的值 + * @method mixed find(mixed $data = null) static 查询单个记录 + * @method mixed select(mixed $data = null) static 查询多个记录 + * @method integer insert(array $data, boolean $replace = false, boolean $getLastInsID = false, string $sequence = null) static 插入一条记录 + * @method integer insertGetId(array $data, boolean $replace = false, string $sequence = null) static 插入一条记录并返回自增ID + * @method integer insertAll(array $dataSet) static 插入多条记录 + * @method integer update(array $data) static 更新记录 + * @method integer delete(mixed $data = null) static 删除记录 + * @method boolean chunk(integer $count, callable $callback, string $column = null) static 分块获取数据 + * @method \Generator cursor(mixed $data = null) static 使用游标查找记录 + * @method mixed query(string $sql, array $bind = [], boolean $master = false, bool $pdo = false) static SQL查询 + * @method integer execute(string $sql, array $bind = [], boolean $fetch = false, boolean $getLastInsID = false, string $sequence = null) static SQL执行 + * @method \think\Paginator paginate(integer $listRows = 15, mixed $simple = null, array $config = []) static 分页查询 + * @method mixed transaction(callable $callback) static 执行数据库事务 + * @method void startTrans() static 启动事务 + * @method void commit() static 用于非自动提交状态下面的查询提交 + * @method void rollback() static 事务回滚 + * @method boolean batchQuery(array $sqlArray) static 批处理执行SQL语句 + * @method string getLastInsID(string $sequence = null) static 获取最近插入的ID + */ +class Db +{ + /** + * 当前数据库连接对象 + * @var Connection + */ + protected static $connection; + + /** + * 数据库配置 + * @var array + */ + protected static $config = []; + + /** + * 查询次数 + * @var integer + */ + public static $queryTimes = 0; + + /** + * 执行次数 + * @var integer + */ + public static $executeTimes = 0; + + /** + * 配置 + * @access public + * @param mixed $config + * @return void + */ + public static function init($config = []) + { + self::$config = $config; + + if (empty($config['query'])) { + self::$config['query'] = '\\think\\db\\Query'; + } + } + + /** + * 获取数据库配置 + * @access public + * @param string $config 配置名称 + * @return mixed + */ + public static function getConfig($name = '') + { + if ('' === $name) { + return self::$config; + } + + return isset(self::$config[$name]) ? self::$config[$name] : null; + } + + /** + * 切换数据库连接 + * @access public + * @param mixed $config 连接配置 + * @param bool|string $name 连接标识 true 强制重新连接 + * @param string $query 查询对象类名 + * @return mixed 返回查询对象实例 + * @throws Exception + */ + public static function connect($config = [], $name = false, $query = '') + { + // 解析配置参数 + $options = self::parseConfig($config ?: self::$config); + + $query = $query ?: $options['query']; + + // 创建数据库连接对象实例 + self::$connection = Connection::instance($options, $name); + + return new $query(self::$connection); + } + + /** + * 数据库连接参数解析 + * @access private + * @param mixed $config + * @return array + */ + private static function parseConfig($config) + { + if (is_string($config) && false === strpos($config, '/')) { + // 支持读取配置参数 + $config = isset(self::$config[$config]) ? self::$config[$config] : self::$config; + } + + $result = is_string($config) ? self::parseDsnConfig($config) : $config; + + if (empty($result['query'])) { + $result['query'] = self::$config['query']; + } + + return $result; + } + + /** + * DSN解析 + * 格式: mysql://username:passwd@localhost:3306/DbName?param1=val1¶m2=val2#utf8 + * @access private + * @param string $dsnStr + * @return array + */ + private static function parseDsnConfig($dsnStr) + { + $info = parse_url($dsnStr); + + if (!$info) { + return []; + } + + $dsn = [ + 'type' => $info['scheme'], + 'username' => isset($info['user']) ? $info['user'] : '', + 'password' => isset($info['pass']) ? $info['pass'] : '', + 'hostname' => isset($info['host']) ? $info['host'] : '', + 'hostport' => isset($info['port']) ? $info['port'] : '', + 'database' => !empty($info['path']) ? ltrim($info['path'], '/') : '', + 'charset' => isset($info['fragment']) ? $info['fragment'] : 'utf8', + ]; + + if (isset($info['query'])) { + parse_str($info['query'], $dsn['params']); + } else { + $dsn['params'] = []; + } + + return $dsn; + } + + public static function __callStatic($method, $args) + { + return call_user_func_array([static::connect(), $method], $args); + } +} diff --git a/thinkphp/library/think/Debug.php b/thinkphp/library/think/Debug.php new file mode 100755 index 0000000..776e178 --- /dev/null +++ b/thinkphp/library/think/Debug.php @@ -0,0 +1,278 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\model\Collection as ModelCollection; +use think\response\Redirect; + +class Debug +{ + /** + * 配置参数 + * @var array + */ + protected $config = []; + + /** + * 区间时间信息 + * @var array + */ + protected $info = []; + + /** + * 区间内存信息 + * @var array + */ + protected $mem = []; + + /** + * 应用对象 + * @var App + */ + protected $app; + + public function __construct(App $app, array $config = []) + { + $this->app = $app; + $this->config = $config; + } + + public static function __make(App $app, Config $config) + { + return new static($app, $config->pull('trace')); + } + + public function setConfig(array $config) + { + $this->config = array_merge($this->config, $config); + } + + /** + * 记录时间(微秒)和内存使用情况 + * @access public + * @param string $name 标记位置 + * @param mixed $value 标记值 留空则取当前 time 表示仅记录时间 否则同时记录时间和内存 + * @return void + */ + public function remark($name, $value = '') + { + // 记录时间和内存使用 + $this->info[$name] = is_float($value) ? $value : microtime(true); + + if ('time' != $value) { + $this->mem['mem'][$name] = is_float($value) ? $value : memory_get_usage(); + $this->mem['peak'][$name] = memory_get_peak_usage(); + } + } + + /** + * 统计某个区间的时间(微秒)使用情况 + * @access public + * @param string $start 开始标签 + * @param string $end 结束标签 + * @param integer|string $dec 小数位 + * @return integer + */ + public function getRangeTime($start, $end, $dec = 6) + { + if (!isset($this->info[$end])) { + $this->info[$end] = microtime(true); + } + + return number_format(($this->info[$end] - $this->info[$start]), $dec); + } + + /** + * 统计从开始到统计时的时间(微秒)使用情况 + * @access public + * @param integer|string $dec 小数位 + * @return integer + */ + public function getUseTime($dec = 6) + { + return number_format((microtime(true) - $this->app->getBeginTime()), $dec); + } + + /** + * 获取当前访问的吞吐率情况 + * @access public + * @return string + */ + public function getThroughputRate() + { + return number_format(1 / $this->getUseTime(), 2) . 'req/s'; + } + + /** + * 记录区间的内存使用情况 + * @access public + * @param string $start 开始标签 + * @param string $end 结束标签 + * @param integer|string $dec 小数位 + * @return string + */ + public function getRangeMem($start, $end, $dec = 2) + { + if (!isset($this->mem['mem'][$end])) { + $this->mem['mem'][$end] = memory_get_usage(); + } + + $size = $this->mem['mem'][$end] - $this->mem['mem'][$start]; + $a = ['B', 'KB', 'MB', 'GB', 'TB']; + $pos = 0; + + while ($size >= 1024) { + $size /= 1024; + $pos++; + } + + return round($size, $dec) . " " . $a[$pos]; + } + + /** + * 统计从开始到统计时的内存使用情况 + * @access public + * @param integer|string $dec 小数位 + * @return string + */ + public function getUseMem($dec = 2) + { + $size = memory_get_usage() - $this->app->getBeginMem(); + $a = ['B', 'KB', 'MB', 'GB', 'TB']; + $pos = 0; + + while ($size >= 1024) { + $size /= 1024; + $pos++; + } + + return round($size, $dec) . " " . $a[$pos]; + } + + /** + * 统计区间的内存峰值情况 + * @access public + * @param string $start 开始标签 + * @param string $end 结束标签 + * @param integer|string $dec 小数位 + * @return string + */ + public function getMemPeak($start, $end, $dec = 2) + { + if (!isset($this->mem['peak'][$end])) { + $this->mem['peak'][$end] = memory_get_peak_usage(); + } + + $size = $this->mem['peak'][$end] - $this->mem['peak'][$start]; + $a = ['B', 'KB', 'MB', 'GB', 'TB']; + $pos = 0; + + while ($size >= 1024) { + $size /= 1024; + $pos++; + } + + return round($size, $dec) . " " . $a[$pos]; + } + + /** + * 获取文件加载信息 + * @access public + * @param bool $detail 是否显示详细 + * @return integer|array + */ + public function getFile($detail = false) + { + if ($detail) { + $files = get_included_files(); + $info = []; + + foreach ($files as $key => $file) { + $info[] = $file . ' ( ' . number_format(filesize($file) / 1024, 2) . ' KB )'; + } + + return $info; + } + + return count(get_included_files()); + } + + /** + * 浏览器友好的变量输出 + * @access public + * @param mixed $var 变量 + * @param boolean $echo 是否输出 默认为true 如果为false 则返回输出字符串 + * @param string $label 标签 默认为空 + * @param integer $flags htmlspecialchars flags + * @return void|string + */ + public function dump($var, $echo = true, $label = null, $flags = ENT_SUBSTITUTE) + { + $label = (null === $label) ? '' : rtrim($label) . ':'; + if ($var instanceof Model || $var instanceof ModelCollection) { + $var = $var->toArray(); + } + + ob_start(); + var_dump($var); + + $output = ob_get_clean(); + $output = preg_replace('/\]\=\>\n(\s+)/m', '] => ', $output); + + if (PHP_SAPI == 'cli') { + $output = PHP_EOL . $label . $output . PHP_EOL; + } else { + if (!extension_loaded('xdebug')) { + $output = htmlspecialchars($output, $flags); + } + $output = '
                            ' . $label . $output . '
                            '; + } + if ($echo) { + echo($output); + return; + } + return $output; + } + + public function inject(Response $response, &$content) + { + $config = $this->config; + $type = isset($config['type']) ? $config['type'] : 'Html'; + + unset($config['type']); + + $trace = Loader::factory($type, '\\think\\debug\\', $config); + + if ($response instanceof Redirect) { + //TODO 记录 + } else { + $output = $trace->output($response, $this->app['log']->getLog()); + if (is_string($output)) { + // trace调试信息注入 + $pos = strripos($content, ''); + if (false !== $pos) { + $content = substr($content, 0, $pos) . $output . substr($content, $pos); + } else { + $content = $content . $output; + } + } + } + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app']); + + return $data; + } +} diff --git a/thinkphp/library/think/Env.php b/thinkphp/library/think/Env.php new file mode 100755 index 0000000..eaeee94 --- /dev/null +++ b/thinkphp/library/think/Env.php @@ -0,0 +1,113 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class Env +{ + /** + * 环境变量数据 + * @var array + */ + protected $data = []; + + public function __construct() + { + $this->data = $_ENV; + } + + /** + * 读取环境变量定义文件 + * @access public + * @param string $file 环境变量定义文件 + * @return void + */ + public function load($file) + { + $env = parse_ini_file($file, true); + $this->set($env); + } + + /** + * 获取环境变量值 + * @access public + * @param string $name 环境变量名 + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name = null, $default = null, $php_prefix = true) + { + if (is_null($name)) { + return $this->data; + } + + $name = strtoupper(str_replace('.', '_', $name)); + + if (isset($this->data[$name])) { + return $this->data[$name]; + } + + return $this->getEnv($name, $default, $php_prefix); + } + + protected function getEnv($name, $default = null, $php_prefix = true) + { + if ($php_prefix) { + $name = 'PHP_' . $name; + } + + $result = getenv($name); + + if (false === $result) { + return $default; + } + + if ('false' === $result) { + $result = false; + } elseif ('true' === $result) { + $result = true; + } + + if (!isset($this->data[$name])) { + $this->data[$name] = $result; + } + + return $result; + } + + /** + * 设置环境变量值 + * @access public + * @param string|array $env 环境变量 + * @param mixed $value 值 + * @return void + */ + public function set($env, $value = null) + { + if (is_array($env)) { + $env = array_change_key_case($env, CASE_UPPER); + + foreach ($env as $key => $val) { + if (is_array($val)) { + foreach ($val as $k => $v) { + $this->data[$key . '_' . strtoupper($k)] = $v; + } + } else { + $this->data[$key] = $val; + } + } + } else { + $name = strtoupper(str_replace('.', '_', $env)); + + $this->data[$name] = $value; + } + } +} diff --git a/thinkphp/library/think/Error.php b/thinkphp/library/think/Error.php new file mode 100755 index 0000000..ea3328e --- /dev/null +++ b/thinkphp/library/think/Error.php @@ -0,0 +1,147 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\console\Output as ConsoleOutput; +use think\exception\ErrorException; +use think\exception\Handle; +use think\exception\ThrowableError; + +class Error +{ + /** + * 配置参数 + * @var array + */ + protected static $exceptionHandler; + + /** + * 注册异常处理 + * @access public + * @return void + */ + public static function register() + { + error_reporting(E_ALL); + set_error_handler([__CLASS__, 'appError']); + set_exception_handler([__CLASS__, 'appException']); + register_shutdown_function([__CLASS__, 'appShutdown']); + } + + /** + * Exception Handler + * @access public + * @param \Exception|\Throwable $e + */ + public static function appException($e) + { + if (!$e instanceof \Exception) { + $e = new ThrowableError($e); + } + + self::getExceptionHandler()->report($e); + + if (PHP_SAPI == 'cli') { + self::getExceptionHandler()->renderForConsole(new ConsoleOutput, $e); + } else { + self::getExceptionHandler()->render($e)->send(); + } + } + + /** + * Error Handler + * @access public + * @param integer $errno 错误编号 + * @param integer $errstr 详细错误信息 + * @param string $errfile 出错的文件 + * @param integer $errline 出错行号 + * @throws ErrorException + */ + public static function appError($errno, $errstr, $errfile = '', $errline = 0) + { + $exception = new ErrorException($errno, $errstr, $errfile, $errline); + if (error_reporting() & $errno) { + // 将错误信息托管至 think\exception\ErrorException + throw $exception; + } + + self::getExceptionHandler()->report($exception); + } + + /** + * Shutdown Handler + * @access public + */ + public static function appShutdown() + { + if (!is_null($error = error_get_last()) && self::isFatal($error['type'])) { + // 将错误信息托管至think\ErrorException + $exception = new ErrorException($error['type'], $error['message'], $error['file'], $error['line']); + + self::appException($exception); + } + + // 写入日志 + Container::get('log')->save(); + } + + /** + * 确定错误类型是否致命 + * + * @access protected + * @param int $type + * @return bool + */ + protected static function isFatal($type) + { + return in_array($type, [E_ERROR, E_CORE_ERROR, E_COMPILE_ERROR, E_PARSE]); + } + + /** + * 设置异常处理类 + * + * @access public + * @param mixed $handle + * @return void + */ + public static function setExceptionHandler($handle) + { + self::$exceptionHandler = $handle; + } + + /** + * Get an instance of the exception handler. + * + * @access public + * @return Handle + */ + public static function getExceptionHandler() + { + static $handle; + + if (!$handle) { + // 异常处理handle + $class = self::$exceptionHandler; + + if ($class && is_string($class) && class_exists($class) && is_subclass_of($class, "\\think\\exception\\Handle")) { + $handle = new $class; + } else { + $handle = new Handle; + if ($class instanceof \Closure) { + $handle->setRender($class); + } + } + } + + return $handle; + } +} diff --git a/thinkphp/library/think/Exception.php b/thinkphp/library/think/Exception.php new file mode 100755 index 0000000..414a090 --- /dev/null +++ b/thinkphp/library/think/Exception.php @@ -0,0 +1,56 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class Exception extends \Exception +{ + + /** + * 保存异常页面显示的额外Debug数据 + * @var array + */ + protected $data = []; + + /** + * 设置异常额外的Debug数据 + * 数据将会显示为下面的格式 + * + * Exception Data + * -------------------------------------------------- + * Label 1 + * key1 value1 + * key2 value2 + * Label 2 + * key1 value1 + * key2 value2 + * + * @access protected + * @param string $label 数据分类,用于异常页面显示 + * @param array $data 需要显示的数据,必须为关联数组 + */ + final protected function setData($label, array $data) + { + $this->data[$label] = $data; + } + + /** + * 获取异常额外Debug数据 + * 主要用于输出到异常页面便于调试 + * @access public + * @return array 由setData设置的Debug数据 + */ + final public function getData() + { + return $this->data; + } + +} diff --git a/thinkphp/library/think/Facade.php b/thinkphp/library/think/Facade.php new file mode 100755 index 0000000..ac5ae28 --- /dev/null +++ b/thinkphp/library/think/Facade.php @@ -0,0 +1,125 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class Facade +{ + /** + * 绑定对象 + * @var array + */ + protected static $bind = []; + + /** + * 始终创建新的对象实例 + * @var bool + */ + protected static $alwaysNewInstance; + + /** + * 绑定类的静态代理 + * @static + * @access public + * @param string|array $name 类标识 + * @param string $class 类名 + * @return object + */ + public static function bind($name, $class = null) + { + if (__CLASS__ != static::class) { + return self::__callStatic('bind', func_get_args()); + } + + if (is_array($name)) { + self::$bind = array_merge(self::$bind, $name); + } else { + self::$bind[$name] = $class; + } + } + + /** + * 创建Facade实例 + * @static + * @access protected + * @param string $class 类名或标识 + * @param array $args 变量 + * @param bool $newInstance 是否每次创建新的实例 + * @return object + */ + protected static function createFacade($class = '', $args = [], $newInstance = false) + { + $class = $class ?: static::class; + + $facadeClass = static::getFacadeClass(); + + if ($facadeClass) { + $class = $facadeClass; + } elseif (isset(self::$bind[$class])) { + $class = self::$bind[$class]; + } + + if (static::$alwaysNewInstance) { + $newInstance = true; + } + + return Container::getInstance()->make($class, $args, $newInstance); + } + + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + {} + + /** + * 带参数实例化当前Facade类 + * @access public + * @return mixed + */ + public static function instance(...$args) + { + if (__CLASS__ != static::class) { + return self::createFacade('', $args); + } + } + + /** + * 调用类的实例 + * @access public + * @param string $class 类名或者标识 + * @param array|true $args 变量 + * @param bool $newInstance 是否每次创建新的实例 + * @return mixed + */ + public static function make($class, $args = [], $newInstance = false) + { + if (__CLASS__ != static::class) { + return self::__callStatic('make', func_get_args()); + } + + if (true === $args) { + // 总是创建新的实例化对象 + $newInstance = true; + $args = []; + } + + return self::createFacade($class, $args, $newInstance); + } + + // 调用实际类的方法 + public static function __callStatic($method, $params) + { + return call_user_func_array([static::createFacade(), $method], $params); + } +} diff --git a/thinkphp/library/think/File.php b/thinkphp/library/think/File.php new file mode 100755 index 0000000..b24b777 --- /dev/null +++ b/thinkphp/library/think/File.php @@ -0,0 +1,496 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use SplFileObject; + +class File extends SplFileObject +{ + /** + * 错误信息 + * @var string + */ + private $error = ''; + + /** + * 当前完整文件名 + * @var string + */ + protected $filename; + + /** + * 上传文件名 + * @var string + */ + protected $saveName; + + /** + * 上传文件命名规则 + * @var string + */ + protected $rule = 'date'; + + /** + * 上传文件验证规则 + * @var array + */ + protected $validate = []; + + /** + * 是否单元测试 + * @var bool + */ + protected $isTest; + + /** + * 上传文件信息 + * @var array + */ + protected $info = []; + + /** + * 文件hash规则 + * @var array + */ + protected $hash = []; + + public function __construct($filename, $mode = 'r') + { + parent::__construct($filename, $mode); + + $this->filename = $this->getRealPath() ?: $this->getPathname(); + } + + /** + * 是否测试 + * @access public + * @param bool $test 是否测试 + * @return $this + */ + public function isTest($test = false) + { + $this->isTest = $test; + + return $this; + } + + /** + * 设置上传信息 + * @access public + * @param array $info 上传文件信息 + * @return $this + */ + public function setUploadInfo($info) + { + $this->info = $info; + + return $this; + } + + /** + * 获取上传文件的信息 + * @access public + * @param string $name + * @return array|string + */ + public function getInfo($name = '') + { + return isset($this->info[$name]) ? $this->info[$name] : $this->info; + } + + /** + * 获取上传文件的文件名 + * @access public + * @return string + */ + public function getSaveName() + { + return $this->saveName; + } + + /** + * 设置上传文件的保存文件名 + * @access public + * @param string $saveName + * @return $this + */ + public function setSaveName($saveName) + { + $this->saveName = $saveName; + + return $this; + } + + /** + * 获取文件的哈希散列值 + * @access public + * @param string $type + * @return string + */ + public function hash($type = 'sha1') + { + if (!isset($this->hash[$type])) { + $this->hash[$type] = hash_file($type, $this->filename); + } + + return $this->hash[$type]; + } + + /** + * 检查目录是否可写 + * @access protected + * @param string $path 目录 + * @return boolean + */ + protected function checkPath($path) + { + if (is_dir($path)) { + return true; + } + + if (mkdir($path, 0755, true)) { + return true; + } + + $this->error = ['directory {:path} creation failed', ['path' => $path]]; + return false; + } + + /** + * 获取文件类型信息 + * @access public + * @return string + */ + public function getMime() + { + $finfo = finfo_open(FILEINFO_MIME_TYPE); + + return finfo_file($finfo, $this->filename); + } + + /** + * 设置文件的命名规则 + * @access public + * @param string $rule 文件命名规则 + * @return $this + */ + public function rule($rule) + { + $this->rule = $rule; + + return $this; + } + + /** + * 设置上传文件的验证规则 + * @access public + * @param array $rule 验证规则 + * @return $this + */ + public function validate($rule = []) + { + $this->validate = $rule; + + return $this; + } + + /** + * 检测是否合法的上传文件 + * @access public + * @return bool + */ + public function isValid() + { + if ($this->isTest) { + return is_file($this->filename); + } + + return is_uploaded_file($this->filename); + } + + /** + * 检测上传文件 + * @access public + * @param array $rule 验证规则 + * @return bool + */ + public function check($rule = []) + { + $rule = $rule ?: $this->validate; + + if ((isset($rule['size']) && !$this->checkSize($rule['size'])) + || (isset($rule['type']) && !$this->checkMime($rule['type'])) + || (isset($rule['ext']) && !$this->checkExt($rule['ext'])) + || !$this->checkImg()) { + return false; + } + + return true; + } + + /** + * 检测上传文件后缀 + * @access public + * @param array|string $ext 允许后缀 + * @return bool + */ + public function checkExt($ext) + { + if (is_string($ext)) { + $ext = explode(',', $ext); + } + + $extension = strtolower(pathinfo($this->getInfo('name'), PATHINFO_EXTENSION)); + + if (!in_array($extension, $ext)) { + $this->error = 'extensions to upload is not allowed'; + return false; + } + + return true; + } + + /** + * 检测图像文件 + * @access public + * @return bool + */ + public function checkImg() + { + $extension = strtolower(pathinfo($this->getInfo('name'), PATHINFO_EXTENSION)); + + /* 对图像文件进行严格检测 */ + if (in_array($extension, ['gif', 'jpg', 'jpeg', 'bmp', 'png', 'swf']) && !in_array($this->getImageType($this->filename), [1, 2, 3, 4, 6, 13])) { + $this->error = 'illegal image files'; + return false; + } + + return true; + } + + // 判断图像类型 + protected function getImageType($image) + { + if (function_exists('exif_imagetype')) { + return exif_imagetype($image); + } + + try { + $info = getimagesize($image); + return $info ? $info[2] : false; + } catch (\Exception $e) { + return false; + } + } + + /** + * 检测上传文件大小 + * @access public + * @param integer $size 最大大小 + * @return bool + */ + public function checkSize($size) + { + if ($this->getSize() > (int) $size) { + $this->error = 'filesize not match'; + return false; + } + + return true; + } + + /** + * 检测上传文件类型 + * @access public + * @param array|string $mime 允许类型 + * @return bool + */ + public function checkMime($mime) + { + if (is_string($mime)) { + $mime = explode(',', $mime); + } + + if (!in_array(strtolower($this->getMime()), $mime)) { + $this->error = 'mimetype to upload is not allowed'; + return false; + } + + return true; + } + + /** + * 移动文件 + * @access public + * @param string $path 保存路径 + * @param string|bool $savename 保存的文件名 默认自动生成 + * @param boolean $replace 同名文件是否覆盖 + * @param bool $autoAppendExt 自动补充扩展名 + * @return false|File false-失败 否则返回File实例 + */ + public function move($path, $savename = true, $replace = true, $autoAppendExt = true) + { + // 文件上传失败,捕获错误代码 + if (!empty($this->info['error'])) { + $this->error($this->info['error']); + return false; + } + + // 检测合法性 + if (!$this->isValid()) { + $this->error = 'upload illegal files'; + return false; + } + + // 验证上传 + if (!$this->check()) { + return false; + } + + $path = rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR; + // 文件保存命名规则 + $saveName = $this->buildSaveName($savename, $autoAppendExt); + $filename = $path . $saveName; + + // 检测目录 + if (false === $this->checkPath(dirname($filename))) { + return false; + } + + /* 不覆盖同名文件 */ + if (!$replace && is_file($filename)) { + $this->error = ['has the same filename: {:filename}', ['filename' => $filename]]; + return false; + } + + /* 移动文件 */ + if ($this->isTest) { + rename($this->filename, $filename); + } elseif (!move_uploaded_file($this->filename, $filename)) { + $this->error = 'upload write error'; + return false; + } + + // 返回 File对象实例 + $file = new self($filename); + $file->setSaveName($saveName); + $file->setUploadInfo($this->info); + + return $file; + } + + /** + * 获取保存文件名 + * @access protected + * @param string|bool $savename 保存的文件名 默认自动生成 + * @param bool $autoAppendExt 自动补充扩展名 + * @return string + */ + protected function buildSaveName($savename, $autoAppendExt = true) + { + if (true === $savename) { + // 自动生成文件名 + $savename = $this->autoBuildName(); + } elseif ('' === $savename || false === $savename) { + // 保留原文件名 + $savename = $this->getInfo('name'); + } + + if ($autoAppendExt && false === strpos($savename, '.')) { + $savename .= '.' . pathinfo($this->getInfo('name'), PATHINFO_EXTENSION); + } + + return $savename; + } + + /** + * 自动生成文件名 + * @access protected + * @return string + */ + protected function autoBuildName() + { + if ($this->rule instanceof \Closure) { + $savename = call_user_func_array($this->rule, [$this]); + } else { + switch ($this->rule) { + case 'date': + $savename = date('Ymd') . DIRECTORY_SEPARATOR . md5(microtime(true)); + break; + default: + if (in_array($this->rule, hash_algos())) { + $hash = $this->hash($this->rule); + $savename = substr($hash, 0, 2) . DIRECTORY_SEPARATOR . substr($hash, 2); + } elseif (is_callable($this->rule)) { + $savename = call_user_func($this->rule); + } else { + $savename = date('Ymd') . DIRECTORY_SEPARATOR . md5(microtime(true)); + } + } + } + + return $savename; + } + + /** + * 获取错误代码信息 + * @access private + * @param int $errorNo 错误号 + */ + private function error($errorNo) + { + switch ($errorNo) { + case 1: + case 2: + $this->error = 'upload File size exceeds the maximum value'; + break; + case 3: + $this->error = 'only the portion of file is uploaded'; + break; + case 4: + $this->error = 'no file to uploaded'; + break; + case 6: + $this->error = 'upload temp dir not found'; + break; + case 7: + $this->error = 'file write error'; + break; + default: + $this->error = 'unknown upload error'; + } + } + + /** + * 获取错误信息(支持多语言) + * @access public + * @return string + */ + public function getError() + { + $lang = Container::get('lang'); + + if (is_array($this->error)) { + list($msg, $vars) = $this->error; + } else { + $msg = $this->error; + $vars = []; + } + + return $lang->has($msg) ? $lang->get($msg, $vars) : $msg; + } + + public function __call($method, $args) + { + return $this->hash($method); + } +} diff --git a/thinkphp/library/think/Hook.php b/thinkphp/library/think/Hook.php new file mode 100755 index 0000000..1d01141 --- /dev/null +++ b/thinkphp/library/think/Hook.php @@ -0,0 +1,220 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class Hook +{ + /** + * 钩子行为定义 + * @var array + */ + private $tags = []; + + /** + * 绑定行为列表 + * @var array + */ + protected $bind = []; + + /** + * 入口方法名称 + * @var string + */ + private static $portal = 'run'; + + /** + * 应用对象 + * @var App + */ + protected $app; + + public function __construct(App $app) + { + $this->app = $app; + } + + /** + * 指定入口方法名称 + * @access public + * @param string $name 方法名 + * @return $this + */ + public function portal($name) + { + self::$portal = $name; + return $this; + } + + /** + * 指定行为标识 便于调用 + * @access public + * @param string|array $name 行为标识 + * @param mixed $behavior 行为 + * @return $this + */ + public function alias($name, $behavior = null) + { + if (is_array($name)) { + $this->bind = array_merge($this->bind, $name); + } else { + $this->bind[$name] = $behavior; + } + + return $this; + } + + /** + * 动态添加行为扩展到某个标签 + * @access public + * @param string $tag 标签名称 + * @param mixed $behavior 行为名称 + * @param bool $first 是否放到开头执行 + * @return void + */ + public function add($tag, $behavior, $first = false) + { + isset($this->tags[$tag]) || $this->tags[$tag] = []; + + if (is_array($behavior) && !is_callable($behavior)) { + if (!array_key_exists('_overlay', $behavior)) { + $this->tags[$tag] = array_merge($this->tags[$tag], $behavior); + } else { + unset($behavior['_overlay']); + $this->tags[$tag] = $behavior; + } + } elseif ($first) { + array_unshift($this->tags[$tag], $behavior); + } else { + $this->tags[$tag][] = $behavior; + } + } + + /** + * 批量导入插件 + * @access public + * @param array $tags 插件信息 + * @param bool $recursive 是否递归合并 + * @return void + */ + public function import(array $tags, $recursive = true) + { + if ($recursive) { + foreach ($tags as $tag => $behavior) { + $this->add($tag, $behavior); + } + } else { + $this->tags = $tags + $this->tags; + } + } + + /** + * 获取插件信息 + * @access public + * @param string $tag 插件位置 留空获取全部 + * @return array + */ + public function get($tag = '') + { + if (empty($tag)) { + //获取全部的插件信息 + return $this->tags; + } + + return array_key_exists($tag, $this->tags) ? $this->tags[$tag] : []; + } + + /** + * 监听标签的行为 + * @access public + * @param string $tag 标签名称 + * @param mixed $params 传入参数 + * @param bool $once 只获取一个有效返回值 + * @return mixed + */ + public function listen($tag, $params = null, $once = false) + { + $results = []; + $tags = $this->get($tag); + + foreach ($tags as $key => $name) { + $results[$key] = $this->execTag($name, $tag, $params); + + if (false === $results[$key] || (!is_null($results[$key]) && $once)) { + break; + } + } + + return $once ? end($results) : $results; + } + + /** + * 执行行为 + * @access public + * @param mixed $class 行为 + * @param mixed $params 参数 + * @return mixed + */ + public function exec($class, $params = null) + { + if ($class instanceof \Closure || is_array($class)) { + $method = $class; + } else { + if (isset($this->bind[$class])) { + $class = $this->bind[$class]; + } + $method = [$class, self::$portal]; + } + + return $this->app->invoke($method, [$params]); + } + + /** + * 执行某个标签的行为 + * @access protected + * @param mixed $class 要执行的行为 + * @param string $tag 方法名(标签名) + * @param mixed $params 参数 + * @return mixed + */ + protected function execTag($class, $tag = '', $params = null) + { + $method = Loader::parseName($tag, 1, false); + + if ($class instanceof \Closure) { + $call = $class; + $class = 'Closure'; + } elseif (is_array($class) || strpos($class, '::')) { + $call = $class; + } else { + $obj = Container::get($class); + + if (!is_callable([$obj, $method])) { + $method = self::$portal; + } + + $call = [$class, $method]; + $class = $class . '->' . $method; + } + + $result = $this->app->invoke($call, [$params]); + + return $result; + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app']); + + return $data; + } +} diff --git a/thinkphp/library/think/Image.php b/thinkphp/library/think/Image.php new file mode 100755 index 0000000..238fbc3 --- /dev/null +++ b/thinkphp/library/think/Image.php @@ -0,0 +1,642 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\image\Exception as ImageException; +use think\image\gif\Gif; + +class Image +{ + + /* 缩略图相关常量定义 */ + const THUMB_SCALING = 1; //常量,标识缩略图等比例缩放类型 + const THUMB_FILLED = 2; //常量,标识缩略图缩放后填充类型 + const THUMB_CENTER = 3; //常量,标识缩略图居中裁剪类型 + const THUMB_NORTHWEST = 4; //常量,标识缩略图左上角裁剪类型 + const THUMB_SOUTHEAST = 5; //常量,标识缩略图右下角裁剪类型 + const THUMB_FIXED = 6; //常量,标识缩略图固定尺寸缩放类型 + /* 水印相关常量定义 */ + const WATER_NORTHWEST = 1; //常量,标识左上角水印 + const WATER_NORTH = 2; //常量,标识上居中水印 + const WATER_NORTHEAST = 3; //常量,标识右上角水印 + const WATER_WEST = 4; //常量,标识左居中水印 + const WATER_CENTER = 5; //常量,标识居中水印 + const WATER_EAST = 6; //常量,标识右居中水印 + const WATER_SOUTHWEST = 7; //常量,标识左下角水印 + const WATER_SOUTH = 8; //常量,标识下居中水印 + const WATER_SOUTHEAST = 9; //常量,标识右下角水印 + /* 翻转相关常量定义 */ + const FLIP_X = 1; //X轴翻转 + const FLIP_Y = 2; //Y轴翻转 + + /** + * 图像资源对象 + * + * @var resource + */ + protected $im; + + /** @var Gif */ + protected $gif; + + /** + * 图像信息,包括 width, height, type, mime, size + * + * @var array + */ + protected $info; + + protected function __construct(\SplFileInfo $file) + { + //获取图像信息 + $info = @getimagesize($file->getPathname()); + + //检测图像合法性 + if (false === $info || (IMAGETYPE_GIF === $info[2] && empty($info['bits']))) { + throw new ImageException('Illegal image file'); + } + + //设置图像信息 + $this->info = [ + 'width' => $info[0], + 'height' => $info[1], + 'type' => image_type_to_extension($info[2], false), + 'mime' => $info['mime'], + ]; + + //打开图像 + if ('gif' == $this->info['type']) { + $this->gif = new Gif($file->getPathname()); + $this->im = @imagecreatefromstring($this->gif->image()); + } else { + $fun = "imagecreatefrom{$this->info['type']}"; + $this->im = @$fun($file->getPathname()); + } + + if (empty($this->im)) { + throw new ImageException('Failed to create image resources!'); + } + + } + + /** + * 打开一个图片文件 + * @param \SplFileInfo|string $file + * @return Image + */ + public static function open($file) + { + if (is_string($file)) { + $file = new \SplFileInfo($file); + } + if (!$file->isFile()) { + throw new ImageException('image file not exist'); + } + return new self($file); + } + + /** + * 保存图像 + * @param string $pathname 图像保存路径名称 + * @param null|string $type 图像类型 + * @param int $quality 图像质量 + * @param bool $interlace 是否对JPEG类型图像设置隔行扫描 + * @return $this + */ + public function save($pathname, $type = null, $quality = 80, $interlace = true) + { + //自动获取图像类型 + if (is_null($type)) { + $type = $this->info['type']; + } else { + $type = strtolower($type); + } + //保存图像 + if ('jpeg' == $type || 'jpg' == $type) { + //JPEG图像设置隔行扫描 + imageinterlace($this->im, $interlace); + imagejpeg($this->im, $pathname, $quality); + } elseif ('gif' == $type && !empty($this->gif)) { + $this->gif->save($pathname); + } elseif ('png' == $type) { + //设定保存完整的 alpha 通道信息 + imagesavealpha($this->im, true); + //ImagePNG生成图像的质量范围从0到9的 + imagepng($this->im, $pathname, min((int) ($quality / 10), 9)); + } else { + $fun = 'image' . $type; + $fun($this->im, $pathname); + } + + return $this; + } + + /** + * 返回图像宽度 + * @return int 图像宽度 + */ + public function width() + { + return $this->info['width']; + } + + /** + * 返回图像高度 + * @return int 图像高度 + */ + public function height() + { + return $this->info['height']; + } + + /** + * 返回图像类型 + * @return string 图像类型 + */ + public function type() + { + return $this->info['type']; + } + + /** + * 返回图像MIME类型 + * @return string 图像MIME类型 + */ + public function mime() + { + return $this->info['mime']; + } + + /** + * 返回图像尺寸数组 0 - 图像宽度,1 - 图像高度 + * @return array 图像尺寸 + */ + public function size() + { + return [$this->info['width'], $this->info['height']]; + } + + /** + * 旋转图像 + * @param int $degrees 顺时针旋转的度数 + * @return $this + */ + public function rotate($degrees = 90) + { + do { + $img = imagerotate($this->im, -$degrees, imagecolorallocatealpha($this->im, 0, 0, 0, 127)); + imagedestroy($this->im); + $this->im = $img; + } while (!empty($this->gif) && $this->gifNext()); + + $this->info['width'] = imagesx($this->im); + $this->info['height'] = imagesy($this->im); + + return $this; + } + + /** + * 翻转图像 + * @param integer $direction 翻转轴,X或者Y + * @return $this + */ + public function flip($direction = self::FLIP_X) + { + //原图宽度和高度 + $w = $this->info['width']; + $h = $this->info['height']; + + do { + + $img = imagecreatetruecolor($w, $h); + + switch ($direction) { + case self::FLIP_X: + for ($y = 0; $y < $h; $y++) { + imagecopy($img, $this->im, 0, $h - $y - 1, 0, $y, $w, 1); + } + break; + case self::FLIP_Y: + for ($x = 0; $x < $w; $x++) { + imagecopy($img, $this->im, $w - $x - 1, 0, $x, 0, 1, $h); + } + break; + default: + throw new ImageException('不支持的翻转类型'); + } + + imagedestroy($this->im); + $this->im = $img; + + } while (!empty($this->gif) && $this->gifNext()); + + return $this; + } + + /** + * 裁剪图像 + * + * @param integer $w 裁剪区域宽度 + * @param integer $h 裁剪区域高度 + * @param integer $x 裁剪区域x坐标 + * @param integer $y 裁剪区域y坐标 + * @param integer $width 图像保存宽度 + * @param integer $height 图像保存高度 + * + * @return $this + */ + public function crop($w, $h, $x = 0, $y = 0, $width = null, $height = null) + { + //设置保存尺寸 + empty($width) && $width = $w; + empty($height) && $height = $h; + do { + //创建新图像 + $img = imagecreatetruecolor($width, $height); + // 调整默认颜色 + $color = imagecolorallocate($img, 255, 255, 255); + imagefill($img, 0, 0, $color); + //裁剪 + imagecopyresampled($img, $this->im, 0, 0, $x, $y, $width, $height, $w, $h); + imagedestroy($this->im); //销毁原图 + //设置新图像 + $this->im = $img; + } while (!empty($this->gif) && $this->gifNext()); + $this->info['width'] = (int) $width; + $this->info['height'] = (int) $height; + return $this; + } + + /** + * 生成缩略图 + * + * @param integer $width 缩略图最大宽度 + * @param integer $height 缩略图最大高度 + * @param int $type 缩略图裁剪类型 + * + * @return $this + */ + public function thumb($width, $height, $type = self::THUMB_SCALING) + { + //原图宽度和高度 + $w = $this->info['width']; + $h = $this->info['height']; + /* 计算缩略图生成的必要参数 */ + switch ($type) { + /* 等比例缩放 */ + case self::THUMB_SCALING: + //原图尺寸小于缩略图尺寸则不进行缩略 + if ($w < $width && $h < $height) { + return $this; + } + //计算缩放比例 + $scale = min($width / $w, $height / $h); + //设置缩略图的坐标及宽度和高度 + $x = $y = 0; + $width = $w * $scale; + $height = $h * $scale; + break; + /* 居中裁剪 */ + case self::THUMB_CENTER: + //计算缩放比例 + $scale = max($width / $w, $height / $h); + //设置缩略图的坐标及宽度和高度 + $w = $width / $scale; + $h = $height / $scale; + $x = ($this->info['width'] - $w) / 2; + $y = ($this->info['height'] - $h) / 2; + break; + /* 左上角裁剪 */ + case self::THUMB_NORTHWEST: + //计算缩放比例 + $scale = max($width / $w, $height / $h); + //设置缩略图的坐标及宽度和高度 + $x = $y = 0; + $w = $width / $scale; + $h = $height / $scale; + break; + /* 右下角裁剪 */ + case self::THUMB_SOUTHEAST: + //计算缩放比例 + $scale = max($width / $w, $height / $h); + //设置缩略图的坐标及宽度和高度 + $w = $width / $scale; + $h = $height / $scale; + $x = $this->info['width'] - $w; + $y = $this->info['height'] - $h; + break; + /* 填充 */ + case self::THUMB_FILLED: + //计算缩放比例 + if ($w < $width && $h < $height) { + $scale = 1; + } else { + $scale = min($width / $w, $height / $h); + } + //设置缩略图的坐标及宽度和高度 + $neww = $w * $scale; + $newh = $h * $scale; + $x = $this->info['width'] - $w; + $y = $this->info['height'] - $h; + $posx = ($width - $w * $scale) / 2; + $posy = ($height - $h * $scale) / 2; + do { + //创建新图像 + $img = imagecreatetruecolor($width, $height); + // 调整默认颜色 + $color = imagecolorallocate($img, 255, 255, 255); + imagefill($img, 0, 0, $color); + //裁剪 + imagecopyresampled($img, $this->im, $posx, $posy, $x, $y, $neww, $newh, $w, $h); + imagedestroy($this->im); //销毁原图 + $this->im = $img; + } while (!empty($this->gif) && $this->gifNext()); + $this->info['width'] = (int) $width; + $this->info['height'] = (int) $height; + return $this; + /* 固定 */ + case self::THUMB_FIXED: + $x = $y = 0; + break; + default: + throw new ImageException('不支持的缩略图裁剪类型'); + } + /* 裁剪图像 */ + return $this->crop($w, $h, $x, $y, $width, $height); + } + + /** + * 添加水印 + * + * @param string $source 水印图片路径 + * @param int|array $locate 水印位置 + * @param int $alpha 透明度 + * @return $this + */ + public function water($source, $locate = self::WATER_SOUTHEAST, $alpha = 100) + { + if (!is_file($source)) { + throw new ImageException('水印图像不存在'); + } + //获取水印图像信息 + $info = getimagesize($source); + if (false === $info || (IMAGETYPE_GIF === $info[2] && empty($info['bits']))) { + throw new ImageException('非法水印文件'); + } + //创建水印图像资源 + $fun = 'imagecreatefrom' . image_type_to_extension($info[2], false); + $water = $fun($source); + //设定水印图像的混色模式 + imagealphablending($water, true); + /* 设定水印位置 */ + switch ($locate) { + /* 右下角水印 */ + case self::WATER_SOUTHEAST: + $x = $this->info['width'] - $info[0]; + $y = $this->info['height'] - $info[1]; + break; + /* 左下角水印 */ + case self::WATER_SOUTHWEST: + $x = 0; + $y = $this->info['height'] - $info[1]; + break; + /* 左上角水印 */ + case self::WATER_NORTHWEST: + $x = $y = 0; + break; + /* 右上角水印 */ + case self::WATER_NORTHEAST: + $x = $this->info['width'] - $info[0]; + $y = 0; + break; + /* 居中水印 */ + case self::WATER_CENTER: + $x = ($this->info['width'] - $info[0]) / 2; + $y = ($this->info['height'] - $info[1]) / 2; + break; + /* 下居中水印 */ + case self::WATER_SOUTH: + $x = ($this->info['width'] - $info[0]) / 2; + $y = $this->info['height'] - $info[1]; + break; + /* 右居中水印 */ + case self::WATER_EAST: + $x = $this->info['width'] - $info[0]; + $y = ($this->info['height'] - $info[1]) / 2; + break; + /* 上居中水印 */ + case self::WATER_NORTH: + $x = ($this->info['width'] - $info[0]) / 2; + $y = 0; + break; + /* 左居中水印 */ + case self::WATER_WEST: + $x = 0; + $y = ($this->info['height'] - $info[1]) / 2; + break; + default: + /* 自定义水印坐标 */ + if (is_array($locate)) { + list($x, $y) = $locate; + } else { + throw new ImageException('不支持的水印位置类型'); + } + } + do { + //添加水印 + $src = imagecreatetruecolor($info[0], $info[1]); + // 调整默认颜色 + $color = imagecolorallocate($src, 255, 255, 255); + imagefill($src, 0, 0, $color); + imagecopy($src, $this->im, 0, 0, $x, $y, $info[0], $info[1]); + imagecopy($src, $water, 0, 0, 0, 0, $info[0], $info[1]); + imagecopymerge($this->im, $src, $x, $y, 0, 0, $info[0], $info[1], $alpha); + //销毁临时图片资源 + imagedestroy($src); + } while (!empty($this->gif) && $this->gifNext()); + //销毁水印资源 + imagedestroy($water); + return $this; + } + + /** + * 图像添加文字 + * + * @param string $text 添加的文字 + * @param string $font 字体路径 + * @param integer $size 字号 + * @param string $color 文字颜色 + * @param int|array $locate 文字写入位置 + * @param integer $offset 文字相对当前位置的偏移量 + * @param integer $angle 文字倾斜角度 + * + * @return $this + * @throws ImageException + */ + public function text($text, $font, $size, $color = '#00000000', + $locate = self::WATER_SOUTHEAST, $offset = 0, $angle = 0) { + + if (!is_file($font)) { + throw new ImageException("不存在的字体文件:{$font}"); + } + //获取文字信息 + $info = imagettfbbox($size, $angle, $font, $text); + $minx = min($info[0], $info[2], $info[4], $info[6]); + $maxx = max($info[0], $info[2], $info[4], $info[6]); + $miny = min($info[1], $info[3], $info[5], $info[7]); + $maxy = max($info[1], $info[3], $info[5], $info[7]); + /* 计算文字初始坐标和尺寸 */ + $x = $minx; + $y = abs($miny); + $w = $maxx - $minx; + $h = $maxy - $miny; + /* 设定文字位置 */ + switch ($locate) { + /* 右下角文字 */ + case self::WATER_SOUTHEAST: + $x += $this->info['width'] - $w; + $y += $this->info['height'] - $h; + break; + /* 左下角文字 */ + case self::WATER_SOUTHWEST: + $y += $this->info['height'] - $h; + break; + /* 左上角文字 */ + case self::WATER_NORTHWEST: + // 起始坐标即为左上角坐标,无需调整 + break; + /* 右上角文字 */ + case self::WATER_NORTHEAST: + $x += $this->info['width'] - $w; + break; + /* 居中文字 */ + case self::WATER_CENTER: + $x += ($this->info['width'] - $w) / 2; + $y += ($this->info['height'] - $h) / 2; + break; + /* 下居中文字 */ + case self::WATER_SOUTH: + $x += ($this->info['width'] - $w) / 2; + $y += $this->info['height'] - $h; + break; + /* 右居中文字 */ + case self::WATER_EAST: + $x += $this->info['width'] - $w; + $y += ($this->info['height'] - $h) / 2; + break; + /* 上居中文字 */ + case self::WATER_NORTH: + $x += ($this->info['width'] - $w) / 2; + break; + /* 左居中文字 */ + case self::WATER_WEST: + $y += ($this->info['height'] - $h) / 2; + break; + default: + /* 自定义文字坐标 */ + if (is_array($locate)) { + list($posx, $posy) = $locate; + $x += $posx; + $y += $posy; + } else { + throw new ImageException('不支持的文字位置类型'); + } + } + /* 设置偏移量 */ + if (is_array($offset)) { + $offset = array_map('intval', $offset); + list($ox, $oy) = $offset; + } else { + $offset = intval($offset); + $ox = $oy = $offset; + } + /* 图片黑白检测 */ + if ($color == "auto") { + //X方向采集宽度:单英文字符占据宽度约为字体大小/1.6,单中文字符占据宽度约为字体大小*4/3;Y方向采集宽度:英文字符高度约为字体大小,中文会高一些。 + //使用保守宽度,以免在纯英文情况下采集区域超出图像范围,并且精度完全可以满足本功能。 + $pickX = intval(mb_strwidth($text) * ($size / 1.6)); + $pickY = $size; + + $brightness = 0; + for ($i = $x + $ox; $i < $pickX + $x + $ox; $i++) { //根据文字基线确定要进行遍历的像素 + for ($j = $y + $oy - $pickY; $j < $y + $oy; $j++) { //基线修正 + $brightness += self::getBrightnessOfPixel($i, $j); + } + } + + $color = $brightness / ($pickX * $pickY) > 127 ? '#00000000' : '#ffffffff'; + } + /* 设置颜色 */ + if (is_string($color) && 0 === strpos($color, '#')) { + $color = str_split(substr($color, 1), 2); + $color = array_map('hexdec', $color); + if (empty($color[3]) || $color[3] > 127) { + $color[3] = 0; + } + } elseif (!is_array($color)) { + throw new ImageException('错误的颜色值'); + } + do { + /* 写入文字 */ + $col = imagecolorallocatealpha($this->im, $color[0], $color[1], $color[2], $color[3]); + imagettftext($this->im, $size, $angle, $x + $ox, $y + $oy, $col, $font, $text); + } while (!empty($this->gif) && $this->gifNext()); + return $this; + } + + /** + * 获取图片指定像素点的亮度值 + */ + private function getBrightnessOfPixel($x, $y) + { + $rgb = imagecolorat($this->im, $x, $y); + $r = ($rgb >> 16) & 0xFF; + $g = ($rgb >> 8) & 0xFF; + $b = $rgb & 0xFF; + + //红绿蓝能量不同,亮度不同,对应系数也不同(参考https://www.w3.org/TR/AERT/#color-contrast) + $brightness = intval($r * 0.299 + $g * 0.587 + $b * 0.114); + + return $brightness; + } + + /** + * 切换到GIF的下一帧并保存当前帧 + */ + protected function gifNext() + { + ob_start(); + ob_implicit_flush(0); + imagegif($this->im); + $img = ob_get_clean(); + $this->gif->image($img); + $next = $this->gif->nextImage(); + if ($next) { + imagedestroy($this->im); + $this->im = imagecreatefromstring($next); + return $next; + } else { + imagedestroy($this->im); + $this->im = imagecreatefromstring($this->gif->image()); + return false; + } + } + + /** + * 析构方法,用于销毁图像资源 + */ + public function __destruct() + { + empty($this->im) || imagedestroy($this->im); + } + +} diff --git a/thinkphp/library/think/Lang.php b/thinkphp/library/think/Lang.php new file mode 100755 index 0000000..be7979f --- /dev/null +++ b/thinkphp/library/think/Lang.php @@ -0,0 +1,284 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class Lang +{ + /** + * 多语言信息 + * @var array + */ + private $lang = []; + + /** + * 当前语言 + * @var string + */ + private $range = 'zh-cn'; + + /** + * 多语言自动侦测变量名 + * @var string + */ + protected $langDetectVar = 'lang'; + + /** + * 多语言cookie变量 + * @var string + */ + protected $langCookieVar = 'think_var'; + + /** + * 允许的多语言列表 + * @var array + */ + protected $allowLangList = []; + + /** + * Accept-Language转义为对应语言包名称 系统默认配置 + * @var string + */ + protected $acceptLanguage = [ + 'zh-hans-cn' => 'zh-cn', + ]; + + /** + * 应用对象 + * @var App + */ + protected $app; + + public function __construct(App $app) + { + $this->app = $app; + } + + // 设定当前的语言 + public function range($range = '') + { + if ('' == $range) { + return $this->range; + } else { + $this->range = $range; + } + } + + /** + * 设置语言定义(不区分大小写) + * @access public + * @param string|array $name 语言变量 + * @param string $value 语言值 + * @param string $range 语言作用域 + * @return mixed + */ + public function set($name, $value = null, $range = '') + { + $range = $range ?: $this->range; + // 批量定义 + if (!isset($this->lang[$range])) { + $this->lang[$range] = []; + } + + if (is_array($name)) { + return $this->lang[$range] = array_change_key_case($name) + $this->lang[$range]; + } + + return $this->lang[$range][strtolower($name)] = $value; + } + + /** + * 加载语言定义(不区分大小写) + * @access public + * @param string|array $file 语言文件 + * @param string $range 语言作用域 + * @return array + */ + public function load($file, $range = '') + { + $range = $range ?: $this->range; + if (!isset($this->lang[$range])) { + $this->lang[$range] = []; + } + + // 批量定义 + if (is_string($file)) { + $file = [$file]; + } + + $lang = []; + + foreach ($file as $_file) { + if (is_file($_file)) { + // 记录加载信息 + $this->app->log('[ LANG ] ' . $_file); + $_lang = include $_file; + if (is_array($_lang)) { + $lang = array_change_key_case($_lang) + $lang; + } + } + } + + if (!empty($lang)) { + $this->lang[$range] = $lang + $this->lang[$range]; + } + + return $this->lang[$range]; + } + + /** + * 获取语言定义(不区分大小写) + * @access public + * @param string|null $name 语言变量 + * @param string $range 语言作用域 + * @return bool + */ + public function has($name, $range = '') + { + $range = $range ?: $this->range; + + return isset($this->lang[$range][strtolower($name)]); + } + + /** + * 获取语言定义(不区分大小写) + * @access public + * @param string|null $name 语言变量 + * @param array $vars 变量替换 + * @param string $range 语言作用域 + * @return mixed + */ + public function get($name = null, $vars = [], $range = '') + { + $range = $range ?: $this->range; + + // 空参数返回所有定义 + if (is_null($name)) { + return $this->lang[$range]; + } + + $key = strtolower($name); + $value = isset($this->lang[$range][$key]) ? $this->lang[$range][$key] : $name; + + // 变量解析 + if (!empty($vars) && is_array($vars)) { + /** + * Notes: + * 为了检测的方便,数字索引的判断仅仅是参数数组的第一个元素的key为数字0 + * 数字索引采用的是系统的 sprintf 函数替换,用法请参考 sprintf 函数 + */ + if (key($vars) === 0) { + // 数字索引解析 + array_unshift($vars, $value); + $value = call_user_func_array('sprintf', $vars); + } else { + // 关联索引解析 + $replace = array_keys($vars); + foreach ($replace as &$v) { + $v = "{:{$v}}"; + } + $value = str_replace($replace, $vars, $value); + } + } + + return $value; + } + + /** + * 自动侦测设置获取语言选择 + * @access public + * @return string + */ + public function detect() + { + // 自动侦测设置获取语言选择 + $langSet = ''; + + if (isset($_GET[$this->langDetectVar])) { + // url中设置了语言变量 + $langSet = strtolower($_GET[$this->langDetectVar]); + } elseif (isset($_COOKIE[$this->langCookieVar])) { + // Cookie中设置了语言变量 + $langSet = strtolower($_COOKIE[$this->langCookieVar]); + } elseif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { + // 自动侦测浏览器语言 + preg_match('/^([a-z\d\-]+)/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $matches); + $langSet = strtolower($matches[1]); + if (isset($this->acceptLanguage[$langSet])) { + $langSet = $this->acceptLanguage[$langSet]; + } + } + + if (empty($this->allowLangList) || in_array($langSet, $this->allowLangList)) { + // 合法的语言 + $this->range = $langSet ?: $this->range; + } + + return $this->range; + } + + /** + * 设置当前语言到Cookie + * @access public + * @param string $lang 语言 + * @return void + */ + public function saveToCookie($lang = null) + { + $range = $lang ?: $this->range; + + $_COOKIE[$this->langCookieVar] = $range; + } + + /** + * 设置语言自动侦测的变量 + * @access public + * @param string $var 变量名称 + * @return void + */ + public function setLangDetectVar($var) + { + $this->langDetectVar = $var; + } + + /** + * 设置语言的cookie保存变量 + * @access public + * @param string $var 变量名称 + * @return void + */ + public function setLangCookieVar($var) + { + $this->langCookieVar = $var; + } + + /** + * 设置允许的语言列表 + * @access public + * @param array $list 语言列表 + * @return void + */ + public function setAllowLangList(array $list) + { + $this->allowLangList = $list; + } + + /** + * 设置转义的语言列表 + * @access public + * @param array $list 语言列表 + * @return void + */ + public function setAcceptLanguage(array $list) + { + $this->acceptLanguage = array_merge($this->acceptLanguage, $list); + } +} diff --git a/thinkphp/library/think/Loader.php b/thinkphp/library/think/Loader.php new file mode 100755 index 0000000..d807db6 --- /dev/null +++ b/thinkphp/library/think/Loader.php @@ -0,0 +1,417 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\exception\ClassNotFoundException; + +class Loader +{ + /** + * 类名映射信息 + * @var array + */ + protected static $classMap = []; + + /** + * 类库别名 + * @var array + */ + protected static $classAlias = []; + + /** + * PSR-4 + * @var array + */ + private static $prefixLengthsPsr4 = []; + private static $prefixDirsPsr4 = []; + private static $fallbackDirsPsr4 = []; + + /** + * PSR-0 + * @var array + */ + private static $prefixesPsr0 = []; + private static $fallbackDirsPsr0 = []; + + /** + * 需要加载的文件 + * @var array + */ + private static $files = []; + + /** + * Composer安装路径 + * @var string + */ + private static $composerPath; + + // 获取应用根目录 + public static function getRootPath() + { + if ('cli' == PHP_SAPI) { + $scriptName = realpath($_SERVER['argv'][0]); + } else { + $scriptName = $_SERVER['SCRIPT_FILENAME']; + } + + $path = realpath(dirname($scriptName)); + + if (!is_file($path . DIRECTORY_SEPARATOR . 'think')) { + $path = dirname($path); + } + + return $path . DIRECTORY_SEPARATOR; + } + + // 注册自动加载机制 + public static function register($autoload = '') + { + // 注册系统自动加载 + spl_autoload_register($autoload ?: 'think\\Loader::autoload', true, true); + + $rootPath = self::getRootPath(); + + self::$composerPath = $rootPath . 'vendor' . DIRECTORY_SEPARATOR . 'composer' . DIRECTORY_SEPARATOR; + + // Composer自动加载支持 + if (is_dir(self::$composerPath)) { + if (is_file(self::$composerPath . 'autoload_static.php')) { + require self::$composerPath . 'autoload_static.php'; + + $declaredClass = get_declared_classes(); + $composerClass = array_pop($declaredClass); + + foreach (['prefixLengthsPsr4', 'prefixDirsPsr4', 'fallbackDirsPsr4', 'prefixesPsr0', 'fallbackDirsPsr0', 'classMap', 'files'] as $attr) { + if (property_exists($composerClass, $attr)) { + self::${$attr} = $composerClass::${$attr}; + } + } + } else { + self::registerComposerLoader(self::$composerPath); + } + } + + // 注册命名空间定义 + self::addNamespace([ + 'think' => __DIR__, + 'traits' => dirname(__DIR__) . DIRECTORY_SEPARATOR . 'traits', + ]); + + // 加载类库映射文件 + if (is_file($rootPath . 'runtime' . DIRECTORY_SEPARATOR . 'classmap.php')) { + self::addClassMap(__include_file($rootPath . 'runtime' . DIRECTORY_SEPARATOR . 'classmap.php')); + } + + // 自动加载extend目录 + self::addAutoLoadDir($rootPath . 'extend'); + } + + // 自动加载 + public static function autoload($class) + { + if (isset(self::$classAlias[$class])) { + return class_alias(self::$classAlias[$class], $class); + } + + if ($file = self::findFile($class)) { + + // Win环境严格区分大小写 + if (strpos(PHP_OS, 'WIN') !== false && pathinfo($file, PATHINFO_FILENAME) != pathinfo(realpath($file), PATHINFO_FILENAME)) { + return false; + } + + __include_file($file); + return true; + } + } + + /** + * 查找文件 + * @access private + * @param string $class + * @return string|false + */ + private static function findFile($class) + { + if (!empty(self::$classMap[$class])) { + // 类库映射 + return self::$classMap[$class]; + } + + // 查找 PSR-4 + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . '.php'; + + $first = $class[0]; + if (isset(self::$prefixLengthsPsr4[$first])) { + foreach (self::$prefixLengthsPsr4[$first] as $prefix => $length) { + if (0 === strpos($class, $prefix)) { + foreach (self::$prefixDirsPsr4[$prefix] as $dir) { + if (is_file($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) { + return $file; + } + } + } + } + } + + // 查找 PSR-4 fallback dirs + foreach (self::$fallbackDirsPsr4 as $dir) { + if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // 查找 PSR-0 + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . '.php'; + } + + if (isset(self::$prefixesPsr0[$first])) { + foreach (self::$prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // 查找 PSR-0 fallback dirs + foreach (self::$fallbackDirsPsr0 as $dir) { + if (is_file($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + return self::$classMap[$class] = false; + } + + // 注册classmap + public static function addClassMap($class, $map = '') + { + if (is_array($class)) { + self::$classMap = array_merge(self::$classMap, $class); + } else { + self::$classMap[$class] = $map; + } + } + + // 注册命名空间 + public static function addNamespace($namespace, $path = '') + { + if (is_array($namespace)) { + foreach ($namespace as $prefix => $paths) { + self::addPsr4($prefix . '\\', rtrim($paths, DIRECTORY_SEPARATOR), true); + } + } else { + self::addPsr4($namespace . '\\', rtrim($path, DIRECTORY_SEPARATOR), true); + } + } + + // 添加Ps0空间 + private static function addPsr0($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + self::$fallbackDirsPsr0 = array_merge( + (array) $paths, + self::$fallbackDirsPsr0 + ); + } else { + self::$fallbackDirsPsr0 = array_merge( + self::$fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset(self::$prefixesPsr0[$first][$prefix])) { + self::$prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + + if ($prepend) { + self::$prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + self::$prefixesPsr0[$first][$prefix] + ); + } else { + self::$prefixesPsr0[$first][$prefix] = array_merge( + self::$prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + // 添加Psr4空间 + private static function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + self::$fallbackDirsPsr4 = array_merge( + (array) $paths, + self::$fallbackDirsPsr4 + ); + } else { + self::$fallbackDirsPsr4 = array_merge( + self::$fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset(self::$prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + + self::$prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + self::$prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + self::$prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + self::$prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + self::$prefixDirsPsr4[$prefix] = array_merge( + self::$prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + // 注册自动加载类库目录 + public static function addAutoLoadDir($path) + { + self::$fallbackDirsPsr4[] = $path; + } + + // 注册类别名 + public static function addClassAlias($alias, $class = null) + { + if (is_array($alias)) { + self::$classAlias = array_merge(self::$classAlias, $alias); + } else { + self::$classAlias[$alias] = $class; + } + } + + // 注册composer自动加载 + public static function registerComposerLoader($composerPath) + { + if (is_file($composerPath . 'autoload_namespaces.php')) { + $map = require $composerPath . 'autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + self::addPsr0($namespace, $path); + } + } + + if (is_file($composerPath . 'autoload_psr4.php')) { + $map = require $composerPath . 'autoload_psr4.php'; + foreach ($map as $namespace => $path) { + self::addPsr4($namespace, $path); + } + } + + if (is_file($composerPath . 'autoload_classmap.php')) { + $classMap = require $composerPath . 'autoload_classmap.php'; + if ($classMap) { + self::addClassMap($classMap); + } + } + + if (is_file($composerPath . 'autoload_files.php')) { + self::$files = require $composerPath . 'autoload_files.php'; + } + } + + // 加载composer autofile文件 + public static function loadComposerAutoloadFiles() + { + foreach (self::$files as $fileIdentifier => $file) { + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + __require_file($file); + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } + } + } + + /** + * 字符串命名风格转换 + * type 0 将Java风格转换为C的风格 1 将C风格转换为Java的风格 + * @access public + * @param string $name 字符串 + * @param integer $type 转换类型 + * @param bool $ucfirst 首字母是否大写(驼峰规则) + * @return string + */ + public static function parseName($name, $type = 0, $ucfirst = true) + { + if ($type) { + $name = preg_replace_callback('/_([a-zA-Z])/', function ($match) { + return strtoupper($match[1]); + }, $name); + return $ucfirst ? ucfirst($name) : lcfirst($name); + } + + return strtolower(trim(preg_replace("/[A-Z]/", "_\\0", $name), "_")); + } + + /** + * 创建工厂对象实例 + * @access public + * @param string $name 工厂类名 + * @param string $namespace 默认命名空间 + * @return mixed + */ + public static function factory($name, $namespace = '', ...$args) + { + $class = false !== strpos($name, '\\') ? $name : $namespace . ucwords($name); + + if (class_exists($class)) { + return Container::getInstance()->invokeClass($class, $args); + } else { + throw new ClassNotFoundException('class not exists:' . $class, $class); + } + } +} + +/** + * 作用范围隔离 + * + * @param $file + * @return mixed + */ +function __include_file($file) +{ + return include $file; +} + +function __require_file($file) +{ + return require $file; +} diff --git a/thinkphp/library/think/Log.php b/thinkphp/library/think/Log.php new file mode 100755 index 0000000..8902e97 --- /dev/null +++ b/thinkphp/library/think/Log.php @@ -0,0 +1,389 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class Log implements LoggerInterface +{ + const EMERGENCY = 'emergency'; + const ALERT = 'alert'; + const CRITICAL = 'critical'; + const ERROR = 'error'; + const WARNING = 'warning'; + const NOTICE = 'notice'; + const INFO = 'info'; + const DEBUG = 'debug'; + const SQL = 'sql'; + + /** + * 日志信息 + * @var array + */ + protected $log = []; + + /** + * 配置参数 + * @var array + */ + protected $config = []; + + /** + * 日志写入驱动 + * @var object + */ + protected $driver; + + /** + * 日志授权key + * @var string + */ + protected $key; + + /** + * 是否允许日志写入 + * @var bool + */ + protected $allowWrite = true; + + /** + * 应用对象 + * @var App + */ + protected $app; + + public function __construct(App $app) + { + $this->app = $app; + } + + public static function __make(App $app, Config $config) + { + return (new static($app))->init($config->pull('log')); + } + + /** + * 日志初始化 + * @access public + * @param array $config + * @return $this + */ + public function init($config = []) + { + $type = isset($config['type']) ? $config['type'] : 'File'; + + $this->config = $config; + + unset($config['type']); + + if (!empty($config['close'])) { + $this->allowWrite = false; + } + + $this->driver = Loader::factory($type, '\\think\\log\\driver\\', $config); + + return $this; + } + + /** + * 获取日志信息 + * @access public + * @param string $type 信息类型 + * @return array + */ + public function getLog($type = '') + { + return $type ? $this->log[$type] : $this->log; + } + + /** + * 记录日志信息 + * @access public + * @param mixed $msg 日志信息 + * @param string $type 日志级别 + * @param array $context 替换内容 + * @return $this + */ + public function record($msg, $type = 'info', array $context = []) + { + if (!$this->allowWrite) { + return; + } + + if (is_string($msg) && !empty($context)) { + $replace = []; + foreach ($context as $key => $val) { + $replace['{' . $key . '}'] = $val; + } + + $msg = strtr($msg, $replace); + } + + if (PHP_SAPI == 'cli') { + if (empty($this->config['level']) || in_array($type, $this->config['level'])) { + // 命令行日志实时写入 + $this->write($msg, $type, true); + } + } else { + $this->log[$type][] = $msg; + } + + return $this; + } + + /** + * 清空日志信息 + * @access public + * @return $this + */ + public function clear() + { + $this->log = []; + + return $this; + } + + /** + * 当前日志记录的授权key + * @access public + * @param string $key 授权key + * @return $this + */ + public function key($key) + { + $this->key = $key; + + return $this; + } + + /** + * 检查日志写入权限 + * @access public + * @param array $config 当前日志配置参数 + * @return bool + */ + public function check($config) + { + if ($this->key && !empty($config['allow_key']) && !in_array($this->key, $config['allow_key'])) { + return false; + } + + return true; + } + + /** + * 关闭本次请求日志写入 + * @access public + * @return $this + */ + public function close() + { + $this->allowWrite = false; + $this->log = []; + + return $this; + } + + /** + * 保存调试信息 + * @access public + * @return bool + */ + public function save() + { + if (empty($this->log) || !$this->allowWrite) { + return true; + } + + if (!$this->check($this->config)) { + // 检测日志写入权限 + return false; + } + + $log = []; + + foreach ($this->log as $level => $info) { + if (!$this->app->isDebug() && 'debug' == $level) { + continue; + } + + if (empty($this->config['level']) || in_array($level, $this->config['level'])) { + $log[$level] = $info; + + $this->app['hook']->listen('log_level', [$level, $info]); + } + } + + $result = $this->driver->save($log, true); + + if ($result) { + $this->log = []; + } + + return $result; + } + + /** + * 实时写入日志信息 并支持行为 + * @access public + * @param mixed $msg 调试信息 + * @param string $type 日志级别 + * @param bool $force 是否强制写入 + * @return bool + */ + public function write($msg, $type = 'info', $force = false) + { + // 封装日志信息 + if (empty($this->config['level'])) { + $force = true; + } + + if (true === $force || in_array($type, $this->config['level'])) { + $log[$type][] = $msg; + } else { + return false; + } + + // 监听log_write + $this->app['hook']->listen('log_write', $log); + + // 写入日志 + return $this->driver->save($log, false); + } + + /** + * 记录日志信息 + * @access public + * @param string $level 日志级别 + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function log($level, $message, array $context = []) + { + $this->record($message, $level, $context); + } + + /** + * 记录emergency信息 + * @access public + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function emergency($message, array $context = []) + { + $this->log(__FUNCTION__, $message, $context); + } + + /** + * 记录警报信息 + * @access public + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function alert($message, array $context = []) + { + $this->log(__FUNCTION__, $message, $context); + } + + /** + * 记录紧急情况 + * @access public + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function critical($message, array $context = []) + { + $this->log(__FUNCTION__, $message, $context); + } + + /** + * 记录错误信息 + * @access public + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function error($message, array $context = []) + { + $this->log(__FUNCTION__, $message, $context); + } + + /** + * 记录warning信息 + * @access public + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function warning($message, array $context = []) + { + $this->log(__FUNCTION__, $message, $context); + } + + /** + * 记录notice信息 + * @access public + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function notice($message, array $context = []) + { + $this->log(__FUNCTION__, $message, $context); + } + + /** + * 记录一般信息 + * @access public + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function info($message, array $context = []) + { + $this->log(__FUNCTION__, $message, $context); + } + + /** + * 记录调试信息 + * @access public + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function debug($message, array $context = []) + { + $this->log(__FUNCTION__, $message, $context); + } + + /** + * 记录sql信息 + * @access public + * @param mixed $message 日志信息 + * @param array $context 替换内容 + * @return void + */ + public function sql($message, array $context = []) + { + $this->log(__FUNCTION__, $message, $context); + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app']); + + return $data; + } +} diff --git a/thinkphp/library/think/Middleware.php b/thinkphp/library/think/Middleware.php new file mode 100755 index 0000000..d3f4360 --- /dev/null +++ b/thinkphp/library/think/Middleware.php @@ -0,0 +1,205 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use InvalidArgumentException; +use LogicException; +use think\exception\HttpResponseException; + +class Middleware +{ + protected $queue = []; + protected $app; + protected $config = [ + 'default_namespace' => 'app\\http\\middleware\\', + ]; + + public function __construct(App $app, array $config = []) + { + $this->app = $app; + $this->config = array_merge($this->config, $config); + } + + public static function __make(App $app, Config $config) + { + return new static($app, $config->pull('middleware')); + } + + public function setConfig(array $config) + { + $this->config = array_merge($this->config, $config); + } + + /** + * 导入中间件 + * @access public + * @param array $middlewares + * @param string $type 中间件类型 + */ + public function import(array $middlewares = [], $type = 'route') + { + foreach ($middlewares as $middleware) { + $this->add($middleware, $type); + } + } + + /** + * 注册中间件 + * @access public + * @param mixed $middleware + * @param string $type 中间件类型 + */ + public function add($middleware, $type = 'route') + { + if (is_null($middleware)) { + return; + } + + $middleware = $this->buildMiddleware($middleware, $type); + + if ($middleware) { + $this->queue[$type][] = $middleware; + } + } + + /** + * 注册控制器中间件 + * @access public + * @param mixed $middleware + */ + public function controller($middleware) + { + return $this->add($middleware, 'controller'); + } + + /** + * 移除中间件 + * @access public + * @param mixed $middleware + * @param string $type 中间件类型 + */ + public function unshift($middleware, $type = 'route') + { + if (is_null($middleware)) { + return; + } + + $middleware = $this->buildMiddleware($middleware, $type); + + if ($middleware) { + array_unshift($this->queue[$type], $middleware); + } + } + + /** + * 获取注册的中间件 + * @access public + * @param string $type 中间件类型 + */ + public function all($type = 'route') + { + return $this->queue[$type] ?: []; + } + + /** + * 清除中间件 + * @access public + */ + public function clear() + { + $this->queue = []; + } + + /** + * 中间件调度 + * @access public + * @param Request $request + * @param string $type 中间件类型 + */ + public function dispatch(Request $request, $type = 'route') + { + return call_user_func($this->resolve($type), $request); + } + + /** + * 解析中间件 + * @access protected + * @param mixed $middleware + * @param string $type 中间件类型 + */ + protected function buildMiddleware($middleware, $type = 'route') + { + if (is_array($middleware)) { + list($middleware, $param) = $middleware; + } + + if ($middleware instanceof \Closure) { + return [$middleware, isset($param) ? $param : null]; + } + + if (!is_string($middleware)) { + throw new InvalidArgumentException('The middleware is invalid'); + } + + if (false === strpos($middleware, '\\')) { + if (isset($this->config[$middleware])) { + $middleware = $this->config[$middleware]; + } else { + $middleware = $this->config['default_namespace'] . $middleware; + } + } + + if (is_array($middleware)) { + return $this->import($middleware, $type); + } + + if (strpos($middleware, ':')) { + list($middleware, $param) = explode(':', $middleware, 2); + } + + return [[$this->app->make($middleware), 'handle'], isset($param) ? $param : null]; + } + + protected function resolve($type = 'route') + { + return function (Request $request) use ($type) { + + $middleware = array_shift($this->queue[$type]); + + if (null === $middleware) { + throw new InvalidArgumentException('The queue was exhausted, with no response returned'); + } + + list($call, $param) = $middleware; + + try { + $response = call_user_func_array($call, [$request, $this->resolve($type), $param]); + } catch (HttpResponseException $exception) { + $response = $exception->getResponse(); + } + + if (!$response instanceof Response) { + throw new LogicException('The middleware must return Response instance'); + } + + return $response; + }; + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app']); + + return $data; + } +} diff --git a/thinkphp/library/think/Model.php b/thinkphp/library/think/Model.php new file mode 100755 index 0000000..65e543d --- /dev/null +++ b/thinkphp/library/think/Model.php @@ -0,0 +1,1109 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use InvalidArgumentException; +use think\db\Query; + +/** + * Class Model + * @package think + * @mixin Query + * @method Query where(mixed $field, string $op = null, mixed $condition = null) static 查询条件 + * @method Query whereRaw(string $where, array $bind = []) static 表达式查询 + * @method Query whereExp(string $field, string $condition, array $bind = []) static 字段表达式查询 + * @method Query when(mixed $condition, mixed $query, mixed $otherwise = null) static 条件查询 + * @method Query join(mixed $join, mixed $condition = null, string $type = 'INNER') static JOIN查询 + * @method Query view(mixed $join, mixed $field = null, mixed $on = null, string $type = 'INNER') static 视图查询 + * @method Query with(mixed $with) static 关联预载入 + * @method Query count(string $field) static Count统计查询 + * @method Query min(string $field) static Min统计查询 + * @method Query max(string $field) static Max统计查询 + * @method Query sum(string $field) static SUM统计查询 + * @method Query avg(string $field) static Avg统计查询 + * @method Query field(mixed $field, boolean $except = false) static 指定查询字段 + * @method Query fieldRaw(string $field, array $bind = []) static 指定查询字段 + * @method Query union(mixed $union, boolean $all = false) static UNION查询 + * @method Query limit(mixed $offset, integer $length = null) static 查询LIMIT + * @method Query order(mixed $field, string $order = null) static 查询ORDER + * @method Query orderRaw(string $field, array $bind = []) static 查询ORDER + * @method Query cache(mixed $key = null , integer $expire = null) static 设置查询缓存 + * @method mixed value(string $field) static 获取某个字段的值 + * @method array column(string $field, string $key = '') static 获取某个列的值 + * @method mixed find(mixed $data = null) static 查询单个记录 + * @method mixed select(mixed $data = null) static 查询多个记录 + * @method mixed get(mixed $data = null,mixed $with =[],bool $cache= false) static 查询单个记录 支持关联预载入 + * @method mixed getOrFail(mixed $data = null,mixed $with =[],bool $cache= false) static 查询单个记录 不存在则抛出异常 + * @method mixed findOrEmpty(mixed $data = null,mixed $with =[],bool $cache= false) static 查询单个记录 不存在则返回空模型 + * @method mixed all(mixed $data = null,mixed $with =[],bool $cache= false) static 查询多个记录 支持关联预载入 + * @method \think\Model withAttr(array $name,\Closure $closure) 动态定义获取器 + */ +abstract class Model implements \JsonSerializable, \ArrayAccess +{ + use model\concern\Attribute; + use model\concern\RelationShip; + use model\concern\ModelEvent; + use model\concern\TimeStamp; + use model\concern\Conversion; + + /** + * 是否存在数据 + * @var bool + */ + private $exists = false; + + /** + * 是否Replace + * @var bool + */ + private $replace = false; + + /** + * 是否强制更新所有数据 + * @var bool + */ + private $force = false; + + /** + * 更新条件 + * @var array + */ + private $updateWhere; + + /** + * 数据库配置信息 + * @var array|string + */ + protected $connection = []; + + /** + * 数据库查询对象类名 + * @var string + */ + protected $query; + + /** + * 模型名称 + * @var string + */ + protected $name; + + /** + * 数据表名称 + * @var string + */ + protected $table; + + /** + * 写入自动完成定义 + * @var array + */ + protected $auto = []; + + /** + * 新增自动完成定义 + * @var array + */ + protected $insert = []; + + /** + * 更新自动完成定义 + * @var array + */ + protected $update = []; + + /** + * 初始化过的模型. + * @var array + */ + protected static $initialized = []; + + /** + * 是否从主库读取(主从分布式有效) + * @var array + */ + protected static $readMaster; + + /** + * 查询对象实例 + * @var Query + */ + protected $queryInstance; + + /** + * 错误信息 + * @var mixed + */ + protected $error; + + /** + * 软删除字段默认值 + * @var mixed + */ + protected $defaultSoftDelete; + + /** + * 全局查询范围 + * @var array + */ + protected $globalScope = []; + + /** + * 架构函数 + * @access public + * @param array|object $data 数据 + */ + public function __construct($data = []) + { + if (is_object($data)) { + $this->data = get_object_vars($data); + } else { + $this->data = $data; + } + + if ($this->disuse) { + // 废弃字段 + foreach ((array) $this->disuse as $key) { + if (array_key_exists($key, $this->data)) { + unset($this->data[$key]); + } + } + } + + // 记录原始数据 + $this->origin = $this->data; + + $config = Db::getConfig(); + + if (empty($this->name)) { + // 当前模型名 + $name = str_replace('\\', '/', static::class); + $this->name = basename($name); + if (Container::get('config')->get('class_suffix')) { + $suffix = basename(dirname($name)); + $this->name = substr($this->name, 0, -strlen($suffix)); + } + } + + if (is_null($this->autoWriteTimestamp)) { + // 自动写入时间戳 + $this->autoWriteTimestamp = $config['auto_timestamp']; + } + + if (is_null($this->dateFormat)) { + // 设置时间戳格式 + $this->dateFormat = $config['datetime_format']; + } + + if (is_null($this->resultSetType)) { + $this->resultSetType = $config['resultset_type']; + } + + if (!empty($this->connection) && is_array($this->connection)) { + // 设置模型的数据库连接 + $this->connection = array_merge($config, $this->connection); + } + + if ($this->observerClass) { + // 注册模型观察者 + static::observe($this->observerClass); + } + + // 执行初始化操作 + $this->initialize(); + } + + /** + * 获取当前模型名称 + * @access public + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 是否从主库读取数据(主从分布有效) + * @access public + * @param bool $all 是否所有模型有效 + * @return $this + */ + public function readMaster($all = false) + { + $model = $all ? '*' : static::class; + + static::$readMaster[$model] = true; + + return $this; + } + + /** + * 创建新的模型实例 + * @access public + * @param array|object $data 数据 + * @param bool $isUpdate 是否为更新 + * @param mixed $where 更新条件 + * @return Model + */ + public function newInstance($data = [], $isUpdate = false, $where = null) + { + return (new static($data))->isUpdate($isUpdate, $where); + } + + /** + * 创建模型的查询对象 + * @access protected + * @return Query + */ + protected function buildQuery() + { + // 设置当前模型 确保查询返回模型对象 + $query = Db::connect($this->connection, false, $this->query); + $query->model($this) + ->name($this->name) + ->json($this->json, $this->jsonAssoc) + ->setJsonFieldType($this->jsonType); + + if (isset(static::$readMaster['*']) || isset(static::$readMaster[static::class])) { + $query->master(true); + } + + // 设置当前数据表和模型名 + if (!empty($this->table)) { + $query->table($this->table); + } + + if (!empty($this->pk)) { + $query->pk($this->pk); + } + + return $query; + } + + /** + * 获取当前模型的数据库查询对象 + * @access public + * @param Query $query 查询对象实例 + * @return $this + */ + public function setQuery($query) + { + $this->queryInstance = $query; + return $this; + } + + /** + * 获取当前模型的数据库查询对象 + * @access public + * @param bool|array $useBaseQuery 是否调用全局查询范围(或者指定查询范围名称) + * @return Query + */ + public function db($useBaseQuery = true) + { + if ($this->queryInstance) { + return $this->queryInstance; + } + + $query = $this->buildQuery(); + + // 软删除 + if (property_exists($this, 'withTrashed') && !$this->withTrashed) { + $this->withNoTrashed($query); + } + + // 全局作用域 + if (true === $useBaseQuery && method_exists($this, 'base')) { + call_user_func_array([$this, 'base'], [ & $query]); + } + + $globalScope = is_array($useBaseQuery) && $useBaseQuery ? $useBaseQuery : $this->globalScope; + + if ($globalScope && false !== $useBaseQuery) { + $query->scope($globalScope); + } + + // 返回当前模型的数据库查询对象 + return $query; + } + + /** + * 初始化模型 + * @access protected + * @return void + */ + protected function initialize() + { + if (!isset(static::$initialized[static::class])) { + static::$initialized[static::class] = true; + static::init(); + } + } + + /** + * 初始化处理 + * @access protected + * @return void + */ + protected static function init() + {} + + /** + * 数据自动完成 + * @access protected + * @param array $auto 要自动更新的字段列表 + * @return void + */ + protected function autoCompleteData($auto = []) + { + foreach ($auto as $field => $value) { + if (is_integer($field)) { + $field = $value; + $value = null; + } + + if (!isset($this->data[$field])) { + $default = null; + } else { + $default = $this->data[$field]; + } + + $this->setAttr($field, !is_null($value) ? $value : $default); + } + } + + /** + * 更新是否强制写入数据 而不做比较 + * @access public + * @param bool $force + * @return $this + */ + public function force($force = true) + { + $this->force = $force; + return $this; + } + + /** + * 判断force + * @access public + * @return bool + */ + public function isForce() + { + return $this->force; + } + + /** + * 新增数据是否使用Replace + * @access public + * @param bool $replace + * @return $this + */ + public function replace($replace = true) + { + $this->replace = $replace; + return $this; + } + + /** + * 设置数据是否存在 + * @access public + * @param bool $exists + * @return $this + */ + public function exists($exists) + { + $this->exists = $exists; + return $this; + } + + /** + * 判断数据是否存在数据库 + * @access public + * @return bool + */ + public function isExists() + { + return $this->exists; + } + + /** + * 判断模型是否为空 + * @access public + * @return bool + */ + public function isEmpty() + { + return empty($this->data); + } + + /** + * 保存当前数据对象 + * @access public + * @param array $data 数据 + * @param array $where 更新条件 + * @param string $sequence 自增序列名 + * @return bool + */ + public function save($data = [], $where = [], $sequence = null) + { + if (is_string($data)) { + $sequence = $data; + $data = []; + } + + if (!$this->checkBeforeSave($data, $where)) { + return false; + } + + $result = $this->exists ? $this->updateData($where) : $this->insertData($sequence); + + if (false === $result) { + return false; + } + + // 写入回调 + $this->trigger('after_write'); + + // 重新记录原始数据 + $this->origin = $this->data; + $this->set = []; + + return true; + } + + /** + * 写入之前检查数据 + * @access protected + * @param array $data 数据 + * @param array $where 保存条件 + * @return bool + */ + protected function checkBeforeSave($data, $where) + { + if (!empty($data)) { + // 数据对象赋值 + foreach ($data as $key => $value) { + $this->setAttr($key, $value, $data); + } + + if (!empty($where)) { + $this->exists = true; + $this->updateWhere = $where; + } + } + + // 数据自动完成 + $this->autoCompleteData($this->auto); + + // 事件回调 + if (false === $this->trigger('before_write')) { + return false; + } + + return true; + } + + /** + * 检查数据是否允许写入 + * @access protected + * @param array $append 自动完成的字段列表 + * @return array + */ + protected function checkAllowFields(array $append = []) + { + // 检测字段 + if (empty($this->field) || true === $this->field) { + $query = $this->db(false); + $table = $this->table ?: $query->getTable(); + + $this->field = $query->getConnection()->getTableFields($table); + + $field = $this->field; + } else { + $field = array_merge($this->field, $append); + + if ($this->autoWriteTimestamp) { + array_push($field, $this->createTime, $this->updateTime); + } + } + + if ($this->disuse) { + // 废弃字段 + $field = array_diff($field, (array) $this->disuse); + } + + return $field; + } + + /** + * 更新写入数据 + * @access protected + * @param mixed $where 更新条件 + * @return bool + */ + protected function updateData($where) + { + // 自动更新 + $this->autoCompleteData($this->update); + + // 事件回调 + if (false === $this->trigger('before_update')) { + return false; + } + + // 获取有更新的数据 + $data = $this->getChangedData(); + + if (empty($data)) { + // 关联更新 + if (!empty($this->relationWrite)) { + $this->autoRelationUpdate(); + } + + return true; + } elseif ($this->autoWriteTimestamp && $this->updateTime && !isset($data[$this->updateTime])) { + // 自动写入更新时间 + $data[$this->updateTime] = $this->autoWriteTimestamp($this->updateTime); + + $this->data[$this->updateTime] = $data[$this->updateTime]; + } + + if (empty($where) && !empty($this->updateWhere)) { + $where = $this->updateWhere; + } + + // 检查允许字段 + $allowFields = $this->checkAllowFields(array_merge($this->auto, $this->update)); + + // 保留主键数据 + foreach ($this->data as $key => $val) { + if ($this->isPk($key)) { + $data[$key] = $val; + } + } + + $pk = $this->getPk(); + $array = []; + + foreach ((array) $pk as $key) { + if (isset($data[$key])) { + $array[] = [$key, '=', $data[$key]]; + unset($data[$key]); + } + } + + if (!empty($array)) { + $where = $array; + } + + foreach ((array) $this->relationWrite as $name => $val) { + if (is_array($val)) { + foreach ($val as $key) { + if (isset($data[$key])) { + unset($data[$key]); + } + } + } + } + + // 模型更新 + $db = $this->db(false); + $db->startTrans(); + + try { + $db->where($where) + ->strict(false) + ->field($allowFields) + ->update($data); + + // 关联更新 + if (!empty($this->relationWrite)) { + $this->autoRelationUpdate(); + } + + $db->commit(); + + // 更新回调 + $this->trigger('after_update'); + + return true; + } catch (\Exception $e) { + $db->rollback(); + throw $e; + } + } + + /** + * 新增写入数据 + * @access protected + * @param string $sequence 自增序列名 + * @return bool + */ + protected function insertData($sequence) + { + // 自动写入 + $this->autoCompleteData($this->insert); + + // 时间戳自动写入 + $this->checkTimeStampWrite(); + + if (false === $this->trigger('before_insert')) { + return false; + } + + // 检查允许字段 + $allowFields = $this->checkAllowFields(array_merge($this->auto, $this->insert)); + + $db = $this->db(false); + $db->startTrans(); + + try { + $result = $db->strict(false) + ->field($allowFields) + ->insert($this->data, $this->replace, false, $sequence); + + // 获取自动增长主键 + if ($result && $insertId = $db->getLastInsID($sequence)) { + $pk = $this->getPk(); + + foreach ((array) $pk as $key) { + if (!isset($this->data[$key]) || '' == $this->data[$key]) { + $this->data[$key] = $insertId; + } + } + } + + // 关联写入 + if (!empty($this->relationWrite)) { + $this->autoRelationInsert(); + } + + $db->commit(); + + // 标记为更新 + $this->exists = true; + + // 新增回调 + $this->trigger('after_insert'); + + return true; + } catch (\Exception $e) { + $db->rollback(); + throw $e; + } + } + + /** + * 字段值(延迟)增长 + * @access public + * @param string $field 字段名 + * @param integer $step 增长值 + * @param integer $lazyTime 延时时间(s) + * @return bool + * @throws Exception + */ + public function setInc($field, $step = 1, $lazyTime = 0) + { + // 读取更新条件 + $where = $this->getWhere(); + + // 事件回调 + if (false === $this->trigger('before_update')) { + return false; + } + + $result = $this->db(false) + ->where($where) + ->setInc($field, $step, $lazyTime); + + if (true !== $result) { + $this->data[$field] += $step; + } + + // 更新回调 + $this->trigger('after_update'); + + return true; + } + + /** + * 字段值(延迟)减少 + * @access public + * @param string $field 字段名 + * @param integer $step 减少值 + * @param integer $lazyTime 延时时间(s) + * @return bool + * @throws Exception + */ + public function setDec($field, $step = 1, $lazyTime = 0) + { + // 读取更新条件 + $where = $this->getWhere(); + + // 事件回调 + if (false === $this->trigger('before_update')) { + return false; + } + + $result = $this->db(false) + ->where($where) + ->setDec($field, $step, $lazyTime); + + if (true !== $result) { + $this->data[$field] -= $step; + } + + // 更新回调 + $this->trigger('after_update'); + + return true; + } + + /** + * 获取当前的更新条件 + * @access protected + * @return mixed + */ + protected function getWhere() + { + // 删除条件 + $pk = $this->getPk(); + + if (is_string($pk) && isset($this->data[$pk])) { + $where[] = [$pk, '=', $this->data[$pk]]; + } elseif (!empty($this->updateWhere)) { + $where = $this->updateWhere; + } else { + $where = null; + } + + return $where; + } + + /** + * 保存多个数据到当前数据对象 + * @access public + * @param array $dataSet 数据 + * @param boolean $replace 是否自动识别更新和写入 + * @return Collection + * @throws \Exception + */ + public function saveAll($dataSet, $replace = true) + { + $db = $this->db(false); + $db->startTrans(); + + try { + $pk = $this->getPk(); + + if (is_string($pk) && $replace) { + $auto = true; + } + + $result = []; + + foreach ($dataSet as $key => $data) { + if ($this->exists || (!empty($auto) && isset($data[$pk]))) { + $result[$key] = self::update($data, [], $this->field); + } else { + $result[$key] = self::create($data, $this->field, $this->replace); + } + } + + $db->commit(); + + return $this->toCollection($result); + } catch (\Exception $e) { + $db->rollback(); + throw $e; + } + } + + /** + * 是否为更新数据 + * @access public + * @param mixed $update + * @param mixed $where + * @return $this + */ + public function isUpdate($update = true, $where = null) + { + if (is_bool($update)) { + $this->exists = $update; + + if (!empty($where)) { + $this->updateWhere = $where; + } + } else { + $this->exists = true; + $this->updateWhere = $update; + } + + return $this; + } + + /** + * 删除当前的记录 + * @access public + * @return bool + */ + public function delete() + { + if (!$this->exists || false === $this->trigger('before_delete')) { + return false; + } + + // 读取更新条件 + $where = $this->getWhere(); + + $db = $this->db(false); + $db->startTrans(); + + try { + // 删除当前模型数据 + $db->where($where)->delete(); + + // 关联删除 + if (!empty($this->relationWrite)) { + $this->autoRelationDelete(); + } + + $db->commit(); + + $this->trigger('after_delete'); + + $this->exists = false; + + return true; + } catch (\Exception $e) { + $db->rollback(); + throw $e; + } + } + + /** + * 设置自动完成的字段( 规则通过修改器定义) + * @access public + * @param array $fields 需要自动完成的字段 + * @return $this + */ + public function auto($fields) + { + $this->auto = $fields; + + return $this; + } + + /** + * 写入数据 + * @access public + * @param array $data 数据数组 + * @param array|true $field 允许字段 + * @param bool $replace 使用Replace + * @return static + */ + public static function create($data = [], $field = null, $replace = false) + { + $model = new static(); + + if (!empty($field)) { + $model->allowField($field); + } + + $model->isUpdate(false)->replace($replace)->save($data, []); + + return $model; + } + + /** + * 更新数据 + * @access public + * @param array $data 数据数组 + * @param array $where 更新条件 + * @param array|true $field 允许字段 + * @return static + */ + public static function update($data = [], $where = [], $field = null) + { + $model = new static(); + + if (!empty($field)) { + $model->allowField($field); + } + + $model->isUpdate(true)->save($data, $where); + + return $model; + } + + /** + * 删除记录 + * @access public + * @param mixed $data 主键列表 支持闭包查询条件 + * @return bool + */ + public static function destroy($data) + { + if (empty($data) && 0 !== $data) { + return false; + } + + $model = new static(); + + $query = $model->db(); + + if (is_array($data) && key($data) !== 0) { + $query->where($data); + $data = null; + } elseif ($data instanceof \Closure) { + $data($query); + $data = null; + } + + $resultSet = $query->select($data); + + if ($resultSet) { + foreach ($resultSet as $data) { + $data->delete(); + } + } + + return true; + } + + /** + * 获取错误信息 + * @access public + * @return mixed + */ + public function getError() + { + return $this->error; + } + + /** + * 解序列化后处理 + */ + public function __wakeup() + { + $this->initialize(); + } + + public function __debugInfo() + { + return [ + 'data' => $this->data, + 'relation' => $this->relation, + ]; + } + + /** + * 修改器 设置数据对象的值 + * @access public + * @param string $name 名称 + * @param mixed $value 值 + * @return void + */ + public function __set($name, $value) + { + $this->setAttr($name, $value); + } + + /** + * 获取器 获取数据对象的值 + * @access public + * @param string $name 名称 + * @return mixed + */ + public function __get($name) + { + return $this->getAttr($name); + } + + /** + * 检测数据对象的值 + * @access public + * @param string $name 名称 + * @return boolean + */ + public function __isset($name) + { + try { + return !is_null($this->getAttr($name)); + } catch (InvalidArgumentException $e) { + return false; + } + } + + /** + * 销毁数据对象的值 + * @access public + * @param string $name 名称 + * @return void + */ + public function __unset($name) + { + unset($this->data[$name], $this->relation[$name]); + } + + // ArrayAccess + public function offsetSet($name, $value) + { + $this->setAttr($name, $value); + } + + public function offsetExists($name) + { + return $this->__isset($name); + } + + public function offsetUnset($name) + { + $this->__unset($name); + } + + public function offsetGet($name) + { + return $this->getAttr($name); + } + + /** + * 设置是否使用全局查询范围 + * @access public + * @param bool|array $use 是否启用全局查询范围(或者用数组指定查询范围名称) + * @return Query + */ + public static function useGlobalScope($use) + { + $model = new static(); + + return $model->db($use); + } + + public function __call($method, $args) + { + if ('withattr' == strtolower($method)) { + return call_user_func_array([$this, 'withAttribute'], $args); + } + + return call_user_func_array([$this->db(), $method], $args); + } + + public static function __callStatic($method, $args) + { + $model = new static(); + + return call_user_func_array([$model->db(), $method], $args); + } +} diff --git a/thinkphp/library/think/Paginator.php b/thinkphp/library/think/Paginator.php new file mode 100755 index 0000000..bbe63e2 --- /dev/null +++ b/thinkphp/library/think/Paginator.php @@ -0,0 +1,445 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use ArrayAccess; +use ArrayIterator; +use Countable; +use IteratorAggregate; +use JsonSerializable; +use Traversable; + +abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable +{ + /** + * 是否简洁模式 + * @var bool + */ + protected $simple = false; + + /** + * 数据集 + * @var Collection + */ + protected $items; + + /** + * 当前页 + * @var integer + */ + protected $currentPage; + + /** + * 最后一页 + * @var integer + */ + protected $lastPage; + + /** + * 数据总数 + * @var integer|null + */ + protected $total; + + /** + * 每页数量 + * @var integer + */ + protected $listRows; + + /** + * 是否有下一页 + * @var bool + */ + protected $hasMore; + + /** + * 分页配置 + * @var array + */ + protected $options = [ + 'var_page' => 'page', + 'path' => '/', + 'query' => [], + 'fragment' => '', + ]; + + public function __construct($items, $listRows, $currentPage = null, $total = null, $simple = false, $options = []) + { + $this->options = array_merge($this->options, $options); + + $this->options['path'] = '/' != $this->options['path'] ? rtrim($this->options['path'], '/') : $this->options['path']; + + $this->simple = $simple; + $this->listRows = $listRows; + + if (!$items instanceof Collection) { + $items = Collection::make($items); + } + + if ($simple) { + $this->currentPage = $this->setCurrentPage($currentPage); + $this->hasMore = count($items) > ($this->listRows); + $items = $items->slice(0, $this->listRows); + } else { + $this->total = $total; + $this->lastPage = (int) ceil($total / $listRows); + $this->currentPage = $this->setCurrentPage($currentPage); + $this->hasMore = $this->currentPage < $this->lastPage; + } + $this->items = $items; + } + + /** + * @access public + * @param $items + * @param $listRows + * @param null $currentPage + * @param null $total + * @param bool $simple + * @param array $options + * @return Paginator + */ + public static function make($items, $listRows, $currentPage = null, $total = null, $simple = false, $options = []) + { + return new static($items, $listRows, $currentPage, $total, $simple, $options); + } + + protected function setCurrentPage($currentPage) + { + if (!$this->simple && $currentPage > $this->lastPage) { + return $this->lastPage > 0 ? $this->lastPage : 1; + } + + return $currentPage; + } + + /** + * 获取页码对应的链接 + * + * @access protected + * @param $page + * @return string + */ + protected function url($page) + { + if ($page <= 0) { + $page = 1; + } + + if (strpos($this->options['path'], '[PAGE]') === false) { + $parameters = [$this->options['var_page'] => $page]; + $path = $this->options['path']; + } else { + $parameters = []; + $path = str_replace('[PAGE]', $page, $this->options['path']); + } + + if (count($this->options['query']) > 0) { + $parameters = array_merge($this->options['query'], $parameters); + } + + $url = $path; + if (!empty($parameters)) { + $url .= '?' . http_build_query($parameters, null, '&'); + } + + return $url . $this->buildFragment(); + } + + /** + * 自动获取当前页码 + * @access public + * @param string $varPage + * @param int $default + * @return int + */ + public static function getCurrentPage($varPage = 'page', $default = 1) + { + $page = Container::get('request')->param($varPage); + + if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) { + return $page; + } + + return $default; + } + + /** + * 自动获取当前的path + * @access public + * @return string + */ + public static function getCurrentPath() + { + return Container::get('request')->baseUrl(); + } + + public function total() + { + if ($this->simple) { + throw new \DomainException('not support total'); + } + + return $this->total; + } + + public function listRows() + { + return $this->listRows; + } + + public function currentPage() + { + return $this->currentPage; + } + + public function lastPage() + { + if ($this->simple) { + throw new \DomainException('not support last'); + } + + return $this->lastPage; + } + + /** + * 数据是否足够分页 + * @access public + * @return boolean + */ + public function hasPages() + { + return !(1 == $this->currentPage && !$this->hasMore); + } + + /** + * 创建一组分页链接 + * + * @access public + * @param int $start + * @param int $end + * @return array + */ + public function getUrlRange($start, $end) + { + $urls = []; + + for ($page = $start; $page <= $end; $page++) { + $urls[$page] = $this->url($page); + } + + return $urls; + } + + /** + * 设置URL锚点 + * + * @access public + * @param string|null $fragment + * @return $this + */ + public function fragment($fragment) + { + $this->options['fragment'] = $fragment; + + return $this; + } + + /** + * 添加URL参数 + * + * @access public + * @param array|string $key + * @param string|null $value + * @return $this + */ + public function appends($key, $value = null) + { + if (!is_array($key)) { + $queries = [$key => $value]; + } else { + $queries = $key; + } + + foreach ($queries as $k => $v) { + if ($k !== $this->options['var_page']) { + $this->options['query'][$k] = $v; + } + } + + return $this; + } + + /** + * 构造锚点字符串 + * + * @access public + * @return string + */ + protected function buildFragment() + { + return $this->options['fragment'] ? '#' . $this->options['fragment'] : ''; + } + + /** + * 渲染分页html + * @access public + * @return mixed + */ + abstract public function render(); + + public function items() + { + return $this->items->all(); + } + + public function getCollection() + { + return $this->items; + } + + public function isEmpty() + { + return $this->items->isEmpty(); + } + + /** + * 给每个元素执行个回调 + * + * @access public + * @param callable $callback + * @return $this + */ + public function each(callable $callback) + { + foreach ($this->items as $key => $item) { + $result = $callback($item, $key); + + if (false === $result) { + break; + } elseif (!is_object($item)) { + $this->items[$key] = $result; + } + } + + return $this; + } + + /** + * Retrieve an external iterator + * @access public + * @return Traversable An instance of an object implementing Iterator or + * Traversable + */ + public function getIterator() + { + return new ArrayIterator($this->items->all()); + } + + /** + * Whether a offset exists + * @access public + * @param mixed $offset + * @return bool + */ + public function offsetExists($offset) + { + return $this->items->offsetExists($offset); + } + + /** + * Offset to retrieve + * @access public + * @param mixed $offset + * @return mixed + */ + public function offsetGet($offset) + { + return $this->items->offsetGet($offset); + } + + /** + * Offset to set + * @access public + * @param mixed $offset + * @param mixed $value + */ + public function offsetSet($offset, $value) + { + $this->items->offsetSet($offset, $value); + } + + /** + * Offset to unset + * @access public + * @param mixed $offset + * @return void + * @since 5.0.0 + */ + public function offsetUnset($offset) + { + $this->items->offsetUnset($offset); + } + + /** + * Count elements of an object + */ + public function count() + { + return $this->items->count(); + } + + public function __toString() + { + return (string) $this->render(); + } + + public function toArray() + { + try { + $total = $this->total(); + } catch (\DomainException $e) { + $total = null; + } + + return [ + 'total' => $total, + 'per_page' => $this->listRows(), + 'current_page' => $this->currentPage(), + 'last_page' => $this->lastPage, + 'data' => $this->items->toArray(), + ]; + } + + /** + * Specify data which should be serialized to JSON + */ + public function jsonSerialize() + { + return $this->toArray(); + } + + public function __call($name, $arguments) + { + $collection = $this->getCollection(); + + $result = call_user_func_array([$collection, $name], $arguments); + + if ($result === $collection) { + return $this; + } + + return $result; + } + +} diff --git a/thinkphp/library/think/Process.php b/thinkphp/library/think/Process.php new file mode 100755 index 0000000..3b574db --- /dev/null +++ b/thinkphp/library/think/Process.php @@ -0,0 +1,1268 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\process\exception\Failed as ProcessFailedException; +use think\process\exception\Timeout as ProcessTimeoutException; +use think\process\pipes\Pipes; +use think\process\pipes\Unix as UnixPipes; +use think\process\pipes\Windows as WindowsPipes; +use think\process\Utils; + +class Process +{ + + const ERR = 'err'; + const OUT = 'out'; + + const STATUS_READY = 'ready'; + const STATUS_STARTED = 'started'; + const STATUS_TERMINATED = 'terminated'; + + const STDIN = 0; + const STDOUT = 1; + const STDERR = 2; + + const TIMEOUT_PRECISION = 0.2; + + private $callback; + private $commandline; + private $cwd; + private $env; + private $input; + private $starttime; + private $lastOutputTime; + private $timeout; + private $idleTimeout; + private $options; + private $exitcode; + private $fallbackExitcode; + private $processInformation; + private $outputDisabled = false; + private $stdout; + private $stderr; + private $enhanceWindowsCompatibility = true; + private $enhanceSigchildCompatibility; + private $process; + private $status = self::STATUS_READY; + private $incrementalOutputOffset = 0; + private $incrementalErrorOutputOffset = 0; + private $tty; + private $pty; + + private $useFileHandles = false; + + /** @var Pipes */ + private $processPipes; + + private $latestSignal; + + private static $sigchild; + + /** + * @var array + */ + public static $exitCodes = [ + 0 => 'OK', + 1 => 'General error', + 2 => 'Misuse of shell builtins', + 126 => 'Invoked command cannot execute', + 127 => 'Command not found', + 128 => 'Invalid exit argument', + // signals + 129 => 'Hangup', + 130 => 'Interrupt', + 131 => 'Quit and dump core', + 132 => 'Illegal instruction', + 133 => 'Trace/breakpoint trap', + 134 => 'Process aborted', + 135 => 'Bus error: "access to undefined portion of memory object"', + 136 => 'Floating point exception: "erroneous arithmetic operation"', + 137 => 'Kill (terminate immediately)', + 138 => 'User-defined 1', + 139 => 'Segmentation violation', + 140 => 'User-defined 2', + 141 => 'Write to pipe with no one reading', + 142 => 'Signal raised by alarm', + 143 => 'Termination (request to terminate)', + // 144 - not defined + 145 => 'Child process terminated, stopped (or continued*)', + 146 => 'Continue if stopped', + 147 => 'Stop executing temporarily', + 148 => 'Terminal stop signal', + 149 => 'Background process attempting to read from tty ("in")', + 150 => 'Background process attempting to write to tty ("out")', + 151 => 'Urgent data available on socket', + 152 => 'CPU time limit exceeded', + 153 => 'File size limit exceeded', + 154 => 'Signal raised by timer counting virtual time: "virtual timer expired"', + 155 => 'Profiling timer expired', + // 156 - not defined + 157 => 'Pollable event', + // 158 - not defined + 159 => 'Bad syscall', + ]; + + /** + * 构造方法 + * @access public + * @param string $commandline 指令 + * @param string|null $cwd 工作目录 + * @param array|null $env 环境变量 + * @param string|null $input 输入 + * @param int|float|null $timeout 超时时间 + * @param array $options proc_open的选项 + * @throws \RuntimeException + * @api + */ + public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = []) + { + if (!function_exists('proc_open')) { + throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.'); + } + + $this->commandline = $commandline; + $this->cwd = $cwd; + + if (null === $this->cwd && (defined('ZEND_THREAD_SAFE') || '\\' === DIRECTORY_SEPARATOR)) { + $this->cwd = getcwd(); + } + if (null !== $env) { + $this->setEnv($env); + } + + $this->input = $input; + $this->setTimeout($timeout); + $this->useFileHandles = '\\' === DIRECTORY_SEPARATOR; + $this->pty = false; + $this->enhanceWindowsCompatibility = true; + $this->enhanceSigchildCompatibility = '\\' !== DIRECTORY_SEPARATOR && $this->isSigchildEnabled(); + $this->options = array_replace([ + 'suppress_errors' => true, + 'binary_pipes' => true, + ], $options); + } + + public function __destruct() + { + $this->stop(); + } + + public function __clone() + { + $this->resetProcessData(); + } + + /** + * 运行指令 + * @access public + * @param callback|null $callback + * @return int + */ + public function run($callback = null) + { + $this->start($callback); + + return $this->wait(); + } + + /** + * 运行指令 + * @access public + * @param callable|null $callback + * @return self + * @throws \RuntimeException + * @throws ProcessFailedException + */ + public function mustRun($callback = null) + { + if ($this->isSigchildEnabled() && !$this->enhanceSigchildCompatibility) { + throw new \RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.'); + } + + if (0 !== $this->run($callback)) { + throw new ProcessFailedException($this); + } + + return $this; + } + + /** + * 启动进程并写到 STDIN 输入后返回。 + * @access public + * @param callable|null $callback + * @throws \RuntimeException + * @throws \RuntimeException + * @throws \LogicException + */ + public function start($callback = null) + { + if ($this->isRunning()) { + throw new \RuntimeException('Process is already running'); + } + if ($this->outputDisabled && null !== $callback) { + throw new \LogicException('Output has been disabled, enable it to allow the use of a callback.'); + } + + $this->resetProcessData(); + $this->starttime = $this->lastOutputTime = microtime(true); + $this->callback = $this->buildCallback($callback); + $descriptors = $this->getDescriptors(); + + $commandline = $this->commandline; + + if ('\\' === DIRECTORY_SEPARATOR && $this->enhanceWindowsCompatibility) { + $commandline = 'cmd /V:ON /E:ON /C "(' . $commandline . ')'; + foreach ($this->processPipes->getFiles() as $offset => $filename) { + $commandline .= ' ' . $offset . '>' . Utils::escapeArgument($filename); + } + $commandline .= '"'; + + if (!isset($this->options['bypass_shell'])) { + $this->options['bypass_shell'] = true; + } + } + + $this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $this->env, $this->options); + + if (!is_resource($this->process)) { + throw new \RuntimeException('Unable to launch a new process.'); + } + $this->status = self::STATUS_STARTED; + + if ($this->tty) { + return; + } + + $this->updateStatus(false); + $this->checkTimeout(); + } + + /** + * 重启进程 + * @access public + * @param callable|null $callback + * @return Process + * @throws \RuntimeException + * @throws \RuntimeException + */ + public function restart($callback = null) + { + if ($this->isRunning()) { + throw new \RuntimeException('Process is already running'); + } + + $process = clone $this; + $process->start($callback); + + return $process; + } + + /** + * 等待要终止的进程 + * @access public + * @param callable|null $callback + * @return int + */ + public function wait($callback = null) + { + $this->requireProcessIsStarted(__FUNCTION__); + + $this->updateStatus(false); + if (null !== $callback) { + $this->callback = $this->buildCallback($callback); + } + + do { + $this->checkTimeout(); + $running = '\\' === DIRECTORY_SEPARATOR ? $this->isRunning() : $this->processPipes->areOpen(); + $close = '\\' !== DIRECTORY_SEPARATOR || !$running; + $this->readPipes(true, $close); + } while ($running); + + while ($this->isRunning()) { + usleep(1000); + } + + if ($this->processInformation['signaled'] && $this->processInformation['termsig'] !== $this->latestSignal) { + throw new \RuntimeException(sprintf('The process has been signaled with signal "%s".', $this->processInformation['termsig'])); + } + + return $this->exitcode; + } + + /** + * 获取PID + * @access public + * @return int|null + * @throws \RuntimeException + */ + public function getPid() + { + if ($this->isSigchildEnabled()) { + throw new \RuntimeException('This PHP has been compiled with --enable-sigchild. The process identifier can not be retrieved.'); + } + + $this->updateStatus(false); + + return $this->isRunning() ? $this->processInformation['pid'] : null; + } + + /** + * 将一个 POSIX 信号发送到进程中 + * @access public + * @param int $signal + * @return Process + */ + public function signal($signal) + { + $this->doSignal($signal, true); + + return $this; + } + + /** + * 禁用从底层过程获取输出和错误输出。 + * @access public + * @return Process + */ + public function disableOutput() + { + if ($this->isRunning()) { + throw new \RuntimeException('Disabling output while the process is running is not possible.'); + } + if (null !== $this->idleTimeout) { + throw new \LogicException('Output can not be disabled while an idle timeout is set.'); + } + + $this->outputDisabled = true; + + return $this; + } + + /** + * 开启从底层过程获取输出和错误输出。 + * @access public + * @return Process + * @throws \RuntimeException + */ + public function enableOutput() + { + if ($this->isRunning()) { + throw new \RuntimeException('Enabling output while the process is running is not possible.'); + } + + $this->outputDisabled = false; + + return $this; + } + + /** + * 输出是否禁用 + * @access public + * @return bool + */ + public function isOutputDisabled() + { + return $this->outputDisabled; + } + + /** + * 获取当前的输出管道 + * @access public + * @return string + * @throws \LogicException + * @api + */ + public function getOutput() + { + if ($this->outputDisabled) { + throw new \LogicException('Output has been disabled.'); + } + + $this->requireProcessIsStarted(__FUNCTION__); + + $this->readPipes(false, '\\' === DIRECTORY_SEPARATOR ? !$this->processInformation['running'] : true); + + return $this->stdout; + } + + /** + * 以增量方式返回的输出结果。 + * @access public + * @return string + */ + public function getIncrementalOutput() + { + $this->requireProcessIsStarted(__FUNCTION__); + + $data = $this->getOutput(); + + $latest = substr($data, $this->incrementalOutputOffset); + + if (false === $latest) { + return ''; + } + + $this->incrementalOutputOffset = strlen($data); + + return $latest; + } + + /** + * 清空输出 + * @access public + * @return Process + */ + public function clearOutput() + { + $this->stdout = ''; + $this->incrementalOutputOffset = 0; + + return $this; + } + + /** + * 返回当前的错误输出的过程 (STDERR)。 + * @access public + * @return string + */ + public function getErrorOutput() + { + if ($this->outputDisabled) { + throw new \LogicException('Output has been disabled.'); + } + + $this->requireProcessIsStarted(__FUNCTION__); + + $this->readPipes(false, '\\' === DIRECTORY_SEPARATOR ? !$this->processInformation['running'] : true); + + return $this->stderr; + } + + /** + * 以增量方式返回 errorOutput + * @access public + * @return string + */ + public function getIncrementalErrorOutput() + { + $this->requireProcessIsStarted(__FUNCTION__); + + $data = $this->getErrorOutput(); + + $latest = substr($data, $this->incrementalErrorOutputOffset); + + if (false === $latest) { + return ''; + } + + $this->incrementalErrorOutputOffset = strlen($data); + + return $latest; + } + + /** + * 清空 errorOutput + * @access public + * @return Process + */ + public function clearErrorOutput() + { + $this->stderr = ''; + $this->incrementalErrorOutputOffset = 0; + + return $this; + } + + /** + * 获取退出码 + * @access public + * @return null|int + */ + public function getExitCode() + { + if ($this->isSigchildEnabled() && !$this->enhanceSigchildCompatibility) { + throw new \RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.'); + } + + $this->updateStatus(false); + + return $this->exitcode; + } + + /** + * 获取退出文本 + * @access public + * @return null|string + */ + public function getExitCodeText() + { + if (null === $exitcode = $this->getExitCode()) { + return; + } + + return isset(self::$exitCodes[$exitcode]) ? self::$exitCodes[$exitcode] : 'Unknown error'; + } + + /** + * 检查是否成功 + * @access public + * @return bool + */ + public function isSuccessful() + { + return 0 === $this->getExitCode(); + } + + /** + * 是否未捕获的信号已被终止子进程 + * @access public + * @return bool + */ + public function hasBeenSignaled() + { + $this->requireProcessIsTerminated(__FUNCTION__); + + if ($this->isSigchildEnabled()) { + throw new \RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.'); + } + + $this->updateStatus(false); + + return $this->processInformation['signaled']; + } + + /** + * 返回导致子进程终止其执行的数。 + * @access public + * @return int + */ + public function getTermSignal() + { + $this->requireProcessIsTerminated(__FUNCTION__); + + if ($this->isSigchildEnabled()) { + throw new \RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.'); + } + + $this->updateStatus(false); + + return $this->processInformation['termsig']; + } + + /** + * 检查子进程信号是否已停止 + * @access public + * @return bool + */ + public function hasBeenStopped() + { + $this->requireProcessIsTerminated(__FUNCTION__); + + $this->updateStatus(false); + + return $this->processInformation['stopped']; + } + + /** + * 返回导致子进程停止其执行的数。 + * @access public + * @return int + */ + public function getStopSignal() + { + $this->requireProcessIsTerminated(__FUNCTION__); + + $this->updateStatus(false); + + return $this->processInformation['stopsig']; + } + + /** + * 检查是否正在运行 + * @access public + * @return bool + */ + public function isRunning() + { + if (self::STATUS_STARTED !== $this->status) { + return false; + } + + $this->updateStatus(false); + + return $this->processInformation['running']; + } + + /** + * 检查是否已开始 + * @access public + * @return bool + */ + public function isStarted() + { + return self::STATUS_READY != $this->status; + } + + /** + * 检查是否已终止 + * @access public + * @return bool + */ + public function isTerminated() + { + $this->updateStatus(false); + + return self::STATUS_TERMINATED == $this->status; + } + + /** + * 获取当前的状态 + * @access public + * @return string + */ + public function getStatus() + { + $this->updateStatus(false); + + return $this->status; + } + + /** + * 终止进程 + * @access public + */ + public function stop() + { + if ($this->isRunning()) { + if ('\\' === DIRECTORY_SEPARATOR && !$this->isSigchildEnabled()) { + exec(sprintf('taskkill /F /T /PID %d 2>&1', $this->getPid()), $output, $exitCode); + if ($exitCode > 0) { + throw new \RuntimeException('Unable to kill the process'); + } + } else { + $pids = preg_split('/\s+/', `ps -o pid --no-heading --ppid {$this->getPid()}`); + foreach ($pids as $pid) { + if (is_numeric($pid)) { + posix_kill($pid, 9); + } + } + } + } + + $this->updateStatus(false); + if ($this->processInformation['running']) { + $this->close(); + } + + return $this->exitcode; + } + + /** + * 添加一行输出 + * @access public + * @param string $line + */ + public function addOutput($line) +{ + $this->lastOutputTime = microtime(true); + $this->stdout .= $line; + } + + /** + * 添加一行错误输出 + * @access public + * @param string $line + */ + public function addErrorOutput($line) +{ + $this->lastOutputTime = microtime(true); + $this->stderr .= $line; + } + + /** + * 获取被执行的指令 + * @access public + * @return string + */ + public function getCommandLine() +{ + return $this->commandline; + } + + /** + * 设置指令 + * @access public + * @param string $commandline + * @return self + */ + public function setCommandLine($commandline) +{ + $this->commandline = $commandline; + + return $this; + } + + /** + * 获取超时时间 + * @access public + * @return float|null + */ + public function getTimeout() +{ + return $this->timeout; + } + + /** + * 获取idle超时时间 + * @access public + * @return float|null + */ + public function getIdleTimeout() +{ + return $this->idleTimeout; + } + + /** + * 设置超时时间 + * @access public + * @param int|float|null $timeout + * @return self + */ + public function setTimeout($timeout) +{ + $this->timeout = $this->validateTimeout($timeout); + + return $this; + } + + /** + * 设置idle超时时间 + * @access public + * @param int|float|null $timeout + * @return self + */ + public function setIdleTimeout($timeout) +{ + if (null !== $timeout && $this->outputDisabled) { + throw new \LogicException('Idle timeout can not be set while the output is disabled.'); + } + + $this->idleTimeout = $this->validateTimeout($timeout); + + return $this; + } + + /** + * 设置TTY + * @access public + * @param bool $tty + * @return self + */ + public function setTty($tty) +{ + if ('\\' === DIRECTORY_SEPARATOR && $tty) { + throw new \RuntimeException('TTY mode is not supported on Windows platform.'); + } + if ($tty && (!file_exists('/dev/tty') || !is_readable('/dev/tty'))) { + throw new \RuntimeException('TTY mode requires /dev/tty to be readable.'); + } + + $this->tty = (bool) $tty; + + return $this; + } + + /** + * 检查是否是tty模式 + * @access public + * @return bool + */ + public function isTty() +{ + return $this->tty; + } + + /** + * 设置pty模式 + * @access public + * @param bool $bool + * @return self + */ + public function setPty($bool) +{ + $this->pty = (bool) $bool; + + return $this; + } + + /** + * 是否是pty模式 + * @access public + * @return bool + */ + public function isPty() +{ + return $this->pty; + } + + /** + * 获取工作目录 + * @access public + * @return string|null + */ + public function getWorkingDirectory() +{ + if (null === $this->cwd) { + return getcwd() ?: null; + } + + return $this->cwd; + } + + /** + * 设置工作目录 + * @access public + * @param string $cwd + * @return self + */ + public function setWorkingDirectory($cwd) +{ + $this->cwd = $cwd; + + return $this; + } + + /** + * 获取环境变量 + * @access public + * @return array + */ + public function getEnv() +{ + return $this->env; + } + + /** + * 设置环境变量 + * @access public + * @param array $env + * @return self + */ + public function setEnv(array $env) +{ + $env = array_filter($env, function ($value) { + return !is_array($value); + }); + + $this->env = []; + foreach ($env as $key => $value) { + $this->env[(binary) $key] = (binary) $value; + } + + return $this; + } + + /** + * 获取输入 + * @access public + * @return null|string + */ + public function getInput() +{ + return $this->input; + } + + /** + * 设置输入 + * @access public + * @param mixed $input + * @return self + */ + public function setInput($input) +{ + if ($this->isRunning()) { + throw new \LogicException('Input can not be set while the process is running.'); + } + + $this->input = Utils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input); + + return $this; + } + + /** + * 获取proc_open的选项 + * @access public + * @return array + */ + public function getOptions() +{ + return $this->options; + } + + /** + * 设置proc_open的选项 + * @access public + * @param array $options + * @return self + */ + public function setOptions(array $options) +{ + $this->options = $options; + + return $this; + } + + /** + * 是否兼容windows + * @access public + * @return bool + */ + public function getEnhanceWindowsCompatibility() +{ + return $this->enhanceWindowsCompatibility; + } + + /** + * 设置是否兼容windows + * @access public + * @param bool $enhance + * @return self + */ + public function setEnhanceWindowsCompatibility($enhance) +{ + $this->enhanceWindowsCompatibility = (bool) $enhance; + + return $this; + } + + /** + * 返回是否 sigchild 兼容模式激活 + * @access public + * @return bool + */ + public function getEnhanceSigchildCompatibility() +{ + return $this->enhanceSigchildCompatibility; + } + + /** + * 激活 sigchild 兼容性模式。 + * @access public + * @param bool $enhance + * @return self + */ + public function setEnhanceSigchildCompatibility($enhance) +{ + $this->enhanceSigchildCompatibility = (bool) $enhance; + + return $this; + } + + /** + * 是否超时 + */ + public function checkTimeout() +{ + if (self::STATUS_STARTED !== $this->status) { + return; + } + + if (null !== $this->timeout && $this->timeout < microtime(true) - $this->starttime) { + $this->stop(); + + throw new ProcessTimeoutException($this, ProcessTimeoutException::TYPE_GENERAL); + } + + if (null !== $this->idleTimeout && $this->idleTimeout < microtime(true) - $this->lastOutputTime) { + $this->stop(); + + throw new ProcessTimeoutException($this, ProcessTimeoutException::TYPE_IDLE); + } + } + + /** + * 是否支持pty + * @access public + * @return bool + */ + public static function isPtySupported() +{ + static $result; + + if (null !== $result) { + return $result; + } + + if ('\\' === DIRECTORY_SEPARATOR) { + return $result = false; + } + + $proc = @proc_open('echo 1', [['pty'], ['pty'], ['pty']], $pipes); + if (is_resource($proc)) { + proc_close($proc); + + return $result = true; + } + + return $result = false; + } + + /** + * 创建所需的 proc_open 的描述符 + * @access private + * @return array + */ + private function getDescriptors() +{ + if ('\\' === DIRECTORY_SEPARATOR) { + $this->processPipes = WindowsPipes::create($this, $this->input); + } else { + $this->processPipes = UnixPipes::create($this, $this->input); + } + $descriptors = $this->processPipes->getDescriptors($this->outputDisabled); + + if (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + + $descriptors = array_merge($descriptors, [['pipe', 'w']]); + + $this->commandline = '(' . $this->commandline . ') 3>/dev/null; code=$?; echo $code >&3; exit $code'; + } + + return $descriptors; + } + + /** + * 建立 wait () 使用的回调。 + * @access protected + * @param callable|null $callback + * @return callable + */ + protected function buildCallback($callback) +{ + $out = self::OUT; + $callback = function ($type, $data) use ($callback, $out) { + if ($out == $type) { + $this->addOutput($data); + } else { + $this->addErrorOutput($data); + } + + if (null !== $callback) { + call_user_func($callback, $type, $data); + } + }; + + return $callback; + } + + /** + * 更新状态 + * @access protected + * @param bool $blocking + */ + protected function updateStatus($blocking) +{ + if (self::STATUS_STARTED !== $this->status) { + return; + } + + $this->processInformation = proc_get_status($this->process); + $this->captureExitCode(); + + $this->readPipes($blocking, '\\' === DIRECTORY_SEPARATOR ? !$this->processInformation['running'] : true); + + if (!$this->processInformation['running']) { + $this->close(); + } + } + + /** + * 是否开启 '--enable-sigchild' + * @access protected + * @return bool + */ + protected function isSigchildEnabled() +{ + if (null !== self::$sigchild) { + return self::$sigchild; + } + + if (!function_exists('phpinfo')) { + return self::$sigchild = false; + } + + ob_start(); + phpinfo(INFO_GENERAL); + + return self::$sigchild = false !== strpos(ob_get_clean(), '--enable-sigchild'); + } + + /** + * 验证是否超时 + * @access private + * @param int|float|null $timeout + * @return float|null + */ + private function validateTimeout($timeout) +{ + $timeout = (float) $timeout; + + if (0.0 === $timeout) { + $timeout = null; + } elseif ($timeout < 0) { + throw new \InvalidArgumentException('The timeout value must be a valid positive integer or float number.'); + } + + return $timeout; + } + + /** + * 读取pipes + * @access private + * @param bool $blocking + * @param bool $close + */ + private function readPipes($blocking, $close) +{ + $result = $this->processPipes->readAndWrite($blocking, $close); + + $callback = $this->callback; + foreach ($result as $type => $data) { + if (3 == $type) { + $this->fallbackExitcode = (int) $data; + } else { + $callback(self::STDOUT === $type ? self::OUT : self::ERR, $data); + } + } + } + + /** + * 捕获退出码 + */ + private function captureExitCode() +{ + if (isset($this->processInformation['exitcode']) && -1 != $this->processInformation['exitcode']) { + $this->exitcode = $this->processInformation['exitcode']; + } + } + + /** + * 关闭资源 + * @access private + * @return int 退出码 + */ + private function close() +{ + $this->processPipes->close(); + if (is_resource($this->process)) { + $exitcode = proc_close($this->process); + } else { + $exitcode = -1; + } + + $this->exitcode = -1 !== $exitcode ? $exitcode : (null !== $this->exitcode ? $this->exitcode : -1); + $this->status = self::STATUS_TERMINATED; + + if (-1 === $this->exitcode && null !== $this->fallbackExitcode) { + $this->exitcode = $this->fallbackExitcode; + } elseif (-1 === $this->exitcode && $this->processInformation['signaled'] + && 0 < $this->processInformation['termsig'] + ) { + $this->exitcode = 128 + $this->processInformation['termsig']; + } + + return $this->exitcode; + } + + /** + * 重置数据 + */ + private function resetProcessData() +{ + $this->starttime = null; + $this->callback = null; + $this->exitcode = null; + $this->fallbackExitcode = null; + $this->processInformation = null; + $this->stdout = null; + $this->stderr = null; + $this->process = null; + $this->latestSignal = null; + $this->status = self::STATUS_READY; + $this->incrementalOutputOffset = 0; + $this->incrementalErrorOutputOffset = 0; + } + + /** + * 将一个 POSIX 信号发送到进程中。 + * @access private + * @param int $signal + * @param bool $throwException + * @return bool + */ + private function doSignal($signal, $throwException) +{ + if (!$this->isRunning()) { + if ($throwException) { + throw new \LogicException('Can not send signal on a non running process.'); + } + + return false; + } + + if ($this->isSigchildEnabled()) { + if ($throwException) { + throw new \RuntimeException('This PHP has been compiled with --enable-sigchild. The process can not be signaled.'); + } + + return false; + } + + if (true !== @proc_terminate($this->process, $signal)) { + if ($throwException) { + throw new \RuntimeException(sprintf('Error while sending signal `%s`.', $signal)); + } + + return false; + } + + $this->latestSignal = $signal; + + return true; + } + + /** + * 确保进程已经开启 + * @access private + * @param string $functionName + */ + private function requireProcessIsStarted($functionName) +{ + if (!$this->isStarted()) { + throw new \LogicException(sprintf('Process must be started before calling %s.', $functionName)); + } + } + + /** + * 确保进程已经终止 + * @access private + * @param string $functionName + */ + private function requireProcessIsTerminated($functionName) +{ + if (!$this->isTerminated()) { + throw new \LogicException(sprintf('Process must be terminated before calling %s.', $functionName)); + } + } +} diff --git a/thinkphp/library/think/Request.php b/thinkphp/library/think/Request.php new file mode 100755 index 0000000..e0488e7 --- /dev/null +++ b/thinkphp/library/think/Request.php @@ -0,0 +1,2270 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\facade\Cookie; +use think\facade\Session; + +class Request +{ + /** + * 配置参数 + * @var array + */ + protected $config = [ + // 表单请求类型伪装变量 + 'var_method' => '_method', + // 表单ajax伪装变量 + 'var_ajax' => '_ajax', + // 表单pjax伪装变量 + 'var_pjax' => '_pjax', + // PATHINFO变量名 用于兼容模式 + 'var_pathinfo' => 's', + // 兼容PATH_INFO获取 + 'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'], + // 默认全局过滤方法 用逗号分隔多个 + 'default_filter' => '', + // 域名根,如thinkphp.cn + 'url_domain_root' => '', + // HTTPS代理标识 + 'https_agent_name' => '', + // IP代理获取标识 + 'http_agent_ip' => 'HTTP_X_REAL_IP', + // URL伪静态后缀 + 'url_html_suffix' => 'html', + ]; + + /** + * 请求类型 + * @var string + */ + protected $method; + + /** + * 主机名(含端口) + * @var string + */ + protected $host; + + /** + * 域名(含协议及端口) + * @var string + */ + protected $domain; + + /** + * 子域名 + * @var string + */ + protected $subDomain; + + /** + * 泛域名 + * @var string + */ + protected $panDomain; + + /** + * 当前URL地址 + * @var string + */ + protected $url; + + /** + * 基础URL + * @var string + */ + protected $baseUrl; + + /** + * 当前执行的文件 + * @var string + */ + protected $baseFile; + + /** + * 访问的ROOT地址 + * @var string + */ + protected $root; + + /** + * pathinfo + * @var string + */ + protected $pathinfo; + + /** + * pathinfo(不含后缀) + * @var string + */ + protected $path; + + /** + * 当前路由信息 + * @var array + */ + protected $routeInfo = []; + + /** + * 当前调度信息 + * @var \think\route\Dispatch + */ + protected $dispatch; + + /** + * 当前模块名 + * @var string + */ + protected $module; + + /** + * 当前控制器名 + * @var string + */ + protected $controller; + + /** + * 当前操作名 + * @var string + */ + protected $action; + + /** + * 当前语言集 + * @var string + */ + protected $langset; + + /** + * 当前请求参数 + * @var array + */ + protected $param = []; + + /** + * 当前GET参数 + * @var array + */ + protected $get = []; + + /** + * 当前POST参数 + * @var array + */ + protected $post = []; + + /** + * 当前REQUEST参数 + * @var array + */ + protected $request = []; + + /** + * 当前ROUTE参数 + * @var array + */ + protected $route = []; + + /** + * 当前PUT参数 + * @var array + */ + protected $put; + + /** + * 当前SESSION参数 + * @var array + */ + protected $session = []; + + /** + * 当前FILE参数 + * @var array + */ + protected $file = []; + + /** + * 当前COOKIE参数 + * @var array + */ + protected $cookie = []; + + /** + * 当前SERVER参数 + * @var array + */ + protected $server = []; + + /** + * 当前ENV参数 + * @var array + */ + protected $env = []; + + /** + * 当前HEADER参数 + * @var array + */ + protected $header = []; + + /** + * 资源类型定义 + * @var array + */ + protected $mimeType = [ + 'xml' => 'application/xml,text/xml,application/x-xml', + 'json' => 'application/json,text/x-json,application/jsonrequest,text/json', + 'js' => 'text/javascript,application/javascript,application/x-javascript', + 'css' => 'text/css', + 'rss' => 'application/rss+xml', + 'yaml' => 'application/x-yaml,text/yaml', + 'atom' => 'application/atom+xml', + 'pdf' => 'application/pdf', + 'text' => 'text/plain', + 'image' => 'image/png,image/jpg,image/jpeg,image/pjpeg,image/gif,image/webp,image/*', + 'csv' => 'text/csv', + 'html' => 'text/html,application/xhtml+xml,*/*', + ]; + + /** + * 当前请求内容 + * @var string + */ + protected $content; + + /** + * 全局过滤规则 + * @var array + */ + protected $filter; + + /** + * 扩展方法 + * @var array + */ + protected $hook = []; + + /** + * php://input内容 + * @var string + */ + protected $input; + + /** + * 请求缓存 + * @var array + */ + protected $cache; + + /** + * 缓存是否检查 + * @var bool + */ + protected $isCheckCache; + + /** + * 请求安全Key + * @var string + */ + protected $secureKey; + + /** + * 是否合并Param + * @var bool + */ + protected $mergeParam = false; + + /** + * 架构函数 + * @access public + * @param array $options 参数 + */ + public function __construct(array $options = []) + { + $this->init($options); + + // 保存 php://input + $this->input = file_get_contents('php://input'); + } + + public function init(array $options = []) + { + $this->config = array_merge($this->config, $options); + + if (is_null($this->filter) && !empty($this->config['default_filter'])) { + $this->filter = $this->config['default_filter']; + } + } + + public function config($name = null) + { + if (is_null($name)) { + return $this->config; + } + return isset($this->config[$name]) ? $this->config[$name] : null; + } + + public static function __make(App $app, Config $config) + { + $request = new static($config->pull('app')); + + $request->server = $_SERVER; + $request->env = $app['env']->get(); + + return $request; + } + + public function __call($method, $args) + { + if (array_key_exists($method, $this->hook)) { + array_unshift($args, $this); + return call_user_func_array($this->hook[$method], $args); + } + + throw new Exception('method not exists:' . static::class . '->' . $method); + } + + /** + * Hook 方法注入 + * @access public + * @param string|array $method 方法名 + * @param mixed $callback callable + * @return void + */ + public function hook($method, $callback = null) + { + if (is_array($method)) { + $this->hook = array_merge($this->hook, $method); + } else { + $this->hook[$method] = $callback; + } + } + + /** + * 创建一个URL请求 + * @access public + * @param string $uri URL地址 + * @param string $method 请求类型 + * @param array $params 请求参数 + * @param array $cookie + * @param array $files + * @param array $server + * @param string $content + * @return \think\Request + */ + public function create($uri, $method = 'GET', $params = [], $cookie = [], $files = [], $server = [], $content = null) + { + $server['PATH_INFO'] = ''; + $server['REQUEST_METHOD'] = strtoupper($method); + $info = parse_url($uri); + + if (isset($info['host'])) { + $server['SERVER_NAME'] = $info['host']; + $server['HTTP_HOST'] = $info['host']; + } + + if (isset($info['scheme'])) { + if ('https' === $info['scheme']) { + $server['HTTPS'] = 'on'; + $server['SERVER_PORT'] = 443; + } else { + unset($server['HTTPS']); + $server['SERVER_PORT'] = 80; + } + } + + if (isset($info['port'])) { + $server['SERVER_PORT'] = $info['port']; + $server['HTTP_HOST'] = $server['HTTP_HOST'] . ':' . $info['port']; + } + + if (isset($info['user'])) { + $server['PHP_AUTH_USER'] = $info['user']; + } + + if (isset($info['pass'])) { + $server['PHP_AUTH_PW'] = $info['pass']; + } + + if (!isset($info['path'])) { + $info['path'] = '/'; + } + + $options = []; + $queryString = ''; + + $options[strtolower($method)] = $params; + + if (isset($info['query'])) { + parse_str(html_entity_decode($info['query']), $query); + if (!empty($params)) { + $params = array_replace($query, $params); + $queryString = http_build_query($params, '', '&'); + } else { + $params = $query; + $queryString = $info['query']; + } + } elseif (!empty($params)) { + $queryString = http_build_query($params, '', '&'); + } + + if ($queryString) { + parse_str($queryString, $get); + $options['get'] = isset($options['get']) ? array_merge($get, $options['get']) : $get; + } + + $server['REQUEST_URI'] = $info['path'] . ('' !== $queryString ? '?' . $queryString : ''); + $server['QUERY_STRING'] = $queryString; + $options['cookie'] = $cookie; + $options['param'] = $params; + $options['file'] = $files; + $options['server'] = $server; + $options['url'] = $server['REQUEST_URI']; + $options['baseUrl'] = $info['path']; + $options['pathinfo'] = '/' == $info['path'] ? '/' : ltrim($info['path'], '/'); + $options['method'] = $server['REQUEST_METHOD']; + $options['domain'] = isset($info['scheme']) ? $info['scheme'] . '://' . $server['HTTP_HOST'] : ''; + $options['content'] = $content; + + $request = new static(); + foreach ($options as $name => $item) { + if (property_exists($request, $name)) { + $request->$name = $item; + } + } + + return $request; + } + + /** + * 获取当前包含协议、端口的域名 + * @access public + * @param bool $port 是否需要去除端口号 + * @return string + */ + public function domain($port = false) + { + return $this->scheme() . '://' . $this->host($port); + } + + /** + * 获取当前根域名 + * @access public + * @return string + */ + public function rootDomain() + { + $root = $this->config['url_domain_root']; + + if (!$root) { + $item = explode('.', $this->host(true)); + $count = count($item); + $root = $count > 1 ? $item[$count - 2] . '.' . $item[$count - 1] : $item[0]; + } + + return $root; + } + + /** + * 获取当前子域名 + * @access public + * @return string + */ + public function subDomain() + { + if (is_null($this->subDomain)) { + // 获取当前主域名 + $rootDomain = $this->config['url_domain_root']; + + if ($rootDomain) { + // 配置域名根 例如 thinkphp.cn 163.com.cn 如果是国家级域名 com.cn net.cn 之类的域名需要配置 + $domain = explode('.', rtrim(stristr($this->host(true), $rootDomain, true), '.')); + } else { + $domain = explode('.', $this->host(true), -2); + } + + $this->subDomain = implode('.', $domain); + } + + return $this->subDomain; + } + + /** + * 设置当前泛域名的值 + * @access public + * @param string $domain 域名 + * @return $this + */ + public function setPanDomain($domain) + { + $this->panDomain = $domain; + return $this; + } + + /** + * 获取当前泛域名的值 + * @access public + * @return string + */ + public function panDomain() + { + return $this->panDomain; + } + + /** + * 设置当前完整URL 包括QUERY_STRING + * @access public + * @param string $url URL + * @return $this + */ + public function setUrl($url) + { + $this->url = $url; + return $this; + } + + /** + * 获取当前完整URL 包括QUERY_STRING + * @access public + * @param bool $complete 是否包含域名 + * @return string + */ + public function url($complete = false) + { + if (!$this->url) { + if ($this->isCli()) { + $this->url = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : ''; + } elseif ($this->server('HTTP_X_REWRITE_URL')) { + $this->url = $this->server('HTTP_X_REWRITE_URL'); + } elseif ($this->server('REQUEST_URI')) { + $this->url = $this->server('REQUEST_URI'); + } elseif ($this->server('ORIG_PATH_INFO')) { + $this->url = $this->server('ORIG_PATH_INFO') . (!empty($this->server('QUERY_STRING')) ? '?' . $this->server('QUERY_STRING') : ''); + } else { + $this->url = ''; + } + } + + return $complete ? $this->domain() . $this->url : $this->url; + } + + /** + * 设置当前完整URL 不包括QUERY_STRING + * @access public + * @param string $url URL + * @return $this + */ + public function setBaseUrl($url) + { + $this->baseUrl = $url; + return $this; + } + + /** + * 获取当前URL 不含QUERY_STRING + * @access public + * @param bool $domain 是否包含域名 + * @return string|$this + */ + public function baseUrl($domain = false) + { + if (!$this->baseUrl) { + $str = $this->url(); + $this->baseUrl = strpos($str, '?') ? strstr($str, '?', true) : $str; + } + + return $domain ? $this->domain() . $this->baseUrl : $this->baseUrl; + } + + /** + * 设置或获取当前执行的文件 SCRIPT_NAME + * @access public + * @param bool $domain 是否包含域名 + * @return string|$this + */ + public function baseFile($domain = false) + { + if (!$this->baseFile) { + $url = ''; + if (!$this->isCli()) { + $script_name = basename($this->server('SCRIPT_FILENAME')); + if (basename($this->server('SCRIPT_NAME')) === $script_name) { + $url = $this->server('SCRIPT_NAME'); + } elseif (basename($this->server('PHP_SELF')) === $script_name) { + $url = $this->server('PHP_SELF'); + } elseif (basename($this->server('ORIG_SCRIPT_NAME')) === $script_name) { + $url = $this->server('ORIG_SCRIPT_NAME'); + } elseif (($pos = strpos($this->server('PHP_SELF'), '/' . $script_name)) !== false) { + $url = substr($this->server('SCRIPT_NAME'), 0, $pos) . '/' . $script_name; + } elseif ($this->server('DOCUMENT_ROOT') && strpos($this->server('SCRIPT_FILENAME'), $this->server('DOCUMENT_ROOT')) === 0) { + $url = str_replace('\\', '/', str_replace($this->server('DOCUMENT_ROOT'), '', $this->server('SCRIPT_FILENAME'))); + } + } + $this->baseFile = $url; + } + + return $domain ? $this->domain() . $this->baseFile : $this->baseFile; + } + + /** + * 设置URL访问根地址 + * @access public + * @param string $url URL地址 + * @return string|$this + */ + public function setRoot($url = null) + { + $this->root = $url; + return $this; + } + + /** + * 获取URL访问根地址 + * @access public + * @param bool $domain 是否包含域名 + * @return string|$this + */ + public function root($domain = false) + { + if (!$this->root) { + $file = $this->baseFile(); + if ($file && 0 !== strpos($this->url(), $file)) { + $file = str_replace('\\', '/', dirname($file)); + } + $this->root = rtrim($file, '/'); + } + + return $domain ? $this->domain() . $this->root : $this->root; + } + + /** + * 获取URL访问根目录 + * @access public + * @return string + */ + public function rootUrl() + { + $base = $this->root(); + $root = strpos($base, '.') ? ltrim(dirname($base), DIRECTORY_SEPARATOR) : $base; + + if ('' != $root) { + $root = '/' . ltrim($root, '/'); + } + + return $root; + } + + public function setPathinfo($pathinfo) + { + $this->pathinfo = $pathinfo; + return $this; + } + + /** + * 获取当前请求URL的pathinfo信息(含URL后缀) + * @access public + * @return string + */ + public function pathinfo() + { + if (is_null($this->pathinfo)) { + if (isset($_GET[$this->config['var_pathinfo']])) { + // 判断URL里面是否有兼容模式参数 + $pathinfo = $_GET[$this->config['var_pathinfo']]; + unset($_GET[$this->config['var_pathinfo']]); + unset($this->get[$this->config['var_pathinfo']]); + } elseif ($this->isCli()) { + // CLI模式下 index.php module/controller/action/params/... + $pathinfo = isset($_SERVER['argv'][1]) ? $_SERVER['argv'][1] : ''; + } elseif ('cli-server' == PHP_SAPI) { + $pathinfo = strpos($this->server('REQUEST_URI'), '?') ? strstr($this->server('REQUEST_URI'), '?', true) : $this->server('REQUEST_URI'); + } elseif ($this->server('PATH_INFO')) { + $pathinfo = $this->server('PATH_INFO'); + } + + // 分析PATHINFO信息 + if (!isset($pathinfo)) { + foreach ($this->config['pathinfo_fetch'] as $type) { + if ($this->server($type)) { + $pathinfo = (0 === strpos($this->server($type), $this->server('SCRIPT_NAME'))) ? + substr($this->server($type), strlen($this->server('SCRIPT_NAME'))) : $this->server($type); + break; + } + } + } + + if (!empty($pathinfo)) { + unset($this->get[$pathinfo], $this->request[$pathinfo]); + } + + $this->pathinfo = empty($pathinfo) || '/' == $pathinfo ? '' : ltrim($pathinfo, '/'); + } + + return $this->pathinfo; + } + + /** + * 获取当前请求URL的pathinfo信息(不含URL后缀) + * @access public + * @return string + */ + public function path() + { + if (is_null($this->path)) { + $suffix = $this->config['url_html_suffix']; + $pathinfo = $this->pathinfo(); + + if (false === $suffix) { + // 禁止伪静态访问 + $this->path = $pathinfo; + } elseif ($suffix) { + // 去除正常的URL后缀 + $this->path = preg_replace('/\.(' . ltrim($suffix, '.') . ')$/i', '', $pathinfo); + } else { + // 允许任何后缀访问 + $this->path = preg_replace('/\.' . $this->ext() . '$/i', '', $pathinfo); + } + } + + return $this->path; + } + + /** + * 当前URL的访问后缀 + * @access public + * @return string + */ + public function ext() + { + return pathinfo($this->pathinfo(), PATHINFO_EXTENSION); + } + + /** + * 获取当前请求的时间 + * @access public + * @param bool $float 是否使用浮点类型 + * @return integer|float + */ + public function time($float = false) + { + return $float ? $this->server('REQUEST_TIME_FLOAT') : $this->server('REQUEST_TIME'); + } + + /** + * 当前请求的资源类型 + * @access public + * @return false|string + */ + public function type() + { + $accept = $this->server('HTTP_ACCEPT'); + + if (empty($accept)) { + return false; + } + + foreach ($this->mimeType as $key => $val) { + $array = explode(',', $val); + foreach ($array as $k => $v) { + if (stristr($accept, $v)) { + return $key; + } + } + } + + return false; + } + + /** + * 设置资源类型 + * @access public + * @param string|array $type 资源类型名 + * @param string $val 资源类型 + * @return void + */ + public function mimeType($type, $val = '') + { + if (is_array($type)) { + $this->mimeType = array_merge($this->mimeType, $type); + } else { + $this->mimeType[$type] = $val; + } + } + + /** + * 当前的请求类型 + * @access public + * @param bool $origin 是否获取原始请求类型 + * @return string + */ + public function method($origin = false) + { + if ($origin) { + // 获取原始请求类型 + return $this->server('REQUEST_METHOD') ?: 'GET'; + } elseif (!$this->method) { + if (isset($_POST[$this->config['var_method']])) { + $method = strtolower($_POST[$this->config['var_method']]); + if (in_array($method, ['get', 'post', 'put', 'patch', 'delete'])) { + $this->method = strtoupper($method); + $this->{$method} = $_POST; + } else { + $this->method = 'POST'; + } + unset($_POST[$this->config['var_method']]); + } elseif ($this->server('HTTP_X_HTTP_METHOD_OVERRIDE')) { + $this->method = strtoupper($this->server('HTTP_X_HTTP_METHOD_OVERRIDE')); + } else { + $this->method = $this->server('REQUEST_METHOD') ?: 'GET'; + } + } + + return $this->method; + } + + /** + * 是否为GET请求 + * @access public + * @return bool + */ + public function isGet() + { + return $this->method() == 'GET'; + } + + /** + * 是否为POST请求 + * @access public + * @return bool + */ + public function isPost() + { + return $this->method() == 'POST'; + } + + /** + * 是否为PUT请求 + * @access public + * @return bool + */ + public function isPut() + { + return $this->method() == 'PUT'; + } + + /** + * 是否为DELTE请求 + * @access public + * @return bool + */ + public function isDelete() + { + return $this->method() == 'DELETE'; + } + + /** + * 是否为HEAD请求 + * @access public + * @return bool + */ + public function isHead() + { + return $this->method() == 'HEAD'; + } + + /** + * 是否为PATCH请求 + * @access public + * @return bool + */ + public function isPatch() + { + return $this->method() == 'PATCH'; + } + + /** + * 是否为OPTIONS请求 + * @access public + * @return bool + */ + public function isOptions() + { + return $this->method() == 'OPTIONS'; + } + + /** + * 是否为cli + * @access public + * @return bool + */ + public function isCli() + { + return PHP_SAPI == 'cli'; + } + + /** + * 是否为cgi + * @access public + * @return bool + */ + public function isCgi() + { + return strpos(PHP_SAPI, 'cgi') === 0; + } + + /** + * 获取当前请求的参数 + * @access public + * @param mixed $name 变量名 + * @param mixed $default 默认值 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function param($name = '', $default = null, $filter = '') + { + if (!$this->mergeParam) { + $method = $this->method(true); + + // 自动获取请求变量 + switch ($method) { + case 'POST': + $vars = $this->post(false); + break; + case 'PUT': + case 'DELETE': + case 'PATCH': + $vars = $this->put(false); + break; + default: + $vars = []; + } + + // 当前请求参数和URL地址中的参数合并 + $this->param = array_merge($this->param, $this->get(false), $vars, $this->route(false)); + + $this->mergeParam = true; + } + + if (true === $name) { + // 获取包含文件上传信息的数组 + $file = $this->file(); + $data = is_array($file) ? array_merge($this->param, $file) : $this->param; + + return $this->input($data, '', $default, $filter); + } + + return $this->input($this->param, $name, $default, $filter); + } + + /** + * 设置路由变量 + * @access public + * @param array $route 路由变量 + * @return $this + */ + public function setRouteVars(array $route) + { + $this->route = array_merge($this->route, $route); + return $this; + } + + /** + * 获取路由参数 + * @access public + * @param string|false $name 变量名 + * @param mixed $default 默认值 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function route($name = '', $default = null, $filter = '') + { + return $this->input($this->route, $name, $default, $filter); + } + + /** + * 获取GET参数 + * @access public + * @param string|false $name 变量名 + * @param mixed $default 默认值 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function get($name = '', $default = null, $filter = '') + { + if (empty($this->get)) { + $this->get = $_GET; + } + + return $this->input($this->get, $name, $default, $filter); + } + + /** + * 获取POST参数 + * @access public + * @param string|false $name 变量名 + * @param mixed $default 默认值 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function post($name = '', $default = null, $filter = '') + { + if (empty($this->post)) { + $this->post = !empty($_POST) ? $_POST : $this->getInputData($this->input); + } + + return $this->input($this->post, $name, $default, $filter); + } + + /** + * 获取PUT参数 + * @access public + * @param string|false $name 变量名 + * @param mixed $default 默认值 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function put($name = '', $default = null, $filter = '') + { + if (is_null($this->put)) { + $this->put = $this->getInputData($this->input); + } + + return $this->input($this->put, $name, $default, $filter); + } + + protected function getInputData($content) + { + if ($this->isJson()) { + return (array) json_decode($content, true); + } elseif (strpos($content, '=')) { + parse_str($content, $data); + return $data; + } + + return []; + } + + /** + * 获取DELETE参数 + * @access public + * @param string|false $name 变量名 + * @param mixed $default 默认值 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function delete($name = '', $default = null, $filter = '') + { + return $this->put($name, $default, $filter); + } + + /** + * 获取PATCH参数 + * @access public + * @param string|false $name 变量名 + * @param mixed $default 默认值 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function patch($name = '', $default = null, $filter = '') + { + return $this->put($name, $default, $filter); + } + + /** + * 获取request变量 + * @access public + * @param string|false $name 变量名 + * @param mixed $default 默认值 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function request($name = '', $default = null, $filter = '') + { + if (empty($this->request)) { + $this->request = $_REQUEST; + } + + return $this->input($this->request, $name, $default, $filter); + } + + /** + * 获取session数据 + * @access public + * @param string $name 数据名称 + * @param string $default 默认值 + * @return mixed + */ + public function session($name = '', $default = null) + { + if (empty($this->session)) { + $this->session = Session::get(); + } + + if ('' === $name) { + return $this->session; + } + + $data = $this->getData($this->session, $name); + + return is_null($data) ? $default : $data; + } + + /** + * 获取cookie参数 + * @access public + * @param string $name 变量名 + * @param string $default 默认值 + * @param string|array $filter 过滤方法 + * @return mixed + */ + public function cookie($name = '', $default = null, $filter = '') + { + if (empty($this->cookie)) { + $this->cookie = Cookie::get(); + } + + if (!empty($name)) { + $data = Cookie::has($name) ? Cookie::get($name) : $default; + } else { + $data = $this->cookie; + } + + // 解析过滤器 + $filter = $this->getFilter($filter, $default); + + if (is_array($data)) { + array_walk_recursive($data, [$this, 'filterValue'], $filter); + reset($data); + } else { + $this->filterValue($data, $name, $filter); + } + + return $data; + } + + /** + * 获取server参数 + * @access public + * @param string $name 数据名称 + * @param string $default 默认值 + * @return mixed + */ + public function server($name = '', $default = null) + { + if (empty($name)) { + return $this->server; + } else { + $name = strtoupper($name); + } + + return isset($this->server[$name]) ? $this->server[$name] : $default; + } + + /** + * 获取上传的文件信息 + * @access public + * @param string $name 名称 + * @return null|array|\think\File + */ + public function file($name = '') + { + if (empty($this->file)) { + $this->file = isset($_FILES) ? $_FILES : []; + } + + $files = $this->file; + if (!empty($files)) { + if (strpos($name, '.')) { + list($name, $sub) = explode('.', $name); + } + + // 处理上传文件 + $array = $this->dealUploadFile($files, $name); + + if ('' === $name) { + // 获取全部文件 + return $array; + } elseif (isset($sub) && isset($array[$name][$sub])) { + return $array[$name][$sub]; + } elseif (isset($array[$name])) { + return $array[$name]; + } + } + + return; + } + + protected function dealUploadFile($files, $name) + { + $array = []; + foreach ($files as $key => $file) { + if ($file instanceof File) { + $array[$key] = $file; + } elseif (is_array($file['name'])) { + $item = []; + $keys = array_keys($file); + $count = count($file['name']); + + for ($i = 0; $i < $count; $i++) { + if ($file['error'][$i] > 0) { + if ($name == $key) { + $this->throwUploadFileError($file['error'][$i]); + } else { + continue; + } + } + + $temp['key'] = $key; + + foreach ($keys as $_key) { + $temp[$_key] = $file[$_key][$i]; + } + + $item[] = (new File($temp['tmp_name']))->setUploadInfo($temp); + } + + $array[$key] = $item; + } else { + if ($file['error'] > 0) { + if ($key == $name) { + $this->throwUploadFileError($file['error']); + } else { + continue; + } + } + + $array[$key] = (new File($file['tmp_name']))->setUploadInfo($file); + } + } + + return $array; + } + + protected function throwUploadFileError($error) + { + static $fileUploadErrors = [ + 1 => 'upload File size exceeds the maximum value', + 2 => 'upload File size exceeds the maximum value', + 3 => 'only the portion of file is uploaded', + 4 => 'no file to uploaded', + 6 => 'upload temp dir not found', + 7 => 'file write error', + ]; + + $msg = $fileUploadErrors[$error]; + + throw new Exception($msg); + } + + /** + * 获取环境变量 + * @access public + * @param string $name 数据名称 + * @param string $default 默认值 + * @return mixed + */ + public function env($name = '', $default = null) + { + if (empty($name)) { + return $this->env; + } else { + $name = strtoupper($name); + } + + return isset($this->env[$name]) ? $this->env[$name] : $default; + } + + /** + * 获取当前的Header + * @access public + * @param string $name header名称 + * @param string $default 默认值 + * @return string|array + */ + public function header($name = '', $default = null) + { + if (empty($this->header)) { + $header = []; + if (function_exists('apache_request_headers') && $result = apache_request_headers()) { + $header = $result; + } else { + $server = $this->server; + foreach ($server as $key => $val) { + if (0 === strpos($key, 'HTTP_')) { + $key = str_replace('_', '-', strtolower(substr($key, 5))); + $header[$key] = $val; + } + } + if (isset($server['CONTENT_TYPE'])) { + $header['content-type'] = $server['CONTENT_TYPE']; + } + if (isset($server['CONTENT_LENGTH'])) { + $header['content-length'] = $server['CONTENT_LENGTH']; + } + } + $this->header = array_change_key_case($header); + } + + if ('' === $name) { + return $this->header; + } + + $name = str_replace('_', '-', strtolower($name)); + + return isset($this->header[$name]) ? $this->header[$name] : $default; + } + + /** + * 递归重置数组指针 + * @access public + * @param array $data 数据源 + * @return void + */ + public function arrayReset(array &$data) + { + foreach ($data as &$value) { + if (is_array($value)) { + $this->arrayReset($value); + } + } + reset($data); + } + + /** + * 获取变量 支持过滤和默认值 + * @access public + * @param array $data 数据源 + * @param string|false $name 字段名 + * @param mixed $default 默认值 + * @param string|array $filter 过滤函数 + * @return mixed + */ + public function input($data = [], $name = '', $default = null, $filter = '') + { + if (false === $name) { + // 获取原始数据 + return $data; + } + + $name = (string) $name; + if ('' != $name) { + // 解析name + if (strpos($name, '/')) { + list($name, $type) = explode('/', $name); + } + + $data = $this->getData($data, $name); + + if (is_null($data)) { + return $default; + } + + if (is_object($data)) { + return $data; + } + } + + // 解析过滤器 + $filter = $this->getFilter($filter, $default); + + if (is_array($data)) { + array_walk_recursive($data, [$this, 'filterValue'], $filter); + if (version_compare(PHP_VERSION, '7.1.0', '<')) { + // 恢复PHP版本低于 7.1 时 array_walk_recursive 中消耗的内部指针 + $this->arrayReset($data); + } + } else { + $this->filterValue($data, $name, $filter); + } + + if (isset($type) && $data !== $default) { + // 强制类型转换 + $this->typeCast($data, $type); + } + + return $data; + } + + /** + * 获取数据 + * @access public + * @param array $data 数据源 + * @param string|false $name 字段名 + * @return mixed + */ + protected function getData(array $data, $name) + { + foreach (explode('.', $name) as $val) { + if (isset($data[$val])) { + $data = $data[$val]; + } else { + return; + } + } + + return $data; + } + + /** + * 设置或获取当前的过滤规则 + * @access public + * @param mixed $filter 过滤规则 + * @return mixed + */ + public function filter($filter = null) + { + if (is_null($filter)) { + return $this->filter; + } + + $this->filter = $filter; + } + + protected function getFilter($filter, $default) + { + if (is_null($filter)) { + $filter = []; + } else { + $filter = $filter ?: $this->filter; + if (is_string($filter) && false === strpos($filter, '/')) { + $filter = explode(',', $filter); + } else { + $filter = (array) $filter; + } + } + + $filter[] = $default; + + return $filter; + } + + /** + * 递归过滤给定的值 + * @access public + * @param mixed $value 键值 + * @param mixed $key 键名 + * @param array $filters 过滤方法+默认值 + * @return mixed + */ + private function filterValue(&$value, $key, $filters) + { + $default = array_pop($filters); + + foreach ($filters as $filter) { + if (is_callable($filter)) { + // 调用函数或者方法过滤 + $value = call_user_func($filter, $value); + } elseif (is_scalar($value)) { + if (false !== strpos($filter, '/')) { + // 正则过滤 + if (!preg_match($filter, $value)) { + // 匹配不成功返回默认值 + $value = $default; + break; + } + } elseif (!empty($filter)) { + // filter函数不存在时, 则使用filter_var进行过滤 + // filter为非整形值时, 调用filter_id取得过滤id + $value = filter_var($value, is_int($filter) ? $filter : filter_id($filter)); + if (false === $value) { + $value = $default; + break; + } + } + } + } + + return $value; + } + + /** + * 强制类型转换 + * @access public + * @param string $data + * @param string $type + * @return mixed + */ + private function typeCast(&$data, $type) + { + switch (strtolower($type)) { + // 数组 + case 'a': + $data = (array) $data; + break; + // 数字 + case 'd': + $data = (int) $data; + break; + // 浮点 + case 'f': + $data = (float) $data; + break; + // 布尔 + case 'b': + $data = (boolean) $data; + break; + // 字符串 + case 's': + if (is_scalar($data)) { + $data = (string) $data; + } else { + throw new \InvalidArgumentException('variable type error:' . gettype($data)); + } + break; + } + } + + /** + * 是否存在某个请求参数 + * @access public + * @param string $name 变量名 + * @param string $type 变量类型 + * @param bool $checkEmpty 是否检测空值 + * @return mixed + */ + public function has($name, $type = 'param', $checkEmpty = false) + { + if (!in_array($type, ['param', 'get', 'post', 'request', 'put', 'patch', 'file', 'session', 'cookie', 'env', 'header', 'route'])) { + return false; + } + + if (empty($this->$type)) { + $param = $this->$type(); + } else { + $param = $this->$type; + } + + // 按.拆分成多维数组进行判断 + foreach (explode('.', $name) as $val) { + if (isset($param[$val])) { + $param = $param[$val]; + } else { + return false; + } + } + + return ($checkEmpty && '' === $param) ? false : true; + } + + /** + * 获取指定的参数 + * @access public + * @param string|array $name 变量名 + * @param string $type 变量类型 + * @return mixed + */ + public function only($name, $type = 'param') + { + $param = $this->$type(); + + if (is_string($name)) { + $name = explode(',', $name); + } + + $item = []; + foreach ($name as $key => $val) { + + if (is_int($key)) { + $default = null; + $key = $val; + } else { + $default = $val; + } + + if (isset($param[$key])) { + $item[$key] = $param[$key]; + } elseif (isset($default)) { + $item[$key] = $default; + } + } + + return $item; + } + + /** + * 排除指定参数获取 + * @access public + * @param string|array $name 变量名 + * @param string $type 变量类型 + * @return mixed + */ + public function except($name, $type = 'param') + { + $param = $this->$type(); + if (is_string($name)) { + $name = explode(',', $name); + } + + foreach ($name as $key) { + if (isset($param[$key])) { + unset($param[$key]); + } + } + + return $param; + } + + /** + * 当前是否ssl + * @access public + * @return bool + */ + public function isSsl() + { + if ($this->server('HTTPS') && ('1' == $this->server('HTTPS') || 'on' == strtolower($this->server('HTTPS')))) { + return true; + } elseif ('https' == $this->server('REQUEST_SCHEME')) { + return true; + } elseif ('443' == $this->server('SERVER_PORT')) { + return true; + } elseif ('https' == $this->server('HTTP_X_FORWARDED_PROTO')) { + return true; + } elseif ($this->config['https_agent_name'] && $this->server($this->config['https_agent_name'])) { + return true; + } + + return false; + } + + /** + * 当前是否JSON请求 + * @access public + * @return bool + */ + public function isJson() + { + $contentType = $this->contentType(); + $acceptType = $this->type(); + + return false !== strpos($contentType, 'json') || false !== strpos($acceptType, 'json'); + } + + /** + * 当前是否Ajax请求 + * @access public + * @param bool $ajax true 获取原始ajax请求 + * @return bool + */ + public function isAjax($ajax = false) + { + $value = $this->server('HTTP_X_REQUESTED_WITH'); + $result = 'xmlhttprequest' == strtolower($value) ? true : false; + + if (true === $ajax) { + return $result; + } + + $result = $this->param($this->config['var_ajax']) ? true : $result; + $this->mergeParam = false; + return $result; + } + + /** + * 当前是否Pjax请求 + * @access public + * @param bool $pjax true 获取原始pjax请求 + * @return bool + */ + public function isPjax($pjax = false) + { + $result = !is_null($this->server('HTTP_X_PJAX')) ? true : false; + + if (true === $pjax) { + return $result; + } + + $result = $this->param($this->config['var_pjax']) ? true : $result; + $this->mergeParam = false; + return $result; + } + + /** + * 获取客户端IP地址 + * @access public + * @param integer $type 返回类型 0 返回IP地址 1 返回IPV4地址数字 + * @param boolean $adv 是否进行高级模式获取(有可能被伪装) + * @return mixed + */ + public function ip($type = 0, $adv = true) + { + $type = $type ? 1 : 0; + static $ip = null; + + if (null !== $ip) { + return $ip[$type]; + } + + $httpAgentIp = $this->config['http_agent_ip']; + + if ($httpAgentIp && $this->server($httpAgentIp)) { + $ip = $this->server($httpAgentIp); + } elseif ($adv) { + if ($this->server('HTTP_X_FORWARDED_FOR')) { + $arr = explode(',', $this->server('HTTP_X_FORWARDED_FOR')); + $pos = array_search('unknown', $arr); + if (false !== $pos) { + unset($arr[$pos]); + } + $ip = trim(current($arr)); + } elseif ($this->server('HTTP_CLIENT_IP')) { + $ip = $this->server('HTTP_CLIENT_IP'); + } elseif ($this->server('REMOTE_ADDR')) { + $ip = $this->server('REMOTE_ADDR'); + } + } elseif ($this->server('REMOTE_ADDR')) { + $ip = $this->server('REMOTE_ADDR'); + } + + // IP地址类型 + $ip_mode = (strpos($ip, ':') === false) ? 'ipv4' : 'ipv6'; + + // IP地址合法验证 + if (filter_var($ip, FILTER_VALIDATE_IP) !== $ip) { + $ip = ('ipv4' === $ip_mode) ? '0.0.0.0' : '::'; + } + + // 如果是ipv4地址,则直接使用ip2long返回int类型ip;如果是ipv6地址,暂时不支持,直接返回0 + $long_ip = ('ipv4' === $ip_mode) ? sprintf("%u", ip2long($ip)) : 0; + + $ip = [$ip, $long_ip]; + + return $ip[$type]; + } + + /** + * 检测是否使用手机访问 + * @access public + * @return bool + */ + public function isMobile() + { + if ($this->server('HTTP_VIA') && stristr($this->server('HTTP_VIA'), "wap")) { + return true; + } elseif ($this->server('HTTP_ACCEPT') && strpos(strtoupper($this->server('HTTP_ACCEPT')), "VND.WAP.WML")) { + return true; + } elseif ($this->server('HTTP_X_WAP_PROFILE') || $this->server('HTTP_PROFILE')) { + return true; + } elseif ($this->server('HTTP_USER_AGENT') && preg_match('/(blackberry|configuration\/cldc|hp |hp-|htc |htc_|htc-|iemobile|kindle|midp|mmp|motorola|mobile|nokia|opera mini|opera |Googlebot-Mobile|YahooSeeker\/M1A1-R2D2|android|iphone|ipod|mobi|palm|palmos|pocket|portalmmm|ppc;|smartphone|sonyericsson|sqh|spv|symbian|treo|up.browser|up.link|vodafone|windows ce|xda |xda_)/i', $this->server('HTTP_USER_AGENT'))) { + return true; + } + + return false; + } + + /** + * 当前URL地址中的scheme参数 + * @access public + * @return string + */ + public function scheme() + { + return $this->isSsl() ? 'https' : 'http'; + } + + /** + * 当前请求URL地址中的query参数 + * @access public + * @return string + */ + public function query() + { + return $this->server('QUERY_STRING'); + } + + /** + * 设置当前请求的host(包含端口) + * @access public + * @param string $host 主机名(含端口) + * @return $this + */ + public function setHost($host) + { + $this->host = $host; + + return $this; + } + + /** + * 当前请求的host + * @access public + * @param bool $strict true 仅仅获取HOST + * @return string + */ + public function host($strict = false) + { + if (!$this->host) { + $this->host = $this->server('HTTP_X_REAL_HOST') ?: $this->server('HTTP_HOST'); + } + + return true === $strict && strpos($this->host, ':') ? strstr($this->host, ':', true) : $this->host; + } + + /** + * 当前请求URL地址中的port参数 + * @access public + * @return integer + */ + public function port() + { + return $this->server('SERVER_PORT'); + } + + /** + * 当前请求 SERVER_PROTOCOL + * @access public + * @return string + */ + public function protocol() + { + return $this->server('SERVER_PROTOCOL'); + } + + /** + * 当前请求 REMOTE_PORT + * @access public + * @return integer + */ + public function remotePort() + { + return $this->server('REMOTE_PORT'); + } + + /** + * 当前请求 HTTP_CONTENT_TYPE + * @access public + * @return string + */ + public function contentType() + { + $contentType = $this->server('CONTENT_TYPE'); + + if ($contentType) { + if (strpos($contentType, ';')) { + list($type) = explode(';', $contentType); + } else { + $type = $contentType; + } + return trim($type); + } + + return ''; + } + + /** + * 获取当前请求的路由信息 + * @access public + * @param array $route 路由名称 + * @return array + */ + public function routeInfo(array $route = []) + { + if (!empty($route)) { + $this->routeInfo = $route; + } + + return $this->routeInfo; + } + + /** + * 设置或者获取当前请求的调度信息 + * @access public + * @param \think\route\Dispatch $dispatch 调度信息 + * @return \think\route\Dispatch + */ + public function dispatch($dispatch = null) + { + if (!is_null($dispatch)) { + $this->dispatch = $dispatch; + } + + return $this->dispatch; + } + + /** + * 获取当前请求的安全Key + * @access public + * @return string + */ + public function secureKey() + { + if (is_null($this->secureKey)) { + $this->secureKey = uniqid('', true); + } + + return $this->secureKey; + } + + /** + * 设置当前的模块名 + * @access public + * @param string $module 模块名 + * @return $this + */ + public function setModule($module) + { + $this->module = $module; + return $this; + } + + /** + * 设置当前的控制器名 + * @access public + * @param string $controller 控制器名 + * @return $this + */ + public function setController($controller) + { + $this->controller = $controller; + return $this; + } + + /** + * 设置当前的操作名 + * @access public + * @param string $action 操作名 + * @return $this + */ + public function setAction($action) + { + $this->action = $action; + return $this; + } + + /** + * 获取当前的模块名 + * @access public + * @return string + */ + public function module() + { + return $this->module ?: ''; + } + + /** + * 获取当前的控制器名 + * @access public + * @param bool $convert 转换为小写 + * @return string + */ + public function controller($convert = false) + { + $name = $this->controller ?: ''; + return $convert ? strtolower($name) : $name; + } + + /** + * 获取当前的操作名 + * @access public + * @param bool $convert 转换为驼峰 + * @return string + */ + public function action($convert = false) + { + $name = $this->action ?: ''; + return $convert ? $name : strtolower($name); + } + + /** + * 设置当前的语言 + * @access public + * @param string $lang 语言名 + * @return $this + */ + public function setLangset($lang) + { + $this->langset = $lang; + return $this; + } + + /** + * 获取当前的语言 + * @access public + * @return string + */ + public function langset() + { + return $this->langset ?: ''; + } + + /** + * 设置或者获取当前请求的content + * @access public + * @return string + */ + public function getContent() + { + if (is_null($this->content)) { + $this->content = $this->input; + } + + return $this->content; + } + + /** + * 获取当前请求的php://input + * @access public + * @return string + */ + public function getInput() + { + return $this->input; + } + + /** + * 生成请求令牌 + * @access public + * @param string $name 令牌名称 + * @param mixed $type 令牌生成方法 + * @return string + */ + public function token($name = '__token__', $type = null) + { + $type = is_callable($type) ? $type : 'md5'; + $token = call_user_func($type, $this->server('REQUEST_TIME_FLOAT')); + + if ($this->isAjax()) { + header($name . ': ' . $token); + } + + facade\Session::set($name, $token); + + return $token; + } + + /** + * 设置当前地址的请求缓存 + * @access public + * @param string $key 缓存标识,支持变量规则 ,例如 item/:name/:id + * @param mixed $expire 缓存有效期 + * @param array $except 缓存排除 + * @param string $tag 缓存标签 + * @return mixed + */ + public function cache($key, $expire = null, $except = [], $tag = null) + { + if (!is_array($except)) { + $tag = $except; + $except = []; + } + + if (false === $key || !$this->isGet() || $this->isCheckCache || false === $expire) { + // 关闭当前缓存 + return; + } + + // 标记请求缓存检查 + $this->isCheckCache = true; + + foreach ($except as $rule) { + if (0 === stripos($this->url(), $rule)) { + return; + } + } + + if ($key instanceof \Closure) { + $key = call_user_func_array($key, [$this]); + } elseif (true === $key) { + // 自动缓存功能 + $key = '__URL__'; + } elseif (strpos($key, '|')) { + list($key, $fun) = explode('|', $key); + } + + // 特殊规则替换 + if (false !== strpos($key, '__')) { + $key = str_replace(['__MODULE__', '__CONTROLLER__', '__ACTION__', '__URL__'], [$this->module, $this->controller, $this->action, md5($this->url(true))], $key); + } + + if (false !== strpos($key, ':')) { + $param = $this->param(); + foreach ($param as $item => $val) { + if (is_string($val) && false !== strpos($key, ':' . $item)) { + $key = str_replace(':' . $item, $val, $key); + } + } + } elseif (strpos($key, ']')) { + if ('[' . $this->ext() . ']' == $key) { + // 缓存某个后缀的请求 + $key = md5($this->url()); + } else { + return; + } + } + + if (isset($fun)) { + $key = $fun($key); + } + + $this->cache = [$key, $expire, $tag]; + return $this->cache; + } + + /** + * 读取请求缓存设置 + * @access public + * @return array + */ + public function getCache() + { + return $this->cache; + } + + /** + * 设置GET数据 + * @access public + * @param array $get 数据 + * @return $this + */ + public function withGet(array $get) + { + $this->get = $get; + return $this; + } + + /** + * 设置POST数据 + * @access public + * @param array $post 数据 + * @return $this + */ + public function withPost(array $post) + { + $this->post = $post; + return $this; + } + + /** + * 设置php://input数据 + * @access public + * @param string $input RAW数据 + * @return $this + */ + public function withInput($input) + { + $this->input = $input; + return $this; + } + + /** + * 设置文件上传数据 + * @access public + * @param array $files 上传信息 + * @return $this + */ + public function withFiles(array $files) + { + $this->file = $files; + return $this; + } + + /** + * 设置COOKIE数据 + * @access public + * @param array $cookie 数据 + * @return $this + */ + public function withCookie(array $cookie) + { + $this->cookie = $cookie; + return $this; + } + + /** + * 设置SERVER数据 + * @access public + * @param array $server 数据 + * @return $this + */ + public function withServer(array $server) + { + $this->server = array_change_key_case($server, CASE_UPPER); + return $this; + } + + /** + * 设置HEADER数据 + * @access public + * @param array $header 数据 + * @return $this + */ + public function withHeader(array $header) + { + $this->header = array_change_key_case($header); + return $this; + } + + /** + * 设置ENV数据 + * @access public + * @param array $env 数据 + * @return $this + */ + public function withEnv(array $env) + { + $this->env = $env; + return $this; + } + + /** + * 设置ROUTE变量 + * @access public + * @param array $route 数据 + * @return $this + */ + public function withRoute(array $route) + { + $this->route = $route; + return $this; + } + + /** + * 设置请求数据 + * @access public + * @param string $name 参数名 + * @param mixed $value 值 + */ + public function __set($name, $value) + { + return $this->param[$name] = $value; + } + + /** + * 获取请求数据的值 + * @access public + * @param string $name 参数名 + * @return mixed + */ + public function __get($name) + { + return $this->param($name); + } + + /** + * 检测请求数据的值 + * @access public + * @param string $name 名称 + * @return boolean + */ + public function __isset($name) + { + return isset($this->param[$name]); + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['dispatch'], $data['config']); + + return $data; + } +} diff --git a/thinkphp/library/think/Response.php b/thinkphp/library/think/Response.php new file mode 100755 index 0000000..5fa5402 --- /dev/null +++ b/thinkphp/library/think/Response.php @@ -0,0 +1,429 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\response\Redirect as RedirectResponse; + +class Response +{ + /** + * 原始数据 + * @var mixed + */ + protected $data; + + /** + * 应用对象实例 + * @var App + */ + protected $app; + + /** + * 当前contentType + * @var string + */ + protected $contentType = 'text/html'; + + /** + * 字符集 + * @var string + */ + protected $charset = 'utf-8'; + + /** + * 状态码 + * @var integer + */ + protected $code = 200; + + /** + * 是否允许请求缓存 + * @var bool + */ + protected $allowCache = true; + + /** + * 输出参数 + * @var array + */ + protected $options = []; + + /** + * header参数 + * @var array + */ + protected $header = []; + + /** + * 输出内容 + * @var string + */ + protected $content = null; + + /** + * 架构函数 + * @access public + * @param mixed $data 输出数据 + * @param int $code + * @param array $header + * @param array $options 输出参数 + */ + public function __construct($data = '', $code = 200, array $header = [], $options = []) + { + $this->data($data); + + if (!empty($options)) { + $this->options = array_merge($this->options, $options); + } + + $this->contentType($this->contentType, $this->charset); + + $this->code = $code; + $this->app = Container::get('app'); + $this->header = array_merge($this->header, $header); + } + + /** + * 创建Response对象 + * @access public + * @param mixed $data 输出数据 + * @param string $type 输出类型 + * @param int $code + * @param array $header + * @param array $options 输出参数 + * @return Response + */ + public static function create($data = '', $type = '', $code = 200, array $header = [], $options = []) + { + $class = false !== strpos($type, '\\') ? $type : '\\think\\response\\' . ucfirst(strtolower($type)); + + if (class_exists($class)) { + return new $class($data, $code, $header, $options); + } + + return new static($data, $code, $header, $options); + } + + /** + * 发送数据到客户端 + * @access public + * @return void + * @throws \InvalidArgumentException + */ + public function send() + { + // 监听response_send + $this->app['hook']->listen('response_send', $this); + + // 处理输出数据 + $data = $this->getContent(); + + // Trace调试注入 + if ('cli' != PHP_SAPI && $this->app['env']->get('app_trace', $this->app->config('app.app_trace'))) { + $this->app['debug']->inject($this, $data); + } + + if (200 == $this->code && $this->allowCache) { + $cache = $this->app['request']->getCache(); + if ($cache) { + $this->header['Cache-Control'] = 'max-age=' . $cache[1] . ',must-revalidate'; + $this->header['Last-Modified'] = gmdate('D, d M Y H:i:s') . ' GMT'; + $this->header['Expires'] = gmdate('D, d M Y H:i:s', $_SERVER['REQUEST_TIME'] + $cache[1]) . ' GMT'; + + $this->app['cache']->tag($cache[2])->set($cache[0], [$data, $this->header], $cache[1]); + } + } + + if (!headers_sent() && !empty($this->header)) { + // 发送状态码 + http_response_code($this->code); + // 发送头部信息 + foreach ($this->header as $name => $val) { + header($name . (!is_null($val) ? ':' . $val : '')); + } + } + + $this->sendData($data); + + if (function_exists('fastcgi_finish_request')) { + // 提高页面响应 + fastcgi_finish_request(); + } + + // 监听response_end + $this->app['hook']->listen('response_end', $this); + + // 清空当次请求有效的数据 + if (!($this instanceof RedirectResponse)) { + $this->app['session']->flush(); + } + } + + /** + * 处理数据 + * @access protected + * @param mixed $data 要处理的数据 + * @return mixed + */ + protected function output($data) + { + return $data; + } + + /** + * 输出数据 + * @access protected + * @param string $data 要处理的数据 + * @return void + */ + protected function sendData($data) + { + echo $data; + } + + /** + * 输出的参数 + * @access public + * @param mixed $options 输出参数 + * @return $this + */ + public function options($options = []) + { + $this->options = array_merge($this->options, $options); + + return $this; + } + + /** + * 输出数据设置 + * @access public + * @param mixed $data 输出数据 + * @return $this + */ + public function data($data) + { + $this->data = $data; + + return $this; + } + + /** + * 是否允许请求缓存 + * @access public + * @param bool $cache 允许请求缓存 + * @return $this + */ + public function allowCache($cache) + { + $this->allowCache = $cache; + + return $this; + } + + /** + * 设置响应头 + * @access public + * @param string|array $name 参数名 + * @param string $value 参数值 + * @return $this + */ + public function header($name, $value = null) + { + if (is_array($name)) { + $this->header = array_merge($this->header, $name); + } else { + $this->header[$name] = $value; + } + + return $this; + } + + /** + * 设置页面输出内容 + * @access public + * @param mixed $content + * @return $this + */ + public function content($content) + { + if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable([ + $content, + '__toString', + ]) + ) { + throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content))); + } + + $this->content = (string) $content; + + return $this; + } + + /** + * 发送HTTP状态 + * @access public + * @param integer $code 状态码 + * @return $this + */ + public function code($code) + { + $this->code = $code; + + return $this; + } + + /** + * LastModified + * @access public + * @param string $time + * @return $this + */ + public function lastModified($time) + { + $this->header['Last-Modified'] = $time; + + return $this; + } + + /** + * Expires + * @access public + * @param string $time + * @return $this + */ + public function expires($time) + { + $this->header['Expires'] = $time; + + return $this; + } + + /** + * ETag + * @access public + * @param string $eTag + * @return $this + */ + public function eTag($eTag) + { + $this->header['ETag'] = $eTag; + + return $this; + } + + /** + * 页面缓存控制 + * @access public + * @param string $cache 缓存设置 + * @return $this + */ + public function cacheControl($cache) + { + $this->header['Cache-control'] = $cache; + + return $this; + } + + /** + * 设置页面不做任何缓存 + * @access public + * @return $this + */ + public function noCache() + { + $this->header['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0'; + $this->header['Pragma'] = 'no-cache'; + + return $this; + } + + /** + * 页面输出类型 + * @access public + * @param string $contentType 输出类型 + * @param string $charset 输出编码 + * @return $this + */ + public function contentType($contentType, $charset = 'utf-8') + { + $this->header['Content-Type'] = $contentType . '; charset=' . $charset; + + return $this; + } + + /** + * 获取头部信息 + * @access public + * @param string $name 头部名称 + * @return mixed + */ + public function getHeader($name = '') + { + if (!empty($name)) { + return isset($this->header[$name]) ? $this->header[$name] : null; + } + + return $this->header; + } + + /** + * 获取原始数据 + * @access public + * @return mixed + */ + public function getData() + { + return $this->data; + } + + /** + * 获取输出数据 + * @access public + * @return mixed + */ + public function getContent() + { + if (null == $this->content) { + $content = $this->output($this->data); + + if (null !== $content && !is_string($content) && !is_numeric($content) && !is_callable([ + $content, + '__toString', + ]) + ) { + throw new \InvalidArgumentException(sprintf('variable type error: %s', gettype($content))); + } + + $this->content = (string) $content; + } + + return $this->content; + } + + /** + * 获取状态码 + * @access public + * @return integer + */ + public function getCode() + { + return $this->code; + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app']); + + return $data; + } +} diff --git a/thinkphp/library/think/Route.php b/thinkphp/library/think/Route.php new file mode 100755 index 0000000..44af987 --- /dev/null +++ b/thinkphp/library/think/Route.php @@ -0,0 +1,990 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\exception\RouteNotFoundException; +use think\route\AliasRule; +use think\route\dispatch\Url as UrlDispatch; +use think\route\Domain; +use think\route\Resource; +use think\route\RuleGroup; +use think\route\RuleItem; + +class Route +{ + /** + * REST定义 + * @var array + */ + protected $rest = [ + 'index' => ['get', '', 'index'], + 'create' => ['get', '/create', 'create'], + 'edit' => ['get', '//edit', 'edit'], + 'read' => ['get', '/', 'read'], + 'save' => ['post', '', 'save'], + 'update' => ['put', '/', 'update'], + 'delete' => ['delete', '/', 'delete'], + ]; + + /** + * 请求方法前缀定义 + * @var array + */ + protected $methodPrefix = [ + 'get' => 'get', + 'post' => 'post', + 'put' => 'put', + 'delete' => 'delete', + 'patch' => 'patch', + ]; + + /** + * 应用对象 + * @var App + */ + protected $app; + + /** + * 请求对象 + * @var Request + */ + protected $request; + + /** + * 当前HOST + * @var string + */ + protected $host; + + /** + * 当前域名 + * @var string + */ + protected $domain; + + /** + * 当前分组对象 + * @var RuleGroup + */ + protected $group; + + /** + * 配置参数 + * @var array + */ + protected $config = []; + + /** + * 路由绑定 + * @var array + */ + protected $bind = []; + + /** + * 域名对象 + * @var array + */ + protected $domains = []; + + /** + * 跨域路由规则 + * @var RuleGroup + */ + protected $cross; + + /** + * 路由别名 + * @var array + */ + protected $alias = []; + + /** + * 路由是否延迟解析 + * @var bool + */ + protected $lazy = true; + + /** + * 路由是否测试模式 + * @var bool + */ + protected $isTest; + + /** + * (分组)路由规则是否合并解析 + * @var bool + */ + protected $mergeRuleRegex = true; + + /** + * 路由解析自动搜索多级控制器 + * @var bool + */ + protected $autoSearchController = true; + + public function __construct(App $app, array $config = []) + { + $this->app = $app; + $this->request = $app['request']; + $this->config = $config; + + $this->host = $this->request->host(true) ?: $config['app_host']; + + $this->setDefaultDomain(); + } + + public function config($name = null) + { + if (is_null($name)) { + return $this->config; + } + + return isset($this->config[$name]) ? $this->config[$name] : null; + } + + /** + * 配置 + * @access public + * @param array $config + * @return void + */ + public function setConfig(array $config = []) + { + $this->config = array_merge($this->config, array_change_key_case($config)); + } + + public static function __make(App $app, Config $config) + { + $config = $config->pull('app'); + $route = new static($app, $config); + + $route->lazy($config['url_lazy_route']) + ->autoSearchController($config['controller_auto_search']) + ->mergeRuleRegex($config['route_rule_merge']); + + return $route; + } + + /** + * 设置路由的请求对象实例 + * @access public + * @param Request $request 请求对象实例 + * @return void + */ + public function setRequest($request) + { + $this->request = $request; + } + + /** + * 设置路由域名及分组(包括资源路由)是否延迟解析 + * @access public + * @param bool $lazy 路由是否延迟解析 + * @return $this + */ + public function lazy($lazy = true) + { + $this->lazy = $lazy; + return $this; + } + + /** + * 设置路由为测试模式 + * @access public + * @param bool $test 路由是否测试模式 + * @return void + */ + public function setTestMode($test) + { + $this->isTest = $test; + } + + /** + * 检查路由是否为测试模式 + * @access public + * @return bool + */ + public function isTest() + { + return $this->isTest; + } + + /** + * 设置路由域名及分组(包括资源路由)是否合并解析 + * @access public + * @param bool $merge 路由是否合并解析 + * @return $this + */ + public function mergeRuleRegex($merge = true) + { + $this->mergeRuleRegex = $merge; + $this->group->mergeRuleRegex($merge); + + return $this; + } + + /** + * 设置路由自动解析是否搜索多级控制器 + * @access public + * @param bool $auto 是否自动搜索多级控制器 + * @return $this + */ + public function autoSearchController($auto = true) + { + $this->autoSearchController = $auto; + return $this; + } + + /** + * 初始化默认域名 + * @access protected + * @return void + */ + protected function setDefaultDomain() + { + // 默认域名 + $this->domain = $this->host; + + // 注册默认域名 + $domain = new Domain($this, $this->host); + + $this->domains[$this->host] = $domain; + + // 默认分组 + $this->group = $domain; + } + + /** + * 设置当前域名 + * @access public + * @param RuleGroup $group 域名 + * @return void + */ + public function setGroup(RuleGroup $group) + { + $this->group = $group; + } + + /** + * 获取当前分组 + * @access public + * @return RuleGroup + */ + public function getGroup() + { + return $this->group; + } + + /** + * 注册变量规则 + * @access public + * @param string|array $name 变量名 + * @param string $rule 变量规则 + * @return $this + */ + public function pattern($name, $rule = '') + { + $this->group->pattern($name, $rule); + + return $this; + } + + /** + * 注册路由参数 + * @access public + * @param string|array $name 参数名 + * @param mixed $value 值 + * @return $this + */ + public function option($name, $value = '') + { + $this->group->option($name, $value); + + return $this; + } + + /** + * 注册域名路由 + * @access public + * @param string|array $name 子域名 + * @param mixed $rule 路由规则 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return Domain + */ + public function domain($name, $rule = '', $option = [], $pattern = []) + { + // 支持多个域名使用相同路由规则 + $domainName = is_array($name) ? array_shift($name) : $name; + + if ('*' != $domainName && false === strpos($domainName, '.')) { + $domainName .= '.' . $this->request->rootDomain(); + } + + if (!isset($this->domains[$domainName])) { + $domain = (new Domain($this, $domainName, $rule, $option, $pattern)) + ->lazy($this->lazy) + ->mergeRuleRegex($this->mergeRuleRegex); + + $this->domains[$domainName] = $domain; + } else { + $domain = $this->domains[$domainName]; + $domain->parseGroupRule($rule); + } + + if (is_array($name) && !empty($name)) { + $root = $this->request->rootDomain(); + foreach ($name as $item) { + if (false === strpos($item, '.')) { + $item .= '.' . $root; + } + + $this->domains[$item] = $domainName; + } + } + + // 返回域名对象 + return $domain; + } + + /** + * 获取域名 + * @access public + * @return array + */ + public function getDomains() + { + return $this->domains; + } + + /** + * 设置路由绑定 + * @access public + * @param string $bind 绑定信息 + * @param string $domain 域名 + * @return $this + */ + public function bind($bind, $domain = null) + { + $domain = is_null($domain) ? $this->domain : $domain; + + $this->bind[$domain] = $bind; + + return $this; + } + + /** + * 读取路由绑定 + * @access public + * @param string $domain 域名 + * @return string|null + */ + public function getBind($domain = null) + { + if (is_null($domain)) { + $domain = $this->domain; + } elseif (true === $domain) { + return $this->bind; + } elseif (false === strpos($domain, '.')) { + $domain .= '.' . $this->request->rootDomain(); + } + + $subDomain = $this->request->subDomain(); + + if (strpos($subDomain, '.')) { + $name = '*' . strstr($subDomain, '.'); + } + + if (isset($this->bind[$domain])) { + $result = $this->bind[$domain]; + } elseif (isset($name) && isset($this->bind[$name])) { + $result = $this->bind[$name]; + } elseif (!empty($subDomain) && isset($this->bind['*'])) { + $result = $this->bind['*']; + } else { + $result = null; + } + + return $result; + } + + /** + * 读取路由标识 + * @access public + * @param string $name 路由标识 + * @param string $domain 域名 + * @return mixed + */ + public function getName($name = null, $domain = null, $method = '*') + { + return $this->app['rule_name']->get($name, $domain, $method); + } + + /** + * 读取路由 + * @access public + * @param string $rule 路由规则 + * @param string $domain 域名 + * @return array + */ + public function getRule($rule, $domain = null) + { + if (is_null($domain)) { + $domain = $this->domain; + } + + return $this->app['rule_name']->getRule($rule, $domain); + } + + /** + * 读取路由 + * @access public + * @param string $domain 域名 + * @return array + */ + public function getRuleList($domain = null) + { + return $this->app['rule_name']->getRuleList($domain); + } + + /** + * 批量导入路由标识 + * @access public + * @param array $name 路由标识 + * @return $this + */ + public function setName($name) + { + $this->app['rule_name']->import($name); + return $this; + } + + /** + * 导入配置文件的路由规则 + * @access public + * @param array $rules 路由规则 + * @param string $type 请求类型 + * @return void + */ + public function import(array $rules, $type = '*') + { + // 检查域名部署 + if (isset($rules['__domain__'])) { + foreach ($rules['__domain__'] as $key => $rule) { + $this->domain($key, $rule); + } + unset($rules['__domain__']); + } + + // 检查变量规则 + if (isset($rules['__pattern__'])) { + $this->pattern($rules['__pattern__']); + unset($rules['__pattern__']); + } + + // 检查路由别名 + if (isset($rules['__alias__'])) { + foreach ($rules['__alias__'] as $key => $val) { + $this->alias($key, $val); + } + unset($rules['__alias__']); + } + + // 检查资源路由 + if (isset($rules['__rest__'])) { + foreach ($rules['__rest__'] as $key => $rule) { + $this->resource($key, $rule); + } + unset($rules['__rest__']); + } + + // 检查路由规则(包含分组) + foreach ($rules as $key => $val) { + if (is_numeric($key)) { + $key = array_shift($val); + } + + if (empty($val)) { + continue; + } + + if (is_string($key) && 0 === strpos($key, '[')) { + $key = substr($key, 1, -1); + $this->group($key, $val); + } elseif (is_array($val)) { + $this->rule($key, $val[0], $type, $val[1], isset($val[2]) ? $val[2] : []); + } else { + $this->rule($key, $val, $type); + } + } + } + + /** + * 注册路由规则 + * @access public + * @param string $rule 路由规则 + * @param mixed $route 路由地址 + * @param string $method 请求类型 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + public function rule($rule, $route, $method = '*', array $option = [], array $pattern = []) + { + return $this->group->addRule($rule, $route, $method, $option, $pattern); + } + + /** + * 设置跨域有效路由规则 + * @access public + * @param Rule $rule 路由规则 + * @param string $method 请求类型 + * @return $this + */ + public function setCrossDomainRule($rule, $method = '*') + { + if (!isset($this->cross)) { + $this->cross = (new RuleGroup($this))->mergeRuleRegex($this->mergeRuleRegex); + } + + $this->cross->addRuleItem($rule, $method); + + return $this; + } + + /** + * 批量注册路由规则 + * @access public + * @param array $rules 路由规则 + * @param string $method 请求类型 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return void + */ + public function rules($rules, $method = '*', array $option = [], array $pattern = []) + { + $this->group->addRules($rules, $method, $option, $pattern); + } + + /** + * 注册路由分组 + * @access public + * @param string|array $name 分组名称或者参数 + * @param array|\Closure $route 分组路由 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleGroup + */ + public function group($name, $route, array $option = [], array $pattern = []) + { + if (is_array($name)) { + $option = $name; + $name = isset($option['name']) ? $option['name'] : ''; + } + + return (new RuleGroup($this, $this->group, $name, $route, $option, $pattern)) + ->lazy($this->lazy) + ->mergeRuleRegex($this->mergeRuleRegex); + } + + /** + * 注册路由 + * @access public + * @param string $rule 路由规则 + * @param mixed $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + public function any($rule, $route = '', array $option = [], array $pattern = []) + { + return $this->rule($rule, $route, '*', $option, $pattern); + } + + /** + * 注册GET路由 + * @access public + * @param string $rule 路由规则 + * @param mixed $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + public function get($rule, $route = '', array $option = [], array $pattern = []) + { + return $this->rule($rule, $route, 'GET', $option, $pattern); + } + + /** + * 注册POST路由 + * @access public + * @param string $rule 路由规则 + * @param mixed $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + public function post($rule, $route = '', array $option = [], array $pattern = []) + { + return $this->rule($rule, $route, 'POST', $option, $pattern); + } + + /** + * 注册PUT路由 + * @access public + * @param string $rule 路由规则 + * @param mixed $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + public function put($rule, $route = '', array $option = [], array $pattern = []) + { + return $this->rule($rule, $route, 'PUT', $option, $pattern); + } + + /** + * 注册DELETE路由 + * @access public + * @param string $rule 路由规则 + * @param mixed $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + public function delete($rule, $route = '', array $option = [], array $pattern = []) + { + return $this->rule($rule, $route, 'DELETE', $option, $pattern); + } + + /** + * 注册PATCH路由 + * @access public + * @param string $rule 路由规则 + * @param mixed $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + public function patch($rule, $route = '', array $option = [], array $pattern = []) + { + return $this->rule($rule, $route, 'PATCH', $option, $pattern); + } + + /** + * 注册资源路由 + * @access public + * @param string $rule 路由规则 + * @param string $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return Resource + */ + public function resource($rule, $route = '', array $option = [], array $pattern = []) + { + return (new Resource($this, $this->group, $rule, $route, $option, $pattern, $this->rest)) + ->lazy($this->lazy); + } + + /** + * 注册控制器路由 操作方法对应不同的请求前缀 + * @access public + * @param string $rule 路由规则 + * @param string $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleGroup + */ + public function controller($rule, $route = '', array $option = [], array $pattern = []) + { + $group = new RuleGroup($this, $this->group, $rule, null, $option, $pattern); + + foreach ($this->methodPrefix as $type => $val) { + $group->addRule('', $val . '', $type); + } + + return $group->prefix($route . '/'); + } + + /** + * 注册视图路由 + * @access public + * @param string|array $rule 路由规则 + * @param string $template 路由模板地址 + * @param array $vars 模板变量 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + public function view($rule, $template = '', array $vars = [], array $option = [], array $pattern = []) + { + return $this->rule($rule, $template, 'GET', $option, $pattern)->view($vars); + } + + /** + * 注册重定向路由 + * @access public + * @param string|array $rule 路由规则 + * @param string $route 路由地址 + * @param array $status 状态码 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return RuleItem + */ + public function redirect($rule, $route = '', $status = 301, array $option = [], array $pattern = []) + { + return $this->rule($rule, $route, '*', $option, $pattern)->redirect()->status($status); + } + + /** + * 注册别名路由 + * @access public + * @param string $rule 路由别名 + * @param string $route 路由地址 + * @param array $option 路由参数 + * @return AliasRule + */ + public function alias($rule, $route, array $option = []) + { + $aliasRule = new AliasRule($this, $this->group, $rule, $route, $option); + + $this->alias[$rule] = $aliasRule; + + return $aliasRule; + } + + /** + * 获取别名路由定义 + * @access public + * @param string $name 路由别名 + * @return string|array|null + */ + public function getAlias($name = null) + { + if (is_null($name)) { + return $this->alias; + } + + return isset($this->alias[$name]) ? $this->alias[$name] : null; + } + + /** + * 设置不同请求类型下面的方法前缀 + * @access public + * @param string|array $method 请求类型 + * @param string $prefix 类型前缀 + * @return $this + */ + public function setMethodPrefix($method, $prefix = '') + { + if (is_array($method)) { + $this->methodPrefix = array_merge($this->methodPrefix, array_change_key_case($method)); + } else { + $this->methodPrefix[strtolower($method)] = $prefix; + } + + return $this; + } + + /** + * 获取请求类型的方法前缀 + * @access public + * @param string $method 请求类型 + * @param string $prefix 类型前缀 + * @return string|null + */ + public function getMethodPrefix($method) + { + $method = strtolower($method); + + return isset($this->methodPrefix[$method]) ? $this->methodPrefix[$method] : null; + } + + /** + * rest方法定义和修改 + * @access public + * @param string $name 方法名称 + * @param array|bool $resource 资源 + * @return $this + */ + public function rest($name, $resource = []) + { + if (is_array($name)) { + $this->rest = $resource ? $name : array_merge($this->rest, $name); + } else { + $this->rest[$name] = $resource; + } + + return $this; + } + + /** + * 获取rest方法定义的参数 + * @access public + * @param string $name 方法名称 + * @return array|null + */ + public function getRest($name = null) + { + if (is_null($name)) { + return $this->rest; + } + + return isset($this->rest[$name]) ? $this->rest[$name] : null; + } + + /** + * 注册未匹配路由规则后的处理 + * @access public + * @param string $route 路由地址 + * @param string $method 请求类型 + * @param array $option 路由参数 + * @return RuleItem + */ + public function miss($route, $method = '*', array $option = []) + { + return $this->group->addMissRule($route, $method, $option); + } + + /** + * 注册一个自动解析的URL路由 + * @access public + * @param string $route 路由地址 + * @return RuleItem + */ + public function auto($route) + { + return $this->group->addAutoRule($route); + } + + /** + * 检测URL路由 + * @access public + * @param string $url URL地址 + * @param bool $must 是否强制路由 + * @return Dispatch + * @throws RouteNotFoundException + */ + public function check($url, $must = false) + { + // 自动检测域名路由 + $domain = $this->checkDomain(); + $url = str_replace($this->config['pathinfo_depr'], '|', $url); + + $completeMatch = $this->config['route_complete_match']; + + $result = $domain->check($this->request, $url, $completeMatch); + + if (false === $result && !empty($this->cross)) { + // 检测跨域路由 + $result = $this->cross->check($this->request, $url, $completeMatch); + } + + if (false !== $result) { + // 路由匹配 + return $result; + } elseif ($must) { + // 强制路由不匹配则抛出异常 + throw new RouteNotFoundException(); + } + + // 默认路由解析 + return new UrlDispatch($this->request, $this->group, $url, [ + 'auto_search' => $this->autoSearchController, + ]); + } + + /** + * 检测域名的路由规则 + * @access protected + * @return Domain + */ + protected function checkDomain() + { + // 获取当前子域名 + $subDomain = $this->request->subDomain(); + + $item = false; + + if ($subDomain && count($this->domains) > 1) { + $domain = explode('.', $subDomain); + $domain2 = array_pop($domain); + + if ($domain) { + // 存在三级域名 + $domain3 = array_pop($domain); + } + + if ($subDomain && isset($this->domains[$subDomain])) { + // 子域名配置 + $item = $this->domains[$subDomain]; + } elseif (isset($this->domains['*.' . $domain2]) && !empty($domain3)) { + // 泛三级域名 + $item = $this->domains['*.' . $domain2]; + $panDomain = $domain3; + } elseif (isset($this->domains['*']) && !empty($domain2)) { + // 泛二级域名 + if ('www' != $domain2) { + $item = $this->domains['*']; + $panDomain = $domain2; + } + } + + if (isset($panDomain)) { + // 保存当前泛域名 + $this->request->setPanDomain($panDomain); + } + } + + if (false === $item) { + // 检测当前完整域名 + $item = $this->domains[$this->host]; + } + + if (is_string($item)) { + $item = $this->domains[$item]; + } + + return $item; + } + + /** + * 清空路由规则 + * @access public + * @return void + */ + public function clear() + { + $this->app['rule_name']->clear(); + $this->group->clear(); + } + + /** + * 设置全局的路由分组参数 + * @access public + * @param string $method 方法名 + * @param array $args 调用参数 + * @return RuleGroup + */ + public function __call($method, $args) + { + return call_user_func_array([$this->group, $method], $args); + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app'], $data['request']); + + return $data; + } +} diff --git a/thinkphp/library/think/Session.php b/thinkphp/library/think/Session.php new file mode 100755 index 0000000..63ee7a0 --- /dev/null +++ b/thinkphp/library/think/Session.php @@ -0,0 +1,579 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\exception\ClassNotFoundException; + +class Session +{ + /** + * 配置参数 + * @var array + */ + protected $config = []; + + /** + * 前缀 + * @var string + */ + protected $prefix = ''; + + /** + * 是否初始化 + * @var bool + */ + protected $init = null; + + /** + * 锁驱动 + * @var object + */ + protected $lockDriver = null; + + /** + * 锁key + * @var string + */ + protected $sessKey = 'PHPSESSID'; + + /** + * 锁超时时间 + * @var integer + */ + protected $lockTimeout = 3; + + /** + * 是否启用锁机制 + * @var bool + */ + protected $lock = false; + + public function __construct(array $config = []) + { + $this->config = $config; + } + + /** + * 设置或者获取session作用域(前缀) + * @access public + * @param string $prefix + * @return string|void + */ + public function prefix($prefix = '') + { + empty($this->init) && $this->boot(); + + if (empty($prefix) && null !== $prefix) { + return $this->prefix; + } else { + $this->prefix = $prefix; + } + } + + public static function __make(Config $config) + { + return new static($config->pull('session')); + } + + /** + * 配置 + * @access public + * @param array $config + * @return void + */ + public function setConfig(array $config = []) + { + $this->config = array_merge($this->config, array_change_key_case($config)); + + if (isset($config['prefix'])) { + $this->prefix = $config['prefix']; + } + + if (isset($config['use_lock'])) { + $this->lock = $config['use_lock']; + } + } + + /** + * 设置已经初始化 + * @access public + * @return void + */ + public function inited() + { + $this->init = true; + } + + /** + * session初始化 + * @access public + * @param array $config + * @return void + * @throws \think\Exception + */ + public function init(array $config = []) + { + $config = $config ?: $this->config; + + $isDoStart = false; + if (isset($config['use_trans_sid'])) { + ini_set('session.use_trans_sid', $config['use_trans_sid'] ? 1 : 0); + } + + // 启动session + if (!empty($config['auto_start']) && PHP_SESSION_ACTIVE != session_status()) { + ini_set('session.auto_start', 0); + $isDoStart = true; + } + + if (isset($config['prefix'])) { + $this->prefix = $config['prefix']; + } + + if (isset($config['use_lock'])) { + $this->lock = $config['use_lock']; + } + + if (isset($config['var_session_id']) && isset($_REQUEST[$config['var_session_id']])) { + session_id($_REQUEST[$config['var_session_id']]); + } elseif (isset($config['id']) && !empty($config['id'])) { + session_id($config['id']); + } + + if (isset($config['name'])) { + session_name($config['name']); + } + + if (isset($config['path'])) { + session_save_path($config['path']); + } + + if (isset($config['domain'])) { + ini_set('session.cookie_domain', $config['domain']); + } + + if (isset($config['expire'])) { + ini_set('session.gc_maxlifetime', $config['expire']); + ini_set('session.cookie_lifetime', $config['expire']); + } + + if (isset($config['secure'])) { + ini_set('session.cookie_secure', $config['secure']); + } + + if (isset($config['httponly'])) { + ini_set('session.cookie_httponly', $config['httponly']); + } + + if (isset($config['use_cookies'])) { + ini_set('session.use_cookies', $config['use_cookies'] ? 1 : 0); + } + + if (isset($config['cache_limiter'])) { + session_cache_limiter($config['cache_limiter']); + } + + if (isset($config['cache_expire'])) { + session_cache_expire($config['cache_expire']); + } + + if (!empty($config['type'])) { + // 读取session驱动 + $class = false !== strpos($config['type'], '\\') ? $config['type'] : '\\think\\session\\driver\\' . ucwords($config['type']); + + // 检查驱动类 + if (!class_exists($class) || !session_set_save_handler(new $class($config))) { + throw new ClassNotFoundException('error session handler:' . $class, $class); + } + } + + if ($isDoStart) { + $this->start(); + } else { + $this->init = false; + } + + return $this; + } + + /** + * session自动启动或者初始化 + * @access public + * @return void + */ + public function boot() + { + if (is_null($this->init)) { + $this->init(); + } + + if (false === $this->init) { + if (PHP_SESSION_ACTIVE != session_status()) { + $this->start(); + } + $this->init = true; + } + } + + /** + * session设置 + * @access public + * @param string $name session名称 + * @param mixed $value session值 + * @param string|null $prefix 作用域(前缀) + * @return void + */ + public function set($name, $value, $prefix = null) + { + $this->lock(); + + empty($this->init) && $this->boot(); + + $prefix = !is_null($prefix) ? $prefix : $this->prefix; + + if (strpos($name, '.')) { + // 二维数组赋值 + list($name1, $name2) = explode('.', $name); + if ($prefix) { + $_SESSION[$prefix][$name1][$name2] = $value; + } else { + $_SESSION[$name1][$name2] = $value; + } + } elseif ($prefix) { + $_SESSION[$prefix][$name] = $value; + } else { + $_SESSION[$name] = $value; + } + + $this->unlock(); + } + + /** + * session获取 + * @access public + * @param string $name session名称 + * @param string|null $prefix 作用域(前缀) + * @return mixed + */ + public function get($name = '', $prefix = null) + { + $this->lock(); + + empty($this->init) && $this->boot(); + + $prefix = !is_null($prefix) ? $prefix : $this->prefix; + + $value = $prefix ? (!empty($_SESSION[$prefix]) ? $_SESSION[$prefix] : []) : $_SESSION; + + if ('' != $name) { + $name = explode('.', $name); + + foreach ($name as $val) { + if (isset($value[$val])) { + $value = $value[$val]; + } else { + $value = null; + break; + } + } + } + + $this->unlock(); + + return $value; + } + + /** + * session 读写锁驱动实例化 + */ + protected function initDriver() + { + $config = $this->config; + + if (!empty($config['type']) && isset($config['use_lock']) && $config['use_lock']) { + // 读取session驱动 + $class = false !== strpos($config['type'], '\\') ? $config['type'] : '\\think\\session\\driver\\' . ucwords($config['type']); + + // 检查驱动类及类中是否存在 lock 和 unlock 函数 + if (class_exists($class) && method_exists($class, 'lock') && method_exists($class, 'unlock')) { + $this->lockDriver = new $class($config); + } + } + + // 通过cookie获得session_id + if (isset($config['name']) && $config['name']) { + $this->sessKey = $config['name']; + } + + if (isset($config['lock_timeout']) && $config['lock_timeout'] > 0) { + $this->lockTimeout = $config['lock_timeout']; + } + } + + /** + * session 读写加锁 + * @access protected + * @return void + */ + protected function lock() + { + if (empty($this->lock)) { + return; + } + + $this->initDriver(); + + if (null !== $this->lockDriver && method_exists($this->lockDriver, 'lock')) { + $t = time(); + // 使用 session_id 作为互斥条件,即只对同一 session_id 的会话互斥。第一次请求没有 session_id + $sessID = isset($_COOKIE[$this->sessKey]) ? $_COOKIE[$this->sessKey] : ''; + + do { + if (time() - $t > $this->lockTimeout) { + $this->unlock(); + } + } while (!$this->lockDriver->lock($sessID, $this->lockTimeout)); + } + } + + /** + * session 读写解锁 + * @access protected + * @return void + */ + protected function unlock() + { + if (empty($this->lock)) { + return; + } + + $this->pause(); + + if ($this->lockDriver && method_exists($this->lockDriver, 'unlock')) { + $sessID = isset($_COOKIE[$this->sessKey]) ? $_COOKIE[$this->sessKey] : ''; + $this->lockDriver->unlock($sessID); + } + } + + /** + * session获取并删除 + * @access public + * @param string $name session名称 + * @param string|null $prefix 作用域(前缀) + * @return mixed + */ + public function pull($name, $prefix = null) + { + $result = $this->get($name, $prefix); + + if ($result) { + $this->delete($name, $prefix); + return $result; + } else { + return; + } + } + + /** + * session设置 下一次请求有效 + * @access public + * @param string $name session名称 + * @param mixed $value session值 + * @param string|null $prefix 作用域(前缀) + * @return void + */ + public function flash($name, $value) + { + $this->set($name, $value); + + if (!$this->has('__flash__.__time__')) { + $this->set('__flash__.__time__', $_SERVER['REQUEST_TIME_FLOAT']); + } + + $this->push('__flash__', $name); + } + + /** + * 清空当前请求的session数据 + * @access public + * @return void + */ + public function flush() + { + if (!$this->init) { + return; + } + + $item = $this->get('__flash__'); + + if (!empty($item)) { + $time = $item['__time__']; + + if ($_SERVER['REQUEST_TIME_FLOAT'] > $time) { + unset($item['__time__']); + $this->delete($item); + $this->set('__flash__', []); + } + } + } + + /** + * 删除session数据 + * @access public + * @param string|array $name session名称 + * @param string|null $prefix 作用域(前缀) + * @return void + */ + public function delete($name, $prefix = null) + { + empty($this->init) && $this->boot(); + + $prefix = !is_null($prefix) ? $prefix : $this->prefix; + + if (is_array($name)) { + foreach ($name as $key) { + $this->delete($key, $prefix); + } + } elseif (strpos($name, '.')) { + list($name1, $name2) = explode('.', $name); + if ($prefix) { + unset($_SESSION[$prefix][$name1][$name2]); + } else { + unset($_SESSION[$name1][$name2]); + } + } else { + if ($prefix) { + unset($_SESSION[$prefix][$name]); + } else { + unset($_SESSION[$name]); + } + } + } + + /** + * 清空session数据 + * @access public + * @param string|null $prefix 作用域(前缀) + * @return void + */ + public function clear($prefix = null) + { + empty($this->init) && $this->boot(); + $prefix = !is_null($prefix) ? $prefix : $this->prefix; + + if ($prefix) { + unset($_SESSION[$prefix]); + } else { + $_SESSION = []; + } + } + + /** + * 判断session数据 + * @access public + * @param string $name session名称 + * @param string|null $prefix + * @return bool + */ + public function has($name, $prefix = null) + { + empty($this->init) && $this->boot(); + + $prefix = !is_null($prefix) ? $prefix : $this->prefix; + $value = $prefix ? (!empty($_SESSION[$prefix]) ? $_SESSION[$prefix] : []) : $_SESSION; + + $name = explode('.', $name); + + foreach ($name as $val) { + if (!isset($value[$val])) { + return false; + } else { + $value = $value[$val]; + } + } + + return true; + } + + /** + * 添加数据到一个session数组 + * @access public + * @param string $key + * @param mixed $value + * @return void + */ + public function push($key, $value) + { + $array = $this->get($key); + + if (is_null($array)) { + $array = []; + } + + $array[] = $value; + + $this->set($key, $array); + } + + /** + * 启动session + * @access public + * @return void + */ + public function start() + { + session_start(); + + $this->init = true; + } + + /** + * 销毁session + * @access public + * @return void + */ + public function destroy() + { + if (!empty($_SESSION)) { + $_SESSION = []; + } + + session_unset(); + session_destroy(); + + $this->init = null; + $this->lockDriver = null; + } + + /** + * 重新生成session_id + * @access public + * @param bool $delete 是否删除关联会话文件 + * @return void + */ + public function regenerate($delete = false) + { + session_regenerate_id($delete); + } + + /** + * 暂停session + * @access public + * @return void + */ + public function pause() + { + // 暂停session + session_write_close(); + $this->init = false; + } +} diff --git a/thinkphp/library/think/Template.php b/thinkphp/library/think/Template.php new file mode 100755 index 0000000..2855cbc --- /dev/null +++ b/thinkphp/library/think/Template.php @@ -0,0 +1,1318 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\exception\TemplateNotFoundException; + +/** + * ThinkPHP分离出来的模板引擎 + * 支持XML标签和普通标签的模板解析 + * 编译型模板引擎 支持动态缓存 + */ +class Template +{ + protected $app; + /** + * 模板变量 + * @var array + */ + protected $data = []; + + /** + * 模板配置参数 + * @var array + */ + protected $config = [ + 'view_path' => '', // 模板路径 + 'view_base' => '', + 'view_suffix' => 'html', // 默认模板文件后缀 + 'view_depr' => DIRECTORY_SEPARATOR, + 'cache_suffix' => 'php', // 默认模板缓存后缀 + 'tpl_deny_func_list' => 'echo,exit', // 模板引擎禁用函数 + 'tpl_deny_php' => false, // 默认模板引擎是否禁用PHP原生代码 + 'tpl_begin' => '{', // 模板引擎普通标签开始标记 + 'tpl_end' => '}', // 模板引擎普通标签结束标记 + 'strip_space' => false, // 是否去除模板文件里面的html空格与换行 + 'tpl_cache' => true, // 是否开启模板编译缓存,设为false则每次都会重新编译 + 'compile_type' => 'file', // 模板编译类型 + 'cache_prefix' => '', // 模板缓存前缀标识,可以动态改变 + 'cache_time' => 0, // 模板缓存有效期 0 为永久,(以数字为值,单位:秒) + 'layout_on' => false, // 布局模板开关 + 'layout_name' => 'layout', // 布局模板入口文件 + 'layout_item' => '{__CONTENT__}', // 布局模板的内容替换标识 + 'taglib_begin' => '{', // 标签库标签开始标记 + 'taglib_end' => '}', // 标签库标签结束标记 + 'taglib_load' => true, // 是否使用内置标签库之外的其它标签库,默认自动检测 + 'taglib_build_in' => 'cx', // 内置标签库名称(标签使用不必指定标签库名称),以逗号分隔 注意解析顺序 + 'taglib_pre_load' => '', // 需要额外加载的标签库(须指定标签库名称),多个以逗号分隔 + 'display_cache' => false, // 模板渲染缓存 + 'cache_id' => '', // 模板缓存ID + 'tpl_replace_string' => [], + 'tpl_var_identify' => 'array', // .语法变量识别,array|object|'', 为空时自动识别 + 'default_filter' => 'htmlentities', // 默认过滤方法 用于普通标签输出 + ]; + + /** + * 保留内容信息 + * @var array + */ + private $literal = []; + + /** + * 模板包含信息 + * @var array + */ + private $includeFile = []; + + /** + * 模板存储对象 + * @var object + */ + protected $storage; + + /** + * 架构函数 + * @access public + * @param array $config + */ + public function __construct(App $app, array $config = []) + { + $this->app = $app; + $this->config['cache_path'] = $app->getRuntimePath() . 'temp/'; + $this->config = array_merge($this->config, $config); + + $this->config['taglib_begin_origin'] = $this->config['taglib_begin']; + $this->config['taglib_end_origin'] = $this->config['taglib_end']; + + $this->config['taglib_begin'] = preg_quote($this->config['taglib_begin'], '/'); + $this->config['taglib_end'] = preg_quote($this->config['taglib_end'], '/'); + $this->config['tpl_begin'] = preg_quote($this->config['tpl_begin'], '/'); + $this->config['tpl_end'] = preg_quote($this->config['tpl_end'], '/'); + + // 初始化模板编译存储器 + $type = $this->config['compile_type'] ? $this->config['compile_type'] : 'File'; + + $this->storage = Loader::factory($type, '\\think\\template\\driver\\', null); + } + + public static function __make(Config $config) + { + return new static($config->pull('template')); + } + + /** + * 模板变量赋值 + * @access public + * @param mixed $name + * @param mixed $value + * @return void + */ + public function assign($name, $value = '') + { + if (is_array($name)) { + $this->data = array_merge($this->data, $name); + } else { + $this->data[$name] = $value; + } + } + + /** + * 模板引擎参数赋值 + * @access public + * @param mixed $name + * @param mixed $value + */ + public function __set($name, $value) + { + $this->config[$name] = $value; + } + + /** + * 模板引擎配置项 + * @access public + * @param array|string $config + * @return void|array + */ + public function config($config) + { + if (is_array($config)) { + $this->config = array_merge($this->config, $config); + } elseif (isset($this->config[$config])) { + return $this->config[$config]; + } + } + + /** + * 模板变量获取 + * @access public + * @param string $name 变量名 + * @return mixed + */ + public function get($name = '') + { + if ('' == $name) { + return $this->data; + } + + $data = $this->data; + + foreach (explode('.', $name) as $key => $val) { + if (isset($data[$val])) { + $data = $data[$val]; + } else { + $data = null; + break; + } + } + + return $data; + } + + /** + * 渲染模板文件 + * @access public + * @param string $template 模板文件 + * @param array $vars 模板变量 + * @param array $config 模板参数 + * @return void + */ + public function fetch($template, $vars = [], $config = []) + { + if ($vars) { + $this->data = $vars; + } + + if ($config) { + $this->config($config); + } + + $cache = $this->app['cache']; + + if (!empty($this->config['cache_id']) && $this->config['display_cache']) { + // 读取渲染缓存 + $cacheContent = $cache->get($this->config['cache_id']); + + if (false !== $cacheContent) { + echo $cacheContent; + return; + } + } + + $template = $this->parseTemplateFile($template); + + if ($template) { + $cacheFile = $this->config['cache_path'] . $this->config['cache_prefix'] . md5($this->config['layout_on'] . $this->config['layout_name'] . $template) . '.' . ltrim($this->config['cache_suffix'], '.'); + + if (!$this->checkCache($cacheFile)) { + // 缓存无效 重新模板编译 + $content = file_get_contents($template); + $this->compiler($content, $cacheFile); + } + + // 页面缓存 + ob_start(); + ob_implicit_flush(0); + + // 读取编译存储 + $this->storage->read($cacheFile, $this->data); + + // 获取并清空缓存 + $content = ob_get_clean(); + + if (!empty($this->config['cache_id']) && $this->config['display_cache']) { + // 缓存页面输出 + $cache->set($this->config['cache_id'], $content, $this->config['cache_time']); + } + + echo $content; + } + } + + /** + * 渲染模板内容 + * @access public + * @param string $content 模板内容 + * @param array $vars 模板变量 + * @param array $config 模板参数 + * @return void + */ + public function display($content, $vars = [], $config = []) + { + if ($vars) { + $this->data = $vars; + } + + if ($config) { + $this->config($config); + } + + $cacheFile = $this->config['cache_path'] . $this->config['cache_prefix'] . md5($content) . '.' . ltrim($this->config['cache_suffix'], '.'); + + if (!$this->checkCache($cacheFile)) { + // 缓存无效 模板编译 + $this->compiler($content, $cacheFile); + } + + // 读取编译存储 + $this->storage->read($cacheFile, $this->data); + } + + /** + * 设置布局 + * @access public + * @param mixed $name 布局模板名称 false 则关闭布局 + * @param string $replace 布局模板内容替换标识 + * @return object + */ + public function layout($name, $replace = '') + { + if (false === $name) { + // 关闭布局 + $this->config['layout_on'] = false; + } else { + // 开启布局 + $this->config['layout_on'] = true; + + // 名称必须为字符串 + if (is_string($name)) { + $this->config['layout_name'] = $name; + } + + if (!empty($replace)) { + $this->config['layout_item'] = $replace; + } + } + + return $this; + } + + /** + * 检查编译缓存是否有效 + * 如果无效则需要重新编译 + * @access private + * @param string $cacheFile 缓存文件名 + * @return boolean + */ + private function checkCache($cacheFile) + { + if (!$this->config['tpl_cache'] || !is_file($cacheFile) || !$handle = @fopen($cacheFile, "r")) { + return false; + } + + // 读取第一行 + preg_match('/\/\*(.+?)\*\//', fgets($handle), $matches); + + if (!isset($matches[1])) { + return false; + } + + $includeFile = unserialize($matches[1]); + + if (!is_array($includeFile)) { + return false; + } + + // 检查模板文件是否有更新 + foreach ($includeFile as $path => $time) { + if (is_file($path) && filemtime($path) > $time) { + // 模板文件如果有更新则缓存需要更新 + return false; + } + } + + // 检查编译存储是否有效 + return $this->storage->check($cacheFile, $this->config['cache_time']); + } + + /** + * 检查编译缓存是否存在 + * @access public + * @param string $cacheId 缓存的id + * @return boolean + */ + public function isCache($cacheId) + { + if ($cacheId && $this->config['display_cache']) { + // 缓存页面输出 + return $this->app['cache']->has($cacheId); + } + + return false; + } + + /** + * 编译模板文件内容 + * @access private + * @param string $content 模板内容 + * @param string $cacheFile 缓存文件名 + * @return void + */ + private function compiler(&$content, $cacheFile) + { + // 判断是否启用布局 + if ($this->config['layout_on']) { + if (false !== strpos($content, '{__NOLAYOUT__}')) { + // 可以单独定义不使用布局 + $content = str_replace('{__NOLAYOUT__}', '', $content); + } else { + // 读取布局模板 + $layoutFile = $this->parseTemplateFile($this->config['layout_name']); + + if ($layoutFile) { + // 替换布局的主体内容 + $content = str_replace($this->config['layout_item'], $content, file_get_contents($layoutFile)); + } + } + } else { + $content = str_replace('{__NOLAYOUT__}', '', $content); + } + + // 模板解析 + $this->parse($content); + + if ($this->config['strip_space']) { + /* 去除html空格与换行 */ + $find = ['~>\s+<~', '~>(\s+\n|\r)~']; + $replace = ['><', '>']; + $content = preg_replace($find, $replace, $content); + } + + // 优化生成的php代码 + $content = preg_replace('/\?>\s*<\?php\s(?!echo\b|\bend)/s', '', $content); + + // 模板过滤输出 + $replace = $this->config['tpl_replace_string']; + $content = str_replace(array_keys($replace), array_values($replace), $content); + + // 添加安全代码及模板引用记录 + $content = 'includeFile) . '*/ ?>' . "\n" . $content; + // 编译存储 + $this->storage->write($cacheFile, $content); + + $this->includeFile = []; + } + + /** + * 模板解析入口 + * 支持普通标签和TagLib解析 支持自定义标签库 + * @access public + * @param string $content 要解析的模板内容 + * @return void + */ + public function parse(&$content) + { + // 内容为空不解析 + if (empty($content)) { + return; + } + + // 替换literal标签内容 + $this->parseLiteral($content); + + // 解析继承 + $this->parseExtend($content); + + // 解析布局 + $this->parseLayout($content); + + // 检查include语法 + $this->parseInclude($content); + + // 替换包含文件中literal标签内容 + $this->parseLiteral($content); + + // 检查PHP语法 + $this->parsePhp($content); + + // 获取需要引入的标签库列表 + // 标签库只需要定义一次,允许引入多个一次 + // 一般放在文件的最前面 + // 格式: + // 当TAGLIB_LOAD配置为true时才会进行检测 + if ($this->config['taglib_load']) { + $tagLibs = $this->getIncludeTagLib($content); + + if (!empty($tagLibs)) { + // 对导入的TagLib进行解析 + foreach ($tagLibs as $tagLibName) { + $this->parseTagLib($tagLibName, $content); + } + } + } + + // 预先加载的标签库 无需在每个模板中使用taglib标签加载 但必须使用标签库XML前缀 + if ($this->config['taglib_pre_load']) { + $tagLibs = explode(',', $this->config['taglib_pre_load']); + + foreach ($tagLibs as $tag) { + $this->parseTagLib($tag, $content); + } + } + + // 内置标签库 无需使用taglib标签导入就可以使用 并且不需使用标签库XML前缀 + $tagLibs = explode(',', $this->config['taglib_build_in']); + + foreach ($tagLibs as $tag) { + $this->parseTagLib($tag, $content, true); + } + + // 解析普通模板标签 {$tagName} + $this->parseTag($content); + + // 还原被替换的Literal标签 + $this->parseLiteral($content, true); + } + + /** + * 检查PHP语法 + * @access private + * @param string $content 要解析的模板内容 + * @return void + * @throws \think\Exception + */ + private function parsePhp(&$content) + { + // 短标签的情况要将' . "\n", $content); + + // PHP语法检查 + if ($this->config['tpl_deny_php'] && false !== strpos($content, 'getRegex('layout'), $content, $matches)) { + // 替换Layout标签 + $content = str_replace($matches[0], '', $content); + // 解析Layout标签 + $array = $this->parseAttr($matches[0]); + + if (!$this->config['layout_on'] || $this->config['layout_name'] != $array['name']) { + // 读取布局模板 + $layoutFile = $this->parseTemplateFile($array['name']); + + if ($layoutFile) { + $replace = isset($array['replace']) ? $array['replace'] : $this->config['layout_item']; + // 替换布局的主体内容 + $content = str_replace($replace, $content, file_get_contents($layoutFile)); + } + } + } else { + $content = str_replace('{__NOLAYOUT__}', '', $content); + } + } + + /** + * 解析模板中的include标签 + * @access private + * @param string $content 要解析的模板内容 + * @return void + */ + private function parseInclude(&$content) + { + $regex = $this->getRegex('include'); + $func = function ($template) use (&$func, &$regex, &$content) { + if (preg_match_all($regex, $template, $matches, PREG_SET_ORDER)) { + foreach ($matches as $match) { + $array = $this->parseAttr($match[0]); + $file = $array['file']; + unset($array['file']); + + // 分析模板文件名并读取内容 + $parseStr = $this->parseTemplateName($file); + + foreach ($array as $k => $v) { + // 以$开头字符串转换成模板变量 + if (0 === strpos($v, '$')) { + $v = $this->get(substr($v, 1)); + } + + $parseStr = str_replace('[' . $k . ']', $v, $parseStr); + } + + $content = str_replace($match[0], $parseStr, $content); + // 再次对包含文件进行模板分析 + $func($parseStr); + } + unset($matches); + } + }; + + // 替换模板中的include标签 + $func($content); + } + + /** + * 解析模板中的extend标签 + * @access private + * @param string $content 要解析的模板内容 + * @return void + */ + private function parseExtend(&$content) + { + $regex = $this->getRegex('extend'); + $array = $blocks = $baseBlocks = []; + $extend = ''; + + $func = function ($template) use (&$func, &$regex, &$array, &$extend, &$blocks, &$baseBlocks) { + if (preg_match($regex, $template, $matches)) { + if (!isset($array[$matches['name']])) { + $array[$matches['name']] = 1; + // 读取继承模板 + $extend = $this->parseTemplateName($matches['name']); + + // 递归检查继承 + $func($extend); + + // 取得block标签内容 + $blocks = array_merge($blocks, $this->parseBlock($template)); + + return; + } + } else { + // 取得顶层模板block标签内容 + $baseBlocks = $this->parseBlock($template, true); + + if (empty($extend)) { + // 无extend标签但有block标签的情况 + $extend = $template; + } + } + }; + + $func($content); + + if (!empty($extend)) { + if ($baseBlocks) { + $children = []; + foreach ($baseBlocks as $name => $val) { + $replace = $val['content']; + + if (!empty($children[$name])) { + // 如果包含有子block标签 + foreach ($children[$name] as $key) { + $replace = str_replace($baseBlocks[$key]['begin'] . $baseBlocks[$key]['content'] . $baseBlocks[$key]['end'], $blocks[$key]['content'], $replace); + } + } + + if (isset($blocks[$name])) { + // 带有{__block__}表示与所继承模板的相应标签合并,而不是覆盖 + $replace = str_replace(['{__BLOCK__}', '{__block__}'], $replace, $blocks[$name]['content']); + + if (!empty($val['parent'])) { + // 如果不是最顶层的block标签 + $parent = $val['parent']; + + if (isset($blocks[$parent])) { + $blocks[$parent]['content'] = str_replace($blocks[$name]['begin'] . $blocks[$name]['content'] . $blocks[$name]['end'], $replace, $blocks[$parent]['content']); + } + + $blocks[$name]['content'] = $replace; + $children[$parent][] = $name; + + continue; + } + } elseif (!empty($val['parent'])) { + // 如果子标签没有被继承则用原值 + $children[$val['parent']][] = $name; + $blocks[$name] = $val; + } + + if (!$val['parent']) { + // 替换模板中的顶级block标签 + $extend = str_replace($val['begin'] . $val['content'] . $val['end'], $replace, $extend); + } + } + } + + $content = $extend; + unset($blocks, $baseBlocks); + } + } + + /** + * 替换页面中的literal标签 + * @access private + * @param string $content 模板内容 + * @param boolean $restore 是否为还原 + * @return void + */ + private function parseLiteral(&$content, $restore = false) + { + $regex = $this->getRegex($restore ? 'restoreliteral' : 'literal'); + + if (preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) { + if (!$restore) { + $count = count($this->literal); + + // 替换literal标签 + foreach ($matches as $match) { + $this->literal[] = substr($match[0], strlen($match[1]), -strlen($match[2])); + $content = str_replace($match[0], "", $content); + $count++; + } + } else { + // 还原literal标签 + foreach ($matches as $match) { + $content = str_replace($match[0], $this->literal[$match[1]], $content); + } + + // 清空literal记录 + $this->literal = []; + } + + unset($matches); + } + } + + /** + * 获取模板中的block标签 + * @access private + * @param string $content 模板内容 + * @param boolean $sort 是否排序 + * @return array + */ + private function parseBlock(&$content, $sort = false) + { + $regex = $this->getRegex('block'); + $result = []; + + if (preg_match_all($regex, $content, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) { + $right = $keys = []; + + foreach ($matches as $match) { + if (empty($match['name'][0])) { + if (count($right) > 0) { + $tag = array_pop($right); + $start = $tag['offset'] + strlen($tag['tag']); + $length = $match[0][1] - $start; + + $result[$tag['name']] = [ + 'begin' => $tag['tag'], + 'content' => substr($content, $start, $length), + 'end' => $match[0][0], + 'parent' => count($right) ? end($right)['name'] : '', + ]; + + $keys[$tag['name']] = $match[0][1]; + } + } else { + // 标签头压入栈 + $right[] = [ + 'name' => $match[2][0], + 'offset' => $match[0][1], + 'tag' => $match[0][0], + ]; + } + } + + unset($right, $matches); + + if ($sort) { + // 按block标签结束符在模板中的位置排序 + array_multisort($keys, $result); + } + } + + return $result; + } + + /** + * 搜索模板页面中包含的TagLib库 + * 并返回列表 + * @access private + * @param string $content 模板内容 + * @return array|null + */ + private function getIncludeTagLib(&$content) + { + // 搜索是否有TagLib标签 + if (preg_match($this->getRegex('taglib'), $content, $matches)) { + // 替换TagLib标签 + $content = str_replace($matches[0], '', $content); + + return explode(',', $matches['name']); + } + } + + /** + * TagLib库解析 + * @access public + * @param string $tagLib 要解析的标签库 + * @param string $content 要解析的模板内容 + * @param boolean $hide 是否隐藏标签库前缀 + * @return void + */ + public function parseTagLib($tagLib, &$content, $hide = false) + { + if (false !== strpos($tagLib, '\\')) { + // 支持指定标签库的命名空间 + $className = $tagLib; + $tagLib = substr($tagLib, strrpos($tagLib, '\\') + 1); + } else { + $className = '\\think\\template\\taglib\\' . ucwords($tagLib); + } + + $tLib = new $className($this); + + $tLib->parseTag($content, $hide ? '' : $tagLib); + } + + /** + * 分析标签属性 + * @access public + * @param string $str 属性字符串 + * @param string $name 不为空时返回指定的属性名 + * @return array + */ + public function parseAttr($str, $name = null) + { + $regex = '/\s+(?>(?P[\w-]+)\s*)=(?>\s*)([\"\'])(?P(?:(?!\\2).)*)\\2/is'; + $array = []; + + if (preg_match_all($regex, $str, $matches, PREG_SET_ORDER)) { + foreach ($matches as $match) { + $array[$match['name']] = $match['value']; + } + unset($matches); + } + + if (!empty($name) && isset($array[$name])) { + return $array[$name]; + } + + return $array; + } + + /** + * 模板标签解析 + * 格式: {TagName:args [|content] } + * @access private + * @param string $content 要解析的模板内容 + * @return void + */ + private function parseTag(&$content) + { + $regex = $this->getRegex('tag'); + + if (preg_match_all($regex, $content, $matches, PREG_SET_ORDER)) { + foreach ($matches as $match) { + $str = stripslashes($match[1]); + $flag = substr($str, 0, 1); + + switch ($flag) { + case '$': + // 解析模板变量 格式 {$varName} + // 是否带有?号 + if (false !== $pos = strpos($str, '?')) { + $array = preg_split('/([!=]={1,2}|(?<]={0,1})/', substr($str, 0, $pos), 2, PREG_SPLIT_DELIM_CAPTURE); + $name = $array[0]; + + $this->parseVar($name); + //$this->parseVarFunction($name); + + $str = trim(substr($str, $pos + 1)); + $this->parseVar($str); + $first = substr($str, 0, 1); + + if (strpos($name, ')')) { + // $name为对象或是自动识别,或者含有函数 + if (isset($array[1])) { + $this->parseVar($array[2]); + $name .= $array[1] . $array[2]; + } + + switch ($first) { + case '?': + $this->parseVarFunction($name); + $str = ''; + break; + case '=': + $str = ''; + break; + default: + $str = ''; + } + } else { + if (isset($array[1])) { + $express = true; + $this->parseVar($array[2]); + $express = $name . $array[1] . $array[2]; + } else { + $express = false; + } + + if (in_array($first, ['?', '=', ':'])) { + $str = trim(substr($str, 1)); + if ('$' == substr($str, 0, 1)) { + $str = $this->parseVarFunction($str); + } + } + + // $name为数组 + switch ($first) { + case '?': + // {$varname??'xxx'} $varname有定义则输出$varname,否则输出xxx + $str = 'parseVarFunction($name) . ' : ' . $str . '; ?>'; + break; + case '=': + // {$varname?='xxx'} $varname为真时才输出xxx + $str = ''; + break; + case ':': + // {$varname?:'xxx'} $varname为真时输出$varname,否则输出xxx + $str = 'parseVarFunction($name) . ' : ' . $str . '; ?>'; + break; + default: + if (strpos($str, ':')) { + // {$varname ? 'a' : 'b'} $varname为真时输出a,否则输出b + $array = explode(':', $str, 2); + + $array[0] = '$' == substr(trim($array[0]), 0, 1) ? $this->parseVarFunction($array[0]) : $array[0]; + $array[1] = '$' == substr(trim($array[1]), 0, 1) ? $this->parseVarFunction($array[1]) : $array[1]; + + $str = implode(' : ', $array); + } + $str = ''; + } + } + } else { + $this->parseVar($str); + $this->parseVarFunction($str); + $str = ''; + } + break; + case ':': + // 输出某个函数的结果 + $str = substr($str, 1); + $this->parseVar($str); + $str = ''; + break; + case '~': + // 执行某个函数 + $str = substr($str, 1); + $this->parseVar($str); + $str = ''; + break; + case '-': + case '+': + // 输出计算 + $this->parseVar($str); + $str = ''; + break; + case '/': + // 注释标签 + $flag2 = substr($str, 1, 1); + if ('/' == $flag2 || ('*' == $flag2 && substr(rtrim($str), -2) == '*/')) { + $str = ''; + } + break; + default: + // 未识别的标签直接返回 + $str = $this->config['tpl_begin'] . $str . $this->config['tpl_end']; + break; + } + + $content = str_replace($match[0], $str, $content); + } + + unset($matches); + } + } + + /** + * 模板变量解析,支持使用函数 + * 格式: {$varname|function1|function2=arg1,arg2} + * @access public + * @param string $varStr 变量数据 + * @return void + */ + public function parseVar(&$varStr) + { + $varStr = trim($varStr); + + if (preg_match_all('/\$[a-zA-Z_](?>\w*)(?:[:\.][0-9a-zA-Z_](?>\w*))+/', $varStr, $matches, PREG_OFFSET_CAPTURE)) { + static $_varParseList = []; + + while ($matches[0]) { + $match = array_pop($matches[0]); + + //如果已经解析过该变量字串,则直接返回变量值 + if (isset($_varParseList[$match[0]])) { + $parseStr = $_varParseList[$match[0]]; + } else { + if (strpos($match[0], '.')) { + $vars = explode('.', $match[0]); + $first = array_shift($vars); + + if ('$Think' == $first) { + // 所有以Think.打头的以特殊变量对待 无需模板赋值就可以输出 + $parseStr = $this->parseThinkVar($vars); + } elseif ('$Request' == $first) { + // 获取Request请求对象参数 + $method = array_shift($vars); + if (!empty($vars)) { + $params = implode('.', $vars); + if ('true' != $params) { + $params = '\'' . $params . '\''; + } + } else { + $params = ''; + } + + $parseStr = 'app(\'request\')->' . $method . '(' . $params . ')'; + } else { + switch ($this->config['tpl_var_identify']) { + case 'array': // 识别为数组 + $parseStr = $first . '[\'' . implode('\'][\'', $vars) . '\']'; + break; + case 'obj': // 识别为对象 + $parseStr = $first . '->' . implode('->', $vars); + break; + default: // 自动判断数组或对象 + $parseStr = '(is_array(' . $first . ')?' . $first . '[\'' . implode('\'][\'', $vars) . '\']:' . $first . '->' . implode('->', $vars) . ')'; + } + } + } else { + $parseStr = str_replace(':', '->', $match[0]); + } + + $_varParseList[$match[0]] = $parseStr; + } + + $varStr = substr_replace($varStr, $parseStr, $match[1], strlen($match[0])); + } + unset($matches); + } + } + + /** + * 对模板中使用了函数的变量进行解析 + * 格式 {$varname|function1|function2=arg1,arg2} + * @access public + * @param string $varStr 变量字符串 + * @param bool $autoescape 自动转义 + * @return void + */ + public function parseVarFunction(&$varStr, $autoescape = true) + { + if (!$autoescape && false === strpos($varStr, '|')) { + return $varStr; + } elseif ($autoescape && !preg_match('/\|(\s)?raw(\||\s)?/i', $varStr)) { + $varStr .= '|' . $this->config['default_filter']; + } + + static $_varFunctionList = []; + + $_key = md5($varStr); + + //如果已经解析过该变量字串,则直接返回变量值 + if (isset($_varFunctionList[$_key])) { + $varStr = $_varFunctionList[$_key]; + } else { + $varArray = explode('|', $varStr); + + // 取得变量名称 + $name = trim(array_shift($varArray)); + + // 对变量使用函数 + $length = count($varArray); + + // 取得模板禁止使用函数列表 + $template_deny_funs = explode(',', $this->config['tpl_deny_func_list']); + + for ($i = 0; $i < $length; $i++) { + $args = explode('=', $varArray[$i], 2); + + // 模板函数过滤 + $fun = trim($args[0]); + if (in_array($fun, $template_deny_funs)) { + continue; + } + + switch (strtolower($fun)) { + case 'raw': + break; + case 'date': + $name = 'date(' . $args[1] . ',!is_numeric(' . $name . ')? strtotime(' . $name . ') : ' . $name . ')'; + break; + case 'first': + $name = 'current(' . $name . ')'; + break; + case 'last': + $name = 'end(' . $name . ')'; + break; + case 'upper': + $name = 'strtoupper(' . $name . ')'; + break; + case 'lower': + $name = 'strtolower(' . $name . ')'; + break; + case 'format': + $name = 'sprintf(' . $args[1] . ',' . $name . ')'; + break; + case 'default': // 特殊模板函数 + if (false === strpos($name, '(')) { + $name = '(isset(' . $name . ') && (' . $name . ' !== \'\')?' . $name . ':' . $args[1] . ')'; + } else { + $name = '(' . $name . ' ?: ' . $args[1] . ')'; + } + break; + default: // 通用模板函数 + if (isset($args[1])) { + if (strstr($args[1], '###')) { + $args[1] = str_replace('###', $name, $args[1]); + $name = "$fun($args[1])"; + } else { + $name = "$fun($name,$args[1])"; + } + } else { + if (!empty($args[0])) { + $name = "$fun($name)"; + } + } + } + } + + $_varFunctionList[$_key] = $name; + $varStr = $name; + } + return $varStr; + } + + /** + * 特殊模板变量解析 + * 格式 以 $Think. 打头的变量属于特殊模板变量 + * @access public + * @param array $vars 变量数组 + * @return string + */ + public function parseThinkVar($vars) + { + $type = strtoupper(trim(array_shift($vars))); + $param = implode('.', $vars); + + if ($vars) { + switch ($type) { + case 'SERVER': + $parseStr = 'app(\'request\')->server(\'' . $param . '\')'; + break; + case 'GET': + $parseStr = 'app(\'request\')->get(\'' . $param . '\')'; + break; + case 'POST': + $parseStr = 'app(\'request\')->post(\'' . $param . '\')'; + break; + case 'COOKIE': + $parseStr = 'app(\'cookie\')->get(\'' . $param . '\')'; + break; + case 'SESSION': + $parseStr = 'app(\'session\')->get(\'' . $param . '\')'; + break; + case 'ENV': + $parseStr = 'app(\'request\')->env(\'' . $param . '\')'; + break; + case 'REQUEST': + $parseStr = 'app(\'request\')->request(\'' . $param . '\')'; + break; + case 'CONST': + $parseStr = strtoupper($param); + break; + case 'LANG': + $parseStr = 'app(\'lang\')->get(\'' . $param . '\')'; + break; + case 'CONFIG': + $parseStr = 'app(\'config\')->get(\'' . $param . '\')'; + break; + default: + $parseStr = '\'\''; + break; + } + } else { + switch ($type) { + case 'NOW': + $parseStr = "date('Y-m-d g:i a',time())"; + break; + case 'VERSION': + $parseStr = 'app()->version()'; + break; + case 'LDELIM': + $parseStr = '\'' . ltrim($this->config['tpl_begin'], '\\') . '\''; + break; + case 'RDELIM': + $parseStr = '\'' . ltrim($this->config['tpl_end'], '\\') . '\''; + break; + default: + if (defined($type)) { + $parseStr = $type; + } else { + $parseStr = ''; + } + } + } + + return $parseStr; + } + + /** + * 分析加载的模板文件并读取内容 支持多个模板文件读取 + * @access private + * @param string $templateName 模板文件名 + * @return string + */ + private function parseTemplateName($templateName) + { + $array = explode(',', $templateName); + $parseStr = ''; + + foreach ($array as $templateName) { + if (empty($templateName)) { + continue; + } + + if (0 === strpos($templateName, '$')) { + //支持加载变量文件名 + $templateName = $this->get(substr($templateName, 1)); + } + + $template = $this->parseTemplateFile($templateName); + + if ($template) { + // 获取模板文件内容 + $parseStr .= file_get_contents($template); + } + } + + return $parseStr; + } + + /** + * 解析模板文件名 + * @access private + * @param string $template 文件名 + * @return string|false + */ + private function parseTemplateFile($template) + { + if ('' == pathinfo($template, PATHINFO_EXTENSION)) { + if (strpos($template, '@')) { + list($module, $template) = explode('@', $template); + } + + if (0 !== strpos($template, '/')) { + $template = str_replace(['/', ':'], $this->config['view_depr'], $template); + } else { + $template = str_replace(['/', ':'], $this->config['view_depr'], substr($template, 1)); + } + + if ($this->config['view_base']) { + $module = isset($module) ? $module : $this->app['request']->module(); + $path = $this->config['view_base'] . ($module ? $module . DIRECTORY_SEPARATOR : ''); + } else { + $path = isset($module) ? $this->app->getAppPath() . $module . DIRECTORY_SEPARATOR . basename($this->config['view_path']) . DIRECTORY_SEPARATOR : $this->config['view_path']; + } + + $template = $path . $template . '.' . ltrim($this->config['view_suffix'], '.'); + } + + if (is_file($template)) { + // 记录模板文件的更新时间 + $this->includeFile[$template] = filemtime($template); + + return $template; + } + + throw new TemplateNotFoundException('template not exists:' . $template, $template); + } + + /** + * 按标签生成正则 + * @access private + * @param string $tagName 标签名 + * @return string + */ + private function getRegex($tagName) + { + $regex = ''; + if ('tag' == $tagName) { + $begin = $this->config['tpl_begin']; + $end = $this->config['tpl_end']; + + if (strlen(ltrim($begin, '\\')) == 1 && strlen(ltrim($end, '\\')) == 1) { + $regex = $begin . '((?:[\$]{1,2}[a-wA-w_]|[\:\~][\$a-wA-w_]|[+]{2}[\$][a-wA-w_]|[-]{2}[\$][a-wA-w_]|\/[\*\/])(?>[^' . $end . ']*))' . $end; + } else { + $regex = $begin . '((?:[\$]{1,2}[a-wA-w_]|[\:\~][\$a-wA-w_]|[+]{2}[\$][a-wA-w_]|[-]{2}[\$][a-wA-w_]|\/[\*\/])(?>(?:(?!' . $end . ').)*))' . $end; + } + } else { + $begin = $this->config['taglib_begin']; + $end = $this->config['taglib_end']; + $single = strlen(ltrim($begin, '\\')) == 1 && strlen(ltrim($end, '\\')) == 1 ? true : false; + + switch ($tagName) { + case 'block': + if ($single) { + $regex = $begin . '(?:' . $tagName . '\b\s+(?>(?:(?!name=).)*)\bname=([\'\"])(?P[\$\w\-\/\.]+)\\1(?>[^' . $end . ']*)|\/' . $tagName . ')' . $end; + } else { + $regex = $begin . '(?:' . $tagName . '\b\s+(?>(?:(?!name=).)*)\bname=([\'\"])(?P[\$\w\-\/\.]+)\\1(?>(?:(?!' . $end . ').)*)|\/' . $tagName . ')' . $end; + } + break; + case 'literal': + if ($single) { + $regex = '(' . $begin . $tagName . '\b(?>[^' . $end . ']*)' . $end . ')'; + $regex .= '(?:(?>[^' . $begin . ']*)(?>(?!' . $begin . '(?>' . $tagName . '\b[^' . $end . ']*|\/' . $tagName . ')' . $end . ')' . $begin . '[^' . $begin . ']*)*)'; + $regex .= '(' . $begin . '\/' . $tagName . $end . ')'; + } else { + $regex = '(' . $begin . $tagName . '\b(?>(?:(?!' . $end . ').)*)' . $end . ')'; + $regex .= '(?:(?>(?:(?!' . $begin . ').)*)(?>(?!' . $begin . '(?>' . $tagName . '\b(?>(?:(?!' . $end . ').)*)|\/' . $tagName . ')' . $end . ')' . $begin . '(?>(?:(?!' . $begin . ').)*))*)'; + $regex .= '(' . $begin . '\/' . $tagName . $end . ')'; + } + break; + case 'restoreliteral': + $regex = ''; + break; + case 'include': + $name = 'file'; + case 'taglib': + case 'layout': + case 'extend': + if (empty($name)) { + $name = 'name'; + } + if ($single) { + $regex = $begin . $tagName . '\b\s+(?>(?:(?!' . $name . '=).)*)\b' . $name . '=([\'\"])(?P[\$\w\-\/\.\:@,\\\\]+)\\1(?>[^' . $end . ']*)' . $end; + } else { + $regex = $begin . $tagName . '\b\s+(?>(?:(?!' . $name . '=).)*)\b' . $name . '=([\'\"])(?P[\$\w\-\/\.\:@,\\\\]+)\\1(?>(?:(?!' . $end . ').)*)' . $end; + } + break; + } + } + + return '/' . $regex . '/is'; + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app'], $data['storage']); + + return $data; + } +} diff --git a/thinkphp/library/think/Url.php b/thinkphp/library/think/Url.php new file mode 100755 index 0000000..cccabc2 --- /dev/null +++ b/thinkphp/library/think/Url.php @@ -0,0 +1,406 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class Url +{ + /** + * 配置参数 + * @var array + */ + protected $config = []; + + /** + * ROOT地址 + * @var string + */ + protected $root; + + /** + * 绑定检查 + * @var bool + */ + protected $bindCheck; + + /** + * 应用对象 + * @var App + */ + protected $app; + + public function __construct(App $app, array $config = []) + { + $this->app = $app; + $this->config = $config; + + if (is_file($app->getRuntimePath() . 'route.php')) { + // 读取路由映射文件 + $app['route']->setName(include $app->getRuntimePath() . 'route.php'); + } + } + + /** + * 初始化 + * @access public + * @param array $config + * @return void + */ + public function init(array $config = []) + { + $this->config = array_merge($this->config, array_change_key_case($config)); + } + + public static function __make(App $app, Config $config) + { + return new static($app, $config->pull('app')); + } + + /** + * URL生成 支持路由反射 + * @access public + * @param string $url 路由地址 + * @param string|array $vars 参数(支持数组和字符串)a=val&b=val2... ['a'=>'val1', 'b'=>'val2'] + * @param string|bool $suffix 伪静态后缀,默认为true表示获取配置值 + * @param boolean|string $domain 是否显示域名 或者直接传入域名 + * @return string + */ + public function build($url = '', $vars = '', $suffix = true, $domain = false) + { + // 解析URL + if (0 === strpos($url, '[') && $pos = strpos($url, ']')) { + // [name] 表示使用路由命名标识生成URL + $name = substr($url, 1, $pos - 1); + $url = 'name' . substr($url, $pos + 1); + } + + if (false === strpos($url, '://') && 0 !== strpos($url, '/')) { + $info = parse_url($url); + $url = !empty($info['path']) ? $info['path'] : ''; + + if (isset($info['fragment'])) { + // 解析锚点 + $anchor = $info['fragment']; + + if (false !== strpos($anchor, '?')) { + // 解析参数 + list($anchor, $info['query']) = explode('?', $anchor, 2); + } + + if (false !== strpos($anchor, '@')) { + // 解析域名 + list($anchor, $domain) = explode('@', $anchor, 2); + } + } elseif (strpos($url, '@') && false === strpos($url, '\\')) { + // 解析域名 + list($url, $domain) = explode('@', $url, 2); + } + } + + // 解析参数 + if (is_string($vars)) { + // aaa=1&bbb=2 转换成数组 + parse_str($vars, $vars); + } + + if ($url) { + $checkName = isset($name) ? $name : $url . (isset($info['query']) ? '?' . $info['query'] : ''); + $checkDomain = $domain && is_string($domain) ? $domain : null; + + $rule = $this->app['route']->getName($checkName, $checkDomain); + + if (is_null($rule) && isset($info['query'])) { + $rule = $this->app['route']->getName($url); + // 解析地址里面参数 合并到vars + parse_str($info['query'], $params); + $vars = array_merge($params, $vars); + unset($info['query']); + } + } + + if (!empty($rule) && $match = $this->getRuleUrl($rule, $vars, $domain)) { + // 匹配路由命名标识 + $url = $match[0]; + + if ($domain) { + $domain = $match[1]; + } + + if (!is_null($match[2])) { + $suffix = $match[2]; + } + } elseif (!empty($rule) && isset($name)) { + throw new \InvalidArgumentException('route name not exists:' . $name); + } else { + // 检查别名路由 + $alias = $this->app['route']->getAlias(); + $matchAlias = false; + + if ($alias) { + // 别名路由解析 + foreach ($alias as $key => $item) { + $val = $item->getRoute(); + + if (0 === strpos($url, $val)) { + $url = $key . substr($url, strlen($val)); + $matchAlias = true; + break; + } + } + } + + if (!$matchAlias) { + // 路由标识不存在 直接解析 + $url = $this->parseUrl($url); + } + + // 检测URL绑定 + if (!$this->bindCheck) { + $bind = $this->app['route']->getBind($domain && is_string($domain) ? $domain : null); + + if ($bind && 0 === strpos($url, $bind)) { + $url = substr($url, strlen($bind) + 1); + } else { + $binds = $this->app['route']->getBind(true); + + foreach ($binds as $key => $val) { + if (is_string($val) && 0 === strpos($url, $val) && substr_count($val, '/') > 1) { + $url = substr($url, strlen($val) + 1); + $domain = $key; + break; + } + } + } + } + + if (isset($info['query'])) { + // 解析地址里面参数 合并到vars + parse_str($info['query'], $params); + $vars = array_merge($params, $vars); + } + } + + // 还原URL分隔符 + $depr = $this->config['pathinfo_depr']; + $url = str_replace('/', $depr, $url); + + // URL后缀 + if ('/' == substr($url, -1) || '' == $url) { + $suffix = ''; + } else { + $suffix = $this->parseSuffix($suffix); + } + + // 锚点 + $anchor = !empty($anchor) ? '#' . $anchor : ''; + + // 参数组装 + if (!empty($vars)) { + // 添加参数 + if ($this->config['url_common_param']) { + $vars = http_build_query($vars); + $url .= $suffix . '?' . $vars . $anchor; + } else { + $paramType = $this->config['url_param_type']; + + foreach ($vars as $var => $val) { + if ('' !== trim($val)) { + if ($paramType) { + $url .= $depr . urlencode($val); + } else { + $url .= $depr . $var . $depr . urlencode($val); + } + } + } + + $url .= $suffix . $anchor; + } + } else { + $url .= $suffix . $anchor; + } + + // 检测域名 + $domain = $this->parseDomain($url, $domain); + + // URL组装 + $url = $domain . rtrim($this->root ?: $this->app['request']->root(), '/') . '/' . ltrim($url, '/'); + + $this->bindCheck = false; + + return $url; + } + + // 直接解析URL地址 + protected function parseUrl($url) + { + $request = $this->app['request']; + + if (0 === strpos($url, '/')) { + // 直接作为路由地址解析 + $url = substr($url, 1); + } elseif (false !== strpos($url, '\\')) { + // 解析到类 + $url = ltrim(str_replace('\\', '/', $url), '/'); + } elseif (0 === strpos($url, '@')) { + // 解析到控制器 + $url = substr($url, 1); + } else { + // 解析到 模块/控制器/操作 + $module = $request->module(); + $module = $module ? $module . '/' : ''; + $controller = $request->controller(); + + if ('' == $url) { + $action = $request->action(); + } else { + $path = explode('/', $url); + $action = array_pop($path); + $controller = empty($path) ? $controller : array_pop($path); + $module = empty($path) ? $module : array_pop($path) . '/'; + } + + if ($this->config['url_convert']) { + $action = strtolower($action); + $controller = Loader::parseName($controller); + } + + $url = $module . $controller . '/' . $action; + } + + return $url; + } + + // 检测域名 + protected function parseDomain(&$url, $domain) + { + if (!$domain) { + return ''; + } + + $rootDomain = $this->app['request']->rootDomain(); + if (true === $domain) { + // 自动判断域名 + $domain = $this->config['app_host'] ?: $this->app['request']->host(); + + $domains = $this->app['route']->getDomains(); + + if ($domains) { + $route_domain = array_keys($domains); + foreach ($route_domain as $domain_prefix) { + if (0 === strpos($domain_prefix, '*.') && strpos($domain, ltrim($domain_prefix, '*.')) !== false) { + foreach ($domains as $key => $rule) { + $rule = is_array($rule) ? $rule[0] : $rule; + if (is_string($rule) && false === strpos($key, '*') && 0 === strpos($url, $rule)) { + $url = ltrim($url, $rule); + $domain = $key; + + // 生成对应子域名 + if (!empty($rootDomain)) { + $domain .= $rootDomain; + } + break; + } elseif (false !== strpos($key, '*')) { + if (!empty($rootDomain)) { + $domain .= $rootDomain; + } + + break; + } + } + } + } + } + } elseif (0 !== strpos($domain, $rootDomain) && false === strpos($domain, '.')) { + $domain .= '.' . $rootDomain; + } + + if (false !== strpos($domain, '://')) { + $scheme = ''; + } else { + $scheme = $this->app['request']->isSsl() || $this->config['is_https'] ? 'https://' : 'http://'; + + } + + return $scheme . $domain; + } + + // 解析URL后缀 + protected function parseSuffix($suffix) + { + if ($suffix) { + $suffix = true === $suffix ? $this->config['url_html_suffix'] : $suffix; + + if ($pos = strpos($suffix, '|')) { + $suffix = substr($suffix, 0, $pos); + } + } + + return (empty($suffix) || 0 === strpos($suffix, '.')) ? $suffix : '.' . $suffix; + } + + // 匹配路由地址 + public function getRuleUrl($rule, &$vars = [], $allowDomain = '') + { + foreach ($rule as $item) { + list($url, $pattern, $domain, $suffix, $method) = $item; + + if (is_string($allowDomain) && $domain != $allowDomain) { + continue; + } + + if (!in_array($this->app['request']->port(), [80, 443])) { + $domain .= ':' . $this->app['request']->port(); + } + + if (empty($pattern)) { + return [rtrim($url, '?/-'), $domain, $suffix]; + } + + $type = $this->config['url_common_param']; + + foreach ($pattern as $key => $val) { + if (isset($vars[$key])) { + $url = str_replace(['[:' . $key . ']', '<' . $key . '?>', ':' . $key, '<' . $key . '>'], $type ? $vars[$key] : urlencode($vars[$key]), $url); + unset($vars[$key]); + $url = str_replace(['/?', '-?'], ['/', '-'], $url); + $result = [rtrim($url, '?/-'), $domain, $suffix]; + } elseif (2 == $val) { + $url = str_replace(['/[:' . $key . ']', '[:' . $key . ']', '<' . $key . '?>'], '', $url); + $url = str_replace(['/?', '-?'], ['/', '-'], $url); + $result = [rtrim($url, '?/-'), $domain, $suffix]; + } else { + break; + } + } + + if (isset($result)) { + return $result; + } + } + + return false; + } + + // 指定当前生成URL地址的root + public function root($root) + { + $this->root = $root; + $this->app['request']->setRoot($root); + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app']); + + return $data; + } +} diff --git a/thinkphp/library/think/Validate.php b/thinkphp/library/think/Validate.php new file mode 100755 index 0000000..d4f6d23 --- /dev/null +++ b/thinkphp/library/think/Validate.php @@ -0,0 +1,1554 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +use think\exception\ClassNotFoundException; +use think\validate\ValidateRule; + +class Validate +{ + + /** + * 自定义验证类型 + * @var array + */ + protected static $type = []; + + /** + * 验证类型别名 + * @var array + */ + protected $alias = [ + '>' => 'gt', '>=' => 'egt', '<' => 'lt', '<=' => 'elt', '=' => 'eq', 'same' => 'eq', + ]; + + /** + * 当前验证规则 + * @var array + */ + protected $rule = []; + + /** + * 验证提示信息 + * @var array + */ + protected $message = []; + + /** + * 验证字段描述 + * @var array + */ + protected $field = []; + + /** + * 默认规则提示 + * @var array + */ + protected static $typeMsg = [ + 'require' => ':attribute require', + 'must' => ':attribute must', + 'number' => ':attribute must be numeric', + 'integer' => ':attribute must be integer', + 'float' => ':attribute must be float', + 'boolean' => ':attribute must be bool', + 'email' => ':attribute not a valid email address', + 'mobile' => ':attribute not a valid mobile', + 'array' => ':attribute must be a array', + 'accepted' => ':attribute must be yes,on or 1', + 'date' => ':attribute not a valid datetime', + 'file' => ':attribute not a valid file', + 'image' => ':attribute not a valid image', + 'alpha' => ':attribute must be alpha', + 'alphaNum' => ':attribute must be alpha-numeric', + 'alphaDash' => ':attribute must be alpha-numeric, dash, underscore', + 'activeUrl' => ':attribute not a valid domain or ip', + 'chs' => ':attribute must be chinese', + 'chsAlpha' => ':attribute must be chinese or alpha', + 'chsAlphaNum' => ':attribute must be chinese,alpha-numeric', + 'chsDash' => ':attribute must be chinese,alpha-numeric,underscore, dash', + 'url' => ':attribute not a valid url', + 'ip' => ':attribute not a valid ip', + 'dateFormat' => ':attribute must be dateFormat of :rule', + 'in' => ':attribute must be in :rule', + 'notIn' => ':attribute be notin :rule', + 'between' => ':attribute must between :1 - :2', + 'notBetween' => ':attribute not between :1 - :2', + 'length' => 'size of :attribute must be :rule', + 'max' => 'max size of :attribute must be :rule', + 'min' => 'min size of :attribute must be :rule', + 'after' => ':attribute cannot be less than :rule', + 'before' => ':attribute cannot exceed :rule', + 'afterWith' => ':attribute cannot be less than :rule', + 'beforeWith' => ':attribute cannot exceed :rule', + 'expire' => ':attribute not within :rule', + 'allowIp' => 'access IP is not allowed', + 'denyIp' => 'access IP denied', + 'confirm' => ':attribute out of accord with :2', + 'different' => ':attribute cannot be same with :2', + 'egt' => ':attribute must greater than or equal :rule', + 'gt' => ':attribute must greater than :rule', + 'elt' => ':attribute must less than or equal :rule', + 'lt' => ':attribute must less than :rule', + 'eq' => ':attribute must equal :rule', + 'unique' => ':attribute has exists', + 'regex' => ':attribute not conform to the rules', + 'method' => 'invalid Request method', + 'token' => 'invalid token', + 'fileSize' => 'filesize not match', + 'fileExt' => 'extensions to upload is not allowed', + 'fileMime' => 'mimetype to upload is not allowed', + ]; + + /** + * 当前验证场景 + * @var array + */ + protected $currentScene = null; + + /** + * Filter_var 规则 + * @var array + */ + protected $filter = [ + 'email' => FILTER_VALIDATE_EMAIL, + 'ip' => [FILTER_VALIDATE_IP, FILTER_FLAG_IPV4 | FILTER_FLAG_IPV6], + 'integer' => FILTER_VALIDATE_INT, + 'url' => FILTER_VALIDATE_URL, + 'macAddr' => FILTER_VALIDATE_MAC, + 'float' => FILTER_VALIDATE_FLOAT, + ]; + + /** + * 内置正则验证规则 + * @var array + */ + protected $defaultRegex = [ + 'alphaDash' => '/^[A-Za-z0-9\-\_]+$/', + 'chs' => '/^[\x{4e00}-\x{9fa5}]+$/u', + 'chsAlpha' => '/^[\x{4e00}-\x{9fa5}a-zA-Z]+$/u', + 'chsAlphaNum' => '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9]+$/u', + 'chsDash' => '/^[\x{4e00}-\x{9fa5}a-zA-Z0-9\_\-]+$/u', + 'mobile' => '/^1[3-9][0-9]\d{8}$/', + 'idCard' => '/(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/', + 'zip' => '/\d{6}/', + ]; + + /** + * 验证场景定义 + * @var array + */ + protected $scene = []; + + /** + * 验证失败错误信息 + * @var array + */ + protected $error = []; + + /** + * 是否批量验证 + * @var bool + */ + protected $batch = false; + + /** + * 场景需要验证的规则 + * @var array + */ + protected $only = []; + + /** + * 场景需要移除的验证规则 + * @var array + */ + protected $remove = []; + + /** + * 场景需要追加的验证规则 + * @var array + */ + protected $append = []; + + /** + * 验证正则定义 + * @var array + */ + protected $regex = []; + + /** + * 架构函数 + * @access public + * @param array $rules 验证规则 + * @param array $message 验证提示信息 + * @param array $field 验证字段描述信息 + */ + public function __construct(array $rules = [], array $message = [], array $field = []) + { + $this->rule = $rules + $this->rule; + $this->message = array_merge($this->message, $message); + $this->field = array_merge($this->field, $field); + } + + /** + * 创建一个验证器类 + * @access public + * @param array $rules 验证规则 + * @param array $message 验证提示信息 + * @param array $field 验证字段描述信息 + * @return Validate + */ + public static function make(array $rules = [], array $message = [], array $field = []) + { + return new self($rules, $message, $field); + } + + /** + * 添加字段验证规则 + * @access protected + * @param string|array $name 字段名称或者规则数组 + * @param mixed $rule 验证规则或者字段描述信息 + * @return $this + */ + public function rule($name, $rule = '') + { + if (is_array($name)) { + $this->rule = $name + $this->rule; + if (is_array($rule)) { + $this->field = array_merge($this->field, $rule); + } + } else { + $this->rule[$name] = $rule; + } + + return $this; + } + + /** + * 注册扩展验证(类型)规则 + * @access public + * @param string $type 验证规则类型 + * @param mixed $callback callback方法(或闭包) + * @return void + */ + public static function extend($type, $callback = null) + { + if (is_array($type)) { + self::$type = array_merge(self::$type, $type); + } else { + self::$type[$type] = $callback; + } + } + + /** + * 设置验证规则的默认提示信息 + * @access public + * @param string|array $type 验证规则类型名称或者数组 + * @param string $msg 验证提示信息 + * @return void + */ + public static function setTypeMsg($type, $msg = null) + { + if (is_array($type)) { + self::$typeMsg = array_merge(self::$typeMsg, $type); + } else { + self::$typeMsg[$type] = $msg; + } + } + + /** + * 设置提示信息 + * @access public + * @param string|array $name 字段名称 + * @param string $message 提示信息 + * @return Validate + */ + public function message($name, $message = '') + { + if (is_array($name)) { + $this->message = array_merge($this->message, $name); + } else { + $this->message[$name] = $message; + } + + return $this; + } + + /** + * 设置验证场景 + * @access public + * @param string $name 场景名 + * @return $this + */ + public function scene($name) + { + // 设置当前场景 + $this->currentScene = $name; + + return $this; + } + + /** + * 判断是否存在某个验证场景 + * @access public + * @param string $name 场景名 + * @return bool + */ + public function hasScene($name) + { + return isset($this->scene[$name]) || method_exists($this, 'scene' . $name); + } + + /** + * 设置批量验证 + * @access public + * @param bool $batch 是否批量验证 + * @return $this + */ + public function batch($batch = true) + { + $this->batch = $batch; + + return $this; + } + + /** + * 指定需要验证的字段列表 + * @access public + * @param array $fields 字段名 + * @return $this + */ + public function only($fields) + { + $this->only = $fields; + + return $this; + } + + /** + * 移除某个字段的验证规则 + * @access public + * @param string|array $field 字段名 + * @param mixed $rule 验证规则 null 移除所有规则 + * @return $this + */ + public function remove($field, $rule = null) + { + if (is_array($field)) { + foreach ($field as $key => $rule) { + if (is_int($key)) { + $this->remove($rule); + } else { + $this->remove($key, $rule); + } + } + } else { + if (is_string($rule)) { + $rule = explode('|', $rule); + } + + $this->remove[$field] = $rule; + } + + return $this; + } + + /** + * 追加某个字段的验证规则 + * @access public + * @param string|array $field 字段名 + * @param mixed $rule 验证规则 + * @return $this + */ + public function append($field, $rule = null) + { + if (is_array($field)) { + foreach ($field as $key => $rule) { + $this->append($key, $rule); + } + } else { + if (is_string($rule)) { + $rule = explode('|', $rule); + } + + $this->append[$field] = $rule; + } + + return $this; + } + + /** + * 数据自动验证 + * @access public + * @param array $data 数据 + * @param mixed $rules 验证规则 + * @param string $scene 验证场景 + * @return bool + */ + public function check($data, $rules = [], $scene = '') + { + $this->error = []; + + if (empty($rules)) { + // 读取验证规则 + $rules = $this->rule; + } + + // 获取场景定义 + $this->getScene($scene); + + foreach ($this->append as $key => $rule) { + if (!isset($rules[$key])) { + $rules[$key] = $rule; + } + } + + foreach ($rules as $key => $rule) { + // field => 'rule1|rule2...' field => ['rule1','rule2',...] + if (strpos($key, '|')) { + // 字段|描述 用于指定属性名称 + list($key, $title) = explode('|', $key); + } else { + $title = isset($this->field[$key]) ? $this->field[$key] : $key; + } + + // 场景检测 + if (!empty($this->only) && !in_array($key, $this->only)) { + continue; + } + + // 获取数据 支持多维数组 + $value = $this->getDataValue($data, $key); + + // 字段验证 + if ($rule instanceof \Closure) { + $result = call_user_func_array($rule, [$value, $data, $title, $this]); + } elseif ($rule instanceof ValidateRule) { + // 验证因子 + $result = $this->checkItem($key, $value, $rule->getRule(), $data, $rule->getTitle() ?: $title, $rule->getMsg()); + } else { + $result = $this->checkItem($key, $value, $rule, $data, $title); + } + + if (true !== $result) { + // 没有返回true 则表示验证失败 + if (!empty($this->batch)) { + // 批量验证 + if (is_array($result)) { + $this->error = array_merge($this->error, $result); + } else { + $this->error[$key] = $result; + } + } else { + $this->error = $result; + return false; + } + } + } + + return !empty($this->error) ? false : true; + } + + /** + * 根据验证规则验证数据 + * @access public + * @param mixed $value 字段值 + * @param mixed $rules 验证规则 + * @return bool + */ + public function checkRule($value, $rules) + { + if ($rules instanceof \Closure) { + return call_user_func_array($rules, [$value]); + } elseif ($rules instanceof ValidateRule) { + $rules = $rules->getRule(); + } elseif (is_string($rules)) { + $rules = explode('|', $rules); + } + + foreach ($rules as $key => $rule) { + if ($rule instanceof \Closure) { + $result = call_user_func_array($rule, [$value]); + } else { + // 判断验证类型 + list($type, $rule) = $this->getValidateType($key, $rule); + + $callback = isset(self::$type[$type]) ? self::$type[$type] : [$this, $type]; + + $result = call_user_func_array($callback, [$value, $rule]); + } + + if (true !== $result) { + return $result; + } + } + + return true; + } + + /** + * 验证单个字段规则 + * @access protected + * @param string $field 字段名 + * @param mixed $value 字段值 + * @param mixed $rules 验证规则 + * @param array $data 数据 + * @param string $title 字段描述 + * @param array $msg 提示信息 + * @return mixed + */ + protected function checkItem($field, $value, $rules, $data, $title = '', $msg = []) + { + if (isset($this->remove[$field]) && true === $this->remove[$field] && empty($this->append[$field])) { + // 字段已经移除 无需验证 + return true; + } + + // 支持多规则验证 require|in:a,b,c|... 或者 ['require','in'=>'a,b,c',...] + if (is_string($rules)) { + $rules = explode('|', $rules); + } + + if (isset($this->append[$field])) { + // 追加额外的验证规则 + $rules = array_unique(array_merge($rules, $this->append[$field]), SORT_REGULAR); + } + + $i = 0; + $result = true; + + foreach ($rules as $key => $rule) { + if ($rule instanceof \Closure) { + $result = call_user_func_array($rule, [$value, $data]); + $info = is_numeric($key) ? '' : $key; + } else { + // 判断验证类型 + list($type, $rule, $info) = $this->getValidateType($key, $rule); + + if (isset($this->append[$field]) && in_array($info, $this->append[$field])) { + + } elseif (array_key_exists($field, $this->remove) && (null === $this->remove[$field] || in_array($info, $this->remove[$field]))) { + // 规则已经移除 + $i++; + continue; + } + + // 验证类型 + if (isset(self::$type[$type])) { + $result = call_user_func_array(self::$type[$type], [$value, $rule, $data, $field, $title]); + } elseif ('must' == $info || 0 === strpos($info, 'require') || (!is_null($value) && '' !== $value)) { + // 验证数据 + $result = call_user_func_array([$this, $type], [$value, $rule, $data, $field, $title]); + } else { + $result = true; + } + } + + if (false === $result) { + // 验证失败 返回错误信息 + if (!empty($msg[$i])) { + $message = $msg[$i]; + if (is_string($message) && strpos($message, '{%') === 0) { + $message = facade\Lang::get(substr($message, 2, -1)); + } + } else { + $message = $this->getRuleMsg($field, $title, $info, $rule); + } + + return $message; + } elseif (true !== $result) { + // 返回自定义错误信息 + if (is_string($result) && false !== strpos($result, ':')) { + $result = str_replace(':attribute', $title, $result); + + if (strpos($result, ':rule') && is_scalar($rule)) { + $msg = str_replace(':rule', (string) $rule, $result); + } + } + + return $result; + } + $i++; + } + + return $result; + } + + /** + * 获取当前验证类型及规则 + * @access public + * @param mixed $key + * @param mixed $rule + * @return array + */ + protected function getValidateType($key, $rule) + { + // 判断验证类型 + if (!is_numeric($key)) { + return [$key, $rule, $key]; + } + + if (strpos($rule, ':')) { + list($type, $rule) = explode(':', $rule, 2); + if (isset($this->alias[$type])) { + // 判断别名 + $type = $this->alias[$type]; + } + $info = $type; + } elseif (method_exists($this, $rule)) { + $type = $rule; + $info = $rule; + $rule = ''; + } else { + $type = 'is'; + $info = $rule; + } + + return [$type, $rule, $info]; + } + + /** + * 验证是否和某个字段的值一致 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @param string $field 字段名 + * @return bool + */ + public function confirm($value, $rule, $data = [], $field = '') + { + if ('' == $rule) { + if (strpos($field, '_confirm')) { + $rule = strstr($field, '_confirm', true); + } else { + $rule = $field . '_confirm'; + } + } + + return $this->getDataValue($data, $rule) === $value; + } + + /** + * 验证是否和某个字段的值是否不同 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function different($value, $rule, $data = []) + { + return $this->getDataValue($data, $rule) != $value; + } + + /** + * 验证是否大于等于某个值 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function egt($value, $rule, $data = []) + { + return $value >= $this->getDataValue($data, $rule); + } + + /** + * 验证是否大于某个值 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function gt($value, $rule, $data) + { + return $value > $this->getDataValue($data, $rule); + } + + /** + * 验证是否小于等于某个值 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function elt($value, $rule, $data = []) + { + return $value <= $this->getDataValue($data, $rule); + } + + /** + * 验证是否小于某个值 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function lt($value, $rule, $data = []) + { + return $value < $this->getDataValue($data, $rule); + } + + /** + * 验证是否等于某个值 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function eq($value, $rule) + { + return $value == $rule; + } + + /** + * 必须验证 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function must($value, $rule = null) + { + return !empty($value) || '0' == $value; + } + + /** + * 验证字段值是否为有效格式 + * @access public + * @param mixed $value 字段值 + * @param string $rule 验证规则 + * @param array $data 验证数据 + * @return bool + */ + public function is($value, $rule, $data = []) + { + switch (Loader::parseName($rule, 1, false)) { + case 'require': + // 必须 + $result = !empty($value) || '0' == $value; + break; + case 'accepted': + // 接受 + $result = in_array($value, ['1', 'on', 'yes']); + break; + case 'date': + // 是否是一个有效日期 + $result = false !== strtotime($value); + break; + case 'activeUrl': + // 是否为有效的网址 + $result = checkdnsrr($value); + break; + case 'boolean': + case 'bool': + // 是否为布尔值 + $result = in_array($value, [true, false, 0, 1, '0', '1'], true); + break; + case 'number': + $result = ctype_digit((string) $value); + break; + case 'alphaNum': + $result = ctype_alnum($value); + break; + case 'array': + // 是否为数组 + $result = is_array($value); + break; + case 'file': + $result = $value instanceof File; + break; + case 'image': + $result = $value instanceof File && in_array($this->getImageType($value->getRealPath()), [1, 2, 3, 6]); + break; + case 'token': + $result = $this->token($value, '__token__', $data); + break; + default: + if (isset(self::$type[$rule])) { + // 注册的验证规则 + $result = call_user_func_array(self::$type[$rule], [$value]); + } elseif (function_exists('ctype_' . $rule)) { + // ctype验证规则 + $ctypeFun = 'ctype_' . $rule; + $result = $ctypeFun($value); + } elseif (isset($this->filter[$rule])) { + // Filter_var验证规则 + $result = $this->filter($value, $this->filter[$rule]); + } else { + // 正则验证 + $result = $this->regex($value, $rule); + } + } + + return $result; + } + + // 判断图像类型 + protected function getImageType($image) + { + if (function_exists('exif_imagetype')) { + return exif_imagetype($image); + } + + try { + $info = getimagesize($image); + return $info ? $info[2] : false; + } catch (\Exception $e) { + return false; + } + } + + /** + * 验证是否为合格的域名或者IP 支持A,MX,NS,SOA,PTR,CNAME,AAAA,A6, SRV,NAPTR,TXT 或者 ANY类型 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function activeUrl($value, $rule = 'MX') + { + if (!in_array($rule, ['A', 'MX', 'NS', 'SOA', 'PTR', 'CNAME', 'AAAA', 'A6', 'SRV', 'NAPTR', 'TXT', 'ANY'])) { + $rule = 'MX'; + } + + return checkdnsrr($value, $rule); + } + + /** + * 验证是否有效IP + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 ipv4 ipv6 + * @return bool + */ + public function ip($value, $rule = 'ipv4') + { + if (!in_array($rule, ['ipv4', 'ipv6'])) { + $rule = 'ipv4'; + } + + return $this->filter($value, [FILTER_VALIDATE_IP, 'ipv6' == $rule ? FILTER_FLAG_IPV6 : FILTER_FLAG_IPV4]); + } + + /** + * 验证上传文件后缀 + * @access public + * @param mixed $file 上传文件 + * @param mixed $rule 验证规则 + * @return bool + */ + public function fileExt($file, $rule) + { + if (is_array($file)) { + foreach ($file as $item) { + if (!($item instanceof File) || !$item->checkExt($rule)) { + return false; + } + } + return true; + } elseif ($file instanceof File) { + return $file->checkExt($rule); + } + + return false; + } + + /** + * 验证上传文件类型 + * @access public + * @param mixed $file 上传文件 + * @param mixed $rule 验证规则 + * @return bool + */ + public function fileMime($file, $rule) + { + if (is_array($file)) { + foreach ($file as $item) { + if (!($item instanceof File) || !$item->checkMime($rule)) { + return false; + } + } + return true; + } elseif ($file instanceof File) { + return $file->checkMime($rule); + } + + return false; + } + + /** + * 验证上传文件大小 + * @access public + * @param mixed $file 上传文件 + * @param mixed $rule 验证规则 + * @return bool + */ + public function fileSize($file, $rule) + { + if (is_array($file)) { + foreach ($file as $item) { + if (!($item instanceof File) || !$item->checkSize($rule)) { + return false; + } + } + return true; + } elseif ($file instanceof File) { + return $file->checkSize($rule); + } + + return false; + } + + /** + * 验证图片的宽高及类型 + * @access public + * @param mixed $file 上传文件 + * @param mixed $rule 验证规则 + * @return bool + */ + public function image($file, $rule) + { + if (!($file instanceof File)) { + return false; + } + + if ($rule) { + $rule = explode(',', $rule); + + list($width, $height, $type) = getimagesize($file->getRealPath()); + + if (isset($rule[2])) { + $imageType = strtolower($rule[2]); + + if ('jpeg' == $imageType) { + $imageType = 'jpg'; + } + + if (image_type_to_extension($type, false) != $imageType) { + return false; + } + } + + list($w, $h) = $rule; + + return $w == $width && $h == $height; + } + + return in_array($this->getImageType($file->getRealPath()), [1, 2, 3, 6]); + } + + /** + * 验证请求类型 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function method($value, $rule) + { + $method = Container::get('request')->method(); + return strtoupper($rule) == $method; + } + + /** + * 验证时间和日期是否符合指定格式 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function dateFormat($value, $rule) + { + $info = date_parse_from_format($rule, $value); + return 0 == $info['warning_count'] && 0 == $info['error_count']; + } + + /** + * 验证是否唯一 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 格式:数据表,字段名,排除ID,主键名 + * @param array $data 数据 + * @param string $field 验证字段名 + * @return bool + */ + public function unique($value, $rule, $data, $field) + { + if (is_string($rule)) { + $rule = explode(',', $rule); + } + + if (false !== strpos($rule[0], '\\')) { + // 指定模型类 + $db = new $rule[0]; + } else { + try { + $db = Container::get('app')->model($rule[0]); + } catch (ClassNotFoundException $e) { + $db = Db::name($rule[0]); + } + } + + $key = isset($rule[1]) ? $rule[1] : $field; + + if (strpos($key, '^')) { + // 支持多个字段验证 + $fields = explode('^', $key); + foreach ($fields as $key) { + if (isset($data[$key])) { + $map[] = [$key, '=', $data[$key]]; + } + } + } elseif (strpos($key, '=')) { + parse_str($key, $map); + } elseif (isset($data[$field])) { + $map[] = [$key, '=', $data[$field]]; + } else { + $map = []; + } + + $pk = !empty($rule[3]) ? $rule[3] : $db->getPk(); + + if (is_string($pk)) { + if (isset($rule[2])) { + $map[] = [$pk, '<>', $rule[2]]; + } elseif (isset($data[$pk])) { + $map[] = [$pk, '<>', $data[$pk]]; + } + } + + if ($db->where($map)->field($pk)->find()) { + return false; + } + + return true; + } + + /** + * 使用行为类验证 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return mixed + */ + public function behavior($value, $rule, $data) + { + return Container::get('hook')->exec($rule, $data); + } + + /** + * 使用filter_var方式验证 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function filter($value, $rule) + { + if (is_string($rule) && strpos($rule, ',')) { + list($rule, $param) = explode(',', $rule); + } elseif (is_array($rule)) { + $param = isset($rule[1]) ? $rule[1] : null; + $rule = $rule[0]; + } else { + $param = null; + } + + return false !== filter_var($value, is_int($rule) ? $rule : filter_id($rule), $param); + } + + /** + * 验证某个字段等于某个值的时候必须 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function requireIf($value, $rule, $data) + { + list($field, $val) = explode(',', $rule); + + if ($this->getDataValue($data, $field) == $val) { + return !empty($value) || '0' == $value; + } + + return true; + } + + /** + * 通过回调方法验证某个字段是否必须 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function requireCallback($value, $rule, $data) + { + $result = call_user_func_array([$this, $rule], [$value, $data]); + + if ($result) { + return !empty($value) || '0' == $value; + } + + return true; + } + + /** + * 验证某个字段有值的情况下必须 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function requireWith($value, $rule, $data) + { + $val = $this->getDataValue($data, $rule); + + if (!empty($val)) { + return !empty($value) || '0' == $value; + } + + return true; + } + + /** + * 验证是否在范围内 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function in($value, $rule) + { + return in_array($value, is_array($rule) ? $rule : explode(',', $rule)); + } + + /** + * 验证是否不在某个范围 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function notIn($value, $rule) + { + return !in_array($value, is_array($rule) ? $rule : explode(',', $rule)); + } + + /** + * between验证数据 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function between($value, $rule) + { + if (is_string($rule)) { + $rule = explode(',', $rule); + } + list($min, $max) = $rule; + + return $value >= $min && $value <= $max; + } + + /** + * 使用notbetween验证数据 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function notBetween($value, $rule) + { + if (is_string($rule)) { + $rule = explode(',', $rule); + } + list($min, $max) = $rule; + + return $value < $min || $value > $max; + } + + /** + * 验证数据长度 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function length($value, $rule) + { + if (is_array($value)) { + $length = count($value); + } elseif ($value instanceof File) { + $length = $value->getSize(); + } else { + $length = mb_strlen((string) $value); + } + + if (strpos($rule, ',')) { + // 长度区间 + list($min, $max) = explode(',', $rule); + return $length >= $min && $length <= $max; + } + + // 指定长度 + return $length == $rule; + } + + /** + * 验证数据最大长度 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function max($value, $rule) + { + if (is_array($value)) { + $length = count($value); + } elseif ($value instanceof File) { + $length = $value->getSize(); + } else { + $length = mb_strlen((string) $value); + } + + return $length <= $rule; + } + + /** + * 验证数据最小长度 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function min($value, $rule) + { + if (is_array($value)) { + $length = count($value); + } elseif ($value instanceof File) { + $length = $value->getSize(); + } else { + $length = mb_strlen((string) $value); + } + + return $length >= $rule; + } + + /** + * 验证日期 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function after($value, $rule, $data) + { + return strtotime($value) >= strtotime($rule); + } + + /** + * 验证日期 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function before($value, $rule, $data) + { + return strtotime($value) <= strtotime($rule); + } + + /** + * 验证日期字段 + * @access protected + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + protected function afterWith($value, $rule, $data) + { + $rule = $this->getDataValue($data, $rule); + return !is_null($rule) && strtotime($value) >= strtotime($rule); + } + + /** + * 验证日期字段 + * @access protected + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + protected function beforeWith($value, $rule, $data) + { + $rule = $this->getDataValue($data, $rule); + return !is_null($rule) && strtotime($value) <= strtotime($rule); + } + + /** + * 验证有效期 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @return bool + */ + public function expire($value, $rule) + { + if (is_string($rule)) { + $rule = explode(',', $rule); + } + + list($start, $end) = $rule; + + if (!is_numeric($start)) { + $start = strtotime($start); + } + + if (!is_numeric($end)) { + $end = strtotime($end); + } + + return $_SERVER['REQUEST_TIME'] >= $start && $_SERVER['REQUEST_TIME'] <= $end; + } + + /** + * 验证IP许可 + * @access public + * @param string $value 字段值 + * @param mixed $rule 验证规则 + * @return mixed + */ + public function allowIp($value, $rule) + { + return in_array($value, is_array($rule) ? $rule : explode(',', $rule)); + } + + /** + * 验证IP禁用 + * @access public + * @param string $value 字段值 + * @param mixed $rule 验证规则 + * @return mixed + */ + public function denyIp($value, $rule) + { + return !in_array($value, is_array($rule) ? $rule : explode(',', $rule)); + } + + /** + * 使用正则验证数据 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 正则规则或者预定义正则名 + * @return bool + */ + public function regex($value, $rule) + { + if (isset($this->regex[$rule])) { + $rule = $this->regex[$rule]; + } elseif (isset($this->defaultRegex[$rule])) { + $rule = $this->defaultRegex[$rule]; + } + + if (0 !== strpos($rule, '/') && !preg_match('/\/[imsU]{0,4}$/', $rule)) { + // 不是正则表达式则两端补上/ + $rule = '/^' . $rule . '$/'; + } + + return is_scalar($value) && 1 === preg_match($rule, (string) $value); + } + + /** + * 验证表单令牌 + * @access public + * @param mixed $value 字段值 + * @param mixed $rule 验证规则 + * @param array $data 数据 + * @return bool + */ + public function token($value, $rule, $data) + { + $rule = !empty($rule) ? $rule : '__token__'; + $session = Container::get('session'); + + if (!isset($data[$rule]) || !$session->has($rule)) { + // 令牌数据无效 + return false; + } + + // 令牌验证 + if (isset($data[$rule]) && $session->get($rule) === $data[$rule]) { + // 防止重复提交 + $session->delete($rule); // 验证完成销毁session + return true; + } + + // 开启TOKEN重置 + $session->delete($rule); + + return false; + } + + // 获取错误信息 + public function getError() + { + return $this->error; + } + + /** + * 获取数据值 + * @access protected + * @param array $data 数据 + * @param string $key 数据标识 支持多维 + * @return mixed + */ + protected function getDataValue($data, $key) + { + if (is_numeric($key)) { + $value = $key; + } elseif (strpos($key, '.')) { + // 支持多维数组验证 + foreach (explode('.', $key) as $key) { + if (!isset($data[$key])) { + $value = null; + break; + } + $value = $data = $data[$key]; + } + } else { + $value = isset($data[$key]) ? $data[$key] : null; + } + + return $value; + } + + /** + * 获取验证规则的错误提示信息 + * @access protected + * @param string $attribute 字段英文名 + * @param string $title 字段描述名 + * @param string $type 验证规则名称 + * @param mixed $rule 验证规则数据 + * @return string + */ + protected function getRuleMsg($attribute, $title, $type, $rule) + { + $lang = Container::get('lang'); + + if (isset($this->message[$attribute . '.' . $type])) { + $msg = $this->message[$attribute . '.' . $type]; + } elseif (isset($this->message[$attribute][$type])) { + $msg = $this->message[$attribute][$type]; + } elseif (isset($this->message[$attribute])) { + $msg = $this->message[$attribute]; + } elseif (isset(self::$typeMsg[$type])) { + $msg = self::$typeMsg[$type]; + } elseif (0 === strpos($type, 'require')) { + $msg = self::$typeMsg['require']; + } else { + $msg = $title . $lang->get('not conform to the rules'); + } + + if (!is_string($msg)) { + return $msg; + } + + if (0 === strpos($msg, '{%')) { + $msg = $lang->get(substr($msg, 2, -1)); + } elseif ($lang->has($msg)) { + $msg = $lang->get($msg); + } + + if (is_scalar($rule) && false !== strpos($msg, ':')) { + // 变量替换 + if (is_string($rule) && strpos($rule, ',')) { + $array = array_pad(explode(',', $rule), 3, ''); + } else { + $array = array_pad([], 3, ''); + } + $msg = str_replace( + [':attribute', ':1', ':2', ':3'], + [$title, $array[0], $array[1], $array[2]], + $msg); + if (strpos($msg, ':rule')) { + $msg = str_replace(':rule', (string) $rule, $msg); + } + } + + return $msg; + } + + /** + * 获取数据验证的场景 + * @access protected + * @param string $scene 验证场景 + * @return void + */ + protected function getScene($scene = '') + { + if (empty($scene)) { + // 读取指定场景 + $scene = $this->currentScene; + } + + $this->only = $this->append = $this->remove = []; + + if (empty($scene)) { + return; + } + + if (method_exists($this, 'scene' . $scene)) { + call_user_func([$this, 'scene' . $scene]); + } elseif (isset($this->scene[$scene])) { + // 如果设置了验证适用场景 + $scene = $this->scene[$scene]; + + if (is_string($scene)) { + $scene = explode(',', $scene); + } + + $this->only = $scene; + } + } + + /** + * 动态方法 直接调用is方法进行验证 + * @access public + * @param string $method 方法名 + * @param array $args 调用参数 + * @return bool + */ + public function __call($method, $args) + { + if ('is' == strtolower(substr($method, 0, 2))) { + $method = substr($method, 2); + } + + array_push($args, lcfirst($method)); + + return call_user_func_array([$this, 'is'], $args); + } +} diff --git a/thinkphp/library/think/View.php b/thinkphp/library/think/View.php new file mode 100755 index 0000000..284dd41 --- /dev/null +++ b/thinkphp/library/think/View.php @@ -0,0 +1,253 @@ + +// +---------------------------------------------------------------------- + +namespace think; + +class View +{ + /** + * 模板引擎实例 + * @var object + */ + public $engine; + + /** + * 模板变量 + * @var array + */ + protected $data = []; + + /** + * 内容过滤 + * @var mixed + */ + protected $filter; + + /** + * 全局模板变量 + * @var array + */ + protected static $var = []; + + /** + * 初始化 + * @access public + * @param mixed $engine 模板引擎参数 + * @return $this + */ + public function init($engine = []) + { + // 初始化模板引擎 + $this->engine($engine); + + return $this; + } + + public static function __make(Config $config) + { + return (new static())->init($config->pull('template')); + } + + /** + * 模板变量静态赋值 + * @access public + * @param mixed $name 变量名 + * @param mixed $value 变量值 + * @return $this + */ + public function share($name, $value = '') + { + if (is_array($name)) { + self::$var = array_merge(self::$var, $name); + } else { + self::$var[$name] = $value; + } + + return $this; + } + + /** + * 清理模板变量 + * @access public + * @return void + */ + public function clear() + { + self::$var = []; + $this->data = []; + } + + /** + * 模板变量赋值 + * @access public + * @param mixed $name 变量名 + * @param mixed $value 变量值 + * @return $this + */ + public function assign($name, $value = '') + { + if (is_array($name)) { + $this->data = array_merge($this->data, $name); + } else { + $this->data[$name] = $value; + } + + return $this; + } + + /** + * 设置当前模板解析的引擎 + * @access public + * @param array|string $options 引擎参数 + * @return $this + */ + public function engine($options = []) + { + if (is_string($options)) { + $type = $options; + $options = []; + } else { + $type = !empty($options['type']) ? $options['type'] : 'Think'; + } + + if (isset($options['type'])) { + unset($options['type']); + } + + $this->engine = Loader::factory($type, '\\think\\view\\driver\\', $options); + + return $this; + } + + /** + * 配置模板引擎 + * @access public + * @param string|array $name 参数名 + * @param mixed $value 参数值 + * @return $this + */ + public function config($name, $value = null) + { + $this->engine->config($name, $value); + + return $this; + } + + /** + * 检查模板是否存在 + * @access public + * @param string|array $name 参数名 + * @return bool + */ + public function exists($name) + { + return $this->engine->exists($name); + } + + /** + * 视图过滤 + * @access public + * @param Callable $filter 过滤方法或闭包 + * @return $this + */ + public function filter($filter) + { + if ($filter) { + $this->filter = $filter; + } + + return $this; + } + + /** + * 解析和获取模板内容 用于输出 + * @access public + * @param string $template 模板文件名或者内容 + * @param array $vars 模板输出变量 + * @param array $config 模板参数 + * @param bool $renderContent 是否渲染内容 + * @return string + * @throws \Exception + */ + public function fetch($template = '', $vars = [], $config = [], $renderContent = false) + { + // 模板变量 + $vars = array_merge(self::$var, $this->data, $vars); + + // 页面缓存 + ob_start(); + ob_implicit_flush(0); + + // 渲染输出 + try { + $method = $renderContent ? 'display' : 'fetch'; + $this->engine->$method($template, $vars, $config); + } catch (\Exception $e) { + ob_end_clean(); + throw $e; + } + + // 获取并清空缓存 + $content = ob_get_clean(); + + if ($this->filter) { + $content = call_user_func_array($this->filter, [$content]); + } + + return $content; + } + + /** + * 渲染内容输出 + * @access public + * @param string $content 内容 + * @param array $vars 模板输出变量 + * @param array $config 模板参数 + * @return mixed + */ + public function display($content, $vars = [], $config = []) + { + return $this->fetch($content, $vars, $config, true); + } + + /** + * 模板变量赋值 + * @access public + * @param string $name 变量名 + * @param mixed $value 变量值 + */ + public function __set($name, $value) + { + $this->data[$name] = $value; + } + + /** + * 取得模板显示变量的值 + * @access protected + * @param string $name 模板变量 + * @return mixed + */ + public function __get($name) + { + return $this->data[$name]; + } + + /** + * 检测模板变量是否设置 + * @access public + * @param string $name 模板变量名 + * @return bool + */ + public function __isset($name) + { + return isset($this->data[$name]); + } +} diff --git a/thinkphp/library/think/cache/Driver.php b/thinkphp/library/think/cache/Driver.php new file mode 100755 index 0000000..6421681 --- /dev/null +++ b/thinkphp/library/think/cache/Driver.php @@ -0,0 +1,366 @@ + +// +---------------------------------------------------------------------- + +namespace think\cache; + +use think\Container; + +/** + * 缓存基础类 + */ +abstract class Driver +{ + /** + * 驱动句柄 + * @var object + */ + protected $handler = null; + + /** + * 缓存读取次数 + * @var integer + */ + protected $readTimes = 0; + + /** + * 缓存写入次数 + * @var integer + */ + protected $writeTimes = 0; + + /** + * 缓存参数 + * @var array + */ + protected $options = []; + + /** + * 缓存标签 + * @var string + */ + protected $tag; + + /** + * 序列化方法 + * @var array + */ + protected static $serialize = ['serialize', 'unserialize', 'think_serialize:', 16]; + + /** + * 判断缓存是否存在 + * @access public + * @param string $name 缓存变量名 + * @return bool + */ + abstract public function has($name); + + /** + * 读取缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $default 默认值 + * @return mixed + */ + abstract public function get($name, $default = false); + + /** + * 写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param int $expire 有效时间 0为永久 + * @return boolean + */ + abstract public function set($name, $value, $expire = null); + + /** + * 自增缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + abstract public function inc($name, $step = 1); + + /** + * 自减缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + abstract public function dec($name, $step = 1); + + /** + * 删除缓存 + * @access public + * @param string $name 缓存变量名 + * @return boolean + */ + abstract public function rm($name); + + /** + * 清除缓存 + * @access public + * @param string $tag 标签名 + * @return boolean + */ + abstract public function clear($tag = null); + + /** + * 获取有效期 + * @access protected + * @param integer|\DateTime $expire 有效期 + * @return integer + */ + protected function getExpireTime($expire) + { + if ($expire instanceof \DateTime) { + $expire = $expire->getTimestamp() - time(); + } + + return $expire; + } + + /** + * 获取实际的缓存标识 + * @access protected + * @param string $name 缓存名 + * @return string + */ + protected function getCacheKey($name) + { + return $this->options['prefix'] . $name; + } + + /** + * 读取缓存并删除 + * @access public + * @param string $name 缓存变量名 + * @return mixed + */ + public function pull($name) + { + $result = $this->get($name, false); + + if ($result) { + $this->rm($name); + return $result; + } else { + return; + } + } + + /** + * 如果不存在则写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param int $expire 有效时间 0为永久 + * @return mixed + */ + public function remember($name, $value, $expire = null) + { + if (!$this->has($name)) { + $time = time(); + while ($time + 5 > time() && $this->has($name . '_lock')) { + // 存在锁定则等待 + usleep(200000); + } + + try { + // 锁定 + $this->set($name . '_lock', true); + + if ($value instanceof \Closure) { + // 获取缓存数据 + $value = Container::getInstance()->invokeFunction($value); + } + + // 缓存数据 + $this->set($name, $value, $expire); + + // 解锁 + $this->rm($name . '_lock'); + } catch (\Exception $e) { + $this->rm($name . '_lock'); + throw $e; + } catch (\throwable $e) { + $this->rm($name . '_lock'); + throw $e; + } + } else { + $value = $this->get($name); + } + + return $value; + } + + /** + * 缓存标签 + * @access public + * @param string $name 标签名 + * @param string|array $keys 缓存标识 + * @param bool $overlay 是否覆盖 + * @return $this + */ + public function tag($name, $keys = null, $overlay = false) + { + if (is_null($name)) { + + } elseif (is_null($keys)) { + $this->tag = $name; + } else { + $key = $this->getTagkey($name); + + if (is_string($keys)) { + $keys = explode(',', $keys); + } + + $keys = array_map([$this, 'getCacheKey'], $keys); + + if ($overlay) { + $value = $keys; + } else { + $value = array_unique(array_merge($this->getTagItem($name), $keys)); + } + + $this->set($key, implode(',', $value), 0); + } + + return $this; + } + + /** + * 更新标签 + * @access protected + * @param string $name 缓存标识 + * @return void + */ + protected function setTagItem($name) + { + if ($this->tag) { + $key = $this->getTagkey($this->tag); + $this->tag = null; + + if ($this->has($key)) { + $value = explode(',', $this->get($key)); + $value[] = $name; + + if (count($value) > 1000) { + array_shift($value); + } + + $value = implode(',', array_unique($value)); + } else { + $value = $name; + } + + $this->set($key, $value, 0); + } + } + + /** + * 获取标签包含的缓存标识 + * @access protected + * @param string $tag 缓存标签 + * @return array + */ + protected function getTagItem($tag) + { + $key = $this->getTagkey($tag); + $value = $this->get($key); + + if ($value) { + return array_filter(explode(',', $value)); + } else { + return []; + } + } + + protected function getTagKey($tag) + { + return 'tag_' . md5($tag); + } + + /** + * 序列化数据 + * @access protected + * @param mixed $data + * @return string + */ + protected function serialize($data) + { + if (is_scalar($data) || !$this->options['serialize']) { + return $data; + } + + $serialize = self::$serialize[0]; + + return self::$serialize[2] . $serialize($data); + } + + /** + * 反序列化数据 + * @access protected + * @param string $data + * @return mixed + */ + protected function unserialize($data) + { + if ($this->options['serialize'] && 0 === strpos($data, self::$serialize[2])) { + $unserialize = self::$serialize[1]; + + return $unserialize(substr($data, self::$serialize[3])); + } else { + return $data; + } + } + + /** + * 注册序列化机制 + * @access public + * @param callable $serialize 序列化方法 + * @param callable $unserialize 反序列化方法 + * @param string $prefix 序列化前缀标识 + * @return $this + */ + public static function registerSerialize($serialize, $unserialize, $prefix = 'think_serialize:') + { + self::$serialize = [$serialize, $unserialize, $prefix, strlen($prefix)]; + } + + /** + * 返回句柄对象,可执行其它高级方法 + * + * @access public + * @return object + */ + public function handler() + { + return $this->handler; + } + + public function getReadTimes() + { + return $this->readTimes; + } + + public function getWriteTimes() + { + return $this->writeTimes; + } + + public function __call($method, $args) + { + return call_user_func_array([$this->handler, $method], $args); + } +} diff --git a/thinkphp/library/think/cache/driver/File.php b/thinkphp/library/think/cache/driver/File.php new file mode 100755 index 0000000..93d321f --- /dev/null +++ b/thinkphp/library/think/cache/driver/File.php @@ -0,0 +1,305 @@ + +// +---------------------------------------------------------------------- + +namespace think\cache\driver; + +use think\cache\Driver; +use think\Container; + +/** + * 文件类型缓存类 + * @author liu21st + */ +class File extends Driver +{ + protected $options = [ + 'expire' => 0, + 'cache_subdir' => true, + 'prefix' => '', + 'path' => '', + 'hash_type' => 'md5', + 'data_compress' => false, + 'serialize' => true, + ]; + + protected $expire; + + /** + * 架构函数 + * @param array $options + */ + public function __construct($options = []) + { + if (!empty($options)) { + $this->options = array_merge($this->options, $options); + } + + if (empty($this->options['path'])) { + $this->options['path'] = Container::get('app')->getRuntimePath() . 'cache' . DIRECTORY_SEPARATOR; + } elseif (substr($this->options['path'], -1) != DIRECTORY_SEPARATOR) { + $this->options['path'] .= DIRECTORY_SEPARATOR; + } + + $this->init(); + } + + /** + * 初始化检查 + * @access private + * @return boolean + */ + private function init() + { + // 创建项目缓存目录 + try { + if (!is_dir($this->options['path']) && mkdir($this->options['path'], 0755, true)) { + return true; + } + } catch (\Exception $e) { + } + + return false; + } + + /** + * 取得变量的存储文件名 + * @access protected + * @param string $name 缓存变量名 + * @param bool $auto 是否自动创建目录 + * @return string + */ + protected function getCacheKey($name, $auto = false) + { + $name = hash($this->options['hash_type'], $name); + + if ($this->options['cache_subdir']) { + // 使用子目录 + $name = substr($name, 0, 2) . DIRECTORY_SEPARATOR . substr($name, 2); + } + + if ($this->options['prefix']) { + $name = $this->options['prefix'] . DIRECTORY_SEPARATOR . $name; + } + + $filename = $this->options['path'] . $name . '.php'; + $dir = dirname($filename); + + if ($auto && !is_dir($dir)) { + try { + mkdir($dir, 0755, true); + } catch (\Exception $e) { + } + } + + return $filename; + } + + /** + * 判断缓存是否存在 + * @access public + * @param string $name 缓存变量名 + * @return bool + */ + public function has($name) + { + return false !== $this->get($name) ? true : false; + } + + /** + * 读取缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name, $default = false) + { + $this->readTimes++; + + $filename = $this->getCacheKey($name); + + if (!is_file($filename)) { + return $default; + } + + $content = file_get_contents($filename); + $this->expire = null; + + if (false !== $content) { + $expire = (int) substr($content, 8, 12); + if (0 != $expire && time() > filemtime($filename) + $expire) { + //缓存过期删除缓存文件 + $this->unlink($filename); + return $default; + } + + $this->expire = $expire; + $content = substr($content, 32); + + if ($this->options['data_compress'] && function_exists('gzcompress')) { + //启用数据压缩 + $content = gzuncompress($content); + } + return $this->unserialize($content); + } else { + return $default; + } + } + + /** + * 写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param int|\DateTime $expire 有效时间 0为永久 + * @return boolean + */ + public function set($name, $value, $expire = null) + { + $this->writeTimes++; + + if (is_null($expire)) { + $expire = $this->options['expire']; + } + + $expire = $this->getExpireTime($expire); + $filename = $this->getCacheKey($name, true); + + if ($this->tag && !is_file($filename)) { + $first = true; + } + + $data = $this->serialize($value); + + if ($this->options['data_compress'] && function_exists('gzcompress')) { + //数据压缩 + $data = gzcompress($data, 3); + } + + $data = "\n" . $data; + $result = file_put_contents($filename, $data); + + if ($result) { + isset($first) && $this->setTagItem($filename); + clearstatcache(); + return true; + } else { + return false; + } + } + + /** + * 自增缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function inc($name, $step = 1) + { + if ($this->has($name)) { + $value = $this->get($name) + $step; + $expire = $this->expire; + } else { + $value = $step; + $expire = 0; + } + + return $this->set($name, $value, $expire) ? $value : false; + } + + /** + * 自减缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function dec($name, $step = 1) + { + if ($this->has($name)) { + $value = $this->get($name) - $step; + $expire = $this->expire; + } else { + $value = -$step; + $expire = 0; + } + + return $this->set($name, $value, $expire) ? $value : false; + } + + /** + * 删除缓存 + * @access public + * @param string $name 缓存变量名 + * @return boolean + */ + public function rm($name) + { + $this->writeTimes++; + + try { + return $this->unlink($this->getCacheKey($name)); + } catch (\Exception $e) { + } + } + + /** + * 清除缓存 + * @access public + * @param string $tag 标签名 + * @return boolean + */ + public function clear($tag = null) + { + if ($tag) { + // 指定标签清除 + $keys = $this->getTagItem($tag); + foreach ($keys as $key) { + $this->unlink($key); + } + $this->rm($this->getTagKey($tag)); + return true; + } + + $this->writeTimes++; + + $files = (array) glob($this->options['path'] . ($this->options['prefix'] ? $this->options['prefix'] . DIRECTORY_SEPARATOR : '') . '*'); + + foreach ($files as $path) { + if (is_dir($path)) { + $matches = glob($path . DIRECTORY_SEPARATOR . '*.php'); + if (is_array($matches)) { + array_map('unlink', $matches); + } + rmdir($path); + } else { + unlink($path); + } + } + + return true; + } + + /** + * 判断文件是否存在后,删除 + * @access private + * @param string $path + * @return bool + * @author byron sampson + * @return boolean + */ + private function unlink($path) + { + return is_file($path) && unlink($path); + } + +} diff --git a/thinkphp/library/think/cache/driver/Lite.php b/thinkphp/library/think/cache/driver/Lite.php new file mode 100755 index 0000000..0cfe390 --- /dev/null +++ b/thinkphp/library/think/cache/driver/Lite.php @@ -0,0 +1,209 @@ + +// +---------------------------------------------------------------------- + +namespace think\cache\driver; + +use think\cache\Driver; + +/** + * 文件类型缓存类 + * @author liu21st + */ +class Lite extends Driver +{ + protected $options = [ + 'prefix' => '', + 'path' => '', + 'expire' => 0, // 等于 10*365*24*3600(10年) + ]; + + /** + * 架构函数 + * @access public + * + * @param array $options + */ + public function __construct($options = []) + { + if (!empty($options)) { + $this->options = array_merge($this->options, $options); + } + + if (substr($this->options['path'], -1) != DIRECTORY_SEPARATOR) { + $this->options['path'] .= DIRECTORY_SEPARATOR; + } + + } + + /** + * 取得变量的存储文件名 + * @access protected + * @param string $name 缓存变量名 + * @return string + */ + protected function getCacheKey($name) + { + return $this->options['path'] . $this->options['prefix'] . md5($name) . '.php'; + } + + /** + * 判断缓存是否存在 + * @access public + * @param string $name 缓存变量名 + * @return mixed + */ + public function has($name) + { + return $this->get($name) ? true : false; + } + + /** + * 读取缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name, $default = false) + { + $this->readTimes++; + + $filename = $this->getCacheKey($name); + + if (is_file($filename)) { + // 判断是否过期 + $mtime = filemtime($filename); + + if ($mtime < time()) { + // 清除已经过期的文件 + unlink($filename); + return $default; + } + + return include $filename; + } else { + return $default; + } + } + + /** + * 写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param int|\DateTime $expire 有效时间 0为永久 + * @return bool + */ + public function set($name, $value, $expire = null) + { + $this->writeTimes++; + + if (is_null($expire)) { + $expire = $this->options['expire']; + } + + if ($expire instanceof \DateTime) { + $expire = $expire->getTimestamp(); + } else { + $expire = 0 === $expire ? 10 * 365 * 24 * 3600 : $expire; + $expire = time() + $expire; + } + + $filename = $this->getCacheKey($name); + + if ($this->tag && !is_file($filename)) { + $first = true; + } + + $ret = file_put_contents($filename, ("setTagItem($filename); + touch($filename, $expire); + } + + return $ret; + } + + /** + * 自增缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function inc($name, $step = 1) + { + if ($this->has($name)) { + $value = $this->get($name) + $step; + } else { + $value = $step; + } + + return $this->set($name, $value, 0) ? $value : false; + } + + /** + * 自减缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function dec($name, $step = 1) + { + if ($this->has($name)) { + $value = $this->get($name) - $step; + } else { + $value = -$step; + } + + return $this->set($name, $value, 0) ? $value : false; + } + + /** + * 删除缓存 + * @access public + * @param string $name 缓存变量名 + * @return boolean + */ + public function rm($name) + { + $this->writeTimes++; + + return unlink($this->getCacheKey($name)); + } + + /** + * 清除缓存 + * @access public + * @param string $tag 标签名 + * @return bool + */ + public function clear($tag = null) + { + if ($tag) { + // 指定标签清除 + $keys = $this->getTagItem($tag); + foreach ($keys as $key) { + unlink($key); + } + + $this->rm($this->getTagKey($tag)); + return true; + } + + $this->writeTimes++; + + array_map("unlink", glob($this->options['path'] . ($this->options['prefix'] ? $this->options['prefix'] . DIRECTORY_SEPARATOR : '') . '*.php')); + } +} diff --git a/thinkphp/library/think/cache/driver/Memcache.php b/thinkphp/library/think/cache/driver/Memcache.php new file mode 100755 index 0000000..1c53559 --- /dev/null +++ b/thinkphp/library/think/cache/driver/Memcache.php @@ -0,0 +1,206 @@ + +// +---------------------------------------------------------------------- + +namespace think\cache\driver; + +use think\cache\Driver; + +class Memcache extends Driver +{ + protected $options = [ + 'host' => '127.0.0.1', + 'port' => 11211, + 'expire' => 0, + 'timeout' => 0, // 超时时间(单位:毫秒) + 'persistent' => true, + 'prefix' => '', + 'serialize' => true, + ]; + + /** + * 架构函数 + * @access public + * @param array $options 缓存参数 + * @throws \BadFunctionCallException + */ + public function __construct($options = []) + { + if (!extension_loaded('memcache')) { + throw new \BadFunctionCallException('not support: memcache'); + } + + if (!empty($options)) { + $this->options = array_merge($this->options, $options); + } + + $this->handler = new \Memcache; + + // 支持集群 + $hosts = explode(',', $this->options['host']); + $ports = explode(',', $this->options['port']); + + if (empty($ports[0])) { + $ports[0] = 11211; + } + + // 建立连接 + foreach ((array) $hosts as $i => $host) { + $port = isset($ports[$i]) ? $ports[$i] : $ports[0]; + $this->options['timeout'] > 0 ? + $this->handler->addServer($host, $port, $this->options['persistent'], 1, $this->options['timeout']) : + $this->handler->addServer($host, $port, $this->options['persistent'], 1); + } + } + + /** + * 判断缓存 + * @access public + * @param string $name 缓存变量名 + * @return bool + */ + public function has($name) + { + $key = $this->getCacheKey($name); + + return false !== $this->handler->get($key); + } + + /** + * 读取缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name, $default = false) + { + $this->readTimes++; + + $result = $this->handler->get($this->getCacheKey($name)); + + return false !== $result ? $this->unserialize($result) : $default; + } + + /** + * 写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param int|DateTime $expire 有效时间(秒) + * @return bool + */ + public function set($name, $value, $expire = null) + { + $this->writeTimes++; + + if (is_null($expire)) { + $expire = $this->options['expire']; + } + + if ($this->tag && !$this->has($name)) { + $first = true; + } + + $key = $this->getCacheKey($name); + $expire = $this->getExpireTime($expire); + $value = $this->serialize($value); + + if ($this->handler->set($key, $value, 0, $expire)) { + isset($first) && $this->setTagItem($key); + return true; + } + + return false; + } + + /** + * 自增缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function inc($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + if ($this->handler->get($key)) { + return $this->handler->increment($key, $step); + } + + return $this->handler->set($key, $step); + } + + /** + * 自减缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function dec($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + $value = $this->handler->get($key) - $step; + $res = $this->handler->set($key, $value); + + return !$res ? false : $value; + } + + /** + * 删除缓存 + * @access public + * @param string $name 缓存变量名 + * @param bool|false $ttl + * @return bool + */ + public function rm($name, $ttl = false) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + return false === $ttl ? + $this->handler->delete($key) : + $this->handler->delete($key, $ttl); + } + + /** + * 清除缓存 + * @access public + * @param string $tag 标签名 + * @return bool + */ + public function clear($tag = null) + { + if ($tag) { + // 指定标签清除 + $keys = $this->getTagItem($tag); + + foreach ($keys as $key) { + $this->handler->delete($key); + } + + $tagName = $this->getTagKey($tag); + $this->rm($tagName); + return true; + } + + $this->writeTimes++; + + return $this->handler->flush(); + } + +} diff --git a/thinkphp/library/think/cache/driver/Memcached.php b/thinkphp/library/think/cache/driver/Memcached.php new file mode 100755 index 0000000..6af60d1 --- /dev/null +++ b/thinkphp/library/think/cache/driver/Memcached.php @@ -0,0 +1,279 @@ + +// +---------------------------------------------------------------------- + +namespace think\cache\driver; + +use think\cache\Driver; + +class Memcached extends Driver +{ + protected $options = [ + 'host' => '127.0.0.1', + 'port' => 11211, + 'expire' => 0, + 'timeout' => 0, // 超时时间(单位:毫秒) + 'prefix' => '', + 'username' => '', //账号 + 'password' => '', //密码 + 'option' => [], + 'serialize' => true, + ]; + + /** + * 架构函数 + * @access public + * @param array $options 缓存参数 + */ + public function __construct($options = []) + { + if (!extension_loaded('memcached')) { + throw new \BadFunctionCallException('not support: memcached'); + } + + if (!empty($options)) { + $this->options = array_merge($this->options, $options); + } + + $this->handler = new \Memcached; + + if (!empty($this->options['option'])) { + $this->handler->setOptions($this->options['option']); + } + + // 设置连接超时时间(单位:毫秒) + if ($this->options['timeout'] > 0) { + $this->handler->setOption(\Memcached::OPT_CONNECT_TIMEOUT, $this->options['timeout']); + } + + // 支持集群 + $hosts = explode(',', $this->options['host']); + $ports = explode(',', $this->options['port']); + if (empty($ports[0])) { + $ports[0] = 11211; + } + + // 建立连接 + $servers = []; + foreach ((array) $hosts as $i => $host) { + $servers[] = [$host, (isset($ports[$i]) ? $ports[$i] : $ports[0]), 1]; + } + + $this->handler->addServers($servers); + + if ('' != $this->options['username']) { + $this->handler->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); + $this->handler->setSaslAuthData($this->options['username'], $this->options['password']); + } + } + + /** + * 判断缓存 + * @access public + * @param string $name 缓存变量名 + * @return bool + */ + public function has($name) + { + $key = $this->getCacheKey($name); + + return $this->handler->get($key) ? true : false; + } + + /** + * 读取缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name, $default = false) + { + $this->readTimes++; + + $result = $this->handler->get($this->getCacheKey($name)); + + return false !== $result ? $this->unserialize($result) : $default; + } + + /** + * 写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param integer|\DateTime $expire 有效时间(秒) + * @return bool + */ + public function set($name, $value, $expire = null) + { + $this->writeTimes++; + + if (is_null($expire)) { + $expire = $this->options['expire']; + } + + if ($this->tag && !$this->has($name)) { + $first = true; + } + + $key = $this->getCacheKey($name); + $expire = $this->getExpireTime($expire); + $value = $this->serialize($value); + + if ($this->handler->set($key, $value, $expire)) { + isset($first) && $this->setTagItem($key); + return true; + } + + return false; + } + + /** + * 自增缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function inc($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + if ($this->handler->get($key)) { + return $this->handler->increment($key, $step); + } + + return $this->handler->set($key, $step); + } + + /** + * 自减缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function dec($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + $value = $this->handler->get($key) - $step; + $res = $this->handler->set($key, $value); + + return !$res ? false : $value; + } + + /** + * 删除缓存 + * @access public + * @param string $name 缓存变量名 + * @param bool|false $ttl + * @return bool + */ + public function rm($name, $ttl = false) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + return false === $ttl ? + $this->handler->delete($key) : + $this->handler->delete($key, $ttl); + } + + /** + * 清除缓存 + * @access public + * @param string $tag 标签名 + * @return bool + */ + public function clear($tag = null) + { + if ($tag) { + // 指定标签清除 + $keys = $this->getTagItem($tag); + + $this->handler->deleteMulti($keys); + $this->rm($this->getTagKey($tag)); + + return true; + } + + $this->writeTimes++; + + return $this->handler->flush(); + } + + /** + * 缓存标签 + * @access public + * @param string $name 标签名 + * @param string|array $keys 缓存标识 + * @param bool $overlay 是否覆盖 + * @return $this + */ + public function tag($name, $keys = null, $overlay = false) + { + if (is_null($keys)) { + $this->tag = $name; + } else { + $tagName = $this->getTagKey($name); + if ($overlay) { + $this->handler->delete($tagName); + } + + if (!$this->handler->has($tagName)) { + $this->handler->set($tagName, ''); + } + + foreach ($keys as $key) { + $this->handler->append($tagName, ',' . $key); + } + } + + return $this; + } + + /** + * 更新标签 + * @access protected + * @param string $name 缓存标识 + * @return void + */ + protected function setTagItem($name) + { + if ($this->tag) { + $tagName = $this->getTagKey($this->tag); + + if ($this->handler->has($tagName)) { + $this->handler->append($tagName, ',' . $name); + } else { + $this->handler->set($tagName, $name); + } + + $this->tag = null; + } + } + + /** + * 获取标签包含的缓存标识 + * @access public + * @param string $tag 缓存标签 + * @return array + */ + public function getTagItem($tag) + { + $tagName = $this->getTagKey($tag); + return explode(',', trim($this->handler->get($tagName), ',')); + } +} diff --git a/thinkphp/library/think/cache/driver/Redis.php b/thinkphp/library/think/cache/driver/Redis.php new file mode 100755 index 0000000..813746e --- /dev/null +++ b/thinkphp/library/think/cache/driver/Redis.php @@ -0,0 +1,272 @@ + +// +---------------------------------------------------------------------- + +namespace think\cache\driver; + +use think\cache\Driver; + +/** + * Redis缓存驱动,适合单机部署、有前端代理实现高可用的场景,性能最好 + * 有需要在业务层实现读写分离、或者使用RedisCluster的需求,请使用Redisd驱动 + * + * 要求安装phpredis扩展:https://github.com/nicolasff/phpredis + * @author 尘缘 <130775@qq.com> + */ +class Redis extends Driver +{ + protected $options = [ + 'host' => '127.0.0.1', + 'port' => 6379, + 'password' => '', + 'select' => 0, + 'timeout' => 0, + 'expire' => 0, + 'persistent' => false, + 'prefix' => '', + 'serialize' => true, + ]; + + /** + * 架构函数 + * @access public + * @param array $options 缓存参数 + */ + public function __construct($options = []) + { + if (!empty($options)) { + $this->options = array_merge($this->options, $options); + } + + if (extension_loaded('redis')) { + $this->handler = new \Redis; + + if ($this->options['persistent']) { + $this->handler->pconnect($this->options['host'], $this->options['port'], $this->options['timeout'], 'persistent_id_' . $this->options['select']); + } else { + $this->handler->connect($this->options['host'], $this->options['port'], $this->options['timeout']); + } + + if ('' != $this->options['password']) { + $this->handler->auth($this->options['password']); + } + + if (0 != $this->options['select']) { + $this->handler->select($this->options['select']); + } + } elseif (class_exists('\Predis\Client')) { + $params = []; + foreach ($this->options as $key => $val) { + if (in_array($key, ['aggregate', 'cluster', 'connections', 'exceptions', 'prefix', 'profile', 'replication', 'parameters'])) { + $params[$key] = $val; + unset($this->options[$key]); + } + } + + if ('' == $this->options['password']) { + unset($this->options['password']); + } + + $this->handler = new \Predis\Client($this->options, $params); + + $this->options['prefix'] = ''; + } else { + throw new \BadFunctionCallException('not support: redis'); + } + } + + /** + * 判断缓存 + * @access public + * @param string $name 缓存变量名 + * @return bool + */ + public function has($name) + { + return $this->handler->exists($this->getCacheKey($name)); + } + + /** + * 读取缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name, $default = false) + { + $this->readTimes++; + + $value = $this->handler->get($this->getCacheKey($name)); + + if (is_null($value) || false === $value) { + return $default; + } + + return $this->unserialize($value); + } + + /** + * 写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param integer|\DateTime $expire 有效时间(秒) + * @return boolean + */ + public function set($name, $value, $expire = null) + { + $this->writeTimes++; + + if (is_null($expire)) { + $expire = $this->options['expire']; + } + + if ($this->tag && !$this->has($name)) { + $first = true; + } + + $key = $this->getCacheKey($name); + $expire = $this->getExpireTime($expire); + + $value = $this->serialize($value); + + if ($expire) { + $result = $this->handler->setex($key, $expire, $value); + } else { + $result = $this->handler->set($key, $value); + } + + isset($first) && $this->setTagItem($key); + + return $result; + } + + /** + * 自增缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function inc($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + return $this->handler->incrby($key, $step); + } + + /** + * 自减缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function dec($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + return $this->handler->decrby($key, $step); + } + + /** + * 删除缓存 + * @access public + * @param string $name 缓存变量名 + * @return boolean + */ + public function rm($name) + { + $this->writeTimes++; + + return $this->handler->del($this->getCacheKey($name)); + } + + /** + * 清除缓存 + * @access public + * @param string $tag 标签名 + * @return boolean + */ + public function clear($tag = null) + { + if ($tag) { + // 指定标签清除 + $keys = $this->getTagItem($tag); + + $this->handler->del($keys); + + $tagName = $this->getTagKey($tag); + $this->handler->del($tagName); + return true; + } + + $this->writeTimes++; + + return $this->handler->flushDB(); + } + + /** + * 缓存标签 + * @access public + * @param string $name 标签名 + * @param string|array $keys 缓存标识 + * @param bool $overlay 是否覆盖 + * @return $this + */ + public function tag($name, $keys = null, $overlay = false) + { + if (is_null($keys)) { + $this->tag = $name; + } else { + $tagName = $this->getTagKey($name); + if ($overlay) { + $this->handler->del($tagName); + } + + foreach ($keys as $key) { + $this->handler->sAdd($tagName, $key); + } + } + + return $this; + } + + /** + * 更新标签 + * @access protected + * @param string $name 缓存标识 + * @return void + */ + protected function setTagItem($name) + { + if ($this->tag) { + $tagName = $this->getTagKey($this->tag); + $this->handler->sAdd($tagName, $name); + } + } + + /** + * 获取标签包含的缓存标识 + * @access protected + * @param string $tag 缓存标签 + * @return array + */ + protected function getTagItem($tag) + { + $tagName = $this->getTagKey($tag); + return $this->handler->sMembers($tagName); + } +} diff --git a/thinkphp/library/think/cache/driver/Sqlite.php b/thinkphp/library/think/cache/driver/Sqlite.php new file mode 100755 index 0000000..f57361e --- /dev/null +++ b/thinkphp/library/think/cache/driver/Sqlite.php @@ -0,0 +1,233 @@ + +// +---------------------------------------------------------------------- + +namespace think\cache\driver; + +use think\cache\Driver; + +/** + * Sqlite缓存驱动 + * @author liu21st + */ +class Sqlite extends Driver +{ + protected $options = [ + 'db' => ':memory:', + 'table' => 'sharedmemory', + 'prefix' => '', + 'expire' => 0, + 'persistent' => false, + 'serialize' => true, + ]; + + /** + * 架构函数 + * @access public + * @param array $options 缓存参数 + * @throws \BadFunctionCallException + */ + public function __construct($options = []) + { + if (!extension_loaded('sqlite')) { + throw new \BadFunctionCallException('not support: sqlite'); + } + + if (!empty($options)) { + $this->options = array_merge($this->options, $options); + } + + $func = $this->options['persistent'] ? 'sqlite_popen' : 'sqlite_open'; + + $this->handler = $func($this->options['db']); + } + + /** + * 获取实际的缓存标识 + * @access public + * @param string $name 缓存名 + * @return string + */ + protected function getCacheKey($name) + { + return $this->options['prefix'] . sqlite_escape_string($name); + } + + /** + * 判断缓存 + * @access public + * @param string $name 缓存变量名 + * @return bool + */ + public function has($name) + { + $name = $this->getCacheKey($name); + + $sql = 'SELECT value FROM ' . $this->options['table'] . ' WHERE var=\'' . $name . '\' AND (expire=0 OR expire >' . time() . ') LIMIT 1'; + $result = sqlite_query($this->handler, $sql); + + return sqlite_num_rows($result); + } + + /** + * 读取缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name, $default = false) + { + $this->readTimes++; + + $name = $this->getCacheKey($name); + + $sql = 'SELECT value FROM ' . $this->options['table'] . ' WHERE var=\'' . $name . '\' AND (expire=0 OR expire >' . time() . ') LIMIT 1'; + + $result = sqlite_query($this->handler, $sql); + + if (sqlite_num_rows($result)) { + $content = sqlite_fetch_single($result); + if (function_exists('gzcompress')) { + //启用数据压缩 + $content = gzuncompress($content); + } + + return $this->unserialize($content); + } + + return $default; + } + + /** + * 写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param integer|\DateTime $expire 有效时间(秒) + * @return boolean + */ + public function set($name, $value, $expire = null) + { + $this->writeTimes++; + + $name = $this->getCacheKey($name); + + $value = sqlite_escape_string($this->serialize($value)); + + if (is_null($expire)) { + $expire = $this->options['expire']; + } + + if ($expire instanceof \DateTime) { + $expire = $expire->getTimestamp(); + } else { + $expire = (0 == $expire) ? 0 : (time() + $expire); //缓存有效期为0表示永久缓存 + } + + if (function_exists('gzcompress')) { + //数据压缩 + $value = gzcompress($value, 3); + } + + if ($this->tag) { + $tag = $this->tag; + $this->tag = null; + } else { + $tag = ''; + } + + $sql = 'REPLACE INTO ' . $this->options['table'] . ' (var, value, expire, tag) VALUES (\'' . $name . '\', \'' . $value . '\', \'' . $expire . '\', \'' . $tag . '\')'; + + if (sqlite_query($this->handler, $sql)) { + return true; + } + + return false; + } + + /** + * 自增缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function inc($name, $step = 1) + { + if ($this->has($name)) { + $value = $this->get($name) + $step; + } else { + $value = $step; + } + + return $this->set($name, $value, 0) ? $value : false; + } + + /** + * 自减缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function dec($name, $step = 1) + { + if ($this->has($name)) { + $value = $this->get($name) - $step; + } else { + $value = -$step; + } + + return $this->set($name, $value, 0) ? $value : false; + } + + /** + * 删除缓存 + * @access public + * @param string $name 缓存变量名 + * @return boolean + */ + public function rm($name) + { + $this->writeTimes++; + + $name = $this->getCacheKey($name); + + $sql = 'DELETE FROM ' . $this->options['table'] . ' WHERE var=\'' . $name . '\''; + sqlite_query($this->handler, $sql); + + return true; + } + + /** + * 清除缓存 + * @access public + * @param string $tag 标签名 + * @return boolean + */ + public function clear($tag = null) + { + if ($tag) { + $name = sqlite_escape_string($this->getTagKey($tag)); + $sql = 'DELETE FROM ' . $this->options['table'] . ' WHERE tag=\'' . $name . '\''; + sqlite_query($this->handler, $sql); + return true; + } + + $this->writeTimes++; + + $sql = 'DELETE FROM ' . $this->options['table']; + + sqlite_query($this->handler, $sql); + + return true; + } +} diff --git a/thinkphp/library/think/cache/driver/Wincache.php b/thinkphp/library/think/cache/driver/Wincache.php new file mode 100755 index 0000000..ef15784 --- /dev/null +++ b/thinkphp/library/think/cache/driver/Wincache.php @@ -0,0 +1,175 @@ + +// +---------------------------------------------------------------------- + +namespace think\cache\driver; + +use think\cache\Driver; + +/** + * Wincache缓存驱动 + * @author liu21st + */ +class Wincache extends Driver +{ + protected $options = [ + 'prefix' => '', + 'expire' => 0, + 'serialize' => true, + ]; + + /** + * 架构函数 + * @access public + * @param array $options 缓存参数 + * @throws \BadFunctionCallException + */ + public function __construct($options = []) + { + if (!function_exists('wincache_ucache_info')) { + throw new \BadFunctionCallException('not support: WinCache'); + } + + if (!empty($options)) { + $this->options = array_merge($this->options, $options); + } + } + + /** + * 判断缓存 + * @access public + * @param string $name 缓存变量名 + * @return bool + */ + public function has($name) + { + $this->readTimes++; + + $key = $this->getCacheKey($name); + + return wincache_ucache_exists($key); + } + + /** + * 读取缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name, $default = false) + { + $this->readTimes++; + + $key = $this->getCacheKey($name); + + return wincache_ucache_exists($key) ? $this->unserialize(wincache_ucache_get($key)) : $default; + } + + /** + * 写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param integer|\DateTime $expire 有效时间(秒) + * @return boolean + */ + public function set($name, $value, $expire = null) + { + $this->writeTimes++; + + if (is_null($expire)) { + $expire = $this->options['expire']; + } + + $key = $this->getCacheKey($name); + $expire = $this->getExpireTime($expire); + $value = $this->serialize($value); + + if ($this->tag && !$this->has($name)) { + $first = true; + } + + if (wincache_ucache_set($key, $value, $expire)) { + isset($first) && $this->setTagItem($key); + return true; + } + + return false; + } + + /** + * 自增缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function inc($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + return wincache_ucache_inc($key, $step); + } + + /** + * 自减缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function dec($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + return wincache_ucache_dec($key, $step); + } + + /** + * 删除缓存 + * @access public + * @param string $name 缓存变量名 + * @return boolean + */ + public function rm($name) + { + $this->writeTimes++; + + return wincache_ucache_delete($this->getCacheKey($name)); + } + + /** + * 清除缓存 + * @access public + * @param string $tag 标签名 + * @return boolean + */ + public function clear($tag = null) + { + if ($tag) { + $keys = $this->getTagItem($tag); + + wincache_ucache_delete($keys); + + $tagName = $this->getTagkey($tag); + $this->rm($tagName); + return true; + } + + $this->writeTimes++; + return wincache_ucache_clear(); + } + +} diff --git a/thinkphp/library/think/cache/driver/Xcache.php b/thinkphp/library/think/cache/driver/Xcache.php new file mode 100755 index 0000000..4e69859 --- /dev/null +++ b/thinkphp/library/think/cache/driver/Xcache.php @@ -0,0 +1,179 @@ + +// +---------------------------------------------------------------------- + +namespace think\cache\driver; + +use think\cache\Driver; + +/** + * Xcache缓存驱动 + * @author liu21st + */ +class Xcache extends Driver +{ + protected $options = [ + 'prefix' => '', + 'expire' => 0, + 'serialize' => true, + ]; + + /** + * 架构函数 + * @access public + * @param array $options 缓存参数 + * @throws \BadFunctionCallException + */ + public function __construct($options = []) + { + if (!function_exists('xcache_info')) { + throw new \BadFunctionCallException('not support: Xcache'); + } + + if (!empty($options)) { + $this->options = array_merge($this->options, $options); + } + } + + /** + * 判断缓存 + * @access public + * @param string $name 缓存变量名 + * @return bool + */ + public function has($name) + { + $key = $this->getCacheKey($name); + + return xcache_isset($key); + } + + /** + * 读取缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $default 默认值 + * @return mixed + */ + public function get($name, $default = false) + { + $this->readTimes++; + + $key = $this->getCacheKey($name); + + return xcache_isset($key) ? $this->unserialize(xcache_get($key)) : $default; + } + + /** + * 写入缓存 + * @access public + * @param string $name 缓存变量名 + * @param mixed $value 存储数据 + * @param integer|\DateTime $expire 有效时间(秒) + * @return boolean + */ + public function set($name, $value, $expire = null) + { + $this->writeTimes++; + + if (is_null($expire)) { + $expire = $this->options['expire']; + } + + if ($this->tag && !$this->has($name)) { + $first = true; + } + + $key = $this->getCacheKey($name); + $expire = $this->getExpireTime($expire); + $value = $this->serialize($value); + + if (xcache_set($key, $value, $expire)) { + isset($first) && $this->setTagItem($key); + return true; + } + + return false; + } + + /** + * 自增缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function inc($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + return xcache_inc($key, $step); + } + + /** + * 自减缓存(针对数值缓存) + * @access public + * @param string $name 缓存变量名 + * @param int $step 步长 + * @return false|int + */ + public function dec($name, $step = 1) + { + $this->writeTimes++; + + $key = $this->getCacheKey($name); + + return xcache_dec($key, $step); + } + + /** + * 删除缓存 + * @access public + * @param string $name 缓存变量名 + * @return boolean + */ + public function rm($name) + { + $this->writeTimes++; + + return xcache_unset($this->getCacheKey($name)); + } + + /** + * 清除缓存 + * @access public + * @param string $tag 标签名 + * @return boolean + */ + public function clear($tag = null) + { + if ($tag) { + // 指定标签清除 + $keys = $this->getTagItem($tag); + + foreach ($keys as $key) { + xcache_unset($key); + } + + $this->rm($this->getTagKey($tag)); + return true; + } + + $this->writeTimes++; + + if (function_exists('xcache_unset_by_prefix')) { + return xcache_unset_by_prefix($this->options['prefix']); + } else { + return false; + } + } +} diff --git a/thinkphp/library/think/config/driver/Ini.php b/thinkphp/library/think/config/driver/Ini.php new file mode 100755 index 0000000..b2a647d --- /dev/null +++ b/thinkphp/library/think/config/driver/Ini.php @@ -0,0 +1,31 @@ + +// +---------------------------------------------------------------------- + +namespace think\config\driver; + +class Ini +{ + protected $config; + + public function __construct($config) + { + $this->config = $config; + } + + public function parse() + { + if (is_file($this->config)) { + return parse_ini_file($this->config, true); + } else { + return parse_ini_string($this->config, true); + } + } +} diff --git a/thinkphp/library/think/config/driver/Json.php b/thinkphp/library/think/config/driver/Json.php new file mode 100755 index 0000000..0d77c8e --- /dev/null +++ b/thinkphp/library/think/config/driver/Json.php @@ -0,0 +1,31 @@ + +// +---------------------------------------------------------------------- + +namespace think\config\driver; + +class Json +{ + protected $config; + + public function __construct($config) + { + if (is_file($config)) { + $config = file_get_contents($config); + } + + $this->config = $config; + } + + public function parse() + { + return json_decode($this->config, true); + } +} diff --git a/thinkphp/library/think/config/driver/Xml.php b/thinkphp/library/think/config/driver/Xml.php new file mode 100755 index 0000000..9d69633 --- /dev/null +++ b/thinkphp/library/think/config/driver/Xml.php @@ -0,0 +1,40 @@ + +// +---------------------------------------------------------------------- + +namespace think\config\driver; + +class Xml +{ + protected $config; + + public function __construct($config) + { + $this->config = $config; + } + + public function parse() + { + if (is_file($this->config)) { + $content = simplexml_load_file($this->config); + } else { + $content = simplexml_load_string($this->config); + } + + $result = (array) $content; + foreach ($result as $key => $val) { + if (is_object($val)) { + $result[$key] = (array) $val; + } + } + + return $result; + } +} diff --git a/thinkphp/library/think/console/Command.php b/thinkphp/library/think/console/Command.php new file mode 100755 index 0000000..a208e7b --- /dev/null +++ b/thinkphp/library/think/console/Command.php @@ -0,0 +1,482 @@ + +// +---------------------------------------------------------------------- + +namespace think\console; + +use think\Console; +use think\console\input\Argument; +use think\console\input\Definition; +use think\console\input\Option; + +class Command +{ + + /** @var Console */ + private $console; + private $name; + private $aliases = []; + private $definition; + private $help; + private $description; + private $ignoreValidationErrors = false; + private $consoleDefinitionMerged = false; + private $consoleDefinitionMergedWithArgs = false; + private $code; + private $synopsis = []; + private $usages = []; + + /** @var Input */ + protected $input; + + /** @var Output */ + protected $output; + + /** + * 构造方法 + * @param string|null $name 命令名称,如果没有设置则比如在 configure() 里设置 + * @throws \LogicException + * @api + */ + public function __construct($name = null) + { + $this->definition = new Definition(); + + if (null !== $name) { + $this->setName($name); + } + + $this->configure(); + + if (!$this->name) { + throw new \LogicException(sprintf('The command defined in "%s" cannot have an empty name.', get_class($this))); + } + } + + /** + * 忽略验证错误 + */ + public function ignoreValidationErrors() + { + $this->ignoreValidationErrors = true; + } + + /** + * 设置控制台 + * @param Console $console + */ + public function setConsole(Console $console = null) + { + $this->console = $console; + } + + /** + * 获取控制台 + * @return Console + * @api + */ + public function getConsole() + { + return $this->console; + } + + /** + * 是否有效 + * @return bool + */ + public function isEnabled() + { + return true; + } + + /** + * 配置指令 + */ + protected function configure() + { + } + + /** + * 执行指令 + * @param Input $input + * @param Output $output + * @return null|int + * @throws \LogicException + * @see setCode() + */ + protected function execute(Input $input, Output $output) + { + throw new \LogicException('You must override the execute() method in the concrete command class.'); + } + + /** + * 用户验证 + * @param Input $input + * @param Output $output + */ + protected function interact(Input $input, Output $output) + { + } + + /** + * 初始化 + * @param Input $input An InputInterface instance + * @param Output $output An OutputInterface instance + */ + protected function initialize(Input $input, Output $output) + { + } + + /** + * 执行 + * @param Input $input + * @param Output $output + * @return int + * @throws \Exception + * @see setCode() + * @see execute() + */ + public function run(Input $input, Output $output) + { + $this->input = $input; + $this->output = $output; + + $this->getSynopsis(true); + $this->getSynopsis(false); + + $this->mergeConsoleDefinition(); + + try { + $input->bind($this->definition); + } catch (\Exception $e) { + if (!$this->ignoreValidationErrors) { + throw $e; + } + } + + $this->initialize($input, $output); + + if ($input->isInteractive()) { + $this->interact($input, $output); + } + + $input->validate(); + + if ($this->code) { + $statusCode = call_user_func($this->code, $input, $output); + } else { + $statusCode = $this->execute($input, $output); + } + + return is_numeric($statusCode) ? (int) $statusCode : 0; + } + + /** + * 设置执行代码 + * @param callable $code callable(InputInterface $input, OutputInterface $output) + * @return Command + * @throws \InvalidArgumentException + * @see execute() + */ + public function setCode(callable $code) + { + if (!is_callable($code)) { + throw new \InvalidArgumentException('Invalid callable provided to Command::setCode.'); + } + + if (PHP_VERSION_ID >= 50400 && $code instanceof \Closure) { + $r = new \ReflectionFunction($code); + if (null === $r->getClosureThis()) { + $code = \Closure::bind($code, $this); + } + } + + $this->code = $code; + + return $this; + } + + /** + * 合并参数定义 + * @param bool $mergeArgs + */ + public function mergeConsoleDefinition($mergeArgs = true) + { + if (null === $this->console + || (true === $this->consoleDefinitionMerged + && ($this->consoleDefinitionMergedWithArgs || !$mergeArgs)) + ) { + return; + } + + if ($mergeArgs) { + $currentArguments = $this->definition->getArguments(); + $this->definition->setArguments($this->console->getDefinition()->getArguments()); + $this->definition->addArguments($currentArguments); + } + + $this->definition->addOptions($this->console->getDefinition()->getOptions()); + + $this->consoleDefinitionMerged = true; + if ($mergeArgs) { + $this->consoleDefinitionMergedWithArgs = true; + } + } + + /** + * 设置参数定义 + * @param array|Definition $definition + * @return Command + * @api + */ + public function setDefinition($definition) + { + if ($definition instanceof Definition) { + $this->definition = $definition; + } else { + $this->definition->setDefinition($definition); + } + + $this->consoleDefinitionMerged = false; + + return $this; + } + + /** + * 获取参数定义 + * @return Definition + * @api + */ + public function getDefinition() + { + return $this->definition; + } + + /** + * 获取当前指令的参数定义 + * @return Definition + */ + public function getNativeDefinition() + { + return $this->getDefinition(); + } + + /** + * 添加参数 + * @param string $name 名称 + * @param int $mode 类型 + * @param string $description 描述 + * @param mixed $default 默认值 + * @return Command + */ + public function addArgument($name, $mode = null, $description = '', $default = null) + { + $this->definition->addArgument(new Argument($name, $mode, $description, $default)); + + return $this; + } + + /** + * 添加选项 + * @param string $name 选项名称 + * @param string $shortcut 别名 + * @param int $mode 类型 + * @param string $description 描述 + * @param mixed $default 默认值 + * @return Command + */ + public function addOption($name, $shortcut = null, $mode = null, $description = '', $default = null) + { + $this->definition->addOption(new Option($name, $shortcut, $mode, $description, $default)); + + return $this; + } + + /** + * 设置指令名称 + * @param string $name + * @return Command + * @throws \InvalidArgumentException + */ + public function setName($name) + { + $this->validateName($name); + + $this->name = $name; + + return $this; + } + + /** + * 获取指令名称 + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 设置描述 + * @param string $description + * @return Command + */ + public function setDescription($description) + { + $this->description = $description; + + return $this; + } + + /** + * 获取描述 + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * 设置帮助信息 + * @param string $help + * @return Command + */ + public function setHelp($help) + { + $this->help = $help; + + return $this; + } + + /** + * 获取帮助信息 + * @return string + */ + public function getHelp() + { + return $this->help; + } + + /** + * 描述信息 + * @return string + */ + public function getProcessedHelp() + { + $name = $this->name; + + $placeholders = [ + '%command.name%', + '%command.full_name%', + ]; + $replacements = [ + $name, + $_SERVER['PHP_SELF'] . ' ' . $name, + ]; + + return str_replace($placeholders, $replacements, $this->getHelp()); + } + + /** + * 设置别名 + * @param string[] $aliases + * @return Command + * @throws \InvalidArgumentException + */ + public function setAliases($aliases) + { + if (!is_array($aliases) && !$aliases instanceof \Traversable) { + throw new \InvalidArgumentException('$aliases must be an array or an instance of \Traversable'); + } + + foreach ($aliases as $alias) { + $this->validateName($alias); + } + + $this->aliases = $aliases; + + return $this; + } + + /** + * 获取别名 + * @return array + */ + public function getAliases() + { + return $this->aliases; + } + + /** + * 获取简介 + * @param bool $short 是否简单的 + * @return string + */ + public function getSynopsis($short = false) + { + $key = $short ? 'short' : 'long'; + + if (!isset($this->synopsis[$key])) { + $this->synopsis[$key] = trim(sprintf('%s %s', $this->name, $this->definition->getSynopsis($short))); + } + + return $this->synopsis[$key]; + } + + /** + * 添加用法介绍 + * @param string $usage + * @return $this + */ + public function addUsage($usage) + { + if (0 !== strpos($usage, $this->name)) { + $usage = sprintf('%s %s', $this->name, $usage); + } + + $this->usages[] = $usage; + + return $this; + } + + /** + * 获取用法介绍 + * @return array + */ + public function getUsages() + { + return $this->usages; + } + + /** + * 验证指令名称 + * @param string $name + * @throws \InvalidArgumentException + */ + private function validateName($name) + { + if (!preg_match('/^[^\:]++(\:[^\:]++)*$/', $name)) { + throw new \InvalidArgumentException(sprintf('Command name "%s" is invalid.', $name)); + } + } + + /** + * 输出表格 + * @param Table $table + * @return string + */ + protected function table(Table $table) + { + $content = $table->render(); + $this->output->writeln($content); + return $content; + } +} diff --git a/thinkphp/library/think/console/Input.php b/thinkphp/library/think/console/Input.php new file mode 100755 index 0000000..2482dfd --- /dev/null +++ b/thinkphp/library/think/console/Input.php @@ -0,0 +1,464 @@ + +// +---------------------------------------------------------------------- + +namespace think\console; + +use think\console\input\Argument; +use think\console\input\Definition; +use think\console\input\Option; + +class Input +{ + + /** + * @var Definition + */ + protected $definition; + + /** + * @var Option[] + */ + protected $options = []; + + /** + * @var Argument[] + */ + protected $arguments = []; + + protected $interactive = true; + + private $tokens; + private $parsed; + + public function __construct($argv = null) + { + if (null === $argv) { + $argv = $_SERVER['argv']; + // 去除命令名 + array_shift($argv); + } + + $this->tokens = $argv; + + $this->definition = new Definition(); + } + + protected function setTokens(array $tokens) + { + $this->tokens = $tokens; + } + + /** + * 绑定实例 + * @param Definition $definition A InputDefinition instance + */ + public function bind(Definition $definition) + { + $this->arguments = []; + $this->options = []; + $this->definition = $definition; + + $this->parse(); + } + + /** + * 解析参数 + */ + protected function parse() + { + $parseOptions = true; + $this->parsed = $this->tokens; + while (null !== $token = array_shift($this->parsed)) { + if ($parseOptions && '' == $token) { + $this->parseArgument($token); + } elseif ($parseOptions && '--' == $token) { + $parseOptions = false; + } elseif ($parseOptions && 0 === strpos($token, '--')) { + $this->parseLongOption($token); + } elseif ($parseOptions && '-' === $token[0] && '-' !== $token) { + $this->parseShortOption($token); + } else { + $this->parseArgument($token); + } + } + } + + /** + * 解析短选项 + * @param string $token 当前的指令. + */ + private function parseShortOption($token) + { + $name = substr($token, 1); + + if (strlen($name) > 1) { + if ($this->definition->hasShortcut($name[0]) + && $this->definition->getOptionForShortcut($name[0])->acceptValue() + ) { + $this->addShortOption($name[0], substr($name, 1)); + } else { + $this->parseShortOptionSet($name); + } + } else { + $this->addShortOption($name, null); + } + } + + /** + * 解析短选项 + * @param string $name 当前指令 + * @throws \RuntimeException + */ + private function parseShortOptionSet($name) + { + $len = strlen($name); + for ($i = 0; $i < $len; ++$i) { + if (!$this->definition->hasShortcut($name[$i])) { + throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $name[$i])); + } + + $option = $this->definition->getOptionForShortcut($name[$i]); + if ($option->acceptValue()) { + $this->addLongOption($option->getName(), $i === $len - 1 ? null : substr($name, $i + 1)); + + break; + } else { + $this->addLongOption($option->getName(), null); + } + } + } + + /** + * 解析完整选项 + * @param string $token 当前指令 + */ + private function parseLongOption($token) + { + $name = substr($token, 2); + + if (false !== $pos = strpos($name, '=')) { + $this->addLongOption(substr($name, 0, $pos), substr($name, $pos + 1)); + } else { + $this->addLongOption($name, null); + } + } + + /** + * 解析参数 + * @param string $token 当前指令 + * @throws \RuntimeException + */ + private function parseArgument($token) + { + $c = count($this->arguments); + + if ($this->definition->hasArgument($c)) { + $arg = $this->definition->getArgument($c); + + $this->arguments[$arg->getName()] = $arg->isArray() ? [$token] : $token; + + } elseif ($this->definition->hasArgument($c - 1) && $this->definition->getArgument($c - 1)->isArray()) { + $arg = $this->definition->getArgument($c - 1); + + $this->arguments[$arg->getName()][] = $token; + } else { + throw new \RuntimeException('Too many arguments.'); + } + } + + /** + * 添加一个短选项的值 + * @param string $shortcut 短名称 + * @param mixed $value 值 + * @throws \RuntimeException + */ + private function addShortOption($shortcut, $value) + { + if (!$this->definition->hasShortcut($shortcut)) { + throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); + } + + $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); + } + + /** + * 添加一个完整选项的值 + * @param string $name 选项名 + * @param mixed $value 值 + * @throws \RuntimeException + */ + private function addLongOption($name, $value) + { + if (!$this->definition->hasOption($name)) { + throw new \RuntimeException(sprintf('The "--%s" option does not exist.', $name)); + } + + $option = $this->definition->getOption($name); + + if (false === $value) { + $value = null; + } + + if (null !== $value && !$option->acceptValue()) { + throw new \RuntimeException(sprintf('The "--%s" option does not accept a value.', $name, $value)); + } + + if (null === $value && $option->acceptValue() && count($this->parsed)) { + $next = array_shift($this->parsed); + if (isset($next[0]) && '-' !== $next[0]) { + $value = $next; + } elseif (empty($next)) { + $value = ''; + } else { + array_unshift($this->parsed, $next); + } + } + + if (null === $value) { + if ($option->isValueRequired()) { + throw new \RuntimeException(sprintf('The "--%s" option requires a value.', $name)); + } + + if (!$option->isArray()) { + $value = $option->isValueOptional() ? $option->getDefault() : true; + } + } + + if ($option->isArray()) { + $this->options[$name][] = $value; + } else { + $this->options[$name] = $value; + } + } + + /** + * 获取第一个参数 + * @return string|null + */ + public function getFirstArgument() + { + foreach ($this->tokens as $token) { + if ($token && '-' === $token[0]) { + continue; + } + + return $token; + } + return; + } + + /** + * 检查原始参数是否包含某个值 + * @param string|array $values 需要检查的值 + * @return bool + */ + public function hasParameterOption($values) + { + $values = (array) $values; + + foreach ($this->tokens as $token) { + foreach ($values as $value) { + if ($token === $value || 0 === strpos($token, $value . '=')) { + return true; + } + } + } + + return false; + } + + /** + * 获取原始选项的值 + * @param string|array $values 需要检查的值 + * @param mixed $default 默认值 + * @return mixed The option value + */ + public function getParameterOption($values, $default = false) + { + $values = (array) $values; + $tokens = $this->tokens; + + while (0 < count($tokens)) { + $token = array_shift($tokens); + + foreach ($values as $value) { + if ($token === $value || 0 === strpos($token, $value . '=')) { + if (false !== $pos = strpos($token, '=')) { + return substr($token, $pos + 1); + } + + return array_shift($tokens); + } + } + } + + return $default; + } + + /** + * 验证输入 + * @throws \RuntimeException + */ + public function validate() + { + if (count($this->arguments) < $this->definition->getArgumentRequiredCount()) { + throw new \RuntimeException('Not enough arguments.'); + } + } + + /** + * 检查输入是否是交互的 + * @return bool + */ + public function isInteractive() + { + return $this->interactive; + } + + /** + * 设置输入的交互 + * @param bool + */ + public function setInteractive($interactive) + { + $this->interactive = (bool) $interactive; + } + + /** + * 获取所有的参数 + * @return Argument[] + */ + public function getArguments() + { + return array_merge($this->definition->getArgumentDefaults(), $this->arguments); + } + + /** + * 根据名称获取参数 + * @param string $name 参数名 + * @return mixed + * @throws \InvalidArgumentException + */ + public function getArgument($name) + { + if (!$this->definition->hasArgument($name)) { + throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + return isset($this->arguments[$name]) ? $this->arguments[$name] : $this->definition->getArgument($name) + ->getDefault(); + } + + /** + * 设置参数的值 + * @param string $name 参数名 + * @param string $value 值 + * @throws \InvalidArgumentException + */ + public function setArgument($name, $value) + { + if (!$this->definition->hasArgument($name)) { + throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + $this->arguments[$name] = $value; + } + + /** + * 检查是否存在某个参数 + * @param string|int $name 参数名或位置 + * @return bool + */ + public function hasArgument($name) + { + return $this->definition->hasArgument($name); + } + + /** + * 获取所有的选项 + * @return Option[] + */ + public function getOptions() + { + return array_merge($this->definition->getOptionDefaults(), $this->options); + } + + /** + * 获取选项值 + * @param string $name 选项名称 + * @return mixed + * @throws \InvalidArgumentException + */ + public function getOption($name) + { + if (!$this->definition->hasOption($name)) { + throw new \InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); + } + + return isset($this->options[$name]) ? $this->options[$name] : $this->definition->getOption($name)->getDefault(); + } + + /** + * 设置选项值 + * @param string $name 选项名 + * @param string|bool $value 值 + * @throws \InvalidArgumentException + */ + public function setOption($name, $value) + { + if (!$this->definition->hasOption($name)) { + throw new \InvalidArgumentException(sprintf('The "%s" option does not exist.', $name)); + } + + $this->options[$name] = $value; + } + + /** + * 是否有某个选项 + * @param string $name 选项名 + * @return bool + */ + public function hasOption($name) + { + return $this->definition->hasOption($name) && isset($this->options[$name]); + } + + /** + * 转义指令 + * @param string $token + * @return string + */ + public function escapeToken($token) + { + return preg_match('{^[\w-]+$}', $token) ? $token : escapeshellarg($token); + } + + /** + * 返回传递给命令的参数的字符串 + * @return string + */ + public function __toString() + { + $tokens = array_map(function ($token) { + if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) { + return $match[1] . $this->escapeToken($match[2]); + } + + if ($token && '-' !== $token[0]) { + return $this->escapeToken($token); + } + + return $token; + }, $this->tokens); + + return implode(' ', $tokens); + } +} diff --git a/thinkphp/library/think/console/LICENSE b/thinkphp/library/think/console/LICENSE new file mode 100755 index 0000000..0abe056 --- /dev/null +++ b/thinkphp/library/think/console/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2004-2016 Fabien Potencier + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/thinkphp/library/think/console/Output.php b/thinkphp/library/think/console/Output.php new file mode 100755 index 0000000..65dc9fb --- /dev/null +++ b/thinkphp/library/think/console/Output.php @@ -0,0 +1,222 @@ + +// +---------------------------------------------------------------------- + +namespace think\console; + +use Exception; +use think\console\output\Ask; +use think\console\output\Descriptor; +use think\console\output\driver\Buffer; +use think\console\output\driver\Console; +use think\console\output\driver\Nothing; +use think\console\output\Question; +use think\console\output\question\Choice; +use think\console\output\question\Confirmation; + +/** + * Class Output + * @package think\console + * + * @see \think\console\output\driver\Console::setDecorated + * @method void setDecorated($decorated) + * + * @see \think\console\output\driver\Buffer::fetch + * @method string fetch() + * + * @method void info($message) + * @method void error($message) + * @method void comment($message) + * @method void warning($message) + * @method void highlight($message) + * @method void question($message) + */ +class Output +{ + const VERBOSITY_QUIET = 0; + const VERBOSITY_NORMAL = 1; + const VERBOSITY_VERBOSE = 2; + const VERBOSITY_VERY_VERBOSE = 3; + const VERBOSITY_DEBUG = 4; + + const OUTPUT_NORMAL = 0; + const OUTPUT_RAW = 1; + const OUTPUT_PLAIN = 2; + + private $verbosity = self::VERBOSITY_NORMAL; + + /** @var Buffer|Console|Nothing */ + private $handle = null; + + protected $styles = [ + 'info', + 'error', + 'comment', + 'question', + 'highlight', + 'warning' + ]; + + public function __construct($driver = 'console') + { + $class = '\\think\\console\\output\\driver\\' . ucwords($driver); + + $this->handle = new $class($this); + } + + public function ask(Input $input, $question, $default = null, $validator = null) + { + $question = new Question($question, $default); + $question->setValidator($validator); + + return $this->askQuestion($input, $question); + } + + public function askHidden(Input $input, $question, $validator = null) + { + $question = new Question($question); + + $question->setHidden(true); + $question->setValidator($validator); + + return $this->askQuestion($input, $question); + } + + public function confirm(Input $input, $question, $default = true) + { + return $this->askQuestion($input, new Confirmation($question, $default)); + } + + /** + * {@inheritdoc} + */ + public function choice(Input $input, $question, array $choices, $default = null) + { + if (null !== $default) { + $values = array_flip($choices); + $default = $values[$default]; + } + + return $this->askQuestion($input, new Choice($question, $choices, $default)); + } + + protected function askQuestion(Input $input, Question $question) + { + $ask = new Ask($input, $this, $question); + $answer = $ask->run(); + + if ($input->isInteractive()) { + $this->newLine(); + } + + return $answer; + } + + protected function block($style, $message) + { + $this->writeln("<{$style}>{$message}"); + } + + /** + * 输出空行 + * @param int $count + */ + public function newLine($count = 1) + { + $this->write(str_repeat(PHP_EOL, $count)); + } + + /** + * 输出信息并换行 + * @param string $messages + * @param int $type + */ + public function writeln($messages, $type = self::OUTPUT_NORMAL) + { + $this->write($messages, true, $type); + } + + /** + * 输出信息 + * @param string $messages + * @param bool $newline + * @param int $type + */ + public function write($messages, $newline = false, $type = self::OUTPUT_NORMAL) + { + $this->handle->write($messages, $newline, $type); + } + + public function renderException(\Exception $e) + { + $this->handle->renderException($e); + } + + /** + * {@inheritdoc} + */ + public function setVerbosity($level) + { + $this->verbosity = (int) $level; + } + + /** + * {@inheritdoc} + */ + public function getVerbosity() + { + return $this->verbosity; + } + + public function isQuiet() + { + return self::VERBOSITY_QUIET === $this->verbosity; + } + + public function isVerbose() + { + return self::VERBOSITY_VERBOSE <= $this->verbosity; + } + + public function isVeryVerbose() + { + return self::VERBOSITY_VERY_VERBOSE <= $this->verbosity; + } + + public function isDebug() + { + return self::VERBOSITY_DEBUG <= $this->verbosity; + } + + public function describe($object, array $options = []) + { + $descriptor = new Descriptor(); + $options = array_merge([ + 'raw_text' => false, + ], $options); + + $descriptor->describe($this, $object, $options); + } + + public function __call($method, $args) + { + if (in_array($method, $this->styles)) { + array_unshift($args, $method); + return call_user_func_array([$this, 'block'], $args); + } + + if ($this->handle && method_exists($this->handle, $method)) { + return call_user_func_array([$this->handle, $method], $args); + } else { + throw new Exception('method not exists:' . __CLASS__ . '->' . $method); + } + } + +} diff --git a/thinkphp/library/think/console/Table.php b/thinkphp/library/think/console/Table.php new file mode 100755 index 0000000..9e28e26 --- /dev/null +++ b/thinkphp/library/think/console/Table.php @@ -0,0 +1,281 @@ + +// +---------------------------------------------------------------------- + +namespace think\console; + +class Table +{ + const ALIGN_LEFT = 1; + const ALIGN_RIGHT = 0; + const ALIGN_CENTER = 2; + + /** + * 头信息数据 + * @var array + */ + protected $header = []; + + /** + * 头部对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER + * @var int + */ + protected $headerAlign = 1; + + /** + * 表格数据(二维数组) + * @var array + */ + protected $rows = []; + + /** + * 单元格对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER + * @var int + */ + protected $cellAlign = 1; + + /** + * 单元格宽度信息 + * @var array + */ + protected $colWidth = []; + + /** + * 表格输出样式 + * @var string + */ + protected $style = 'default'; + + /** + * 表格样式定义 + * @var array + */ + protected $format = [ + 'compact' => [], + 'default' => [ + 'top' => ['+', '-', '+', '+'], + 'cell' => ['|', ' ', '|', '|'], + 'middle' => ['+', '-', '+', '+'], + 'bottom' => ['+', '-', '+', '+'], + 'cross-top' => ['+', '-', '-', '+'], + 'cross-bottom' => ['+', '-', '-', '+'], + ], + 'markdown' => [ + 'top' => [' ', ' ', ' ', ' '], + 'cell' => ['|', ' ', '|', '|'], + 'middle' => ['|', '-', '|', '|'], + 'bottom' => [' ', ' ', ' ', ' '], + 'cross-top' => ['|', ' ', ' ', '|'], + 'cross-bottom' => ['|', ' ', ' ', '|'], + ], + 'borderless' => [ + 'top' => ['=', '=', ' ', '='], + 'cell' => [' ', ' ', ' ', ' '], + 'middle' => ['=', '=', ' ', '='], + 'bottom' => ['=', '=', ' ', '='], + 'cross-top' => ['=', '=', ' ', '='], + 'cross-bottom' => ['=', '=', ' ', '='], + ], + 'box' => [ + 'top' => ['┌', '─', '┬', '┐'], + 'cell' => ['│', ' ', '│', '│'], + 'middle' => ['├', '─', '┼', '┤'], + 'bottom' => ['└', '─', '┴', '┘'], + 'cross-top' => ['├', '─', '┴', '┤'], + 'cross-bottom' => ['├', '─', '┬', '┤'], + ], + 'box-double' => [ + 'top' => ['╔', '═', '╤', '╗'], + 'cell' => ['║', ' ', '│', '║'], + 'middle' => ['╠', '─', '╪', '╣'], + 'bottom' => ['╚', '═', '╧', '╝'], + 'cross-top' => ['╠', '═', '╧', '╣'], + 'cross-bottom' => ['╠', '═', '╤', '╣'], + ], + ]; + + /** + * 设置表格头信息 以及对齐方式 + * @access public + * @param array $header 要输出的Header信息 + * @param int $align 对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER + * @return void + */ + public function setHeader(array $header, $align = self::ALIGN_LEFT) + { + $this->header = $header; + $this->headerAlign = $align; + + $this->checkColWidth($header); + } + + /** + * 设置输出表格数据 及对齐方式 + * @access public + * @param array $rows 要输出的表格数据(二维数组) + * @param int $align 对齐方式 默认1 ALGIN_LEFT 0 ALIGN_RIGHT 2 ALIGN_CENTER + * @return void + */ + public function setRows(array $rows, $align = self::ALIGN_LEFT) + { + $this->rows = $rows; + $this->cellAlign = $align; + + foreach ($rows as $row) { + $this->checkColWidth($row); + } + } + + /** + * 检查列数据的显示宽度 + * @access public + * @param mixed $row 行数据 + * @return void + */ + protected function checkColWidth($row) + { + if (is_array($row)) { + foreach ($row as $key => $cell) { + if (!isset($this->colWidth[$key]) || strlen($cell) > $this->colWidth[$key]) { + $this->colWidth[$key] = strlen($cell); + } + } + } + } + + /** + * 增加一行表格数据 + * @access public + * @param mixed $row 行数据 + * @param bool $first 是否在开头插入 + * @return void + */ + public function addRow($row, $first = false) + { + if ($first) { + array_unshift($this->rows, $row); + } else { + $this->rows[] = $row; + } + + $this->checkColWidth($row); + } + + /** + * 设置输出表格的样式 + * @access public + * @param string $style 样式名 + * @return void + */ + public function setStyle($style) + { + $this->style = isset($this->format[$style]) ? $style : 'default'; + } + + /** + * 输出分隔行 + * @access public + * @param string $pos 位置 + * @return string + */ + protected function renderSeparator($pos) + { + $style = $this->getStyle($pos); + $array = []; + + foreach ($this->colWidth as $width) { + $array[] = str_repeat($style[1], $width + 2); + } + + return $style[0] . implode($style[2], $array) . $style[3] . PHP_EOL; + } + + /** + * 输出表格头部 + * @access public + * @return string + */ + protected function renderHeader() + { + $style = $this->getStyle('cell'); + $content = $this->renderSeparator('top'); + + foreach ($this->header as $key => $header) { + $array[] = ' ' . str_pad($header, $this->colWidth[$key], $style[1], $this->headerAlign); + } + + if (!empty($array)) { + $content .= $style[0] . implode(' ' . $style[2], $array) . ' ' . $style[3] . PHP_EOL; + + if ($this->rows) { + $content .= $this->renderSeparator('middle'); + } + } + + return $content; + } + + protected function getStyle($style) + { + if ($this->format[$this->style]) { + $style = $this->format[$this->style][$style]; + } else { + $style = [' ', ' ', ' ', ' ']; + } + + return $style; + } + + /** + * 输出表格 + * @access public + * @param array $dataList 表格数据 + * @return string + */ + public function render($dataList = []) + { + if ($dataList) { + $this->setRows($dataList); + } + + // 输出头部 + $content = $this->renderHeader(); + $style = $this->getStyle('cell'); + + if ($this->rows) { + foreach ($this->rows as $row) { + if (is_string($row) && '-' === $row) { + $content .= $this->renderSeparator('middle'); + } elseif (is_scalar($row)) { + $content .= $this->renderSeparator('cross-top'); + $array = str_pad($row, 3 * (count($this->colWidth) - 1) + array_reduce($this->colWidth, function ($a, $b) { + return $a + $b; + })); + + $content .= $style[0] . ' ' . $array . ' ' . $style[3] . PHP_EOL; + $content .= $this->renderSeparator('cross-bottom'); + } else { + $array = []; + + foreach ($row as $key => $val) { + $array[] = ' ' . str_pad($val, $this->colWidth[$key], ' ', $this->cellAlign); + } + + $content .= $style[0] . implode(' ' . $style[2], $array) . ' ' . $style[3] . PHP_EOL; + + } + } + } + + $content .= $this->renderSeparator('bottom'); + + return $content; + } +} diff --git a/thinkphp/library/think/console/bin/README.md b/thinkphp/library/think/console/bin/README.md new file mode 100755 index 0000000..9acc52f --- /dev/null +++ b/thinkphp/library/think/console/bin/README.md @@ -0,0 +1 @@ +console 工具使用 hiddeninput.exe 在 windows 上隐藏密码输入,该二进制文件由第三方提供,相关源码和其他细节可以在 [Hidden Input](https://github.com/Seldaek/hidden-input) 找到。 diff --git a/thinkphp/library/think/console/bin/hiddeninput.exe b/thinkphp/library/think/console/bin/hiddeninput.exe new file mode 100755 index 0000000..c8cf65e Binary files /dev/null and b/thinkphp/library/think/console/bin/hiddeninput.exe differ diff --git a/thinkphp/library/think/console/command/Build.php b/thinkphp/library/think/console/command/Build.php new file mode 100755 index 0000000..88a5bf8 --- /dev/null +++ b/thinkphp/library/think/console/command/Build.php @@ -0,0 +1,59 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\command; + +use think\console\Command; +use think\console\Input; +use think\console\input\Option; +use think\console\Output; +use think\facade\App; +use think\facade\Build as AppBuild; + +class Build extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this->setName('build') + ->setDefinition([ + new Option('config', null, Option::VALUE_OPTIONAL, "build.php path"), + new Option('module', null, Option::VALUE_OPTIONAL, "module name"), + ]) + ->setDescription('Build Application Dirs'); + } + + protected function execute(Input $input, Output $output) + { + if ($input->hasOption('module')) { + AppBuild::module($input->getOption('module')); + $output->writeln("Successed"); + return; + } + + if ($input->hasOption('config')) { + $build = include $input->getOption('config'); + } else { + $build = include App::getAppPath() . 'build.php'; + } + + if (empty($build)) { + $output->writeln("Build Config Is Empty"); + return; + } + + AppBuild::run($build); + $output->writeln("Successed"); + + } +} diff --git a/thinkphp/library/think/console/command/Clear.php b/thinkphp/library/think/console/command/Clear.php new file mode 100755 index 0000000..1442575 --- /dev/null +++ b/thinkphp/library/think/console/command/Clear.php @@ -0,0 +1,70 @@ + +// +---------------------------------------------------------------------- +namespace think\console\command; + +use think\console\Command; +use think\console\Input; +use think\console\input\Option; +use think\console\Output; +use think\facade\App; +use think\facade\Cache; + +class Clear extends Command +{ + protected function configure() + { + // 指令配置 + $this + ->setName('clear') + ->addOption('path', 'd', Option::VALUE_OPTIONAL, 'path to clear', null) + ->addOption('cache', 'c', Option::VALUE_NONE, 'clear cache file') + ->addOption('route', 'u', Option::VALUE_NONE, 'clear route cache') + ->addOption('log', 'l', Option::VALUE_NONE, 'clear log file') + ->addOption('dir', 'r', Option::VALUE_NONE, 'clear empty dir') + ->setDescription('Clear runtime file'); + } + + protected function execute(Input $input, Output $output) + { + if ($input->getOption('route')) { + Cache::clear('route_cache'); + } else { + if ($input->getOption('cache')) { + $path = App::getRuntimePath() . 'cache'; + } elseif ($input->getOption('log')) { + $path = App::getRuntimePath() . 'log'; + } else { + $path = $input->getOption('path') ?: App::getRuntimePath(); + } + + $rmdir = $input->getOption('dir') ? true : false; + $this->clear(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR, $rmdir); + } + + $output->writeln("Clear Successed"); + } + + protected function clear($path, $rmdir) + { + $files = is_dir($path) ? scandir($path) : []; + + foreach ($files as $file) { + if ('.' != $file && '..' != $file && is_dir($path . $file)) { + array_map('unlink', glob($path . $file . DIRECTORY_SEPARATOR . '*.*')); + if ($rmdir) { + rmdir($path . $file); + } + } elseif ('.gitignore' != $file && is_file($path . $file)) { + unlink($path . $file); + } + } + } +} diff --git a/thinkphp/library/think/console/command/Help.php b/thinkphp/library/think/console/command/Help.php new file mode 100755 index 0000000..f1b63b4 --- /dev/null +++ b/thinkphp/library/think/console/command/Help.php @@ -0,0 +1,68 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\command; + +use think\console\Command; +use think\console\Input; +use think\console\input\Argument as InputArgument; +use think\console\input\Option as InputOption; +use think\console\Output; + +class Help extends Command +{ + private $command; + + /** + * {@inheritdoc} + */ + protected function configure() + { + $this->ignoreValidationErrors(); + + $this->setName('help')->setDefinition([ + new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), + new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), + ])->setDescription('Displays help for a command')->setHelp(<<%command.name% command displays help for a given command: + + php %command.full_name% list + +To display the list of available commands, please use the list command. +EOF + ); + } + + /** + * Sets the command. + * @param Command $command The command to set + */ + public function setCommand(Command $command) + { + $this->command = $command; + } + + /** + * {@inheritdoc} + */ + protected function execute(Input $input, Output $output) + { + if (null === $this->command) { + $this->command = $this->getConsole()->find($input->getArgument('command_name')); + } + + $output->describe($this->command, [ + 'raw_text' => $input->getOption('raw'), + ]); + + $this->command = null; + } +} diff --git a/thinkphp/library/think/console/command/Lists.php b/thinkphp/library/think/console/command/Lists.php new file mode 100755 index 0000000..6eb856c --- /dev/null +++ b/thinkphp/library/think/console/command/Lists.php @@ -0,0 +1,73 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\command; + +use think\console\Command; +use think\console\Input; +use think\console\input\Argument as InputArgument; +use think\console\input\Definition as InputDefinition; +use think\console\input\Option as InputOption; +use think\console\Output; + +class Lists extends Command +{ + /** + * {@inheritdoc} + */ + protected function configure() + { + $this->setName('list')->setDefinition($this->createDefinition())->setDescription('Lists commands')->setHelp(<<%command.name% command lists all commands: + + php %command.full_name% + +You can also display the commands for a specific namespace: + + php %command.full_name% test + +It's also possible to get raw list of commands (useful for embedding command runner): + + php %command.full_name% --raw +EOF + ); + } + + /** + * {@inheritdoc} + */ + public function getNativeDefinition() + { + return $this->createDefinition(); + } + + /** + * {@inheritdoc} + */ + protected function execute(Input $input, Output $output) + { + $output->describe($this->getConsole(), [ + 'raw_text' => $input->getOption('raw'), + 'namespace' => $input->getArgument('namespace'), + ]); + } + + /** + * {@inheritdoc} + */ + private function createDefinition() + { + return new InputDefinition([ + new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), + new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list'), + ]); + } +} diff --git a/thinkphp/library/think/console/command/Make.php b/thinkphp/library/think/console/command/Make.php new file mode 100755 index 0000000..2f20954 --- /dev/null +++ b/thinkphp/library/think/console/command/Make.php @@ -0,0 +1,110 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\command; + +use think\console\Command; +use think\console\Input; +use think\console\input\Argument; +use think\console\Output; +use think\facade\App; +use think\facade\Config; +use think\facade\Env; + +abstract class Make extends Command +{ + protected $type; + + abstract protected function getStub(); + + protected function configure() + { + $this->addArgument('name', Argument::REQUIRED, "The name of the class"); + } + + protected function execute(Input $input, Output $output) + { + + $name = trim($input->getArgument('name')); + + $classname = $this->getClassName($name); + + $pathname = $this->getPathName($classname); + + if (is_file($pathname)) { + $output->writeln('' . $this->type . ' already exists!'); + return false; + } + + if (!is_dir(dirname($pathname))) { + mkdir(dirname($pathname), 0755, true); + } + + file_put_contents($pathname, $this->buildClass($classname)); + + $output->writeln('' . $this->type . ' created successfully.'); + + } + + protected function buildClass($name) + { + $stub = file_get_contents($this->getStub()); + + $namespace = trim(implode('\\', array_slice(explode('\\', $name), 0, -1)), '\\'); + + $class = str_replace($namespace . '\\', '', $name); + + return str_replace(['{%className%}', '{%actionSuffix%}', '{%namespace%}', '{%app_namespace%}'], [ + $class, + Config::get('action_suffix'), + $namespace, + App::getNamespace(), + ], $stub); + } + + protected function getPathName($name) + { + $name = str_replace(App::getNamespace() . '\\', '', $name); + + return Env::get('app_path') . ltrim(str_replace('\\', '/', $name), '/') . '.php'; + } + + protected function getClassName($name) + { + $appNamespace = App::getNamespace(); + + if (strpos($name, $appNamespace . '\\') !== false) { + return $name; + } + + if (Config::get('app_multi_module')) { + if (strpos($name, '/')) { + list($module, $name) = explode('/', $name, 2); + } else { + $module = 'common'; + } + } else { + $module = null; + } + + if (strpos($name, '/') !== false) { + $name = str_replace('/', '\\', $name); + } + + return $this->getNamespace($appNamespace, $module) . '\\' . $name; + } + + protected function getNamespace($appNamespace, $module) + { + return $module ? ($appNamespace . '\\' . $module) : $appNamespace; + } + +} diff --git a/thinkphp/library/think/console/command/RouteList.php b/thinkphp/library/think/console/command/RouteList.php new file mode 100755 index 0000000..0405c31 --- /dev/null +++ b/thinkphp/library/think/console/command/RouteList.php @@ -0,0 +1,130 @@ + +// +---------------------------------------------------------------------- +namespace think\console\command; + +use think\console\Command; +use think\console\Input; +use think\console\input\Argument; +use think\console\input\Option; +use think\console\Output; +use think\console\Table; +use think\Container; + +class RouteList extends Command +{ + protected $sortBy = [ + 'rule' => 0, + 'route' => 1, + 'method' => 2, + 'name' => 3, + 'domain' => 4, + ]; + + protected function configure() + { + $this->setName('route:list') + ->addArgument('style', Argument::OPTIONAL, "the style of the table.", 'default') + ->addOption('sort', 's', Option::VALUE_OPTIONAL, 'order by rule name.', 0) + ->addOption('more', 'm', Option::VALUE_NONE, 'show route options.') + ->setDescription('show route list.'); + } + + protected function execute(Input $input, Output $output) + { + $filename = Container::get('app')->getRuntimePath() . 'route_list.php'; + + if (is_file($filename)) { + unlink($filename); + } + + $content = $this->getRouteList(); + file_put_contents($filename, 'Route List' . PHP_EOL . $content); + } + + protected function getRouteList() + { + Container::get('route')->setTestMode(true); + // 路由检测 + $path = Container::get('app')->getRoutePath(); + + $files = is_dir($path) ? scandir($path) : []; + + foreach ($files as $file) { + if (strpos($file, '.php')) { + $filename = $path . DIRECTORY_SEPARATOR . $file; + // 导入路由配置 + $rules = include $filename; + + if (is_array($rules)) { + Container::get('route')->import($rules); + } + } + } + + if (Container::get('config')->get('route_annotation')) { + $suffix = Container::get('config')->get('controller_suffix') || Container::get('config')->get('class_suffix'); + + include Container::get('build')->buildRoute($suffix); + } + + $table = new Table(); + + if ($this->input->hasOption('more')) { + $header = ['Rule', 'Route', 'Method', 'Name', 'Domain', 'Option', 'Pattern']; + } else { + $header = ['Rule', 'Route', 'Method', 'Name', 'Domain']; + } + + $table->setHeader($header); + + $routeList = Container::get('route')->getRuleList(); + $rows = []; + + foreach ($routeList as $domain => $items) { + foreach ($items as $item) { + $item['route'] = $item['route'] instanceof \Closure ? '' : $item['route']; + + if ($this->input->hasOption('more')) { + $item = [$item['rule'], $item['route'], $item['method'], $item['name'], $domain, json_encode($item['option']), json_encode($item['pattern'])]; + } else { + $item = [$item['rule'], $item['route'], $item['method'], $item['name'], $domain]; + } + + $rows[] = $item; + } + } + + if ($this->input->getOption('sort')) { + $sort = $this->input->getOption('sort'); + + if (isset($this->sortBy[$sort])) { + $sort = $this->sortBy[$sort]; + } + + uasort($rows, function ($a, $b) use ($sort) { + $itemA = isset($a[$sort]) ? $a[$sort] : null; + $itemB = isset($b[$sort]) ? $b[$sort] : null; + + return strcasecmp($itemA, $itemB); + }); + } + + $table->setRows($rows); + + if ($this->input->getArgument('style')) { + $style = $this->input->getArgument('style'); + $table->setStyle($style); + } + + return $this->table($table); + } + +} diff --git a/thinkphp/library/think/console/command/RunServer.php b/thinkphp/library/think/console/command/RunServer.php new file mode 100755 index 0000000..2e028dc --- /dev/null +++ b/thinkphp/library/think/console/command/RunServer.php @@ -0,0 +1,53 @@ + +// +---------------------------------------------------------------------- +namespace think\console\command; + +use think\console\Command; +use think\console\Input; +use think\console\input\Option; +use think\console\Output; +use think\facade\App; + +class RunServer extends Command +{ + public function configure() + { + $this->setName('run') + ->addOption('host', 'H', Option::VALUE_OPTIONAL, + 'The host to server the application on', '127.0.0.1') + ->addOption('port', 'p', Option::VALUE_OPTIONAL, + 'The port to server the application on', 8000) + ->addOption('root', 'r', Option::VALUE_OPTIONAL, + 'The document root of the application', App::getRootPath() . 'public') + ->setDescription('PHP Built-in Server for ThinkPHP'); + } + + public function execute(Input $input, Output $output) + { + $host = $input->getOption('host'); + $port = $input->getOption('port'); + $root = $input->getOption('root'); + + $command = sprintf( + 'php -S %s:%d -t %s %s', + $host, + $port, + escapeshellarg($root), + escapeshellarg($root . DIRECTORY_SEPARATOR . 'router.php') + ); + + $output->writeln(sprintf('ThinkPHP Development server is started On ', $host, $port)); + $output->writeln(sprintf('You can exit with `CTRL-C`')); + $output->writeln(sprintf('Document root is: %s', $root)); + passthru($command); + } + +} diff --git a/thinkphp/library/think/console/command/Version.php b/thinkphp/library/think/console/command/Version.php new file mode 100755 index 0000000..ee7eca9 --- /dev/null +++ b/thinkphp/library/think/console/command/Version.php @@ -0,0 +1,31 @@ + +// +---------------------------------------------------------------------- +namespace think\console\command; + +use think\console\Command; +use think\console\Input; +use think\console\Output; +use think\facade\App; + +class Version extends Command +{ + protected function configure() + { + // 指令配置 + $this->setName('version') + ->setDescription('show thinkphp framework version'); + } + + protected function execute(Input $input, Output $output) + { + $output->writeln('v' . App::version()); + } +} diff --git a/thinkphp/library/think/console/command/make/Command.php b/thinkphp/library/think/console/command/make/Command.php new file mode 100755 index 0000000..b539eb2 --- /dev/null +++ b/thinkphp/library/think/console/command/make/Command.php @@ -0,0 +1,56 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\command\make; + +use think\console\command\Make; +use think\console\input\Argument; +use think\facade\App; + +class Command extends Make +{ + protected $type = "Command"; + + protected function configure() + { + parent::configure(); + $this->setName('make:command') + ->addArgument('commandName', Argument::OPTIONAL, "The name of the command") + ->setDescription('Create a new command class'); + } + + protected function buildClass($name) + { + $commandName = $this->input->getArgument('commandName') ?: strtolower(basename($name)); + $namespace = trim(implode('\\', array_slice(explode('\\', $name), 0, -1)), '\\'); + + $class = str_replace($namespace . '\\', '', $name); + $stub = file_get_contents($this->getStub()); + + return str_replace(['{%commandName%}', '{%className%}', '{%namespace%}', '{%app_namespace%}'], [ + $commandName, + $class, + $namespace, + App::getNamespace(), + ], $stub); + } + + protected function getStub() + { + return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'command.stub'; + } + + protected function getNamespace($appNamespace, $module) + { + return $appNamespace . '\\command'; + } + +} diff --git a/thinkphp/library/think/console/command/make/Controller.php b/thinkphp/library/think/console/command/make/Controller.php new file mode 100755 index 0000000..2a6ab77 --- /dev/null +++ b/thinkphp/library/think/console/command/make/Controller.php @@ -0,0 +1,56 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\command\make; + +use think\console\command\Make; +use think\console\input\Option; +use think\facade\Config; + +class Controller extends Make +{ + protected $type = "Controller"; + + protected function configure() + { + parent::configure(); + $this->setName('make:controller') + ->addOption('api', null, Option::VALUE_NONE, 'Generate an api controller class.') + ->addOption('plain', null, Option::VALUE_NONE, 'Generate an empty controller class.') + ->setDescription('Create a new resource controller class'); + } + + protected function getStub() + { + $stubPath = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR; + + if ($this->input->getOption('api')) { + return $stubPath . 'controller.api.stub'; + } + + if ($this->input->getOption('plain')) { + return $stubPath . 'controller.plain.stub'; + } + + return $stubPath . 'controller.stub'; + } + + protected function getClassName($name) + { + return parent::getClassName($name) . (Config::get('controller_suffix') ? ucfirst(Config::get('url_controller_layer')) : ''); + } + + protected function getNamespace($appNamespace, $module) + { + return parent::getNamespace($appNamespace, $module) . '\controller'; + } + +} diff --git a/thinkphp/library/think/console/command/make/Middleware.php b/thinkphp/library/think/console/command/make/Middleware.php new file mode 100755 index 0000000..bfe821b --- /dev/null +++ b/thinkphp/library/think/console/command/make/Middleware.php @@ -0,0 +1,36 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\command\make; + +use think\console\command\Make; + +class Middleware extends Make +{ + protected $type = "Middleware"; + + protected function configure() + { + parent::configure(); + $this->setName('make:middleware') + ->setDescription('Create a new middleware class'); + } + + protected function getStub() + { + return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'middleware.stub'; + } + + protected function getNamespace($appNamespace, $module) + { + return parent::getNamespace($appNamespace, 'http') . '\middleware'; + } +} diff --git a/thinkphp/library/think/console/command/make/Model.php b/thinkphp/library/think/console/command/make/Model.php new file mode 100755 index 0000000..03e6b3f --- /dev/null +++ b/thinkphp/library/think/console/command/make/Model.php @@ -0,0 +1,36 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\command\make; + +use think\console\command\Make; + +class Model extends Make +{ + protected $type = "Model"; + + protected function configure() + { + parent::configure(); + $this->setName('make:model') + ->setDescription('Create a new model class'); + } + + protected function getStub() + { + return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'model.stub'; + } + + protected function getNamespace($appNamespace, $module) + { + return parent::getNamespace($appNamespace, $module) . '\model'; + } +} diff --git a/thinkphp/library/think/console/command/make/Validate.php b/thinkphp/library/think/console/command/make/Validate.php new file mode 100755 index 0000000..89830ad --- /dev/null +++ b/thinkphp/library/think/console/command/make/Validate.php @@ -0,0 +1,39 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\command\make; + +use think\console\command\Make; + +class Validate extends Make +{ + protected $type = "Validate"; + + protected function configure() + { + parent::configure(); + $this->setName('make:validate') + ->setDescription('Create a validate class'); + } + + protected function getStub() + { + $stubPath = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR; + + return $stubPath . 'validate.stub'; + } + + protected function getNamespace($appNamespace, $module) + { + return parent::getNamespace($appNamespace, $module) . '\validate'; + } + +} diff --git a/thinkphp/library/think/console/command/make/stubs/command.stub b/thinkphp/library/think/console/command/make/stubs/command.stub new file mode 100755 index 0000000..d2c7c1e --- /dev/null +++ b/thinkphp/library/think/console/command/make/stubs/command.stub @@ -0,0 +1,24 @@ +setName('{%commandName%}'); + // 设置参数 + + } + + protected function execute(Input $input, Output $output) + { + // 指令输出 + $output->writeln('{%commandName%}'); + } +} diff --git a/thinkphp/library/think/console/command/make/stubs/controller.api.stub b/thinkphp/library/think/console/command/make/stubs/controller.api.stub new file mode 100755 index 0000000..54ec059 --- /dev/null +++ b/thinkphp/library/think/console/command/make/stubs/controller.api.stub @@ -0,0 +1,64 @@ + ['规则1','规则2'...] + * + * @var array + */ + protected $rule = []; + + /** + * 定义错误信息 + * 格式:'字段名.规则名' => '错误信息' + * + * @var array + */ + protected $message = []; +} diff --git a/thinkphp/library/think/console/command/optimize/Autoload.php b/thinkphp/library/think/console/command/optimize/Autoload.php new file mode 100755 index 0000000..b51fd25 --- /dev/null +++ b/thinkphp/library/think/console/command/optimize/Autoload.php @@ -0,0 +1,279 @@ + +// +---------------------------------------------------------------------- +namespace think\console\command\optimize; + +use think\console\Command; +use think\console\Input; +use think\console\Output; +use think\Container; + +class Autoload extends Command +{ + protected function configure() + { + $this->setName('optimize:autoload') + ->setDescription('Optimizes PSR0 and PSR4 packages to be loaded with classmaps too, good for production.'); + } + + protected function execute(Input $input, Output $output) + { + + $classmapFile = <<getNamespace() . '\\' => realpath(rtrim($app->getAppPath())), + 'think\\' => $app->getThinkPath() . 'library/think', + 'traits\\' => $app->getThinkPath() . 'library/traits', + '' => realpath(rtrim($app->getRootPath() . 'extend')), + ]; + + krsort($namespacesToScan); + $classMap = []; + foreach ($namespacesToScan as $namespace => $dir) { + + if (!is_dir($dir)) { + continue; + } + + $namespaceFilter = '' === $namespace ? null : $namespace; + $classMap = $this->addClassMapCode($dir, $namespaceFilter, $classMap); + } + + ksort($classMap); + foreach ($classMap as $class => $code) { + $classmapFile .= ' ' . var_export($class, true) . ' => ' . $code; + } + $classmapFile .= "];\n"; + $runtimePath = $app->getRuntimePath(); + if (!is_dir($runtimePath)) { + @mkdir($runtimePath, 0755, true); + } + + file_put_contents($runtimePath . 'classmap.php', $classmapFile); + + $output->writeln('Succeed!'); + } + + protected function addClassMapCode($dir, $namespace, $classMap) + { + foreach ($this->createMap($dir, $namespace) as $class => $path) { + + $pathCode = $this->getPathCode($path) . ",\n"; + + if (!isset($classMap[$class])) { + $classMap[$class] = $pathCode; + } elseif ($classMap[$class] !== $pathCode && !preg_match('{/(test|fixture|example|stub)s?/}i', strtr($classMap[$class] . ' ' . $path, '\\', '/'))) { + $this->output->writeln( + 'Warning: Ambiguous class resolution, "' . $class . '"' . + ' was found in both "' . str_replace(["',\n"], [ + '', + ], $classMap[$class]) . '" and "' . $path . '", the first will be used.' + ); + } + } + return $classMap; + } + + protected function getPathCode($path) + { + $baseDir = ''; + $app = Container::get('app'); + $appPath = $this->normalizePath(realpath($app->getAppPath())); + $libPath = $this->normalizePath(realpath($app->getThinkPath() . 'library')); + $extendPath = $this->normalizePath(realpath($app->getRootPath() . 'extend')); + $path = $this->normalizePath($path); + + if (strpos($path, $libPath . '/') === 0) { + $path = substr($path, strlen($app->getThinkPath() . 'library')); + $baseDir = "'" . $libPath . "/'"; + } elseif (strpos($path, $appPath . '/') === 0) { + $path = substr($path, strlen($appPath) + 1); + $baseDir = "'" . $appPath . "/'"; + } elseif (strpos($path, $extendPath . '/') === 0) { + $path = substr($path, strlen($extendPath) + 1); + $baseDir = "'" . $extendPath . "/'"; + } + + if (false !== $path) { + $baseDir .= " . "; + } + + return $baseDir . ((false !== $path) ? var_export($path, true) : ""); + } + + protected function normalizePath($path) + { + $parts = []; + $path = strtr($path, '\\', '/'); + $prefix = ''; + $absolute = false; + + if (preg_match('{^([0-9a-z]+:(?://(?:[a-z]:)?)?)}i', $path, $match)) { + $prefix = $match[1]; + $path = substr($path, strlen($prefix)); + } + + if (substr($path, 0, 1) === '/') { + $absolute = true; + $path = substr($path, 1); + } + + $up = false; + foreach (explode('/', $path) as $chunk) { + if ('..' === $chunk && ($absolute || $up)) { + array_pop($parts); + $up = !(empty($parts) || '..' === end($parts)); + } elseif ('.' !== $chunk && '' !== $chunk) { + $parts[] = $chunk; + $up = '..' !== $chunk; + } + } + + return $prefix . ($absolute ? '/' : '') . implode('/', $parts); + } + + protected function createMap($path, $namespace = null) + { + if (is_string($path)) { + if (is_file($path)) { + $path = [new \SplFileInfo($path)]; + } elseif (is_dir($path)) { + + $objects = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::SELF_FIRST); + + $path = []; + + /** @var \SplFileInfo $object */ + foreach ($objects as $object) { + if ($object->isFile() && $object->getExtension() == 'php') { + $path[] = $object; + } + } + } else { + throw new \RuntimeException( + 'Could not scan for classes inside "' . $path . + '" which does not appear to be a file nor a folder' + ); + } + } + + $map = []; + + /** @var \SplFileInfo $file */ + foreach ($path as $file) { + $filePath = $file->getRealPath(); + + if (pathinfo($filePath, PATHINFO_EXTENSION) != 'php') { + continue; + } + + $classes = $this->findClasses($filePath); + + foreach ($classes as $class) { + if (null !== $namespace && 0 !== strpos($class, $namespace)) { + continue; + } + + if (!isset($map[$class])) { + $map[$class] = $filePath; + } elseif ($map[$class] !== $filePath && !preg_match('{/(test|fixture|example|stub)s?/}i', strtr($map[$class] . ' ' . $filePath, '\\', '/'))) { + $this->output->writeln( + 'Warning: Ambiguous class resolution, "' . $class . '"' . + ' was found in both "' . $map[$class] . '" and "' . $filePath . '", the first will be used.' + ); + } + } + } + + return $map; + } + + protected function findClasses($path) + { + $extraTypes = '|trait'; + + $contents = @php_strip_whitespace($path); + if (!$contents) { + if (!file_exists($path)) { + $message = 'File at "%s" does not exist, check your classmap definitions'; + } elseif (!is_readable($path)) { + $message = 'File at "%s" is not readable, check its permissions'; + } elseif ('' === trim(file_get_contents($path))) { + return []; + } else { + $message = 'File at "%s" could not be parsed as PHP, it may be binary or corrupted'; + } + $error = error_get_last(); + if (isset($error['message'])) { + $message .= PHP_EOL . 'The following message may be helpful:' . PHP_EOL . $error['message']; + } + throw new \RuntimeException(sprintf($message, $path)); + } + + if (!preg_match('{\b(?:class|interface' . $extraTypes . ')\s}i', $contents)) { + return []; + } + + // strip heredocs/nowdocs + $contents = preg_replace('{<<<\s*(\'?)(\w+)\\1(?:\r\n|\n|\r)(?:.*?)(?:\r\n|\n|\r)\\2(?=\r\n|\n|\r|;)}s', 'null', $contents); + // strip strings + $contents = preg_replace('{"[^"\\\\]*+(\\\\.[^"\\\\]*+)*+"|\'[^\'\\\\]*+(\\\\.[^\'\\\\]*+)*+\'}s', 'null', $contents); + // strip leading non-php code if needed + if (substr($contents, 0, 2) !== '.+<\?}s', '?>'); + if (false !== $pos && false === strpos(substr($contents, $pos), '])(?Pclass|interface' . $extraTypes . ') \s++ (?P[a-zA-Z_\x7f-\xff:][a-zA-Z0-9_\x7f-\xff:\-]*+) + | \b(?])(?Pnamespace) (?P\s++[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+(?:\s*+\\\\\s*+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*+)*+)? \s*+ [\{;] + ) + }ix', $contents, $matches); + + $classes = []; + $namespace = ''; + + for ($i = 0, $len = count($matches['type']); $i < $len; $i++) { + if (!empty($matches['ns'][$i])) { + $namespace = str_replace([' ', "\t", "\r", "\n"], '', $matches['nsname'][$i]) . '\\'; + } else { + $name = $matches['name'][$i]; + if (':' === $name[0]) { + $name = 'xhp' . substr(str_replace(['-', ':'], ['_', '__'], $name), 1); + } elseif ('enum' === $matches['type'][$i]) { + $name = rtrim($name, ':'); + } + $classes[] = ltrim($namespace . $name, '\\'); + } + } + + return $classes; + } + +} diff --git a/thinkphp/library/think/console/command/optimize/Config.php b/thinkphp/library/think/console/command/optimize/Config.php new file mode 100755 index 0000000..da95556 --- /dev/null +++ b/thinkphp/library/think/console/command/optimize/Config.php @@ -0,0 +1,107 @@ + +// +---------------------------------------------------------------------- +namespace think\console\command\optimize; + +use think\console\Command; +use think\console\Input; +use think\console\input\Argument; +use think\console\Output; +use think\Container; +use think\facade\App; + +class Config extends Command +{ + protected function configure() + { + $this->setName('optimize:config') + ->addArgument('module', Argument::OPTIONAL, 'Build module config cache .') + ->setDescription('Build config and common file cache.'); + } + + protected function execute(Input $input, Output $output) + { + if ($input->getArgument('module')) { + $module = $input->getArgument('module') . DIRECTORY_SEPARATOR; + } else { + $module = ''; + } + + $content = 'buildCacheContent($module); + $runtimePath = App::getRuntimePath(); + if (!is_dir($runtimePath . $module)) { + @mkdir($runtimePath . $module, 0755, true); + } + + file_put_contents($runtimePath . $module . 'init.php', $content); + + $output->writeln('Succeed!'); + } + + protected function buildCacheContent($module) + { + $content = '// This cache file is automatically generated at:' . date('Y-m-d H:i:s') . PHP_EOL; + $path = realpath(App::getAppPath() . $module) . DIRECTORY_SEPARATOR; + if ($module) { + $configPath = is_dir($path . 'config') ? $path . 'config' : App::getConfigPath() . $module; + } else { + $configPath = App::getConfigPath(); + } + $ext = App::getConfigExt(); + $config = Container::get('config'); + + $files = is_dir($configPath) ? scandir($configPath) : []; + + foreach ($files as $file) { + if ('.' . pathinfo($file, PATHINFO_EXTENSION) === $ext) { + $filename = $configPath . DIRECTORY_SEPARATOR . $file; + $config->load($filename, pathinfo($file, PATHINFO_FILENAME)); + } + } + + // 加载行为扩展文件 + if (is_file($path . 'tags.php')) { + $tags = include $path . 'tags.php'; + if (is_array($tags)) { + $content .= PHP_EOL . '\think\facade\Hook::import(' . (var_export($tags, true)) . ');' . PHP_EOL; + } + } + + // 加载公共文件 + if (is_file($path . 'common.php')) { + $common = substr(php_strip_whitespace($path . 'common.php'), 6); + if ($common) { + $content .= PHP_EOL . $common . PHP_EOL; + } + } + + if ('' == $module) { + $content .= PHP_EOL . substr(php_strip_whitespace(App::getThinkPath() . 'helper.php'), 6) . PHP_EOL; + + if (is_file($path . 'middleware.php')) { + $middleware = include $path . 'middleware.php'; + if (is_array($middleware)) { + $content .= PHP_EOL . '\think\Container::get("middleware")->import(' . var_export($middleware, true) . ');' . PHP_EOL; + } + } + } + + if (is_file($path . 'provider.php')) { + $provider = include $path . 'provider.php'; + if (is_array($provider)) { + $content .= PHP_EOL . '\think\Container::getInstance()->bindTo(' . var_export($provider, true) . ');' . PHP_EOL; + } + } + + $content .= PHP_EOL . '\think\facade\Config::set(' . var_export($config->get(), true) . ');' . PHP_EOL; + + return $content; + } +} diff --git a/thinkphp/library/think/console/command/optimize/Route.php b/thinkphp/library/think/console/command/optimize/Route.php new file mode 100755 index 0000000..f6dc632 --- /dev/null +++ b/thinkphp/library/think/console/command/optimize/Route.php @@ -0,0 +1,66 @@ + +// +---------------------------------------------------------------------- +namespace think\console\command\optimize; + +use think\console\Command; +use think\console\Input; +use think\console\Output; +use think\Container; + +class Route extends Command +{ + protected function configure() + { + $this->setName('optimize:route') + ->setDescription('Build route cache.'); + } + + protected function execute(Input $input, Output $output) + { + $filename = Container::get('app')->getRuntimePath() . 'route.php'; + if (is_file($filename)) { + unlink($filename); + } + file_put_contents($filename, $this->buildRouteCache()); + $output->writeln('Succeed!'); + } + + protected function buildRouteCache() + { + Container::get('route')->setName([]); + Container::get('route')->setTestMode(true); + // 路由检测 + $path = Container::get('app')->getRoutePath(); + + $files = is_dir($path) ? scandir($path) : []; + + foreach ($files as $file) { + if (strpos($file, '.php')) { + $filename = $path . DIRECTORY_SEPARATOR . $file; + // 导入路由配置 + $rules = include $filename; + if (is_array($rules)) { + Container::get('route')->import($rules); + } + } + } + + if (Container::get('config')->get('route_annotation')) { + $suffix = Container::get('config')->get('controller_suffix') || Container::get('config')->get('class_suffix'); + include Container::get('build')->buildRoute($suffix); + } + + $content = 'getName(), true) . ';'; + return $content; + } + +} diff --git a/thinkphp/library/think/console/command/optimize/Schema.php b/thinkphp/library/think/console/command/optimize/Schema.php new file mode 100755 index 0000000..16ac83d --- /dev/null +++ b/thinkphp/library/think/console/command/optimize/Schema.php @@ -0,0 +1,118 @@ + +// +---------------------------------------------------------------------- +namespace think\console\command\optimize; + +use think\console\Command; +use think\console\Input; +use think\console\input\Option; +use think\console\Output; +use think\Db; +use think\facade\App; + +class Schema extends Command +{ + protected function configure() + { + $this->setName('optimize:schema') + ->addOption('db', null, Option::VALUE_REQUIRED, 'db name .') + ->addOption('table', null, Option::VALUE_REQUIRED, 'table name .') + ->addOption('module', null, Option::VALUE_REQUIRED, 'module name .') + ->setDescription('Build database schema cache.'); + } + + protected function execute(Input $input, Output $output) + { + if (!is_dir(App::getRuntimePath() . 'schema')) { + @mkdir(App::getRuntimePath() . 'schema', 0755, true); + } + + if ($input->hasOption('module')) { + $module = $input->getOption('module'); + // 读取模型 + $path = App::getAppPath() . $module . DIRECTORY_SEPARATOR . 'model'; + $list = is_dir($path) ? scandir($path) : []; + $namespace = App::getNamespace(); + + foreach ($list as $file) { + if (0 === strpos($file, '.')) { + continue; + } + $class = '\\' . $namespace . '\\' . $module . '\\model\\' . pathinfo($file, PATHINFO_FILENAME); + $this->buildModelSchema($class); + } + + $output->writeln('Succeed!'); + return; + } elseif ($input->hasOption('table')) { + $table = $input->getOption('table'); + if (false === strpos($table, '.')) { + $dbName = Db::getConfig('database'); + } + + $tables[] = $table; + } elseif ($input->hasOption('db')) { + $dbName = $input->getOption('db'); + $tables = Db::getConnection()->getTables($dbName); + } elseif (!\think\facade\Config::get('app_multi_module')) { + $namespace = App::getNamespace(); + $path = App::getAppPath() . 'model'; + $list = is_dir($path) ? scandir($path) : []; + + foreach ($list as $file) { + if (0 === strpos($file, '.')) { + continue; + } + $class = '\\' . $namespace . '\\model\\' . pathinfo($file, PATHINFO_FILENAME); + $this->buildModelSchema($class); + } + + $output->writeln('Succeed!'); + return; + } else { + $tables = Db::getConnection()->getTables(); + } + + $db = isset($dbName) ? $dbName . '.' : ''; + $this->buildDataBaseSchema($tables, $db); + + $output->writeln('Succeed!'); + } + + protected function buildModelSchema($class) + { + $reflect = new \ReflectionClass($class); + if (!$reflect->isAbstract() && $reflect->isSubclassOf('\think\Model')) { + $table = $class::getTable(); + $dbName = $class::getConfig('database'); + $content = 'getFields($table); + $content .= var_export($info, true) . ';'; + + file_put_contents(App::getRuntimePath() . 'schema' . DIRECTORY_SEPARATOR . $dbName . '.' . $table . '.php', $content); + } + } + + protected function buildDataBaseSchema($tables, $db) + { + if ('' == $db) { + $dbName = Db::getConfig('database') . '.'; + } else { + $dbName = $db; + } + + foreach ($tables as $table) { + $content = 'getFields($db . $table); + $content .= var_export($info, true) . ';'; + file_put_contents(App::getRuntimePath() . 'schema' . DIRECTORY_SEPARATOR . $dbName . $table . '.php', $content); + } + } +} diff --git a/thinkphp/library/think/console/input/Argument.php b/thinkphp/library/think/console/input/Argument.php new file mode 100755 index 0000000..16223bb --- /dev/null +++ b/thinkphp/library/think/console/input/Argument.php @@ -0,0 +1,115 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\input; + +class Argument +{ + + const REQUIRED = 1; + const OPTIONAL = 2; + const IS_ARRAY = 4; + + private $name; + private $mode; + private $default; + private $description; + + /** + * 构造方法 + * @param string $name 参数名 + * @param int $mode 参数类型: self::REQUIRED 或者 self::OPTIONAL + * @param string $description 描述 + * @param mixed $default 默认值 (仅 self::OPTIONAL 类型有效) + * @throws \InvalidArgumentException + */ + public function __construct($name, $mode = null, $description = '', $default = null) + { + if (null === $mode) { + $mode = self::OPTIONAL; + } elseif (!is_int($mode) || $mode > 7 || $mode < 1) { + throw new \InvalidArgumentException(sprintf('Argument mode "%s" is not valid.', $mode)); + } + + $this->name = $name; + $this->mode = $mode; + $this->description = $description; + + $this->setDefault($default); + } + + /** + * 获取参数名 + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 是否必须 + * @return bool + */ + public function isRequired() + { + return self::REQUIRED === (self::REQUIRED & $this->mode); + } + + /** + * 该参数是否接受数组 + * @return bool + */ + public function isArray() + { + return self::IS_ARRAY === (self::IS_ARRAY & $this->mode); + } + + /** + * 设置默认值 + * @param mixed $default 默认值 + * @throws \LogicException + */ + public function setDefault($default = null) + { + if (self::REQUIRED === $this->mode && null !== $default) { + throw new \LogicException('Cannot set a default value except for InputArgument::OPTIONAL mode.'); + } + + if ($this->isArray()) { + if (null === $default) { + $default = []; + } elseif (!is_array($default)) { + throw new \LogicException('A default value for an array argument must be an array.'); + } + } + + $this->default = $default; + } + + /** + * 获取默认值 + * @return mixed + */ + public function getDefault() + { + return $this->default; + } + + /** + * 获取描述 + * @return string + */ + public function getDescription() + { + return $this->description; + } +} diff --git a/thinkphp/library/think/console/input/Definition.php b/thinkphp/library/think/console/input/Definition.php new file mode 100755 index 0000000..c71977e --- /dev/null +++ b/thinkphp/library/think/console/input/Definition.php @@ -0,0 +1,375 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\input; + +class Definition +{ + + /** + * @var Argument[] + */ + private $arguments; + + private $requiredCount; + private $hasAnArrayArgument = false; + private $hasOptional; + + /** + * @var Option[] + */ + private $options; + private $shortcuts; + + /** + * 构造方法 + * @param array $definition + * @api + */ + public function __construct(array $definition = []) + { + $this->setDefinition($definition); + } + + /** + * 设置指令的定义 + * @param array $definition 定义的数组 + */ + public function setDefinition(array $definition) + { + $arguments = []; + $options = []; + foreach ($definition as $item) { + if ($item instanceof Option) { + $options[] = $item; + } else { + $arguments[] = $item; + } + } + + $this->setArguments($arguments); + $this->setOptions($options); + } + + /** + * 设置参数 + * @param Argument[] $arguments 参数数组 + */ + public function setArguments($arguments = []) + { + $this->arguments = []; + $this->requiredCount = 0; + $this->hasOptional = false; + $this->hasAnArrayArgument = false; + $this->addArguments($arguments); + } + + /** + * 添加参数 + * @param Argument[] $arguments 参数数组 + * @api + */ + public function addArguments($arguments = []) + { + if (null !== $arguments) { + foreach ($arguments as $argument) { + $this->addArgument($argument); + } + } + } + + /** + * 添加一个参数 + * @param Argument $argument 参数 + * @throws \LogicException + */ + public function addArgument(Argument $argument) + { + if (isset($this->arguments[$argument->getName()])) { + throw new \LogicException(sprintf('An argument with name "%s" already exists.', $argument->getName())); + } + + if ($this->hasAnArrayArgument) { + throw new \LogicException('Cannot add an argument after an array argument.'); + } + + if ($argument->isRequired() && $this->hasOptional) { + throw new \LogicException('Cannot add a required argument after an optional one.'); + } + + if ($argument->isArray()) { + $this->hasAnArrayArgument = true; + } + + if ($argument->isRequired()) { + ++$this->requiredCount; + } else { + $this->hasOptional = true; + } + + $this->arguments[$argument->getName()] = $argument; + } + + /** + * 根据名称或者位置获取参数 + * @param string|int $name 参数名或者位置 + * @return Argument 参数 + * @throws \InvalidArgumentException + */ + public function getArgument($name) + { + if (!$this->hasArgument($name)) { + throw new \InvalidArgumentException(sprintf('The "%s" argument does not exist.', $name)); + } + + $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + + return $arguments[$name]; + } + + /** + * 根据名称或位置检查是否具有某个参数 + * @param string|int $name 参数名或者位置 + * @return bool + * @api + */ + public function hasArgument($name) + { + $arguments = is_int($name) ? array_values($this->arguments) : $this->arguments; + + return isset($arguments[$name]); + } + + /** + * 获取所有的参数 + * @return Argument[] 参数数组 + */ + public function getArguments() + { + return $this->arguments; + } + + /** + * 获取参数数量 + * @return int + */ + public function getArgumentCount() + { + return $this->hasAnArrayArgument ? PHP_INT_MAX : count($this->arguments); + } + + /** + * 获取必填的参数的数量 + * @return int + */ + public function getArgumentRequiredCount() + { + return $this->requiredCount; + } + + /** + * 获取参数默认值 + * @return array + */ + public function getArgumentDefaults() + { + $values = []; + foreach ($this->arguments as $argument) { + $values[$argument->getName()] = $argument->getDefault(); + } + + return $values; + } + + /** + * 设置选项 + * @param Option[] $options 选项数组 + */ + public function setOptions($options = []) + { + $this->options = []; + $this->shortcuts = []; + $this->addOptions($options); + } + + /** + * 添加选项 + * @param Option[] $options 选项数组 + * @api + */ + public function addOptions($options = []) + { + foreach ($options as $option) { + $this->addOption($option); + } + } + + /** + * 添加一个选项 + * @param Option $option 选项 + * @throws \LogicException + * @api + */ + public function addOption(Option $option) + { + if (isset($this->options[$option->getName()]) && !$option->equals($this->options[$option->getName()])) { + throw new \LogicException(sprintf('An option named "%s" already exists.', $option->getName())); + } + + if ($option->getShortcut()) { + foreach (explode('|', $option->getShortcut()) as $shortcut) { + if (isset($this->shortcuts[$shortcut]) + && !$option->equals($this->options[$this->shortcuts[$shortcut]]) + ) { + throw new \LogicException(sprintf('An option with shortcut "%s" already exists.', $shortcut)); + } + } + } + + $this->options[$option->getName()] = $option; + if ($option->getShortcut()) { + foreach (explode('|', $option->getShortcut()) as $shortcut) { + $this->shortcuts[$shortcut] = $option->getName(); + } + } + } + + /** + * 根据名称获取选项 + * @param string $name 选项名 + * @return Option + * @throws \InvalidArgumentException + * @api + */ + public function getOption($name) + { + if (!$this->hasOption($name)) { + throw new \InvalidArgumentException(sprintf('The "--%s" option does not exist.', $name)); + } + + return $this->options[$name]; + } + + /** + * 根据名称检查是否有这个选项 + * @param string $name 选项名 + * @return bool + * @api + */ + public function hasOption($name) + { + return isset($this->options[$name]); + } + + /** + * 获取所有选项 + * @return Option[] + * @api + */ + public function getOptions() + { + return $this->options; + } + + /** + * 根据名称检查某个选项是否有短名称 + * @param string $name 短名称 + * @return bool + */ + public function hasShortcut($name) + { + return isset($this->shortcuts[$name]); + } + + /** + * 根据短名称获取选项 + * @param string $shortcut 短名称 + * @return Option + */ + public function getOptionForShortcut($shortcut) + { + return $this->getOption($this->shortcutToName($shortcut)); + } + + /** + * 获取所有选项的默认值 + * @return array + */ + public function getOptionDefaults() + { + $values = []; + foreach ($this->options as $option) { + $values[$option->getName()] = $option->getDefault(); + } + + return $values; + } + + /** + * 根据短名称获取选项名 + * @param string $shortcut 短名称 + * @return string + * @throws \InvalidArgumentException + */ + private function shortcutToName($shortcut) + { + if (!isset($this->shortcuts[$shortcut])) { + throw new \InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); + } + + return $this->shortcuts[$shortcut]; + } + + /** + * 获取该指令的介绍 + * @param bool $short 是否简洁介绍 + * @return string + */ + public function getSynopsis($short = false) + { + $elements = []; + + if ($short && $this->getOptions()) { + $elements[] = '[options]'; + } elseif (!$short) { + foreach ($this->getOptions() as $option) { + $value = ''; + if ($option->acceptValue()) { + $value = sprintf(' %s%s%s', $option->isValueOptional() ? '[' : '', strtoupper($option->getName()), $option->isValueOptional() ? ']' : ''); + } + + $shortcut = $option->getShortcut() ? sprintf('-%s|', $option->getShortcut()) : ''; + $elements[] = sprintf('[%s--%s%s]', $shortcut, $option->getName(), $value); + } + } + + if (count($elements) && $this->getArguments()) { + $elements[] = '[--]'; + } + + foreach ($this->getArguments() as $argument) { + $element = '<' . $argument->getName() . '>'; + if (!$argument->isRequired()) { + $element = '[' . $element . ']'; + } elseif ($argument->isArray()) { + $element .= ' (' . $element . ')'; + } + + if ($argument->isArray()) { + $element .= '...'; + } + + $elements[] = $element; + } + + return implode(' ', $elements); + } +} diff --git a/thinkphp/library/think/console/input/Option.php b/thinkphp/library/think/console/input/Option.php new file mode 100755 index 0000000..e5707c9 --- /dev/null +++ b/thinkphp/library/think/console/input/Option.php @@ -0,0 +1,190 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\input; + +class Option +{ + + const VALUE_NONE = 1; + const VALUE_REQUIRED = 2; + const VALUE_OPTIONAL = 4; + const VALUE_IS_ARRAY = 8; + + private $name; + private $shortcut; + private $mode; + private $default; + private $description; + + /** + * 构造方法 + * @param string $name 选项名 + * @param string|array $shortcut 短名称,多个用|隔开或者使用数组 + * @param int $mode 选项类型(可选类型为 self::VALUE_*) + * @param string $description 描述 + * @param mixed $default 默认值 (类型为 self::VALUE_REQUIRED 或者 self::VALUE_NONE 的时候必须为null) + * @throws \InvalidArgumentException + */ + public function __construct($name, $shortcut = null, $mode = null, $description = '', $default = null) + { + if (0 === strpos($name, '--')) { + $name = substr($name, 2); + } + + if (empty($name)) { + throw new \InvalidArgumentException('An option name cannot be empty.'); + } + + if (empty($shortcut)) { + $shortcut = null; + } + + if (null !== $shortcut) { + if (is_array($shortcut)) { + $shortcut = implode('|', $shortcut); + } + $shortcuts = preg_split('{(\|)-?}', ltrim($shortcut, '-')); + $shortcuts = array_filter($shortcuts); + $shortcut = implode('|', $shortcuts); + + if (empty($shortcut)) { + throw new \InvalidArgumentException('An option shortcut cannot be empty.'); + } + } + + if (null === $mode) { + $mode = self::VALUE_NONE; + } elseif (!is_int($mode) || $mode > 15 || $mode < 1) { + throw new \InvalidArgumentException(sprintf('Option mode "%s" is not valid.', $mode)); + } + + $this->name = $name; + $this->shortcut = $shortcut; + $this->mode = $mode; + $this->description = $description; + + if ($this->isArray() && !$this->acceptValue()) { + throw new \InvalidArgumentException('Impossible to have an option mode VALUE_IS_ARRAY if the option does not accept a value.'); + } + + $this->setDefault($default); + } + + /** + * 获取短名称 + * @return string + */ + public function getShortcut() + { + return $this->shortcut; + } + + /** + * 获取选项名 + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 是否可以设置值 + * @return bool 类型不是 self::VALUE_NONE 的时候返回true,其他均返回false + */ + public function acceptValue() + { + return $this->isValueRequired() || $this->isValueOptional(); + } + + /** + * 是否必须 + * @return bool 类型是 self::VALUE_REQUIRED 的时候返回true,其他均返回false + */ + public function isValueRequired() + { + return self::VALUE_REQUIRED === (self::VALUE_REQUIRED & $this->mode); + } + + /** + * 是否可选 + * @return bool 类型是 self::VALUE_OPTIONAL 的时候返回true,其他均返回false + */ + public function isValueOptional() + { + return self::VALUE_OPTIONAL === (self::VALUE_OPTIONAL & $this->mode); + } + + /** + * 选项值是否接受数组 + * @return bool 类型是 self::VALUE_IS_ARRAY 的时候返回true,其他均返回false + */ + public function isArray() + { + return self::VALUE_IS_ARRAY === (self::VALUE_IS_ARRAY & $this->mode); + } + + /** + * 设置默认值 + * @param mixed $default 默认值 + * @throws \LogicException + */ + public function setDefault($default = null) + { + if (self::VALUE_NONE === (self::VALUE_NONE & $this->mode) && null !== $default) { + throw new \LogicException('Cannot set a default value when using InputOption::VALUE_NONE mode.'); + } + + if ($this->isArray()) { + if (null === $default) { + $default = []; + } elseif (!is_array($default)) { + throw new \LogicException('A default value for an array option must be an array.'); + } + } + + $this->default = $this->acceptValue() ? $default : false; + } + + /** + * 获取默认值 + * @return mixed + */ + public function getDefault() + { + return $this->default; + } + + /** + * 获取描述文字 + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * 检查所给选项是否是当前这个 + * @param Option $option + * @return bool + */ + public function equals(Option $option) + { + return $option->getName() === $this->getName() + && $option->getShortcut() === $this->getShortcut() + && $option->getDefault() === $this->getDefault() + && $option->isArray() === $this->isArray() + && $option->isValueRequired() === $this->isValueRequired() + && $option->isValueOptional() === $this->isValueOptional(); + } +} diff --git a/thinkphp/library/think/console/output/Ask.php b/thinkphp/library/think/console/output/Ask.php new file mode 100755 index 0000000..3933eb2 --- /dev/null +++ b/thinkphp/library/think/console/output/Ask.php @@ -0,0 +1,340 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output; + +use think\console\Input; +use think\console\Output; +use think\console\output\question\Choice; +use think\console\output\question\Confirmation; + +class Ask +{ + private static $stty; + + private static $shell; + + /** @var Input */ + protected $input; + + /** @var Output */ + protected $output; + + /** @var Question */ + protected $question; + + public function __construct(Input $input, Output $output, Question $question) + { + $this->input = $input; + $this->output = $output; + $this->question = $question; + } + + public function run() + { + if (!$this->input->isInteractive()) { + return $this->question->getDefault(); + } + + if (!$this->question->getValidator()) { + return $this->doAsk(); + } + + $that = $this; + + $interviewer = function () use ($that) { + return $that->doAsk(); + }; + + return $this->validateAttempts($interviewer); + } + + protected function doAsk() + { + $this->writePrompt(); + + $inputStream = STDIN; + $autocomplete = $this->question->getAutocompleterValues(); + + if (null === $autocomplete || !$this->hasSttyAvailable()) { + $ret = false; + if ($this->question->isHidden()) { + try { + $ret = trim($this->getHiddenResponse($inputStream)); + } catch (\RuntimeException $e) { + if (!$this->question->isHiddenFallback()) { + throw $e; + } + } + } + + if (false === $ret) { + $ret = fgets($inputStream, 4096); + if (false === $ret) { + throw new \RuntimeException('Aborted'); + } + $ret = trim($ret); + } + } else { + $ret = trim($this->autocomplete($inputStream)); + } + + $ret = strlen($ret) > 0 ? $ret : $this->question->getDefault(); + + if ($normalizer = $this->question->getNormalizer()) { + return $normalizer($ret); + } + + return $ret; + } + + private function autocomplete($inputStream) + { + $autocomplete = $this->question->getAutocompleterValues(); + $ret = ''; + + $i = 0; + $ofs = -1; + $matches = $autocomplete; + $numMatches = count($matches); + + $sttyMode = shell_exec('stty -g'); + + shell_exec('stty -icanon -echo'); + + while (!feof($inputStream)) { + $c = fread($inputStream, 1); + + if ("\177" === $c) { + if (0 === $numMatches && 0 !== $i) { + --$i; + $this->output->write("\033[1D"); + } + + if ($i === 0) { + $ofs = -1; + $matches = $autocomplete; + $numMatches = count($matches); + } else { + $numMatches = 0; + } + + $ret = substr($ret, 0, $i); + } elseif ("\033" === $c) { + $c .= fread($inputStream, 2); + + if (isset($c[2]) && ('A' === $c[2] || 'B' === $c[2])) { + if ('A' === $c[2] && -1 === $ofs) { + $ofs = 0; + } + + if (0 === $numMatches) { + continue; + } + + $ofs += ('A' === $c[2]) ? -1 : 1; + $ofs = ($numMatches + $ofs) % $numMatches; + } + } elseif (ord($c) < 32) { + if ("\t" === $c || "\n" === $c) { + if ($numMatches > 0 && -1 !== $ofs) { + $ret = $matches[$ofs]; + $this->output->write(substr($ret, $i)); + $i = strlen($ret); + } + + if ("\n" === $c) { + $this->output->write($c); + break; + } + + $numMatches = 0; + } + + continue; + } else { + $this->output->write($c); + $ret .= $c; + ++$i; + + $numMatches = 0; + $ofs = 0; + + foreach ($autocomplete as $value) { + if (0 === strpos($value, $ret) && $i !== strlen($value)) { + $matches[$numMatches++] = $value; + } + } + } + + $this->output->write("\033[K"); + + if ($numMatches > 0 && -1 !== $ofs) { + $this->output->write("\0337"); + $this->output->highlight(substr($matches[$ofs], $i)); + $this->output->write("\0338"); + } + } + + shell_exec(sprintf('stty %s', $sttyMode)); + + return $ret; + } + + protected function getHiddenResponse($inputStream) + { + if ('\\' === DIRECTORY_SEPARATOR) { + $exe = __DIR__ . '/../bin/hiddeninput.exe'; + + $value = rtrim(shell_exec($exe)); + $this->output->writeln(''); + + if (isset($tmpExe)) { + unlink($tmpExe); + } + + return $value; + } + + if ($this->hasSttyAvailable()) { + $sttyMode = shell_exec('stty -g'); + + shell_exec('stty -echo'); + $value = fgets($inputStream, 4096); + shell_exec(sprintf('stty %s', $sttyMode)); + + if (false === $value) { + throw new \RuntimeException('Aborted'); + } + + $value = trim($value); + $this->output->writeln(''); + + return $value; + } + + if (false !== $shell = $this->getShell()) { + $readCmd = $shell === 'csh' ? 'set mypassword = $<' : 'read -r mypassword'; + $command = sprintf("/usr/bin/env %s -c 'stty -echo; %s; stty echo; echo \$mypassword'", $shell, $readCmd); + $value = rtrim(shell_exec($command)); + $this->output->writeln(''); + + return $value; + } + + throw new \RuntimeException('Unable to hide the response.'); + } + + protected function validateAttempts($interviewer) + { + /** @var \Exception $error */ + $error = null; + $attempts = $this->question->getMaxAttempts(); + while (null === $attempts || $attempts--) { + if (null !== $error) { + $this->output->error($error->getMessage()); + } + + try { + return call_user_func($this->question->getValidator(), $interviewer()); + } catch (\Exception $error) { + } + } + + throw $error; + } + + /** + * 显示问题的提示信息 + */ + protected function writePrompt() + { + $text = $this->question->getQuestion(); + $default = $this->question->getDefault(); + + switch (true) { + case null === $default: + $text = sprintf(' %s:', $text); + + break; + + case $this->question instanceof Confirmation: + $text = sprintf(' %s (yes/no) [%s]:', $text, $default ? 'yes' : 'no'); + + break; + + case $this->question instanceof Choice && $this->question->isMultiselect(): + $choices = $this->question->getChoices(); + $default = explode(',', $default); + + foreach ($default as $key => $value) { + $default[$key] = $choices[trim($value)]; + } + + $text = sprintf(' %s [%s]:', $text, implode(', ', $default)); + + break; + + case $this->question instanceof Choice: + $choices = $this->question->getChoices(); + $text = sprintf(' %s [%s]:', $text, $choices[$default]); + + break; + + default: + $text = sprintf(' %s [%s]:', $text, $default); + } + + $this->output->writeln($text); + + if ($this->question instanceof Choice) { + $width = max(array_map('strlen', array_keys($this->question->getChoices()))); + + foreach ($this->question->getChoices() as $key => $value) { + $this->output->writeln(sprintf(" [%-${width}s] %s", $key, $value)); + } + } + + $this->output->write(' > '); + } + + private function getShell() + { + if (null !== self::$shell) { + return self::$shell; + } + + self::$shell = false; + + if (file_exists('/usr/bin/env')) { + $test = "/usr/bin/env %s -c 'echo OK' 2> /dev/null"; + foreach (['bash', 'zsh', 'ksh', 'csh'] as $sh) { + if ('OK' === rtrim(shell_exec(sprintf($test, $sh)))) { + self::$shell = $sh; + break; + } + } + } + + return self::$shell; + } + + private function hasSttyAvailable() + { + if (null !== self::$stty) { + return self::$stty; + } + + exec('stty 2>&1', $output, $exitcode); + + return self::$stty = $exitcode === 0; + } +} diff --git a/thinkphp/library/think/console/output/Descriptor.php b/thinkphp/library/think/console/output/Descriptor.php new file mode 100755 index 0000000..6d98d53 --- /dev/null +++ b/thinkphp/library/think/console/output/Descriptor.php @@ -0,0 +1,319 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output; + +use think\Console; +use think\console\Command; +use think\console\input\Argument as InputArgument; +use think\console\input\Definition as InputDefinition; +use think\console\input\Option as InputOption; +use think\console\Output; +use think\console\output\descriptor\Console as ConsoleDescription; + +class Descriptor +{ + + /** + * @var Output + */ + protected $output; + + /** + * {@inheritdoc} + */ + public function describe(Output $output, $object, array $options = []) + { + $this->output = $output; + + switch (true) { + case $object instanceof InputArgument: + $this->describeInputArgument($object, $options); + break; + case $object instanceof InputOption: + $this->describeInputOption($object, $options); + break; + case $object instanceof InputDefinition: + $this->describeInputDefinition($object, $options); + break; + case $object instanceof Command: + $this->describeCommand($object, $options); + break; + case $object instanceof Console: + $this->describeConsole($object, $options); + break; + default: + throw new \InvalidArgumentException(sprintf('Object of type "%s" is not describable.', get_class($object))); + } + } + + /** + * 输出内容 + * @param string $content + * @param bool $decorated + */ + protected function write($content, $decorated = false) + { + $this->output->write($content, false, $decorated ? Output::OUTPUT_NORMAL : Output::OUTPUT_RAW); + } + + /** + * 描述参数 + * @param InputArgument $argument + * @param array $options + * @return string|mixed + */ + protected function describeInputArgument(InputArgument $argument, array $options = []) + { + if (null !== $argument->getDefault() + && (!is_array($argument->getDefault()) + || count($argument->getDefault())) + ) { + $default = sprintf(' [default: %s]', $this->formatDefaultValue($argument->getDefault())); + } else { + $default = ''; + } + + $totalWidth = isset($options['total_width']) ? $options['total_width'] : strlen($argument->getName()); + $spacingWidth = $totalWidth - strlen($argument->getName()) + 2; + + $this->writeText(sprintf(" %s%s%s%s", $argument->getName(), str_repeat(' ', $spacingWidth), // + 17 = 2 spaces + + + 2 spaces + preg_replace('/\s*\R\s*/', PHP_EOL . str_repeat(' ', $totalWidth + 17), $argument->getDescription()), $default), $options); + } + + /** + * 描述选项 + * @param InputOption $option + * @param array $options + * @return string|mixed + */ + protected function describeInputOption(InputOption $option, array $options = []) + { + if ($option->acceptValue() && null !== $option->getDefault() + && (!is_array($option->getDefault()) + || count($option->getDefault())) + ) { + $default = sprintf(' [default: %s]', $this->formatDefaultValue($option->getDefault())); + } else { + $default = ''; + } + + $value = ''; + if ($option->acceptValue()) { + $value = '=' . strtoupper($option->getName()); + + if ($option->isValueOptional()) { + $value = '[' . $value . ']'; + } + } + + $totalWidth = isset($options['total_width']) ? $options['total_width'] : $this->calculateTotalWidthForOptions([$option]); + $synopsis = sprintf('%s%s', $option->getShortcut() ? sprintf('-%s, ', $option->getShortcut()) : ' ', sprintf('--%s%s', $option->getName(), $value)); + + $spacingWidth = $totalWidth - strlen($synopsis) + 2; + + $this->writeText(sprintf(" %s%s%s%s%s", $synopsis, str_repeat(' ', $spacingWidth), // + 17 = 2 spaces + + + 2 spaces + preg_replace('/\s*\R\s*/', "\n" . str_repeat(' ', $totalWidth + 17), $option->getDescription()), $default, $option->isArray() ? ' (multiple values allowed)' : ''), $options); + } + + /** + * 描述输入 + * @param InputDefinition $definition + * @param array $options + * @return string|mixed + */ + protected function describeInputDefinition(InputDefinition $definition, array $options = []) + { + $totalWidth = $this->calculateTotalWidthForOptions($definition->getOptions()); + foreach ($definition->getArguments() as $argument) { + $totalWidth = max($totalWidth, strlen($argument->getName())); + } + + if ($definition->getArguments()) { + $this->writeText('Arguments:', $options); + $this->writeText("\n"); + foreach ($definition->getArguments() as $argument) { + $this->describeInputArgument($argument, array_merge($options, ['total_width' => $totalWidth])); + $this->writeText("\n"); + } + } + + if ($definition->getArguments() && $definition->getOptions()) { + $this->writeText("\n"); + } + + if ($definition->getOptions()) { + $laterOptions = []; + + $this->writeText('Options:', $options); + foreach ($definition->getOptions() as $option) { + if (strlen($option->getShortcut()) > 1) { + $laterOptions[] = $option; + continue; + } + $this->writeText("\n"); + $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); + } + foreach ($laterOptions as $option) { + $this->writeText("\n"); + $this->describeInputOption($option, array_merge($options, ['total_width' => $totalWidth])); + } + } + } + + /** + * 描述指令 + * @param Command $command + * @param array $options + * @return string|mixed + */ + protected function describeCommand(Command $command, array $options = []) + { + $command->getSynopsis(true); + $command->getSynopsis(false); + $command->mergeConsoleDefinition(false); + + $this->writeText('Usage:', $options); + foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) { + $this->writeText("\n"); + $this->writeText(' ' . $usage, $options); + } + $this->writeText("\n"); + + $definition = $command->getNativeDefinition(); + if ($definition->getOptions() || $definition->getArguments()) { + $this->writeText("\n"); + $this->describeInputDefinition($definition, $options); + $this->writeText("\n"); + } + + if ($help = $command->getProcessedHelp()) { + $this->writeText("\n"); + $this->writeText('Help:', $options); + $this->writeText("\n"); + $this->writeText(' ' . str_replace("\n", "\n ", $help), $options); + $this->writeText("\n"); + } + } + + /** + * 描述控制台 + * @param Console $console + * @param array $options + * @return string|mixed + */ + protected function describeConsole(Console $console, array $options = []) + { + $describedNamespace = isset($options['namespace']) ? $options['namespace'] : null; + $description = new ConsoleDescription($console, $describedNamespace); + + if (isset($options['raw_text']) && $options['raw_text']) { + $width = $this->getColumnWidth($description->getCommands()); + + foreach ($description->getCommands() as $command) { + $this->writeText(sprintf("%-${width}s %s", $command->getName(), $command->getDescription()), $options); + $this->writeText("\n"); + } + } else { + if ('' != $help = $console->getHelp()) { + $this->writeText("$help\n\n", $options); + } + + $this->writeText("Usage:\n", $options); + $this->writeText(" command [options] [arguments]\n\n", $options); + + $this->describeInputDefinition(new InputDefinition($console->getDefinition()->getOptions()), $options); + + $this->writeText("\n"); + $this->writeText("\n"); + + $width = $this->getColumnWidth($description->getCommands()); + + if ($describedNamespace) { + $this->writeText(sprintf('Available commands for the "%s" namespace:', $describedNamespace), $options); + } else { + $this->writeText('Available commands:', $options); + } + + // add commands by namespace + foreach ($description->getNamespaces() as $namespace) { + if (!$describedNamespace && ConsoleDescription::GLOBAL_NAMESPACE !== $namespace['id']) { + $this->writeText("\n"); + $this->writeText(' ' . $namespace['id'] . '', $options); + } + + foreach ($namespace['commands'] as $name) { + $this->writeText("\n"); + $spacingWidth = $width - strlen($name); + $this->writeText(sprintf(" %s%s%s", $name, str_repeat(' ', $spacingWidth), $description->getCommand($name) + ->getDescription()), $options); + } + } + + $this->writeText("\n"); + } + } + + /** + * {@inheritdoc} + */ + private function writeText($content, array $options = []) + { + $this->write(isset($options['raw_text']) + && $options['raw_text'] ? strip_tags($content) : $content, isset($options['raw_output']) ? !$options['raw_output'] : true); + } + + /** + * 格式化 + * @param mixed $default + * @return string + */ + private function formatDefaultValue($default) + { + return json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + } + + /** + * @param Command[] $commands + * @return int + */ + private function getColumnWidth(array $commands) + { + $width = 0; + foreach ($commands as $command) { + $width = strlen($command->getName()) > $width ? strlen($command->getName()) : $width; + } + + return $width + 2; + } + + /** + * @param InputOption[] $options + * @return int + */ + private function calculateTotalWidthForOptions($options) + { + $totalWidth = 0; + foreach ($options as $option) { + $nameLength = 4 + strlen($option->getName()) + 2; // - + shortcut + , + whitespace + name + -- + + if ($option->acceptValue()) { + $valueLength = 1 + strlen($option->getName()); // = + value + $valueLength += $option->isValueOptional() ? 2 : 0; // [ + ] + + $nameLength += $valueLength; + } + $totalWidth = max($totalWidth, $nameLength); + } + + return $totalWidth; + } +} diff --git a/thinkphp/library/think/console/output/Formatter.php b/thinkphp/library/think/console/output/Formatter.php new file mode 100755 index 0000000..f8bee55 --- /dev/null +++ b/thinkphp/library/think/console/output/Formatter.php @@ -0,0 +1,198 @@ + +// +---------------------------------------------------------------------- +namespace think\console\output; + +use think\console\output\formatter\Stack as StyleStack; +use think\console\output\formatter\Style; + +class Formatter +{ + + private $decorated = false; + private $styles = []; + private $styleStack; + + /** + * 转义 + * @param string $text + * @return string + */ + public static function escape($text) + { + return preg_replace('/([^\\\\]?)setStyle('error', new Style('white', 'red')); + $this->setStyle('info', new Style('green')); + $this->setStyle('comment', new Style('yellow')); + $this->setStyle('question', new Style('black', 'cyan')); + $this->setStyle('highlight', new Style('red')); + $this->setStyle('warning', new Style('black', 'yellow')); + + $this->styleStack = new StyleStack(); + } + + /** + * 设置外观标识 + * @param bool $decorated 是否美化文字 + */ + public function setDecorated($decorated) + { + $this->decorated = (bool) $decorated; + } + + /** + * 获取外观标识 + * @return bool + */ + public function isDecorated() + { + return $this->decorated; + } + + /** + * 添加一个新样式 + * @param string $name 样式名 + * @param Style $style 样式实例 + */ + public function setStyle($name, Style $style) + { + $this->styles[strtolower($name)] = $style; + } + + /** + * 是否有这个样式 + * @param string $name + * @return bool + */ + public function hasStyle($name) + { + return isset($this->styles[strtolower($name)]); + } + + /** + * 获取样式 + * @param string $name + * @return Style + * @throws \InvalidArgumentException + */ + public function getStyle($name) + { + if (!$this->hasStyle($name)) { + throw new \InvalidArgumentException(sprintf('Undefined style: %s', $name)); + } + + return $this->styles[strtolower($name)]; + } + + /** + * 使用所给的样式格式化文字 + * @param string $message 文字 + * @return string + */ + public function format($message) + { + $offset = 0; + $output = ''; + $tagRegex = '[a-z][a-z0-9_=;-]*'; + preg_match_all("#<(($tagRegex) | /($tagRegex)?)>#isx", $message, $matches, PREG_OFFSET_CAPTURE); + foreach ($matches[0] as $i => $match) { + $pos = $match[1]; + $text = $match[0]; + + if (0 != $pos && '\\' == $message[$pos - 1]) { + continue; + } + + $output .= $this->applyCurrentStyle(substr($message, $offset, $pos - $offset)); + $offset = $pos + strlen($text); + + if ($open = '/' != $text[1]) { + $tag = $matches[1][$i][0]; + } else { + $tag = isset($matches[3][$i][0]) ? $matches[3][$i][0] : ''; + } + + if (!$open && !$tag) { + // + $this->styleStack->pop(); + } elseif (false === $style = $this->createStyleFromString(strtolower($tag))) { + $output .= $this->applyCurrentStyle($text); + } elseif ($open) { + $this->styleStack->push($style); + } else { + $this->styleStack->pop($style); + } + } + + $output .= $this->applyCurrentStyle(substr($message, $offset)); + + return str_replace('\\<', '<', $output); + } + + /** + * @return StyleStack + */ + public function getStyleStack() + { + return $this->styleStack; + } + + /** + * 根据字符串创建新的样式实例 + * @param string $string + * @return Style|bool + */ + private function createStyleFromString($string) + { + if (isset($this->styles[$string])) { + return $this->styles[$string]; + } + + if (!preg_match_all('/([^=]+)=([^;]+)(;|$)/', strtolower($string), $matches, PREG_SET_ORDER)) { + return false; + } + + $style = new Style(); + foreach ($matches as $match) { + array_shift($match); + + if ('fg' == $match[0]) { + $style->setForeground($match[1]); + } elseif ('bg' == $match[0]) { + $style->setBackground($match[1]); + } else { + try { + $style->setOption($match[1]); + } catch (\InvalidArgumentException $e) { + return false; + } + } + } + + return $style; + } + + /** + * 从堆栈应用样式到文字 + * @param string $text 文字 + * @return string + */ + private function applyCurrentStyle($text) + { + return $this->isDecorated() && strlen($text) > 0 ? $this->styleStack->getCurrent()->apply($text) : $text; + } +} diff --git a/thinkphp/library/think/console/output/Question.php b/thinkphp/library/think/console/output/Question.php new file mode 100755 index 0000000..03975f2 --- /dev/null +++ b/thinkphp/library/think/console/output/Question.php @@ -0,0 +1,211 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output; + +class Question +{ + + private $question; + private $attempts; + private $hidden = false; + private $hiddenFallback = true; + private $autocompleterValues; + private $validator; + private $default; + private $normalizer; + + /** + * 构造方法 + * @param string $question 问题 + * @param mixed $default 默认答案 + */ + public function __construct($question, $default = null) + { + $this->question = $question; + $this->default = $default; + } + + /** + * 获取问题 + * @return string + */ + public function getQuestion() + { + return $this->question; + } + + /** + * 获取默认答案 + * @return mixed + */ + public function getDefault() + { + return $this->default; + } + + /** + * 是否隐藏答案 + * @return bool + */ + public function isHidden() + { + return $this->hidden; + } + + /** + * 隐藏答案 + * @param bool $hidden + * @return Question + */ + public function setHidden($hidden) + { + if ($this->autocompleterValues) { + throw new \LogicException('A hidden question cannot use the autocompleter.'); + } + + $this->hidden = (bool) $hidden; + + return $this; + } + + /** + * 不能被隐藏是否撤销 + * @return bool + */ + public function isHiddenFallback() + { + return $this->hiddenFallback; + } + + /** + * 设置不能被隐藏的时候的操作 + * @param bool $fallback + * @return Question + */ + public function setHiddenFallback($fallback) + { + $this->hiddenFallback = (bool) $fallback; + + return $this; + } + + /** + * 获取自动完成 + * @return null|array|\Traversable + */ + public function getAutocompleterValues() + { + return $this->autocompleterValues; + } + + /** + * 设置自动完成的值 + * @param null|array|\Traversable $values + * @return Question + * @throws \InvalidArgumentException + * @throws \LogicException + */ + public function setAutocompleterValues($values) + { + if (is_array($values) && $this->isAssoc($values)) { + $values = array_merge(array_keys($values), array_values($values)); + } + + if (null !== $values && !is_array($values)) { + if (!$values instanceof \Traversable || $values instanceof \Countable) { + throw new \InvalidArgumentException('Autocompleter values can be either an array, `null` or an object implementing both `Countable` and `Traversable` interfaces.'); + } + } + + if ($this->hidden) { + throw new \LogicException('A hidden question cannot use the autocompleter.'); + } + + $this->autocompleterValues = $values; + + return $this; + } + + /** + * 设置答案的验证器 + * @param null|callable $validator + * @return Question The current instance + */ + public function setValidator($validator) + { + $this->validator = $validator; + + return $this; + } + + /** + * 获取验证器 + * @return null|callable + */ + public function getValidator() + { + return $this->validator; + } + + /** + * 设置最大重试次数 + * @param null|int $attempts + * @return Question + * @throws \InvalidArgumentException + */ + public function setMaxAttempts($attempts) + { + if (null !== $attempts && $attempts < 1) { + throw new \InvalidArgumentException('Maximum number of attempts must be a positive value.'); + } + + $this->attempts = $attempts; + + return $this; + } + + /** + * 获取最大重试次数 + * @return null|int + */ + public function getMaxAttempts() + { + return $this->attempts; + } + + /** + * 设置响应的回调 + * @param string|\Closure $normalizer + * @return Question + */ + public function setNormalizer($normalizer) + { + $this->normalizer = $normalizer; + + return $this; + } + + /** + * 获取响应回调 + * The normalizer can ba a callable (a string), a closure or a class implementing __invoke. + * @return string|\Closure + */ + public function getNormalizer() + { + return $this->normalizer; + } + + protected function isAssoc($array) + { + return (bool) count(array_filter(array_keys($array), 'is_string')); + } +} diff --git a/thinkphp/library/think/console/output/descriptor/Console.php b/thinkphp/library/think/console/output/descriptor/Console.php new file mode 100755 index 0000000..8739c53 --- /dev/null +++ b/thinkphp/library/think/console/output/descriptor/Console.php @@ -0,0 +1,153 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output\descriptor; + +use think\Console as ThinkConsole; +use think\console\Command; + +class Console +{ + + const GLOBAL_NAMESPACE = '_global'; + + /** + * @var ThinkConsole + */ + private $console; + + /** + * @var null|string + */ + private $namespace; + + /** + * @var array + */ + private $namespaces; + + /** + * @var Command[] + */ + private $commands; + + /** + * @var Command[] + */ + private $aliases; + + /** + * 构造方法 + * @param ThinkConsole $console + * @param string|null $namespace + */ + public function __construct(ThinkConsole $console, $namespace = null) + { + $this->console = $console; + $this->namespace = $namespace; + } + + /** + * @return array + */ + public function getNamespaces() + { + if (null === $this->namespaces) { + $this->inspectConsole(); + } + + return $this->namespaces; + } + + /** + * @return Command[] + */ + public function getCommands() + { + if (null === $this->commands) { + $this->inspectConsole(); + } + + return $this->commands; + } + + /** + * @param string $name + * @return Command + * @throws \InvalidArgumentException + */ + public function getCommand($name) + { + if (!isset($this->commands[$name]) && !isset($this->aliases[$name])) { + throw new \InvalidArgumentException(sprintf('Command %s does not exist.', $name)); + } + + return isset($this->commands[$name]) ? $this->commands[$name] : $this->aliases[$name]; + } + + private function inspectConsole() + { + $this->commands = []; + $this->namespaces = []; + + $all = $this->console->all($this->namespace ? $this->console->findNamespace($this->namespace) : null); + foreach ($this->sortCommands($all) as $namespace => $commands) { + $names = []; + + /** @var Command $command */ + foreach ($commands as $name => $command) { + if (is_string($command)) { + $command = new $command(); + } + + if (!$command->getName()) { + continue; + } + + if ($command->getName() === $name) { + $this->commands[$name] = $command; + } else { + $this->aliases[$name] = $command; + } + + $names[] = $name; + } + + $this->namespaces[$namespace] = ['id' => $namespace, 'commands' => $names]; + } + } + + /** + * @param array $commands + * @return array + */ + private function sortCommands(array $commands) + { + $namespacedCommands = []; + foreach ($commands as $name => $command) { + $key = $this->console->extractNamespace($name, 1); + if (!$key) { + $key = self::GLOBAL_NAMESPACE; + } + + $namespacedCommands[$key][$name] = $command; + } + ksort($namespacedCommands); + + foreach ($namespacedCommands as &$commandsSet) { + ksort($commandsSet); + } + // unset reference to keep scope clear + unset($commandsSet); + + return $namespacedCommands; + } +} diff --git a/thinkphp/library/think/console/output/driver/Buffer.php b/thinkphp/library/think/console/output/driver/Buffer.php new file mode 100755 index 0000000..c77a2ec --- /dev/null +++ b/thinkphp/library/think/console/output/driver/Buffer.php @@ -0,0 +1,52 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output\driver; + +use think\console\Output; + +class Buffer +{ + /** + * @var string + */ + private $buffer = ''; + + public function __construct(Output $output) + { + // do nothing + } + + public function fetch() + { + $content = $this->buffer; + $this->buffer = ''; + return $content; + } + + public function write($messages, $newline = false, $options = Output::OUTPUT_NORMAL) + { + $messages = (array) $messages; + + foreach ($messages as $message) { + $this->buffer .= $message; + } + if ($newline) { + $this->buffer .= "\n"; + } + } + + public function renderException(\Exception $e) + { + // do nothing + } + +} diff --git a/thinkphp/library/think/console/output/driver/Console.php b/thinkphp/library/think/console/output/driver/Console.php new file mode 100755 index 0000000..e041b52 --- /dev/null +++ b/thinkphp/library/think/console/output/driver/Console.php @@ -0,0 +1,368 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output\driver; + +use think\console\Output; +use think\console\output\Formatter; + +class Console +{ + + /** @var Resource */ + private $stdout; + + /** @var Formatter */ + private $formatter; + + private $terminalDimensions; + + /** @var Output */ + private $output; + + public function __construct(Output $output) + { + $this->output = $output; + $this->formatter = new Formatter(); + $this->stdout = $this->openOutputStream(); + $decorated = $this->hasColorSupport($this->stdout); + $this->formatter->setDecorated($decorated); + } + + public function setDecorated($decorated) + { + $this->formatter->setDecorated($decorated); + } + + public function write($messages, $newline = false, $type = Output::OUTPUT_NORMAL, $stream = null) + { + if (Output::VERBOSITY_QUIET === $this->output->getVerbosity()) { + return; + } + + $messages = (array) $messages; + + foreach ($messages as $message) { + switch ($type) { + case Output::OUTPUT_NORMAL: + $message = $this->formatter->format($message); + break; + case Output::OUTPUT_RAW: + break; + case Output::OUTPUT_PLAIN: + $message = strip_tags($this->formatter->format($message)); + break; + default: + throw new \InvalidArgumentException(sprintf('Unknown output type given (%s)', $type)); + } + + $this->doWrite($message, $newline, $stream); + } + } + + public function renderException(\Exception $e) + { + $stderr = $this->openErrorStream(); + $decorated = $this->hasColorSupport($stderr); + $this->formatter->setDecorated($decorated); + + do { + $title = sprintf(' [%s] ', get_class($e)); + + $len = $this->stringWidth($title); + + $width = $this->getTerminalWidth() ? $this->getTerminalWidth() - 1 : PHP_INT_MAX; + + if (defined('HHVM_VERSION') && $width > 1 << 31) { + $width = 1 << 31; + } + $lines = []; + foreach (preg_split('/\r?\n/', $e->getMessage()) as $line) { + foreach ($this->splitStringByWidth($line, $width - 4) as $line) { + + $lineLength = $this->stringWidth(preg_replace('/\[[^m]*m/', '', $line)) + 4; + $lines[] = [$line, $lineLength]; + + $len = max($lineLength, $len); + } + } + + $messages = ['', '']; + $messages[] = $emptyLine = sprintf('%s', str_repeat(' ', $len)); + $messages[] = sprintf('%s%s', $title, str_repeat(' ', max(0, $len - $this->stringWidth($title)))); + foreach ($lines as $line) { + $messages[] = sprintf(' %s %s', $line[0], str_repeat(' ', $len - $line[1])); + } + $messages[] = $emptyLine; + $messages[] = ''; + $messages[] = ''; + + $this->write($messages, true, Output::OUTPUT_NORMAL, $stderr); + + if (Output::VERBOSITY_VERBOSE <= $this->output->getVerbosity()) { + $this->write('Exception trace:', true, Output::OUTPUT_NORMAL, $stderr); + + // exception related properties + $trace = $e->getTrace(); + array_unshift($trace, [ + 'function' => '', + 'file' => $e->getFile() !== null ? $e->getFile() : 'n/a', + 'line' => $e->getLine() !== null ? $e->getLine() : 'n/a', + 'args' => [], + ]); + + for ($i = 0, $count = count($trace); $i < $count; ++$i) { + $class = isset($trace[$i]['class']) ? $trace[$i]['class'] : ''; + $type = isset($trace[$i]['type']) ? $trace[$i]['type'] : ''; + $function = $trace[$i]['function']; + $file = isset($trace[$i]['file']) ? $trace[$i]['file'] : 'n/a'; + $line = isset($trace[$i]['line']) ? $trace[$i]['line'] : 'n/a'; + + $this->write(sprintf(' %s%s%s() at %s:%s', $class, $type, $function, $file, $line), true, Output::OUTPUT_NORMAL, $stderr); + } + + $this->write('', true, Output::OUTPUT_NORMAL, $stderr); + $this->write('', true, Output::OUTPUT_NORMAL, $stderr); + } + } while ($e = $e->getPrevious()); + + } + + /** + * 获取终端宽度 + * @return int|null + */ + protected function getTerminalWidth() + { + $dimensions = $this->getTerminalDimensions(); + + return $dimensions[0]; + } + + /** + * 获取终端高度 + * @return int|null + */ + protected function getTerminalHeight() + { + $dimensions = $this->getTerminalDimensions(); + + return $dimensions[1]; + } + + /** + * 获取当前终端的尺寸 + * @return array + */ + public function getTerminalDimensions() + { + if ($this->terminalDimensions) { + return $this->terminalDimensions; + } + + if ('\\' === DIRECTORY_SEPARATOR) { + if (preg_match('/^(\d+)x\d+ \(\d+x(\d+)\)$/', trim(getenv('ANSICON')), $matches)) { + return [(int) $matches[1], (int) $matches[2]]; + } + if (preg_match('/^(\d+)x(\d+)$/', $this->getMode(), $matches)) { + return [(int) $matches[1], (int) $matches[2]]; + } + } + + if ($sttyString = $this->getSttyColumns()) { + if (preg_match('/rows.(\d+);.columns.(\d+);/i', $sttyString, $matches)) { + return [(int) $matches[2], (int) $matches[1]]; + } + if (preg_match('/;.(\d+).rows;.(\d+).columns/i', $sttyString, $matches)) { + return [(int) $matches[2], (int) $matches[1]]; + } + } + + return [null, null]; + } + + /** + * 获取stty列数 + * @return string + */ + private function getSttyColumns() + { + if (!function_exists('proc_open')) { + return; + } + + $descriptorspec = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']]; + $process = proc_open('stty -a | grep columns', $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); + if (is_resource($process)) { + $info = stream_get_contents($pipes[1]); + fclose($pipes[1]); + fclose($pipes[2]); + proc_close($process); + + return $info; + } + return; + } + + /** + * 获取终端模式 + * @return string x 或 null + */ + private function getMode() + { + if (!function_exists('proc_open')) { + return; + } + + $descriptorspec = [1 => ['pipe', 'w'], 2 => ['pipe', 'w']]; + $process = proc_open('mode CON', $descriptorspec, $pipes, null, null, ['suppress_errors' => true]); + if (is_resource($process)) { + $info = stream_get_contents($pipes[1]); + fclose($pipes[1]); + fclose($pipes[2]); + proc_close($process); + + if (preg_match('/--------+\r?\n.+?(\d+)\r?\n.+?(\d+)\r?\n/', $info, $matches)) { + return $matches[2] . 'x' . $matches[1]; + } + } + return; + } + + private function stringWidth($string) + { + if (!function_exists('mb_strwidth')) { + return strlen($string); + } + + if (false === $encoding = mb_detect_encoding($string)) { + return strlen($string); + } + + return mb_strwidth($string, $encoding); + } + + private function splitStringByWidth($string, $width) + { + if (!function_exists('mb_strwidth')) { + return str_split($string, $width); + } + + if (false === $encoding = mb_detect_encoding($string)) { + return str_split($string, $width); + } + + $utf8String = mb_convert_encoding($string, 'utf8', $encoding); + $lines = []; + $line = ''; + foreach (preg_split('//u', $utf8String) as $char) { + if (mb_strwidth($line . $char, 'utf8') <= $width) { + $line .= $char; + continue; + } + $lines[] = str_pad($line, $width); + $line = $char; + } + if (strlen($line)) { + $lines[] = count($lines) ? str_pad($line, $width) : $line; + } + + mb_convert_variables($encoding, 'utf8', $lines); + + return $lines; + } + + private function isRunningOS400() + { + $checks = [ + function_exists('php_uname') ? php_uname('s') : '', + getenv('OSTYPE'), + PHP_OS, + ]; + return false !== stripos(implode(';', $checks), 'OS400'); + } + + /** + * 当前环境是否支持写入控制台输出到stdout. + * + * @return bool + */ + protected function hasStdoutSupport() + { + return false === $this->isRunningOS400(); + } + + /** + * 当前环境是否支持写入控制台输出到stderr. + * + * @return bool + */ + protected function hasStderrSupport() + { + return false === $this->isRunningOS400(); + } + + /** + * @return resource + */ + private function openOutputStream() + { + if (!$this->hasStdoutSupport()) { + return fopen('php://output', 'w'); + } + return @fopen('php://stdout', 'w') ?: fopen('php://output', 'w'); + } + + /** + * @return resource + */ + private function openErrorStream() + { + return fopen($this->hasStderrSupport() ? 'php://stderr' : 'php://output', 'w'); + } + + /** + * 将消息写入到输出。 + * @param string $message 消息 + * @param bool $newline 是否另起一行 + * @param null $stream + */ + protected function doWrite($message, $newline, $stream = null) + { + if (null === $stream) { + $stream = $this->stdout; + } + if (false === @fwrite($stream, $message . ($newline ? PHP_EOL : ''))) { + throw new \RuntimeException('Unable to write output.'); + } + + fflush($stream); + } + + /** + * 是否支持着色 + * @param $stream + * @return bool + */ + protected function hasColorSupport($stream) + { + if (DIRECTORY_SEPARATOR === '\\') { + return + '10.0.10586' === PHP_WINDOWS_VERSION_MAJOR . '.' . PHP_WINDOWS_VERSION_MINOR . '.' . PHP_WINDOWS_VERSION_BUILD + || false !== getenv('ANSICON') + || 'ON' === getenv('ConEmuANSI') + || 'xterm' === getenv('TERM'); + } + + return function_exists('posix_isatty') && @posix_isatty($stream); + } + +} diff --git a/thinkphp/library/think/console/output/driver/Nothing.php b/thinkphp/library/think/console/output/driver/Nothing.php new file mode 100755 index 0000000..9a55f77 --- /dev/null +++ b/thinkphp/library/think/console/output/driver/Nothing.php @@ -0,0 +1,33 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output\driver; + +use think\console\Output; + +class Nothing +{ + + public function __construct(Output $output) + { + // do nothing + } + + public function write($messages, $newline = false, $options = Output::OUTPUT_NORMAL) + { + // do nothing + } + + public function renderException(\Exception $e) + { + // do nothing + } +} diff --git a/thinkphp/library/think/console/output/formatter/Stack.php b/thinkphp/library/think/console/output/formatter/Stack.php new file mode 100755 index 0000000..4864a3f --- /dev/null +++ b/thinkphp/library/think/console/output/formatter/Stack.php @@ -0,0 +1,116 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output\formatter; + +class Stack +{ + + /** + * @var Style[] + */ + private $styles; + + /** + * @var Style + */ + private $emptyStyle; + + /** + * 构造方法 + * @param Style|null $emptyStyle + */ + public function __construct(Style $emptyStyle = null) + { + $this->emptyStyle = $emptyStyle ?: new Style(); + $this->reset(); + } + + /** + * 重置堆栈 + */ + public function reset() + { + $this->styles = []; + } + + /** + * 推一个样式进入堆栈 + * @param Style $style + */ + public function push(Style $style) + { + $this->styles[] = $style; + } + + /** + * 从堆栈中弹出一个样式 + * @param Style|null $style + * @return Style + * @throws \InvalidArgumentException + */ + public function pop(Style $style = null) + { + if (empty($this->styles)) { + return $this->emptyStyle; + } + + if (null === $style) { + return array_pop($this->styles); + } + + /** + * @var int $index + * @var Style $stackedStyle + */ + foreach (array_reverse($this->styles, true) as $index => $stackedStyle) { + if ($style->apply('') === $stackedStyle->apply('')) { + $this->styles = array_slice($this->styles, 0, $index); + + return $stackedStyle; + } + } + + throw new \InvalidArgumentException('Incorrectly nested style tag found.'); + } + + /** + * 计算堆栈的当前样式。 + * @return Style + */ + public function getCurrent() + { + if (empty($this->styles)) { + return $this->emptyStyle; + } + + return $this->styles[count($this->styles) - 1]; + } + + /** + * @param Style $emptyStyle + * @return Stack + */ + public function setEmptyStyle(Style $emptyStyle) + { + $this->emptyStyle = $emptyStyle; + + return $this; + } + + /** + * @return Style + */ + public function getEmptyStyle() + { + return $this->emptyStyle; + } +} diff --git a/thinkphp/library/think/console/output/formatter/Style.php b/thinkphp/library/think/console/output/formatter/Style.php new file mode 100755 index 0000000..d9b0999 --- /dev/null +++ b/thinkphp/library/think/console/output/formatter/Style.php @@ -0,0 +1,189 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output\formatter; + +class Style +{ + + private static $availableForegroundColors = [ + 'black' => ['set' => 30, 'unset' => 39], + 'red' => ['set' => 31, 'unset' => 39], + 'green' => ['set' => 32, 'unset' => 39], + 'yellow' => ['set' => 33, 'unset' => 39], + 'blue' => ['set' => 34, 'unset' => 39], + 'magenta' => ['set' => 35, 'unset' => 39], + 'cyan' => ['set' => 36, 'unset' => 39], + 'white' => ['set' => 37, 'unset' => 39], + ]; + private static $availableBackgroundColors = [ + 'black' => ['set' => 40, 'unset' => 49], + 'red' => ['set' => 41, 'unset' => 49], + 'green' => ['set' => 42, 'unset' => 49], + 'yellow' => ['set' => 43, 'unset' => 49], + 'blue' => ['set' => 44, 'unset' => 49], + 'magenta' => ['set' => 45, 'unset' => 49], + 'cyan' => ['set' => 46, 'unset' => 49], + 'white' => ['set' => 47, 'unset' => 49], + ]; + private static $availableOptions = [ + 'bold' => ['set' => 1, 'unset' => 22], + 'underscore' => ['set' => 4, 'unset' => 24], + 'blink' => ['set' => 5, 'unset' => 25], + 'reverse' => ['set' => 7, 'unset' => 27], + 'conceal' => ['set' => 8, 'unset' => 28], + ]; + + private $foreground; + private $background; + private $options = []; + + /** + * 初始化输出的样式 + * @param string|null $foreground 字体颜色 + * @param string|null $background 背景色 + * @param array $options 格式 + * @api + */ + public function __construct($foreground = null, $background = null, array $options = []) + { + if (null !== $foreground) { + $this->setForeground($foreground); + } + if (null !== $background) { + $this->setBackground($background); + } + if (count($options)) { + $this->setOptions($options); + } + } + + /** + * 设置字体颜色 + * @param string|null $color 颜色名 + * @throws \InvalidArgumentException + * @api + */ + public function setForeground($color = null) + { + if (null === $color) { + $this->foreground = null; + + return; + } + + if (!isset(static::$availableForegroundColors[$color])) { + throw new \InvalidArgumentException(sprintf('Invalid foreground color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableForegroundColors)))); + } + + $this->foreground = static::$availableForegroundColors[$color]; + } + + /** + * 设置背景色 + * @param string|null $color 颜色名 + * @throws \InvalidArgumentException + * @api + */ + public function setBackground($color = null) + { + if (null === $color) { + $this->background = null; + + return; + } + + if (!isset(static::$availableBackgroundColors[$color])) { + throw new \InvalidArgumentException(sprintf('Invalid background color specified: "%s". Expected one of (%s)', $color, implode(', ', array_keys(static::$availableBackgroundColors)))); + } + + $this->background = static::$availableBackgroundColors[$color]; + } + + /** + * 设置字体格式 + * @param string $option 格式名 + * @throws \InvalidArgumentException When the option name isn't defined + * @api + */ + public function setOption($option) + { + if (!isset(static::$availableOptions[$option])) { + throw new \InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions)))); + } + + if (!in_array(static::$availableOptions[$option], $this->options)) { + $this->options[] = static::$availableOptions[$option]; + } + } + + /** + * 重置字体格式 + * @param string $option 格式名 + * @throws \InvalidArgumentException + */ + public function unsetOption($option) + { + if (!isset(static::$availableOptions[$option])) { + throw new \InvalidArgumentException(sprintf('Invalid option specified: "%s". Expected one of (%s)', $option, implode(', ', array_keys(static::$availableOptions)))); + } + + $pos = array_search(static::$availableOptions[$option], $this->options); + if (false !== $pos) { + unset($this->options[$pos]); + } + } + + /** + * 批量设置字体格式 + * @param array $options + */ + public function setOptions(array $options) + { + $this->options = []; + + foreach ($options as $option) { + $this->setOption($option); + } + } + + /** + * 应用样式到文字 + * @param string $text 文字 + * @return string + */ + public function apply($text) + { + $setCodes = []; + $unsetCodes = []; + + if (null !== $this->foreground) { + $setCodes[] = $this->foreground['set']; + $unsetCodes[] = $this->foreground['unset']; + } + if (null !== $this->background) { + $setCodes[] = $this->background['set']; + $unsetCodes[] = $this->background['unset']; + } + if (count($this->options)) { + foreach ($this->options as $option) { + $setCodes[] = $option['set']; + $unsetCodes[] = $option['unset']; + } + } + + if (0 === count($setCodes)) { + return $text; + } + + return sprintf("\033[%sm%s\033[%sm", implode(';', $setCodes), $text, implode(';', $unsetCodes)); + } +} diff --git a/thinkphp/library/think/console/output/question/Choice.php b/thinkphp/library/think/console/output/question/Choice.php new file mode 100755 index 0000000..cdc3b4e --- /dev/null +++ b/thinkphp/library/think/console/output/question/Choice.php @@ -0,0 +1,163 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output\question; + +use think\console\output\Question; + +class Choice extends Question +{ + + private $choices; + private $multiselect = false; + private $prompt = ' > '; + private $errorMessage = 'Value "%s" is invalid'; + + /** + * 构造方法 + * @param string $question 问题 + * @param array $choices 选项 + * @param mixed $default 默认答案 + */ + public function __construct($question, array $choices, $default = null) + { + parent::__construct($question, $default); + + $this->choices = $choices; + $this->setValidator($this->getDefaultValidator()); + $this->setAutocompleterValues($choices); + } + + /** + * 可选项 + * @return array + */ + public function getChoices() + { + return $this->choices; + } + + /** + * 设置可否多选 + * @param bool $multiselect + * @return self + */ + public function setMultiselect($multiselect) + { + $this->multiselect = $multiselect; + $this->setValidator($this->getDefaultValidator()); + + return $this; + } + + public function isMultiselect() + { + return $this->multiselect; + } + + /** + * 获取提示 + * @return string + */ + public function getPrompt() + { + return $this->prompt; + } + + /** + * 设置提示 + * @param string $prompt + * @return self + */ + public function setPrompt($prompt) + { + $this->prompt = $prompt; + + return $this; + } + + /** + * 设置错误提示信息 + * @param string $errorMessage + * @return self + */ + public function setErrorMessage($errorMessage) + { + $this->errorMessage = $errorMessage; + $this->setValidator($this->getDefaultValidator()); + + return $this; + } + + /** + * 获取默认的验证方法 + * @return callable + */ + private function getDefaultValidator() + { + $choices = $this->choices; + $errorMessage = $this->errorMessage; + $multiselect = $this->multiselect; + $isAssoc = $this->isAssoc($choices); + + return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { + // Collapse all spaces. + $selectedChoices = str_replace(' ', '', $selected); + + if ($multiselect) { + // Check for a separated comma values + if (!preg_match('/^[a-zA-Z0-9_-]+(?:,[a-zA-Z0-9_-]+)*$/', $selectedChoices, $matches)) { + throw new \InvalidArgumentException(sprintf($errorMessage, $selected)); + } + $selectedChoices = explode(',', $selectedChoices); + } else { + $selectedChoices = [$selected]; + } + + $multiselectChoices = []; + foreach ($selectedChoices as $value) { + $results = []; + foreach ($choices as $key => $choice) { + if ($choice === $value) { + $results[] = $key; + } + } + + if (count($results) > 1) { + throw new \InvalidArgumentException(sprintf('The provided answer is ambiguous. Value should be one of %s.', implode(' or ', $results))); + } + + $result = array_search($value, $choices); + + if (!$isAssoc) { + if (!empty($result)) { + $result = $choices[$result]; + } elseif (isset($choices[$value])) { + $result = $choices[$value]; + } + } elseif (empty($result) && array_key_exists($value, $choices)) { + $result = $value; + } + + if (false === $result) { + throw new \InvalidArgumentException(sprintf($errorMessage, $value)); + } + array_push($multiselectChoices, $result); + } + + if ($multiselect) { + return $multiselectChoices; + } + + return current($multiselectChoices); + }; + } +} diff --git a/thinkphp/library/think/console/output/question/Confirmation.php b/thinkphp/library/think/console/output/question/Confirmation.php new file mode 100755 index 0000000..6598f9b --- /dev/null +++ b/thinkphp/library/think/console/output/question/Confirmation.php @@ -0,0 +1,57 @@ + +// +---------------------------------------------------------------------- + +namespace think\console\output\question; + +use think\console\output\Question; + +class Confirmation extends Question +{ + + private $trueAnswerRegex; + + /** + * 构造方法 + * @param string $question 问题 + * @param bool $default 默认答案 + * @param string $trueAnswerRegex 验证正则 + */ + public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i') + { + parent::__construct($question, (bool) $default); + + $this->trueAnswerRegex = $trueAnswerRegex; + $this->setNormalizer($this->getDefaultNormalizer()); + } + + /** + * 获取默认的答案回调 + * @return callable + */ + private function getDefaultNormalizer() + { + $default = $this->getDefault(); + $regex = $this->trueAnswerRegex; + + return function ($answer) use ($default, $regex) { + if (is_bool($answer)) { + return $answer; + } + + $answerIsTrue = (bool) preg_match($regex, $answer); + if (false === $default) { + return $answer && $answerIsTrue; + } + + return !$answer || $answerIsTrue; + }; + } +} diff --git a/thinkphp/library/think/db/Builder.php b/thinkphp/library/think/db/Builder.php new file mode 100755 index 0000000..09df1a0 --- /dev/null +++ b/thinkphp/library/think/db/Builder.php @@ -0,0 +1,1172 @@ + +// +---------------------------------------------------------------------- + +namespace think\db; + +use PDO; +use think\Exception; + +abstract class Builder +{ + // connection对象实例 + protected $connection; + + // 查询表达式映射 + protected $exp = ['EQ' => '=', 'NEQ' => '<>', 'GT' => '>', 'EGT' => '>=', 'LT' => '<', 'ELT' => '<=', 'NOTLIKE' => 'NOT LIKE', 'NOTIN' => 'NOT IN', 'NOTBETWEEN' => 'NOT BETWEEN', 'NOTEXISTS' => 'NOT EXISTS', 'NOTNULL' => 'NOT NULL', 'NOTBETWEEN TIME' => 'NOT BETWEEN TIME']; + + // 查询表达式解析 + protected $parser = [ + 'parseCompare' => ['=', '<>', '>', '>=', '<', '<='], + 'parseLike' => ['LIKE', 'NOT LIKE'], + 'parseBetween' => ['NOT BETWEEN', 'BETWEEN'], + 'parseIn' => ['NOT IN', 'IN'], + 'parseExp' => ['EXP'], + 'parseNull' => ['NOT NULL', 'NULL'], + 'parseBetweenTime' => ['BETWEEN TIME', 'NOT BETWEEN TIME'], + 'parseTime' => ['< TIME', '> TIME', '<= TIME', '>= TIME'], + 'parseExists' => ['NOT EXISTS', 'EXISTS'], + 'parseColumn' => ['COLUMN'], + ]; + + // SQL表达式 + protected $selectSql = 'SELECT%DISTINCT% %FIELD% FROM %TABLE%%FORCE%%JOIN%%WHERE%%GROUP%%HAVING%%UNION%%ORDER%%LIMIT% %LOCK%%COMMENT%'; + + protected $insertSql = '%INSERT% INTO %TABLE% (%FIELD%) VALUES (%DATA%) %COMMENT%'; + + protected $insertAllSql = '%INSERT% INTO %TABLE% (%FIELD%) %DATA% %COMMENT%'; + + protected $updateSql = 'UPDATE %TABLE% SET %SET%%JOIN%%WHERE%%ORDER%%LIMIT% %LOCK%%COMMENT%'; + + protected $deleteSql = 'DELETE FROM %TABLE%%USING%%JOIN%%WHERE%%ORDER%%LIMIT% %LOCK%%COMMENT%'; + + /** + * 架构函数 + * @access public + * @param Connection $connection 数据库连接对象实例 + */ + public function __construct(Connection $connection) + { + $this->connection = $connection; + } + + /** + * 获取当前的连接对象实例 + * @access public + * @return Connection + */ + public function getConnection() + { + return $this->connection; + } + + /** + * 注册查询表达式解析 + * @access public + * @param string $name 解析方法 + * @param array $parser 匹配表达式数据 + * @return $this + */ + public function bindParser($name, $parser) + { + $this->parser[$name] = $parser; + return $this; + } + + /** + * 数据分析 + * @access protected + * @param Query $query 查询对象 + * @param array $data 数据 + * @param array $fields 字段信息 + * @param array $bind 参数绑定 + * @return array + */ + protected function parseData(Query $query, $data = [], $fields = [], $bind = []) + { + if (empty($data)) { + return []; + } + + $options = $query->getOptions(); + + // 获取绑定信息 + if (empty($bind)) { + $bind = $this->connection->getFieldsBind($options['table']); + } + + if (empty($fields)) { + if ('*' == $options['field']) { + $fields = array_keys($bind); + } else { + $fields = $options['field']; + } + } + + $result = []; + + foreach ($data as $key => $val) { + if ('*' != $options['field'] && !in_array($key, $fields, true)) { + continue; + } + + $item = $this->parseKey($query, $key, true); + + if ($val instanceof Expression) { + $result[$item] = $val->getValue(); + continue; + } elseif (!is_scalar($val) && (in_array($key, (array) $query->getOptions('json')) || 'json' == $this->connection->getFieldsType($options['table'], $key))) { + $val = json_encode($val, JSON_UNESCAPED_UNICODE); + } elseif (is_object($val) && method_exists($val, '__toString')) { + // 对象数据写入 + $val = $val->__toString(); + } + + if (false !== strpos($key, '->')) { + list($key, $name) = explode('->', $key); + $item = $this->parseKey($query, $key); + $result[$item] = 'json_set(' . $item . ', \'$.' . $name . '\', ' . $this->parseDataBind($query, $key, $val, $bind) . ')'; + } elseif ('*' == $options['field'] && false === strpos($key, '.') && !in_array($key, $fields, true)) { + if ($options['strict']) { + throw new Exception('fields not exists:[' . $key . ']'); + } + } elseif (is_null($val)) { + $result[$item] = 'NULL'; + } elseif (is_array($val) && !empty($val)) { + switch (strtoupper($val[0])) { + case 'INC': + $result[$item] = $item . ' + ' . floatval($val[1]); + break; + case 'DEC': + $result[$item] = $item . ' - ' . floatval($val[1]); + break; + case 'EXP': + throw new Exception('not support data:[' . $val[0] . ']'); + } + } elseif (is_scalar($val)) { + // 过滤非标量数据 + $result[$item] = $this->parseDataBind($query, $key, $val, $bind); + } + } + + return $result; + } + + /** + * 数据绑定处理 + * @access protected + * @param Query $query 查询对象 + * @param string $key 字段名 + * @param mixed $data 数据 + * @param array $bind 绑定数据 + * @return string + */ + protected function parseDataBind(Query $query, $key, $data, $bind = []) + { + if ($data instanceof Expression) { + return $data->getValue(); + } + + $name = $query->bind($data, isset($bind[$key]) ? $bind[$key] : PDO::PARAM_STR); + + return ':' . $name; + } + + /** + * 字段名分析 + * @access public + * @param Query $query 查询对象 + * @param mixed $key 字段名 + * @param bool $strict 严格检测 + * @return string + */ + public function parseKey(Query $query, $key, $strict = false) + { + return $key instanceof Expression ? $key->getValue() : $key; + } + + /** + * field分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $fields 字段名 + * @return string + */ + protected function parseField(Query $query, $fields) + { + if ('*' == $fields || empty($fields)) { + $fieldsStr = '*'; + } elseif (is_array($fields)) { + // 支持 'field1'=>'field2' 这样的字段别名定义 + $array = []; + + foreach ($fields as $key => $field) { + if (!is_numeric($key)) { + $array[] = $this->parseKey($query, $key) . ' AS ' . $this->parseKey($query, $field, true); + } else { + $array[] = $this->parseKey($query, $field); + } + } + + $fieldsStr = implode(',', $array); + } + + return $fieldsStr; + } + + /** + * table分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $tables 表名 + * @return string + */ + protected function parseTable(Query $query, $tables) + { + $item = []; + $options = $query->getOptions(); + + foreach ((array) $tables as $key => $table) { + if (!is_numeric($key)) { + $key = $this->connection->parseSqlTable($key); + $item[] = $this->parseKey($query, $key) . ' ' . $this->parseKey($query, $table); + } else { + $table = $this->connection->parseSqlTable($table); + + if (isset($options['alias'][$table])) { + $item[] = $this->parseKey($query, $table) . ' ' . $this->parseKey($query, $options['alias'][$table]); + } else { + $item[] = $this->parseKey($query, $table); + } + } + } + + return implode(',', $item); + } + + /** + * where分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $where 查询条件 + * @return string + */ + protected function parseWhere(Query $query, $where) + { + $options = $query->getOptions(); + $whereStr = $this->buildWhere($query, $where); + + if (!empty($options['soft_delete'])) { + // 附加软删除条件 + list($field, $condition) = $options['soft_delete']; + + $binds = $this->connection->getFieldsBind($options['table']); + $whereStr = $whereStr ? '( ' . $whereStr . ' ) AND ' : ''; + $whereStr = $whereStr . $this->parseWhereItem($query, $field, $condition, '', $binds); + } + + return empty($whereStr) ? '' : ' WHERE ' . $whereStr; + } + + /** + * 生成查询条件SQL + * @access public + * @param Query $query 查询对象 + * @param mixed $where 查询条件 + * @return string + */ + public function buildWhere(Query $query, $where) + { + if (empty($where)) { + $where = []; + } + + $whereStr = ''; + $binds = $this->connection->getFieldsBind($query->getOptions('table')); + + foreach ($where as $logic => $val) { + $str = []; + + foreach ($val as $value) { + if ($value instanceof Expression) { + $str[] = ' ' . $logic . ' ( ' . $value->getValue() . ' )'; + continue; + } + + if (is_array($value)) { + if (key($value) !== 0) { + throw new Exception('where express error:' . var_export($value, true)); + } + $field = array_shift($value); + } elseif (!($value instanceof \Closure)) { + throw new Exception('where express error:' . var_export($value, true)); + } + + if ($value instanceof \Closure) { + // 使用闭包查询 + $newQuery = $query->newQuery()->setConnection($this->connection); + $value($newQuery); + $whereClause = $this->buildWhere($query, $newQuery->getOptions('where')); + + if (!empty($whereClause)) { + $str[] = ' ' . $logic . ' ( ' . $whereClause . ' )'; + } + } elseif (is_array($field)) { + array_unshift($value, $field); + $str2 = []; + foreach ($value as $item) { + $str2[] = $this->parseWhereItem($query, array_shift($item), $item, $logic, $binds); + } + + $str[] = ' ' . $logic . ' ( ' . implode(' AND ', $str2) . ' )'; + } elseif (strpos($field, '|')) { + // 不同字段使用相同查询条件(OR) + $array = explode('|', $field); + $item = []; + + foreach ($array as $k) { + $item[] = $this->parseWhereItem($query, $k, $value, '', $binds); + } + + $str[] = ' ' . $logic . ' ( ' . implode(' OR ', $item) . ' )'; + } elseif (strpos($field, '&')) { + // 不同字段使用相同查询条件(AND) + $array = explode('&', $field); + $item = []; + + foreach ($array as $k) { + $item[] = $this->parseWhereItem($query, $k, $value, '', $binds); + } + + $str[] = ' ' . $logic . ' ( ' . implode(' AND ', $item) . ' )'; + } else { + // 对字段使用表达式查询 + $field = is_string($field) ? $field : ''; + $str[] = ' ' . $logic . ' ' . $this->parseWhereItem($query, $field, $value, $logic, $binds); + } + } + + $whereStr .= empty($whereStr) ? substr(implode(' ', $str), strlen($logic) + 1) : implode(' ', $str); + } + + return $whereStr; + } + + // where子单元分析 + protected function parseWhereItem(Query $query, $field, $val, $rule = '', $binds = []) + { + // 字段分析 + $key = $field ? $this->parseKey($query, $field, true) : ''; + + // 查询规则和条件 + if (!is_array($val)) { + $val = is_null($val) ? ['NULL', ''] : ['=', $val]; + } + + list($exp, $value) = $val; + + // 对一个字段使用多个查询条件 + if (is_array($exp)) { + $item = array_pop($val); + + // 传入 or 或者 and + if (is_string($item) && in_array($item, ['AND', 'and', 'OR', 'or'])) { + $rule = $item; + } else { + array_push($val, $item); + } + + foreach ($val as $k => $item) { + $str[] = $this->parseWhereItem($query, $field, $item, $rule, $binds); + } + + return '( ' . implode(' ' . $rule . ' ', $str) . ' )'; + } + + // 检测操作符 + $exp = strtoupper($exp); + if (isset($this->exp[$exp])) { + $exp = $this->exp[$exp]; + } + + if ($value instanceof Expression) { + + } elseif (is_object($value) && method_exists($value, '__toString')) { + // 对象数据写入 + $value = $value->__toString(); + } + + if (strpos($field, '->')) { + $jsonType = $query->getJsonFieldType($field); + $bindType = $this->connection->getFieldBindType($jsonType); + } else { + $bindType = isset($binds[$field]) && 'LIKE' != $exp ? $binds[$field] : PDO::PARAM_STR; + } + + if (is_scalar($value) && !in_array($exp, ['EXP', 'NOT NULL', 'NULL', 'IN', 'NOT IN', 'BETWEEN', 'NOT BETWEEN']) && strpos($exp, 'TIME') === false) { + if (0 === strpos($value, ':') && $query->isBind(substr($value, 1))) { + } else { + $name = $query->bind($value, $bindType); + $value = ':' . $name; + } + } + + // 解析查询表达式 + foreach ($this->parser as $fun => $parse) { + if (in_array($exp, $parse)) { + $whereStr = $this->$fun($query, $key, $exp, $value, $field, $bindType, isset($val[2]) ? $val[2] : 'AND'); + break; + } + } + + if (!isset($whereStr)) { + throw new Exception('where express error:' . $exp); + } + + return $whereStr; + } + + /** + * 模糊查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param mixed $value + * @param string $field + * @param integer $bindType + * @param string $logic + * @return string + */ + protected function parseLike(Query $query, $key, $exp, $value, $field, $bindType, $logic) + { + // 模糊匹配 + if (is_array($value)) { + foreach ($value as $item) { + $name = $query->bind($item, PDO::PARAM_STR); + $array[] = $key . ' ' . $exp . ' :' . $name; + } + + $whereStr = '(' . implode(' ' . strtoupper($logic) . ' ', $array) . ')'; + } else { + $whereStr = $key . ' ' . $exp . ' ' . $value; + } + + return $whereStr; + } + + /** + * 表达式查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param array $value + * @param string $field + * @param integer $bindType + * @return string + */ + protected function parseColumn(Query $query, $key, $exp, array $value, $field, $bindType) + { + // 字段比较查询 + list($op, $field2) = $value; + + if (!in_array($op, ['=', '<>', '>', '>=', '<', '<='])) { + throw new Exception('where express error:' . var_export($value, true)); + } + + return '( ' . $key . ' ' . $op . ' ' . $this->parseKey($query, $field2, true) . ' )'; + } + + /** + * 表达式查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param Expression $value + * @param string $field + * @param integer $bindType + * @return string + */ + protected function parseExp(Query $query, $key, $exp, Expression $value, $field, $bindType) + { + // 表达式查询 + return '( ' . $key . ' ' . $value->getValue() . ' )'; + } + + /** + * Null查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param mixed $value + * @param string $field + * @param integer $bindType + * @return string + */ + protected function parseNull(Query $query, $key, $exp, $value, $field, $bindType) + { + // NULL 查询 + return $key . ' IS ' . $exp; + } + + /** + * 范围查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param mixed $value + * @param string $field + * @param integer $bindType + * @return string + */ + protected function parseBetween(Query $query, $key, $exp, $value, $field, $bindType) + { + // BETWEEN 查询 + $data = is_array($value) ? $value : explode(',', $value); + + $min = $query->bind($data[0], $bindType); + $max = $query->bind($data[1], $bindType); + + return $key . ' ' . $exp . ' :' . $min . ' AND :' . $max . ' '; + } + + /** + * Exists查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param mixed $value + * @param string $field + * @param integer $bindType + * @return string + */ + protected function parseExists(Query $query, $key, $exp, $value, $field, $bindType) + { + // EXISTS 查询 + if ($value instanceof \Closure) { + $value = $this->parseClosure($query, $value, false); + } elseif ($value instanceof Expression) { + $value = $value->getValue(); + } else { + throw new Exception('where express error:' . $value); + } + + return $exp . ' (' . $value . ')'; + } + + /** + * 时间比较查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param mixed $value + * @param string $field + * @param integer $bindType + * @return string + */ + protected function parseTime(Query $query, $key, $exp, $value, $field, $bindType) + { + return $key . ' ' . substr($exp, 0, 2) . ' ' . $this->parseDateTime($query, $value, $field, $bindType); + } + + /** + * 大小比较查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param mixed $value + * @param string $field + * @param integer $bindType + * @return string + */ + protected function parseCompare(Query $query, $key, $exp, $value, $field, $bindType) + { + if (is_array($value)) { + throw new Exception('where express error:' . $exp . var_export($value, true)); + } + + // 比较运算 + if ($value instanceof \Closure) { + $value = $this->parseClosure($query, $value); + } + + if ('=' == $exp && is_null($value)) { + return $key . ' IS NULL'; + } + + return $key . ' ' . $exp . ' ' . $value; + } + + /** + * 时间范围查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param mixed $value + * @param string $field + * @param integer $bindType + * @return string + */ + protected function parseBetweenTime(Query $query, $key, $exp, $value, $field, $bindType) + { + if (is_string($value)) { + $value = explode(',', $value); + } + + return $key . ' ' . substr($exp, 0, -4) + . $this->parseDateTime($query, $value[0], $field, $bindType) + . ' AND ' + . $this->parseDateTime($query, $value[1], $field, $bindType); + + } + + /** + * IN查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param mixed $value + * @param string $field + * @param integer $bindType + * @return string + */ + protected function parseIn(Query $query, $key, $exp, $value, $field, $bindType) + { + // IN 查询 + if ($value instanceof \Closure) { + $value = $this->parseClosure($query, $value, false); + } elseif ($value instanceof Expression) { + $value = $value->getValue(); + } else { + $value = array_unique(is_array($value) ? $value : explode(',', $value)); + $array = []; + + foreach ($value as $k => $v) { + $name = $query->bind($v, $bindType); + $array[] = ':' . $name; + } + + if (count($array) == 1) { + return $key . ('IN' == $exp ? ' = ' : ' <> ') . $array[0]; + } else { + $zone = implode(',', $array); + $value = empty($zone) ? "''" : $zone; + } + } + + return $key . ' ' . $exp . ' (' . $value . ')'; + } + + /** + * 闭包子查询 + * @access protected + * @param Query $query 查询对象 + * @param \Closure $call + * @param bool $show + * @return string + */ + protected function parseClosure(Query $query, $call, $show = true) + { + $newQuery = $query->newQuery()->setConnection($this->connection); + $call($newQuery); + + return $newQuery->buildSql($show); + } + + /** + * 日期时间条件解析 + * @access protected + * @param Query $query 查询对象 + * @param string $value + * @param string $key + * @param integer $bindType + * @return string + */ + protected function parseDateTime(Query $query, $value, $key, $bindType = null) + { + $options = $query->getOptions(); + + // 获取时间字段类型 + if (strpos($key, '.')) { + list($table, $key) = explode('.', $key); + + if (isset($options['alias']) && $pos = array_search($table, $options['alias'])) { + $table = $pos; + } + } else { + $table = $options['table']; + } + + $type = $this->connection->getTableInfo($table, 'type'); + + if (isset($type[$key])) { + $info = $type[$key]; + } + + if (isset($info)) { + if (is_string($value)) { + $value = strtotime($value) ?: $value; + } + + if (preg_match('/(datetime|timestamp)/is', $info)) { + // 日期及时间戳类型 + $value = date('Y-m-d H:i:s', $value); + } elseif (preg_match('/(date)/is', $info)) { + // 日期及时间戳类型 + $value = date('Y-m-d', $value); + } + } + + $name = $query->bind($value, $bindType); + + return ':' . $name; + } + + /** + * limit分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $limit + * @return string + */ + protected function parseLimit(Query $query, $limit) + { + return (!empty($limit) && false === strpos($limit, '(')) ? ' LIMIT ' . $limit . ' ' : ''; + } + + /** + * join分析 + * @access protected + * @param Query $query 查询对象 + * @param array $join + * @return string + */ + protected function parseJoin(Query $query, $join) + { + $joinStr = ''; + + if (!empty($join)) { + foreach ($join as $item) { + list($table, $type, $on) = $item; + + $condition = []; + + foreach ((array) $on as $val) { + if ($val instanceof Expression) { + $condition[] = $val->getValue(); + } elseif (strpos($val, '=')) { + list($val1, $val2) = explode('=', $val, 2); + + $condition[] = $this->parseKey($query, $val1) . '=' . $this->parseKey($query, $val2); + } else { + $condition[] = $val; + } + } + + $table = $this->parseTable($query, $table); + + $joinStr .= ' ' . $type . ' JOIN ' . $table . ' ON ' . implode(' AND ', $condition); + } + } + + return $joinStr; + } + + /** + * order分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $order + * @return string + */ + protected function parseOrder(Query $query, $order) + { + foreach ($order as $key => $val) { + if ($val instanceof Expression) { + $array[] = $val->getValue(); + } elseif (is_array($val) && preg_match('/^[\w\.]+$/', $key)) { + $array[] = $this->parseOrderField($query, $key, $val); + } elseif ('[rand]' == $val) { + $array[] = $this->parseRand($query); + } elseif (is_string($val)) { + if (is_numeric($key)) { + list($key, $sort) = explode(' ', strpos($val, ' ') ? $val : $val . ' '); + } else { + $sort = $val; + } + + if (preg_match('/^[\w\.]+$/', $key)) { + $sort = strtoupper($sort); + $sort = in_array($sort, ['ASC', 'DESC'], true) ? ' ' . $sort : ''; + $array[] = $this->parseKey($query, $key, true) . $sort; + } else { + throw new Exception('order express error:' . $key); + } + } + } + + return empty($array) ? '' : ' ORDER BY ' . implode(',', $array); + } + + /** + * orderField分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $key + * @param array $val + * @return string + */ + protected function parseOrderField($query, $key, $val) + { + if (isset($val['sort'])) { + $sort = $val['sort']; + unset($val['sort']); + } else { + $sort = ''; + } + + $sort = strtoupper($sort); + $sort = in_array($sort, ['ASC', 'DESC'], true) ? ' ' . $sort : ''; + + $options = $query->getOptions(); + $bind = $this->connection->getFieldsBind($options['table']); + + foreach ($val as $k => $item) { + $val[$k] = $this->parseDataBind($query, $key, $item, $bind); + } + + return 'field(' . $this->parseKey($query, $key, true) . ',' . implode(',', $val) . ')' . $sort; + } + + /** + * group分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $group + * @return string + */ + protected function parseGroup(Query $query, $group) + { + if (empty($group)) { + return ''; + } + + if (is_string($group)) { + $group = explode(',', $group); + } + + foreach ($group as $key) { + $val[] = $this->parseKey($query, $key); + } + + return ' GROUP BY ' . implode(',', $val); + } + + /** + * having分析 + * @access protected + * @param Query $query 查询对象 + * @param string $having + * @return string + */ + protected function parseHaving(Query $query, $having) + { + return !empty($having) ? ' HAVING ' . $having : ''; + } + + /** + * comment分析 + * @access protected + * @param Query $query 查询对象 + * @param string $comment + * @return string + */ + protected function parseComment(Query $query, $comment) + { + if (false !== strpos($comment, '*/')) { + $comment = strstr($comment, '*/', true); + } + + return !empty($comment) ? ' /* ' . $comment . ' */' : ''; + } + + /** + * distinct分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $distinct + * @return string + */ + protected function parseDistinct(Query $query, $distinct) + { + return !empty($distinct) ? ' DISTINCT ' : ''; + } + + /** + * union分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $union + * @return string + */ + protected function parseUnion(Query $query, $union) + { + if (empty($union)) { + return ''; + } + + $type = $union['type']; + unset($union['type']); + + foreach ($union as $u) { + if ($u instanceof \Closure) { + $sql[] = $type . ' ' . $this->parseClosure($query, $u); + } elseif (is_string($u)) { + $sql[] = $type . ' ( ' . $this->connection->parseSqlTable($u) . ' )'; + } + } + + return ' ' . implode(' ', $sql); + } + + /** + * index分析,可在操作链中指定需要强制使用的索引 + * @access protected + * @param Query $query 查询对象 + * @param mixed $index + * @return string + */ + protected function parseForce(Query $query, $index) + { + if (empty($index)) { + return ''; + } + + return sprintf(" FORCE INDEX ( %s ) ", is_array($index) ? implode(',', $index) : $index); + } + + /** + * 设置锁机制 + * @access protected + * @param Query $query 查询对象 + * @param bool|string $lock + * @return string + */ + protected function parseLock(Query $query, $lock = false) + { + if (is_bool($lock)) { + return $lock ? ' FOR UPDATE ' : ''; + } elseif (is_string($lock) && !empty($lock)) { + return ' ' . trim($lock) . ' '; + } + } + + /** + * 生成查询SQL + * @access public + * @param Query $query 查询对象 + * @return string + */ + public function select(Query $query) + { + $options = $query->getOptions(); + + return str_replace( + ['%TABLE%', '%DISTINCT%', '%FIELD%', '%JOIN%', '%WHERE%', '%GROUP%', '%HAVING%', '%ORDER%', '%LIMIT%', '%UNION%', '%LOCK%', '%COMMENT%', '%FORCE%'], + [ + $this->parseTable($query, $options['table']), + $this->parseDistinct($query, $options['distinct']), + $this->parseField($query, $options['field']), + $this->parseJoin($query, $options['join']), + $this->parseWhere($query, $options['where']), + $this->parseGroup($query, $options['group']), + $this->parseHaving($query, $options['having']), + $this->parseOrder($query, $options['order']), + $this->parseLimit($query, $options['limit']), + $this->parseUnion($query, $options['union']), + $this->parseLock($query, $options['lock']), + $this->parseComment($query, $options['comment']), + $this->parseForce($query, $options['force']), + ], + $this->selectSql); + } + + /** + * 生成Insert SQL + * @access public + * @param Query $query 查询对象 + * @param bool $replace 是否replace + * @return string + */ + public function insert(Query $query, $replace = false) + { + $options = $query->getOptions(); + + // 分析并处理数据 + $data = $this->parseData($query, $options['data']); + if (empty($data)) { + return ''; + } + + $fields = array_keys($data); + $values = array_values($data); + + return str_replace( + ['%INSERT%', '%TABLE%', '%FIELD%', '%DATA%', '%COMMENT%'], + [ + $replace ? 'REPLACE' : 'INSERT', + $this->parseTable($query, $options['table']), + implode(' , ', $fields), + implode(' , ', $values), + $this->parseComment($query, $options['comment']), + ], + $this->insertSql); + } + + /** + * 生成insertall SQL + * @access public + * @param Query $query 查询对象 + * @param array $dataSet 数据集 + * @param bool $replace 是否replace + * @return string + */ + public function insertAll(Query $query, $dataSet, $replace = false) + { + $options = $query->getOptions(); + + // 获取合法的字段 + if ('*' == $options['field']) { + $allowFields = $this->connection->getTableFields($options['table']); + } else { + $allowFields = $options['field']; + } + + // 获取绑定信息 + $bind = $this->connection->getFieldsBind($options['table']); + + foreach ($dataSet as $data) { + $data = $this->parseData($query, $data, $allowFields, $bind); + + $values[] = 'SELECT ' . implode(',', array_values($data)); + + if (!isset($insertFields)) { + $insertFields = array_keys($data); + } + } + + $fields = []; + + foreach ($insertFields as $field) { + $fields[] = $this->parseKey($query, $field); + } + + return str_replace( + ['%INSERT%', '%TABLE%', '%FIELD%', '%DATA%', '%COMMENT%'], + [ + $replace ? 'REPLACE' : 'INSERT', + $this->parseTable($query, $options['table']), + implode(' , ', $fields), + implode(' UNION ALL ', $values), + $this->parseComment($query, $options['comment']), + ], + $this->insertAllSql); + } + + /** + * 生成slect insert SQL + * @access public + * @param Query $query 查询对象 + * @param array $fields 数据 + * @param string $table 数据表 + * @return string + */ + public function selectInsert(Query $query, $fields, $table) + { + if (is_string($fields)) { + $fields = explode(',', $fields); + } + + foreach ($fields as &$field) { + $field = $this->parseKey($query, $field, true); + } + + return 'INSERT INTO ' . $this->parseTable($query, $table) . ' (' . implode(',', $fields) . ') ' . $this->select($query); + } + + /** + * 生成update SQL + * @access public + * @param Query $query 查询对象 + * @return string + */ + public function update(Query $query) + { + $options = $query->getOptions(); + + $data = $this->parseData($query, $options['data']); + + if (empty($data)) { + return ''; + } + + foreach ($data as $key => $val) { + $set[] = $key . ' = ' . $val; + } + + return str_replace( + ['%TABLE%', '%SET%', '%JOIN%', '%WHERE%', '%ORDER%', '%LIMIT%', '%LOCK%', '%COMMENT%'], + [ + $this->parseTable($query, $options['table']), + implode(' , ', $set), + $this->parseJoin($query, $options['join']), + $this->parseWhere($query, $options['where']), + $this->parseOrder($query, $options['order']), + $this->parseLimit($query, $options['limit']), + $this->parseLock($query, $options['lock']), + $this->parseComment($query, $options['comment']), + ], + $this->updateSql); + } + + /** + * 生成delete SQL + * @access public + * @param Query $query 查询对象 + * @return string + */ + public function delete(Query $query) + { + $options = $query->getOptions(); + + return str_replace( + ['%TABLE%', '%USING%', '%JOIN%', '%WHERE%', '%ORDER%', '%LIMIT%', '%LOCK%', '%COMMENT%'], + [ + $this->parseTable($query, $options['table']), + !empty($options['using']) ? ' USING ' . $this->parseTable($query, $options['using']) . ' ' : '', + $this->parseJoin($query, $options['join']), + $this->parseWhere($query, $options['where']), + $this->parseOrder($query, $options['order']), + $this->parseLimit($query, $options['limit']), + $this->parseLock($query, $options['lock']), + $this->parseComment($query, $options['comment']), + ], + $this->deleteSql); + } +} diff --git a/thinkphp/library/think/db/Connection.php b/thinkphp/library/think/db/Connection.php new file mode 100755 index 0000000..18b4885 --- /dev/null +++ b/thinkphp/library/think/db/Connection.php @@ -0,0 +1,2152 @@ + +// +---------------------------------------------------------------------- + +namespace think\db; + +use InvalidArgumentException; +use PDO; +use PDOStatement; +use think\Container; +use think\Db; +use think\db\exception\BindParamException; +use think\Debug; +use think\Exception; +use think\exception\PDOException; +use think\Loader; + +abstract class Connection +{ + const PARAM_FLOAT = 21; + protected static $instance = []; + /** @var PDOStatement PDO操作实例 */ + protected $PDOStatement; + + /** @var string 当前SQL指令 */ + protected $queryStr = ''; + // 返回或者影响记录数 + protected $numRows = 0; + // 事务指令数 + protected $transTimes = 0; + // 错误信息 + protected $error = ''; + + /** @var PDO[] 数据库连接ID 支持多个连接 */ + protected $links = []; + + /** @var PDO 当前连接ID */ + protected $linkID; + protected $linkRead; + protected $linkWrite; + + // 查询结果类型 + protected $fetchType = PDO::FETCH_ASSOC; + // 字段属性大小写 + protected $attrCase = PDO::CASE_LOWER; + // 监听回调 + protected static $event = []; + + // 数据表信息 + protected static $info = []; + + // 使用Builder类 + protected $builderClassName; + // Builder对象 + protected $builder; + // 数据库连接参数配置 + protected $config = [ + // 数据库类型 + 'type' => '', + // 服务器地址 + 'hostname' => '', + // 数据库名 + 'database' => '', + // 用户名 + 'username' => '', + // 密码 + 'password' => '', + // 端口 + 'hostport' => '', + // 连接dsn + 'dsn' => '', + // 数据库连接参数 + 'params' => [], + // 数据库编码默认采用utf8 + 'charset' => 'utf8', + // 数据库表前缀 + 'prefix' => '', + // 数据库调试模式 + 'debug' => false, + // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) + 'deploy' => 0, + // 数据库读写是否分离 主从式有效 + 'rw_separate' => false, + // 读写分离后 主服务器数量 + 'master_num' => 1, + // 指定从服务器序号 + 'slave_no' => '', + // 模型写入后自动读取主服务器 + 'read_master' => false, + // 是否严格检查字段是否存在 + 'fields_strict' => true, + // 数据集返回类型 + 'resultset_type' => '', + // 自动写入时间戳字段 + 'auto_timestamp' => false, + // 时间字段取出后的默认时间格式 + 'datetime_format' => 'Y-m-d H:i:s', + // 是否需要进行SQL性能分析 + 'sql_explain' => false, + // Builder类 + 'builder' => '', + // Query类 + 'query' => '\\think\\db\\Query', + // 是否需要断线重连 + 'break_reconnect' => false, + // 断线标识字符串 + 'break_match_str' => [], + ]; + + // PDO连接参数 + protected $params = [ + PDO::ATTR_CASE => PDO::CASE_NATURAL, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, + PDO::ATTR_STRINGIFY_FETCHES => false, + PDO::ATTR_EMULATE_PREPARES => false, + ]; + + // 服务器断线标识字符 + protected $breakMatchStr = [ + 'server has gone away', + 'no connection to the server', + 'Lost connection', + 'is dead or not enabled', + 'Error while sending', + 'decryption failed or bad record mac', + 'server closed the connection unexpectedly', + 'SSL connection has been closed unexpectedly', + 'Error writing data to the connection', + 'Resource deadlock avoided', + 'failed with errno', + ]; + + // 绑定参数 + protected $bind = []; + + /** + * 架构函数 读取数据库配置信息 + * @access public + * @param array $config 数据库配置数组 + */ + public function __construct(array $config = []) + { + if (!empty($config)) { + $this->config = array_merge($this->config, $config); + } + + // 创建Builder对象 + $class = $this->getBuilderClass(); + + $this->builder = new $class($this); + + // 执行初始化操作 + $this->initialize(); + } + + /** + * 初始化 + * @access protected + * @return void + */ + protected function initialize() + {} + + /** + * 取得数据库连接类实例 + * @access public + * @param mixed $config 连接配置 + * @param bool|string $name 连接标识 true 强制重新连接 + * @return Connection + * @throws Exception + */ + public static function instance($config = [], $name = false) + { + if (false === $name) { + $name = md5(serialize($config)); + } + + if (true === $name || !isset(self::$instance[$name])) { + if (empty($config['type'])) { + throw new InvalidArgumentException('Undefined db type'); + } + + // 记录初始化信息 + Container::get('app')->log('[ DB ] INIT ' . $config['type']); + + if (true === $name) { + $name = md5(serialize($config)); + } + + self::$instance[$name] = Loader::factory($config['type'], '\\think\\db\\connector\\', $config); + } + + return self::$instance[$name]; + } + + /** + * 获取当前连接器类对应的Builder类 + * @access public + * @return string + */ + public function getBuilderClass() + { + if (!empty($this->builderClassName)) { + return $this->builderClassName; + } + + return $this->getConfig('builder') ?: '\\think\\db\\builder\\' . ucfirst($this->getConfig('type')); + } + + /** + * 设置当前的数据库Builder对象 + * @access protected + * @param Builder $builder + * @return void + */ + protected function setBuilder(Builder $builder) + { + $this->builder = $builder; + + return $this; + } + + /** + * 获取当前的builder实例对象 + * @access public + * @return Builder + */ + public function getBuilder() + { + return $this->builder; + } + + /** + * 解析pdo连接的dsn信息 + * @access protected + * @param array $config 连接信息 + * @return string + */ + abstract protected function parseDsn($config); + + /** + * 取得数据表的字段信息 + * @access public + * @param string $tableName + * @return array + */ + abstract public function getFields($tableName); + + /** + * 取得数据库的表信息 + * @access public + * @param string $dbName + * @return array + */ + abstract public function getTables($dbName); + + /** + * SQL性能分析 + * @access protected + * @param string $sql + * @return array + */ + abstract protected function getExplain($sql); + + /** + * 对返数据表字段信息进行大小写转换出来 + * @access public + * @param array $info 字段信息 + * @return array + */ + public function fieldCase($info) + { + // 字段大小写转换 + switch ($this->attrCase) { + case PDO::CASE_LOWER: + $info = array_change_key_case($info); + break; + case PDO::CASE_UPPER: + $info = array_change_key_case($info, CASE_UPPER); + break; + case PDO::CASE_NATURAL: + default: + // 不做转换 + } + + return $info; + } + + /** + * 获取字段绑定类型 + * @access public + * @param string $type 字段类型 + * @return integer + */ + public function getFieldBindType($type) + { + if (0 === strpos($type, 'set') || 0 === strpos($type, 'enum')) { + $bind = PDO::PARAM_STR; + } elseif (preg_match('/(double|float|decimal|real|numeric)/is', $type)) { + $bind = self::PARAM_FLOAT; + } elseif (preg_match('/(int|serial|bit)/is', $type)) { + $bind = PDO::PARAM_INT; + } elseif (preg_match('/bool/is', $type)) { + $bind = PDO::PARAM_BOOL; + } else { + $bind = PDO::PARAM_STR; + } + + return $bind; + } + + /** + * 将SQL语句中的__TABLE_NAME__字符串替换成带前缀的表名(小写) + * @access public + * @param string $sql sql语句 + * @return string + */ + public function parseSqlTable($sql) + { + if (false !== strpos($sql, '__')) { + $sql = preg_replace_callback("/__([A-Z0-9_-]+)__/sU", function ($match) { + return $this->getConfig('prefix') . strtolower($match[1]); + }, $sql); + } + + return $sql; + } + + /** + * 获取数据表信息 + * @access public + * @param mixed $tableName 数据表名 留空自动获取 + * @param string $fetch 获取信息类型 包括 fields type bind pk + * @return mixed + */ + public function getTableInfo($tableName, $fetch = '') + { + if (is_array($tableName)) { + $tableName = key($tableName) ?: current($tableName); + } + + if (strpos($tableName, ',')) { + // 多表不获取字段信息 + return false; + } else { + $tableName = $this->parseSqlTable($tableName); + } + + // 修正子查询作为表名的问题 + if (strpos($tableName, ')')) { + return []; + } + + list($tableName) = explode(' ', $tableName); + + if (false === strpos($tableName, '.')) { + $schema = $this->getConfig('database') . '.' . $tableName; + } else { + $schema = $tableName; + } + + if (!isset(self::$info[$schema])) { + // 读取缓存 + $cacheFile = Container::get('app')->getRuntimePath() . 'schema' . DIRECTORY_SEPARATOR . $schema . '.php'; + + if (!$this->config['debug'] && is_file($cacheFile)) { + $info = include $cacheFile; + } else { + $info = $this->getFields($tableName); + } + + $fields = array_keys($info); + $bind = $type = []; + + foreach ($info as $key => $val) { + // 记录字段类型 + $type[$key] = $val['type']; + $bind[$key] = $this->getFieldBindType($val['type']); + + if (!empty($val['primary'])) { + $pk[] = $key; + } + } + + if (isset($pk)) { + // 设置主键 + $pk = count($pk) > 1 ? $pk : $pk[0]; + } else { + $pk = null; + } + + self::$info[$schema] = ['fields' => $fields, 'type' => $type, 'bind' => $bind, 'pk' => $pk]; + } + + return $fetch ? self::$info[$schema][$fetch] : self::$info[$schema]; + } + + /** + * 获取数据表的主键 + * @access public + * @param string $tableName 数据表名 + * @return string|array + */ + public function getPk($tableName) + { + return $this->getTableInfo($tableName, 'pk'); + } + + /** + * 获取数据表字段信息 + * @access public + * @param string $tableName 数据表名 + * @return array + */ + public function getTableFields($tableName) + { + return $this->getTableInfo($tableName, 'fields'); + } + + /** + * 获取数据表字段类型 + * @access public + * @param string $tableName 数据表名 + * @param string $field 字段名 + * @return array|string + */ + public function getFieldsType($tableName, $field = null) + { + $result = $this->getTableInfo($tableName, 'type'); + + if ($field && isset($result[$field])) { + return $result[$field]; + } + + return $result; + } + + /** + * 获取数据表绑定信息 + * @access public + * @param string $tableName 数据表名 + * @return array + */ + public function getFieldsBind($tableName) + { + return $this->getTableInfo($tableName, 'bind'); + } + + /** + * 获取数据库的配置参数 + * @access public + * @param string $config 配置名称 + * @return mixed + */ + public function getConfig($config = '') + { + return $config ? $this->config[$config] : $this->config; + } + + /** + * 设置数据库的配置参数 + * @access public + * @param string|array $config 配置名称 + * @param mixed $value 配置值 + * @return void + */ + public function setConfig($config, $value = '') + { + if (is_array($config)) { + $this->config = array_merge($this->config, $config); + } else { + $this->config[$config] = $value; + } + } + + /** + * 连接数据库方法 + * @access public + * @param array $config 连接参数 + * @param integer $linkNum 连接序号 + * @param array|bool $autoConnection 是否自动连接主数据库(用于分布式) + * @return PDO + * @throws Exception + */ + public function connect(array $config = [], $linkNum = 0, $autoConnection = false) + { + if (isset($this->links[$linkNum])) { + return $this->links[$linkNum]; + } + + if (!$config) { + $config = $this->config; + } else { + $config = array_merge($this->config, $config); + } + + // 连接参数 + if (isset($config['params']) && is_array($config['params'])) { + $params = $config['params'] + $this->params; + } else { + $params = $this->params; + } + + // 记录当前字段属性大小写设置 + $this->attrCase = $params[PDO::ATTR_CASE]; + + if (!empty($config['break_match_str'])) { + $this->breakMatchStr = array_merge($this->breakMatchStr, (array) $config['break_match_str']); + } + + try { + if (empty($config['dsn'])) { + $config['dsn'] = $this->parseDsn($config); + } + + if ($config['debug']) { + $startTime = microtime(true); + } + + $this->links[$linkNum] = new PDO($config['dsn'], $config['username'], $config['password'], $params); + + if ($config['debug']) { + // 记录数据库连接信息 + $this->log('[ DB ] CONNECT:[ UseTime:' . number_format(microtime(true) - $startTime, 6) . 's ] ' . $config['dsn']); + } + + return $this->links[$linkNum]; + } catch (\PDOException $e) { + if ($autoConnection) { + $this->log($e->getMessage(), 'error'); + return $this->connect($autoConnection, $linkNum); + } else { + throw $e; + } + } + } + + /** + * 释放查询结果 + * @access public + */ + public function free() + { + $this->PDOStatement = null; + } + + /** + * 获取PDO对象 + * @access public + * @return \PDO|false + */ + public function getPdo() + { + if (!$this->linkID) { + return false; + } + + return $this->linkID; + } + + /** + * 执行查询 使用生成器返回数据 + * @access public + * @param string $sql sql指令 + * @param array $bind 参数绑定 + * @param bool $master 是否在主服务器读操作 + * @param Model $model 模型对象实例 + * @param array $condition 查询条件 + * @param mixed $relation 关联查询 + * @return \Generator + */ + public function getCursor($sql, $bind = [], $master = false, $model = null, $condition = null, $relation = null) + { + $this->initConnect($master); + + // 记录SQL语句 + $this->queryStr = $sql; + + $this->bind = $bind; + + Db::$queryTimes++; + + // 调试开始 + $this->debug(true); + + // 预处理 + $this->PDOStatement = $this->linkID->prepare($sql); + + // 是否为存储过程调用 + $procedure = in_array(strtolower(substr(trim($sql), 0, 4)), ['call', 'exec']); + + // 参数绑定 + if ($procedure) { + $this->bindParam($bind); + } else { + $this->bindValue($bind); + } + + // 执行查询 + $this->PDOStatement->execute(); + + // 调试结束 + $this->debug(false, '', $master); + + // 返回结果集 + while ($result = $this->PDOStatement->fetch($this->fetchType)) { + if ($model) { + $instance = $model->newInstance($result, $condition); + + if ($relation) { + $instance->relationQuery($relation); + } + + yield $instance; + } else { + yield $result; + } + } + } + + /** + * 执行查询 返回数据集 + * @access public + * @param string $sql sql指令 + * @param array $bind 参数绑定 + * @param bool $master 是否在主服务器读操作 + * @param bool $pdo 是否返回PDO对象 + * @return array + * @throws BindParamException + * @throws \PDOException + * @throws \Exception + * @throws \Throwable + */ + public function query($sql, $bind = [], $master = false, $pdo = false) + { + $this->initConnect($master); + + if (!$this->linkID) { + return false; + } + + // 记录SQL语句 + $this->queryStr = $sql; + + $this->bind = $bind; + + Db::$queryTimes++; + + try { + // 调试开始 + $this->debug(true); + + // 预处理 + $this->PDOStatement = $this->linkID->prepare($sql); + + // 是否为存储过程调用 + $procedure = in_array(strtolower(substr(trim($sql), 0, 4)), ['call', 'exec']); + + // 参数绑定 + if ($procedure) { + $this->bindParam($bind); + } else { + $this->bindValue($bind); + } + + // 执行查询 + $this->PDOStatement->execute(); + + // 调试结束 + $this->debug(false, '', $master); + + // 返回结果集 + return $this->getResult($pdo, $procedure); + } catch (\PDOException $e) { + if ($this->isBreak($e)) { + return $this->close()->query($sql, $bind, $master, $pdo); + } + + throw new PDOException($e, $this->config, $this->getLastsql()); + } catch (\Throwable $e) { + if ($this->isBreak($e)) { + return $this->close()->query($sql, $bind, $master, $pdo); + } + + throw $e; + } catch (\Exception $e) { + if ($this->isBreak($e)) { + return $this->close()->query($sql, $bind, $master, $pdo); + } + + throw $e; + } + } + + /** + * 执行语句 + * @access public + * @param string $sql sql指令 + * @param array $bind 参数绑定 + * @param Query $query 查询对象 + * @return int + * @throws BindParamException + * @throws \PDOException + * @throws \Exception + * @throws \Throwable + */ + public function execute($sql, $bind = [], Query $query = null) + { + $this->initConnect(true); + + if (!$this->linkID) { + return false; + } + + // 记录SQL语句 + $this->queryStr = $sql; + + $this->bind = $bind; + + Db::$executeTimes++; + try { + // 调试开始 + $this->debug(true); + + // 预处理 + $this->PDOStatement = $this->linkID->prepare($sql); + + // 是否为存储过程调用 + $procedure = in_array(strtolower(substr(trim($sql), 0, 4)), ['call', 'exec']); + + // 参数绑定 + if ($procedure) { + $this->bindParam($bind); + } else { + $this->bindValue($bind); + } + + // 执行语句 + $this->PDOStatement->execute(); + + // 调试结束 + $this->debug(false, '', true); + + if ($query && !empty($this->config['deploy']) && !empty($this->config['read_master'])) { + $query->readMaster(); + } + + $this->numRows = $this->PDOStatement->rowCount(); + + return $this->numRows; + } catch (\PDOException $e) { + if ($this->isBreak($e)) { + return $this->close()->execute($sql, $bind, $query); + } + + throw new PDOException($e, $this->config, $this->getLastsql()); + } catch (\Throwable $e) { + if ($this->isBreak($e)) { + return $this->close()->execute($sql, $bind, $query); + } + + throw $e; + } catch (\Exception $e) { + if ($this->isBreak($e)) { + return $this->close()->execute($sql, $bind, $query); + } + + throw $e; + } + } + + /** + * 查找单条记录 + * @access public + * @param Query $query 查询对象 + * @return array|null|\PDOStatement|string + * @throws DbException + * @throws ModelNotFoundException + * @throws DataNotFoundException + */ + public function find(Query $query) + { + // 分析查询表达式 + $options = $query->getOptions(); + $pk = $query->getPk($options); + + $data = $options['data']; + $query->setOption('limit', 1); + + if (empty($options['fetch_sql']) && !empty($options['cache'])) { + // 判断查询缓存 + $cache = $options['cache']; + + if (is_string($cache['key'])) { + $key = $cache['key']; + } else { + $key = $this->getCacheKey($query, $data); + } + + $result = Container::get('cache')->get($key); + + if (false !== $result) { + return $result; + } + } + + if (is_string($pk) && !is_array($data)) { + if (isset($key) && strpos($key, '|')) { + list($a, $val) = explode('|', $key); + $item[$pk] = $val; + } else { + $item[$pk] = $data; + } + $data = $item; + } + + $query->setOption('data', $data); + + // 生成查询SQL + $sql = $this->builder->select($query); + + $query->removeOption('limit'); + + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + // 获取实际执行的SQL语句 + return $this->getRealSql($sql, $bind); + } + + // 事件回调 + $result = $query->trigger('before_find'); + + if (!$result) { + // 执行查询 + $resultSet = $this->query($sql, $bind, $options['master'], $options['fetch_pdo']); + + if ($resultSet instanceof \PDOStatement) { + // 返回PDOStatement对象 + return $resultSet; + } + + $result = isset($resultSet[0]) ? $resultSet[0] : null; + } + + if (isset($cache) && $result) { + // 缓存数据 + $this->cacheData($key, $result, $cache); + } + + return $result; + } + + /** + * 使用游标查询记录 + * @access public + * @param Query $query 查询对象 + * @return \Generator + */ + public function cursor(Query $query) + { + // 分析查询表达式 + $options = $query->getOptions(); + + // 生成查询SQL + $sql = $this->builder->select($query); + + $bind = $query->getBind(); + + $condition = isset($options['where']['AND']) ? $options['where']['AND'] : null; + $relation = isset($options['relaltion']) ? $options['relation'] : null; + + // 执行查询操作 + return $this->getCursor($sql, $bind, $options['master'], $query->getModel(), $condition, $relation); + } + + /** + * 查找记录 + * @access public + * @param Query $query 查询对象 + * @return array|\PDOStatement|string + * @throws DbException + * @throws ModelNotFoundException + * @throws DataNotFoundException + */ + public function select(Query $query) + { + // 分析查询表达式 + $options = $query->getOptions(); + + if (empty($options['fetch_sql']) && !empty($options['cache'])) { + $resultSet = $this->getCacheData($query, $options['cache'], null, $key); + + if (false !== $resultSet) { + return $resultSet; + } + } + + // 生成查询SQL + $sql = $this->builder->select($query); + + $query->removeOption('limit'); + + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + // 获取实际执行的SQL语句 + return $this->getRealSql($sql, $bind); + } + + $resultSet = $query->trigger('before_select'); + + if (!$resultSet) { + // 执行查询操作 + $resultSet = $this->query($sql, $bind, $options['master'], $options['fetch_pdo']); + + if ($resultSet instanceof \PDOStatement) { + // 返回PDOStatement对象 + return $resultSet; + } + } + + if (!empty($options['cache']) && false !== $resultSet) { + // 缓存数据集 + $this->cacheData($key, $resultSet, $options['cache']); + } + + return $resultSet; + } + + /** + * 插入记录 + * @access public + * @param Query $query 查询对象 + * @param boolean $replace 是否replace + * @param boolean $getLastInsID 返回自增主键 + * @param string $sequence 自增序列名 + * @return integer|string + */ + public function insert(Query $query, $replace = false, $getLastInsID = false, $sequence = null) + { + // 分析查询表达式 + $options = $query->getOptions(); + + // 生成SQL语句 + $sql = $this->builder->insert($query, $replace); + + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + // 获取实际执行的SQL语句 + return $this->getRealSql($sql, $bind); + } + + // 执行操作 + $result = '' == $sql ? 0 : $this->execute($sql, $bind, $query); + + if ($result) { + $sequence = $sequence ?: (isset($options['sequence']) ? $options['sequence'] : null); + $lastInsId = $this->getLastInsID($sequence); + + $data = $options['data']; + + if ($lastInsId) { + $pk = $query->getPk($options); + if (is_string($pk)) { + $data[$pk] = $lastInsId; + } + } + + $query->setOption('data', $data); + + $query->trigger('after_insert'); + + if ($getLastInsID) { + return $lastInsId; + } + } + + return $result; + } + + /** + * 批量插入记录 + * @access public + * @param Query $query 查询对象 + * @param mixed $dataSet 数据集 + * @param bool $replace 是否replace + * @param integer $limit 每次写入数据限制 + * @return integer|string + * @throws \Exception + * @throws \Throwable + */ + public function insertAll(Query $query, $dataSet = [], $replace = false, $limit = null) + { + if (!is_array(reset($dataSet))) { + return false; + } + + $options = $query->getOptions(); + + if ($limit) { + // 分批写入 自动启动事务支持 + $this->startTrans(); + + try { + $array = array_chunk($dataSet, $limit, true); + $count = 0; + + foreach ($array as $item) { + $sql = $this->builder->insertAll($query, $item, $replace); + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + $fetchSql[] = $this->getRealSql($sql, $bind); + } else { + $count += $this->execute($sql, $bind, $query); + } + } + + // 提交事务 + $this->commit(); + } catch (\Exception $e) { + $this->rollback(); + throw $e; + } catch (\Throwable $e) { + $this->rollback(); + throw $e; + } + + return isset($fetchSql) ? implode(';', $fetchSql) : $count; + } + + $sql = $this->builder->insertAll($query, $dataSet, $replace); + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + return $this->getRealSql($sql, $bind); + } + + return $this->execute($sql, $bind, $query); + } + + /** + * 通过Select方式插入记录 + * @access public + * @param Query $query 查询对象 + * @param string $fields 要插入的数据表字段名 + * @param string $table 要插入的数据表名 + * @return integer|string + * @throws PDOException + */ + public function selectInsert(Query $query, $fields, $table) + { + // 分析查询表达式 + $options = $query->getOptions(); + + $table = $this->parseSqlTable($table); + + $sql = $this->builder->selectInsert($query, $fields, $table); + + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + return $this->getRealSql($sql, $bind); + } + + return $this->execute($sql, $bind, $query); + } + + /** + * 更新记录 + * @access public + * @param Query $query 查询对象 + * @return integer|string + * @throws Exception + * @throws PDOException + */ + public function update(Query $query) + { + $options = $query->getOptions(); + + if (isset($options['cache']) && is_string($options['cache']['key'])) { + $key = $options['cache']['key']; + } + + $pk = $query->getPk($options); + $data = $options['data']; + + if (empty($options['where'])) { + // 如果存在主键数据 则自动作为更新条件 + if (is_string($pk) && isset($data[$pk])) { + $where[$pk] = [$pk, '=', $data[$pk]]; + if (!isset($key)) { + $key = $this->getCacheKey($query, $data[$pk]); + } + unset($data[$pk]); + } elseif (is_array($pk)) { + // 增加复合主键支持 + foreach ($pk as $field) { + if (isset($data[$field])) { + $where[$field] = [$field, '=', $data[$field]]; + } else { + // 如果缺少复合主键数据则不执行 + throw new Exception('miss complex primary data'); + } + unset($data[$field]); + } + } + + if (!isset($where)) { + // 如果没有任何更新条件则不执行 + throw new Exception('miss update condition'); + } else { + $options['where']['AND'] = $where; + $query->setOption('where', ['AND' => $where]); + } + } elseif (!isset($key) && is_string($pk) && isset($options['where']['AND'])) { + foreach ($options['where']['AND'] as $val) { + if (is_array($val) && $val[0] == $pk) { + $key = $this->getCacheKey($query, $val); + } + } + } + + // 更新数据 + $query->setOption('data', $data); + + // 生成UPDATE SQL语句 + $sql = $this->builder->update($query); + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + // 获取实际执行的SQL语句 + return $this->getRealSql($sql, $bind); + } + + // 检测缓存 + $cache = Container::get('cache'); + + if (isset($key) && $cache->get($key)) { + // 删除缓存 + $cache->rm($key); + } elseif (!empty($options['cache']['tag'])) { + $cache->clear($options['cache']['tag']); + } + + // 执行操作 + $result = '' == $sql ? 0 : $this->execute($sql, $bind, $query); + + if ($result) { + if (is_string($pk) && isset($where[$pk])) { + $data[$pk] = $where[$pk]; + } elseif (is_string($pk) && isset($key) && strpos($key, '|')) { + list($a, $val) = explode('|', $key); + $data[$pk] = $val; + } + + $query->setOption('data', $data); + $query->trigger('after_update'); + } + + return $result; + } + + /** + * 删除记录 + * @access public + * @param Query $query 查询对象 + * @return int + * @throws Exception + * @throws PDOException + */ + public function delete(Query $query) + { + // 分析查询表达式 + $options = $query->getOptions(); + $pk = $query->getPk($options); + $data = $options['data']; + + if (isset($options['cache']) && is_string($options['cache']['key'])) { + $key = $options['cache']['key']; + } elseif (!is_null($data) && true !== $data && !is_array($data)) { + $key = $this->getCacheKey($query, $data); + } elseif (is_string($pk) && isset($options['where']['AND'])) { + foreach ($options['where']['AND'] as $val) { + if (is_array($val) && $val[0] == $pk) { + $key = $this->getCacheKey($query, $val); + } + } + } + + if (true !== $data && empty($options['where'])) { + // 如果条件为空 不进行删除操作 除非设置 1=1 + throw new Exception('delete without condition'); + } + + // 生成删除SQL语句 + $sql = $this->builder->delete($query); + + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + // 获取实际执行的SQL语句 + return $this->getRealSql($sql, $bind); + } + + // 检测缓存 + $cache = Container::get('cache'); + + if (isset($key) && $cache->get($key)) { + // 删除缓存 + $cache->rm($key); + } elseif (!empty($options['cache']['tag'])) { + $cache->clear($options['cache']['tag']); + } + + // 执行操作 + $result = $this->execute($sql, $bind, $query); + + if ($result) { + if (!is_array($data) && is_string($pk) && isset($key) && strpos($key, '|')) { + list($a, $val) = explode('|', $key); + $item[$pk] = $val; + $data = $item; + } + + $options['data'] = $data; + + $query->trigger('after_delete'); + } + + return $result; + } + + /** + * 得到某个字段的值 + * @access public + * @param Query $query 查询对象 + * @param string $field 字段名 + * @param mixed $default 默认值 + * @param bool $one 是否返回一个值 + * @return mixed + */ + public function value(Query $query, $field, $default = null, $one = true) + { + $options = $query->getOptions(); + + if (isset($options['field'])) { + $query->removeOption('field'); + } + + if (is_string($field)) { + $field = array_map('trim', explode(',', $field)); + } + + $query->setOption('field', $field); + + if (empty($options['fetch_sql']) && !empty($options['cache'])) { + $cache = $options['cache']; + $result = $this->getCacheData($query, $cache, null, $key); + + if (false !== $result) { + return $result; + } + } + + if ($one) { + $query->setOption('limit', 1); + } + + // 生成查询SQL + $sql = $this->builder->select($query); + + if (isset($options['field'])) { + $query->setOption('field', $options['field']); + } else { + $query->removeOption('field'); + } + + $query->removeOption('limit'); + + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + // 获取实际执行的SQL语句 + return $this->getRealSql($sql, $bind); + } + + // 执行查询操作 + $pdo = $this->query($sql, $bind, $options['master'], true); + + $result = $pdo->fetchColumn(); + + if (isset($cache) && false !== $result) { + // 缓存数据 + $this->cacheData($key, $result, $cache); + } + + return false !== $result ? $result : $default; + } + + /** + * 得到某个字段的值 + * @access public + * @param Query $query 查询对象 + * @param string $aggregate 聚合方法 + * @param mixed $field 字段名 + * @return mixed + */ + public function aggregate(Query $query, $aggregate, $field) + { + if (is_string($field) && 0 === stripos($field, 'DISTINCT ')) { + list($distinct, $field) = explode(' ', $field); + } + + $field = $aggregate . '(' . (!empty($distinct) ? 'DISTINCT ' : '') . $this->builder->parseKey($query, $field, true) . ') AS tp_' . strtolower($aggregate); + + return $this->value($query, $field, 0, false); + } + + /** + * 得到某个列的数组 + * @access public + * @param Query $query 查询对象 + * @param string $field 字段名 多个字段用逗号分隔 + * @param string $key 索引 + * @return array + */ + public function column(Query $query, $field, $key = '') + { + $options = $query->getOptions(); + + if (isset($options['field'])) { + $query->removeOption('field'); + } + + if (is_null($field)) { + $field = ['*']; + } elseif (is_string($field)) { + $field = array_map('trim', explode(',', $field)); + } + + if ($key && ['*'] != $field) { + array_unshift($field, $key); + $field = array_unique($field); + } + + $query->setOption('field', $field); + + if (empty($options['fetch_sql']) && !empty($options['cache'])) { + // 判断查询缓存 + $cache = $options['cache']; + $result = $this->getCacheData($query, $cache, null, $guid); + + if (false !== $result) { + return $result; + } + } + + // 生成查询SQL + $sql = $this->builder->select($query); + + // 还原field参数 + if (isset($options['field'])) { + $query->setOption('field', $options['field']); + } else { + $query->removeOption('field'); + } + + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + // 获取实际执行的SQL语句 + return $this->getRealSql($sql, $bind); + } + + // 执行查询操作 + $pdo = $this->query($sql, $bind, $options['master'], true); + + if (1 == $pdo->columnCount()) { + $result = $pdo->fetchAll(PDO::FETCH_COLUMN); + } else { + $resultSet = $pdo->fetchAll(PDO::FETCH_ASSOC); + + if (['*'] == $field && $key) { + $result = array_column($resultSet, null, $key); + } elseif ($resultSet) { + $fields = array_keys($resultSet[0]); + $count = count($fields); + $key1 = array_shift($fields); + $key2 = $fields ? array_shift($fields) : ''; + $key = $key ?: $key1; + + if (strpos($key, '.')) { + list($alias, $key) = explode('.', $key); + } + + if (2 == $count) { + $column = $key2; + } elseif (1 == $count) { + $column = $key1; + } else { + $column = null; + } + + $result = array_column($resultSet, $column, $key); + } else { + $result = []; + } + } + + if (isset($cache) && isset($guid)) { + // 缓存数据 + $this->cacheData($guid, $result, $cache); + } + + return $result; + } + + /** + * 执行查询但只返回PDOStatement对象 + * @access public + * @return \PDOStatement|string + */ + public function pdo(Query $query) + { + // 分析查询表达式 + $options = $query->getOptions(); + + // 生成查询SQL + $sql = $this->builder->select($query); + + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + // 获取实际执行的SQL语句 + return $this->getRealSql($sql, $bind); + } + + // 执行查询操作 + return $this->query($sql, $bind, $options['master'], true); + } + + /** + * 根据参数绑定组装最终的SQL语句 便于调试 + * @access public + * @param string $sql 带参数绑定的sql语句 + * @param array $bind 参数绑定列表 + * @return string + */ + public function getRealSql($sql, array $bind = []) + { + if (is_array($sql)) { + $sql = implode(';', $sql); + } + + foreach ($bind as $key => $val) { + $value = is_array($val) ? $val[0] : $val; + $type = is_array($val) ? $val[1] : PDO::PARAM_STR; + + if ((self::PARAM_FLOAT == $type || PDO::PARAM_STR == $type) && is_string($value)) { + $value = '\'' . addslashes($value) . '\''; + } elseif (PDO::PARAM_INT == $type && '' === $value) { + $value = 0; + } + + // 判断占位符 + $sql = is_numeric($key) ? + substr_replace($sql, $value, strpos($sql, '?'), 1) : + substr_replace($sql, $value, strpos($sql, ':' . $key), strlen(':' . $key)); + } + + return rtrim($sql); + } + + /** + * 参数绑定 + * 支持 ['name'=>'value','id'=>123] 对应命名占位符 + * 或者 ['value',123] 对应问号占位符 + * @access public + * @param array $bind 要绑定的参数列表 + * @return void + * @throws BindParamException + */ + protected function bindValue(array $bind = []) + { + foreach ($bind as $key => $val) { + // 占位符 + $param = is_int($key) ? $key + 1 : ':' . $key; + + if (is_array($val)) { + if (PDO::PARAM_INT == $val[1] && '' === $val[0]) { + $val[0] = 0; + } elseif (self::PARAM_FLOAT == $val[1]) { + $val[0] = is_string($val[0]) ? (float) $val[0] : $val[0]; + $val[1] = PDO::PARAM_STR; + } + + $result = $this->PDOStatement->bindValue($param, $val[0], $val[1]); + } else { + $result = $this->PDOStatement->bindValue($param, $val); + } + + if (!$result) { + throw new BindParamException( + "Error occurred when binding parameters '{$param}'", + $this->config, + $this->getLastsql(), + $bind + ); + } + } + } + + /** + * 存储过程的输入输出参数绑定 + * @access public + * @param array $bind 要绑定的参数列表 + * @return void + * @throws BindParamException + */ + protected function bindParam($bind) + { + foreach ($bind as $key => $val) { + $param = is_int($key) ? $key + 1 : ':' . $key; + + if (is_array($val)) { + array_unshift($val, $param); + $result = call_user_func_array([$this->PDOStatement, 'bindParam'], $val); + } else { + $result = $this->PDOStatement->bindValue($param, $val); + } + + if (!$result) { + $param = array_shift($val); + + throw new BindParamException( + "Error occurred when binding parameters '{$param}'", + $this->config, + $this->getLastsql(), + $bind + ); + } + } + } + + /** + * 获得数据集数组 + * @access protected + * @param bool $pdo 是否返回PDOStatement + * @param bool $procedure 是否存储过程 + * @return array + */ + protected function getResult($pdo = false, $procedure = false) + { + if ($pdo) { + // 返回PDOStatement对象处理 + return $this->PDOStatement; + } + + if ($procedure) { + // 存储过程返回结果 + return $this->procedure(); + } + + $result = $this->PDOStatement->fetchAll($this->fetchType); + + $this->numRows = count($result); + + return $result; + } + + /** + * 获得存储过程数据集 + * @access protected + * @return array + */ + protected function procedure() + { + $item = []; + + do { + $result = $this->getResult(); + if ($result) { + $item[] = $result; + } + } while ($this->PDOStatement->nextRowset()); + + $this->numRows = count($item); + + return $item; + } + + /** + * 执行数据库事务 + * @access public + * @param callable $callback 数据操作方法回调 + * @return mixed + * @throws PDOException + * @throws \Exception + * @throws \Throwable + */ + public function transaction($callback) + { + $this->startTrans(); + + try { + $result = null; + if (is_callable($callback)) { + $result = call_user_func_array($callback, [$this]); + } + + $this->commit(); + return $result; + } catch (\Exception $e) { + $this->rollback(); + throw $e; + } catch (\Throwable $e) { + $this->rollback(); + throw $e; + } + } + + /** + * 启动XA事务 + * @access public + * @param string $xid XA事务id + * @return void + */ + public function startTransXa($xid) + {} + + /** + * 预编译XA事务 + * @access public + * @param string $xid XA事务id + * @return void + */ + public function prepareXa($xid) + {} + + /** + * 提交XA事务 + * @access public + * @param string $xid XA事务id + * @return void + */ + public function commitXa($xid) + {} + + /** + * 回滚XA事务 + * @access public + * @param string $xid XA事务id + * @return void + */ + public function rollbackXa($xid) + {} + + /** + * 启动事务 + * @access public + * @return void + * @throws \PDOException + * @throws \Exception + */ + public function startTrans() + { + $this->initConnect(true); + if (!$this->linkID) { + return false; + } + + ++$this->transTimes; + + try { + if (1 == $this->transTimes) { + $this->linkID->beginTransaction(); + } elseif ($this->transTimes > 1 && $this->supportSavepoint()) { + $this->linkID->exec( + $this->parseSavepoint('trans' . $this->transTimes) + ); + } + } catch (\Exception $e) { + if ($this->isBreak($e)) { + --$this->transTimes; + return $this->close()->startTrans(); + } + throw $e; + } + } + + /** + * 用于非自动提交状态下面的查询提交 + * @access public + * @return void + * @throws PDOException + */ + public function commit() + { + $this->initConnect(true); + + if (1 == $this->transTimes) { + $this->linkID->commit(); + } + + --$this->transTimes; + } + + /** + * 事务回滚 + * @access public + * @return void + * @throws PDOException + */ + public function rollback() + { + $this->initConnect(true); + + if (1 == $this->transTimes) { + $this->linkID->rollBack(); + } elseif ($this->transTimes > 1 && $this->supportSavepoint()) { + $this->linkID->exec( + $this->parseSavepointRollBack('trans' . $this->transTimes) + ); + } + + $this->transTimes = max(0, $this->transTimes - 1); + } + + /** + * 是否支持事务嵌套 + * @return bool + */ + protected function supportSavepoint() + { + return false; + } + + /** + * 生成定义保存点的SQL + * @access protected + * @param $name + * @return string + */ + protected function parseSavepoint($name) + { + return 'SAVEPOINT ' . $name; + } + + /** + * 生成回滚到保存点的SQL + * @access protected + * @param $name + * @return string + */ + protected function parseSavepointRollBack($name) + { + return 'ROLLBACK TO SAVEPOINT ' . $name; + } + + /** + * 批处理执行SQL语句 + * 批处理的指令都认为是execute操作 + * @access public + * @param array $sqlArray SQL批处理指令 + * @param array $bind 参数绑定 + * @return boolean + */ + public function batchQuery($sqlArray = [], $bind = []) + { + if (!is_array($sqlArray)) { + return false; + } + + // 自动启动事务支持 + $this->startTrans(); + + try { + foreach ($sqlArray as $sql) { + $this->execute($sql, $bind); + } + // 提交事务 + $this->commit(); + } catch (\Exception $e) { + $this->rollback(); + throw $e; + } + + return true; + } + + /** + * 获得查询次数 + * @access public + * @param boolean $execute 是否包含所有查询 + * @return integer + */ + public function getQueryTimes($execute = false) + { + return $execute ? Db::$queryTimes + Db::$executeTimes : Db::$queryTimes; + } + + /** + * 获得执行次数 + * @access public + * @return integer + */ + public function getExecuteTimes() + { + return Db::$executeTimes; + } + + /** + * 关闭数据库(或者重新连接) + * @access public + * @return $this + */ + public function close() + { + $this->linkID = null; + $this->linkWrite = null; + $this->linkRead = null; + $this->links = []; + + // 释放查询 + $this->free(); + + return $this; + } + + /** + * 是否断线 + * @access protected + * @param \PDOException|\Exception $e 异常对象 + * @return bool + */ + protected function isBreak($e) + { + if (!$this->config['break_reconnect']) { + return false; + } + + $error = $e->getMessage(); + + foreach ($this->breakMatchStr as $msg) { + if (false !== stripos($error, $msg)) { + return true; + } + } + return false; + } + + /** + * 获取最近一次查询的sql语句 + * @access public + * @return string + */ + public function getLastSql() + { + return $this->getRealSql($this->queryStr, $this->bind); + } + + /** + * 获取最近插入的ID + * @access public + * @param string $sequence 自增序列名 + * @return string + */ + public function getLastInsID($sequence = null) + { + return $this->linkID->lastInsertId($sequence); + } + + /** + * 获取返回或者影响的记录数 + * @access public + * @return integer + */ + public function getNumRows() + { + return $this->numRows; + } + + /** + * 获取最近的错误信息 + * @access public + * @return string + */ + public function getError() + { + if ($this->PDOStatement) { + $error = $this->PDOStatement->errorInfo(); + $error = $error[1] . ':' . $error[2]; + } else { + $error = ''; + } + + if ('' != $this->queryStr) { + $error .= "\n [ SQL语句 ] : " . $this->getLastsql(); + } + + return $error; + } + + /** + * 数据库调试 记录当前SQL及分析性能 + * @access protected + * @param boolean $start 调试开始标记 true 开始 false 结束 + * @param string $sql 执行的SQL语句 留空自动获取 + * @param bool $master 主从标记 + * @return void + */ + protected function debug($start, $sql = '', $master = false) + { + if (!empty($this->config['debug'])) { + // 开启数据库调试模式 + $debug = Container::get('debug'); + + if ($start) { + $debug->remark('queryStartTime', 'time'); + } else { + // 记录操作结束时间 + $debug->remark('queryEndTime', 'time'); + $runtime = $debug->getRangeTime('queryStartTime', 'queryEndTime'); + $sql = $sql ?: $this->getLastsql(); + $result = []; + + // SQL性能分析 + if ($this->config['sql_explain'] && 0 === stripos(trim($sql), 'select')) { + $result = $this->getExplain($sql); + } + + // SQL监听 + $this->triggerSql($sql, $runtime, $result, $master); + } + } + } + + /** + * 监听SQL执行 + * @access public + * @param callable $callback 回调方法 + * @return void + */ + public function listen($callback) + { + self::$event[] = $callback; + } + + /** + * 触发SQL事件 + * @access protected + * @param string $sql SQL语句 + * @param float $runtime SQL运行时间 + * @param mixed $explain SQL分析 + * @param bool $master 主从标记 + * @return void + */ + protected function triggerSql($sql, $runtime, $explain = [], $master = false) + { + if (!empty(self::$event)) { + foreach (self::$event as $callback) { + if (is_callable($callback)) { + call_user_func_array($callback, [$sql, $runtime, $explain, $master]); + } + } + } else { + if ($this->config['deploy']) { + // 分布式记录当前操作的主从 + $master = $master ? 'master|' : 'slave|'; + } else { + $master = ''; + } + + // 未注册监听则记录到日志中 + $this->log('[ SQL ] ' . $sql . ' [ ' . $master . 'RunTime:' . $runtime . 's ]'); + + if (!empty($explain)) { + $this->log('[ EXPLAIN : ' . var_export($explain, true) . ' ]'); + } + } + } + + public function log($log, $type = 'sql') + { + $this->config['debug'] && Container::get('log')->record($log, $type); + } + + /** + * 初始化数据库连接 + * @access protected + * @param boolean $master 是否主服务器 + * @return void + */ + protected function initConnect($master = true) + { + if (!empty($this->config['deploy'])) { + // 采用分布式数据库 + if ($master || $this->transTimes) { + if (!$this->linkWrite) { + $this->linkWrite = $this->multiConnect(true); + } + + $this->linkID = $this->linkWrite; + } else { + if (!$this->linkRead) { + $this->linkRead = $this->multiConnect(false); + } + + $this->linkID = $this->linkRead; + } + } elseif (!$this->linkID) { + // 默认单数据库 + $this->linkID = $this->connect(); + } + } + + /** + * 连接分布式服务器 + * @access protected + * @param boolean $master 主服务器 + * @return PDO + */ + protected function multiConnect($master = false) + { + $_config = []; + + // 分布式数据库配置解析 + foreach (['username', 'password', 'hostname', 'hostport', 'database', 'dsn', 'charset'] as $name) { + $_config[$name] = is_string($this->config[$name]) ? explode(',', $this->config[$name]) : $this->config[$name]; + } + + // 主服务器序号 + $m = floor(mt_rand(0, $this->config['master_num'] - 1)); + + if ($this->config['rw_separate']) { + // 主从式采用读写分离 + if ($master) // 主服务器写入 + { + $r = $m; + } elseif (is_numeric($this->config['slave_no'])) { + // 指定服务器读 + $r = $this->config['slave_no']; + } else { + // 读操作连接从服务器 每次随机连接的数据库 + $r = floor(mt_rand($this->config['master_num'], count($_config['hostname']) - 1)); + } + } else { + // 读写操作不区分服务器 每次随机连接的数据库 + $r = floor(mt_rand(0, count($_config['hostname']) - 1)); + } + $dbMaster = false; + + if ($m != $r) { + $dbMaster = []; + foreach (['username', 'password', 'hostname', 'hostport', 'database', 'dsn', 'charset'] as $name) { + $dbMaster[$name] = isset($_config[$name][$m]) ? $_config[$name][$m] : $_config[$name][0]; + } + } + + $dbConfig = []; + + foreach (['username', 'password', 'hostname', 'hostport', 'database', 'dsn', 'charset'] as $name) { + $dbConfig[$name] = isset($_config[$name][$r]) ? $_config[$name][$r] : $_config[$name][0]; + } + + return $this->connect($dbConfig, $r, $r == $m ? false : $dbMaster); + } + + /** + * 析构方法 + * @access public + */ + public function __destruct() + { + // 关闭连接 + $this->close(); + } + + /** + * 缓存数据 + * @access protected + * @param string $key 缓存标识 + * @param mixed $data 缓存数据 + * @param array $config 缓存参数 + */ + protected function cacheData($key, $data, $config = []) + { + $cache = Container::get('cache'); + + if (isset($config['tag'])) { + $cache->tag($config['tag'])->set($key, $data, $config['expire']); + } else { + $cache->set($key, $data, $config['expire']); + } + } + + /** + * 获取缓存数据 + * @access protected + * @param Query $query 查询对象 + * @param mixed $cache 缓存设置 + * @param array $options 缓存 + * @return mixed + */ + protected function getCacheData(Query $query, $cache, $data, &$key = null) + { + // 判断查询缓存 + $key = is_string($cache['key']) ? $cache['key'] : $this->getCacheKey($query, $data); + + return Container::get('cache')->get($key); + } + + /** + * 生成缓存标识 + * @access protected + * @param Query $query 查询对象 + * @param mixed $value 缓存数据 + * @return string + */ + protected function getCacheKey(Query $query, $value) + { + if (is_scalar($value)) { + $data = $value; + } elseif (is_array($value) && isset($value[1], $value[2]) && in_array($value[1], ['=', 'eq'], true) && is_scalar($value[2])) { + $data = $value[2]; + } + + $prefix = 'think:' . $this->getConfig('database') . '.'; + + if (isset($data)) { + return $prefix . $query->getTable() . '|' . $data; + } + + try { + return md5($prefix . serialize($query->getOptions()) . serialize($query->getBind(false))); + } catch (\Exception $e) { + throw new Exception('closure not support cache(true)'); + } + } + +} diff --git a/thinkphp/library/think/db/Expression.php b/thinkphp/library/think/db/Expression.php new file mode 100755 index 0000000..f1b92ab --- /dev/null +++ b/thinkphp/library/think/db/Expression.php @@ -0,0 +1,48 @@ + +// +---------------------------------------------------------------------- + +namespace think\db; + +class Expression +{ + /** + * 查询表达式 + * + * @var string + */ + protected $value; + + /** + * 创建一个查询表达式 + * + * @param string $value + * @return void + */ + public function __construct($value) + { + $this->value = $value; + } + + /** + * 获取表达式 + * + * @return string + */ + public function getValue() + { + return $this->value; + } + + public function __toString() + { + return (string) $this->value; + } +} diff --git a/thinkphp/library/think/db/Query.php b/thinkphp/library/think/db/Query.php new file mode 100755 index 0000000..4d63290 --- /dev/null +++ b/thinkphp/library/think/db/Query.php @@ -0,0 +1,3746 @@ + +// +---------------------------------------------------------------------- + +namespace think\db; + +use PDO; +use think\Collection; +use think\Container; +use think\Db; +use think\db\exception\BindParamException; +use think\db\exception\DataNotFoundException; +use think\db\exception\ModelNotFoundException; +use think\Exception; +use think\exception\DbException; +use think\exception\PDOException; +use think\Loader; +use think\Model; +use think\model\Collection as ModelCollection; +use think\model\Relation; +use think\model\relation\OneToOne; +use think\Paginator; + +class Query +{ + /** + * 当前数据库连接对象 + * @var Connection + */ + protected $connection; + + /** + * 当前模型对象 + * @var Model + */ + protected $model; + + /** + * 当前数据表名称(不含前缀) + * @var string + */ + protected $name = ''; + + /** + * 当前数据表主键 + * @var string|array + */ + protected $pk; + + /** + * 当前数据表前缀 + * @var string + */ + protected $prefix = ''; + + /** + * 当前查询参数 + * @var array + */ + protected $options = []; + + /** + * 当前参数绑定 + * @var array + */ + protected $bind = []; + + /** + * 事件回调 + * @var array + */ + private static $event = []; + + /** + * 扩展查询方法 + * @var array + */ + private static $extend = []; + + /** + * 读取主库的表 + * @var array + */ + protected static $readMaster = []; + + /** + * 日期查询表达式 + * @var array + */ + protected $timeRule = [ + 'today' => ['today', 'tomorrow -1second'], + 'yesterday' => ['yesterday', 'today -1second'], + 'week' => ['this week 00:00:00', 'next week 00:00:00 -1second'], + 'last week' => ['last week 00:00:00', 'this week 00:00:00 -1second'], + 'month' => ['first Day of this month 00:00:00', 'first Day of next month 00:00:00 -1second'], + 'last month' => ['first Day of last month 00:00:00', 'first Day of this month 00:00:00 -1second'], + 'year' => ['this year 1/1', 'next year 1/1 -1second'], + 'last year' => ['last year 1/1', 'this year 1/1 -1second'], + ]; + + /** + * 日期查询快捷定义 + * @var array + */ + protected $timeExp = ['d' => 'today', 'w' => 'week', 'm' => 'month', 'y' => 'year']; + + /** + * 架构函数 + * @access public + */ + public function __construct(Connection $connection = null) + { + if (is_null($connection)) { + $this->connection = Db::connect(); + } else { + $this->connection = $connection; + } + + $this->prefix = $this->connection->getConfig('prefix'); + } + + /** + * 创建一个新的查询对象 + * @access public + * @return Query + */ + public function newQuery() + { + return new static($this->connection); + } + + /** + * 利用__call方法实现一些特殊的Model方法 + * @access public + * @param string $method 方法名称 + * @param array $args 调用参数 + * @return mixed + * @throws DbException + * @throws Exception + */ + public function __call($method, $args) + { + if (isset(self::$extend[strtolower($method)])) { + // 调用扩展查询方法 + array_unshift($args, $this); + + return Container::getInstance() + ->invoke(self::$extend[strtolower($method)], $args); + } elseif (strtolower(substr($method, 0, 5)) == 'getby') { + // 根据某个字段获取记录 + $field = Loader::parseName(substr($method, 5)); + return $this->where($field, '=', $args[0])->find(); + } elseif (strtolower(substr($method, 0, 10)) == 'getfieldby') { + // 根据某个字段获取记录的某个值 + $name = Loader::parseName(substr($method, 10)); + return $this->where($name, '=', $args[0])->value($args[1]); + } elseif (strtolower(substr($method, 0, 7)) == 'whereor') { + $name = Loader::parseName(substr($method, 7)); + array_unshift($args, $name); + return call_user_func_array([$this, 'whereOr'], $args); + } elseif (strtolower(substr($method, 0, 5)) == 'where') { + $name = Loader::parseName(substr($method, 5)); + array_unshift($args, $name); + return call_user_func_array([$this, 'where'], $args); + } elseif ($this->model && method_exists($this->model, 'scope' . $method)) { + // 动态调用命名范围 + $method = 'scope' . $method; + array_unshift($args, $this); + + call_user_func_array([$this->model, $method], $args); + return $this; + } else { + throw new Exception('method not exist:' . ($this->model ? get_class($this->model) : static::class) . '->' . $method); + } + } + + /** + * 扩展查询方法 + * @access public + * @param string|array $method 查询方法名 + * @param callable $callback + * @return void + */ + public static function extend($method, $callback = null) + { + if (is_array($method)) { + foreach ($method as $key => $val) { + self::$extend[strtolower($key)] = $val; + } + } else { + self::$extend[strtolower($method)] = $callback; + } + } + + /** + * 设置当前的数据库Connection对象 + * @access public + * @param Connection $connection + * @return $this + */ + public function setConnection(Connection $connection) + { + $this->connection = $connection; + $this->prefix = $this->connection->getConfig('prefix'); + + return $this; + } + + /** + * 获取当前的数据库Connection对象 + * @access public + * @return Connection + */ + public function getConnection() + { + return $this->connection; + } + + /** + * 指定模型 + * @access public + * @param Model $model 模型对象实例 + * @return $this + */ + public function model(Model $model) + { + $this->model = $model; + return $this; + } + + /** + * 获取当前的模型对象 + * @access public + * @return Model|null + */ + public function getModel() + { + return $this->model ? $this->model->setQuery($this) : null; + } + + /** + * 设置从主库读取数据 + * @access public + * @param bool $all 是否所有表有效 + * @return $this + */ + public function readMaster($all = false) + { + $table = $all ? '*' : $this->getTable(); + + static::$readMaster[$table] = true; + + return $this; + } + + /** + * 指定当前数据表名(不含前缀) + * @access public + * @param string $name + * @return $this + */ + public function name($name) + { + $this->name = $name; + return $this; + } + + /** + * 获取当前的数据表名称 + * @access public + * @return string + */ + public function getName() + { + return $this->name ?: $this->model->getName(); + } + + /** + * 得到当前或者指定名称的数据表 + * @access public + * @param string $name + * @return string + */ + public function getTable($name = '') + { + if (empty($name) && isset($this->options['table'])) { + return $this->options['table']; + } + + $name = $name ?: $this->name; + + return $this->prefix . Loader::parseName($name); + } + + /** + * 执行查询 返回数据集 + * @access public + * @param string $sql sql指令 + * @param array $bind 参数绑定 + * @param boolean $master 是否在主服务器读操作 + * @param bool $pdo 是否返回PDO对象 + * @return mixed + * @throws BindParamException + * @throws PDOException + */ + public function query($sql, $bind = [], $master = false, $pdo = false) + { + return $this->connection->query($sql, $bind, $master, $pdo); + } + + /** + * 执行语句 + * @access public + * @param string $sql sql指令 + * @param array $bind 参数绑定 + * @return int + * @throws BindParamException + * @throws PDOException + */ + public function execute($sql, $bind = []) + { + return $this->connection->execute($sql, $bind, $this); + } + + /** + * 监听SQL执行 + * @access public + * @param callable $callback 回调方法 + * @return void + */ + public function listen($callback) + { + $this->connection->listen($callback); + } + + /** + * 获取最近插入的ID + * @access public + * @param string $sequence 自增序列名 + * @return string + */ + public function getLastInsID($sequence = null) + { + return $this->connection->getLastInsID($sequence); + } + + /** + * 获取返回或者影响的记录数 + * @access public + * @return integer + */ + public function getNumRows() + { + return $this->connection->getNumRows(); + } + + /** + * 获取最近一次查询的sql语句 + * @access public + * @return string + */ + public function getLastSql() + { + return $this->connection->getLastSql(); + } + + /** + * 执行数据库Xa事务 + * @access public + * @param callable $callback 数据操作方法回调 + * @param array $dbs 多个查询对象或者连接对象 + * @return mixed + * @throws PDOException + * @throws \Exception + * @throws \Throwable + */ + public function transactionXa($callback, array $dbs = []) + { + $xid = uniqid('xa'); + + if (empty($dbs)) { + $dbs[] = $this->getConnection(); + } + + foreach ($dbs as $key => $db) { + if ($db instanceof Query) { + $db = $db->getConnection(); + + $dbs[$key] = $db; + } + + $db->startTransXa($xid); + } + + try { + $result = null; + if (is_callable($callback)) { + $result = call_user_func_array($callback, [$this]); + } + + foreach ($dbs as $db) { + $db->prepareXa($xid); + } + + foreach ($dbs as $db) { + $db->commitXa($xid); + } + + return $result; + } catch (\Exception $e) { + foreach ($dbs as $db) { + $db->rollbackXa($xid); + } + throw $e; + } catch (\Throwable $e) { + foreach ($dbs as $db) { + $db->rollbackXa($xid); + } + throw $e; + } + } + + /** + * 执行数据库事务 + * @access public + * @param callable $callback 数据操作方法回调 + * @return mixed + */ + public function transaction($callback) + { + return $this->connection->transaction($callback); + } + + /** + * 启动事务 + * @access public + * @return void + */ + public function startTrans() + { + $this->connection->startTrans(); + } + + /** + * 用于非自动提交状态下面的查询提交 + * @access public + * @return void + * @throws PDOException + */ + public function commit() + { + $this->connection->commit(); + } + + /** + * 事务回滚 + * @access public + * @return void + * @throws PDOException + */ + public function rollback() + { + $this->connection->rollback(); + } + + /** + * 批处理执行SQL语句 + * 批处理的指令都认为是execute操作 + * @access public + * @param array $sql SQL批处理指令 + * @return boolean + */ + public function batchQuery($sql = []) + { + return $this->connection->batchQuery($sql); + } + + /** + * 获取数据库的配置参数 + * @access public + * @param string $name 参数名称 + * @return mixed + */ + public function getConfig($name = '') + { + return $this->connection->getConfig($name); + } + + /** + * 获取数据表字段信息 + * @access public + * @param string $tableName 数据表名 + * @return array + */ + public function getTableFields($tableName = '') + { + if ('' == $tableName) { + $tableName = isset($this->options['table']) ? $this->options['table'] : $this->getTable(); + } + + return $this->connection->getTableFields($tableName); + } + + /** + * 获取数据表字段类型 + * @access public + * @param string $tableName 数据表名 + * @param string $field 字段名 + * @return array|string + */ + public function getFieldsType($tableName = '', $field = null) + { + if ('' == $tableName) { + $tableName = isset($this->options['table']) ? $this->options['table'] : $this->getTable(); + } + + return $this->connection->getFieldsType($tableName, $field); + } + + /** + * 得到分表的的数据表名 + * @access public + * @param array $data 操作的数据 + * @param string $field 分表依据的字段 + * @param array $rule 分表规则 + * @return array + */ + public function getPartitionTableName($data, $field, $rule = []) + { + // 对数据表进行分区 + if ($field && isset($data[$field])) { + $value = $data[$field]; + $type = $rule['type']; + switch ($type) { + case 'id': + // 按照id范围分表 + $step = $rule['expr']; + $seq = floor($value / $step) + 1; + break; + case 'year': + // 按照年份分表 + if (!is_numeric($value)) { + $value = strtotime($value); + } + $seq = date('Y', $value) - $rule['expr'] + 1; + break; + case 'mod': + // 按照id的模数分表 + $seq = ($value % $rule['num']) + 1; + break; + case 'md5': + // 按照md5的序列分表 + $seq = (ord(substr(md5($value), 0, 1)) % $rule['num']) + 1; + break; + default: + if (function_exists($type)) { + // 支持指定函数哈希 + $seq = (ord(substr($type($value), 0, 1)) % $rule['num']) + 1; + } else { + // 按照字段的首字母的值分表 + $seq = (ord($value{0}) % $rule['num']) + 1; + } + } + return $this->getTable() . '_' . $seq; + } + // 当设置的分表字段不在查询条件或者数据中 + // 进行联合查询,必须设定 partition['num'] + $tableName = []; + for ($i = 0; $i < $rule['num']; $i++) { + $tableName[] = 'SELECT * FROM ' . $this->getTable() . '_' . ($i + 1); + } + + return ['( ' . implode(" UNION ", $tableName) . ' )' => $this->name]; + } + + /** + * 得到某个字段的值 + * @access public + * @param string $field 字段名 + * @param mixed $default 默认值 + * @return mixed + */ + public function value($field, $default = null) + { + $this->parseOptions(); + + return $this->connection->value($this, $field, $default); + } + + /** + * 得到某个列的数组 + * @access public + * @param string $field 字段名 多个字段用逗号分隔 + * @param string $key 索引 + * @return array + */ + public function column($field, $key = '') + { + $this->parseOptions(); + + return $this->connection->column($this, $field, $key); + } + + /** + * 聚合查询 + * @access public + * @param string $aggregate 聚合方法 + * @param string|Expression $field 字段名 + * @param bool $force 强制转为数字类型 + * @return mixed + */ + public function aggregate($aggregate, $field, $force = false) + { + $this->parseOptions(); + + $result = $this->connection->aggregate($this, $aggregate, $field); + + if (!empty($this->options['fetch_sql'])) { + return $result; + } elseif ($force) { + $result = (float) $result; + } + + return $result; + } + + /** + * COUNT查询 + * @access public + * @param string|Expression $field 字段名 + * @return float|string + */ + public function count($field = '*') + { + if (!empty($this->options['group'])) { + // 支持GROUP + $options = $this->getOptions(); + $subSql = $this->options($options) + ->field('count(' . $field . ') AS think_count') + ->bind($this->bind) + ->buildSql(); + + $query = $this->newQuery()->table([$subSql => '_group_count_']); + + if (!empty($options['fetch_sql'])) { + $query->fetchSql(true); + } + + $count = $query->aggregate('COUNT', '*', true); + } else { + $count = $this->aggregate('COUNT', $field, true); + } + + return is_string($count) ? $count : (int) $count; + } + + /** + * SUM查询 + * @access public + * @param string|Expression $field 字段名 + * @return float + */ + public function sum($field) + { + return $this->aggregate('SUM', $field, true); + } + + /** + * MIN查询 + * @access public + * @param string|Expression $field 字段名 + * @param bool $force 强制转为数字类型 + * @return mixed + */ + public function min($field, $force = true) + { + return $this->aggregate('MIN', $field, $force); + } + + /** + * MAX查询 + * @access public + * @param string|Expression $field 字段名 + * @param bool $force 强制转为数字类型 + * @return mixed + */ + public function max($field, $force = true) + { + return $this->aggregate('MAX', $field, $force); + } + + /** + * AVG查询 + * @access public + * @param string|Expression $field 字段名 + * @return float + */ + public function avg($field) + { + return $this->aggregate('AVG', $field, true); + } + + /** + * 设置记录的某个字段值 + * 支持使用数据库字段和方法 + * @access public + * @param string|array $field 字段名 + * @param mixed $value 字段值 + * @return integer + */ + public function setField($field, $value = '') + { + if (is_array($field)) { + $data = $field; + } else { + $data[$field] = $value; + } + + return $this->update($data); + } + + /** + * 字段值(延迟)增长 + * @access public + * @param string $field 字段名 + * @param integer $step 增长值 + * @param integer $lazyTime 延时时间(s) + * @return integer|true + * @throws Exception + */ + public function setInc($field, $step = 1, $lazyTime = 0) + { + $condition = !empty($this->options['where']) ? $this->options['where'] : []; + + if (empty($condition)) { + // 没有条件不做任何更新 + throw new Exception('no data to update'); + } + + if ($lazyTime > 0) { + // 延迟写入 + $guid = md5($this->getTable() . '_' . $field . '_' . serialize($condition)); + $step = $this->lazyWrite('inc', $guid, $step, $lazyTime); + + if (false === $step) { + // 清空查询条件 + $this->options = []; + return true; + } + } + + return $this->setField($field, ['INC', $step]); + } + + /** + * 字段值(延迟)减少 + * @access public + * @param string $field 字段名 + * @param integer $step 减少值 + * @param integer $lazyTime 延时时间(s) + * @return integer|true + * @throws Exception + */ + public function setDec($field, $step = 1, $lazyTime = 0) + { + $condition = !empty($this->options['where']) ? $this->options['where'] : []; + + if (empty($condition)) { + // 没有条件不做任何更新 + throw new Exception('no data to update'); + } + + if ($lazyTime > 0) { + // 延迟写入 + $guid = md5($this->getTable() . '_' . $field . '_' . serialize($condition)); + $step = $this->lazyWrite('dec', $guid, $step, $lazyTime); + + if (false === $step) { + // 清空查询条件 + $this->options = []; + return true; + } + + $value = ['INC', $step]; + } else { + $value = ['DEC', $step]; + } + + return $this->setField($field, $value); + } + + /** + * 延时更新检查 返回false表示需要延时 + * 否则返回实际写入的数值 + * @access protected + * @param string $type 自增或者自减 + * @param string $guid 写入标识 + * @param integer $step 写入步进值 + * @param integer $lazyTime 延时时间(s) + * @return false|integer + */ + protected function lazyWrite($type, $guid, $step, $lazyTime) + { + $cache = Container::get('cache'); + + if (!$cache->has($guid . '_time')) { + // 计时开始 + $cache->set($guid . '_time', time(), 0); + $cache->$type($guid, $step); + } elseif (time() > $cache->get($guid . '_time') + $lazyTime) { + // 删除缓存 + $value = $cache->$type($guid, $step); + $cache->rm($guid); + $cache->rm($guid . '_time'); + return 0 === $value ? false : $value; + } else { + // 更新缓存 + $cache->$type($guid, $step); + } + + return false; + } + + /** + * 查询SQL组装 join + * @access public + * @param mixed $join 关联的表名 + * @param mixed $condition 条件 + * @param string $type JOIN类型 + * @param array $bind 参数绑定 + * @return $this + */ + public function join($join, $condition = null, $type = 'INNER', $bind = []) + { + if (empty($condition)) { + // 如果为组数,则循环调用join + foreach ($join as $key => $value) { + if (is_array($value) && 2 <= count($value)) { + $this->join($value[0], $value[1], isset($value[2]) ? $value[2] : $type); + } + } + } else { + $table = $this->getJoinTable($join); + if ($bind) { + $this->bindParams($condition, $bind); + } + $this->options['join'][] = [$table, strtoupper($type), $condition]; + } + + return $this; + } + + /** + * LEFT JOIN + * @access public + * @param mixed $join 关联的表名 + * @param mixed $condition 条件 + * @param array $bind 参数绑定 + * @return $this + */ + public function leftJoin($join, $condition = null, $bind = []) + { + return $this->join($join, $condition, 'LEFT'); + } + + /** + * RIGHT JOIN + * @access public + * @param mixed $join 关联的表名 + * @param mixed $condition 条件 + * @param array $bind 参数绑定 + * @return $this + */ + public function rightJoin($join, $condition = null, $bind = []) + { + return $this->join($join, $condition, 'RIGHT'); + } + + /** + * FULL JOIN + * @access public + * @param mixed $join 关联的表名 + * @param mixed $condition 条件 + * @param array $bind 参数绑定 + * @return $this + */ + public function fullJoin($join, $condition = null, $bind = []) + { + return $this->join($join, $condition, 'FULL'); + } + + /** + * 获取Join表名及别名 支持 + * ['prefix_table或者子查询'=>'alias'] 'table alias' + * @access protected + * @param array|string $join + * @param string $alias + * @return string + */ + protected function getJoinTable($join, &$alias = null) + { + if (is_array($join)) { + $table = $join; + $alias = array_shift($join); + } else { + $join = trim($join); + + if (false !== strpos($join, '(')) { + // 使用子查询 + $table = $join; + } else { + $prefix = $this->prefix; + if (strpos($join, ' ')) { + // 使用别名 + list($table, $alias) = explode(' ', $join); + } else { + $table = $join; + if (false === strpos($join, '.') && 0 !== strpos($join, '__')) { + $alias = $join; + } + } + + if ($prefix && false === strpos($table, '.') && 0 !== strpos($table, $prefix) && 0 !== strpos($table, '__')) { + $table = $this->getTable($table); + } + } + + if (isset($alias) && $table != $alias) { + $table = [$table => $alias]; + } + } + + return $table; + } + + /** + * 查询SQL组装 union + * @access public + * @param mixed $union + * @param boolean $all + * @return $this + */ + public function union($union, $all = false) + { + if (empty($union)) { + return $this; + } + + $this->options['union']['type'] = $all ? 'UNION ALL' : 'UNION'; + + if (is_array($union)) { + $this->options['union'] = array_merge($this->options['union'], $union); + } else { + $this->options['union'][] = $union; + } + + return $this; + } + + /** + * 查询SQL组装 union all + * @access public + * @param mixed $union + * @return $this + */ + public function unionAll($union) + { + return $this->union($union, true); + } + + /** + * 指定查询字段 支持字段排除和指定数据表 + * @access public + * @param mixed $field + * @param boolean $except 是否排除 + * @param string $tableName 数据表名 + * @param string $prefix 字段前缀 + * @param string $alias 别名前缀 + * @return $this + */ + public function field($field, $except = false, $tableName = '', $prefix = '', $alias = '') + { + if (empty($field)) { + return $this; + } elseif ($field instanceof Expression) { + $this->options['field'][] = $field; + return $this; + } + + if (is_string($field)) { + if (preg_match('/[\<\'\"\(]/', $field)) { + return $this->fieldRaw($field); + } + + $field = array_map('trim', explode(',', $field)); + } + + if (true === $field) { + // 获取全部字段 + $fields = $this->getTableFields($tableName); + $field = $fields ?: ['*']; + } elseif ($except) { + // 字段排除 + $fields = $this->getTableFields($tableName); + $field = $fields ? array_diff($fields, $field) : $field; + } + + if ($tableName) { + // 添加统一的前缀 + $prefix = $prefix ?: $tableName; + foreach ($field as $key => &$val) { + if (is_numeric($key) && $alias) { + $field[$prefix . '.' . $val] = $alias . $val; + unset($field[$key]); + } elseif (is_numeric($key)) { + $val = $prefix . '.' . $val; + } + } + } + + if (isset($this->options['field'])) { + $field = array_merge((array) $this->options['field'], $field); + } + + $this->options['field'] = array_unique($field); + + return $this; + } + + /** + * 表达式方式指定查询字段 + * @access public + * @param string $field 字段名 + * @return $this + */ + public function fieldRaw($field) + { + $this->options['field'][] = $this->raw($field); + + return $this; + } + + /** + * 设置数据 + * @access public + * @param mixed $field 字段名或者数据 + * @param mixed $value 字段值 + * @return $this + */ + public function data($field, $value = null) + { + if (is_array($field)) { + $this->options['data'] = isset($this->options['data']) ? array_merge($this->options['data'], $field) : $field; + } else { + $this->options['data'][$field] = $value; + } + + return $this; + } + + /** + * 字段值增长 + * @access public + * @param string|array $field 字段名 + * @param integer $step 增长值 + * @return $this + */ + public function inc($field, $step = 1, $op = 'INC') + { + $fields = is_string($field) ? explode(',', $field) : $field; + + foreach ($fields as $field => $val) { + if (is_numeric($field)) { + $field = $val; + } else { + $step = $val; + } + + $this->data($field, [$op, $step]); + } + + return $this; + } + + /** + * 字段值减少 + * @access public + * @param string|array $field 字段名 + * @param integer $step 增长值 + * @return $this + */ + public function dec($field, $step = 1) + { + return $this->inc($field, $step, 'DEC'); + } + + /** + * 使用表达式设置数据 + * @access public + * @param string $field 字段名 + * @param string $value 字段值 + * @return $this + */ + public function exp($field, $value) + { + $this->data($field, $this->raw($value)); + return $this; + } + + /** + * 使用表达式设置数据 + * @access public + * @param mixed $value 表达式 + * @return Expression + */ + public function raw($value) + { + return new Expression($value); + } + + /** + * 指定JOIN查询字段 + * @access public + * @param string|array $table 数据表 + * @param string|array $field 查询字段 + * @param mixed $on JOIN条件 + * @param string $type JOIN类型 + * @return $this + */ + public function view($join, $field = true, $on = null, $type = 'INNER') + { + $this->options['view'] = true; + + if (is_array($join) && key($join) === 0) { + foreach ($join as $key => $val) { + $this->view($val[0], $val[1], isset($val[2]) ? $val[2] : null, isset($val[3]) ? $val[3] : 'INNER'); + } + } else { + $fields = []; + $table = $this->getJoinTable($join, $alias); + + if (true === $field) { + $fields = $alias . '.*'; + } else { + if (is_string($field)) { + $field = explode(',', $field); + } + + foreach ($field as $key => $val) { + if (is_numeric($key)) { + $fields[] = $alias . '.' . $val; + + $this->options['map'][$val] = $alias . '.' . $val; + } else { + if (preg_match('/[,=\.\'\"\(\s]/', $key)) { + $name = $key; + } else { + $name = $alias . '.' . $key; + } + + $fields[] = $name . ' AS ' . $val; + + $this->options['map'][$val] = $name; + } + } + } + + $this->field($fields); + + if ($on) { + $this->join($table, $on, $type); + } else { + $this->table($table); + } + } + + return $this; + } + + /** + * 设置分表规则 + * @access public + * @param array $data 操作的数据 + * @param string $field 分表依据的字段 + * @param array $rule 分表规则 + * @return $this + */ + public function partition($data, $field, $rule = []) + { + $this->options['table'] = $this->getPartitionTableName($data, $field, $rule); + + return $this; + } + + /** + * 指定AND查询条件 + * @access public + * @param mixed $field 查询字段 + * @param mixed $op 查询表达式 + * @param mixed $condition 查询条件 + * @return $this + */ + public function where($field, $op = null, $condition = null) + { + $param = func_get_args(); + array_shift($param); + return $this->parseWhereExp('AND', $field, $op, $condition, $param); + } + + /** + * 指定OR查询条件 + * @access public + * @param mixed $field 查询字段 + * @param mixed $op 查询表达式 + * @param mixed $condition 查询条件 + * @return $this + */ + public function whereOr($field, $op = null, $condition = null) + { + $param = func_get_args(); + array_shift($param); + return $this->parseWhereExp('OR', $field, $op, $condition, $param); + } + + /** + * 指定XOR查询条件 + * @access public + * @param mixed $field 查询字段 + * @param mixed $op 查询表达式 + * @param mixed $condition 查询条件 + * @return $this + */ + public function whereXor($field, $op = null, $condition = null) + { + $param = func_get_args(); + array_shift($param); + return $this->parseWhereExp('XOR', $field, $op, $condition, $param); + } + + /** + * 指定Null查询条件 + * @access public + * @param mixed $field 查询字段 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereNull($field, $logic = 'AND') + { + return $this->parseWhereExp($logic, $field, 'NULL', null, [], true); + } + + /** + * 指定NotNull查询条件 + * @access public + * @param mixed $field 查询字段 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereNotNull($field, $logic = 'AND') + { + return $this->parseWhereExp($logic, $field, 'NOTNULL', null, [], true); + } + + /** + * 指定Exists查询条件 + * @access public + * @param mixed $condition 查询条件 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereExists($condition, $logic = 'AND') + { + if (is_string($condition)) { + $condition = $this->raw($condition); + } + + $this->options['where'][strtoupper($logic)][] = ['', 'EXISTS', $condition]; + return $this; + } + + /** + * 指定NotExists查询条件 + * @access public + * @param mixed $condition 查询条件 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereNotExists($condition, $logic = 'AND') + { + if (is_string($condition)) { + $condition = $this->raw($condition); + } + + $this->options['where'][strtoupper($logic)][] = ['', 'NOT EXISTS', $condition]; + return $this; + } + + /** + * 指定In查询条件 + * @access public + * @param mixed $field 查询字段 + * @param mixed $condition 查询条件 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereIn($field, $condition, $logic = 'AND') + { + return $this->parseWhereExp($logic, $field, 'IN', $condition, [], true); + } + + /** + * 指定NotIn查询条件 + * @access public + * @param mixed $field 查询字段 + * @param mixed $condition 查询条件 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereNotIn($field, $condition, $logic = 'AND') + { + return $this->parseWhereExp($logic, $field, 'NOT IN', $condition, [], true); + } + + /** + * 指定Like查询条件 + * @access public + * @param mixed $field 查询字段 + * @param mixed $condition 查询条件 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereLike($field, $condition, $logic = 'AND') + { + return $this->parseWhereExp($logic, $field, 'LIKE', $condition, [], true); + } + + /** + * 指定NotLike查询条件 + * @access public + * @param mixed $field 查询字段 + * @param mixed $condition 查询条件 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereNotLike($field, $condition, $logic = 'AND') + { + return $this->parseWhereExp($logic, $field, 'NOT LIKE', $condition, [], true); + } + + /** + * 指定Between查询条件 + * @access public + * @param mixed $field 查询字段 + * @param mixed $condition 查询条件 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereBetween($field, $condition, $logic = 'AND') + { + return $this->parseWhereExp($logic, $field, 'BETWEEN', $condition, [], true); + } + + /** + * 指定NotBetween查询条件 + * @access public + * @param mixed $field 查询字段 + * @param mixed $condition 查询条件 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereNotBetween($field, $condition, $logic = 'AND') + { + return $this->parseWhereExp($logic, $field, 'NOT BETWEEN', $condition, [], true); + } + + /** + * 比较两个字段 + * @access public + * @param string|array $field1 查询字段 + * @param string $operator 比较操作符 + * @param string $field2 比较字段 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereColumn($field1, $operator = null, $field2 = null, $logic = 'AND') + { + if (is_array($field1)) { + foreach ($field1 as $item) { + $this->whereColumn($item[0], $item[1], isset($item[2]) ? $item[2] : null); + } + return $this; + } + + if (is_null($field2)) { + $field2 = $operator; + $operator = '='; + } + + return $this->parseWhereExp($logic, $field1, 'COLUMN', [$operator, $field2], [], true); + } + + /** + * 设置软删除字段及条件 + * @access public + * @param false|string $field 查询字段 + * @param mixed $condition 查询条件 + * @return $this + */ + public function useSoftDelete($field, $condition = null) + { + if ($field) { + $this->options['soft_delete'] = [$field, $condition]; + } + + return $this; + } + + /** + * 指定Exp查询条件 + * @access public + * @param mixed $field 查询字段 + * @param string $where 查询条件 + * @param array $bind 参数绑定 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereExp($field, $where, $bind = [], $logic = 'AND') + { + if ($bind) { + $this->bindParams($where, $bind); + } + + $this->options['where'][$logic][] = [$field, 'EXP', $this->raw($where)]; + + return $this; + } + + /** + * 指定表达式查询条件 + * @access public + * @param string $where 查询条件 + * @param array $bind 参数绑定 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function whereRaw($where, $bind = [], $logic = 'AND') + { + if ($bind) { + $this->bindParams($where, $bind); + } + + $this->options['where'][$logic][] = $this->raw($where); + + return $this; + } + + /** + * 参数绑定 + * @access public + * @param string $sql 绑定的sql表达式 + * @param array $bind 参数绑定 + * @return void + */ + protected function bindParams(&$sql, array $bind = []) + { + foreach ($bind as $key => $value) { + if (is_array($value)) { + $name = $this->bind($value[0], $value[1], isset($value[2]) ? $value[2] : null); + } else { + $name = $this->bind($value); + } + + if (is_numeric($key)) { + $sql = substr_replace($sql, ':' . $name, strpos($sql, '?'), 1); + } else { + $sql = str_replace(':' . $key, ':' . $name, $sql); + } + } + } + + /** + * 指定表达式查询条件 OR + * @access public + * @param string $where 查询条件 + * @param array $bind 参数绑定 + * @return $this + */ + public function whereOrRaw($where, $bind = []) + { + return $this->whereRaw($where, $bind, 'OR'); + } + + /** + * 分析查询表达式 + * @access protected + * @param string $logic 查询逻辑 and or xor + * @param mixed $field 查询字段 + * @param mixed $op 查询表达式 + * @param mixed $condition 查询条件 + * @param array $param 查询参数 + * @param bool $strict 严格模式 + * @return $this + */ + protected function parseWhereExp($logic, $field, $op, $condition, array $param = [], $strict = false) + { + if ($field instanceof $this) { + $this->options['where'] = $field->getOptions('where'); + $this->bind($field->getBind(false)); + return $this; + } + + $logic = strtoupper($logic); + + if ($field instanceof Where) { + $this->options['where'][$logic] = $field->parse(); + return $this; + } + + if (is_string($field) && !empty($this->options['via']) && false === strpos($field, '.')) { + $field = $this->options['via'] . '.' . $field; + } + + if ($field instanceof Expression) { + return $this->whereRaw($field, is_array($op) ? $op : [], $logic); + } elseif ($strict) { + // 使用严格模式查询 + $where = [$field, $op, $condition, $logic]; + } elseif (is_array($field)) { + // 解析数组批量查询 + return $this->parseArrayWhereItems($field, $logic); + } elseif ($field instanceof \Closure) { + $where = $field; + } elseif (is_string($field)) { + if (preg_match('/[,=\<\'\"\(\s]/', $field)) { + return $this->whereRaw($field, $op, $logic); + } elseif (is_string($op) && strtolower($op) == 'exp') { + $bind = isset($param[2]) && is_array($param[2]) ? $param[2] : null; + return $this->whereExp($field, $condition, $bind, $logic); + } + + $where = $this->parseWhereItem($logic, $field, $op, $condition, $param); + } + + if (!empty($where)) { + $this->options['where'][$logic][] = $where; + } + + return $this; + } + + /** + * 分析查询表达式 + * @access protected + * @param string $logic 查询逻辑 and or xor + * @param mixed $field 查询字段 + * @param mixed $op 查询表达式 + * @param mixed $condition 查询条件 + * @param array $param 查询参数 + * @return mixed + */ + protected function parseWhereItem($logic, $field, $op, $condition, $param = []) + { + if (is_array($op)) { + // 同一字段多条件查询 + array_unshift($param, $field); + $where = $param; + } elseif ($field && is_null($condition)) { + if (in_array(strtoupper($op), ['NULL', 'NOTNULL', 'NOT NULL'], true)) { + // null查询 + $where = [$field, $op, '']; + } elseif (in_array($op, ['=', 'eq', 'EQ', null], true)) { + $where = [$field, 'NULL', '']; + } elseif (in_array($op, ['<>', 'neq', 'NEQ'], true)) { + $where = [$field, 'NOTNULL', '']; + } else { + // 字段相等查询 + $where = [$field, '=', $op]; + } + } elseif (in_array(strtoupper($op), ['EXISTS', 'NOT EXISTS', 'NOTEXISTS'], true)) { + $where = [$field, $op, is_string($condition) ? $this->raw($condition) : $condition]; + } else { + $where = $field ? [$field, $op, $condition, isset($param[2]) ? $param[2] : null] : null; + } + + return $where; + } + + /** + * 数组批量查询 + * @access protected + * @param array $field 批量查询 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + protected function parseArrayWhereItems($field, $logic) + { + if (key($field) !== 0) { + $where = []; + foreach ($field as $key => $val) { + if ($val instanceof Expression) { + $where[] = [$key, 'exp', $val]; + } elseif (is_null($val)) { + $where[] = [$key, 'NULL', '']; + } else { + $where[] = [$key, is_array($val) ? 'IN' : '=', $val]; + } + } + } else { + // 数组批量查询 + $where = $field; + } + + if (!empty($where)) { + $this->options['where'][$logic] = isset($this->options['where'][$logic]) ? array_merge($this->options['where'][$logic], $where) : $where; + } + + return $this; + } + + /** + * 去除某个查询条件 + * @access public + * @param string $field 查询字段 + * @param string $logic 查询逻辑 and or xor + * @return $this + */ + public function removeWhereField($field, $logic = 'AND') + { + $logic = strtoupper($logic); + + if (isset($this->options['where'][$logic])) { + foreach ($this->options['where'][$logic] as $key => $val) { + if (is_array($val) && $val[0] == $field) { + unset($this->options['where'][$logic][$key]); + } + } + } + + return $this; + } + + /** + * 去除查询参数 + * @access public + * @param string|bool $option 参数名 true 表示去除所有参数 + * @return $this + */ + public function removeOption($option = true) + { + if (true === $option) { + $this->options = []; + $this->bind = []; + } elseif (is_string($option) && isset($this->options[$option])) { + unset($this->options[$option]); + } + + return $this; + } + + /** + * 条件查询 + * @access public + * @param mixed $condition 满足条件(支持闭包) + * @param \Closure|array $query 满足条件后执行的查询表达式(闭包或数组) + * @param \Closure|array $otherwise 不满足条件后执行 + * @return $this + */ + public function when($condition, $query, $otherwise = null) + { + if ($condition instanceof \Closure) { + $condition = $condition($this); + } + + if ($condition) { + if ($query instanceof \Closure) { + $query($this, $condition); + } elseif (is_array($query)) { + $this->where($query); + } + } elseif ($otherwise) { + if ($otherwise instanceof \Closure) { + $otherwise($this, $condition); + } elseif (is_array($otherwise)) { + $this->where($otherwise); + } + } + + return $this; + } + + /** + * 指定查询数量 + * @access public + * @param mixed $offset 起始位置 + * @param mixed $length 查询数量 + * @return $this + */ + public function limit($offset, $length = null) + { + if (is_null($length) && strpos($offset, ',')) { + list($offset, $length) = explode(',', $offset); + } + + $this->options['limit'] = intval($offset) . ($length ? ',' . intval($length) : ''); + + return $this; + } + + /** + * 指定分页 + * @access public + * @param mixed $page 页数 + * @param mixed $listRows 每页数量 + * @return $this + */ + public function page($page, $listRows = null) + { + if (is_null($listRows) && strpos($page, ',')) { + list($page, $listRows) = explode(',', $page); + } + + $this->options['page'] = [intval($page), intval($listRows)]; + + return $this; + } + + /** + * 分页查询 + * @access public + * @param int|array $listRows 每页数量 数组表示配置参数 + * @param int|bool $simple 是否简洁模式或者总记录数 + * @param array $config 配置参数 + * page:当前页, + * path:url路径, + * query:url额外参数, + * fragment:url锚点, + * var_page:分页变量, + * list_rows:每页数量 + * type:分页类名 + * @return \think\Paginator + * @throws DbException + */ + public function paginate($listRows = null, $simple = false, $config = []) + { + if (is_int($simple)) { + $total = $simple; + $simple = false; + } + + $paginate = Container::get('config')->pull('paginate'); + + if (is_array($listRows)) { + $config = array_merge($paginate, $listRows); + $listRows = $config['list_rows']; + } else { + $config = array_merge($paginate, $config); + $listRows = $listRows ?: $config['list_rows']; + } + + /** @var Paginator $class */ + $class = false !== strpos($config['type'], '\\') ? $config['type'] : '\\think\\paginator\\driver\\' . ucwords($config['type']); + $page = isset($config['page']) ? (int) $config['page'] : call_user_func([ + $class, + 'getCurrentPage', + ], $config['var_page']); + + $page = $page < 1 ? 1 : $page; + + $config['path'] = isset($config['path']) ? $config['path'] : call_user_func([$class, 'getCurrentPath']); + + if (!isset($total) && !$simple) { + $options = $this->getOptions(); + + unset($this->options['order'], $this->options['limit'], $this->options['page'], $this->options['field']); + + $bind = $this->bind; + $total = $this->count(); + $results = $this->options($options)->bind($bind)->page($page, $listRows)->select(); + } elseif ($simple) { + $results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select(); + $total = null; + } else { + $results = $this->page($page, $listRows)->select(); + } + + $this->removeOption('limit'); + $this->removeOption('page'); + + return $class::make($results, $listRows, $page, $total, $simple, $config); + } + + /** + * 指定当前操作的数据表 + * @access public + * @param mixed $table 表名 + * @return $this + */ + public function table($table) + { + if (is_string($table)) { + if (strpos($table, ')')) { + // 子查询 + } elseif (strpos($table, ',')) { + $tables = explode(',', $table); + $table = []; + + foreach ($tables as $item) { + list($item, $alias) = explode(' ', trim($item)); + if ($alias) { + $this->alias([$item => $alias]); + $table[$item] = $alias; + } else { + $table[] = $item; + } + } + } elseif (strpos($table, ' ')) { + list($table, $alias) = explode(' ', $table); + + $table = [$table => $alias]; + $this->alias($table); + } + } else { + $tables = $table; + $table = []; + + foreach ($tables as $key => $val) { + if (is_numeric($key)) { + $table[] = $val; + } else { + $this->alias([$key => $val]); + $table[$key] = $val; + } + } + } + + $this->options['table'] = $table; + + return $this; + } + + /** + * USING支持 用于多表删除 + * @access public + * @param mixed $using + * @return $this + */ + public function using($using) + { + $this->options['using'] = $using; + return $this; + } + + /** + * 指定排序 order('id','desc') 或者 order(['id'=>'desc','create_time'=>'desc']) + * @access public + * @param string|array $field 排序字段 + * @param string $order 排序 + * @return $this + */ + public function order($field, $order = null) + { + if (empty($field)) { + return $this; + } elseif ($field instanceof Expression) { + $this->options['order'][] = $field; + return $this; + } + + if (is_string($field)) { + if (!empty($this->options['via'])) { + $field = $this->options['via'] . '.' . $field; + } + + if (strpos($field, ',')) { + $field = array_map('trim', explode(',', $field)); + } else { + $field = empty($order) ? $field : [$field => $order]; + } + } elseif (!empty($this->options['via'])) { + foreach ($field as $key => $val) { + if (is_numeric($key)) { + $field[$key] = $this->options['via'] . '.' . $val; + } else { + $field[$this->options['via'] . '.' . $key] = $val; + unset($field[$key]); + } + } + } + + if (!isset($this->options['order'])) { + $this->options['order'] = []; + } + + if (is_array($field)) { + $this->options['order'] = array_merge($this->options['order'], $field); + } else { + $this->options['order'][] = $field; + } + + return $this; + } + + /** + * 表达式方式指定Field排序 + * @access public + * @param string $field 排序字段 + * @param array $bind 参数绑定 + * @return $this + */ + public function orderRaw($field, $bind = []) + { + if ($bind) { + $this->bindParams($field, $bind); + } + + $this->options['order'][] = $this->raw($field); + + return $this; + } + + /** + * 指定Field排序 order('id',[1,2,3],'desc') + * @access public + * @param string|array $field 排序字段 + * @param array $values 排序值 + * @param string $order + * @return $this + */ + public function orderField($field, array $values, $order = '') + { + if (!empty($values)) { + $values['sort'] = $order; + + $this->options['order'][$field] = $values; + } + + return $this; + } + + /** + * 随机排序 + * @access public + * @return $this + */ + public function orderRand() + { + $this->options['order'][] = '[rand]'; + return $this; + } + + /** + * 查询缓存 + * @access public + * @param mixed $key 缓存key + * @param integer|\DateTime $expire 缓存有效期 + * @param string $tag 缓存标签 + * @return $this + */ + public function cache($key = true, $expire = null, $tag = null) + { + // 增加快捷调用方式 cache(10) 等同于 cache(true, 10) + if ($key instanceof \DateTime || (is_numeric($key) && is_null($expire))) { + $expire = $key; + $key = true; + } + + if (false !== $key) { + $this->options['cache'] = ['key' => $key, 'expire' => $expire, 'tag' => $tag]; + } + + return $this; + } + + /** + * 指定group查询 + * @access public + * @param string|array $group GROUP + * @return $this + */ + public function group($group) + { + $this->options['group'] = $group; + return $this; + } + + /** + * 指定having查询 + * @access public + * @param string $having having + * @return $this + */ + public function having($having) + { + $this->options['having'] = $having; + return $this; + } + + /** + * 指定查询lock + * @access public + * @param bool|string $lock 是否lock + * @return $this + */ + public function lock($lock = false) + { + $this->options['lock'] = $lock; + $this->options['master'] = true; + + return $this; + } + + /** + * 指定distinct查询 + * @access public + * @param string $distinct 是否唯一 + * @return $this + */ + public function distinct($distinct) + { + $this->options['distinct'] = $distinct; + return $this; + } + + /** + * 指定数据表别名 + * @access public + * @param array|string $alias 数据表别名 + * @return $this + */ + public function alias($alias) + { + if (is_array($alias)) { + foreach ($alias as $key => $val) { + if (false !== strpos($key, '__')) { + $table = $this->connection->parseSqlTable($key); + } else { + $table = $key; + } + $this->options['alias'][$table] = $val; + } + } else { + if (isset($this->options['table'])) { + $table = is_array($this->options['table']) ? key($this->options['table']) : $this->options['table']; + if (false !== strpos($table, '__')) { + $table = $this->connection->parseSqlTable($table); + } + } else { + $table = $this->getTable(); + } + + $this->options['alias'][$table] = $alias; + } + + return $this; + } + + /** + * 指定强制索引 + * @access public + * @param string $force 索引名称 + * @return $this + */ + public function force($force) + { + $this->options['force'] = $force; + return $this; + } + + /** + * 查询注释 + * @access public + * @param string $comment 注释 + * @return $this + */ + public function comment($comment) + { + $this->options['comment'] = $comment; + return $this; + } + + /** + * 获取执行的SQL语句 + * @access public + * @param boolean $fetch 是否返回sql + * @return $this + */ + public function fetchSql($fetch = true) + { + $this->options['fetch_sql'] = $fetch; + return $this; + } + + /** + * 不主动获取数据集 + * @access public + * @param bool $pdo 是否返回 PDOStatement 对象 + * @return $this + */ + public function fetchPdo($pdo = true) + { + $this->options['fetch_pdo'] = $pdo; + return $this; + } + + /** + * 设置是否返回数据集对象(支持设置数据集对象类名) + * @access public + * @param bool|string $collection 是否返回数据集对象 + * @return $this + */ + public function fetchCollection($collection = true) + { + $this->options['collection'] = $collection; + + return $this; + } + + /** + * 设置从主服务器读取数据 + * @access public + * @return $this + */ + public function master() + { + $this->options['master'] = true; + return $this; + } + + /** + * 设置是否严格检查字段名 + * @access public + * @param bool $strict 是否严格检查字段 + * @return $this + */ + public function strict($strict = true) + { + $this->options['strict'] = $strict; + return $this; + } + + /** + * 设置查询数据不存在是否抛出异常 + * @access public + * @param bool $fail 数据不存在是否抛出异常 + * @return $this + */ + public function failException($fail = true) + { + $this->options['fail'] = $fail; + return $this; + } + + /** + * 设置自增序列名 + * @access public + * @param string $sequence 自增序列名 + * @return $this + */ + public function sequence($sequence = null) + { + $this->options['sequence'] = $sequence; + return $this; + } + + /** + * 设置需要隐藏的输出属性 + * @access public + * @param mixed $hidden 需要隐藏的字段名 + * @return $this + */ + public function hidden($hidden) + { + if ($this->model) { + $this->options['hidden'] = $hidden; + return $this; + } + + return $this->field($hidden, true); + } + + /** + * 设置需要输出的属性 + * @access public + * @param array $visible 需要输出的属性 + * @return $this + */ + public function visible(array $visible) + { + $this->options['visible'] = $visible; + return $this; + } + + /** + * 设置需要附加的输出属性 + * @access public + * @param array $append 属性列表 + * @return $this + */ + public function append(array $append = []) + { + $this->options['append'] = $append; + return $this; + } + + /** + * 设置数据字段获取器 + * @access public + * @param string|array $name 字段名 + * @param callable $callback 闭包获取器 + * @return $this + */ + public function withAttr($name, $callback = null) + { + if (is_array($name)) { + $this->options['with_attr'] = $name; + } else { + $this->options['with_attr'][$name] = $callback; + } + + return $this; + } + + /** + * 设置JSON字段信息 + * @access public + * @param array $json JSON字段 + * @param bool $assoc 是否取出数组 + * @return $this + */ + public function json(array $json = [], $assoc = false) + { + $this->options['json'] = $json; + $this->options['json_assoc'] = $assoc; + return $this; + } + + /** + * 设置字段类型信息 + * @access public + * @param array $type 字段类型信息 + * @return $this + */ + public function setJsonFieldType(array $type) + { + $this->options['field_type'] = $type; + return $this; + } + + /** + * 获取字段类型信息 + * @access public + * @param string $field 字段名 + * @return string|null + */ + public function getJsonFieldType($field) + { + return isset($this->options['field_type'][$field]) ? $this->options['field_type'][$field] : null; + } + + /** + * 是否允许返回空数据(或空模型) + * @access public + * @param bool $allowEmpty 是否允许为空 + * @return $this + */ + public function allowEmpty($allowEmpty = true) + { + $this->options['allow_empty'] = $allowEmpty; + return $this; + } + + /** + * 添加查询范围 + * @access public + * @param array|string|\Closure $scope 查询范围定义 + * @param array $args 参数 + * @return $this + */ + public function scope($scope, ...$args) + { + // 查询范围的第一个参数始终是当前查询对象 + array_unshift($args, $this); + + if ($scope instanceof \Closure) { + call_user_func_array($scope, $args); + return $this; + } + + if (is_string($scope)) { + $scope = explode(',', $scope); + } + + if ($this->model) { + // 检查模型类的查询范围方法 + foreach ($scope as $name) { + $method = 'scope' . trim($name); + + if (method_exists($this->model, $method)) { + call_user_func_array([$this->model, $method], $args); + } + } + } + + return $this; + } + + /** + * 使用搜索器条件搜索字段 + * @access public + * @param array $fields 搜索字段 + * @param array $data 搜索数据 + * @param string $prefix 字段前缀标识 + * @return $this + */ + public function withSearch(array $fields, array $data = [], $prefix = '') + { + foreach ($fields as $key => $field) { + if ($field instanceof \Closure) { + $field($this, isset($data[$key]) ? $data[$key] : null, $data, $prefix); + } elseif ($this->model) { + // 检测搜索器 + $fieldName = is_numeric($key) ? $field : $key; + $method = 'search' . Loader::parseName($fieldName, 1) . 'Attr'; + + if (method_exists($this->model, $method)) { + $this->model->$method($this, isset($data[$field]) ? $data[$field] : null, $data, $prefix); + } + } + } + + return $this; + } + + /** + * 指定数据表主键 + * @access public + * @param string $pk 主键 + * @return $this + */ + public function pk($pk) + { + $this->pk = $pk; + return $this; + } + + /** + * 查询日期或者时间 + * @access public + * @param string $name 时间表达式 + * @param string|array $rule 时间范围 + * @return $this + */ + public function timeRule($name, $rule) + { + $this->timeRule[$name] = $rule; + return $this; + } + + /** + * 查询日期或者时间 + * @access public + * @param string $field 日期字段名 + * @param string|array $op 比较运算符或者表达式 + * @param string|array $range 比较范围 + * @param string $logic AND OR + * @return $this + */ + public function whereTime($field, $op, $range = null, $logic = 'AND') + { + if (is_null($range)) { + if (is_array($op)) { + $range = $op; + } else { + if (isset($this->timeExp[strtolower($op)])) { + $op = $this->timeExp[strtolower($op)]; + } + + if (isset($this->timeRule[strtolower($op)])) { + $range = $this->timeRule[strtolower($op)]; + } else { + $range = $op; + } + } + + $op = is_array($range) ? 'between' : '>='; + } + + return $this->parseWhereExp($logic, $field, strtolower($op) . ' time', $range, [], true); + } + + /** + * 查询当前时间在两个时间字段范围 + * @access public + * @param string $startField 开始时间字段 + * @param string $endField 结束时间字段 + * @return $this + */ + public function whereBetweenTimeField($startField, $endField) + { + return $this->whereTime($startField, '<=', time()) + ->whereTime($endField, '>=', time()); + } + + /** + * 查询当前时间不在两个时间字段范围 + * @access public + * @param string $startField 开始时间字段 + * @param string $endField 结束时间字段 + * @return $this + */ + public function whereNotBetweenTimeField($startField, $endField) + { + return $this->whereTime($startField, '>', time()) + ->whereTime($endField, '<', time(), 'OR'); + } + + /** + * 查询日期或者时间范围 + * @access public + * @param string $field 日期字段名 + * @param string $startTime 开始时间 + * @param string $endTime 结束时间 + * @param string $logic AND OR + * @return $this + */ + public function whereBetweenTime($field, $startTime, $endTime = null, $logic = 'AND') + { + if (is_null($endTime)) { + $time = is_string($startTime) ? strtotime($startTime) : $startTime; + $endTime = strtotime('+1 day', $time); + } + + return $this->parseWhereExp($logic, $field, 'between time', [$startTime, $endTime], [], true); + } + + /** + * 获取当前数据表的主键 + * @access public + * @param string|array $options 数据表名或者查询参数 + * @return string|array + */ + public function getPk($options = '') + { + if (!empty($this->pk)) { + $pk = $this->pk; + } else { + $pk = $this->connection->getPk(is_array($options) && isset($options['table']) ? $options['table'] : $this->getTable()); + } + + return $pk; + } + + /** + * 参数绑定 + * @access public + * @param mixed $value 绑定变量值 + * @param integer $type 绑定类型 + * @param string $name 绑定名称 + * @return $this|string + */ + public function bind($value, $type = PDO::PARAM_STR, $name = null) + { + if (is_array($value)) { + $this->bind = array_merge($this->bind, $value); + } else { + $name = $name ?: 'ThinkBind_' . (count($this->bind) + 1) . '_'; + + $this->bind[$name] = [$value, $type]; + return $name; + } + + return $this; + } + + /** + * 检测参数是否已经绑定 + * @access public + * @param string $key 参数名 + * @return bool + */ + public function isBind($key) + { + return isset($this->bind[$key]); + } + + /** + * 查询参数赋值 + * @access public + * @param string $name 参数名 + * @param mixed $value 值 + * @return $this + */ + public function option($name, $value) + { + $this->options[$name] = $value; + return $this; + } + + /** + * 查询参数赋值 + * @access protected + * @param array $options 表达式参数 + * @return $this + */ + protected function options(array $options) + { + $this->options = $options; + return $this; + } + + /** + * 获取当前的查询参数 + * @access public + * @param string $name 参数名 + * @return mixed + */ + public function getOptions($name = '') + { + if ('' === $name) { + return $this->options; + } + return isset($this->options[$name]) ? $this->options[$name] : null; + } + + /** + * 设置当前的查询参数 + * @access public + * @param string $option 参数名 + * @param mixed $value 参数值 + * @return $this + */ + public function setOption($option, $value) + { + $this->options[$option] = $value; + return $this; + } + + /** + * 设置关联查询JOIN预查询 + * @access public + * @param string|array $with 关联方法名称 + * @return $this + */ + public function with($with) + { + if (empty($with)) { + return $this; + } + + if (is_string($with)) { + $with = explode(',', $with); + } + + $first = true; + + /** @var Model $class */ + $class = $this->model; + foreach ($with as $key => $relation) { + $closure = null; + + if ($relation instanceof \Closure) { + // 支持闭包查询过滤关联条件 + $closure = $relation; + $relation = $key; + } elseif (is_array($relation)) { + $relation = $key; + } elseif (is_string($relation) && strpos($relation, '.')) { + list($relation, $subRelation) = explode('.', $relation, 2); + } + + /** @var Relation $model */ + $relation = Loader::parseName($relation, 1, false); + $model = $class->$relation(); + + if ($model instanceof OneToOne && 0 == $model->getEagerlyType()) { + $table = $model->getTable(); + $model->removeOption() + ->table($table) + ->eagerly($this, $relation, true, '', $closure, $first); + $first = false; + } + } + + $this->via(); + + $this->options['with'] = $with; + + return $this; + } + + /** + * 关联预载入 JOIN方式(不支持嵌套) + * @access protected + * @param string|array $with 关联方法名 + * @param string $joinType JOIN方式 + * @return $this + */ + public function withJoin($with, $joinType = '') + { + if (empty($with)) { + return $this; + } + + if (is_string($with)) { + $with = explode(',', $with); + } + + $first = true; + + /** @var Model $class */ + $class = $this->model; + foreach ($with as $key => $relation) { + $closure = null; + $field = true; + + if ($relation instanceof \Closure) { + // 支持闭包查询过滤关联条件 + $closure = $relation; + $relation = $key; + } elseif (is_array($relation)) { + $field = $relation; + $relation = $key; + } elseif (is_string($relation) && strpos($relation, '.')) { + list($relation, $subRelation) = explode('.', $relation, 2); + } + + /** @var Relation $model */ + $relation = Loader::parseName($relation, 1, false); + $model = $class->$relation(); + + if ($model instanceof OneToOne) { + $model->eagerly($this, $relation, $field, $joinType, $closure, $first); + $first = false; + } else { + // 不支持其它关联 + unset($with[$key]); + } + } + + $this->via(); + + $this->options['with_join'] = $with; + + return $this; + } + + /** + * 关联统计 + * @access protected + * @param string|array $relation 关联方法名 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param bool $subQuery 是否使用子查询 + * @return $this + */ + protected function withAggregate($relation, $aggregate = 'count', $field = '*', $subQuery = true) + { + $relations = is_string($relation) ? explode(',', $relation) : $relation; + + if (!$subQuery) { + $this->options['with_count'][] = [$relations, $aggregate, $field]; + } else { + if (!isset($this->options['field'])) { + $this->field('*'); + } + + foreach ($relations as $key => $relation) { + $closure = $aggregateField = null; + + if ($relation instanceof \Closure) { + $closure = $relation; + $relation = $key; + } elseif (!is_int($key)) { + $aggregateField = $relation; + $relation = $key; + } + + $relation = Loader::parseName($relation, 1, false); + + $count = $this->model->$relation()->getRelationCountQuery($closure, $aggregate, $field, $aggregateField); + + if (empty($aggregateField)) { + $aggregateField = Loader::parseName($relation) . '_' . $aggregate; + } + + $this->field(['(' . $count . ')' => $aggregateField]); + } + } + + return $this; + } + + /** + * 关联统计 + * @access public + * @param string|array $relation 关联方法名 + * @param bool $subQuery 是否使用子查询 + * @return $this + */ + public function withCount($relation, $subQuery = true) + { + return $this->withAggregate($relation, 'count', '*', $subQuery); + } + + /** + * 关联统计Sum + * @access public + * @param string|array $relation 关联方法名 + * @param string $field 字段 + * @param bool $subQuery 是否使用子查询 + * @return $this + */ + public function withSum($relation, $field, $subQuery = true) + { + return $this->withAggregate($relation, 'sum', $field, $subQuery); + } + + /** + * 关联统计Max + * @access public + * @param string|array $relation 关联方法名 + * @param string $field 字段 + * @param bool $subQuery 是否使用子查询 + * @return $this + */ + public function withMax($relation, $field, $subQuery = true) + { + return $this->withAggregate($relation, 'max', $field, $subQuery); + } + + /** + * 关联统计Min + * @access public + * @param string|array $relation 关联方法名 + * @param string $field 字段 + * @param bool $subQuery 是否使用子查询 + * @return $this + */ + public function withMin($relation, $field, $subQuery = true) + { + return $this->withAggregate($relation, 'min', $field, $subQuery); + } + + /** + * 关联统计Avg + * @access public + * @param string|array $relation 关联方法名 + * @param string $field 字段 + * @param bool $subQuery 是否使用子查询 + * @return $this + */ + public function withAvg($relation, $field, $subQuery = true) + { + return $this->withAggregate($relation, 'avg', $field, $subQuery); + } + + /** + * 关联预加载中 获取关联指定字段值 + * example: + * Model::with(['relation' => function($query){ + * $query->withField("id,name"); + * }]) + * + * @access public + * @param string | array $field 指定获取的字段 + * @return $this + */ + public function withField($field) + { + $this->options['with_field'] = $field; + + return $this; + } + + /** + * 设置当前字段添加的表别名 + * @access public + * @param string $via + * @return $this + */ + public function via($via = '') + { + $this->options['via'] = $via; + + return $this; + } + + /** + * 设置关联查询 + * @access public + * @param string|array $relation 关联名称 + * @return $this + */ + public function relation($relation) + { + if (empty($relation)) { + return $this; + } + + if (is_string($relation)) { + $relation = explode(',', $relation); + } + + if (isset($this->options['relation'])) { + $this->options['relation'] = array_merge($this->options['relation'], $relation); + } else { + $this->options['relation'] = $relation; + } + + return $this; + } + + /** + * 插入记录 + * @access public + * @param array $data 数据 + * @param boolean $replace 是否replace + * @param boolean $getLastInsID 返回自增主键 + * @param string $sequence 自增序列名 + * @return integer|string + */ + public function insert(array $data = [], $replace = false, $getLastInsID = false, $sequence = null) + { + $this->parseOptions(); + + $this->options['data'] = array_merge($this->options['data'], $data); + + return $this->connection->insert($this, $replace, $getLastInsID, $sequence); + } + + /** + * 插入记录并获取自增ID + * @access public + * @param array $data 数据 + * @param boolean $replace 是否replace + * @param string $sequence 自增序列名 + * @return integer|string + */ + public function insertGetId(array $data, $replace = false, $sequence = null) + { + return $this->insert($data, $replace, true, $sequence); + } + + /** + * 批量插入记录 + * @access public + * @param array $dataSet 数据集 + * @param boolean $replace 是否replace + * @param integer $limit 每次写入数据限制 + * @return integer|string + */ + public function insertAll(array $dataSet = [], $replace = false, $limit = null) + { + $this->parseOptions(); + + if (empty($dataSet)) { + $dataSet = $this->options['data']; + } + + if (empty($limit) && !empty($this->options['limit'])) { + $limit = $this->options['limit']; + } + + return $this->connection->insertAll($this, $dataSet, $replace, $limit); + } + + /** + * 通过Select方式插入记录 + * @access public + * @param string $fields 要插入的数据表字段名 + * @param string $table 要插入的数据表名 + * @return integer|string + * @throws PDOException + */ + public function selectInsert($fields, $table) + { + $this->parseOptions(); + + return $this->connection->selectInsert($this, $fields, $table); + } + + /** + * 更新记录 + * @access public + * @param mixed $data 数据 + * @return integer|string + * @throws Exception + * @throws PDOException + */ + public function update(array $data = []) + { + $this->parseOptions(); + + $this->options['data'] = array_merge($this->options['data'], $data); + + return $this->connection->update($this); + } + + /** + * 删除记录 + * @access public + * @param mixed $data 表达式 true 表示强制删除 + * @return int + * @throws Exception + * @throws PDOException + */ + public function delete($data = null) + { + $this->parseOptions(); + + if (!is_null($data) && true !== $data) { + // AR模式分析主键条件 + $this->parsePkWhere($data); + } + + if (!empty($this->options['soft_delete'])) { + // 软删除 + list($field, $condition) = $this->options['soft_delete']; + if ($condition) { + unset($this->options['soft_delete']); + $this->options['data'] = [$field => $condition]; + + return $this->connection->update($this); + } + } + + $this->options['data'] = $data; + + return $this->connection->delete($this); + } + + /** + * 执行查询但只返回PDOStatement对象 + * @access public + * @return \PDOStatement|string + */ + public function getPdo() + { + $this->parseOptions(); + + return $this->connection->pdo($this); + } + + /** + * 使用游标查找记录 + * @access public + * @param array|string|Query|\Closure $data + * @return \Generator + */ + public function cursor($data = null) + { + if ($data instanceof \Closure) { + $data($this); + $data = null; + } + + $this->parseOptions(); + + if (!is_null($data)) { + // 主键条件分析 + $this->parsePkWhere($data); + } + + $this->options['data'] = $data; + + $connection = clone $this->connection; + + return $connection->cursor($this); + } + + /** + * 查找记录 + * @access public + * @param array|string|Query|\Closure $data + * @return Collection|array|\PDOStatement|string + * @throws DbException + * @throws ModelNotFoundException + * @throws DataNotFoundException + */ + public function select($data = null) + { + if ($data instanceof Query) { + return $data->select(); + } elseif ($data instanceof \Closure) { + $data($this); + $data = null; + } + + $this->parseOptions(); + + if (false === $data) { + // 用于子查询 不查询只返回SQL + $this->options['fetch_sql'] = true; + } elseif (!is_null($data)) { + // 主键条件分析 + $this->parsePkWhere($data); + } + + $this->options['data'] = $data; + + $resultSet = $this->connection->select($this); + + if ($this->options['fetch_sql']) { + return $resultSet; + } + + // 返回结果处理 + if (!empty($this->options['fail']) && count($resultSet) == 0) { + $this->throwNotFound($this->options); + } + + // 数据列表读取后的处理 + if (!empty($this->model)) { + // 生成模型对象 + $resultSet = $this->resultSetToModelCollection($resultSet); + } else { + $this->resultSet($resultSet); + } + + return $resultSet; + } + + /** + * 查询数据转换为模型数据集对象 + * @access protected + * @param array $resultSet 数据集 + * @return ModelCollection + */ + protected function resultSetToModelCollection(array $resultSet) + { + if (!empty($this->options['collection']) && is_string($this->options['collection'])) { + $collection = $this->options['collection']; + } + + if (empty($resultSet)) { + return $this->model->toCollection([], isset($collection) ? $collection : null); + } + + // 检查动态获取器 + if (!empty($this->options['with_attr'])) { + foreach ($this->options['with_attr'] as $name => $val) { + if (strpos($name, '.')) { + list($relation, $field) = explode('.', $name); + + $withRelationAttr[$relation][$field] = $val; + unset($this->options['with_attr'][$name]); + } + } + } + + $withRelationAttr = isset($withRelationAttr) ? $withRelationAttr : []; + + foreach ($resultSet as $key => &$result) { + // 数据转换为模型对象 + $this->resultToModel($result, $this->options, true, $withRelationAttr); + } + + if (!empty($this->options['with'])) { + // 预载入 + $result->eagerlyResultSet($resultSet, $this->options['with'], $withRelationAttr); + } + + if (!empty($this->options['with_join'])) { + // JOIN预载入 + $result->eagerlyResultSet($resultSet, $this->options['with_join'], $withRelationAttr, true); + } + + // 模型数据集转换 + return $result->toCollection($resultSet, isset($collection) ? $collection : null); + } + + /** + * 处理数据集 + * @access public + * @param array $resultSet + * @return void + */ + protected function resultSet(&$resultSet) + { + if (!empty($this->options['json'])) { + foreach ($resultSet as &$result) { + $this->jsonResult($result, $this->options['json'], true); + } + } + + if (!empty($this->options['with_attr'])) { + foreach ($resultSet as &$result) { + $this->getResultAttr($result, $this->options['with_attr']); + } + } + + if (!empty($this->options['collection']) || 'collection' == $this->connection->getConfig('resultset_type')) { + // 返回Collection对象 + $resultSet = new Collection($resultSet); + } + } + + /** + * 查找单条记录 + * @access public + * @param array|string|Query|\Closure $data + * @return array|null|\PDOStatement|string|Model + * @throws DbException + * @throws ModelNotFoundException + * @throws DataNotFoundException + */ + public function find($data = null) + { + if ($data instanceof Query) { + return $data->find(); + } elseif ($data instanceof \Closure) { + $data($this); + $data = null; + } + + $this->parseOptions(); + + if (!is_null($data)) { + // AR模式分析主键条件 + $this->parsePkWhere($data); + } + + $this->options['data'] = $data; + + $result = $this->connection->find($this); + + if ($this->options['fetch_sql']) { + return $result; + } + + // 数据处理 + if (empty($result)) { + return $this->resultToEmpty(); + } + + if (!empty($this->model)) { + // 返回模型对象 + $this->resultToModel($result, $this->options); + } else { + $this->result($result); + } + + return $result; + } + + /** + * 处理空数据 + * @access protected + * @return array|Model|null + * @throws DbException + * @throws ModelNotFoundException + * @throws DataNotFoundException + */ + protected function resultToEmpty() + { + if (!empty($this->options['allow_empty'])) { + return !empty($this->model) ? $this->model->newInstance([], $this->getModelUpdateCondition($this->options)) : []; + } elseif (!empty($this->options['fail'])) { + $this->throwNotFound($this->options); + } + } + + /** + * 查找单条记录 + * @access public + * @param mixed $data 主键值或者查询条件(闭包) + * @param mixed $with 关联预查询 + * @param bool $cache 是否缓存 + * @param bool $failException 是否抛出异常 + * @return static|null + * @throws exception\DbException + */ + public function get($data, $with = [], $cache = false, $failException = false) + { + if (is_null($data)) { + return; + } + + if (true === $with || is_int($with)) { + $cache = $with; + $with = []; + } + + return $this->parseQuery($data, $with, $cache) + ->failException($failException) + ->find($data); + } + + /** + * 查找单条记录 如果不存在直接抛出异常 + * @access public + * @param mixed $data 主键值或者查询条件(闭包) + * @param mixed $with 关联预查询 + * @param bool $cache 是否缓存 + * @return static|null + * @throws exception\DbException + */ + public function getOrFail($data, $with = [], $cache = false) + { + return $this->get($data, $with, $cache, true); + } + + /** + * 查找所有记录 + * @access public + * @param mixed $data 主键列表或者查询条件(闭包) + * @param array|string $with 关联预查询 + * @param bool $cache 是否缓存 + * @return static[]|false + * @throws exception\DbException + */ + public function all($data = null, $with = [], $cache = false) + { + if (true === $with || is_int($with)) { + $cache = $with; + $with = []; + } + + return $this->parseQuery($data, $with, $cache)->select($data); + } + + /** + * 分析查询表达式 + * @access public + * @param mixed $data 主键列表或者查询条件(闭包) + * @param string $with 关联预查询 + * @param bool $cache 是否缓存 + * @return Query + */ + protected function parseQuery(&$data, $with, $cache) + { + $result = $this->with($with)->cache($cache); + + if ((is_array($data) && key($data) !== 0) || $data instanceof Where) { + $result = $result->where($data); + $data = null; + } elseif ($data instanceof \Closure) { + $data($result); + $data = null; + } elseif ($data instanceof Query) { + $result = $data->with($with)->cache($cache); + $data = null; + } + + return $result; + } + + /** + * 处理数据 + * @access protected + * @param array $result 查询数据 + * @return void + */ + protected function result(&$result) + { + if (!empty($this->options['json'])) { + $this->jsonResult($result, $this->options['json'], true); + } + + if (!empty($this->options['with_attr'])) { + $this->getResultAttr($result, $this->options['with_attr']); + } + } + + /** + * 使用获取器处理数据 + * @access protected + * @param array $result 查询数据 + * @param array $withAttr 字段获取器 + * @return void + */ + protected function getResultAttr(&$result, $withAttr = []) + { + foreach ($withAttr as $name => $closure) { + $name = Loader::parseName($name); + + if (strpos($name, '.')) { + // 支持JSON字段 获取器定义 + list($key, $field) = explode('.', $name); + + if (isset($result[$key])) { + $result[$key][$field] = $closure(isset($result[$key][$field]) ? $result[$key][$field] : null, $result[$key]); + } + } else { + $result[$name] = $closure(isset($result[$name]) ? $result[$name] : null, $result); + } + } + } + + /** + * JSON字段数据转换 + * @access protected + * @param array $result 查询数据 + * @param array $json JSON字段 + * @param bool $assoc 是否转换为数组 + * @param array $withRelationAttr 关联获取器 + * @return void + */ + protected function jsonResult(&$result, $json = [], $assoc = false, $withRelationAttr = []) + { + foreach ($json as $name) { + if (isset($result[$name])) { + $result[$name] = json_decode($result[$name], $assoc); + + if (isset($withRelationAttr[$name])) { + foreach ($withRelationAttr[$name] as $key => $closure) { + $data = get_object_vars($result[$name]); + $result[$name]->$key = $closure(isset($result[$name]->$key) ? $result[$name]->$key : null, $data); + } + } + } + } + } + + /** + * 查询数据转换为模型对象 + * @access protected + * @param array $result 查询数据 + * @param array $options 查询参数 + * @param bool $resultSet 是否为数据集查询 + * @param array $withRelationAttr 关联字段获取器 + * @return void + */ + protected function resultToModel(&$result, $options = [], $resultSet = false, $withRelationAttr = []) + { + // 动态获取器 + if (!empty($options['with_attr']) && empty($withRelationAttr)) { + foreach ($options['with_attr'] as $name => $val) { + if (strpos($name, '.')) { + list($relation, $field) = explode('.', $name); + + $withRelationAttr[$relation][$field] = $val; + unset($options['with_attr'][$name]); + } + } + } + + // JSON 数据处理 + if (!empty($options['json'])) { + $this->jsonResult($result, $options['json'], $options['json_assoc'], $withRelationAttr); + } + + $result = $this->model->newInstance($result, $resultSet ? null : $this->getModelUpdateCondition($options)); + + // 动态获取器 + if (!empty($options['with_attr'])) { + $result->withAttribute($options['with_attr']); + } + + // 输出属性控制 + if (!empty($options['visible'])) { + $result->visible($options['visible'], true); + } elseif (!empty($options['hidden'])) { + $result->hidden($options['hidden'], true); + } + + if (!empty($options['append'])) { + $result->append($options['append'], true); + } + + // 关联查询 + if (!empty($options['relation'])) { + $result->relationQuery($options['relation'], $withRelationAttr); + } + + // 预载入查询 + if (!$resultSet && !empty($options['with'])) { + $result->eagerlyResult($result, $options['with'], $withRelationAttr); + } + + // JOIN预载入查询 + if (!$resultSet && !empty($options['with_join'])) { + $result->eagerlyResult($result, $options['with_join'], $withRelationAttr, true); + } + + // 关联统计 + if (!empty($options['with_count'])) { + foreach ($options['with_count'] as $val) { + $result->relationCount($result, $val[0], $val[1], $val[2]); + } + } + } + + /** + * 获取模型的更新条件 + * @access protected + * @param array $options 查询参数 + */ + protected function getModelUpdateCondition(array $options) + { + return isset($options['where']['AND']) ? $options['where']['AND'] : null; + } + + /** + * 查询失败 抛出异常 + * @access protected + * @param array $options 查询参数 + * @throws ModelNotFoundException + * @throws DataNotFoundException + */ + protected function throwNotFound($options = []) + { + if (!empty($this->model)) { + $class = get_class($this->model); + throw new ModelNotFoundException('model data Not Found:' . $class, $class, $options); + } + $table = is_array($options['table']) ? key($options['table']) : $options['table']; + throw new DataNotFoundException('table data not Found:' . $table, $table, $options); + } + + /** + * 查找多条记录 如果不存在则抛出异常 + * @access public + * @param array|string|Query|\Closure $data + * @return array|\PDOStatement|string|Model + * @throws DbException + * @throws ModelNotFoundException + * @throws DataNotFoundException + */ + public function selectOrFail($data = null) + { + return $this->failException(true)->select($data); + } + + /** + * 查找单条记录 如果不存在则抛出异常 + * @access public + * @param array|string|Query|\Closure $data + * @return array|\PDOStatement|string|Model + * @throws DbException + * @throws ModelNotFoundException + * @throws DataNotFoundException + */ + public function findOrFail($data = null) + { + return $this->failException(true)->find($data); + } + + /** + * 查找单条记录 如果不存在则抛出异常 + * @access public + * @param array|string|Query|\Closure $data + * @return array|\PDOStatement|string|Model + * @throws DbException + * @throws ModelNotFoundException + * @throws DataNotFoundException + */ + public function findOrEmpty($data = null) + { + return $this->allowEmpty(true)->find($data); + } + + /** + * 分批数据返回处理 + * @access public + * @param integer $count 每次处理的数据数量 + * @param callable $callback 处理回调方法 + * @param string|array $column 分批处理的字段名 + * @param string $order 字段排序 + * @return boolean + * @throws DbException + */ + public function chunk($count, $callback, $column = null, $order = 'asc') + { + $options = $this->getOptions(); + $column = $column ?: $this->getPk($options); + + if (isset($options['order'])) { + if (Container::get('app')->isDebug()) { + throw new DbException('chunk not support call order'); + } + unset($options['order']); + } + + $bind = $this->bind; + + if (is_array($column)) { + $times = 1; + $query = $this->options($options)->page($times, $count); + } else { + $query = $this->options($options)->limit($count); + + if (strpos($column, '.')) { + list($alias, $key) = explode('.', $column); + } else { + $key = $column; + } + } + + $resultSet = $query->order($column, $order)->select(); + + while (count($resultSet) > 0) { + if ($resultSet instanceof Collection) { + $resultSet = $resultSet->all(); + } + + if (false === call_user_func($callback, $resultSet)) { + return false; + } + + if (isset($times)) { + $times++; + $query = $this->options($options)->page($times, $count); + } else { + $end = end($resultSet); + $lastId = is_array($end) ? $end[$key] : $end->getData($key); + + $query = $this->options($options) + ->limit($count) + ->where($column, 'asc' == strtolower($order) ? '>' : '<', $lastId); + } + + $resultSet = $query->bind($bind)->order($column, $order)->select(); + } + + return true; + } + + /** + * 获取绑定的参数 并清空 + * @access public + * @param bool $clear + * @return array + */ + public function getBind($clear = true) + { + $bind = $this->bind; + if ($clear) { + $this->bind = []; + } + + return $bind; + } + + /** + * 创建子查询SQL + * @access public + * @param bool $sub + * @return string + * @throws DbException + */ + public function buildSql($sub = true) + { + return $sub ? '( ' . $this->select(false) . ' )' : $this->select(false); + } + + /** + * 视图查询处理 + * @access protected + * @param array $options 查询参数 + * @return void + */ + protected function parseView(&$options) + { + if (!isset($options['map'])) { + return; + } + + foreach (['AND', 'OR'] as $logic) { + if (isset($options['where'][$logic])) { + foreach ($options['where'][$logic] as $key => $val) { + if (array_key_exists($key, $options['map'])) { + array_shift($val); + array_unshift($val, $options['map'][$key]); + $options['where'][$logic][$options['map'][$key]] = $val; + unset($options['where'][$logic][$key]); + } + } + } + } + + if (isset($options['order'])) { + // 视图查询排序处理 + if (is_string($options['order'])) { + $options['order'] = explode(',', $options['order']); + } + foreach ($options['order'] as $key => $val) { + if (is_numeric($key) && is_string($val)) { + if (strpos($val, ' ')) { + list($field, $sort) = explode(' ', $val); + if (array_key_exists($field, $options['map'])) { + $options['order'][$options['map'][$field]] = $sort; + unset($options['order'][$key]); + } + } elseif (array_key_exists($val, $options['map'])) { + $options['order'][$options['map'][$val]] = 'asc'; + unset($options['order'][$key]); + } + } elseif (array_key_exists($key, $options['map'])) { + $options['order'][$options['map'][$key]] = $val; + unset($options['order'][$key]); + } + } + } + } + + /** + * 把主键值转换为查询条件 支持复合主键 + * @access public + * @param array|string $data 主键数据 + * @return void + * @throws Exception + */ + public function parsePkWhere($data) + { + $pk = $this->getPk($this->options); + // 获取当前数据表 + $table = is_array($this->options['table']) ? key($this->options['table']) : $this->options['table']; + + if (!empty($this->options['alias'][$table])) { + $alias = $this->options['alias'][$table]; + } + + if (is_string($pk)) { + $key = isset($alias) ? $alias . '.' . $pk : $pk; + // 根据主键查询 + if (is_array($data)) { + $where[$pk] = isset($data[$pk]) ? [$key, '=', $data[$pk]] : [$key, 'in', $data]; + } else { + $where[$pk] = strpos($data, ',') ? [$key, 'IN', $data] : [$key, '=', $data]; + } + } elseif (is_array($pk) && is_array($data) && !empty($data)) { + // 根据复合主键查询 + foreach ($pk as $key) { + if (isset($data[$key])) { + $attr = isset($alias) ? $alias . '.' . $key : $key; + $where[$key] = [$attr, '=', $data[$key]]; + } else { + throw new Exception('miss complex primary data'); + } + } + } + + if (!empty($where)) { + if (isset($this->options['where']['AND'])) { + $this->options['where']['AND'] = array_merge($this->options['where']['AND'], $where); + } else { + $this->options['where']['AND'] = $where; + } + } + + return; + } + + /** + * 分析表达式(可用于查询或者写入操作) + * @access protected + * @return array + */ + protected function parseOptions() + { + $options = $this->getOptions(); + + // 获取数据表 + if (empty($options['table'])) { + $options['table'] = $this->getTable(); + } + + if (!isset($options['where'])) { + $options['where'] = []; + } elseif (isset($options['view'])) { + // 视图查询条件处理 + $this->parseView($options); + } + + if (!isset($options['field'])) { + $options['field'] = '*'; + } + + foreach (['data', 'order', 'join', 'union'] as $name) { + if (!isset($options[$name])) { + $options[$name] = []; + } + } + + if (!isset($options['strict'])) { + $options['strict'] = $this->getConfig('fields_strict'); + } + + foreach (['master', 'lock', 'fetch_pdo', 'fetch_sql', 'distinct'] as $name) { + if (!isset($options[$name])) { + $options[$name] = false; + } + } + + if (isset(static::$readMaster['*']) || (is_string($options['table']) && isset(static::$readMaster[$options['table']]))) { + $options['master'] = true; + } + + foreach (['group', 'having', 'limit', 'force', 'comment'] as $name) { + if (!isset($options[$name])) { + $options[$name] = ''; + } + } + + if (isset($options['page'])) { + // 根据页数计算limit + list($page, $listRows) = $options['page']; + $page = $page > 0 ? $page : 1; + $listRows = $listRows > 0 ? $listRows : (is_numeric($options['limit']) ? $options['limit'] : 20); + $offset = $listRows * ($page - 1); + $options['limit'] = $offset . ',' . $listRows; + } + + $this->options = $options; + + return $options; + } + + /** + * 注册回调方法 + * @access public + * @param string $event 事件名 + * @param callable $callback 回调方法 + * @return void + */ + public static function event($event, $callback) + { + self::$event[$event] = $callback; + } + + /** + * 触发事件 + * @access public + * @param string $event 事件名 + * @return bool + */ + public function trigger($event) + { + $result = false; + + if (isset(self::$event[$event])) { + $result = Container::getInstance()->invoke(self::$event[$event], [$this]); + } + + return $result; + } + +} diff --git a/thinkphp/library/think/db/Where.php b/thinkphp/library/think/db/Where.php new file mode 100755 index 0000000..9132e54 --- /dev/null +++ b/thinkphp/library/think/db/Where.php @@ -0,0 +1,178 @@ + +// +---------------------------------------------------------------------- + +namespace think\db; + +use ArrayAccess; + +class Where implements ArrayAccess +{ + /** + * 查询表达式 + * @var array + */ + protected $where = []; + + /** + * 是否需要增加括号 + * @var bool + */ + protected $enclose = false; + + /** + * 创建一个查询表达式 + * + * @param array $where 查询条件数组 + * @param bool $enclose 是否增加括号 + */ + public function __construct(array $where = [], $enclose = false) + { + $this->where = $where; + $this->enclose = $enclose; + } + + /** + * 设置是否添加括号 + * @access public + * @param bool $enclose + * @return $this + */ + public function enclose($enclose = true) + { + $this->enclose = $enclose; + return $this; + } + + /** + * 解析为Query对象可识别的查询条件数组 + * @access public + * @return array + */ + public function parse() + { + $where = []; + + foreach ($this->where as $key => $val) { + if ($val instanceof Expression) { + $where[] = [$key, 'exp', $val]; + } elseif (is_null($val)) { + $where[] = [$key, 'NULL', '']; + } elseif (is_array($val)) { + $where[] = $this->parseItem($key, $val); + } else { + $where[] = [$key, '=', $val]; + } + } + + return $this->enclose ? [$where] : $where; + } + + /** + * 分析查询表达式 + * @access protected + * @param string $field 查询字段 + * @param array $where 查询条件 + * @return array + */ + protected function parseItem($field, $where = []) + { + $op = $where[0]; + $condition = isset($where[1]) ? $where[1] : null; + + if (is_array($op)) { + // 同一字段多条件查询 + array_unshift($where, $field); + } elseif (is_null($condition)) { + if (in_array(strtoupper($op), ['NULL', 'NOTNULL', 'NOT NULL'], true)) { + // null查询 + $where = [$field, $op, '']; + } elseif (in_array($op, ['=', 'eq', 'EQ', null], true)) { + $where = [$field, 'NULL', '']; + } elseif (in_array($op, ['<>', 'neq', 'NEQ'], true)) { + $where = [$field, 'NOTNULL', '']; + } else { + // 字段相等查询 + $where = [$field, '=', $op]; + } + } else { + $where = [$field, $op, $condition]; + } + + return $where; + } + + /** + * 修改器 设置数据对象的值 + * @access public + * @param string $name 名称 + * @param mixed $value 值 + * @return void + */ + public function __set($name, $value) + { + $this->where[$name] = $value; + } + + /** + * 获取器 获取数据对象的值 + * @access public + * @param string $name 名称 + * @return mixed + */ + public function __get($name) + { + return isset($this->where[$name]) ? $this->where[$name] : null; + } + + /** + * 检测数据对象的值 + * @access public + * @param string $name 名称 + * @return boolean + */ + public function __isset($name) + { + return isset($this->where[$name]); + } + + /** + * 销毁数据对象的值 + * @access public + * @param string $name 名称 + * @return void + */ + public function __unset($name) + { + unset($this->where[$name]); + } + + // ArrayAccess + public function offsetSet($name, $value) + { + $this->__set($name, $value); + } + + public function offsetExists($name) + { + return $this->__isset($name); + } + + public function offsetUnset($name) + { + $this->__unset($name); + } + + public function offsetGet($name) + { + return $this->__get($name); + } + +} diff --git a/thinkphp/library/think/db/builder/Mysql.php b/thinkphp/library/think/db/builder/Mysql.php new file mode 100755 index 0000000..c715aa3 --- /dev/null +++ b/thinkphp/library/think/db/builder/Mysql.php @@ -0,0 +1,178 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\builder; + +use think\db\Builder; +use think\db\Expression; +use think\db\Query; +use think\Exception; + +/** + * mysql数据库驱动 + */ +class Mysql extends Builder +{ + // 查询表达式解析 + protected $parser = [ + 'parseCompare' => ['=', '<>', '>', '>=', '<', '<='], + 'parseLike' => ['LIKE', 'NOT LIKE'], + 'parseBetween' => ['NOT BETWEEN', 'BETWEEN'], + 'parseIn' => ['NOT IN', 'IN'], + 'parseExp' => ['EXP'], + 'parseRegexp' => ['REGEXP', 'NOT REGEXP'], + 'parseNull' => ['NOT NULL', 'NULL'], + 'parseBetweenTime' => ['BETWEEN TIME', 'NOT BETWEEN TIME'], + 'parseTime' => ['< TIME', '> TIME', '<= TIME', '>= TIME'], + 'parseExists' => ['NOT EXISTS', 'EXISTS'], + 'parseColumn' => ['COLUMN'], + ]; + + protected $insertAllSql = '%INSERT% INTO %TABLE% (%FIELD%) VALUES %DATA% %COMMENT%'; + protected $updateSql = 'UPDATE %TABLE% %JOIN% SET %SET% %WHERE% %ORDER%%LIMIT% %LOCK%%COMMENT%'; + + /** + * 生成insertall SQL + * @access public + * @param Query $query 查询对象 + * @param array $dataSet 数据集 + * @param bool $replace 是否replace + * @return string + */ + public function insertAll(Query $query, $dataSet, $replace = false) + { + $options = $query->getOptions(); + + // 获取合法的字段 + if ('*' == $options['field']) { + $allowFields = $this->connection->getTableFields($options['table']); + } else { + $allowFields = $options['field']; + } + + // 获取绑定信息 + $bind = $this->connection->getFieldsBind($options['table']); + + foreach ($dataSet as $k => $data) { + $data = $this->parseData($query, $data, $allowFields, $bind, '_' . $k); + + $values[] = '( ' . implode(',', array_values($data)) . ' )'; + + if (!isset($insertFields)) { + $insertFields = array_keys($data); + } + } + + $fields = []; + foreach ($insertFields as $field) { + $fields[] = $this->parseKey($query, $field); + } + + return str_replace( + ['%INSERT%', '%TABLE%', '%FIELD%', '%DATA%', '%COMMENT%'], + [ + $replace ? 'REPLACE' : 'INSERT', + $this->parseTable($query, $options['table']), + implode(' , ', $fields), + implode(' , ', $values), + $this->parseComment($query, $options['comment']), + ], + $this->insertAllSql); + } + + /** + * 正则查询 + * @access protected + * @param Query $query 查询对象 + * @param string $key + * @param string $exp + * @param mixed $value + * @param string $field + * @return string + */ + protected function parseRegexp(Query $query, $key, $exp, $value, $field) + { + if ($value instanceof Expression) { + $value = $value->getValue(); + } + + return $key . ' ' . $exp . ' ' . $value; + } + + /** + * 字段和表名处理 + * @access public + * @param Query $query 查询对象 + * @param mixed $key 字段名 + * @param bool $strict 严格检测 + * @return string + */ + public function parseKey(Query $query, $key, $strict = false) + { + if (is_numeric($key)) { + return $key; + } elseif ($key instanceof Expression) { + return $key->getValue(); + } + + $key = trim($key); + + if (strpos($key, '->') && false === strpos($key, '(')) { + // JSON字段支持 + list($field, $name) = explode('->', $key, 2); + + return 'json_extract(' . $this->parseKey($query, $field, true) . ', \'$' . (strpos($name, '[') === 0 ? '' : '.') . str_replace('->', '.', $name) . '\')'; + } elseif (strpos($key, '.') && !preg_match('/[,\'\"\(\)`\s]/', $key)) { + list($table, $key) = explode('.', $key, 2); + + $alias = $query->getOptions('alias'); + + if ('__TABLE__' == $table) { + $table = $query->getOptions('table'); + $table = is_array($table) ? array_shift($table) : $table; + } + + if (isset($alias[$table])) { + $table = $alias[$table]; + } + } + + if ($strict && !preg_match('/^[\w\.\*]+$/', $key)) { + throw new Exception('not support data:' . $key); + } + + if ('*' != $key && !preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { + $key = '`' . $key . '`'; + } + + if (isset($table)) { + if (strpos($table, '.')) { + $table = str_replace('.', '`.`', $table); + } + + $key = '`' . $table . '`.' . $key; + } + + return $key; + } + + /** + * 随机排序 + * @access protected + * @param Query $query 查询对象 + * @return string + */ + protected function parseRand(Query $query) + { + return 'rand()'; + } + +} diff --git a/thinkphp/library/think/db/builder/Pgsql.php b/thinkphp/library/think/db/builder/Pgsql.php new file mode 100755 index 0000000..742c7db --- /dev/null +++ b/thinkphp/library/think/db/builder/Pgsql.php @@ -0,0 +1,104 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\builder; + +use think\db\Builder; +use think\db\Query; + +/** + * Pgsql数据库驱动 + */ +class Pgsql extends Builder +{ + + protected $insertSql = 'INSERT INTO %TABLE% (%FIELD%) VALUES (%DATA%) %COMMENT%'; + protected $insertAllSql = 'INSERT INTO %TABLE% (%FIELD%) %DATA% %COMMENT%'; + + /** + * limit分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $limit + * @return string + */ + public function parseLimit(Query $query, $limit) + { + $limitStr = ''; + + if (!empty($limit)) { + $limit = explode(',', $limit); + if (count($limit) > 1) { + $limitStr .= ' LIMIT ' . $limit[1] . ' OFFSET ' . $limit[0] . ' '; + } else { + $limitStr .= ' LIMIT ' . $limit[0] . ' '; + } + } + + return $limitStr; + } + + /** + * 字段和表名处理 + * @access public + * @param Query $query 查询对象 + * @param mixed $key 字段名 + * @param bool $strict 严格检测 + * @return string + */ + public function parseKey(Query $query, $key, $strict = false) + { + if (is_numeric($key)) { + return $key; + } elseif ($key instanceof Expression) { + return $key->getValue(); + } + + $key = trim($key); + + if (strpos($key, '->') && false === strpos($key, '(')) { + // JSON字段支持 + list($field, $name) = explode('->', $key); + $key = $field . '->>\'' . $name . '\''; + } elseif (strpos($key, '.')) { + list($table, $key) = explode('.', $key, 2); + + $alias = $query->getOptions('alias'); + + if ('__TABLE__' == $table) { + $table = $query->getOptions('table'); + $table = is_array($table) ? array_shift($table) : $table; + } + + if (isset($alias[$table])) { + $table = $alias[$table]; + } + } + + if (isset($table)) { + $key = $table . '.' . $key; + } + + return $key; + } + + /** + * 随机排序 + * @access protected + * @param Query $query 查询对象 + * @return string + */ + protected function parseRand(Query $query) + { + return 'RANDOM()'; + } + +} diff --git a/thinkphp/library/think/db/builder/Sqlite.php b/thinkphp/library/think/db/builder/Sqlite.php new file mode 100755 index 0000000..2b887ca --- /dev/null +++ b/thinkphp/library/think/db/builder/Sqlite.php @@ -0,0 +1,96 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\builder; + +use think\db\Builder; +use think\db\Query; + +/** + * Sqlite数据库驱动 + */ +class Sqlite extends Builder +{ + + /** + * limit + * @access public + * @param Query $query 查询对象 + * @param mixed $limit + * @return string + */ + public function parseLimit(Query $query, $limit) + { + $limitStr = ''; + + if (!empty($limit)) { + $limit = explode(',', $limit); + if (count($limit) > 1) { + $limitStr .= ' LIMIT ' . $limit[1] . ' OFFSET ' . $limit[0] . ' '; + } else { + $limitStr .= ' LIMIT ' . $limit[0] . ' '; + } + } + + return $limitStr; + } + + /** + * 随机排序 + * @access protected + * @param Query $query 查询对象 + * @return string + */ + protected function parseRand(Query $query) + { + return 'RANDOM()'; + } + + /** + * 字段和表名处理 + * @access public + * @param Query $query 查询对象 + * @param mixed $key 字段名 + * @param bool $strict 严格检测 + * @return string + */ + public function parseKey(Query $query, $key, $strict = false) + { + if (is_numeric($key)) { + return $key; + } elseif ($key instanceof Expression) { + return $key->getValue(); + } + + $key = trim($key); + + if (strpos($key, '.')) { + list($table, $key) = explode('.', $key, 2); + + $alias = $query->getOptions('alias'); + + if ('__TABLE__' == $table) { + $table = $query->getOptions('table'); + $table = is_array($table) ? array_shift($table) : $table; + } + + if (isset($alias[$table])) { + $table = $alias[$table]; + } + } + + if (isset($table)) { + $key = $table . '.' . $key; + } + + return $key; + } +} diff --git a/thinkphp/library/think/db/builder/Sqlsrv.php b/thinkphp/library/think/db/builder/Sqlsrv.php new file mode 100755 index 0000000..ef27aaf --- /dev/null +++ b/thinkphp/library/think/db/builder/Sqlsrv.php @@ -0,0 +1,159 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\builder; + +use think\db\Builder; +use think\db\Expression; +use think\db\Query; +use think\Exception; + +/** + * Sqlsrv数据库驱动 + */ +class Sqlsrv extends Builder +{ + protected $selectSql = 'SELECT T1.* FROM (SELECT thinkphp.*, ROW_NUMBER() OVER (%ORDER%) AS ROW_NUMBER FROM (SELECT %DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%) AS thinkphp) AS T1 %LIMIT%%COMMENT%'; + protected $selectInsertSql = 'SELECT %DISTINCT% %FIELD% FROM %TABLE%%JOIN%%WHERE%%GROUP%%HAVING%'; + protected $updateSql = 'UPDATE %TABLE% SET %SET% FROM %TABLE% %JOIN% %WHERE% %LIMIT% %LOCK%%COMMENT%'; + protected $deleteSql = 'DELETE FROM %TABLE% %USING% FROM %TABLE% %JOIN% %WHERE% %LIMIT% %LOCK%%COMMENT%'; + protected $insertSql = 'INSERT INTO %TABLE% (%FIELD%) VALUES (%DATA%) %COMMENT%'; + protected $insertAllSql = 'INSERT INTO %TABLE% (%FIELD%) %DATA% %COMMENT%'; + + /** + * order分析 + * @access protected + * @param Query $query 查询对象 + * @param mixed $order + * @return string + */ + protected function parseOrder(Query $query, $order) + { + if (empty($order)) { + return ' ORDER BY rand()'; + } + + foreach ($order as $key => $val) { + if ($val instanceof Expression) { + $array[] = $val->getValue(); + } elseif ('[rand]' == $val) { + $array[] = $this->parseRand($query); + } else { + if (is_numeric($key)) { + list($key, $sort) = explode(' ', strpos($val, ' ') ? $val : $val . ' '); + } else { + $sort = $val; + } + + if (preg_match('/^[\w\.]+$/', $key)) { + $sort = strtoupper($sort); + $sort = in_array($sort, ['ASC', 'DESC'], true) ? ' ' . $sort : ''; + $array[] = $this->parseKey($query, $key, true) . $sort; + } else { + throw new Exception('order express error:' . $key); + } + } + } + + return empty($array) ? '' : ' ORDER BY ' . implode(',', $array); + } + + /** + * 随机排序 + * @access protected + * @param Query $query 查询对象 + * @return string + */ + protected function parseRand(Query $query) + { + return 'rand()'; + } + + /** + * 字段和表名处理 + * @access public + * @param Query $query 查询对象 + * @param mixed $key 字段名 + * @param bool $strict 严格检测 + * @return string + */ + public function parseKey(Query $query, $key, $strict = false) + { + if (is_numeric($key)) { + return $key; + } elseif ($key instanceof Expression) { + return $key->getValue(); + } + + $key = trim($key); + + if (strpos($key, '.') && !preg_match('/[,\'\"\(\)\[\s]/', $key)) { + list($table, $key) = explode('.', $key, 2); + + $alias = $query->getOptions('alias'); + + if ('__TABLE__' == $table) { + $table = $query->getOptions('table'); + $table = is_array($table) ? array_shift($table) : $table; + } + + if (isset($alias[$table])) { + $table = $alias[$table]; + } + } + + if ($strict && !preg_match('/^[\w\.\*]+$/', $key)) { + throw new Exception('not support data:' . $key); + } + + if ('*' != $key && !preg_match('/[,\'\"\*\(\)\[.\s]/', $key)) { + $key = '[' . $key . ']'; + } + + if (isset($table)) { + $key = '[' . $table . '].' . $key; + } + + return $key; + } + + /** + * limit + * @access protected + * @param Query $query 查询对象 + * @param mixed $limit + * @return string + */ + protected function parseLimit(Query $query, $limit) + { + if (empty($limit)) { + return ''; + } + + $limit = explode(',', $limit); + + if (count($limit) > 1) { + $limitStr = '(T1.ROW_NUMBER BETWEEN ' . $limit[0] . ' + 1 AND ' . $limit[0] . ' + ' . $limit[1] . ')'; + } else { + $limitStr = '(T1.ROW_NUMBER BETWEEN 1 AND ' . $limit[0] . ")"; + } + + return 'WHERE ' . $limitStr; + } + + public function selectInsert(Query $query, $fields, $table) + { + $this->selectSql = $this->selectInsertSql; + + return parent::selectInsert($query, $fields, $table); + } + +} diff --git a/thinkphp/library/think/db/connector/Mysql.php b/thinkphp/library/think/db/connector/Mysql.php new file mode 100755 index 0000000..1713b99 --- /dev/null +++ b/thinkphp/library/think/db/connector/Mysql.php @@ -0,0 +1,229 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\connector; + +use PDO; +use think\db\Connection; +use think\db\Query; + +/** + * mysql数据库驱动 + */ +class Mysql extends Connection +{ + + protected $builder = '\\think\\db\\builder\\Mysql'; + + /** + * 初始化 + * @access protected + * @return void + */ + protected function initialize() + { + // Point类型支持 + Query::extend('point', function ($query, $field, $value = null, $fun = 'GeomFromText', $type = 'POINT') { + if (!is_null($value)) { + $query->data($field, ['point', $value, $fun, $type]); + } else { + if (is_string($field)) { + $field = explode(',', $field); + } + $query->setOption('point', $field); + } + + return $query; + }); + } + + /** + * 解析pdo连接的dsn信息 + * @access protected + * @param array $config 连接信息 + * @return string + */ + protected function parseDsn($config) + { + if (!empty($config['socket'])) { + $dsn = 'mysql:unix_socket=' . $config['socket']; + } elseif (!empty($config['hostport'])) { + $dsn = 'mysql:host=' . $config['hostname'] . ';port=' . $config['hostport']; + } else { + $dsn = 'mysql:host=' . $config['hostname']; + } + $dsn .= ';dbname=' . $config['database']; + + if (!empty($config['charset'])) { + $dsn .= ';charset=' . $config['charset']; + } + + return $dsn; + } + + /** + * 取得数据表的字段信息 + * @access public + * @param string $tableName + * @return array + */ + public function getFields($tableName) + { + list($tableName) = explode(' ', $tableName); + + if (false === strpos($tableName, '`')) { + if (strpos($tableName, '.')) { + $tableName = str_replace('.', '`.`', $tableName); + } + $tableName = '`' . $tableName . '`'; + } + + $sql = 'SHOW COLUMNS FROM ' . $tableName; + $pdo = $this->query($sql, [], false, true); + $result = $pdo->fetchAll(PDO::FETCH_ASSOC); + $info = []; + + if ($result) { + foreach ($result as $key => $val) { + $val = array_change_key_case($val); + $info[$val['field']] = [ + 'name' => $val['field'], + 'type' => $val['type'], + 'notnull' => (bool) ('' === $val['null']), // not null is empty, null is yes + 'default' => $val['default'], + 'primary' => (strtolower($val['key']) == 'pri'), + 'autoinc' => (strtolower($val['extra']) == 'auto_increment'), + ]; + } + } + + return $this->fieldCase($info); + } + + /** + * 取得数据库的表信息 + * @access public + * @param string $dbName + * @return array + */ + public function getTables($dbName = '') + { + $sql = !empty($dbName) ? 'SHOW TABLES FROM ' . $dbName : 'SHOW TABLES '; + $pdo = $this->query($sql, [], false, true); + $result = $pdo->fetchAll(PDO::FETCH_ASSOC); + $info = []; + + foreach ($result as $key => $val) { + $info[$key] = current($val); + } + + return $info; + } + + /** + * SQL性能分析 + * @access protected + * @param string $sql + * @return array + */ + protected function getExplain($sql) + { + $pdo = $this->linkID->prepare("EXPLAIN " . $this->queryStr); + + foreach ($this->bind as $key => $val) { + // 占位符 + $param = is_int($key) ? $key + 1 : ':' . $key; + + if (is_array($val)) { + if (PDO::PARAM_INT == $val[1] && '' === $val[0]) { + $val[0] = 0; + } elseif (self::PARAM_FLOAT == $val[1]) { + $val[0] = is_string($val[0]) ? (float) $val[0] : $val[0]; + $val[1] = PDO::PARAM_STR; + } + + $result = $pdo->bindValue($param, $val[0], $val[1]); + } else { + $result = $pdo->bindValue($param, $val); + } + } + + $pdo->execute(); + $result = $pdo->fetch(PDO::FETCH_ASSOC); + $result = array_change_key_case($result); + + if (isset($result['extra'])) { + if (strpos($result['extra'], 'filesort') || strpos($result['extra'], 'temporary')) { + $this->log('SQL:' . $this->queryStr . '[' . $result['extra'] . ']', 'warn'); + } + } + + return $result; + } + + protected function supportSavepoint() + { + return true; + } + + /** + * 启动XA事务 + * @access public + * @param string $xid XA事务id + * @return void + */ + public function startTransXa($xid) + { + $this->initConnect(true); + if (!$this->linkID) { + return false; + } + + $this->execute("XA START '$xid'"); + } + + /** + * 预编译XA事务 + * @access public + * @param string $xid XA事务id + * @return void + */ + public function prepareXa($xid) + { + $this->initConnect(true); + $this->execute("XA END '$xid'"); + $this->execute("XA PREPARE '$xid'"); + } + + /** + * 提交XA事务 + * @access public + * @param string $xid XA事务id + * @return void + */ + public function commitXa($xid) + { + $this->initConnect(true); + $this->execute("XA COMMIT '$xid'"); + } + + /** + * 回滚XA事务 + * @access public + * @param string $xid XA事务id + * @return void + */ + public function rollbackXa($xid) + { + $this->initConnect(true); + $this->execute("XA ROLLBACK '$xid'"); + } +} diff --git a/thinkphp/library/think/db/connector/Pgsql.php b/thinkphp/library/think/db/connector/Pgsql.php new file mode 100755 index 0000000..ee9fca0 --- /dev/null +++ b/thinkphp/library/think/db/connector/Pgsql.php @@ -0,0 +1,116 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\connector; + +use PDO; +use think\db\Connection; + +/** + * Pgsql数据库驱动 + */ +class Pgsql extends Connection +{ + protected $builder = '\\think\\db\\builder\\Pgsql'; + + // PDO连接参数 + protected $params = [ + PDO::ATTR_CASE => PDO::CASE_NATURAL, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, + PDO::ATTR_STRINGIFY_FETCHES => false, + ]; + + /** + * 解析pdo连接的dsn信息 + * @access protected + * @param array $config 连接信息 + * @return string + */ + protected function parseDsn($config) + { + $dsn = 'pgsql:dbname=' . $config['database'] . ';host=' . $config['hostname']; + + if (!empty($config['hostport'])) { + $dsn .= ';port=' . $config['hostport']; + } + + return $dsn; + } + + /** + * 取得数据表的字段信息 + * @access public + * @param string $tableName + * @return array + */ + public function getFields($tableName) + { + list($tableName) = explode(' ', $tableName); + $sql = 'select fields_name as "field",fields_type as "type",fields_not_null as "null",fields_key_name as "key",fields_default as "default",fields_default as "extra" from table_msg(\'' . $tableName . '\');'; + + $pdo = $this->query($sql, [], false, true); + $result = $pdo->fetchAll(PDO::FETCH_ASSOC); + $info = []; + + if ($result) { + foreach ($result as $key => $val) { + $val = array_change_key_case($val); + $info[$val['field']] = [ + 'name' => $val['field'], + 'type' => $val['type'], + 'notnull' => (bool) ('' !== $val['null']), + 'default' => $val['default'], + 'primary' => !empty($val['key']), + 'autoinc' => (0 === strpos($val['extra'], 'nextval(')), + ]; + } + } + + return $this->fieldCase($info); + } + + /** + * 取得数据库的表信息 + * @access public + * @param string $dbName + * @return array + */ + public function getTables($dbName = '') + { + $sql = "select tablename as Tables_in_test from pg_tables where schemaname ='public'"; + $pdo = $this->query($sql, [], false, true); + $result = $pdo->fetchAll(PDO::FETCH_ASSOC); + $info = []; + + foreach ($result as $key => $val) { + $info[$key] = current($val); + } + + return $info; + } + + /** + * SQL性能分析 + * @access protected + * @param string $sql + * @return array + */ + protected function getExplain($sql) + { + return []; + } + + protected function supportSavepoint() + { + return true; + } +} diff --git a/thinkphp/library/think/db/connector/Sqlite.php b/thinkphp/library/think/db/connector/Sqlite.php new file mode 100755 index 0000000..5b9b3fa --- /dev/null +++ b/thinkphp/library/think/db/connector/Sqlite.php @@ -0,0 +1,108 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\connector; + +use PDO; +use think\db\Connection; + +/** + * Sqlite数据库驱动 + */ +class Sqlite extends Connection +{ + + protected $builder = '\\think\\db\\builder\\Sqlite'; + + /** + * 解析pdo连接的dsn信息 + * @access protected + * @param array $config 连接信息 + * @return string + */ + protected function parseDsn($config) + { + $dsn = 'sqlite:' . $config['database']; + + return $dsn; + } + + /** + * 取得数据表的字段信息 + * @access public + * @param string $tableName + * @return array + */ + public function getFields($tableName) + { + list($tableName) = explode(' ', $tableName); + $sql = 'PRAGMA table_info( ' . $tableName . ' )'; + + $pdo = $this->query($sql, [], false, true); + $result = $pdo->fetchAll(PDO::FETCH_ASSOC); + $info = []; + + if ($result) { + foreach ($result as $key => $val) { + $val = array_change_key_case($val); + $info[$val['name']] = [ + 'name' => $val['name'], + 'type' => $val['type'], + 'notnull' => 1 === $val['notnull'], + 'default' => $val['dflt_value'], + 'primary' => '1' == $val['pk'], + 'autoinc' => '1' == $val['pk'], + ]; + } + } + + return $this->fieldCase($info); + } + + /** + * 取得数据库的表信息 + * @access public + * @param string $dbName + * @return array + */ + public function getTables($dbName = '') + { + $sql = "SELECT name FROM sqlite_master WHERE type='table' " + . "UNION ALL SELECT name FROM sqlite_temp_master " + . "WHERE type='table' ORDER BY name"; + + $pdo = $this->query($sql, [], false, true); + $result = $pdo->fetchAll(PDO::FETCH_ASSOC); + $info = []; + + foreach ($result as $key => $val) { + $info[$key] = current($val); + } + + return $info; + } + + /** + * SQL性能分析 + * @access protected + * @param string $sql + * @return array + */ + protected function getExplain($sql) + { + return []; + } + + protected function supportSavepoint() + { + return true; + } +} diff --git a/thinkphp/library/think/db/connector/Sqlsrv.php b/thinkphp/library/think/db/connector/Sqlsrv.php new file mode 100755 index 0000000..123affb --- /dev/null +++ b/thinkphp/library/think/db/connector/Sqlsrv.php @@ -0,0 +1,235 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\connector; + +use PDO; +use think\db\Connection; +use think\db\Query; + +/** + * Sqlsrv数据库驱动 + */ +class Sqlsrv extends Connection +{ + // PDO连接参数 + protected $params = [ + PDO::ATTR_CASE => PDO::CASE_NATURAL, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, + PDO::ATTR_STRINGIFY_FETCHES => false, + ]; + + protected $builder = '\\think\\db\\builder\\Sqlsrv'; + + /** + * 解析pdo连接的dsn信息 + * @access protected + * @param array $config 连接信息 + * @return string + */ + protected function parseDsn($config) + { + $dsn = 'sqlsrv:Database=' . $config['database'] . ';Server=' . $config['hostname']; + + if (!empty($config['hostport'])) { + $dsn .= ',' . $config['hostport']; + } + + return $dsn; + } + + /** + * 取得数据表的字段信息 + * @access public + * @param string $tableName + * @return array + */ + public function getFields($tableName) + { + list($tableName) = explode(' ', $tableName); + $tableNames = explode('.', $tableName); + $tableName = isset($tableNames[1]) ? $tableNames[1] : $tableNames[0]; + + $sql = "SELECT column_name, data_type, column_default, is_nullable + FROM information_schema.tables AS t + JOIN information_schema.columns AS c + ON t.table_catalog = c.table_catalog + AND t.table_schema = c.table_schema + AND t.table_name = c.table_name + WHERE t.table_name = '$tableName'"; + + $pdo = $this->query($sql, [], false, true); + $result = $pdo->fetchAll(PDO::FETCH_ASSOC); + $info = []; + + if ($result) { + foreach ($result as $key => $val) { + $val = array_change_key_case($val); + $info[$val['column_name']] = [ + 'name' => $val['column_name'], + 'type' => $val['data_type'], + 'notnull' => (bool) ('' === $val['is_nullable']), // not null is empty, null is yes + 'default' => $val['column_default'], + 'primary' => false, + 'autoinc' => false, + ]; + } + } + + $sql = "SELECT column_name FROM information_schema.key_column_usage WHERE table_name='$tableName'"; + + // 调试开始 + $this->debug(true); + + $pdo = $this->linkID->query($sql); + + // 调试结束 + $this->debug(false, $sql); + + $result = $pdo->fetch(PDO::FETCH_ASSOC); + + if ($result) { + $info[$result['column_name']]['primary'] = true; + } + + return $this->fieldCase($info); + } + + /** + * 取得数据表的字段信息 + * @access public + * @param string $dbName + * @return array + */ + public function getTables($dbName = '') + { + $sql = "SELECT TABLE_NAME + FROM INFORMATION_SCHEMA.TABLES + WHERE TABLE_TYPE = 'BASE TABLE' + "; + + $pdo = $this->query($sql, [], false, true); + $result = $pdo->fetchAll(PDO::FETCH_ASSOC); + $info = []; + + foreach ($result as $key => $val) { + $info[$key] = current($val); + } + + return $info; + } + + /** + * 得到某个列的数组 + * @access public + * @param Query $query 查询对象 + * @param string $field 字段名 多个字段用逗号分隔 + * @param string $key 索引 + * @return array + */ + public function column(Query $query, $field, $key = '') + { + $options = $query->getOptions(); + + if (empty($options['fetch_sql']) && !empty($options['cache'])) { + // 判断查询缓存 + $cache = $options['cache']; + + $guid = is_string($cache['key']) ? $cache['key'] : $this->getCacheKey($query, $field); + + $result = Container::get('cache')->get($guid); + + if (false !== $result) { + return $result; + } + } + + if (isset($options['field'])) { + $query->removeOption('field'); + } + + if (is_null($field)) { + $field = '*'; + } elseif ($key && '*' != $field) { + $field = $key . ',' . $field; + } + + if (is_string($field)) { + $field = array_map('trim', explode(',', $field)); + } + + $query->setOption('field', $field); + + // 生成查询SQL + $sql = $this->builder->select($query); + + $bind = $query->getBind(); + + if (!empty($options['fetch_sql'])) { + // 获取实际执行的SQL语句 + return $this->getRealSql($sql, $bind); + } + + // 执行查询操作 + $pdo = $this->query($sql, $bind, $options['master'], true); + + if (1 == $pdo->columnCount()) { + $result = $pdo->fetchAll(PDO::FETCH_COLUMN); + } else { + $resultSet = $pdo->fetchAll(PDO::FETCH_ASSOC); + + if ('*' == $field && $key) { + $result = array_column($resultSet, null, $key); + } elseif ($resultSet) { + $fields = array_keys($resultSet[0]); + $count = count($fields); + $key1 = array_shift($fields); + $key2 = $fields ? array_shift($fields) : ''; + $key = $key ?: $key1; + + if (strpos($key, '.')) { + list($alias, $key) = explode('.', $key); + } + + if (3 == $count) { + $column = $key2; + } elseif ($count < 3) { + $column = $key1; + } else { + $column = null; + } + + $result = array_column($resultSet, $column, $key); + } else { + $result = []; + } + } + + if (isset($cache) && isset($guid)) { + // 缓存数据 + $this->cacheData($guid, $result, $cache); + } + + return $result; + } + + /** + * SQL性能分析 + * @access protected + * @param string $sql + * @return array + */ + protected function getExplain($sql) + { + return []; + } +} diff --git a/thinkphp/library/think/db/connector/pgsql.sql b/thinkphp/library/think/db/connector/pgsql.sql new file mode 100755 index 0000000..5a4442d --- /dev/null +++ b/thinkphp/library/think/db/connector/pgsql.sql @@ -0,0 +1,153 @@ +CREATE OR REPLACE FUNCTION pgsql_type(a_type varchar) RETURNS varchar AS +$BODY$ +DECLARE + v_type varchar; +BEGIN + IF a_type='int8' THEN + v_type:='bigint'; + ELSIF a_type='int4' THEN + v_type:='integer'; + ELSIF a_type='int2' THEN + v_type:='smallint'; + ELSIF a_type='bpchar' THEN + v_type:='char'; + ELSE + v_type:=a_type; + END IF; + RETURN v_type; +END; +$BODY$ +LANGUAGE PLPGSQL; + +CREATE TYPE "public"."tablestruct" AS ( + "fields_key_name" varchar(100), + "fields_name" VARCHAR(200), + "fields_type" VARCHAR(20), + "fields_length" BIGINT, + "fields_not_null" VARCHAR(10), + "fields_default" VARCHAR(500), + "fields_comment" VARCHAR(1000) +); + +CREATE OR REPLACE FUNCTION "public"."table_msg" (a_schema_name varchar, a_table_name varchar) RETURNS SETOF "public"."tablestruct" AS +$body$ +DECLARE + v_ret tablestruct; + v_oid oid; + v_sql varchar; + v_rec RECORD; + v_key varchar; + v_conkey smallint[]; + v_pk varchar[]; + v_len smallint; + v_pos smallint := 1; +BEGIN + SELECT + pg_class.oid INTO v_oid + FROM + pg_class + INNER JOIN pg_namespace ON (pg_class.relnamespace = pg_namespace.oid AND lower(pg_namespace.nspname) = a_schema_name) + WHERE + pg_class.relname=a_table_name; + IF NOT FOUND THEN + RETURN; + END IF; + + SELECT + pg_constraint.conkey INTO v_conkey + FROM + pg_constraint + INNER JOIN pg_class ON pg_constraint.conrelid = pg_class.oid + INNER JOIN pg_attribute ON pg_attribute.attrelid = pg_class.oid + INNER JOIN pg_type ON pg_type.oid = pg_attribute.atttypid + WHERE + pg_class.relname = a_table_name + AND pg_constraint.contype = 'p'; + + v_len := array_length(v_conkey,1) + 1; + WHILE v_pos < v_len LOOP + SELECT + pg_attribute.attname INTO v_key + FROM pg_constraint + INNER JOIN pg_class ON pg_constraint.conrelid = pg_class.oid + INNER JOIN pg_attribute ON pg_attribute.attrelid = pg_class.oid AND pg_attribute.attnum = pg_constraint.conkey [ v_conkey[v_pos] ] + INNER JOIN pg_type ON pg_type.oid = pg_attribute.atttypid + WHERE pg_class.relname = a_table_name AND pg_constraint.contype = 'p'; + v_pk := array_append(v_pk,v_key); + + v_pos := v_pos + 1; + END LOOP; + + v_sql=' + SELECT + pg_attribute.attname AS fields_name, + pg_attribute.attnum AS fields_index, + pgsql_type(pg_type.typname::varchar) AS fields_type, + pg_attribute.atttypmod-4 as fields_length, + CASE WHEN pg_attribute.attnotnull THEN ''not null'' + ELSE '''' + END AS fields_not_null, + pg_attrdef.adsrc AS fields_default, + pg_description.description AS fields_comment + FROM + pg_attribute + INNER JOIN pg_class ON pg_attribute.attrelid = pg_class.oid + INNER JOIN pg_type ON pg_attribute.atttypid = pg_type.oid + LEFT OUTER JOIN pg_attrdef ON pg_attrdef.adrelid = pg_class.oid AND pg_attrdef.adnum = pg_attribute.attnum + LEFT OUTER JOIN pg_description ON pg_description.objoid = pg_class.oid AND pg_description.objsubid = pg_attribute.attnum + WHERE + pg_attribute.attnum > 0 + AND attisdropped <> ''t'' + AND pg_class.oid = ' || v_oid || ' + ORDER BY pg_attribute.attnum' ; + + FOR v_rec IN EXECUTE v_sql LOOP + v_ret.fields_name=v_rec.fields_name; + v_ret.fields_type=v_rec.fields_type; + IF v_rec.fields_length > 0 THEN + v_ret.fields_length:=v_rec.fields_length; + ELSE + v_ret.fields_length:=NULL; + END IF; + v_ret.fields_not_null=v_rec.fields_not_null; + v_ret.fields_default=v_rec.fields_default; + v_ret.fields_comment=v_rec.fields_comment; + + v_ret.fields_key_name=''; + + v_len := array_length(v_pk,1) + 1; + v_pos := 1; + WHILE v_pos < v_len LOOP + IF v_rec.fields_name = v_pk[v_pos] THEN + v_ret.fields_key_name=v_pk[v_pos]; + EXIT; + END IF; + v_pos := v_pos + 1; + END LOOP; + + RETURN NEXT v_ret; + END LOOP; + RETURN ; +END; +$body$ +LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER; + +COMMENT ON FUNCTION "public"."table_msg"(a_schema_name varchar, a_table_name varchar) +IS '获得表信息'; + +---重载一个函数 +CREATE OR REPLACE FUNCTION "public"."table_msg" (a_table_name varchar) RETURNS SETOF "public"."tablestruct" AS +$body$ +DECLARE + v_ret tablestruct; +BEGIN + FOR v_ret IN SELECT * FROM table_msg('public',a_table_name) LOOP + RETURN NEXT v_ret; + END LOOP; + RETURN; +END; +$body$ +LANGUAGE 'plpgsql' VOLATILE CALLED ON NULL INPUT SECURITY INVOKER; + +COMMENT ON FUNCTION "public"."table_msg"(a_table_name varchar) +IS '获得表信息'; \ No newline at end of file diff --git a/thinkphp/library/think/db/exception/BindParamException.php b/thinkphp/library/think/db/exception/BindParamException.php new file mode 100755 index 0000000..dce0c7b --- /dev/null +++ b/thinkphp/library/think/db/exception/BindParamException.php @@ -0,0 +1,36 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\exception; + +use think\exception\DbException; + +/** + * PDO参数绑定异常 + */ +class BindParamException extends DbException +{ + + /** + * BindParamException constructor. + * @access public + * @param string $message + * @param array $config + * @param string $sql + * @param array $bind + * @param int $code + */ + public function __construct($message, $config, $sql, $bind, $code = 10502) + { + $this->setData('Bind Param', $bind); + parent::__construct($message, $config, $sql, $code); + } +} diff --git a/thinkphp/library/think/db/exception/DataNotFoundException.php b/thinkphp/library/think/db/exception/DataNotFoundException.php new file mode 100755 index 0000000..883e333 --- /dev/null +++ b/thinkphp/library/think/db/exception/DataNotFoundException.php @@ -0,0 +1,44 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\exception; + +use think\exception\DbException; + +class DataNotFoundException extends DbException +{ + protected $table; + + /** + * DbException constructor. + * @access public + * @param string $message + * @param string $table + * @param array $config + */ + public function __construct($message, $table = '', array $config = []) + { + $this->message = $message; + $this->table = $table; + + $this->setData('Database Config', $config); + } + + /** + * 获取数据表名 + * @access public + * @return string + */ + public function getTable() + { + return $this->table; + } +} diff --git a/thinkphp/library/think/db/exception/ModelNotFoundException.php b/thinkphp/library/think/db/exception/ModelNotFoundException.php new file mode 100755 index 0000000..ae52baf --- /dev/null +++ b/thinkphp/library/think/db/exception/ModelNotFoundException.php @@ -0,0 +1,45 @@ + +// +---------------------------------------------------------------------- + +namespace think\db\exception; + +use think\exception\DbException; + +class ModelNotFoundException extends DbException +{ + protected $model; + + /** + * 构造方法 + * @access public + * @param string $message + * @param string $model + * @param array $config + */ + public function __construct($message, $model = '', array $config = []) + { + $this->message = $message; + $this->model = $model; + + $this->setData('Database Config', $config); + } + + /** + * 获取模型类名 + * @access public + * @return string + */ + public function getModel() + { + return $this->model; + } + +} diff --git a/thinkphp/library/think/debug/Console.php b/thinkphp/library/think/debug/Console.php new file mode 100755 index 0000000..5cbaa0f --- /dev/null +++ b/thinkphp/library/think/debug/Console.php @@ -0,0 +1,156 @@ + +// +---------------------------------------------------------------------- + +namespace think\debug; + +use think\Container; +use think\Db; +use think\Response; + +/** + * 浏览器调试输出 + */ +class Console +{ + protected $config = [ + 'tabs' => ['base' => '基本', 'file' => '文件', 'info' => '流程', 'notice|error' => '错误', 'sql' => 'SQL', 'debug|log' => '调试'], + ]; + + // 实例化并传入参数 + public function __construct($config = []) + { + if (is_array($config)) { + $this->config = array_merge($this->config, $config); + } + } + + /** + * 调试输出接口 + * @access public + * @param Response $response Response对象 + * @param array $log 日志信息 + * @return bool + */ + public function output(Response $response, array $log = []) + { + $request = Container::get('request'); + $contentType = $response->getHeader('Content-Type'); + $accept = $request->header('accept'); + if (strpos($accept, 'application/json') === 0 || $request->isAjax()) { + return false; + } elseif (!empty($contentType) && strpos($contentType, 'html') === false) { + return false; + } + // 获取基本信息 + $runtime = number_format(microtime(true) - Container::get('app')->getBeginTime(), 10); + $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; + $mem = number_format((memory_get_usage() - Container::get('app')->getBeginMem()) / 1024, 2); + + if ($request->host()) { + $uri = $request->protocol() . ' ' . $request->method() . ' : ' . $request->url(true); + } else { + $uri = 'cmd:' . implode(' ', $_SERVER['argv']); + } + + // 页面Trace信息 + $base = [ + '请求信息' => date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']) . ' ' . $uri, + '运行时间' => number_format($runtime, 6) . 's [ 吞吐率:' . $reqs . 'req/s ] 内存消耗:' . $mem . 'kb 文件加载:' . count(get_included_files()), + '查询信息' => Db::$queryTimes . ' queries ' . Db::$executeTimes . ' writes ', + '缓存信息' => Container::get('cache')->getReadTimes() . ' reads,' . Container::get('cache')->getWriteTimes() . ' writes', + ]; + + if (session_id()) { + $base['会话信息'] = 'SESSION_ID=' . session_id(); + } + + $info = Container::get('debug')->getFile(true); + + // 页面Trace信息 + $trace = []; + foreach ($this->config['tabs'] as $name => $title) { + $name = strtolower($name); + switch ($name) { + case 'base': // 基本信息 + $trace[$title] = $base; + break; + case 'file': // 文件信息 + $trace[$title] = $info; + break; + default: // 调试信息 + if (strpos($name, '|')) { + // 多组信息 + $names = explode('|', $name); + $result = []; + foreach ($names as $name) { + $result = array_merge($result, isset($log[$name]) ? $log[$name] : []); + } + $trace[$title] = $result; + } else { + $trace[$title] = isset($log[$name]) ? $log[$name] : ''; + } + } + } + + //输出到控制台 + $lines = ''; + foreach ($trace as $type => $msg) { + $lines .= $this->console($type, $msg); + } + $js = << +{$lines} + +JS; + return $js; + } + + protected function console($type, $msg) + { + $type = strtolower($type); + $trace_tabs = array_values($this->config['tabs']); + $line[] = ($type == $trace_tabs[0] || '调试' == $type || '错误' == $type) + ? "console.group('{$type}');" + : "console.groupCollapsed('{$type}');"; + + foreach ((array) $msg as $key => $m) { + switch ($type) { + case '调试': + $var_type = gettype($m); + if (in_array($var_type, ['array', 'string'])) { + $line[] = "console.log(" . json_encode($m) . ");"; + } else { + $line[] = "console.log(" . json_encode(var_export($m, 1)) . ");"; + } + break; + case '错误': + $msg = str_replace("\n", '\n', addslashes(is_scalar($m) ? $m : json_encode($m))); + $style = 'color:#F4006B;font-size:14px;'; + $line[] = "console.error(\"%c{$msg}\", \"{$style}\");"; + break; + case 'sql': + $msg = str_replace("\n", '\n', addslashes($m)); + $style = "color:#009bb4;"; + $line[] = "console.log(\"%c{$msg}\", \"{$style}\");"; + break; + default: + $m = is_string($key) ? $key . ' ' . $m : $key + 1 . ' ' . $m; + $msg = json_encode($m); + $line[] = "console.log({$msg});"; + break; + } + } + $line[] = "console.groupEnd();"; + return implode(PHP_EOL, $line); + } + +} diff --git a/thinkphp/library/think/debug/Html.php b/thinkphp/library/think/debug/Html.php new file mode 100755 index 0000000..a123762 --- /dev/null +++ b/thinkphp/library/think/debug/Html.php @@ -0,0 +1,106 @@ + +// +---------------------------------------------------------------------- + +namespace think\debug; + +use think\Container; +use think\Db; +use think\Response; + +/** + * 页面Trace调试 + */ +class Html +{ + protected $config = [ + 'file' => '', + 'tabs' => ['base' => '基本', 'file' => '文件', 'info' => '流程', 'notice|error' => '错误', 'sql' => 'SQL', 'debug|log' => '调试'], + ]; + + // 实例化并传入参数 + public function __construct(array $config = []) + { + $this->config = array_merge($this->config, $config); + } + + /** + * 调试输出接口 + * @access public + * @param Response $response Response对象 + * @param array $log 日志信息 + * @return bool + */ + public function output(Response $response, array $log = []) + { + $request = Container::get('request'); + $contentType = $response->getHeader('Content-Type'); + $accept = $request->header('accept'); + if (strpos($accept, 'application/json') === 0 || $request->isAjax()) { + return false; + } elseif (!empty($contentType) && strpos($contentType, 'html') === false) { + return false; + } + // 获取基本信息 + $runtime = number_format(microtime(true) - Container::get('app')->getBeginTime(), 10, '.', ''); + $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; + $mem = number_format((memory_get_usage() - Container::get('app')->getBeginMem()) / 1024, 2); + + // 页面Trace信息 + if ($request->host()) { + $uri = $request->protocol() . ' ' . $request->method() . ' : ' . $request->url(true); + } else { + $uri = 'cmd:' . implode(' ', $_SERVER['argv']); + } + $base = [ + '请求信息' => date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']) . ' ' . $uri, + '运行时间' => number_format($runtime, 6) . 's [ 吞吐率:' . $reqs . 'req/s ] 内存消耗:' . $mem . 'kb 文件加载:' . count(get_included_files()), + '查询信息' => Db::$queryTimes . ' queries ' . Db::$executeTimes . ' writes ', + '缓存信息' => Container::get('cache')->getReadTimes() . ' reads,' . Container::get('cache')->getWriteTimes() . ' writes', + ]; + + if (session_id()) { + $base['会话信息'] = 'SESSION_ID=' . session_id(); + } + + $info = Container::get('debug')->getFile(true); + + // 页面Trace信息 + $trace = []; + foreach ($this->config['tabs'] as $name => $title) { + $name = strtolower($name); + switch ($name) { + case 'base': // 基本信息 + $trace[$title] = $base; + break; + case 'file': // 文件信息 + $trace[$title] = $info; + break; + default: // 调试信息 + if (strpos($name, '|')) { + // 多组信息 + $names = explode('|', $name); + $result = []; + foreach ($names as $name) { + $result = array_merge($result, isset($log[$name]) ? $log[$name] : []); + } + $trace[$title] = $result; + } else { + $trace[$title] = isset($log[$name]) ? $log[$name] : ''; + } + } + } + // 调用Trace页面模板 + ob_start(); + include $this->config['file']; + return ob_get_clean(); + } + +} diff --git a/thinkphp/library/think/exception/ClassNotFoundException.php b/thinkphp/library/think/exception/ClassNotFoundException.php new file mode 100755 index 0000000..eb22e73 --- /dev/null +++ b/thinkphp/library/think/exception/ClassNotFoundException.php @@ -0,0 +1,32 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +class ClassNotFoundException extends \RuntimeException +{ + protected $class; + public function __construct($message, $class = '') + { + $this->message = $message; + $this->class = $class; + } + + /** + * 获取类名 + * @access public + * @return string + */ + public function getClass() + { + return $this->class; + } +} diff --git a/thinkphp/library/think/exception/DbException.php b/thinkphp/library/think/exception/DbException.php new file mode 100755 index 0000000..6baafb5 --- /dev/null +++ b/thinkphp/library/think/exception/DbException.php @@ -0,0 +1,44 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +use think\Exception; + +/** + * Database相关异常处理类 + */ +class DbException extends Exception +{ + /** + * DbException constructor. + * @access public + * @param string $message + * @param array $config + * @param string $sql + * @param int $code + */ + public function __construct($message, array $config = [], $sql = '', $code = 10500) + { + $this->message = $message; + $this->code = $code; + + $this->setData('Database Status', [ + 'Error Code' => $code, + 'Error Message' => $message, + 'Error SQL' => $sql, + ]); + + unset($config['username'], $config['password']); + $this->setData('Database Config', $config); + } + +} diff --git a/thinkphp/library/think/exception/ErrorException.php b/thinkphp/library/think/exception/ErrorException.php new file mode 100755 index 0000000..3143b8f --- /dev/null +++ b/thinkphp/library/think/exception/ErrorException.php @@ -0,0 +1,56 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +use think\Exception; + +/** + * ThinkPHP错误异常 + * 主要用于封装 set_error_handler 和 register_shutdown_function 得到的错误 + * 除开从 think\Exception 继承的功能 + * 其他和PHP系统\ErrorException功能基本一样 + */ +class ErrorException extends Exception +{ + /** + * 用于保存错误级别 + * @var integer + */ + protected $severity; + + /** + * 错误异常构造函数 + * @access public + * @param integer $severity 错误级别 + * @param string $message 错误详细信息 + * @param string $file 出错文件路径 + * @param integer $line 出错行号 + */ + public function __construct($severity, $message, $file, $line) + { + $this->severity = $severity; + $this->message = $message; + $this->file = $file; + $this->line = $line; + $this->code = 0; + } + + /** + * 获取错误级别 + * @access public + * @return integer 错误级别 + */ + final public function getSeverity() + { + return $this->severity; + } +} diff --git a/thinkphp/library/think/exception/Handle.php b/thinkphp/library/think/exception/Handle.php new file mode 100755 index 0000000..02c85ec --- /dev/null +++ b/thinkphp/library/think/exception/Handle.php @@ -0,0 +1,306 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +use Exception; +use think\console\Output; +use think\Container; +use think\Response; + +class Handle +{ + protected $render; + protected $ignoreReport = [ + '\\think\\exception\\HttpException', + ]; + + public function setRender($render) + { + $this->render = $render; + } + + /** + * Report or log an exception. + * + * @access public + * @param \Exception $exception + * @return void + */ + public function report(Exception $exception) + { + if (!$this->isIgnoreReport($exception)) { + // 收集异常数据 + if (Container::get('app')->isDebug()) { + $data = [ + 'file' => $exception->getFile(), + 'line' => $exception->getLine(), + 'message' => $this->getMessage($exception), + 'code' => $this->getCode($exception), + ]; + $log = "[{$data['code']}]{$data['message']}[{$data['file']}:{$data['line']}]"; + } else { + $data = [ + 'code' => $this->getCode($exception), + 'message' => $this->getMessage($exception), + ]; + $log = "[{$data['code']}]{$data['message']}"; + } + + if (Container::get('app')->config('log.record_trace')) { + $log .= "\r\n" . $exception->getTraceAsString(); + } + + Container::get('log')->record($log, 'error'); + } + } + + protected function isIgnoreReport(Exception $exception) + { + foreach ($this->ignoreReport as $class) { + if ($exception instanceof $class) { + return true; + } + } + + return false; + } + + /** + * Render an exception into an HTTP response. + * + * @access public + * @param \Exception $e + * @return Response + */ + public function render(Exception $e) + { + if ($this->render && $this->render instanceof \Closure) { + $result = call_user_func_array($this->render, [$e]); + + if ($result) { + return $result; + } + } + + if ($e instanceof HttpException) { + return $this->renderHttpException($e); + } else { + return $this->convertExceptionToResponse($e); + } + } + + /** + * @access public + * @param Output $output + * @param Exception $e + */ + public function renderForConsole(Output $output, Exception $e) + { + if (Container::get('app')->isDebug()) { + $output->setVerbosity(Output::VERBOSITY_DEBUG); + } + + $output->renderException($e); + } + + /** + * @access protected + * @param HttpException $e + * @return Response + */ + protected function renderHttpException(HttpException $e) + { + $status = $e->getStatusCode(); + $template = Container::get('app')->config('http_exception_template'); + + if (!Container::get('app')->isDebug() && !empty($template[$status])) { + return Response::create($template[$status], 'view', $status)->assign(['e' => $e]); + } else { + return $this->convertExceptionToResponse($e); + } + } + + /** + * @access protected + * @param Exception $exception + * @return Response + */ + protected function convertExceptionToResponse(Exception $exception) + { + // 收集异常数据 + if (Container::get('app')->isDebug()) { + // 调试模式,获取详细的错误信息 + $data = [ + 'name' => get_class($exception), + 'file' => $exception->getFile(), + 'line' => $exception->getLine(), + 'message' => $this->getMessage($exception), + 'trace' => $exception->getTrace(), + 'code' => $this->getCode($exception), + 'source' => $this->getSourceCode($exception), + 'datas' => $this->getExtendData($exception), + 'tables' => [ + 'GET Data' => $_GET, + 'POST Data' => $_POST, + 'Files' => $_FILES, + 'Cookies' => $_COOKIE, + 'Session' => isset($_SESSION) ? $_SESSION : [], + 'Server/Request Data' => $_SERVER, + 'Environment Variables' => $_ENV, + 'ThinkPHP Constants' => $this->getConst(), + ], + ]; + } else { + // 部署模式仅显示 Code 和 Message + $data = [ + 'code' => $this->getCode($exception), + 'message' => $this->getMessage($exception), + ]; + + if (!Container::get('app')->config('show_error_msg')) { + // 不显示详细错误信息 + $data['message'] = Container::get('app')->config('error_message'); + } + } + + //保留一层 + while (ob_get_level() > 1) { + ob_end_clean(); + } + + $data['echo'] = ob_get_clean(); + + ob_start(); + extract($data); + include Container::get('app')->config('exception_tmpl'); + + // 获取并清空缓存 + $content = ob_get_clean(); + $response = Response::create($content, 'html'); + + if ($exception instanceof HttpException) { + $statusCode = $exception->getStatusCode(); + $response->header($exception->getHeaders()); + } + + if (!isset($statusCode)) { + $statusCode = 500; + } + $response->code($statusCode); + + return $response; + } + + /** + * 获取错误编码 + * ErrorException则使用错误级别作为错误编码 + * @access protected + * @param \Exception $exception + * @return integer 错误编码 + */ + protected function getCode(Exception $exception) + { + $code = $exception->getCode(); + + if (!$code && $exception instanceof ErrorException) { + $code = $exception->getSeverity(); + } + + return $code; + } + + /** + * 获取错误信息 + * ErrorException则使用错误级别作为错误编码 + * @access protected + * @param \Exception $exception + * @return string 错误信息 + */ + protected function getMessage(Exception $exception) + { + $message = $exception->getMessage(); + + if (PHP_SAPI == 'cli') { + return $message; + } + + $lang = Container::get('lang'); + + if (strpos($message, ':')) { + $name = strstr($message, ':', true); + $message = $lang->has($name) ? $lang->get($name) . strstr($message, ':') : $message; + } elseif (strpos($message, ',')) { + $name = strstr($message, ',', true); + $message = $lang->has($name) ? $lang->get($name) . ':' . substr(strstr($message, ','), 1) : $message; + } elseif ($lang->has($message)) { + $message = $lang->get($message); + } + + return $message; + } + + /** + * 获取出错文件内容 + * 获取错误的前9行和后9行 + * @access protected + * @param \Exception $exception + * @return array 错误文件内容 + */ + protected function getSourceCode(Exception $exception) + { + // 读取前9行和后9行 + $line = $exception->getLine(); + $first = ($line - 9 > 0) ? $line - 9 : 1; + + try { + $contents = file($exception->getFile()); + $source = [ + 'first' => $first, + 'source' => array_slice($contents, $first - 1, 19), + ]; + } catch (Exception $e) { + $source = []; + } + + return $source; + } + + /** + * 获取异常扩展信息 + * 用于非调试模式html返回类型显示 + * @access protected + * @param \Exception $exception + * @return array 异常类定义的扩展数据 + */ + protected function getExtendData(Exception $exception) + { + $data = []; + + if ($exception instanceof \think\Exception) { + $data = $exception->getData(); + } + + return $data; + } + + /** + * 获取常量列表 + * @access private + * @return array 常量列表 + */ + private static function getConst() + { + $const = get_defined_constants(true); + + return isset($const['user']) ? $const['user'] : []; + } +} diff --git a/thinkphp/library/think/exception/HttpException.php b/thinkphp/library/think/exception/HttpException.php new file mode 100755 index 0000000..01a27fc --- /dev/null +++ b/thinkphp/library/think/exception/HttpException.php @@ -0,0 +1,36 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +class HttpException extends \RuntimeException +{ + private $statusCode; + private $headers; + + public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = [], $code = 0) + { + $this->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/thinkphp/library/think/exception/HttpResponseException.php b/thinkphp/library/think/exception/HttpResponseException.php new file mode 100755 index 0000000..5297286 --- /dev/null +++ b/thinkphp/library/think/exception/HttpResponseException.php @@ -0,0 +1,33 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +use think\Response; + +class HttpResponseException extends \RuntimeException +{ + /** + * @var Response + */ + protected $response; + + public function __construct(Response $response) + { + $this->response = $response; + } + + public function getResponse() + { + return $this->response; + } + +} diff --git a/thinkphp/library/think/exception/PDOException.php b/thinkphp/library/think/exception/PDOException.php new file mode 100755 index 0000000..25240b6 --- /dev/null +++ b/thinkphp/library/think/exception/PDOException.php @@ -0,0 +1,40 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +/** + * PDO异常处理类 + * 重新封装了系统的\PDOException类 + */ +class PDOException extends DbException +{ + /** + * PDOException constructor. + * @access public + * @param \PDOException $exception + * @param array $config + * @param string $sql + * @param int $code + */ + public function __construct(\PDOException $exception, array $config, $sql, $code = 10501) + { + $error = $exception->errorInfo; + + $this->setData('PDO Error Info', [ + 'SQLSTATE' => $error[0], + 'Driver Error Code' => isset($error[1]) ? $error[1] : 0, + 'Driver Error Message' => isset($error[2]) ? $error[2] : '', + ]); + + parent::__construct($exception->getMessage(), $config, $sql, $code); + } +} diff --git a/thinkphp/library/think/exception/RouteNotFoundException.php b/thinkphp/library/think/exception/RouteNotFoundException.php new file mode 100755 index 0000000..d22e3a6 --- /dev/null +++ b/thinkphp/library/think/exception/RouteNotFoundException.php @@ -0,0 +1,22 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +class RouteNotFoundException extends HttpException +{ + + public function __construct() + { + parent::__construct(404, 'Route Not Found'); + } + +} diff --git a/thinkphp/library/think/exception/TemplateNotFoundException.php b/thinkphp/library/think/exception/TemplateNotFoundException.php new file mode 100755 index 0000000..4202069 --- /dev/null +++ b/thinkphp/library/think/exception/TemplateNotFoundException.php @@ -0,0 +1,33 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +class TemplateNotFoundException extends \RuntimeException +{ + protected $template; + + public function __construct($message, $template = '') + { + $this->message = $message; + $this->template = $template; + } + + /** + * 获取模板文件 + * @access public + * @return string + */ + public function getTemplate() + { + return $this->template; + } +} diff --git a/thinkphp/library/think/exception/ThrowableError.php b/thinkphp/library/think/exception/ThrowableError.php new file mode 100755 index 0000000..87b6b9d --- /dev/null +++ b/thinkphp/library/think/exception/ThrowableError.php @@ -0,0 +1,47 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +class ThrowableError extends \ErrorException +{ + public function __construct(\Throwable $e) + { + + if ($e instanceof \ParseError) { + $message = 'Parse error: ' . $e->getMessage(); + $severity = E_PARSE; + } elseif ($e instanceof \TypeError) { + $message = 'Type error: ' . $e->getMessage(); + $severity = E_RECOVERABLE_ERROR; + } else { + $message = 'Fatal error: ' . $e->getMessage(); + $severity = E_ERROR; + } + + parent::__construct( + $message, + $e->getCode(), + $severity, + $e->getFile(), + $e->getLine() + ); + + $this->setTrace($e->getTrace()); + } + + protected function setTrace($trace) + { + $traceReflector = new \ReflectionProperty('Exception', 'trace'); + $traceReflector->setAccessible(true); + $traceReflector->setValue($this, $trace); + } +} diff --git a/thinkphp/library/think/exception/ValidateException.php b/thinkphp/library/think/exception/ValidateException.php new file mode 100755 index 0000000..81ddfe2 --- /dev/null +++ b/thinkphp/library/think/exception/ValidateException.php @@ -0,0 +1,34 @@ + +// +---------------------------------------------------------------------- + +namespace think\exception; + +class ValidateException extends \RuntimeException +{ + protected $error; + + public function __construct($error, $code = 0) + { + $this->error = $error; + $this->message = is_array($error) ? implode(PHP_EOL, $error) : $error; + $this->code = $code; + } + + /** + * 获取验证错误信息 + * @access public + * @return array|string + */ + public function getError() + { + return $this->error; + } +} diff --git a/thinkphp/library/think/facade/App.php b/thinkphp/library/think/facade/App.php new file mode 100755 index 0000000..b375aa0 --- /dev/null +++ b/thinkphp/library/think/facade/App.php @@ -0,0 +1,63 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\App + * @mixin \think\App + * @method \think\App bind(string $bind) static 绑定模块或者控制器 + * @method void initialize() static 初始化应用 + * @method void init(string $module='') static 初始化模块 + * @method \think\Response run() static 执行应用 + * @method \think\App dispatch(\think\route\Dispatch $dispatch) static 设置当前请求的调度信息 + * @method void log(mixed $log, string $type = 'info') static 记录调试信息 + * @method mixed config(string $name='') static 获取配置参数 + * @method \think\route\Dispatch routeCheck() static URL路由检测(根据PATH_INFO) + * @method \think\App routeMust(bool $must = false) static 设置应用的路由检测机制 + * @method \think\Model model(string $name = '', string $layer = 'model', bool $appendSuffix = false, string $common = 'common') static 实例化模型 + * @method object controller(string $name, string $layer = 'controller', bool $appendSuffix = false, string $empty = '') static 实例化控制器 + * @method \think\Validate validate(string $name = '', string $layer = 'validate', bool $appendSuffix = false, string $common = 'common') static 实例化验证器类 + * @method \think\db\Query db(mixed $config = [], mixed $name = false) static 数据库初始化 + * @method mixed action(string $url, $vars = [], $layer = 'controller', $appendSuffix = false) static 调用模块的操作方法 + * @method string parseClass(string $module, string $layer, string $name, bool $appendSuffix = false) static 解析应用类的类名 + * @method string version() static 获取框架版本 + * @method bool isDebug() static 是否为调试模式 + * @method string getModulePath() static 获取当前模块路径 + * @method void setModulePath(string $path) static 设置当前模块路径 + * @method string getRootPath() static 获取应用根目录 + * @method string getAppPath() static 获取应用类库目录 + * @method string getRuntimePath() static 获取应用运行时目录 + * @method string getThinkPath() static 获取核心框架目录 + * @method string getRoutePath() static 获取路由目录 + * @method string getConfigPath() static 获取应用配置目录 + * @method string getConfigExt() static 获取配置后缀 + * @method string setNamespace(string $namespace) static 设置应用类库命名空间 + * @method string getNamespace() static 获取应用类库命名空间 + * @method string getSuffix() static 是否启用类库后缀 + * @method float getBeginTime() static 获取应用开启时间 + * @method integer getBeginMem() static 获取应用初始内存占用 + * @method \think\Container container() static 获取容器实例 + */ +class App extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'app'; + } +} diff --git a/thinkphp/library/think/facade/Build.php b/thinkphp/library/think/facade/Build.php new file mode 100755 index 0000000..c051bea --- /dev/null +++ b/thinkphp/library/think/facade/Build.php @@ -0,0 +1,33 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Build + * @mixin \think\Build + * @method void run(array $build = [], string $namespace = 'app', bool $suffix = false) static 根据传入的build资料创建目录和文件 + * @method void module(string $module = '', array $list = [], string $namespace = 'app', bool $suffix = false) static 创建模块 + */ +class Build extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'build'; + } +} diff --git a/thinkphp/library/think/facade/Cache.php b/thinkphp/library/think/facade/Cache.php new file mode 100755 index 0000000..9743486 --- /dev/null +++ b/thinkphp/library/think/facade/Cache.php @@ -0,0 +1,45 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Cache + * @mixin \think\Cache + * @method \think\cache\Driver connect(array $options = [], mixed $name = false) static 连接缓存 + * @method \think\cache\Driver init(array $options = []) static 初始化缓存 + * @method \think\cache\Driver store(string $name = '') static 切换缓存类型 + * @method bool has(string $name) static 判断缓存是否存在 + * @method mixed get(string $name, mixed $default = false) static 读取缓存 + * @method mixed pull(string $name) static 读取缓存并删除 + * @method mixed set(string $name, mixed $value, int $expire = null) static 设置缓存 + * @method mixed remember(string $name, mixed $value, int $expire = null) static 如果不存在则写入缓存 + * @method mixed inc(string $name, int $step = 1) static 自增缓存(针对数值缓存) + * @method mixed dec(string $name, int $step = 1) static 自减缓存(针对数值缓存) + * @method bool rm(string $name) static 删除缓存 + * @method bool clear(string $tag = null) static 清除缓存 + * @method mixed tag(string $name, mixed $keys = null, bool $overlay = false) static 缓存标签 + * @method object handler() static 返回句柄对象,可执行其它高级方法 + */ +class Cache extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'cache'; + } +} diff --git a/thinkphp/library/think/facade/Config.php b/thinkphp/library/think/facade/Config.php new file mode 100755 index 0000000..824d2b6 --- /dev/null +++ b/thinkphp/library/think/facade/Config.php @@ -0,0 +1,39 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Config + * @mixin \think\Config + * @method array load(string $file, string $name = '') static 加载配置文件 + * @method bool has(string $name) static 检测配置是否存在 + * @method array pull(string $name) static 获取一级配置参数 + * @method mixed get(string $name,mixed $default = null) static 获取配置参数 + * @method array set(mixed $name, mixed $value = null) static 设置配置参数 + * @method array reset(string $name ='') static 重置配置参数 + * @method void remove(string $name = '') static 移除配置 + * @method void setYaconf(mixed $yaconf) static 设置开启Yaconf 或者指定配置文件名 + */ +class Config extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'config'; + } +} diff --git a/thinkphp/library/think/facade/Cookie.php b/thinkphp/library/think/facade/Cookie.php new file mode 100755 index 0000000..4d7cea2 --- /dev/null +++ b/thinkphp/library/think/facade/Cookie.php @@ -0,0 +1,39 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Cookie + * @mixin \think\Cookie + * @method void init(array $config = []) static 初始化 + * @method bool has(string $name,string $prefix = null) static 判断Cookie数据 + * @method mixed prefix(string $prefix = '') static 设置或者获取cookie作用域(前缀) + * @method mixed get(string $name,string $prefix = null) static Cookie获取 + * @method mixed set(string $name, mixed $value = null, mixed $option = null) static 设置Cookie + * @method void forever(string $name, mixed $value = null, mixed $option = null) static 永久保存Cookie数据 + * @method void delete(string $name, string $prefix = null) static Cookie删除 + * @method void clear($prefix = null) static Cookie清空 + */ +class Cookie extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'cookie'; + } +} diff --git a/thinkphp/library/think/facade/Debug.php b/thinkphp/library/think/facade/Debug.php new file mode 100755 index 0000000..df20086 --- /dev/null +++ b/thinkphp/library/think/facade/Debug.php @@ -0,0 +1,40 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Debug + * @mixin \think\Debug + * @method void remark(string $name, mixed $value = '') static 记录时间(微秒)和内存使用情况 + * @method int getRangeTime(string $start, string $end, mixed $dec = 6) static 统计某个区间的时间(微秒)使用情况 + * @method int getUseTime(int $dec = 6) static 统计从开始到统计时的时间(微秒)使用情况 + * @method string getThroughputRate(string $start, string $end, mixed $dec = 6) static 获取当前访问的吞吐率情况 + * @method string getRangeMem(string $start, string $end, mixed $dec = 2) static 记录区间的内存使用情况 + * @method int getUseMem(int $dec = 2) static 统计从开始到统计时的内存使用情况 + * @method string getMemPeak(string $start, string $end, mixed $dec = 2) static 统计区间的内存峰值情况 + * @method mixed getFile(bool $detail = false) static 获取文件加载信息 + * @method mixed dump(mixed $var, bool $echo = true, string $label = null, int $flags = ENT_SUBSTITUTE) static 浏览器友好的变量输出 + */ +class Debug extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'debug'; + } +} diff --git a/thinkphp/library/think/facade/Env.php b/thinkphp/library/think/facade/Env.php new file mode 100755 index 0000000..5d04724 --- /dev/null +++ b/thinkphp/library/think/facade/Env.php @@ -0,0 +1,34 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Env + * @mixin \think\Env + * @method void load(string $file) static 读取环境变量定义文件 + * @method mixed get(string $name = null, mixed $default = null) static 获取环境变量值 + * @method void set(mixed $env, string $value = null) static 设置环境变量值 + */ +class Env extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'env'; + } +} diff --git a/thinkphp/library/think/facade/Hook.php b/thinkphp/library/think/facade/Hook.php new file mode 100755 index 0000000..e9e1208 --- /dev/null +++ b/thinkphp/library/think/facade/Hook.php @@ -0,0 +1,37 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Hook + * @mixin \think\Hook + * @method \think\Hook alias(mixed $name, mixed $behavior = null) static 指定行为标识 + * @method void add(string $tag, mixed $behavior, bool $first = false) static 动态添加行为扩展到某个标签 + * @method void import(array $tags, bool $recursive = true) static 批量导入插件 + * @method array get(string $tag = '') static 获取插件信息 + * @method mixed listen(string $tag, mixed $params = null, bool $once = false) static 监听标签的行为 + * @method mixed exec(mixed $class, mixed $params = null) static 执行行为 + */ +class Hook extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'hook'; + } +} diff --git a/thinkphp/library/think/facade/Lang.php b/thinkphp/library/think/facade/Lang.php new file mode 100755 index 0000000..56c4777 --- /dev/null +++ b/thinkphp/library/think/facade/Lang.php @@ -0,0 +1,41 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Lang + * @mixin \think\Lang + * @method mixed range($range = '') static 设定当前的语言 + * @method mixed set(mixed $name, string $value = null, string $range = '') static 设置语言定义 + * @method array load(mixed $file, string $range = '') static 加载语言定义 + * @method mixed get(string $name = null, array $vars = [], string $range = '') static 获取语言定义 + * @method mixed has(string $name, string $range = '') static 获取语言定义 + * @method string detect() static 自动侦测设置获取语言选择 + * @method void saveToCookie(string $lang = null) static 设置当前语言到Cookie + * @method void setLangDetectVar(string $var) static 设置语言自动侦测的变量 + * @method void setLangCookieVar(string $var) static 设置语言的cookie保存变量 + * @method void setAllowLangList(array $list) static 设置允许的语言列表 + */ +class Lang extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'lang'; + } +} diff --git a/thinkphp/library/think/facade/Log.php b/thinkphp/library/think/facade/Log.php new file mode 100755 index 0000000..ae627a5 --- /dev/null +++ b/thinkphp/library/think/facade/Log.php @@ -0,0 +1,50 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Log + * @mixin \think\Log + * @method \think\Log init(array $config = []) static 日志初始化 + * @method mixed getLog(string $type = '') static 获取日志信息 + * @method \think\Log record(mixed $msg, string $type = 'info', array $context = []) static 记录日志信息 + * @method \think\Log clear() static 清空日志信息 + * @method \think\Log key(string $key) static 当前日志记录的授权key + * @method \think\Log close() static 关闭本次请求日志写入 + * @method bool check(array $config) static 检查日志写入权限 + * @method bool save() static 保存调试信息 + * @method void write(mixed $msg, string $type = 'info', bool $force = false) static 实时写入日志信息 + * @method void log(string $level,mixed $message, array $context = []) static 记录日志信息 + * @method void emergency(mixed $message, array $context = []) static 记录emergency信息 + * @method void alert(mixed $message, array $context = []) static 记录alert信息 + * @method void critical(mixed $message, array $context = []) static 记录critical信息 + * @method void error(mixed $message, array $context = []) static 记录error信息 + * @method void warning(mixed $message, array $context = []) static 记录warning信息 + * @method void notice(mixed $message, array $context = []) static 记录notice信息 + * @method void info(mixed $message, array $context = []) static 记录info信息 + * @method void debug(mixed $message, array $context = []) static 记录debug信息 + * @method void sql(mixed $message, array $context = []) static 记录sql信息 + */ +class Log extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'log'; + } +} diff --git a/thinkphp/library/think/facade/Middleware.php b/thinkphp/library/think/facade/Middleware.php new file mode 100755 index 0000000..5e4cac7 --- /dev/null +++ b/thinkphp/library/think/facade/Middleware.php @@ -0,0 +1,36 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Middleware + * @mixin \think\Middleware + * @method void import(array $middlewares = []) static 批量设置中间件 + * @method void add(mixed $middleware) static 添加中间件到队列 + * @method void unshift(mixed $middleware) static 添加中间件到队列开头 + * @method array all() static 获取中间件队列 + * @method \think\Response dispatch(\think\Request $request) static 执行中间件调度 + */ +class Middleware extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'middleware'; + } +} diff --git a/thinkphp/library/think/facade/Request.php b/thinkphp/library/think/facade/Request.php new file mode 100755 index 0000000..0989253 --- /dev/null +++ b/thinkphp/library/think/facade/Request.php @@ -0,0 +1,97 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Request + * @mixin \think\Request + * @method void hook(mixed $method, mixed $callback = null) static Hook 方法注入 + * @method \think\Request create(string $uri, string $method = 'GET', array $params = [], array $cookie = [], array $files = [], array $server = [], string $content = null) static 创建一个URL请求 + * @method mixed domain(bool $port = false) static 获取当前包含协议、端口的域名 + * @method mixed url(bool $domain = false) static 获取当前完整URL + * @method mixed baseUrl(bool $domain = false) static 获取当前URL + * @method mixed baseFile(bool $domain = false) static 获取当前执行的文件 + * @method mixed root(bool $domain = false) static 获取URL访问根地址 + * @method string rootUrl() static 获取URL访问根目录 + * @method string pathinfo() static 获取当前请求URL的pathinfo信息(含URL后缀) + * @method string path() static 获取当前请求URL的pathinfo信息(不含URL后缀) + * @method string ext() static 当前URL的访问后缀 + * @method float time(bool $float = false) static 获取当前请求的时间 + * @method mixed type() static 当前请求的资源类型 + * @method void mimeType(mixed $type, string $val = '') static 设置资源类型 + * @method string method(bool $method = false) static 当前的请求类型 + * @method bool isGet() static 是否为GET请求 + * @method bool isPost() static 是否为POST请求 + * @method bool isPut() static 是否为PUT请求 + * @method bool isDelete() static 是否为DELTE请求 + * @method bool isHead() static 是否为HEAD请求 + * @method bool isPatch() static 是否为PATCH请求 + * @method bool isOptions() static 是否为OPTIONS请求 + * @method bool isCli() static 是否为cli + * @method bool isCgi() static 是否为cgi + * @method mixed param(string $name = '', mixed $default = null, mixed $filter = '') static 获取当前请求的参数 + * @method mixed route(string $name = '', mixed $default = null, mixed $filter = '') static 设置获取路由参数 + * @method mixed get(string $name = '', mixed $default = null, mixed $filter = '') static 设置获取GET参数 + * @method mixed post(string $name = '', mixed $default = null, mixed $filter = '') static 设置获取POST参数 + * @method mixed put(string $name = '', mixed $default = null, mixed $filter = '') static 设置获取PUT参数 + * @method mixed delete(string $name = '', mixed $default = null, mixed $filter = '') static 设置获取DELETE参数 + * @method mixed patch(string $name = '', mixed $default = null, mixed $filter = '') static 设置获取PATCH参数 + * @method mixed request(string $name = '', mixed $default = null, mixed $filter = '') static 获取request变量 + * @method mixed session(string $name = '', mixed $default = null, mixed $filter = '') static 获取session数据 + * @method mixed cookie(string $name = '', mixed $default = null, mixed $filter = '') static 获取cookie参数 + * @method mixed server(string $name = '', mixed $default = null, mixed $filter = '') static 获取server参数 + * @method mixed env(string $name = '', mixed $default = null, mixed $filter = '') static 获取环境变量 + * @method mixed file(string $name = '') static 获取上传的文件信息 + * @method mixed header(string $name = '', mixed $default = null) static 设置或者获取当前的Header + * @method mixed input(array $data,mixed $name = '', mixed $default = null, mixed $filter = '') static 获取变量 支持过滤和默认值 + * @method mixed filter(mixed $filter = null) static 设置或获取当前的过滤规则 + * @method mixed has(string $name, string $type = 'param', bool $checkEmpty = false) static 是否存在某个请求参数 + * @method mixed only(mixed $name, string $type = 'param') static 获取指定的参数 + * @method mixed except(mixed $name, string $type = 'param') static 排除指定参数获取 + * @method bool isSsl() static 当前是否ssl + * @method bool isAjax(bool $ajax = false) static 当前是否Ajax请求 + * @method bool isPjax(bool $pjax = false) static 当前是否Pjax请求 + * @method mixed ip(int $type = 0, bool $adv = true) static 获取客户端IP地址 + * @method bool isMobile() static 检测是否使用手机访问 + * @method string scheme() static 当前URL地址中的scheme参数 + * @method string query() static 当前请求URL地址中的query参数 + * @method string host(bool $stric = false) static 当前请求的host + * @method string port() static 当前请求URL地址中的port参数 + * @method string protocol() static 当前请求 SERVER_PROTOCOL + * @method string remotePort() static 当前请求 REMOTE_PORT + * @method string contentType() static 当前请求 HTTP_CONTENT_TYPE + * @method array routeInfo() static 获取当前请求的路由信息 + * @method array dispatch() static 获取当前请求的调度信息 + * @method string module() static 获取当前的模块名 + * @method string controller(bool $convert = false) static 获取当前的控制器名 + * @method string action(bool $convert = false) static 获取当前的操作名 + * @method string langset() static 获取当前的语言 + * @method string getContent() static 设置或者获取当前请求的content + * @method string getInput() static 获取当前请求的php://input + * @method string token(string $name = '__token__', mixed $type = 'md5') static 生成请求令牌 + * @method string cache(string $key, mixed $expire = null, array $except = [], string $tag = null) static 设置当前地址的请求缓存 + * @method string getCache() static 读取请求缓存设置 + */ +class Request extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'request'; + } +} diff --git a/thinkphp/library/think/facade/Response.php b/thinkphp/library/think/facade/Response.php new file mode 100755 index 0000000..d7de142 --- /dev/null +++ b/thinkphp/library/think/facade/Response.php @@ -0,0 +1,47 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Response + * @mixin \think\Response + * @method \think\response create(mixed $data = '', string $type = '', int $code = 200, array $header = [], array $options = []) static 创建Response对象 + * @method void send() static 发送数据到客户端 + * @method \think\Response options(mixed $options = []) static 输出的参数 + * @method \think\Response data(mixed $data) static 输出数据设置 + * @method \think\Response header(mixed $name, string $value = null) static 设置响应头 + * @method \think\Response content(mixed $content) static 设置页面输出内容 + * @method \think\Response code(int $code) static 发送HTTP状态 + * @method \think\Response lastModified(string $time) static LastModified + * @method \think\Response expires(string $time) static expires + * @method \think\Response eTag(string $eTag) static eTag + * @method \think\Response cacheControl(string $cache) static 页面缓存控制 + * @method \think\Response contentType(string $contentType, string $charset = 'utf-8') static 页面输出类型 + * @method mixed getHeader(string $name) static 获取头部信息 + * @method mixed getData() static 获取原始数据 + * @method mixed getContent() static 获取输出数据 + * @method int getCode() static 获取状态码 + */ +class Response extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'response'; + } +} diff --git a/thinkphp/library/think/facade/Route.php b/thinkphp/library/think/facade/Route.php new file mode 100755 index 0000000..77196df --- /dev/null +++ b/thinkphp/library/think/facade/Route.php @@ -0,0 +1,57 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Route + * @mixin \think\Route + * @method \think\route\Domain domain(mixed $name, mixed $rule = '', array $option = [], array $pattern = []) static 注册域名路由 + * @method \think\Route pattern(mixed $name, string $rule = '') static 注册变量规则 + * @method \think\Route option(mixed $name, mixed $value = '') static 注册路由参数 + * @method \think\Route bind(string $bind) static 设置路由绑定 + * @method mixed getBind(string $bind) static 读取路由绑定 + * @method \think\Route name(string $name) static 设置当前路由标识 + * @method mixed getName(string $name) static 读取路由标识 + * @method void setName(string $name) static 批量导入路由标识 + * @method void import(array $rules, string $type = '*') static 导入配置文件的路由规则 + * @method \think\route\RuleItem rule(string $rule, mixed $route, string $method = '*', array $option = [], array $pattern = []) static 注册路由规则 + * @method void rules(array $rules, string $method = '*', array $option = [], array $pattern = []) static 批量注册路由规则 + * @method \think\route\RuleGroup group(string|array $name, mixed $route, string $method = '*', array $option = [], array $pattern = []) static 注册路由分组 + * @method \think\route\RuleItem any(string $rule, mixed $route, array $option = [], array $pattern = []) static 注册路由 + * @method \think\route\RuleItem get(string $rule, mixed $route, array $option = [], array $pattern = []) static 注册路由 + * @method \think\route\RuleItem post(string $rule, mixed $route, array $option = [], array $pattern = []) static 注册路由 + * @method \think\route\RuleItem put(string $rule, mixed $route, array $option = [], array $pattern = []) static 注册路由 + * @method \think\route\RuleItem delete(string $rule, mixed $route, array $option = [], array $pattern = []) static 注册路由 + * @method \think\route\RuleItem patch(string $rule, mixed $route, array $option = [], array $pattern = []) static 注册路由 + * @method \think\route\Resource resource(string $rule, mixed $route, array $option = [], array $pattern = []) static 注册资源路由 + * @method \think\Route controller(string $rule, mixed $route, array $option = [], array $pattern = []) static 注册控制器路由 + * @method \think\Route alias(string $rule, mixed $route, array $option = [], array $pattern = []) static 注册别名路由 + * @method \think\Route setMethodPrefix(mixed $method, string $prefix = '') static 设置不同请求类型下面的方法前缀 + * @method \think\Route rest(string $name, array $resource = []) static rest方法定义和修改 + * @method \think\Route\RuleItem miss(string $route, string $method = '*', array $option = []) static 注册未匹配路由规则后的处理 + * @method \think\Route\RuleItem auto(string $route) static 注册一个自动解析的URL路由 + * @method \think\Route\Dispatch check(string $url, string $depr = '/', bool $must = false, bool $completeMatch = false) static 检测URL路由 + */ +class Route extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'route'; + } +} diff --git a/thinkphp/library/think/facade/Session.php b/thinkphp/library/think/facade/Session.php new file mode 100755 index 0000000..fb9206a --- /dev/null +++ b/thinkphp/library/think/facade/Session.php @@ -0,0 +1,46 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Session + * @mixin \think\Session + * @method void init(array $config = []) static session初始化 + * @method bool has(string $name,string $prefix = null) static 判断session数据 + * @method mixed prefix(string $prefix = '') static 设置或者获取session作用域(前缀) + * @method mixed get(string $name = '',string $prefix = null) static session获取 + * @method mixed pull(string $name,string $prefix = null) static session获取并删除 + * @method void push(string $key, mixed $value) static 添加数据到一个session数组 + * @method void set(string $name, mixed $value , string $prefix = null) static 设置session数据 + * @method void flash(string $name, mixed $value = null) static session设置 下一次请求有效 + * @method void flush() static 清空当前请求的session数据 + * @method void delete(string $name, string $prefix = null) static 删除session数据 + * @method void clear($prefix = null) static 清空session数据 + * @method void start() static 启动session + * @method void destroy() static 销毁session + * @method void pause() static 暂停session + * @method void regenerate(bool $delete = false) static 重新生成session_id + */ +class Session extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'session'; + } +} diff --git a/thinkphp/library/think/facade/Template.php b/thinkphp/library/think/facade/Template.php new file mode 100755 index 0000000..f91b118 --- /dev/null +++ b/thinkphp/library/think/facade/Template.php @@ -0,0 +1,36 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Template + * @mixin \think\Template + * @method void assign(mixed $name, mixed $value = '') static 模板变量赋值 + * @method mixed get(string $name = '') static 获取模板变量 + * @method void fetch(string $template, array $vars = [], array $config = []) static 渲染模板文件 + * @method void display(string $content, array $vars = [], array $config = []) static 渲染模板内容 + * @method mixed layout(string $name, string $replace = '') static 设置模板布局 + */ +class Template extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'template'; + } +} diff --git a/thinkphp/library/think/facade/Url.php b/thinkphp/library/think/facade/Url.php new file mode 100755 index 0000000..639591a --- /dev/null +++ b/thinkphp/library/think/facade/Url.php @@ -0,0 +1,33 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Url + * @mixin \think\Url + * @method string build(string $url = '', mixed $vars = '', mixed $suffix = true, mixed $domain = false) static URL生成 支持路由反射 + * @method void root(string $root) static 指定当前生成URL地址的root + */ +class Url extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'url'; + } +} diff --git a/thinkphp/library/think/facade/Validate.php b/thinkphp/library/think/facade/Validate.php new file mode 100755 index 0000000..a6eec23 --- /dev/null +++ b/thinkphp/library/think/facade/Validate.php @@ -0,0 +1,75 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\Validate + * @mixin \think\Validate + * @method \think\Validate make(array $rules = [], array $message = [], array $field = []) static 创建一个验证器类 + * @method \think\Validate rule(mixed $name, mixed $rule = '') static 添加字段验证规则 + * @method void extend(string $type, mixed $callback = null) static 注册扩展验证(类型)规则 + * @method void setTypeMsg(mixed $type, string $msg = null) static 设置验证规则的默认提示信息 + * @method \think\Validate message(mixed $name, string $message = '') static 设置提示信息 + * @method \think\Validate scene(string $name) static 设置验证场景 + * @method bool hasScene(string $name) static 判断是否存在某个验证场景 + * @method \think\Validate batch(bool $batch = true) static 设置批量验证 + * @method \think\Validate only(array $fields) static 指定需要验证的字段列表 + * @method \think\Validate remove(mixed $field, mixed $rule = true) static 移除某个字段的验证规则 + * @method \think\Validate append(mixed $field, mixed $rule = null) static 追加某个字段的验证规则 + * @method bool confirm(mixed $value, mixed $rule, array $data = [], string $field = '') static 验证是否和某个字段的值一致 + * @method bool different(mixed $value, mixed $rule, array $data = []) static 验证是否和某个字段的值是否不同 + * @method bool egt(mixed $value, mixed $rule, array $data = []) static 验证是否大于等于某个值 + * @method bool gt(mixed $value, mixed $rule, array $data = []) static 验证是否大于某个值 + * @method bool elt(mixed $value, mixed $rule, array $data = []) static 验证是否小于等于某个值 + * @method bool lt(mixed $value, mixed $rule, array $data = []) static 验证是否小于某个值 + * @method bool eq(mixed $value, mixed $rule) static 验证是否等于某个值 + * @method bool must(mixed $value, mixed $rule) static 必须验证 + * @method bool is(mixed $value, mixed $rule, array $data = []) static 验证字段值是否为有效格式 + * @method bool ip(mixed $value, mixed $rule) static 验证是否有效IP + * @method bool requireIf(mixed $value, mixed $rule) static 验证某个字段等于某个值的时候必须 + * @method bool requireCallback(mixed $value, mixed $rule,array $data) static 通过回调方法验证某个字段是否必须 + * @method bool requireWith(mixed $value, mixed $rule, array $data) static 验证某个字段有值的情况下必须 + * @method bool filter(mixed $value, mixed $rule) static 使用filter_var方式验证 + * @method bool in(mixed $value, mixed $rule) static 验证是否在范围内 + * @method bool notIn(mixed $value, mixed $rule) static 验证是否不在范围内 + * @method bool between(mixed $value, mixed $rule) static between验证数据 + * @method bool notBetween(mixed $value, mixed $rule) static 使用notbetween验证数据 + * @method bool length(mixed $value, mixed $rule) static 验证数据长度 + * @method bool max(mixed $value, mixed $rule) static 验证数据最大长度 + * @method bool min(mixed $value, mixed $rule) static 验证数据最小长度 + * @method bool after(mixed $value, mixed $rule) static 验证日期 + * @method bool before(mixed $value, mixed $rule) static 验证日期 + * @method bool expire(mixed $value, mixed $rule) static 验证有效期 + * @method bool allowIp(mixed $value, mixed $rule) static 验证IP许可 + * @method bool denyIp(mixed $value, mixed $rule) static 验证IP禁用 + * @method bool regex(mixed $value, mixed $rule) static 使用正则验证数据 + * @method bool token(mixed $value, mixed $rule) static 验证表单令牌 + * @method bool dateFormat(mixed $value, mixed $rule) static 验证时间和日期是否符合指定格式 + * @method bool unique(mixed $value, mixed $rule, array $data = [], string $field = '') static 验证是否唯一 + * @method bool check(array $data, mixed $rules = [], string $scene = '') static 数据自动验证 + * @method mixed getError(mixed $value, mixed $rule) static 获取错误信息 + */ +class Validate extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'validate'; + } + +} diff --git a/thinkphp/library/think/facade/View.php b/thinkphp/library/think/facade/View.php new file mode 100755 index 0000000..0843391 --- /dev/null +++ b/thinkphp/library/think/facade/View.php @@ -0,0 +1,40 @@ + +// +---------------------------------------------------------------------- + +namespace think\facade; + +use think\Facade; + +/** + * @see \think\View + * @mixin \think\View + * @method \think\View init(mixed $engine = [], array $replace = []) static 初始化 + * @method \think\View share(mixed $name, mixed $value = '') static 模板变量静态赋值 + * @method \think\View assign(mixed $name, mixed $value = '') static 模板变量赋值 + * @method \think\View config(mixed $name, mixed $value = '') static 配置模板引擎 + * @method \think\View exists(mixed $name) static 检查模板是否存在 + * @method \think\View filter(Callable $filter) static 视图内容过滤 + * @method \think\View engine(mixed $engine = []) static 设置当前模板解析的引擎 + * @method string fetch(string $template = '', array $vars = [], array $config = [], bool $renderContent = false) static 解析和获取模板内容 + * @method string display(string $content = '', array $vars = [], array $config = []) static 渲染内容输出 + */ +class View extends Facade +{ + /** + * 获取当前Facade对应类名(或者已经绑定的容器对象标识) + * @access protected + * @return string + */ + protected static function getFacadeClass() + { + return 'view'; + } +} diff --git a/thinkphp/library/think/image/Exception.php b/thinkphp/library/think/image/Exception.php new file mode 100755 index 0000000..c35c71b --- /dev/null +++ b/thinkphp/library/think/image/Exception.php @@ -0,0 +1,17 @@ + +// +---------------------------------------------------------------------- + +namespace think\image; + +class Exception extends \RuntimeException +{ + +} diff --git a/thinkphp/library/think/image/gif/Decoder.php b/thinkphp/library/think/image/gif/Decoder.php new file mode 100755 index 0000000..95fa2b8 --- /dev/null +++ b/thinkphp/library/think/image/gif/Decoder.php @@ -0,0 +1,206 @@ + +// +---------------------------------------------------------------------- + +namespace think\image\gif; + +class Decoder +{ + public $GIF_buffer = []; + public $GIF_arrays = []; + public $GIF_delays = []; + public $GIF_stream = ""; + public $GIF_string = ""; + public $GIF_bfseek = 0; + public $GIF_screen = []; + public $GIF_global = []; + public $GIF_sorted; + public $GIF_colorS; + public $GIF_colorC; + public $GIF_colorF; + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFDecoder ( $GIF_pointer ) + :: + */ + public function __construct($GIF_pointer) + { + $this->GIF_stream = $GIF_pointer; + $this->getByte(6); // GIF89a + $this->getByte(7); // Logical Screen Descriptor + $this->GIF_screen = $this->GIF_buffer; + $this->GIF_colorF = $this->GIF_buffer[4] & 0x80 ? 1 : 0; + $this->GIF_sorted = $this->GIF_buffer[4] & 0x08 ? 1 : 0; + $this->GIF_colorC = $this->GIF_buffer[4] & 0x07; + $this->GIF_colorS = 2 << $this->GIF_colorC; + if (1 == $this->GIF_colorF) { + $this->getByte(3 * $this->GIF_colorS); + $this->GIF_global = $this->GIF_buffer; + } + + for ($cycle = 1; $cycle;) { + if ($this->getByte(1)) { + switch ($this->GIF_buffer[0]) { + case 0x21: + $this->readExtensions(); + break; + case 0x2C: + $this->readDescriptor(); + break; + case 0x3B: + $cycle = 0; + break; + } + } else { + $cycle = 0; + } + } + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFReadExtension ( ) + :: + */ + public function readExtensions() + { + $this->getByte(1); + for (; ;) { + $this->getByte(1); + if (($u = $this->GIF_buffer[0]) == 0x00) { + break; + } + $this->getByte($u); + /* + * 07.05.2007. + * Implemented a new line for a new function + * to determine the originaly delays between + * frames. + * + */ + if (4 == $u) { + $this->GIF_delays[] = ($this->GIF_buffer[1] | $this->GIF_buffer[2] << 8); + } + } + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFReadExtension ( ) + :: + */ + public function readDescriptor() + { + $this->getByte(9); + $GIF_screen = $this->GIF_buffer; + $GIF_colorF = $this->GIF_buffer[8] & 0x80 ? 1 : 0; + if ($GIF_colorF) { + $GIF_code = $this->GIF_buffer[8] & 0x07; + $GIF_sort = $this->GIF_buffer[8] & 0x20 ? 1 : 0; + } else { + $GIF_code = $this->GIF_colorC; + $GIF_sort = $this->GIF_sorted; + } + $GIF_size = 2 << $GIF_code; + $this->GIF_screen[4] &= 0x70; + $this->GIF_screen[4] |= 0x80; + $this->GIF_screen[4] |= $GIF_code; + if ($GIF_sort) { + $this->GIF_screen[4] |= 0x08; + } + $this->GIF_string = "GIF87a"; + $this->putByte($this->GIF_screen); + if (1 == $GIF_colorF) { + $this->getByte(3 * $GIF_size); + $this->putByte($this->GIF_buffer); + } else { + $this->putByte($this->GIF_global); + } + $this->GIF_string .= chr(0x2C); + $GIF_screen[8] &= 0x40; + $this->putByte($GIF_screen); + $this->getByte(1); + $this->putByte($this->GIF_buffer); + for (; ;) { + $this->getByte(1); + $this->putByte($this->GIF_buffer); + if (($u = $this->GIF_buffer[0]) == 0x00) { + break; + } + $this->getByte($u); + $this->putByte($this->GIF_buffer); + } + $this->GIF_string .= chr(0x3B); + /* + Add frames into $GIF_stream array... + */ + $this->GIF_arrays[] = $this->GIF_string; + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFGetByte ( $len ) + :: + */ + public function getByte($len) + { + $this->GIF_buffer = []; + for ($i = 0; $i < $len; $i++) { + if ($this->GIF_bfseek > strlen($this->GIF_stream)) { + return 0; + } + $this->GIF_buffer[] = ord($this->GIF_stream{$this->GIF_bfseek++}); + } + return 1; + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFPutByte ( $bytes ) + :: + */ + public function putByte($bytes) + { + for ($i = 0; $i < count($bytes); $i++) { + $this->GIF_string .= chr($bytes[$i]); + } + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: PUBLIC FUNCTIONS + :: + :: + :: GIFGetFrames ( ) + :: + */ + public function getFrames() + { + return ($this->GIF_arrays); + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFGetDelays ( ) + :: + */ + public function getDelays() + { + return ($this->GIF_delays); + } +} diff --git a/thinkphp/library/think/image/gif/Encoder.php b/thinkphp/library/think/image/gif/Encoder.php new file mode 100755 index 0000000..6c5b181 --- /dev/null +++ b/thinkphp/library/think/image/gif/Encoder.php @@ -0,0 +1,222 @@ + +// +---------------------------------------------------------------------- +namespace think\image\gif; + +class Encoder +{ + public $GIF = "GIF89a"; /* GIF header 6 bytes */ + public $VER = "GIFEncoder V2.05"; /* Encoder version */ + public $BUF = []; + public $LOP = 0; + public $DIS = 2; + public $COL = -1; + public $IMG = -1; + public $ERR = [ + 'ERR00' => "Does not supported function for only one image!", + 'ERR01' => "Source is not a GIF image!", + 'ERR02' => "Unintelligible flag ", + 'ERR03' => "Does not make animation from animated GIF source", + ]; + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFEncoder... + :: + */ + public function __construct( + $GIF_src, $GIF_dly, $GIF_lop, $GIF_dis, + $GIF_red, $GIF_grn, $GIF_blu, $GIF_mod + ) + { + if (!is_array($GIF_src)) { + printf("%s: %s", $this->VER, $this->ERR['ERR00']); + exit(0); + } + $this->LOP = ($GIF_lop > -1) ? $GIF_lop : 0; + $this->DIS = ($GIF_dis > -1) ? (($GIF_dis < 3) ? $GIF_dis : 3) : 2; + $this->COL = ($GIF_red > -1 && $GIF_grn > -1 && $GIF_blu > -1) ? + ($GIF_red | ($GIF_grn << 8) | ($GIF_blu << 16)) : -1; + for ($i = 0; $i < count($GIF_src); $i++) { + if (strtolower($GIF_mod) == "url") { + $this->BUF[] = fread(fopen($GIF_src[$i], "rb"), filesize($GIF_src[$i])); + } elseif (strtolower($GIF_mod) == "bin") { + $this->BUF[] = $GIF_src[$i]; + } else { + printf("%s: %s ( %s )!", $this->VER, $this->ERR['ERR02'], $GIF_mod); + exit(0); + } + if (substr($this->BUF[$i], 0, 6) != "GIF87a" && substr($this->BUF[$i], 0, 6) != "GIF89a") { + printf("%s: %d %s", $this->VER, $i, $this->ERR['ERR01']); + exit(0); + } + for ($j = (13 + 3 * (2 << (ord($this->BUF[$i]{10}) & 0x07))), $k = true; $k; $j++) { + switch ($this->BUF[$i]{$j}) { + case "!": + if ((substr($this->BUF[$i], ($j + 3), 8)) == "NETSCAPE") { + printf("%s: %s ( %s source )!", $this->VER, $this->ERR['ERR03'], ($i + 1)); + exit(0); + } + break; + case ";": + $k = false; + break; + } + } + } + $this->addHeader(); + for ($i = 0; $i < count($this->BUF); $i++) { + $this->addFrames($i, $GIF_dly[$i]); + } + $this->addFooter(); + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFAddHeader... + :: + */ + public function addHeader() + { + if (ord($this->BUF[0]{10}) & 0x80) { + $cmap = 3 * (2 << (ord($this->BUF[0]{10}) & 0x07)); + $this->GIF .= substr($this->BUF[0], 6, 7); + $this->GIF .= substr($this->BUF[0], 13, $cmap); + $this->GIF .= "!\377\13NETSCAPE2.0\3\1" . $this->word($this->LOP) . "\0"; + } + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFAddFrames... + :: + */ + public function addFrames($i, $d) + { + $Locals_img = ''; + $Locals_str = 13 + 3 * (2 << (ord($this->BUF[$i]{10}) & 0x07)); + $Locals_end = strlen($this->BUF[$i]) - $Locals_str - 1; + $Locals_tmp = substr($this->BUF[$i], $Locals_str, $Locals_end); + $Global_len = 2 << (ord($this->BUF[0]{10}) & 0x07); + $Locals_len = 2 << (ord($this->BUF[$i]{10}) & 0x07); + $Global_rgb = substr($this->BUF[0], 13, + 3 * (2 << (ord($this->BUF[0]{10}) & 0x07))); + $Locals_rgb = substr($this->BUF[$i], 13, + 3 * (2 << (ord($this->BUF[$i]{10}) & 0x07))); + $Locals_ext = "!\xF9\x04" . chr(($this->DIS << 2) + 0) . + chr(($d >> 0) & 0xFF) . chr(($d >> 8) & 0xFF) . "\x0\x0"; + if ($this->COL > -1 && ord($this->BUF[$i]{10}) & 0x80) { + for ($j = 0; $j < (2 << (ord($this->BUF[$i]{10}) & 0x07)); $j++) { + if ( + ord($Locals_rgb{3 * $j + 0}) == (($this->COL >> 16) & 0xFF) && + ord($Locals_rgb{3 * $j + 1}) == (($this->COL >> 8) & 0xFF) && + ord($Locals_rgb{3 * $j + 2}) == (($this->COL >> 0) & 0xFF) + ) { + $Locals_ext = "!\xF9\x04" . chr(($this->DIS << 2) + 1) . + chr(($d >> 0) & 0xFF) . chr(($d >> 8) & 0xFF) . chr($j) . "\x0"; + break; + } + } + } + switch ($Locals_tmp{0}) { + case "!": + /** + * @var string $Locals_img ; + */ + $Locals_img = substr($Locals_tmp, 8, 10); + $Locals_tmp = substr($Locals_tmp, 18, strlen($Locals_tmp) - 18); + break; + case ",": + $Locals_img = substr($Locals_tmp, 0, 10); + $Locals_tmp = substr($Locals_tmp, 10, strlen($Locals_tmp) - 10); + break; + } + if (ord($this->BUF[$i]{10}) & 0x80 && $this->IMG > -1) { + if ($Global_len == $Locals_len) { + if ($this->blockCompare($Global_rgb, $Locals_rgb, $Global_len)) { + $this->GIF .= ($Locals_ext . $Locals_img . $Locals_tmp); + } else { + $byte = ord($Locals_img{9}); + $byte |= 0x80; + $byte &= 0xF8; + $byte |= (ord($this->BUF[0]{10}) & 0x07); + $Locals_img{9} = chr($byte); + $this->GIF .= ($Locals_ext . $Locals_img . $Locals_rgb . $Locals_tmp); + } + } else { + $byte = ord($Locals_img{9}); + $byte |= 0x80; + $byte &= 0xF8; + $byte |= (ord($this->BUF[$i]{10}) & 0x07); + $Locals_img{9} = chr($byte); + $this->GIF .= ($Locals_ext . $Locals_img . $Locals_rgb . $Locals_tmp); + } + } else { + $this->GIF .= ($Locals_ext . $Locals_img . $Locals_tmp); + } + $this->IMG = 1; + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFAddFooter... + :: + */ + public function addFooter() + { + $this->GIF .= ";"; + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFBlockCompare... + :: + */ + public function blockCompare($GlobalBlock, $LocalBlock, $Len) + { + for ($i = 0; $i < $Len; $i++) { + if ( + $GlobalBlock{3 * $i + 0} != $LocalBlock{3 * $i + 0} || + $GlobalBlock{3 * $i + 1} != $LocalBlock{3 * $i + 1} || + $GlobalBlock{3 * $i + 2} != $LocalBlock{3 * $i + 2} + ) { + return (0); + } + } + return (1); + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GIFWord... + :: + */ + public function word($int) + { + return (chr($int & 0xFF) . chr(($int >> 8) & 0xFF)); + } + + /* + ::::::::::::::::::::::::::::::::::::::::::::::::::: + :: + :: GetAnimation... + :: + */ + public function getAnimation() + { + return ($this->GIF); + } +} diff --git a/thinkphp/library/think/image/gif/Gif.php b/thinkphp/library/think/image/gif/Gif.php new file mode 100755 index 0000000..f803db0 --- /dev/null +++ b/thinkphp/library/think/image/gif/Gif.php @@ -0,0 +1,88 @@ + +// +---------------------------------------------------------------------- + +namespace think\image\gif; + +class Gif +{ + /** + * GIF帧列表 + * + * @var array + */ + private $frames = []; + /** + * 每帧等待时间列表 + * + * @var array + */ + private $delays = []; + + /** + * 构造方法,用于解码GIF图片 + * + * @param string $src GIF图片数据 + * @param string $mod 图片数据类型 + * @throws \Exception + */ + public function __construct($src = null, $mod = 'url') + { + if (!is_null($src)) { + if ('url' == $mod && is_file($src)) { + $src = file_get_contents($src); + } + /* 解码GIF图片 */ + try { + $de = new Decoder($src); + $this->frames = $de->getFrames(); + $this->delays = $de->getDelays(); + } catch (\Exception $e) { + throw new \Exception("解码GIF图片出错"); + } + } + } + + /** + * 设置或获取当前帧的数据 + * + * @param string $stream 二进制数据流 + * @return mixed 获取到的数据 + */ + public function image($stream = null) + { + if (is_null($stream)) { + $current = current($this->frames); + return false === $current ? reset($this->frames) : $current; + } + $this->frames[key($this->frames)] = $stream; + } + + /** + * 将当前帧移动到下一帧 + * + * @return string 当前帧数据 + */ + public function nextImage() + { + return next($this->frames); + } + + /** + * 编码并保存当前GIF图片 + * + * @param string $pathname 图片名称 + */ + public function save($pathname) + { + $gif = new Encoder($this->frames, $this->delays, 0, 2, 0, 0, 0, 'bin'); + file_put_contents($pathname, $gif->getAnimation()); + } +} diff --git a/thinkphp/library/think/log/driver/File.php b/thinkphp/library/think/log/driver/File.php new file mode 100755 index 0000000..3f6522d --- /dev/null +++ b/thinkphp/library/think/log/driver/File.php @@ -0,0 +1,287 @@ + +// +---------------------------------------------------------------------- + +namespace think\log\driver; + +use think\App; + +/** + * 本地化调试输出到文件 + */ +class File +{ + protected $config = [ + 'time_format' => 'c', + 'single' => false, + 'file_size' => 2097152, + 'path' => '', + 'apart_level' => [], + 'max_files' => 0, + 'json' => false, + ]; + + protected $app; + + // 实例化并传入参数 + public function __construct(App $app, $config = []) + { + $this->app = $app; + + if (is_array($config)) { + $this->config = array_merge($this->config, $config); + } + + if (empty($this->config['path'])) { + $this->config['path'] = $this->app->getRuntimePath() . 'log' . DIRECTORY_SEPARATOR; + } elseif (substr($this->config['path'], -1) != DIRECTORY_SEPARATOR) { + $this->config['path'] .= DIRECTORY_SEPARATOR; + } + } + + /** + * 日志写入接口 + * @access public + * @param array $log 日志信息 + * @param bool $append 是否追加请求信息 + * @return bool + */ + public function save(array $log = [], $append = false) + { + $destination = $this->getMasterLogFile(); + + $path = dirname($destination); + !is_dir($path) && mkdir($path, 0755, true); + + $info = []; + + foreach ($log as $type => $val) { + + foreach ($val as $msg) { + if (!is_string($msg)) { + $msg = var_export($msg, true); + } + + $info[$type][] = $this->config['json'] ? $msg : '[ ' . $type . ' ] ' . $msg; + } + + if (!$this->config['json'] && (true === $this->config['apart_level'] || in_array($type, $this->config['apart_level']))) { + // 独立记录的日志级别 + $filename = $this->getApartLevelFile($path, $type); + + $this->write($info[$type], $filename, true, $append); + + unset($info[$type]); + } + } + + if ($info) { + return $this->write($info, $destination, false, $append); + } + + return true; + } + + /** + * 日志写入 + * @access protected + * @param array $message 日志信息 + * @param string $destination 日志文件 + * @param bool $apart 是否独立文件写入 + * @param bool $append 是否追加请求信息 + * @return bool + */ + protected function write($message, $destination, $apart = false, $append = false) + { + // 检测日志文件大小,超过配置大小则备份日志文件重新生成 + $this->checkLogSize($destination); + + // 日志信息封装 + $info['timestamp'] = date($this->config['time_format']); + + foreach ($message as $type => $msg) { + $msg = is_array($msg) ? implode(PHP_EOL, $msg) : $msg; + if (PHP_SAPI == 'cli') { + $info['msg'] = $msg; + $info['type'] = $type; + } else { + $info[$type] = $msg; + } + } + + if (PHP_SAPI == 'cli') { + $message = $this->parseCliLog($info); + } else { + // 添加调试日志 + $this->getDebugLog($info, $append, $apart); + + $message = $this->parseLog($info); + } + + return error_log($message, 3, $destination); + } + + /** + * 获取主日志文件名 + * @access public + * @return string + */ + protected function getMasterLogFile() + { + if ($this->config['max_files']) { + $files = glob($this->config['path'] . '*.log'); + + try { + if (count($files) > $this->config['max_files']) { + unlink($files[0]); + } + } catch (\Exception $e) { + } + } + + $cli = PHP_SAPI == 'cli' ? '_cli' : ''; + + if ($this->config['single']) { + $name = is_string($this->config['single']) ? $this->config['single'] : 'single'; + + $destination = $this->config['path'] . $name . $cli . '.log'; + } else { + if ($this->config['max_files']) { + $filename = date('Ymd') . $cli . '.log'; + } else { + $filename = date('Ym') . DIRECTORY_SEPARATOR . date('d') . $cli . '.log'; + } + + $destination = $this->config['path'] . $filename; + } + + return $destination; + } + + /** + * 获取独立日志文件名 + * @access public + * @param string $path 日志目录 + * @param string $type 日志类型 + * @return string + */ + protected function getApartLevelFile($path, $type) + { + $cli = PHP_SAPI == 'cli' ? '_cli' : ''; + + if ($this->config['single']) { + $name = is_string($this->config['single']) ? $this->config['single'] : 'single'; + } elseif ($this->config['max_files']) { + $name = date('Ymd'); + } else { + $name = date('d'); + } + + return $path . DIRECTORY_SEPARATOR . $name . '_' . $type . $cli . '.log'; + } + + /** + * 检查日志文件大小并自动生成备份文件 + * @access protected + * @param string $destination 日志文件 + * @return void + */ + protected function checkLogSize($destination) + { + if (is_file($destination) && floor($this->config['file_size']) <= filesize($destination)) { + try { + rename($destination, dirname($destination) . DIRECTORY_SEPARATOR . time() . '-' . basename($destination)); + } catch (\Exception $e) { + } + } + } + + /** + * CLI日志解析 + * @access protected + * @param array $info 日志信息 + * @return string + */ + protected function parseCliLog($info) + { + if ($this->config['json']) { + $message = json_encode($info, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . PHP_EOL; + } else { + $now = $info['timestamp']; + unset($info['timestamp']); + + $message = implode(PHP_EOL, $info); + + $message = "[{$now}]" . $message . PHP_EOL; + } + + return $message; + } + + /** + * 解析日志 + * @access protected + * @param array $info 日志信息 + * @return string + */ + protected function parseLog($info) + { + $requestInfo = [ + 'ip' => $this->app['request']->ip(), + 'method' => $this->app['request']->method(), + 'host' => $this->app['request']->host(), + 'uri' => $this->app['request']->url(), + ]; + + if ($this->config['json']) { + $info = $requestInfo + $info; + return json_encode($info, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . PHP_EOL; + } + + array_unshift($info, "---------------------------------------------------------------" . PHP_EOL . "\r\n[{$info['timestamp']}] {$requestInfo['ip']} {$requestInfo['method']} {$requestInfo['host']}{$requestInfo['uri']}"); + unset($info['timestamp']); + + return implode(PHP_EOL, $info) . PHP_EOL; + } + + protected function getDebugLog(&$info, $append, $apart) + { + if ($this->app->isDebug() && $append) { + + if ($this->config['json']) { + // 获取基本信息 + $runtime = round(microtime(true) - $this->app->getBeginTime(), 10); + $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; + + $memory_use = number_format((memory_get_usage() - $this->app->getBeginMem()) / 1024, 2); + + $info = [ + 'runtime' => number_format($runtime, 6) . 's', + 'reqs' => $reqs . 'req/s', + 'memory' => $memory_use . 'kb', + 'file' => count(get_included_files()), + ] + $info; + + } elseif (!$apart) { + // 增加额外的调试信息 + $runtime = round(microtime(true) - $this->app->getBeginTime(), 10); + $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; + + $memory_use = number_format((memory_get_usage() - $this->app->getBeginMem()) / 1024, 2); + + $time_str = '[运行时间:' . number_format($runtime, 6) . 's] [吞吐率:' . $reqs . 'req/s]'; + $memory_str = ' [内存消耗:' . $memory_use . 'kb]'; + $file_load = ' [文件加载:' . count(get_included_files()) . ']'; + + array_unshift($info, $time_str . $memory_str . $file_load); + } + } + } +} diff --git a/thinkphp/library/think/log/driver/Socket.php b/thinkphp/library/think/log/driver/Socket.php new file mode 100755 index 0000000..5e4f8bf --- /dev/null +++ b/thinkphp/library/think/log/driver/Socket.php @@ -0,0 +1,279 @@ + +// +---------------------------------------------------------------------- + +namespace think\log\driver; + +use think\App; + +/** + * github: https://github.com/luofei614/SocketLog + * @author luofei614 + */ +class Socket +{ + public $port = 1116; //SocketLog 服务的http的端口号 + + protected $config = [ + // socket服务器地址 + 'host' => 'localhost', + // 是否显示加载的文件列表 + 'show_included_files' => false, + // 日志强制记录到配置的client_id + 'force_client_ids' => [], + // 限制允许读取日志的client_id + 'allow_client_ids' => [], + //输出到浏览器默认展开的日志级别 + 'expand_level' => ['debug'], + ]; + + protected $css = [ + 'sql' => 'color:#009bb4;', + 'sql_warn' => 'color:#009bb4;font-size:14px;', + 'error' => 'color:#f4006b;font-size:14px;', + 'page' => 'color:#40e2ff;background:#171717;', + 'big' => 'font-size:20px;color:red;', + ]; + + protected $allowForceClientIds = []; //配置强制推送且被授权的client_id + protected $app; + + /** + * 架构函数 + * @access public + * @param array $config 缓存参数 + */ + public function __construct(App $app, array $config = []) + { + $this->app = $app; + + if (!empty($config)) { + $this->config = array_merge($this->config, $config); + } + } + + /** + * 调试输出接口 + * @access public + * @param array $log 日志信息 + * @return bool + */ + public function save(array $log = [], $append = false) + { + if (!$this->check()) { + return false; + } + + $trace = []; + + if ($this->app->isDebug()) { + $runtime = round(microtime(true) - $this->app->getBeginTime(), 10); + $reqs = $runtime > 0 ? number_format(1 / $runtime, 2) : '∞'; + $time_str = ' [运行时间:' . number_format($runtime, 6) . 's][吞吐率:' . $reqs . 'req/s]'; + $memory_use = number_format((memory_get_usage() - $this->app->getBeginMem()) / 1024, 2); + $memory_str = ' [内存消耗:' . $memory_use . 'kb]'; + $file_load = ' [文件加载:' . count(get_included_files()) . ']'; + + if (isset($_SERVER['HTTP_HOST'])) { + $current_uri = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + } else { + $current_uri = 'cmd:' . implode(' ', $_SERVER['argv']); + } + + // 基本信息 + $trace[] = [ + 'type' => 'group', + 'msg' => $current_uri . $time_str . $memory_str . $file_load, + 'css' => $this->css['page'], + ]; + } + + foreach ($log as $type => $val) { + $trace[] = [ + 'type' => in_array($type, $this->config['expand_level']) ? 'group' : 'groupCollapsed', + 'msg' => '[ ' . $type . ' ]', + 'css' => isset($this->css[$type]) ? $this->css[$type] : '', + ]; + + foreach ($val as $msg) { + if (!is_string($msg)) { + $msg = var_export($msg, true); + } + $trace[] = [ + 'type' => 'log', + 'msg' => $msg, + 'css' => '', + ]; + } + + $trace[] = [ + 'type' => 'groupEnd', + 'msg' => '', + 'css' => '', + ]; + } + + if ($this->config['show_included_files']) { + $trace[] = [ + 'type' => 'groupCollapsed', + 'msg' => '[ file ]', + 'css' => '', + ]; + + $trace[] = [ + 'type' => 'log', + 'msg' => implode("\n", get_included_files()), + 'css' => '', + ]; + + $trace[] = [ + 'type' => 'groupEnd', + 'msg' => '', + 'css' => '', + ]; + } + + $trace[] = [ + 'type' => 'groupEnd', + 'msg' => '', + 'css' => '', + ]; + + $tabid = $this->getClientArg('tabid'); + + if (!$client_id = $this->getClientArg('client_id')) { + $client_id = ''; + } + + if (!empty($this->allowForceClientIds)) { + //强制推送到多个client_id + foreach ($this->allowForceClientIds as $force_client_id) { + $client_id = $force_client_id; + $this->sendToClient($tabid, $client_id, $trace, $force_client_id); + } + } else { + $this->sendToClient($tabid, $client_id, $trace, ''); + } + + return true; + } + + /** + * 发送给指定客户端 + * @access protected + * @author Zjmainstay + * @param $tabid + * @param $client_id + * @param $logs + * @param $force_client_id + */ + protected function sendToClient($tabid, $client_id, $logs, $force_client_id) + { + $logs = [ + 'tabid' => $tabid, + 'client_id' => $client_id, + 'logs' => $logs, + 'force_client_id' => $force_client_id, + ]; + + $msg = @json_encode($logs); + $address = '/' . $client_id; //将client_id作为地址, server端通过地址判断将日志发布给谁 + + $this->send($this->config['host'], $msg, $address); + } + + protected function check() + { + $tabid = $this->getClientArg('tabid'); + + //是否记录日志的检查 + if (!$tabid && !$this->config['force_client_ids']) { + return false; + } + + //用户认证 + $allow_client_ids = $this->config['allow_client_ids']; + + if (!empty($allow_client_ids)) { + //通过数组交集得出授权强制推送的client_id + $this->allowForceClientIds = array_intersect($allow_client_ids, $this->config['force_client_ids']); + if (!$tabid && count($this->allowForceClientIds)) { + return true; + } + + $client_id = $this->getClientArg('client_id'); + if (!in_array($client_id, $allow_client_ids)) { + return false; + } + } else { + $this->allowForceClientIds = $this->config['force_client_ids']; + } + + return true; + } + + protected function getClientArg($name) + { + static $args = []; + + $key = 'HTTP_USER_AGENT'; + + if (isset($_SERVER['HTTP_SOCKETLOG'])) { + $key = 'HTTP_SOCKETLOG'; + } + + if (!isset($_SERVER[$key])) { + return; + } + + if (empty($args)) { + if (!preg_match('/SocketLog\((.*?)\)/', $_SERVER[$key], $match)) { + $args = ['tabid' => null]; + return; + } + parse_str($match[1], $args); + } + + if (isset($args[$name])) { + return $args[$name]; + } + + return; + } + + /** + * @access protected + * @param string $host - $host of socket server + * @param string $message - 发送的消息 + * @param string $address - 地址 + * @return bool + */ + protected function send($host, $message = '', $address = '/') + { + $url = 'http://' . $host . ':' . $this->port . $address; + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $message); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); + + $headers = [ + "Content-Type: application/json;charset=UTF-8", + ]; + + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); //设置header + + return curl_exec($ch); + } + +} diff --git a/thinkphp/library/think/model/Collection.php b/thinkphp/library/think/model/Collection.php new file mode 100755 index 0000000..34ec067 --- /dev/null +++ b/thinkphp/library/think/model/Collection.php @@ -0,0 +1,102 @@ + +// +---------------------------------------------------------------------- + +namespace think\model; + +use think\Collection as BaseCollection; +use think\Model; + +class Collection extends BaseCollection +{ + /** + * 延迟预载入关联查询 + * @access public + * @param mixed $relation 关联 + * @return $this + */ + public function load($relation) + { + if (!$this->isEmpty()) { + $item = current($this->items); + $item->eagerlyResultSet($this->items, $relation); + } + + return $this; + } + + /** + * 设置需要隐藏的输出属性 + * @access public + * @param array $hidden 属性列表 + * @param bool $override 是否覆盖 + * @return $this + */ + public function hidden($hidden = [], $override = false) + { + $this->each(function ($model) use ($hidden, $override) { + /** @var Model $model */ + $model->hidden($hidden, $override); + }); + + return $this; + } + + /** + * 设置需要输出的属性 + * @access public + * @param array $visible + * @param bool $override 是否覆盖 + * @return $this + */ + public function visible($visible = [], $override = false) + { + $this->each(function ($model) use ($visible, $override) { + /** @var Model $model */ + $model->visible($visible, $override); + }); + + return $this; + } + + /** + * 设置需要追加的输出属性 + * @access public + * @param array $append 属性列表 + * @param bool $override 是否覆盖 + * @return $this + */ + public function append($append = [], $override = false) + { + $this->each(function ($model) use ($append, $override) { + /** @var Model $model */ + $model && $model->append($append, $override); + }); + + return $this; + } + + /** + * 设置数据字段获取器 + * @access public + * @param string|array $name 字段名 + * @param callable $callback 闭包获取器 + * @return $this + */ + public function withAttr($name, $callback = null) + { + $this->each(function ($model) use ($name, $callback) { + /** @var Model $model */ + $model && $model->withAttribute($name, $callback); + }); + + return $this; + } +} diff --git a/thinkphp/library/think/model/Pivot.php b/thinkphp/library/think/model/Pivot.php new file mode 100755 index 0000000..a3a395e --- /dev/null +++ b/thinkphp/library/think/model/Pivot.php @@ -0,0 +1,42 @@ + +// +---------------------------------------------------------------------- + +namespace think\model; + +use think\Model; + +class Pivot extends Model +{ + + /** @var Model */ + public $parent; + + protected $autoWriteTimestamp = false; + + /** + * 架构函数 + * @access public + * @param array|object $data 数据 + * @param Model $parent 上级模型 + * @param string $table 中间数据表名 + */ + public function __construct($data = [], Model $parent = null, $table = '') + { + $this->parent = $parent; + + if (is_null($this->name)) { + $this->name = $table; + } + + parent::__construct($data); + } + +} diff --git a/thinkphp/library/think/model/Relation.php b/thinkphp/library/think/model/Relation.php new file mode 100755 index 0000000..ac6dd4c --- /dev/null +++ b/thinkphp/library/think/model/Relation.php @@ -0,0 +1,187 @@ + +// +---------------------------------------------------------------------- + +namespace think\model; + +use think\db\Query; +use think\Exception; +use think\Model; + +/** + * Class Relation + * @package think\model + * + * @mixin Query + */ +abstract class Relation +{ + // 父模型对象 + protected $parent; + /** @var Model 当前关联的模型类 */ + protected $model; + /** @var Query 关联模型查询对象 */ + protected $query; + // 关联表外键 + protected $foreignKey; + // 关联表主键 + protected $localKey; + // 基础查询 + protected $baseQuery; + // 是否为自关联 + protected $selfRelation; + + /** + * 获取关联的所属模型 + * @access public + * @return Model + */ + public function getParent() + { + return $this->parent; + } + + /** + * 获取当前的关联模型类的实例 + * @access public + * @return Model + */ + public function getModel() + { + return $this->query->getModel(); + } + + /** + * 获取当前的关联模型类的实例 + * @access public + * @return Query + */ + public function getQuery() + { + return $this->query; + } + + /** + * 设置当前关联为自关联 + * @access public + * @param bool $self 是否自关联 + * @return $this + */ + public function selfRelation($self = true) + { + $this->selfRelation = $self; + return $this; + } + + /** + * 当前关联是否为自关联 + * @access public + * @return bool + */ + public function isSelfRelation() + { + return $this->selfRelation; + } + + /** + * 封装关联数据集 + * @access public + * @param array $resultSet 数据集 + * @return mixed + */ + protected function resultSetBuild($resultSet) + { + return (new $this->model)->toCollection($resultSet); + } + + protected function getQueryFields($model) + { + $fields = $this->query->getOptions('field'); + return $this->getRelationQueryFields($fields, $model); + } + + protected function getRelationQueryFields($fields, $model) + { + if ($fields) { + + if (is_string($fields)) { + $fields = explode(',', $fields); + } + + foreach ($fields as &$field) { + if (false === strpos($field, '.')) { + $field = $model . '.' . $field; + } + } + } else { + $fields = $model . '.*'; + } + + return $fields; + } + + protected function getQueryWhere(&$where, $relation) + { + foreach ($where as $key => &$val) { + if (is_string($key)) { + $where[] = [false === strpos($key, '.') ? $relation . '.' . $key : $key, '=', $val]; + unset($where[$key]); + } elseif (isset($val[0]) && false === strpos($val[0], '.')) { + $val[0] = $relation . '.' . $val[0]; + } + } + } + + /** + * 更新数据 + * @access public + * @param array $data 更新数据 + * @return integer|string + */ + public function update(array $data = []) + { + return $this->query->update($data); + } + + /** + * 删除记录 + * @access public + * @param mixed $data 表达式 true 表示强制删除 + * @return int + * @throws Exception + * @throws PDOException + */ + public function delete($data = null) + { + return $this->query->delete($data); + } + + /** + * 执行基础查询(仅执行一次) + * @access protected + * @return void + */ + protected function baseQuery() + {} + + public function __call($method, $args) + { + if ($this->query) { + // 执行基础查询 + $this->baseQuery(); + + $result = call_user_func_array([$this->query->getModel(), $method], $args); + + return $result === $this->query && !in_array(strtolower($method), ['fetchsql', 'fetchpdo']) ? $this : $result; + } else { + throw new Exception('method not exists:' . __CLASS__ . '->' . $method); + } + } +} diff --git a/thinkphp/library/think/model/concern/Attribute.php b/thinkphp/library/think/model/concern/Attribute.php new file mode 100755 index 0000000..66627b3 --- /dev/null +++ b/thinkphp/library/think/model/concern/Attribute.php @@ -0,0 +1,656 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\concern; + +use InvalidArgumentException; +use think\db\Expression; +use think\Exception; +use think\Loader; +use think\model\Relation; + +trait Attribute +{ + /** + * 数据表主键 复合主键使用数组定义 + * @var string|array + */ + protected $pk = 'id'; + + /** + * 数据表字段信息 留空则自动获取 + * @var array + */ + protected $field = []; + + /** + * JSON数据表字段 + * @var array + */ + protected $json = []; + + /** + * JSON数据取出是否需要转换为数组 + * @var bool + */ + protected $jsonAssoc = false; + + /** + * JSON数据表字段类型 + * @var array + */ + protected $jsonType = []; + + /** + * 数据表废弃字段 + * @var array + */ + protected $disuse = []; + + /** + * 数据表只读字段 + * @var array + */ + protected $readonly = []; + + /** + * 数据表字段类型 + * @var array + */ + protected $type = []; + + /** + * 当前模型数据 + * @var array + */ + private $data = []; + + /** + * 修改器执行记录 + * @var array + */ + private $set = []; + + /** + * 原始数据 + * @var array + */ + private $origin = []; + + /** + * 动态获取器 + * @var array + */ + private $withAttr = []; + + /** + * 获取模型对象的主键 + * @access public + * @return string|array + */ + public function getPk() + { + return $this->pk; + } + + /** + * 判断一个字段名是否为主键字段 + * @access public + * @param string $key 名称 + * @return bool + */ + protected function isPk($key) + { + $pk = $this->getPk(); + if (is_string($pk) && $pk == $key) { + return true; + } elseif (is_array($pk) && in_array($key, $pk)) { + return true; + } + + return false; + } + + /** + * 获取模型对象的主键值 + * @access public + * @return integer + */ + public function getKey() + { + $pk = $this->getPk(); + if (is_string($pk) && array_key_exists($pk, $this->data)) { + return $this->data[$pk]; + } + + return; + } + + /** + * 设置允许写入的字段 + * @access public + * @param array|string|true $field 允许写入的字段 如果为true只允许写入数据表字段 + * @return $this + */ + public function allowField($field) + { + if (is_string($field)) { + $field = explode(',', $field); + } + + $this->field = $field; + + return $this; + } + + /** + * 设置只读字段 + * @access public + * @param array|string $field 只读字段 + * @return $this + */ + public function readonly($field) + { + if (is_string($field)) { + $field = explode(',', $field); + } + + $this->readonly = $field; + + return $this; + } + + /** + * 设置数据对象值 + * @access public + * @param mixed $data 数据或者属性名 + * @param mixed $value 值 + * @return $this + */ + public function data($data, $value = null) + { + if (is_string($data)) { + $this->data[$data] = $value; + return $this; + } + + // 清空数据 + $this->data = []; + + if (is_object($data)) { + $data = get_object_vars($data); + } + + if ($this->disuse) { + // 废弃字段 + foreach ((array) $this->disuse as $key) { + if (array_key_exists($key, $data)) { + unset($data[$key]); + } + } + } + + if (true === $value) { + // 数据对象赋值 + foreach ($data as $key => $value) { + $this->setAttr($key, $value, $data); + } + } elseif (is_array($value)) { + foreach ($value as $name) { + if (isset($data[$name])) { + $this->data[$name] = $data[$name]; + } + } + } else { + $this->data = $data; + } + + return $this; + } + + /** + * 批量设置数据对象值 + * @access public + * @param mixed $data 数据 + * @param bool $set 是否需要进行数据处理 + * @return $this + */ + public function appendData($data, $set = false) + { + if ($set) { + // 进行数据处理 + foreach ($data as $key => $value) { + $this->setAttr($key, $value, $data); + } + } else { + if (is_object($data)) { + $data = get_object_vars($data); + } + + $this->data = array_merge($this->data, $data); + } + + return $this; + } + + /** + * 获取对象原始数据 如果不存在指定字段返回null + * @access public + * @param string $name 字段名 留空获取全部 + * @return mixed + */ + public function getOrigin($name = null) + { + if (is_null($name)) { + return $this->origin; + } + return array_key_exists($name, $this->origin) ? $this->origin[$name] : null; + } + + /** + * 获取对象原始数据 如果不存在指定字段返回false + * @access public + * @param string $name 字段名 留空获取全部 + * @return mixed + * @throws InvalidArgumentException + */ + public function getData($name = null) + { + if (is_null($name)) { + return $this->data; + } elseif (array_key_exists($name, $this->data)) { + return $this->data[$name]; + } elseif (array_key_exists($name, $this->relation)) { + return $this->relation[$name]; + } + throw new InvalidArgumentException('property not exists:' . static::class . '->' . $name); + } + + /** + * 获取变化的数据 并排除只读数据 + * @access public + * @return array + */ + public function getChangedData() + { + if ($this->force) { + $data = $this->data; + } else { + $data = array_udiff_assoc($this->data, $this->origin, function ($a, $b) { + if ((empty($a) || empty($b)) && $a !== $b) { + return 1; + } + + return is_object($a) || $a != $b ? 1 : 0; + }); + } + + if (!empty($this->readonly)) { + // 只读字段不允许更新 + foreach ($this->readonly as $key => $field) { + if (isset($data[$field])) { + unset($data[$field]); + } + } + } + + return $data; + } + + /** + * 修改器 设置数据对象值 + * @access public + * @param string $name 属性名 + * @param mixed $value 属性值 + * @param array $data 数据 + * @return void + */ + public function setAttr($name, $value, $data = []) + { + if (isset($this->set[$name])) { + return; + } + + if (is_null($value) && $this->autoWriteTimestamp && in_array($name, [$this->createTime, $this->updateTime])) { + // 自动写入的时间戳字段 + $value = $this->autoWriteTimestamp($name); + } else { + // 检测修改器 + $method = 'set' . Loader::parseName($name, 1) . 'Attr'; + + if (method_exists($this, $method)) { + $origin = $this->data; + $value = $this->$method($value, array_merge($this->data, $data)); + + $this->set[$name] = true; + if (is_null($value) && $origin !== $this->data) { + return; + } + } elseif (isset($this->type[$name])) { + // 类型转换 + $value = $this->writeTransform($value, $this->type[$name]); + } + } + + // 设置数据对象属性 + $this->data[$name] = $value; + } + + /** + * 是否需要自动写入时间字段 + * @access public + * @param bool $auto + * @return $this + */ + public function isAutoWriteTimestamp($auto) + { + $this->autoWriteTimestamp = $auto; + + return $this; + } + + /** + * 自动写入时间戳 + * @access protected + * @param string $name 时间戳字段 + * @return mixed + */ + protected function autoWriteTimestamp($name) + { + if (isset($this->type[$name])) { + $type = $this->type[$name]; + + if (strpos($type, ':')) { + list($type, $param) = explode(':', $type, 2); + } + + switch ($type) { + case 'datetime': + case 'date': + $value = $this->formatDateTime('Y-m-d H:i:s.u'); + break; + case 'timestamp': + case 'integer': + default: + $value = time(); + break; + } + } elseif (is_string($this->autoWriteTimestamp) && in_array(strtolower($this->autoWriteTimestamp), [ + 'datetime', + 'date', + 'timestamp', + ])) { + $value = $this->formatDateTime('Y-m-d H:i:s.u'); + } else { + $value = time(); + } + + return $value; + } + + /** + * 数据写入 类型转换 + * @access protected + * @param mixed $value 值 + * @param string|array $type 要转换的类型 + * @return mixed + */ + protected function writeTransform($value, $type) + { + if (is_null($value)) { + return; + } + + if ($value instanceof Expression) { + return $value; + } + + if (is_array($type)) { + list($type, $param) = $type; + } elseif (strpos($type, ':')) { + list($type, $param) = explode(':', $type, 2); + } + + switch ($type) { + case 'integer': + $value = (int) $value; + break; + case 'float': + if (empty($param)) { + $value = (float) $value; + } else { + $value = (float) number_format($value, $param, '.', ''); + } + break; + case 'boolean': + $value = (bool) $value; + break; + case 'timestamp': + if (!is_numeric($value)) { + $value = strtotime($value); + } + break; + case 'datetime': + $value = is_numeric($value) ? $value : strtotime($value); + $value = $this->formatDateTime('Y-m-d H:i:s.u', $value); + break; + case 'object': + if (is_object($value)) { + $value = json_encode($value, JSON_FORCE_OBJECT); + } + break; + case 'array': + $value = (array) $value; + case 'json': + $option = !empty($param) ? (int) $param : JSON_UNESCAPED_UNICODE; + $value = json_encode($value, $option); + break; + case 'serialize': + $value = serialize($value); + break; + } + + return $value; + } + + /** + * 获取器 获取数据对象的值 + * @access public + * @param string $name 名称 + * @param array $item 数据 + * @return mixed + * @throws InvalidArgumentException + */ + public function getAttr($name, &$item = null) + { + try { + $notFound = false; + $value = $this->getData($name); + } catch (InvalidArgumentException $e) { + $notFound = true; + $value = null; + } + + // 检测属性获取器 + $fieldName = Loader::parseName($name); + $method = 'get' . Loader::parseName($name, 1) . 'Attr'; + + if (isset($this->withAttr[$fieldName])) { + if ($notFound && $relation = $this->isRelationAttr($name)) { + $modelRelation = $this->$relation(); + $value = $this->getRelationData($modelRelation); + } + + $closure = $this->withAttr[$fieldName]; + $value = $closure($value, $this->data); + } elseif (method_exists($this, $method)) { + if ($notFound && $relation = $this->isRelationAttr($name)) { + $modelRelation = $this->$relation(); + $value = $this->getRelationData($modelRelation); + } + + $value = $this->$method($value, $this->data); + } elseif (isset($this->type[$name])) { + // 类型转换 + $value = $this->readTransform($value, $this->type[$name]); + } elseif ($this->autoWriteTimestamp && in_array($name, [$this->createTime, $this->updateTime])) { + if (is_string($this->autoWriteTimestamp) && in_array(strtolower($this->autoWriteTimestamp), [ + 'datetime', + 'date', + 'timestamp', + ])) { + $value = $this->formatDateTime($this->dateFormat, $value); + } else { + $value = $this->formatDateTime($this->dateFormat, $value, true); + } + } elseif ($notFound) { + $value = $this->getRelationAttribute($name, $item); + } + + return $value; + } + + /** + * 获取关联属性值 + * @access protected + * @param string $name 属性名 + * @param array $item 数据 + * @return mixed + */ + protected function getRelationAttribute($name, &$item) + { + $relation = $this->isRelationAttr($name); + + if ($relation) { + $modelRelation = $this->$relation(); + if ($modelRelation instanceof Relation) { + $value = $this->getRelationData($modelRelation); + + if ($item && method_exists($modelRelation, 'getBindAttr') && $bindAttr = $modelRelation->getBindAttr()) { + + foreach ($bindAttr as $key => $attr) { + $key = is_numeric($key) ? $attr : $key; + + if (isset($item[$key])) { + throw new Exception('bind attr has exists:' . $key); + } else { + $item[$key] = $value ? $value->getAttr($attr) : null; + } + } + + return false; + } + + // 保存关联对象值 + $this->relation[$name] = $value; + + return $value; + } + } + + throw new InvalidArgumentException('property not exists:' . static::class . '->' . $name); + } + + /** + * 数据读取 类型转换 + * @access protected + * @param mixed $value 值 + * @param string|array $type 要转换的类型 + * @return mixed + */ + protected function readTransform($value, $type) + { + if (is_null($value)) { + return; + } + + if (is_array($type)) { + list($type, $param) = $type; + } elseif (strpos($type, ':')) { + list($type, $param) = explode(':', $type, 2); + } + + switch ($type) { + case 'integer': + $value = (int) $value; + break; + case 'float': + if (empty($param)) { + $value = (float) $value; + } else { + $value = (float) number_format($value, $param, '.', ''); + } + break; + case 'boolean': + $value = (bool) $value; + break; + case 'timestamp': + if (!is_null($value)) { + $format = !empty($param) ? $param : $this->dateFormat; + $value = $this->formatDateTime($format, $value, true); + } + break; + case 'datetime': + if (!is_null($value)) { + $format = !empty($param) ? $param : $this->dateFormat; + $value = $this->formatDateTime($format, $value); + } + break; + case 'json': + $value = json_decode($value, true); + break; + case 'array': + $value = empty($value) ? [] : json_decode($value, true); + break; + case 'object': + $value = empty($value) ? new \stdClass() : json_decode($value); + break; + case 'serialize': + try { + $value = unserialize($value); + } catch (\Exception $e) { + $value = null; + } + break; + default: + if (false !== strpos($type, '\\')) { + // 对象类型 + $value = new $type($value); + } + } + + return $value; + } + + /** + * 设置数据字段获取器 + * @access public + * @param string|array $name 字段名 + * @param callable $callback 闭包获取器 + * @return $this + */ + public function withAttribute($name, $callback = null) + { + if (is_array($name)) { + foreach ($name as $key => $val) { + $key = Loader::parseName($key); + + $this->withAttr[$key] = $val; + } + } else { + $name = Loader::parseName($name); + + $this->withAttr[$name] = $callback; + } + + return $this; + } +} diff --git a/thinkphp/library/think/model/concern/Conversion.php b/thinkphp/library/think/model/concern/Conversion.php new file mode 100755 index 0000000..28a6f99 --- /dev/null +++ b/thinkphp/library/think/model/concern/Conversion.php @@ -0,0 +1,273 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\concern; + +use think\Collection; +use think\Exception; +use think\Loader; +use think\Model; +use think\model\Collection as ModelCollection; + +/** + * 模型数据转换处理 + */ +trait Conversion +{ + /** + * 数据输出显示的属性 + * @var array + */ + protected $visible = []; + + /** + * 数据输出隐藏的属性 + * @var array + */ + protected $hidden = []; + + /** + * 数据输出需要追加的属性 + * @var array + */ + protected $append = []; + + /** + * 数据集对象名 + * @var string + */ + protected $resultSetType; + + /** + * 设置需要附加的输出属性 + * @access public + * @param array $append 属性列表 + * @param bool $override 是否覆盖 + * @return $this + */ + public function append(array $append = [], $override = false) + { + $this->append = $override ? $append : array_merge($this->append, $append); + + return $this; + } + + /** + * 设置附加关联对象的属性 + * @access public + * @param string $attr 关联属性 + * @param string|array $append 追加属性名 + * @return $this + * @throws Exception + */ + public function appendRelationAttr($attr, $append) + { + if (is_string($append)) { + $append = explode(',', $append); + } + + $relation = Loader::parseName($attr, 1, false); + if (isset($this->relation[$relation])) { + $model = $this->relation[$relation]; + } else { + $model = $this->getRelationData($this->$relation()); + } + + if ($model instanceof Model) { + foreach ($append as $key => $attr) { + $key = is_numeric($key) ? $attr : $key; + if (isset($this->data[$key])) { + throw new Exception('bind attr has exists:' . $key); + } else { + $this->data[$key] = $model->$attr; + } + } + } + + return $this; + } + + /** + * 设置需要隐藏的输出属性 + * @access public + * @param array $hidden 属性列表 + * @param bool $override 是否覆盖 + * @return $this + */ + public function hidden(array $hidden = [], $override = false) + { + $this->hidden = $override ? $hidden : array_merge($this->hidden, $hidden); + + return $this; + } + + /** + * 设置需要输出的属性 + * @access public + * @param array $visible + * @param bool $override 是否覆盖 + * @return $this + */ + public function visible(array $visible = [], $override = false) + { + $this->visible = $override ? $visible : array_merge($this->visible, $visible); + + return $this; + } + + /** + * 转换当前模型对象为数组 + * @access public + * @return array + */ + public function toArray() + { + $item = []; + $hasVisible = false; + + foreach ($this->visible as $key => $val) { + if (is_string($val)) { + if (strpos($val, '.')) { + list($relation, $name) = explode('.', $val); + $this->visible[$relation][] = $name; + } else { + $this->visible[$val] = true; + $hasVisible = true; + } + unset($this->visible[$key]); + } + } + + foreach ($this->hidden as $key => $val) { + if (is_string($val)) { + if (strpos($val, '.')) { + list($relation, $name) = explode('.', $val); + $this->hidden[$relation][] = $name; + } else { + $this->hidden[$val] = true; + } + unset($this->hidden[$key]); + } + } + + // 合并关联数据 + $data = array_merge($this->data, $this->relation); + + foreach ($data as $key => $val) { + if ($val instanceof Model || $val instanceof ModelCollection) { + // 关联模型对象 + if (isset($this->visible[$key]) && is_array($this->visible[$key])) { + $val->visible($this->visible[$key]); + } elseif (isset($this->hidden[$key]) && is_array($this->hidden[$key])) { + $val->hidden($this->hidden[$key]); + } + // 关联模型对象 + if (!isset($this->hidden[$key]) || true !== $this->hidden[$key]) { + $item[$key] = $val->toArray(); + } + } elseif (isset($this->visible[$key])) { + $item[$key] = $this->getAttr($key); + } elseif (!isset($this->hidden[$key]) && !$hasVisible) { + $item[$key] = $this->getAttr($key); + } + } + + // 追加属性(必须定义获取器) + if (!empty($this->append)) { + foreach ($this->append as $key => $name) { + if (is_array($name)) { + // 追加关联对象属性 + $relation = $this->getRelation($key); + + if (!$relation) { + $relation = $this->getAttr($key); + if ($relation) { + $relation->visible($name); + } + } + + $item[$key] = $relation ? $relation->append($name)->toArray() : []; + } elseif (strpos($name, '.')) { + list($key, $attr) = explode('.', $name); + // 追加关联对象属性 + $relation = $this->getRelation($key); + + if (!$relation) { + $relation = $this->getAttr($key); + if ($relation) { + $relation->visible([$attr]); + } + } + + $item[$key] = $relation ? $relation->append([$attr])->toArray() : []; + } else { + $item[$name] = $this->getAttr($name, $item); + } + } + } + + return $item; + } + + /** + * 转换当前模型对象为JSON字符串 + * @access public + * @param integer $options json参数 + * @return string + */ + public function toJson($options = JSON_UNESCAPED_UNICODE) + { + return json_encode($this->toArray(), $options); + } + + /** + * 移除当前模型的关联属性 + * @access public + * @return $this + */ + public function removeRelation() + { + $this->relation = []; + return $this; + } + + public function __toString() + { + return $this->toJson(); + } + + // JsonSerializable + public function jsonSerialize() + { + return $this->toArray(); + } + + /** + * 转换数据集为数据集对象 + * @access public + * @param array|Collection $collection 数据集 + * @param string $resultSetType 数据集类 + * @return Collection + */ + public function toCollection($collection, $resultSetType = null) + { + $resultSetType = $resultSetType ?: $this->resultSetType; + + if ($resultSetType && false !== strpos($resultSetType, '\\')) { + $collection = new $resultSetType($collection); + } else { + $collection = new ModelCollection($collection); + } + + return $collection; + } + +} diff --git a/thinkphp/library/think/model/concern/ModelEvent.php b/thinkphp/library/think/model/concern/ModelEvent.php new file mode 100755 index 0000000..3a87484 --- /dev/null +++ b/thinkphp/library/think/model/concern/ModelEvent.php @@ -0,0 +1,238 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\concern; + +use think\Container; +use think\Loader; + +/** + * 模型事件处理 + */ +trait ModelEvent +{ + /** + * 模型回调 + * @var array + */ + private static $event = []; + + /** + * 模型事件观察 + * @var array + */ + protected static $observe = ['before_write', 'after_write', 'before_insert', 'after_insert', 'before_update', 'after_update', 'before_delete', 'after_delete', 'before_restore', 'after_restore']; + + /** + * 绑定模型事件观察者类 + * @var array + */ + protected $observerClass; + + /** + * 是否需要事件响应 + * @var bool + */ + private $withEvent = true; + + /** + * 注册回调方法 + * @access public + * @param string $event 事件名 + * @param callable $callback 回调方法 + * @param bool $override 是否覆盖 + * @return void + */ + public static function event($event, $callback, $override = false) + { + $class = static::class; + + if ($override) { + self::$event[$class][$event] = []; + } + + self::$event[$class][$event][] = $callback; + } + + /** + * 清除回调方法 + * @access public + * @return void + */ + public static function flushEvent() + { + self::$event[static::class] = []; + } + + /** + * 注册一个模型观察者 + * + * @param object|string $class + * @return void + */ + public static function observe($class) + { + self::flushEvent(); + + foreach (static::$observe as $event) { + $eventFuncName = Loader::parseName($event, 1, false); + + if (method_exists($class, $eventFuncName)) { + static::event($event, [$class, $eventFuncName]); + } + } + } + + /** + * 当前操作的事件响应 + * @access protected + * @param bool $event 是否需要事件响应 + * @return $this + */ + public function withEvent($event) + { + $this->withEvent = $event; + return $this; + } + + /** + * 触发事件 + * @access protected + * @param string $event 事件名 + * @return bool + */ + protected function trigger($event) + { + $class = static::class; + + if ($this->withEvent && isset(self::$event[$class][$event])) { + foreach (self::$event[$class][$event] as $callback) { + $result = Container::getInstance()->invoke($callback, [$this]); + + if (false === $result) { + return false; + } + } + } + + return true; + } + + /** + * 模型before_insert事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function beforeInsert($callback, $override = false) + { + self::event('before_insert', $callback, $override); + } + + /** + * 模型after_insert事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function afterInsert($callback, $override = false) + { + self::event('after_insert', $callback, $override); + } + + /** + * 模型before_update事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function beforeUpdate($callback, $override = false) + { + self::event('before_update', $callback, $override); + } + + /** + * 模型after_update事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function afterUpdate($callback, $override = false) + { + self::event('after_update', $callback, $override); + } + + /** + * 模型before_write事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function beforeWrite($callback, $override = false) + { + self::event('before_write', $callback, $override); + } + + /** + * 模型after_write事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function afterWrite($callback, $override = false) + { + self::event('after_write', $callback, $override); + } + + /** + * 模型before_delete事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function beforeDelete($callback, $override = false) + { + self::event('before_delete', $callback, $override); + } + + /** + * 模型after_delete事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function afterDelete($callback, $override = false) + { + self::event('after_delete', $callback, $override); + } + + /** + * 模型before_restore事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function beforeRestore($callback, $override = false) + { + self::event('before_restore', $callback, $override); + } + + /** + * 模型after_restore事件快捷方法 + * @access protected + * @param callable $callback + * @param bool $override + */ + protected static function afterRestore($callback, $override = false) + { + self::event('after_restore', $callback, $override); + } +} diff --git a/thinkphp/library/think/model/concern/RelationShip.php b/thinkphp/library/think/model/concern/RelationShip.php new file mode 100755 index 0000000..9ca709a --- /dev/null +++ b/thinkphp/library/think/model/concern/RelationShip.php @@ -0,0 +1,670 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\concern; + +use think\Collection; +use think\db\Query; +use think\Loader; +use think\Model; +use think\model\Relation; +use think\model\relation\BelongsTo; +use think\model\relation\BelongsToMany; +use think\model\relation\HasMany; +use think\model\relation\HasManyThrough; +use think\model\relation\HasOne; +use think\model\relation\MorphMany; +use think\model\relation\MorphOne; +use think\model\relation\MorphTo; + +/** + * 模型关联处理 + */ +trait RelationShip +{ + /** + * 父关联模型对象 + * @var object + */ + private $parent; + + /** + * 模型关联数据 + * @var array + */ + private $relation = []; + + /** + * 关联写入定义信息 + * @var array + */ + private $together; + + /** + * 关联自动写入信息 + * @var array + */ + protected $relationWrite; + + /** + * 设置父关联对象 + * @access public + * @param Model $model 模型对象 + * @return $this + */ + public function setParent($model) + { + $this->parent = $model; + + return $this; + } + + /** + * 获取父关联对象 + * @access public + * @return Model + */ + public function getParent() + { + return $this->parent; + } + + /** + * 获取当前模型的关联模型数据 + * @access public + * @param string $name 关联方法名 + * @return mixed + */ + public function getRelation($name = null) + { + if (is_null($name)) { + return $this->relation; + } elseif (array_key_exists($name, $this->relation)) { + return $this->relation[$name]; + } + return; + } + + /** + * 设置关联数据对象值 + * @access public + * @param string $name 属性名 + * @param mixed $value 属性值 + * @param array $data 数据 + * @return $this + */ + public function setRelation($name, $value, $data = []) + { + // 检测修改器 + $method = 'set' . Loader::parseName($name, 1) . 'Attr'; + + if (method_exists($this, $method)) { + $value = $this->$method($value, array_merge($this->data, $data)); + } + + $this->relation[$name] = $value; + + return $this; + } + + /** + * 关联数据写入 + * @access public + * @param array|string $relation 关联 + * @return $this + */ + public function together($relation) + { + if (is_string($relation)) { + $relation = explode(',', $relation); + } + + $this->together = $relation; + + $this->checkAutoRelationWrite(); + + return $this; + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $relation 关联方法名 + * @param mixed $operator 比较操作符 + * @param integer $count 个数 + * @param string $id 关联表的统计字段 + * @param string $joinType JOIN类型 + * @return Query + */ + public static function has($relation, $operator = '>=', $count = 1, $id = '*', $joinType = 'INNER') + { + $relation = (new static())->$relation(); + + if (is_array($operator) || $operator instanceof \Closure) { + return $relation->hasWhere($operator); + } + + return $relation->has($operator, $count, $id, $joinType); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $relation 关联方法名 + * @param mixed $where 查询条件(数组或者闭包) + * @param mixed $fields 字段 + * @return Query + */ + public static function hasWhere($relation, $where = [], $fields = '*') + { + return (new static())->$relation()->hasWhere($where, $fields); + } + + /** + * 查询当前模型的关联数据 + * @access public + * @param string|array $relations 关联名 + * @param array $withRelationAttr 关联获取器 + * @return $this + */ + public function relationQuery($relations, $withRelationAttr = []) + { + if (is_string($relations)) { + $relations = explode(',', $relations); + } + + foreach ($relations as $key => $relation) { + $subRelation = ''; + $closure = null; + + if ($relation instanceof \Closure) { + // 支持闭包查询过滤关联条件 + $closure = $relation; + $relation = $key; + } + + if (is_array($relation)) { + $subRelation = $relation; + $relation = $key; + } elseif (strpos($relation, '.')) { + list($relation, $subRelation) = explode('.', $relation, 2); + } + + $method = Loader::parseName($relation, 1, false); + $relationName = Loader::parseName($relation); + + $relationResult = $this->$method(); + + if (isset($withRelationAttr[$relationName])) { + $relationResult->getQuery()->withAttr($withRelationAttr[$relationName]); + } + + $this->relation[$relation] = $relationResult->getRelation($subRelation, $closure); + } + + return $this; + } + + /** + * 预载入关联查询 返回数据集 + * @access public + * @param array $resultSet 数据集 + * @param string $relation 关联名 + * @param array $withRelationAttr 关联获取器 + * @param bool $join 是否为JOIN方式 + * @return array + */ + public function eagerlyResultSet(&$resultSet, $relation, $withRelationAttr = [], $join = false) + { + $relations = is_string($relation) ? explode(',', $relation) : $relation; + + foreach ($relations as $key => $relation) { + $subRelation = ''; + $closure = null; + + if ($relation instanceof \Closure) { + $closure = $relation; + $relation = $key; + } + + if (is_array($relation)) { + $subRelation = $relation; + $relation = $key; + } elseif (strpos($relation, '.')) { + list($relation, $subRelation) = explode('.', $relation, 2); + } + + $relation = Loader::parseName($relation, 1, false); + $relationName = Loader::parseName($relation); + + $relationResult = $this->$relation(); + + if (isset($withRelationAttr[$relationName])) { + $relationResult->getQuery()->withAttr($withRelationAttr[$relationName]); + } + + $relationResult->eagerlyResultSet($resultSet, $relation, $subRelation, $closure, $join); + } + } + + /** + * 预载入关联查询 返回模型对象 + * @access public + * @param Model $result 数据对象 + * @param string $relation 关联名 + * @param array $withRelationAttr 关联获取器 + * @param bool $join 是否为JOIN方式 + * @return Model + */ + public function eagerlyResult(&$result, $relation, $withRelationAttr = [], $join = false) + { + $relations = is_string($relation) ? explode(',', $relation) : $relation; + + foreach ($relations as $key => $relation) { + $subRelation = ''; + $closure = null; + + if ($relation instanceof \Closure) { + $closure = $relation; + $relation = $key; + } + + if (is_array($relation)) { + $subRelation = $relation; + $relation = $key; + } elseif (strpos($relation, '.')) { + list($relation, $subRelation) = explode('.', $relation, 2); + } + + $relation = Loader::parseName($relation, 1, false); + $relationName = Loader::parseName($relation); + + $relationResult = $this->$relation(); + + if (isset($withRelationAttr[$relationName])) { + $relationResult->getQuery()->withAttr($withRelationAttr[$relationName]); + } + + $relationResult->eagerlyResult($result, $relation, $subRelation, $closure, $join); + } + } + + /** + * 关联统计 + * @access public + * @param Model $result 数据对象 + * @param array $relations 关联名 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @return void + */ + public function relationCount(&$result, $relations, $aggregate = 'sum', $field = '*') + { + foreach ($relations as $key => $relation) { + $closure = $name = null; + + if ($relation instanceof \Closure) { + $closure = $relation; + $relation = $key; + } elseif (is_string($key)) { + $name = $relation; + $relation = $key; + } + + $relation = Loader::parseName($relation, 1, false); + + $count = $this->$relation()->relationCount($result, $closure, $aggregate, $field, $name); + + if (empty($name)) { + $name = Loader::parseName($relation) . '_' . $aggregate; + } + + $result->setAttr($name, $count); + } + } + + /** + * HAS ONE 关联定义 + * @access public + * @param string $model 模型名 + * @param string $foreignKey 关联外键 + * @param string $localKey 当前主键 + * @return HasOne + */ + public function hasOne($model, $foreignKey = '', $localKey = '') + { + // 记录当前关联信息 + $model = $this->parseModel($model); + $localKey = $localKey ?: $this->getPk(); + $foreignKey = $foreignKey ?: $this->getForeignKey($this->name); + + return new HasOne($this, $model, $foreignKey, $localKey); + } + + /** + * BELONGS TO 关联定义 + * @access public + * @param string $model 模型名 + * @param string $foreignKey 关联外键 + * @param string $localKey 关联主键 + * @return BelongsTo + */ + public function belongsTo($model, $foreignKey = '', $localKey = '') + { + // 记录当前关联信息 + $model = $this->parseModel($model); + $foreignKey = $foreignKey ?: $this->getForeignKey((new $model)->getName()); + $localKey = $localKey ?: (new $model)->getPk(); + $trace = debug_backtrace(false, 2); + $relation = Loader::parseName($trace[1]['function']); + + return new BelongsTo($this, $model, $foreignKey, $localKey, $relation); + } + + /** + * HAS MANY 关联定义 + * @access public + * @param string $model 模型名 + * @param string $foreignKey 关联外键 + * @param string $localKey 当前主键 + * @return HasMany + */ + public function hasMany($model, $foreignKey = '', $localKey = '') + { + // 记录当前关联信息 + $model = $this->parseModel($model); + $localKey = $localKey ?: $this->getPk(); + $foreignKey = $foreignKey ?: $this->getForeignKey($this->name); + + return new HasMany($this, $model, $foreignKey, $localKey); + } + + /** + * HAS MANY 远程关联定义 + * @access public + * @param string $model 模型名 + * @param string $through 中间模型名 + * @param string $foreignKey 关联外键 + * @param string $throughKey 关联外键 + * @param string $localKey 当前主键 + * @return HasManyThrough + */ + public function hasManyThrough($model, $through, $foreignKey = '', $throughKey = '', $localKey = '') + { + // 记录当前关联信息 + $model = $this->parseModel($model); + $through = $this->parseModel($through); + $localKey = $localKey ?: $this->getPk(); + $foreignKey = $foreignKey ?: $this->getForeignKey($this->name); + $throughKey = $throughKey ?: $this->getForeignKey((new $through)->getName()); + + return new HasManyThrough($this, $model, $through, $foreignKey, $throughKey, $localKey); + } + + /** + * BELONGS TO MANY 关联定义 + * @access public + * @param string $model 模型名 + * @param string $table 中间表名 + * @param string $foreignKey 关联外键 + * @param string $localKey 当前模型关联键 + * @return BelongsToMany + */ + public function belongsToMany($model, $table = '', $foreignKey = '', $localKey = '') + { + // 记录当前关联信息 + $model = $this->parseModel($model); + $name = Loader::parseName(basename(str_replace('\\', '/', $model))); + $table = $table ?: Loader::parseName($this->name) . '_' . $name; + $foreignKey = $foreignKey ?: $name . '_id'; + $localKey = $localKey ?: $this->getForeignKey($this->name); + + return new BelongsToMany($this, $model, $table, $foreignKey, $localKey); + } + + /** + * MORPH One 关联定义 + * @access public + * @param string $model 模型名 + * @param string|array $morph 多态字段信息 + * @param string $type 多态类型 + * @return MorphOne + */ + public function morphOne($model, $morph = null, $type = '') + { + // 记录当前关联信息 + $model = $this->parseModel($model); + + if (is_null($morph)) { + $trace = debug_backtrace(false, 2); + $morph = Loader::parseName($trace[1]['function']); + } + + if (is_array($morph)) { + list($morphType, $foreignKey) = $morph; + } else { + $morphType = $morph . '_type'; + $foreignKey = $morph . '_id'; + } + + $type = $type ?: get_class($this); + + return new MorphOne($this, $model, $foreignKey, $morphType, $type); + } + + /** + * MORPH MANY 关联定义 + * @access public + * @param string $model 模型名 + * @param string|array $morph 多态字段信息 + * @param string $type 多态类型 + * @return MorphMany + */ + public function morphMany($model, $morph = null, $type = '') + { + // 记录当前关联信息 + $model = $this->parseModel($model); + + if (is_null($morph)) { + $trace = debug_backtrace(false, 2); + $morph = Loader::parseName($trace[1]['function']); + } + + $type = $type ?: get_class($this); + + if (is_array($morph)) { + list($morphType, $foreignKey) = $morph; + } else { + $morphType = $morph . '_type'; + $foreignKey = $morph . '_id'; + } + + return new MorphMany($this, $model, $foreignKey, $morphType, $type); + } + + /** + * MORPH TO 关联定义 + * @access public + * @param string|array $morph 多态字段信息 + * @param array $alias 多态别名定义 + * @return MorphTo + */ + public function morphTo($morph = null, $alias = []) + { + $trace = debug_backtrace(false, 2); + $relation = Loader::parseName($trace[1]['function']); + + if (is_null($morph)) { + $morph = $relation; + } + + // 记录当前关联信息 + if (is_array($morph)) { + list($morphType, $foreignKey) = $morph; + } else { + $morphType = $morph . '_type'; + $foreignKey = $morph . '_id'; + } + + return new MorphTo($this, $morphType, $foreignKey, $alias, $relation); + } + + /** + * 解析模型的完整命名空间 + * @access protected + * @param string $model 模型名(或者完整类名) + * @return string + */ + protected function parseModel($model) + { + if (false === strpos($model, '\\')) { + $path = explode('\\', static::class); + array_pop($path); + array_push($path, Loader::parseName($model, 1)); + $model = implode('\\', $path); + } + + return $model; + } + + /** + * 获取模型的默认外键名 + * @access protected + * @param string $name 模型名 + * @return string + */ + protected function getForeignKey($name) + { + if (strpos($name, '\\')) { + $name = basename(str_replace('\\', '/', $name)); + } + + return Loader::parseName($name) . '_id'; + } + + /** + * 检查属性是否为关联属性 如果是则返回关联方法名 + * @access protected + * @param string $attr 关联属性名 + * @return string|false + */ + protected function isRelationAttr($attr) + { + $relation = Loader::parseName($attr, 1, false); + + if (method_exists($this, $relation) && !method_exists('think\Model', $relation)) { + return $relation; + } + + return false; + } + + /** + * 智能获取关联模型数据 + * @access protected + * @param Relation $modelRelation 模型关联对象 + * @return mixed + */ + protected function getRelationData(Relation $modelRelation) + { + if ($this->parent && !$modelRelation->isSelfRelation() && get_class($this->parent) == get_class($modelRelation->getModel())) { + $value = $this->parent; + } else { + // 获取关联数据 + $value = $modelRelation->getRelation(); + } + + return $value; + } + + /** + * 关联数据自动写入检查 + * @access protected + * @return void + */ + protected function checkAutoRelationWrite() + { + foreach ($this->together as $key => $name) { + if (is_array($name)) { + if (key($name) === 0) { + $this->relationWrite[$key] = []; + // 绑定关联属性 + foreach ((array) $name as $val) { + if (isset($this->data[$val])) { + $this->relationWrite[$key][$val] = $this->data[$val]; + } + } + } else { + // 直接传入关联数据 + $this->relationWrite[$key] = $name; + } + } elseif (isset($this->relation[$name])) { + $this->relationWrite[$name] = $this->relation[$name]; + } elseif (isset($this->data[$name])) { + $this->relationWrite[$name] = $this->data[$name]; + unset($this->data[$name]); + } + } + } + + /** + * 自动关联数据更新(针对一对一关联) + * @access protected + * @return void + */ + protected function autoRelationUpdate() + { + foreach ($this->relationWrite as $name => $val) { + if ($val instanceof Model) { + $val->isUpdate()->save(); + } else { + $model = $this->getRelation($name); + if ($model instanceof Model) { + $model->isUpdate()->save($val); + } + } + } + } + + /** + * 自动关联数据写入(针对一对一关联) + * @access protected + * @return void + */ + protected function autoRelationInsert() + { + foreach ($this->relationWrite as $name => $val) { + $method = Loader::parseName($name, 1, false); + $this->$method()->save($val); + } + } + + /** + * 自动关联数据删除(支持一对一及一对多关联) + * @access protected + * @return void + */ + protected function autoRelationDelete() + { + foreach ($this->relationWrite as $key => $name) { + $name = is_numeric($key) ? $name : $key; + $result = $this->getRelation($name); + + if ($result instanceof Model) { + $result->delete(); + } elseif ($result instanceof Collection) { + foreach ($result as $model) { + $model->delete(); + } + } + } + } +} diff --git a/thinkphp/library/think/model/concern/SoftDelete.php b/thinkphp/library/think/model/concern/SoftDelete.php new file mode 100755 index 0000000..679aa34 --- /dev/null +++ b/thinkphp/library/think/model/concern/SoftDelete.php @@ -0,0 +1,242 @@ +getDeleteTimeField(); + + if ($field && !empty($this->getOrigin($field))) { + return true; + } + + return false; + } + + /** + * 查询软删除数据 + * @access public + * @return Query + */ + public static function withTrashed() + { + $model = new static(); + + return $model->withTrashedData(true)->db(false); + } + + /** + * 是否包含软删除数据 + * @access protected + * @param bool $withTrashed 是否包含软删除数据 + * @return $this + */ + protected function withTrashedData($withTrashed) + { + $this->withTrashed = $withTrashed; + return $this; + } + + /** + * 只查询软删除数据 + * @access public + * @return Query + */ + public static function onlyTrashed() + { + $model = new static(); + $field = $model->getDeleteTimeField(true); + + if ($field) { + return $model + ->db(false) + ->useSoftDelete($field, $model->getWithTrashedExp()); + } + + return $model->db(false); + } + + /** + * 获取软删除数据的查询条件 + * @access protected + * @return array + */ + protected function getWithTrashedExp() + { + return is_null($this->defaultSoftDelete) ? + ['notnull', ''] : ['<>', $this->defaultSoftDelete]; + } + + /** + * 删除当前的记录 + * @access public + * @return bool + */ + public function delete($force = false) + { + if (!$this->isExists() || false === $this->trigger('before_delete', $this)) { + return false; + } + + $force = $force ?: $this->isForce(); + $name = $this->getDeleteTimeField(); + + if ($name && !$force) { + // 软删除 + $this->data($name, $this->autoWriteTimestamp($name)); + + $result = $this->isUpdate()->withEvent(false)->save(); + + $this->withEvent(true); + } else { + // 读取更新条件 + $where = $this->getWhere(); + + // 删除当前模型数据 + $result = $this->db(false) + ->where($where) + ->removeOption('soft_delete') + ->delete(); + } + + // 关联删除 + if (!empty($this->relationWrite)) { + $this->autoRelationDelete(); + } + + $this->trigger('after_delete', $this); + + $this->exists(false); + + return true; + } + + /** + * 删除记录 + * @access public + * @param mixed $data 主键列表 支持闭包查询条件 + * @param bool $force 是否强制删除 + * @return bool + */ + public static function destroy($data, $force = false) + { + // 包含软删除数据 + $query = (new static())->db(false); + + if (is_array($data) && key($data) !== 0) { + $query->where($data); + $data = null; + } elseif ($data instanceof \Closure) { + call_user_func_array($data, [ & $query]); + $data = null; + } elseif (is_null($data)) { + return false; + } + + $resultSet = $query->select($data); + + if ($resultSet) { + foreach ($resultSet as $data) { + $data->force($force)->delete(); + } + } + + return true; + } + + /** + * 恢复被软删除的记录 + * @access public + * @param array $where 更新条件 + * @return bool + */ + public function restore($where = []) + { + $name = $this->getDeleteTimeField(); + + if ($name) { + if (false === $this->trigger('before_restore')) { + return false; + } + + if (empty($where)) { + $pk = $this->getPk(); + + $where[] = [$pk, '=', $this->getData($pk)]; + } + + // 恢复删除 + $this->db(false) + ->where($where) + ->useSoftDelete($name, $this->getWithTrashedExp()) + ->update([$name => $this->defaultSoftDelete]); + + $this->trigger('after_restore'); + + return true; + } + + return false; + } + + /** + * 获取软删除字段 + * @access protected + * @param bool $read 是否查询操作 写操作的时候会自动去掉表别名 + * @return string|false + */ + protected function getDeleteTimeField($read = false) + { + $field = property_exists($this, 'deleteTime') && isset($this->deleteTime) ? $this->deleteTime : 'delete_time'; + + if (false === $field) { + return false; + } + + if (false === strpos($field, '.')) { + $field = '__TABLE__.' . $field; + } + + if (!$read && strpos($field, '.')) { + $array = explode('.', $field); + $field = array_pop($array); + } + + return $field; + } + + /** + * 查询的时候默认排除软删除数据 + * @access protected + * @param Query $query + * @return void + */ + protected function withNoTrashed($query) + { + $field = $this->getDeleteTimeField(true); + + if ($field) { + $condition = is_null($this->defaultSoftDelete) ? ['null', ''] : ['=', $this->defaultSoftDelete]; + $query->useSoftDelete($field, $condition); + } + } +} diff --git a/thinkphp/library/think/model/concern/TimeStamp.php b/thinkphp/library/think/model/concern/TimeStamp.php new file mode 100755 index 0000000..99a31fa --- /dev/null +++ b/thinkphp/library/think/model/concern/TimeStamp.php @@ -0,0 +1,92 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\concern; + +use DateTime; + +/** + * 自动时间戳 + */ +trait TimeStamp +{ + /** + * 是否需要自动写入时间戳 如果设置为字符串 则表示时间字段的类型 + * @var bool|string + */ + protected $autoWriteTimestamp; + + /** + * 创建时间字段 false表示关闭 + * @var false|string + */ + protected $createTime = 'create_time'; + + /** + * 更新时间字段 false表示关闭 + * @var false|string + */ + protected $updateTime = 'update_time'; + + /** + * 时间字段显示格式 + * @var string + */ + protected $dateFormat; + + /** + * 时间日期字段格式化处理 + * @access protected + * @param mixed $format 日期格式 + * @param mixed $time 时间日期表达式 + * @param bool $timestamp 是否进行时间戳转换 + * @return mixed + */ + protected function formatDateTime($format, $time = 'now', $timestamp = false) + { + if (empty($time)) { + return; + } + + if (false === $format) { + return $time; + } elseif (false !== strpos($format, '\\')) { + return new $format($time); + } + + if ($timestamp) { + $dateTime = new DateTime(); + $dateTime->setTimestamp($time); + } else { + $dateTime = new DateTime($time); + } + + return $dateTime->format($format); + } + + /** + * 检查时间字段写入 + * @access protected + * @return void + */ + protected function checkTimeStampWrite() + { + // 自动写入创建时间和更新时间 + if ($this->autoWriteTimestamp) { + if ($this->createTime && !isset($this->data[$this->createTime])) { + $this->data[$this->createTime] = $this->autoWriteTimestamp($this->createTime); + } + if ($this->updateTime && !isset($this->data[$this->updateTime])) { + $this->data[$this->updateTime] = $this->autoWriteTimestamp($this->updateTime); + } + } + } +} diff --git a/thinkphp/library/think/model/relation/BelongsTo.php b/thinkphp/library/think/model/relation/BelongsTo.php new file mode 100755 index 0000000..1dea3b3 --- /dev/null +++ b/thinkphp/library/think/model/relation/BelongsTo.php @@ -0,0 +1,322 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\relation; + +use think\Loader; +use think\Model; + +class BelongsTo extends OneToOne +{ + /** + * 架构函数 + * @access public + * @param Model $parent 上级模型对象 + * @param string $model 模型名 + * @param string $foreignKey 关联外键 + * @param string $localKey 关联主键 + * @param string $relation 关联名 + */ + public function __construct(Model $parent, $model, $foreignKey, $localKey, $relation = null) + { + $this->parent = $parent; + $this->model = $model; + $this->foreignKey = $foreignKey; + $this->localKey = $localKey; + $this->joinType = 'INNER'; + $this->query = (new $model)->db(); + $this->relation = $relation; + + if (get_class($parent) == $model) { + $this->selfRelation = true; + } + } + + /** + * 延迟获取关联数据 + * @access public + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包查询条件 + * @return Model + */ + public function getRelation($subRelation = '', $closure = null) + { + if ($closure) { + $closure($this->query); + } + + $foreignKey = $this->foreignKey; + + $relationModel = $this->query + ->removeWhereField($this->localKey) + ->where($this->localKey, $this->parent->$foreignKey) + ->relation($subRelation) + ->find(); + + if ($relationModel) { + $relationModel->setParent(clone $this->parent); + } + + return $relationModel; + } + + /** + * 创建关联统计子查询 + * @access public + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $aggregateAlias 聚合字段别名 + * @return string + */ + public function getRelationCountQuery($closure, $aggregate = 'count', $field = '*', &$aggregateAlias = '') + { + if ($closure) { + $return = $closure($this->query); + + if ($return && is_string($return)) { + $aggregateAlias = $return; + } + } + + return $this->query + ->whereExp($this->localKey, '=' . $this->parent->getTable() . '.' . $this->foreignKey) + ->fetchSql() + ->$aggregate($field); + } + + /** + * 关联统计 + * @access public + * @param Model $result 数据对象 + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $name 统计字段别名 + * @return integer + */ + public function relationCount($result, $closure, $aggregate = 'count', $field = '*', &$name = '') + { + $foreignKey = $this->foreignKey; + + if (!isset($result->$foreignKey)) { + return 0; + } + + if ($closure) { + $return = $closure($this->query); + + if ($return && is_string($return)) { + $name = $return; + } + } + + return $this->query + ->where($this->localKey, '=', $result->$foreignKey) + ->$aggregate($field); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $operator 比较操作符 + * @param integer $count 个数 + * @param string $id 关联表的统计字段 + * @param string $joinType JOIN类型 + * @return Query + */ + public function has($operator = '>=', $count = 1, $id = '*', $joinType = 'INNER') + { + $table = $this->query->getTable(); + $model = basename(str_replace('\\', '/', get_class($this->parent))); + $relation = basename(str_replace('\\', '/', $this->model)); + $localKey = $this->localKey; + $foreignKey = $this->foreignKey; + $softDelete = $this->query->getOptions('soft_delete'); + + return $this->parent->db() + ->alias($model) + ->whereExists(function ($query) use ($table, $model, $relation, $localKey, $foreignKey) { + $query->table([$table => $relation]) + ->field($relation . '.' . $localKey) + ->whereExp($model . '.' . $foreignKey, '=' . $relation . '.' . $localKey) + ->when($softDelete, function ($query) use ($softDelete, $relation) { + $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); + }); + }); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param mixed $where 查询条件(数组或者闭包) + * @param mixed $fields 字段 + * @return Query + */ + public function hasWhere($where = [], $fields = null) + { + $table = $this->query->getTable(); + $model = basename(str_replace('\\', '/', get_class($this->parent))); + $relation = basename(str_replace('\\', '/', $this->model)); + + if (is_array($where)) { + $this->getQueryWhere($where, $relation); + } + + $fields = $this->getRelationQueryFields($fields, $model); + $softDelete = $this->query->getOptions('soft_delete'); + + return $this->parent->db() + ->alias($model) + ->field($fields) + ->join([$table => $relation], $model . '.' . $this->foreignKey . '=' . $relation . '.' . $this->localKey, $this->joinType) + ->when($softDelete, function ($query) use ($softDelete, $relation) { + $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); + }) + ->where($where); + } + + /** + * 预载入关联查询(数据集) + * @access protected + * @param array $resultSet 数据集 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + protected function eagerlySet(&$resultSet, $relation, $subRelation, $closure) + { + $localKey = $this->localKey; + $foreignKey = $this->foreignKey; + + $range = []; + foreach ($resultSet as $result) { + // 获取关联外键列表 + if (isset($result->$foreignKey)) { + $range[] = $result->$foreignKey; + } + } + + if (!empty($range)) { + $this->query->removeWhereField($localKey); + + $data = $this->eagerlyWhere([ + [$localKey, 'in', $range], + ], $localKey, $relation, $subRelation, $closure); + + // 关联属性名 + $attr = Loader::parseName($relation); + + // 关联数据封装 + foreach ($resultSet as $result) { + // 关联模型 + if (!isset($data[$result->$foreignKey])) { + $relationModel = null; + } else { + $relationModel = $data[$result->$foreignKey]; + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } + + if (!empty($this->bindAttr)) { + // 绑定关联属性 + $this->bindAttr($relationModel, $result); + } else { + // 设置关联属性 + $result->setRelation($attr, $relationModel); + } + } + } + } + + /** + * 预载入关联查询(数据) + * @access protected + * @param Model $result 数据对象 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + protected function eagerlyOne(&$result, $relation, $subRelation, $closure) + { + $localKey = $this->localKey; + $foreignKey = $this->foreignKey; + + $this->query->removeWhereField($localKey); + + $data = $this->eagerlyWhere([ + [$localKey, '=', $result->$foreignKey], + ], $localKey, $relation, $subRelation, $closure); + + // 关联模型 + if (!isset($data[$result->$foreignKey])) { + $relationModel = null; + } else { + $relationModel = $data[$result->$foreignKey]; + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } + + if (!empty($this->bindAttr)) { + // 绑定关联属性 + $this->bindAttr($relationModel, $result); + } else { + // 设置关联属性 + $result->setRelation(Loader::parseName($relation), $relationModel); + } + } + + /** + * 添加关联数据 + * @access public + * @param Model $model 关联模型对象 + * @return Model + */ + public function associate($model) + { + $this->parent->setAttr($this->foreignKey, $model->getKey()); + $this->parent->save(); + + return $this->parent->setRelation($this->relation, $model); + } + + /** + * 注销关联数据 + * @access public + * @return Model + */ + public function dissociate() + { + $this->parent->setAttr($this->foreignKey, null); + $this->parent->save(); + + return $this->parent->setRelation($this->relation, null); + } + + /** + * 执行基础查询(仅执行一次) + * @access protected + * @return void + */ + protected function baseQuery() + { + if (empty($this->baseQuery)) { + if (isset($this->parent->{$this->foreignKey})) { + // 关联查询带入关联条件 + $this->query->where($this->localKey, '=', $this->parent->{$this->foreignKey}); + } + + $this->baseQuery = true; + } + } +} diff --git a/thinkphp/library/think/model/relation/BelongsToMany.php b/thinkphp/library/think/model/relation/BelongsToMany.php new file mode 100755 index 0000000..54df68b --- /dev/null +++ b/thinkphp/library/think/model/relation/BelongsToMany.php @@ -0,0 +1,710 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\relation; + +use think\Collection; +use think\db\Query; +use think\Exception; +use think\Loader; +use think\Model; +use think\model\Pivot; +use think\model\Relation; + +class BelongsToMany extends Relation +{ + // 中间表表名 + protected $middle; + // 中间表模型名称 + protected $pivotName; + // 中间表数据名称 + protected $pivotDataName = 'pivot'; + // 中间表模型对象 + protected $pivot; + + /** + * 架构函数 + * @access public + * @param Model $parent 上级模型对象 + * @param string $model 模型名 + * @param string $table 中间表名 + * @param string $foreignKey 关联模型外键 + * @param string $localKey 当前模型关联键 + */ + public function __construct(Model $parent, $model, $table, $foreignKey, $localKey) + { + $this->parent = $parent; + $this->model = $model; + $this->foreignKey = $foreignKey; + $this->localKey = $localKey; + + if (false !== strpos($table, '\\')) { + $this->pivotName = $table; + $this->middle = basename(str_replace('\\', '/', $table)); + } else { + $this->middle = $table; + } + + $this->query = (new $model)->db(); + $this->pivot = $this->newPivot(); + } + + /** + * 设置中间表模型 + * @access public + * @param $pivot + * @return $this + */ + public function pivot($pivot) + { + $this->pivotName = $pivot; + return $this; + } + + /** + * 设置中间表数据名称 + * @access public + * @param string $name + * @return $this + */ + public function pivotDataName($name) + { + $this->pivotDataName = $name; + return $this; + } + + /** + * 获取中间表更新条件 + * @param $data + * @return array + */ + protected function getUpdateWhere($data) + { + return [ + $this->localKey => $data[$this->localKey], + $this->foreignKey => $data[$this->foreignKey], + ]; + } + + /** + * 实例化中间表模型 + * @access public + * @param array $data + * @param bool $isUpdate + * @return Pivot + * @throws Exception + */ + protected function newPivot($data = [], $isUpdate = false) + { + $class = $this->pivotName ?: '\\think\\model\\Pivot'; + $pivot = new $class($data, $this->parent, $this->middle); + + if ($pivot instanceof Pivot) { + return $isUpdate ? $pivot->isUpdate(true, $this->getUpdateWhere($data)) : $pivot; + } + + throw new Exception('pivot model must extends: \think\model\Pivot'); + } + + /** + * 合成中间表模型 + * @access protected + * @param array|Collection|Paginator $models + */ + protected function hydratePivot($models) + { + foreach ($models as $model) { + $pivot = []; + + foreach ($model->getData() as $key => $val) { + if (strpos($key, '__')) { + list($name, $attr) = explode('__', $key, 2); + + if ('pivot' == $name) { + $pivot[$attr] = $val; + unset($model->$key); + } + } + } + + $model->setRelation($this->pivotDataName, $this->newPivot($pivot, true)); + } + } + + /** + * 创建关联查询Query对象 + * @access protected + * @return Query + */ + protected function buildQuery() + { + $foreignKey = $this->foreignKey; + $localKey = $this->localKey; + + // 关联查询 + $pk = $this->parent->getPk(); + + $condition[] = ['pivot.' . $localKey, '=', $this->parent->$pk]; + + return $this->belongsToManyQuery($foreignKey, $localKey, $condition); + } + + /** + * 延迟获取关联数据 + * @access public + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包查询条件 + * @return Collection + */ + public function getRelation($subRelation = '', $closure = null) + { + if ($closure) { + $closure($this->query); + } + + $result = $this->buildQuery()->relation($subRelation)->select(); + $this->hydratePivot($result); + + return $result; + } + + /** + * 重载select方法 + * @access public + * @param mixed $data + * @return Collection + */ + public function select($data = null) + { + $result = $this->buildQuery()->select($data); + $this->hydratePivot($result); + + return $result; + } + + /** + * 重载paginate方法 + * @access public + * @param null $listRows + * @param bool $simple + * @param array $config + * @return Paginator + */ + public function paginate($listRows = null, $simple = false, $config = []) + { + $result = $this->buildQuery()->paginate($listRows, $simple, $config); + $this->hydratePivot($result); + + return $result; + } + + /** + * 重载find方法 + * @access public + * @param mixed $data + * @return Model + */ + public function find($data = null) + { + $result = $this->buildQuery()->find($data); + if ($result) { + $this->hydratePivot([$result]); + } + + return $result; + } + + /** + * 查找多条记录 如果不存在则抛出异常 + * @access public + * @param array|string|Query|\Closure $data + * @return Collection + */ + public function selectOrFail($data = null) + { + return $this->failException(true)->select($data); + } + + /** + * 查找单条记录 如果不存在则抛出异常 + * @access public + * @param array|string|Query|\Closure $data + * @return Model + */ + public function findOrFail($data = null) + { + return $this->failException(true)->find($data); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $operator 比较操作符 + * @param integer $count 个数 + * @param string $id 关联表的统计字段 + * @param string $joinType JOIN类型 + * @return Query + */ + public function has($operator = '>=', $count = 1, $id = '*', $joinType = 'INNER') + { + return $this->parent; + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param mixed $where 查询条件(数组或者闭包) + * @param mixed $fields 字段 + * @return Query + * @throws Exception + */ + public function hasWhere($where = [], $fields = null) + { + throw new Exception('relation not support: hasWhere'); + } + + /** + * 设置中间表的查询条件 + * @access public + * @param string $field + * @param string $op + * @param mixed $condition + * @return $this + */ + public function wherePivot($field, $op = null, $condition = null) + { + $this->query->where('pivot.' . $field, $op, $condition); + return $this; + } + + /** + * 预载入关联查询(数据集) + * @access public + * @param array $resultSet 数据集 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure) + { + $localKey = $this->localKey; + $foreignKey = $this->foreignKey; + + $pk = $resultSet[0]->getPk(); + $range = []; + foreach ($resultSet as $result) { + // 获取关联外键列表 + if (isset($result->$pk)) { + $range[] = $result->$pk; + } + } + + if (!empty($range)) { + // 查询关联数据 + $data = $this->eagerlyManyToMany([ + ['pivot.' . $localKey, 'in', $range], + ], $relation, $subRelation, $closure); + + // 关联属性名 + $attr = Loader::parseName($relation); + + // 关联数据封装 + foreach ($resultSet as $result) { + if (!isset($data[$result->$pk])) { + $data[$result->$pk] = []; + } + + $result->setRelation($attr, $this->resultSetBuild($data[$result->$pk])); + } + } + } + + /** + * 预载入关联查询(单个数据) + * @access public + * @param Model $result 数据对象 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + public function eagerlyResult(&$result, $relation, $subRelation, $closure) + { + $pk = $result->getPk(); + + if (isset($result->$pk)) { + $pk = $result->$pk; + // 查询管理数据 + $data = $this->eagerlyManyToMany([ + ['pivot.' . $this->localKey, '=', $pk], + ], $relation, $subRelation, $closure); + + // 关联数据封装 + if (!isset($data[$pk])) { + $data[$pk] = []; + } + + $result->setRelation(Loader::parseName($relation), $this->resultSetBuild($data[$pk])); + } + } + + /** + * 关联统计 + * @access public + * @param Model $result 数据对象 + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $name 统计字段别名 + * @return integer + */ + public function relationCount($result, $closure, $aggregate = 'count', $field = '*', &$name = '') + { + $pk = $result->getPk(); + + if (!isset($result->$pk)) { + return 0; + } + + $pk = $result->$pk; + + if ($closure) { + $return = $closure($this->query); + + if ($return && is_string($return)) { + $name = $return; + } + } + + return $this->belongsToManyQuery($this->foreignKey, $this->localKey, [ + ['pivot.' . $this->localKey, '=', $pk], + ])->$aggregate($field); + } + + /** + * 获取关联统计子查询 + * @access public + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $aggregateAlias 聚合字段别名 + * @return array + */ + public function getRelationCountQuery($closure, $aggregate = 'count', $field = '*', &$aggregateAlias = '') + { + if ($closure) { + $return = $closure($this->query); + + if ($return && is_string($return)) { + $aggregateAlias = $return; + } + } + + return $this->belongsToManyQuery($this->foreignKey, $this->localKey, [ + [ + 'pivot.' . $this->localKey, 'exp', $this->query->raw('=' . $this->parent->getTable() . '.' . $this->parent->getPk()), + ], + ])->fetchSql()->$aggregate($field); + } + + /** + * 多对多 关联模型预查询 + * @access protected + * @param array $where 关联预查询条件 + * @param string $relation 关联名 + * @param string $subRelation 子关联 + * @param \Closure $closure 闭包 + * @return array + */ + protected function eagerlyManyToMany($where, $relation, $subRelation = '', $closure = null) + { + // 预载入关联查询 支持嵌套预载入 + if ($closure) { + $closure($this->query); + } + + $list = $this->belongsToManyQuery($this->foreignKey, $this->localKey, $where) + ->with($subRelation) + ->select(); + + // 组装模型数据 + $data = []; + foreach ($list as $set) { + $pivot = []; + foreach ($set->getData() as $key => $val) { + if (strpos($key, '__')) { + list($name, $attr) = explode('__', $key, 2); + if ('pivot' == $name) { + $pivot[$attr] = $val; + unset($set->$key); + } + } + } + + $set->setRelation($this->pivotDataName, $this->newPivot($pivot, true)); + + $data[$pivot[$this->localKey]][] = $set; + } + + return $data; + } + + /** + * BELONGS TO MANY 关联查询 + * @access protected + * @param string $foreignKey 关联模型关联键 + * @param string $localKey 当前模型关联键 + * @param array $condition 关联查询条件 + * @return Query + */ + protected function belongsToManyQuery($foreignKey, $localKey, $condition = []) + { + // 关联查询封装 + $tableName = $this->query->getTable(); + $table = $this->pivot->getTable(); + $fields = $this->getQueryFields($tableName); + + $query = $this->query + ->field($fields) + ->field(true, false, $table, 'pivot', 'pivot__'); + + if (empty($this->baseQuery)) { + $relationFk = $this->query->getPk(); + $query->join([$table => 'pivot'], 'pivot.' . $foreignKey . '=' . $tableName . '.' . $relationFk) + ->where($condition); + } + + return $query; + } + + /** + * 保存(新增)当前关联数据对象 + * @access public + * @param mixed $data 数据 可以使用数组 关联模型对象 和 关联对象的主键 + * @param array $pivot 中间表额外数据 + * @return array|Pivot + */ + public function save($data, array $pivot = []) + { + // 保存关联表/中间表数据 + return $this->attach($data, $pivot); + } + + /** + * 批量保存当前关联数据对象 + * @access public + * @param array $dataSet 数据集 + * @param array $pivot 中间表额外数据 + * @param bool $samePivot 额外数据是否相同 + * @return array|false + */ + public function saveAll(array $dataSet, array $pivot = [], $samePivot = false) + { + $result = []; + + foreach ($dataSet as $key => $data) { + if (!$samePivot) { + $pivotData = isset($pivot[$key]) ? $pivot[$key] : []; + } else { + $pivotData = $pivot; + } + + $result[] = $this->attach($data, $pivotData); + } + + return empty($result) ? false : $result; + } + + /** + * 附加关联的一个中间表数据 + * @access public + * @param mixed $data 数据 可以使用数组、关联模型对象 或者 关联对象的主键 + * @param array $pivot 中间表额外数据 + * @return array|Pivot + * @throws Exception + */ + public function attach($data, $pivot = []) + { + if (is_array($data)) { + if (key($data) === 0) { + $id = $data; + } else { + // 保存关联表数据 + $model = new $this->model; + $id = $model->insertGetId($data); + } + } elseif (is_numeric($data) || is_string($data)) { + // 根据关联表主键直接写入中间表 + $id = $data; + } elseif ($data instanceof Model) { + // 根据关联表主键直接写入中间表 + $relationFk = $data->getPk(); + $id = $data->$relationFk; + } + + if ($id) { + // 保存中间表数据 + $pk = $this->parent->getPk(); + $pivot[$this->localKey] = $this->parent->$pk; + $ids = (array) $id; + + foreach ($ids as $id) { + $pivot[$this->foreignKey] = $id; + $this->pivot->replace() + ->exists(false) + ->data([]) + ->save($pivot); + $result[] = $this->newPivot($pivot, true); + } + + if (count($result) == 1) { + // 返回中间表模型对象 + $result = $result[0]; + } + + return $result; + } else { + throw new Exception('miss relation data'); + } + } + + /** + * 判断是否存在关联数据 + * @access public + * @param mixed $data 数据 可以使用关联模型对象 或者 关联对象的主键 + * @return Pivot + * @throws Exception + */ + public function attached($data) + { + if ($data instanceof Model) { + $id = $data->getKey(); + } else { + $id = $data; + } + + $pivot = $this->pivot + ->where($this->localKey, $this->parent->getKey()) + ->where($this->foreignKey, $id) + ->find(); + + return $pivot ?: false; + } + + /** + * 解除关联的一个中间表数据 + * @access public + * @param integer|array $data 数据 可以使用关联对象的主键 + * @param bool $relationDel 是否同时删除关联表数据 + * @return integer + */ + public function detach($data = null, $relationDel = false) + { + if (is_array($data)) { + $id = $data; + } elseif (is_numeric($data) || is_string($data)) { + // 根据关联表主键直接写入中间表 + $id = $data; + } elseif ($data instanceof Model) { + // 根据关联表主键直接写入中间表 + $relationFk = $data->getPk(); + $id = $data->$relationFk; + } + + // 删除中间表数据 + $pk = $this->parent->getPk(); + $pivot[] = [$this->localKey, '=', $this->parent->$pk]; + + if (isset($id)) { + $pivot[] = [$this->foreignKey, is_array($id) ? 'in' : '=', $id]; + } + + $result = $this->pivot->where($pivot)->delete(); + + // 删除关联表数据 + if (isset($id) && $relationDel) { + $model = $this->model; + $model::destroy($id); + } + + return $result; + } + + /** + * 数据同步 + * @access public + * @param array $ids + * @param bool $detaching + * @return array + */ + public function sync($ids, $detaching = true) + { + $changes = [ + 'attached' => [], + 'detached' => [], + 'updated' => [], + ]; + + $pk = $this->parent->getPk(); + + $current = $this->pivot + ->where($this->localKey, $this->parent->$pk) + ->column($this->foreignKey); + + $records = []; + + foreach ($ids as $key => $value) { + if (!is_array($value)) { + $records[$value] = []; + } else { + $records[$key] = $value; + } + } + + $detach = array_diff($current, array_keys($records)); + + if ($detaching && count($detach) > 0) { + $this->detach($detach); + $changes['detached'] = $detach; + } + + foreach ($records as $id => $attributes) { + if (!in_array($id, $current)) { + $this->attach($id, $attributes); + $changes['attached'][] = $id; + } elseif (count($attributes) > 0 && $this->attach($id, $attributes)) { + $changes['updated'][] = $id; + } + } + + return $changes; + } + + /** + * 执行基础查询(仅执行一次) + * @access protected + * @return void + */ + protected function baseQuery() + { + if (empty($this->baseQuery) && $this->parent->getData()) { + $pk = $this->parent->getPk(); + $table = $this->pivot->getTable(); + + $this->query + ->join([$table => 'pivot'], 'pivot.' . $this->foreignKey . '=' . $this->query->getTable() . '.' . $this->query->getPk()) + ->where('pivot.' . $this->localKey, $this->parent->$pk); + $this->baseQuery = true; + } + } + +} diff --git a/thinkphp/library/think/model/relation/HasMany.php b/thinkphp/library/think/model/relation/HasMany.php new file mode 100755 index 0000000..728ca18 --- /dev/null +++ b/thinkphp/library/think/model/relation/HasMany.php @@ -0,0 +1,359 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\relation; + +use think\db\Query; +use think\Loader; +use think\Model; +use think\model\Relation; + +class HasMany extends Relation +{ + /** + * 架构函数 + * @access public + * @param Model $parent 上级模型对象 + * @param string $model 模型名 + * @param string $foreignKey 关联外键 + * @param string $localKey 当前模型主键 + */ + public function __construct(Model $parent, $model, $foreignKey, $localKey) + { + $this->parent = $parent; + $this->model = $model; + $this->foreignKey = $foreignKey; + $this->localKey = $localKey; + $this->query = (new $model)->db(); + + if (get_class($parent) == $model) { + $this->selfRelation = true; + } + } + + /** + * 延迟获取关联数据 + * @access public + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包查询条件 + * @return \think\Collection + */ + public function getRelation($subRelation = '', $closure = null) + { + if ($closure) { + $closure($this->query); + } + + $list = $this->query + ->where($this->foreignKey, $this->parent->{$this->localKey}) + ->relation($subRelation) + ->select(); + + $parent = clone $this->parent; + + foreach ($list as &$model) { + $model->setParent($parent); + } + + return $list; + } + + /** + * 预载入关联查询 + * @access public + * @param array $resultSet 数据集 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure) + { + $localKey = $this->localKey; + $range = []; + + foreach ($resultSet as $result) { + // 获取关联外键列表 + if (isset($result->$localKey)) { + $range[] = $result->$localKey; + } + } + + if (!empty($range)) { + $where = [ + [$this->foreignKey, 'in', $range], + ]; + $data = $this->eagerlyOneToMany($where, $relation, $subRelation, $closure); + + // 关联属性名 + $attr = Loader::parseName($relation); + + // 关联数据封装 + foreach ($resultSet as $result) { + $pk = $result->$localKey; + if (!isset($data[$pk])) { + $data[$pk] = []; + } + + foreach ($data[$pk] as &$relationModel) { + $relationModel->setParent(clone $result); + } + + $result->setRelation($attr, $this->resultSetBuild($data[$pk])); + } + } + } + + /** + * 预载入关联查询 + * @access public + * @param Model $result 数据对象 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + public function eagerlyResult(&$result, $relation, $subRelation, $closure) + { + $localKey = $this->localKey; + + if (isset($result->$localKey)) { + $pk = $result->$localKey; + $where = [ + [$this->foreignKey, '=', $pk], + ]; + $data = $this->eagerlyOneToMany($where, $relation, $subRelation, $closure); + + // 关联数据封装 + if (!isset($data[$pk])) { + $data[$pk] = []; + } + + foreach ($data[$pk] as &$relationModel) { + $relationModel->setParent(clone $result); + } + + $result->setRelation(Loader::parseName($relation), $this->resultSetBuild($data[$pk])); + } + } + + /** + * 关联统计 + * @access public + * @param Model $result 数据对象 + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $name 统计字段别名 + * @return integer + */ + public function relationCount($result, $closure, $aggregate = 'count', $field = '*', &$name = '') + { + $localKey = $this->localKey; + + if (!isset($result->$localKey)) { + return 0; + } + + if ($closure) { + $return = $closure($this->query); + if ($return && is_string($return)) { + $name = $return; + } + } + + return $this->query + ->where($this->foreignKey, '=', $result->$localKey) + ->$aggregate($field); + } + + /** + * 创建关联统计子查询 + * @access public + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $aggregateAlias 聚合字段别名 + * @return string + */ + public function getRelationCountQuery($closure, $aggregate = 'count', $field = '*', &$aggregateAlias = '') + { + if ($closure) { + $return = $closure($this->query); + + if ($return && is_string($return)) { + $aggregateAlias = $return; + } + } + + return $this->query->alias($aggregate . '_table') + ->whereExp($aggregate . '_table.' . $this->foreignKey, '=' . $this->parent->getTable() . '.' . $this->localKey) + ->fetchSql() + ->$aggregate($field); + } + + /** + * 一对多 关联模型预查询 + * @access public + * @param array $where 关联预查询条件 + * @param string $relation 关联名 + * @param string $subRelation 子关联 + * @param \Closure $closure + * @return array + */ + protected function eagerlyOneToMany($where, $relation, $subRelation = '', $closure = null) + { + $foreignKey = $this->foreignKey; + + $this->query->removeWhereField($this->foreignKey); + + // 预载入关联查询 支持嵌套预载入 + if ($closure) { + $closure($this->query); + } + + $list = $this->query->where($where)->with($subRelation)->select(); + + // 组装模型数据 + $data = []; + + foreach ($list as $set) { + $data[$set->$foreignKey][] = $set; + } + + return $data; + } + + /** + * 保存(新增)当前关联数据对象 + * @access public + * @param mixed $data 数据 可以使用数组 关联模型对象 和 关联对象的主键 + * @param boolean $replace 是否自动识别更新和写入 + * @return Model|false + */ + public function save($data, $replace = true) + { + $model = $this->make(); + + return $model->replace($replace)->save($data) ? $model : false; + } + + /** + * 创建关联对象实例 + * @param array $data + * @return Model + */ + public function make($data = []) + { + if ($data instanceof Model) { + $data = $data->getData(); + } + + // 保存关联表数据 + $data[$this->foreignKey] = $this->parent->{$this->localKey}; + + return new $this->model($data); + } + + /** + * 批量保存当前关联数据对象 + * @access public + * @param array|\think\Collection $dataSet 数据集 + * @param boolean $replace 是否自动识别更新和写入 + * @return array|false + */ + public function saveAll($dataSet, $replace = true) + { + $result = []; + + foreach ($dataSet as $key => $data) { + $result[] = $this->save($data, $replace); + } + + return empty($result) ? false : $result; + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $operator 比较操作符 + * @param integer $count 个数 + * @param string $id 关联表的统计字段 + * @param string $joinType JOIN类型 + * @return Query + */ + public function has($operator = '>=', $count = 1, $id = '*', $joinType = 'INNER') + { + $table = $this->query->getTable(); + $model = basename(str_replace('\\', '/', get_class($this->parent))); + $relation = basename(str_replace('\\', '/', $this->model)); + $softDelete = $this->query->getOptions('soft_delete'); + + return $this->parent->db() + ->alias($model) + ->field($model . '.*') + ->join([$table => $relation], $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey, $joinType) + ->when($softDelete, function ($query) use ($softDelete, $relation) { + $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); + }) + ->group($relation . '.' . $this->foreignKey) + ->having('count(' . $id . ')' . $operator . $count); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param mixed $where 查询条件(数组或者闭包) + * @param mixed $fields 字段 + * @return Query + */ + public function hasWhere($where = [], $fields = null) + { + $table = $this->query->getTable(); + $model = basename(str_replace('\\', '/', get_class($this->parent))); + $relation = basename(str_replace('\\', '/', $this->model)); + + if (is_array($where)) { + $this->getQueryWhere($where, $relation); + } + + $fields = $this->getRelationQueryFields($fields, $model); + $softDelete = $this->query->getOptions('soft_delete'); + + return $this->parent->db() + ->alias($model) + ->group($model . '.' . $this->localKey) + ->field($fields) + ->join([$table => $relation], $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey) + ->when($softDelete, function ($query) use ($softDelete, $relation) { + $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); + }) + ->where($where); + } + + /** + * 执行基础查询(仅执行一次) + * @access protected + * @return void + */ + protected function baseQuery() + { + if (empty($this->baseQuery)) { + if (isset($this->parent->{$this->localKey})) { + // 关联查询带入关联条件 + $this->query->where($this->foreignKey, '=', $this->parent->{$this->localKey}); + } + + $this->baseQuery = true; + } + } + +} diff --git a/thinkphp/library/think/model/relation/HasManyThrough.php b/thinkphp/library/think/model/relation/HasManyThrough.php new file mode 100755 index 0000000..c048eb9 --- /dev/null +++ b/thinkphp/library/think/model/relation/HasManyThrough.php @@ -0,0 +1,362 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\relation; + +use think\db\Query; +use think\Loader; +use think\Model; +use think\model\Relation; + +class HasManyThrough extends Relation +{ + // 中间关联表外键 + protected $throughKey; + // 中间表模型 + protected $through; + + /** + * 中间主键 + * @var string + */ + protected $throughPk; + + /** + * 架构函数 + * @access public + * @param Model $parent 上级模型对象 + * @param string $model 模型名 + * @param string $through 中间模型名 + * @param string $foreignKey 关联外键 + * @param string $throughKey 关联外键 + * @param string $localKey 当前主键 + */ + public function __construct(Model $parent, $model, $through, $foreignKey, $throughKey, $localKey) + { + $this->parent = $parent; + $this->model = $model; + $this->through = (new $through)->db(); + $this->foreignKey = $foreignKey; + $this->throughKey = $throughKey; + $this->throughPk = $this->through->getPk(); + $this->localKey = $localKey; + $this->query = (new $model)->db(); + } + + /** + * 延迟获取关联数据 + * @access public + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包查询条件 + * @return \think\Collection + */ + public function getRelation($subRelation = '', $closure = null) + { + if ($closure) { + $closure($this->query); + } + + $this->baseQuery(); + + return $this->query->relation($subRelation)->select(); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $operator 比较操作符 + * @param integer $count 个数 + * @param string $id 关联表的统计字段 + * @param string $joinType JOIN类型 + * @return Query + */ + public function has($operator = '>=', $count = 1, $id = '*', $joinType = 'INNER') + { + $model = App::parseName(App::classBaseName($this->parent)); + $throughTable = $this->through->getTable(); + $pk = $this->throughPk; + $throughKey = $this->throughKey; + $relation = (new $this->model)->db(); + $relationTable = $relation->getTable(); + $softDelete = $this->query->getOptions('soft_delete'); + + if ('*' != $id) { + $id = $relationTable . '.' . $relation->getPk(); + } + + return $this->parent->db() + ->alias($model) + ->field($model . '.*') + ->join($throughTable, $throughTable . '.' . $this->foreignKey . '=' . $model . '.' . $this->localKey) + ->join($relationTable, $relationTable . '.' . $throughKey . '=' . $throughTable . '.' . $this->throughPk) + ->when($softDelete, function ($query) use ($softDelete, $relationTable) { + $query->where($relationTable . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); + }) + ->group($relationTable . '.' . $this->throughKey) + ->having('count(' . $id . ')' . $operator . $count); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param mixed $where 查询条件(数组或者闭包) + * @param mixed $fields 字段 + * @return Query + */ + public function hasWhere($where = [], $fields = null) + { + $model = App::parseName(App::classBaseName($this->parent)); + $throughTable = $this->through->getTable(); + $pk = $this->throughPk; + $throughKey = $this->throughKey; + $modelTable = (new $this->model)->db()->getTable(); + + if (is_array($where)) { + $this->getQueryWhere($where, $modelTable); + } + + $fields = $this->getRelationQueryFields($fields, $model); + $softDelete = $this->query->getOptions('soft_delete'); + + return $this->parent->db() + ->alias($model) + ->join($throughTable, $throughTable . '.' . $this->foreignKey . '=' . $model . '.' . $this->localKey) + ->join($modelTable, $modelTable . '.' . $throughKey . '=' . $throughTable . '.' . $this->throughPk) + ->when($softDelete, function ($query) use ($softDelete, $modelTable) { + $query->where($modelTable . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); + }) + ->group($modelTable . '.' . $this->throughKey) + ->where($where) + ->field($fields); + } + + /** + * 预载入关联查询(数据集) + * @access protected + * @param array $resultSet 数据集 + * @param string $relation 当前关联名 + * @param array $subRelation 子关联名 + * @param Closure $closure 闭包 + * @return void + */ + public function eagerlyResultSet(array &$resultSet, $relation, array $subRelation = [], $closure = null) + { + $localKey = $this->localKey; + $foreignKey = $this->foreignKey; + + $range = []; + foreach ($resultSet as $result) { + // 获取关联外键列表 + if (isset($result->$localKey)) { + $range[] = $result->$localKey; + } + } + + if (!empty($range)) { + $this->query->removeWhereField($foreignKey); + + $data = $this->eagerlyWhere([ + [$this->foreignKey, 'in', $range], + ], $foreignKey, $relation, $subRelation, $closure); + + // 关联属性名 + $attr = App::parseName($relation); + + // 关联数据封装 + foreach ($resultSet as $result) { + $pk = $result->$localKey; + if (!isset($data[$pk])) { + $data[$pk] = []; + } + + foreach ($data[$pk] as &$relationModel) { + $relationModel->setParent(clone $result); + } + + // 设置关联属性 + $result->setRelation($attr, $this->resultSetBuild($data[$pk])); + } + } + } + + /** + * 预载入关联查询(数据) + * @access protected + * @param Model $result 数据对象 + * @param string $relation 当前关联名 + * @param array $subRelation 子关联名 + * @param Closure $closure 闭包 + * @return void + */ + public function eagerlyResult($result, $relation, array $subRelation = [], $closure = null) + { + $localKey = $this->localKey; + $foreignKey = $this->foreignKey; + $pk = $result->$localKey; + + $this->query->removeWhereField($foreignKey); + + $data = $this->eagerlyWhere([ + [$foreignKey, '=', $pk], + ], $foreignKey, $relation, $subRelation, $closure); + + // 关联数据封装 + if (!isset($data[$pk])) { + $data[$pk] = []; + } + + foreach ($data[$pk] as &$relationModel) { + $relationModel->setParent(clone $result); + } + + $result->setRelation(App::parseName($relation), $this->resultSetBuild($data[$pk])); + } + + /** + * 关联模型预查询 + * @access public + * @param array $where 关联预查询条件 + * @param string $key 关联键名 + * @param string $relation 关联名 + * @param array $subRelation 子关联 + * @param Closure $closure + * @return array + */ + protected function eagerlyWhere(array $where, $key, $relation, array $subRelation = [], $closure = null) + { + // 预载入关联查询 支持嵌套预载入 + $throughList = $this->through->where($where)->select(); + $keys = $throughList->column($this->throughPk, $this->throughPk); + + if ($closure) { + $closure($this->query); + } + + $list = $this->query->where($this->throughKey, 'in', $keys)->select(); + + // 组装模型数据 + $data = []; + $keys = $throughList->column($this->foreignKey, $this->throughPk); + + foreach ($list as $set) { + $data[$keys[$set->{$this->throughKey}]][] = $set; + } + + return $data; + } + + /** + * 关联统计 + * @access public + * @param Model $result 数据对象 + * @param Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $name 统计字段别名 + * @return integer + */ + public function relationCount($result, $closure, $aggregate = 'count', $field = '*', &$name = null) + { + $localKey = $this->localKey; + + if (!isset($result->$localKey)) { + return 0; + } + + if ($closure) { + $return = $closure($this->query); + if ($return && is_string($return)) { + $name = $return; + } + } + + $alias = App::parseName(App::classBaseName($this->model)); + $throughTable = $this->through->getTable(); + $pk = $this->throughPk; + $throughKey = $this->throughKey; + $modelTable = $this->parent->getTable(); + + if (false === strpos($field, '.')) { + $field = $alias . '.' . $field; + } + + return $this->query + ->alias($alias) + ->join($throughTable, $throughTable . '.' . $pk . '=' . $alias . '.' . $throughKey) + ->join($modelTable, $modelTable . '.' . $this->localKey . '=' . $throughTable . '.' . $this->foreignKey) + ->where($throughTable . '.' . $this->foreignKey, $result->$localKey) + ->$aggregate($field); + } + + /** + * 创建关联统计子查询 + * @access public + * @param Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $name 统计字段别名 + * @return string + */ + public function getRelationCountQuery($closure = null, $aggregate = 'count', $field = '*', &$name = null) + { + if ($closure) { + $return = $closure($this->query); + if ($return && is_string($return)) { + $name = $return; + } + } + + $alias = App::parseName(App::classBaseName($this->model)); + $throughTable = $this->through->getTable(); + $pk = $this->throughPk; + $throughKey = $this->throughKey; + $modelTable = $this->parent->getTable(); + + if (false === strpos($field, '.')) { + $field = $alias . '.' . $field; + } + + return $this->query + ->alias($alias) + ->join($throughTable, $throughTable . '.' . $pk . '=' . $alias . '.' . $throughKey) + ->join($modelTable, $modelTable . '.' . $this->localKey . '=' . $throughTable . '.' . $this->foreignKey) + ->whereExp($throughTable . '.' . $this->foreignKey, '=' . $this->parent->getTable() . '.' . $this->localKey) + ->fetchSql() + ->$aggregate($field); + } + + /** + * 执行基础查询(仅执行一次) + * @access protected + * @return void + */ + protected function baseQuery() + { + if (empty($this->baseQuery) && $this->parent->getData()) { + $alias = Loader::parseName(basename(str_replace('\\', '/', $this->model))); + $throughTable = $this->through->getTable(); + $pk = $this->throughPk; + $throughKey = $this->throughKey; + $modelTable = $this->parent->getTable(); + $fields = $this->getQueryFields($alias); + + $this->query + ->field($fields) + ->alias($alias) + ->join($throughTable, $throughTable . '.' . $pk . '=' . $alias . '.' . $throughKey) + ->join($modelTable, $modelTable . '.' . $this->localKey . '=' . $throughTable . '.' . $this->foreignKey) + ->where($throughTable . '.' . $this->foreignKey, $this->parent->{$this->localKey}); + + $this->baseQuery = true; + } + } + +} diff --git a/thinkphp/library/think/model/relation/HasOne.php b/thinkphp/library/think/model/relation/HasOne.php new file mode 100755 index 0000000..7d582a1 --- /dev/null +++ b/thinkphp/library/think/model/relation/HasOne.php @@ -0,0 +1,293 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\relation; + +use think\db\Query; +use think\Loader; +use think\Model; + +class HasOne extends OneToOne +{ + /** + * 架构函数 + * @access public + * @param Model $parent 上级模型对象 + * @param string $model 模型名 + * @param string $foreignKey 关联外键 + * @param string $localKey 当前模型主键 + */ + public function __construct(Model $parent, $model, $foreignKey, $localKey) + { + $this->parent = $parent; + $this->model = $model; + $this->foreignKey = $foreignKey; + $this->localKey = $localKey; + $this->joinType = 'INNER'; + $this->query = (new $model)->db(); + + if (get_class($parent) == $model) { + $this->selfRelation = true; + } + } + + /** + * 延迟获取关联数据 + * @access public + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包查询条件 + * @return Model + */ + public function getRelation($subRelation = '', $closure = null) + { + $localKey = $this->localKey; + + if ($closure) { + $closure($this->query); + } + + // 判断关联类型执行查询 + $relationModel = $this->query + ->removeWhereField($this->foreignKey) + ->where($this->foreignKey, $this->parent->$localKey) + ->relation($subRelation) + ->find(); + + if ($relationModel) { + $relationModel->setParent(clone $this->parent); + } + + return $relationModel; + } + + /** + * 创建关联统计子查询 + * @access public + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $aggregateAlias 聚合字段别名 + * @return string + */ + public function getRelationCountQuery($closure, $aggregate = 'count', $field = '*', &$aggregateAlias = '') + { + if ($closure) { + $return = $closure($this->query); + + if ($return && is_string($return)) { + $aggregateAlias = $return; + } + } + + return $this->query + ->whereExp($this->foreignKey, '=' . $this->parent->getTable() . '.' . $this->localKey) + ->fetchSql() + ->$aggregate($field); + } + + /** + * 关联统计 + * @access public + * @param Model $result 数据对象 + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $name 统计字段别名 + * @return integer + */ + public function relationCount($result, $closure, $aggregate = 'count', $field = '*', &$name = '') + { + $localKey = $this->localKey; + + if (!isset($result->$localKey)) { + return 0; + } + + if ($closure) { + $return = $closure($this->query); + if ($return && is_string($return)) { + $name = $return; + } + } + + return $this->query + ->where($this->foreignKey, '=', $result->$localKey) + ->$aggregate($field); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $operator 比较操作符 + * @param integer $count 个数 + * @param string $id 关联表的统计字段 + * @param string $joinType JOIN类型 + * @return Query + */ + public function has($operator = '>=', $count = 1, $id = '*', $joinType = 'INNER') + { + $table = $this->query->getTable(); + $model = basename(str_replace('\\', '/', get_class($this->parent))); + $relation = basename(str_replace('\\', '/', $this->model)); + $localKey = $this->localKey; + $foreignKey = $this->foreignKey; + $softDelete = $this->query->getOptions('soft_delete'); + + return $this->parent->db() + ->alias($model) + ->whereExists(function ($query) use ($table, $model, $relation, $localKey, $foreignKey) { + $query->table([$table => $relation]) + ->field($relation . '.' . $foreignKey) + ->whereExp($model . '.' . $localKey, '=' . $relation . '.' . $foreignKey) + ->when($softDelete, function ($query) use ($softDelete, $relation) { + $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); + }); + }); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param mixed $where 查询条件(数组或者闭包) + * @param mixed $fields 字段 + * @return Query + */ + public function hasWhere($where = [], $fields = null) + { + $table = $this->query->getTable(); + $model = basename(str_replace('\\', '/', get_class($this->parent))); + $relation = basename(str_replace('\\', '/', $this->model)); + + if (is_array($where)) { + $this->getQueryWhere($where, $relation); + } + + $fields = $this->getRelationQueryFields($fields, $model); + $softDelete = $this->query->getOptions('soft_delete'); + + return $this->parent->db() + ->alias($model) + ->field($fields) + ->join([$table => $relation], $model . '.' . $this->localKey . '=' . $relation . '.' . $this->foreignKey, $this->joinType) + ->when($softDelete, function ($query) use ($softDelete, $relation) { + $query->where($relation . strstr($softDelete[0], '.'), '=' == $softDelete[1][0] ? $softDelete[1][1] : null); + }) + ->where($where); + } + + /** + * 预载入关联查询(数据集) + * @access protected + * @param array $resultSet 数据集 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + protected function eagerlySet(&$resultSet, $relation, $subRelation, $closure) + { + $localKey = $this->localKey; + $foreignKey = $this->foreignKey; + + $range = []; + foreach ($resultSet as $result) { + // 获取关联外键列表 + if (isset($result->$localKey)) { + $range[] = $result->$localKey; + } + } + + if (!empty($range)) { + $this->query->removeWhereField($foreignKey); + + $data = $this->eagerlyWhere([ + [$foreignKey, 'in', $range], + ], $foreignKey, $relation, $subRelation, $closure); + + // 关联属性名 + $attr = Loader::parseName($relation); + + // 关联数据封装 + foreach ($resultSet as $result) { + // 关联模型 + if (!isset($data[$result->$localKey])) { + $relationModel = null; + } else { + $relationModel = $data[$result->$localKey]; + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } + + if (!empty($this->bindAttr)) { + // 绑定关联属性 + $this->bindAttr($relationModel, $result, $this->bindAttr); + } else { + // 设置关联属性 + $result->setRelation($attr, $relationModel); + } + } + } + } + + /** + * 预载入关联查询(数据) + * @access protected + * @param Model $result 数据对象 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + protected function eagerlyOne(&$result, $relation, $subRelation, $closure) + { + $localKey = $this->localKey; + $foreignKey = $this->foreignKey; + + $this->query->removeWhereField($foreignKey); + + $data = $this->eagerlyWhere([ + [$foreignKey, '=', $result->$localKey], + ], $foreignKey, $relation, $subRelation, $closure); + + // 关联模型 + if (!isset($data[$result->$localKey])) { + $relationModel = null; + } else { + $relationModel = $data[$result->$localKey]; + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } + + if (!empty($this->bindAttr)) { + // 绑定关联属性 + $this->bindAttr($relationModel, $result, $this->bindAttr); + } else { + $result->setRelation(Loader::parseName($relation), $relationModel); + } + } + + /** + * 执行基础查询(仅执行一次) + * @access protected + * @return void + */ + protected function baseQuery() + { + if (empty($this->baseQuery)) { + if (isset($this->parent->{$this->localKey})) { + // 关联查询带入关联条件 + $this->query->where($this->foreignKey, '=', $this->parent->{$this->localKey}); + } + + $this->baseQuery = true; + } + } +} diff --git a/thinkphp/library/think/model/relation/MorphMany.php b/thinkphp/library/think/model/relation/MorphMany.php new file mode 100755 index 0000000..a1f5488 --- /dev/null +++ b/thinkphp/library/think/model/relation/MorphMany.php @@ -0,0 +1,341 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\relation; + +use think\db\Query; +use think\Exception; +use think\Loader; +use think\Model; +use think\model\Relation; + +class MorphMany extends Relation +{ + // 多态字段 + protected $morphKey; + protected $morphType; + // 多态类型 + protected $type; + + /** + * 架构函数 + * @access public + * @param Model $parent 上级模型对象 + * @param string $model 模型名 + * @param string $morphKey 关联外键 + * @param string $morphType 多态字段名 + * @param string $type 多态类型 + */ + public function __construct(Model $parent, $model, $morphKey, $morphType, $type) + { + $this->parent = $parent; + $this->model = $model; + $this->type = $type; + $this->morphKey = $morphKey; + $this->morphType = $morphType; + $this->query = (new $model)->db(); + } + + /** + * 延迟获取关联数据 + * @access public + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包查询条件 + * @return \think\Collection + */ + public function getRelation($subRelation = '', $closure = null) + { + if ($closure) { + $closure($this->query); + } + + $this->baseQuery(); + + $list = $this->query->relation($subRelation)->select(); + $parent = clone $this->parent; + + foreach ($list as &$model) { + $model->setParent($parent); + } + + return $list; + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $operator 比较操作符 + * @param integer $count 个数 + * @param string $id 关联表的统计字段 + * @param string $joinType JOIN类型 + * @return Query + */ + public function has($operator = '>=', $count = 1, $id = '*', $joinType = 'INNER') + { + throw new Exception('relation not support: has'); + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param mixed $where 查询条件(数组或者闭包) + * @param mixed $fields 字段 + * @return Query + */ + public function hasWhere($where = [], $fields = null) + { + throw new Exception('relation not support: hasWhere'); + } + + /** + * 预载入关联查询 + * @access public + * @param array $resultSet 数据集 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure) + { + $morphType = $this->morphType; + $morphKey = $this->morphKey; + $type = $this->type; + $range = []; + + foreach ($resultSet as $result) { + $pk = $result->getPk(); + // 获取关联外键列表 + if (isset($result->$pk)) { + $range[] = $result->$pk; + } + } + + if (!empty($range)) { + $where = [ + [$morphKey, 'in', $range], + [$morphType, '=', $type], + ]; + $data = $this->eagerlyMorphToMany($where, $relation, $subRelation, $closure); + + // 关联属性名 + $attr = Loader::parseName($relation); + + // 关联数据封装 + foreach ($resultSet as $result) { + if (!isset($data[$result->$pk])) { + $data[$result->$pk] = []; + } + + foreach ($data[$result->$pk] as &$relationModel) { + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } + + $result->setRelation($attr, $this->resultSetBuild($data[$result->$pk])); + } + } + } + + /** + * 预载入关联查询 + * @access public + * @param Model $result 数据对象 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + public function eagerlyResult(&$result, $relation, $subRelation, $closure) + { + $pk = $result->getPk(); + + if (isset($result->$pk)) { + $key = $result->$pk; + $where = [ + [$this->morphKey, '=', $key], + [$this->morphType, '=', $this->type], + ]; + $data = $this->eagerlyMorphToMany($where, $relation, $subRelation, $closure); + + if (!isset($data[$key])) { + $data[$key] = []; + } + + foreach ($data[$key] as &$relationModel) { + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } + + $result->setRelation(Loader::parseName($relation), $this->resultSetBuild($data[$key])); + } + } + + /** + * 关联统计 + * @access public + * @param Model $result 数据对象 + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $name 统计字段别名 + * @return integer + */ + public function relationCount($result, $closure, $aggregate = 'count', $field = '*', &$name = '') + { + $pk = $result->getPk(); + + if (!isset($result->$pk)) { + return 0; + } + + if ($closure) { + $return = $closure($this->query); + + if ($return && is_string($return)) { + $name = $return; + } + } + + return $this->query + ->where([ + [$this->morphKey, '=', $result->$pk], + [$this->morphType, '=', $this->type], + ]) + ->$aggregate($field); + } + + /** + * 获取关联统计子查询 + * @access public + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $aggregateAlias 聚合字段别名 + * @return string + */ + public function getRelationCountQuery($closure, $aggregate = 'count', $field = '*', &$aggregateAlias = '') + { + if ($closure) { + $return = $closure($this->query); + + if ($return && is_string($return)) { + $aggregateAlias = $return; + } + } + + return $this->query + ->whereExp($this->morphKey, '=' . $this->parent->getTable() . '.' . $this->parent->getPk()) + ->where($this->morphType, '=', $this->type) + ->fetchSql() + ->$aggregate($field); + } + + /** + * 多态一对多 关联模型预查询 + * @access protected + * @param array $where 关联预查询条件 + * @param string $relation 关联名 + * @param string $subRelation 子关联 + * @param \Closure $closure 闭包 + * @return array + */ + protected function eagerlyMorphToMany($where, $relation, $subRelation = '', $closure = null) + { + // 预载入关联查询 支持嵌套预载入 + $this->query->removeOption('where'); + + if ($closure) { + $closure($this->query); + } + + $list = $this->query->where($where)->with($subRelation)->select(); + $morphKey = $this->morphKey; + + // 组装模型数据 + $data = []; + foreach ($list as $set) { + $data[$set->$morphKey][] = $set; + } + + return $data; + } + + /** + * 保存(新增)当前关联数据对象 + * @access public + * @param mixed $data 数据 + * @return Model|false + */ + public function save($data) + { + $model = $this->make(); + + return $model->save($data) ? $model : false; + } + + /** + * 创建关联对象实例 + * @param array $data + * @return Model + */ + public function make($data = []) + { + if ($data instanceof Model) { + $data = $data->getData(); + } + + // 保存关联表数据 + $pk = $this->parent->getPk(); + + $data[$this->morphKey] = $this->parent->$pk; + $data[$this->morphType] = $this->type; + + return new $this->model($data); + } + + /** + * 批量保存当前关联数据对象 + * @access public + * @param array $dataSet 数据集 + * @return array|false + */ + public function saveAll(array $dataSet) + { + $result = []; + + foreach ($dataSet as $key => $data) { + $result[] = $this->save($data); + } + + return empty($result) ? false : $result; + } + + /** + * 执行基础查询(仅执行一次) + * @access protected + * @return void + */ + protected function baseQuery() + { + if (empty($this->baseQuery) && $this->parent->getData()) { + $pk = $this->parent->getPk(); + + $this->query->where([ + [$this->morphKey, '=', $this->parent->$pk], + [$this->morphType, '=', $this->type], + ]); + + $this->baseQuery = true; + } + } + +} diff --git a/thinkphp/library/think/model/relation/MorphOne.php b/thinkphp/library/think/model/relation/MorphOne.php new file mode 100755 index 0000000..775b2df --- /dev/null +++ b/thinkphp/library/think/model/relation/MorphOne.php @@ -0,0 +1,256 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\relation; + +use think\db\Query; +use think\Exception; +use think\Loader; +use think\Model; +use think\model\Relation; + +class MorphOne extends Relation +{ + // 多态字段 + protected $morphKey; + protected $morphType; + // 多态类型 + protected $type; + + /** + * 构造函数 + * @access public + * @param Model $parent 上级模型对象 + * @param string $model 模型名 + * @param string $morphKey 关联外键 + * @param string $morphType 多态字段名 + * @param string $type 多态类型 + */ + public function __construct(Model $parent, $model, $morphKey, $morphType, $type) + { + $this->parent = $parent; + $this->model = $model; + $this->type = $type; + $this->morphKey = $morphKey; + $this->morphType = $morphType; + $this->query = (new $model)->db(); + } + + /** + * 延迟获取关联数据 + * @access public + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包查询条件 + * @return Model + */ + public function getRelation($subRelation = '', $closure = null) + { + if ($closure) { + $closure($this->query); + } + + $this->baseQuery(); + + $relationModel = $this->query->relation($subRelation)->find(); + + if ($relationModel) { + $relationModel->setParent(clone $this->parent); + } + + return $relationModel; + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $operator 比较操作符 + * @param integer $count 个数 + * @param string $id 关联表的统计字段 + * @param string $joinType JOIN类型 + * @return Query + */ + public function has($operator = '>=', $count = 1, $id = '*', $joinType = 'INNER') + { + return $this->parent; + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param mixed $where 查询条件(数组或者闭包) + * @param mixed $fields 字段 + * @return Query + */ + public function hasWhere($where = [], $fields = null) + { + throw new Exception('relation not support: hasWhere'); + } + + /** + * 预载入关联查询 + * @access public + * @param array $resultSet 数据集 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure) + { + $morphType = $this->morphType; + $morphKey = $this->morphKey; + $type = $this->type; + $range = []; + + foreach ($resultSet as $result) { + $pk = $result->getPk(); + // 获取关联外键列表 + if (isset($result->$pk)) { + $range[] = $result->$pk; + } + } + + if (!empty($range)) { + $data = $this->eagerlyMorphToOne([ + [$morphKey, 'in', $range], + [$morphType, '=', $type], + ], $relation, $subRelation, $closure); + + // 关联属性名 + $attr = Loader::parseName($relation); + + // 关联数据封装 + foreach ($resultSet as $result) { + if (!isset($data[$result->$pk])) { + $relationModel = null; + } else { + $relationModel = $data[$result->$pk]; + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } + + $result->setRelation($attr, $relationModel); + } + } + } + + /** + * 预载入关联查询 + * @access public + * @param Model $result 数据对象 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + public function eagerlyResult(&$result, $relation, $subRelation, $closure) + { + $pk = $result->getPk(); + + if (isset($result->$pk)) { + $pk = $result->$pk; + $data = $this->eagerlyMorphToOne([ + [$this->morphKey, '=', $pk], + [$this->morphType, '=', $this->type], + ], $relation, $subRelation, $closure); + + if (isset($data[$pk])) { + $relationModel = $data[$pk]; + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } else { + $relationModel = null; + } + + $result->setRelation(Loader::parseName($relation), $relationModel); + } + } + + /** + * 多态一对一 关联模型预查询 + * @access protected + * @param array $where 关联预查询条件 + * @param string $relation 关联名 + * @param string $subRelation 子关联 + * @param \Closure $closure 闭包 + * @return array + */ + protected function eagerlyMorphToOne($where, $relation, $subRelation = '', $closure = null) + { + // 预载入关联查询 支持嵌套预载入 + if ($closure) { + $closure($this->query); + } + + $list = $this->query->where($where)->with($subRelation)->select(); + $morphKey = $this->morphKey; + + // 组装模型数据 + $data = []; + + foreach ($list as $set) { + $data[$set->$morphKey] = $set; + } + + return $data; + } + + /** + * 保存(新增)当前关联数据对象 + * @access public + * @param mixed $data 数据 + * @return Model|false + */ + public function save($data) + { + $model = $this->make(); + return $model->save($data) ? $model : false; + } + + /** + * 创建关联对象实例 + * @param array $data + * @return Model + */ + public function make($data = []) + { + if ($data instanceof Model) { + $data = $data->getData(); + } + + // 保存关联表数据 + $pk = $this->parent->getPk(); + + $data[$this->morphKey] = $this->parent->$pk; + $data[$this->morphType] = $this->type; + + return new $this->model($data); + } + + /** + * 执行基础查询(进执行一次) + * @access protected + * @return void + */ + protected function baseQuery() + { + if (empty($this->baseQuery) && $this->parent->getData()) { + $pk = $this->parent->getPk(); + + $this->query->where([ + [$this->morphKey, '=', $this->parent->$pk], + [$this->morphType, '=', $this->type], + ]); + $this->baseQuery = true; + } + } + +} diff --git a/thinkphp/library/think/model/relation/MorphTo.php b/thinkphp/library/think/model/relation/MorphTo.php new file mode 100755 index 0000000..6da6a02 --- /dev/null +++ b/thinkphp/library/think/model/relation/MorphTo.php @@ -0,0 +1,307 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\relation; + +use think\Exception; +use think\Loader; +use think\Model; +use think\model\Relation; + +class MorphTo extends Relation +{ + // 多态字段 + protected $morphKey; + protected $morphType; + // 多态别名 + protected $alias; + // 关联名 + protected $relation; + + /** + * 架构函数 + * @access public + * @param Model $parent 上级模型对象 + * @param string $morphType 多态字段名 + * @param string $morphKey 外键名 + * @param array $alias 多态别名定义 + * @param string $relation 关联名 + */ + public function __construct(Model $parent, $morphType, $morphKey, $alias = [], $relation = null) + { + $this->parent = $parent; + $this->morphType = $morphType; + $this->morphKey = $morphKey; + $this->alias = $alias; + $this->relation = $relation; + } + + /** + * 获取当前的关联模型类的实例 + * @access public + * @return Model + */ + public function getModel() + { + $morphType = $this->morphType; + $model = $this->parseModel($this->parent->$morphType); + + return (new $model); + } + + /** + * 延迟获取关联数据 + * @access public + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包查询条件 + * @return Model + */ + public function getRelation($subRelation = '', $closure = null) + { + $morphKey = $this->morphKey; + $morphType = $this->morphType; + + // 多态模型 + $model = $this->parseModel($this->parent->$morphType); + + // 主键数据 + $pk = $this->parent->$morphKey; + + $relationModel = (new $model)->relation($subRelation)->find($pk); + + if ($relationModel) { + $relationModel->setParent(clone $this->parent); + } + + return $relationModel; + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param string $operator 比较操作符 + * @param integer $count 个数 + * @param string $id 关联表的统计字段 + * @param string $joinType JOIN类型 + * @return Query + */ + public function has($operator = '>=', $count = 1, $id = '*', $joinType = 'INNER') + { + return $this->parent; + } + + /** + * 根据关联条件查询当前模型 + * @access public + * @param mixed $where 查询条件(数组或者闭包) + * @param mixed $fields 字段 + * @return Query + */ + public function hasWhere($where = [], $fields = null) + { + throw new Exception('relation not support: hasWhere'); + } + + /** + * 解析模型的完整命名空间 + * @access protected + * @param string $model 模型名(或者完整类名) + * @return string + */ + protected function parseModel($model) + { + if (isset($this->alias[$model])) { + $model = $this->alias[$model]; + } + + if (false === strpos($model, '\\')) { + $path = explode('\\', get_class($this->parent)); + array_pop($path); + array_push($path, Loader::parseName($model, 1)); + $model = implode('\\', $path); + } + + return $model; + } + + /** + * 设置多态别名 + * @access public + * @param array $alias 别名定义 + * @return $this + */ + public function setAlias($alias) + { + $this->alias = $alias; + + return $this; + } + + /** + * 移除关联查询参数 + * @access public + * @return $this + */ + public function removeOption() + { + return $this; + } + + /** + * 预载入关联查询 + * @access public + * @param array $resultSet 数据集 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + * @throws Exception + */ + public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure) + { + $morphKey = $this->morphKey; + $morphType = $this->morphType; + $range = []; + + foreach ($resultSet as $result) { + // 获取关联外键列表 + if (!empty($result->$morphKey)) { + $range[$result->$morphType][] = $result->$morphKey; + } + } + + if (!empty($range)) { + // 关联属性名 + $attr = Loader::parseName($relation); + + foreach ($range as $key => $val) { + // 多态类型映射 + $model = $this->parseModel($key); + $obj = new $model; + $pk = $obj->getPk(); + $list = $obj->all($val, $subRelation); + $data = []; + + foreach ($list as $k => $vo) { + $data[$vo->$pk] = $vo; + } + + foreach ($resultSet as $result) { + if ($key == $result->$morphType) { + // 关联模型 + if (!isset($data[$result->$morphKey])) { + $relationModel = null; + } else { + $relationModel = $data[$result->$morphKey]; + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } + + $result->setRelation($attr, $relationModel); + } + } + } + } + } + + /** + * 预载入关联查询 + * @access public + * @param Model $result 数据对象 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @return void + */ + public function eagerlyResult(&$result, $relation, $subRelation, $closure) + { + $morphKey = $this->morphKey; + $morphType = $this->morphType; + // 多态类型映射 + $model = $this->parseModel($result->{$this->morphType}); + + $this->eagerlyMorphToOne($model, $relation, $result, $subRelation); + } + + /** + * 关联统计 + * @access public + * @param Model $result 数据对象 + * @param \Closure $closure 闭包 + * @param string $aggregate 聚合查询方法 + * @param string $field 字段 + * @param string $name 统计字段别名 + * @return integer + */ + public function relationCount($result, $closure, $aggregate = 'count', $field = '*', &$name = '') + {} + + /** + * 多态MorphTo 关联模型预查询 + * @access protected + * @param string $model 关联模型对象 + * @param string $relation 关联名 + * @param Model $result + * @param string $subRelation 子关联 + * @return void + */ + protected function eagerlyMorphToOne($model, $relation, &$result, $subRelation = '') + { + // 预载入关联查询 支持嵌套预载入 + $pk = $this->parent->{$this->morphKey}; + $data = (new $model)->with($subRelation)->find($pk); + + if ($data) { + $data->setParent(clone $result); + $data->isUpdate(true); + } + + $result->setRelation(Loader::parseName($relation), $data ?: null); + } + + /** + * 添加关联数据 + * @access public + * @param Model $model 关联模型对象 + * @param string $type 多态类型 + * @return Model + */ + public function associate($model, $type = '') + { + $morphKey = $this->morphKey; + $morphType = $this->morphType; + $pk = $model->getPk(); + + $this->parent->setAttr($morphKey, $model->$pk); + $this->parent->setAttr($morphType, $type ?: get_class($model)); + $this->parent->save(); + + return $this->parent->setRelation($this->relation, $model); + } + + /** + * 注销关联数据 + * @access public + * @return Model + */ + public function dissociate() + { + $morphKey = $this->morphKey; + $morphType = $this->morphType; + + $this->parent->setAttr($morphKey, null); + $this->parent->setAttr($morphType, null); + $this->parent->save(); + + return $this->parent->setRelation($this->relation, null); + } + +} diff --git a/thinkphp/library/think/model/relation/OneToOne.php b/thinkphp/library/think/model/relation/OneToOne.php new file mode 100755 index 0000000..59fce77 --- /dev/null +++ b/thinkphp/library/think/model/relation/OneToOne.php @@ -0,0 +1,334 @@ + +// +---------------------------------------------------------------------- + +namespace think\model\relation; + +use think\db\Query; +use think\Exception; +use think\Loader; +use think\Model; +use think\model\Relation; + +/** + * Class OneToOne + * @package think\model\relation + * + */ +abstract class OneToOne extends Relation +{ + // 预载入方式 0 -JOIN 1 -IN + protected $eagerlyType = 1; + // 当前关联的JOIN类型 + protected $joinType; + // 要绑定的属性 + protected $bindAttr = []; + // 关联名 + protected $relation; + + /** + * 设置join类型 + * @access public + * @param string $type JOIN类型 + * @return $this + */ + public function joinType($type) + { + $this->joinType = $type; + return $this; + } + + /** + * 预载入关联查询(JOIN方式) + * @access public + * @param Query $query 查询对象 + * @param string $relation 关联名 + * @param mixed $field 关联字段 + * @param string $joinType JOIN方式 + * @param \Closure $closure 闭包条件 + * @param bool $first + * @return void + */ + public function eagerly(Query $query, $relation, $field, $joinType, $closure, $first) + { + $name = Loader::parseName(basename(str_replace('\\', '/', get_class($this->parent)))); + + if ($first) { + $table = $query->getTable(); + $query->table([$table => $name]); + + if ($query->getOptions('field')) { + $masterField = $query->getOptions('field'); + $query->removeOption('field'); + } else { + $masterField = true; + } + + $query->field($masterField, false, $table, $name); + } + + // 预载入封装 + $joinTable = $this->query->getTable(); + $joinAlias = $relation; + $joinType = $joinType ?: $this->joinType; + + $query->via($joinAlias); + + if ($this instanceof BelongsTo) { + $joinOn = $name . '.' . $this->foreignKey . '=' . $joinAlias . '.' . $this->localKey; + } else { + $joinOn = $name . '.' . $this->localKey . '=' . $joinAlias . '.' . $this->foreignKey; + } + + if ($closure) { + // 执行闭包查询 + $closure($query); + // 使用withField指定获取关联的字段,如 + // $query->where(['id'=>1])->withField('id,name'); + if ($query->getOptions('with_field')) { + $field = $query->getOptions('with_field'); + $query->removeOption('with_field'); + } + } + + $query->join([$joinTable => $joinAlias], $joinOn, $joinType) + ->field($field, false, $joinTable, $joinAlias, $relation . '__'); + } + + /** + * 预载入关联查询(数据集) + * @access protected + * @param array $resultSet + * @param string $relation + * @param string $subRelation + * @param \Closure $closure + * @return mixed + */ + abstract protected function eagerlySet(&$resultSet, $relation, $subRelation, $closure); + + /** + * 预载入关联查询(数据) + * @access protected + * @param Model $result + * @param string $relation + * @param string $subRelation + * @param \Closure $closure + * @return mixed + */ + abstract protected function eagerlyOne(&$result, $relation, $subRelation, $closure); + + /** + * 预载入关联查询(数据集) + * @access public + * @param array $resultSet 数据集 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @param bool $join 是否为JOIN方式 + * @return void + */ + public function eagerlyResultSet(&$resultSet, $relation, $subRelation, $closure, $join = false) + { + if ($join || 0 == $this->eagerlyType) { + // 模型JOIN关联组装 + foreach ($resultSet as $result) { + $this->match($this->model, $relation, $result); + } + } else { + // IN查询 + $this->eagerlySet($resultSet, $relation, $subRelation, $closure); + } + } + + /** + * 预载入关联查询(数据) + * @access public + * @param Model $result 数据对象 + * @param string $relation 当前关联名 + * @param string $subRelation 子关联名 + * @param \Closure $closure 闭包 + * @param bool $join 是否为JOIN方式 + * @return void + */ + public function eagerlyResult(&$result, $relation, $subRelation, $closure, $join = false) + { + if (0 == $this->eagerlyType || $join) { + // 模型JOIN关联组装 + $this->match($this->model, $relation, $result); + } else { + // IN查询 + $this->eagerlyOne($result, $relation, $subRelation, $closure); + } + } + + /** + * 保存(新增)当前关联数据对象 + * @access public + * @param mixed $data 数据 可以使用数组 关联模型对象 和 关联对象的主键 + * @return Model|false + */ + public function save($data) + { + if ($data instanceof Model) { + $data = $data->getData(); + } + + $model = new $this->model; + // 保存关联表数据 + $data[$this->foreignKey] = $this->parent->{$this->localKey}; + + return $model->save($data) ? $model : false; + } + + /** + * 设置预载入方式 + * @access public + * @param integer $type 预载入方式 0 JOIN查询 1 IN查询 + * @return $this + */ + public function setEagerlyType($type) + { + $this->eagerlyType = $type; + + return $this; + } + + /** + * 获取预载入方式 + * @access public + * @return integer + */ + public function getEagerlyType() + { + return $this->eagerlyType; + } + + /** + * 绑定关联表的属性到父模型属性 + * @access public + * @param mixed $attr 要绑定的属性列表 + * @return $this + */ + public function bind($attr) + { + if (is_string($attr)) { + $attr = explode(',', $attr); + } + $this->bindAttr = $attr; + + return $this; + } + + /** + * 获取绑定属性 + * @access public + * @return array + */ + public function getBindAttr() + { + return $this->bindAttr; + } + + /** + * 一对一 关联模型预查询拼装 + * @access public + * @param string $model 模型名称 + * @param string $relation 关联名 + * @param Model $result 模型对象实例 + * @return void + */ + protected function match($model, $relation, &$result) + { + // 重新组装模型数据 + foreach ($result->getData() as $key => $val) { + if (strpos($key, '__')) { + list($name, $attr) = explode('__', $key, 2); + if ($name == $relation) { + $list[$name][$attr] = $val; + unset($result->$key); + } + } + } + + if (isset($list[$relation])) { + $array = array_unique($list[$relation]); + + if (count($array) == 1 && null === current($array)) { + $relationModel = null; + } else { + $relationModel = new $model($list[$relation]); + $relationModel->setParent(clone $result); + $relationModel->isUpdate(true); + } + + if (!empty($this->bindAttr)) { + $this->bindAttr($relationModel, $result, $this->bindAttr); + } + } else { + $relationModel = null; + } + + $result->setRelation(Loader::parseName($relation), $relationModel); + } + + /** + * 绑定关联属性到父模型 + * @access protected + * @param Model $model 关联模型对象 + * @param Model $result 父模型对象 + * @return void + * @throws Exception + */ + protected function bindAttr($model, &$result) + { + foreach ($this->bindAttr as $key => $attr) { + $key = is_numeric($key) ? $attr : $key; + if (isset($result->$key)) { + throw new Exception('bind attr has exists:' . $key); + } else { + $result->setAttr($key, $model ? $model->$attr : null); + } + } + } + + /** + * 一对一 关联模型预查询(IN方式) + * @access public + * @param array $where 关联预查询条件 + * @param string $key 关联键名 + * @param string $relation 关联名 + * @param string $subRelation 子关联 + * @param \Closure $closure + * @return array + */ + protected function eagerlyWhere($where, $key, $relation, $subRelation = '', $closure = null) + { + // 预载入关联查询 支持嵌套预载入 + if ($closure) { + $closure($this->query); + + if ($field = $this->query->getOptions('with_field')) { + $this->query->field($field)->removeOption('with_field'); + } + } + + $list = $this->query->where($where)->with($subRelation)->select(); + + // 组装模型数据 + $data = []; + + foreach ($list as $set) { + $data[$set->$key] = $set; + } + + return $data; + } + +} diff --git a/thinkphp/library/think/paginator/driver/Bootstrap.php b/thinkphp/library/think/paginator/driver/Bootstrap.php new file mode 100755 index 0000000..ab5315c --- /dev/null +++ b/thinkphp/library/think/paginator/driver/Bootstrap.php @@ -0,0 +1,206 @@ + +// +---------------------------------------------------------------------- + +namespace think\paginator\driver; + +use think\Paginator; + +class Bootstrap extends Paginator +{ + + /** + * 上一页按钮 + * @param string $text + * @return string + */ + protected function getPreviousButton($text = "«") + { + + if ($this->currentPage() <= 1) { + return $this->getDisabledTextWrapper($text); + } + + $url = $this->url( + $this->currentPage() - 1 + ); + + return $this->getPageLinkWrapper($url, $text); + } + + /** + * 下一页按钮 + * @param string $text + * @return string + */ + protected function getNextButton($text = '»') + { + if (!$this->hasMore) { + return $this->getDisabledTextWrapper($text); + } + + $url = $this->url($this->currentPage() + 1); + + return $this->getPageLinkWrapper($url, $text); + } + + /** + * 页码按钮 + * @return string + */ + protected function getLinks() + { + if ($this->simple) { + return ''; + } + + $block = [ + 'first' => null, + 'slider' => null, + 'last' => null, + ]; + + $side = 3; + $window = $side * 2; + + if ($this->lastPage < $window + 6) { + $block['first'] = $this->getUrlRange(1, $this->lastPage); + } elseif ($this->currentPage <= $window) { + $block['first'] = $this->getUrlRange(1, $window + 2); + $block['last'] = $this->getUrlRange($this->lastPage - 1, $this->lastPage); + } elseif ($this->currentPage > ($this->lastPage - $window)) { + $block['first'] = $this->getUrlRange(1, 2); + $block['last'] = $this->getUrlRange($this->lastPage - ($window + 2), $this->lastPage); + } else { + $block['first'] = $this->getUrlRange(1, 2); + $block['slider'] = $this->getUrlRange($this->currentPage - $side, $this->currentPage + $side); + $block['last'] = $this->getUrlRange($this->lastPage - 1, $this->lastPage); + } + + $html = ''; + + if (is_array($block['first'])) { + $html .= $this->getUrlLinks($block['first']); + } + + if (is_array($block['slider'])) { + $html .= $this->getDots(); + $html .= $this->getUrlLinks($block['slider']); + } + + if (is_array($block['last'])) { + $html .= $this->getDots(); + $html .= $this->getUrlLinks($block['last']); + } + + return $html; + } + + /** + * 渲染分页html + * @return mixed + */ + public function render() + { + if ($this->hasPages()) { + if ($this->simple) { + return sprintf( + '
                              %s %s
                            ', + $this->getPreviousButton(), + $this->getNextButton() + ); + } else { + return sprintf( + '
                              %s %s %s
                            ', + $this->getPreviousButton(), + $this->getLinks(), + $this->getNextButton() + ); + } + } + } + + /** + * 生成一个可点击的按钮 + * + * @param string $url + * @param int $page + * @return string + */ + protected function getAvailablePageWrapper($url, $page) + { + return '
                          • ' . $page . '
                          • '; + } + + /** + * 生成一个禁用的按钮 + * + * @param string $text + * @return string + */ + protected function getDisabledTextWrapper($text) + { + return '
                          • ' . $text . '
                          • '; + } + + /** + * 生成一个激活的按钮 + * + * @param string $text + * @return string + */ + protected function getActivePageWrapper($text) + { + return '
                          • ' . $text . '
                          • '; + } + + /** + * 生成省略号按钮 + * + * @return string + */ + protected function getDots() + { + return $this->getDisabledTextWrapper('...'); + } + + /** + * 批量生成页码按钮. + * + * @param array $urls + * @return string + */ + protected function getUrlLinks(array $urls) + { + $html = ''; + + foreach ($urls as $page => $url) { + $html .= $this->getPageLinkWrapper($url, $page); + } + + return $html; + } + + /** + * 生成普通页码按钮 + * + * @param string $url + * @param int $page + * @return string + */ + protected function getPageLinkWrapper($url, $page) + { + if ($this->currentPage() == $page) { + return $this->getActivePageWrapper($page); + } + + return $this->getAvailablePageWrapper($url, $page); + } +} diff --git a/thinkphp/library/think/process/Builder.php b/thinkphp/library/think/process/Builder.php new file mode 100755 index 0000000..da56163 --- /dev/null +++ b/thinkphp/library/think/process/Builder.php @@ -0,0 +1,233 @@ + +// +---------------------------------------------------------------------- + +namespace think\process; + +use think\Process; + +class Builder +{ + private $arguments; + private $cwd; + private $env = null; + private $input; + private $timeout = 60; + private $options = []; + private $inheritEnv = true; + private $prefix = []; + private $outputDisabled = false; + + /** + * 构造方法 + * @param string[] $arguments 参数 + */ + public function __construct(array $arguments = []) + { + $this->arguments = $arguments; + } + + /** + * 创建一个实例 + * @param string[] $arguments 参数 + * @return self + */ + public static function create(array $arguments = []) + { + return new static($arguments); + } + + /** + * 添加一个参数 + * @param string $argument 参数 + * @return self + */ + public function add($argument) + { + $this->arguments[] = $argument; + + return $this; + } + + /** + * 添加一个前缀 + * @param string|array $prefix + * @return self + */ + public function setPrefix($prefix) + { + $this->prefix = is_array($prefix) ? $prefix : [$prefix]; + + return $this; + } + + /** + * 设置参数 + * @param string[] $arguments + * @return self + */ + public function setArguments(array $arguments) + { + $this->arguments = $arguments; + + return $this; + } + + /** + * 设置工作目录 + * @param null|string $cwd + * @return self + */ + public function setWorkingDirectory($cwd) + { + $this->cwd = $cwd; + + return $this; + } + + /** + * 是否初始化环境变量 + * @param bool $inheritEnv + * @return self + */ + public function inheritEnvironmentVariables($inheritEnv = true) + { + $this->inheritEnv = $inheritEnv; + + return $this; + } + + /** + * 设置环境变量 + * @param string $name + * @param null|string $value + * @return self + */ + public function setEnv($name, $value) + { + $this->env[$name] = $value; + + return $this; + } + + /** + * 添加环境变量 + * @param array $variables + * @return self + */ + public function addEnvironmentVariables(array $variables) + { + $this->env = array_replace($this->env, $variables); + + return $this; + } + + /** + * 设置输入 + * @param mixed $input + * @return self + */ + public function setInput($input) + { + $this->input = Utils::validateInput(sprintf('%s::%s', __CLASS__, __FUNCTION__), $input); + + return $this; + } + + /** + * 设置超时时间 + * @param float|null $timeout + * @return self + */ + public function setTimeout($timeout) + { + if (null === $timeout) { + $this->timeout = null; + + return $this; + } + + $timeout = (float) $timeout; + + if ($timeout < 0) { + throw new \InvalidArgumentException('The timeout value must be a valid positive integer or float number.'); + } + + $this->timeout = $timeout; + + return $this; + } + + /** + * 设置proc_open选项 + * @param string $name + * @param string $value + * @return self + */ + public function setOption($name, $value) + { + $this->options[$name] = $value; + + return $this; + } + + /** + * 禁止输出 + * @return self + */ + public function disableOutput() + { + $this->outputDisabled = true; + + return $this; + } + + /** + * 开启输出 + * @return self + */ + public function enableOutput() + { + $this->outputDisabled = false; + + return $this; + } + + /** + * 创建一个Process实例 + * @return Process + */ + public function getProcess() + { + if (0 === count($this->prefix) && 0 === count($this->arguments)) { + throw new \LogicException('You must add() command arguments before calling getProcess().'); + } + + $options = $this->options; + + $arguments = array_merge($this->prefix, $this->arguments); + $script = implode(' ', array_map([__NAMESPACE__ . '\\Utils', 'escapeArgument'], $arguments)); + + if ($this->inheritEnv) { + // include $_ENV for BC purposes + $env = array_replace($_ENV, $_SERVER, $this->env); + } else { + $env = $this->env; + } + + $process = new Process($script, $this->cwd, $env, $this->input, $this->timeout, $options); + + if ($this->outputDisabled) { + $process->disableOutput(); + } + + return $process; + } +} diff --git a/thinkphp/library/think/process/Utils.php b/thinkphp/library/think/process/Utils.php new file mode 100755 index 0000000..f94c648 --- /dev/null +++ b/thinkphp/library/think/process/Utils.php @@ -0,0 +1,75 @@ + +// +---------------------------------------------------------------------- + +namespace think\process; + +class Utils +{ + + /** + * 转义字符串 + * @param string $argument + * @return string + */ + public static function escapeArgument($argument) + { + + if ('' === $argument) { + return escapeshellarg($argument); + } + $escapedArgument = ''; + $quote = false; + foreach (preg_split('/(")/i', $argument, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $part) { + if ('"' === $part) { + $escapedArgument .= '\\"'; + } elseif (self::isSurroundedBy($part, '%')) { + // Avoid environment variable expansion + $escapedArgument .= '^%"' . substr($part, 1, -1) . '"^%'; + } else { + // escape trailing backslash + if ('\\' === substr($part, -1)) { + $part .= '\\'; + } + $quote = true; + $escapedArgument .= $part; + } + } + if ($quote) { + $escapedArgument = '"' . $escapedArgument . '"'; + } + return $escapedArgument; + } + + /** + * 验证并进行规范化Process输入。 + * @param string $caller + * @param mixed $input + * @return string + * @throws \InvalidArgumentException + */ + public static function validateInput($caller, $input) + { + if (null !== $input) { + if (is_resource($input)) { + return $input; + } + if (is_scalar($input)) { + return (string) $input; + } + throw new \InvalidArgumentException(sprintf('%s only accepts strings or stream resources.', $caller)); + } + return $input; + } + + private static function isSurroundedBy($arg, $char) + { + return 2 < strlen($arg) && $char === $arg[0] && $char === $arg[strlen($arg) - 1]; + } + +} diff --git a/thinkphp/library/think/process/exception/Faild.php b/thinkphp/library/think/process/exception/Faild.php new file mode 100755 index 0000000..38647bc --- /dev/null +++ b/thinkphp/library/think/process/exception/Faild.php @@ -0,0 +1,42 @@ + +// +---------------------------------------------------------------------- + +namespace think\process\exception; + +use think\Process; + +class Faild extends \RuntimeException +{ + + private $process; + + public function __construct(Process $process) + { + if ($process->isSuccessful()) { + throw new \InvalidArgumentException('Expected a failed process, but the given process was successful.'); + } + + $error = sprintf('The command "%s" failed.' . "\nExit Code: %s(%s)", $process->getCommandLine(), $process->getExitCode(), $process->getExitCodeText()); + + if (!$process->isOutputDisabled()) { + $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", $process->getOutput(), $process->getErrorOutput()); + } + + parent::__construct($error); + + $this->process = $process; + } + + public function getProcess() + { + return $this->process; + } +} diff --git a/thinkphp/library/think/process/exception/Failed.php b/thinkphp/library/think/process/exception/Failed.php new file mode 100755 index 0000000..5295082 --- /dev/null +++ b/thinkphp/library/think/process/exception/Failed.php @@ -0,0 +1,42 @@ + +// +---------------------------------------------------------------------- + +namespace think\process\exception; + +use think\Process; + +class Failed extends \RuntimeException +{ + + private $process; + + public function __construct(Process $process) + { + if ($process->isSuccessful()) { + throw new \InvalidArgumentException('Expected a failed process, but the given process was successful.'); + } + + $error = sprintf('The command "%s" failed.' . "\nExit Code: %s(%s)", $process->getCommandLine(), $process->getExitCode(), $process->getExitCodeText()); + + if (!$process->isOutputDisabled()) { + $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", $process->getOutput(), $process->getErrorOutput()); + } + + parent::__construct($error); + + $this->process = $process; + } + + public function getProcess() + { + return $this->process; + } +} diff --git a/thinkphp/library/think/process/exception/Timeout.php b/thinkphp/library/think/process/exception/Timeout.php new file mode 100755 index 0000000..d5f1162 --- /dev/null +++ b/thinkphp/library/think/process/exception/Timeout.php @@ -0,0 +1,61 @@ + +// +---------------------------------------------------------------------- + +namespace think\process\exception; + +use think\Process; + +class Timeout extends \RuntimeException +{ + + const TYPE_GENERAL = 1; + const TYPE_IDLE = 2; + + private $process; + private $timeoutType; + + public function __construct(Process $process, $timeoutType) + { + $this->process = $process; + $this->timeoutType = $timeoutType; + + parent::__construct(sprintf('The process "%s" exceeded the timeout of %s seconds.', $process->getCommandLine(), $this->getExceededTimeout())); + } + + public function getProcess() + { + return $this->process; + } + + public function isGeneralTimeout() + { + return $this->timeoutType === self::TYPE_GENERAL; + } + + public function isIdleTimeout() + { + return $this->timeoutType === self::TYPE_IDLE; + } + + public function getExceededTimeout() + { + switch ($this->timeoutType) { + case self::TYPE_GENERAL: + return $this->process->getTimeout(); + + case self::TYPE_IDLE: + return $this->process->getIdleTimeout(); + + default: + throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType)); + } + } +} diff --git a/thinkphp/library/think/process/pipes/Pipes.php b/thinkphp/library/think/process/pipes/Pipes.php new file mode 100755 index 0000000..82396b8 --- /dev/null +++ b/thinkphp/library/think/process/pipes/Pipes.php @@ -0,0 +1,93 @@ + +// +---------------------------------------------------------------------- + +namespace think\process\pipes; + +abstract class Pipes +{ + + /** @var array */ + public $pipes = []; + + /** @var string */ + protected $inputBuffer = ''; + /** @var resource|null */ + protected $input; + + /** @var bool */ + private $blocked = true; + + const CHUNK_SIZE = 16384; + + /** + * 返回用于 proc_open 描述符的数组 + * @return array + */ + abstract public function getDescriptors(); + + /** + * 返回一个数组的索引由其相关的流,以防这些管道使用的临时文件的文件名。 + * @return string[] + */ + abstract public function getFiles(); + + /** + * 文件句柄和管道中读取数据。 + * @param bool $blocking 是否使用阻塞调用 + * @param bool $close 是否要关闭管道,如果他们已经到达 EOF。 + * @return string[] + */ + abstract public function readAndWrite($blocking, $close = false); + + /** + * 返回当前状态如果有打开的文件句柄或管道。 + * @return bool + */ + abstract public function areOpen(); + + /** + * {@inheritdoc} + */ + public function close() + { + foreach ($this->pipes as $pipe) { + fclose($pipe); + } + $this->pipes = []; + } + + /** + * 检查系统调用已被中断 + * @return bool + */ + protected function hasSystemCallBeenInterrupted() + { + $lastError = error_get_last(); + + return isset($lastError['message']) && false !== stripos($lastError['message'], 'interrupted system call'); + } + + protected function unblock() + { + if (!$this->blocked) { + return; + } + + foreach ($this->pipes as $pipe) { + stream_set_blocking($pipe, 0); + } + if (null !== $this->input) { + stream_set_blocking($this->input, 0); + } + + $this->blocked = false; + } +} diff --git a/thinkphp/library/think/process/pipes/Unix.php b/thinkphp/library/think/process/pipes/Unix.php new file mode 100755 index 0000000..fd99a5d --- /dev/null +++ b/thinkphp/library/think/process/pipes/Unix.php @@ -0,0 +1,196 @@ + +// +---------------------------------------------------------------------- + +namespace think\process\pipes; + +use think\Process; + +class Unix extends Pipes +{ + + /** @var bool */ + private $ttyMode; + /** @var bool */ + private $ptyMode; + /** @var bool */ + private $disableOutput; + + public function __construct($ttyMode, $ptyMode, $input, $disableOutput) + { + $this->ttyMode = (bool) $ttyMode; + $this->ptyMode = (bool) $ptyMode; + $this->disableOutput = (bool) $disableOutput; + + if (is_resource($input)) { + $this->input = $input; + } else { + $this->inputBuffer = (string) $input; + } + } + + public function __destruct() + { + $this->close(); + } + + /** + * {@inheritdoc} + */ + public function getDescriptors() + { + if ($this->disableOutput) { + $nullstream = fopen('/dev/null', 'c'); + + return [ + ['pipe', 'r'], + $nullstream, + $nullstream, + ]; + } + + if ($this->ttyMode) { + return [ + ['file', '/dev/tty', 'r'], + ['file', '/dev/tty', 'w'], + ['file', '/dev/tty', 'w'], + ]; + } + + if ($this->ptyMode && Process::isPtySupported()) { + return [ + ['pty'], + ['pty'], + ['pty'], + ]; + } + + return [ + ['pipe', 'r'], + ['pipe', 'w'], // stdout + ['pipe', 'w'], // stderr + ]; + } + + /** + * {@inheritdoc} + */ + public function getFiles() + { + return []; + } + + /** + * {@inheritdoc} + */ + public function readAndWrite($blocking, $close = false) + { + + if (1 === count($this->pipes) && [0] === array_keys($this->pipes)) { + fclose($this->pipes[0]); + unset($this->pipes[0]); + } + + if (empty($this->pipes)) { + return []; + } + + $this->unblock(); + + $read = []; + + if (null !== $this->input) { + $r = array_merge($this->pipes, ['input' => $this->input]); + } else { + $r = $this->pipes; + } + + unset($r[0]); + + $w = isset($this->pipes[0]) ? [$this->pipes[0]] : null; + $e = null; + + if (false === $n = @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { + + if (!$this->hasSystemCallBeenInterrupted()) { + $this->pipes = []; + } + + return $read; + } + + if (0 === $n) { + return $read; + } + + foreach ($r as $pipe) { + + $type = (false !== $found = array_search($pipe, $this->pipes)) ? $found : 'input'; + $data = ''; + while ('' !== $dataread = (string) fread($pipe, self::CHUNK_SIZE)) { + $data .= $dataread; + } + + if ('' !== $data) { + if ('input' === $type) { + $this->inputBuffer .= $data; + } else { + $read[$type] = $data; + } + } + + if (false === $data || (true === $close && feof($pipe) && '' === $data)) { + if ('input' === $type) { + $this->input = null; + } else { + fclose($this->pipes[$type]); + unset($this->pipes[$type]); + } + } + } + + if (null !== $w && 0 < count($w)) { + while (strlen($this->inputBuffer)) { + $written = fwrite($w[0], $this->inputBuffer, 2 << 18); // write 512k + if ($written > 0) { + $this->inputBuffer = (string) substr($this->inputBuffer, $written); + } else { + break; + } + } + } + + if ('' === $this->inputBuffer && null === $this->input && isset($this->pipes[0])) { + fclose($this->pipes[0]); + unset($this->pipes[0]); + } + + return $read; + } + + /** + * {@inheritdoc} + */ + public function areOpen() + { + return (bool) $this->pipes; + } + + /** + * 创建一个新的 UnixPipes 实例 + * @param Process $process + * @param string|resource $input + * @return self + */ + public static function create(Process $process, $input) + { + return new static($process->isTty(), $process->isPty(), $input, $process->isOutputDisabled()); + } +} diff --git a/thinkphp/library/think/process/pipes/Windows.php b/thinkphp/library/think/process/pipes/Windows.php new file mode 100755 index 0000000..1b8b0d4 --- /dev/null +++ b/thinkphp/library/think/process/pipes/Windows.php @@ -0,0 +1,228 @@ + +// +---------------------------------------------------------------------- + +namespace think\process\pipes; + +use think\Process; + +class Windows extends Pipes +{ + + /** @var array */ + private $files = []; + /** @var array */ + private $fileHandles = []; + /** @var array */ + private $readBytes = [ + Process::STDOUT => 0, + Process::STDERR => 0, + ]; + /** @var bool */ + private $disableOutput; + + public function __construct($disableOutput, $input) + { + $this->disableOutput = (bool) $disableOutput; + + if (!$this->disableOutput) { + + $this->files = [ + Process::STDOUT => tempnam(sys_get_temp_dir(), 'sf_proc_stdout'), + Process::STDERR => tempnam(sys_get_temp_dir(), 'sf_proc_stderr'), + ]; + foreach ($this->files as $offset => $file) { + $this->fileHandles[$offset] = fopen($this->files[$offset], 'rb'); + if (false === $this->fileHandles[$offset]) { + throw new \RuntimeException('A temporary file could not be opened to write the process output to, verify that your TEMP environment variable is writable'); + } + } + } + + if (is_resource($input)) { + $this->input = $input; + } else { + $this->inputBuffer = $input; + } + } + + public function __destruct() + { + $this->close(); + $this->removeFiles(); + } + + /** + * {@inheritdoc} + */ + public function getDescriptors() + { + if ($this->disableOutput) { + $nullstream = fopen('NUL', 'c'); + + return [ + ['pipe', 'r'], + $nullstream, + $nullstream, + ]; + } + + return [ + ['pipe', 'r'], + ['file', 'NUL', 'w'], + ['file', 'NUL', 'w'], + ]; + } + + /** + * {@inheritdoc} + */ + public function getFiles() + { + return $this->files; + } + + /** + * {@inheritdoc} + */ + public function readAndWrite($blocking, $close = false) + { + $this->write($blocking, $close); + + $read = []; + $fh = $this->fileHandles; + foreach ($fh as $type => $fileHandle) { + if (0 !== fseek($fileHandle, $this->readBytes[$type])) { + continue; + } + $data = ''; + $dataread = null; + while (!feof($fileHandle)) { + if (false !== $dataread = fread($fileHandle, self::CHUNK_SIZE)) { + $data .= $dataread; + } + } + if (0 < $length = strlen($data)) { + $this->readBytes[$type] += $length; + $read[$type] = $data; + } + + if (false === $dataread || (true === $close && feof($fileHandle) && '' === $data)) { + fclose($this->fileHandles[$type]); + unset($this->fileHandles[$type]); + } + } + + return $read; + } + + /** + * {@inheritdoc} + */ + public function areOpen() + { + return (bool) $this->pipes && (bool) $this->fileHandles; + } + + /** + * {@inheritdoc} + */ + public function close() + { + parent::close(); + foreach ($this->fileHandles as $handle) { + fclose($handle); + } + $this->fileHandles = []; + } + + /** + * 创建一个新的 WindowsPipes 实例。 + * @param Process $process + * @param $input + * @return self + */ + public static function create(Process $process, $input) + { + return new static($process->isOutputDisabled(), $input); + } + + /** + * 删除临时文件 + */ + private function removeFiles() + { + foreach ($this->files as $filename) { + if (file_exists($filename)) { + @unlink($filename); + } + } + $this->files = []; + } + + /** + * 写入到 stdin 输入 + * @param bool $blocking + * @param bool $close + */ + private function write($blocking, $close) + { + if (empty($this->pipes)) { + return; + } + + $this->unblock(); + + $r = null !== $this->input ? ['input' => $this->input] : null; + $w = isset($this->pipes[0]) ? [$this->pipes[0]] : null; + $e = null; + + if (false === $n = @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) { + if (!$this->hasSystemCallBeenInterrupted()) { + $this->pipes = []; + } + + return; + } + + if (0 === $n) { + return; + } + + if (null !== $r && 0 < count($r)) { + $data = ''; + while ($dataread = fread($r['input'], self::CHUNK_SIZE)) { + $data .= $dataread; + } + + $this->inputBuffer .= $data; + + if (false === $data || (true === $close && feof($r['input']) && '' === $data)) { + $this->input = null; + } + } + + if (null !== $w && 0 < count($w)) { + while (strlen($this->inputBuffer)) { + $written = fwrite($w[0], $this->inputBuffer, 2 << 18); + if ($written > 0) { + $this->inputBuffer = (string) substr($this->inputBuffer, $written); + } else { + break; + } + } + } + + if ('' === $this->inputBuffer && null === $this->input && isset($this->pipes[0])) { + fclose($this->pipes[0]); + unset($this->pipes[0]); + } + } +} diff --git a/thinkphp/library/think/response/Download.php b/thinkphp/library/think/response/Download.php new file mode 100755 index 0000000..5595f9a --- /dev/null +++ b/thinkphp/library/think/response/Download.php @@ -0,0 +1,148 @@ + +// +---------------------------------------------------------------------- + +namespace think\response; + +use think\Exception; +use think\Response; + +class Download extends Response +{ + protected $expire = 360; + protected $name; + protected $mimeType; + protected $isContent = false; + protected $openinBrowser = false; + /** + * 处理数据 + * @access protected + * @param mixed $data 要处理的数据 + * @return mixed + * @throws \Exception + */ + protected function output($data) + { + if (!$this->isContent && !is_file($data)) { + throw new Exception('file not exists:' . $data); + } + + ob_end_clean(); + + if (!empty($this->name)) { + $name = $this->name; + } else { + $name = !$this->isContent ? pathinfo($data, PATHINFO_BASENAME) : ''; + } + + if ($this->isContent) { + $mimeType = $this->mimeType; + $size = strlen($data); + } else { + $mimeType = $this->getMimeType($data); + $size = filesize($data); + } + + $this->header['Pragma'] = 'public'; + $this->header['Content-Type'] = $mimeType ?: 'application/octet-stream'; + $this->header['Cache-control'] = 'max-age=' . $this->expire; + $this->header['Content-Disposition'] = $this->openinBrowser ? 'inline' : 'attachment; filename="' . $name . '"'; + $this->header['Content-Length'] = $size; + $this->header['Content-Transfer-Encoding'] = 'binary'; + $this->header['Expires'] = gmdate("D, d M Y H:i:s", time() + $this->expire) . ' GMT'; + + $this->lastModified(gmdate('D, d M Y H:i:s', time()) . ' GMT'); + + $data = $this->isContent ? $data : file_get_contents($data); + return $data; + } + + /** + * 设置是否为内容 必须配合mimeType方法使用 + * @access public + * @param bool $content + * @return $this + */ + public function isContent($content = true) + { + $this->isContent = $content; + return $this; + } + + /** + * 设置有效期 + * @access public + * @param integer $expire 有效期 + * @return $this + */ + public function expire($expire) + { + $this->expire = $expire; + return $this; + } + + /** + * 设置文件类型 + * @access public + * @param string $filename 文件名 + * @return $this + */ + public function mimeType($mimeType) + { + $this->mimeType = $mimeType; + return $this; + } + + /** + * 获取文件类型信息 + * @access public + * @param string $filename 文件名 + * @return string + */ + protected function getMimeType($filename) + { + if (!empty($this->mimeType)) { + return $this->mimeType; + } + + $finfo = finfo_open(FILEINFO_MIME_TYPE); + + return finfo_file($finfo, $filename); + } + + /** + * 设置下载文件的显示名称 + * @access public + * @param string $filename 文件名 + * @param bool $extension 后缀自动识别 + * @return $this + */ + public function name($filename, $extension = true) + { + $this->name = $filename; + + if ($extension && false === strpos($filename, '.')) { + $this->name .= '.' . pathinfo($this->data, PATHINFO_EXTENSION); + } + + return $this; + } + + /** + * 设置是否在浏览器中显示文件 + * @access public + * @param bool $openinBrowser 是否在浏览器中显示文件 + * @return $this + */ + public function openinBrowser($openinBrowser) { + $this->openinBrowser = $openinBrowser; + return $this; + } +} diff --git a/thinkphp/library/think/response/Json.php b/thinkphp/library/think/response/Json.php new file mode 100755 index 0000000..aa5bbd6 --- /dev/null +++ b/thinkphp/library/think/response/Json.php @@ -0,0 +1,51 @@ + +// +---------------------------------------------------------------------- + +namespace think\response; + +use think\Response; + +class Json extends Response +{ + // 输出参数 + protected $options = [ + 'json_encode_param' => JSON_UNESCAPED_UNICODE, + ]; + + protected $contentType = 'application/json'; + + /** + * 处理数据 + * @access protected + * @param mixed $data 要处理的数据 + * @return mixed + * @throws \Exception + */ + protected function output($data) + { + try { + // 返回JSON数据格式到客户端 包含状态信息 + $data = json_encode($data, $this->options['json_encode_param']); + + if (false === $data) { + throw new \InvalidArgumentException(json_last_error_msg()); + } + + return $data; + } catch (\Exception $e) { + if ($e->getPrevious()) { + throw $e->getPrevious(); + } + throw $e; + } + } + +} diff --git a/thinkphp/library/think/response/Jsonp.php b/thinkphp/library/think/response/Jsonp.php new file mode 100755 index 0000000..f69e88e --- /dev/null +++ b/thinkphp/library/think/response/Jsonp.php @@ -0,0 +1,58 @@ + +// +---------------------------------------------------------------------- + +namespace think\response; + +use think\Response; + +class Jsonp extends Response +{ + // 输出参数 + protected $options = [ + 'var_jsonp_handler' => 'callback', + 'default_jsonp_handler' => 'jsonpReturn', + 'json_encode_param' => JSON_UNESCAPED_UNICODE, + ]; + + protected $contentType = 'application/javascript'; + + /** + * 处理数据 + * @access protected + * @param mixed $data 要处理的数据 + * @return mixed + * @throws \Exception + */ + protected function output($data) + { + try { + // 返回JSON数据格式到客户端 包含状态信息 [当url_common_param为false时是无法获取到$_GET的数据的,故使用Request来获取] + $var_jsonp_handler = $this->app['request']->param($this->options['var_jsonp_handler'], ""); + $handler = !empty($var_jsonp_handler) ? $var_jsonp_handler : $this->options['default_jsonp_handler']; + + $data = json_encode($data, $this->options['json_encode_param']); + + if (false === $data) { + throw new \InvalidArgumentException(json_last_error_msg()); + } + + $data = $handler . '(' . $data . ');'; + + return $data; + } catch (\Exception $e) { + if ($e->getPrevious()) { + throw $e->getPrevious(); + } + throw $e; + } + } + +} diff --git a/thinkphp/library/think/response/Jump.php b/thinkphp/library/think/response/Jump.php new file mode 100755 index 0000000..258448c --- /dev/null +++ b/thinkphp/library/think/response/Jump.php @@ -0,0 +1,32 @@ + +// +---------------------------------------------------------------------- + +namespace think\response; + +use think\Response; + +class Jump extends Response +{ + protected $contentType = 'text/html'; + + /** + * 处理数据 + * @access protected + * @param mixed $data 要处理的数据 + * @return mixed + * @throws \Exception + */ + protected function output($data) + { + $data = $this->app['view']->fetch($this->options['jump_template'], $data); + return $data; + } +} diff --git a/thinkphp/library/think/response/Redirect.php b/thinkphp/library/think/response/Redirect.php new file mode 100755 index 0000000..6b4f118 --- /dev/null +++ b/thinkphp/library/think/response/Redirect.php @@ -0,0 +1,119 @@ + +// +---------------------------------------------------------------------- + +namespace think\response; + +use think\Response; + +class Redirect extends Response +{ + + protected $options = []; + + // URL参数 + protected $params = []; + + public function __construct($data = '', $code = 302, array $header = [], array $options = []) + { + parent::__construct($data, $code, $header, $options); + + $this->cacheControl('no-cache,must-revalidate'); + } + + /** + * 处理数据 + * @access protected + * @param mixed $data 要处理的数据 + * @return mixed + */ + protected function output($data) + { + $this->header['Location'] = $this->getTargetUrl(); + + return; + } + + /** + * 重定向传值(通过Session) + * @access protected + * @param string|array $name 变量名或者数组 + * @param mixed $value 值 + * @return $this + */ + public function with($name, $value = null) + { + $session = $this->app['session']; + + if (is_array($name)) { + foreach ($name as $key => $val) { + $session->flash($key, $val); + } + } else { + $session->flash($name, $value); + } + + return $this; + } + + /** + * 获取跳转地址 + * @access public + * @return string + */ + public function getTargetUrl() + { + if (strpos($this->data, '://') || (0 === strpos($this->data, '/') && empty($this->params))) { + return $this->data; + } else { + return $this->app['url']->build($this->data, $this->params); + } + } + + public function params($params = []) + { + $this->params = $params; + + return $this; + } + + /** + * 记住当前url后跳转 + * @access public + * @param string $url 指定记住的url + * @return $this + */ + public function remember($url = null) + { + $this->app['session']->set('redirect_url', $url ?: $this->app['request']->url()); + + return $this; + } + + /** + * 跳转到上次记住的url + * @access public + * @param string $url 闪存数据不存在时的跳转地址 + * @return $this + */ + public function restore($url = null) + { + $session = $this->app['session']; + + if ($session->has('redirect_url')) { + $this->data = $session->get('redirect_url'); + $session->delete('redirect_url'); + } elseif ($url) { + $this->data = $url; + } + + return $this; + } +} diff --git a/thinkphp/library/think/response/View.php b/thinkphp/library/think/response/View.php new file mode 100755 index 0000000..3d54c73 --- /dev/null +++ b/thinkphp/library/think/response/View.php @@ -0,0 +1,119 @@ + +// +---------------------------------------------------------------------- + +namespace think\response; + +use think\Response; + +class View extends Response +{ + // 输出参数 + protected $options = []; + protected $vars = []; + protected $config = []; + protected $filter; + protected $contentType = 'text/html'; + + /** + * 是否内容渲染 + * @var bool + */ + protected $isContent = false; + + /** + * 处理数据 + * @access protected + * @param mixed $data 要处理的数据 + * @return mixed + */ + protected function output($data) + { + // 渲染模板输出 + return $this->app['view'] + ->filter($this->filter) + ->fetch($data, $this->vars, $this->config, $this->isContent); + } + + /** + * 设置是否为内容渲染 + * @access public + * @param bool $content + * @return $this + */ + public function isContent($content = true) + { + $this->isContent = $content; + return $this; + } + + /** + * 获取视图变量 + * @access public + * @param string $name 模板变量 + * @return mixed + */ + public function getVars($name = null) + { + if (is_null($name)) { + return $this->vars; + } else { + return isset($this->vars[$name]) ? $this->vars[$name] : null; + } + } + + /** + * 模板变量赋值 + * @access public + * @param mixed $name 变量名 + * @param mixed $value 变量值 + * @return $this + */ + public function assign($name, $value = '') + { + if (is_array($name)) { + $this->vars = array_merge($this->vars, $name); + } else { + $this->vars[$name] = $value; + } + + return $this; + } + + public function config($config) + { + $this->config = $config; + return $this; + } + + /** + * 视图内容过滤 + * @access public + * @param callable $filter + * @return $this + */ + public function filter($filter) + { + $this->filter = $filter; + return $this; + } + + /** + * 检查模板是否存在 + * @access private + * @param string|array $name 参数名 + * @return bool + */ + public function exists($name) + { + return $this->app['view']->exists($name); + } + +} diff --git a/thinkphp/library/think/response/Xml.php b/thinkphp/library/think/response/Xml.php new file mode 100755 index 0000000..9c1681a --- /dev/null +++ b/thinkphp/library/think/response/Xml.php @@ -0,0 +1,116 @@ + +// +---------------------------------------------------------------------- + +namespace think\response; + +use think\Collection; +use think\Model; +use think\Response; + +class Xml extends Response +{ + // 输出参数 + protected $options = [ + // 根节点名 + 'root_node' => 'think', + // 根节点属性 + 'root_attr' => '', + //数字索引的子节点名 + 'item_node' => 'item', + // 数字索引子节点key转换的属性名 + 'item_key' => 'id', + // 数据编码 + 'encoding' => 'utf-8', + ]; + + protected $contentType = 'text/xml'; + + /** + * 处理数据 + * @access protected + * @param mixed $data 要处理的数据 + * @return mixed + */ + protected function output($data) + { + if (is_string($data)) { + if (0 !== strpos($data, 'options['encoding']; + $xml = ""; + $data = $xml . $data; + } + return $data; + } + + // XML数据转换 + return $this->xmlEncode($data, $this->options['root_node'], $this->options['item_node'], $this->options['root_attr'], $this->options['item_key'], $this->options['encoding']); + } + + /** + * XML编码 + * @access protected + * @param mixed $data 数据 + * @param string $root 根节点名 + * @param string $item 数字索引的子节点名 + * @param string $attr 根节点属性 + * @param string $id 数字索引子节点key转换的属性名 + * @param string $encoding 数据编码 + * @return string + */ + protected function xmlEncode($data, $root, $item, $attr, $id, $encoding) + { + if (is_array($attr)) { + $array = []; + foreach ($attr as $key => $value) { + $array[] = "{$key}=\"{$value}\""; + } + $attr = implode(' ', $array); + } + + $attr = trim($attr); + $attr = empty($attr) ? '' : " {$attr}"; + $xml = ""; + $xml .= "<{$root}{$attr}>"; + $xml .= $this->dataToXml($data, $item, $id); + $xml .= ""; + + return $xml; + } + + /** + * 数据XML编码 + * @access protected + * @param mixed $data 数据 + * @param string $item 数字索引时的节点名称 + * @param string $id 数字索引key转换为的属性名 + * @return string + */ + protected function dataToXml($data, $item, $id) + { + $xml = $attr = ''; + + if ($data instanceof Collection || $data instanceof Model) { + $data = $data->toArray(); + } + + foreach ($data as $key => $val) { + if (is_numeric($key)) { + $id && $attr = " {$id}=\"{$key}\""; + $key = $item; + } + $xml .= "<{$key}{$attr}>"; + $xml .= (is_array($val) || is_object($val)) ? $this->dataToXml($val, $item, $id) : $val; + $xml .= ""; + } + + return $xml; + } +} diff --git a/thinkphp/library/think/route/AliasRule.php b/thinkphp/library/think/route/AliasRule.php new file mode 100755 index 0000000..393cb31 --- /dev/null +++ b/thinkphp/library/think/route/AliasRule.php @@ -0,0 +1,119 @@ + +// +---------------------------------------------------------------------- + +namespace think\route; + +use think\Route; + +class AliasRule extends Domain +{ + /** + * 架构函数 + * @access public + * @param Route $router 路由实例 + * @param RuleGroup $parent 上级对象 + * @param string $name 路由别名 + * @param string $route 路由绑定 + * @param array $option 路由参数 + */ + public function __construct(Route $router, RuleGroup $parent, $name, $route, $option = []) + { + $this->router = $router; + $this->parent = $parent; + $this->name = $name; + $this->route = $route; + $this->option = $option; + } + + /** + * 检测路由别名 + * @access public + * @param Request $request 请求对象 + * @param string $url 访问地址 + * @param bool $completeMatch 路由是否完全匹配 + * @return Dispatch|false + */ + public function check($request, $url, $completeMatch = false) + { + if ($dispatch = $this->checkCrossDomain($request)) { + // 允许跨域 + return $dispatch; + } + + // 检查参数有效性 + if (!$this->checkOption($this->option, $request)) { + return false; + } + + list($action, $bind) = array_pad(explode('|', $url, 2), 2, ''); + + if (isset($this->option['allow']) && !in_array($action, $this->option['allow'])) { + // 允许操作 + return false; + } elseif (isset($this->option['except']) && in_array($action, $this->option['except'])) { + // 排除操作 + return false; + } + + if (isset($this->option['method'][$action])) { + $this->option['method'] = $this->option['method'][$action]; + } + + // 匹配后执行的行为 + $this->afterMatchGroup($request); + + if ($this->parent) { + // 合并分组参数 + $this->mergeGroupOptions(); + } + + if (isset($this->option['ext'])) { + // 路由ext参数 优先于系统配置的URL伪静态后缀参数 + $bind = preg_replace('/\.(' . $request->ext() . ')$/i', '', $bind); + } + + $this->parseBindAppendParam($this->route); + + if (0 === strpos($this->route, '\\')) { + // 路由到类 + return $this->bindToClass($request, $bind, substr($this->route, 1)); + } elseif (0 === strpos($this->route, '@')) { + // 路由到控制器类 + return $this->bindToController($request, $bind, substr($this->route, 1)); + } else { + // 路由到模块/控制器 + return $this->bindToModule($request, $bind, $this->route); + } + } + + /** + * 设置允许的操作方法 + * @access public + * @param array $action 操作方法 + * @return $this + */ + public function allow($action = []) + { + return $this->option('allow', $action); + } + + /** + * 设置排除的操作方法 + * @access public + * @param array $action 操作方法 + * @return $this + */ + public function except($action = []) + { + return $this->option('except', $action); + } + +} diff --git a/thinkphp/library/think/route/Dispatch.php b/thinkphp/library/think/route/Dispatch.php new file mode 100755 index 0000000..7323c98 --- /dev/null +++ b/thinkphp/library/think/route/Dispatch.php @@ -0,0 +1,366 @@ + +// +---------------------------------------------------------------------- + +namespace think\route; + +use think\App; +use think\Container; +use think\exception\ValidateException; +use think\Request; +use think\Response; + +abstract class Dispatch +{ + /** + * 应用对象 + * @var App + */ + protected $app; + + /** + * 请求对象 + * @var Request + */ + protected $request; + + /** + * 路由规则 + * @var Rule + */ + protected $rule; + + /** + * 调度信息 + * @var mixed + */ + protected $dispatch; + + /** + * 调度参数 + * @var array + */ + protected $param; + + /** + * 状态码 + * @var string + */ + protected $code; + + /** + * 是否进行大小写转换 + * @var bool + */ + protected $convert; + + public function __construct(Request $request, Rule $rule, $dispatch, $param = [], $code = null) + { + $this->request = $request; + $this->rule = $rule; + $this->app = Container::get('app'); + $this->dispatch = $dispatch; + $this->param = $param; + $this->code = $code; + + if (isset($param['convert'])) { + $this->convert = $param['convert']; + } + } + + public function init() + { + // 执行路由后置操作 + if ($this->rule->doAfter()) { + // 设置请求的路由信息 + + // 设置当前请求的参数 + $this->request->setRouteVars($this->rule->getVars()); + $this->request->routeInfo([ + 'rule' => $this->rule->getRule(), + 'route' => $this->rule->getRoute(), + 'option' => $this->rule->getOption(), + 'var' => $this->rule->getVars(), + ]); + + $this->doRouteAfter(); + } + + return $this; + } + + /** + * 检查路由后置操作 + * @access protected + * @return void + */ + protected function doRouteAfter() + { + // 记录匹配的路由信息 + $option = $this->rule->getOption(); + $matches = $this->rule->getVars(); + + // 添加中间件 + if (!empty($option['middleware'])) { + $this->app['middleware']->import($option['middleware']); + } + + // 绑定模型数据 + if (!empty($option['model'])) { + $this->createBindModel($option['model'], $matches); + } + + // 指定Header数据 + if (!empty($option['header'])) { + $header = $option['header']; + $this->app['hook']->add('response_send', function ($response) use ($header) { + $response->header($header); + }); + } + + // 指定Response响应数据 + if (!empty($option['response'])) { + foreach ($option['response'] as $response) { + $this->app['hook']->add('response_send', $response); + } + } + + // 开启请求缓存 + if (isset($option['cache']) && $this->request->isGet()) { + $this->parseRequestCache($option['cache']); + } + + if (!empty($option['append'])) { + $this->request->setRouteVars($option['append']); + } + } + + /** + * 执行路由调度 + * @access public + * @return mixed + */ + public function run() + { + $option = $this->rule->getOption(); + + // 检测路由after行为 + if (!empty($option['after'])) { + $dispatch = $this->checkAfter($option['after']); + + if ($dispatch instanceof Response) { + return $dispatch; + } + } + + // 数据自动验证 + if (isset($option['validate'])) { + $this->autoValidate($option['validate']); + } + + $data = $this->exec(); + + return $this->autoResponse($data); + } + + protected function autoResponse($data) + { + if ($data instanceof Response) { + $response = $data; + } elseif (!is_null($data)) { + // 默认自动识别响应输出类型 + $isAjax = $this->request->isAjax(); + $type = $isAjax ? $this->rule->getConfig('default_ajax_return') : $this->rule->getConfig('default_return_type'); + + $response = Response::create($data, $type); + } else { + $data = ob_get_clean(); + $content = false === $data ? '' : $data; + $status = '' === $content && $this->request->isJson() ? 204 : 200; + + $response = Response::create($content, '', $status); + } + + return $response; + } + + /** + * 检查路由后置行为 + * @access protected + * @param mixed $after 后置行为 + * @return mixed + */ + protected function checkAfter($after) + { + $this->app['log']->notice('路由后置行为建议使用中间件替代!'); + + $hook = $this->app['hook']; + + $result = null; + + foreach ((array) $after as $behavior) { + $result = $hook->exec($behavior); + + if (!is_null($result)) { + break; + } + } + + // 路由规则重定向 + if ($result instanceof Response) { + return $result; + } + + return false; + } + + /** + * 验证数据 + * @access protected + * @param array $option + * @return void + * @throws ValidateException + */ + protected function autoValidate($option) + { + list($validate, $scene, $message, $batch) = $option; + + if (is_array($validate)) { + // 指定验证规则 + $v = $this->app->validate(); + $v->rule($validate); + } else { + // 调用验证器 + $v = $this->app->validate($validate); + if (!empty($scene)) { + $v->scene($scene); + } + } + + if (!empty($message)) { + $v->message($message); + } + + // 批量验证 + if ($batch) { + $v->batch(true); + } + + if (!$v->check($this->request->param())) { + throw new ValidateException($v->getError()); + } + } + + /** + * 处理路由请求缓存 + * @access protected + * @param Request $request 请求对象 + * @param string|array $cache 路由缓存 + * @return void + */ + protected function parseRequestCache($cache) + { + if (is_array($cache)) { + list($key, $expire, $tag) = array_pad($cache, 3, null); + } else { + $key = str_replace('|', '/', $this->request->url()); + $expire = $cache; + $tag = null; + } + + $cache = $this->request->cache($key, $expire, $tag); + $this->app->setResponseCache($cache); + } + + /** + * 路由绑定模型实例 + * @access protected + * @param array|\Clousre $bindModel 绑定模型 + * @param array $matches 路由变量 + * @return void + */ + protected function createBindModel($bindModel, $matches) + { + foreach ($bindModel as $key => $val) { + if ($val instanceof \Closure) { + $result = $this->app->invokeFunction($val, $matches); + } else { + $fields = explode('&', $key); + + if (is_array($val)) { + list($model, $exception) = $val; + } else { + $model = $val; + $exception = true; + } + + $where = []; + $match = true; + + foreach ($fields as $field) { + if (!isset($matches[$field])) { + $match = false; + break; + } else { + $where[] = [$field, '=', $matches[$field]]; + } + } + + if ($match) { + $query = strpos($model, '\\') ? $model::where($where) : $this->app->model($model)->where($where); + $result = $query->failException($exception)->find(); + } + } + + if (!empty($result)) { + // 注入容器 + $this->app->instance(get_class($result), $result); + } + } + } + + public function convert($convert) + { + $this->convert = $convert; + + return $this; + } + + public function getDispatch() + { + return $this->dispatch; + } + + public function getParam() + { + return $this->param; + } + + abstract public function exec(); + + public function __sleep() + { + return ['rule', 'dispatch', 'convert', 'param', 'code', 'controller', 'actionName']; + } + + public function __wakeup() + { + $this->app = Container::get('app'); + $this->request = $this->app['request']; + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['app'], $data['request'], $data['rule']); + + return $data; + } +} diff --git a/thinkphp/library/think/route/Domain.php b/thinkphp/library/think/route/Domain.php new file mode 100755 index 0000000..80950dc --- /dev/null +++ b/thinkphp/library/think/route/Domain.php @@ -0,0 +1,236 @@ + +// +---------------------------------------------------------------------- + +namespace think\route; + +use think\Container; +use think\Loader; +use think\Route; +use think\route\dispatch\Callback as CallbackDispatch; +use think\route\dispatch\Controller as ControllerDispatch; +use think\route\dispatch\Module as ModuleDispatch; + +class Domain extends RuleGroup +{ + /** + * 架构函数 + * @access public + * @param Route $router 路由对象 + * @param string $name 路由域名 + * @param mixed $rule 域名路由 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + */ + public function __construct(Route $router, $name = '', $rule = null, $option = [], $pattern = []) + { + $this->router = $router; + $this->domain = $name; + $this->option = $option; + $this->rule = $rule; + $this->pattern = $pattern; + } + + /** + * 检测域名路由 + * @access public + * @param Request $request 请求对象 + * @param string $url 访问地址 + * @param bool $completeMatch 路由是否完全匹配 + * @return Dispatch|false + */ + public function check($request, $url, $completeMatch = false) + { + // 检测别名路由 + $result = $this->checkRouteAlias($request, $url); + + if (false !== $result) { + return $result; + } + + // 检测URL绑定 + $result = $this->checkUrlBind($request, $url); + + if (!empty($this->option['append'])) { + $request->setRouteVars($this->option['append']); + unset($this->option['append']); + } + + if (false !== $result) { + return $result; + } + + // 添加域名中间件 + if (!empty($this->option['middleware'])) { + Container::get('middleware')->import($this->option['middleware']); + unset($this->option['middleware']); + } + + return parent::check($request, $url, $completeMatch); + } + + /** + * 设置路由绑定 + * @access public + * @param string $bind 绑定信息 + * @return $this + */ + public function bind($bind) + { + $this->router->bind($bind, $this->domain); + return $this; + } + + /** + * 检测路由别名 + * @access private + * @param Request $request + * @param string $url URL地址 + * @return Dispatch|false + */ + private function checkRouteAlias($request, $url) + { + $alias = strpos($url, '|') ? strstr($url, '|', true) : $url; + + $item = $this->router->getAlias($alias); + + return $item ? $item->check($request, $url) : false; + } + + /** + * 检测URL绑定 + * @access private + * @param Request $request + * @param string $url URL地址 + * @return Dispatch|false + */ + private function checkUrlBind($request, $url) + { + $bind = $this->router->getBind($this->domain); + + if (!empty($bind)) { + $this->parseBindAppendParam($bind); + + // 记录绑定信息 + Container::get('app')->log('[ BIND ] ' . var_export($bind, true)); + + // 如果有URL绑定 则进行绑定检测 + $type = substr($bind, 0, 1); + $bind = substr($bind, 1); + + $bindTo = [ + '\\' => 'bindToClass', + '@' => 'bindToController', + ':' => 'bindToNamespace', + ]; + + if (isset($bindTo[$type])) { + return $this->{$bindTo[$type]}($request, $url, $bind); + } + } + + return false; + } + + protected function parseBindAppendParam(&$bind) + { + if (false !== strpos($bind, '?')) { + list($bind, $query) = explode('?', $bind); + parse_str($query, $vars); + $this->append($vars); + } + } + + /** + * 绑定到类 + * @access protected + * @param Request $request + * @param string $url URL地址 + * @param string $class 类名(带命名空间) + * @return CallbackDispatch + */ + protected function bindToClass($request, $url, $class) + { + $array = explode('|', $url, 2); + $action = !empty($array[0]) ? $array[0] : $this->router->config('default_action'); + $param = []; + + if (!empty($array[1])) { + $this->parseUrlParams($request, $array[1], $param); + } + + return new CallbackDispatch($request, $this, [$class, $action], $param); + } + + /** + * 绑定到命名空间 + * @access protected + * @param Request $request + * @param string $url URL地址 + * @param string $namespace 命名空间 + * @return CallbackDispatch + */ + protected function bindToNamespace($request, $url, $namespace) + { + $array = explode('|', $url, 3); + $class = !empty($array[0]) ? $array[0] : $this->router->config('default_controller'); + $method = !empty($array[1]) ? $array[1] : $this->router->config('default_action'); + $param = []; + + if (!empty($array[2])) { + $this->parseUrlParams($request, $array[2], $param); + } + + return new CallbackDispatch($request, $this, [$namespace . '\\' . Loader::parseName($class, 1), $method], $param); + } + + /** + * 绑定到控制器类 + * @access protected + * @param Request $request + * @param string $url URL地址 + * @param string $controller 控制器名 (支持带模块名 index/user ) + * @return ControllerDispatch + */ + protected function bindToController($request, $url, $controller) + { + $array = explode('|', $url, 2); + $action = !empty($array[0]) ? $array[0] : $this->router->config('default_action'); + $param = []; + + if (!empty($array[1])) { + $this->parseUrlParams($request, $array[1], $param); + } + + return new ControllerDispatch($request, $this, $controller . '/' . $action, $param); + } + + /** + * 绑定到模块/控制器 + * @access protected + * @param Request $request + * @param string $url URL地址 + * @param string $controller 控制器类名(带命名空间) + * @return ModuleDispatch + */ + protected function bindToModule($request, $url, $controller) + { + $array = explode('|', $url, 2); + $action = !empty($array[0]) ? $array[0] : $this->router->config('default_action'); + $param = []; + + if (!empty($array[1])) { + $this->parseUrlParams($request, $array[1], $param); + } + + return new ModuleDispatch($request, $this, $controller . '/' . $action, $param); + } + +} diff --git a/thinkphp/library/think/route/Resource.php b/thinkphp/library/think/route/Resource.php new file mode 100755 index 0000000..ff13928 --- /dev/null +++ b/thinkphp/library/think/route/Resource.php @@ -0,0 +1,126 @@ + +// +---------------------------------------------------------------------- + +namespace think\route; + +use think\Route; + +class Resource extends RuleGroup +{ + // 资源路由名称 + protected $resource; + + // REST路由方法定义 + protected $rest = []; + + /** + * 架构函数 + * @access public + * @param Route $router 路由对象 + * @param RuleGroup $parent 上级对象 + * @param string $name 资源名称 + * @param string $route 路由地址 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @param array $rest 资源定义 + */ + public function __construct(Route $router, RuleGroup $parent = null, $name = '', $route = '', $option = [], $pattern = [], $rest = []) + { + $this->router = $router; + $this->parent = $parent; + $this->resource = $name; + $this->route = $route; + $this->name = strpos($name, '.') ? strstr($name, '.', true) : $name; + + $this->setFullName(); + + // 资源路由默认为完整匹配 + $option['complete_match'] = true; + + $this->pattern = $pattern; + $this->option = $option; + $this->rest = $rest; + + if ($this->parent) { + $this->domain = $this->parent->getDomain(); + $this->parent->addRuleItem($this); + } + + if ($router->isTest()) { + $this->buildResourceRule(); + } + } + + /** + * 生成资源路由规则 + * @access protected + * @return void + */ + protected function buildResourceRule() + { + $origin = $this->router->getGroup(); + $this->router->setGroup($this); + + $rule = $this->resource; + $option = $this->option; + + if (strpos($rule, '.')) { + // 注册嵌套资源路由 + $array = explode('.', $rule); + $last = array_pop($array); + $item = []; + + foreach ($array as $val) { + $item[] = $val . '/<' . (isset($option['var'][$val]) ? $option['var'][$val] : $val . '_id') . '>'; + } + + $rule = implode('/', $item) . '/' . $last; + } + + $prefix = substr($rule, strlen($this->name) + 1); + + // 注册资源路由 + foreach ($this->rest as $key => $val) { + if ((isset($option['only']) && !in_array($key, $option['only'])) + || (isset($option['except']) && in_array($key, $option['except']))) { + continue; + } + + if (isset($last) && strpos($val[1], '') && isset($option['var'][$last])) { + $val[1] = str_replace('', '<' . $option['var'][$last] . '>', $val[1]); + } elseif (strpos($val[1], '') && isset($option['var'][$rule])) { + $val[1] = str_replace('', '<' . $option['var'][$rule] . '>', $val[1]); + } + + $this->addRule(trim($prefix . $val[1], '/'), $this->route . '/' . $val[2], $val[0]); + } + + $this->router->setGroup($origin); + } + + /** + * rest方法定义和修改 + * @access public + * @param string $name 方法名称 + * @param array|bool $resource 资源 + * @return $this + */ + public function rest($name, $resource = []) + { + if (is_array($name)) { + $this->rest = $resource ? $name : array_merge($this->rest, $name); + } else { + $this->rest[$name] = $resource; + } + + return $this; + } +} diff --git a/thinkphp/library/think/route/Rule.php b/thinkphp/library/think/route/Rule.php new file mode 100755 index 0000000..996305f --- /dev/null +++ b/thinkphp/library/think/route/Rule.php @@ -0,0 +1,1130 @@ + +// +---------------------------------------------------------------------- + +namespace think\route; + +use think\Container; +use think\Request; +use think\Response; +use think\route\dispatch\Callback as CallbackDispatch; +use think\route\dispatch\Controller as ControllerDispatch; +use think\route\dispatch\Module as ModuleDispatch; +use think\route\dispatch\Redirect as RedirectDispatch; +use think\route\dispatch\Response as ResponseDispatch; +use think\route\dispatch\View as ViewDispatch; + +abstract class Rule +{ + /** + * 路由标识 + * @var string + */ + protected $name; + + /** + * 路由对象 + * @var Route + */ + protected $router; + + /** + * 路由所属分组 + * @var RuleGroup + */ + protected $parent; + + /** + * 路由规则 + * @var mixed + */ + protected $rule; + + /** + * 路由地址 + * @var string|\Closure + */ + protected $route; + + /** + * 请求类型 + * @var string + */ + protected $method; + + /** + * 路由变量 + * @var array + */ + protected $vars = []; + + /** + * 路由参数 + * @var array + */ + protected $option = []; + + /** + * 路由变量规则 + * @var array + */ + protected $pattern = []; + + /** + * 需要和分组合并的路由参数 + * @var array + */ + protected $mergeOptions = ['after', 'model', 'header', 'response', 'append', 'middleware']; + + /** + * 是否需要后置操作 + * @var bool + */ + protected $doAfter; + + /** + * 是否锁定参数 + * @var bool + */ + protected $lockOption = false; + + abstract public function check($request, $url, $completeMatch = false); + + /** + * 获取Name + * @access public + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * 获取当前路由规则 + * @access public + * @return string + */ + public function getRule() + { + return $this->rule; + } + + /** + * 获取当前路由地址 + * @access public + * @return mixed + */ + public function getRoute() + { + return $this->route; + } + + /** + * 获取当前路由的请求类型 + * @access public + * @return string + */ + public function getMethod() + { + return strtolower($this->method); + } + + /** + * 获取当前路由的变量 + * @access public + * @return array + */ + public function getVars() + { + return $this->vars; + } + + /** + * 获取路由对象 + * @access public + * @return Route + */ + public function getRouter() + { + return $this->router; + } + + /** + * 路由是否有后置操作 + * @access public + * @return bool + */ + public function doAfter() + { + return $this->doAfter; + } + + /** + * 获取路由分组 + * @access public + * @return RuleGroup|null + */ + public function getParent() + { + return $this->parent; + } + + /** + * 获取路由所在域名 + * @access public + * @return string + */ + public function getDomain() + { + return $this->parent->getDomain(); + } + + /** + * 获取变量规则定义 + * @access public + * @param string $name 变量名 + * @return mixed + */ + public function getPattern($name = '') + { + if ('' === $name) { + return $this->pattern; + } + + return isset($this->pattern[$name]) ? $this->pattern[$name] : null; + } + + /** + * 获取路由参数 + * @access public + * @param string $name 变量名 + * @return mixed + */ + public function getConfig($name = '') + { + return $this->router->config($name); + } + + /** + * 获取路由参数定义 + * @access public + * @param string $name 参数名 + * @return mixed + */ + public function getOption($name = '') + { + if ('' === $name) { + return $this->option; + } + + return isset($this->option[$name]) ? $this->option[$name] : null; + } + + /** + * 注册路由参数 + * @access public + * @param string|array $name 参数名 + * @param mixed $value 值 + * @return $this + */ + public function option($name, $value = '') + { + if (is_array($name)) { + $this->option = array_merge($this->option, $name); + } else { + $this->option[$name] = $value; + } + + return $this; + } + + /** + * 注册变量规则 + * @access public + * @param string|array $name 变量名 + * @param string $rule 变量规则 + * @return $this + */ + public function pattern($name, $rule = '') + { + if (is_array($name)) { + $this->pattern = array_merge($this->pattern, $name); + } else { + $this->pattern[$name] = $rule; + } + + return $this; + } + + /** + * 设置标识 + * @access public + * @param string $name 标识名 + * @return $this + */ + public function name($name) + { + $this->name = $name; + + return $this; + } + + /** + * 设置变量 + * @access public + * @param array $vars 变量 + * @return $this + */ + public function vars($vars) + { + $this->vars = $vars; + + return $this; + } + + /** + * 设置路由请求类型 + * @access public + * @param string $method + * @return $this + */ + public function method($method) + { + return $this->option('method', strtolower($method)); + } + + /** + * 设置路由前置行为 + * @access public + * @param array|\Closure $before + * @return $this + */ + public function before($before) + { + return $this->option('before', $before); + } + + /** + * 设置路由后置行为 + * @access public + * @param array|\Closure $after + * @return $this + */ + public function after($after) + { + return $this->option('after', $after); + } + + /** + * 检查后缀 + * @access public + * @param string $ext + * @return $this + */ + public function ext($ext = '') + { + return $this->option('ext', $ext); + } + + /** + * 检查禁止后缀 + * @access public + * @param string $ext + * @return $this + */ + public function denyExt($ext = '') + { + return $this->option('deny_ext', $ext); + } + + /** + * 检查域名 + * @access public + * @param string $domain + * @return $this + */ + public function domain($domain) + { + return $this->option('domain', $domain); + } + + /** + * 设置参数过滤检查 + * @access public + * @param string|array $name + * @param mixed $value + * @return $this + */ + public function filter($name, $value = null) + { + if (is_array($name)) { + $this->option['filter'] = $name; + } else { + $this->option['filter'][$name] = $value; + } + + return $this; + } + + /** + * 绑定模型 + * @access public + * @param array|string $var 路由变量名 多个使用 & 分割 + * @param string|\Closure $model 绑定模型类 + * @param bool $exception 是否抛出异常 + * @return $this + */ + public function model($var, $model = null, $exception = true) + { + if ($var instanceof \Closure) { + $this->option['model'][] = $var; + } elseif (is_array($var)) { + $this->option['model'] = $var; + } elseif (is_null($model)) { + $this->option['model']['id'] = [$var, true]; + } else { + $this->option['model'][$var] = [$model, $exception]; + } + + return $this; + } + + /** + * 附加路由隐式参数 + * @access public + * @param array $append + * @return $this + */ + public function append(array $append = []) + { + if (isset($this->option['append'])) { + $this->option['append'] = array_merge($this->option['append'], $append); + } else { + $this->option['append'] = $append; + } + + return $this; + } + + /** + * 绑定验证 + * @access public + * @param mixed $validate 验证器类 + * @param string $scene 验证场景 + * @param array $message 验证提示 + * @param bool $batch 批量验证 + * @return $this + */ + public function validate($validate, $scene = null, $message = [], $batch = false) + { + $this->option['validate'] = [$validate, $scene, $message, $batch]; + + return $this; + } + + /** + * 绑定Response对象 + * @access public + * @param mixed $response + * @return $this + */ + public function response($response) + { + $this->option['response'][] = $response; + return $this; + } + + /** + * 设置Response Header信息 + * @access public + * @param string|array $name 参数名 + * @param string $value 参数值 + * @return $this + */ + public function header($header, $value = null) + { + if (is_array($header)) { + $this->option['header'] = $header; + } else { + $this->option['header'][$header] = $value; + } + + return $this; + } + + /** + * 指定路由中间件 + * @access public + * @param string|array|\Closure $middleware + * @param mixed $param + * @return $this + */ + public function middleware($middleware, $param = null) + { + if (is_null($param) && is_array($middleware)) { + $this->option['middleware'] = $middleware; + } else { + foreach ((array) $middleware as $item) { + $this->option['middleware'][] = [$item, $param]; + } + } + + return $this; + } + + /** + * 设置路由缓存 + * @access public + * @param array|string $cache + * @return $this + */ + public function cache($cache) + { + return $this->option('cache', $cache); + } + + /** + * 检查URL分隔符 + * @access public + * @param bool $depr + * @return $this + */ + public function depr($depr) + { + return $this->option('param_depr', $depr); + } + + /** + * 是否合并额外参数 + * @access public + * @param bool $merge + * @return $this + */ + public function mergeExtraVars($merge = true) + { + return $this->option('merge_extra_vars', $merge); + } + + /** + * 设置需要合并的路由参数 + * @access public + * @param array $option + * @return $this + */ + public function mergeOptions($option = []) + { + $this->mergeOptions = array_merge($this->mergeOptions, $option); + return $this; + } + + /** + * 检查是否为HTTPS请求 + * @access public + * @param bool $https + * @return $this + */ + public function https($https = true) + { + return $this->option('https', $https); + } + + /** + * 检查是否为AJAX请求 + * @access public + * @param bool $ajax + * @return $this + */ + public function ajax($ajax = true) + { + return $this->option('ajax', $ajax); + } + + /** + * 检查是否为PJAX请求 + * @access public + * @param bool $pjax + * @return $this + */ + public function pjax($pjax = true) + { + return $this->option('pjax', $pjax); + } + + /** + * 检查是否为手机访问 + * @access public + * @param bool $mobile + * @return $this + */ + public function mobile($mobile = true) + { + return $this->option('mobile', $mobile); + } + + /** + * 当前路由到一个模板地址 当使用数组的时候可以传入模板变量 + * @access public + * @param bool|array $view + * @return $this + */ + public function view($view = true) + { + return $this->option('view', $view); + } + + /** + * 当前路由为重定向 + * @access public + * @param bool $redirect 是否为重定向 + * @return $this + */ + public function redirect($redirect = true) + { + return $this->option('redirect', $redirect); + } + + /** + * 设置路由完整匹配 + * @access public + * @param bool $match + * @return $this + */ + public function completeMatch($match = true) + { + return $this->option('complete_match', $match); + } + + /** + * 是否去除URL最后的斜线 + * @access public + * @param bool $remove + * @return $this + */ + public function removeSlash($remove = true) + { + return $this->option('remove_slash', $remove); + } + + /** + * 设置是否允许跨域 + * @access public + * @param bool $allow + * @param array $header + * @return $this + */ + public function allowCrossDomain($allow = true, $header = []) + { + if (!empty($header)) { + $this->header($header); + } + + if ($allow && $this->parent) { + $this->parent->addRuleItem($this, 'options'); + } + + return $this->option('cross_domain', $allow); + } + + /** + * 检查OPTIONS请求 + * @access public + * @param Request $request + * @return Dispatch|void + */ + protected function checkCrossDomain($request) + { + if (!empty($this->option['cross_domain'])) { + $header = [ + 'Access-Control-Allow-Credentials' => 'true', + 'Access-Control-Allow-Methods' => 'GET, POST, PATCH, PUT, DELETE', + 'Access-Control-Allow-Headers' => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-Requested-With', + ]; + + if (!empty($this->option['header'])) { + $header = array_merge($header, $this->option['header']); + } + + if (!isset($header['Access-Control-Allow-Origin'])) { + $httpOrigin = $request->header('origin'); + + if ($httpOrigin && strpos(config('cookie.domain'), $httpOrigin)) { + $header['Access-Control-Allow-Origin'] = $httpOrigin; + } else { + $header['Access-Control-Allow-Origin'] = '*'; + } + } + + $this->option['header'] = $header; + + if ($request->method(true) == 'OPTIONS') { + return new ResponseDispatch($request, $this, Response::create()->code(204)->header($header)); + } + } + } + + /** + * 设置路由规则全局有效 + * @access public + * @return $this + */ + public function crossDomainRule() + { + if ($this instanceof RuleGroup) { + $method = '*'; + } else { + $method = $this->method; + } + + $this->router->setCrossDomainRule($this, $method); + + return $this; + } + + /** + * 合并分组参数 + * @access public + * @return array + */ + public function mergeGroupOptions() + { + if (!$this->lockOption) { + $parentOption = $this->parent->getOption(); + // 合并分组参数 + foreach ($this->mergeOptions as $item) { + if (isset($parentOption[$item]) && isset($this->option[$item])) { + $this->option[$item] = array_merge($parentOption[$item], $this->option[$item]); + } + } + + $this->option = array_merge($parentOption, $this->option); + $this->lockOption = true; + } + + return $this->option; + } + + /** + * 解析匹配到的规则路由 + * @access public + * @param Request $request 请求对象 + * @param string $rule 路由规则 + * @param string $route 路由地址 + * @param string $url URL地址 + * @param array $option 路由参数 + * @param array $matches 匹配的变量 + * @return Dispatch + */ + public function parseRule($request, $rule, $route, $url, $option = [], $matches = []) + { + if (is_string($route) && isset($option['prefix'])) { + // 路由地址前缀 + $route = $option['prefix'] . $route; + } + + // 替换路由地址中的变量 + if (is_string($route) && !empty($matches)) { + $search = $replace = []; + + foreach ($matches as $key => $value) { + $search[] = '<' . $key . '>'; + $replace[] = $value; + + $search[] = ':' . $key; + $replace[] = $value; + } + + $route = str_replace($search, $replace, $route); + } + + // 解析额外参数 + $count = substr_count($rule, '/'); + $url = array_slice(explode('|', $url), $count + 1); + $this->parseUrlParams($request, implode('|', $url), $matches); + + $this->vars = $matches; + $this->option = $option; + $this->doAfter = true; + + // 发起路由调度 + return $this->dispatch($request, $route, $option); + } + + /** + * 检查路由前置行为 + * @access protected + * @param mixed $before 前置行为 + * @return mixed + */ + protected function checkBefore($before) + { + $hook = Container::get('hook'); + + foreach ((array) $before as $behavior) { + $result = $hook->exec($behavior); + + if (false === $result) { + return false; + } + } + } + + /** + * 发起路由调度 + * @access protected + * @param Request $request Request对象 + * @param mixed $route 路由地址 + * @param array $option 路由参数 + * @return Dispatch + */ + protected function dispatch($request, $route, $option) + { + if ($route instanceof \Closure) { + // 执行闭包 + $result = new CallbackDispatch($request, $this, $route); + } elseif ($route instanceof Response) { + $result = new ResponseDispatch($request, $this, $route); + } elseif (isset($option['view']) && false !== $option['view']) { + $result = new ViewDispatch($request, $this, $route, is_array($option['view']) ? $option['view'] : []); + } elseif (!empty($option['redirect']) || 0 === strpos($route, '/') || strpos($route, '://')) { + // 路由到重定向地址 + $result = new RedirectDispatch($request, $this, $route, [], isset($option['status']) ? $option['status'] : 301); + } elseif (false !== strpos($route, '\\')) { + // 路由到方法 + $result = $this->dispatchMethod($request, $route); + } elseif (0 === strpos($route, '@')) { + // 路由到控制器 + $result = $this->dispatchController($request, substr($route, 1)); + } else { + // 路由到模块/控制器/操作 + $result = $this->dispatchModule($request, $route); + } + + return $result; + } + + /** + * 解析URL地址为 模块/控制器/操作 + * @access protected + * @param Request $request Request对象 + * @param string $route 路由地址 + * @return CallbackDispatch + */ + protected function dispatchMethod($request, $route) + { + list($path, $var) = $this->parseUrlPath($route); + + $route = str_replace('/', '@', implode('/', $path)); + $method = strpos($route, '@') ? explode('@', $route) : $route; + + return new CallbackDispatch($request, $this, $method, $var); + } + + /** + * 解析URL地址为 模块/控制器/操作 + * @access protected + * @param Request $request Request对象 + * @param string $route 路由地址 + * @return ControllerDispatch + */ + protected function dispatchController($request, $route) + { + list($route, $var) = $this->parseUrlPath($route); + + $result = new ControllerDispatch($request, $this, implode('/', $route), $var); + + $request->setAction(array_pop($route)); + $request->setController($route ? array_pop($route) : $this->getConfig('default_controller')); + $request->setModule($route ? array_pop($route) : $this->getConfig('default_module')); + + return $result; + } + + /** + * 解析URL地址为 模块/控制器/操作 + * @access protected + * @param Request $request Request对象 + * @param string $route 路由地址 + * @return ModuleDispatch + */ + protected function dispatchModule($request, $route) + { + list($path, $var) = $this->parseUrlPath($route); + + $action = array_pop($path); + $controller = !empty($path) ? array_pop($path) : null; + $module = $this->getConfig('app_multi_module') && !empty($path) ? array_pop($path) : null; + $method = $request->method(); + + if ($this->getConfig('use_action_prefix') && $this->router->getMethodPrefix($method)) { + $prefix = $this->router->getMethodPrefix($method); + // 操作方法前缀支持 + $action = 0 !== strpos($action, $prefix) ? $prefix . $action : $action; + } + + // 设置当前请求的路由变量 + $request->setRouteVars($var); + + // 路由到模块/控制器/操作 + return new ModuleDispatch($request, $this, [$module, $controller, $action], ['convert' => false]); + } + + /** + * 路由检查 + * @access protected + * @param array $option 路由参数 + * @param Request $request Request对象 + * @return bool + */ + protected function checkOption($option, Request $request) + { + // 请求类型检测 + if (!empty($option['method'])) { + if (is_string($option['method']) && false === stripos($option['method'], $request->method())) { + return false; + } + } + + // AJAX PJAX 请求检查 + foreach (['ajax', 'pjax', 'mobile'] as $item) { + if (isset($option[$item])) { + $call = 'is' . $item; + if ($option[$item] && !$request->$call() || !$option[$item] && $request->$call()) { + return false; + } + } + } + + // 伪静态后缀检测 + if ($request->url() != '/' && ((isset($option['ext']) && false === stripos('|' . $option['ext'] . '|', '|' . $request->ext() . '|')) + || (isset($option['deny_ext']) && false !== stripos('|' . $option['deny_ext'] . '|', '|' . $request->ext() . '|')))) { + return false; + } + + // 域名检查 + if ((isset($option['domain']) && !in_array($option['domain'], [$request->host(true), $request->subDomain()]))) { + return false; + } + + // HTTPS检查 + if ((isset($option['https']) && $option['https'] && !$request->isSsl()) + || (isset($option['https']) && !$option['https'] && $request->isSsl())) { + return false; + } + + // 请求参数检查 + if (isset($option['filter'])) { + foreach ($option['filter'] as $name => $value) { + if ($request->param($name, '', null) != $value) { + return false; + } + } + } + return true; + } + + /** + * 解析URL地址中的参数Request对象 + * @access protected + * @param Request $request + * @param string $rule 路由规则 + * @param array $var 变量 + * @return void + */ + protected function parseUrlParams($request, $url, &$var = []) + { + if ($url) { + if ($this->getConfig('url_param_type')) { + $var += explode('|', $url); + } else { + preg_replace_callback('/(\w+)\|([^\|]+)/', function ($match) use (&$var) { + $var[$match[1]] = strip_tags($match[2]); + }, $url); + } + } + } + + /** + * 解析URL的pathinfo参数和变量 + * @access public + * @param string $url URL地址 + * @return array + */ + public function parseUrlPath($url) + { + // 分隔符替换 确保路由定义使用统一的分隔符 + $url = str_replace('|', '/', $url); + $url = trim($url, '/'); + $var = []; + + if (false !== strpos($url, '?')) { + // [模块/控制器/操作?]参数1=值1&参数2=值2... + $info = parse_url($url); + $path = explode('/', $info['path']); + parse_str($info['query'], $var); + } elseif (strpos($url, '/')) { + // [模块/控制器/操作] + $path = explode('/', $url); + } elseif (false !== strpos($url, '=')) { + // 参数1=值1&参数2=值2... + $path = []; + parse_str($url, $var); + } else { + $path = [$url]; + } + + return [$path, $var]; + } + + /** + * 生成路由的正则规则 + * @access protected + * @param string $rule 路由规则 + * @param array $match 匹配的变量 + * @param array $pattern 路由变量规则 + * @param array $option 路由参数 + * @param bool $completeMatch 路由是否完全匹配 + * @param string $suffix 路由正则变量后缀 + * @return string + */ + protected function buildRuleRegex($rule, $match, $pattern = [], $option = [], $completeMatch = false, $suffix = '') + { + foreach ($match as $name) { + $replace[] = $this->buildNameRegex($name, $pattern, $suffix); + } + + // 是否区分 / 地址访问 + if ('/' != $rule) { + if (!empty($option['remove_slash'])) { + $rule = rtrim($rule, '/'); + } elseif (substr($rule, -1) == '/') { + $rule = rtrim($rule, '/'); + $hasSlash = true; + } + } + + $regex = str_replace(array_unique($match), array_unique($replace), $rule); + $regex = str_replace([')?/', ')/', ')?-', ')-', '\\\\/'], [')\/', ')\/', ')\-', ')\-', '\/'], $regex); + + if (isset($hasSlash)) { + $regex .= '\/'; + } + + return $regex . ($completeMatch ? '$' : ''); + } + + /** + * 生成路由变量的正则规则 + * @access protected + * @param string $name 路由变量 + * @param string $pattern 变量规则 + * @param string $suffix 路由正则变量后缀 + * @return string + */ + protected function buildNameRegex($name, $pattern, $suffix) + { + $optional = ''; + $slash = substr($name, 0, 1); + + if (in_array($slash, ['/', '-'])) { + $prefix = '\\' . $slash; + $name = substr($name, 1); + $slash = substr($name, 0, 1); + } else { + $prefix = ''; + } + + if ('<' != $slash) { + return $prefix . preg_quote($name, '/'); + } + + if (strpos($name, '?')) { + $name = substr($name, 1, -2); + $optional = '?'; + } elseif (strpos($name, '>')) { + $name = substr($name, 1, -1); + } + + if (isset($pattern[$name])) { + $nameRule = $pattern[$name]; + if (0 === strpos($nameRule, '/') && '/' == substr($nameRule, -1)) { + $nameRule = substr($nameRule, 1, -1); + } + } else { + $nameRule = $this->getConfig('default_route_pattern'); + } + + return '(' . $prefix . '(?<' . $name . $suffix . '>' . $nameRule . '))' . $optional; + } + + /** + * 分析路由规则中的变量 + * @access protected + * @param string $rule 路由规则 + * @return array + */ + protected function parseVar($rule) + { + // 提取路由规则中的变量 + $var = []; + + if (preg_match_all('/<\w+\??>/', $rule, $matches)) { + foreach ($matches[0] as $name) { + $optional = false; + + if (strpos($name, '?')) { + $name = substr($name, 1, -2); + $optional = true; + } else { + $name = substr($name, 1, -1); + } + + $var[$name] = $optional ? 2 : 1; + } + } + + return $var; + } + + /** + * 设置路由参数 + * @access public + * @param string $method 方法名 + * @param array $args 调用参数 + * @return $this + */ + public function __call($method, $args) + { + if (count($args) > 1) { + $args[0] = $args; + } + array_unshift($args, $method); + + return call_user_func_array([$this, 'option'], $args); + } + + public function __sleep() + { + return ['name', 'rule', 'route', 'method', 'vars', 'option', 'pattern', 'doAfter']; + } + + public function __wakeup() + { + $this->router = Container::get('route'); + } + + public function __debugInfo() + { + $data = get_object_vars($this); + unset($data['parent'], $data['router'], $data['route']); + + return $data; + } +} diff --git a/thinkphp/library/think/route/RuleGroup.php b/thinkphp/library/think/route/RuleGroup.php new file mode 100755 index 0000000..5781d8c --- /dev/null +++ b/thinkphp/library/think/route/RuleGroup.php @@ -0,0 +1,601 @@ + +// +---------------------------------------------------------------------- + +namespace think\route; + +use think\Container; +use think\Exception; +use think\Request; +use think\Response; +use think\Route; +use think\route\dispatch\Response as ResponseDispatch; +use think\route\dispatch\Url as UrlDispatch; + +class RuleGroup extends Rule +{ + // 分组路由(包括子分组) + protected $rules = [ + '*' => [], + 'get' => [], + 'post' => [], + 'put' => [], + 'patch' => [], + 'delete' => [], + 'head' => [], + 'options' => [], + ]; + + // MISS路由 + protected $miss; + + // 自动路由 + protected $auto; + + // 完整名称 + protected $fullName; + + // 所在域名 + protected $domain; + + /** + * 架构函数 + * @access public + * @param Route $router 路由对象 + * @param RuleGroup $parent 上级对象 + * @param string $name 分组名称 + * @param mixed $rule 分组路由 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + */ + public function __construct(Route $router, RuleGroup $parent = null, $name = '', $rule = [], $option = [], $pattern = []) + { + $this->router = $router; + $this->parent = $parent; + $this->rule = $rule; + $this->name = trim($name, '/'); + $this->option = $option; + $this->pattern = $pattern; + + $this->setFullName(); + + if ($this->parent) { + $this->domain = $this->parent->getDomain(); + $this->parent->addRuleItem($this); + } + + if (!empty($option['cross_domain'])) { + $this->router->setCrossDomainRule($this); + } + + if ($router->isTest()) { + $this->lazy(false); + } + } + + /** + * 设置分组的路由规则 + * @access public + * @return void + */ + protected function setFullName() + { + if (false !== strpos($this->name, ':')) { + $this->name = preg_replace(['/\[\:(\w+)\]/', '/\:(\w+)/'], ['<\1?>', '<\1>'], $this->name); + } + + if ($this->parent && $this->parent->getFullName()) { + $this->fullName = $this->parent->getFullName() . ($this->name ? '/' . $this->name : ''); + } else { + $this->fullName = $this->name; + } + } + + /** + * 获取所属域名 + * @access public + * @return string + */ + public function getDomain() + { + return $this->domain; + } + + /** + * 检测分组路由 + * @access public + * @param Request $request 请求对象 + * @param string $url 访问地址 + * @param bool $completeMatch 路由是否完全匹配 + * @return Dispatch|false + */ + public function check($request, $url, $completeMatch = false) + { + // 跨域OPTIONS请求 + if ($dispatch = $this->checkCrossDomain($request)) { + return $dispatch; + } + + // 检查分组有效性 + if (!$this->checkOption($this->option, $request) || !$this->checkUrl($url)) { + return false; + } + + // 检查前置行为 + if (isset($this->option['before'])) { + if (false === $this->checkBefore($this->option['before'])) { + return false; + } + unset($this->option['before']); + } + + // 解析分组路由 + if ($this instanceof Resource) { + $this->buildResourceRule(); + } elseif ($this->rule) { + if ($this->rule instanceof Response) { + return new ResponseDispatch($request, $this, $this->rule); + } + + $this->parseGroupRule($this->rule); + } + + // 获取当前路由规则 + $method = strtolower($request->method()); + $rules = $this->getMethodRules($method); + + if ($this->parent) { + // 合并分组参数 + $this->mergeGroupOptions(); + // 合并分组变量规则 + $this->pattern = array_merge($this->parent->getPattern(), $this->pattern); + } + + if (isset($this->option['complete_match'])) { + $completeMatch = $this->option['complete_match']; + } + + if (!empty($this->option['merge_rule_regex'])) { + // 合并路由正则规则进行路由匹配检查 + $result = $this->checkMergeRuleRegex($request, $rules, $url, $completeMatch); + + if (false !== $result) { + return $result; + } + } + + // 检查分组路由 + foreach ($rules as $key => $item) { + $result = $item->check($request, $url, $completeMatch); + + if (false !== $result) { + return $result; + } + } + + if ($this->auto) { + // 自动解析URL地址 + $result = new UrlDispatch($request, $this, $this->auto . '/' . $url, ['auto_search' => false]); + } elseif ($this->miss && in_array($this->miss->getMethod(), ['*', $method])) { + // 未匹配所有路由的路由规则处理 + $result = $this->miss->parseRule($request, '', $this->miss->getRoute(), $url, $this->miss->mergeGroupOptions()); + } else { + $result = false; + } + + return $result; + } + + /** + * 获取当前请求的路由规则(包括子分组、资源路由) + * @access protected + * @param string $method + * @return array + */ + protected function getMethodRules($method) + { + return array_merge($this->rules[$method], $this->rules['*']); + } + + /** + * 分组URL匹配检查 + * @access protected + * @param string $url + * @return bool + */ + protected function checkUrl($url) + { + if ($this->fullName) { + $pos = strpos($this->fullName, '<'); + + if (false !== $pos) { + $str = substr($this->fullName, 0, $pos); + } else { + $str = $this->fullName; + } + + if ($str && 0 !== stripos(str_replace('|', '/', $url), $str)) { + return false; + } + } + + return true; + } + + /** + * 延迟解析分组的路由规则 + * @access public + * @param bool $lazy 路由是否延迟解析 + * @return $this + */ + public function lazy($lazy = true) + { + if (!$lazy) { + $this->parseGroupRule($this->rule); + $this->rule = null; + } + + return $this; + } + + /** + * 解析分组和域名的路由规则及绑定 + * @access public + * @param mixed $rule 路由规则 + * @return void + */ + public function parseGroupRule($rule) + { + $origin = $this->router->getGroup(); + $this->router->setGroup($this); + + if ($rule instanceof \Closure) { + Container::getInstance()->invokeFunction($rule); + } elseif (is_array($rule)) { + $this->addRules($rule); + } elseif (is_string($rule) && $rule) { + $this->router->bind($rule, $this->domain); + } + + $this->router->setGroup($origin); + } + + /** + * 检测分组路由 + * @access public + * @param Request $request 请求对象 + * @param array $rules 路由规则 + * @param string $url 访问地址 + * @param bool $completeMatch 路由是否完全匹配 + * @return Dispatch|false + */ + protected function checkMergeRuleRegex($request, &$rules, $url, $completeMatch) + { + $depr = $this->router->config('pathinfo_depr'); + $url = $depr . str_replace('|', $depr, $url); + + foreach ($rules as $key => $item) { + if ($item instanceof RuleItem) { + $rule = $depr . str_replace('/', $depr, $item->getRule()); + if ($depr == $rule && $depr != $url) { + unset($rules[$key]); + continue; + } + + $complete = null !== $item->getOption('complete_match') ? $item->getOption('complete_match') : $completeMatch; + + if (false === strpos($rule, '<')) { + if (0 === strcasecmp($rule, $url) || (!$complete && 0 === strncasecmp($rule, $url, strlen($rule)))) { + return $item->checkRule($request, $url, []); + } + + unset($rules[$key]); + continue; + } + + $slash = preg_quote('/-' . $depr, '/'); + + if ($matchRule = preg_split('/[' . $slash . ']<\w+\??>/', $rule, 2)) { + if ($matchRule[0] && 0 !== strncasecmp($rule, $url, strlen($matchRule[0]))) { + unset($rules[$key]); + continue; + } + } + + if (preg_match_all('/[' . $slash . ']??/', $rule, $matches)) { + unset($rules[$key]); + $pattern = array_merge($this->getPattern(), $item->getPattern()); + $option = array_merge($this->getOption(), $item->getOption()); + + $regex[$key] = $this->buildRuleRegex($rule, $matches[0], $pattern, $option, $complete, '_THINK_' . $key); + $items[$key] = $item; + } + } + } + + if (empty($regex)) { + return false; + } + + try { + $result = preg_match('/^(?:' . implode('|', $regex) . ')/u', $url, $match); + } catch (\Exception $e) { + throw new Exception('route pattern error'); + } + + if ($result) { + $var = []; + foreach ($match as $key => $val) { + if (is_string($key) && '' !== $val) { + list($name, $pos) = explode('_THINK_', $key); + + $var[$name] = $val; + } + } + + if (!isset($pos)) { + foreach ($regex as $key => $item) { + if (0 === strpos(str_replace(['\/', '\-', '\\' . $depr], ['/', '-', $depr], $item), $match[0])) { + $pos = $key; + break; + } + } + } + + $rule = $items[$pos]->getRule(); + $array = $this->router->getRule($rule); + + foreach ($array as $item) { + if (in_array($item->getMethod(), ['*', strtolower($request->method())])) { + $result = $item->checkRule($request, $url, $var); + + if (false !== $result) { + return $result; + } + } + } + } + + return false; + } + + /** + * 获取分组的MISS路由 + * @access public + * @return RuleItem|null + */ + public function getMissRule() + { + return $this->miss; + } + + /** + * 获取分组的自动路由 + * @access public + * @return string + */ + public function getAutoRule() + { + return $this->auto; + } + + /** + * 注册自动路由 + * @access public + * @param string $route 路由规则 + * @return void + */ + public function addAutoRule($route) + { + $this->auto = $route; + } + + /** + * 注册MISS路由 + * @access public + * @param string $route 路由地址 + * @param string $method 请求类型 + * @param array $option 路由参数 + * @return RuleItem + */ + public function addMissRule($route, $method = '*', $option = []) + { + // 创建路由规则实例 + $ruleItem = new RuleItem($this->router, $this, null, '', $route, strtolower($method), $option); + + $this->miss = $ruleItem; + + return $ruleItem; + } + + /** + * 添加分组下的路由规则或者子分组 + * @access public + * @param string $rule 路由规则 + * @param string $route 路由地址 + * @param string $method 请求类型 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return $this + */ + public function addRule($rule, $route, $method = '*', $option = [], $pattern = []) + { + // 读取路由标识 + if (is_array($rule)) { + $name = $rule[0]; + $rule = $rule[1]; + } elseif (is_string($route)) { + $name = $route; + } else { + $name = null; + } + + $method = strtolower($method); + + if ('/' === $rule || '' === $rule) { + // 首页自动完整匹配 + $rule .= '$'; + } + + // 创建路由规则实例 + $ruleItem = new RuleItem($this->router, $this, $name, $rule, $route, $method, $option, $pattern); + + if (!empty($option['cross_domain'])) { + $this->router->setCrossDomainRule($ruleItem, $method); + } + + $this->addRuleItem($ruleItem, $method); + + return $ruleItem; + } + + /** + * 批量注册路由规则 + * @access public + * @param array $rules 路由规则 + * @param string $method 请求类型 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + * @return void + */ + public function addRules($rules, $method = '*', $option = [], $pattern = []) + { + foreach ($rules as $key => $val) { + if (is_numeric($key)) { + $key = array_shift($val); + } + + if (is_array($val)) { + $route = array_shift($val); + $option = $val ? array_shift($val) : []; + $pattern = $val ? array_shift($val) : []; + } else { + $route = $val; + } + + $this->addRule($key, $route, $method, $option, $pattern); + } + } + + public function addRuleItem($rule, $method = '*') + { + if (strpos($method, '|')) { + $rule->method($method); + $method = '*'; + } + + $this->rules[$method][] = $rule; + + return $this; + } + + /** + * 设置分组的路由前缀 + * @access public + * @param string $prefix + * @return $this + */ + public function prefix($prefix) + { + if ($this->parent && $this->parent->getOption('prefix')) { + $prefix = $this->parent->getOption('prefix') . $prefix; + } + + return $this->option('prefix', $prefix); + } + + /** + * 设置资源允许 + * @access public + * @param array $only + * @return $this + */ + public function only($only) + { + return $this->option('only', $only); + } + + /** + * 设置资源排除 + * @access public + * @param array $except + * @return $this + */ + public function except($except) + { + return $this->option('except', $except); + } + + /** + * 设置资源路由的变量 + * @access public + * @param array $vars + * @return $this + */ + public function vars($vars) + { + return $this->option('var', $vars); + } + + /** + * 合并分组的路由规则正则 + * @access public + * @param bool $merge + * @return $this + */ + public function mergeRuleRegex($merge = true) + { + return $this->option('merge_rule_regex', $merge); + } + + /** + * 获取完整分组Name + * @access public + * @return string + */ + public function getFullName() + { + return $this->fullName; + } + + /** + * 获取分组的路由规则 + * @access public + * @param string $method + * @return array + */ + public function getRules($method = '') + { + if ('' === $method) { + return $this->rules; + } + + return isset($this->rules[strtolower($method)]) ? $this->rules[strtolower($method)] : []; + } + + /** + * 清空分组下的路由规则 + * @access public + * @return void + */ + public function clear() + { + $this->rules = [ + '*' => [], + 'get' => [], + 'post' => [], + 'put' => [], + 'patch' => [], + 'delete' => [], + 'head' => [], + 'options' => [], + ]; + } +} diff --git a/thinkphp/library/think/route/RuleItem.php b/thinkphp/library/think/route/RuleItem.php new file mode 100755 index 0000000..a05d2de --- /dev/null +++ b/thinkphp/library/think/route/RuleItem.php @@ -0,0 +1,292 @@ + +// +---------------------------------------------------------------------- + +namespace think\route; + +use think\Container; +use think\Exception; +use think\Route; + +class RuleItem extends Rule +{ + protected $hasSetRule; + + /** + * 架构函数 + * @access public + * @param Route $router 路由实例 + * @param RuleGroup $parent 上级对象 + * @param string $name 路由标识 + * @param string|array $rule 路由规则 + * @param string|\Closure $route 路由地址 + * @param string $method 请求类型 + * @param array $option 路由参数 + * @param array $pattern 变量规则 + */ + public function __construct(Route $router, RuleGroup $parent, $name, $rule, $route, $method = '*', $option = [], $pattern = []) + { + $this->router = $router; + $this->parent = $parent; + $this->name = $name; + $this->route = $route; + $this->method = $method; + $this->option = $option; + $this->pattern = $pattern; + + $this->setRule($rule); + + if (!empty($option['cross_domain'])) { + $this->router->setCrossDomainRule($this, $method); + } + } + + /** + * 路由规则预处理 + * @access public + * @param string $rule 路由规则 + * @return void + */ + public function setRule($rule) + { + if ('$' == substr($rule, -1, 1)) { + // 是否完整匹配 + $rule = substr($rule, 0, -1); + + $this->option['complete_match'] = true; + } + + $rule = '/' != $rule ? ltrim($rule, '/') : ''; + + if ($this->parent && $prefix = $this->parent->getFullName()) { + $rule = $prefix . ($rule ? '/' . ltrim($rule, '/') : ''); + } + + if (false !== strpos($rule, ':')) { + $this->rule = preg_replace(['/\[\:(\w+)\]/', '/\:(\w+)/'], ['<\1?>', '<\1>'], $rule); + } else { + $this->rule = $rule; + } + + // 生成路由标识的快捷访问 + $this->setRuleName(); + } + + /** + * 检查后缀 + * @access public + * @param string $ext + * @return $this + */ + public function ext($ext = '') + { + $this->option('ext', $ext); + $this->setRuleName(true); + + return $this; + } + + /** + * 设置别名 + * @access public + * @param string $name + * @return $this + */ + public function name($name) + { + $this->name = $name; + $this->setRuleName(true); + + return $this; + } + + /** + * 设置路由标识 用于URL反解生成 + * @access protected + * @param bool $first 是否插入开头 + * @return void + */ + protected function setRuleName($first = false) + { + if ($this->name) { + $vars = $this->parseVar($this->rule); + $name = strtolower($this->name); + + if (isset($this->option['ext'])) { + $suffix = $this->option['ext']; + } elseif ($this->parent->getOption('ext')) { + $suffix = $this->parent->getOption('ext'); + } else { + $suffix = null; + } + + $value = [$this->rule, $vars, $this->parent->getDomain(), $suffix, $this->method]; + + Container::get('rule_name')->set($name, $value, $first); + } + + if (!$this->hasSetRule) { + Container::get('rule_name')->setRule($this->rule, $this); + $this->hasSetRule = true; + } + } + + /** + * 检测路由 + * @access public + * @param Request $request 请求对象 + * @param string $url 访问地址 + * @param array $match 匹配路由变量 + * @param bool $completeMatch 路由是否完全匹配 + * @return Dispatch|false + */ + public function checkRule($request, $url, $match = null, $completeMatch = false) + { + // 检查参数有效性 + if (!$this->checkOption($this->option, $request)) { + return false; + } + + // 合并分组参数 + $option = $this->mergeGroupOptions(); + + $url = $this->urlSuffixCheck($request, $url, $option); + + if (is_null($match)) { + $match = $this->match($url, $option, $completeMatch); + } + + if (false !== $match) { + if (!empty($option['cross_domain'])) { + if ($dispatch = $this->checkCrossDomain($request)) { + // 允许跨域 + return $dispatch; + } + + $option['header'] = $this->option['header']; + } + + // 检查前置行为 + if (isset($option['before']) && false === $this->checkBefore($option['before'])) { + return false; + } + + return $this->parseRule($request, $this->rule, $this->route, $url, $option, $match); + } + + return false; + } + + /** + * 检测路由(含路由匹配) + * @access public + * @param Request $request 请求对象 + * @param string $url 访问地址 + * @param string $depr 路径分隔符 + * @param bool $completeMatch 路由是否完全匹配 + * @return Dispatch|false + */ + public function check($request, $url, $completeMatch = false) + { + return $this->checkRule($request, $url, null, $completeMatch); + } + + /** + * URL后缀及Slash检查 + * @access protected + * @param Request $request 请求对象 + * @param string $url 访问地址 + * @param array $option 路由参数 + * @return string + */ + protected function urlSuffixCheck($request, $url, $option = []) + { + // 是否区分 / 地址访问 + if (!empty($option['remove_slash']) && '/' != $this->rule) { + $this->rule = rtrim($this->rule, '/'); + $url = rtrim($url, '|'); + } + + if (isset($option['ext'])) { + // 路由ext参数 优先于系统配置的URL伪静态后缀参数 + $url = preg_replace('/\.(' . $request->ext() . ')$/i', '', $url); + } + + return $url; + } + + /** + * 检测URL和规则路由是否匹配 + * @access private + * @param string $url URL地址 + * @param array $option 路由参数 + * @param bool $completeMatch 路由是否完全匹配 + * @return array|false + */ + private function match($url, $option, $completeMatch) + { + if (isset($option['complete_match'])) { + $completeMatch = $option['complete_match']; + } + + $pattern = array_merge($this->parent->getPattern(), $this->pattern); + $depr = $this->router->config('pathinfo_depr'); + + // 检查完整规则定义 + if (isset($pattern['__url__']) && !preg_match(0 === strpos($pattern['__url__'], '/') ? $pattern['__url__'] : '/^' . $pattern['__url__'] . '/', str_replace('|', $depr, $url))) { + return false; + } + + $var = []; + $url = $depr . str_replace('|', $depr, $url); + $rule = $depr . str_replace('/', $depr, $this->rule); + + if ($depr == $rule && $depr != $url) { + return false; + } + + if (false === strpos($rule, '<')) { + if (0 === strcasecmp($rule, $url) || (!$completeMatch && 0 === strncasecmp($rule . $depr, $url . $depr, strlen($rule . $depr)))) { + return $var; + } + return false; + } + + $slash = preg_quote('/-' . $depr, '/'); + + if ($matchRule = preg_split('/[' . $slash . ']?<\w+\??>/', $rule, 2)) { + if ($matchRule[0] && 0 !== strncasecmp($rule, $url, strlen($matchRule[0]))) { + return false; + } + } + + if (preg_match_all('/[' . $slash . ']??/', $rule, $matches)) { + $regex = $this->buildRuleRegex($rule, $matches[0], $pattern, $option, $completeMatch); + + try { + if (!preg_match('/^' . $regex . ($completeMatch ? '$' : '') . '/u', $url, $match)) { + return false; + } + } catch (\Exception $e) { + throw new Exception('route pattern error'); + } + + foreach ($match as $key => $val) { + if (is_string($key)) { + $var[$key] = $val; + } + } + } + + // 成功匹配后返回URL中的动态变量数组 + return $var; + } + +} diff --git a/thinkphp/library/think/route/RuleName.php b/thinkphp/library/think/route/RuleName.php new file mode 100755 index 0000000..202fb0e --- /dev/null +++ b/thinkphp/library/think/route/RuleName.php @@ -0,0 +1,147 @@ + +// +---------------------------------------------------------------------- + +namespace think\route; + +class RuleName +{ + protected $item = []; + protected $rule = []; + + /** + * 注册路由标识 + * @access public + * @param string $name 路由标识 + * @param array $value 路由规则 + * @param bool $first 是否置顶 + * @return void + */ + public function set($name, $value, $first = false) + { + if ($first && isset($this->item[$name])) { + array_unshift($this->item[$name], $value); + } else { + $this->item[$name][] = $value; + } + } + + /** + * 注册路由规则 + * @access public + * @param string $rule 路由规则 + * @param RuleItem $route 路由 + * @return void + */ + public function setRule($rule, $route) + { + $this->rule[$route->getDomain()][$rule][$route->getMethod()] = $route; + } + + /** + * 根据路由规则获取路由对象(列表) + * @access public + * @param string $name 路由标识 + * @param string $domain 域名 + * @return array + */ + public function getRule($rule, $domain = null) + { + return isset($this->rule[$domain][$rule]) ? $this->rule[$domain][$rule] : []; + } + + /** + * 获取全部路由列表 + * @access public + * @param string $domain 域名 + * @return array + */ + public function getRuleList($domain = null) + { + $list = []; + + foreach ($this->rule as $ruleDomain => $rules) { + foreach ($rules as $rule => $items) { + foreach ($items as $item) { + $val['domain'] = $ruleDomain; + + foreach (['method', 'rule', 'name', 'route', 'pattern', 'option'] as $param) { + $call = 'get' . $param; + $val[$param] = $item->$call(); + } + + $list[$ruleDomain][] = $val; + } + } + } + + if ($domain) { + return isset($list[$domain]) ? $list[$domain] : []; + } + + return $list; + } + + /** + * 导入路由标识 + * @access public + * @param array $name 路由标识 + * @return void + */ + public function import($item) + { + $this->item = $item; + } + + /** + * 根据路由标识获取路由信息(用于URL生成) + * @access public + * @param string $name 路由标识 + * @param string $domain 域名 + * @return array|null + */ + public function get($name = null, $domain = null, $method = '*') + { + if (is_null($name)) { + return $this->item; + } + + $name = strtolower($name); + $method = strtolower($method); + + if (isset($this->item[$name])) { + if (is_null($domain)) { + $result = $this->item[$name]; + } else { + $result = []; + foreach ($this->item[$name] as $item) { + if ($item[2] == $domain && ('*' == $item[4] || $method == $item[4])) { + $result[] = $item; + } + } + } + } else { + $result = null; + } + + return $result; + } + + /** + * 清空路由规则 + * @access public + * @return void + */ + public function clear() + { + $this->item = []; + $this->rule = []; + } +} diff --git a/thinkphp/library/think/route/dispatch/Callback.php b/thinkphp/library/think/route/dispatch/Callback.php new file mode 100755 index 0000000..ca76fc9 --- /dev/null +++ b/thinkphp/library/think/route/dispatch/Callback.php @@ -0,0 +1,26 @@ + +// +---------------------------------------------------------------------- + +namespace think\route\dispatch; + +use think\route\Dispatch; + +class Callback extends Dispatch +{ + public function exec() + { + // 执行回调方法 + $vars = array_merge($this->request->param(), $this->param); + + return $this->app->invoke($this->dispatch, $vars); + } + +} diff --git a/thinkphp/library/think/route/dispatch/Controller.php b/thinkphp/library/think/route/dispatch/Controller.php new file mode 100755 index 0000000..1de8299 --- /dev/null +++ b/thinkphp/library/think/route/dispatch/Controller.php @@ -0,0 +1,30 @@ + +// +---------------------------------------------------------------------- + +namespace think\route\dispatch; + +use think\route\Dispatch; + +class Controller extends Dispatch +{ + public function exec() + { + // 执行控制器的操作方法 + $vars = array_merge($this->request->param(), $this->param); + + return $this->app->action( + $this->dispatch, $vars, + $this->rule->getConfig('url_controller_layer'), + $this->rule->getConfig('controller_suffix') + ); + } + +} diff --git a/thinkphp/library/think/route/dispatch/Module.php b/thinkphp/library/think/route/dispatch/Module.php new file mode 100755 index 0000000..40bd775 --- /dev/null +++ b/thinkphp/library/think/route/dispatch/Module.php @@ -0,0 +1,138 @@ + +// +---------------------------------------------------------------------- + +namespace think\route\dispatch; + +use ReflectionMethod; +use think\exception\ClassNotFoundException; +use think\exception\HttpException; +use think\Loader; +use think\Request; +use think\route\Dispatch; + +class Module extends Dispatch +{ + protected $controller; + protected $actionName; + + public function init() + { + parent::init(); + + $result = $this->dispatch; + + if (is_string($result)) { + $result = explode('/', $result); + } + + if ($this->rule->getConfig('app_multi_module')) { + // 多模块部署 + $module = strip_tags(strtolower($result[0] ?: $this->rule->getConfig('default_module'))); + $bind = $this->rule->getRouter()->getBind(); + $available = false; + + if ($bind && preg_match('/^[a-z]/is', $bind)) { + // 绑定模块 + list($bindModule) = explode('/', $bind); + if (empty($result[0])) { + $module = $bindModule; + } + $available = true; + } elseif (!in_array($module, $this->rule->getConfig('deny_module_list')) && is_dir($this->app->getAppPath() . $module)) { + $available = true; + } elseif ($this->rule->getConfig('empty_module')) { + $module = $this->rule->getConfig('empty_module'); + $available = true; + } + + // 模块初始化 + if ($module && $available) { + // 初始化模块 + $this->request->setModule($module); + $this->app->init($module); + } else { + throw new HttpException(404, 'module not exists:' . $module); + } + } + + // 是否自动转换控制器和操作名 + $convert = is_bool($this->convert) ? $this->convert : $this->rule->getConfig('url_convert'); + // 获取控制器名 + $controller = strip_tags($result[1] ?: $this->rule->getConfig('default_controller')); + + $this->controller = $convert ? strtolower($controller) : $controller; + + // 获取操作名 + $this->actionName = strip_tags($result[2] ?: $this->rule->getConfig('default_action')); + + // 设置当前请求的控制器、操作 + $this->request + ->setController(Loader::parseName($this->controller, 1)) + ->setAction($this->actionName); + + return $this; + } + + public function exec() + { + // 监听module_init + $this->app['hook']->listen('module_init'); + + try { + // 实例化控制器 + $instance = $this->app->controller($this->controller, + $this->rule->getConfig('url_controller_layer'), + $this->rule->getConfig('controller_suffix'), + $this->rule->getConfig('empty_controller')); + } catch (ClassNotFoundException $e) { + throw new HttpException(404, 'controller not exists:' . $e->getClass()); + } + + $this->app['middleware']->controller(function (Request $request, $next) use ($instance) { + // 获取当前操作名 + $action = $this->actionName . $this->rule->getConfig('action_suffix'); + + if (is_callable([$instance, $action])) { + // 执行操作方法 + $call = [$instance, $action]; + + // 严格获取当前操作方法名 + $reflect = new ReflectionMethod($instance, $action); + $methodName = $reflect->getName(); + $suffix = $this->rule->getConfig('action_suffix'); + $actionName = $suffix ? substr($methodName, 0, -strlen($suffix)) : $methodName; + $this->request->setAction($actionName); + + // 自动获取请求变量 + $vars = $this->rule->getConfig('url_param_type') + ? $this->request->route() + : $this->request->param(); + $vars = array_merge($vars, $this->param); + } elseif (is_callable([$instance, '_empty'])) { + // 空操作 + $call = [$instance, '_empty']; + $vars = [$this->actionName]; + $reflect = new ReflectionMethod($instance, '_empty'); + } else { + // 操作不存在 + throw new HttpException(404, 'method not exists:' . get_class($instance) . '->' . $action . '()'); + } + + $this->app['hook']->listen('action_begin', $call); + + $data = $this->app->invokeReflectMethod($instance, $reflect, $vars); + + return $this->autoResponse($data); + }); + + return $this->app['middleware']->dispatch($this->request, 'controller'); + } +} diff --git a/thinkphp/library/think/route/dispatch/Redirect.php b/thinkphp/library/think/route/dispatch/Redirect.php new file mode 100755 index 0000000..fae2c9a --- /dev/null +++ b/thinkphp/library/think/route/dispatch/Redirect.php @@ -0,0 +1,23 @@ + +// +---------------------------------------------------------------------- + +namespace think\route\dispatch; + +use think\Response; +use think\route\Dispatch; + +class Redirect extends Dispatch +{ + public function exec() + { + return Response::create($this->dispatch, 'redirect')->code($this->code); + } +} diff --git a/thinkphp/library/think/route/dispatch/Response.php b/thinkphp/library/think/route/dispatch/Response.php new file mode 100755 index 0000000..66f4e5a --- /dev/null +++ b/thinkphp/library/think/route/dispatch/Response.php @@ -0,0 +1,23 @@ + +// +---------------------------------------------------------------------- + +namespace think\route\dispatch; + +use think\route\Dispatch; + +class Response extends Dispatch +{ + public function exec() + { + return $this->dispatch; + } + +} diff --git a/thinkphp/library/think/route/dispatch/Url.php b/thinkphp/library/think/route/dispatch/Url.php new file mode 100755 index 0000000..00dc8cc --- /dev/null +++ b/thinkphp/library/think/route/dispatch/Url.php @@ -0,0 +1,169 @@ + +// +---------------------------------------------------------------------- + +namespace think\route\dispatch; + +use think\exception\HttpException; +use think\Loader; +use think\route\Dispatch; + +class Url extends Dispatch +{ + public function init() + { + // 解析默认的URL规则 + $result = $this->parseUrl($this->dispatch); + + return (new Module($this->request, $this->rule, $result))->init(); + } + + public function exec() + {} + + /** + * 解析URL地址 + * @access protected + * @param string $url URL + * @return array + */ + protected function parseUrl($url) + { + $depr = $this->rule->getConfig('pathinfo_depr'); + $bind = $this->rule->getRouter()->getBind(); + + if (!empty($bind) && preg_match('/^[a-z]/is', $bind)) { + $bind = str_replace('/', $depr, $bind); + // 如果有模块/控制器绑定 + $url = $bind . ('.' != substr($bind, -1) ? $depr : '') . ltrim($url, $depr); + } + + list($path, $var) = $this->rule->parseUrlPath($url); + if (empty($path)) { + return [null, null, null]; + } + + // 解析模块 + $module = $this->rule->getConfig('app_multi_module') ? array_shift($path) : null; + + if ($this->param['auto_search']) { + $controller = $this->autoFindController($module, $path); + } else { + // 解析控制器 + $controller = !empty($path) ? array_shift($path) : null; + } + + if ($controller && !preg_match('/^[A-Za-z][\w|\.]*$/', $controller)) { + throw new HttpException(404, 'controller not exists:' . $controller); + } + + // 解析操作 + $action = !empty($path) ? array_shift($path) : null; + + // 解析额外参数 + if ($path) { + if ($this->rule->getConfig('url_param_type')) { + $var += $path; + } else { + preg_replace_callback('/(\w+)\|([^\|]+)/', function ($match) use (&$var) { + $var[$match[1]] = strip_tags($match[2]); + }, implode('|', $path)); + } + } + + $panDomain = $this->request->panDomain(); + + if ($panDomain && $key = array_search('*', $var)) { + // 泛域名赋值 + $var[$key] = $panDomain; + } + + // 设置当前请求的参数 + $this->request->setRouteVars($var); + + // 封装路由 + $route = [$module, $controller, $action]; + + if ($this->hasDefinedRoute($route, $bind)) { + throw new HttpException(404, 'invalid request:' . str_replace('|', $depr, $url)); + } + + return $route; + } + + /** + * 检查URL是否已经定义过路由 + * @access protected + * @param string $route 路由信息 + * @param string $bind 绑定信息 + * @return bool + */ + protected function hasDefinedRoute($route, $bind) + { + list($module, $controller, $action) = $route; + + // 检查地址是否被定义过路由 + $name = strtolower($module . '/' . Loader::parseName($controller, 1) . '/' . $action); + + $name2 = ''; + + if (empty($module) || $module == $bind) { + $name2 = strtolower(Loader::parseName($controller, 1) . '/' . $action); + } + + $host = $this->request->host(true); + + $method = $this->request->method(); + + if ($this->rule->getRouter()->getName($name, $host, $method) || $this->rule->getRouter()->getName($name2, $host, $method)) { + return true; + } + + return false; + } + + /** + * 自动定位控制器类 + * @access protected + * @param string $module 模块名 + * @param array $path URL + * @return string + */ + protected function autoFindController($module, &$path) + { + $dir = $this->app->getAppPath() . ($module ? $module . '/' : '') . $this->rule->getConfig('url_controller_layer'); + $suffix = $this->app->getSuffix() || $this->rule->getConfig('controller_suffix') ? ucfirst($this->rule->getConfig('url_controller_layer')) : ''; + + $item = []; + $find = false; + + foreach ($path as $val) { + $item[] = $val; + $file = $dir . '/' . str_replace('.', '/', $val) . $suffix . '.php'; + $file = pathinfo($file, PATHINFO_DIRNAME) . '/' . Loader::parseName(pathinfo($file, PATHINFO_FILENAME), 1) . '.php'; + if (is_file($file)) { + $find = true; + break; + } else { + $dir .= '/' . Loader::parseName($val); + } + } + + if ($find) { + $controller = implode('.', $item); + $path = array_slice($path, count($item)); + } else { + $controller = array_shift($path); + } + + return $controller; + } + +} diff --git a/thinkphp/library/think/route/dispatch/View.php b/thinkphp/library/think/route/dispatch/View.php new file mode 100755 index 0000000..ea3ef11 --- /dev/null +++ b/thinkphp/library/think/route/dispatch/View.php @@ -0,0 +1,26 @@ + +// +---------------------------------------------------------------------- + +namespace think\route\dispatch; + +use think\Response; +use think\route\Dispatch; + +class View extends Dispatch +{ + public function exec() + { + // 渲染模板输出 + $vars = array_merge($this->request->param(), $this->param); + + return Response::create($this->dispatch, 'view')->assign($vars); + } +} diff --git a/thinkphp/library/think/session/driver/Memcache.php b/thinkphp/library/think/session/driver/Memcache.php new file mode 100755 index 0000000..40d7bb8 --- /dev/null +++ b/thinkphp/library/think/session/driver/Memcache.php @@ -0,0 +1,124 @@ + +// +---------------------------------------------------------------------- + +namespace think\session\driver; + +use SessionHandlerInterface; +use think\Exception; + +class Memcache implements SessionHandlerInterface +{ + protected $handler = null; + protected $config = [ + 'host' => '127.0.0.1', // memcache主机 + 'port' => 11211, // memcache端口 + 'expire' => 3600, // session有效期 + 'timeout' => 0, // 连接超时时间(单位:毫秒) + 'persistent' => true, // 长连接 + 'session_name' => '', // memcache key前缀 + ]; + + public function __construct($config = []) + { + $this->config = array_merge($this->config, $config); + } + + /** + * 打开Session + * @access public + * @param string $savePath + * @param mixed $sessName + */ + public function open($savePath, $sessName) + { + // 检测php环境 + if (!extension_loaded('memcache')) { + throw new Exception('not support:memcache'); + } + + $this->handler = new \Memcache; + + // 支持集群 + $hosts = explode(',', $this->config['host']); + $ports = explode(',', $this->config['port']); + + if (empty($ports[0])) { + $ports[0] = 11211; + } + + // 建立连接 + foreach ((array) $hosts as $i => $host) { + $port = isset($ports[$i]) ? $ports[$i] : $ports[0]; + $this->config['timeout'] > 0 ? + $this->handler->addServer($host, $port, $this->config['persistent'], 1, $this->config['timeout']) : + $this->handler->addServer($host, $port, $this->config['persistent'], 1); + } + + return true; + } + + /** + * 关闭Session + * @access public + */ + public function close() + { + $this->gc(ini_get('session.gc_maxlifetime')); + $this->handler->close(); + $this->handler = null; + + return true; + } + + /** + * 读取Session + * @access public + * @param string $sessID + */ + public function read($sessID) + { + return (string) $this->handler->get($this->config['session_name'] . $sessID); + } + + /** + * 写入Session + * @access public + * @param string $sessID + * @param string $sessData + * @return bool + */ + public function write($sessID, $sessData) + { + return $this->handler->set($this->config['session_name'] . $sessID, $sessData, 0, $this->config['expire']); + } + + /** + * 删除Session + * @access public + * @param string $sessID + * @return bool + */ + public function destroy($sessID) + { + return $this->handler->delete($this->config['session_name'] . $sessID); + } + + /** + * Session 垃圾回收 + * @access public + * @param string $sessMaxLifeTime + * @return true + */ + public function gc($sessMaxLifeTime) + { + return true; + } +} diff --git a/thinkphp/library/think/session/driver/Memcached.php b/thinkphp/library/think/session/driver/Memcached.php new file mode 100755 index 0000000..074b2ff --- /dev/null +++ b/thinkphp/library/think/session/driver/Memcached.php @@ -0,0 +1,135 @@ + +// +---------------------------------------------------------------------- + +namespace think\session\driver; + +use SessionHandlerInterface; +use think\Exception; + +class Memcached implements SessionHandlerInterface +{ + protected $handler = null; + protected $config = [ + 'host' => '127.0.0.1', // memcache主机 + 'port' => 11211, // memcache端口 + 'expire' => 3600, // session有效期 + 'timeout' => 0, // 连接超时时间(单位:毫秒) + 'session_name' => '', // memcache key前缀 + 'username' => '', //账号 + 'password' => '', //密码 + ]; + + public function __construct($config = []) + { + $this->config = array_merge($this->config, $config); + } + + /** + * 打开Session + * @access public + * @param string $savePath + * @param mixed $sessName + */ + public function open($savePath, $sessName) + { + // 检测php环境 + if (!extension_loaded('memcached')) { + throw new Exception('not support:memcached'); + } + + $this->handler = new \Memcached; + + // 设置连接超时时间(单位:毫秒) + if ($this->config['timeout'] > 0) { + $this->handler->setOption(\Memcached::OPT_CONNECT_TIMEOUT, $this->config['timeout']); + } + + // 支持集群 + $hosts = explode(',', $this->config['host']); + $ports = explode(',', $this->config['port']); + + if (empty($ports[0])) { + $ports[0] = 11211; + } + + // 建立连接 + $servers = []; + foreach ((array) $hosts as $i => $host) { + $servers[] = [$host, (isset($ports[$i]) ? $ports[$i] : $ports[0]), 1]; + } + + $this->handler->addServers($servers); + + if ('' != $this->config['username']) { + $this->handler->setOption(\Memcached::OPT_BINARY_PROTOCOL, true); + $this->handler->setSaslAuthData($this->config['username'], $this->config['password']); + } + + return true; + } + + /** + * 关闭Session + * @access public + */ + public function close() + { + $this->gc(ini_get('session.gc_maxlifetime')); + $this->handler->quit(); + $this->handler = null; + + return true; + } + + /** + * 读取Session + * @access public + * @param string $sessID + */ + public function read($sessID) + { + return (string) $this->handler->get($this->config['session_name'] . $sessID); + } + + /** + * 写入Session + * @access public + * @param string $sessID + * @param string $sessData + * @return bool + */ + public function write($sessID, $sessData) + { + return $this->handler->set($this->config['session_name'] . $sessID, $sessData, $this->config['expire']); + } + + /** + * 删除Session + * @access public + * @param string $sessID + * @return bool + */ + public function destroy($sessID) + { + return $this->handler->delete($this->config['session_name'] . $sessID); + } + + /** + * Session 垃圾回收 + * @access public + * @param string $sessMaxLifeTime + * @return true + */ + public function gc($sessMaxLifeTime) + { + return true; + } +} diff --git a/thinkphp/library/think/session/driver/Redis.php b/thinkphp/library/think/session/driver/Redis.php new file mode 100755 index 0000000..646700b --- /dev/null +++ b/thinkphp/library/think/session/driver/Redis.php @@ -0,0 +1,179 @@ + +// +---------------------------------------------------------------------- + +namespace think\session\driver; + +use SessionHandlerInterface; +use think\Exception; + +class Redis implements SessionHandlerInterface +{ + /** @var \Redis */ + protected $handler = null; + protected $config = [ + 'host' => '127.0.0.1', // redis主机 + 'port' => 6379, // redis端口 + 'password' => '', // 密码 + 'select' => 0, // 操作库 + 'expire' => 3600, // 有效期(秒) + 'timeout' => 0, // 超时时间(秒) + 'persistent' => true, // 是否长连接 + 'session_name' => '', // sessionkey前缀 + ]; + + public function __construct($config = []) + { + $this->config = array_merge($this->config, $config); + } + + /** + * 打开Session + * @access public + * @param string $savePath + * @param mixed $sessName + * @return bool + * @throws Exception + */ + public function open($savePath, $sessName) + { + if (extension_loaded('redis')) { + $this->handler = new \Redis; + + // 建立连接 + $func = $this->config['persistent'] ? 'pconnect' : 'connect'; + $this->handler->$func($this->config['host'], $this->config['port'], $this->config['timeout']); + + if ('' != $this->config['password']) { + $this->handler->auth($this->config['password']); + } + + if (0 != $this->config['select']) { + $this->handler->select($this->config['select']); + } + } elseif (class_exists('\Predis\Client')) { + $params = []; + foreach ($this->config as $key => $val) { + if (in_array($key, ['aggregate', 'cluster', 'connections', 'exceptions', 'prefix', 'profile', 'replication'])) { + $params[$key] = $val; + unset($this->config[$key]); + } + } + $this->handler = new \Predis\Client($this->config, $params); + } else { + throw new \BadFunctionCallException('not support: redis'); + } + + return true; + } + + /** + * 关闭Session + * @access public + */ + public function close() + { + $this->gc(ini_get('session.gc_maxlifetime')); + $this->handler->close(); + $this->handler = null; + + return true; + } + + /** + * 读取Session + * @access public + * @param string $sessID + * @return string + */ + public function read($sessID) + { + return (string) $this->handler->get($this->config['session_name'] . $sessID); + } + + /** + * 写入Session + * @access public + * @param string $sessID + * @param string $sessData + * @return bool + */ + public function write($sessID, $sessData) + { + if ($this->config['expire'] > 0) { + $result = $this->handler->setex($this->config['session_name'] . $sessID, $this->config['expire'], $sessData); + } else { + $result = $this->handler->set($this->config['session_name'] . $sessID, $sessData); + } + + return $result ? true : false; + } + + /** + * 删除Session + * @access public + * @param string $sessID + * @return bool + */ + public function destroy($sessID) + { + return $this->handler->delete($this->config['session_name'] . $sessID) > 0; + } + + /** + * Session 垃圾回收 + * @access public + * @param string $sessMaxLifeTime + * @return bool + */ + public function gc($sessMaxLifeTime) + { + return true; + } + + /** + * Redis Session 驱动的加锁机制 + * @access public + * @param string $sessID 用于加锁的sessID + * @param integer $timeout 默认过期时间 + * @return bool + */ + public function lock($sessID, $timeout = 10) + { + if (null == $this->handler) { + $this->open('', ''); + } + + $lockKey = 'LOCK_PREFIX_' . $sessID; + // 使用setnx操作加锁 + $isLock = $this->handler->setnx($lockKey, 1); + if ($isLock) { + // 设置过期时间,防止死任务的出现 + $this->handler->expire($lockKey, $timeout); + return true; + } + + return false; + } + + /** + * Redis Session 驱动的解锁机制 + * @access public + * @param string $sessID 用于解锁的sessID + */ + public function unlock($sessID) + { + if (null == $this->handler) { + $this->open('', ''); + } + + $this->handler->del('LOCK_PREFIX_' . $sessID); + } +} diff --git a/thinkphp/library/think/template/TagLib.php b/thinkphp/library/think/template/TagLib.php new file mode 100755 index 0000000..bbbb2c0 --- /dev/null +++ b/thinkphp/library/think/template/TagLib.php @@ -0,0 +1,351 @@ + +// +---------------------------------------------------------------------- + +namespace think\template; + +use think\Exception; + +/** + * ThinkPHP标签库TagLib解析基类 + * @category Think + * @package Think + * @subpackage Template + * @author liu21st + */ +class TagLib +{ + + /** + * 标签库定义XML文件 + * @var string + * @access protected + */ + protected $xml = ''; + protected $tags = []; // 标签定义 + /** + * 标签库名称 + * @var string + * @access protected + */ + protected $tagLib = ''; + + /** + * 标签库标签列表 + * @var array + * @access protected + */ + protected $tagList = []; + + /** + * 标签库分析数组 + * @var array + * @access protected + */ + protected $parse = []; + + /** + * 标签库是否有效 + * @var bool + * @access protected + */ + protected $valid = false; + + /** + * 当前模板对象 + * @var object + * @access protected + */ + protected $tpl; + + protected $comparison = [' nheq ' => ' !== ', ' heq ' => ' === ', ' neq ' => ' != ', ' eq ' => ' == ', ' egt ' => ' >= ', ' gt ' => ' > ', ' elt ' => ' <= ', ' lt ' => ' < ']; + + /** + * 架构函数 + * @access public + * @param \stdClass $template 模板引擎对象 + */ + public function __construct($template) + { + $this->tpl = $template; + } + + /** + * 按签标库替换页面中的标签 + * @access public + * @param string $content 模板内容 + * @param string $lib 标签库名 + * @return void + */ + public function parseTag(&$content, $lib = '') + { + $tags = []; + $lib = $lib ? strtolower($lib) . ':' : ''; + + foreach ($this->tags as $name => $val) { + $close = !isset($val['close']) || $val['close'] ? 1 : 0; + $tags[$close][$lib . $name] = $name; + if (isset($val['alias'])) { + // 别名设置 + $array = (array) $val['alias']; + foreach (explode(',', $array[0]) as $v) { + $tags[$close][$lib . $v] = $name; + } + } + } + + // 闭合标签 + if (!empty($tags[1])) { + $nodes = []; + $regex = $this->getRegex(array_keys($tags[1]), 1); + if (preg_match_all($regex, $content, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE)) { + $right = []; + foreach ($matches as $match) { + if ('' == $match[1][0]) { + $name = strtolower($match[2][0]); + // 如果有没闭合的标签头则取出最后一个 + if (!empty($right[$name])) { + // $match[0][1]为标签结束符在模板中的位置 + $nodes[$match[0][1]] = [ + 'name' => $name, + 'begin' => array_pop($right[$name]), // 标签开始符 + 'end' => $match[0], // 标签结束符 + ]; + } + } else { + // 标签头压入栈 + $right[strtolower($match[1][0])][] = $match[0]; + } + } + unset($right, $matches); + // 按标签在模板中的位置从后向前排序 + krsort($nodes); + } + + $break = ''; + if ($nodes) { + $beginArray = []; + // 标签替换 从后向前 + foreach ($nodes as $pos => $node) { + // 对应的标签名 + $name = $tags[1][$node['name']]; + $alias = $lib . $name != $node['name'] ? ($lib ? strstr($node['name'], $lib) : $node['name']) : ''; + + // 解析标签属性 + $attrs = $this->parseAttr($node['begin'][0], $name, $alias); + $method = 'tag' . $name; + + // 读取标签库中对应的标签内容 replace[0]用来替换标签头,replace[1]用来替换标签尾 + $replace = explode($break, $this->$method($attrs, $break)); + + if (count($replace) > 1) { + while ($beginArray) { + $begin = end($beginArray); + // 判断当前标签尾的位置是否在栈中最后一个标签头的后面,是则为子标签 + if ($node['end'][1] > $begin['pos']) { + break; + } else { + // 不为子标签时,取出栈中最后一个标签头 + $begin = array_pop($beginArray); + // 替换标签头部 + $content = substr_replace($content, $begin['str'], $begin['pos'], $begin['len']); + } + } + // 替换标签尾部 + $content = substr_replace($content, $replace[1], $node['end'][1], strlen($node['end'][0])); + // 把标签头压入栈 + $beginArray[] = ['pos' => $node['begin'][1], 'len' => strlen($node['begin'][0]), 'str' => $replace[0]]; + } + } + + while ($beginArray) { + $begin = array_pop($beginArray); + // 替换标签头部 + $content = substr_replace($content, $begin['str'], $begin['pos'], $begin['len']); + } + } + } + // 自闭合标签 + if (!empty($tags[0])) { + $regex = $this->getRegex(array_keys($tags[0]), 0); + $content = preg_replace_callback($regex, function ($matches) use (&$tags, &$lib) { + // 对应的标签名 + $name = $tags[0][strtolower($matches[1])]; + $alias = $lib . $name != $matches[1] ? ($lib ? strstr($matches[1], $lib) : $matches[1]) : ''; + // 解析标签属性 + $attrs = $this->parseAttr($matches[0], $name, $alias); + $method = 'tag' . $name; + return $this->$method($attrs, ''); + }, $content); + } + + return; + } + + /** + * 按标签生成正则 + * @access public + * @param array|string $tags 标签名 + * @param boolean $close 是否为闭合标签 + * @return string + */ + public function getRegex($tags, $close) + { + $begin = $this->tpl->config('taglib_begin'); + $end = $this->tpl->config('taglib_end'); + $single = strlen(ltrim($begin, '\\')) == 1 && strlen(ltrim($end, '\\')) == 1 ? true : false; + $tagName = is_array($tags) ? implode('|', $tags) : $tags; + + if ($single) { + if ($close) { + // 如果是闭合标签 + $regex = $begin . '(?:(' . $tagName . ')\b(?>[^' . $end . ']*)|\/(' . $tagName . '))' . $end; + } else { + $regex = $begin . '(' . $tagName . ')\b(?>[^' . $end . ']*)' . $end; + } + } else { + if ($close) { + // 如果是闭合标签 + $regex = $begin . '(?:(' . $tagName . ')\b(?>(?:(?!' . $end . ').)*)|\/(' . $tagName . '))' . $end; + } else { + $regex = $begin . '(' . $tagName . ')\b(?>(?:(?!' . $end . ').)*)' . $end; + } + } + + return '/' . $regex . '/is'; + } + + /** + * 分析标签属性 正则方式 + * @access public + * @param string $str 标签属性字符串 + * @param string $name 标签名 + * @param string $alias 别名 + * @return array + */ + public function parseAttr($str, $name, $alias = '') + { + $regex = '/\s+(?>(?P[\w-]+)\s*)=(?>\s*)([\"\'])(?P(?:(?!\\2).)*)\\2/is'; + $result = []; + + if (preg_match_all($regex, $str, $matches)) { + foreach ($matches['name'] as $key => $val) { + $result[$val] = $matches['value'][$key]; + } + + if (!isset($this->tags[$name])) { + // 检测是否存在别名定义 + foreach ($this->tags as $key => $val) { + if (isset($val['alias'])) { + $array = (array) $val['alias']; + if (in_array($name, explode(',', $array[0]))) { + $tag = $val; + $type = !empty($array[1]) ? $array[1] : 'type'; + $result[$type] = $name; + break; + } + } + } + } else { + $tag = $this->tags[$name]; + // 设置了标签别名 + if (!empty($alias) && isset($tag['alias'])) { + $type = !empty($tag['alias'][1]) ? $tag['alias'][1] : 'type'; + $result[$type] = $alias; + } + } + + if (!empty($tag['must'])) { + $must = explode(',', $tag['must']); + foreach ($must as $name) { + if (!isset($result[$name])) { + throw new Exception('tag attr must:' . $name); + } + } + } + } else { + // 允许直接使用表达式的标签 + if (!empty($this->tags[$name]['expression'])) { + static $_taglibs; + if (!isset($_taglibs[$name])) { + $_taglibs[$name][0] = strlen($this->tpl->config('taglib_begin_origin') . $name); + $_taglibs[$name][1] = strlen($this->tpl->config('taglib_end_origin')); + } + $result['expression'] = substr($str, $_taglibs[$name][0], -$_taglibs[$name][1]); + // 清除自闭合标签尾部/ + $result['expression'] = rtrim($result['expression'], '/'); + $result['expression'] = trim($result['expression']); + } elseif (empty($this->tags[$name]) || !empty($this->tags[$name]['attr'])) { + throw new Exception('tag error:' . $name); + } + } + + return $result; + } + + /** + * 解析条件表达式 + * @access public + * @param string $condition 表达式标签内容 + * @return string + */ + public function parseCondition($condition) + { + if (!strpos($condition, '::') && strpos($condition, ':')) { + $condition = ' ' . substr(strstr($condition, ':'), 1); + } + + $condition = str_ireplace(array_keys($this->comparison), array_values($this->comparison), $condition); + $this->tpl->parseVar($condition); + + // $this->tpl->parseVarFunction($condition); // XXX: 此句能解析表达式中用|分隔的函数,但表达式中如果有|、||这样的逻辑运算就产生了歧异 + return $condition; + } + + /** + * 自动识别构建变量 + * @access public + * @param string $name 变量描述 + * @return string + */ + public function autoBuildVar(&$name) + { + $flag = substr($name, 0, 1); + + if (':' == $flag) { + // 以:开头为函数调用,解析前去掉: + $name = substr($name, 1); + } elseif ('$' != $flag && preg_match('/[a-zA-Z_]/', $flag)) { + // XXX: 这句的写法可能还需要改进 + // 常量不需要解析 + if (defined($name)) { + return $name; + } + + // 不以$开头并且也不是常量,自动补上$前缀 + $name = '$' . $name; + } + + $this->tpl->parseVar($name); + $this->tpl->parseVarFunction($name, false); + + return $name; + } + + /** + * 获取标签列表 + * @access public + * @return array + */ + public function getTags() + { + return $this->tags; + } +} diff --git a/thinkphp/library/think/template/driver/File.php b/thinkphp/library/think/template/driver/File.php new file mode 100755 index 0000000..3b96a0f --- /dev/null +++ b/thinkphp/library/think/template/driver/File.php @@ -0,0 +1,83 @@ + +// +---------------------------------------------------------------------- + +namespace think\template\driver; + +use think\Exception; + +class File +{ + protected $cacheFile; + + /** + * 写入编译缓存 + * @access public + * @param string $cacheFile 缓存的文件名 + * @param string $content 缓存的内容 + * @return void|array + */ + public function write($cacheFile, $content) + { + // 检测模板目录 + $dir = dirname($cacheFile); + + if (!is_dir($dir)) { + mkdir($dir, 0755, true); + } + + // 生成模板缓存文件 + if (false === file_put_contents($cacheFile, $content)) { + throw new Exception('cache write error:' . $cacheFile, 11602); + } + } + + /** + * 读取编译编译 + * @access public + * @param string $cacheFile 缓存的文件名 + * @param array $vars 变量数组 + * @return void + */ + public function read($cacheFile, $vars = []) + { + $this->cacheFile = $cacheFile; + + if (!empty($vars) && is_array($vars)) { + // 模板阵列变量分解成为独立变量 + extract($vars, EXTR_OVERWRITE); + } + + //载入模版缓存文件 + include $this->cacheFile; + } + + /** + * 检查编译缓存是否有效 + * @access public + * @param string $cacheFile 缓存的文件名 + * @param int $cacheTime 缓存时间 + * @return boolean + */ + public function check($cacheFile, $cacheTime) + { + // 缓存文件不存在, 直接返回false + if (!file_exists($cacheFile)) { + return false; + } + + if (0 != $cacheTime && time() > filemtime($cacheFile) + $cacheTime) { + // 缓存是否在有效期 + return false; + } + + return true; + } +} diff --git a/thinkphp/library/think/template/taglib/Cx.php b/thinkphp/library/think/template/taglib/Cx.php new file mode 100755 index 0000000..ad741f2 --- /dev/null +++ b/thinkphp/library/think/template/taglib/Cx.php @@ -0,0 +1,724 @@ + +// +---------------------------------------------------------------------- + +namespace think\template\taglib; + +use think\template\TagLib; + +/** + * CX标签库解析类 + * @category Think + * @package Think + * @subpackage Driver.Taglib + * @author liu21st + */ +class Cx extends Taglib +{ + + // 标签定义 + protected $tags = [ + // 标签定义: attr 属性列表 close 是否闭合(0 或者1 默认1) alias 标签别名 level 嵌套层次 + 'php' => ['attr' => ''], + 'volist' => ['attr' => 'name,id,offset,length,key,mod', 'alias' => 'iterate'], + 'foreach' => ['attr' => 'name,id,item,key,offset,length,mod', 'expression' => true], + 'if' => ['attr' => 'condition', 'expression' => true], + 'elseif' => ['attr' => 'condition', 'close' => 0, 'expression' => true], + 'else' => ['attr' => '', 'close' => 0], + 'switch' => ['attr' => 'name', 'expression' => true], + 'case' => ['attr' => 'value,break', 'expression' => true], + 'default' => ['attr' => '', 'close' => 0], + 'compare' => ['attr' => 'name,value,type', 'alias' => ['eq,equal,notequal,neq,gt,lt,egt,elt,heq,nheq', 'type']], + 'range' => ['attr' => 'name,value,type', 'alias' => ['in,notin,between,notbetween', 'type']], + 'empty' => ['attr' => 'name'], + 'notempty' => ['attr' => 'name'], + 'present' => ['attr' => 'name'], + 'notpresent' => ['attr' => 'name'], + 'defined' => ['attr' => 'name'], + 'notdefined' => ['attr' => 'name'], + 'load' => ['attr' => 'file,href,type,value,basepath', 'close' => 0, 'alias' => ['import,css,js', 'type']], + 'assign' => ['attr' => 'name,value', 'close' => 0], + 'define' => ['attr' => 'name,value', 'close' => 0], + 'for' => ['attr' => 'start,end,name,comparison,step'], + 'url' => ['attr' => 'link,vars,suffix,domain', 'close' => 0, 'expression' => true], + 'function' => ['attr' => 'name,vars,use,call'], + ]; + + /** + * php标签解析 + * 格式: + * {php}echo $name{/php} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagPhp($tag, $content) + { + $parseStr = ''; + return $parseStr; + } + + /** + * volist标签解析 循环输出数据集 + * 格式: + * {volist name="userList" id="user" empty=""} + * {user.username} + * {user.email} + * {/volist} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string|void + */ + public function tagVolist($tag, $content) + { + $name = $tag['name']; + $id = $tag['id']; + $empty = isset($tag['empty']) ? $tag['empty'] : ''; + $key = !empty($tag['key']) ? $tag['key'] : 'i'; + $mod = isset($tag['mod']) ? $tag['mod'] : '2'; + $offset = !empty($tag['offset']) && is_numeric($tag['offset']) ? intval($tag['offset']) : 0; + $length = !empty($tag['length']) && is_numeric($tag['length']) ? intval($tag['length']) : 'null'; + // 允许使用函数设定数据集 {$vo.name} + $parseStr = 'autoBuildVar($name); + $parseStr .= '$_result=' . $name . ';'; + $name = '$_result'; + } else { + $name = $this->autoBuildVar($name); + } + + $parseStr .= 'if(is_array(' . $name . ') || ' . $name . ' instanceof \think\Collection || ' . $name . ' instanceof \think\Paginator): $' . $key . ' = 0;'; + + // 设置了输出数组长度 + if (0 != $offset || 'null' != $length) { + $parseStr .= '$__LIST__ = is_array(' . $name . ') ? array_slice(' . $name . ',' . $offset . ',' . $length . ', true) : ' . $name . '->slice(' . $offset . ',' . $length . ', true); '; + } else { + $parseStr .= ' $__LIST__ = ' . $name . ';'; + } + + $parseStr .= 'if( count($__LIST__)==0 ) : echo "' . $empty . '" ;'; + $parseStr .= 'else: '; + $parseStr .= 'foreach($__LIST__ as $key=>$' . $id . '): '; + $parseStr .= '$mod = ($' . $key . ' % ' . $mod . ' );'; + $parseStr .= '++$' . $key . ';?>'; + $parseStr .= $content; + $parseStr .= ''; + + if (!empty($parseStr)) { + return $parseStr; + } + + return; + } + + /** + * foreach标签解析 循环输出数据集 + * 格式: + * {foreach name="userList" id="user" key="key" index="i" mod="2" offset="3" length="5" empty=""} + * {user.username} + * {/foreach} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string|void + */ + public function tagForeach($tag, $content) + { + // 直接使用表达式 + if (!empty($tag['expression'])) { + $expression = ltrim(rtrim($tag['expression'], ')'), '('); + $expression = $this->autoBuildVar($expression); + $parseStr = ''; + $parseStr .= $content; + $parseStr .= ''; + return $parseStr; + } + + $name = $tag['name']; + $key = !empty($tag['key']) ? $tag['key'] : 'key'; + $item = !empty($tag['id']) ? $tag['id'] : $tag['item']; + $empty = isset($tag['empty']) ? $tag['empty'] : ''; + $offset = !empty($tag['offset']) && is_numeric($tag['offset']) ? intval($tag['offset']) : 0; + $length = !empty($tag['length']) && is_numeric($tag['length']) ? intval($tag['length']) : 'null'; + + $parseStr = 'autoBuildVar($name); + $parseStr .= $var . '=' . $name . '; '; + $name = $var; + } else { + $name = $this->autoBuildVar($name); + } + + $parseStr .= 'if(is_array(' . $name . ') || ' . $name . ' instanceof \think\Collection || ' . $name . ' instanceof \think\Paginator): '; + + // 设置了输出数组长度 + if (0 != $offset || 'null' != $length) { + if (!isset($var)) { + $var = '$_' . uniqid(); + } + $parseStr .= $var . ' = is_array(' . $name . ') ? array_slice(' . $name . ',' . $offset . ',' . $length . ', true) : ' . $name . '->slice(' . $offset . ',' . $length . ', true); '; + } else { + $var = &$name; + } + + $parseStr .= 'if( count(' . $var . ')==0 ) : echo "' . $empty . '" ;'; + $parseStr .= 'else: '; + + // 设置了索引项 + if (isset($tag['index'])) { + $index = $tag['index']; + $parseStr .= '$' . $index . '=0; '; + } + + $parseStr .= 'foreach(' . $var . ' as $' . $key . '=>$' . $item . '): '; + + // 设置了索引项 + if (isset($tag['index'])) { + $index = $tag['index']; + if (isset($tag['mod'])) { + $mod = (int) $tag['mod']; + $parseStr .= '$mod = ($' . $index . ' % ' . $mod . '); '; + } + $parseStr .= '++$' . $index . '; '; + } + + $parseStr .= '?>'; + // 循环体中的内容 + $parseStr .= $content; + $parseStr .= ''; + + if (!empty($parseStr)) { + return $parseStr; + } + + return; + } + + /** + * if标签解析 + * 格式: + * {if condition=" $a eq 1"} + * {elseif condition="$a eq 2" /} + * {else /} + * {/if} + * 表达式支持 eq neq gt egt lt elt == > >= < <= or and || && + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagIf($tag, $content) + { + $condition = !empty($tag['expression']) ? $tag['expression'] : $tag['condition']; + $condition = $this->parseCondition($condition); + $parseStr = '' . $content . ''; + + return $parseStr; + } + + /** + * elseif标签解析 + * 格式:见if标签 + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagElseif($tag, $content) + { + $condition = !empty($tag['expression']) ? $tag['expression'] : $tag['condition']; + $condition = $this->parseCondition($condition); + $parseStr = ''; + + return $parseStr; + } + + /** + * else标签解析 + * 格式:见if标签 + * @access public + * @param array $tag 标签属性 + * @return string + */ + public function tagElse($tag) + { + $parseStr = ''; + + return $parseStr; + } + + /** + * switch标签解析 + * 格式: + * {switch name="a.name"} + * {case value="1" break="false"}1{/case} + * {case value="2" }2{/case} + * {default /}other + * {/switch} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagSwitch($tag, $content) + { + $name = !empty($tag['expression']) ? $tag['expression'] : $tag['name']; + $name = $this->autoBuildVar($name); + $parseStr = '' . $content . ''; + + return $parseStr; + } + + /** + * case标签解析 需要配合switch才有效 + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagCase($tag, $content) + { + $value = isset($tag['expression']) ? $tag['expression'] : $tag['value']; + $flag = substr($value, 0, 1); + + if ('$' == $flag || ':' == $flag) { + $value = $this->autoBuildVar($value); + $value = 'case ' . $value . ':'; + } elseif (strpos($value, '|')) { + $values = explode('|', $value); + $value = ''; + foreach ($values as $val) { + $value .= 'case "' . addslashes($val) . '":'; + } + } else { + $value = 'case "' . $value . '":'; + } + + $parseStr = '' . $content; + $isBreak = isset($tag['break']) ? $tag['break'] : ''; + + if ('' == $isBreak || $isBreak) { + $parseStr .= ''; + } + + return $parseStr; + } + + /** + * default标签解析 需要配合switch才有效 + * 使用: {default /}ddfdf + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagDefault($tag) + { + $parseStr = ''; + + return $parseStr; + } + + /** + * compare标签解析 + * 用于值的比较 支持 eq neq gt lt egt elt heq nheq 默认是eq + * 格式: {compare name="" type="eq" value="" }content{/compare} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagCompare($tag, $content) + { + $name = $tag['name']; + $value = $tag['value']; + $type = isset($tag['type']) ? $tag['type'] : 'eq'; // 比较类型 + $name = $this->autoBuildVar($name); + $flag = substr($value, 0, 1); + + if ('$' == $flag || ':' == $flag) { + $value = $this->autoBuildVar($value); + } else { + $value = '\'' . $value . '\''; + } + + switch ($type) { + case 'equal': + $type = 'eq'; + break; + case 'notequal': + $type = 'neq'; + break; + } + $type = $this->parseCondition(' ' . $type . ' '); + $parseStr = '' . $content . ''; + + return $parseStr; + } + + /** + * range标签解析 + * 如果某个变量存在于某个范围 则输出内容 type= in 表示在范围内 否则表示在范围外 + * 格式: {range name="var|function" value="val" type='in|notin' }content{/range} + * example: {range name="a" value="1,2,3" type='in' }content{/range} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagRange($tag, $content) + { + $name = $tag['name']; + $value = $tag['value']; + $type = isset($tag['type']) ? $tag['type'] : 'in'; // 比较类型 + + $name = $this->autoBuildVar($name); + $flag = substr($value, 0, 1); + + if ('$' == $flag || ':' == $flag) { + $value = $this->autoBuildVar($value); + $str = 'is_array(' . $value . ')?' . $value . ':explode(\',\',' . $value . ')'; + } else { + $value = '"' . $value . '"'; + $str = 'explode(\',\',' . $value . ')'; + } + + if ('between' == $type) { + $parseStr = '= $_RANGE_VAR_[0] && ' . $name . '<= $_RANGE_VAR_[1]):?>' . $content . ''; + } elseif ('notbetween' == $type) { + $parseStr = '$_RANGE_VAR_[1]):?>' . $content . ''; + } else { + $fun = ('in' == $type) ? 'in_array' : '!in_array'; + $parseStr = '' . $content . ''; + } + + return $parseStr; + } + + /** + * present标签解析 + * 如果某个变量已经设置 则输出内容 + * 格式: {present name="" }content{/present} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagPresent($tag, $content) + { + $name = $tag['name']; + $name = $this->autoBuildVar($name); + $parseStr = '' . $content . ''; + + return $parseStr; + } + + /** + * notpresent标签解析 + * 如果某个变量没有设置,则输出内容 + * 格式: {notpresent name="" }content{/notpresent} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagNotpresent($tag, $content) + { + $name = $tag['name']; + $name = $this->autoBuildVar($name); + $parseStr = '' . $content . ''; + + return $parseStr; + } + + /** + * empty标签解析 + * 如果某个变量为empty 则输出内容 + * 格式: {empty name="" }content{/empty} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagEmpty($tag, $content) + { + $name = $tag['name']; + $name = $this->autoBuildVar($name); + $parseStr = 'isEmpty())): ?>' . $content . ''; + + return $parseStr; + } + + /** + * notempty标签解析 + * 如果某个变量不为empty 则输出内容 + * 格式: {notempty name="" }content{/notempty} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagNotempty($tag, $content) + { + $name = $tag['name']; + $name = $this->autoBuildVar($name); + $parseStr = 'isEmpty()))): ?>' . $content . ''; + + return $parseStr; + } + + /** + * 判断是否已经定义了该常量 + * {defined name='TXT'}已定义{/defined} + * @access public + * @param array $tag + * @param string $content + * @return string + */ + public function tagDefined($tag, $content) + { + $name = $tag['name']; + $parseStr = '' . $content . ''; + + return $parseStr; + } + + /** + * 判断是否没有定义了该常量 + * {notdefined name='TXT'}已定义{/notdefined} + * @access public + * @param array $tag + * @param string $content + * @return string + */ + public function tagNotdefined($tag, $content) + { + $name = $tag['name']; + $parseStr = '' . $content . ''; + + return $parseStr; + } + + /** + * load 标签解析 {load file="/static/js/base.js" /} + * 格式:{load file="/static/css/base.css" /} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagLoad($tag, $content) + { + $file = isset($tag['file']) ? $tag['file'] : $tag['href']; + $type = isset($tag['type']) ? strtolower($tag['type']) : ''; + + $parseStr = ''; + $endStr = ''; + + // 判断是否存在加载条件 允许使用函数判断(默认为isset) + if (isset($tag['value'])) { + $name = $tag['value']; + $name = $this->autoBuildVar($name); + $name = 'isset(' . $name . ')'; + $parseStr .= ''; + $endStr = ''; + } + + // 文件方式导入 + $array = explode(',', $file); + + foreach ($array as $val) { + $type = strtolower(substr(strrchr($val, '.'), 1)); + switch ($type) { + case 'js': + $parseStr .= ''; + break; + case 'css': + $parseStr .= ''; + break; + case 'php': + $parseStr .= ''; + break; + } + } + + return $parseStr . $endStr; + } + + /** + * assign标签解析 + * 在模板中给某个变量赋值 支持变量赋值 + * 格式: {assign name="" value="" /} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagAssign($tag, $content) + { + $name = $this->autoBuildVar($tag['name']); + $flag = substr($tag['value'], 0, 1); + + if ('$' == $flag || ':' == $flag) { + $value = $this->autoBuildVar($tag['value']); + } else { + $value = '\'' . $tag['value'] . '\''; + } + + $parseStr = ''; + + return $parseStr; + } + + /** + * define标签解析 + * 在模板中定义常量 支持变量赋值 + * 格式: {define name="" value="" /} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagDefine($tag, $content) + { + $name = '\'' . $tag['name'] . '\''; + $flag = substr($tag['value'], 0, 1); + + if ('$' == $flag || ':' == $flag) { + $value = $this->autoBuildVar($tag['value']); + } else { + $value = '\'' . $tag['value'] . '\''; + } + + $parseStr = ''; + + return $parseStr; + } + + /** + * for标签解析 + * 格式: + * {for start="" end="" comparison="" step="" name=""} + * content + * {/for} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagFor($tag, $content) + { + //设置默认值 + $start = 0; + $end = 0; + $step = 1; + $comparison = 'lt'; + $name = 'i'; + $rand = rand(); //添加随机数,防止嵌套变量冲突 + + //获取属性 + foreach ($tag as $key => $value) { + $value = trim($value); + $flag = substr($value, 0, 1); + if ('$' == $flag || ':' == $flag) { + $value = $this->autoBuildVar($value); + } + + switch ($key) { + case 'start': + $start = $value; + break; + case 'end': + $end = $value; + break; + case 'step': + $step = $value; + break; + case 'comparison': + $comparison = $value; + break; + case 'name': + $name = $value; + break; + } + } + + $parseStr = 'parseCondition('$' . $name . ' ' . $comparison . ' $__FOR_END_' . $rand . '__') . ';$' . $name . '+=' . $step . '){ ?>'; + $parseStr .= $content; + $parseStr .= ''; + + return $parseStr; + } + + /** + * url函数的tag标签 + * 格式:{url link="模块/控制器/方法" vars="参数" suffix="true或者false 是否带有后缀" domain="true或者false 是否携带域名" /} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagUrl($tag, $content) + { + $url = isset($tag['link']) ? $tag['link'] : ''; + $vars = isset($tag['vars']) ? $tag['vars'] : ''; + $suffix = isset($tag['suffix']) ? $tag['suffix'] : 'true'; + $domain = isset($tag['domain']) ? $tag['domain'] : 'false'; + + return ''; + } + + /** + * function标签解析 匿名函数,可实现递归 + * 使用: + * {function name="func" vars="$data" call="$list" use="&$a,&$b"} + * {if is_array($data)} + * {foreach $data as $val} + * {~func($val) /} + * {/foreach} + * {else /} + * {$data} + * {/if} + * {/function} + * @access public + * @param array $tag 标签属性 + * @param string $content 标签内容 + * @return string + */ + public function tagFunction($tag, $content) + { + $name = !empty($tag['name']) ? $tag['name'] : 'func'; + $vars = !empty($tag['vars']) ? $tag['vars'] : ''; + $call = !empty($tag['call']) ? $tag['call'] : ''; + $use = ['&$' . $name]; + + if (!empty($tag['use'])) { + foreach (explode(',', $tag['use']) as $val) { + $use[] = '&' . ltrim(trim($val), '&'); + } + } + + $parseStr = '' . $content . '' : '?>'; + + return $parseStr; + } +} diff --git a/thinkphp/library/think/validate/ValidateRule.php b/thinkphp/library/think/validate/ValidateRule.php new file mode 100755 index 0000000..7cd7017 --- /dev/null +++ b/thinkphp/library/think/validate/ValidateRule.php @@ -0,0 +1,171 @@ + +// +---------------------------------------------------------------------- + +namespace think\validate; + +/** + * Class ValidateRule + * @package think\validate + * @method ValidateRule confirm(mixed $rule, string $msg = '') static 验证是否和某个字段的值一致 + * @method ValidateRule different(mixed $rule, string $msg = '') static 验证是否和某个字段的值是否不同 + * @method ValidateRule egt(mixed $rule, string $msg = '') static 验证是否大于等于某个值 + * @method ValidateRule gt(mixed $rule, string $msg = '') static 验证是否大于某个值 + * @method ValidateRule elt(mixed $rule, string $msg = '') static 验证是否小于等于某个值 + * @method ValidateRule lt(mixed $rule, string $msg = '') static 验证是否小于某个值 + * @method ValidateRule eg(mixed $rule, string $msg = '') static 验证是否等于某个值 + * @method ValidateRule in(mixed $rule, string $msg = '') static 验证是否在范围内 + * @method ValidateRule notIn(mixed $rule, string $msg = '') static 验证是否不在某个范围 + * @method ValidateRule between(mixed $rule, string $msg = '') static 验证是否在某个区间 + * @method ValidateRule notBetween(mixed $rule, string $msg = '') static 验证是否不在某个区间 + * @method ValidateRule length(mixed $rule, string $msg = '') static 验证数据长度 + * @method ValidateRule max(mixed $rule, string $msg = '') static 验证数据最大长度 + * @method ValidateRule min(mixed $rule, string $msg = '') static 验证数据最小长度 + * @method ValidateRule after(mixed $rule, string $msg = '') static 验证日期 + * @method ValidateRule before(mixed $rule, string $msg = '') static 验证日期 + * @method ValidateRule expire(mixed $rule, string $msg = '') static 验证有效期 + * @method ValidateRule allowIp(mixed $rule, string $msg = '') static 验证IP许可 + * @method ValidateRule denyIp(mixed $rule, string $msg = '') static 验证IP禁用 + * @method ValidateRule regex(mixed $rule, string $msg = '') static 使用正则验证数据 + * @method ValidateRule token(mixed $rule='__token__', string $msg = '') static 验证表单令牌 + * @method ValidateRule is(mixed $rule, string $msg = '') static 验证字段值是否为有效格式 + * @method ValidateRule isRequire(mixed $rule = null, string $msg = '') static 验证字段必须 + * @method ValidateRule isNumber(mixed $rule = null, string $msg = '') static 验证字段值是否为数字 + * @method ValidateRule isArray(mixed $rule = null, string $msg = '') static 验证字段值是否为数组 + * @method ValidateRule isInteger(mixed $rule = null, string $msg = '') static 验证字段值是否为整形 + * @method ValidateRule isFloat(mixed $rule = null, string $msg = '') static 验证字段值是否为浮点数 + * @method ValidateRule isMobile(mixed $rule = null, string $msg = '') static 验证字段值是否为手机 + * @method ValidateRule isIdCard(mixed $rule = null, string $msg = '') static 验证字段值是否为身份证号码 + * @method ValidateRule isChs(mixed $rule = null, string $msg = '') static 验证字段值是否为中文 + * @method ValidateRule isChsDash(mixed $rule = null, string $msg = '') static 验证字段值是否为中文字母及下划线 + * @method ValidateRule isChsAlpha(mixed $rule = null, string $msg = '') static 验证字段值是否为中文和字母 + * @method ValidateRule isChsAlphaNum(mixed $rule = null, string $msg = '') static 验证字段值是否为中文字母和数字 + * @method ValidateRule isDate(mixed $rule = null, string $msg = '') static 验证字段值是否为有效格式 + * @method ValidateRule isBool(mixed $rule = null, string $msg = '') static 验证字段值是否为布尔值 + * @method ValidateRule isAlpha(mixed $rule = null, string $msg = '') static 验证字段值是否为字母 + * @method ValidateRule isAlphaDash(mixed $rule = null, string $msg = '') static 验证字段值是否为字母和下划线 + * @method ValidateRule isAlphaNum(mixed $rule = null, string $msg = '') static 验证字段值是否为字母和数字 + * @method ValidateRule isAccepted(mixed $rule = null, string $msg = '') static 验证字段值是否为yes, on, 或是 1 + * @method ValidateRule isEmail(mixed $rule = null, string $msg = '') static 验证字段值是否为有效邮箱格式 + * @method ValidateRule isUrl(mixed $rule = null, string $msg = '') static 验证字段值是否为有效URL地址 + * @method ValidateRule activeUrl(mixed $rule, string $msg = '') static 验证是否为合格的域名或者IP + * @method ValidateRule ip(mixed $rule, string $msg = '') static 验证是否有效IP + * @method ValidateRule fileExt(mixed $rule, string $msg = '') static 验证文件后缀 + * @method ValidateRule fileMime(mixed $rule, string $msg = '') static 验证文件类型 + * @method ValidateRule fileSize(mixed $rule, string $msg = '') static 验证文件大小 + * @method ValidateRule image(mixed $rule, string $msg = '') static 验证图像文件 + * @method ValidateRule method(mixed $rule, string $msg = '') static 验证请求类型 + * @method ValidateRule dateFormat(mixed $rule, string $msg = '') static 验证时间和日期是否符合指定格式 + * @method ValidateRule unique(mixed $rule, string $msg = '') static 验证是否唯一 + * @method ValidateRule behavior(mixed $rule, string $msg = '') static 使用行为类验证 + * @method ValidateRule filter(mixed $rule, string $msg = '') static 使用filter_var方式验证 + * @method ValidateRule requireIf(mixed $rule, string $msg = '') static 验证某个字段等于某个值的时候必须 + * @method ValidateRule requireCallback(mixed $rule, string $msg = '') static 通过回调方法验证某个字段是否必须 + * @method ValidateRule requireWith(mixed $rule, string $msg = '') static 验证某个字段有值的情况下必须 + * @method ValidateRule must(mixed $rule = null, string $msg = '') static 必须验证 + */ +class ValidateRule +{ + // 验证字段的名称 + protected $title; + + // 当前验证规则 + protected $rule = []; + + // 验证提示信息 + protected $message = []; + + /** + * 添加验证因子 + * @access protected + * @param string $name 验证名称 + * @param mixed $rule 验证规则 + * @param string $msg 提示信息 + * @return $this + */ + protected function addItem($name, $rule = null, $msg = '') + { + if ($rule || 0 === $rule) { + $this->rule[$name] = $rule; + } else { + $this->rule[] = $name; + } + + $this->message[] = $msg; + + return $this; + } + + /** + * 获取验证规则 + * @access public + * @return array + */ + public function getRule() + { + return $this->rule; + } + + /** + * 获取验证字段名称 + * @access public + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * 获取验证提示 + * @access public + * @return array + */ + public function getMsg() + { + return $this->message; + } + + /** + * 设置验证字段名称 + * @access public + * @return $this + */ + public function title($title) + { + $this->title = $title; + + return $this; + } + + public function __call($method, $args) + { + if ('is' == strtolower(substr($method, 0, 2))) { + $method = substr($method, 2); + } + + array_unshift($args, lcfirst($method)); + + return call_user_func_array([$this, 'addItem'], $args); + } + + public static function __callStatic($method, $args) + { + $rule = new static(); + + if ('is' == strtolower(substr($method, 0, 2))) { + $method = substr($method, 2); + } + + array_unshift($args, lcfirst($method)); + + return call_user_func_array([$rule, 'addItem'], $args); + } +} diff --git a/thinkphp/library/think/view/driver/Php.php b/thinkphp/library/think/view/driver/Php.php new file mode 100755 index 0000000..7948dc0 --- /dev/null +++ b/thinkphp/library/think/view/driver/Php.php @@ -0,0 +1,183 @@ + +// +---------------------------------------------------------------------- + +namespace think\view\driver; + +use think\App; +use think\exception\TemplateNotFoundException; +use think\Loader; + +class Php +{ + // 模板引擎参数 + protected $config = [ + // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 + 'auto_rule' => 1, + // 视图基础目录(集中式) + 'view_base' => '', + // 模板起始路径 + 'view_path' => '', + // 模板文件后缀 + 'view_suffix' => 'php', + // 模板文件名分隔符 + 'view_depr' => DIRECTORY_SEPARATOR, + ]; + + protected $template; + protected $app; + protected $content; + + public function __construct(App $app, $config = []) + { + $this->app = $app; + $this->config = array_merge($this->config, (array) $config); + } + + /** + * 检测是否存在模板文件 + * @access public + * @param string $template 模板文件或者模板规则 + * @return bool + */ + public function exists($template) + { + if ('' == pathinfo($template, PATHINFO_EXTENSION)) { + // 获取模板文件名 + $template = $this->parseTemplate($template); + } + + return is_file($template); + } + + /** + * 渲染模板文件 + * @access public + * @param string $template 模板文件 + * @param array $data 模板变量 + * @return void + */ + public function fetch($template, $data = []) + { + if ('' == pathinfo($template, PATHINFO_EXTENSION)) { + // 获取模板文件名 + $template = $this->parseTemplate($template); + } + + // 模板不存在 抛出异常 + if (!is_file($template)) { + throw new TemplateNotFoundException('template not exists:' . $template, $template); + } + + $this->template = $template; + + // 记录视图信息 + $this->app + ->log('[ VIEW ] ' . $template . ' [ ' . var_export(array_keys($data), true) . ' ]'); + + extract($data, EXTR_OVERWRITE); + include $this->template; + } + + /** + * 渲染模板内容 + * @access public + * @param string $content 模板内容 + * @param array $data 模板变量 + * @return void + */ + public function display($content, $data = []) + { + $this->content = $content; + + extract($data, EXTR_OVERWRITE); + eval('?>' . $this->content); + } + + /** + * 自动定位模板文件 + * @access private + * @param string $template 模板文件规则 + * @return string + */ + private function parseTemplate($template) + { + if (empty($this->config['view_path'])) { + $this->config['view_path'] = $this->app->getModulePath() . 'view' . DIRECTORY_SEPARATOR; + } + + $request = $this->app['request']; + + // 获取视图根目录 + if (strpos($template, '@')) { + // 跨模块调用 + list($module, $template) = explode('@', $template); + } + + if ($this->config['view_base']) { + // 基础视图目录 + $module = isset($module) ? $module : $request->module(); + $path = $this->config['view_base'] . ($module ? $module . DIRECTORY_SEPARATOR : ''); + } else { + $path = isset($module) ? $this->app->getAppPath() . $module . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR : $this->config['view_path']; + } + + $depr = $this->config['view_depr']; + + if (0 !== strpos($template, '/')) { + $template = str_replace(['/', ':'], $depr, $template); + $controller = Loader::parseName($request->controller()); + + if ($controller) { + if ('' == $template) { + // 如果模板文件名为空 按照默认规则定位 + $template = str_replace('.', DIRECTORY_SEPARATOR, $controller) . $depr . $this->getActionTemplate($request); + } elseif (false === strpos($template, $depr)) { + $template = str_replace('.', DIRECTORY_SEPARATOR, $controller) . $depr . $template; + } + } + } else { + $template = str_replace(['/', ':'], $depr, substr($template, 1)); + } + + return $path . ltrim($template, '/') . '.' . ltrim($this->config['view_suffix'], '.'); + } + + protected function getActionTemplate($request) + { + $rule = [$request->action(true), Loader::parseName($request->action(true)), $request->action()]; + $type = $this->config['auto_rule']; + + return isset($rule[$type]) ? $rule[$type] : $rule[0]; + } + + /** + * 配置模板引擎 + * @access private + * @param string|array $name 参数名 + * @param mixed $value 参数值 + * @return void + */ + public function config($name, $value = null) + { + if (is_array($name)) { + $this->config = array_merge($this->config, $name); + } elseif (is_null($value)) { + return isset($this->config[$name]) ? $this->config[$name] : null; + } else { + $this->config[$name] = $value; + } + } + + public function __debugInfo() + { + return ['config' => $this->config]; + } +} diff --git a/thinkphp/library/think/view/driver/Think.php b/thinkphp/library/think/view/driver/Think.php new file mode 100755 index 0000000..877aee8 --- /dev/null +++ b/thinkphp/library/think/view/driver/Think.php @@ -0,0 +1,192 @@ + +// +---------------------------------------------------------------------- + +namespace think\view\driver; + +use think\App; +use think\exception\TemplateNotFoundException; +use think\Loader; +use think\Template; + +class Think +{ + // 模板引擎实例 + private $template; + private $app; + + // 模板引擎参数 + protected $config = [ + // 默认模板渲染规则 1 解析为小写+下划线 2 全部转换小写 + 'auto_rule' => 1, + // 视图基础目录(集中式) + 'view_base' => '', + // 模板起始路径 + 'view_path' => '', + // 模板文件后缀 + 'view_suffix' => 'html', + // 模板文件名分隔符 + 'view_depr' => DIRECTORY_SEPARATOR, + // 是否开启模板编译缓存,设为false则每次都会重新编译 + 'tpl_cache' => true, + ]; + + public function __construct(App $app, $config = []) + { + $this->app = $app; + $this->config = array_merge($this->config, (array) $config); + + if (empty($this->config['view_path'])) { + $this->config['view_path'] = $app->getModulePath() . 'view' . DIRECTORY_SEPARATOR; + } + + $this->template = new Template($app, $this->config); + } + + /** + * 检测是否存在模板文件 + * @access public + * @param string $template 模板文件或者模板规则 + * @return bool + */ + public function exists($template) + { + if ('' == pathinfo($template, PATHINFO_EXTENSION)) { + // 获取模板文件名 + $template = $this->parseTemplate($template); + } + + return is_file($template); + } + + /** + * 渲染模板文件 + * @access public + * @param string $template 模板文件 + * @param array $data 模板变量 + * @param array $config 模板参数 + * @return void + */ + public function fetch($template, $data = [], $config = []) + { + if ('' == pathinfo($template, PATHINFO_EXTENSION)) { + // 获取模板文件名 + $template = $this->parseTemplate($template); + } + + // 模板不存在 抛出异常 + if (!is_file($template)) { + throw new TemplateNotFoundException('template not exists:' . $template, $template); + } + + // 记录视图信息 + $this->app + ->log('[ VIEW ] ' . $template . ' [ ' . var_export(array_keys($data), true) . ' ]'); + + $this->template->fetch($template, $data, $config); + } + + /** + * 渲染模板内容 + * @access public + * @param string $template 模板内容 + * @param array $data 模板变量 + * @param array $config 模板参数 + * @return void + */ + public function display($template, $data = [], $config = []) + { + $this->template->display($template, $data, $config); + } + + /** + * 自动定位模板文件 + * @access private + * @param string $template 模板文件规则 + * @return string + */ + private function parseTemplate($template) + { + // 分析模板文件规则 + $request = $this->app['request']; + + // 获取视图根目录 + if (strpos($template, '@')) { + // 跨模块调用 + list($module, $template) = explode('@', $template); + } + + if ($this->config['view_base']) { + // 基础视图目录 + $module = isset($module) ? $module : $request->module(); + $path = $this->config['view_base'] . ($module ? $module . DIRECTORY_SEPARATOR : ''); + } else { + $path = isset($module) ? $this->app->getAppPath() . $module . DIRECTORY_SEPARATOR . 'view' . DIRECTORY_SEPARATOR : $this->config['view_path']; + } + + $depr = $this->config['view_depr']; + + if (0 !== strpos($template, '/')) { + $template = str_replace(['/', ':'], $depr, $template); + $controller = Loader::parseName($request->controller()); + + if ($controller) { + if ('' == $template) { + // 如果模板文件名为空 按照默认规则定位 + $template = str_replace('.', DIRECTORY_SEPARATOR, $controller) . $depr . $this->getActionTemplate($request); + } elseif (false === strpos($template, $depr)) { + $template = str_replace('.', DIRECTORY_SEPARATOR, $controller) . $depr . $template; + } + } + } else { + $template = str_replace(['/', ':'], $depr, substr($template, 1)); + } + + return $path . ltrim($template, '/') . '.' . ltrim($this->config['view_suffix'], '.'); + } + + protected function getActionTemplate($request) + { + $rule = [$request->action(true), Loader::parseName($request->action(true)), $request->action()]; + $type = $this->config['auto_rule']; + + return isset($rule[$type]) ? $rule[$type] : $rule[0]; + } + + /** + * 配置或者获取模板引擎参数 + * @access private + * @param string|array $name 参数名 + * @param mixed $value 参数值 + * @return mixed + */ + public function config($name, $value = null) + { + if (is_array($name)) { + $this->template->config($name); + $this->config = array_merge($this->config, $name); + } elseif (is_null($value)) { + return $this->template->config($name); + } else { + $this->template->$name = $value; + $this->config[$name] = $value; + } + } + + public function __call($method, $params) + { + return call_user_func_array([$this->template, $method], $params); + } + + public function __debugInfo() + { + return ['config' => $this->config]; + } +} diff --git a/thinkphp/library/traits/controller/Jump.php b/thinkphp/library/traits/controller/Jump.php new file mode 100755 index 0000000..41f7e93 --- /dev/null +++ b/thinkphp/library/traits/controller/Jump.php @@ -0,0 +1,168 @@ +error(); + * $this->redirect(); + * } + * } + */ +namespace traits\controller; + +use think\Container; +use think\exception\HttpResponseException; +use think\Response; +use think\response\Redirect; + +trait Jump +{ + /** + * 应用实例 + * @var \think\App + */ + protected $app; + + /** + * 操作成功跳转的快捷方法 + * @access protected + * @param mixed $msg 提示信息 + * @param string $url 跳转的URL地址 + * @param mixed $data 返回的数据 + * @param integer $wait 跳转等待时间 + * @param array $header 发送的Header信息 + * @return void + */ + protected function success($msg = '', $url = null, $data = '', $wait = 3, array $header = []) + { + if (is_null($url) && isset($_SERVER["HTTP_REFERER"])) { + $url = $_SERVER["HTTP_REFERER"]; + } elseif ('' !== $url) { + $url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : Container::get('url')->build($url); + } + + $result = [ + 'code' => 1, + 'msg' => $msg, + 'data' => $data, + 'url' => $url, + 'wait' => $wait, + ]; + + $type = $this->getResponseType(); + // 把跳转模板的渲染下沉,这样在 response_send 行为里通过getData()获得的数据是一致性的格式 + if ('html' == strtolower($type)) { + $type = 'jump'; + } + + $response = Response::create($result, $type)->header($header)->options(['jump_template' => $this->app['config']->get('dispatch_success_tmpl')]); + + throw new HttpResponseException($response); + } + + /** + * 操作错误跳转的快捷方法 + * @access protected + * @param mixed $msg 提示信息 + * @param string $url 跳转的URL地址 + * @param mixed $data 返回的数据 + * @param integer $wait 跳转等待时间 + * @param array $header 发送的Header信息 + * @return void + */ + protected function error($msg = '', $url = null, $data = '', $wait = 3, array $header = []) + { + $type = $this->getResponseType(); + if (is_null($url)) { + $url = $this->app['request']->isAjax() ? '' : 'javascript:history.back(-1);'; + } elseif ('' !== $url) { + $url = (strpos($url, '://') || 0 === strpos($url, '/')) ? $url : $this->app['url']->build($url); + } + + $result = [ + 'code' => 0, + 'msg' => $msg, + 'data' => $data, + 'url' => $url, + 'wait' => $wait, + ]; + + if ('html' == strtolower($type)) { + $type = 'jump'; + } + + $response = Response::create($result, $type)->header($header)->options(['jump_template' => $this->app['config']->get('dispatch_error_tmpl')]); + + throw new HttpResponseException($response); + } + + /** + * 返回封装后的API数据到客户端 + * @access protected + * @param mixed $data 要返回的数据 + * @param integer $code 返回的code + * @param mixed $msg 提示信息 + * @param string $type 返回数据格式 + * @param array $header 发送的Header信息 + * @return void + */ + protected function result($data, $code = 0, $msg = '', $type = '', array $header = []) + { + $result = [ + 'code' => $code, + 'msg' => $msg, + 'time' => time(), + 'data' => $data, + ]; + + $type = $type ?: $this->getResponseType(); + $response = Response::create($result, $type)->header($header); + + throw new HttpResponseException($response); + } + + /** + * URL重定向 + * @access protected + * @param string $url 跳转的URL表达式 + * @param array|integer $params 其它URL参数 + * @param integer $code http code + * @param array $with 隐式传参 + * @return void + */ + protected function redirect($url, $params = [], $code = 302, $with = []) + { + $response = new Redirect($url); + + if (is_integer($params)) { + $code = $params; + $params = []; + } + + $response->code($code)->params($params)->with($with); + + throw new HttpResponseException($response); + } + + /** + * 获取当前的response 输出类型 + * @access protected + * @return string + */ + protected function getResponseType() + { + if (!$this->app) { + $this->app = Container::get('app'); + } + + $isAjax = $this->app['request']->isAjax(); + $config = $this->app['config']; + + return $isAjax + ? $config->get('default_ajax_return') + : $config->get('default_return_type'); + } +} diff --git a/thinkphp/logo.png b/thinkphp/logo.png new file mode 100755 index 0000000..25fd059 Binary files /dev/null and b/thinkphp/logo.png differ diff --git a/thinkphp/phpunit.xml.dist b/thinkphp/phpunit.xml.dist new file mode 100755 index 0000000..37c3d2b --- /dev/null +++ b/thinkphp/phpunit.xml.dist @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + ./library/think/*/tests/ + + + + + + ./library/ + + ./library/think/*/tests + ./library/think/*/assets + ./library/think/*/resources + ./library/think/*/vendor + + + + \ No newline at end of file diff --git a/thinkphp/tpl/default_index.tpl b/thinkphp/tpl/default_index.tpl new file mode 100755 index 0000000..e5c1363 --- /dev/null +++ b/thinkphp/tpl/default_index.tpl @@ -0,0 +1,10 @@ +*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }

                            :)

                            ThinkPHP V5.1
                            12载初心不改(2006-2018) - 你值得信赖的PHP框架

                            '; + } +} diff --git a/thinkphp/tpl/dispatch_jump.tpl b/thinkphp/tpl/dispatch_jump.tpl new file mode 100755 index 0000000..583376b --- /dev/null +++ b/thinkphp/tpl/dispatch_jump.tpl @@ -0,0 +1,49 @@ +{__NOLAYOUT__} + + + + + 跳转提示 + + + +
                            + + +

                            :)

                            +

                            + + +

                            :(

                            +

                            + + +

                            +

                            + 页面自动 跳转 等待时间: +

                            +
                            + + + diff --git a/thinkphp/tpl/page_trace.tpl b/thinkphp/tpl/page_trace.tpl new file mode 100755 index 0000000..2e5afba --- /dev/null +++ b/thinkphp/tpl/page_trace.tpl @@ -0,0 +1,71 @@ +
                            + + +
                            +
                            +
                            getUseTime().'s ';?>
                            + +
                            + + diff --git a/thinkphp/tpl/think_exception.tpl b/thinkphp/tpl/think_exception.tpl new file mode 100755 index 0000000..19ecbdc --- /dev/null +++ b/thinkphp/tpl/think_exception.tpl @@ -0,0 +1,507 @@ +'.end($names).''; + } + } + + if(!function_exists('parse_file')){ + function parse_file($file, $line) + { + return ''.basename($file)." line {$line}".''; + } + } + + if(!function_exists('parse_args')){ + function parse_args($args) + { + $result = []; + + foreach ($args as $key => $item) { + switch (true) { + case is_object($item): + $value = sprintf('object(%s)', parse_class(get_class($item))); + break; + case is_array($item): + if(count($item) > 3){ + $value = sprintf('[%s, ...]', parse_args(array_slice($item, 0, 3))); + } else { + $value = sprintf('[%s]', parse_args($item)); + } + break; + case is_string($item): + if(strlen($item) > 20){ + $value = sprintf( + '\'%s...\'', + htmlentities($item), + htmlentities(substr($item, 0, 20)) + ); + } else { + $value = sprintf("'%s'", htmlentities($item)); + } + break; + case is_int($item): + case is_float($item): + $value = $item; + break; + case is_null($item): + $value = 'null'; + break; + case is_bool($item): + $value = '' . ($item ? 'true' : 'false') . ''; + break; + case is_resource($item): + $value = 'resource'; + break; + default: + $value = htmlentities(str_replace("\n", '', var_export(strval($item), true))); + break; + } + + $result[] = is_int($key) ? $value : "'{$key}' => {$value}"; + } + + return implode(', ', $result); + } + } +?> + + + + + 系统发生错误 + + + + +
                            + +
                            + +
                            +
                            + +
                            +
                            +

                            [] 

                            +
                            +

                            +
                            + +
                            + +
                            +
                              $value) { ?>
                            +
                            + +
                            +

                            Call Stack

                            +
                              +
                            1. + +
                            2. + +
                            3. + +
                            +
                            +
                            + +
                            + +

                            + +
                            + + + +
                            +

                            Exception Datas

                            + $value) { ?> + + + + + + + $val) { ?> + + + + + + + +
                            empty
                            + +
                            + +
                            + + + +
                            +

                            Environment Variables

                            + $value) { ?> + + + + + + + $val) { ?> + + + + + + + +
                            empty
                            + +
                            + +
                            + + + + + + + + diff --git a/vendor/autoload.php b/vendor/autoload.php new file mode 100755 index 0000000..2fce348 --- /dev/null +++ b/vendor/autoload.php @@ -0,0 +1,7 @@ +writeFile('Hello World!', 'qrcode.png'); +``` + +## Available image renderer back ends +BaconQrCode comes with multiple back ends for rendering images. Currently included are the following: + +- `ImagickImageBackEnd`: renders raster images using the Imagick library +- `SvgImageBackEnd`: renders SVG files using XMLWriter +- `EpsImageBackEnd`: renders EPS files diff --git a/vendor/bacon/bacon-qr-code/composer.json b/vendor/bacon/bacon-qr-code/composer.json new file mode 100755 index 0000000..d66d586 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/composer.json @@ -0,0 +1,32 @@ +{ + "name": "bacon/bacon-qr-code", + "description": "BaconQrCode is a QR code generator for PHP.", + "license" : "BSD-2-Clause", + "homepage": "https://github.com/Bacon/BaconQrCode", + "require": { + "php": "^7.1", + "ext-iconv": "*", + "dasprid/enum": "^1.0" + }, + "suggest": { + "ext-imagick": "to generate QR code images" + }, + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "email": "mail@dasprids.de", + "homepage": "http://www.dasprids.de", + "role": "Developer" + } + ], + "autoload": { + "psr-4": { + "BaconQrCode\\": "src/" + } + }, + "require-dev": { + "phpunit/phpunit": "^6.4", + "squizlabs/php_codesniffer": "^3.1", + "phly/keep-a-changelog": "^1.4" + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/BitArray.php b/vendor/bacon/bacon-qr-code/src/Common/BitArray.php new file mode 100755 index 0000000..158384f --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/BitArray.php @@ -0,0 +1,372 @@ + + */ + private $bits; + + /** + * Size of the bit array in bits. + * + * @var int + */ + private $size; + + /** + * Creates a new bit array with a given size. + */ + public function __construct(int $size = 0) + { + $this->size = $size; + $this->bits = SplFixedArray::fromArray(array_fill(0, ($this->size + 31) >> 3, 0)); + } + + /** + * Gets the size in bits. + */ + public function getSize() : int + { + return $this->size; + } + + /** + * Gets the size in bytes. + */ + public function getSizeInBytes() : int + { + return ($this->size + 7) >> 3; + } + + /** + * Ensures that the array has a minimum capacity. + */ + public function ensureCapacity(int $size) : void + { + if ($size > count($this->bits) << 5) { + $this->bits->setSize(($size + 31) >> 5); + } + } + + /** + * Gets a specific bit. + */ + public function get(int $i) : bool + { + return 0 !== ($this->bits[$i >> 5] & (1 << ($i & 0x1f))); + } + + /** + * Sets a specific bit. + */ + public function set(int $i) : void + { + $this->bits[$i >> 5] = $this->bits[$i >> 5] | 1 << ($i & 0x1f); + } + + /** + * Flips a specific bit. + */ + public function flip(int $i) : void + { + $this->bits[$i >> 5] ^= 1 << ($i & 0x1f); + } + + /** + * Gets the next set bit position from a given position. + */ + public function getNextSet(int $from) : int + { + if ($from >= $this->size) { + return $this->size; + } + + $bitsOffset = $from >> 5; + $currentBits = $this->bits[$bitsOffset]; + $bitsLength = count($this->bits); + $currentBits &= ~((1 << ($from & 0x1f)) - 1); + + while (0 === $currentBits) { + if (++$bitsOffset === $bitsLength) { + return $this->size; + } + + $currentBits = $this->bits[$bitsOffset]; + } + + $result = ($bitsOffset << 5) + BitUtils::numberOfTrailingZeros($currentBits); + return $result > $this->size ? $this->size : $result; + } + + /** + * Gets the next unset bit position from a given position. + */ + public function getNextUnset(int $from) : int + { + if ($from >= $this->size) { + return $this->size; + } + + $bitsOffset = $from >> 5; + $currentBits = ~$this->bits[$bitsOffset]; + $bitsLength = count($this->bits); + $currentBits &= ~((1 << ($from & 0x1f)) - 1); + + while (0 === $currentBits) { + if (++$bitsOffset === $bitsLength) { + return $this->size; + } + + $currentBits = ~$this->bits[$bitsOffset]; + } + + $result = ($bitsOffset << 5) + BitUtils::numberOfTrailingZeros($currentBits); + return $result > $this->size ? $this->size : $result; + } + + /** + * Sets a bulk of bits. + */ + public function setBulk(int $i, int $newBits) : void + { + $this->bits[$i >> 5] = $newBits; + } + + /** + * Sets a range of bits. + * + * @throws InvalidArgumentException if end is smaller than start + */ + public function setRange(int $start, int $end) : void + { + if ($end < $start) { + throw new InvalidArgumentException('End must be greater or equal to start'); + } + + if ($end === $start) { + return; + } + + --$end; + + $firstInt = $start >> 5; + $lastInt = $end >> 5; + + for ($i = $firstInt; $i <= $lastInt; ++$i) { + $firstBit = $i > $firstInt ? 0 : $start & 0x1f; + $lastBit = $i < $lastInt ? 31 : $end & 0x1f; + + if (0 === $firstBit && 31 === $lastBit) { + $mask = 0x7fffffff; + } else { + $mask = 0; + + for ($j = $firstBit; $j < $lastBit; ++$j) { + $mask |= 1 << $j; + } + } + + $this->bits[$i] = $this->bits[$i] | $mask; + } + } + + /** + * Clears the bit array, unsetting every bit. + */ + public function clear() : void + { + $bitsLength = count($this->bits); + + for ($i = 0; $i < $bitsLength; ++$i) { + $this->bits[$i] = 0; + } + } + + /** + * Checks if a range of bits is set or not set. + + * @throws InvalidArgumentException if end is smaller than start + */ + public function isRange(int $start, int $end, bool $value) : bool + { + if ($end < $start) { + throw new InvalidArgumentException('End must be greater or equal to start'); + } + + if ($end === $start) { + return true; + } + + --$end; + + $firstInt = $start >> 5; + $lastInt = $end >> 5; + + for ($i = $firstInt; $i <= $lastInt; ++$i) { + $firstBit = $i > $firstInt ? 0 : $start & 0x1f; + $lastBit = $i < $lastInt ? 31 : $end & 0x1f; + + if (0 === $firstBit && 31 === $lastBit) { + $mask = 0x7fffffff; + } else { + $mask = 0; + + for ($j = $firstBit; $j <= $lastBit; ++$j) { + $mask |= 1 << $j; + } + } + + if (($this->bits[$i] & $mask) !== ($value ? $mask : 0)) { + return false; + } + } + + return true; + } + + /** + * Appends a bit to the array. + */ + public function appendBit(bool $bit) : void + { + $this->ensureCapacity($this->size + 1); + + if ($bit) { + $this->bits[$this->size >> 5] = $this->bits[$this->size >> 5] | (1 << ($this->size & 0x1f)); + } + + ++$this->size; + } + + /** + * Appends a number of bits (up to 32) to the array. + + * @throws InvalidArgumentException if num bits is not between 0 and 32 + */ + public function appendBits(int $value, int $numBits) : void + { + if ($numBits < 0 || $numBits > 32) { + throw new InvalidArgumentException('Num bits must be between 0 and 32'); + } + + $this->ensureCapacity($this->size + $numBits); + + for ($numBitsLeft = $numBits; $numBitsLeft > 0; $numBitsLeft--) { + $this->appendBit((($value >> ($numBitsLeft - 1)) & 0x01) === 1); + } + } + + /** + * Appends another bit array to this array. + */ + public function appendBitArray(self $other) : void + { + $otherSize = $other->getSize(); + $this->ensureCapacity($this->size + $other->getSize()); + + for ($i = 0; $i < $otherSize; ++$i) { + $this->appendBit($other->get($i)); + } + } + + /** + * Makes an exclusive-or comparision on the current bit array. + * + * @throws InvalidArgumentException if sizes don't match + */ + public function xorBits(self $other) : void + { + $bitsLength = count($this->bits); + $otherBits = $other->getBitArray(); + + if ($bitsLength !== count($otherBits)) { + throw new InvalidArgumentException('Sizes don\'t match'); + } + + for ($i = 0; $i < $bitsLength; ++$i) { + $this->bits[$i] = $this->bits[$i] ^ $otherBits[$i]; + } + } + + /** + * Converts the bit array to a byte array. + * + * @return SplFixedArray + */ + public function toBytes(int $bitOffset, int $numBytes) : SplFixedArray + { + $bytes = new SplFixedArray($numBytes); + + for ($i = 0; $i < $numBytes; ++$i) { + $byte = 0; + + for ($j = 0; $j < 8; ++$j) { + if ($this->get($bitOffset)) { + $byte |= 1 << (7 - $j); + } + + ++$bitOffset; + } + + $bytes[$i] = $byte; + } + + return $bytes; + } + + /** + * Gets the internal bit array. + * + * @return SplFixedArray + */ + public function getBitArray() : SplFixedArray + { + return $this->bits; + } + + /** + * Reverses the array. + */ + public function reverse() : void + { + $newBits = new SplFixedArray(count($this->bits)); + + for ($i = 0; $i < $this->size; ++$i) { + if ($this->get($this->size - $i - 1)) { + $newBits[$i >> 5] = $newBits[$i >> 5] | (1 << ($i & 0x1f)); + } + } + + $this->bits = $newBits; + } + + /** + * Returns a string representation of the bit array. + */ + public function __toString() : string + { + $result = ''; + + for ($i = 0; $i < $this->size; ++$i) { + if (0 === ($i & 0x07)) { + $result .= ' '; + } + + $result .= $this->get($i) ? 'X' : '.'; + } + + return $result; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/BitMatrix.php b/vendor/bacon/bacon-qr-code/src/Common/BitMatrix.php new file mode 100755 index 0000000..10bf8fe --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/BitMatrix.php @@ -0,0 +1,313 @@ + + */ + private $bits; + + /** + * @throws InvalidArgumentException if a dimension is smaller than zero + */ + public function __construct(int $width, int $height = null) + { + if (null === $height) { + $height = $width; + } + + if ($width < 1 || $height < 1) { + throw new InvalidArgumentException('Both dimensions must be greater than zero'); + } + + $this->width = $width; + $this->height = $height; + $this->rowSize = ($width + 31) >> 5; + $this->bits = SplFixedArray::fromArray(array_fill(0, $this->rowSize * $height, 0)); + } + + /** + * Gets the requested bit, where true means black. + */ + public function get(int $x, int $y) : bool + { + $offset = $y * $this->rowSize + ($x >> 5); + return 0 !== (BitUtils::unsignedRightShift($this->bits[$offset], ($x & 0x1f)) & 1); + } + + /** + * Sets the given bit to true. + */ + public function set(int $x, int $y) : void + { + $offset = $y * $this->rowSize + ($x >> 5); + $this->bits[$offset] = $this->bits[$offset] | (1 << ($x & 0x1f)); + } + + /** + * Flips the given bit. + */ + public function flip(int $x, int $y) : void + { + $offset = $y * $this->rowSize + ($x >> 5); + $this->bits[$offset] = $this->bits[$offset] ^ (1 << ($x & 0x1f)); + } + + /** + * Clears all bits (set to false). + */ + public function clear() : void + { + $max = count($this->bits); + + for ($i = 0; $i < $max; ++$i) { + $this->bits[$i] = 0; + } + } + + /** + * Sets a square region of the bit matrix to true. + * + * @throws InvalidArgumentException if left or top are negative + * @throws InvalidArgumentException if width or height are smaller than 1 + * @throws InvalidArgumentException if region does not fit into the matix + */ + public function setRegion(int $left, int $top, int $width, int $height) : void + { + if ($top < 0 || $left < 0) { + throw new InvalidArgumentException('Left and top must be non-negative'); + } + + if ($height < 1 || $width < 1) { + throw new InvalidArgumentException('Width and height must be at least 1'); + } + + $right = $left + $width; + $bottom = $top + $height; + + if ($bottom > $this->height || $right > $this->width) { + throw new InvalidArgumentException('The region must fit inside the matrix'); + } + + for ($y = $top; $y < $bottom; ++$y) { + $offset = $y * $this->rowSize; + + for ($x = $left; $x < $right; ++$x) { + $index = $offset + ($x >> 5); + $this->bits[$index] = $this->bits[$index] | (1 << ($x & 0x1f)); + } + } + } + + /** + * A fast method to retrieve one row of data from the matrix as a BitArray. + */ + public function getRow(int $y, BitArray $row = null) : BitArray + { + if (null === $row || $row->getSize() < $this->width) { + $row = new BitArray($this->width); + } + + $offset = $y * $this->rowSize; + + for ($x = 0; $x < $this->rowSize; ++$x) { + $row->setBulk($x << 5, $this->bits[$offset + $x]); + } + + return $row; + } + + /** + * Sets a row of data from a BitArray. + */ + public function setRow(int $y, BitArray $row) : void + { + $bits = $row->getBitArray(); + + for ($i = 0; $i < $this->rowSize; ++$i) { + $this->bits[$y * $this->rowSize + $i] = $bits[$i]; + } + } + + /** + * This is useful in detecting the enclosing rectangle of a 'pure' barcode. + * + * @return int[]|null + */ + public function getEnclosingRectangle() : ?array + { + $left = $this->width; + $top = $this->height; + $right = -1; + $bottom = -1; + + for ($y = 0; $y < $this->height; ++$y) { + for ($x32 = 0; $x32 < $this->rowSize; ++$x32) { + $bits = $this->bits[$y * $this->rowSize + $x32]; + + if (0 !== $bits) { + if ($y < $top) { + $top = $y; + } + + if ($y > $bottom) { + $bottom = $y; + } + + if ($x32 * 32 < $left) { + $bit = 0; + + while (($bits << (31 - $bit)) === 0) { + $bit++; + } + + if (($x32 * 32 + $bit) < $left) { + $left = $x32 * 32 + $bit; + } + } + } + + if ($x32 * 32 + 31 > $right) { + $bit = 31; + + while (0 === BitUtils::unsignedRightShift($bits, $bit)) { + --$bit; + } + + if (($x32 * 32 + $bit) > $right) { + $right = $x32 * 32 + $bit; + } + } + } + } + + $width = $right - $left; + $height = $bottom - $top; + + if ($width < 0 || $height < 0) { + return null; + } + + return [$left, $top, $width, $height]; + } + + /** + * Gets the most top left set bit. + * + * This is useful in detecting a corner of a 'pure' barcode. + * + * @return int[]|null + */ + public function getTopLeftOnBit() : ?array + { + $bitsOffset = 0; + + while ($bitsOffset < count($this->bits) && 0 === $this->bits[$bitsOffset]) { + ++$bitsOffset; + } + + if (count($this->bits) === $bitsOffset) { + return null; + } + + $x = intdiv($bitsOffset, $this->rowSize); + $y = ($bitsOffset % $this->rowSize) << 5; + + $bits = $this->bits[$bitsOffset]; + $bit = 0; + + while (0 === ($bits << (31 - $bit))) { + ++$bit; + } + + $x += $bit; + + return [$x, $y]; + } + + /** + * Gets the most bottom right set bit. + * + * This is useful in detecting a corner of a 'pure' barcode. + * + * @return int[]|null + */ + public function getBottomRightOnBit() : ?array + { + $bitsOffset = count($this->bits) - 1; + + while ($bitsOffset >= 0 && 0 === $this->bits[$bitsOffset]) { + --$bitsOffset; + } + + if ($bitsOffset < 0) { + return null; + } + + $x = intdiv($bitsOffset, $this->rowSize); + $y = ($bitsOffset % $this->rowSize) << 5; + + $bits = $this->bits[$bitsOffset]; + $bit = 0; + + while (0 === BitUtils::unsignedRightShift($bits, $bit)) { + --$bit; + } + + $x += $bit; + + return [$x, $y]; + } + + /** + * Gets the width of the matrix, + */ + public function getWidth() : int + { + return $this->width; + } + + /** + * Gets the height of the matrix. + */ + public function getHeight() : int + { + return $this->height; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/BitUtils.php b/vendor/bacon/bacon-qr-code/src/Common/BitUtils.php new file mode 100755 index 0000000..0c575b4 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/BitUtils.php @@ -0,0 +1,41 @@ +>>" in other + * languages. + */ + public static function unsignedRightShift(int $a, int $b) : int + { + return ( + $a >= 0 + ? $a >> $b + : (($a & 0x7fffffff) >> $b) | (0x40000000 >> ($b - 1)) + ); + } + + /** + * Gets the number of trailing zeros. + */ + public static function numberOfTrailingZeros(int $i) : int + { + $lastPos = strrpos(str_pad(decbin($i), 32, '0', STR_PAD_LEFT), '1'); + return $lastPos === false ? 32 : 31 - $lastPos; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/CharacterSetEci.php b/vendor/bacon/bacon-qr-code/src/Common/CharacterSetEci.php new file mode 100755 index 0000000..6dfff17 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/CharacterSetEci.php @@ -0,0 +1,180 @@ +|null + */ + private static $valueToEci; + + /** + * @var array|null + */ + private static $nameToEci; + + public function __construct(array $values, string ...$otherEncodingNames) + { + $this->values = $values; + $this->otherEncodingNames = $otherEncodingNames; + } + + /** + * Returns the primary value. + */ + public function getValue() : int + { + return $this->values[0]; + } + + /** + * Gets character set ECI by value. + * + * Returns the representing ECI of a given value, or null if it is legal but unsupported. + * + * @throws InvalidArgumentException if value is not between 0 and 900 + */ + public static function getCharacterSetEciByValue(int $value) : ?self + { + if ($value < 0 || $value >= 900) { + throw new InvalidArgumentException('Value must be between 0 and 900'); + } + + $valueToEci = self::valueToEci(); + + if (! array_key_exists($value, $valueToEci)) { + return null; + } + + return $valueToEci[$value]; + } + + /** + * Returns character set ECI by name. + * + * Returns the representing ECI of a given name, or null if it is legal but unsupported + */ + public static function getCharacterSetEciByName(string $name) : ?self + { + $nameToEci = self::nameToEci(); + $name = strtolower($name); + + if (! array_key_exists($name, $nameToEci)) { + return null; + } + + return $nameToEci[$name]; + } + + private static function valueToEci() : array + { + if (null !== self::$valueToEci) { + return self::$valueToEci; + } + + self::$valueToEci = []; + + foreach (self::values() as $eci) { + foreach ($eci->values as $value) { + self::$valueToEci[$value] = $eci; + } + } + + return self::$valueToEci; + } + + private static function nameToEci() : array + { + if (null !== self::$nameToEci) { + return self::$nameToEci; + } + + self::$nameToEci = []; + + foreach (self::values() as $eci) { + self::$nameToEci[strtolower($eci->name())] = $eci; + + foreach ($eci->otherEncodingNames as $name) { + self::$nameToEci[strtolower($name)] = $eci; + } + } + + return self::$nameToEci; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/EcBlock.php b/vendor/bacon/bacon-qr-code/src/Common/EcBlock.php new file mode 100755 index 0000000..a9a1d07 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/EcBlock.php @@ -0,0 +1,49 @@ +count = $count; + $this->dataCodewords = $dataCodewords; + } + + /** + * Returns how many times the block is used. + */ + public function getCount() : int + { + return $this->count; + } + + /** + * Returns the number of data codewords. + */ + public function getDataCodewords() : int + { + return $this->dataCodewords; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/EcBlocks.php b/vendor/bacon/bacon-qr-code/src/Common/EcBlocks.php new file mode 100755 index 0000000..172b5f2 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/EcBlocks.php @@ -0,0 +1,74 @@ +ecCodewordsPerBlock = $ecCodewordsPerBlock; + $this->ecBlocks = $ecBlocks; + } + + /** + * Returns the number of EC codewords per block. + */ + public function getEcCodewordsPerBlock() : int + { + return $this->ecCodewordsPerBlock; + } + + /** + * Returns the total number of EC block appearances. + */ + public function getNumBlocks() : int + { + $total = 0; + + foreach ($this->ecBlocks as $ecBlock) { + $total += $ecBlock->getCount(); + } + + return $total; + } + + /** + * Returns the total count of EC codewords. + */ + public function getTotalEcCodewords() : int + { + return $this->ecCodewordsPerBlock * $this->getNumBlocks(); + } + + /** + * Returns the EC blocks included in this collection. + * + * @return EcBlock[] + */ + public function getEcBlocks() : array + { + return $this->ecBlocks; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/ErrorCorrectionLevel.php b/vendor/bacon/bacon-qr-code/src/Common/ErrorCorrectionLevel.php new file mode 100755 index 0000000..9bbf440 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/ErrorCorrectionLevel.php @@ -0,0 +1,63 @@ +bits = $bits; + } + + /** + * @throws OutOfBoundsException if number of bits is invalid + */ + public static function forBits(int $bits) : self + { + switch ($bits) { + case 0: + return self::M(); + + case 1: + return self::L(); + + case 2: + return self::H(); + + case 3: + return self::Q(); + } + + throw new OutOfBoundsException('Invalid number of bits'); + } + + /** + * Returns the two bits used to encode this error correction level. + */ + public function getBits() : int + { + return $this->bits; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/FormatInformation.php b/vendor/bacon/bacon-qr-code/src/Common/FormatInformation.php new file mode 100755 index 0000000..53e3541 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/FormatInformation.php @@ -0,0 +1,203 @@ +ecLevel = ErrorCorrectionLevel::forBits(($formatInfo >> 3) & 0x3); + $this->dataMask = $formatInfo & 0x7; + } + + /** + * Checks how many bits are different between two integers. + */ + public static function numBitsDiffering(int $a, int $b) : int + { + $a ^= $b; + + return ( + self::BITS_SET_IN_HALF_BYTE[$a & 0xf] + + self::BITS_SET_IN_HALF_BYTE[(BitUtils::unsignedRightShift($a, 4) & 0xf)] + + self::BITS_SET_IN_HALF_BYTE[(BitUtils::unsignedRightShift($a, 8) & 0xf)] + + self::BITS_SET_IN_HALF_BYTE[(BitUtils::unsignedRightShift($a, 12) & 0xf)] + + self::BITS_SET_IN_HALF_BYTE[(BitUtils::unsignedRightShift($a, 16) & 0xf)] + + self::BITS_SET_IN_HALF_BYTE[(BitUtils::unsignedRightShift($a, 20) & 0xf)] + + self::BITS_SET_IN_HALF_BYTE[(BitUtils::unsignedRightShift($a, 24) & 0xf)] + + self::BITS_SET_IN_HALF_BYTE[(BitUtils::unsignedRightShift($a, 28) & 0xf)] + ); + } + + /** + * Decodes format information. + */ + public static function decodeFormatInformation(int $maskedFormatInfo1, int $maskedFormatInfo2) : ?self + { + $formatInfo = self::doDecodeFormatInformation($maskedFormatInfo1, $maskedFormatInfo2); + + if (null !== $formatInfo) { + return $formatInfo; + } + + // Should return null, but, some QR codes apparently do not mask this info. Try again by actually masking the + // pattern first. + return self::doDecodeFormatInformation( + $maskedFormatInfo1 ^ self::FORMAT_INFO_MASK_QR, + $maskedFormatInfo2 ^ self::FORMAT_INFO_MASK_QR + ); + } + + /** + * Internal method for decoding format information. + */ + private static function doDecodeFormatInformation(int $maskedFormatInfo1, int $maskedFormatInfo2) : ?self + { + $bestDifference = PHP_INT_MAX; + $bestFormatInfo = 0; + + foreach (self::FORMAT_INFO_DECODE_LOOKUP as $decodeInfo) { + $targetInfo = $decodeInfo[0]; + + if ($targetInfo === $maskedFormatInfo1 || $targetInfo === $maskedFormatInfo2) { + // Found an exact match + return new self($decodeInfo[1]); + } + + $bitsDifference = self::numBitsDiffering($maskedFormatInfo1, $targetInfo); + + if ($bitsDifference < $bestDifference) { + $bestFormatInfo = $decodeInfo[1]; + $bestDifference = $bitsDifference; + } + + if ($maskedFormatInfo1 !== $maskedFormatInfo2) { + // Also try the other option + $bitsDifference = self::numBitsDiffering($maskedFormatInfo2, $targetInfo); + + if ($bitsDifference < $bestDifference) { + $bestFormatInfo = $decodeInfo[1]; + $bestDifference = $bitsDifference; + } + } + } + + // Hamming distance of the 32 masked codes is 7, by construction, so <= 3 bits differing means we found a match. + if ($bestDifference <= 3) { + return new self($bestFormatInfo); + } + + return null; + } + + /** + * Returns the error correction level. + */ + public function getErrorCorrectionLevel() : ErrorCorrectionLevel + { + return $this->ecLevel; + } + + /** + * Returns the data mask. + */ + public function getDataMask() : int + { + return $this->dataMask; + } + + /** + * Hashes the code of the EC level. + */ + public function hashCode() : int + { + return ($this->ecLevel->getBits() << 3) | $this->dataMask; + } + + /** + * Verifies if this instance equals another one. + */ + public function equals(self $other) : bool + { + return ( + $this->ecLevel === $other->ecLevel + && $this->dataMask === $other->dataMask + ); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/Mode.php b/vendor/bacon/bacon-qr-code/src/Common/Mode.php new file mode 100755 index 0000000..51e6c9a --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/Mode.php @@ -0,0 +1,76 @@ +characterCountBitsForVersions = $characterCountBitsForVersions; + $this->bits = $bits; + } + + /** + * Returns the number of bits used in a specific QR code version. + */ + public function getCharacterCountBits(Version $version) : int + { + $number = $version->getVersionNumber(); + + if ($number <= 9) { + $offset = 0; + } elseif ($number <= 26) { + $offset = 1; + } else { + $offset = 2; + } + + return $this->characterCountBitsForVersions[$offset]; + } + + /** + * Returns the four bits used to encode this mode. + */ + public function getBits() : int + { + return $this->bits; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/ReedSolomonCodec.php b/vendor/bacon/bacon-qr-code/src/Common/ReedSolomonCodec.php new file mode 100755 index 0000000..a5aad0b --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/ReedSolomonCodec.php @@ -0,0 +1,468 @@ + 8) { + throw new InvalidArgumentException('Symbol size must be between 0 and 8'); + } + + if ($firstRoot < 0 || $firstRoot >= (1 << $symbolSize)) { + throw new InvalidArgumentException('First root must be between 0 and ' . (1 << $symbolSize)); + } + + if ($numRoots < 0 || $numRoots >= (1 << $symbolSize)) { + throw new InvalidArgumentException('Num roots must be between 0 and ' . (1 << $symbolSize)); + } + + if ($padding < 0 || $padding >= ((1 << $symbolSize) - 1 - $numRoots)) { + throw new InvalidArgumentException( + 'Padding must be between 0 and ' . ((1 << $symbolSize) - 1 - $numRoots) + ); + } + + $this->symbolSize = $symbolSize; + $this->blockSize = (1 << $symbolSize) - 1; + $this->padding = $padding; + $this->alphaTo = SplFixedArray::fromArray(array_fill(0, $this->blockSize + 1, 0), false); + $this->indexOf = SplFixedArray::fromArray(array_fill(0, $this->blockSize + 1, 0), false); + + // Generate galous field lookup table + $this->indexOf[0] = $this->blockSize; + $this->alphaTo[$this->blockSize] = 0; + + $sr = 1; + + for ($i = 0; $i < $this->blockSize; ++$i) { + $this->indexOf[$sr] = $i; + $this->alphaTo[$i] = $sr; + + $sr <<= 1; + + if ($sr & (1 << $symbolSize)) { + $sr ^= $gfPoly; + } + + $sr &= $this->blockSize; + } + + if (1 !== $sr) { + throw new RuntimeException('Field generator polynomial is not primitive'); + } + + // Form RS code generator polynomial from its roots + $this->generatorPoly = SplFixedArray::fromArray(array_fill(0, $numRoots + 1, 0), false); + $this->firstRoot = $firstRoot; + $this->primitive = $primitive; + $this->numRoots = $numRoots; + + // Find prim-th root of 1, used in decoding + for ($iPrimitive = 1; ($iPrimitive % $primitive) !== 0; $iPrimitive += $this->blockSize) { + } + + $this->iPrimitive = intdiv($iPrimitive, $primitive); + + $this->generatorPoly[0] = 1; + + for ($i = 0, $root = $firstRoot * $primitive; $i < $numRoots; ++$i, $root += $primitive) { + $this->generatorPoly[$i + 1] = 1; + + for ($j = $i; $j > 0; $j--) { + if ($this->generatorPoly[$j] !== 0) { + $this->generatorPoly[$j] = $this->generatorPoly[$j - 1] ^ $this->alphaTo[ + $this->modNn($this->indexOf[$this->generatorPoly[$j]] + $root) + ]; + } else { + $this->generatorPoly[$j] = $this->generatorPoly[$j - 1]; + } + } + + $this->generatorPoly[$j] = $this->alphaTo[$this->modNn($this->indexOf[$this->generatorPoly[0]] + $root)]; + } + + // Convert generator poly to index form for quicker encoding + for ($i = 0; $i <= $numRoots; ++$i) { + $this->generatorPoly[$i] = $this->indexOf[$this->generatorPoly[$i]]; + } + } + + /** + * Encodes data and writes result back into parity array. + */ + public function encode(SplFixedArray $data, SplFixedArray $parity) : void + { + for ($i = 0; $i < $this->numRoots; ++$i) { + $parity[$i] = 0; + } + + $iterations = $this->blockSize - $this->numRoots - $this->padding; + + for ($i = 0; $i < $iterations; ++$i) { + $feedback = $this->indexOf[$data[$i] ^ $parity[0]]; + + if ($feedback !== $this->blockSize) { + // Feedback term is non-zero + $feedback = $this->modNn($this->blockSize - $this->generatorPoly[$this->numRoots] + $feedback); + + for ($j = 1; $j < $this->numRoots; ++$j) { + $parity[$j] = $parity[$j] ^ $this->alphaTo[ + $this->modNn($feedback + $this->generatorPoly[$this->numRoots - $j]) + ]; + } + } + + for ($j = 0; $j < $this->numRoots - 1; ++$j) { + $parity[$j] = $parity[$j + 1]; + } + + if ($feedback !== $this->blockSize) { + $parity[$this->numRoots - 1] = $this->alphaTo[$this->modNn($feedback + $this->generatorPoly[0])]; + } else { + $parity[$this->numRoots - 1] = 0; + } + } + } + + /** + * Decodes received data. + */ + public function decode(SplFixedArray $data, SplFixedArray $erasures = null) : ?int + { + // This speeds up the initialization a bit. + $numRootsPlusOne = SplFixedArray::fromArray(array_fill(0, $this->numRoots + 1, 0), false); + $numRoots = SplFixedArray::fromArray(array_fill(0, $this->numRoots, 0), false); + + $lambda = clone $numRootsPlusOne; + $b = clone $numRootsPlusOne; + $t = clone $numRootsPlusOne; + $omega = clone $numRootsPlusOne; + $root = clone $numRoots; + $loc = clone $numRoots; + + $numErasures = (null !== $erasures ? count($erasures) : 0); + + // Form the Syndromes; i.e., evaluate data(x) at roots of g(x) + $syndromes = SplFixedArray::fromArray(array_fill(0, $this->numRoots, $data[0]), false); + + for ($i = 1; $i < $this->blockSize - $this->padding; ++$i) { + for ($j = 0; $j < $this->numRoots; ++$j) { + if ($syndromes[$j] === 0) { + $syndromes[$j] = $data[$i]; + } else { + $syndromes[$j] = $data[$i] ^ $this->alphaTo[ + $this->modNn($this->indexOf[$syndromes[$j]] + ($this->firstRoot + $j) * $this->primitive) + ]; + } + } + } + + // Convert syndromes to index form, checking for nonzero conditions + $syndromeError = 0; + + for ($i = 0; $i < $this->numRoots; ++$i) { + $syndromeError |= $syndromes[$i]; + $syndromes[$i] = $this->indexOf[$syndromes[$i]]; + } + + if (! $syndromeError) { + // If syndrome is zero, data[] is a codeword and there are no errors to correct, so return data[] + // unmodified. + return 0; + } + + $lambda[0] = 1; + + if ($numErasures > 0) { + // Init lambda to be the erasure locator polynomial + $lambda[1] = $this->alphaTo[$this->modNn($this->primitive * ($this->blockSize - 1 - $erasures[0]))]; + + for ($i = 1; $i < $numErasures; ++$i) { + $u = $this->modNn($this->primitive * ($this->blockSize - 1 - $erasures[$i])); + + for ($j = $i + 1; $j > 0; --$j) { + $tmp = $this->indexOf[$lambda[$j - 1]]; + + if ($tmp !== $this->blockSize) { + $lambda[$j] = $lambda[$j] ^ $this->alphaTo[$this->modNn($u + $tmp)]; + } + } + } + } + + for ($i = 0; $i <= $this->numRoots; ++$i) { + $b[$i] = $this->indexOf[$lambda[$i]]; + } + + // Begin Berlekamp-Massey algorithm to determine error+erasure locator polynomial + $r = $numErasures; + $el = $numErasures; + + while (++$r <= $this->numRoots) { + // Compute discrepancy at the r-th step in poly form + $discrepancyR = 0; + + for ($i = 0; $i < $r; ++$i) { + if ($lambda[$i] !== 0 && $syndromes[$r - $i - 1] !== $this->blockSize) { + $discrepancyR ^= $this->alphaTo[ + $this->modNn($this->indexOf[$lambda[$i]] + $syndromes[$r - $i - 1]) + ]; + } + } + + $discrepancyR = $this->indexOf[$discrepancyR]; + + if ($discrepancyR === $this->blockSize) { + $tmp = $b->toArray(); + array_unshift($tmp, $this->blockSize); + array_pop($tmp); + $b = SplFixedArray::fromArray($tmp, false); + continue; + } + + $t[0] = $lambda[0]; + + for ($i = 0; $i < $this->numRoots; ++$i) { + if ($b[$i] !== $this->blockSize) { + $t[$i + 1] = $lambda[$i + 1] ^ $this->alphaTo[$this->modNn($discrepancyR + $b[$i])]; + } else { + $t[$i + 1] = $lambda[$i + 1]; + } + } + + if (2 * $el <= $r + $numErasures - 1) { + $el = $r + $numErasures - $el; + + for ($i = 0; $i <= $this->numRoots; ++$i) { + $b[$i] = ( + $lambda[$i] === 0 + ? $this->blockSize + : $this->modNn($this->indexOf[$lambda[$i]] - $discrepancyR + $this->blockSize) + ); + } + } else { + $tmp = $b->toArray(); + array_unshift($tmp, $this->blockSize); + array_pop($tmp); + $b = SplFixedArray::fromArray($tmp, false); + } + + $lambda = clone $t; + } + + // Convert lambda to index form and compute deg(lambda(x)) + $degLambda = 0; + + for ($i = 0; $i <= $this->numRoots; ++$i) { + $lambda[$i] = $this->indexOf[$lambda[$i]]; + + if ($lambda[$i] !== $this->blockSize) { + $degLambda = $i; + } + } + + // Find roots of the error+erasure locator polynomial by Chien search. + $reg = clone $lambda; + $reg[0] = 0; + $count = 0; + $i = 1; + + for ($k = $this->iPrimitive - 1; $i <= $this->blockSize; ++$i, $k = $this->modNn($k + $this->iPrimitive)) { + $q = 1; + + for ($j = $degLambda; $j > 0; $j--) { + if ($reg[$j] !== $this->blockSize) { + $reg[$j] = $this->modNn($reg[$j] + $j); + $q ^= $this->alphaTo[$reg[$j]]; + } + } + + if ($q !== 0) { + // Not a root + continue; + } + + // Store root (index-form) and error location number + $root[$count] = $i; + $loc[$count] = $k; + + if (++$count === $degLambda) { + break; + } + } + + if ($degLambda !== $count) { + // deg(lambda) unequal to number of roots: uncorrectable error detected + return null; + } + + // Compute err+eras evaluate poly omega(x) = s(x)*lambda(x) (modulo x**numRoots). In index form. Also find + // deg(omega). + $degOmega = $degLambda - 1; + + for ($i = 0; $i <= $degOmega; ++$i) { + $tmp = 0; + + for ($j = $i; $j >= 0; --$j) { + if ($syndromes[$i - $j] !== $this->blockSize && $lambda[$j] !== $this->blockSize) { + $tmp ^= $this->alphaTo[$this->modNn($syndromes[$i - $j] + $lambda[$j])]; + } + } + + $omega[$i] = $this->indexOf[$tmp]; + } + + // Compute error values in poly-form. num1 = omega(inv(X(l))), num2 = inv(X(l))**(firstRoot-1) and + // den = lambda_pr(inv(X(l))) all in poly form. + for ($j = $count - 1; $j >= 0; --$j) { + $num1 = 0; + + for ($i = $degOmega; $i >= 0; $i--) { + if ($omega[$i] !== $this->blockSize) { + $num1 ^= $this->alphaTo[$this->modNn($omega[$i] + $i * $root[$j])]; + } + } + + $num2 = $this->alphaTo[$this->modNn($root[$j] * ($this->firstRoot - 1) + $this->blockSize)]; + $den = 0; + + // lambda[i+1] for i even is the formal derivativelambda_pr of lambda[i] + for ($i = min($degLambda, $this->numRoots - 1) & ~1; $i >= 0; $i -= 2) { + if ($lambda[$i + 1] !== $this->blockSize) { + $den ^= $this->alphaTo[$this->modNn($lambda[$i + 1] + $i * $root[$j])]; + } + } + + // Apply error to data + if ($num1 !== 0 && $loc[$j] >= $this->padding) { + $data[$loc[$j] - $this->padding] = $data[$loc[$j] - $this->padding] ^ ( + $this->alphaTo[ + $this->modNn( + $this->indexOf[$num1] + $this->indexOf[$num2] + $this->blockSize - $this->indexOf[$den] + ) + ] + ); + } + } + + if (null !== $erasures) { + if (count($erasures) < $count) { + $erasures->setSize($count); + } + + for ($i = 0; $i < $count; $i++) { + $erasures[$i] = $loc[$i]; + } + } + + return $count; + } + + /** + * Computes $x % GF_SIZE, where GF_SIZE is 2**GF_BITS - 1, without a slow divide. + */ + private function modNn(int $x) : int + { + while ($x >= $this->blockSize) { + $x -= $this->blockSize; + $x = ($x >> $this->symbolSize) + ($x & $this->blockSize); + } + + return $x; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Common/Version.php b/vendor/bacon/bacon-qr-code/src/Common/Version.php new file mode 100755 index 0000000..917d048 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Common/Version.php @@ -0,0 +1,596 @@ +|null + */ + private static $versions; + + /** + * @param int[] $alignmentPatternCenters + */ + private function __construct( + int $versionNumber, + array $alignmentPatternCenters, + EcBlocks ...$ecBlocks + ) { + $this->versionNumber = $versionNumber; + $this->alignmentPatternCenters = $alignmentPatternCenters; + $this->ecBlocks = $ecBlocks; + + $totalCodewords = 0; + $ecCodewords = $ecBlocks[0]->getEcCodewordsPerBlock(); + + foreach ($ecBlocks[0]->getEcBlocks() as $ecBlock) { + $totalCodewords += $ecBlock->getCount() * ($ecBlock->getDataCodewords() + $ecCodewords); + } + + $this->totalCodewords = $totalCodewords; + } + + /** + * Returns the version number. + */ + public function getVersionNumber() : int + { + return $this->versionNumber; + } + + /** + * Returns the alignment pattern centers. + * + * @return int[] + */ + public function getAlignmentPatternCenters() : array + { + return $this->alignmentPatternCenters; + } + + /** + * Returns the total number of codewords. + */ + public function getTotalCodewords() : int + { + return $this->totalCodewords; + } + + /** + * Calculates the dimension for the current version. + */ + public function getDimensionForVersion() : int + { + return 17 + 4 * $this->versionNumber; + } + + /** + * Returns the number of EC blocks for a specific EC level. + */ + public function getEcBlocksForLevel(ErrorCorrectionLevel $ecLevel) : EcBlocks + { + return $this->ecBlocks[$ecLevel->ordinal()]; + } + + /** + * Gets a provisional version number for a specific dimension. + * + * @throws InvalidArgumentException if dimension is not 1 mod 4 + */ + public static function getProvisionalVersionForDimension(int $dimension) : self + { + if (1 !== $dimension % 4) { + throw new InvalidArgumentException('Dimension is not 1 mod 4'); + } + + return self::getVersionForNumber(intdiv($dimension - 17, 4)); + } + + /** + * Gets a version instance for a specific version number. + * + * @throws InvalidArgumentException if version number is out of range + */ + public static function getVersionForNumber(int $versionNumber) : self + { + if ($versionNumber < 1 || $versionNumber > 40) { + throw new InvalidArgumentException('Version number must be between 1 and 40'); + } + + return self::versions()[$versionNumber - 1]; + } + + /** + * Decodes version information from an integer and returns the version. + */ + public static function decodeVersionInformation(int $versionBits) : ?self + { + $bestDifference = PHP_INT_MAX; + $bestVersion = 0; + + foreach (self::VERSION_DECODE_INFO as $i => $targetVersion) { + if ($targetVersion === $versionBits) { + return self::getVersionForNumber($i + 7); + } + + $bitsDifference = FormatInformation::numBitsDiffering($versionBits, $targetVersion); + + if ($bitsDifference < $bestDifference) { + $bestVersion = $i + 7; + $bestDifference = $bitsDifference; + } + } + + if ($bestDifference <= 3) { + return self::getVersionForNumber($bestVersion); + } + + return null; + } + + /** + * Builds the function pattern for the current version. + */ + public function buildFunctionPattern() : BitMatrix + { + $dimension = $this->getDimensionForVersion(); + $bitMatrix = new BitMatrix($dimension); + + // Top left finder pattern + separator + format + $bitMatrix->setRegion(0, 0, 9, 9); + // Top right finder pattern + separator + format + $bitMatrix->setRegion($dimension - 8, 0, 8, 9); + // Bottom left finder pattern + separator + format + $bitMatrix->setRegion(0, $dimension - 8, 9, 8); + + // Alignment patterns + $max = count($this->alignmentPatternCenters); + + for ($x = 0; $x < $max; ++$x) { + $i = $this->alignmentPatternCenters[$x] - 2; + + for ($y = 0; $y < $max; ++$y) { + if (($x === 0 && ($y === 0 || $y === $max - 1)) || ($x === $max - 1 && $y === 0)) { + // No alignment patterns near the three finder paterns + continue; + } + + $bitMatrix->setRegion($this->alignmentPatternCenters[$y] - 2, $i, 5, 5); + } + } + + // Vertical timing pattern + $bitMatrix->setRegion(6, 9, 1, $dimension - 17); + // Horizontal timing pattern + $bitMatrix->setRegion(9, 6, $dimension - 17, 1); + + if ($this->versionNumber > 6) { + // Version info, top right + $bitMatrix->setRegion($dimension - 11, 0, 3, 6); + // Version info, bottom left + $bitMatrix->setRegion(0, $dimension - 11, 6, 3); + } + + return $bitMatrix; + } + + /** + * Returns a string representation for the version. + */ + public function __toString() : string + { + return (string) $this->versionNumber; + } + + /** + * Build and cache a specific version. + * + * See ISO 18004:2006 6.5.1 Table 9. + * + * @return array + */ + private static function versions() : array + { + if (null !== self::$versions) { + return self::$versions; + } + + return self::$versions = [ + new self( + 1, + [], + new EcBlocks(7, new EcBlock(1, 19)), + new EcBlocks(10, new EcBlock(1, 16)), + new EcBlocks(13, new EcBlock(1, 13)), + new EcBlocks(17, new EcBlock(1, 9)) + ), + new self( + 2, + [6, 18], + new EcBlocks(10, new EcBlock(1, 34)), + new EcBlocks(16, new EcBlock(1, 28)), + new EcBlocks(22, new EcBlock(1, 22)), + new EcBlocks(28, new EcBlock(1, 16)) + ), + new self( + 3, + [6, 22], + new EcBlocks(15, new EcBlock(1, 55)), + new EcBlocks(26, new EcBlock(1, 44)), + new EcBlocks(18, new EcBlock(2, 17)), + new EcBlocks(22, new EcBlock(2, 13)) + ), + new self( + 4, + [6, 26], + new EcBlocks(20, new EcBlock(1, 80)), + new EcBlocks(18, new EcBlock(2, 32)), + new EcBlocks(26, new EcBlock(3, 24)), + new EcBlocks(16, new EcBlock(4, 9)) + ), + new self( + 5, + [6, 30], + new EcBlocks(26, new EcBlock(1, 108)), + new EcBlocks(24, new EcBlock(2, 43)), + new EcBlocks(18, new EcBlock(2, 15), new EcBlock(2, 16)), + new EcBlocks(22, new EcBlock(2, 11), new EcBlock(2, 12)) + ), + new self( + 6, + [6, 34], + new EcBlocks(18, new EcBlock(2, 68)), + new EcBlocks(16, new EcBlock(4, 27)), + new EcBlocks(24, new EcBlock(4, 19)), + new EcBlocks(28, new EcBlock(4, 15)) + ), + new self( + 7, + [6, 22, 38], + new EcBlocks(20, new EcBlock(2, 78)), + new EcBlocks(18, new EcBlock(4, 31)), + new EcBlocks(18, new EcBlock(2, 14), new EcBlock(4, 15)), + new EcBlocks(26, new EcBlock(4, 13), new EcBlock(1, 14)) + ), + new self( + 8, + [6, 24, 42], + new EcBlocks(24, new EcBlock(2, 97)), + new EcBlocks(22, new EcBlock(2, 38), new EcBlock(2, 39)), + new EcBlocks(22, new EcBlock(4, 18), new EcBlock(2, 19)), + new EcBlocks(26, new EcBlock(4, 14), new EcBlock(2, 15)) + ), + new self( + 9, + [6, 26, 46], + new EcBlocks(30, new EcBlock(2, 116)), + new EcBlocks(22, new EcBlock(3, 36), new EcBlock(2, 37)), + new EcBlocks(20, new EcBlock(4, 16), new EcBlock(4, 17)), + new EcBlocks(24, new EcBlock(4, 12), new EcBlock(4, 13)) + ), + new self( + 10, + [6, 28, 50], + new EcBlocks(18, new EcBlock(2, 68), new EcBlock(2, 69)), + new EcBlocks(26, new EcBlock(4, 43), new EcBlock(1, 44)), + new EcBlocks(24, new EcBlock(6, 19), new EcBlock(2, 20)), + new EcBlocks(28, new EcBlock(6, 15), new EcBlock(2, 16)) + ), + new self( + 11, + [6, 30, 54], + new EcBlocks(20, new EcBlock(4, 81)), + new EcBlocks(30, new EcBlock(1, 50), new EcBlock(4, 51)), + new EcBlocks(28, new EcBlock(4, 22), new EcBlock(4, 23)), + new EcBlocks(24, new EcBlock(3, 12), new EcBlock(8, 13)) + ), + new self( + 12, + [6, 32, 58], + new EcBlocks(24, new EcBlock(2, 92), new EcBlock(2, 93)), + new EcBlocks(22, new EcBlock(6, 36), new EcBlock(2, 37)), + new EcBlocks(26, new EcBlock(4, 20), new EcBlock(6, 21)), + new EcBlocks(28, new EcBlock(7, 14), new EcBlock(4, 15)) + ), + new self( + 13, + [6, 34, 62], + new EcBlocks(26, new EcBlock(4, 107)), + new EcBlocks(22, new EcBlock(8, 37), new EcBlock(1, 38)), + new EcBlocks(24, new EcBlock(8, 20), new EcBlock(4, 21)), + new EcBlocks(22, new EcBlock(12, 11), new EcBlock(4, 12)) + ), + new self( + 14, + [6, 26, 46, 66], + new EcBlocks(30, new EcBlock(3, 115), new EcBlock(1, 116)), + new EcBlocks(24, new EcBlock(4, 40), new EcBlock(5, 41)), + new EcBlocks(20, new EcBlock(11, 16), new EcBlock(5, 17)), + new EcBlocks(24, new EcBlock(11, 12), new EcBlock(5, 13)) + ), + new self( + 15, + [6, 26, 48, 70], + new EcBlocks(22, new EcBlock(5, 87), new EcBlock(1, 88)), + new EcBlocks(24, new EcBlock(5, 41), new EcBlock(5, 42)), + new EcBlocks(30, new EcBlock(5, 24), new EcBlock(7, 25)), + new EcBlocks(24, new EcBlock(11, 12), new EcBlock(7, 13)) + ), + new self( + 16, + [6, 26, 50, 74], + new EcBlocks(24, new EcBlock(5, 98), new EcBlock(1, 99)), + new EcBlocks(28, new EcBlock(7, 45), new EcBlock(3, 46)), + new EcBlocks(24, new EcBlock(15, 19), new EcBlock(2, 20)), + new EcBlocks(30, new EcBlock(3, 15), new EcBlock(13, 16)) + ), + new self( + 17, + [6, 30, 54, 78], + new EcBlocks(28, new EcBlock(1, 107), new EcBlock(5, 108)), + new EcBlocks(28, new EcBlock(10, 46), new EcBlock(1, 47)), + new EcBlocks(28, new EcBlock(1, 22), new EcBlock(15, 23)), + new EcBlocks(28, new EcBlock(2, 14), new EcBlock(17, 15)) + ), + new self( + 18, + [6, 30, 56, 82], + new EcBlocks(30, new EcBlock(5, 120), new EcBlock(1, 121)), + new EcBlocks(26, new EcBlock(9, 43), new EcBlock(4, 44)), + new EcBlocks(28, new EcBlock(17, 22), new EcBlock(1, 23)), + new EcBlocks(28, new EcBlock(2, 14), new EcBlock(19, 15)) + ), + new self( + 19, + [6, 30, 58, 86], + new EcBlocks(28, new EcBlock(3, 113), new EcBlock(4, 114)), + new EcBlocks(26, new EcBlock(3, 44), new EcBlock(11, 45)), + new EcBlocks(26, new EcBlock(17, 21), new EcBlock(4, 22)), + new EcBlocks(26, new EcBlock(9, 13), new EcBlock(16, 14)) + ), + new self( + 20, + [6, 34, 62, 90], + new EcBlocks(28, new EcBlock(3, 107), new EcBlock(5, 108)), + new EcBlocks(26, new EcBlock(3, 41), new EcBlock(13, 42)), + new EcBlocks(30, new EcBlock(15, 24), new EcBlock(5, 25)), + new EcBlocks(28, new EcBlock(15, 15), new EcBlock(10, 16)) + ), + new self( + 21, + [6, 28, 50, 72, 94], + new EcBlocks(28, new EcBlock(4, 116), new EcBlock(4, 117)), + new EcBlocks(26, new EcBlock(17, 42)), + new EcBlocks(28, new EcBlock(17, 22), new EcBlock(6, 23)), + new EcBlocks(30, new EcBlock(19, 16), new EcBlock(6, 17)) + ), + new self( + 22, + [6, 26, 50, 74, 98], + new EcBlocks(28, new EcBlock(2, 111), new EcBlock(7, 112)), + new EcBlocks(28, new EcBlock(17, 46)), + new EcBlocks(30, new EcBlock(7, 24), new EcBlock(16, 25)), + new EcBlocks(24, new EcBlock(34, 13)) + ), + new self( + 23, + [6, 30, 54, 78, 102], + new EcBlocks(30, new EcBlock(4, 121), new EcBlock(5, 122)), + new EcBlocks(28, new EcBlock(4, 47), new EcBlock(14, 48)), + new EcBlocks(30, new EcBlock(11, 24), new EcBlock(14, 25)), + new EcBlocks(30, new EcBlock(16, 15), new EcBlock(14, 16)) + ), + new self( + 24, + [6, 28, 54, 80, 106], + new EcBlocks(30, new EcBlock(6, 117), new EcBlock(4, 118)), + new EcBlocks(28, new EcBlock(6, 45), new EcBlock(14, 46)), + new EcBlocks(30, new EcBlock(11, 24), new EcBlock(16, 25)), + new EcBlocks(30, new EcBlock(30, 16), new EcBlock(2, 17)) + ), + new self( + 25, + [6, 32, 58, 84, 110], + new EcBlocks(26, new EcBlock(8, 106), new EcBlock(4, 107)), + new EcBlocks(28, new EcBlock(8, 47), new EcBlock(13, 48)), + new EcBlocks(30, new EcBlock(7, 24), new EcBlock(22, 25)), + new EcBlocks(30, new EcBlock(22, 15), new EcBlock(13, 16)) + ), + new self( + 26, + [6, 30, 58, 86, 114], + new EcBlocks(28, new EcBlock(10, 114), new EcBlock(2, 115)), + new EcBlocks(28, new EcBlock(19, 46), new EcBlock(4, 47)), + new EcBlocks(28, new EcBlock(28, 22), new EcBlock(6, 23)), + new EcBlocks(30, new EcBlock(33, 16), new EcBlock(4, 17)) + ), + new self( + 27, + [6, 34, 62, 90, 118], + new EcBlocks(30, new EcBlock(8, 122), new EcBlock(4, 123)), + new EcBlocks(28, new EcBlock(22, 45), new EcBlock(3, 46)), + new EcBlocks(30, new EcBlock(8, 23), new EcBlock(26, 24)), + new EcBlocks(30, new EcBlock(12, 15), new EcBlock(28, 16)) + ), + new self( + 28, + [6, 26, 50, 74, 98, 122], + new EcBlocks(30, new EcBlock(3, 117), new EcBlock(10, 118)), + new EcBlocks(28, new EcBlock(3, 45), new EcBlock(23, 46)), + new EcBlocks(30, new EcBlock(4, 24), new EcBlock(31, 25)), + new EcBlocks(30, new EcBlock(11, 15), new EcBlock(31, 16)) + ), + new self( + 29, + [6, 30, 54, 78, 102, 126], + new EcBlocks(30, new EcBlock(7, 116), new EcBlock(7, 117)), + new EcBlocks(28, new EcBlock(21, 45), new EcBlock(7, 46)), + new EcBlocks(30, new EcBlock(1, 23), new EcBlock(37, 24)), + new EcBlocks(30, new EcBlock(19, 15), new EcBlock(26, 16)) + ), + new self( + 30, + [6, 26, 52, 78, 104, 130], + new EcBlocks(30, new EcBlock(5, 115), new EcBlock(10, 116)), + new EcBlocks(28, new EcBlock(19, 47), new EcBlock(10, 48)), + new EcBlocks(30, new EcBlock(15, 24), new EcBlock(25, 25)), + new EcBlocks(30, new EcBlock(23, 15), new EcBlock(25, 16)) + ), + new self( + 31, + [6, 30, 56, 82, 108, 134], + new EcBlocks(30, new EcBlock(13, 115), new EcBlock(3, 116)), + new EcBlocks(28, new EcBlock(2, 46), new EcBlock(29, 47)), + new EcBlocks(30, new EcBlock(42, 24), new EcBlock(1, 25)), + new EcBlocks(30, new EcBlock(23, 15), new EcBlock(28, 16)) + ), + new self( + 32, + [6, 34, 60, 86, 112, 138], + new EcBlocks(30, new EcBlock(17, 115)), + new EcBlocks(28, new EcBlock(10, 46), new EcBlock(23, 47)), + new EcBlocks(30, new EcBlock(10, 24), new EcBlock(35, 25)), + new EcBlocks(30, new EcBlock(19, 15), new EcBlock(35, 16)) + ), + new self( + 33, + [6, 30, 58, 86, 114, 142], + new EcBlocks(30, new EcBlock(17, 115), new EcBlock(1, 116)), + new EcBlocks(28, new EcBlock(14, 46), new EcBlock(21, 47)), + new EcBlocks(30, new EcBlock(29, 24), new EcBlock(19, 25)), + new EcBlocks(30, new EcBlock(11, 15), new EcBlock(46, 16)) + ), + new self( + 34, + [6, 34, 62, 90, 118, 146], + new EcBlocks(30, new EcBlock(13, 115), new EcBlock(6, 116)), + new EcBlocks(28, new EcBlock(14, 46), new EcBlock(23, 47)), + new EcBlocks(30, new EcBlock(44, 24), new EcBlock(7, 25)), + new EcBlocks(30, new EcBlock(59, 16), new EcBlock(1, 17)) + ), + new self( + 35, + [6, 30, 54, 78, 102, 126, 150], + new EcBlocks(30, new EcBlock(12, 121), new EcBlock(7, 122)), + new EcBlocks(28, new EcBlock(12, 47), new EcBlock(26, 48)), + new EcBlocks(30, new EcBlock(39, 24), new EcBlock(14, 25)), + new EcBlocks(30, new EcBlock(22, 15), new EcBlock(41, 16)) + ), + new self( + 36, + [6, 24, 50, 76, 102, 128, 154], + new EcBlocks(30, new EcBlock(6, 121), new EcBlock(14, 122)), + new EcBlocks(28, new EcBlock(6, 47), new EcBlock(34, 48)), + new EcBlocks(30, new EcBlock(46, 24), new EcBlock(10, 25)), + new EcBlocks(30, new EcBlock(2, 15), new EcBlock(64, 16)) + ), + new self( + 37, + [6, 28, 54, 80, 106, 132, 158], + new EcBlocks(30, new EcBlock(17, 122), new EcBlock(4, 123)), + new EcBlocks(28, new EcBlock(29, 46), new EcBlock(14, 47)), + new EcBlocks(30, new EcBlock(49, 24), new EcBlock(10, 25)), + new EcBlocks(30, new EcBlock(24, 15), new EcBlock(46, 16)) + ), + new self( + 38, + [6, 32, 58, 84, 110, 136, 162], + new EcBlocks(30, new EcBlock(4, 122), new EcBlock(18, 123)), + new EcBlocks(28, new EcBlock(13, 46), new EcBlock(32, 47)), + new EcBlocks(30, new EcBlock(48, 24), new EcBlock(14, 25)), + new EcBlocks(30, new EcBlock(42, 15), new EcBlock(32, 16)) + ), + new self( + 39, + [6, 26, 54, 82, 110, 138, 166], + new EcBlocks(30, new EcBlock(20, 117), new EcBlock(4, 118)), + new EcBlocks(28, new EcBlock(40, 47), new EcBlock(7, 48)), + new EcBlocks(30, new EcBlock(43, 24), new EcBlock(22, 25)), + new EcBlocks(30, new EcBlock(10, 15), new EcBlock(67, 16)) + ), + new self( + 40, + [6, 30, 58, 86, 114, 142, 170], + new EcBlocks(30, new EcBlock(19, 118), new EcBlock(6, 119)), + new EcBlocks(28, new EcBlock(18, 47), new EcBlock(31, 48)), + new EcBlocks(30, new EcBlock(34, 24), new EcBlock(34, 25)), + new EcBlocks(30, new EcBlock(20, 15), new EcBlock(61, 16)) + ), + ]; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Encoder/BlockPair.php b/vendor/bacon/bacon-qr-code/src/Encoder/BlockPair.php new file mode 100755 index 0000000..be54afa --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Encoder/BlockPair.php @@ -0,0 +1,58 @@ + + */ + private $dataBytes; + + /** + * Error correction bytes in the block. + * + * @var SplFixedArray + */ + private $errorCorrectionBytes; + + /** + * Creates a new block pair. + * + * @param SplFixedArray $data + * @param SplFixedArray $errorCorrection + */ + public function __construct(SplFixedArray $data, SplFixedArray $errorCorrection) + { + $this->dataBytes = $data; + $this->errorCorrectionBytes = $errorCorrection; + } + + /** + * Gets the data bytes. + * + * @return SplFixedArray + */ + public function getDataBytes() : SplFixedArray + { + return $this->dataBytes; + } + + /** + * Gets the error correction bytes. + * + * @return SplFixedArray + */ + public function getErrorCorrectionBytes() : SplFixedArray + { + return $this->errorCorrectionBytes; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Encoder/ByteMatrix.php b/vendor/bacon/bacon-qr-code/src/Encoder/ByteMatrix.php new file mode 100755 index 0000000..b58cc0a --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Encoder/ByteMatrix.php @@ -0,0 +1,150 @@ +> + */ + private $bytes; + + /** + * Width of the matrix. + * + * @var int + */ + private $width; + + /** + * Height of the matrix. + * + * @var int + */ + private $height; + + public function __construct(int $width, int $height) + { + $this->height = $height; + $this->width = $width; + $this->bytes = new SplFixedArray($height); + + for ($y = 0; $y < $height; ++$y) { + $this->bytes[$y] = SplFixedArray::fromArray(array_fill(0, $width, 0)); + } + } + + /** + * Gets the width of the matrix. + */ + public function getWidth() : int + { + return $this->width; + } + + /** + * Gets the height of the matrix. + */ + public function getHeight() : int + { + return $this->height; + } + + /** + * Gets the internal representation of the matrix. + * + * @return SplFixedArray> + */ + public function getArray() : SplFixedArray + { + return $this->bytes; + } + + /** + * @return Traversable + */ + public function getBytes() : Traversable + { + foreach ($this->bytes as $row) { + foreach ($row as $byte) { + yield $byte; + } + } + } + + /** + * Gets the byte for a specific position. + */ + public function get(int $x, int $y) : int + { + return $this->bytes[$y][$x]; + } + + /** + * Sets the byte for a specific position. + */ + public function set(int $x, int $y, int $value) : void + { + $this->bytes[$y][$x] = $value; + } + + /** + * Clears the matrix with a specific value. + */ + public function clear(int $value) : void + { + for ($y = 0; $y < $this->height; ++$y) { + for ($x = 0; $x < $this->width; ++$x) { + $this->bytes[$y][$x] = $value; + } + } + } + + public function __clone() + { + $this->bytes = clone $this->bytes; + + foreach ($this->bytes as $index => $row) { + $this->bytes[$index] = clone $row; + } + } + + /** + * Returns a string representation of the matrix. + */ + public function __toString() : string + { + $result = ''; + + for ($y = 0; $y < $this->height; $y++) { + for ($x = 0; $x < $this->width; $x++) { + switch ($this->bytes[$y][$x]) { + case 0: + $result .= ' 0'; + break; + + case 1: + $result .= ' 1'; + break; + + default: + $result .= ' '; + break; + } + } + + $result .= "\n"; + } + + return $result; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php b/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php new file mode 100755 index 0000000..4345f57 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Encoder/Encoder.php @@ -0,0 +1,652 @@ +getSize() + + $mode->getCharacterCountBits(Version::getVersionForNumber(1)) + + $dataBits->getSize(); + $provisionalVersion = self::chooseVersion($provisionalBitsNeeded, $ecLevel); + + // Use that guess to calculate the right version. I am still not sure + // this works in 100% of cases. + $bitsNeeded = $headerBits->getSize() + + $mode->getCharacterCountBits($provisionalVersion) + + $dataBits->getSize(); + $version = self::chooseVersion($bitsNeeded, $ecLevel); + + $headerAndDataBits = new BitArray(); + $headerAndDataBits->appendBitArray($headerBits); + + // Find "length" of main segment and write it. + $numLetters = (Mode::BYTE() === $mode ? $dataBits->getSizeInBytes() : strlen($content)); + self::appendLengthInfo($numLetters, $version, $mode, $headerAndDataBits); + + // Put data together into the overall payload. + $headerAndDataBits->appendBitArray($dataBits); + $ecBlocks = $version->getEcBlocksForLevel($ecLevel); + $numDataBytes = $version->getTotalCodewords() - $ecBlocks->getTotalEcCodewords(); + + // Terminate the bits properly. + self::terminateBits($numDataBytes, $headerAndDataBits); + + // Interleave data bits with error correction code. + $finalBits = self::interleaveWithEcBytes( + $headerAndDataBits, + $version->getTotalCodewords(), + $numDataBytes, + $ecBlocks->getNumBlocks() + ); + + // Choose the mask pattern. + $dimension = $version->getDimensionForVersion(); + $matrix = new ByteMatrix($dimension, $dimension); + $maskPattern = self::chooseMaskPattern($finalBits, $ecLevel, $version, $matrix); + + // Build the matrix. + MatrixUtil::buildMatrix($finalBits, $ecLevel, $version, $maskPattern, $matrix); + + return new QrCode($mode, $ecLevel, $version, $maskPattern, $matrix); + } + + /** + * Gets the alphanumeric code for a byte. + */ + private static function getAlphanumericCode(int $code) : int + { + if (isset(self::ALPHANUMERIC_TABLE[$code])) { + return self::ALPHANUMERIC_TABLE[$code]; + } + + return -1; + } + + /** + * Chooses the best mode for a given content. + */ + private static function chooseMode(string $content, string $encoding = null) : Mode + { + if (null !== $encoding && 0 === strcasecmp($encoding, 'SHIFT-JIS')) { + return self::isOnlyDoubleByteKanji($content) ? Mode::KANJI() : Mode::BYTE(); + } + + $hasNumeric = false; + $hasAlphanumeric = false; + $contentLength = strlen($content); + + for ($i = 0; $i < $contentLength; ++$i) { + $char = $content[$i]; + + if (ctype_digit($char)) { + $hasNumeric = true; + } elseif (-1 !== self::getAlphanumericCode(ord($char))) { + $hasAlphanumeric = true; + } else { + return Mode::BYTE(); + } + } + + if ($hasAlphanumeric) { + return Mode::ALPHANUMERIC(); + } elseif ($hasNumeric) { + return Mode::NUMERIC(); + } + + return Mode::BYTE(); + } + + /** + * Calculates the mask penalty for a matrix. + */ + private static function calculateMaskPenalty(ByteMatrix $matrix) : int + { + return ( + MaskUtil::applyMaskPenaltyRule1($matrix) + + MaskUtil::applyMaskPenaltyRule2($matrix) + + MaskUtil::applyMaskPenaltyRule3($matrix) + + MaskUtil::applyMaskPenaltyRule4($matrix) + ); + } + + /** + * Checks if content only consists of double-byte kanji characters. + */ + private static function isOnlyDoubleByteKanji(string $content) : bool + { + $bytes = @iconv('utf-8', 'SHIFT-JIS', $content); + + if (false === $bytes) { + return false; + } + + $length = strlen($bytes); + + if (0 !== $length % 2) { + return false; + } + + for ($i = 0; $i < $length; $i += 2) { + $byte = $bytes[$i] & 0xff; + + if (($byte < 0x81 || $byte > 0x9f) && $byte < 0xe0 || $byte > 0xeb) { + return false; + } + } + + return true; + } + + /** + * Chooses the best mask pattern for a matrix. + */ + private static function chooseMaskPattern( + BitArray $bits, + ErrorCorrectionLevel $ecLevel, + Version $version, + ByteMatrix $matrix + ) : int { + $minPenalty = PHP_INT_MAX; + $bestMaskPattern = -1; + + for ($maskPattern = 0; $maskPattern < QrCode::NUM_MASK_PATTERNS; ++$maskPattern) { + MatrixUtil::buildMatrix($bits, $ecLevel, $version, $maskPattern, $matrix); + $penalty = self::calculateMaskPenalty($matrix); + + if ($penalty < $minPenalty) { + $minPenalty = $penalty; + $bestMaskPattern = $maskPattern; + } + } + + return $bestMaskPattern; + } + + /** + * Chooses the best version for the input. + * + * @throws WriterException if data is too big + */ + private static function chooseVersion(int $numInputBits, ErrorCorrectionLevel $ecLevel) : Version + { + for ($versionNum = 1; $versionNum <= 40; ++$versionNum) { + $version = Version::getVersionForNumber($versionNum); + $numBytes = $version->getTotalCodewords(); + + $ecBlocks = $version->getEcBlocksForLevel($ecLevel); + $numEcBytes = $ecBlocks->getTotalEcCodewords(); + + $numDataBytes = $numBytes - $numEcBytes; + $totalInputBytes = intdiv($numInputBits + 8, 8); + + if ($numDataBytes >= $totalInputBytes) { + return $version; + } + } + + throw new WriterException('Data too big'); + } + + /** + * Terminates the bits in a bit array. + * + * @throws WriterException if data bits cannot fit in the QR code + * @throws WriterException if bits size does not equal the capacity + */ + private static function terminateBits(int $numDataBytes, BitArray $bits) : void + { + $capacity = $numDataBytes << 3; + + if ($bits->getSize() > $capacity) { + throw new WriterException('Data bits cannot fit in the QR code'); + } + + for ($i = 0; $i < 4 && $bits->getSize() < $capacity; ++$i) { + $bits->appendBit(false); + } + + $numBitsInLastByte = $bits->getSize() & 0x7; + + if ($numBitsInLastByte > 0) { + for ($i = $numBitsInLastByte; $i < 8; ++$i) { + $bits->appendBit(false); + } + } + + $numPaddingBytes = $numDataBytes - $bits->getSizeInBytes(); + + for ($i = 0; $i < $numPaddingBytes; ++$i) { + $bits->appendBits(0 === ($i & 0x1) ? 0xec : 0x11, 8); + } + + if ($bits->getSize() !== $capacity) { + throw new WriterException('Bits size does not equal capacity'); + } + } + + /** + * Gets number of data- and EC bytes for a block ID. + * + * @return int[] + * @throws WriterException if block ID is too large + * @throws WriterException if EC bytes mismatch + * @throws WriterException if RS blocks mismatch + * @throws WriterException if total bytes mismatch + */ + private static function getNumDataBytesAndNumEcBytesForBlockId( + int $numTotalBytes, + int $numDataBytes, + int $numRsBlocks, + int $blockId + ) : array { + if ($blockId >= $numRsBlocks) { + throw new WriterException('Block ID too large'); + } + + $numRsBlocksInGroup2 = $numTotalBytes % $numRsBlocks; + $numRsBlocksInGroup1 = $numRsBlocks - $numRsBlocksInGroup2; + $numTotalBytesInGroup1 = intdiv($numTotalBytes, $numRsBlocks); + $numTotalBytesInGroup2 = $numTotalBytesInGroup1 + 1; + $numDataBytesInGroup1 = intdiv($numDataBytes, $numRsBlocks); + $numDataBytesInGroup2 = $numDataBytesInGroup1 + 1; + $numEcBytesInGroup1 = $numTotalBytesInGroup1 - $numDataBytesInGroup1; + $numEcBytesInGroup2 = $numTotalBytesInGroup2 - $numDataBytesInGroup2; + + if ($numEcBytesInGroup1 !== $numEcBytesInGroup2) { + throw new WriterException('EC bytes mismatch'); + } + + if ($numRsBlocks !== $numRsBlocksInGroup1 + $numRsBlocksInGroup2) { + throw new WriterException('RS blocks mismatch'); + } + + if ($numTotalBytes !== + (($numDataBytesInGroup1 + $numEcBytesInGroup1) * $numRsBlocksInGroup1) + + (($numDataBytesInGroup2 + $numEcBytesInGroup2) * $numRsBlocksInGroup2) + ) { + throw new WriterException('Total bytes mismatch'); + } + + if ($blockId < $numRsBlocksInGroup1) { + return [$numDataBytesInGroup1, $numEcBytesInGroup1]; + } else { + return [$numDataBytesInGroup2, $numEcBytesInGroup2]; + } + } + + /** + * Interleaves data with EC bytes. + * + * @throws WriterException if number of bits and data bytes does not match + * @throws WriterException if data bytes does not match offset + * @throws WriterException if an interleaving error occurs + */ + private static function interleaveWithEcBytes( + BitArray $bits, + int $numTotalBytes, + int $numDataBytes, + int $numRsBlocks + ) : BitArray { + if ($bits->getSizeInBytes() !== $numDataBytes) { + throw new WriterException('Number of bits and data bytes does not match'); + } + + $dataBytesOffset = 0; + $maxNumDataBytes = 0; + $maxNumEcBytes = 0; + + $blocks = new SplFixedArray($numRsBlocks); + + for ($i = 0; $i < $numRsBlocks; ++$i) { + list($numDataBytesInBlock, $numEcBytesInBlock) = self::getNumDataBytesAndNumEcBytesForBlockId( + $numTotalBytes, + $numDataBytes, + $numRsBlocks, + $i + ); + + $size = $numDataBytesInBlock; + $dataBytes = $bits->toBytes(8 * $dataBytesOffset, $size); + $ecBytes = self::generateEcBytes($dataBytes, $numEcBytesInBlock); + $blocks[$i] = new BlockPair($dataBytes, $ecBytes); + + $maxNumDataBytes = max($maxNumDataBytes, $size); + $maxNumEcBytes = max($maxNumEcBytes, count($ecBytes)); + $dataBytesOffset += $numDataBytesInBlock; + } + + if ($numDataBytes !== $dataBytesOffset) { + throw new WriterException('Data bytes does not match offset'); + } + + $result = new BitArray(); + + for ($i = 0; $i < $maxNumDataBytes; ++$i) { + foreach ($blocks as $block) { + $dataBytes = $block->getDataBytes(); + + if ($i < count($dataBytes)) { + $result->appendBits($dataBytes[$i], 8); + } + } + } + + for ($i = 0; $i < $maxNumEcBytes; ++$i) { + foreach ($blocks as $block) { + $ecBytes = $block->getErrorCorrectionBytes(); + + if ($i < count($ecBytes)) { + $result->appendBits($ecBytes[$i], 8); + } + } + } + + if ($numTotalBytes !== $result->getSizeInBytes()) { + throw new WriterException( + 'Interleaving error: ' . $numTotalBytes . ' and ' . $result->getSizeInBytes() . ' differ' + ); + } + + return $result; + } + + /** + * Generates EC bytes for given data. + * + * @param SplFixedArray $dataBytes + * @return SplFixedArray + */ + private static function generateEcBytes(SplFixedArray $dataBytes, int $numEcBytesInBlock) : SplFixedArray + { + $numDataBytes = count($dataBytes); + $toEncode = new SplFixedArray($numDataBytes + $numEcBytesInBlock); + + for ($i = 0; $i < $numDataBytes; $i++) { + $toEncode[$i] = $dataBytes[$i] & 0xff; + } + + $ecBytes = new SplFixedArray($numEcBytesInBlock); + $codec = self::getCodec($numDataBytes, $numEcBytesInBlock); + $codec->encode($toEncode, $ecBytes); + + return $ecBytes; + } + + /** + * Gets an RS codec and caches it. + */ + private static function getCodec(int $numDataBytes, int $numEcBytesInBlock) : ReedSolomonCodec + { + $cacheId = $numDataBytes . '-' . $numEcBytesInBlock; + + if (isset(self::$codecs[$cacheId])) { + return self::$codecs[$cacheId]; + } + + return self::$codecs[$cacheId] = new ReedSolomonCodec( + 8, + 0x11d, + 0, + 1, + $numEcBytesInBlock, + 255 - $numDataBytes - $numEcBytesInBlock + ); + } + + /** + * Appends mode information to a bit array. + */ + private static function appendModeInfo(Mode $mode, BitArray $bits) : void + { + $bits->appendBits($mode->getBits(), 4); + } + + /** + * Appends length information to a bit array. + * + * @throws WriterException if num letters is bigger than expected + */ + private static function appendLengthInfo(int $numLetters, Version $version, Mode $mode, BitArray $bits) : void + { + $numBits = $mode->getCharacterCountBits($version); + + if ($numLetters >= (1 << $numBits)) { + throw new WriterException($numLetters . ' is bigger than ' . ((1 << $numBits) - 1)); + } + + $bits->appendBits($numLetters, $numBits); + } + + /** + * Appends bytes to a bit array in a specific mode. + * + * @throws WriterException if an invalid mode was supplied + */ + private static function appendBytes(string $content, Mode $mode, BitArray $bits, string $encoding) : void + { + switch ($mode) { + case Mode::NUMERIC(): + self::appendNumericBytes($content, $bits); + break; + + case Mode::ALPHANUMERIC(): + self::appendAlphanumericBytes($content, $bits); + break; + + case Mode::BYTE(): + self::append8BitBytes($content, $bits, $encoding); + break; + + case Mode::KANJI(): + self::appendKanjiBytes($content, $bits); + break; + + default: + throw new WriterException('Invalid mode: ' . $mode); + } + } + + /** + * Appends numeric bytes to a bit array. + */ + private static function appendNumericBytes(string $content, BitArray $bits) : void + { + $length = strlen($content); + $i = 0; + + while ($i < $length) { + $num1 = (int) $content[$i]; + + if ($i + 2 < $length) { + // Encode three numeric letters in ten bits. + $num2 = (int) $content[$i + 1]; + $num3 = (int) $content[$i + 2]; + $bits->appendBits($num1 * 100 + $num2 * 10 + $num3, 10); + $i += 3; + } elseif ($i + 1 < $length) { + // Encode two numeric letters in seven bits. + $num2 = (int) $content[$i + 1]; + $bits->appendBits($num1 * 10 + $num2, 7); + $i += 2; + } else { + // Encode one numeric letter in four bits. + $bits->appendBits($num1, 4); + ++$i; + } + } + } + + /** + * Appends alpha-numeric bytes to a bit array. + * + * @throws WriterException if an invalid alphanumeric code was found + */ + private static function appendAlphanumericBytes(string $content, BitArray $bits) : void + { + $length = strlen($content); + $i = 0; + + while ($i < $length) { + $code1 = self::getAlphanumericCode(ord($content[$i])); + + if (-1 === $code1) { + throw new WriterException('Invalid alphanumeric code'); + } + + if ($i + 1 < $length) { + $code2 = self::getAlphanumericCode(ord($content[$i + 1])); + + if (-1 === $code2) { + throw new WriterException('Invalid alphanumeric code'); + } + + // Encode two alphanumeric letters in 11 bits. + $bits->appendBits($code1 * 45 + $code2, 11); + $i += 2; + } else { + // Encode one alphanumeric letter in six bits. + $bits->appendBits($code1, 6); + ++$i; + } + } + } + + /** + * Appends regular 8-bit bytes to a bit array. + * + * @throws WriterException if content cannot be encoded to target encoding + */ + private static function append8BitBytes(string $content, BitArray $bits, string $encoding) : void + { + $bytes = @iconv('utf-8', $encoding, $content); + + if (false === $bytes) { + throw new WriterException('Could not encode content to ' . $encoding); + } + + $length = strlen($bytes); + + for ($i = 0; $i < $length; $i++) { + $bits->appendBits(ord($bytes[$i]), 8); + } + } + + /** + * Appends KANJI bytes to a bit array. + * + * @throws WriterException if content does not seem to be encoded in SHIFT-JIS + * @throws WriterException if an invalid byte sequence occurs + */ + private static function appendKanjiBytes(string $content, BitArray $bits) : void + { + if (strlen($content) % 2 > 0) { + // We just do a simple length check here. The for loop will check + // individual characters. + throw new WriterException('Content does not seem to be encoded in SHIFT-JIS'); + } + + $length = strlen($content); + + for ($i = 0; $i < $length; $i += 2) { + $byte1 = ord($content[$i]) & 0xff; + $byte2 = ord($content[$i + 1]) & 0xff; + $code = ($byte1 << 8) | $byte2; + + if ($code >= 0x8140 && $code <= 0x9ffc) { + $subtracted = $code - 0x8140; + } elseif ($code >= 0xe040 && $code <= 0xebbf) { + $subtracted = $code - 0xc140; + } else { + throw new WriterException('Invalid byte sequence'); + } + + $encoded = (($subtracted >> 8) * 0xc0) + ($subtracted & 0xff); + + $bits->appendBits($encoded, 13); + } + } + + /** + * Appends ECI information to a bit array. + */ + private static function appendEci(CharacterSetEci $eci, BitArray $bits) : void + { + $mode = Mode::ECI(); + $bits->appendBits($mode->getBits(), 4); + $bits->appendBits($eci->getValue(), 8); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Encoder/MaskUtil.php b/vendor/bacon/bacon-qr-code/src/Encoder/MaskUtil.php new file mode 100755 index 0000000..3baddbd --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Encoder/MaskUtil.php @@ -0,0 +1,271 @@ +getArray(); + $width = $matrix->getWidth(); + $height = $matrix->getHeight(); + + for ($y = 0; $y < $height - 1; ++$y) { + for ($x = 0; $x < $width - 1; ++$x) { + $value = $array[$y][$x]; + + if ($value === $array[$y][$x + 1] + && $value === $array[$y + 1][$x] + && $value === $array[$y + 1][$x + 1] + ) { + ++$penalty; + } + } + } + + return self::N2 * $penalty; + } + + /** + * Applies mask penalty rule 3 and returns the penalty. + * + * Finds consecutive cells of 00001011101 or 10111010000, and gives penalty + * to them. If we find patterns like 000010111010000, we give penalties + * twice (i.e. 40 * 2). + */ + public static function applyMaskPenaltyRule3(ByteMatrix $matrix) : int + { + $penalty = 0; + $array = $matrix->getArray(); + $width = $matrix->getWidth(); + $height = $matrix->getHeight(); + + for ($y = 0; $y < $height; ++$y) { + for ($x = 0; $x < $width; ++$x) { + if ($x + 6 < $width + && 1 === $array[$y][$x] + && 0 === $array[$y][$x + 1] + && 1 === $array[$y][$x + 2] + && 1 === $array[$y][$x + 3] + && 1 === $array[$y][$x + 4] + && 0 === $array[$y][$x + 5] + && 1 === $array[$y][$x + 6] + && ( + ( + $x + 10 < $width + && 0 === $array[$y][$x + 7] + && 0 === $array[$y][$x + 8] + && 0 === $array[$y][$x + 9] + && 0 === $array[$y][$x + 10] + ) + || ( + $x - 4 >= 0 + && 0 === $array[$y][$x - 1] + && 0 === $array[$y][$x - 2] + && 0 === $array[$y][$x - 3] + && 0 === $array[$y][$x - 4] + ) + ) + ) { + $penalty += self::N3; + } + + if ($y + 6 < $height + && 1 === $array[$y][$x] + && 0 === $array[$y + 1][$x] + && 1 === $array[$y + 2][$x] + && 1 === $array[$y + 3][$x] + && 1 === $array[$y + 4][$x] + && 0 === $array[$y + 5][$x] + && 1 === $array[$y + 6][$x] + && ( + ( + $y + 10 < $height + && 0 === $array[$y + 7][$x] + && 0 === $array[$y + 8][$x] + && 0 === $array[$y + 9][$x] + && 0 === $array[$y + 10][$x] + ) + || ( + $y - 4 >= 0 + && 0 === $array[$y - 1][$x] + && 0 === $array[$y - 2][$x] + && 0 === $array[$y - 3][$x] + && 0 === $array[$y - 4][$x] + ) + ) + ) { + $penalty += self::N3; + } + } + } + + return $penalty; + } + + /** + * Applies mask penalty rule 4 and returns the penalty. + * + * Calculates the ratio of dark cells and gives penalty if the ratio is far + * from 50%. It gives 10 penalty for 5% distance. + */ + public static function applyMaskPenaltyRule4(ByteMatrix $matrix) : int + { + $numDarkCells = 0; + + $array = $matrix->getArray(); + $width = $matrix->getWidth(); + $height = $matrix->getHeight(); + + for ($y = 0; $y < $height; ++$y) { + $arrayY = $array[$y]; + + for ($x = 0; $x < $width; ++$x) { + if (1 === $arrayY[$x]) { + ++$numDarkCells; + } + } + } + + $numTotalCells = $height * $width; + $darkRatio = $numDarkCells / $numTotalCells; + $fixedPercentVariances = (int) (abs($darkRatio - 0.5) * 20); + + return $fixedPercentVariances * self::N4; + } + + /** + * Returns the mask bit for "getMaskPattern" at "x" and "y". + * + * See 8.8 of JISX0510:2004 for mask pattern conditions. + * + * @throws InvalidArgumentException if an invalid mask pattern was supplied + */ + public static function getDataMaskBit(int $maskPattern, int $x, int $y) : bool + { + switch ($maskPattern) { + case 0: + $intermediate = ($y + $x) & 0x1; + break; + + case 1: + $intermediate = $y & 0x1; + break; + + case 2: + $intermediate = $x % 3; + break; + + case 3: + $intermediate = ($y + $x) % 3; + break; + + case 4: + $intermediate = (BitUtils::unsignedRightShift($y, 1) + ($x / 3)) & 0x1; + break; + + case 5: + $temp = $y * $x; + $intermediate = ($temp & 0x1) + ($temp % 3); + break; + + case 6: + $temp = $y * $x; + $intermediate = (($temp & 0x1) + ($temp % 3)) & 0x1; + break; + + case 7: + $temp = $y * $x; + $intermediate = (($temp % 3) + (($y + $x) & 0x1)) & 0x1; + break; + + default: + throw new InvalidArgumentException('Invalid mask pattern: ' . $maskPattern); + } + + return 0 == $intermediate; + } + + /** + * Helper function for applyMaskPenaltyRule1. + * + * We need this for doing this calculation in both vertical and horizontal + * orders respectively. + */ + private static function applyMaskPenaltyRule1Internal(ByteMatrix $matrix, bool $isHorizontal) : int + { + $penalty = 0; + $iLimit = $isHorizontal ? $matrix->getHeight() : $matrix->getWidth(); + $jLimit = $isHorizontal ? $matrix->getWidth() : $matrix->getHeight(); + $array = $matrix->getArray(); + + for ($i = 0; $i < $iLimit; ++$i) { + $numSameBitCells = 0; + $prevBit = -1; + + for ($j = 0; $j < $jLimit; $j++) { + $bit = $isHorizontal ? $array[$i][$j] : $array[$j][$i]; + + if ($bit === $prevBit) { + ++$numSameBitCells; + } else { + if ($numSameBitCells >= 5) { + $penalty += self::N1 + ($numSameBitCells - 5); + } + + $numSameBitCells = 1; + $prevBit = $bit; + } + } + + if ($numSameBitCells >= 5) { + $penalty += self::N1 + ($numSameBitCells - 5); + } + } + + return $penalty; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Encoder/MatrixUtil.php b/vendor/bacon/bacon-qr-code/src/Encoder/MatrixUtil.php new file mode 100755 index 0000000..0967e29 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Encoder/MatrixUtil.php @@ -0,0 +1,513 @@ +clear(-1); + } + + /** + * Builds a complete matrix. + */ + public static function buildMatrix( + BitArray $dataBits, + ErrorCorrectionLevel $level, + Version $version, + int $maskPattern, + ByteMatrix $matrix + ) : void { + self::clearMatrix($matrix); + self::embedBasicPatterns($version, $matrix); + self::embedTypeInfo($level, $maskPattern, $matrix); + self::maybeEmbedVersionInfo($version, $matrix); + self::embedDataBits($dataBits, $maskPattern, $matrix); + } + + /** + * Removes the position detection patterns from a matrix. + * + * This can be useful if you need to render those patterns separately. + */ + public static function removePositionDetectionPatterns(ByteMatrix $matrix) : void + { + $pdpWidth = count(self::POSITION_DETECTION_PATTERN[0]); + + self::removePositionDetectionPattern(0, 0, $matrix); + self::removePositionDetectionPattern($matrix->getWidth() - $pdpWidth, 0, $matrix); + self::removePositionDetectionPattern(0, $matrix->getWidth() - $pdpWidth, $matrix); + } + + /** + * Embeds type information into a matrix. + */ + private static function embedTypeInfo(ErrorCorrectionLevel $level, int $maskPattern, ByteMatrix $matrix) : void + { + $typeInfoBits = new BitArray(); + self::makeTypeInfoBits($level, $maskPattern, $typeInfoBits); + + $typeInfoBitsSize = $typeInfoBits->getSize(); + + for ($i = 0; $i < $typeInfoBitsSize; ++$i) { + $bit = $typeInfoBits->get($typeInfoBitsSize - 1 - $i); + + $x1 = self::TYPE_INFO_COORDINATES[$i][0]; + $y1 = self::TYPE_INFO_COORDINATES[$i][1]; + + $matrix->set($x1, $y1, (int) $bit); + + if ($i < 8) { + $x2 = $matrix->getWidth() - $i - 1; + $y2 = 8; + } else { + $x2 = 8; + $y2 = $matrix->getHeight() - 7 + ($i - 8); + } + + $matrix->set($x2, $y2, (int) $bit); + } + } + + /** + * Generates type information bits and appends them to a bit array. + * + * @throws RuntimeException if bit array resulted in invalid size + */ + private static function makeTypeInfoBits(ErrorCorrectionLevel $level, int $maskPattern, BitArray $bits) : void + { + $typeInfo = ($level->getBits() << 3) | $maskPattern; + $bits->appendBits($typeInfo, 5); + + $bchCode = self::calculateBchCode($typeInfo, self::TYPE_INFO_POLY); + $bits->appendBits($bchCode, 10); + + $maskBits = new BitArray(); + $maskBits->appendBits(self::TYPE_INFO_MASK_PATTERN, 15); + $bits->xorBits($maskBits); + + if (15 !== $bits->getSize()) { + throw new RuntimeException('Bit array resulted in invalid size: ' . $bits->getSize()); + } + } + + /** + * Embeds version information if required. + */ + private static function maybeEmbedVersionInfo(Version $version, ByteMatrix $matrix) : void + { + if ($version->getVersionNumber() < 7) { + return; + } + + $versionInfoBits = new BitArray(); + self::makeVersionInfoBits($version, $versionInfoBits); + + $bitIndex = 6 * 3 - 1; + + for ($i = 0; $i < 6; ++$i) { + for ($j = 0; $j < 3; ++$j) { + $bit = $versionInfoBits->get($bitIndex); + --$bitIndex; + + $matrix->set($i, $matrix->getHeight() - 11 + $j, (int) $bit); + $matrix->set($matrix->getHeight() - 11 + $j, $i, (int) $bit); + } + } + } + + /** + * Generates version information bits and appends them to a bit array. + * + * @throws RuntimeException if bit array resulted in invalid size + */ + private static function makeVersionInfoBits(Version $version, BitArray $bits) : void + { + $bits->appendBits($version->getVersionNumber(), 6); + + $bchCode = self::calculateBchCode($version->getVersionNumber(), self::VERSION_INFO_POLY); + $bits->appendBits($bchCode, 12); + + if (18 !== $bits->getSize()) { + throw new RuntimeException('Bit array resulted in invalid size: ' . $bits->getSize()); + } + } + + /** + * Calculates the BCH code for a value and a polynomial. + */ + private static function calculateBchCode(int $value, int $poly) : int + { + $msbSetInPoly = self::findMsbSet($poly); + $value <<= $msbSetInPoly - 1; + + while (self::findMsbSet($value) >= $msbSetInPoly) { + $value ^= $poly << (self::findMsbSet($value) - $msbSetInPoly); + } + + return $value; + } + + /** + * Finds and MSB set. + */ + private static function findMsbSet(int $value) : int + { + $numDigits = 0; + + while (0 !== $value) { + $value >>= 1; + ++$numDigits; + } + + return $numDigits; + } + + /** + * Embeds basic patterns into a matrix. + */ + private static function embedBasicPatterns(Version $version, ByteMatrix $matrix) : void + { + self::embedPositionDetectionPatternsAndSeparators($matrix); + self::embedDarkDotAtLeftBottomCorner($matrix); + self::maybeEmbedPositionAdjustmentPatterns($version, $matrix); + self::embedTimingPatterns($matrix); + } + + /** + * Embeds position detection patterns and separators into a byte matrix. + */ + private static function embedPositionDetectionPatternsAndSeparators(ByteMatrix $matrix) : void + { + $pdpWidth = count(self::POSITION_DETECTION_PATTERN[0]); + + self::embedPositionDetectionPattern(0, 0, $matrix); + self::embedPositionDetectionPattern($matrix->getWidth() - $pdpWidth, 0, $matrix); + self::embedPositionDetectionPattern(0, $matrix->getWidth() - $pdpWidth, $matrix); + + $hspWidth = 8; + + self::embedHorizontalSeparationPattern(0, $hspWidth - 1, $matrix); + self::embedHorizontalSeparationPattern($matrix->getWidth() - $hspWidth, $hspWidth - 1, $matrix); + self::embedHorizontalSeparationPattern(0, $matrix->getWidth() - $hspWidth, $matrix); + + $vspSize = 7; + + self::embedVerticalSeparationPattern($vspSize, 0, $matrix); + self::embedVerticalSeparationPattern($matrix->getHeight() - $vspSize - 1, 0, $matrix); + self::embedVerticalSeparationPattern($vspSize, $matrix->getHeight() - $vspSize, $matrix); + } + + /** + * Embeds a single position detection pattern into a byte matrix. + */ + private static function embedPositionDetectionPattern(int $xStart, int $yStart, ByteMatrix $matrix) : void + { + for ($y = 0; $y < 7; ++$y) { + for ($x = 0; $x < 7; ++$x) { + $matrix->set($xStart + $x, $yStart + $y, self::POSITION_DETECTION_PATTERN[$y][$x]); + } + } + } + + private static function removePositionDetectionPattern(int $xStart, int $yStart, ByteMatrix $matrix) : void + { + for ($y = 0; $y < 7; ++$y) { + for ($x = 0; $x < 7; ++$x) { + $matrix->set($xStart + $x, $yStart + $y, 0); + } + } + } + + /** + * Embeds a single horizontal separation pattern. + * + * @throws RuntimeException if a byte was already set + */ + private static function embedHorizontalSeparationPattern(int $xStart, int $yStart, ByteMatrix $matrix) : void + { + for ($x = 0; $x < 8; $x++) { + if (-1 !== $matrix->get($xStart + $x, $yStart)) { + throw new RuntimeException('Byte already set'); + } + + $matrix->set($xStart + $x, $yStart, 0); + } + } + + /** + * Embeds a single vertical separation pattern. + * + * @throws RuntimeException if a byte was already set + */ + private static function embedVerticalSeparationPattern(int $xStart, int $yStart, ByteMatrix $matrix) : void + { + for ($y = 0; $y < 7; $y++) { + if (-1 !== $matrix->get($xStart, $yStart + $y)) { + throw new RuntimeException('Byte already set'); + } + + $matrix->set($xStart, $yStart + $y, 0); + } + } + + /** + * Embeds a dot at the left bottom corner. + * + * @throws RuntimeException if a byte was already set to 0 + */ + private static function embedDarkDotAtLeftBottomCorner(ByteMatrix $matrix) : void + { + if (0 === $matrix->get(8, $matrix->getHeight() - 8)) { + throw new RuntimeException('Byte already set to 0'); + } + + $matrix->set(8, $matrix->getHeight() - 8, 1); + } + + /** + * Embeds position adjustment patterns if required. + */ + private static function maybeEmbedPositionAdjustmentPatterns(Version $version, ByteMatrix $matrix) : void + { + if ($version->getVersionNumber() < 2) { + return; + } + + $index = $version->getVersionNumber() - 1; + + $coordinates = self::POSITION_ADJUSTMENT_PATTERN_COORDINATE_TABLE[$index]; + $numCoordinates = count($coordinates); + + for ($i = 0; $i < $numCoordinates; ++$i) { + for ($j = 0; $j < $numCoordinates; ++$j) { + $y = $coordinates[$i]; + $x = $coordinates[$j]; + + if (null === $x || null === $y) { + continue; + } + + if (-1 === $matrix->get($x, $y)) { + self::embedPositionAdjustmentPattern($x - 2, $y - 2, $matrix); + } + } + } + } + + /** + * Embeds a single position adjustment pattern. + */ + private static function embedPositionAdjustmentPattern(int $xStart, int $yStart, ByteMatrix $matrix) : void + { + for ($y = 0; $y < 5; $y++) { + for ($x = 0; $x < 5; $x++) { + $matrix->set($xStart + $x, $yStart + $y, self::POSITION_ADJUSTMENT_PATTERN[$y][$x]); + } + } + } + + /** + * Embeds timing patterns into a matrix. + */ + private static function embedTimingPatterns(ByteMatrix $matrix) : void + { + $matrixWidth = $matrix->getWidth(); + + for ($i = 8; $i < $matrixWidth - 8; ++$i) { + $bit = ($i + 1) % 2; + + if (-1 === $matrix->get($i, 6)) { + $matrix->set($i, 6, $bit); + } + + if (-1 === $matrix->get(6, $i)) { + $matrix->set(6, $i, $bit); + } + } + } + + /** + * Embeds "dataBits" using "getMaskPattern". + * + * For debugging purposes, it skips masking process if "getMaskPattern" is -1. See 8.7 of JISX0510:2004 (p.38) for + * how to embed data bits. + * + * @throws WriterException if not all bits could be consumed + */ + private static function embedDataBits(BitArray $dataBits, int $maskPattern, ByteMatrix $matrix) : void + { + $bitIndex = 0; + $direction = -1; + + // Start from the right bottom cell. + $x = $matrix->getWidth() - 1; + $y = $matrix->getHeight() - 1; + + while ($x > 0) { + // Skip vertical timing pattern. + if (6 === $x) { + --$x; + } + + while ($y >= 0 && $y < $matrix->getHeight()) { + for ($i = 0; $i < 2; $i++) { + $xx = $x - $i; + + // Skip the cell if it's not empty. + if (-1 !== $matrix->get($xx, $y)) { + continue; + } + + if ($bitIndex < $dataBits->getSize()) { + $bit = $dataBits->get($bitIndex); + ++$bitIndex; + } else { + // Padding bit. If there is no bit left, we'll fill the + // left cells with 0, as described in 8.4.9 of + // JISX0510:2004 (p. 24). + $bit = false; + } + + // Skip masking if maskPattern is -1. + if (-1 !== $maskPattern && MaskUtil::getDataMaskBit($maskPattern, $xx, $y)) { + $bit = ! $bit; + } + + $matrix->set($xx, $y, (int) $bit); + } + + $y += $direction; + } + + $direction = -$direction; + $y += $direction; + $x -= 2; + } + + // All bits should be consumed + if ($dataBits->getSize() !== $bitIndex) { + throw new WriterException('Not all bits consumed (' . $bitIndex . ' out of ' . $dataBits->getSize() .')'); + } + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Encoder/QrCode.php b/vendor/bacon/bacon-qr-code/src/Encoder/QrCode.php new file mode 100755 index 0000000..f568e88 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Encoder/QrCode.php @@ -0,0 +1,141 @@ +mode = $mode; + $this->errorCorrectionLevel = $errorCorrectionLevel; + $this->version = $version; + $this->maskPattern = $maskPattern; + $this->matrix = $matrix; + } + + /** + * Gets the mode. + */ + public function getMode() : Mode + { + return $this->mode; + } + + /** + * Gets the EC level. + */ + public function getErrorCorrectionLevel() : ErrorCorrectionLevel + { + return $this->errorCorrectionLevel; + } + + /** + * Gets the version. + */ + public function getVersion() : Version + { + return $this->version; + } + + /** + * Gets the mask pattern. + */ + public function getMaskPattern() : int + { + return $this->maskPattern; + } + + /** + * Gets the matrix. + * + * @return ByteMatrix + */ + public function getMatrix() + { + return $this->matrix; + } + + /** + * Validates whether a mask pattern is valid. + */ + public static function isValidMaskPattern(int $maskPattern) : bool + { + return $maskPattern > 0 && $maskPattern < self::NUM_MASK_PATTERNS; + } + + /** + * Returns a string representation of the QR code. + */ + public function __toString() : string + { + $result = "<<\n" + . ' mode: ' . $this->mode . "\n" + . ' ecLevel: ' . $this->errorCorrectionLevel . "\n" + . ' version: ' . $this->version . "\n" + . ' maskPattern: ' . $this->maskPattern . "\n"; + + if ($this->matrix === null) { + $result .= " matrix: null\n"; + } else { + $result .= " matrix:\n"; + $result .= $this->matrix; + } + + $result .= ">>\n"; + + return $result; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Exception/ExceptionInterface.php b/vendor/bacon/bacon-qr-code/src/Exception/ExceptionInterface.php new file mode 100755 index 0000000..6f70c20 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Exception/ExceptionInterface.php @@ -0,0 +1,10 @@ + 100) { + throw new Exception\InvalidArgumentException('Alpha must be between 0 and 100'); + } + + $this->alpha = $alpha; + $this->baseColor = $baseColor; + } + + public function getAlpha() : int + { + return $this->alpha; + } + + public function getBaseColor() : ColorInterface + { + return $this->baseColor; + } + + public function toRgb() : Rgb + { + return $this->baseColor->toRgb(); + } + + public function toCmyk() : Cmyk + { + return $this->baseColor->toCmyk(); + } + + public function toGray() : Gray + { + return $this->baseColor->toGray(); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Color/Cmyk.php b/vendor/bacon/bacon-qr-code/src/Renderer/Color/Cmyk.php new file mode 100755 index 0000000..d6de390 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Color/Cmyk.php @@ -0,0 +1,103 @@ + 100) { + throw new Exception\InvalidArgumentException('Cyan must be between 0 and 100'); + } + + if ($magenta < 0 || $magenta > 100) { + throw new Exception\InvalidArgumentException('Magenta must be between 0 and 100'); + } + + if ($yellow < 0 || $yellow > 100) { + throw new Exception\InvalidArgumentException('Yellow must be between 0 and 100'); + } + + if ($black < 0 || $black > 100) { + throw new Exception\InvalidArgumentException('Black must be between 0 and 100'); + } + + $this->cyan = $cyan; + $this->magenta = $magenta; + $this->yellow = $yellow; + $this->black = $black; + } + + public function getCyan() : int + { + return $this->cyan; + } + + public function getMagenta() : int + { + return $this->magenta; + } + + public function getYellow() : int + { + return $this->yellow; + } + + public function getBlack() : int + { + return $this->black; + } + + public function toRgb() : Rgb + { + $k = $this->black / 100; + $c = (-$k * $this->cyan + $k * 100 + $this->cyan) / 100; + $m = (-$k * $this->magenta + $k * 100 + $this->magenta) / 100; + $y = (-$k * $this->yellow + $k * 100 + $this->yellow) / 100; + + return new Rgb( + (int) (-$c * 255 + 255), + (int) (-$m * 255 + 255), + (int) (-$y * 255 + 255) + ); + } + + public function toCmyk() : Cmyk + { + return $this; + } + + public function toGray() : Gray + { + return $this->toRgb()->toGray(); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Color/ColorInterface.php b/vendor/bacon/bacon-qr-code/src/Renderer/Color/ColorInterface.php new file mode 100755 index 0000000..b50d1ca --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Color/ColorInterface.php @@ -0,0 +1,22 @@ + 100) { + throw new Exception\InvalidArgumentException('Gray must be between 0 and 100'); + } + + $this->gray = (int) $gray; + } + + public function getGray() : int + { + return $this->gray; + } + + public function toRgb() : Rgb + { + return new Rgb((int) ($this->gray * 2.55), (int) ($this->gray * 2.55), (int) ($this->gray * 2.55)); + } + + public function toCmyk() : Cmyk + { + return new Cmyk(0, 0, 0, 100 - $this->gray); + } + + public function toGray() : Gray + { + return $this; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Color/Rgb.php b/vendor/bacon/bacon-qr-code/src/Renderer/Color/Rgb.php new file mode 100755 index 0000000..7935406 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Color/Rgb.php @@ -0,0 +1,88 @@ + 255) { + throw new Exception\InvalidArgumentException('Red must be between 0 and 255'); + } + + if ($green < 0 || $green > 255) { + throw new Exception\InvalidArgumentException('Green must be between 0 and 255'); + } + + if ($blue < 0 || $blue > 255) { + throw new Exception\InvalidArgumentException('Blue must be between 0 and 255'); + } + + $this->red = $red; + $this->green = $green; + $this->blue = $blue; + } + + public function getRed() : int + { + return $this->red; + } + + public function getGreen() : int + { + return $this->green; + } + + public function getBlue() : int + { + return $this->blue; + } + + public function toRgb() : Rgb + { + return $this; + } + + public function toCmyk() : Cmyk + { + $c = 1 - ($this->red / 255); + $m = 1 - ($this->green / 255); + $y = 1 - ($this->blue / 255); + $k = min($c, $m, $y); + + return new Cmyk( + (int) (100 * ($c - $k) / (1 - $k)), + (int) (100 * ($m - $k) / (1 - $k)), + (int) (100 * ($y - $k) / (1 - $k)), + (int) (100 * $k) + ); + } + + public function toGray() : Gray + { + return new Gray((int) (($this->red * 0.21 + $this->green * 0.71 + $this->blue * 0.07) / 2.55)); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Eye/CompositeEye.php b/vendor/bacon/bacon-qr-code/src/Renderer/Eye/CompositeEye.php new file mode 100755 index 0000000..a3e1909 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Eye/CompositeEye.php @@ -0,0 +1,38 @@ +externalEye = $externalEye; + $this->internalEye = $internalEye; + } + + public function getExternalPath() : Path + { + return $this->externalEye->getExternalPath(); + } + + public function getInternalPath() : Path + { + return $this->externalEye->getInternalPath(); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Eye/EyeInterface.php b/vendor/bacon/bacon-qr-code/src/Renderer/Eye/EyeInterface.php new file mode 100755 index 0000000..ab68f3c --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Eye/EyeInterface.php @@ -0,0 +1,26 @@ +module = $module; + } + + public function getExternalPath() : Path + { + $matrix = new ByteMatrix(7, 7); + + for ($x = 0; $x < 7; ++$x) { + $matrix->set($x, 0, 1); + $matrix->set($x, 6, 1); + } + + for ($y = 1; $y < 6; ++$y) { + $matrix->set(0, $y, 1); + $matrix->set(6, $y, 1); + } + + return $this->module->createPath($matrix)->translate(-3.5, -3.5); + } + + public function getInternalPath() : Path + { + $matrix = new ByteMatrix(3, 3); + + for ($x = 0; $x < 3; ++$x) { + for ($y = 0; $y < 3; ++$y) { + $matrix->set($x, $y, 1); + } + } + + return $this->module->createPath($matrix)->translate(-1.5, -1.5); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Eye/SimpleCircleEye.php b/vendor/bacon/bacon-qr-code/src/Renderer/Eye/SimpleCircleEye.php new file mode 100755 index 0000000..64d54ee --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Eye/SimpleCircleEye.php @@ -0,0 +1,54 @@ +move(-3.5, -3.5) + ->line(3.5, -3.5) + ->line(3.5, 3.5) + ->line(-3.5, 3.5) + ->close() + ->move(-2.5, -2.5) + ->line(-2.5, 2.5) + ->line(2.5, 2.5) + ->line(2.5, -2.5) + ->close() + ; + } + + public function getInternalPath() : Path + { + return (new Path()) + ->move(1.5, 0) + ->ellipticArc(1.5, 1.5, 0., false, true, 0., 1.5) + ->ellipticArc(1.5, 1.5, 0., false, true, -1.5, 0.) + ->ellipticArc(1.5, 1.5, 0., false, true, 0., -1.5) + ->ellipticArc(1.5, 1.5, 0., false, true, 1.5, 0.) + ->close() + ; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Eye/SquareEye.php b/vendor/bacon/bacon-qr-code/src/Renderer/Eye/SquareEye.php new file mode 100755 index 0000000..a3892b4 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Eye/SquareEye.php @@ -0,0 +1,53 @@ +move(-3.5, -3.5) + ->line(3.5, -3.5) + ->line(3.5, 3.5) + ->line(-3.5, 3.5) + ->close() + ->move(-2.5, -2.5) + ->line(-2.5, 2.5) + ->line(2.5, 2.5) + ->line(2.5, -2.5) + ->close() + ; + } + + public function getInternalPath() : Path + { + return (new Path()) + ->move(-1.5, -1.5) + ->line(1.5, -1.5) + ->line(1.5, 1.5) + ->line(-1.5, 1.5) + ->close() + ; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Image/EpsImageBackEnd.php b/vendor/bacon/bacon-qr-code/src/Renderer/Image/EpsImageBackEnd.php new file mode 100755 index 0000000..b581b54 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Image/EpsImageBackEnd.php @@ -0,0 +1,376 @@ +eps = "%!PS-Adobe-3.0 EPSF-3.0\n" + . "%%Creator: BaconQrCode\n" + . sprintf("%%%%BoundingBox: 0 0 %d %d \n", $size, $size) + . "%%BeginProlog\n" + . "save\n" + . "50 dict begin\n" + . "/q { gsave } bind def\n" + . "/Q { grestore } bind def\n" + . "/s { scale } bind def\n" + . "/t { translate } bind def\n" + . "/r { rotate } bind def\n" + . "/n { newpath } bind def\n" + . "/m { moveto } bind def\n" + . "/l { lineto } bind def\n" + . "/c { curveto } bind def\n" + . "/z { closepath } bind def\n" + . "/f { eofill } bind def\n" + . "/rgb { setrgbcolor } bind def\n" + . "/cmyk { setcmykcolor } bind def\n" + . "/gray { setgray } bind def\n" + . "%%EndProlog\n" + . "1 -1 s\n" + . sprintf("0 -%d t\n", $size); + + if ($backgroundColor instanceof Alpha && 0 === $backgroundColor->getAlpha()) { + return; + } + + $this->eps .= wordwrap( + '0 0 m' + . sprintf(' %s 0 l', (string) $size) + . sprintf(' %s %s l', (string) $size, (string) $size) + . sprintf(' 0 %s l', (string) $size) + . ' z' + . ' ' .$this->getColorSetString($backgroundColor) . " f\n", + 75, + "\n " + ); + } + + public function scale(float $size) : void + { + if (null === $this->eps) { + throw new RuntimeException('No image has been started'); + } + + $this->eps .= sprintf("%1\$s %1\$s s\n", round($size, self::PRECISION)); + } + + public function translate(float $x, float $y) : void + { + if (null === $this->eps) { + throw new RuntimeException('No image has been started'); + } + + $this->eps .= sprintf("%s %s t\n", round($x, self::PRECISION), round($y, self::PRECISION)); + } + + public function rotate(int $degrees) : void + { + if (null === $this->eps) { + throw new RuntimeException('No image has been started'); + } + + $this->eps .= sprintf("%d r\n", $degrees); + } + + public function push() : void + { + if (null === $this->eps) { + throw new RuntimeException('No image has been started'); + } + + $this->eps .= "q\n"; + } + + public function pop() : void + { + if (null === $this->eps) { + throw new RuntimeException('No image has been started'); + } + + $this->eps .= "Q\n"; + } + + public function drawPathWithColor(Path $path, ColorInterface $color) : void + { + if (null === $this->eps) { + throw new RuntimeException('No image has been started'); + } + + $fromX = 0; + $fromY = 0; + $this->eps .= wordwrap( + 'n ' + . $this->drawPathOperations($path, $fromX, $fromY) + . ' ' . $this->getColorSetString($color) . " f\n", + 75, + "\n " + ); + } + + public function drawPathWithGradient( + Path $path, + Gradient $gradient, + float $x, + float $y, + float $width, + float $height + ) : void { + if (null === $this->eps) { + throw new RuntimeException('No image has been started'); + } + + $fromX = 0; + $fromY = 0; + $this->eps .= wordwrap( + 'q n ' . $this->drawPathOperations($path, $fromX, $fromY) . "\n", + 75, + "\n " + ); + + $this->createGradientFill($gradient, $x, $y, $width, $height); + } + + public function done() : string + { + if (null === $this->eps) { + throw new RuntimeException('No image has been started'); + } + + $this->eps .= "%%TRAILER\nend restore\n%%EOF"; + $blob = $this->eps; + $this->eps = null; + + return $blob; + } + + private function drawPathOperations(Iterable $ops, &$fromX, &$fromY) : string + { + $pathData = []; + + foreach ($ops as $op) { + switch (true) { + case $op instanceof Move: + $fromX = $toX = round($op->getX(), self::PRECISION); + $fromY = $toY = round($op->getY(), self::PRECISION); + $pathData[] = sprintf('%s %s m', $toX, $toY); + break; + + case $op instanceof Line: + $fromX = $toX = round($op->getX(), self::PRECISION); + $fromY = $toY = round($op->getY(), self::PRECISION); + $pathData[] = sprintf('%s %s l', $toX, $toY); + break; + + case $op instanceof EllipticArc: + $pathData[] = $this->drawPathOperations($op->toCurves($fromX, $fromY), $fromX, $fromY); + break; + + case $op instanceof Curve: + $x1 = round($op->getX1(), self::PRECISION); + $y1 = round($op->getY1(), self::PRECISION); + $x2 = round($op->getX2(), self::PRECISION); + $y2 = round($op->getY2(), self::PRECISION); + $fromX = $x3 = round($op->getX3(), self::PRECISION); + $fromY = $y3 = round($op->getY3(), self::PRECISION); + $pathData[] = sprintf('%s %s %s %s %s %s c', $x1, $y1, $x2, $y2, $x3, $y3); + break; + + case $op instanceof Close: + $pathData[] = 'z'; + break; + + default: + throw new RuntimeException('Unexpected draw operation: ' . get_class($op)); + } + } + + return implode(' ', $pathData); + } + + private function createGradientFill(Gradient $gradient, float $x, float $y, float $width, float $height) : void + { + $startColor = $gradient->getStartColor(); + $endColor = $gradient->getEndColor(); + + if ($startColor instanceof Alpha) { + $startColor = $startColor->getBaseColor(); + } + + $startColorType = get_class($startColor); + + if (! in_array($startColorType, [Rgb::class, Cmyk::class, Gray::class])) { + $startColorType = Cmyk::class; + $startColor = $startColor->toCmyk(); + } + + if (get_class($endColor) !== $startColorType) { + switch ($startColorType) { + case Cmyk::class: + $endColor = $endColor->toCmyk(); + break; + + case Rgb::class: + $endColor = $endColor->toRgb(); + break; + + case Gray::class: + $endColor = $endColor->toGray(); + break; + } + } + + $this->eps .= "eoclip\n<<\n"; + + if ($gradient->getType() === GradientType::RADIAL()) { + $this->eps .= " /ShadingType 3\n"; + } else { + $this->eps .= " /ShadingType 2\n"; + } + + $this->eps .= " /Extend [ true true ]\n" + . " /AntiAlias true\n"; + + switch ($startColorType) { + case Cmyk::class: + $this->eps .= " /ColorSpace /DeviceCMYK\n"; + break; + + case Rgb::class: + $this->eps .= " /ColorSpace /DeviceRGB\n"; + break; + + case Gray::class: + $this->eps .= " /ColorSpace /DeviceGray\n"; + break; + } + + switch ($gradient->getType()) { + case GradientType::HORIZONTAL(): + $this->eps .= sprintf( + " /Coords [ %s %s %s %s ]\n", + round($x, self::PRECISION), + round($y, self::PRECISION), + round($x + $width, self::PRECISION), + round($y, self::PRECISION) + ); + break; + + case GradientType::VERTICAL(): + $this->eps .= sprintf( + " /Coords [ %s %s %s %s ]\n", + round($x, self::PRECISION), + round($y, self::PRECISION), + round($x, self::PRECISION), + round($y + $height, self::PRECISION) + ); + break; + + case GradientType::DIAGONAL(): + $this->eps .= sprintf( + " /Coords [ %s %s %s %s ]\n", + round($x, self::PRECISION), + round($y, self::PRECISION), + round($x + $width, self::PRECISION), + round($y + $height, self::PRECISION) + ); + break; + + case GradientType::INVERSE_DIAGONAL(): + $this->eps .= sprintf( + " /Coords [ %s %s %s %s ]\n", + round($x, self::PRECISION), + round($y + $height, self::PRECISION), + round($x + $width, self::PRECISION), + round($y, self::PRECISION) + ); + break; + + case GradientType::RADIAL(): + $centerX = ($x + $width) / 2; + $centerY = ($y + $height) / 2; + + $this->eps .= sprintf( + " /Coords [ %s %s 0 %s %s %s ]\n", + round($centerX, self::PRECISION), + round($centerY, self::PRECISION), + round($centerX, self::PRECISION), + round($centerY, self::PRECISION), + round(max($width, $height) / 2, self::PRECISION) + ); + break; + } + + $this->eps .= " /Function\n" + . " <<\n" + . " /FunctionType 2\n" + . " /Domain [ 0 1 ]\n" + . sprintf(" /C0 [ %s ]\n", $this->getColorString($startColor)) + . sprintf(" /C1 [ %s ]\n", $this->getColorString($endColor)) + . " /N 1\n" + . " >>\n>>\nshfill\nQ\n"; + } + + private function getColorSetString(ColorInterface $color) : string + { + if ($color instanceof Rgb) { + return $this->getColorString($color) . ' rgb'; + } + + if ($color instanceof Cmyk) { + return $this->getColorString($color) . ' cmyk'; + } + + if ($color instanceof Gray) { + return $this->getColorString($color) . ' gray'; + } + + return $this->getColorSetString($color->toCmyk()); + } + + private function getColorString(ColorInterface $color) : string + { + if ($color instanceof Rgb) { + return sprintf('%s %s %s', $color->getRed() / 255, $color->getGreen() / 255, $color->getBlue() / 255); + } + + if ($color instanceof Cmyk) { + return sprintf( + '%s %s %s %s', + $color->getCyan() / 100, + $color->getMagenta() / 100, + $color->getYellow() / 100, + $color->getBlack() / 100 + ); + } + + if ($color instanceof Gray) { + return sprintf('%s', $color->getGray() / 100); + } + + return $this->getColorString($color->toCmyk()); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Image/ImageBackEndInterface.php b/vendor/bacon/bacon-qr-code/src/Renderer/Image/ImageBackEndInterface.php new file mode 100755 index 0000000..0935819 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Image/ImageBackEndInterface.php @@ -0,0 +1,87 @@ +imageFormat = $imageFormat; + $this->compressionQuality = $compressionQuality; + } + + public function new(int $size, ColorInterface $backgroundColor) : void + { + $this->image = new Imagick(); + $this->image->newImage($size, $size, $this->getColorPixel($backgroundColor)); + $this->image->setImageFormat($this->imageFormat); + $this->image->setCompressionQuality($this->compressionQuality); + $this->draw = new ImagickDraw(); + $this->gradientCount = 0; + $this->matrices = [new TransformationMatrix()]; + $this->matrixIndex = 0; + } + + public function scale(float $size) : void + { + if (null === $this->draw) { + throw new RuntimeException('No image has been started'); + } + + $this->draw->scale($size, $size); + $this->matrices[$this->matrixIndex] = $this->matrices[$this->matrixIndex] + ->multiply(TransformationMatrix::scale($size)); + } + + public function translate(float $x, float $y) : void + { + if (null === $this->draw) { + throw new RuntimeException('No image has been started'); + } + + $this->draw->translate($x, $y); + $this->matrices[$this->matrixIndex] = $this->matrices[$this->matrixIndex] + ->multiply(TransformationMatrix::translate($x, $y)); + } + + public function rotate(int $degrees) : void + { + if (null === $this->draw) { + throw new RuntimeException('No image has been started'); + } + + $this->draw->rotate($degrees); + $this->matrices[$this->matrixIndex] = $this->matrices[$this->matrixIndex] + ->multiply(TransformationMatrix::rotate($degrees)); + } + + public function push() : void + { + if (null === $this->draw) { + throw new RuntimeException('No image has been started'); + } + + $this->draw->push(); + $this->matrices[++$this->matrixIndex] = $this->matrices[$this->matrixIndex - 1]; + } + + public function pop() : void + { + if (null === $this->draw) { + throw new RuntimeException('No image has been started'); + } + + $this->draw->pop(); + unset($this->matrices[$this->matrixIndex--]); + } + + public function drawPathWithColor(Path $path, ColorInterface $color) : void + { + if (null === $this->draw) { + throw new RuntimeException('No image has been started'); + } + + $this->draw->setFillColor($this->getColorPixel($color)); + $this->drawPath($path); + } + + public function drawPathWithGradient( + Path $path, + Gradient $gradient, + float $x, + float $y, + float $width, + float $height + ) : void { + if (null === $this->draw) { + throw new RuntimeException('No image has been started'); + } + + $this->draw->setFillPatternURL('#' . $this->createGradientFill($gradient, $x, $y, $width, $height)); + $this->drawPath($path); + } + + public function done() : string + { + if (null === $this->draw) { + throw new RuntimeException('No image has been started'); + } + + $this->image->drawImage($this->draw); + $blob = $this->image->getImageBlob(); + $this->draw->clear(); + $this->image->clear(); + $this->draw = null; + $this->image = null; + $this->gradientCount = null; + + return $blob; + } + + private function drawPath(Path $path) : void + { + $this->draw->pathStart(); + + foreach ($path as $op) { + switch (true) { + case $op instanceof Move: + $this->draw->pathMoveToAbsolute($op->getX(), $op->getY()); + break; + + case $op instanceof Line: + $this->draw->pathLineToAbsolute($op->getX(), $op->getY()); + break; + + case $op instanceof EllipticArc: + $this->draw->pathEllipticArcAbsolute( + $op->getXRadius(), + $op->getYRadius(), + $op->getXAxisAngle(), + $op->isLargeArc(), + $op->isSweep(), + $op->getX(), + $op->getY() + ); + break; + + case $op instanceof Curve: + $this->draw->pathCurveToAbsolute( + $op->getX1(), + $op->getY1(), + $op->getX2(), + $op->getY2(), + $op->getX3(), + $op->getY3() + ); + break; + + case $op instanceof Close: + $this->draw->pathClose(); + break; + + default: + throw new RuntimeException('Unexpected draw operation: ' . get_class($op)); + } + } + + $this->draw->pathFinish(); + } + + private function createGradientFill(Gradient $gradient, float $x, float $y, float $width, float $height) : string + { + list($width, $height) = $this->matrices[$this->matrixIndex]->apply($x + $width, $y + $height); + list($x, $y) = $this->matrices[$this->matrixIndex]->apply($x, $y); + $width -= $x; + $height -= $y; + + $startColor = $this->getColorPixel($gradient->getStartColor())->getColorAsString(); + $endColor = $this->getColorPixel($gradient->getEndColor())->getColorAsString(); + $gradientImage = new Imagick(); + + switch ($gradient->getType()) { + case GradientType::HORIZONTAL(): + $gradientImage->newPseudoImage((int) $height, (int) $width, sprintf( + 'gradient:%s-%s', + $startColor, + $endColor + )); + $gradientImage->rotateImage('transparent', -90); + break; + + case GradientType::VERTICAL(): + $gradientImage->newPseudoImage((int) $width, (int) $height, sprintf( + 'gradient:%s-%s', + $startColor, + $endColor + )); + break; + + case GradientType::DIAGONAL(): + case GradientType::INVERSE_DIAGONAL(): + $gradientImage->newPseudoImage((int) ($width * sqrt(2)), (int) ($height * sqrt(2)), sprintf( + 'gradient:%s-%s', + $startColor, + $endColor + )); + + if (GradientType::DIAGONAL() === $gradient->getType()) { + $gradientImage->rotateImage('transparent', -45); + } else { + $gradientImage->rotateImage('transparent', -135); + } + + $rotatedWidth = $gradientImage->getImageWidth(); + $rotatedHeight = $gradientImage->getImageHeight(); + + $gradientImage->setImagePage($rotatedWidth, $rotatedHeight, 0, 0); + $gradientImage->cropImage( + intdiv($rotatedWidth, 2) - 2, + intdiv($rotatedHeight, 2) - 2, + intdiv($rotatedWidth, 4) + 1, + intdiv($rotatedWidth, 4) + 1 + ); + break; + + case GradientType::RADIAL(): + $gradientImage->newPseudoImage((int) $width, (int) $height, sprintf( + 'radial-gradient:%s-%s', + $startColor, + $endColor + )); + break; + } + + $id = sprintf('g%d', ++$this->gradientCount); + $this->draw->pushPattern($id, 0, 0, $x + $width, $y + $height); + $this->draw->composite(Imagick::COMPOSITE_COPY, $x, $y, $width, $height, $gradientImage); + $this->draw->popPattern(); + return $id; + } + + private function getColorPixel(ColorInterface $color) : ImagickPixel + { + $alpha = 100; + + if ($color instanceof Alpha) { + $alpha = $color->getAlpha(); + $color = $color->getBaseColor(); + } + + if ($color instanceof Rgb) { + return new ImagickPixel(sprintf( + 'rgba(%d, %d, %d, %F)', + $color->getRed(), + $color->getGreen(), + $color->getBlue(), + $alpha / 100 + )); + } + + if ($color instanceof Cmyk) { + return new ImagickPixel(sprintf( + 'cmyka(%d, %d, %d, %d, %F)', + $color->getCyan(), + $color->getMagenta(), + $color->getYellow(), + $color->getBlack(), + $alpha / 100 + )); + } + + if ($color instanceof Gray) { + return new ImagickPixel(sprintf( + 'graya(%d%%, %F)', + $color->getGray(), + $alpha / 100 + )); + } + + return $this->getColorPixel(new Alpha($alpha, $color->toRgb())); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Image/SvgImageBackEnd.php b/vendor/bacon/bacon-qr-code/src/Renderer/Image/SvgImageBackEnd.php new file mode 100755 index 0000000..714da6e --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Image/SvgImageBackEnd.php @@ -0,0 +1,369 @@ +xmlWriter = new XMLWriter(); + $this->xmlWriter->openMemory(); + + $this->xmlWriter->startDocument('1.0', 'UTF-8'); + $this->xmlWriter->startElement('svg'); + $this->xmlWriter->writeAttribute('xmlns', 'http://www.w3.org/2000/svg'); + $this->xmlWriter->writeAttribute('version', '1.1'); + $this->xmlWriter->writeAttribute('width', (string) $size); + $this->xmlWriter->writeAttribute('height', (string) $size); + $this->xmlWriter->writeAttribute('viewBox', '0 0 '. $size . ' ' . $size); + + $this->gradientCount = 0; + $this->currentStack = 0; + $this->stack[0] = 0; + + $alpha = 1; + + if ($backgroundColor instanceof Alpha) { + $alpha = $backgroundColor->getAlpha() / 100; + } + + if (0 === $alpha) { + return; + } + + $this->xmlWriter->startElement('rect'); + $this->xmlWriter->writeAttribute('x', '0'); + $this->xmlWriter->writeAttribute('y', '0'); + $this->xmlWriter->writeAttribute('width', (string) $size); + $this->xmlWriter->writeAttribute('height', (string) $size); + $this->xmlWriter->writeAttribute('fill', $this->getColorString($backgroundColor)); + + if ($alpha < 1) { + $this->xmlWriter->writeAttribute('fill-opacity', (string) $alpha); + } + + $this->xmlWriter->endElement(); + } + + public function scale(float $size) : void + { + if (null === $this->xmlWriter) { + throw new RuntimeException('No image has been started'); + } + + $this->xmlWriter->startElement('g'); + $this->xmlWriter->writeAttribute( + 'transform', + sprintf('scale(%s)', round($size, self::PRECISION)) + ); + ++$this->stack[$this->currentStack]; + } + + public function translate(float $x, float $y) : void + { + if (null === $this->xmlWriter) { + throw new RuntimeException('No image has been started'); + } + + $this->xmlWriter->startElement('g'); + $this->xmlWriter->writeAttribute( + 'transform', + sprintf('translate(%s,%s)', round($x, self::PRECISION), round($y, self::PRECISION)) + ); + ++$this->stack[$this->currentStack]; + } + + public function rotate(int $degrees) : void + { + if (null === $this->xmlWriter) { + throw new RuntimeException('No image has been started'); + } + + $this->xmlWriter->startElement('g'); + $this->xmlWriter->writeAttribute('transform', sprintf('rotate(%d)', $degrees)); + ++$this->stack[$this->currentStack]; + } + + public function push() : void + { + if (null === $this->xmlWriter) { + throw new RuntimeException('No image has been started'); + } + + $this->xmlWriter->startElement('g'); + $this->stack[] = 1; + ++$this->currentStack; + } + + public function pop() : void + { + if (null === $this->xmlWriter) { + throw new RuntimeException('No image has been started'); + } + + for ($i = 0; $i < $this->stack[$this->currentStack]; ++$i) { + $this->xmlWriter->endElement(); + } + + array_pop($this->stack); + --$this->currentStack; + } + + public function drawPathWithColor(Path $path, ColorInterface $color) : void + { + if (null === $this->xmlWriter) { + throw new RuntimeException('No image has been started'); + } + + $alpha = 1; + + if ($color instanceof Alpha) { + $alpha = $color->getAlpha() / 100; + } + + $this->startPathElement($path); + $this->xmlWriter->writeAttribute('fill', $this->getColorString($color)); + + if ($alpha < 1) { + $this->xmlWriter->writeAttribute('fill-opacity', (string) $alpha); + } + + $this->xmlWriter->endElement(); + } + + public function drawPathWithGradient( + Path $path, + Gradient $gradient, + float $x, + float $y, + float $width, + float $height + ) : void { + if (null === $this->xmlWriter) { + throw new RuntimeException('No image has been started'); + } + + $gradientId = $this->createGradientFill($gradient, $x, $y, $width, $height); + $this->startPathElement($path); + $this->xmlWriter->writeAttribute('fill', 'url(#' . $gradientId . ')'); + $this->xmlWriter->endElement(); + } + + public function done() : string + { + if (null === $this->xmlWriter) { + throw new RuntimeException('No image has been started'); + } + + foreach ($this->stack as $openElements) { + for ($i = $openElements; $i > 0; --$i) { + $this->xmlWriter->endElement(); + } + } + + $this->xmlWriter->endDocument(); + $blob = $this->xmlWriter->outputMemory(true); + $this->xmlWriter = null; + $this->stack = null; + $this->currentStack = null; + $this->gradientCount = null; + + return $blob; + } + + private function startPathElement(Path $path) : void + { + $pathData = []; + + foreach ($path as $op) { + switch (true) { + case $op instanceof Move: + $pathData[] = sprintf( + 'M%s %s', + round($op->getX(), self::PRECISION), + round($op->getY(), self::PRECISION) + ); + break; + + case $op instanceof Line: + $pathData[] = sprintf( + 'L%s %s', + round($op->getX(), self::PRECISION), + round($op->getY(), self::PRECISION) + ); + break; + + case $op instanceof EllipticArc: + $pathData[] = sprintf( + 'A%s %s %s %u %u %s %s', + round($op->getXRadius(), self::PRECISION), + round($op->getYRadius(), self::PRECISION), + round($op->getXAxisAngle(), self::PRECISION), + $op->isLargeArc(), + $op->isSweep(), + round($op->getX(), self::PRECISION), + round($op->getY(), self::PRECISION) + ); + break; + + case $op instanceof Curve: + $pathData[] = sprintf( + 'C%s %s %s %s %s %s', + round($op->getX1(), self::PRECISION), + round($op->getY1(), self::PRECISION), + round($op->getX2(), self::PRECISION), + round($op->getY2(), self::PRECISION), + round($op->getX3(), self::PRECISION), + round($op->getY3(), self::PRECISION) + ); + break; + + case $op instanceof Close: + $pathData[] = 'Z'; + break; + + default: + throw new RuntimeException('Unexpected draw operation: ' . get_class($op)); + } + } + + $this->xmlWriter->startElement('path'); + $this->xmlWriter->writeAttribute('fill-rule', 'evenodd'); + $this->xmlWriter->writeAttribute('d', implode('', $pathData)); + } + + private function createGradientFill(Gradient $gradient, float $x, float $y, float $width, float $height) : string + { + $this->xmlWriter->startElement('defs'); + + $startColor = $gradient->getStartColor(); + $endColor = $gradient->getEndColor(); + + if ($gradient->getType() === GradientType::RADIAL()) { + $this->xmlWriter->startElement('radialGradient'); + } else { + $this->xmlWriter->startElement('linearGradient'); + } + + $this->xmlWriter->writeAttribute('gradientUnits', 'userSpaceOnUse'); + + switch ($gradient->getType()) { + case GradientType::HORIZONTAL(): + $this->xmlWriter->writeAttribute('x1', (string) round($x, self::PRECISION)); + $this->xmlWriter->writeAttribute('y1', (string) round($y, self::PRECISION)); + $this->xmlWriter->writeAttribute('x2', (string) round($x + $width, self::PRECISION)); + $this->xmlWriter->writeAttribute('y2', (string) round($y, self::PRECISION)); + break; + + case GradientType::VERTICAL(): + $this->xmlWriter->writeAttribute('x1', (string) round($x, self::PRECISION)); + $this->xmlWriter->writeAttribute('y1', (string) round($y, self::PRECISION)); + $this->xmlWriter->writeAttribute('x2', (string) round($x, self::PRECISION)); + $this->xmlWriter->writeAttribute('y2', (string) round($y + $height, self::PRECISION)); + break; + + case GradientType::DIAGONAL(): + $this->xmlWriter->writeAttribute('x1', (string) round($x, self::PRECISION)); + $this->xmlWriter->writeAttribute('y1', (string) round($y, self::PRECISION)); + $this->xmlWriter->writeAttribute('x2', (string) round($x + $width, self::PRECISION)); + $this->xmlWriter->writeAttribute('y2', (string) round($y + $height, self::PRECISION)); + break; + + case GradientType::INVERSE_DIAGONAL(): + $this->xmlWriter->writeAttribute('x1', (string) round($x, self::PRECISION)); + $this->xmlWriter->writeAttribute('y1', (string) round($y + $height, self::PRECISION)); + $this->xmlWriter->writeAttribute('x2', (string) round($x + $width, self::PRECISION)); + $this->xmlWriter->writeAttribute('y2', (string) round($y, self::PRECISION)); + break; + + case GradientType::RADIAL(): + $this->xmlWriter->writeAttribute('cx', (string) round(($x + $width) / 2, self::PRECISION)); + $this->xmlWriter->writeAttribute('cy', (string) round(($y + $height) / 2, self::PRECISION)); + $this->xmlWriter->writeAttribute('r', (string) round(max($width, $height) / 2, self::PRECISION)); + break; + } + + $id = sprintf('g%d', ++$this->gradientCount); + $this->xmlWriter->writeAttribute('id', $id); + + $this->xmlWriter->startElement('stop'); + $this->xmlWriter->writeAttribute('offset', '0%'); + $this->xmlWriter->writeAttribute('stop-color', $this->getColorString($startColor)); + + if ($startColor instanceof Alpha) { + $this->xmlWriter->writeAttribute('stop-opacity', $startColor->getAlpha()); + } + + $this->xmlWriter->endElement(); + + $this->xmlWriter->startElement('stop'); + $this->xmlWriter->writeAttribute('offset', '100%'); + $this->xmlWriter->writeAttribute('stop-color', $this->getColorString($endColor)); + + if ($endColor instanceof Alpha) { + $this->xmlWriter->writeAttribute('stop-opacity', $endColor->getAlpha()); + } + + $this->xmlWriter->endElement(); + + $this->xmlWriter->endElement(); + $this->xmlWriter->endElement(); + + return $id; + } + + private function getColorString(ColorInterface $color) : string + { + $color = $color->toRgb(); + + return sprintf( + '#%02x%02x%02x', + $color->getRed(), + $color->getGreen(), + $color->getBlue() + ); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Image/TransformationMatrix.php b/vendor/bacon/bacon-qr-code/src/Renderer/Image/TransformationMatrix.php new file mode 100755 index 0000000..b41ee09 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Image/TransformationMatrix.php @@ -0,0 +1,67 @@ +values = [1, 0, 0, 1, 0, 0]; + } + + public function multiply(self $other) : self + { + $matrix = new self(); + $matrix->values[0] = $this->values[0] * $other->values[0] + $this->values[2] * $other->values[1]; + $matrix->values[1] = $this->values[1] * $other->values[0] + $this->values[3] * $other->values[1]; + $matrix->values[2] = $this->values[0] * $other->values[2] + $this->values[2] * $other->values[3]; + $matrix->values[3] = $this->values[1] * $other->values[2] + $this->values[3] * $other->values[3]; + $matrix->values[4] = $this->values[0] * $other->values[4] + $this->values[2] * $other->values[5] + + $this->values[4]; + $matrix->values[5] = $this->values[1] * $other->values[4] + $this->values[3] * $other->values[5] + + $this->values[5]; + + return $matrix; + } + + public static function scale(float $size) : self + { + $matrix = new self(); + $matrix->values = [$size, 0, 0, $size, 0, 0]; + return $matrix; + } + + public static function translate(float $x, float $y) : self + { + $matrix = new self(); + $matrix->values = [1, 0, 0, 1, $x, $y]; + return $matrix; + } + + public static function rotate(int $degrees) : self + { + $matrix = new self(); + $matrix->values = [cos($degrees), sin($degrees), -sin($degrees), cos($degrees), 0, 0]; + return $matrix; + } + + + /** + * Applies this matrix onto a point and returns the resulting viewport point. + * + * @return float[] + */ + public function apply(float $x, float $y) : array + { + return [ + $x * $this->values[0] + $y * $this->values[2] + $this->values[4], + $x * $this->values[2] + $x * $this->values[3] + $this->values[5], + ]; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/ImageRenderer.php b/vendor/bacon/bacon-qr-code/src/Renderer/ImageRenderer.php new file mode 100755 index 0000000..ab16276 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/ImageRenderer.php @@ -0,0 +1,152 @@ +rendererStyle = $rendererStyle; + $this->imageBackEnd = $imageBackEnd; + } + + /** + * @throws InvalidArgumentException if matrix width doesn't match height + */ + public function render(QrCode $qrCode) : string + { + $size = $this->rendererStyle->getSize(); + $margin = $this->rendererStyle->getMargin(); + $matrix = $qrCode->getMatrix(); + $matrixSize = $matrix->getWidth(); + + if ($matrixSize !== $matrix->getHeight()) { + throw new InvalidArgumentException('Matrix must have the same width and height'); + } + + $totalSize = $matrixSize + ($margin * 2); + $moduleSize = $size / $totalSize; + $fill = $this->rendererStyle->getFill(); + + $this->imageBackEnd->new($size, $fill->getBackgroundColor()); + $this->imageBackEnd->scale((float) $moduleSize); + $this->imageBackEnd->translate((float) $margin, (float) $margin); + + $module = $this->rendererStyle->getModule(); + $moduleMatrix = clone $matrix; + MatrixUtil::removePositionDetectionPatterns($moduleMatrix); + $modulePath = $this->drawEyes($matrixSize, $module->createPath($moduleMatrix)); + + if ($fill->hasGradientFill()) { + $this->imageBackEnd->drawPathWithGradient( + $modulePath, + $fill->getForegroundGradient(), + 0, + 0, + $matrixSize, + $matrixSize + ); + } else { + $this->imageBackEnd->drawPathWithColor($modulePath, $fill->getForegroundColor()); + } + + return $this->imageBackEnd->done(); + } + + private function drawEyes(int $matrixSize, Path $modulePath) : Path + { + $fill = $this->rendererStyle->getFill(); + + $eye = $this->rendererStyle->getEye(); + $externalPath = $eye->getExternalPath(); + $internalPath = $eye->getInternalPath(); + + $modulePath = $this->drawEye( + $externalPath, + $internalPath, + $fill->getTopLeftEyeFill(), + 3.5, + 3.5, + 0, + $modulePath + ); + $modulePath = $this->drawEye( + $externalPath, + $internalPath, + $fill->getTopRightEyeFill(), + $matrixSize - 3.5, + 3.5, + 90, + $modulePath + ); + $modulePath = $this->drawEye( + $externalPath, + $internalPath, + $fill->getBottomLeftEyeFill(), + 3.5, + $matrixSize - 3.5, + -90, + $modulePath + ); + + return $modulePath; + } + + private function drawEye( + Path $externalPath, + Path $internalPath, + EyeFill $fill, + float $xTranslation, + float $yTranslation, + int $rotation, + Path $modulePath + ) : Path { + if ($fill->inheritsBothColors()) { + return $modulePath + ->append($externalPath->translate($xTranslation, $yTranslation)) + ->append($internalPath->translate($xTranslation, $yTranslation)); + } + + $this->imageBackEnd->push(); + $this->imageBackEnd->translate($xTranslation, $yTranslation); + + if (0 !== $rotation) { + $this->imageBackEnd->rotate($rotation); + } + + if ($fill->inheritsExternalColor()) { + $modulePath = $modulePath->append($externalPath->translate($xTranslation, $yTranslation)); + } else { + $this->imageBackEnd->drawPathWithColor($externalPath, $fill->getExternalColor()); + } + + if ($fill->inheritsInternalColor()) { + $modulePath = $modulePath->append($internalPath->translate($xTranslation, $yTranslation)); + } else { + $this->imageBackEnd->drawPathWithColor($internalPath, $fill->getInternalColor()); + } + + $this->imageBackEnd->pop(); + + return $modulePath; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Module/DotsModule.php b/vendor/bacon/bacon-qr-code/src/Renderer/Module/DotsModule.php new file mode 100755 index 0000000..f536e5a --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Module/DotsModule.php @@ -0,0 +1,63 @@ + 1) { + throw new InvalidArgumentException('Size must between 0 (exclusive) and 1 (inclusive)'); + } + + $this->size = $size; + } + + public function createPath(ByteMatrix $matrix) : Path + { + $width = $matrix->getWidth(); + $height = $matrix->getHeight(); + $path = new Path(); + $halfSize = $this->size / 2; + $margin = (1 - $this->size) / 2; + + for ($y = 0; $y < $height; ++$y) { + for ($x = 0; $x < $width; ++$x) { + if (! $matrix->get($x, $y)) { + continue; + } + + $pathX = $x + $margin; + $pathY = $y + $margin; + + $path = $path + ->move($pathX + $this->size, $pathY + $halfSize) + ->ellipticArc($halfSize, $halfSize, 0, false, true, $pathX + $halfSize, $pathY + $this->size) + ->ellipticArc($halfSize, $halfSize, 0, false, true, $pathX, $pathY + $halfSize) + ->ellipticArc($halfSize, $halfSize, 0, false, true, $pathX + $halfSize, $pathY) + ->ellipticArc($halfSize, $halfSize, 0, false, true, $pathX + $this->size, $pathY + $halfSize) + ->close() + ; + } + } + + return $path; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Module/EdgeIterator/Edge.php b/vendor/bacon/bacon-qr-code/src/Renderer/Module/EdgeIterator/Edge.php new file mode 100755 index 0000000..90482f2 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Module/EdgeIterator/Edge.php @@ -0,0 +1,100 @@ + + */ + private $points = []; + + /** + * @var array|null + */ + private $simplifiedPoints; + + /** + * @var int + */ + private $minX = PHP_INT_MAX; + + /** + * @var int + */ + private $minY = PHP_INT_MAX; + + /** + * @var int + */ + private $maxX = -1; + + /** + * @var int + */ + private $maxY = -1; + + public function __construct(bool $positive) + { + $this->positive = $positive; + } + + public function addPoint(int $x, int $y) : void + { + $this->points[] = [$x, $y]; + $this->minX = min($this->minX, $x); + $this->minY = min($this->minY, $y); + $this->maxX = max($this->maxX, $x); + $this->maxY = max($this->maxY, $y); + } + + public function isPositive() : bool + { + return $this->positive; + } + + /** + * @return array + */ + public function getPoints() : array + { + return $this->points; + } + + public function getMaxX() : int + { + return $this->maxX; + } + + public function getSimplifiedPoints() : array + { + if (null !== $this->simplifiedPoints) { + return $this->simplifiedPoints; + } + + $points = []; + $length = count($this->points); + + for ($i = 0; $i < $length; ++$i) { + $previousPoint = $this->points[(0 === $i ? $length : $i) - 1]; + $nextPoint = $this->points[($length - 1 === $i ? -1 : $i) + 1]; + $currentPoint = $this->points[$i]; + + if (($previousPoint[0] === $currentPoint[0] && $currentPoint[0] === $nextPoint[0]) + || ($previousPoint[1] === $currentPoint[1] && $currentPoint[1] === $nextPoint[1]) + ) { + continue; + } + + $points[] = $currentPoint; + } + + return $this->simplifiedPoints = $points; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Module/EdgeIterator/EdgeIterator.php b/vendor/bacon/bacon-qr-code/src/Renderer/Module/EdgeIterator/EdgeIterator.php new file mode 100755 index 0000000..af52d52 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Module/EdgeIterator/EdgeIterator.php @@ -0,0 +1,169 @@ +bytes = iterator_to_array($matrix->getBytes()); + $this->size = count($this->bytes); + $this->width = $matrix->getWidth(); + $this->height = $matrix->getHeight(); + } + + /** + * @return Edge[] + */ + public function getIterator() : Traversable + { + $originalBytes = $this->bytes; + $point = $this->findNext(0, 0); + + while (null !== $point) { + $edge = $this->findEdge($point[0], $point[1]); + $this->xorEdge($edge); + + yield $edge; + + $point = $this->findNext($point[0], $point[1]); + } + + $this->bytes = $originalBytes; + } + + /** + * @return int[]|null + */ + private function findNext(int $x, int $y) : ?array + { + $i = $this->width * $y + $x; + + while ($i < $this->size && 1 !== $this->bytes[$i]) { + ++$i; + } + + if ($i < $this->size) { + return $this->pointOf($i); + } + + return null; + } + + private function findEdge(int $x, int $y) : Edge + { + $edge = new Edge($this->isSet($x, $y)); + $startX = $x; + $startY = $y; + $dirX = 0; + $dirY = 1; + + while (true) { + $edge->addPoint($x, $y); + $x += $dirX; + $y += $dirY; + + if ($x === $startX && $y === $startY) { + break; + } + + $left = $this->isSet($x + ($dirX + $dirY - 1 ) / 2, $y + ($dirY - $dirX - 1) / 2); + $right = $this->isSet($x + ($dirX - $dirY - 1) / 2, $y + ($dirY + $dirX - 1) / 2); + + if ($right && ! $left) { + $tmp = $dirX; + $dirX = -$dirY; + $dirY = $tmp; + } elseif ($right) { + $tmp = $dirX; + $dirX = -$dirY; + $dirY = $tmp; + } elseif (! $left) { + $tmp = $dirX; + $dirX = $dirY; + $dirY = -$tmp; + } + } + + return $edge; + } + + private function xorEdge(Edge $path) : void + { + $points = $path->getPoints(); + $y1 = $points[0][1]; + $length = count($points); + $maxX = $path->getMaxX(); + + for ($i = 1; $i < $length; ++$i) { + $y = $points[$i][1]; + + if ($y === $y1) { + continue; + } + + $x = $points[$i][0]; + $minY = min($y1, $y); + + for ($j = $x; $j < $maxX; ++$j) { + $this->flip($j, $minY); + } + + $y1 = $y; + } + } + + private function isSet(int $x, int $y) : bool + { + return ( + $x >= 0 + && $x < $this->width + && $y >= 0 + && $y < $this->height + ) && 1 === $this->bytes[$this->width * $y + $x]; + } + + /** + * @return int[] + */ + private function pointOf(int $i) : array + { + $y = intdiv($i, $this->width); + return [$i - $y * $this->width, $y]; + } + + private function flip(int $x, int $y) : void + { + $this->bytes[$this->width * $y + $x] = ( + $this->isSet($x, $y) ? 0 : 1 + ); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Module/ModuleInterface.php b/vendor/bacon/bacon-qr-code/src/Renderer/Module/ModuleInterface.php new file mode 100755 index 0000000..0ccb0e0 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Module/ModuleInterface.php @@ -0,0 +1,18 @@ + 1) { + throw new InvalidArgumentException('Intensity must between 0 (exclusive) and 1 (inclusive)'); + } + + $this->intensity = $intensity / 2; + } + + public function createPath(ByteMatrix $matrix) : Path + { + $path = new Path(); + + foreach (new EdgeIterator($matrix) as $edge) { + $points = $edge->getSimplifiedPoints(); + $length = count($points); + + $currentPoint = $points[0]; + $nextPoint = $points[1]; + $horizontal = ($currentPoint[1] === $nextPoint[1]); + + if ($horizontal) { + $right = $nextPoint[0] > $currentPoint[0]; + $path = $path->move( + $currentPoint[0] + ($right ? $this->intensity : -$this->intensity), + $currentPoint[1] + ); + } else { + $up = $nextPoint[0] < $currentPoint[0]; + $path = $path->move( + $currentPoint[0], + $currentPoint[1] + ($up ? -$this->intensity : $this->intensity) + ); + } + + for ($i = 1; $i <= $length; ++$i) { + if ($i === $length) { + $previousPoint = $points[$length - 1]; + $currentPoint = $points[0]; + $nextPoint = $points[1]; + } else { + $previousPoint = $points[(0 === $i ? $length : $i) - 1]; + $currentPoint = $points[$i]; + $nextPoint = $points[($length - 1 === $i ? -1 : $i) + 1]; + } + + $horizontal = ($previousPoint[1] === $currentPoint[1]); + + if ($horizontal) { + $right = $previousPoint[0] < $currentPoint[0]; + $up = $nextPoint[1] < $currentPoint[1]; + $sweep = ($up xor $right); + + if ($this->intensity < 0.5 + || ($right && $previousPoint[0] !== $currentPoint[0] - 1) + || (! $right && $previousPoint[0] - 1 !== $currentPoint[0]) + ) { + $path = $path->line( + $currentPoint[0] + ($right ? -$this->intensity : $this->intensity), + $currentPoint[1] + ); + } + + $path = $path->ellipticArc( + $this->intensity, + $this->intensity, + 0, + false, + $sweep, + $currentPoint[0], + $currentPoint[1] + ($up ? -$this->intensity : $this->intensity) + ); + } else { + $up = $previousPoint[1] > $currentPoint[1]; + $right = $nextPoint[0] > $currentPoint[0]; + $sweep = ! ($up xor $right); + + if ($this->intensity < 0.5 + || ($up && $previousPoint[1] !== $currentPoint[1] + 1) + || (! $up && $previousPoint[0] + 1 !== $currentPoint[0]) + ) { + $path = $path->line( + $currentPoint[0], + $currentPoint[1] + ($up ? $this->intensity : -$this->intensity) + ); + } + + $path = $path->ellipticArc( + $this->intensity, + $this->intensity, + 0, + false, + $sweep, + $currentPoint[0] + ($right ? $this->intensity : -$this->intensity), + $currentPoint[1] + ); + } + } + + $path = $path->close(); + } + + return $path; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Module/SquareModule.php b/vendor/bacon/bacon-qr-code/src/Renderer/Module/SquareModule.php new file mode 100755 index 0000000..9ab4607 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Module/SquareModule.php @@ -0,0 +1,47 @@ +getSimplifiedPoints(); + $length = count($points); + $path = $path->move($points[0][0], $points[0][1]); + + for ($i = 1; $i < $length; ++$i) { + $path = $path->line($points[$i][0], $points[$i][1]); + } + + $path = $path->close(); + } + + return $path; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Path/Close.php b/vendor/bacon/bacon-qr-code/src/Renderer/Path/Close.php new file mode 100755 index 0000000..b07feb0 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Path/Close.php @@ -0,0 +1,29 @@ +x1 = $x1; + $this->y1 = $y1; + $this->x2 = $x2; + $this->y2 = $y2; + $this->x3 = $x3; + $this->y3 = $y3; + } + + public function getX1() : float + { + return $this->x1; + } + + public function getY1() : float + { + return $this->y1; + } + + public function getX2() : float + { + return $this->x2; + } + + public function getY2() : float + { + return $this->y2; + } + + public function getX3() : float + { + return $this->x3; + } + + public function getY3() : float + { + return $this->y3; + } + + /** + * @return self + */ + public function translate(float $x, float $y) : OperationInterface + { + return new self( + $this->x1 + $x, + $this->y1 + $y, + $this->x2 + $x, + $this->y2 + $y, + $this->x3 + $x, + $this->y3 + $y + ); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Path/EllipticArc.php b/vendor/bacon/bacon-qr-code/src/Renderer/Path/EllipticArc.php new file mode 100755 index 0000000..eff7deb --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Path/EllipticArc.php @@ -0,0 +1,278 @@ +xRadius = abs($xRadius); + $this->yRadius = abs($yRadius); + $this->xAxisAngle = $xAxisAngle % 360; + $this->largeArc = $largeArc; + $this->sweep = $sweep; + $this->x = $x; + $this->y = $y; + } + + public function getXRadius() : float + { + return $this->xRadius; + } + + public function getYRadius() : float + { + return $this->yRadius; + } + + public function getXAxisAngle() : float + { + return $this->xAxisAngle; + } + + public function isLargeArc() : bool + { + return $this->largeArc; + } + + public function isSweep() : bool + { + return $this->sweep; + } + + public function getX() : float + { + return $this->x; + } + + public function getY() : float + { + return $this->y; + } + + /** + * @return self + */ + public function translate(float $x, float $y) : OperationInterface + { + return new self( + $this->xRadius, + $this->yRadius, + $this->xAxisAngle, + $this->largeArc, + $this->sweep, + $this->x + $x, + $this->y + $y + ); + } + + /** + * Converts the elliptic arc to multiple curves. + * + * Since not all image back ends support elliptic arcs, this method allows to convert the arc into multiple curves + * resembling the same result. + * + * @see https://mortoray.com/2017/02/16/rendering-an-svg-elliptical-arc-as-bezier-curves/ + * @return array + */ + public function toCurves(float $fromX, float $fromY) : array + { + if (sqrt(($fromX - $this->x) ** 2 + ($fromY - $this->y) ** 2) < self::ZERO_TOLERANCE) { + return []; + } + + if ($this->xRadius < self::ZERO_TOLERANCE || $this->yRadius < self::ZERO_TOLERANCE) { + return [new Line($this->x, $this->y)]; + } + + return $this->createCurves($fromX, $fromY); + } + + /** + * @return Curve[] + */ + private function createCurves(float $fromX, $fromY) : array + { + $xAngle = deg2rad($this->xAxisAngle); + list($centerX, $centerY, $radiusX, $radiusY, $startAngle, $deltaAngle) = + $this->calculateCenterPointParameters($fromX, $fromY, $xAngle); + + $s = $startAngle; + $e = $s + $deltaAngle; + $sign = ($e < $s) ? -1 : 1; + $remain = abs($e - $s); + $p1 = self::point($centerX, $centerY, $radiusX, $radiusY, $xAngle, $s); + $curves = []; + + while ($remain > self::ZERO_TOLERANCE) { + $step = min($remain, pi() / 2); + $signStep = $step * $sign; + $p2 = self::point($centerX, $centerY, $radiusX, $radiusY, $xAngle, $s + $signStep); + + $alphaT = tan($signStep / 2); + $alpha = sin($signStep) * (sqrt(4 + 3 * $alphaT ** 2) - 1) / 3; + $d1 = self::derivative($radiusX, $radiusY, $xAngle, $s); + $d2 = self::derivative($radiusX, $radiusY, $xAngle, $s + $signStep); + + $curves[] = new Curve( + $p1[0] + $alpha * $d1[0], + $p1[1] + $alpha * $d1[1], + $p2[0] - $alpha * $d2[0], + $p2[1] - $alpha * $d2[1], + $p2[0], + $p2[1] + ); + + $s += $signStep; + $remain -= $step; + $p1 = $p2; + } + + return $curves; + } + + /** + * @return float[] + */ + private function calculateCenterPointParameters(float $fromX, float $fromY, float $xAngle) + { + $rX = $this->xRadius; + $rY = $this->yRadius; + + // F.6.5.1 + $dx2 = ($fromX - $this->x) / 2; + $dy2 = ($fromY - $this->y) / 2; + $x1p = cos($xAngle) * $dx2 + sin($xAngle) * $dy2; + $y1p = -sin($xAngle) * $dx2 + cos($xAngle) * $dy2; + + // F.6.5.2 + $rxs = $rX ** 2; + $rys = $rY ** 2; + $x1ps = $x1p ** 2; + $y1ps = $y1p ** 2; + $cr = $x1ps / $rxs + $y1ps / $rys; + + if ($cr > 1) { + $s = sqrt($cr); + $rX *= $s; + $rY *= $s; + $rxs = $rX ** 2; + $rys = $rY ** 2; + } + + $dq = ($rxs * $y1ps + $rys * $x1ps); + $pq = ($rxs * $rys - $dq) / $dq; + $q = sqrt(max(0, $pq)); + + if ($this->largeArc === $this->sweep) { + $q = -$q; + } + + $cxp = $q * $rX * $y1p / $rY; + $cyp = -$q * $rY * $x1p / $rX; + + // F.6.5.3 + $cx = cos($xAngle) * $cxp - sin($xAngle) * $cyp + ($fromX + $this->x) / 2; + $cy = sin($xAngle) * $cxp + cos($xAngle) * $cyp + ($fromY + $this->y) / 2; + + // F.6.5.5 + $theta = self::angle(1, 0, ($x1p - $cxp) / $rX, ($y1p - $cyp) / $rY); + + // F.6.5.6 + $delta = self::angle(($x1p - $cxp) / $rX, ($y1p - $cyp) / $rY, (-$x1p - $cxp) / $rX, (-$y1p - $cyp) / $rY); + $delta = fmod($delta, pi() * 2); + + if (! $this->sweep) { + $delta -= 2 * pi(); + } + + return [$cx, $cy, $rX, $rY, $theta, $delta]; + } + + private static function angle(float $ux, float $uy, float $vx, float $vy) : float + { + // F.6.5.4 + $dot = $ux * $vx + $uy * $vy; + $length = sqrt($ux ** 2 + $uy ** 2) * sqrt($vx ** 2 + $vy ** 2); + $angle = acos(min(1, max(-1, $dot / $length))); + + if (($ux * $vy - $uy * $vx) < 0) { + return -$angle; + } + + return $angle; + } + + /** + * @return float[] + */ + private static function point( + float $centerX, + float $centerY, + float $radiusX, + float $radiusY, + float $xAngle, + float $angle + ) : array { + return [ + $centerX + $radiusX * cos($xAngle) * cos($angle) - $radiusY * sin($xAngle) * sin($angle), + $centerY + $radiusX * sin($xAngle) * cos($angle) + $radiusY * cos($xAngle) * sin($angle), + ]; + } + + /** + * @return float[] + */ + private static function derivative(float $radiusX, float $radiusY, float $xAngle, float $angle) : array + { + return [ + -$radiusX * cos($xAngle) * sin($angle) - $radiusY * sin($xAngle) * cos($angle), + -$radiusX * sin($xAngle) * sin($angle) + $radiusY * cos($xAngle) * cos($angle), + ]; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Path/Line.php b/vendor/bacon/bacon-qr-code/src/Renderer/Path/Line.php new file mode 100755 index 0000000..3149a39 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Path/Line.php @@ -0,0 +1,41 @@ +x = $x; + $this->y = $y; + } + + public function getX() : float + { + return $this->x; + } + + public function getY() : float + { + return $this->y; + } + + /** + * @return self + */ + public function translate(float $x, float $y) : OperationInterface + { + return new self($this->x + $x, $this->y + $y); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Path/Move.php b/vendor/bacon/bacon-qr-code/src/Renderer/Path/Move.php new file mode 100755 index 0000000..007b77c --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Path/Move.php @@ -0,0 +1,41 @@ +x = $x; + $this->y = $y; + } + + public function getX() : float + { + return $this->x; + } + + public function getY() : float + { + return $this->y; + } + + /** + * @return self + */ + public function translate(float $x, float $y) : OperationInterface + { + return new self($this->x + $x, $this->x + $y); + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/Path/OperationInterface.php b/vendor/bacon/bacon-qr-code/src/Renderer/Path/OperationInterface.php new file mode 100755 index 0000000..a5fa0ed --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/Path/OperationInterface.php @@ -0,0 +1,12 @@ +operations[] = new Move($x, $y); + return $path; + } + + /** + * Draws a line from the current position to another position. + */ + public function line(float $x, float $y) : self + { + $path = clone $this; + $path->operations[] = new Line($x, $y); + return $path; + } + + /** + * Draws an elliptic arc from the current position to another position. + */ + public function ellipticArc( + float $xRadius, + float $yRadius, + float $xAxisRotation, + bool $largeArc, + bool $sweep, + float $x, + float $y + ) : self { + $path = clone $this; + $path->operations[] = new EllipticArc($xRadius, $yRadius, $xAxisRotation, $largeArc, $sweep, $x, $y); + return $path; + } + + /** + * Draws a curve from the current position to another position. + */ + public function curve(float $x1, float $y1, float $x2, float $y2, float $x3, float $y3) : self + { + $path = clone $this; + $path->operations[] = new Curve($x1, $y1, $x2, $y2, $x3, $y3); + return $path; + } + + /** + * Closes a sub-path. + */ + public function close() : self + { + $path = clone $this; + $path->operations[] = Close::instance(); + return $path; + } + + /** + * Appends another path to this one. + */ + public function append(self $other) : self + { + $path = clone $this; + $path->operations = array_merge($this->operations, $other->operations); + return $path; + } + + public function translate(float $x, float $y) : self + { + $path = new self(); + + foreach ($this->operations as $operation) { + $path->operations[] = $operation->translate($x, $y); + } + + return $path; + } + + /** + * @return OperationInterface[]|Traversable + */ + public function getIterator() : Traversable + { + foreach ($this->operations as $operation) { + yield $operation; + } + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/PlainTextRenderer.php b/vendor/bacon/bacon-qr-code/src/Renderer/PlainTextRenderer.php new file mode 100755 index 0000000..8aa7652 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/PlainTextRenderer.php @@ -0,0 +1,86 @@ +margin = $margin; + } + + /** + * @throws InvalidArgumentException if matrix width doesn't match height + */ + public function render(QrCode $qrCode) : string + { + $matrix = $qrCode->getMatrix(); + $matrixSize = $matrix->getWidth(); + + if ($matrixSize !== $matrix->getHeight()) { + throw new InvalidArgumentException('Matrix must have the same width and height'); + } + + $rows = $matrix->getArray()->toArray(); + + if (0 !== $matrixSize % 2) { + $rows[] = array_fill(0, $matrixSize, 0); + } + + $horizontalMargin = str_repeat(self::EMPTY_BLOCK, $this->margin); + $result = str_repeat("\n", (int) ceil($this->margin / 2)); + + for ($i = 0; $i < $matrixSize; $i += 2) { + $result .= $horizontalMargin; + + $upperRow = $rows[$i]; + $lowerRow = $rows[$i + 1]; + + for ($j = 0; $j < $matrixSize; ++$j) { + $upperBit = $upperRow[$j]; + $lowerBit = $lowerRow[$j]; + + if ($upperBit) { + $result .= $lowerBit ? self::FULL_BLOCK : self::UPPER_HALF_BLOCK; + } else { + $result .= $lowerBit ? self::LOWER_HALF_BLOCK : self::EMPTY_BLOCK; + } + } + + $result .= $horizontalMargin . "\n"; + } + + $result .= str_repeat("\n", (int) ceil($this->margin / 2)); + + return $result; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/RendererInterface.php b/vendor/bacon/bacon-qr-code/src/Renderer/RendererInterface.php new file mode 100755 index 0000000..b0aae39 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/RendererInterface.php @@ -0,0 +1,11 @@ +externalColor = $externalColor; + $this->internalColor = $internalColor; + } + + public static function uniform(ColorInterface $color) : self + { + return new self($color, $color); + } + + public static function inherit() : self + { + return self::$inherit ?: self::$inherit = new self(null, null); + } + + public function inheritsBothColors() : bool + { + return null === $this->externalColor && null === $this->internalColor; + } + + public function inheritsExternalColor() : bool + { + return null === $this->externalColor; + } + + public function inheritsInternalColor() : bool + { + return null === $this->internalColor; + } + + public function getExternalColor() : ColorInterface + { + if (null === $this->externalColor) { + throw new RuntimeException('External eye color inherits foreground color'); + } + + return $this->externalColor; + } + + public function getInternalColor() : ColorInterface + { + if (null === $this->internalColor) { + throw new RuntimeException('Internal eye color inherits foreground color'); + } + + return $this->internalColor; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php b/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php new file mode 100755 index 0000000..d54268e --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Fill.php @@ -0,0 +1,168 @@ +backgroundColor = $backgroundColor; + $this->foregroundColor = $foregroundColor; + $this->foregroundGradient = $foregroundGradient; + $this->topLeftEyeFill = $topLeftEyeFill; + $this->topRightEyeFill = $topRightEyeFill; + $this->bottomLeftEyeFill = $bottomLeftEyeFill; + } + + public static function default() : self + { + return self::$default ?: self::$default = self::uniformColor(new Gray(100), new Gray(0)); + } + + public static function withForegroundColor( + ColorInterface $backgroundColor, + ColorInterface $foregroundColor, + EyeFill $topLeftEyeFill, + EyeFill $topRightEyeFill, + EyeFill $bottomLeftEyeFill + ) : self { + return new self( + $backgroundColor, + $foregroundColor, + null, + $topLeftEyeFill, + $topRightEyeFill, + $bottomLeftEyeFill + ); + } + + public static function withForegroundGradient( + ColorInterface $backgroundColor, + Gradient $foregroundGradient, + EyeFill $topLeftEyeFill, + EyeFill $topRightEyeFill, + EyeFill $bottomLeftEyeFill + ) : self { + return new self( + $backgroundColor, + null, + $foregroundGradient, + $topLeftEyeFill, + $topRightEyeFill, + $bottomLeftEyeFill + ); + } + + public static function uniformColor(ColorInterface $backgroundColor, ColorInterface $foregroundColor) : self + { + return new self( + $backgroundColor, + $foregroundColor, + null, + EyeFill::inherit(), + EyeFill::inherit(), + EyeFill::inherit() + ); + } + + public static function uniformGradient(ColorInterface $backgroundColor, Gradient $foregroundGradient) : self + { + return new self( + $backgroundColor, + null, + $foregroundGradient, + EyeFill::inherit(), + EyeFill::inherit(), + EyeFill::inherit() + ); + } + + public function hasGradientFill() : bool + { + return null !== $this->foregroundGradient; + } + + public function getBackgroundColor() : ColorInterface + { + return $this->backgroundColor; + } + + public function getForegroundColor() : ColorInterface + { + if (null === $this->foregroundColor) { + throw new RuntimeException('Fill uses a gradient, thus no foreground color is available'); + } + + return $this->foregroundColor; + } + + public function getForegroundGradient() : Gradient + { + if (null === $this->foregroundGradient) { + throw new RuntimeException('Fill uses a single color, thus no foreground gradient is available'); + } + + return $this->foregroundGradient; + } + + public function getTopLeftEyeFill() : EyeFill + { + return $this->topLeftEyeFill; + } + + public function getTopRightEyeFill() : EyeFill + { + return $this->topRightEyeFill; + } + + public function getBottomLeftEyeFill() : EyeFill + { + return $this->bottomLeftEyeFill; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Gradient.php b/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Gradient.php new file mode 100755 index 0000000..3813dfd --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/Gradient.php @@ -0,0 +1,46 @@ +startColor = $startColor; + $this->endColor = $endColor; + $this->type = $type; + } + + public function getStartColor() : ColorInterface + { + return $this->startColor; + } + + public function getEndColor() : ColorInterface + { + return $this->endColor; + } + + public function getType() : GradientType + { + return $this->type; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/GradientType.php b/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/GradientType.php new file mode 100755 index 0000000..c1ca754 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Renderer/RendererStyle/GradientType.php @@ -0,0 +1,22 @@ +margin = $margin; + $this->size = $size; + $this->module = $module ?: SquareModule::instance(); + $this->eye = $eye ?: new ModuleEye($this->module); + $this->fill = $fill ?: Fill::default(); + } + + public function withSize(int $size) : self + { + $style = clone $this; + $style->size = $size; + return $style; + } + + public function withMargin(int $margin) : self + { + $style = clone $this; + $style->margin = $margin; + return $style; + } + + public function getSize() : int + { + return $this->size; + } + + public function getMargin() : int + { + return $this->margin; + } + + public function getModule() : ModuleInterface + { + return $this->module; + } + + public function getEye() : EyeInterface + { + return $this->eye; + } + + public function getFill() : Fill + { + return $this->fill; + } +} diff --git a/vendor/bacon/bacon-qr-code/src/Writer.php b/vendor/bacon/bacon-qr-code/src/Writer.php new file mode 100755 index 0000000..6688901 --- /dev/null +++ b/vendor/bacon/bacon-qr-code/src/Writer.php @@ -0,0 +1,68 @@ +renderer = $renderer; + } + + /** + * Writes QR code and returns it as string. + * + * Content is a string which *should* be encoded in UTF-8, in case there are + * non ASCII-characters present. + * + * @throws InvalidArgumentException if the content is empty + */ + public function writeString( + string $content, + string $encoding = Encoder::DEFAULT_BYTE_MODE_ECODING, + ?ErrorCorrectionLevel $ecLevel = null + ) : string { + if (strlen($content) === 0) { + throw new InvalidArgumentException('Found empty contents'); + } + + if (null === $ecLevel) { + $ecLevel = ErrorCorrectionLevel::L(); + } + + return $this->renderer->render(Encoder::encode($content, $ecLevel, $encoding)); + } + + /** + * Writes QR code to a file. + * + * @see Writer::writeString() + */ + public function writeFile( + string $content, + string $filename, + string $encoding = Encoder::DEFAULT_BYTE_MODE_ECODING, + ?ErrorCorrectionLevel $ecLevel = null + ) : void { + file_put_contents($filename, $this->writeString($content, $encoding, $ecLevel)); + } +} diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php new file mode 100755 index 0000000..fce8549 --- /dev/null +++ b/vendor/composer/ClassLoader.php @@ -0,0 +1,445 @@ + + * Jordi Boggiano + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Composer\Autoload; + +/** + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. + * + * $loader = new \Composer\Autoload\ClassLoader(); + * + * // register classes with namespaces + * $loader->add('Symfony\Component', __DIR__.'/component'); + * $loader->add('Symfony', __DIR__.'/framework'); + * + * // activate the autoloader + * $loader->register(); + * + * // to enable searching the include path (eg. for PEAR packages) + * $loader->setUseIncludePath(true); + * + * In this example, if you try to use a class in the Symfony\Component + * namespace or one of its children (Symfony\Component\Console for instance), + * the autoloader will first look for the class under the component/ + * directory, and it will then fallback to the framework/ directory if not + * found before giving up. + * + * This class is loosely based on the Symfony UniversalClassLoader. + * + * @author Fabien Potencier + * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ + */ +class ClassLoader +{ + // PSR-4 + private $prefixLengthsPsr4 = array(); + private $prefixDirsPsr4 = array(); + private $fallbackDirsPsr4 = array(); + + // PSR-0 + private $prefixesPsr0 = array(); + private $fallbackDirsPsr0 = array(); + + private $useIncludePath = false; + private $classMap = array(); + private $classMapAuthoritative = false; + private $missingClasses = array(); + private $apcuPrefix; + + public function getPrefixes() + { + if (!empty($this->prefixesPsr0)) { + return call_user_func_array('array_merge', $this->prefixesPsr0); + } + + return array(); + } + + public function getPrefixesPsr4() + { + return $this->prefixDirsPsr4; + } + + public function getFallbackDirs() + { + return $this->fallbackDirsPsr0; + } + + public function getFallbackDirsPsr4() + { + return $this->fallbackDirsPsr4; + } + + public function getClassMap() + { + return $this->classMap; + } + + /** + * @param array $classMap Class to filename map + */ + public function addClassMap(array $classMap) + { + if ($this->classMap) { + $this->classMap = array_merge($this->classMap, $classMap); + } else { + $this->classMap = $classMap; + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, either + * appending or prepending to the ones previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 root directories + * @param bool $prepend Whether to prepend the directories + */ + public function add($prefix, $paths, $prepend = false) + { + if (!$prefix) { + if ($prepend) { + $this->fallbackDirsPsr0 = array_merge( + (array) $paths, + $this->fallbackDirsPsr0 + ); + } else { + $this->fallbackDirsPsr0 = array_merge( + $this->fallbackDirsPsr0, + (array) $paths + ); + } + + return; + } + + $first = $prefix[0]; + if (!isset($this->prefixesPsr0[$first][$prefix])) { + $this->prefixesPsr0[$first][$prefix] = (array) $paths; + + return; + } + if ($prepend) { + $this->prefixesPsr0[$first][$prefix] = array_merge( + (array) $paths, + $this->prefixesPsr0[$first][$prefix] + ); + } else { + $this->prefixesPsr0[$first][$prefix] = array_merge( + $this->prefixesPsr0[$first][$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, either + * appending or prepending to the ones previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * @param bool $prepend Whether to prepend the directories + * + * @throws \InvalidArgumentException + */ + public function addPsr4($prefix, $paths, $prepend = false) + { + if (!$prefix) { + // Register directories for the root namespace. + if ($prepend) { + $this->fallbackDirsPsr4 = array_merge( + (array) $paths, + $this->fallbackDirsPsr4 + ); + } else { + $this->fallbackDirsPsr4 = array_merge( + $this->fallbackDirsPsr4, + (array) $paths + ); + } + } elseif (!isset($this->prefixDirsPsr4[$prefix])) { + // Register directories for a new namespace. + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } elseif ($prepend) { + // Prepend directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + (array) $paths, + $this->prefixDirsPsr4[$prefix] + ); + } else { + // Append directories for an already registered namespace. + $this->prefixDirsPsr4[$prefix] = array_merge( + $this->prefixDirsPsr4[$prefix], + (array) $paths + ); + } + } + + /** + * Registers a set of PSR-0 directories for a given prefix, + * replacing any others previously set for this prefix. + * + * @param string $prefix The prefix + * @param array|string $paths The PSR-0 base directories + */ + public function set($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr0 = (array) $paths; + } else { + $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths; + } + } + + /** + * Registers a set of PSR-4 directories for a given namespace, + * replacing any others previously set for this namespace. + * + * @param string $prefix The prefix/namespace, with trailing '\\' + * @param array|string $paths The PSR-4 base directories + * + * @throws \InvalidArgumentException + */ + public function setPsr4($prefix, $paths) + { + if (!$prefix) { + $this->fallbackDirsPsr4 = (array) $paths; + } else { + $length = strlen($prefix); + if ('\\' !== $prefix[$length - 1]) { + throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator."); + } + $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length; + $this->prefixDirsPsr4[$prefix] = (array) $paths; + } + } + + /** + * Turns on searching the include path for class files. + * + * @param bool $useIncludePath + */ + public function setUseIncludePath($useIncludePath) + { + $this->useIncludePath = $useIncludePath; + } + + /** + * Can be used to check if the autoloader uses the include path to check + * for classes. + * + * @return bool + */ + public function getUseIncludePath() + { + return $this->useIncludePath; + } + + /** + * Turns off searching the prefix and fallback directories for classes + * that have not been registered with the class map. + * + * @param bool $classMapAuthoritative + */ + public function setClassMapAuthoritative($classMapAuthoritative) + { + $this->classMapAuthoritative = $classMapAuthoritative; + } + + /** + * Should class lookup fail if not found in the current class map? + * + * @return bool + */ + public function isClassMapAuthoritative() + { + return $this->classMapAuthoritative; + } + + /** + * APCu prefix to use to cache found/not-found classes, if the extension is enabled. + * + * @param string|null $apcuPrefix + */ + public function setApcuPrefix($apcuPrefix) + { + $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null; + } + + /** + * The APCu prefix in use, or null if APCu caching is not enabled. + * + * @return string|null + */ + public function getApcuPrefix() + { + return $this->apcuPrefix; + } + + /** + * Registers this instance as an autoloader. + * + * @param bool $prepend Whether to prepend the autoloader or not + */ + public function register($prepend = false) + { + spl_autoload_register(array($this, 'loadClass'), true, $prepend); + } + + /** + * Unregisters this instance as an autoloader. + */ + public function unregister() + { + spl_autoload_unregister(array($this, 'loadClass')); + } + + /** + * Loads the given class or interface. + * + * @param string $class The name of the class + * @return bool|null True if loaded, null otherwise + */ + public function loadClass($class) + { + if ($file = $this->findFile($class)) { + includeFile($file); + + return true; + } + } + + /** + * Finds the path to the file where the class is defined. + * + * @param string $class The name of the class + * + * @return string|false The path if found, false otherwise + */ + public function findFile($class) + { + // class map lookup + if (isset($this->classMap[$class])) { + return $this->classMap[$class]; + } + if ($this->classMapAuthoritative || isset($this->missingClasses[$class])) { + return false; + } + if (null !== $this->apcuPrefix) { + $file = apcu_fetch($this->apcuPrefix.$class, $hit); + if ($hit) { + return $file; + } + } + + $file = $this->findFileWithExtension($class, '.php'); + + // Search for Hack files if we are running on HHVM + if (false === $file && defined('HHVM_VERSION')) { + $file = $this->findFileWithExtension($class, '.hh'); + } + + if (null !== $this->apcuPrefix) { + apcu_add($this->apcuPrefix.$class, $file); + } + + if (false === $file) { + // Remember that this class does not exist. + $this->missingClasses[$class] = true; + } + + return $file; + } + + private function findFileWithExtension($class, $ext) + { + // PSR-4 lookup + $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext; + + $first = $class[0]; + if (isset($this->prefixLengthsPsr4[$first])) { + $subPath = $class; + while (false !== $lastPos = strrpos($subPath, '\\')) { + $subPath = substr($subPath, 0, $lastPos); + $search = $subPath . '\\'; + if (isset($this->prefixDirsPsr4[$search])) { + $pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1); + foreach ($this->prefixDirsPsr4[$search] as $dir) { + if (file_exists($file = $dir . $pathEnd)) { + return $file; + } + } + } + } + } + + // PSR-4 fallback dirs + foreach ($this->fallbackDirsPsr4 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr4)) { + return $file; + } + } + + // PSR-0 lookup + if (false !== $pos = strrpos($class, '\\')) { + // namespaced class name + $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1) + . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR); + } else { + // PEAR-like class name + $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext; + } + + if (isset($this->prefixesPsr0[$first])) { + foreach ($this->prefixesPsr0[$first] as $prefix => $dirs) { + if (0 === strpos($class, $prefix)) { + foreach ($dirs as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + } + } + } + + // PSR-0 fallback dirs + foreach ($this->fallbackDirsPsr0 as $dir) { + if (file_exists($file = $dir . DIRECTORY_SEPARATOR . $logicalPathPsr0)) { + return $file; + } + } + + // PSR-0 include paths. + if ($this->useIncludePath && $file = stream_resolve_include_path($logicalPathPsr0)) { + return $file; + } + + return false; + } +} + +/** + * Scope isolated include. + * + * Prevents access to $this/self from included files. + */ +function includeFile($file) +{ + include $file; +} diff --git a/vendor/composer/LICENSE b/vendor/composer/LICENSE new file mode 100755 index 0000000..f27399a --- /dev/null +++ b/vendor/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php new file mode 100755 index 0000000..7a91153 --- /dev/null +++ b/vendor/composer/autoload_classmap.php @@ -0,0 +1,9 @@ + $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => $vendorDir . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => $vendorDir . '/symfony/polyfill-intl-idn/bootstrap.php', + '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', + 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php', + 'a9ed0d27b5a698798a89181429f162c5' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php', + '9d8e013a5160a09477beb8e44f8ae97b' => $vendorDir . '/markbaker/matrix/classes/src/functions/adjoint.php', + '6e78d1bdea6248d6aa117229efae50f2' => $vendorDir . '/markbaker/matrix/classes/src/functions/antidiagonal.php', + '4623d87924d94f5412fe5afbf1cef31d' => $vendorDir . '/markbaker/matrix/classes/src/functions/cofactors.php', + '901fd1f6950a637ca85f66b701a45e13' => $vendorDir . '/markbaker/matrix/classes/src/functions/determinant.php', + '83057abc0e4acc99ba80154ee5d02a49' => $vendorDir . '/markbaker/matrix/classes/src/functions/diagonal.php', + '07b7fd7a434451149b4fd477fca0ce06' => $vendorDir . '/markbaker/matrix/classes/src/functions/identity.php', + 'c8d43b340583e07ae89f2a3baef2cf89' => $vendorDir . '/markbaker/matrix/classes/src/functions/inverse.php', + '499bb10ed7a3aee2ba4c09a31a85e8d1' => $vendorDir . '/markbaker/matrix/classes/src/functions/minors.php', + '1cad2e6414d652e8b1c64e8967f6f37d' => $vendorDir . '/markbaker/matrix/classes/src/functions/trace.php', + '95a7f134ac17161d07def442b3b737e8' => $vendorDir . '/markbaker/matrix/classes/src/functions/transpose.php', + 'b3a6bc628377118d4b4b8ba08d1eb949' => $vendorDir . '/markbaker/matrix/classes/src/operations/add.php', + '5fef6d0e407f3f8887266dfa4a6c534c' => $vendorDir . '/markbaker/matrix/classes/src/operations/directsum.php', + '684ba247e1385946e3babdaa054119de' => $vendorDir . '/markbaker/matrix/classes/src/operations/subtract.php', + 'aa53dcba601214d17ad405b7c291b7e8' => $vendorDir . '/markbaker/matrix/classes/src/operations/multiply.php', + '75c79eb1b25749b05a47976f32b0d8a2' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideby.php', + '6ab8ad87a734f276a6bcd5a0fe1289be' => $vendorDir . '/markbaker/matrix/classes/src/operations/divideinto.php', + 'abede361264e2ae69ec1eee813a101af' => $vendorDir . '/markbaker/complex/classes/src/functions/abs.php', + '21a5860fbef5be28db5ddfbc3cca67c4' => $vendorDir . '/markbaker/complex/classes/src/functions/acos.php', + '1546e3f9d127f2a9bb2d1b6c31c26ef1' => $vendorDir . '/markbaker/complex/classes/src/functions/acosh.php', + 'd2516f7f4fba5ea5905f494b4a8262e0' => $vendorDir . '/markbaker/complex/classes/src/functions/acot.php', + '4511163d560956219b96882c0980b65e' => $vendorDir . '/markbaker/complex/classes/src/functions/acoth.php', + 'c361f5616dc2a8da4fa3e137077cd4ea' => $vendorDir . '/markbaker/complex/classes/src/functions/acsc.php', + '02d68920fc98da71991ce569c91df0f6' => $vendorDir . '/markbaker/complex/classes/src/functions/acsch.php', + '88e19525eae308b4a6aa3419364875d3' => $vendorDir . '/markbaker/complex/classes/src/functions/argument.php', + '60e8e2d0827b58bfc904f13957e51849' => $vendorDir . '/markbaker/complex/classes/src/functions/asec.php', + '13d2f040713999eab66c359b4d79871d' => $vendorDir . '/markbaker/complex/classes/src/functions/asech.php', + '838ab38beb32c68a79d3cd2c007d5a04' => $vendorDir . '/markbaker/complex/classes/src/functions/asin.php', + 'bb28eccd0f8f008333a1b3c163d604ac' => $vendorDir . '/markbaker/complex/classes/src/functions/asinh.php', + '9e483de83558c98f7d3feaa402c78cb3' => $vendorDir . '/markbaker/complex/classes/src/functions/atan.php', + '36b74b5b765ded91ee58c8ee3c0e85e3' => $vendorDir . '/markbaker/complex/classes/src/functions/atanh.php', + '05c15ee9510da7fd6bf6136f436500c0' => $vendorDir . '/markbaker/complex/classes/src/functions/conjugate.php', + 'd3208dfbce2505e370788f9f22f6785f' => $vendorDir . '/markbaker/complex/classes/src/functions/cos.php', + '141cf1fb3a3046f8b64534b0ebab33ca' => $vendorDir . '/markbaker/complex/classes/src/functions/cosh.php', + 'be660df75fd0dbe7fa7c03b7434b3294' => $vendorDir . '/markbaker/complex/classes/src/functions/cot.php', + '01e31ea298a51bc9e91517e3ce6b9e76' => $vendorDir . '/markbaker/complex/classes/src/functions/coth.php', + '803ddd97f7b1da68982a7b087c3476f6' => $vendorDir . '/markbaker/complex/classes/src/functions/csc.php', + '3001cdfd101ec3c32da34ee43c2e149b' => $vendorDir . '/markbaker/complex/classes/src/functions/csch.php', + '77b2d7629ef2a93fabb8c56754a91051' => $vendorDir . '/markbaker/complex/classes/src/functions/exp.php', + '4a4471296dec796c21d4f4b6552396a9' => $vendorDir . '/markbaker/complex/classes/src/functions/inverse.php', + 'c3e9897e1744b88deb56fcdc39d34d85' => $vendorDir . '/markbaker/complex/classes/src/functions/ln.php', + 'a83cacf2de942cff288de15a83afd26d' => $vendorDir . '/markbaker/complex/classes/src/functions/log2.php', + '6a861dacc9ee2f3061241d4c7772fa21' => $vendorDir . '/markbaker/complex/classes/src/functions/log10.php', + '4d2522d968c8ba78d6c13548a1b4200e' => $vendorDir . '/markbaker/complex/classes/src/functions/negative.php', + 'fd587ca933fc0447fa5ab4843bdd97f7' => $vendorDir . '/markbaker/complex/classes/src/functions/pow.php', + '383ef01c62028fc78cd4388082fce3c2' => $vendorDir . '/markbaker/complex/classes/src/functions/rho.php', + '150fbd1b95029dc47292da97ecab9375' => $vendorDir . '/markbaker/complex/classes/src/functions/sec.php', + '549abd9bae174286d660bdaa07407c68' => $vendorDir . '/markbaker/complex/classes/src/functions/sech.php', + '6bfbf5eaea6b17a0ed85cb21ba80370c' => $vendorDir . '/markbaker/complex/classes/src/functions/sin.php', + '22efe13f1a497b8e199540ae2d9dc59c' => $vendorDir . '/markbaker/complex/classes/src/functions/sinh.php', + 'e90135ab8e787795a509ed7147de207d' => $vendorDir . '/markbaker/complex/classes/src/functions/sqrt.php', + 'bb0a7923ffc6a90919cd64ec54ff06bc' => $vendorDir . '/markbaker/complex/classes/src/functions/tan.php', + '2d302f32ce0fd4e433dd91c5bb404a28' => $vendorDir . '/markbaker/complex/classes/src/functions/tanh.php', + '24dd4658a952171a4ee79218c4f9fd06' => $vendorDir . '/markbaker/complex/classes/src/functions/theta.php', + 'e49b7876281d6f5bc39536dde96d1f4a' => $vendorDir . '/markbaker/complex/classes/src/operations/add.php', + '47596e02b43cd6da7700134fd08f88cf' => $vendorDir . '/markbaker/complex/classes/src/operations/subtract.php', + '883af48563631547925fa4c3b48ead07' => $vendorDir . '/markbaker/complex/classes/src/operations/multiply.php', + 'f190e3308e6ca23234a2875edc985c03' => $vendorDir . '/markbaker/complex/classes/src/operations/divideby.php', + 'ac9e33ce6841aa5bf5d16d465a2f03a7' => $vendorDir . '/markbaker/complex/classes/src/operations/divideinto.php', + 'f0e7e63bbb278a92db02393536748c5f' => $vendorDir . '/overtrue/wechat/src/Kernel/Support/Helpers.php', + '6747f579ad6817f318cc3a7e7a0abb93' => $vendorDir . '/overtrue/wechat/src/Kernel/Helpers.php', + '1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php', + 'ddc3cd2a04224f9638c5d0de6a69c7e3' => $vendorDir . '/topthink/think-migration/src/config.php', +); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php new file mode 100755 index 0000000..c3cd022 --- /dev/null +++ b/vendor/composer/autoload_namespaces.php @@ -0,0 +1,10 @@ + array($vendorDir . '/pimple/pimple/src'), +); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php new file mode 100755 index 0000000..6df2b91 --- /dev/null +++ b/vendor/composer/autoload_psr4.php @@ -0,0 +1,55 @@ + array($vendorDir . '/yupoxiong/region/src'), + 'think\\migration\\' => array($vendorDir . '/topthink/think-migration/src'), + 'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'), + 'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'), + 'app\\' => array($baseDir . '/application'), + 'Zxing\\' => array($vendorDir . '/khanamiryan/qrcode-detector-decoder/lib'), + 'Symfony\\Polyfill\\Php72\\' => array($vendorDir . '/symfony/polyfill-php72'), + 'Symfony\\Polyfill\\Mbstring\\' => array($vendorDir . '/symfony/polyfill-mbstring'), + 'Symfony\\Polyfill\\Intl\\Idn\\' => array($vendorDir . '/symfony/polyfill-intl-idn'), + 'Symfony\\Polyfill\\Ctype\\' => array($vendorDir . '/symfony/polyfill-ctype'), + 'Symfony\\Contracts\\Service\\' => array($vendorDir . '/symfony/service-contracts'), + 'Symfony\\Contracts\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher-contracts'), + 'Symfony\\Contracts\\Cache\\' => array($vendorDir . '/symfony/cache-contracts'), + 'Symfony\\Component\\VarExporter\\' => array($vendorDir . '/symfony/var-exporter'), + 'Symfony\\Component\\PropertyAccess\\' => array($vendorDir . '/symfony/property-access'), + 'Symfony\\Component\\OptionsResolver\\' => array($vendorDir . '/symfony/options-resolver'), + 'Symfony\\Component\\Mime\\' => array($vendorDir . '/symfony/mime'), + 'Symfony\\Component\\Inflector\\' => array($vendorDir . '/symfony/inflector'), + 'Symfony\\Component\\HttpFoundation\\' => array($vendorDir . '/symfony/http-foundation'), + 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), + 'Symfony\\Component\\Cache\\' => array($vendorDir . '/symfony/cache'), + 'Symfony\\Bridge\\PsrHttpMessage\\' => array($vendorDir . '/symfony/psr-http-message-bridge'), + 'Psr\\SimpleCache\\' => array($vendorDir . '/psr/simple-cache/src'), + 'Psr\\Log\\' => array($vendorDir . '/psr/log/Psr/Log'), + 'Psr\\Http\\Message\\' => array($vendorDir . '/psr/http-message/src'), + 'Psr\\Container\\' => array($vendorDir . '/psr/container/src'), + 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), + 'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'), + 'Phinx\\' => array($vendorDir . '/topthink/think-migration/phinx/src/Phinx'), + 'PHPMailer\\PHPMailer\\' => array($vendorDir . '/phpmailer/phpmailer/src'), + 'Overtrue\\Socialite\\' => array($vendorDir . '/overtrue/socialite/src'), + 'Overtrue\\EasySms\\' => array($vendorDir . '/overtrue/easy-sms/src'), + 'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'), + 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), + 'Matrix\\' => array($vendorDir . '/markbaker/matrix/classes/src'), + 'Lcobucci\\JWT\\' => array($vendorDir . '/lcobucci/jwt/src'), + 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), + 'GuzzleHttp\\Promise\\' => array($vendorDir . '/guzzlehttp/promises/src'), + 'GuzzleHttp\\' => array($vendorDir . '/guzzlehttp/guzzle/src'), + 'Endroid\\QrCode\\' => array($vendorDir . '/endroid/qr-code/src'), + 'Endroid\\Installer\\' => array($vendorDir . '/endroid/installer/src'), + 'EasyWeChat\\' => array($vendorDir . '/overtrue/wechat/src'), + 'EasyWeChatComposer\\' => array($vendorDir . '/easywechat-composer/easywechat-composer/src'), + 'DASPRiD\\Enum\\' => array($vendorDir . '/dasprid/enum/src'), + 'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'), + 'BaconQrCode\\' => array($vendorDir . '/bacon/bacon-qr-code/src'), +); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php new file mode 100755 index 0000000..7bc4107 --- /dev/null +++ b/vendor/composer/autoload_real.php @@ -0,0 +1,70 @@ += 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); + if ($useStaticLoader) { + require_once __DIR__ . '/autoload_static.php'; + + call_user_func(\Composer\Autoload\ComposerStaticInit7e68bde2142cd9815efd550fabe17383::getInitializer($loader)); + } else { + $map = require __DIR__ . '/autoload_namespaces.php'; + foreach ($map as $namespace => $path) { + $loader->set($namespace, $path); + } + + $map = require __DIR__ . '/autoload_psr4.php'; + foreach ($map as $namespace => $path) { + $loader->setPsr4($namespace, $path); + } + + $classMap = require __DIR__ . '/autoload_classmap.php'; + if ($classMap) { + $loader->addClassMap($classMap); + } + } + + $loader->register(true); + + if ($useStaticLoader) { + $includeFiles = Composer\Autoload\ComposerStaticInit7e68bde2142cd9815efd550fabe17383::$files; + } else { + $includeFiles = require __DIR__ . '/autoload_files.php'; + } + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire7e68bde2142cd9815efd550fabe17383($fileIdentifier, $file); + } + + return $loader; + } +} + +function composerRequire7e68bde2142cd9815efd550fabe17383($fileIdentifier, $file) +{ + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } +} diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php new file mode 100755 index 0000000..a1a1728 --- /dev/null +++ b/vendor/composer/autoload_static.php @@ -0,0 +1,380 @@ + __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', + '25072dd6e2470089de65ae7bf11d3109' => __DIR__ . '/..' . '/symfony/polyfill-php72/bootstrap.php', + 'f598d06aa772fa33d905e87be6398fb1' => __DIR__ . '/..' . '/symfony/polyfill-intl-idn/bootstrap.php', + '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', + 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', + 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', + '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', + '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php', + 'a9ed0d27b5a698798a89181429f162c5' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php', + '9d8e013a5160a09477beb8e44f8ae97b' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/adjoint.php', + '6e78d1bdea6248d6aa117229efae50f2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/antidiagonal.php', + '4623d87924d94f5412fe5afbf1cef31d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/cofactors.php', + '901fd1f6950a637ca85f66b701a45e13' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/determinant.php', + '83057abc0e4acc99ba80154ee5d02a49' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/diagonal.php', + '07b7fd7a434451149b4fd477fca0ce06' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/identity.php', + 'c8d43b340583e07ae89f2a3baef2cf89' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/inverse.php', + '499bb10ed7a3aee2ba4c09a31a85e8d1' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/minors.php', + '1cad2e6414d652e8b1c64e8967f6f37d' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/trace.php', + '95a7f134ac17161d07def442b3b737e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/functions/transpose.php', + 'b3a6bc628377118d4b4b8ba08d1eb949' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/add.php', + '5fef6d0e407f3f8887266dfa4a6c534c' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/directsum.php', + '684ba247e1385946e3babdaa054119de' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/subtract.php', + 'aa53dcba601214d17ad405b7c291b7e8' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/multiply.php', + '75c79eb1b25749b05a47976f32b0d8a2' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideby.php', + '6ab8ad87a734f276a6bcd5a0fe1289be' => __DIR__ . '/..' . '/markbaker/matrix/classes/src/operations/divideinto.php', + 'abede361264e2ae69ec1eee813a101af' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/abs.php', + '21a5860fbef5be28db5ddfbc3cca67c4' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acos.php', + '1546e3f9d127f2a9bb2d1b6c31c26ef1' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acosh.php', + 'd2516f7f4fba5ea5905f494b4a8262e0' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acot.php', + '4511163d560956219b96882c0980b65e' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acoth.php', + 'c361f5616dc2a8da4fa3e137077cd4ea' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acsc.php', + '02d68920fc98da71991ce569c91df0f6' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/acsch.php', + '88e19525eae308b4a6aa3419364875d3' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/argument.php', + '60e8e2d0827b58bfc904f13957e51849' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asec.php', + '13d2f040713999eab66c359b4d79871d' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asech.php', + '838ab38beb32c68a79d3cd2c007d5a04' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asin.php', + 'bb28eccd0f8f008333a1b3c163d604ac' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/asinh.php', + '9e483de83558c98f7d3feaa402c78cb3' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/atan.php', + '36b74b5b765ded91ee58c8ee3c0e85e3' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/atanh.php', + '05c15ee9510da7fd6bf6136f436500c0' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/conjugate.php', + 'd3208dfbce2505e370788f9f22f6785f' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/cos.php', + '141cf1fb3a3046f8b64534b0ebab33ca' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/cosh.php', + 'be660df75fd0dbe7fa7c03b7434b3294' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/cot.php', + '01e31ea298a51bc9e91517e3ce6b9e76' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/coth.php', + '803ddd97f7b1da68982a7b087c3476f6' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/csc.php', + '3001cdfd101ec3c32da34ee43c2e149b' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/csch.php', + '77b2d7629ef2a93fabb8c56754a91051' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/exp.php', + '4a4471296dec796c21d4f4b6552396a9' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/inverse.php', + 'c3e9897e1744b88deb56fcdc39d34d85' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/ln.php', + 'a83cacf2de942cff288de15a83afd26d' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/log2.php', + '6a861dacc9ee2f3061241d4c7772fa21' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/log10.php', + '4d2522d968c8ba78d6c13548a1b4200e' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/negative.php', + 'fd587ca933fc0447fa5ab4843bdd97f7' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/pow.php', + '383ef01c62028fc78cd4388082fce3c2' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/rho.php', + '150fbd1b95029dc47292da97ecab9375' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sec.php', + '549abd9bae174286d660bdaa07407c68' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sech.php', + '6bfbf5eaea6b17a0ed85cb21ba80370c' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sin.php', + '22efe13f1a497b8e199540ae2d9dc59c' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sinh.php', + 'e90135ab8e787795a509ed7147de207d' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/sqrt.php', + 'bb0a7923ffc6a90919cd64ec54ff06bc' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/tan.php', + '2d302f32ce0fd4e433dd91c5bb404a28' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/tanh.php', + '24dd4658a952171a4ee79218c4f9fd06' => __DIR__ . '/..' . '/markbaker/complex/classes/src/functions/theta.php', + 'e49b7876281d6f5bc39536dde96d1f4a' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/add.php', + '47596e02b43cd6da7700134fd08f88cf' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/subtract.php', + '883af48563631547925fa4c3b48ead07' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/multiply.php', + 'f190e3308e6ca23234a2875edc985c03' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideby.php', + 'ac9e33ce6841aa5bf5d16d465a2f03a7' => __DIR__ . '/..' . '/markbaker/complex/classes/src/operations/divideinto.php', + 'f0e7e63bbb278a92db02393536748c5f' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Support/Helpers.php', + '6747f579ad6817f318cc3a7e7a0abb93' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Helpers.php', + '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php', + 'ddc3cd2a04224f9638c5d0de6a69c7e3' => __DIR__ . '/..' . '/topthink/think-migration/src/config.php', + ); + + public static $prefixLengthsPsr4 = array ( + 'y' => + array ( + 'yupoxiong\\region\\' => 17, + ), + 't' => + array ( + 'think\\migration\\' => 16, + 'think\\composer\\' => 15, + 'think\\captcha\\' => 14, + ), + 'a' => + array ( + 'app\\' => 4, + ), + 'Z' => + array ( + 'Zxing\\' => 6, + ), + 'S' => + array ( + 'Symfony\\Polyfill\\Php72\\' => 23, + 'Symfony\\Polyfill\\Mbstring\\' => 26, + 'Symfony\\Polyfill\\Intl\\Idn\\' => 26, + 'Symfony\\Polyfill\\Ctype\\' => 23, + 'Symfony\\Contracts\\Service\\' => 26, + 'Symfony\\Contracts\\EventDispatcher\\' => 34, + 'Symfony\\Contracts\\Cache\\' => 24, + 'Symfony\\Component\\VarExporter\\' => 30, + 'Symfony\\Component\\PropertyAccess\\' => 33, + 'Symfony\\Component\\OptionsResolver\\' => 34, + 'Symfony\\Component\\Mime\\' => 23, + 'Symfony\\Component\\Inflector\\' => 28, + 'Symfony\\Component\\HttpFoundation\\' => 33, + 'Symfony\\Component\\EventDispatcher\\' => 34, + 'Symfony\\Component\\Cache\\' => 24, + 'Symfony\\Bridge\\PsrHttpMessage\\' => 30, + ), + 'P' => + array ( + 'Psr\\SimpleCache\\' => 16, + 'Psr\\Log\\' => 8, + 'Psr\\Http\\Message\\' => 17, + 'Psr\\Container\\' => 14, + 'Psr\\Cache\\' => 10, + 'PhpOffice\\PhpSpreadsheet\\' => 25, + 'Phinx\\' => 6, + 'PHPMailer\\PHPMailer\\' => 20, + ), + 'O' => + array ( + 'Overtrue\\Socialite\\' => 19, + 'Overtrue\\EasySms\\' => 17, + ), + 'M' => + array ( + 'MyCLabs\\Enum\\' => 13, + 'Monolog\\' => 8, + 'Matrix\\' => 7, + ), + 'L' => + array ( + 'Lcobucci\\JWT\\' => 13, + ), + 'G' => + array ( + 'GuzzleHttp\\Psr7\\' => 16, + 'GuzzleHttp\\Promise\\' => 19, + 'GuzzleHttp\\' => 11, + ), + 'E' => + array ( + 'Endroid\\QrCode\\' => 15, + 'Endroid\\Installer\\' => 18, + 'EasyWeChat\\' => 11, + 'EasyWeChatComposer\\' => 19, + ), + 'D' => + array ( + 'DASPRiD\\Enum\\' => 13, + ), + 'C' => + array ( + 'Complex\\' => 8, + ), + 'B' => + array ( + 'BaconQrCode\\' => 12, + ), + ); + + public static $prefixDirsPsr4 = array ( + 'yupoxiong\\region\\' => + array ( + 0 => __DIR__ . '/..' . '/yupoxiong/region/src', + ), + 'think\\migration\\' => + array ( + 0 => __DIR__ . '/..' . '/topthink/think-migration/src', + ), + 'think\\composer\\' => + array ( + 0 => __DIR__ . '/..' . '/topthink/think-installer/src', + ), + 'think\\captcha\\' => + array ( + 0 => __DIR__ . '/..' . '/topthink/think-captcha/src', + ), + 'app\\' => + array ( + 0 => __DIR__ . '/../..' . '/application', + ), + 'Zxing\\' => + array ( + 0 => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib', + ), + 'Symfony\\Polyfill\\Php72\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-php72', + ), + 'Symfony\\Polyfill\\Mbstring\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-mbstring', + ), + 'Symfony\\Polyfill\\Intl\\Idn\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-intl-idn', + ), + 'Symfony\\Polyfill\\Ctype\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/polyfill-ctype', + ), + 'Symfony\\Contracts\\Service\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/service-contracts', + ), + 'Symfony\\Contracts\\EventDispatcher\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/event-dispatcher-contracts', + ), + 'Symfony\\Contracts\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/cache-contracts', + ), + 'Symfony\\Component\\VarExporter\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/var-exporter', + ), + 'Symfony\\Component\\PropertyAccess\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/property-access', + ), + 'Symfony\\Component\\OptionsResolver\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/options-resolver', + ), + 'Symfony\\Component\\Mime\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/mime', + ), + 'Symfony\\Component\\Inflector\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/inflector', + ), + 'Symfony\\Component\\HttpFoundation\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/http-foundation', + ), + 'Symfony\\Component\\EventDispatcher\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/event-dispatcher', + ), + 'Symfony\\Component\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/cache', + ), + 'Symfony\\Bridge\\PsrHttpMessage\\' => + array ( + 0 => __DIR__ . '/..' . '/symfony/psr-http-message-bridge', + ), + 'Psr\\SimpleCache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/simple-cache/src', + ), + 'Psr\\Log\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/log/Psr/Log', + ), + 'Psr\\Http\\Message\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/http-message/src', + ), + 'Psr\\Container\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/container/src', + ), + 'Psr\\Cache\\' => + array ( + 0 => __DIR__ . '/..' . '/psr/cache/src', + ), + 'PhpOffice\\PhpSpreadsheet\\' => + array ( + 0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet', + ), + 'Phinx\\' => + array ( + 0 => __DIR__ . '/..' . '/topthink/think-migration/phinx/src/Phinx', + ), + 'PHPMailer\\PHPMailer\\' => + array ( + 0 => __DIR__ . '/..' . '/phpmailer/phpmailer/src', + ), + 'Overtrue\\Socialite\\' => + array ( + 0 => __DIR__ . '/..' . '/overtrue/socialite/src', + ), + 'Overtrue\\EasySms\\' => + array ( + 0 => __DIR__ . '/..' . '/overtrue/easy-sms/src', + ), + 'MyCLabs\\Enum\\' => + array ( + 0 => __DIR__ . '/..' . '/myclabs/php-enum/src', + ), + 'Monolog\\' => + array ( + 0 => __DIR__ . '/..' . '/monolog/monolog/src/Monolog', + ), + 'Matrix\\' => + array ( + 0 => __DIR__ . '/..' . '/markbaker/matrix/classes/src', + ), + 'Lcobucci\\JWT\\' => + array ( + 0 => __DIR__ . '/..' . '/lcobucci/jwt/src', + ), + 'GuzzleHttp\\Psr7\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/psr7/src', + ), + 'GuzzleHttp\\Promise\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/promises/src', + ), + 'GuzzleHttp\\' => + array ( + 0 => __DIR__ . '/..' . '/guzzlehttp/guzzle/src', + ), + 'Endroid\\QrCode\\' => + array ( + 0 => __DIR__ . '/..' . '/endroid/qr-code/src', + ), + 'Endroid\\Installer\\' => + array ( + 0 => __DIR__ . '/..' . '/endroid/installer/src', + ), + 'EasyWeChat\\' => + array ( + 0 => __DIR__ . '/..' . '/overtrue/wechat/src', + ), + 'EasyWeChatComposer\\' => + array ( + 0 => __DIR__ . '/..' . '/easywechat-composer/easywechat-composer/src', + ), + 'DASPRiD\\Enum\\' => + array ( + 0 => __DIR__ . '/..' . '/dasprid/enum/src', + ), + 'Complex\\' => + array ( + 0 => __DIR__ . '/..' . '/markbaker/complex/classes/src', + ), + 'BaconQrCode\\' => + array ( + 0 => __DIR__ . '/..' . '/bacon/bacon-qr-code/src', + ), + ); + + public static $prefixesPsr0 = array ( + 'P' => + array ( + 'Pimple' => + array ( + 0 => __DIR__ . '/..' . '/pimple/pimple/src', + ), + ), + ); + + public static function getInitializer(ClassLoader $loader) + { + return \Closure::bind(function () use ($loader) { + $loader->prefixLengthsPsr4 = ComposerStaticInit7e68bde2142cd9815efd550fabe17383::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit7e68bde2142cd9815efd550fabe17383::$prefixDirsPsr4; + $loader->prefixesPsr0 = ComposerStaticInit7e68bde2142cd9815efd550fabe17383::$prefixesPsr0; + + }, null, ClassLoader::class); + } +} diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json new file mode 100755 index 0000000..170a1fc --- /dev/null +++ b/vendor/composer/installed.json @@ -0,0 +1,3029 @@ +[ + { + "name": "bacon/bacon-qr-code", + "version": "2.0.0", + "version_normalized": "2.0.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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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" + }, + "time": "2018-04-25T17:53:56+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "BaconQrCode\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "role": "Developer", + "email": "mail@dasprids.de", + "homepage": "http://www.dasprids.de" + } + ], + "description": "BaconQrCode is a QR code generator for PHP.", + "homepage": "https://github.com/Bacon/BaconQrCode" + }, + { + "name": "dasprid/enum", + "version": "1.0.0", + "version_normalized": "1.0.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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require-dev": { + "phpunit/phpunit": "^6.4", + "squizlabs/php_codesniffer": "^3.1" + }, + "time": "2017-10-25T22:45:27+00:00", + "type": "library", + "installation-source": "dist", + "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" + ] + }, + { + "name": "easywechat-composer/easywechat-composer", + "version": "1.1.6", + "version_normalized": "1.1.6.0", + "source": { + "type": "git", + "url": "https://github.com/mingyoung/easywechat-composer.git", + "reference": "970144fd245e62869edd60db6cc477053219d891" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mingyoung/easywechat-composer/zipball/970144fd245e62869edd60db6cc477053219d891", + "reference": "970144fd245e62869edd60db6cc477053219d891", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "composer-plugin-api": "^1.0", + "php": ">=7.0" + }, + "require-dev": { + "composer/composer": "^1.0", + "phpunit/phpunit": "^6.5 || ^7.0" + }, + "time": "2019-02-22T07:59:50+00:00", + "type": "composer-plugin", + "extra": { + "class": "EasyWeChatComposer\\Plugin" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "EasyWeChatComposer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "张铭阳", + "email": "mingyoungcheung@gmail.com" + } + ], + "description": "The composer plugin for EasyWeChat" + }, + { + "name": "endroid/installer", + "version": "1.1.5", + "version_normalized": "1.1.5.0", + "source": { + "type": "git", + "url": "https://github.com/endroid/installer.git", + "reference": "d4ae2bbd7977148dcb514ad625ece1a36f751a8b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/installer/zipball/d4ae2bbd7977148dcb514ad625ece1a36f751a8b", + "reference": "d4ae2bbd7977148dcb514ad625ece1a36f751a8b", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "composer-plugin-api": "^1.1", + "php": ">=7.2" + }, + "time": "2019-03-30T21:42:01+00:00", + "type": "composer-plugin", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "class": "Endroid\\Installer\\Installer" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Endroid\\Installer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ] + }, + { + "name": "endroid/qr-code", + "version": "3.6.1", + "version_normalized": "3.6.1.0", + "source": { + "type": "git", + "url": "https://github.com/endroid/qr-code.git", + "reference": "15641eec67291c6404b612694f65345c84a79919" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/endroid/qr-code/zipball/15641eec67291c6404b612694f65345c84a79919", + "reference": "15641eec67291c6404b612694f65345c84a79919", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "bacon/bacon-qr-code": "^2.0", + "endroid/installer": "^1.1.5", + "ext-gd": "*", + "khanamiryan/qrcode-detector-decoder": "^1.0.2", + "myclabs/php-enum": "^1.5", + "php": ">=7.2", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/options-resolver": "^3.4|^4.0", + "symfony/property-access": "^3.4|^4.0" + }, + "require-dev": { + "endroid/test": "^1.1.4" + }, + "time": "2019-05-25T20:13:40+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.3", + "version_normalized": "6.3.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "time": "2018-04-22T15:46:56+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "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" + ] + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "version_normalized": "1.3.1.0", + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "time": "2016-12-20T10:07:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "guzzlehttp/psr7", + "version": "1.6.1", + "version_normalized": "1.6.1.0", + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "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" + }, + "time": "2019-07-01T23:21:34+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "khanamiryan/qrcode-detector-decoder", + "version": "1.0.2", + "version_normalized": "1.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/khanamiryan/php-qrcode-detector-decoder.git", + "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/a75482d3bc804e3f6702332bfda6cccbb0dfaa76", + "reference": "a75482d3bc804e3f6702332bfda6cccbb0dfaa76", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "time": "2018-04-26T11:41:33+00:00", + "type": "library", + "installation-source": "dist", + "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" + ] + }, + { + "name": "lcobucci/jwt", + "version": "3.3.1", + "version_normalized": "3.3.1.0", + "source": { + "type": "git", + "url": "https://github.com/lcobucci/jwt.git", + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "reference": "a11ec5f4b4d75d1fcd04e133dede4c317aac9e18", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-mbstring": "*", + "ext-openssl": "*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "mikey179/vfsstream": "~1.5", + "phpmd/phpmd": "~2.2", + "phpunit/php-invoker": "~1.1", + "phpunit/phpunit": "^5.7 || ^7.3", + "squizlabs/php_codesniffer": "~2.3" + }, + "time": "2019-05-24T18:30:49+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Luís Otávio Cobucci Oblonczyk", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "keywords": [ + "JWS", + "jwt" + ] + }, + { + "name": "markbaker/complex", + "version": "1.4.7", + "version_normalized": "1.4.7.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPComplex.git", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPComplex/zipball/1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "reference": "1ea674a8308baf547cbcbd30c5fcd6d301b7c000", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "time": "2018-10-13T23:28:42+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with complex numbers", + "homepage": "https://github.com/MarkBaker/PHPComplex", + "keywords": [ + "complex", + "mathematics" + ] + }, + { + "name": "markbaker/matrix", + "version": "1.1.4", + "version_normalized": "1.1.4.0", + "source": { + "type": "git", + "url": "https://github.com/MarkBaker/PHPMatrix.git", + "reference": "6ea97472b5baf12119b4f31f802835b820dd6d64" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/MarkBaker/PHPMatrix/zipball/6ea97472b5baf12119b4f31f802835b820dd6d64", + "reference": "6ea97472b5baf12119b4f31f802835b820dd6d64", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3", + "phpcompatibility/php-compatibility": "^8.0", + "phpdocumentor/phpdocumentor": "2.*", + "phploc/phploc": "2.*", + "phpmd/phpmd": "2.*", + "phpunit/phpunit": "^4.8.35|^5.4.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "^3.3.0" + }, + "time": "2018-11-04T22:12:12+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "description": "PHP Class for working with matrices", + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "keywords": [ + "mathematics", + "matrix", + "vector" + ] + }, + { + "name": "monolog/monolog", + "version": "1.24.0", + "version_normalized": "1.24.0.0", + "source": { + "type": "git", + "url": "https://github.com/Seldaek/monolog.git", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "reference": "bfc9ebb28f97e7a24c45bdc3f0ff482e47bb0266", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "require-dev": { + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "doctrine/couchdb": "~1.0@dev", + "graylog2/gelf-php": "~1.0", + "jakub-onderka/php-parallel-lint": "0.9", + "php-amqplib/php-amqplib": "~2.4", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit": "~4.5", + "phpunit/phpunit-mock-objects": "2.3.0", + "ruflin/elastica": ">=0.90 <3.0", + "sentry/sentry": "^0.13", + "swiftmailer/swiftmailer": "^5.3|^6.0" + }, + "suggest": { + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "php-console/php-console": "Allow sending log messages to Google Chrome", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "sentry/sentry": "Allow sending log messages to a Sentry server" + }, + "time": "2018-11-05T09:00:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Monolog\\": "src/Monolog" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "homepage": "http://github.com/Seldaek/monolog", + "keywords": [ + "log", + "logging", + "psr-3" + ] + }, + { + "name": "myclabs/php-enum", + "version": "1.7.2", + "version_normalized": "1.7.2.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/php-enum.git", + "reference": "45f01adf6922df6082bcda36619deb466e826acf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/45f01adf6922df6082bcda36619deb466e826acf", + "reference": "45f01adf6922df6082bcda36619deb466e826acf", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-json": "*", + "php": ">=7.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.7|^6.0", + "squizlabs/php_codesniffer": "1.*" + }, + "time": "2019-08-19T13:53:00+00:00", + "type": "library", + "installation-source": "dist", + "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" + ] + }, + { + "name": "overtrue/easy-sms", + "version": "1.1.15", + "version_normalized": "1.1.15.0", + "source": { + "type": "git", + "url": "https://github.com/overtrue/easy-sms.git", + "reference": "b2e7d5bbafb68c27bb767a4ea7c7742b358fcc71" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/overtrue/easy-sms/zipball/b2e7d5bbafb68c27bb767a4ea7c7742b358fcc71", + "reference": "b2e7d5bbafb68c27bb767a4ea7c7742b358fcc71", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/guzzle": "^6.2", + "php": ">=5.6" + }, + "require-dev": { + "mockery/mockery": "1.2.2", + "phpunit/phpunit": "^5.7 || ^7.5" + }, + "time": "2019-08-01T10:35:17+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Overtrue\\EasySms\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "overtrue", + "email": "i@overtrue.me" + } + ], + "description": "The easiest way to send short message." + }, + { + "name": "overtrue/socialite", + "version": "2.0.11", + "version_normalized": "2.0.11.0", + "source": { + "type": "git", + "url": "https://github.com/overtrue/socialite.git", + "reference": "cfc513bbf5fb8c1761e8127eb9427ab05cb4ea10" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/overtrue/socialite/zipball/cfc513bbf5fb8c1761e8127eb9427ab05cb4ea10", + "reference": "cfc513bbf5fb8c1761e8127eb9427ab05cb4ea10", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "guzzlehttp/guzzle": "~5.0|~6.0", + "php": ">=7.0", + "symfony/http-foundation": "^2.7|^3.0|^4.0" + }, + "require-dev": { + "mockery/mockery": "~1.2", + "phpunit/phpunit": "~6" + }, + "time": "2019-07-05T14:42:52+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Overtrue\\Socialite\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ], + "description": "A collection of OAuth 2 packages that extracts from laravel/socialite.", + "keywords": [ + "login", + "oauth", + "qq", + "social", + "wechat", + "weibo" + ] + }, + { + "name": "overtrue/wechat", + "version": "4.2.2", + "version_normalized": "4.2.2.0", + "source": { + "type": "git", + "url": "https://github.com/overtrue/wechat.git", + "reference": "e487edc44f9a3d26603bc3c153c087dd2cacd0b0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/overtrue/wechat/zipball/e487edc44f9a3d26603bc3c153c087dd2cacd0b0", + "reference": "e487edc44f9a3d26603bc3c153c087dd2cacd0b0", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "easywechat-composer/easywechat-composer": "^1.1", + "ext-fileinfo": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.2", + "monolog/monolog": "^1.22", + "overtrue/socialite": "~2.0", + "php": ">=7.1", + "pimple/pimple": "^3.0", + "psr/simple-cache": "^1.0", + "symfony/cache": "^3.3 || ^4.3", + "symfony/event-dispatcher": "^4.3", + "symfony/http-foundation": "^2.7 || ^3.0 || ^4.0", + "symfony/psr-http-message-bridge": "^0.3 || ^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.15", + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.0", + "phpstan/phpstan": "^0.11.12", + "phpunit/phpunit": "~6.5" + }, + "time": "2019-08-16T10:24:45+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "EasyWeChat\\": "src/" + }, + "files": [ + "src/Kernel/Support/Helpers.php", + "src/Kernel/Helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ], + "description": "微信SDK", + "keywords": [ + "sdk", + "wechat", + "weixin", + "weixin-sdk" + ] + }, + { + "name": "phpmailer/phpmailer", + "version": "v6.0.7", + "version_normalized": "6.0.7.0", + "source": { + "type": "git", + "url": "https://github.com/PHPMailer/PHPMailer.git", + "reference": "0c41a36d4508d470e376498c1c0c527aa36a2d59" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/0c41a36d4508d470e376498c1c0c527aa36a2d59", + "reference": "0c41a36d4508d470e376498c1c0c527aa36a2d59", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-ctype": "*", + "ext-filter": "*", + "php": ">=5.5.0" + }, + "require-dev": { + "doctrine/annotations": "1.2.*", + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3", + "zendframework/zend-serializer": "2.7.*" + }, + "suggest": { + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "psr/log": "For optional PSR-3 debug logging", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "time": "2019-02-01T15:04:28+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1" + ], + "authors": [ + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "description": "PHPMailer is a full-featured email creation and transfer class for PHP" + }, + { + "name": "phpoffice/phpspreadsheet", + "version": "1.9.0", + "version_normalized": "1.9.0.0", + "source": { + "type": "git", + "url": "https://github.com/PHPOffice/PhpSpreadsheet.git", + "reference": "8dea03eaf60a349b6097e4bcad11f894668280df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/PHPOffice/PhpSpreadsheet/zipball/8dea03eaf60a349b6097e4bcad11f894668280df", + "reference": "8dea03eaf60a349b6097e4bcad11f894668280df", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-fileinfo": "*", + "ext-gd": "*", + "ext-iconv": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-simplexml": "*", + "ext-xml": "*", + "ext-xmlreader": "*", + "ext-xmlwriter": "*", + "ext-zip": "*", + "ext-zlib": "*", + "markbaker/complex": "^1.4", + "markbaker/matrix": "^1.1", + "php": "^7.1", + "psr/simple-cache": "^1.0" + }, + "require-dev": { + "dompdf/dompdf": "^0.8.0", + "friendsofphp/php-cs-fixer": "@stable", + "jpgraph/jpgraph": "^4.0", + "mpdf/mpdf": "^7.0.0", + "phpcompatibility/php-compatibility": "^8.0", + "phpunit/phpunit": "^7.5", + "squizlabs/php_codesniffer": "^3.3", + "tecnickcom/tcpdf": "^6.2" + }, + "suggest": { + "dompdf/dompdf": "Option for rendering PDF with PDF Writer", + "jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers", + "mpdf/mpdf": "Option for rendering PDF with PDF Writer", + "tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer" + }, + "time": "2019-08-17T22:24:35+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "PhpOffice\\PhpSpreadsheet\\": "src/PhpSpreadsheet" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "LGPL-2.1-or-later" + ], + "authors": [ + { + "name": "Maarten Balliauw", + "homepage": "https://blog.maartenballiauw.be" + }, + { + "name": "Mark Baker", + "homepage": "https://markbakeruk.net" + }, + { + "name": "Franck Lefevre", + "homepage": "https://rootslabs.net" + }, + { + "name": "Erik Tilt" + }, + { + "name": "Adrien Crivelli" + } + ], + "description": "PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine", + "homepage": "https://github.com/PHPOffice/PhpSpreadsheet", + "keywords": [ + "OpenXML", + "excel", + "gnumeric", + "ods", + "php", + "spreadsheet", + "xls", + "xlsx" + ] + }, + { + "name": "pimple/pimple", + "version": "v3.2.3", + "version_normalized": "3.2.3.0", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Pimple.git", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/9e403941ef9d65d20cba7d54e29fe906db42cf32", + "reference": "9e403941ef9d65d20cba7d54e29fe906db42cf32", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0", + "psr/container": "^1.0" + }, + "require-dev": { + "symfony/phpunit-bridge": "^3.2" + }, + "time": "2018-01-21T07:42:36+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Pimple": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Pimple, a simple Dependency Injection Container", + "homepage": "http://pimple.sensiolabs.org", + "keywords": [ + "container", + "dependency injection" + ] + }, + { + "name": "psr/cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T20:24:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "psr/container", + "version": "1.0.0", + "version_normalized": "1.0.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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-02-14T16:28:37+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2016-08-06T14:39:51+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "psr/log", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2018-11-20T15:27:04+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.0" + }, + "time": "2017-10-23T01:57:42+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "version_normalized": "3.0.3.0", + "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": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "time": "2019-03-08T08:55:37+00:00", + "type": "library", + "installation-source": "dist", + "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." + }, + { + "name": "symfony/cache", + "version": "v4.3.4", + "version_normalized": "4.3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "1d8f7fee990c586f275cde1a9fc883d6b1e2d43e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/1d8f7fee990c586f275cde1a9fc883d6b1e2d43e", + "reference": "1d8f7fee990c586f275cde1a9fc883d6b1e2d43e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "psr/cache": "~1.0", + "psr/log": "~1.0", + "symfony/cache-contracts": "^1.1", + "symfony/service-contracts": "^1.1", + "symfony/var-exporter": "^4.2" + }, + "conflict": { + "doctrine/dbal": "<2.5", + "symfony/dependency-injection": "<3.4", + "symfony/var-dumper": "<3.4" + }, + "provide": { + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0", + "symfony/cache-implementation": "1.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/cache": "~1.6", + "doctrine/dbal": "~2.5", + "predis/predis": "~1.1", + "psr/simple-cache": "^1.0", + "symfony/config": "~4.2", + "symfony/dependency-injection": "~3.4|~4.1", + "symfony/var-dumper": "^4.1.1" + }, + "time": "2019-08-26T08:26:39+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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 Cache component with PSR-6, PSR-16, and tags", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ] + }, + { + "name": "symfony/cache-contracts", + "version": "v1.1.5", + "version_normalized": "1.1.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "ec5524b669744b5f1dc9c66d3c2b091eb7e7f0db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/ec5524b669744b5f1dc9c66d3c2b091eb7e7f0db", + "reference": "ec5524b669744b5f1dc9c66d3c2b091eb7e7f0db", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "psr/cache": "^1.0" + }, + "suggest": { + "symfony/cache-implementation": "" + }, + "time": "2019-06-13T11:15:36+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Cache\\": "" + } + }, + "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": "Generic abstractions related to caching", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ] + }, + { + "name": "symfony/event-dispatcher", + "version": "v4.3.4", + "version_normalized": "4.3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "reference": "429d0a1451d4c9c4abe1959b2986b88794b9b7d2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/event-dispatcher-contracts": "^1.1" + }, + "conflict": { + "symfony/dependency-injection": "<3.4" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "1.1" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~3.4|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/expression-language": "~3.4|~4.0", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/service-contracts": "^1.1", + "symfony/stopwatch": "~3.4|~4.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "time": "2019-08-26T08:55:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "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 EventDispatcher Component", + "homepage": "https://symfony.com" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v1.1.5", + "version_normalized": "1.1.5.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "c61766f4440ca687de1084a5c00b08e167a2575c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c61766f4440ca687de1084a5c00b08e167a2575c", + "reference": "c61766f4440ca687de1084a5c00b08e167a2575c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3" + }, + "suggest": { + "psr/event-dispatcher": "", + "symfony/event-dispatcher-implementation": "" + }, + "time": "2019-06-20T06:46:26+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "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": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ] + }, + { + "name": "symfony/http-foundation", + "version": "v4.3.4", + "version_normalized": "4.3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/d804bea118ff340a12e22a79f9c7e7eb56b35adc", + "reference": "d804bea118ff340a12e22a79f9c7e7eb56b35adc", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/mime": "^4.3", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/expression-language": "~3.4|~4.0" + }, + "time": "2019-08-26T08:55:16+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "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" + }, + { + "name": "symfony/inflector", + "version": "v4.3.4", + "version_normalized": "4.3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/inflector.git", + "reference": "b25a8dc15fada858432efa083c1ecd2cef5991a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/inflector/zipball/b25a8dc15fada858432efa083c1ecd2cef5991a7", + "reference": "b25a8dc15fada858432efa083c1ecd2cef5991a7", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "time": "2019-08-06T18:44:23+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Inflector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Inflector Component", + "homepage": "https://symfony.com", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string", + "symfony", + "words" + ] + }, + { + "name": "symfony/mime", + "version": "v4.3.4", + "version_normalized": "4.3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/mime.git", + "reference": "987a05df1c6ac259b34008b932551353f4f408df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/mime/zipball/987a05df1c6ac259b34008b932551353f4f408df", + "reference": "987a05df1c6ac259b34008b932551353f4f408df", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/polyfill-intl-idn": "^1.10", + "symfony/polyfill-mbstring": "^1.0" + }, + "require-dev": { + "egulias/email-validator": "^2.1.10", + "symfony/dependency-injection": "~3.4|^4.1" + }, + "time": "2019-08-22T08:16:11+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "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" + ] + }, + { + "name": "symfony/options-resolver", + "version": "v4.3.4", + "version_normalized": "4.3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "81c2e120522a42f623233968244baebd6b36cb6a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/81c2e120522a42f623233968244baebd6b36cb6a", + "reference": "81c2e120522a42f623233968244baebd6b36cb6a", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3" + }, + "time": "2019-08-08T09:29:19+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "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 OptionsResolver Component", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ] + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.12.0", + "version_normalized": "1.12.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "time": "2019-08-06T08:03:45+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ] + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "v1.12.0", + "version_normalized": "1.12.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", + "reference": "6af626ae6fa37d396dc90a399c0ff08e5cfc45b2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php72": "^1.9" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "time": "2019-08-06T08:03:45+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ] + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.12.0", + "version_normalized": "1.12.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "reference": "b42a2f66e8f1b15ccf25652c3424265923eb4f17", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "time": "2019-08-06T08:03:45+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "symfony/polyfill-php72", + "version": "v1.12.0", + "version_normalized": "1.12.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "04ce3335667451138df4307d6a9b61565560199e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e", + "reference": "04ce3335667451138df4307d6a9b61565560199e", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.3.3" + }, + "time": "2019-08-06T08:03:45+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.12-dev" + } + }, + "installation-source": "dist", + "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" + ] + }, + { + "name": "symfony/property-access", + "version": "v4.3.4", + "version_normalized": "4.3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-access.git", + "reference": "bb0c302375ffeef60c31e72a4539611b7f787565" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-access/zipball/bb0c302375ffeef60c31e72a4539611b7f787565", + "reference": "bb0c302375ffeef60c31e72a4539611b7f787565", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "symfony/inflector": "~3.4|~4.0" + }, + "require-dev": { + "symfony/cache": "~3.4|~4.0" + }, + "suggest": { + "psr/cache-implementation": "To cache access methods." + }, + "time": "2019-08-26T08:26:39+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyAccess\\": "" + }, + "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 PropertyAccess Component", + "homepage": "https://symfony.com", + "keywords": [ + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property path", + "reflection" + ] + }, + { + "name": "symfony/psr-http-message-bridge", + "version": "v1.2.0", + "version_normalized": "1.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/psr-http-message-bridge.git", + "reference": "9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/psr-http-message-bridge/zipball/9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad", + "reference": "9ab9d71f97d5c7d35a121a7fb69f74fee95cd0ad", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1", + "psr/http-message": "^1.0", + "symfony/http-foundation": "^3.4 || ^4.0" + }, + "require-dev": { + "nyholm/psr7": "^1.1", + "symfony/phpunit-bridge": "^3.4.20 || ^4.0", + "zendframework/zend-diactoros": "^1.4.1 || ^2.0" + }, + "suggest": { + "nyholm/psr7": "For a super lightweight PSR-7/17 implementation" + }, + "time": "2019-03-11T18:22:33+00:00", + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\PsrHttpMessage\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "PSR HTTP message bridge", + "homepage": "http://symfony.com", + "keywords": [ + "http", + "http-message", + "psr-17", + "psr-7" + ] + }, + { + "name": "symfony/service-contracts", + "version": "v1.1.6", + "version_normalized": "1.1.6.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "reference": "ea7263d6b6d5f798b56a45a5b8d686725f2719a3", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3", + "psr/container": "^1.0" + }, + "suggest": { + "symfony/service-implementation": "" + }, + "time": "2019-08-20T14:44:19+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + } + }, + "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": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ] + }, + { + "name": "symfony/var-exporter", + "version": "v4.3.4", + "version_normalized": "4.3.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "d5b4e2d334c1d80e42876c7d489896cfd37562f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/d5b4e2d334c1d80e42876c7d489896cfd37562f2", + "reference": "d5b4e2d334c1d80e42876c7d489896cfd37562f2", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": "^7.1.3" + }, + "require-dev": { + "symfony/var-dumper": "^4.1.1" + }, + "time": "2019-08-22T07:33:08+00:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.3-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "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": "A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "serialize" + ] + }, + { + "name": "topthink/framework", + "version": "v5.1.38.1", + "version_normalized": "5.1.38.1", + "source": { + "type": "git", + "url": "https://github.com/top-think/framework.git", + "reference": "12d15c29d5d6a972fc8bfc8db005d64d4786028c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/framework/zipball/12d15c29d5d6a972fc8bfc8db005d64d4786028c", + "reference": "12d15c29d5d6a972fc8bfc8db005d64d4786028c", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6.0", + "topthink/think-installer": "2.*" + }, + "require-dev": { + "johnkary/phpunit-speedtrap": "^1.0", + "mikey179/vfsstream": "~1.6", + "phpdocumentor/reflection-docblock": "^2.0", + "phploc/phploc": "2.*", + "phpunit/phpunit": "^5.0|^6.0", + "sebastian/phpcpd": "2.*", + "squizlabs/php_codesniffer": "2.*" + }, + "time": "2019-08-12T00:58:30+00:00", + "type": "think-framework", + "installation-source": "dist", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "liu21st", + "email": "liu21st@gmail.com" + }, + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "description": "the new thinkphp framework", + "homepage": "http://thinkphp.cn/", + "keywords": [ + "framework", + "orm", + "thinkphp" + ] + }, + { + "name": "topthink/think-captcha", + "version": "v2.0.2", + "version_normalized": "2.0.2.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-captcha.git", + "reference": "54c8a51552f99ff9ea89ea9c272383a8f738ceee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-captcha/zipball/54c8a51552f99ff9ea89ea9c272383a8f738ceee", + "reference": "54c8a51552f99ff9ea89ea9c272383a8f738ceee", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "topthink/framework": "5.1.*" + }, + "time": "2017-12-31T16:37:49+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "think\\captcha\\": "src/" + }, + "files": [ + "src/helper.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ], + "description": "captcha package for thinkphp5" + }, + { + "name": "topthink/think-installer", + "version": "v2.0.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-installer.git", + "reference": "f5400a12c60e513911aef41fe443fa6920952675" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-installer/zipball/f5400a12c60e513911aef41fe443fa6920952675", + "reference": "f5400a12c60e513911aef41fe443fa6920952675", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "composer-plugin-api": "^1.0" + }, + "require-dev": { + "composer/composer": "1.0.*@dev" + }, + "time": "2018-05-11T06:45:42+00:00", + "type": "composer-plugin", + "extra": { + "class": "think\\composer\\Plugin" + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "think\\composer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ] + }, + { + "name": "topthink/think-migration", + "version": "v2.0.3", + "version_normalized": "2.0.3.0", + "source": { + "type": "git", + "url": "https://github.com/top-think/think-migration.git", + "reference": "70c89850ca29c2eab988c7c3475d1d5331901bb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/top-think/think-migration/zipball/70c89850ca29c2eab988c7c3475d1d5331901bb8", + "reference": "70c89850ca29c2eab988c7c3475d1d5331901bb8", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "topthink/framework": "5.1.*" + }, + "time": "2017-12-31T16:32:22+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Phinx\\": "phinx/src/Phinx", + "think\\migration\\": "src" + }, + "files": [ + "src/config.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yunwuxin", + "email": "448901948@qq.com" + } + ] + }, + { + "name": "yupoxiong/region", + "version": "v1.1.2", + "version_normalized": "1.1.2.0", + "source": { + "type": "git", + "url": "https://github.com/yupoxiong/region.git", + "reference": "13b241809f259bfd30444ab069d3028a7dd28160" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/yupoxiong/region/zipball/13b241809f259bfd30444ab069d3028a7dd28160", + "reference": "13b241809f259bfd30444ab069d3028a7dd28160", + "shasum": "", + "mirrors": [ + { + "url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%", + "preferred": true + } + ] + }, + "require": { + "php": ">=5.6" + }, + "time": "2019-08-07T03:15:09+00:00", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "yupoxiong\\region\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "yupoxiong", + "email": "i@yufuping.com", + "homepage": "https://www.yufuping.com" + } + ], + "description": "ThinkPHP省市区(县)街道四级联动扩展", + "homepage": "https://github.com/yupoxiong/region", + "keywords": [ + "region", + "thinkphp", + "省市区" + ] + } +] diff --git a/vendor/dasprid/enum/.coveralls.yml b/vendor/dasprid/enum/.coveralls.yml new file mode 100755 index 0000000..bc71b62 --- /dev/null +++ b/vendor/dasprid/enum/.coveralls.yml @@ -0,0 +1,2 @@ +coverage_clover: clover.xml +json_path: coveralls-upload.json diff --git a/vendor/dasprid/enum/.gitignore b/vendor/dasprid/enum/.gitignore new file mode 100755 index 0000000..5cf9a2c --- /dev/null +++ b/vendor/dasprid/enum/.gitignore @@ -0,0 +1,3 @@ +/composer.lock +/phpunit.xml +/vendor/ diff --git a/vendor/dasprid/enum/.travis.yml b/vendor/dasprid/enum/.travis.yml new file mode 100755 index 0000000..e4c6453 --- /dev/null +++ b/vendor/dasprid/enum/.travis.yml @@ -0,0 +1,41 @@ +sudo: false + +language: php + +cache: + directories: + - $HOME/.composer/cache + - $HOME/.local + - vendor + +matrix: + fast_finish: true + include: + - php: 7.1 + env: + - EXECUTE_CS_CHECK=true + - EXECUTE_TEST_COVERALLS=true + - PATH="$HOME/.local/bin:$PATH" + - php: nightly + allow_failures: + - php: nightly + +before_install: + - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi + - composer self-update + - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls:dev-master ; fi + +install: + - travis_retry composer install --no-interaction + - composer info -i + +script: + - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then vendor/bin/phpunit --coverage-clover clover.xml ; fi + - if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then vendor/bin/phpunit ; fi + - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then vendor/bin/phpcs ; fi + +after_script: + - if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then vendor/bin/coveralls ; fi + +notifications: + email: true diff --git a/vendor/dasprid/enum/README.md b/vendor/dasprid/enum/README.md new file mode 100755 index 0000000..9e9ca12 --- /dev/null +++ b/vendor/dasprid/enum/README.md @@ -0,0 +1,164 @@ +# PHP 7.1 enums + +[![Build Status](https://travis-ci.org/DASPRiD/Enum.svg?branch=master)](https://travis-ci.org/DASPRiD/Enum) +[![Coverage Status](https://coveralls.io/repos/github/DASPRiD/Enum/badge.svg?branch=master)](https://coveralls.io/github/DASPRiD/Enum?branch=master) +[![Latest Stable Version](https://poser.pugx.org/dasprid/enum/v/stable)](https://packagist.org/packages/dasprid/enum) +[![Total Downloads](https://poser.pugx.org/dasprid/enum/downloads)](https://packagist.org/packages/dasprid/enum) +[![License](https://poser.pugx.org/dasprid/enum/license)](https://packagist.org/packages/dasprid/enum) + +It is a well known fact that PHP is missing a basic enum type, ignoring the rather incomplete `SplEnum` implementation +which is only available as a PECL extension. There are also quite a few other userland enum implementations around, +but all of them have one or another compromise. This library tries to close that gap as far as PHP allows it to. + +## Usage + +### Basics + +At its core, there is the `DASPRiD\Enum\AbstractEnum` class, which by default will work with constants like any other +enum implementation you might know. The first clear difference is that you should define all the constants as protected +(so nobody outside your class can read them but the `AbstractEnum` can still do so). The other even mightier difference +is that, for simple enums, the value of the constant doesn't matter at all. Let's have a look at a simple example: + +```php +use DASPRiD\Enum\AbstractEnum; + +/** + * @method static self MONDAY() + * @method static self TUESDAY() + * @method static self WEDNESDAY() + * @method static self THURSDAY() + * @method static self FRIDAY() + * @method static self SATURDAY() + * @method static self SUNDAY() + */ +final class WeekDay extends AbstractEnum +{ + protected const MONDAY = null; + protected const TUESDAY = null; + protected const WEDNESDAY = null; + protected const THURSDAY = null; + protected const FRIDAY = null; + protected const SATURDAY = null; + protected const SUNDAY = null; +} +``` + +If you need to provide constants for either internal use or public use, you can mark them as either private or public, +in which case they will be ignored by the enum, which only considers protected constants as valid values. As you can +see, we specifically defined the generated magic methods in a class level doc block, so anyone using this class will +automatically have proper auto-completion in their IDE. Now since you have defined the enum, you can simply use it like +that: + +```php +function tellItLikeItIs(WeekDay $weekDay) +{ + switch ($weekDay) { + case WeekDay::MONDAY(): + echo 'Mondays are bad.'; + break; + + case WeekDay::FRIDAY(): + echo 'Fridays are better.'; + break; + + case WeekDay::SATURDAY(): + case WeekDay::SUNDAY(): + echo 'Weekends are best.'; + break; + + default: + echo 'Midweek days are so-so.'; + } +} + +tellItLikeItIs(WeekDay::MONDAY()); +tellItLikeItIs(WeekDay::WEDNESDAY()); +tellItLikeItIs(WeekDay::FRIDAY()); +tellItLikeItIs(WeekDay::SATURDAY()); +tellItLikeItIs(WeekDay::SUNDAY()); +``` + +### More complex example + +Of course, all enums are singletons, which are not cloneable or serializable. Thus you can be sure that there is always +just one instance of the same type. Of course, the values of constants are not completely useless, let's have a look at +a more complex example: + +```php +use DASPRiD\Enum\AbstractEnum; + +/** + * @method static self MERCURY() + * @method static self VENUS() + * @method static self EARTH() + * @method static self MARS() + * @method static self JUPITER() + * @method static self SATURN() + * @method static self URANUS() + * @method static self NEPTUNE() + */ +final class Planet extends AbstractEnum +{ + protected const MERCURY = [3.303e+23, 2.4397e6]; + protected const VENUS = [4.869e+24, 6.0518e6]; + protected const EARTH = [5.976e+24, 6.37814e6]; + protected const MARS = [6.421e+23, 3.3972e6]; + protected const JUPITER = [1.9e+27, 7.1492e7]; + protected const SATURN = [5.688e+26, 6.0268e7]; + protected const URANUS = [8.686e+25, 2.5559e7]; + protected const NEPTUNE = [1.024e+26, 2.4746e7]; + + /** + * Universal gravitational constant. + * + * @var float + */ + private const G = 6.67300E-11; + + /** + * Mass in kilograms. + * + * @var float + */ + private $mass; + + /** + * Radius in meters. + * + * @var float + */ + private $radius; + + protected function __construct(float $mass, float $radius) + { + $this->mass = $mass; + $this->radius = $radius; + } + + public function mass() : float + { + return $this->mass; + } + + public function radius() : float + { + return $this->radius; + } + + public function surfaceGravity() : float + { + return self::G * $this->mass / ($this->radius * $this->radius); + } + + public function surfaceWeight(float $otherMass) : float + { + return $otherMass * $this->surfaceGravity(); + } +} + +$myMass = 80; + +foreach (Planet::values() as $planet) { + printf("Your weight on %s is %f\n", $planet, $planet->surfaceWeight($myMass)); +} +``` diff --git a/vendor/dasprid/enum/composer.json b/vendor/dasprid/enum/composer.json new file mode 100755 index 0000000..41184d3 --- /dev/null +++ b/vendor/dasprid/enum/composer.json @@ -0,0 +1,30 @@ +{ + "name": "dasprid/enum", + "description": "PHP 7.1 enum implementation", + "license": "BSD-2-Clause", + "authors": [ + { + "name": "Ben Scholzen 'DASPRiD'", + "homepage": "https://dasprids.de/", + "email": "mail@dasprids.de" + } + ], + "keywords": [ + "enum", + "map" + ], + "require-dev": { + "phpunit/phpunit": "^6.4", + "squizlabs/php_codesniffer": "^3.1" + }, + "autoload": { + "psr-4": { + "DASPRiD\\Enum\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "DASPRiD\\EnumTest\\": "test/" + } + } +} diff --git a/vendor/dasprid/enum/phpcs.xml b/vendor/dasprid/enum/phpcs.xml new file mode 100755 index 0000000..a184db8 --- /dev/null +++ b/vendor/dasprid/enum/phpcs.xml @@ -0,0 +1,30 @@ + + + Enum coding standard + + + + + + + + + + + + + + + + + + + + + + + + + src + test + diff --git a/vendor/dasprid/enum/phpunit.xml.dist b/vendor/dasprid/enum/phpunit.xml.dist new file mode 100755 index 0000000..307a430 --- /dev/null +++ b/vendor/dasprid/enum/phpunit.xml.dist @@ -0,0 +1,17 @@ + + + + + ./test + + + + + + src + + + diff --git a/vendor/dasprid/enum/src/AbstractEnum.php b/vendor/dasprid/enum/src/AbstractEnum.php new file mode 100755 index 0000000..bc36119 --- /dev/null +++ b/vendor/dasprid/enum/src/AbstractEnum.php @@ -0,0 +1,241 @@ +> + */ + private static $values = []; + + /** + * @var array + */ + private static $allValuesLoaded = []; + + /** + * @var array + */ + private static $constants = []; + + /** + * The constructor is private by default to avoid arbitrary enum creation. + * + * When creating your own constructor for a parameterized enum, make sure to declare it as protected, so that + * the static methods are able to construct it. Avoid making it public, as that would allow creation of + * non-singleton enum instances. + */ + private function __construct() + { + } + + /** + * Magic getter which forwards all calls to {@see self::valueOf()}. + * + * @return static + */ + final public static function __callStatic(string $name, array $arguments) : self + { + return static::valueOf($name); + } + + /** + * Returns an enum with the specified name. + * + * The name must match exactly an identifier used to declare an enum in this type (extraneous whitespace characters + * are not permitted). + * + * @return static + * @throws IllegalArgumentException if the enum has no constant with the specified name + */ + final public static function valueOf(string $name) : self + { + if (isset(self::$values[static::class][$name])) { + return self::$values[static::class][$name]; + } + + $constants = self::constants(); + + if (array_key_exists($name, $constants)) { + return self::createValue($name, $constants[$name][0], $constants[$name][1]); + } + + throw new IllegalArgumentException(sprintf('No enum constant %s::%s', static::class, $name)); + } + + /** + * @return static + */ + final private static function createValue(string $name, int $ordinal, array $arguments) : self + { + $instance = new static(...$arguments); + $instance->name = $name; + $instance->ordinal = $ordinal; + self::$values[static::class][$name] = $instance; + return $instance; + } + + /** + * Obtains all possible types defined by this enum. + * + * @return static[] + */ + final public static function values() : array + { + if (isset(self::$allValuesLoaded[static::class])) { + return self::$values[static::class]; + } + + if (! isset(self::$values[static::class])) { + self::$values[static::class] = []; + } + + foreach (self::constants() as $name => $constant) { + if (array_key_exists($name, self::$values[static::class])) { + continue; + } + + static::createValue($name, $constant[0], $constant[1]); + } + + uasort(self::$values[static::class], function (self $a, self $b) { + return $a->ordinal() <=> $b->ordinal(); + }); + + self::$allValuesLoaded[static::class] = true; + return self::$values[static::class]; + } + + final private static function constants() : array + { + if (isset(self::$constants[static::class])) { + return self::$constants[static::class]; + } + + self::$constants[static::class] = []; + $reflectionClass = new ReflectionClass(static::class); + $ordinal = -1; + + foreach ($reflectionClass->getReflectionConstants() as $reflectionConstant) { + if (! $reflectionConstant->isProtected()) { + continue; + } + + $value = $reflectionConstant->getValue(); + + self::$constants[static::class][$reflectionConstant->name] = [ + ++$ordinal, + is_array($value) ? $value : [] + ]; + } + + return self::$constants[static::class]; + } + + /** + * Returns the name of this enum constant, exactly as declared in its enum declaration. + * + * Most programmers should use the {@see self::__toString()} method in preference to this one, as the toString + * method may return a more user-friendly name. This method is designed primarily for use in specialized situations + * where correctness depends on getting the exact name, which will not vary from release to release. + */ + final public function name() : string + { + return $this->name; + } + + /** + * Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial + * constant is assigned an ordinal of zero). + * + * Most programmers will have no use for this method. It is designed for use by sophisticated enum-based data + * structures. + */ + final public function ordinal() : int + { + return $this->ordinal; + } + + /** + * Compares this enum with the specified object for order. + * + * Returns negative integer, zero or positive integer as this object is less than, equal to or greater than the + * specified object. + * + * Enums are only comparable to other enums of the same type. The natural order implemented by this method is the + * order in which the constants are declared. + * + * @throws MismatchException if the passed enum is not of the same type + */ + final public function compareTo(self $other) : int + { + if (! $other instanceof static) { + throw new MismatchException(sprintf( + 'The passed enum %s is not of the same type as %s', + get_class($other), + static::class + )); + } + + return $this->ordinal - $other->ordinal; + } + + /** + * Forbid cloning enums. + * + * @throws CloneNotSupportedException + */ + final public function __clone() + { + throw new CloneNotSupportedException(); + } + + /** + * Forbid serializing enums. + * + * @throws SerializeNotSupportedException + */ + final public function __sleep() : void + { + throw new SerializeNotSupportedException(); + } + + /** + * Forbid unserializing enums. + * + * @throws UnserializeNotSupportedException + */ + final public function __wakeup() : void + { + throw new UnserializeNotSupportedException(); + } + + /** + * Turns the enum into a string representation. + * + * You may override this method to give a more user-friendly version. + */ + public function __toString() : string + { + return $this->name; + } +} diff --git a/vendor/dasprid/enum/src/EnumMap.php b/vendor/dasprid/enum/src/EnumMap.php new file mode 100755 index 0000000..77c5f35 --- /dev/null +++ b/vendor/dasprid/enum/src/EnumMap.php @@ -0,0 +1,375 @@ + + */ + private $keyUniverse; + + /** + * Array representation of this map. The ith element is the value to which universe[i] is currently mapped, or null + * if it isn't mapped to anything, or NullValue if it's mapped to null. + * + * @var array + */ + private $values; + + /** + * @var int + */ + private $size = 0; + + /** + * Creates a new enum map. + * + * @param string $keyType the type of the keys, must extend AbstractEnum + * @param string $valueType the type of the values + * @param bool $allowNullValues whether to allow null values + * @throws IllegalArgumentException when key type does not extend AbstractEnum + */ + public function __construct(string $keyType, string $valueType, bool $allowNullValues) + { + if (! is_subclass_of($keyType, AbstractEnum::class)) { + throw new IllegalArgumentException(sprintf( + 'Class %s does not extend %s', + $keyType, + AbstractEnum::class + )); + } + + $this->keyType = $keyType; + $this->valueType = $valueType; + $this->allowNullValues = $allowNullValues; + $this->keyUniverse = $keyType::values(); + $this->values = array_fill(0, count($this->keyUniverse), null); + } + + /** + * Checks whether the map types match the supplied ones. + * + * You should call this method when an EnumMap is passed to you and you want to ensure that it's made up of the + * correct types. + * + * @throws ExpectationException when supplied key type mismatches local key type + * @throws ExpectationException when supplied value type mismatches local value type + * @throws ExpectationException when the supplied map allows null values, abut should not + */ + public function expect(string $keyType, string $valueType, bool $allowNullValues) : void + { + if ($keyType !== $this->keyType) { + throw new ExpectationException(sprintf( + 'Callee expected an EnumMap with key type %s, but got %s', + $keyType, + $this->keyType + )); + } + + if ($valueType !== $this->valueType) { + throw new ExpectationException(sprintf( + 'Callee expected an EnumMap with value type %s, but got %s', + $keyType, + $this->keyType + )); + } + + if ($allowNullValues !== $this->allowNullValues) { + throw new ExpectationException(sprintf( + 'Callee expected an EnumMap with nullable flag %s, but got %s', + ($allowNullValues ? 'true' : 'false'), + ($this->allowNullValues ? 'true' : 'false') + )); + } + } + + /** + * Returns the number of key-value mappings in this map. + */ + public function size() : int + { + return $this->size; + } + + /** + * Returns true if this map maps one or more keys to the specified value. + */ + public function containsValue($value) : bool + { + return in_array($this->maskNull($value), $this->values, true); + } + + /** + * Returns true if this map contains a mapping for the specified key. + */ + public function containsKey(AbstractEnum $key) : bool + { + $this->checkKeyType($key); + return null !== $this->values[$key->ordinal()]; + } + + /** + * Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. + * + * More formally, if this map contains a mapping from a key to a value, then this method returns the value; + * otherwise it returns null (there can be at most one such mapping). + * + * A return value of null does not necessarily indicate that the map contains no mapping for the key; it's also + * possible that hte map explicitly maps the key to null. The {@see self::containsKey()} operation may be used to + * distinguish these two cases. + * + * @return mixed + */ + public function get(AbstractEnum $key) + { + $this->checkKeyType($key); + return $this->unmaskNull($this->values[$key->ordinal()]); + } + + /** + * Associates the specified value with the specified key in this map. + * + * If the map previously contained a mapping for this key, the old value is replaced. + * + * @return mixed the previous value associated with the specified key, or null if there was no mapping for the key. + * (a null return can also indicate that the map previously associated null with the specified key.) + * @throws IllegalArgumentException when the passed values does not match the internal value type + */ + public function put(AbstractEnum $key, $value) + { + $this->checkKeyType($key); + + if (! $this->isValidValue($value)) { + throw new IllegalArgumentException(sprintf('Value is not of type %s', $this->valueType)); + } + + $index = $key->ordinal(); + $oldValue = $this->values[$index]; + $this->values[$index] = $this->maskNull($value); + + if (null === $oldValue) { + ++$this->size; + } + + return $this->unmaskNull($oldValue); + } + + /** + * Removes the mapping for this key frm this map if present. + * + * @return mixed the previous value associated with the specified key, or null if there was no mapping for the key. + * (a null return can also indicate that the map previously associated null with the specified key.) + */ + public function remove(AbstractEnum $key) + { + $this->checkKeyType($key); + + $index = $key->ordinal(); + $oldValue = $this->values[$index]; + $this->values[$index] = null; + + if (null !== $oldValue) { + --$this->size; + } + + return $this->unmaskNull($oldValue); + } + + /** + * Removes all mappings from this map. + */ + public function clear() : void + { + $this->values = array_fill(0, count($this->keyUniverse), null); + $this->size = 0; + } + + /** + * Compares the specified map with this map for quality. + * + * Returns true if the two maps represent the same mappings. + */ + public function equals(self $other) : bool + { + if ($this === $other) { + return true; + } + + if ($this->size !== $other->size) { + return false; + } + + return $this->values === $other->values; + } + + /** + * Returns the values contained in this map. + * + * The array will contain the values in the order their corresponding keys appear in the map, which is their natural + * order (the order in which the num constants are declared). + */ + public function values() : array + { + return array_values(array_map(function ($value) { + return $this->unmaskNull($value); + }, array_filter($this->values, function ($value) : bool { + return null !== $value; + }))); + } + + public function serialize() : string + { + $values = []; + + foreach ($this->values as $ordinal => $value) { + if (null === $value) { + continue; + } + + $values[$ordinal] = $this->unmaskNull($value); + } + + return serialize([ + 'keyType' => $this->keyType, + 'valueType' => $this->valueType, + 'allowNullValues' => $this->allowNullValues, + 'values' => $values, + ]); + } + + public function unserialize($serialized) : void + { + $data = unserialize($serialized); + $this->__construct($data['keyType'], $data['valueType'], $data['allowNullValues']); + + foreach ($this->keyUniverse as $key) { + if (array_key_exists($key->ordinal(), $data['values'])) { + $this->put($key, $data['values'][$key->ordinal()]); + } + } + } + + public function getIterator() : Traversable + { + foreach ($this->keyUniverse as $key) { + if (null === $this->values[$key->ordinal()]) { + continue; + } + + yield $key => $this->unmaskNull($this->values[$key->ordinal()]); + } + } + + private function maskNull($value) + { + if (null === $value) { + return NullValue::instance(); + } + + return $value; + } + + private function unmaskNull($value) + { + if ($value instanceof NullValue) { + return null; + } + + return $value; + } + + /** + * @throws IllegalArgumentException when the passed key does not match the internal key type + */ + private function checkKeyType(AbstractEnum $key) : void + { + if (get_class($key) !== $this->keyType) { + throw new IllegalArgumentException(sprintf( + 'Object of type %s is not the same type as %s', + get_class($key), + $this->keyType + )); + } + } + + private function isValidValue($value) : bool + { + if (null === $value) { + if ($this->allowNullValues) { + return true; + } + + return false; + } + + switch ($this->valueType) { + case 'mixed': + return true; + + case 'bool': + case 'boolean': + return is_bool($value); + + case 'int': + case 'integer': + return is_int($value); + + case 'float': + case 'double': + return is_float($value); + + case 'string': + return is_string($value); + + case 'object': + return is_object($value); + + case 'array': + return is_array($value); + } + + return $value instanceof $this->valueType; + } +} diff --git a/vendor/dasprid/enum/src/Exception/CloneNotSupportedException.php b/vendor/dasprid/enum/src/Exception/CloneNotSupportedException.php new file mode 100755 index 0000000..4b37dbe --- /dev/null +++ b/vendor/dasprid/enum/src/Exception/CloneNotSupportedException.php @@ -0,0 +1,10 @@ +getProperty('constants'); + $constantsProperty->setAccessible(true); + $constantsProperty->setValue([]); + + $valuesProperty = $reflectionClass->getProperty('values'); + $valuesProperty->setAccessible(true); + $valuesProperty->setValue([]); + + $allValuesLoadedProperty = $reflectionClass->getProperty('allValuesLoaded'); + $allValuesLoadedProperty->setAccessible(true); + $allValuesLoadedProperty->setValue([]); + } + + public function testToString() : void + { + $weekday = WeekDay::FRIDAY(); + self::assertSame('FRIDAY', (string) $weekday); + } + + public function testName() : void + { + $this->assertSame('WEDNESDAY', WeekDay::WEDNESDAY()->name()); + } + + public function testOrdinal() : void + { + $this->assertSame(2, WeekDay::WEDNESDAY()->ordinal()); + } + + public function testSameInstanceIsReturned() : void + { + self::assertSame(WeekDay::FRIDAY(), WeekDay::FRIDAY()); + } + + public static function testValueOf() : void + { + self::assertSame(WeekDay::FRIDAY(), WeekDay::valueOf('FRIDAY')); + } + + public function testValueOfInvalidConstant() : void + { + $this->expectException(IllegalArgumentException::class); + WeekDay::valueOf('CATURDAY'); + } + + public function testExceptionOnCloneAttempt() : void + { + $this->expectException(CloneNotSupportedException::class); + clone WeekDay::FRIDAY(); + } + + public function testExceptionOnSerializeAttempt() : void + { + $this->expectException(SerializeNotSupportedException::class); + serialize(WeekDay::FRIDAY()); + } + + public function testExceptionOnUnserializeAttempt() : void + { + $this->expectException(UnserializeNotSupportedException::class); + unserialize('O:24:"DASPRiD\\EnumTest\\WeekDay":0:{}'); + } + + public function testReturnValueOfValuesIsSortedByOrdinal() : void + { + // Initialize some week days out of order + WeekDay::SATURDAY(); + WeekDay::TUESDAY(); + + $ordinals = array_values(array_map(function (WeekDay $weekDay) : int { + return $weekDay->ordinal(); + }, WeekDay::values())); + + self::assertSame([0, 1, 2, 3, 4, 5, 6], $ordinals); + + $cachedOrdinals = array_values(array_map(function (WeekDay $weekDay) : int { + return $weekDay->ordinal(); + }, WeekDay::values())); + $this->assertSame($ordinals, $cachedOrdinals); + } + + public function testCompareTo() : void + { + $this->assertSame(-4, WeekDay::WEDNESDAY()->compareTo(WeekDay::SUNDAY())); + $this->assertSame(4, WeekDay::SUNDAY()->compareTo(WeekDay::WEDNESDAY())); + $this->assertSame(0, WeekDay::WEDNESDAY()->compareTo(WeekDay::WEDNESDAY())); + } + + public function testCompareToWrongEnum() : void + { + $this->expectException(MismatchException::class); + WeekDay::MONDAY()->compareTo(Planet::EARTH()); + } + + public function testParameterizedEnum() : void + { + $planet = Planet::EARTH(); + $this->assertSame(5.976e+24, $planet->mass()); + $this->assertSame(6.37814e6, $planet->radius()); + } +} diff --git a/vendor/dasprid/enum/test/EnumMapTest.php b/vendor/dasprid/enum/test/EnumMapTest.php new file mode 100755 index 0000000..d51a86c --- /dev/null +++ b/vendor/dasprid/enum/test/EnumMapTest.php @@ -0,0 +1,243 @@ +expectException(IllegalArgumentException::class); + new EnumMap(stdClass::class, 'string', false); + } + + public function testUnexpectedKeyType() : void + { + $this->expectException(ExpectationException::class); + $map = new EnumMap(WeekDay::class, 'string', false); + $map->expect(Planet::class, 'string', false); + } + + public function testUnexpectedValueType() : void + { + $this->expectException(ExpectationException::class); + $map = new EnumMap(WeekDay::class, 'string', false); + $map->expect(WeekDay::class, 'int', false); + } + + public function testUnexpectedNullableValueType() : void + { + $this->expectException(ExpectationException::class); + $map = new EnumMap(WeekDay::class, 'string', true); + $map->expect(WeekDay::class, 'string', false); + } + + public function testExpectedTypes() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $map->expect(WeekDay::class, 'string', true); + $this->addToAssertionCount(1); + } + + public function testSize() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $this->assertSame(0, $map->size()); + $map->put(WeekDay::MONDAY(), 'foo'); + $this->assertSame(1, $map->size()); + } + + public function testContainsValue() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $this->assertFalse($map->containsValue('foo')); + $map->put(WeekDay::TUESDAY(), 'foo'); + $this->assertTrue($map->containsValue('foo')); + $this->assertFalse($map->containsValue(null)); + $map->put(WeekDay::WEDNESDAY(), null); + $this->assertTrue($map->containsValue(null)); + } + + public function testContainsKey() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $this->assertFalse($map->containsKey(WeekDay::TUESDAY())); + $map->put(WeekDay::TUESDAY(), 'foo'); + $this->assertTrue($map->containsKey(WeekDay::TUESDAY())); + $map->put(WeekDay::WEDNESDAY(), null); + $this->assertTrue($map->containsKey(WeekDay::WEDNESDAY())); + } + + public function testPutAndGet() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $map->put(WeekDay::TUESDAY(), 'foo'); + $map->put(WeekDay::FRIDAY(), null); + $this->assertSame('foo', $map->get(WeekDay::TUESDAY())); + $this->assertSame(null, $map->get(WeekDay::WEDNESDAY())); + $this->assertSame(null, $map->get(WeekDay::FRIDAY())); + } + + public function testPutInvalidKey() : void + { + $this->expectException(IllegalArgumentException::class); + $map = new EnumMap(WeekDay::class, 'string', true); + $map->put(Planet::MARS(), 'foo'); + } + + public function invalidValues() : array + { + return [ + ['bool', null, false], + ['bool', 0], + ['boolean', 0], + ['int', 2.4], + ['integer', 5.3], + ['float', 3], + ['double', 7], + ['string', 1], + ['object', 1], + ['array', 1], + [stdClass::class, 1], + ]; + } + + /** + * @dataProvider invalidValues + * @param mixed $value + */ + public function testPutInvalidValue(string $valueType, $value, bool $allowNull = true) : void + { + $this->expectException(IllegalArgumentException::class); + $map = new EnumMap(WeekDay::class, $valueType, $allowNull); + $map->put(WeekDay::TUESDAY(), $value); + } + + public function validValues() : array + { + return [ + ['bool', null], + ['mixed', 'foo'], + ['mixed', 1], + ['mixed', new stdClass()], + ['bool', true], + ['boolean', false], + ['int', 1], + ['integer', 4], + ['float', 2.5], + ['double', 6.4], + ['string', 'foo'], + ['object', new stdClass()], + ['array', ['foo']], + [stdClass::class, new stdClass()], + ]; + } + + /** + * @dataProvider validValues + * @param mixed $value + */ + public function testPutValidValue(string $valueType, $value, bool $allowNull = true) : void + { + $map = new EnumMap(WeekDay::class, $valueType, $allowNull); + $map->put(WeekDay::TUESDAY(), $value); + $this->addToAssertionCount(1); + } + + public function testRemove() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $map->put(WeekDay::TUESDAY(), 'foo'); + $map->remove(WeekDay::TUESDAY()); + $map->remove(WeekDay::WEDNESDAY()); + $this->assertSame(null, $map->get(WeekDay::TUESDAY())); + $this->assertSame(0, $map->size()); + } + + public function testClear() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $map->put(WeekDay::TUESDAY(), 'foo'); + $map->clear(); + $this->assertSame(null, $map->get(WeekDay::TUESDAY())); + $this->assertSame(0, $map->size()); + } + + public function testEqualsWithSameInstance() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $this->assertTrue($map->equals($map)); + } + + public function testEqualsWithDifferentSize() : void + { + $mapA = new EnumMap(WeekDay::class, 'string', true); + $mapB = new EnumMap(WeekDay::class, 'string', true); + $mapB->put(WeekDay::MONDAY(), 'foo'); + + $this->assertFalse($mapA->equals($mapB)); + } + + public function testEqualsWithDifferentValues() : void + { + $mapA = new EnumMap(WeekDay::class, 'string', true); + $mapA->put(WeekDay::MONDAY(), 'foo'); + $mapB = new EnumMap(WeekDay::class, 'string', true); + $mapB->put(WeekDay::MONDAY(), 'bar'); + + $this->assertFalse($mapA->equals($mapB)); + } + + public function testEqualsWithDifferentConstants() : void + { + $mapA = new EnumMap(WeekDay::class, 'string', true); + $mapA->put(WeekDay::MONDAY(), 'foo'); + $mapB = new EnumMap(WeekDay::class, 'string', true); + $mapB->put(WeekDay::TUESDAY(), 'foo'); + + $this->assertFalse($mapA->equals($mapB)); + } + + public function testValues() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $this->assertSame([], $map->values()); + + $map->put(WeekDay::FRIDAY(), 'foo'); + $map->put(WeekDay::TUESDAY(), 'bar'); + $map->put(WeekDay::SUNDAY(), null); + + $this->assertSame(['bar', 'foo', null], $map->values()); + } + + public function testSerializeAndUnserialize() : void + { + $mapA = new EnumMap(WeekDay::class, 'string', true); + $mapA->put(WeekDay::MONDAY(), 'foo'); + $mapB = unserialize(serialize($mapA)); + + $this->assertTrue($mapA->equals($mapB)); + } + + public function testIterator() : void + { + $map = new EnumMap(WeekDay::class, 'string', true); + $map->put(WeekDay::FRIDAY(), 'foo'); + $map->put(WeekDay::TUESDAY(), 'bar'); + $map->put(WeekDay::SUNDAY(), null); + + $result = []; + + foreach ($map as $key => $value) { + $result[$key->ordinal()] = $value; + } + + $this->assertSame([1 => 'bar', 4 => 'foo', 6 => null], $result); + } +} diff --git a/vendor/dasprid/enum/test/NullValueTest.php b/vendor/dasprid/enum/test/NullValueTest.php new file mode 100755 index 0000000..9f70640 --- /dev/null +++ b/vendor/dasprid/enum/test/NullValueTest.php @@ -0,0 +1,31 @@ +expectException(CloneNotSupportedException::class); + clone NullValue::instance(); + } + + public function testExceptionOnSerializeAttempt() : void + { + $this->expectException(SerializeNotSupportedException::class); + serialize(NullValue::instance()); + } + + public function testExceptionOnUnserializeAttempt() : void + { + $this->expectException(UnserializeNotSupportedException::class); + unserialize('O:22:"DASPRiD\\Enum\\NullValue":0:{}'); + } +} diff --git a/vendor/dasprid/enum/test/Planet.php b/vendor/dasprid/enum/test/Planet.php new file mode 100755 index 0000000..3c44c1d --- /dev/null +++ b/vendor/dasprid/enum/test/Planet.php @@ -0,0 +1,73 @@ +mass = $mass; + $this->radius = $radius; + } + + public function mass() : float + { + return $this->mass; + } + + public function radius() : float + { + return $this->radius; + } + + public function surfaceGravity() : float + { + return self::G * $this->mass / ($this->radius * $this->radius); + } + + public function surfaceWeight(float $otherMass) : float + { + return $otherMass * $this->surfaceGravity(); + } +} diff --git a/vendor/dasprid/enum/test/WeekDay.php b/vendor/dasprid/enum/test/WeekDay.php new file mode 100755 index 0000000..70b8db5 --- /dev/null +++ b/vendor/dasprid/enum/test/WeekDay.php @@ -0,0 +1,26 @@ + + +This source file is subject to the MIT license that is bundled +with this source code in the file LICENSE. +EOF; + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules([ + '@Symfony' => true, + 'header_comment' => ['header' => $header], + 'declare_strict_types' => true, + 'ordered_imports' => true, + 'strict_comparison' => true, + 'no_empty_comment' => false, + 'yoda_style' => false, + ]) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->notPath('src/Laravel/config.php', 'src/Laravel/routes.php') + ->in(__DIR__) + ) +; diff --git a/vendor/easywechat-composer/easywechat-composer/.travis.yml b/vendor/easywechat-composer/easywechat-composer/.travis.yml new file mode 100755 index 0000000..e819807 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/.travis.yml @@ -0,0 +1,12 @@ +language: php + +php: + - 7.0 + - 7.1 + - 7.2 + - 7.3 + +install: + - travis_retry composer install --no-interaction --no-suggest + +script: ./vendor/bin/phpunit diff --git a/vendor/easywechat-composer/easywechat-composer/LICENSE b/vendor/easywechat-composer/easywechat-composer/LICENSE new file mode 100755 index 0000000..3559904 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 张铭阳 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/vendor/easywechat-composer/easywechat-composer/README.md b/vendor/easywechat-composer/easywechat-composer/README.md new file mode 100755 index 0000000..a08c1be --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/README.md @@ -0,0 +1,55 @@ +

                            +

                            EasyWeChat Composer Plugin

                            +

                            + +

                            + Build Status + Scrutinizer Code Quality + Latest Stable Version + Total Downloads + License +

                            + +Usage +--- + +Set the `type` to be `easywechat-extension` in your package composer.json file: + +```json +{ + "name": "your/package", + "type": "easywechat-extension" +} +``` + +Specify server observer classes in the extra section: + +```json +{ + "name": "your/package", + "type": "easywechat-extension", + "extra": { + "observers": [ + "Acme\\Observers\\Handler" + ] + } +} +``` + +Examples +--- +* [easywechat-composer/open-platform-testcase](https://github.com/mingyoung/open-platform-testcase) + +Server Delegation +--- + +> 目前仅支持 Laravel + +1. 在 `config/app.php` 中添加 `EasyWeChatComposer\Laravel\ServiceProvider::class` + +2. 在**本地项目**的 `.env` 文件中添加如下配置: + +``` +EASYWECHAT_DELEGATION=true # false 则不启用 +EASYWECHAT_DELEGATION_HOST=https://example.com # 线上域名 +``` diff --git a/vendor/easywechat-composer/easywechat-composer/composer.json b/vendor/easywechat-composer/easywechat-composer/composer.json new file mode 100755 index 0000000..032e0d8 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/composer.json @@ -0,0 +1,35 @@ +{ + "name": "easywechat-composer/easywechat-composer", + "description": "The composer plugin for EasyWeChat", + "type": "composer-plugin", + "license": "MIT", + "authors": [ + { + "name": "张铭阳", + "email": "mingyoungcheung@gmail.com" + } + ], + "require": { + "php": ">=7.0", + "composer-plugin-api": "^1.0" + }, + "require-dev": { + "composer/composer": "^1.0", + "phpunit/phpunit": "^6.5 || ^7.0" + }, + "autoload": { + "psr-4": { + "EasyWeChatComposer\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "EasyWeChatComposer\\Tests\\": "tests/" + } + }, + "extra": { + "class": "EasyWeChatComposer\\Plugin" + }, + "minimum-stability": "dev", + "prefer-stable": true +} diff --git a/vendor/easywechat-composer/easywechat-composer/phpunit.xml b/vendor/easywechat-composer/easywechat-composer/phpunit.xml new file mode 100755 index 0000000..361d92c --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/phpunit.xml @@ -0,0 +1,20 @@ + + + + tests + + + + + src + + + diff --git a/vendor/easywechat-composer/easywechat-composer/src/Commands/ExtensionsCommand.php b/vendor/easywechat-composer/easywechat-composer/src/Commands/ExtensionsCommand.php new file mode 100755 index 0000000..bc0155e --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Commands/ExtensionsCommand.php @@ -0,0 +1,63 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Commands; + +use Composer\Command\BaseCommand; +use Symfony\Component\Console\Helper\Table; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; + +class ExtensionsCommand extends BaseCommand +{ + /** + * Configures the current command. + */ + protected function configure() + { + $this->setName('easywechat:extensions') + ->setDescription('Lists all installed extensions.'); + } + + /** + * Executes the current command. + * + * @param InputInterface $input + * @param OutputInterface $output + */ + protected function execute(InputInterface $input, OutputInterface $output) + { + $extensions = require __DIR__.'/../../extensions.php'; + + if (empty($extensions) || !is_array($extensions)) { + return $output->writeln('No extension installed.'); + } + + $table = new Table($output); + $table->setHeaders(['Name', 'Observers']) + ->setRows( + array_map([$this, 'getRows'], array_keys($extensions), $extensions) + )->render(); + } + + /** + * @param string $name + * @param array $extension + * + * @return array + */ + protected function getRows($name, $extension) + { + return [$name, implode("\n", $extension['observers'] ?? [])]; + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Commands/Provider.php b/vendor/easywechat-composer/easywechat-composer/src/Commands/Provider.php new file mode 100755 index 0000000..928f096 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Commands/Provider.php @@ -0,0 +1,31 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Commands; + +use Composer\Plugin\Capability\CommandProvider; + +class Provider implements CommandProvider +{ + /** + * Retrieves an array of commands. + * + * @return \Composer\Command\BaseCommand[] + */ + public function getCommands() + { + return [ + new ExtensionsCommand(), + ]; + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Contracts/Encrypter.php b/vendor/easywechat-composer/easywechat-composer/src/Contracts/Encrypter.php new file mode 100755 index 0000000..af8b8d1 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Contracts/Encrypter.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Contracts; + +interface Encrypter +{ + /** + * Encrypt the given value. + * + * @param string $value + * + * @return string + */ + public function encrypt($value); + + /** + * Decrypt the given value. + * + * @param string $payload + * + * @return string + */ + public function decrypt($payload); +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Delegation/DelegationOptions.php b/vendor/easywechat-composer/easywechat-composer/src/Delegation/DelegationOptions.php new file mode 100755 index 0000000..a333261 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Delegation/DelegationOptions.php @@ -0,0 +1,80 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Delegation; + +use EasyWeChatComposer\EasyWeChat; + +class DelegationOptions +{ + /** + * @var array + */ + protected $config = [ + 'enabled' => false, + ]; + + /** + * @return $this + */ + public function enable() + { + $this->config['enabled'] = true; + + return $this; + } + + /** + * @return $this + */ + public function disable() + { + $this->config['enabled'] = false; + + return $this; + } + + /** + * @param bool $ability + * + * @return $this + */ + public function ability($ability) + { + $this->config['enabled'] = (bool) $ability; + + return $this; + } + + /** + * @param string $host + * + * @return $this + */ + public function toHost($host) + { + $this->config['host'] = $host; + + return $this; + } + + /** + * Destructor. + */ + public function __destruct() + { + EasyWeChat::mergeConfig([ + 'delegation' => $this->config, + ]); + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Delegation/DelegationTo.php b/vendor/easywechat-composer/easywechat-composer/src/Delegation/DelegationTo.php new file mode 100755 index 0000000..2e9e6db --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Delegation/DelegationTo.php @@ -0,0 +1,83 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Delegation; + +use EasyWeChatComposer\Traits\MakesHttpRequests; + +class DelegationTo +{ + use MakesHttpRequests; + + /** + * @var \EasyWeChat\Kernel\ServiceContainer + */ + protected $app; + + /** + * @var array + */ + protected $identifiers = []; + + /** + * @param \EasyWeChat\Kernel\ServiceContainer $app + * @param string $identifier + */ + public function __construct($app, $identifier) + { + $this->app = $app; + + $this->push($identifier); + } + + /** + * @param string $identifier + */ + public function push($identifier) + { + $this->identifiers[] = $identifier; + } + + /** + * @param string $identifier + * + * @return $this + */ + public function __get($identifier) + { + $this->push($identifier); + + return $this; + } + + /** + * @param string $method + * @param array $arguments + * + * @return mixed + */ + public function __call($method, $arguments) + { + $config = array_intersect_key($this->app->getConfig(), array_flip(['app_id', 'secret', 'token', 'aes_key', 'response_type', 'component_app_id', 'refresh_token'])); + + $data = [ + 'config' => $config, + 'application' => get_class($this->app), + 'identifiers' => $this->identifiers, + 'method' => $method, + 'arguments' => $arguments, + ]; + + return $this->request('easywechat-composer/delegate', $data); + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Delegation/Hydrate.php b/vendor/easywechat-composer/easywechat-composer/src/Delegation/Hydrate.php new file mode 100755 index 0000000..b83bbe9 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Delegation/Hydrate.php @@ -0,0 +1,83 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Delegation; + +use EasyWeChat; +use EasyWeChatComposer\Http\DelegationResponse; + +class Hydrate +{ + /** + * @var array + */ + protected $attributes; + + /** + * @param array $attributes + */ + public function __construct(array $attributes) + { + $this->attributes = $attributes; + } + + /** + * @return array + */ + public function handle() + { + $app = $this->createsApplication()->shouldntDelegate(); + + foreach ($this->attributes['identifiers'] as $identifier) { + $app = $app->$identifier; + } + + return call_user_func_array([$app, $this->attributes['method']], $this->attributes['arguments']); + } + + /** + * @return \EasyWeChat\Kernel\ServiceContainer + */ + protected function createsApplication() + { + $application = $this->attributes['application']; + + if ($application === EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Application::class) { + return $this->createsOpenPlatformApplication('officialAccount'); + } + + if ($application === EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Application::class) { + return $this->createsOpenPlatformApplication('miniProgram'); + } + + return new $application($this->buildConfig($this->attributes['config'])); + } + + protected function createsOpenPlatformApplication($type) + { + $config = $this->attributes['config']; + + $authorizerAppId = $config['app_id']; + + $config['app_id'] = $config['component_app_id']; + + return EasyWeChat\Factory::openPlatform($this->buildConfig($config))->$type($authorizerAppId, $config['refresh_token']); + } + + protected function buildConfig(array $config) + { + $config['response_type'] = DelegationResponse::class; + + return $config; + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/EasyWeChat.php b/vendor/easywechat-composer/easywechat-composer/src/EasyWeChat.php new file mode 100755 index 0000000..4ff3d9b --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/EasyWeChat.php @@ -0,0 +1,79 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer; + +use EasyWeChatComposer\Delegation\DelegationOptions; + +class EasyWeChat +{ + /** + * @var array + */ + protected static $config = []; + + /** + * Encryption key. + * + * @var string + */ + protected static $encryptionKey; + + /** + * @param array $config + */ + public static function mergeConfig(array $config) + { + static::$config = array_merge(static::$config, $config); + } + + /** + * @return array + */ + public static function config() + { + return static::$config; + } + + /** + * Set encryption key. + * + * @param string $key + * + * @return static + */ + public static function setEncryptionKey(string $key) + { + static::$encryptionKey = $key; + + return new static(); + } + + /** + * Get encryption key. + * + * @return string + */ + public static function getEncryptionKey(): string + { + return static::$encryptionKey; + } + + /** + * @return \EasyWeChatComposer\Delegation\DelegationOptions + */ + public static function withDelegation() + { + return new DelegationOptions(); + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Encryption/DefaultEncrypter.php b/vendor/easywechat-composer/easywechat-composer/src/Encryption/DefaultEncrypter.php new file mode 100755 index 0000000..2c4cd53 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Encryption/DefaultEncrypter.php @@ -0,0 +1,89 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Encryption; + +use EasyWeChatComposer\Contracts\Encrypter; +use EasyWeChatComposer\Exceptions\DecryptException; +use EasyWeChatComposer\Exceptions\EncryptException; + +class DefaultEncrypter implements Encrypter +{ + /** + * @var string + */ + protected $key; + + /** + * @var string + */ + protected $cipher; + + /** + * @param string $key + * @param string $cipher + */ + public function __construct($key, $cipher = 'AES-256-CBC') + { + $this->key = $key; + $this->cipher = $cipher; + } + + /** + * Encrypt the given value. + * + * @param string $value + * + * @return string + * + * @throws \EasyWeChatComposer\Exceptions\EncryptException + */ + public function encrypt($value) + { + $iv = random_bytes(openssl_cipher_iv_length($this->cipher)); + + $value = openssl_encrypt($value, $this->cipher, $this->key, 0, $iv); + + if ($value === false) { + throw new EncryptException('Could not encrypt the data.'); + } + + $iv = base64_encode($iv); + + return base64_encode(json_encode(compact('iv', 'value'))); + } + + /** + * Decrypt the given value. + * + * @param string $payload + * + * @return string + * + * @throws \EasyWeChatComposer\Exceptions\DecryptException + */ + public function decrypt($payload) + { + $payload = json_decode(base64_decode($payload), true); + + $iv = base64_decode($payload['iv']); + + $decrypted = openssl_decrypt($payload['value'], $this->cipher, $this->key, 0, $iv); + + if ($decrypted === false) { + throw new DecryptException('Could not decrypt the data.'); + } + + return $decrypted; + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Exceptions/DecryptException.php b/vendor/easywechat-composer/easywechat-composer/src/Exceptions/DecryptException.php new file mode 100755 index 0000000..e210d1f --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Exceptions/DecryptException.php @@ -0,0 +1,21 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Exceptions; + +use Exception; + +class DecryptException extends Exception +{ + // +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Exceptions/DelegationException.php b/vendor/easywechat-composer/easywechat-composer/src/Exceptions/DelegationException.php new file mode 100755 index 0000000..0af9c2d --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Exceptions/DelegationException.php @@ -0,0 +1,42 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Exceptions; + +use Exception; + +class DelegationException extends Exception +{ + /** + * @var string + */ + protected $exception; + + /** + * @param string $exception + */ + public function setException($exception) + { + $this->exception = $exception; + + return $this; + } + + /** + * @return string + */ + public function getException() + { + return $this->exception; + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Exceptions/EncryptException.php b/vendor/easywechat-composer/easywechat-composer/src/Exceptions/EncryptException.php new file mode 100755 index 0000000..f88f8f4 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Exceptions/EncryptException.php @@ -0,0 +1,21 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Exceptions; + +use Exception; + +class EncryptException extends Exception +{ + // +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Extension.php b/vendor/easywechat-composer/easywechat-composer/src/Extension.php new file mode 100755 index 0000000..d01850a --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Extension.php @@ -0,0 +1,143 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer; + +use EasyWeChat\Kernel\Contracts\EventHandlerInterface; +use EasyWeChat\Kernel\ServiceContainer; +use ReflectionClass; + +class Extension +{ + /** + * @var \EasyWeChat\Kernel\ServiceContainer + */ + protected $app; + + /** + * @var string + */ + protected $manifestPath; + + /** + * @var array|null + */ + protected $manifest; + + /** + * @param \EasyWeChat\Kernel\ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + $this->app = $app; + $this->manifestPath = __DIR__.'/../extensions.php'; + } + + /** + * Get observers. + * + * @return array + */ + public function observers(): array + { + if ($this->shouldIgnore()) { + return []; + } + + $observers = []; + + foreach ($this->getManifest() as $name => $extra) { + $observers = array_merge($observers, $extra['observers'] ?? []); + } + + return array_map([$this, 'listObserver'], array_filter($observers, [$this, 'validateObserver'])); + } + + /** + * @param mixed $observer + * + * @return bool + */ + protected function isDisable($observer): bool + { + return in_array($observer, $this->app->config->get('disable_observers', [])); + } + + /** + * Get the observers should be ignore. + * + * @return bool + */ + protected function shouldIgnore(): bool + { + return !file_exists($this->manifestPath) || $this->isDisable('*'); + } + + /** + * Validate the given observer. + * + * @param mixed $observer + * + * @return bool + * + * @throws \ReflectionException + */ + protected function validateObserver($observer): bool + { + return !$this->isDisable($observer) + && (new ReflectionClass($observer))->implementsInterface(EventHandlerInterface::class) + && $this->accessible($observer); + } + + /** + * Determine whether the given observer is accessible. + * + * @param string $observer + * + * @return bool + */ + protected function accessible($observer): bool + { + if (!method_exists($observer, 'getAccessor')) { + return true; + } + + return in_array(get_class($this->app), (array) $observer::getAccessor()); + } + + /** + * @param mixed $observer + * + * @return array + */ + protected function listObserver($observer): array + { + $condition = method_exists($observer, 'onCondition') ? $observer::onCondition() : '*'; + + return [$observer, $condition]; + } + + /** + * Get the easywechat manifest. + * + * @return array + */ + protected function getManifest(): array + { + if (!is_null($this->manifest)) { + return $this->manifest; + } + + return $this->manifest = file_exists($this->manifestPath) ? require $this->manifestPath : []; + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Http/DelegationResponse.php b/vendor/easywechat-composer/easywechat-composer/src/Http/DelegationResponse.php new file mode 100755 index 0000000..329eb54 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Http/DelegationResponse.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Http; + +class DelegationResponse extends Response +{ + /** + * @return string + */ + public function getBodyContents() + { + return $this->response->getBodyContents(); + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Http/Response.php b/vendor/easywechat-composer/easywechat-composer/src/Http/Response.php new file mode 100755 index 0000000..534bf54 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Http/Response.php @@ -0,0 +1,104 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Http; + +use EasyWeChat\Kernel\Contracts\Arrayable; +use EasyWeChat\Kernel\Http\Response as HttpResponse; +use JsonSerializable; + +class Response implements Arrayable, JsonSerializable +{ + /** + * @var \EasyWeChat\Kernel\Http\Response + */ + protected $response; + + /** + * @var array + */ + protected $array; + + /** + * @param \EasyWeChat\Kernel\Http\Response $response + */ + public function __construct(HttpResponse $response) + { + $this->response = $response; + } + + /** + * @see \ArrayAccess::offsetExists + * + * @param string $offset + * + * @return bool + */ + public function offsetExists($offset) + { + return isset($this->toArray()[$offset]); + } + + /** + * @see \ArrayAccess::offsetGet + * + * @param string $offset + * + * @return mixed + */ + public function offsetGet($offset) + { + return $this->toArray()[$offset] ?? null; + } + + /** + * @see \ArrayAccess::offsetSet + * + * @param string $offset + * @param mixed $value + */ + public function offsetSet($offset, $value) + { + // + } + + /** + * @see \ArrayAccess::offsetUnset + * + * @param string $offset + */ + public function offsetUnset($offset) + { + // + } + + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray() + { + return $this->array ?: $this->array = $this->response->toArray(); + } + + /** + * Convert the object into something JSON serializable. + * + * @return array + */ + public function jsonSerialize() + { + return $this->toArray(); + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Laravel/Http/Controllers/DelegatesController.php b/vendor/easywechat-composer/easywechat-composer/src/Laravel/Http/Controllers/DelegatesController.php new file mode 100755 index 0000000..ad014d8 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Laravel/Http/Controllers/DelegatesController.php @@ -0,0 +1,49 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Laravel\Http\Controllers; + +use EasyWeChatComposer\Delegation\Hydrate; +use EasyWeChatComposer\Encryption\DefaultEncrypter; +use Illuminate\Http\Request; +use Throwable; + +class DelegatesController +{ + /** + * @param \Illuminate\Http\Request $request + * @param \EasyWeChatComposer\Encryption\DefaultEncrypter $encrypter + * + * @return \Illuminate\Http\Response + */ + public function __invoke(Request $request, DefaultEncrypter $encrypter) + { + try { + $data = json_decode($encrypter->decrypt($request->get('encrypted')), true); + + $hydrate = new Hydrate($data); + + $response = $hydrate->handle(); + + return response()->json([ + 'response_type' => get_class($response), + 'response' => $encrypter->encrypt($response->getBodyContents()), + ]); + } catch (Throwable $t) { + return [ + 'exception' => get_class($t), + 'message' => $t->getMessage(), + ]; + } + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Laravel/ServiceProvider.php b/vendor/easywechat-composer/easywechat-composer/src/Laravel/ServiceProvider.php new file mode 100755 index 0000000..33ddc94 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Laravel/ServiceProvider.php @@ -0,0 +1,112 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Laravel; + +use EasyWeChatComposer\EasyWeChat; +use EasyWeChatComposer\Encryption\DefaultEncrypter; +use Illuminate\Support\Facades\Cache; +use Illuminate\Support\Facades\Route; +use Illuminate\Support\ServiceProvider as LaravelServiceProvider; +use RuntimeException; + +class ServiceProvider extends LaravelServiceProvider +{ + /** + * Bootstrap any application services. + */ + public function boot() + { + $this->registerRoutes(); + $this->publishes([ + __DIR__.'/config.php' => config_path('easywechat-composer.php'), + ]); + + EasyWeChat::setEncryptionKey( + $defaultKey = $this->getKey() + ); + + EasyWeChat::withDelegation() + ->toHost($this->config('delegation.host')) + ->ability($this->config('delegation.enabled')); + + $this->app->when(DefaultEncrypter::class)->needs('$key')->give($defaultKey); + } + + /** + * Register routes. + */ + protected function registerRoutes() + { + Route::prefix('easywechat-composer')->namespace('EasyWeChatComposer\Laravel\Http\Controllers')->group(function () { + $this->loadRoutesFrom(__DIR__.'/routes.php'); + }); + } + + /** + * Register any application services. + */ + public function register() + { + $this->configure(); + } + + /** + * Register config. + */ + protected function configure() + { + $this->mergeConfigFrom( + __DIR__.'/config.php', 'easywechat-composer' + ); + } + + /** + * Get the specified configuration value. + * + * @param string|null $key + * @param mixed $default + * + * @return mixed + */ + protected function config($key = null, $default = null) + { + $config = $this->app['config']->get('easywechat-composer'); + + if (is_null($key)) { + return $config; + } + + return array_get($config, $key, $default); + } + + /** + * @return string + */ + protected function getKey() + { + return $this->config('encryption.key') ?: $this->getMd5Key(); + } + + /** + * @return string + */ + protected function getMd5Key() + { + return Cache::remember('easywechat-composer.encryption_key', 30, function () { + throw_unless(file_exists($path = base_path('composer.lock')), RuntimeException::class, 'No encryption key provided.'); + + return md5_file($path); + }); + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Laravel/config.php b/vendor/easywechat-composer/easywechat-composer/src/Laravel/config.php new file mode 100755 index 0000000..5deabef --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Laravel/config.php @@ -0,0 +1,29 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +return [ + + 'encryption' => [ + + 'key' => env('EASYWECHAT_KEY'), + + ], + + 'delegation' => [ + + 'enabled' => env('EASYWECHAT_DELEGATION', false), + + 'host' => env('EASYWECHAT_DELEGATION_HOST'), + ], + +]; diff --git a/vendor/easywechat-composer/easywechat-composer/src/Laravel/routes.php b/vendor/easywechat-composer/easywechat-composer/src/Laravel/routes.php new file mode 100755 index 0000000..6a3041a --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Laravel/routes.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +use Illuminate\Support\Facades\Route; + +Route::post('delegate', 'DelegatesController'); diff --git a/vendor/easywechat-composer/easywechat-composer/src/ManifestManager.php b/vendor/easywechat-composer/easywechat-composer/src/ManifestManager.php new file mode 100755 index 0000000..ecf17a3 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/ManifestManager.php @@ -0,0 +1,120 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer; + +class ManifestManager +{ + const PACKAGE_TYPE = 'easywechat-extension'; + + const EXTRA_OBSERVER = 'observers'; + + /** + * The vendor path. + * + * @var string + */ + protected $vendorPath; + + /** + * The manifest path. + * + * @var string + */ + protected $manifestPath; + + /** + * @param string $vendorPath + * @param string|null $manifestPath + */ + public function __construct(string $vendorPath, string $manifestPath = null) + { + $this->vendorPath = $vendorPath; + $this->manifestPath = $manifestPath ?: $vendorPath.'/easywechat-composer/easywechat-composer/extensions.php'; + } + + /** + * Remove manifest file. + * + * @return $this + */ + public function unlink() + { + if (file_exists($this->manifestPath)) { + @unlink($this->manifestPath); + } + + return $this; + } + + /** + * Build the manifest file. + */ + public function build() + { + $packages = []; + + if (file_exists($installed = $this->vendorPath.'/composer/installed.json')) { + $packages = json_decode(file_get_contents($installed), true); + } + + $this->write($this->map($packages)); + } + + /** + * @param array $packages + * + * @return array + */ + protected function map(array $packages): array + { + $manifest = []; + + $packages = array_filter($packages, function ($package) { + return $package['type'] === self::PACKAGE_TYPE; + }); + + foreach ($packages as $package) { + $manifest[$package['name']] = [self::EXTRA_OBSERVER => $package['extra'][self::EXTRA_OBSERVER] ?? []]; + } + + return $manifest; + } + + /** + * Write the manifest array to a file. + * + * @param array $manifest + */ + protected function write(array $manifest) + { + file_put_contents( + $this->manifestPath, + 'invalidate($this->manifestPath); + } + + /** + * Invalidate the given file. + * + * @param string $file + */ + protected function invalidate($file) + { + if (function_exists('opcache_invalidate')) { + @opcache_invalidate($file, true); + } + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Plugin.php b/vendor/easywechat-composer/easywechat-composer/src/Plugin.php new file mode 100755 index 0000000..ca48099 --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Plugin.php @@ -0,0 +1,92 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer; + +use Composer\Composer; +use Composer\EventDispatcher\EventSubscriberInterface; +use Composer\Installer\PackageEvent; +use Composer\Installer\PackageEvents; +use Composer\IO\IOInterface; +use Composer\Plugin\Capable; +use Composer\Plugin\PluginInterface; +use Composer\Script\Event; +use Composer\Script\ScriptEvents; + +class Plugin implements PluginInterface, EventSubscriberInterface, Capable +{ + /** + * @var bool + */ + protected $activated = true; + + /** + * Apply plugin modifications to Composer. + * + * @param \Composer\Composer $composer + * @param \Composer\IO\IOInterface $io + */ + public function activate(Composer $composer, IOInterface $io) + { + // + } + + /** + * @return array + */ + public function getCapabilities() + { + return [ + 'Composer\Plugin\Capability\CommandProvider' => 'EasyWeChatComposer\Commands\Provider', + ]; + } + + /** + * Listen events. + * + * @return array + */ + public static function getSubscribedEvents() + { + return [ + PackageEvents::PRE_PACKAGE_UNINSTALL => 'prePackageUninstall', + ScriptEvents::POST_AUTOLOAD_DUMP => 'postAutoloadDump', + ]; + } + + /** + * @param \Composer\Installer\PackageEvent + */ + public function prePackageUninstall(PackageEvent $event) + { + if ($event->getOperation()->getPackage()->getName() === 'overtrue/wechat') { + $this->activated = false; + } + } + + /** + * @param \Composer\Script\Event $event + */ + public function postAutoloadDump(Event $event) + { + if (!$this->activated) { + return; + } + + $manifest = new ManifestManager( + rtrim($event->getComposer()->getConfig()->get('vendor-dir'), '/') + ); + + $manifest->unlink()->build(); + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Traits/MakesHttpRequests.php b/vendor/easywechat-composer/easywechat-composer/src/Traits/MakesHttpRequests.php new file mode 100755 index 0000000..091a75c --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Traits/MakesHttpRequests.php @@ -0,0 +1,110 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Traits; + +use EasyWeChat\Kernel\Http\StreamResponse; +use EasyWeChat\Kernel\Traits\ResponseCastable; +use EasyWeChatComposer\Contracts\Encrypter; +use EasyWeChatComposer\EasyWeChat; +use EasyWeChatComposer\Encryption\DefaultEncrypter; +use EasyWeChatComposer\Exceptions\DelegationException; +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; + +trait MakesHttpRequests +{ + use ResponseCastable; + + /** + * @var \GuzzleHttp\ClientInterface + */ + protected $httpClient; + + /** + * @var \EasyWeChatComposer\Contracts\Encrypter + */ + protected $encrypter; + + /** + * @param string $endpoint + * @param array $payload + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + protected function request($endpoint, array $payload) + { + $response = $this->getHttpClient()->request('POST', $endpoint, [ + 'form_params' => $this->buildFormParams($payload), + ]); + + $parsed = $this->parseResponse($response); + + return $this->detectAndCastResponseToType( + $this->getEncrypter()->decrypt($parsed['response']), + ($parsed['response_type'] === StreamResponse::class) ? 'raw' : $this->app['config']['response_type'] + ); + } + + /** + * @param array $payload + * + * @return array + */ + protected function buildFormParams($payload) + { + return [ + 'encrypted' => $this->getEncrypter()->encrypt(json_encode($payload)), + ]; + } + + /** + * @param \Psr\Http\Message\ResponseInterface $response + * + * @return array + */ + protected function parseResponse($response) + { + $result = json_decode((string) $response->getBody(), true); + + if (isset($result['exception'])) { + throw (new DelegationException($result['message']))->setException($result['exception']); + } + + return $result; + } + + /** + * @return \GuzzleHttp\ClientInterface + */ + protected function getHttpClient(): ClientInterface + { + return $this->httpClient ?: $this->httpClient = new Client([ + 'base_uri' => $this->app['config']['delegation']['host'], + ]); + } + + /** + * @return \EasyWeChatComposer\Contracts\Encrypter + */ + protected function getEncrypter(): Encrypter + { + return $this->encrypter ?: $this->encrypter = new DefaultEncrypter( + EasyWeChat::getEncryptionKey() + ); + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/src/Traits/WithAggregator.php b/vendor/easywechat-composer/easywechat-composer/src/Traits/WithAggregator.php new file mode 100755 index 0000000..a3eb16e --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/src/Traits/WithAggregator.php @@ -0,0 +1,60 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Traits; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChatComposer\Delegation\DelegationTo; +use EasyWeChatComposer\EasyWeChat; + +trait WithAggregator +{ + /** + * Aggregate. + */ + protected function aggregate() + { + foreach (EasyWeChat::config() as $key => $value) { + $this['config']->set($key, $value); + } + } + + /** + * @return bool + */ + public function shouldDelegate($id) + { + return $this['config']->get('delegation.enabled') + && $this->offsetGet($id) instanceof BaseClient; + } + + /** + * @return $this + */ + public function shouldntDelegate() + { + $this['config']->set('delegation.enabled', false); + + return $this; + } + + /** + * @param string $id + * + * @return \EasyWeChatComposer\Delegation + */ + public function delegateTo($id) + { + return new DelegationTo($this, $id); + } +} diff --git a/vendor/easywechat-composer/easywechat-composer/tests/ManifestManagerTest.php b/vendor/easywechat-composer/easywechat-composer/tests/ManifestManagerTest.php new file mode 100755 index 0000000..23b8e2c --- /dev/null +++ b/vendor/easywechat-composer/easywechat-composer/tests/ManifestManagerTest.php @@ -0,0 +1,37 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChatComposer\Tests; + +use EasyWeChatComposer\ManifestManager; +use PHPUnit\Framework\TestCase; + +class ManifestManagerTest extends TestCase +{ + private $vendorPath; + private $manifestPath; + + protected function getManifestManager() + { + return new ManifestManager( + $this->vendorPath = __DIR__.'/__fixtures__/vendor/', + $this->manifestPath = __DIR__.'/__fixtures__/extensions.php' + ); + } + + public function testUnlink() + { + $this->assertInstanceOf(ManifestManager::class, $this->getManifestManager()->unlink()); + $this->assertFalse(file_exists($this->manifestPath)); + } +} diff --git a/vendor/endroid/installer/.gitignore b/vendor/endroid/installer/.gitignore new file mode 100755 index 0000000..c8153b5 --- /dev/null +++ b/vendor/endroid/installer/.gitignore @@ -0,0 +1,2 @@ +/composer.lock +/vendor/ diff --git a/vendor/endroid/installer/.travis.yml b/vendor/endroid/installer/.travis.yml new file mode 100755 index 0000000..b1ad958 --- /dev/null +++ b/vendor/endroid/installer/.travis.yml @@ -0,0 +1,25 @@ +language: php + +php: + - '7.2' + - '7.3' + +matrix: + fast_finish: true + +env: + - COMPOSER_FLAGS="--prefer-lowest" + - COMPOSER_FLAGS="" + +before_install: + - composer self-update + +install: + - composer update --no-interaction --prefer-source $COMPOSER_FLAGS + +script: + - vendor/bin/test + +notifications: + email: + - info@endroid.nl diff --git a/vendor/endroid/installer/LICENSE b/vendor/endroid/installer/LICENSE new file mode 100755 index 0000000..0966ce0 --- /dev/null +++ b/vendor/endroid/installer/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) Jeroen van den Enden + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/endroid/installer/README.md b/vendor/endroid/installer/README.md new file mode 100755 index 0000000..b99c610 --- /dev/null +++ b/vendor/endroid/installer/README.md @@ -0,0 +1,67 @@ +# Installer + +*By [endroid](https://endroid.nl/)* + +[![Latest Stable Version](http://img.shields.io/packagist/v/endroid/installer.svg)](https://packagist.org/packages/endroid/installer) +[![Build Status](http://img.shields.io/travis/endroid/installer.svg)](http://travis-ci.org/endroid/installer) +[![Total Downloads](http://img.shields.io/packagist/dt/endroid/installer.svg)](https://packagist.org/packages/endroid/installer) +[![Monthly Downloads](http://img.shields.io/packagist/dm/endroid/installer.svg)](https://packagist.org/packages/endroid/installer) +[![License](http://img.shields.io/packagist/l/endroid/installer.svg)](https://packagist.org/packages/endroid/installer) + +Composer plugin for installing configuration files. The installer automatically +detects the project type in which your library is installed and installs the +corresponding configuration files from your package. + +Read the [blog](https://medium.com/@endroid/auto-package-configuration-for-symfony-e14780e29d81) +for more information on why I created this plugin. + +## Installation + +``` bash +$ composer require endroid/installer +``` + +## Usage + +Add the configuration files you want to be copied upon installation. + +``` +.install + symfony + config + packages + package_name.yaml + routes + package_name.yaml +``` + +## Configuration + +Generally you want the files to be installed automatically but if you +experience issues with the installer or just don't want some package to be +auto installed you can specify this via your composer.json. + +``` +"extra": { + "endroid": { + "installer": { + "enabled": false, + "exclude": [ + "endroid/asset", + "endroid/embed" + ] + } + } +} +``` + +## Versioning + +Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatible +changes will be kept to a minimum but be aware that these can occur. Lock +your dependencies for production and test your code when upgrading. + +## License + +This bundle is under the MIT license. For the full copyright and license +information please view the LICENSE file that was distributed with this source code. diff --git a/vendor/endroid/installer/composer.json b/vendor/endroid/installer/composer.json new file mode 100755 index 0000000..201d3a8 --- /dev/null +++ b/vendor/endroid/installer/composer.json @@ -0,0 +1,26 @@ +{ + "name": "endroid/installer", + "type": "composer-plugin", + "license": "MIT", + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ], + "require": { + "php": ">=7.2", + "composer-plugin-api": "^1.1" + }, + "autoload": { + "psr-4": { + "Endroid\\Installer\\": "src" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + }, + "class": "Endroid\\Installer\\Installer" + } +} diff --git a/vendor/endroid/installer/phpunit.xml.dist b/vendor/endroid/installer/phpunit.xml.dist new file mode 100755 index 0000000..2c56aa1 --- /dev/null +++ b/vendor/endroid/installer/phpunit.xml.dist @@ -0,0 +1,8 @@ + + + + + tests + + + diff --git a/vendor/endroid/installer/src/Installer.php b/vendor/endroid/installer/src/Installer.php new file mode 100755 index 0000000..317e069 --- /dev/null +++ b/vendor/endroid/installer/src/Installer.php @@ -0,0 +1,148 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\Installer; + +use Composer\Composer; +use Composer\EventDispatcher\EventSubscriberInterface; +use Composer\IO\IOInterface; +use Composer\Plugin\PluginInterface; +use Composer\Script\ScriptEvents; + +final class Installer implements PluginInterface, EventSubscriberInterface +{ + private $composer; + private $io; + + private $projectTypes = [ + 'all' => [], + 'symfony' => [ + 'config/packages', + 'public', + ], + ]; + + public function activate(Composer $composer, IOInterface $io): void + { + $this->composer = $composer; + $this->io = $io; + } + + public static function getSubscribedEvents(): array + { + return [ + ScriptEvents::POST_INSTALL_CMD => ['install', 1], + ScriptEvents::POST_UPDATE_CMD => ['install', 1], + ]; + } + + public function install(): void + { + $enabled = $this->composer->getPackage()->getExtra()['endroid']['installer']['enabled'] ?? true; + + if (!$enabled) { + $this->io->write('Endroid Installer was disabled'); + + return; + } + + $foundCompabibleProjectType = false; + foreach ($this->projectTypes as $projectType => $paths) { + if ($this->isCompatibleProjectType($paths)) { + $foundCompabibleProjectType = true; + $this->installProjectType($projectType); + } + } + + if (!$foundCompabibleProjectType) { + $this->io->write('Endroid Installer did not detect a compatible project type for auto-configuration'); + + return; + } + } + + private function isCompatibleProjectType(array $paths): bool + { + foreach ($paths as $path) { + if (!file_exists(getcwd().DIRECTORY_SEPARATOR.$path)) { + return false; + } + } + + return true; + } + + private function installProjectType(string $projectType): void + { + $exclude = $this->composer->getPackage()->getExtra()['endroid']['installer']['exclude'] ?? []; + + $processedPackages = []; + $this->io->write('Endroid Installer detected project type "'.$projectType.'"'); + $packages = $this->composer->getRepositoryManager()->getLocalRepository()->getPackages(); + + foreach ($packages as $package) { + // Avoid handling duplicates: getPackages sometimes returns duplicates + if (in_array($package->getName(), $processedPackages)) { + continue; + } + $processedPackages[] = $package->getName(); + + // Skip excluded packages + if (in_array($package->getName(), $exclude)) { + $this->io->write('- Skipping '.$package->getName().''); + continue; + } + + // Check for installation files and install + $packagePath = $this->composer->getInstallationManager()->getInstallPath($package); + $sourcePath = $packagePath.DIRECTORY_SEPARATOR.'.install'.DIRECTORY_SEPARATOR.$projectType; + if (file_exists($sourcePath)) { + $changed = $this->copy($sourcePath, getcwd()); + if ($changed) { + $this->io->write('- Configured '.$package->getName().''); + } + } + } + } + + private function copy(string $sourcePath, string $targetPath): bool + { + $changed = false; + + /** @var \RecursiveDirectoryIterator $iterator */ + $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($sourcePath, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST); + + /** @var \SplFileInfo $fileInfo */ + foreach ($iterator as $fileInfo) { + $target = $targetPath.DIRECTORY_SEPARATOR.$iterator->getSubPathName(); + if ($fileInfo->isDir()) { + if (!is_dir($target)) { + mkdir($target); + } + } elseif (!file_exists($target)) { + $this->copyFile($fileInfo->getPathname(), $target); + $changed = true; + } + } + + return $changed; + } + + public function copyFile(string $source, string $target): void + { + if (file_exists($target)) { + return; + } + + copy($source, $target); + @chmod($target, fileperms($target) | (fileperms($source) & 0111)); + } +} diff --git a/vendor/endroid/installer/tests/InstallerTest.php b/vendor/endroid/installer/tests/InstallerTest.php new file mode 100755 index 0000000..81cfd05 --- /dev/null +++ b/vendor/endroid/installer/tests/InstallerTest.php @@ -0,0 +1,22 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\Installer\Tests; + +use PHPUnit\Framework\TestCase; + +class InstallerTest extends TestCase +{ + public function testNoTestsYet() + { + $this->assertTrue(true); + } +} diff --git a/vendor/endroid/qr-code/.gitignore b/vendor/endroid/qr-code/.gitignore new file mode 100755 index 0000000..c8153b5 --- /dev/null +++ b/vendor/endroid/qr-code/.gitignore @@ -0,0 +1,2 @@ +/composer.lock +/vendor/ diff --git a/vendor/endroid/qr-code/.travis.yml b/vendor/endroid/qr-code/.travis.yml new file mode 100755 index 0000000..eebdfa6 --- /dev/null +++ b/vendor/endroid/qr-code/.travis.yml @@ -0,0 +1,25 @@ +language: php + +php: + - '7.2' + - '7.3' + +matrix: + fast_finish: true + +env: + - COMPOSER_FLAGS="--prefer-lowest" + - COMPOSER_FLAGS="" + +before_install: + - curl -sS https://getcomposer.org/installer | php -- --filename=composer + +install: + - composer update --no-interaction --prefer-source $COMPOSER_FLAGS + +script: + - vendor/bin/test + +notifications: + email: + - info@endroid.nl diff --git a/vendor/endroid/qr-code/LICENSE b/vendor/endroid/qr-code/LICENSE new file mode 100755 index 0000000..0966ce0 --- /dev/null +++ b/vendor/endroid/qr-code/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) Jeroen van den Enden + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/endroid/qr-code/README.md b/vendor/endroid/qr-code/README.md new file mode 100755 index 0000000..0d605b9 --- /dev/null +++ b/vendor/endroid/qr-code/README.md @@ -0,0 +1,111 @@ +# QR Code + +*By [endroid](https://endroid.nl/)* + +[![Latest Stable Version](http://img.shields.io/packagist/v/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code) +[![Build Status](http://img.shields.io/travis/endroid/qr-code.svg)](http://travis-ci.org/endroid/qr-code) +[![Total Downloads](http://img.shields.io/packagist/dt/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code) +[![Monthly Downloads](http://img.shields.io/packagist/dm/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code) +[![License](http://img.shields.io/packagist/l/endroid/qr-code.svg)](https://packagist.org/packages/endroid/qr-code) + +This library helps you generate QR codes in a jiffy. Makes use of [bacon/bacon-qr-code](https://github.com/Bacon/BaconQrCode) +to generate the matrix and [khanamiryan/qrcode-detector-decoder](https://github.com/khanamiryan/php-qrcode-detector-decoder) +for validating generated QR codes. Further extended with Twig extensions, generation routes, a factory and a +Symfony bundle for easy installation and configuration. + +## Installation + +Use [Composer](https://getcomposer.org/) to install the library. + +``` bash +$ composer require endroid/qr-code +``` + +## Basic usage + +```php +use Endroid\QrCode\QrCode; + +$qrCode = new QrCode('Life is too short to be generating QR codes'); + +header('Content-Type: '.$qrCode->getContentType()); +echo $qrCode->writeString(); +``` + +## Advanced usage + +```php +use Endroid\QrCode\ErrorCorrectionLevel; +use Endroid\QrCode\LabelAlignment; +use Endroid\QrCode\QrCode; +use Endroid\QrCode\Response\QrCodeResponse; + +// Create a basic QR code +$qrCode = new QrCode('Life is too short to be generating QR codes'); +$qrCode->setSize(300); + +// Set advanced options +$qrCode->setWriterByName('png'); +$qrCode->setMargin(10); +$qrCode->setEncoding('UTF-8'); +$qrCode->setErrorCorrectionLevel(new ErrorCorrectionLevel(ErrorCorrectionLevel::HIGH)); +$qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]); +$qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]); +$qrCode->setLabel('Scan the code', 16, __DIR__.'/../assets/fonts/noto_sans.otf', LabelAlignment::CENTER); +$qrCode->setLogoPath(__DIR__.'/../assets/images/symfony.png'); +$qrCode->setLogoSize(150, 200); +$qrCode->setRoundBlockSize(true); +$qrCode->setValidateResult(false); +$qrCode->setWriterOptions(['exclude_xml_declaration' => true]); + +// Directly output the QR code +header('Content-Type: '.$qrCode->getContentType()); +echo $qrCode->writeString(); + +// Save it to a file +$qrCode->writeFile(__DIR__.'/qrcode.png'); + +// Create a response object +$response = new QrCodeResponse($qrCode); +``` + +![QR Code](https://endroid.nl/qr-code/Life%20is%20too%20short%20to%20be%20generating%20QR%20codes.png) + +## Built-in validation reader + +You can enable the built-in validation reader (disabled by default) by calling +setValidateResult(true). This validation reader does not guarantee that the QR +code will be readable by all readers but it helps you provide a minimum level +of quality. + +The readability of a QR code is primarily determined by the size, the input +length, the error correction level and any possible logo over the image so you +can tweak these parameters if you are looking for optimal results. You can also +check $qrCode->getRoundBlockSize() value to see if block dimensions are rounded +so that the image is more sharp and readable. + +Take note that the validator can consume quite amount of additional resources. + +## Symfony integration + +The [endroid/qr-code-bundle](https://github.com/endroid/qr-code-bundle) +integrates the QR code library in Symfony for an even better experience. + +* Configure your defaults (like image size, default writer etc.) +* Generate QR codes quickly from anywhere via the factory service +* Generate QR codes directly by typing an URL like /qr-code/\.png?size=300 +* Generate QR codes or URLs directly from Twig using dedicated functions + +Read the [bundle documentation](https://github.com/endroid/qr-code-bundle) +for more information. + +## Versioning + +Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility +breaking changes will be kept to a minimum but be aware that these can occur. +Lock your dependencies for production and test your code when upgrading. + +## License + +This bundle is under the MIT license. For the full copyright and license +information please view the LICENSE file that was distributed with this source code. diff --git a/vendor/endroid/qr-code/assets/fonts/noto_sans.otf b/vendor/endroid/qr-code/assets/fonts/noto_sans.otf new file mode 100755 index 0000000..296fbeb Binary files /dev/null and b/vendor/endroid/qr-code/assets/fonts/noto_sans.otf differ diff --git a/vendor/endroid/qr-code/assets/fonts/open_sans.ttf b/vendor/endroid/qr-code/assets/fonts/open_sans.ttf new file mode 100755 index 0000000..db43334 Binary files /dev/null and b/vendor/endroid/qr-code/assets/fonts/open_sans.ttf differ diff --git a/vendor/endroid/qr-code/assets/images/symfony.png b/vendor/endroid/qr-code/assets/images/symfony.png new file mode 100755 index 0000000..55fe198 Binary files /dev/null and b/vendor/endroid/qr-code/assets/images/symfony.png differ diff --git a/vendor/endroid/qr-code/composer.json b/vendor/endroid/qr-code/composer.json new file mode 100755 index 0000000..8fd52c9 --- /dev/null +++ b/vendor/endroid/qr-code/composer.json @@ -0,0 +1,43 @@ +{ + "name": "endroid/qr-code", + "description": "Endroid QR Code", + "keywords": ["endroid", "qrcode", "qr", "code", "bundle", "php"], + "homepage": "https://github.com/endroid/qr-code", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Jeroen van den Enden", + "email": "info@endroid.nl" + } + ], + "require": { + "php": ">=7.2", + "ext-gd": "*", + "bacon/bacon-qr-code": "^2.0", + "endroid/installer": "^1.1.5", + "khanamiryan/qrcode-detector-decoder": "^1.0.2", + "myclabs/php-enum": "^1.5", + "symfony/http-foundation": "^3.4|^4.0", + "symfony/options-resolver": "^3.4|^4.0", + "symfony/property-access": "^3.4|^4.0" + }, + "require-dev": { + "endroid/test": "^1.1.4" + }, + "autoload": { + "psr-4": { + "Endroid\\QrCode\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Endroid\\QrCode\\Tests\\": "tests/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + } +} diff --git a/vendor/endroid/qr-code/src/ErrorCorrectionLevel.php b/vendor/endroid/qr-code/src/ErrorCorrectionLevel.php new file mode 100755 index 0000000..9462e48 --- /dev/null +++ b/vendor/endroid/qr-code/src/ErrorCorrectionLevel.php @@ -0,0 +1,36 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode; + +use MyCLabs\Enum\Enum; +use BaconQrCode\Common\ErrorCorrectionLevel as BaconErrorCorrectionLevel; + +/** + * @method static ErrorCorrectionLevel LOW() + * @method static ErrorCorrectionLevel MEDIUM() + * @method static ErrorCorrectionLevel QUARTILE() + * @method static ErrorCorrectionLevel HIGH() + */ +class ErrorCorrectionLevel extends Enum +{ + const LOW = 'low'; + const MEDIUM = 'medium'; + const QUARTILE = 'quartile'; + const HIGH = 'high'; + + public function toBaconErrorCorrectionLevel(): BaconErrorCorrectionLevel + { + $name = strtoupper(substr($this->getValue(), 0, 1)); + + return BaconErrorCorrectionLevel::valueOf($name); + } +} diff --git a/vendor/endroid/qr-code/src/Exception/GenerateImageException.php b/vendor/endroid/qr-code/src/Exception/GenerateImageException.php new file mode 100755 index 0000000..02a3906 --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/GenerateImageException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +class GenerateImageException extends QrCodeException +{ +} diff --git a/vendor/endroid/qr-code/src/Exception/InvalidLogoException.php b/vendor/endroid/qr-code/src/Exception/InvalidLogoException.php new file mode 100755 index 0000000..6137e56 --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/InvalidLogoException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +class InvalidLogoException extends QrCodeException +{ +} diff --git a/vendor/endroid/qr-code/src/Exception/InvalidPathException.php b/vendor/endroid/qr-code/src/Exception/InvalidPathException.php new file mode 100755 index 0000000..987de08 --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/InvalidPathException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +class InvalidPathException extends QrCodeException +{ +} diff --git a/vendor/endroid/qr-code/src/Exception/InvalidWriterException.php b/vendor/endroid/qr-code/src/Exception/InvalidWriterException.php new file mode 100755 index 0000000..62a609f --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/InvalidWriterException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +class InvalidWriterException extends QrCodeException +{ +} diff --git a/vendor/endroid/qr-code/src/Exception/MissingExtensionException.php b/vendor/endroid/qr-code/src/Exception/MissingExtensionException.php new file mode 100755 index 0000000..d9ea2c7 --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/MissingExtensionException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +class MissingExtensionException extends QrCodeException +{ +} diff --git a/vendor/endroid/qr-code/src/Exception/MissingFunctionException.php b/vendor/endroid/qr-code/src/Exception/MissingFunctionException.php new file mode 100755 index 0000000..667dbbd --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/MissingFunctionException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +class MissingFunctionException extends QrCodeException +{ +} diff --git a/vendor/endroid/qr-code/src/Exception/MissingLogoHeightException.php b/vendor/endroid/qr-code/src/Exception/MissingLogoHeightException.php new file mode 100755 index 0000000..fcd66bc --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/MissingLogoHeightException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +class MissingLogoHeightException extends QrCodeException +{ +} diff --git a/vendor/endroid/qr-code/src/Exception/QrCodeException.php b/vendor/endroid/qr-code/src/Exception/QrCodeException.php new file mode 100755 index 0000000..74e6139 --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/QrCodeException.php @@ -0,0 +1,18 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +use Exception; + +abstract class QrCodeException extends Exception +{ +} diff --git a/vendor/endroid/qr-code/src/Exception/UnsupportedExtensionException.php b/vendor/endroid/qr-code/src/Exception/UnsupportedExtensionException.php new file mode 100755 index 0000000..520e491 --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/UnsupportedExtensionException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +class UnsupportedExtensionException extends QrCodeException +{ +} diff --git a/vendor/endroid/qr-code/src/Exception/ValidationException.php b/vendor/endroid/qr-code/src/Exception/ValidationException.php new file mode 100755 index 0000000..4f6a227 --- /dev/null +++ b/vendor/endroid/qr-code/src/Exception/ValidationException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Exception; + +class ValidationException extends QrCodeException +{ +} diff --git a/vendor/endroid/qr-code/src/Factory/QrCodeFactory.php b/vendor/endroid/qr-code/src/Factory/QrCodeFactory.php new file mode 100755 index 0000000..57342bd --- /dev/null +++ b/vendor/endroid/qr-code/src/Factory/QrCodeFactory.php @@ -0,0 +1,99 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Factory; + +use Endroid\QrCode\ErrorCorrectionLevel; +use Endroid\QrCode\QrCode; +use Endroid\QrCode\QrCodeInterface; +use Endroid\QrCode\WriterRegistryInterface; +use Symfony\Component\OptionsResolver\OptionsResolver; +use Symfony\Component\PropertyAccess\PropertyAccess; + +class QrCodeFactory implements QrCodeFactoryInterface +{ + private $writerRegistry; + private $optionsResolver; + private $defaultOptions; + private $definedOptions = [ + 'writer', + 'writer_options', + 'size', + 'margin', + 'foreground_color', + 'background_color', + 'encoding', + 'round_block_size', + 'error_correction_level', + 'logo_path', + 'logo_width', + 'logo_height', + 'label', + 'label_font_size', + 'label_font_path', + 'label_alignment', + 'label_margin', + 'validate_result', + ]; + + public function __construct(array $defaultOptions = [], WriterRegistryInterface $writerRegistry = null) + { + $this->defaultOptions = $defaultOptions; + $this->writerRegistry = $writerRegistry; + } + + public function create(string $text = '', array $options = []): QrCodeInterface + { + $options = $this->getOptionsResolver()->resolve($options); + $accessor = PropertyAccess::createPropertyAccessor(); + + $qrCode = new QrCode($text); + + if ($this->writerRegistry instanceof WriterRegistryInterface) { + $qrCode->setWriterRegistry($this->writerRegistry); + } + + foreach ($this->definedOptions as $option) { + if (isset($options[$option])) { + if ('writer' === $option) { + $options['writer_by_name'] = $options[$option]; + $option = 'writer_by_name'; + } + if ('error_correction_level' === $option) { + $options[$option] = new ErrorCorrectionLevel($options[$option]); + } + $accessor->setValue($qrCode, $option, $options[$option]); + } + } + + return $qrCode; + } + + private function getOptionsResolver(): OptionsResolver + { + if (!$this->optionsResolver instanceof OptionsResolver) { + $this->optionsResolver = $this->createOptionsResolver(); + } + + return $this->optionsResolver; + } + + private function createOptionsResolver(): OptionsResolver + { + $optionsResolver = new OptionsResolver(); + $optionsResolver + ->setDefaults($this->defaultOptions) + ->setDefined($this->definedOptions) + ; + + return $optionsResolver; + } +} diff --git a/vendor/endroid/qr-code/src/Factory/QrCodeFactoryInterface.php b/vendor/endroid/qr-code/src/Factory/QrCodeFactoryInterface.php new file mode 100755 index 0000000..2953fd6 --- /dev/null +++ b/vendor/endroid/qr-code/src/Factory/QrCodeFactoryInterface.php @@ -0,0 +1,19 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Factory; + +use Endroid\QrCode\QrCodeInterface; + +interface QrCodeFactoryInterface +{ + public function create(string $text = '', array $options = []): QrCodeInterface; +} diff --git a/vendor/endroid/qr-code/src/LabelAlignment.php b/vendor/endroid/qr-code/src/LabelAlignment.php new file mode 100755 index 0000000..2f4c42d --- /dev/null +++ b/vendor/endroid/qr-code/src/LabelAlignment.php @@ -0,0 +1,26 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode; + +use MyCLabs\Enum\Enum; + +/** + * @method static LabelAlignment LEFT() + * @method static LabelAlignment CENTER() + * @method static LabelAlignment RIGHT() + */ +class LabelAlignment extends Enum +{ + const LEFT = 'left'; + const CENTER = 'center'; + const RIGHT = 'right'; +} diff --git a/vendor/endroid/qr-code/src/QrCode.php b/vendor/endroid/qr-code/src/QrCode.php new file mode 100755 index 0000000..27803e6 --- /dev/null +++ b/vendor/endroid/qr-code/src/QrCode.php @@ -0,0 +1,410 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode; + +use BaconQrCode\Encoder\Encoder; +use Endroid\QrCode\Exception\InvalidPathException; +use Endroid\QrCode\Exception\UnsupportedExtensionException; +use Endroid\QrCode\Writer\WriterInterface; + +class QrCode implements QrCodeInterface +{ + const LABEL_FONT_PATH_DEFAULT = __DIR__.'/../assets/fonts/noto_sans.otf'; + + private $text; + + private $size = 300; + private $margin = 10; + + private $foregroundColor = [ + 'r' => 0, + 'g' => 0, + 'b' => 0, + 'a' => 0, + ]; + + private $backgroundColor = [ + 'r' => 255, + 'g' => 255, + 'b' => 255, + 'a' => 0, + ]; + + private $encoding = 'UTF-8'; + private $roundBlockSize = true; + private $errorCorrectionLevel; + + private $logoPath; + private $logoWidth; + private $logoHeight; + + private $label; + private $labelFontSize = 16; + private $labelFontPath = self::LABEL_FONT_PATH_DEFAULT; + private $labelAlignment; + private $labelMargin = [ + 't' => 0, + 'r' => 10, + 'b' => 10, + 'l' => 10, + ]; + + private $writerRegistry; + private $writer; + private $writerOptions = []; + private $validateResult = false; + + public function __construct(string $text = '') + { + $this->text = $text; + + $this->errorCorrectionLevel = new ErrorCorrectionLevel(ErrorCorrectionLevel::LOW); + $this->labelAlignment = new LabelAlignment(LabelAlignment::CENTER); + + $this->createWriterRegistry(); + } + + public function setText(string $text): void + { + $this->text = $text; + } + + public function getText(): string + { + return $this->text; + } + + public function setSize(int $size): void + { + $this->size = $size; + } + + public function getSize(): int + { + return $this->size; + } + + public function setMargin(int $margin): void + { + $this->margin = $margin; + } + + public function getMargin(): int + { + return $this->margin; + } + + public function setForegroundColor(array $foregroundColor): void + { + if (!isset($foregroundColor['a'])) { + $foregroundColor['a'] = 0; + } + + foreach ($foregroundColor as &$color) { + $color = intval($color); + } + + $this->foregroundColor = $foregroundColor; + } + + public function getForegroundColor(): array + { + return $this->foregroundColor; + } + + public function setBackgroundColor(array $backgroundColor): void + { + if (!isset($backgroundColor['a'])) { + $backgroundColor['a'] = 0; + } + + foreach ($backgroundColor as &$color) { + $color = intval($color); + } + + $this->backgroundColor = $backgroundColor; + } + + public function getBackgroundColor(): array + { + return $this->backgroundColor; + } + + public function setEncoding(string $encoding): void + { + $this->encoding = $encoding; + } + + public function getEncoding(): string + { + return $this->encoding; + } + + public function setRoundBlockSize(bool $roundBlockSize): void + { + $this->roundBlockSize = $roundBlockSize; + } + + public function getRoundBlockSize(): bool + { + return $this->roundBlockSize; + } + + public function setErrorCorrectionLevel(ErrorCorrectionLevel $errorCorrectionLevel): void + { + $this->errorCorrectionLevel = $errorCorrectionLevel; + } + + public function getErrorCorrectionLevel(): ErrorCorrectionLevel + { + return $this->errorCorrectionLevel; + } + + public function setLogoPath(string $logoPath): void + { + $logoPath = realpath($logoPath); + + if (false === $logoPath || !is_file($logoPath)) { + throw new InvalidPathException('Invalid logo path: '.$logoPath); + } + + $this->logoPath = $logoPath; + } + + public function getLogoPath(): ?string + { + return $this->logoPath; + } + + public function setLogoSize(int $logoWidth, int $logoHeight = null): void + { + $this->logoWidth = $logoWidth; + $this->logoHeight = $logoHeight; + } + + public function setLogoWidth(int $logoWidth): void + { + $this->logoWidth = $logoWidth; + } + + public function getLogoWidth(): ?int + { + return $this->logoWidth; + } + + public function setLogoHeight(int $logoHeight): void + { + $this->logoHeight = $logoHeight; + } + + public function getLogoHeight(): ?int + { + return $this->logoHeight; + } + + public function setLabel(string $label, int $labelFontSize = null, string $labelFontPath = null, string $labelAlignment = null, array $labelMargin = null): void + { + $this->label = $label; + + if (null !== $labelFontSize) { + $this->setLabelFontSize($labelFontSize); + } + + if (null !== $labelFontPath) { + $this->setLabelFontPath($labelFontPath); + } + + if (null !== $labelAlignment) { + $this->setLabelAlignment($labelAlignment); + } + + if (null !== $labelMargin) { + $this->setLabelMargin($labelMargin); + } + } + + public function getLabel(): ?string + { + return $this->label; + } + + public function setLabelFontSize(int $labelFontSize): void + { + $this->labelFontSize = $labelFontSize; + } + + public function getLabelFontSize(): int + { + return $this->labelFontSize; + } + + public function setLabelFontPath(string $labelFontPath): void + { + $resolvedLabelFontPath = (string) realpath($labelFontPath); + + if (!is_file($resolvedLabelFontPath)) { + throw new InvalidPathException('Invalid label font path: '.$labelFontPath); + } + + $this->labelFontPath = $resolvedLabelFontPath; + } + + public function getLabelFontPath(): string + { + return $this->labelFontPath; + } + + public function setLabelAlignment(string $labelAlignment): void + { + $this->labelAlignment = new LabelAlignment($labelAlignment); + } + + public function getLabelAlignment(): string + { + return $this->labelAlignment->getValue(); + } + + public function setLabelMargin(array $labelMargin): void + { + $this->labelMargin = array_merge($this->labelMargin, $labelMargin); + } + + public function getLabelMargin(): array + { + return $this->labelMargin; + } + + public function setWriterRegistry(WriterRegistryInterface $writerRegistry): void + { + $this->writerRegistry = $writerRegistry; + } + + public function setWriter(WriterInterface $writer): void + { + $this->writer = $writer; + } + + public function getWriter(string $name = null): WriterInterface + { + if (!is_null($name)) { + return $this->writerRegistry->getWriter($name); + } + + if ($this->writer instanceof WriterInterface) { + return $this->writer; + } + + return $this->writerRegistry->getDefaultWriter(); + } + + public function setWriterOptions(array $writerOptions): void + { + $this->writerOptions = $writerOptions; + } + + public function getWriterOptions(): array + { + return $this->writerOptions; + } + + private function createWriterRegistry() + { + $this->writerRegistry = new WriterRegistry(); + $this->writerRegistry->loadDefaultWriters(); + } + + public function setWriterByName(string $name) + { + $this->writer = $this->getWriter($name); + } + + public function setWriterByPath(string $path): void + { + $extension = pathinfo($path, PATHINFO_EXTENSION); + + $this->setWriterByExtension($extension); + } + + public function setWriterByExtension(string $extension): void + { + foreach ($this->writerRegistry->getWriters() as $writer) { + if ($writer->supportsExtension($extension)) { + $this->writer = $writer; + + return; + } + } + + throw new UnsupportedExtensionException('Missing writer for extension "'.$extension.'"'); + } + + public function writeString(): string + { + return $this->getWriter()->writeString($this); + } + + public function writeDataUri(): string + { + return $this->getWriter()->writeDataUri($this); + } + + public function writeFile(string $path): void + { + $this->getWriter()->writeFile($this, $path); + } + + public function getContentType(): string + { + return $this->getWriter()->getContentType(); + } + + public function setValidateResult(bool $validateResult): void + { + $this->validateResult = $validateResult; + } + + public function getValidateResult(): bool + { + return $this->validateResult; + } + + public function getData(): array + { + $baconErrorCorrectionLevel = $this->errorCorrectionLevel->toBaconErrorCorrectionLevel(); + + $baconQrCode = Encoder::encode($this->text, $baconErrorCorrectionLevel, $this->encoding); + + $matrix = $baconQrCode->getMatrix()->getArray()->toArray(); + + foreach ($matrix as &$row) { + $row = $row->toArray(); + } + + $data = ['matrix' => $matrix]; + $data['block_count'] = count($matrix[0]); + $data['block_size'] = $this->size / $data['block_count']; + if ($this->roundBlockSize) { + $data['block_size'] = intval(floor($data['block_size'])); + } + $data['inner_width'] = $data['block_size'] * $data['block_count']; + $data['inner_height'] = $data['block_size'] * $data['block_count']; + $data['outer_width'] = $this->size + 2 * $this->margin; + $data['outer_height'] = $this->size + 2 * $this->margin; + $data['margin_left'] = ($data['outer_width'] - $data['inner_width']) / 2; + if ($this->roundBlockSize) { + $data['margin_left'] = intval(floor($data['margin_left'])); + } + $data['margin_right'] = $data['outer_width'] - $data['inner_width'] - $data['margin_left']; + + return $data; + } +} diff --git a/vendor/endroid/qr-code/src/QrCodeInterface.php b/vendor/endroid/qr-code/src/QrCodeInterface.php new file mode 100755 index 0000000..e6382a7 --- /dev/null +++ b/vendor/endroid/qr-code/src/QrCodeInterface.php @@ -0,0 +1,63 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode; + +interface QrCodeInterface +{ + public function getText(): string; + + public function getSize(): int; + + public function getMargin(): int; + + public function getForegroundColor(): array; + + public function getBackgroundColor(): array; + + public function getEncoding(): string; + + public function getRoundBlockSize(): bool; + + public function getErrorCorrectionLevel(): ErrorCorrectionLevel; + + public function getLogoPath(): ?string; + + public function getLogoWidth(): ?int; + + public function getLogoHeight(): ?int; + + public function getLabel(): ?string; + + public function getLabelFontPath(): string; + + public function getLabelFontSize(): int; + + public function getLabelAlignment(): string; + + public function getLabelMargin(): array; + + public function getValidateResult(): bool; + + public function getWriterOptions(): array; + + public function getContentType(): string; + + public function setWriterRegistry(WriterRegistryInterface $writerRegistry): void; + + public function writeString(): string; + + public function writeDataUri(): string; + + public function writeFile(string $path): void; + + public function getData(): array; +} diff --git a/vendor/endroid/qr-code/src/Response/QrCodeResponse.php b/vendor/endroid/qr-code/src/Response/QrCodeResponse.php new file mode 100755 index 0000000..8540998 --- /dev/null +++ b/vendor/endroid/qr-code/src/Response/QrCodeResponse.php @@ -0,0 +1,23 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Response; + +use Endroid\QrCode\QrCodeInterface; +use Symfony\Component\HttpFoundation\Response; + +class QrCodeResponse extends Response +{ + public function __construct(QrCodeInterface $qrCode) + { + parent::__construct($qrCode->writeString(), Response::HTTP_OK, ['Content-Type' => $qrCode->getContentType()]); + } +} diff --git a/vendor/endroid/qr-code/src/Writer/AbstractWriter.php b/vendor/endroid/qr-code/src/Writer/AbstractWriter.php new file mode 100755 index 0000000..48c5d91 --- /dev/null +++ b/vendor/endroid/qr-code/src/Writer/AbstractWriter.php @@ -0,0 +1,42 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Writer; + +use Endroid\QrCode\QrCodeInterface; + +abstract class AbstractWriter implements WriterInterface +{ + public function writeDataUri(QrCodeInterface $qrCode): string + { + $dataUri = 'data:'.$this->getContentType().';base64,'.base64_encode($this->writeString($qrCode)); + + return $dataUri; + } + + public function writeFile(QrCodeInterface $qrCode, string $path): void + { + $string = $this->writeString($qrCode); + file_put_contents($path, $string); + } + + public static function supportsExtension(string $extension): bool + { + return in_array($extension, static::getSupportedExtensions()); + } + + public static function getSupportedExtensions(): array + { + return []; + } + + abstract public function getName(): string; +} diff --git a/vendor/endroid/qr-code/src/Writer/BinaryWriter.php b/vendor/endroid/qr-code/src/Writer/BinaryWriter.php new file mode 100755 index 0000000..aed418f --- /dev/null +++ b/vendor/endroid/qr-code/src/Writer/BinaryWriter.php @@ -0,0 +1,47 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Writer; + +use Endroid\QrCode\QrCodeInterface; + +class BinaryWriter extends AbstractWriter +{ + public function writeString(QrCodeInterface $qrCode): string + { + $rows = []; + $data = $qrCode->getData(); + foreach ($data['matrix'] as $row) { + $values = ''; + foreach ($row as $value) { + $values .= $value; + } + $rows[] = $values; + } + + return implode("\n", $rows); + } + + public static function getContentType(): string + { + return 'text/plain'; + } + + public static function getSupportedExtensions(): array + { + return ['bin', 'txt']; + } + + public function getName(): string + { + return 'binary'; + } +} diff --git a/vendor/endroid/qr-code/src/Writer/DebugWriter.php b/vendor/endroid/qr-code/src/Writer/DebugWriter.php new file mode 100755 index 0000000..fd28f19 --- /dev/null +++ b/vendor/endroid/qr-code/src/Writer/DebugWriter.php @@ -0,0 +1,60 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Writer; + +use Endroid\QrCode\QrCodeInterface; +use ReflectionClass; +use Exception; + +class DebugWriter extends AbstractWriter +{ + public function writeString(QrCodeInterface $qrCode): string + { + $data = []; + $skip = ['getData']; + + $reflectionClass = new ReflectionClass($qrCode); + foreach ($reflectionClass->getMethods() as $method) { + $methodName = $method->getShortName(); + if (0 === strpos($methodName, 'get') && 0 == $method->getNumberOfParameters() && !in_array($methodName, $skip)) { + $value = $qrCode->{$methodName}(); + if (is_array($value) && !is_object(current($value))) { + $value = '['.implode(', ', $value).']'; + } elseif (is_bool($value)) { + $value = $value ? 'true' : 'false'; + } elseif (is_string($value)) { + $value = '"'.$value.'"'; + } elseif (is_null($value)) { + $value = 'null'; + } + try { + $data[] = $methodName.': '.$value; + } catch (Exception $exception) { + } + } + } + + $string = implode(" \n", $data); + + return $string; + } + + public static function getContentType(): string + { + return 'text/plain'; + } + + public function getName(): string + { + return 'debug'; + } +} diff --git a/vendor/endroid/qr-code/src/Writer/EpsWriter.php b/vendor/endroid/qr-code/src/Writer/EpsWriter.php new file mode 100755 index 0000000..97a5fb8 --- /dev/null +++ b/vendor/endroid/qr-code/src/Writer/EpsWriter.php @@ -0,0 +1,57 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Writer; + +use Endroid\QrCode\QrCodeInterface; + +class EpsWriter extends AbstractWriter +{ + public function writeString(QrCodeInterface $qrCode): string + { + $data = $qrCode->getData(); + + $epsData = []; + $epsData[] = '%!PS-Adobe-3.0 EPSF-3.0'; + $epsData[] = '%%BoundingBox: 0 0 '.$data['outer_width'].' '.$data['outer_height']; + $epsData[] = '/F { rectfill } def'; + $epsData[] = number_format($qrCode->getBackgroundColor()['r'] / 100, 2, '.', ',').' '.number_format($qrCode->getBackgroundColor()['g'] / 100, 2, '.', ',').' '.number_format($qrCode->getBackgroundColor()['b'] / 100, 2, '.', ',').' setrgbcolor'; + $epsData[] = '0 0 '.$data['outer_width'].' '.$data['outer_height'].' F'; + $epsData[] = number_format($qrCode->getForegroundColor()['r'] / 100, 2, '.', ',').' '.number_format($qrCode->getForegroundColor()['g'] / 100, 2, '.', ',').' '.number_format($qrCode->getForegroundColor()['b'] / 100, 2, '.', ',').' setrgbcolor'; + + foreach ($data['matrix'] as $row => $values) { + foreach ($values as $column => $value) { + if (1 === $value) { + $x = $data['margin_left'] + $data['block_size'] * $column; + $y = $data['margin_left'] + $data['block_size'] * $row; + $epsData[] = $x.' '.$y.' '.$data['block_size'].' '.$data['block_size'].' F'; + } + } + } + + return implode("\n", $epsData); + } + + public static function getContentType(): string + { + return 'image/eps'; + } + + public static function getSupportedExtensions(): array + { + return ['eps']; + } + + public function getName(): string + { + return 'eps'; + } +} diff --git a/vendor/endroid/qr-code/src/Writer/PngWriter.php b/vendor/endroid/qr-code/src/Writer/PngWriter.php new file mode 100755 index 0000000..16323f5 --- /dev/null +++ b/vendor/endroid/qr-code/src/Writer/PngWriter.php @@ -0,0 +1,196 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Writer; + +use Endroid\QrCode\Exception\GenerateImageException; +use Endroid\QrCode\Exception\MissingFunctionException; +use Endroid\QrCode\Exception\ValidationException; +use Endroid\QrCode\LabelAlignment; +use Endroid\QrCode\QrCodeInterface; +use Zxing\QrReader; + +class PngWriter extends AbstractWriter +{ + public function writeString(QrCodeInterface $qrCode): string + { + $image = $this->createImage($qrCode->getData(), $qrCode); + + if (null !== $qrCode->getLogoPath()) { + $image = $this->addLogo($image, $qrCode->getLogoPath(), $qrCode->getLogoWidth(), $qrCode->getLogoHeight()); + } + + if (null !== $qrCode->getLabel()) { + $image = $this->addLabel($image, $qrCode->getLabel(), $qrCode->getLabelFontPath(), $qrCode->getLabelFontSize(), $qrCode->getLabelAlignment(), $qrCode->getLabelMargin(), $qrCode->getForegroundColor(), $qrCode->getBackgroundColor()); + } + + $string = $this->imageToString($image); + + if ($qrCode->getValidateResult()) { + $reader = new QrReader($string, QrReader::SOURCE_TYPE_BLOB); + if ($reader->text() !== $qrCode->getText()) { + throw new ValidationException( + 'Built-in validation reader read "'.$reader->text().'" instead of "'.$qrCode->getText().'". + Adjust your parameters to increase readability or disable built-in validation.' + ); + } + } + + return $string; + } + + private function createImage(array $data, QrCodeInterface $qrCode) + { + $baseSize = $qrCode->getRoundBlockSize() ? $data['block_size'] : 25; + + $baseImage = $this->createBaseImage($baseSize, $data, $qrCode); + $interpolatedImage = $this->createInterpolatedImage($baseImage, $data, $qrCode); + + return $interpolatedImage; + } + + private function createBaseImage(int $baseSize, array $data, QrCodeInterface $qrCode) + { + $image = imagecreatetruecolor($data['block_count'] * $baseSize, $data['block_count'] * $baseSize); + + if (!is_resource($image)) { + throw new GenerateImageException('Unable to generate image: check your GD installation'); + } + + $foregroundColor = imagecolorallocatealpha($image, $qrCode->getForegroundColor()['r'], $qrCode->getForegroundColor()['g'], $qrCode->getForegroundColor()['b'], $qrCode->getForegroundColor()['a']); + $backgroundColor = imagecolorallocatealpha($image, $qrCode->getBackgroundColor()['r'], $qrCode->getBackgroundColor()['g'], $qrCode->getBackgroundColor()['b'], $qrCode->getBackgroundColor()['a']); + imagefill($image, 0, 0, $backgroundColor); + + foreach ($data['matrix'] as $row => $values) { + foreach ($values as $column => $value) { + if (1 === $value) { + imagefilledrectangle($image, $column * $baseSize, $row * $baseSize, intval(($column + 1) * $baseSize), intval(($row + 1) * $baseSize), $foregroundColor); + } + } + } + + return $image; + } + + private function createInterpolatedImage($baseImage, array $data, QrCodeInterface $qrCode) + { + $image = imagecreatetruecolor($data['outer_width'], $data['outer_height']); + + if (!is_resource($image)) { + throw new GenerateImageException('Unable to generate image: check your GD installation'); + } + + $backgroundColor = imagecolorallocatealpha($image, $qrCode->getBackgroundColor()['r'], $qrCode->getBackgroundColor()['g'], $qrCode->getBackgroundColor()['b'], $qrCode->getBackgroundColor()['a']); + imagefill($image, 0, 0, $backgroundColor); + imagecopyresampled($image, $baseImage, (int) $data['margin_left'], (int) $data['margin_left'], 0, 0, (int) $data['inner_width'], (int) $data['inner_height'], imagesx($baseImage), imagesy($baseImage)); + imagesavealpha($image, true); + + return $image; + } + + private function addLogo($sourceImage, string $logoPath, int $logoWidth = null, int $logoHeight = null) + { + $logoImage = imagecreatefromstring((string) file_get_contents($logoPath)); + + if (!is_resource($logoImage)) { + throw new GenerateImageException('Unable to generate image: check your GD installation'); + } + + $logoSourceWidth = imagesx($logoImage); + $logoSourceHeight = imagesy($logoImage); + + if (null === $logoWidth) { + $logoWidth = $logoSourceWidth; + } + + if (null === $logoHeight) { + $aspectRatio = $logoWidth / $logoSourceWidth; + $logoHeight = intval($logoSourceHeight * $aspectRatio); + } + + $logoX = imagesx($sourceImage) / 2 - $logoWidth / 2; + $logoY = imagesy($sourceImage) / 2 - $logoHeight / 2; + + imagecopyresampled($sourceImage, $logoImage, (int) $logoX, (int) $logoY, 0, 0, $logoWidth, $logoHeight, $logoSourceWidth, $logoSourceHeight); + + return $sourceImage; + } + + private function addLabel($sourceImage, string $label, string $labelFontPath, int $labelFontSize, string $labelAlignment, array $labelMargin, array $foregroundColor, array $backgroundColor) + { + if (!function_exists('imagettfbbox')) { + throw new MissingFunctionException('Missing function "imagettfbbox", please make sure you installed the FreeType library'); + } + + $labelBox = imagettfbbox($labelFontSize, 0, $labelFontPath, $label); + $labelBoxWidth = intval($labelBox[2] - $labelBox[0]); + $labelBoxHeight = intval($labelBox[0] - $labelBox[7]); + + $sourceWidth = imagesx($sourceImage); + $sourceHeight = imagesy($sourceImage); + $targetWidth = $sourceWidth; + $targetHeight = $sourceHeight + $labelBoxHeight + $labelMargin['t'] + $labelMargin['b']; + + // Create empty target image + $targetImage = imagecreatetruecolor($targetWidth, $targetHeight); + + if (!is_resource($targetImage)) { + throw new GenerateImageException('Unable to generate image: check your GD installation'); + } + + $foregroundColor = imagecolorallocate($targetImage, $foregroundColor['r'], $foregroundColor['g'], $foregroundColor['b']); + $backgroundColor = imagecolorallocate($targetImage, $backgroundColor['r'], $backgroundColor['g'], $backgroundColor['b']); + imagefill($targetImage, 0, 0, $backgroundColor); + + // Copy source image to target image + imagecopyresampled($targetImage, $sourceImage, 0, 0, 0, 0, $sourceWidth, $sourceHeight, $sourceWidth, $sourceHeight); + + switch ($labelAlignment) { + case LabelAlignment::LEFT: + $labelX = $labelMargin['l']; + break; + case LabelAlignment::RIGHT: + $labelX = $targetWidth - $labelBoxWidth - $labelMargin['r']; + break; + default: + $labelX = intval($targetWidth / 2 - $labelBoxWidth / 2); + break; + } + + $labelY = $targetHeight - $labelMargin['b']; + imagettftext($targetImage, $labelFontSize, 0, $labelX, $labelY, $foregroundColor, $labelFontPath, $label); + + return $targetImage; + } + + private function imageToString($image): string + { + ob_start(); + imagepng($image); + + return (string) ob_get_clean(); + } + + public static function getContentType(): string + { + return 'image/png'; + } + + public static function getSupportedExtensions(): array + { + return ['png']; + } + + public function getName(): string + { + return 'png'; + } +} diff --git a/vendor/endroid/qr-code/src/Writer/SvgWriter.php b/vendor/endroid/qr-code/src/Writer/SvgWriter.php new file mode 100755 index 0000000..43c9aec --- /dev/null +++ b/vendor/endroid/qr-code/src/Writer/SvgWriter.php @@ -0,0 +1,159 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Writer; + +use Endroid\QrCode\Exception\GenerateImageException; +use Endroid\QrCode\Exception\InvalidLogoException; +use Endroid\QrCode\Exception\MissingExtensionException; +use Endroid\QrCode\Exception\MissingLogoHeightException; +use Endroid\QrCode\Exception\ValidationException; +use Endroid\QrCode\QrCodeInterface; +use SimpleXMLElement; + +class SvgWriter extends AbstractWriter +{ + public function writeString(QrCodeInterface $qrCode): string + { + if ($qrCode->getValidateResult()) { + throw new ValidationException('Built-in validation reader can not check SVG images: please disable via setValidateResult(false)'); + } + + $data = $qrCode->getData(); + + $svg = new SimpleXMLElement(''); + $svg->addAttribute('version', '1.1'); + $svg->addAttribute('width', $data['outer_width'].'px'); + $svg->addAttribute('height', $data['outer_height'].'px'); + $svg->addAttribute('viewBox', '0 0 '.$data['outer_width'].' '.$data['outer_height']); + $svg->addChild('defs'); + + // Block definition + $blockDefinition = $svg->defs->addChild('rect'); + $blockDefinition->addAttribute('id', 'block'); + $blockDefinition->addAttribute('width', strval($data['block_size'])); + $blockDefinition->addAttribute('height', strval($data['block_size'])); + $blockDefinition->addAttribute('fill', '#'.sprintf('%02x%02x%02x', $qrCode->getForegroundColor()['r'], $qrCode->getForegroundColor()['g'], $qrCode->getForegroundColor()['b'])); + $blockDefinition->addAttribute('fill-opacity', strval($this->getOpacity($qrCode->getForegroundColor()['a']))); + + // Background + $background = $svg->addChild('rect'); + $background->addAttribute('x', '0'); + $background->addAttribute('y', '0'); + $background->addAttribute('width', strval($data['outer_width'])); + $background->addAttribute('height', strval($data['outer_height'])); + $background->addAttribute('fill', '#'.sprintf('%02x%02x%02x', $qrCode->getBackgroundColor()['r'], $qrCode->getBackgroundColor()['g'], $qrCode->getBackgroundColor()['b'])); + $background->addAttribute('fill-opacity', strval($this->getOpacity($qrCode->getBackgroundColor()['a']))); + + foreach ($data['matrix'] as $row => $values) { + foreach ($values as $column => $value) { + if (1 === $value) { + $block = $svg->addChild('use'); + $block->addAttribute('x', strval($data['margin_left'] + $data['block_size'] * $column)); + $block->addAttribute('y', strval($data['margin_left'] + $data['block_size'] * $row)); + $block->addAttribute('xlink:href', '#block', 'http://www.w3.org/1999/xlink'); + } + } + } + + if (null !== $qrCode->getLogoPath()) { + $this->addLogo($svg, $data['outer_width'], $data['outer_height'], $qrCode->getLogoPath(), $qrCode->getLogoWidth(), $qrCode->getLogoHeight()); + } + + $xml = $svg->asXML(); + + if (!is_string($xml)) { + throw new GenerateImageException('Unable to save SVG XML'); + } + + $options = $qrCode->getWriterOptions(); + if (isset($options['exclude_xml_declaration']) && $options['exclude_xml_declaration']) { + $xml = str_replace("\n", '', $xml); + } + + return $xml; + } + + private function addLogo(SimpleXMLElement $svg, int $imageWidth, int $imageHeight, string $logoPath, int $logoWidth = null, int $logoHeight = null): void + { + $mimeType = $this->getMimeType($logoPath); + $imageData = file_get_contents($logoPath); + + if (!is_string($imageData)) { + throw new InvalidLogoException('Invalid logo at path "'.$logoPath.'"'); + } + + if (null === $logoHeight) { + if ('image/svg+xml' === $mimeType) { + throw new MissingLogoHeightException('SVG Logos require an explicit height set via setLogoSize($width, $height)'); + } else { + $logoImage = imagecreatefromstring($imageData); + + if (!is_resource($logoImage)) { + throw new GenerateImageException('Unable to generate image: check your GD installation'); + } + + $aspectRatio = $logoWidth / imagesx($logoImage); + $logoHeight = intval(imagesy($logoImage) * $aspectRatio); + } + } + + $imageDefinition = $svg->addChild('image'); + $imageDefinition->addAttribute('x', strval($imageWidth / 2 - $logoWidth / 2)); + $imageDefinition->addAttribute('y', strval($imageHeight / 2 - $logoHeight / 2)); + $imageDefinition->addAttribute('width', strval($logoWidth)); + $imageDefinition->addAttribute('height', strval($logoHeight)); + $imageDefinition->addAttribute('preserveAspectRatio', 'none'); + $imageDefinition->addAttribute('xlink:href', 'data:'.$mimeType.';base64,'.base64_encode($imageData)); + } + + private function getMimeType(string $path): string + { + if (!function_exists('mime_content_type')) { + throw new MissingExtensionException('You need the ext-fileinfo extension to determine logo mime type'); + } + + $mimeType = mime_content_type($path); + + if (!is_string($mimeType)) { + throw new InvalidLogoException('Could not determine mime type'); + } + + // Passing mime type image/svg results in invisible images + if ('image/svg' === $mimeType) { + return 'image/svg+xml'; + } + + return $mimeType; + } + + private function getOpacity(int $alpha): float + { + $opacity = 1 - $alpha / 127; + + return $opacity; + } + + public static function getContentType(): string + { + return 'image/svg+xml'; + } + + public static function getSupportedExtensions(): array + { + return ['svg']; + } + + public function getName(): string + { + return 'svg'; + } +} diff --git a/vendor/endroid/qr-code/src/Writer/WriterInterface.php b/vendor/endroid/qr-code/src/Writer/WriterInterface.php new file mode 100755 index 0000000..6bd462d --- /dev/null +++ b/vendor/endroid/qr-code/src/Writer/WriterInterface.php @@ -0,0 +1,31 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Writer; + +use Endroid\QrCode\QrCodeInterface; + +interface WriterInterface +{ + public function writeString(QrCodeInterface $qrCode): string; + + public function writeDataUri(QrCodeInterface $qrCode): string; + + public function writeFile(QrCodeInterface $qrCode, string $path): void; + + public static function getContentType(): string; + + public static function supportsExtension(string $extension): bool; + + public static function getSupportedExtensions(): array; + + public function getName(): string; +} diff --git a/vendor/endroid/qr-code/src/WriterRegistry.php b/vendor/endroid/qr-code/src/WriterRegistry.php new file mode 100755 index 0000000..0755ad4 --- /dev/null +++ b/vendor/endroid/qr-code/src/WriterRegistry.php @@ -0,0 +1,88 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode; + +use Endroid\QrCode\Exception\InvalidWriterException; +use Endroid\QrCode\Writer\BinaryWriter; +use Endroid\QrCode\Writer\DebugWriter; +use Endroid\QrCode\Writer\EpsWriter; +use Endroid\QrCode\Writer\PngWriter; +use Endroid\QrCode\Writer\SvgWriter; +use Endroid\QrCode\Writer\WriterInterface; + +class WriterRegistry implements WriterRegistryInterface +{ + private $writers = []; + private $defaultWriter; + + public function loadDefaultWriters(): void + { + if (count($this->writers) > 0) { + return; + } + + $this->addWriters([ + new BinaryWriter(), + new DebugWriter(), + new EpsWriter(), + new PngWriter(), + new SvgWriter(), + ]); + + $this->setDefaultWriter('png'); + } + + public function addWriters(iterable $writers): void + { + foreach ($writers as $writer) { + $this->addWriter($writer); + } + } + + public function addWriter(WriterInterface $writer): void + { + $this->writers[$writer->getName()] = $writer; + } + + public function getWriter(string $name): WriterInterface + { + $this->assertValidWriter($name); + + return $this->writers[$name]; + } + + public function getDefaultWriter() + { + if ($this->defaultWriter instanceof WriterInterface) { + return $this->defaultWriter; + } + + throw new InvalidWriterException('Please set the default writer via the second argument of addWriter'); + } + + public function setDefaultWriter(string $name) + { + $this->defaultWriter = $this->writers[$name]; + } + + public function getWriters(): array + { + return $this->writers; + } + + private function assertValidWriter(string $name) + { + if (!isset($this->writers[$name])) { + throw new InvalidWriterException('Invalid writer "'.$name.'"'); + } + } +} diff --git a/vendor/endroid/qr-code/src/WriterRegistryInterface.php b/vendor/endroid/qr-code/src/WriterRegistryInterface.php new file mode 100755 index 0000000..5a22d51 --- /dev/null +++ b/vendor/endroid/qr-code/src/WriterRegistryInterface.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode; + +use Endroid\QrCode\Writer\WriterInterface; + +interface WriterRegistryInterface +{ + public function addWriters(iterable $writers): void; + + public function addWriter(WriterInterface $writer): void; + + public function getWriter(string $name): WriterInterface; + + public function getWriters(): array; +} diff --git a/vendor/endroid/qr-code/tests/QrCodeTest.php b/vendor/endroid/qr-code/tests/QrCodeTest.php new file mode 100755 index 0000000..662e43f --- /dev/null +++ b/vendor/endroid/qr-code/tests/QrCodeTest.php @@ -0,0 +1,187 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Endroid\QrCode\Tests; + +use Endroid\QrCode\Factory\QrCodeFactory; +use Endroid\QrCode\QrCode; +use PHPUnit\Framework\TestCase; +use Zxing\QrReader; + +class QrCodeTest extends TestCase +{ + public function testReadable(): void + { + $messages = [ + 'Tiny', + 'This one has spaces', + 'd2llMS9uU01BVmlvalM2YU9BUFBPTTdQMmJabHpqdndt', + 'http://this.is.an/url?with=query&string=attached', + '11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111', + '{"i":"serialized.data","v":1,"t":1,"d":"4AEPc9XuIQ0OjsZoSRWp9DRWlN6UyDvuMlyOYy8XjOw="}', + 'Spëci&al ch@ract3rs', + '有限公司', + ]; + + $qrCode = new QrCode(); + $qrCode->setSize(300); + foreach ($messages as $message) { + $qrCode->setText($message); + $pngData = $qrCode->writeString(); + $this->assertTrue(is_string($pngData)); + $reader = new QrReader($pngData, QrReader::SOURCE_TYPE_BLOB); + $this->assertEquals($message, $reader->text()); + } + } + + public function testFactory(): void + { + $qrCodeFactory = new QrCodeFactory(); + $qrCode = $qrCodeFactory->create('QR Code', [ + 'writer' => 'png', + 'size' => 300, + 'margin' => 10, + ]); + + $pngData = $qrCode->writeString(); + $this->assertTrue(is_string($pngData)); + $reader = new QrReader($pngData, QrReader::SOURCE_TYPE_BLOB); + $this->assertEquals('QR Code', $reader->text()); + } + + /** + * @dataProvider writerNamesProvider + */ + public function testWriteQrCodeByWriterName($writerName, $fileContent): void + { + $qrCode = new QrCode('QR Code'); + $qrCode->setLogoPath(__DIR__.'/../assets/images/symfony.png'); + $qrCode->setLogoWidth(100); + + $qrCode->setWriterByName($writerName); + $data = $qrCode->writeString(); + $this->assertTrue(is_string($data)); + + if (null !== $fileContent) { + $uriData = $qrCode->writeDataUri(); + $this->assertTrue(0 === strpos($uriData, $fileContent)); + } + } + + public function writerNamesProvider() + { + return [ + ['binary', null], + ['debug', null], + ['eps', null], + ['png', 'data:image/png;base64'], + ['svg', 'data:image/svg+xml;base64'], + ]; + } + + /** + * @dataProvider extensionsProvider + */ + public function testWriteQrCodeByWriterExtension($extension, $fileContent): void + { + $qrCode = new QrCode('QR Code'); + $qrCode->setLogoPath(__DIR__.'/../assets/images/symfony.png'); + $qrCode->setLogoWidth(100); + + $qrCode->setWriterByExtension($extension); + $data = $qrCode->writeString(); + $this->assertTrue(is_string($data)); + + if (null !== $fileContent) { + $uriData = $qrCode->writeDataUri(); + $this->assertTrue(0 === strpos($uriData, $fileContent)); + } + } + + public function extensionsProvider() + { + return [ + ['bin', null], + ['txt', null], + ['eps', null], + ['png', 'data:image/png;base64'], + ['svg', 'data:image/svg+xml;base64'], + ]; + } + + public function testSetSize(): void + { + $size = 400; + $margin = 10; + + $qrCode = new QrCode('QR Code'); + $qrCode->setSize($size); + $qrCode->setMargin($margin); + + $pngData = $qrCode->writeString(); + $image = imagecreatefromstring($pngData); + + $this->assertTrue(imagesx($image) === $size + 2 * $margin); + $this->assertTrue(imagesy($image) === $size + 2 * $margin); + } + + public function testSetLabel(): void + { + $qrCode = new QrCode('QR Code'); + $qrCode->setSize(300); + $qrCode->setLabel('Scan the code', 15); + + $pngData = $qrCode->writeString(); + $this->assertTrue(is_string($pngData)); + $reader = new QrReader($pngData, QrReader::SOURCE_TYPE_BLOB); + $this->assertEquals('QR Code', $reader->text()); + } + + public function testSetLogo(): void + { + $qrCode = new QrCode('QR Code'); + $qrCode->setSize(500); + $qrCode->setLogoPath(__DIR__.'/../assets/images/symfony.png'); + $qrCode->setLogoWidth(100); + $qrCode->setValidateResult(true); + + $pngData = $qrCode->writeString(); + $this->assertTrue(is_string($pngData)); + } + + public function testWriteFile(): void + { + $filename = __DIR__.'/output/qr-code.png'; + + $qrCode = new QrCode('QR Code'); + $qrCode->writeFile($filename); + + $image = imagecreatefromstring(file_get_contents($filename)); + + $this->assertTrue(is_resource($image)); + } + + public function testData(): void + { + $qrCode = new QrCode('QR Code'); + + $data = $qrCode->getData(); + + $this->assertArrayHasKey('block_count', $data); + $this->assertArrayHasKey('block_size', $data); + $this->assertArrayHasKey('inner_width', $data); + $this->assertArrayHasKey('inner_height', $data); + $this->assertArrayHasKey('outer_width', $data); + $this->assertArrayHasKey('outer_height', $data); + $this->assertArrayHasKey('margin_left', $data); + $this->assertArrayHasKey('margin_right', $data); + } +} diff --git a/vendor/endroid/qr-code/tests/output/.gitignore b/vendor/endroid/qr-code/tests/output/.gitignore new file mode 100755 index 0000000..a68d087 --- /dev/null +++ b/vendor/endroid/qr-code/tests/output/.gitignore @@ -0,0 +1,2 @@ +/* +!/.gitignore diff --git a/vendor/guzzlehttp/guzzle/CHANGELOG.md b/vendor/guzzlehttp/guzzle/CHANGELOG.md new file mode 100755 index 0000000..17badd7 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/CHANGELOG.md @@ -0,0 +1,1287 @@ +# Change Log + +## 6.3.3 - 2018-04-22 + +* Fix: Default headers when decode_content is specified + + +## 6.3.2 - 2018-03-26 + +* Fix: Release process + + +## 6.3.1 - 2018-03-26 + +* Bug fix: Parsing 0 epoch expiry times in cookies [#2014](https://github.com/guzzle/guzzle/pull/2014) +* Improvement: Better ConnectException detection [#2012](https://github.com/guzzle/guzzle/pull/2012) +* Bug fix: Malformed domain that contains a "/" [#1999](https://github.com/guzzle/guzzle/pull/1999) +* Bug fix: Undefined offset when a cookie has no first key-value pair [#1998](https://github.com/guzzle/guzzle/pull/1998) +* Improvement: Support PHPUnit 6 [#1953](https://github.com/guzzle/guzzle/pull/1953) +* Bug fix: Support empty headers [#1915](https://github.com/guzzle/guzzle/pull/1915) +* Bug fix: Ignore case during header modifications [#1916](https://github.com/guzzle/guzzle/pull/1916) + ++ Minor code cleanups, documentation fixes and clarifications. + + +## 6.3.0 - 2017-06-22 + +* Feature: force IP resolution (ipv4 or ipv6) [#1608](https://github.com/guzzle/guzzle/pull/1608), [#1659](https://github.com/guzzle/guzzle/pull/1659) +* Improvement: Don't include summary in exception message when body is empty [#1621](https://github.com/guzzle/guzzle/pull/1621) +* Improvement: Handle `on_headers` option in MockHandler [#1580](https://github.com/guzzle/guzzle/pull/1580) +* Improvement: Added SUSE Linux CA path [#1609](https://github.com/guzzle/guzzle/issues/1609) +* Improvement: Use class reference for getting the name of the class instead of using hardcoded strings [#1641](https://github.com/guzzle/guzzle/pull/1641) +* Feature: Added `read_timeout` option [#1611](https://github.com/guzzle/guzzle/pull/1611) +* Bug fix: PHP 7.x fixes [#1685](https://github.com/guzzle/guzzle/pull/1685), [#1686](https://github.com/guzzle/guzzle/pull/1686), [#1811](https://github.com/guzzle/guzzle/pull/1811) +* Deprecation: BadResponseException instantiation without a response [#1642](https://github.com/guzzle/guzzle/pull/1642) +* Feature: Added NTLM auth [#1569](https://github.com/guzzle/guzzle/pull/1569) +* Feature: Track redirect HTTP status codes [#1711](https://github.com/guzzle/guzzle/pull/1711) +* Improvement: Check handler type during construction [#1745](https://github.com/guzzle/guzzle/pull/1745) +* Improvement: Always include the Content-Length if there's a body [#1721](https://github.com/guzzle/guzzle/pull/1721) +* Feature: Added convenience method to access a cookie by name [#1318](https://github.com/guzzle/guzzle/pull/1318) +* Bug fix: Fill `CURLOPT_CAPATH` and `CURLOPT_CAINFO` properly [#1684](https://github.com/guzzle/guzzle/pull/1684) +* Improvement: Use `\GuzzleHttp\Promise\rejection_for` function instead of object init [#1827](https://github.com/guzzle/guzzle/pull/1827) + + ++ Minor code cleanups, documentation fixes and clarifications. + +## 6.2.3 - 2017-02-28 + +* Fix deprecations with guzzle/psr7 version 1.4 + +## 6.2.2 - 2016-10-08 + +* Allow to pass nullable Response to delay callable +* Only add scheme when host is present +* Fix drain case where content-length is the literal string zero +* Obfuscate in-URL credentials in exceptions + +## 6.2.1 - 2016-07-18 + +* Address HTTP_PROXY security vulnerability, CVE-2016-5385: + https://httpoxy.org/ +* Fixing timeout bug with StreamHandler: + https://github.com/guzzle/guzzle/pull/1488 +* Only read up to `Content-Length` in PHP StreamHandler to avoid timeouts when + a server does not honor `Connection: close`. +* Ignore URI fragment when sending requests. + +## 6.2.0 - 2016-03-21 + +* Feature: added `GuzzleHttp\json_encode` and `GuzzleHttp\json_decode`. + https://github.com/guzzle/guzzle/pull/1389 +* Bug fix: Fix sleep calculation when waiting for delayed requests. + https://github.com/guzzle/guzzle/pull/1324 +* Feature: More flexible history containers. + https://github.com/guzzle/guzzle/pull/1373 +* Bug fix: defer sink stream opening in StreamHandler. + https://github.com/guzzle/guzzle/pull/1377 +* Bug fix: do not attempt to escape cookie values. + https://github.com/guzzle/guzzle/pull/1406 +* Feature: report original content encoding and length on decoded responses. + https://github.com/guzzle/guzzle/pull/1409 +* Bug fix: rewind seekable request bodies before dispatching to cURL. + https://github.com/guzzle/guzzle/pull/1422 +* Bug fix: provide an empty string to `http_build_query` for HHVM workaround. + https://github.com/guzzle/guzzle/pull/1367 + +## 6.1.1 - 2015-11-22 + +* Bug fix: Proxy::wrapSync() now correctly proxies to the appropriate handler + https://github.com/guzzle/guzzle/commit/911bcbc8b434adce64e223a6d1d14e9a8f63e4e4 +* Feature: HandlerStack is now more generic. + https://github.com/guzzle/guzzle/commit/f2102941331cda544745eedd97fc8fd46e1ee33e +* Bug fix: setting verify to false in the StreamHandler now disables peer + verification. https://github.com/guzzle/guzzle/issues/1256 +* Feature: Middleware now uses an exception factory, including more error + context. https://github.com/guzzle/guzzle/pull/1282 +* Feature: better support for disabled functions. + https://github.com/guzzle/guzzle/pull/1287 +* Bug fix: fixed regression where MockHandler was not using `sink`. + https://github.com/guzzle/guzzle/pull/1292 + +## 6.1.0 - 2015-09-08 + +* Feature: Added the `on_stats` request option to provide access to transfer + statistics for requests. https://github.com/guzzle/guzzle/pull/1202 +* Feature: Added the ability to persist session cookies in CookieJars. + https://github.com/guzzle/guzzle/pull/1195 +* Feature: Some compatibility updates for Google APP Engine + https://github.com/guzzle/guzzle/pull/1216 +* Feature: Added support for NO_PROXY to prevent the use of a proxy based on + a simple set of rules. https://github.com/guzzle/guzzle/pull/1197 +* Feature: Cookies can now contain square brackets. + https://github.com/guzzle/guzzle/pull/1237 +* Bug fix: Now correctly parsing `=` inside of quotes in Cookies. + https://github.com/guzzle/guzzle/pull/1232 +* Bug fix: Cusotm cURL options now correctly override curl options of the + same name. https://github.com/guzzle/guzzle/pull/1221 +* Bug fix: Content-Type header is now added when using an explicitly provided + multipart body. https://github.com/guzzle/guzzle/pull/1218 +* Bug fix: Now ignoring Set-Cookie headers that have no name. +* Bug fix: Reason phrase is no longer cast to an int in some cases in the + cURL handler. https://github.com/guzzle/guzzle/pull/1187 +* Bug fix: Remove the Authorization header when redirecting if the Host + header changes. https://github.com/guzzle/guzzle/pull/1207 +* Bug fix: Cookie path matching fixes + https://github.com/guzzle/guzzle/issues/1129 +* Bug fix: Fixing the cURL `body_as_string` setting + https://github.com/guzzle/guzzle/pull/1201 +* Bug fix: quotes are no longer stripped when parsing cookies. + https://github.com/guzzle/guzzle/issues/1172 +* Bug fix: `form_params` and `query` now always uses the `&` separator. + https://github.com/guzzle/guzzle/pull/1163 +* Bug fix: Adding a Content-Length to PHP stream wrapper requests if not set. + https://github.com/guzzle/guzzle/pull/1189 + +## 6.0.2 - 2015-07-04 + +* Fixed a memory leak in the curl handlers in which references to callbacks + were not being removed by `curl_reset`. +* Cookies are now extracted properly before redirects. +* Cookies now allow more character ranges. +* Decoded Content-Encoding responses are now modified to correctly reflect + their state if the encoding was automatically removed by a handler. This + means that the `Content-Encoding` header may be removed an the + `Content-Length` modified to reflect the message size after removing the + encoding. +* Added a more explicit error message when trying to use `form_params` and + `multipart` in the same request. +* Several fixes for HHVM support. +* Functions are now conditionally required using an additional level of + indirection to help with global Composer installations. + +## 6.0.1 - 2015-05-27 + +* Fixed a bug with serializing the `query` request option where the `&` + separator was missing. +* Added a better error message for when `body` is provided as an array. Please + use `form_params` or `multipart` instead. +* Various doc fixes. + +## 6.0.0 - 2015-05-26 + +* See the UPGRADING.md document for more information. +* Added `multipart` and `form_params` request options. +* Added `synchronous` request option. +* Added the `on_headers` request option. +* Fixed `expect` handling. +* No longer adding default middlewares in the client ctor. These need to be + present on the provided handler in order to work. +* Requests are no longer initiated when sending async requests with the + CurlMultiHandler. This prevents unexpected recursion from requests completing + while ticking the cURL loop. +* Removed the semantics of setting `default` to `true`. This is no longer + required now that the cURL loop is not ticked for async requests. +* Added request and response logging middleware. +* No longer allowing self signed certificates when using the StreamHandler. +* Ensuring that `sink` is valid if saving to a file. +* Request exceptions now include a "handler context" which provides handler + specific contextual information. +* Added `GuzzleHttp\RequestOptions` to allow request options to be applied + using constants. +* `$maxHandles` has been removed from CurlMultiHandler. +* `MultipartPostBody` is now part of the `guzzlehttp/psr7` package. + +## 5.3.0 - 2015-05-19 + +* Mock now supports `save_to` +* Marked `AbstractRequestEvent::getTransaction()` as public. +* Fixed a bug in which multiple headers using different casing would overwrite + previous headers in the associative array. +* Added `Utils::getDefaultHandler()` +* Marked `GuzzleHttp\Client::getDefaultUserAgent` as deprecated. +* URL scheme is now always lowercased. + +## 6.0.0-beta.1 + +* Requires PHP >= 5.5 +* Updated to use PSR-7 + * Requires immutable messages, which basically means an event based system + owned by a request instance is no longer possible. + * Utilizing the [Guzzle PSR-7 package](https://github.com/guzzle/psr7). + * Removed the dependency on `guzzlehttp/streams`. These stream abstractions + are available in the `guzzlehttp/psr7` package under the `GuzzleHttp\Psr7` + namespace. +* Added middleware and handler system + * Replaced the Guzzle event and subscriber system with a middleware system. + * No longer depends on RingPHP, but rather places the HTTP handlers directly + in Guzzle, operating on PSR-7 messages. + * Retry logic is now encapsulated in `GuzzleHttp\Middleware::retry`, which + means the `guzzlehttp/retry-subscriber` is now obsolete. + * Mocking responses is now handled using `GuzzleHttp\Handler\MockHandler`. +* Asynchronous responses + * No longer supports the `future` request option to send an async request. + Instead, use one of the `*Async` methods of a client (e.g., `requestAsync`, + `getAsync`, etc.). + * Utilizing `GuzzleHttp\Promise` instead of React's promise library to avoid + recursion required by chaining and forwarding react promises. See + https://github.com/guzzle/promises + * Added `requestAsync` and `sendAsync` to send request asynchronously. + * Added magic methods for `getAsync()`, `postAsync()`, etc. to send requests + asynchronously. +* Request options + * POST and form updates + * Added the `form_fields` and `form_files` request options. + * Removed the `GuzzleHttp\Post` namespace. + * The `body` request option no longer accepts an array for POST requests. + * The `exceptions` request option has been deprecated in favor of the + `http_errors` request options. + * The `save_to` request option has been deprecated in favor of `sink` request + option. +* Clients no longer accept an array of URI template string and variables for + URI variables. You will need to expand URI templates before passing them + into a client constructor or request method. +* Client methods `get()`, `post()`, `put()`, `patch()`, `options()`, etc. are + now magic methods that will send synchronous requests. +* Replaced `Utils.php` with plain functions in `functions.php`. +* Removed `GuzzleHttp\Collection`. +* Removed `GuzzleHttp\BatchResults`. Batched pool results are now returned as + an array. +* Removed `GuzzleHttp\Query`. Query string handling is now handled using an + associative array passed into the `query` request option. The query string + is serialized using PHP's `http_build_query`. If you need more control, you + can pass the query string in as a string. +* `GuzzleHttp\QueryParser` has been replaced with the + `GuzzleHttp\Psr7\parse_query`. + +## 5.2.0 - 2015-01-27 + +* Added `AppliesHeadersInterface` to make applying headers to a request based + on the body more generic and not specific to `PostBodyInterface`. +* Reduced the number of stack frames needed to send requests. +* Nested futures are now resolved in the client rather than the RequestFsm +* Finishing state transitions is now handled in the RequestFsm rather than the + RingBridge. +* Added a guard in the Pool class to not use recursion for request retries. + +## 5.1.0 - 2014-12-19 + +* Pool class no longer uses recursion when a request is intercepted. +* The size of a Pool can now be dynamically adjusted using a callback. + See https://github.com/guzzle/guzzle/pull/943. +* Setting a request option to `null` when creating a request with a client will + ensure that the option is not set. This allows you to overwrite default + request options on a per-request basis. + See https://github.com/guzzle/guzzle/pull/937. +* Added the ability to limit which protocols are allowed for redirects by + specifying a `protocols` array in the `allow_redirects` request option. +* Nested futures due to retries are now resolved when waiting for synchronous + responses. See https://github.com/guzzle/guzzle/pull/947. +* `"0"` is now an allowed URI path. See + https://github.com/guzzle/guzzle/pull/935. +* `Query` no longer typehints on the `$query` argument in the constructor, + allowing for strings and arrays. +* Exceptions thrown in the `end` event are now correctly wrapped with Guzzle + specific exceptions if necessary. + +## 5.0.3 - 2014-11-03 + +This change updates query strings so that they are treated as un-encoded values +by default where the value represents an un-encoded value to send over the +wire. A Query object then encodes the value before sending over the wire. This +means that even value query string values (e.g., ":") are url encoded. This +makes the Query class match PHP's http_build_query function. However, if you +want to send requests over the wire using valid query string characters that do +not need to be encoded, then you can provide a string to Url::setQuery() and +pass true as the second argument to specify that the query string is a raw +string that should not be parsed or encoded (unless a call to getQuery() is +subsequently made, forcing the query-string to be converted into a Query +object). + +## 5.0.2 - 2014-10-30 + +* Added a trailing `\r\n` to multipart/form-data payloads. See + https://github.com/guzzle/guzzle/pull/871 +* Added a `GuzzleHttp\Pool::send()` convenience method to match the docs. +* Status codes are now returned as integers. See + https://github.com/guzzle/guzzle/issues/881 +* No longer overwriting an existing `application/x-www-form-urlencoded` header + when sending POST requests, allowing for customized headers. See + https://github.com/guzzle/guzzle/issues/877 +* Improved path URL serialization. + + * No longer double percent-encoding characters in the path or query string if + they are already encoded. + * Now properly encoding the supplied path to a URL object, instead of only + encoding ' ' and '?'. + * Note: This has been changed in 5.0.3 to now encode query string values by + default unless the `rawString` argument is provided when setting the query + string on a URL: Now allowing many more characters to be present in the + query string without being percent encoded. See http://tools.ietf.org/html/rfc3986#appendix-A + +## 5.0.1 - 2014-10-16 + +Bugfix release. + +* Fixed an issue where connection errors still returned response object in + error and end events event though the response is unusable. This has been + corrected so that a response is not returned in the `getResponse` method of + these events if the response did not complete. https://github.com/guzzle/guzzle/issues/867 +* Fixed an issue where transfer statistics were not being populated in the + RingBridge. https://github.com/guzzle/guzzle/issues/866 + +## 5.0.0 - 2014-10-12 + +Adding support for non-blocking responses and some minor API cleanup. + +### New Features + +* Added support for non-blocking responses based on `guzzlehttp/guzzle-ring`. +* Added a public API for creating a default HTTP adapter. +* Updated the redirect plugin to be non-blocking so that redirects are sent + concurrently. Other plugins like this can now be updated to be non-blocking. +* Added a "progress" event so that you can get upload and download progress + events. +* Added `GuzzleHttp\Pool` which implements FutureInterface and transfers + requests concurrently using a capped pool size as efficiently as possible. +* Added `hasListeners()` to EmitterInterface. +* Removed `GuzzleHttp\ClientInterface::sendAll` and marked + `GuzzleHttp\Client::sendAll` as deprecated (it's still there, just not the + recommended way). + +### Breaking changes + +The breaking changes in this release are relatively minor. The biggest thing to +look out for is that request and response objects no longer implement fluent +interfaces. + +* Removed the fluent interfaces (i.e., `return $this`) from requests, + responses, `GuzzleHttp\Collection`, `GuzzleHttp\Url`, + `GuzzleHttp\Query`, `GuzzleHttp\Post\PostBody`, and + `GuzzleHttp\Cookie\SetCookie`. This blog post provides a good outline of + why I did this: http://ocramius.github.io/blog/fluent-interfaces-are-evil/. + This also makes the Guzzle message interfaces compatible with the current + PSR-7 message proposal. +* Removed "functions.php", so that Guzzle is truly PSR-4 compliant. Except + for the HTTP request functions from function.php, these functions are now + implemented in `GuzzleHttp\Utils` using camelCase. `GuzzleHttp\json_decode` + moved to `GuzzleHttp\Utils::jsonDecode`. `GuzzleHttp\get_path` moved to + `GuzzleHttp\Utils::getPath`. `GuzzleHttp\set_path` moved to + `GuzzleHttp\Utils::setPath`. `GuzzleHttp\batch` should now be + `GuzzleHttp\Pool::batch`, which returns an `objectStorage`. Using functions.php + caused problems for many users: they aren't PSR-4 compliant, require an + explicit include, and needed an if-guard to ensure that the functions are not + declared multiple times. +* Rewrote adapter layer. + * Removing all classes from `GuzzleHttp\Adapter`, these are now + implemented as callables that are stored in `GuzzleHttp\Ring\Client`. + * Removed the concept of "parallel adapters". Sending requests serially or + concurrently is now handled using a single adapter. + * Moved `GuzzleHttp\Adapter\Transaction` to `GuzzleHttp\Transaction`. The + Transaction object now exposes the request, response, and client as public + properties. The getters and setters have been removed. +* Removed the "headers" event. This event was only useful for changing the + body a response once the headers of the response were known. You can implement + a similar behavior in a number of ways. One example might be to use a + FnStream that has access to the transaction being sent. For example, when the + first byte is written, you could check if the response headers match your + expectations, and if so, change the actual stream body that is being + written to. +* Removed the `asArray` parameter from + `GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header + value as an array, then use the newly added `getHeaderAsArray()` method of + `MessageInterface`. This change makes the Guzzle interfaces compatible with + the PSR-7 interfaces. +* `GuzzleHttp\Message\MessageFactory` no longer allows subclasses to add + custom request options using double-dispatch (this was an implementation + detail). Instead, you should now provide an associative array to the + constructor which is a mapping of the request option name mapping to a + function that applies the option value to a request. +* Removed the concept of "throwImmediately" from exceptions and error events. + This control mechanism was used to stop a transfer of concurrent requests + from completing. This can now be handled by throwing the exception or by + cancelling a pool of requests or each outstanding future request individually. +* Updated to "GuzzleHttp\Streams" 3.0. + * `GuzzleHttp\Stream\StreamInterface::getContents()` no longer accepts a + `maxLen` parameter. This update makes the Guzzle streams project + compatible with the current PSR-7 proposal. + * `GuzzleHttp\Stream\Stream::__construct`, + `GuzzleHttp\Stream\Stream::factory`, and + `GuzzleHttp\Stream\Utils::create` no longer accept a size in the second + argument. They now accept an associative array of options, including the + "size" key and "metadata" key which can be used to provide custom metadata. + +## 4.2.2 - 2014-09-08 + +* Fixed a memory leak in the CurlAdapter when reusing cURL handles. +* No longer using `request_fulluri` in stream adapter proxies. +* Relative redirects are now based on the last response, not the first response. + +## 4.2.1 - 2014-08-19 + +* Ensuring that the StreamAdapter does not always add a Content-Type header +* Adding automated github releases with a phar and zip + +## 4.2.0 - 2014-08-17 + +* Now merging in default options using a case-insensitive comparison. + Closes https://github.com/guzzle/guzzle/issues/767 +* Added the ability to automatically decode `Content-Encoding` response bodies + using the `decode_content` request option. This is set to `true` by default + to decode the response body if it comes over the wire with a + `Content-Encoding`. Set this value to `false` to disable decoding the + response content, and pass a string to provide a request `Accept-Encoding` + header and turn on automatic response decoding. This feature now allows you + to pass an `Accept-Encoding` header in the headers of a request but still + disable automatic response decoding. + Closes https://github.com/guzzle/guzzle/issues/764 +* Added the ability to throw an exception immediately when transferring + requests in parallel. Closes https://github.com/guzzle/guzzle/issues/760 +* Updating guzzlehttp/streams dependency to ~2.1 +* No longer utilizing the now deprecated namespaced methods from the stream + package. + +## 4.1.8 - 2014-08-14 + +* Fixed an issue in the CurlFactory that caused setting the `stream=false` + request option to throw an exception. + See: https://github.com/guzzle/guzzle/issues/769 +* TransactionIterator now calls rewind on the inner iterator. + See: https://github.com/guzzle/guzzle/pull/765 +* You can now set the `Content-Type` header to `multipart/form-data` + when creating POST requests to force multipart bodies. + See https://github.com/guzzle/guzzle/issues/768 + +## 4.1.7 - 2014-08-07 + +* Fixed an error in the HistoryPlugin that caused the same request and response + to be logged multiple times when an HTTP protocol error occurs. +* Ensuring that cURL does not add a default Content-Type when no Content-Type + has been supplied by the user. This prevents the adapter layer from modifying + the request that is sent over the wire after any listeners may have already + put the request in a desired state (e.g., signed the request). +* Throwing an exception when you attempt to send requests that have the + "stream" set to true in parallel using the MultiAdapter. +* Only calling curl_multi_select when there are active cURL handles. This was + previously changed and caused performance problems on some systems due to PHP + always selecting until the maximum select timeout. +* Fixed a bug where multipart/form-data POST fields were not correctly + aggregated (e.g., values with "&"). + +## 4.1.6 - 2014-08-03 + +* Added helper methods to make it easier to represent messages as strings, + including getting the start line and getting headers as a string. + +## 4.1.5 - 2014-08-02 + +* Automatically retrying cURL "Connection died, retrying a fresh connect" + errors when possible. +* cURL implementation cleanup +* Allowing multiple event subscriber listeners to be registered per event by + passing an array of arrays of listener configuration. + +## 4.1.4 - 2014-07-22 + +* Fixed a bug that caused multi-part POST requests with more than one field to + serialize incorrectly. +* Paths can now be set to "0" +* `ResponseInterface::xml` now accepts a `libxml_options` option and added a + missing default argument that was required when parsing XML response bodies. +* A `save_to` stream is now created lazily, which means that files are not + created on disk unless a request succeeds. + +## 4.1.3 - 2014-07-15 + +* Various fixes to multipart/form-data POST uploads +* Wrapping function.php in an if-statement to ensure Guzzle can be used + globally and in a Composer install +* Fixed an issue with generating and merging in events to an event array +* POST headers are only applied before sending a request to allow you to change + the query aggregator used before uploading +* Added much more robust query string parsing +* Fixed various parsing and normalization issues with URLs +* Fixing an issue where multi-valued headers were not being utilized correctly + in the StreamAdapter + +## 4.1.2 - 2014-06-18 + +* Added support for sending payloads with GET requests + +## 4.1.1 - 2014-06-08 + +* Fixed an issue related to using custom message factory options in subclasses +* Fixed an issue with nested form fields in a multi-part POST +* Fixed an issue with using the `json` request option for POST requests +* Added `ToArrayInterface` to `GuzzleHttp\Cookie\CookieJar` + +## 4.1.0 - 2014-05-27 + +* Added a `json` request option to easily serialize JSON payloads. +* Added a `GuzzleHttp\json_decode()` wrapper to safely parse JSON. +* Added `setPort()` and `getPort()` to `GuzzleHttp\Message\RequestInterface`. +* Added the ability to provide an emitter to a client in the client constructor. +* Added the ability to persist a cookie session using $_SESSION. +* Added a trait that can be used to add event listeners to an iterator. +* Removed request method constants from RequestInterface. +* Fixed warning when invalid request start-lines are received. +* Updated MessageFactory to work with custom request option methods. +* Updated cacert bundle to latest build. + +4.0.2 (2014-04-16) +------------------ + +* Proxy requests using the StreamAdapter now properly use request_fulluri (#632) +* Added the ability to set scalars as POST fields (#628) + +## 4.0.1 - 2014-04-04 + +* The HTTP status code of a response is now set as the exception code of + RequestException objects. +* 303 redirects will now correctly switch from POST to GET requests. +* The default parallel adapter of a client now correctly uses the MultiAdapter. +* HasDataTrait now initializes the internal data array as an empty array so + that the toArray() method always returns an array. + +## 4.0.0 - 2014-03-29 + +* For more information on the 4.0 transition, see: + http://mtdowling.com/blog/2014/03/15/guzzle-4-rc/ +* For information on changes and upgrading, see: + https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 +* Added `GuzzleHttp\batch()` as a convenience function for sending requests in + parallel without needing to write asynchronous code. +* Restructured how events are added to `GuzzleHttp\ClientInterface::sendAll()`. + You can now pass a callable or an array of associative arrays where each + associative array contains the "fn", "priority", and "once" keys. + +## 4.0.0.rc-2 - 2014-03-25 + +* Removed `getConfig()` and `setConfig()` from clients to avoid confusion + around whether things like base_url, message_factory, etc. should be able to + be retrieved or modified. +* Added `getDefaultOption()` and `setDefaultOption()` to ClientInterface +* functions.php functions were renamed using snake_case to match PHP idioms +* Added support for `HTTP_PROXY`, `HTTPS_PROXY`, and + `GUZZLE_CURL_SELECT_TIMEOUT` environment variables +* Added the ability to specify custom `sendAll()` event priorities +* Added the ability to specify custom stream context options to the stream + adapter. +* Added a functions.php function for `get_path()` and `set_path()` +* CurlAdapter and MultiAdapter now use a callable to generate curl resources +* MockAdapter now properly reads a body and emits a `headers` event +* Updated Url class to check if a scheme and host are set before adding ":" + and "//". This allows empty Url (e.g., "") to be serialized as "". +* Parsing invalid XML no longer emits warnings +* Curl classes now properly throw AdapterExceptions +* Various performance optimizations +* Streams are created with the faster `Stream\create()` function +* Marked deprecation_proxy() as internal +* Test server is now a collection of static methods on a class + +## 4.0.0-rc.1 - 2014-03-15 + +* See https://github.com/guzzle/guzzle/blob/master/UPGRADING.md#3x-to-40 + +## 3.8.1 - 2014-01-28 + +* Bug: Always using GET requests when redirecting from a 303 response +* Bug: CURLOPT_SSL_VERIFYHOST is now correctly set to false when setting `$certificateAuthority` to false in + `Guzzle\Http\ClientInterface::setSslVerification()` +* Bug: RedirectPlugin now uses strict RFC 3986 compliance when combining a base URL with a relative URL +* Bug: The body of a request can now be set to `"0"` +* Sending PHP stream requests no longer forces `HTTP/1.0` +* Adding more information to ExceptionCollection exceptions so that users have more context, including a stack trace of + each sub-exception +* Updated the `$ref` attribute in service descriptions to merge over any existing parameters of a schema (rather than + clobbering everything). +* Merging URLs will now use the query string object from the relative URL (thus allowing custom query aggregators) +* Query strings are now parsed in a way that they do no convert empty keys with no value to have a dangling `=`. + For example `foo&bar=baz` is now correctly parsed and recognized as `foo&bar=baz` rather than `foo=&bar=baz`. +* Now properly escaping the regular expression delimiter when matching Cookie domains. +* Network access is now disabled when loading XML documents + +## 3.8.0 - 2013-12-05 + +* Added the ability to define a POST name for a file +* JSON response parsing now properly walks additionalProperties +* cURL error code 18 is now retried automatically in the BackoffPlugin +* Fixed a cURL error when URLs contain fragments +* Fixed an issue in the BackoffPlugin retry event where it was trying to access all exceptions as if they were + CurlExceptions +* CURLOPT_PROGRESS function fix for PHP 5.5 (69fcc1e) +* Added the ability for Guzzle to work with older versions of cURL that do not support `CURLOPT_TIMEOUT_MS` +* Fixed a bug that was encountered when parsing empty header parameters +* UriTemplate now has a `setRegex()` method to match the docs +* The `debug` request parameter now checks if it is truthy rather than if it exists +* Setting the `debug` request parameter to true shows verbose cURL output instead of using the LogPlugin +* Added the ability to combine URLs using strict RFC 3986 compliance +* Command objects can now return the validation errors encountered by the command +* Various fixes to cache revalidation (#437 and 29797e5) +* Various fixes to the AsyncPlugin +* Cleaned up build scripts + +## 3.7.4 - 2013-10-02 + +* Bug fix: 0 is now an allowed value in a description parameter that has a default value (#430) +* Bug fix: SchemaFormatter now returns an integer when formatting to a Unix timestamp + (see https://github.com/aws/aws-sdk-php/issues/147) +* Bug fix: Cleaned up and fixed URL dot segment removal to properly resolve internal dots +* Minimum PHP version is now properly specified as 5.3.3 (up from 5.3.2) (#420) +* Updated the bundled cacert.pem (#419) +* OauthPlugin now supports adding authentication to headers or query string (#425) + +## 3.7.3 - 2013-09-08 + +* Added the ability to get the exception associated with a request/command when using `MultiTransferException` and + `CommandTransferException`. +* Setting `additionalParameters` of a response to false is now honored when parsing responses with a service description +* Schemas are only injected into response models when explicitly configured. +* No longer guessing Content-Type based on the path of a request. Content-Type is now only guessed based on the path of + an EntityBody. +* Bug fix: ChunkedIterator can now properly chunk a \Traversable as well as an \Iterator. +* Bug fix: FilterIterator now relies on `\Iterator` instead of `\Traversable`. +* Bug fix: Gracefully handling malformed responses in RequestMediator::writeResponseBody() +* Bug fix: Replaced call to canCache with canCacheRequest in the CallbackCanCacheStrategy of the CachePlugin +* Bug fix: Visiting XML attributes first before visiting XML children when serializing requests +* Bug fix: Properly parsing headers that contain commas contained in quotes +* Bug fix: mimetype guessing based on a filename is now case-insensitive + +## 3.7.2 - 2013-08-02 + +* Bug fix: Properly URL encoding paths when using the PHP-only version of the UriTemplate expander + See https://github.com/guzzle/guzzle/issues/371 +* Bug fix: Cookie domains are now matched correctly according to RFC 6265 + See https://github.com/guzzle/guzzle/issues/377 +* Bug fix: GET parameters are now used when calculating an OAuth signature +* Bug fix: Fixed an issue with cache revalidation where the If-None-Match header was being double quoted +* `Guzzle\Common\AbstractHasDispatcher::dispatch()` now returns the event that was dispatched +* `Guzzle\Http\QueryString::factory()` now guesses the most appropriate query aggregator to used based on the input. + See https://github.com/guzzle/guzzle/issues/379 +* Added a way to add custom domain objects to service description parsing using the `operation.parse_class` event. See + https://github.com/guzzle/guzzle/pull/380 +* cURL multi cleanup and optimizations + +## 3.7.1 - 2013-07-05 + +* Bug fix: Setting default options on a client now works +* Bug fix: Setting options on HEAD requests now works. See #352 +* Bug fix: Moving stream factory before send event to before building the stream. See #353 +* Bug fix: Cookies no longer match on IP addresses per RFC 6265 +* Bug fix: Correctly parsing header parameters that are in `<>` and quotes +* Added `cert` and `ssl_key` as request options +* `Host` header can now diverge from the host part of a URL if the header is set manually +* `Guzzle\Service\Command\LocationVisitor\Request\XmlVisitor` was rewritten to change from using SimpleXML to XMLWriter +* OAuth parameters are only added via the plugin if they aren't already set +* Exceptions are now thrown when a URL cannot be parsed +* Returning `false` if `Guzzle\Http\EntityBody::getContentMd5()` fails +* Not setting a `Content-MD5` on a command if calculating the Content-MD5 fails via the CommandContentMd5Plugin + +## 3.7.0 - 2013-06-10 + +* See UPGRADING.md for more information on how to upgrade. +* Requests now support the ability to specify an array of $options when creating a request to more easily modify a + request. You can pass a 'request.options' configuration setting to a client to apply default request options to + every request created by a client (e.g. default query string variables, headers, curl options, etc.). +* Added a static facade class that allows you to use Guzzle with static methods and mount the class to `\Guzzle`. + See `Guzzle\Http\StaticClient::mount`. +* Added `command.request_options` to `Guzzle\Service\Command\AbstractCommand` to pass request options to requests + created by a command (e.g. custom headers, query string variables, timeout settings, etc.). +* Stream size in `Guzzle\Stream\PhpStreamRequestFactory` will now be set if Content-Length is returned in the + headers of a response +* Added `Guzzle\Common\Collection::setPath($path, $value)` to set a value into an array using a nested key + (e.g. `$collection->setPath('foo/baz/bar', 'test'); echo $collection['foo']['bar']['bar'];`) +* ServiceBuilders now support storing and retrieving arbitrary data +* CachePlugin can now purge all resources for a given URI +* CachePlugin can automatically purge matching cached items when a non-idempotent request is sent to a resource +* CachePlugin now uses the Vary header to determine if a resource is a cache hit +* `Guzzle\Http\Message\Response` now implements `\Serializable` +* Added `Guzzle\Cache\CacheAdapterFactory::fromCache()` to more easily create cache adapters +* `Guzzle\Service\ClientInterface::execute()` now accepts an array, single command, or Traversable +* Fixed a bug in `Guzzle\Http\Message\Header\Link::addLink()` +* Better handling of calculating the size of a stream in `Guzzle\Stream\Stream` using fstat() and caching the size +* `Guzzle\Common\Exception\ExceptionCollection` now creates a more readable exception message +* Fixing BC break: Added back the MonologLogAdapter implementation rather than extending from PsrLog so that older + Symfony users can still use the old version of Monolog. +* Fixing BC break: Added the implementation back in for `Guzzle\Http\Message\AbstractMessage::getTokenizedHeader()`. + Now triggering an E_USER_DEPRECATED warning when used. Use `$message->getHeader()->parseParams()`. +* Several performance improvements to `Guzzle\Common\Collection` +* Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +* Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +* Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +* Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +* Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +* Added `Guzzle\Stream\StreamInterface::isRepeatable` +* Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + $client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))`. +* Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use $client->getConfig()->getPath('request.options/headers')`. +* Removed `Guzzle\Http\ClientInterface::expandTemplate()` +* Removed `Guzzle\Http\ClientInterface::setRequestFactory()` +* Removed `Guzzle\Http\ClientInterface::getCurlMulti()` +* Removed `Guzzle\Http\Message\RequestInterface::canCache` +* Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect` +* Removed `Guzzle\Http\Message\RequestInterface::isRedirect` +* Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. +* You can now enable E_USER_DEPRECATED warnings to see if you are using a deprecated method by setting + `Guzzle\Common\Version::$emitWarnings` to true. +* Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use + `$request->getResponseBody()->isRepeatable()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use + `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +* Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +* Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +* Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. + These will work through Guzzle 4.0 +* Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use [request.options][params]. +* Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +* Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use $client->getConfig()->getPath('request.options/headers')`. +* Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use $client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. +* Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +* Marked `Guzzle\Common\Collection::inject()` as deprecated. +* Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest');` +* CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +* Always setting X-cache headers on cached responses +* Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +* `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +* `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +* `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +* Added `CacheStorageInterface::purge($url)` +* `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +* Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +## 3.6.0 - 2013-05-29 + +* ServiceDescription now implements ToArrayInterface +* Added command.hidden_params to blacklist certain headers from being treated as additionalParameters +* Guzzle can now correctly parse incomplete URLs +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess +* Added the ability to cast Model objects to a string to view debug information. + +## 3.5.0 - 2013-05-13 + +* Bug: Fixed a regression so that request responses are parsed only once per oncomplete event rather than multiple times +* Bug: Better cleanup of one-time events across the board (when an event is meant to fire once, it will now remove + itself from the EventDispatcher) +* Bug: `Guzzle\Log\MessageFormatter` now properly writes "total_time" and "connect_time" values +* Bug: Cloning an EntityEnclosingRequest now clones the EntityBody too +* Bug: Fixed an undefined index error when parsing nested JSON responses with a sentAs parameter that reference a + non-existent key +* Bug: All __call() method arguments are now required (helps with mocking frameworks) +* Deprecating Response::getRequest() and now using a shallow clone of a request object to remove a circular reference + to help with refcount based garbage collection of resources created by sending a request +* Deprecating ZF1 cache and log adapters. These will be removed in the next major version. +* Deprecating `Response::getPreviousResponse()` (method signature still exists, but it's deprecated). Use the + HistoryPlugin for a history. +* Added a `responseBody` alias for the `response_body` location +* Refactored internals to no longer rely on Response::getRequest() +* HistoryPlugin can now be cast to a string +* HistoryPlugin now logs transactions rather than requests and responses to more accurately keep track of the requests + and responses that are sent over the wire +* Added `getEffectiveUrl()` and `getRedirectCount()` to Response objects + +## 3.4.3 - 2013-04-30 + +* Bug fix: Fixing bug introduced in 3.4.2 where redirect responses are duplicated on the final redirected response +* Added a check to re-extract the temp cacert bundle from the phar before sending each request + +## 3.4.2 - 2013-04-29 + +* Bug fix: Stream objects now work correctly with "a" and "a+" modes +* Bug fix: Removing `Transfer-Encoding: chunked` header when a Content-Length is present +* Bug fix: AsyncPlugin no longer forces HEAD requests +* Bug fix: DateTime timezones are now properly handled when using the service description schema formatter +* Bug fix: CachePlugin now properly handles stale-if-error directives when a request to the origin server fails +* Setting a response on a request will write to the custom request body from the response body if one is specified +* LogPlugin now writes to php://output when STDERR is undefined +* Added the ability to set multiple POST files for the same key in a single call +* application/x-www-form-urlencoded POSTs now use the utf-8 charset by default +* Added the ability to queue CurlExceptions to the MockPlugin +* Cleaned up how manual responses are queued on requests (removed "queued_response" and now using request.before_send) +* Configuration loading now allows remote files + +## 3.4.1 - 2013-04-16 + +* Large refactoring to how CurlMulti handles work. There is now a proxy that sits in front of a pool of CurlMulti + handles. This greatly simplifies the implementation, fixes a couple bugs, and provides a small performance boost. +* Exceptions are now properly grouped when sending requests in parallel +* Redirects are now properly aggregated when a multi transaction fails +* Redirects now set the response on the original object even in the event of a failure +* Bug fix: Model names are now properly set even when using $refs +* Added support for PHP 5.5's CurlFile to prevent warnings with the deprecated @ syntax +* Added support for oauth_callback in OAuth signatures +* Added support for oauth_verifier in OAuth signatures +* Added support to attempt to retrieve a command first literally, then ucfirst, the with inflection + +## 3.4.0 - 2013-04-11 + +* Bug fix: URLs are now resolved correctly based on http://tools.ietf.org/html/rfc3986#section-5.2. #289 +* Bug fix: Absolute URLs with a path in a service description will now properly override the base URL. #289 +* Bug fix: Parsing a query string with a single PHP array value will now result in an array. #263 +* Bug fix: Better normalization of the User-Agent header to prevent duplicate headers. #264. +* Bug fix: Added `number` type to service descriptions. +* Bug fix: empty parameters are removed from an OAuth signature +* Bug fix: Revalidating a cache entry prefers the Last-Modified over the Date header +* Bug fix: Fixed "array to string" error when validating a union of types in a service description +* Bug fix: Removed code that attempted to determine the size of a stream when data is written to the stream +* Bug fix: Not including an `oauth_token` if the value is null in the OauthPlugin. +* Bug fix: Now correctly aggregating successful requests and failed requests in CurlMulti when a redirect occurs. +* The new default CURLOPT_TIMEOUT setting has been increased to 150 seconds so that Guzzle works on poor connections. +* Added a feature to EntityEnclosingRequest::setBody() that will automatically set the Content-Type of the request if + the Content-Type can be determined based on the entity body or the path of the request. +* Added the ability to overwrite configuration settings in a client when grabbing a throwaway client from a builder. +* Added support for a PSR-3 LogAdapter. +* Added a `command.after_prepare` event +* Added `oauth_callback` parameter to the OauthPlugin +* Added the ability to create a custom stream class when using a stream factory +* Added a CachingEntityBody decorator +* Added support for `additionalParameters` in service descriptions to define how custom parameters are serialized. +* The bundled SSL certificate is now provided in the phar file and extracted when running Guzzle from a phar. +* You can now send any EntityEnclosingRequest with POST fields or POST files and cURL will handle creating bodies +* POST requests using a custom entity body are now treated exactly like PUT requests but with a custom cURL method. This + means that the redirect behavior of POST requests with custom bodies will not be the same as POST requests that use + POST fields or files (the latter is only used when emulating a form POST in the browser). +* Lots of cleanup to CurlHandle::factory and RequestFactory::createRequest + +## 3.3.1 - 2013-03-10 + +* Added the ability to create PHP streaming responses from HTTP requests +* Bug fix: Running any filters when parsing response headers with service descriptions +* Bug fix: OauthPlugin fixes to allow for multi-dimensional array signing, and sorting parameters before signing +* Bug fix: Removed the adding of default empty arrays and false Booleans to responses in order to be consistent across + response location visitors. +* Bug fix: Removed the possibility of creating configuration files with circular dependencies +* RequestFactory::create() now uses the key of a POST file when setting the POST file name +* Added xmlAllowEmpty to serialize an XML body even if no XML specific parameters are set + +## 3.3.0 - 2013-03-03 + +* A large number of performance optimizations have been made +* Bug fix: Added 'wb' as a valid write mode for streams +* Bug fix: `Guzzle\Http\Message\Response::json()` now allows scalar values to be returned +* Bug fix: Fixed bug in `Guzzle\Http\Message\Response` where wrapping quotes were stripped from `getEtag()` +* BC: Removed `Guzzle\Http\Utils` class +* BC: Setting a service description on a client will no longer modify the client's command factories. +* BC: Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using + the 'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' +* BC: `Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getSteamType()` are no longer converted to + lowercase +* Operation parameter objects are now lazy loaded internally +* Added ErrorResponsePlugin that can throw errors for responses defined in service description operations' errorResponses +* Added support for instantiating responseType=class responseClass classes. Classes must implement + `Guzzle\Service\Command\ResponseClassInterface` +* Added support for additionalProperties for top-level parameters in responseType=model responseClasses. These + additional properties also support locations and can be used to parse JSON responses where the outermost part of the + JSON is an array +* Added support for nested renaming of JSON models (rename sentAs to name) +* CachePlugin + * Added support for stale-if-error so that the CachePlugin can now serve stale content from the cache on error + * Debug headers can now added to cached response in the CachePlugin + +## 3.2.0 - 2013-02-14 + +* CurlMulti is no longer reused globally. A new multi object is created per-client. This helps to isolate clients. +* URLs with no path no longer contain a "/" by default +* Guzzle\Http\QueryString does no longer manages the leading "?". This is now handled in Guzzle\Http\Url. +* BadResponseException no longer includes the full request and response message +* Adding setData() to Guzzle\Service\Description\ServiceDescriptionInterface +* Adding getResponseBody() to Guzzle\Http\Message\RequestInterface +* Various updates to classes to use ServiceDescriptionInterface type hints rather than ServiceDescription +* Header values can now be normalized into distinct values when multiple headers are combined with a comma separated list +* xmlEncoding can now be customized for the XML declaration of a XML service description operation +* Guzzle\Http\QueryString now uses Guzzle\Http\QueryAggregator\QueryAggregatorInterface objects to add custom value + aggregation and no longer uses callbacks +* The URL encoding implementation of Guzzle\Http\QueryString can now be customized +* Bug fix: Filters were not always invoked for array service description parameters +* Bug fix: Redirects now use a target response body rather than a temporary response body +* Bug fix: The default exponential backoff BackoffPlugin was not giving when the request threshold was exceeded +* Bug fix: Guzzle now takes the first found value when grabbing Cache-Control directives + +## 3.1.2 - 2013-01-27 + +* Refactored how operation responses are parsed. Visitors now include a before() method responsible for parsing the + response body. For example, the XmlVisitor now parses the XML response into an array in the before() method. +* Fixed an issue where cURL would not automatically decompress responses when the Accept-Encoding header was sent +* CURLOPT_SSL_VERIFYHOST is never set to 1 because it is deprecated (see 5e0ff2ef20f839e19d1eeb298f90ba3598784444) +* Fixed a bug where redirect responses were not chained correctly using getPreviousResponse() +* Setting default headers on a client after setting the user-agent will not erase the user-agent setting + +## 3.1.1 - 2013-01-20 + +* Adding wildcard support to Guzzle\Common\Collection::getPath() +* Adding alias support to ServiceBuilder configs +* Adding Guzzle\Service\Resource\CompositeResourceIteratorFactory and cleaning up factory interface + +## 3.1.0 - 2013-01-12 + +* BC: CurlException now extends from RequestException rather than BadResponseException +* BC: Renamed Guzzle\Plugin\Cache\CanCacheStrategyInterface::canCache() to canCacheRequest() and added CanCacheResponse() +* Added getData to ServiceDescriptionInterface +* Added context array to RequestInterface::setState() +* Bug: Removing hard dependency on the BackoffPlugin from Guzzle\Http +* Bug: Adding required content-type when JSON request visitor adds JSON to a command +* Bug: Fixing the serialization of a service description with custom data +* Made it easier to deal with exceptions thrown when transferring commands or requests in parallel by providing + an array of successful and failed responses +* Moved getPath from Guzzle\Service\Resource\Model to Guzzle\Common\Collection +* Added Guzzle\Http\IoEmittingEntityBody +* Moved command filtration from validators to location visitors +* Added `extends` attributes to service description parameters +* Added getModels to ServiceDescriptionInterface + +## 3.0.7 - 2012-12-19 + +* Fixing phar detection when forcing a cacert to system if null or true +* Allowing filename to be passed to `Guzzle\Http\Message\Request::setResponseBody()` +* Cleaning up `Guzzle\Common\Collection::inject` method +* Adding a response_body location to service descriptions + +## 3.0.6 - 2012-12-09 + +* CurlMulti performance improvements +* Adding setErrorResponses() to Operation +* composer.json tweaks + +## 3.0.5 - 2012-11-18 + +* Bug: Fixing an infinite recursion bug caused from revalidating with the CachePlugin +* Bug: Response body can now be a string containing "0" +* Bug: Using Guzzle inside of a phar uses system by default but now allows for a custom cacert +* Bug: QueryString::fromString now properly parses query string parameters that contain equal signs +* Added support for XML attributes in service description responses +* DefaultRequestSerializer now supports array URI parameter values for URI template expansion +* Added better mimetype guessing to requests and post files + +## 3.0.4 - 2012-11-11 + +* Bug: Fixed a bug when adding multiple cookies to a request to use the correct glue value +* Bug: Cookies can now be added that have a name, domain, or value set to "0" +* Bug: Using the system cacert bundle when using the Phar +* Added json and xml methods to Response to make it easier to parse JSON and XML response data into data structures +* Enhanced cookie jar de-duplication +* Added the ability to enable strict cookie jars that throw exceptions when invalid cookies are added +* Added setStream to StreamInterface to actually make it possible to implement custom rewind behavior for entity bodies +* Added the ability to create any sort of hash for a stream rather than just an MD5 hash + +## 3.0.3 - 2012-11-04 + +* Implementing redirects in PHP rather than cURL +* Added PECL URI template extension and using as default parser if available +* Bug: Fixed Content-Length parsing of Response factory +* Adding rewind() method to entity bodies and streams. Allows for custom rewinding of non-repeatable streams. +* Adding ToArrayInterface throughout library +* Fixing OauthPlugin to create unique nonce values per request + +## 3.0.2 - 2012-10-25 + +* Magic methods are enabled by default on clients +* Magic methods return the result of a command +* Service clients no longer require a base_url option in the factory +* Bug: Fixed an issue with URI templates where null template variables were being expanded + +## 3.0.1 - 2012-10-22 + +* Models can now be used like regular collection objects by calling filter, map, etc. +* Models no longer require a Parameter structure or initial data in the constructor +* Added a custom AppendIterator to get around a PHP bug with the `\AppendIterator` + +## 3.0.0 - 2012-10-15 + +* Rewrote service description format to be based on Swagger + * Now based on JSON schema + * Added nested input structures and nested response models + * Support for JSON and XML input and output models + * Renamed `commands` to `operations` + * Removed dot class notation + * Removed custom types +* Broke the project into smaller top-level namespaces to be more component friendly +* Removed support for XML configs and descriptions. Use arrays or JSON files. +* Removed the Validation component and Inspector +* Moved all cookie code to Guzzle\Plugin\Cookie +* Magic methods on a Guzzle\Service\Client now return the command un-executed. +* Calling getResult() or getResponse() on a command will lazily execute the command if needed. +* Now shipping with cURL's CA certs and using it by default +* Added previousResponse() method to response objects +* No longer sending Accept and Accept-Encoding headers on every request +* Only sending an Expect header by default when a payload is greater than 1MB +* Added/moved client options: + * curl.blacklist to curl.option.blacklist + * Added ssl.certificate_authority +* Added a Guzzle\Iterator component +* Moved plugins from Guzzle\Http\Plugin to Guzzle\Plugin +* Added a more robust backoff retry strategy (replaced the ExponentialBackoffPlugin) +* Added a more robust caching plugin +* Added setBody to response objects +* Updating LogPlugin to use a more flexible MessageFormatter +* Added a completely revamped build process +* Cleaning up Collection class and removing default values from the get method +* Fixed ZF2 cache adapters + +## 2.8.8 - 2012-10-15 + +* Bug: Fixed a cookie issue that caused dot prefixed domains to not match where popular browsers did + +## 2.8.7 - 2012-09-30 + +* Bug: Fixed config file aliases for JSON includes +* Bug: Fixed cookie bug on a request object by using CookieParser to parse cookies on requests +* Bug: Removing the path to a file when sending a Content-Disposition header on a POST upload +* Bug: Hardening request and response parsing to account for missing parts +* Bug: Fixed PEAR packaging +* Bug: Fixed Request::getInfo +* Bug: Fixed cases where CURLM_CALL_MULTI_PERFORM return codes were causing curl transactions to fail +* Adding the ability for the namespace Iterator factory to look in multiple directories +* Added more getters/setters/removers from service descriptions +* Added the ability to remove POST fields from OAuth signatures +* OAuth plugin now supports 2-legged OAuth + +## 2.8.6 - 2012-09-05 + +* Added the ability to modify and build service descriptions +* Added the use of visitors to apply parameters to locations in service descriptions using the dynamic command +* Added a `json` parameter location +* Now allowing dot notation for classes in the CacheAdapterFactory +* Using the union of two arrays rather than an array_merge when extending service builder services and service params +* Ensuring that a service is a string before doing strpos() checks on it when substituting services for references + in service builder config files. +* Services defined in two different config files that include one another will by default replace the previously + defined service, but you can now create services that extend themselves and merge their settings over the previous +* The JsonLoader now supports aliasing filenames with different filenames. This allows you to alias something like + '_default' with a default JSON configuration file. + +## 2.8.5 - 2012-08-29 + +* Bug: Suppressed empty arrays from URI templates +* Bug: Added the missing $options argument from ServiceDescription::factory to enable caching +* Added support for HTTP responses that do not contain a reason phrase in the start-line +* AbstractCommand commands are now invokable +* Added a way to get the data used when signing an Oauth request before a request is sent + +## 2.8.4 - 2012-08-15 + +* Bug: Custom delay time calculations are no longer ignored in the ExponentialBackoffPlugin +* Added the ability to transfer entity bodies as a string rather than streamed. This gets around curl error 65. Set `body_as_string` in a request's curl options to enable. +* Added a StreamInterface, EntityBodyInterface, and added ftell() to Guzzle\Common\Stream +* Added an AbstractEntityBodyDecorator and a ReadLimitEntityBody decorator to transfer only a subset of a decorated stream +* Stream and EntityBody objects will now return the file position to the previous position after a read required operation (e.g. getContentMd5()) +* Added additional response status codes +* Removed SSL information from the default User-Agent header +* DELETE requests can now send an entity body +* Added an EventDispatcher to the ExponentialBackoffPlugin and added an ExponentialBackoffLogger to log backoff retries +* Added the ability of the MockPlugin to consume mocked request bodies +* LogPlugin now exposes request and response objects in the extras array + +## 2.8.3 - 2012-07-30 + +* Bug: Fixed a case where empty POST requests were sent as GET requests +* Bug: Fixed a bug in ExponentialBackoffPlugin that caused fatal errors when retrying an EntityEnclosingRequest that does not have a body +* Bug: Setting the response body of a request to null after completing a request, not when setting the state of a request to new +* Added multiple inheritance to service description commands +* Added an ApiCommandInterface and added `getParamNames()` and `hasParam()` +* Removed the default 2mb size cutoff from the Md5ValidatorPlugin so that it now defaults to validating everything +* Changed CurlMulti::perform to pass a smaller timeout to CurlMulti::executeHandles + +## 2.8.2 - 2012-07-24 + +* Bug: Query string values set to 0 are no longer dropped from the query string +* Bug: A Collection object is no longer created each time a call is made to `Guzzle\Service\Command\AbstractCommand::getRequestHeaders()` +* Bug: `+` is now treated as an encoded space when parsing query strings +* QueryString and Collection performance improvements +* Allowing dot notation for class paths in filters attribute of a service descriptions + +## 2.8.1 - 2012-07-16 + +* Loosening Event Dispatcher dependency +* POST redirects can now be customized using CURLOPT_POSTREDIR + +## 2.8.0 - 2012-07-15 + +* BC: Guzzle\Http\Query + * Query strings with empty variables will always show an equal sign unless the variable is set to QueryString::BLANK (e.g. ?acl= vs ?acl) + * Changed isEncodingValues() and isEncodingFields() to isUrlEncoding() + * Changed setEncodeValues(bool) and setEncodeFields(bool) to useUrlEncoding(bool) + * Changed the aggregation functions of QueryString to be static methods + * Can now use fromString() with querystrings that have a leading ? +* cURL configuration values can be specified in service descriptions using `curl.` prefixed parameters +* Content-Length is set to 0 before emitting the request.before_send event when sending an empty request body +* Cookies are no longer URL decoded by default +* Bug: URI template variables set to null are no longer expanded + +## 2.7.2 - 2012-07-02 + +* BC: Moving things to get ready for subtree splits. Moving Inflection into Common. Moving Guzzle\Http\Parser to Guzzle\Parser. +* BC: Removing Guzzle\Common\Batch\Batch::count() and replacing it with isEmpty() +* CachePlugin now allows for a custom request parameter function to check if a request can be cached +* Bug fix: CachePlugin now only caches GET and HEAD requests by default +* Bug fix: Using header glue when transferring headers over the wire +* Allowing deeply nested arrays for composite variables in URI templates +* Batch divisors can now return iterators or arrays + +## 2.7.1 - 2012-06-26 + +* Minor patch to update version number in UA string +* Updating build process + +## 2.7.0 - 2012-06-25 + +* BC: Inflection classes moved to Guzzle\Inflection. No longer static methods. Can now inject custom inflectors into classes. +* BC: Removed magic setX methods from commands +* BC: Magic methods mapped to service description commands are now inflected in the command factory rather than the client __call() method +* Verbose cURL options are no longer enabled by default. Set curl.debug to true on a client to enable. +* Bug: Now allowing colons in a response start-line (e.g. HTTP/1.1 503 Service Unavailable: Back-end server is at capacity) +* Guzzle\Service\Resource\ResourceIteratorApplyBatched now internally uses the Guzzle\Common\Batch namespace +* Added Guzzle\Service\Plugin namespace and a PluginCollectionPlugin +* Added the ability to set POST fields and files in a service description +* Guzzle\Http\EntityBody::factory() now accepts objects with a __toString() method +* Adding a command.before_prepare event to clients +* Added BatchClosureTransfer and BatchClosureDivisor +* BatchTransferException now includes references to the batch divisor and transfer strategies +* Fixed some tests so that they pass more reliably +* Added Guzzle\Common\Log\ArrayLogAdapter + +## 2.6.6 - 2012-06-10 + +* BC: Removing Guzzle\Http\Plugin\BatchQueuePlugin +* BC: Removing Guzzle\Service\Command\CommandSet +* Adding generic batching system (replaces the batch queue plugin and command set) +* Updating ZF cache and log adapters and now using ZF's composer repository +* Bug: Setting the name of each ApiParam when creating through an ApiCommand +* Adding result_type, result_doc, deprecated, and doc_url to service descriptions +* Bug: Changed the default cookie header casing back to 'Cookie' + +## 2.6.5 - 2012-06-03 + +* BC: Renaming Guzzle\Http\Message\RequestInterface::getResourceUri() to getResource() +* BC: Removing unused AUTH_BASIC and AUTH_DIGEST constants from +* BC: Guzzle\Http\Cookie is now used to manage Set-Cookie data, not Cookie data +* BC: Renaming methods in the CookieJarInterface +* Moving almost all cookie logic out of the CookiePlugin and into the Cookie or CookieJar implementations +* Making the default glue for HTTP headers ';' instead of ',' +* Adding a removeValue to Guzzle\Http\Message\Header +* Adding getCookies() to request interface. +* Making it easier to add event subscribers to HasDispatcherInterface classes. Can now directly call addSubscriber() + +## 2.6.4 - 2012-05-30 + +* BC: Cleaning up how POST files are stored in EntityEnclosingRequest objects. Adding PostFile class. +* BC: Moving ApiCommand specific functionality from the Inspector and on to the ApiCommand +* Bug: Fixing magic method command calls on clients +* Bug: Email constraint only validates strings +* Bug: Aggregate POST fields when POST files are present in curl handle +* Bug: Fixing default User-Agent header +* Bug: Only appending or prepending parameters in commands if they are specified +* Bug: Not requiring response reason phrases or status codes to match a predefined list of codes +* Allowing the use of dot notation for class namespaces when using instance_of constraint +* Added any_match validation constraint +* Added an AsyncPlugin +* Passing request object to the calculateWait method of the ExponentialBackoffPlugin +* Allowing the result of a command object to be changed +* Parsing location and type sub values when instantiating a service description rather than over and over at runtime + +## 2.6.3 - 2012-05-23 + +* [BC] Guzzle\Common\FromConfigInterface no longer requires any config options. +* [BC] Refactoring how POST files are stored on an EntityEnclosingRequest. They are now separate from POST fields. +* You can now use an array of data when creating PUT request bodies in the request factory. +* Removing the requirement that HTTPS requests needed a Cache-Control: public directive to be cacheable. +* [Http] Adding support for Content-Type in multipart POST uploads per upload +* [Http] Added support for uploading multiple files using the same name (foo[0], foo[1]) +* Adding more POST data operations for easier manipulation of POST data. +* You can now set empty POST fields. +* The body of a request is only shown on EntityEnclosingRequest objects that do not use POST files. +* Split the Guzzle\Service\Inspector::validateConfig method into two methods. One to initialize when a command is created, and one to validate. +* CS updates + +## 2.6.2 - 2012-05-19 + +* [Http] Better handling of nested scope requests in CurlMulti. Requests are now always prepares in the send() method rather than the addRequest() method. + +## 2.6.1 - 2012-05-19 + +* [BC] Removing 'path' support in service descriptions. Use 'uri'. +* [BC] Guzzle\Service\Inspector::parseDocBlock is now protected. Adding getApiParamsForClass() with cache. +* [BC] Removing Guzzle\Common\NullObject. Use https://github.com/mtdowling/NullObject if you need it. +* [BC] Removing Guzzle\Common\XmlElement. +* All commands, both dynamic and concrete, have ApiCommand objects. +* Adding a fix for CurlMulti so that if all of the connections encounter some sort of curl error, then the loop exits. +* Adding checks to EntityEnclosingRequest so that empty POST files and fields are ignored. +* Making the method signature of Guzzle\Service\Builder\ServiceBuilder::factory more flexible. + +## 2.6.0 - 2012-05-15 + +* [BC] Moving Guzzle\Service\Builder to Guzzle\Service\Builder\ServiceBuilder +* [BC] Executing a Command returns the result of the command rather than the command +* [BC] Moving all HTTP parsing logic to Guzzle\Http\Parsers. Allows for faster C implementations if needed. +* [BC] Changing the Guzzle\Http\Message\Response::setProtocol() method to accept a protocol and version in separate args. +* [BC] Moving ResourceIterator* to Guzzle\Service\Resource +* [BC] Completely refactored ResourceIterators to iterate over a cloned command object +* [BC] Moved Guzzle\Http\UriTemplate to Guzzle\Http\Parser\UriTemplate\UriTemplate +* [BC] Guzzle\Guzzle is now deprecated +* Moving Guzzle\Common\Guzzle::inject to Guzzle\Common\Collection::inject +* Adding Guzzle\Version class to give version information about Guzzle +* Adding Guzzle\Http\Utils class to provide getDefaultUserAgent() and getHttpDate() +* Adding Guzzle\Curl\CurlVersion to manage caching curl_version() data +* ServiceDescription and ServiceBuilder are now cacheable using similar configs +* Changing the format of XML and JSON service builder configs. Backwards compatible. +* Cleaned up Cookie parsing +* Trimming the default Guzzle User-Agent header +* Adding a setOnComplete() method to Commands that is called when a command completes +* Keeping track of requests that were mocked in the MockPlugin +* Fixed a caching bug in the CacheAdapterFactory +* Inspector objects can be injected into a Command object +* Refactoring a lot of code and tests to be case insensitive when dealing with headers +* Adding Guzzle\Http\Message\HeaderComparison for easy comparison of HTTP headers using a DSL +* Adding the ability to set global option overrides to service builder configs +* Adding the ability to include other service builder config files from within XML and JSON files +* Moving the parseQuery method out of Url and on to QueryString::fromString() as a static factory method. + +## 2.5.0 - 2012-05-08 + +* Major performance improvements +* [BC] Simplifying Guzzle\Common\Collection. Please check to see if you are using features that are now deprecated. +* [BC] Using a custom validation system that allows a flyweight implementation for much faster validation. No longer using Symfony2 Validation component. +* [BC] No longer supporting "{{ }}" for injecting into command or UriTemplates. Use "{}" +* Added the ability to passed parameters to all requests created by a client +* Added callback functionality to the ExponentialBackoffPlugin +* Using microtime in ExponentialBackoffPlugin to allow more granular backoff strategies. +* Rewinding request stream bodies when retrying requests +* Exception is thrown when JSON response body cannot be decoded +* Added configurable magic method calls to clients and commands. This is off by default. +* Fixed a defect that added a hash to every parsed URL part +* Fixed duplicate none generation for OauthPlugin. +* Emitting an event each time a client is generated by a ServiceBuilder +* Using an ApiParams object instead of a Collection for parameters of an ApiCommand +* cache.* request parameters should be renamed to params.cache.* +* Added the ability to set arbitrary curl options on requests (disable_wire, progress, etc.). See CurlHandle. +* Added the ability to disable type validation of service descriptions +* ServiceDescriptions and ServiceBuilders are now Serializable diff --git a/vendor/guzzlehttp/guzzle/LICENSE b/vendor/guzzlehttp/guzzle/LICENSE new file mode 100755 index 0000000..50a177b --- /dev/null +++ b/vendor/guzzlehttp/guzzle/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2018 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/guzzle/README.md b/vendor/guzzlehttp/guzzle/README.md new file mode 100755 index 0000000..bcd18b8 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/README.md @@ -0,0 +1,91 @@ +Guzzle, PHP HTTP client +======================= + +[![Latest Version](https://img.shields.io/github/release/guzzle/guzzle.svg?style=flat-square)](https://github.com/guzzle/guzzle/releases) +[![Build Status](https://img.shields.io/travis/guzzle/guzzle.svg?style=flat-square)](https://travis-ci.org/guzzle/guzzle) +[![Total Downloads](https://img.shields.io/packagist/dt/guzzlehttp/guzzle.svg?style=flat-square)](https://packagist.org/packages/guzzlehttp/guzzle) + +Guzzle is a PHP HTTP client that makes it easy to send HTTP requests and +trivial to integrate with web services. + +- Simple interface for building query strings, POST requests, streaming large + uploads, streaming large downloads, using HTTP cookies, uploading JSON data, + etc... +- Can send both synchronous and asynchronous requests using the same interface. +- Uses PSR-7 interfaces for requests, responses, and streams. This allows you + to utilize other PSR-7 compatible libraries with Guzzle. +- Abstracts away the underlying HTTP transport, allowing you to write + environment and transport agnostic code; i.e., no hard dependency on cURL, + PHP streams, sockets, or non-blocking event loops. +- Middleware system allows you to augment and compose client behavior. + +```php +$client = new \GuzzleHttp\Client(); +$res = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle'); +echo $res->getStatusCode(); +// 200 +echo $res->getHeaderLine('content-type'); +// 'application/json; charset=utf8' +echo $res->getBody(); +// '{"id": 1420053, "name": "guzzle", ...}' + +// Send an asynchronous request. +$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org'); +$promise = $client->sendAsync($request)->then(function ($response) { + echo 'I completed! ' . $response->getBody(); +}); +$promise->wait(); +``` + +## Help and docs + +- [Documentation](http://guzzlephp.org/) +- [Stack Overflow](http://stackoverflow.com/questions/tagged/guzzle) +- [Gitter](https://gitter.im/guzzle/guzzle) + + +## Installing Guzzle + +The recommended way to install Guzzle is through +[Composer](http://getcomposer.org). + +```bash +# Install Composer +curl -sS https://getcomposer.org/installer | php +``` + +Next, run the Composer command to install the latest stable version of Guzzle: + +```bash +php composer.phar require guzzlehttp/guzzle +``` + +After installing, you need to require Composer's autoloader: + +```php +require 'vendor/autoload.php'; +``` + +You can then later update Guzzle using composer: + + ```bash +composer.phar update + ``` + + +## Version Guidance + +| Version | Status | Packagist | Namespace | Repo | Docs | PSR-7 | PHP Version | +|---------|------------|---------------------|--------------|---------------------|---------------------|-------|-------------| +| 3.x | EOL | `guzzle/guzzle` | `Guzzle` | [v3][guzzle-3-repo] | [v3][guzzle-3-docs] | No | >= 5.3.3 | +| 4.x | EOL | `guzzlehttp/guzzle` | `GuzzleHttp` | [v4][guzzle-4-repo] | N/A | No | >= 5.4 | +| 5.x | Maintained | `guzzlehttp/guzzle` | `GuzzleHttp` | [v5][guzzle-5-repo] | [v5][guzzle-5-docs] | No | >= 5.4 | +| 6.x | Latest | `guzzlehttp/guzzle` | `GuzzleHttp` | [v6][guzzle-6-repo] | [v6][guzzle-6-docs] | Yes | >= 5.5 | + +[guzzle-3-repo]: https://github.com/guzzle/guzzle3 +[guzzle-4-repo]: https://github.com/guzzle/guzzle/tree/4.x +[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3 +[guzzle-6-repo]: https://github.com/guzzle/guzzle +[guzzle-3-docs]: http://guzzle3.readthedocs.org/en/latest/ +[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/ +[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/ diff --git a/vendor/guzzlehttp/guzzle/UPGRADING.md b/vendor/guzzlehttp/guzzle/UPGRADING.md new file mode 100755 index 0000000..91d1dcc --- /dev/null +++ b/vendor/guzzlehttp/guzzle/UPGRADING.md @@ -0,0 +1,1203 @@ +Guzzle Upgrade Guide +==================== + +5.0 to 6.0 +---------- + +Guzzle now uses [PSR-7](http://www.php-fig.org/psr/psr-7/) for HTTP messages. +Due to the fact that these messages are immutable, this prompted a refactoring +of Guzzle to use a middleware based system rather than an event system. Any +HTTP message interaction (e.g., `GuzzleHttp\Message\Request`) need to be +updated to work with the new immutable PSR-7 request and response objects. Any +event listeners or subscribers need to be updated to become middleware +functions that wrap handlers (or are injected into a +`GuzzleHttp\HandlerStack`). + +- Removed `GuzzleHttp\BatchResults` +- Removed `GuzzleHttp\Collection` +- Removed `GuzzleHttp\HasDataTrait` +- Removed `GuzzleHttp\ToArrayInterface` +- The `guzzlehttp/streams` dependency has been removed. Stream functionality + is now present in the `GuzzleHttp\Psr7` namespace provided by the + `guzzlehttp/psr7` package. +- Guzzle no longer uses ReactPHP promises and now uses the + `guzzlehttp/promises` library. We use a custom promise library for three + significant reasons: + 1. React promises (at the time of writing this) are recursive. Promise + chaining and promise resolution will eventually blow the stack. Guzzle + promises are not recursive as they use a sort of trampolining technique. + Note: there has been movement in the React project to modify promises to + no longer utilize recursion. + 2. Guzzle needs to have the ability to synchronously block on a promise to + wait for a result. Guzzle promises allows this functionality (and does + not require the use of recursion). + 3. Because we need to be able to wait on a result, doing so using React + promises requires wrapping react promises with RingPHP futures. This + overhead is no longer needed, reducing stack sizes, reducing complexity, + and improving performance. +- `GuzzleHttp\Mimetypes` has been moved to a function in + `GuzzleHttp\Psr7\mimetype_from_extension` and + `GuzzleHttp\Psr7\mimetype_from_filename`. +- `GuzzleHttp\Query` and `GuzzleHttp\QueryParser` have been removed. Query + strings must now be passed into request objects as strings, or provided to + the `query` request option when creating requests with clients. The `query` + option uses PHP's `http_build_query` to convert an array to a string. If you + need a different serialization technique, you will need to pass the query + string in as a string. There are a couple helper functions that will make + working with query strings easier: `GuzzleHttp\Psr7\parse_query` and + `GuzzleHttp\Psr7\build_query`. +- Guzzle no longer has a dependency on RingPHP. Due to the use of a middleware + system based on PSR-7, using RingPHP and it's middleware system as well adds + more complexity than the benefits it provides. All HTTP handlers that were + present in RingPHP have been modified to work directly with PSR-7 messages + and placed in the `GuzzleHttp\Handler` namespace. This significantly reduces + complexity in Guzzle, removes a dependency, and improves performance. RingPHP + will be maintained for Guzzle 5 support, but will no longer be a part of + Guzzle 6. +- As Guzzle now uses a middleware based systems the event system and RingPHP + integration has been removed. Note: while the event system has been removed, + it is possible to add your own type of event system that is powered by the + middleware system. + - Removed the `Event` namespace. + - Removed the `Subscriber` namespace. + - Removed `Transaction` class + - Removed `RequestFsm` + - Removed `RingBridge` + - `GuzzleHttp\Subscriber\Cookie` is now provided by + `GuzzleHttp\Middleware::cookies` + - `GuzzleHttp\Subscriber\HttpError` is now provided by + `GuzzleHttp\Middleware::httpError` + - `GuzzleHttp\Subscriber\History` is now provided by + `GuzzleHttp\Middleware::history` + - `GuzzleHttp\Subscriber\Mock` is now provided by + `GuzzleHttp\Handler\MockHandler` + - `GuzzleHttp\Subscriber\Prepare` is now provided by + `GuzzleHttp\PrepareBodyMiddleware` + - `GuzzleHttp\Subscriber\Redirect` is now provided by + `GuzzleHttp\RedirectMiddleware` +- Guzzle now uses `Psr\Http\Message\UriInterface` (implements in + `GuzzleHttp\Psr7\Uri`) for URI support. `GuzzleHttp\Url` is now gone. +- Static functions in `GuzzleHttp\Utils` have been moved to namespaced + functions under the `GuzzleHttp` namespace. This requires either a Composer + based autoloader or you to include functions.php. +- `GuzzleHttp\ClientInterface::getDefaultOption` has been renamed to + `GuzzleHttp\ClientInterface::getConfig`. +- `GuzzleHttp\ClientInterface::setDefaultOption` has been removed. +- The `json` and `xml` methods of response objects has been removed. With the + migration to strictly adhering to PSR-7 as the interface for Guzzle messages, + adding methods to message interfaces would actually require Guzzle messages + to extend from PSR-7 messages rather then work with them directly. + +## Migrating to middleware + +The change to PSR-7 unfortunately required significant refactoring to Guzzle +due to the fact that PSR-7 messages are immutable. Guzzle 5 relied on an event +system from plugins. The event system relied on mutability of HTTP messages and +side effects in order to work. With immutable messages, you have to change your +workflow to become more about either returning a value (e.g., functional +middlewares) or setting a value on an object. Guzzle v6 has chosen the +functional middleware approach. + +Instead of using the event system to listen for things like the `before` event, +you now create a stack based middleware function that intercepts a request on +the way in and the promise of the response on the way out. This is a much +simpler and more predictable approach than the event system and works nicely +with PSR-7 middleware. Due to the use of promises, the middleware system is +also asynchronous. + +v5: + +```php +use GuzzleHttp\Event\BeforeEvent; +$client = new GuzzleHttp\Client(); +// Get the emitter and listen to the before event. +$client->getEmitter()->on('before', function (BeforeEvent $e) { + // Guzzle v5 events relied on mutation + $e->getRequest()->setHeader('X-Foo', 'Bar'); +}); +``` + +v6: + +In v6, you can modify the request before it is sent using the `mapRequest` +middleware. The idiomatic way in v6 to modify the request/response lifecycle is +to setup a handler middleware stack up front and inject the handler into a +client. + +```php +use GuzzleHttp\Middleware; +// Create a handler stack that has all of the default middlewares attached +$handler = GuzzleHttp\HandlerStack::create(); +// Push the handler onto the handler stack +$handler->push(Middleware::mapRequest(function (RequestInterface $request) { + // Notice that we have to return a request object + return $request->withHeader('X-Foo', 'Bar'); +})); +// Inject the handler into the client +$client = new GuzzleHttp\Client(['handler' => $handler]); +``` + +## POST Requests + +This version added the [`form_params`](http://guzzle.readthedocs.org/en/latest/request-options.html#form_params) +and `multipart` request options. `form_params` is an associative array of +strings or array of strings and is used to serialize an +`application/x-www-form-urlencoded` POST request. The +[`multipart`](http://guzzle.readthedocs.org/en/latest/request-options.html#multipart) +option is now used to send a multipart/form-data POST request. + +`GuzzleHttp\Post\PostFile` has been removed. Use the `multipart` option to add +POST files to a multipart/form-data request. + +The `body` option no longer accepts an array to send POST requests. Please use +`multipart` or `form_params` instead. + +The `base_url` option has been renamed to `base_uri`. + +4.x to 5.0 +---------- + +## Rewritten Adapter Layer + +Guzzle now uses [RingPHP](http://ringphp.readthedocs.org/en/latest) to send +HTTP requests. The `adapter` option in a `GuzzleHttp\Client` constructor +is still supported, but it has now been renamed to `handler`. Instead of +passing a `GuzzleHttp\Adapter\AdapterInterface`, you must now pass a PHP +`callable` that follows the RingPHP specification. + +## Removed Fluent Interfaces + +[Fluent interfaces were removed](http://ocramius.github.io/blog/fluent-interfaces-are-evil) +from the following classes: + +- `GuzzleHttp\Collection` +- `GuzzleHttp\Url` +- `GuzzleHttp\Query` +- `GuzzleHttp\Post\PostBody` +- `GuzzleHttp\Cookie\SetCookie` + +## Removed functions.php + +Removed "functions.php", so that Guzzle is truly PSR-4 compliant. The following +functions can be used as replacements. + +- `GuzzleHttp\json_decode` -> `GuzzleHttp\Utils::jsonDecode` +- `GuzzleHttp\get_path` -> `GuzzleHttp\Utils::getPath` +- `GuzzleHttp\Utils::setPath` -> `GuzzleHttp\set_path` +- `GuzzleHttp\Pool::batch` -> `GuzzleHttp\batch`. This function is, however, + deprecated in favor of using `GuzzleHttp\Pool::batch()`. + +The "procedural" global client has been removed with no replacement (e.g., +`GuzzleHttp\get()`, `GuzzleHttp\post()`, etc.). Use a `GuzzleHttp\Client` +object as a replacement. + +## `throwImmediately` has been removed + +The concept of "throwImmediately" has been removed from exceptions and error +events. This control mechanism was used to stop a transfer of concurrent +requests from completing. This can now be handled by throwing the exception or +by cancelling a pool of requests or each outstanding future request +individually. + +## headers event has been removed + +Removed the "headers" event. This event was only useful for changing the +body a response once the headers of the response were known. You can implement +a similar behavior in a number of ways. One example might be to use a +FnStream that has access to the transaction being sent. For example, when the +first byte is written, you could check if the response headers match your +expectations, and if so, change the actual stream body that is being +written to. + +## Updates to HTTP Messages + +Removed the `asArray` parameter from +`GuzzleHttp\Message\MessageInterface::getHeader`. If you want to get a header +value as an array, then use the newly added `getHeaderAsArray()` method of +`MessageInterface`. This change makes the Guzzle interfaces compatible with +the PSR-7 interfaces. + +3.x to 4.0 +---------- + +## Overarching changes: + +- Now requires PHP 5.4 or greater. +- No longer requires cURL to send requests. +- Guzzle no longer wraps every exception it throws. Only exceptions that are + recoverable are now wrapped by Guzzle. +- Various namespaces have been removed or renamed. +- No longer requiring the Symfony EventDispatcher. A custom event dispatcher + based on the Symfony EventDispatcher is + now utilized in `GuzzleHttp\Event\EmitterInterface` (resulting in significant + speed and functionality improvements). + +Changes per Guzzle 3.x namespace are described below. + +## Batch + +The `Guzzle\Batch` namespace has been removed. This is best left to +third-parties to implement on top of Guzzle's core HTTP library. + +## Cache + +The `Guzzle\Cache` namespace has been removed. (Todo: No suitable replacement +has been implemented yet, but hoping to utilize a PSR cache interface). + +## Common + +- Removed all of the wrapped exceptions. It's better to use the standard PHP + library for unrecoverable exceptions. +- `FromConfigInterface` has been removed. +- `Guzzle\Common\Version` has been removed. The VERSION constant can be found + at `GuzzleHttp\ClientInterface::VERSION`. + +### Collection + +- `getAll` has been removed. Use `toArray` to convert a collection to an array. +- `inject` has been removed. +- `keySearch` has been removed. +- `getPath` no longer supports wildcard expressions. Use something better like + JMESPath for this. +- `setPath` now supports appending to an existing array via the `[]` notation. + +### Events + +Guzzle no longer requires Symfony's EventDispatcher component. Guzzle now uses +`GuzzleHttp\Event\Emitter`. + +- `Symfony\Component\EventDispatcher\EventDispatcherInterface` is replaced by + `GuzzleHttp\Event\EmitterInterface`. +- `Symfony\Component\EventDispatcher\EventDispatcher` is replaced by + `GuzzleHttp\Event\Emitter`. +- `Symfony\Component\EventDispatcher\Event` is replaced by + `GuzzleHttp\Event\Event`, and Guzzle now has an EventInterface in + `GuzzleHttp\Event\EventInterface`. +- `AbstractHasDispatcher` has moved to a trait, `HasEmitterTrait`, and + `HasDispatcherInterface` has moved to `HasEmitterInterface`. Retrieving the + event emitter of a request, client, etc. now uses the `getEmitter` method + rather than the `getDispatcher` method. + +#### Emitter + +- Use the `once()` method to add a listener that automatically removes itself + the first time it is invoked. +- Use the `listeners()` method to retrieve a list of event listeners rather than + the `getListeners()` method. +- Use `emit()` instead of `dispatch()` to emit an event from an emitter. +- Use `attach()` instead of `addSubscriber()` and `detach()` instead of + `removeSubscriber()`. + +```php +$mock = new Mock(); +// 3.x +$request->getEventDispatcher()->addSubscriber($mock); +$request->getEventDispatcher()->removeSubscriber($mock); +// 4.x +$request->getEmitter()->attach($mock); +$request->getEmitter()->detach($mock); +``` + +Use the `on()` method to add a listener rather than the `addListener()` method. + +```php +// 3.x +$request->getEventDispatcher()->addListener('foo', function (Event $event) { /* ... */ } ); +// 4.x +$request->getEmitter()->on('foo', function (Event $event, $name) { /* ... */ } ); +``` + +## Http + +### General changes + +- The cacert.pem certificate has been moved to `src/cacert.pem`. +- Added the concept of adapters that are used to transfer requests over the + wire. +- Simplified the event system. +- Sending requests in parallel is still possible, but batching is no longer a + concept of the HTTP layer. Instead, you must use the `complete` and `error` + events to asynchronously manage parallel request transfers. +- `Guzzle\Http\Url` has moved to `GuzzleHttp\Url`. +- `Guzzle\Http\QueryString` has moved to `GuzzleHttp\Query`. +- QueryAggregators have been rewritten so that they are simply callable + functions. +- `GuzzleHttp\StaticClient` has been removed. Use the functions provided in + `functions.php` for an easy to use static client instance. +- Exceptions in `GuzzleHttp\Exception` have been updated to all extend from + `GuzzleHttp\Exception\TransferException`. + +### Client + +Calling methods like `get()`, `post()`, `head()`, etc. no longer create and +return a request, but rather creates a request, sends the request, and returns +the response. + +```php +// 3.0 +$request = $client->get('/'); +$response = $request->send(); + +// 4.0 +$response = $client->get('/'); + +// or, to mirror the previous behavior +$request = $client->createRequest('GET', '/'); +$response = $client->send($request); +``` + +`GuzzleHttp\ClientInterface` has changed. + +- The `send` method no longer accepts more than one request. Use `sendAll` to + send multiple requests in parallel. +- `setUserAgent()` has been removed. Use a default request option instead. You + could, for example, do something like: + `$client->setConfig('defaults/headers/User-Agent', 'Foo/Bar ' . $client::getDefaultUserAgent())`. +- `setSslVerification()` has been removed. Use default request options instead, + like `$client->setConfig('defaults/verify', true)`. + +`GuzzleHttp\Client` has changed. + +- The constructor now accepts only an associative array. You can include a + `base_url` string or array to use a URI template as the base URL of a client. + You can also specify a `defaults` key that is an associative array of default + request options. You can pass an `adapter` to use a custom adapter, + `batch_adapter` to use a custom adapter for sending requests in parallel, or + a `message_factory` to change the factory used to create HTTP requests and + responses. +- The client no longer emits a `client.create_request` event. +- Creating requests with a client no longer automatically utilize a URI + template. You must pass an array into a creational method (e.g., + `createRequest`, `get`, `put`, etc.) in order to expand a URI template. + +### Messages + +Messages no longer have references to their counterparts (i.e., a request no +longer has a reference to it's response, and a response no loger has a +reference to its request). This association is now managed through a +`GuzzleHttp\Adapter\TransactionInterface` object. You can get references to +these transaction objects using request events that are emitted over the +lifecycle of a request. + +#### Requests with a body + +- `GuzzleHttp\Message\EntityEnclosingRequest` and + `GuzzleHttp\Message\EntityEnclosingRequestInterface` have been removed. The + separation between requests that contain a body and requests that do not + contain a body has been removed, and now `GuzzleHttp\Message\RequestInterface` + handles both use cases. +- Any method that previously accepts a `GuzzleHttp\Response` object now accept a + `GuzzleHttp\Message\ResponseInterface`. +- `GuzzleHttp\Message\RequestFactoryInterface` has been renamed to + `GuzzleHttp\Message\MessageFactoryInterface`. This interface is used to create + both requests and responses and is implemented in + `GuzzleHttp\Message\MessageFactory`. +- POST field and file methods have been removed from the request object. You + must now use the methods made available to `GuzzleHttp\Post\PostBodyInterface` + to control the format of a POST body. Requests that are created using a + standard `GuzzleHttp\Message\MessageFactoryInterface` will automatically use + a `GuzzleHttp\Post\PostBody` body if the body was passed as an array or if + the method is POST and no body is provided. + +```php +$request = $client->createRequest('POST', '/'); +$request->getBody()->setField('foo', 'bar'); +$request->getBody()->addFile(new PostFile('file_key', fopen('/path/to/content', 'r'))); +``` + +#### Headers + +- `GuzzleHttp\Message\Header` has been removed. Header values are now simply + represented by an array of values or as a string. Header values are returned + as a string by default when retrieving a header value from a message. You can + pass an optional argument of `true` to retrieve a header value as an array + of strings instead of a single concatenated string. +- `GuzzleHttp\PostFile` and `GuzzleHttp\PostFileInterface` have been moved to + `GuzzleHttp\Post`. This interface has been simplified and now allows the + addition of arbitrary headers. +- Custom headers like `GuzzleHttp\Message\Header\Link` have been removed. Most + of the custom headers are now handled separately in specific + subscribers/plugins, and `GuzzleHttp\Message\HeaderValues::parseParams()` has + been updated to properly handle headers that contain parameters (like the + `Link` header). + +#### Responses + +- `GuzzleHttp\Message\Response::getInfo()` and + `GuzzleHttp\Message\Response::setInfo()` have been removed. Use the event + system to retrieve this type of information. +- `GuzzleHttp\Message\Response::getRawHeaders()` has been removed. +- `GuzzleHttp\Message\Response::getMessage()` has been removed. +- `GuzzleHttp\Message\Response::calculateAge()` and other cache specific + methods have moved to the CacheSubscriber. +- Header specific helper functions like `getContentMd5()` have been removed. + Just use `getHeader('Content-MD5')` instead. +- `GuzzleHttp\Message\Response::setRequest()` and + `GuzzleHttp\Message\Response::getRequest()` have been removed. Use the event + system to work with request and response objects as a transaction. +- `GuzzleHttp\Message\Response::getRedirectCount()` has been removed. Use the + Redirect subscriber instead. +- `GuzzleHttp\Message\Response::isSuccessful()` and other related methods have + been removed. Use `getStatusCode()` instead. + +#### Streaming responses + +Streaming requests can now be created by a client directly, returning a +`GuzzleHttp\Message\ResponseInterface` object that contains a body stream +referencing an open PHP HTTP stream. + +```php +// 3.0 +use Guzzle\Stream\PhpStreamRequestFactory; +$request = $client->get('/'); +$factory = new PhpStreamRequestFactory(); +$stream = $factory->fromRequest($request); +$data = $stream->read(1024); + +// 4.0 +$response = $client->get('/', ['stream' => true]); +// Read some data off of the stream in the response body +$data = $response->getBody()->read(1024); +``` + +#### Redirects + +The `configureRedirects()` method has been removed in favor of a +`allow_redirects` request option. + +```php +// Standard redirects with a default of a max of 5 redirects +$request = $client->createRequest('GET', '/', ['allow_redirects' => true]); + +// Strict redirects with a custom number of redirects +$request = $client->createRequest('GET', '/', [ + 'allow_redirects' => ['max' => 5, 'strict' => true] +]); +``` + +#### EntityBody + +EntityBody interfaces and classes have been removed or moved to +`GuzzleHttp\Stream`. All classes and interfaces that once required +`GuzzleHttp\EntityBodyInterface` now require +`GuzzleHttp\Stream\StreamInterface`. Creating a new body for a request no +longer uses `GuzzleHttp\EntityBody::factory` but now uses +`GuzzleHttp\Stream\Stream::factory` or even better: +`GuzzleHttp\Stream\create()`. + +- `Guzzle\Http\EntityBodyInterface` is now `GuzzleHttp\Stream\StreamInterface` +- `Guzzle\Http\EntityBody` is now `GuzzleHttp\Stream\Stream` +- `Guzzle\Http\CachingEntityBody` is now `GuzzleHttp\Stream\CachingStream` +- `Guzzle\Http\ReadLimitEntityBody` is now `GuzzleHttp\Stream\LimitStream` +- `Guzzle\Http\IoEmittyinEntityBody` has been removed. + +#### Request lifecycle events + +Requests previously submitted a large number of requests. The number of events +emitted over the lifecycle of a request has been significantly reduced to make +it easier to understand how to extend the behavior of a request. All events +emitted during the lifecycle of a request now emit a custom +`GuzzleHttp\Event\EventInterface` object that contains context providing +methods and a way in which to modify the transaction at that specific point in +time (e.g., intercept the request and set a response on the transaction). + +- `request.before_send` has been renamed to `before` and now emits a + `GuzzleHttp\Event\BeforeEvent` +- `request.complete` has been renamed to `complete` and now emits a + `GuzzleHttp\Event\CompleteEvent`. +- `request.sent` has been removed. Use `complete`. +- `request.success` has been removed. Use `complete`. +- `error` is now an event that emits a `GuzzleHttp\Event\ErrorEvent`. +- `request.exception` has been removed. Use `error`. +- `request.receive.status_line` has been removed. +- `curl.callback.progress` has been removed. Use a custom `StreamInterface` to + maintain a status update. +- `curl.callback.write` has been removed. Use a custom `StreamInterface` to + intercept writes. +- `curl.callback.read` has been removed. Use a custom `StreamInterface` to + intercept reads. + +`headers` is a new event that is emitted after the response headers of a +request have been received before the body of the response is downloaded. This +event emits a `GuzzleHttp\Event\HeadersEvent`. + +You can intercept a request and inject a response using the `intercept()` event +of a `GuzzleHttp\Event\BeforeEvent`, `GuzzleHttp\Event\CompleteEvent`, and +`GuzzleHttp\Event\ErrorEvent` event. + +See: http://docs.guzzlephp.org/en/latest/events.html + +## Inflection + +The `Guzzle\Inflection` namespace has been removed. This is not a core concern +of Guzzle. + +## Iterator + +The `Guzzle\Iterator` namespace has been removed. + +- `Guzzle\Iterator\AppendIterator`, `Guzzle\Iterator\ChunkedIterator`, and + `Guzzle\Iterator\MethodProxyIterator` are nice, but not a core requirement of + Guzzle itself. +- `Guzzle\Iterator\FilterIterator` is no longer needed because an equivalent + class is shipped with PHP 5.4. +- `Guzzle\Iterator\MapIterator` is not really needed when using PHP 5.5 because + it's easier to just wrap an iterator in a generator that maps values. + +For a replacement of these iterators, see https://github.com/nikic/iter + +## Log + +The LogPlugin has moved to https://github.com/guzzle/log-subscriber. The +`Guzzle\Log` namespace has been removed. Guzzle now relies on +`Psr\Log\LoggerInterface` for all logging. The MessageFormatter class has been +moved to `GuzzleHttp\Subscriber\Log\Formatter`. + +## Parser + +The `Guzzle\Parser` namespace has been removed. This was previously used to +make it possible to plug in custom parsers for cookies, messages, URI +templates, and URLs; however, this level of complexity is not needed in Guzzle +so it has been removed. + +- Cookie: Cookie parsing logic has been moved to + `GuzzleHttp\Cookie\SetCookie::fromString`. +- Message: Message parsing logic for both requests and responses has been moved + to `GuzzleHttp\Message\MessageFactory::fromMessage`. Message parsing is only + used in debugging or deserializing messages, so it doesn't make sense for + Guzzle as a library to add this level of complexity to parsing messages. +- UriTemplate: URI template parsing has been moved to + `GuzzleHttp\UriTemplate`. The Guzzle library will automatically use the PECL + URI template library if it is installed. +- Url: URL parsing is now performed in `GuzzleHttp\Url::fromString` (previously + it was `Guzzle\Http\Url::factory()`). If custom URL parsing is necessary, + then developers are free to subclass `GuzzleHttp\Url`. + +## Plugin + +The `Guzzle\Plugin` namespace has been renamed to `GuzzleHttp\Subscriber`. +Several plugins are shipping with the core Guzzle library under this namespace. + +- `GuzzleHttp\Subscriber\Cookie`: Replaces the old CookiePlugin. Cookie jar + code has moved to `GuzzleHttp\Cookie`. +- `GuzzleHttp\Subscriber\History`: Replaces the old HistoryPlugin. +- `GuzzleHttp\Subscriber\HttpError`: Throws errors when a bad HTTP response is + received. +- `GuzzleHttp\Subscriber\Mock`: Replaces the old MockPlugin. +- `GuzzleHttp\Subscriber\Prepare`: Prepares the body of a request just before + sending. This subscriber is attached to all requests by default. +- `GuzzleHttp\Subscriber\Redirect`: Replaces the RedirectPlugin. + +The following plugins have been removed (third-parties are free to re-implement +these if needed): + +- `GuzzleHttp\Plugin\Async` has been removed. +- `GuzzleHttp\Plugin\CurlAuth` has been removed. +- `GuzzleHttp\Plugin\ErrorResponse\ErrorResponsePlugin` has been removed. This + functionality should instead be implemented with event listeners that occur + after normal response parsing occurs in the guzzle/command package. + +The following plugins are not part of the core Guzzle package, but are provided +in separate repositories: + +- `Guzzle\Http\Plugin\BackoffPlugin` has been rewritten to be much simpler + to build custom retry policies using simple functions rather than various + chained classes. See: https://github.com/guzzle/retry-subscriber +- `Guzzle\Http\Plugin\Cache\CachePlugin` has moved to + https://github.com/guzzle/cache-subscriber +- `Guzzle\Http\Plugin\Log\LogPlugin` has moved to + https://github.com/guzzle/log-subscriber +- `Guzzle\Http\Plugin\Md5\Md5Plugin` has moved to + https://github.com/guzzle/message-integrity-subscriber +- `Guzzle\Http\Plugin\Mock\MockPlugin` has moved to + `GuzzleHttp\Subscriber\MockSubscriber`. +- `Guzzle\Http\Plugin\Oauth\OauthPlugin` has moved to + https://github.com/guzzle/oauth-subscriber + +## Service + +The service description layer of Guzzle has moved into two separate packages: + +- http://github.com/guzzle/command Provides a high level abstraction over web + services by representing web service operations using commands. +- http://github.com/guzzle/guzzle-services Provides an implementation of + guzzle/command that provides request serialization and response parsing using + Guzzle service descriptions. + +## Stream + +Stream have moved to a separate package available at +https://github.com/guzzle/streams. + +`Guzzle\Stream\StreamInterface` has been given a large update to cleanly take +on the responsibilities of `Guzzle\Http\EntityBody` and +`Guzzle\Http\EntityBodyInterface` now that they have been removed. The number +of methods implemented by the `StreamInterface` has been drastically reduced to +allow developers to more easily extend and decorate stream behavior. + +## Removed methods from StreamInterface + +- `getStream` and `setStream` have been removed to better encapsulate streams. +- `getMetadata` and `setMetadata` have been removed in favor of + `GuzzleHttp\Stream\MetadataStreamInterface`. +- `getWrapper`, `getWrapperData`, `getStreamType`, and `getUri` have all been + removed. This data is accessible when + using streams that implement `GuzzleHttp\Stream\MetadataStreamInterface`. +- `rewind` has been removed. Use `seek(0)` for a similar behavior. + +## Renamed methods + +- `detachStream` has been renamed to `detach`. +- `feof` has been renamed to `eof`. +- `ftell` has been renamed to `tell`. +- `readLine` has moved from an instance method to a static class method of + `GuzzleHttp\Stream\Stream`. + +## Metadata streams + +`GuzzleHttp\Stream\MetadataStreamInterface` has been added to denote streams +that contain additional metadata accessible via `getMetadata()`. +`GuzzleHttp\Stream\StreamInterface::getMetadata` and +`GuzzleHttp\Stream\StreamInterface::setMetadata` have been removed. + +## StreamRequestFactory + +The entire concept of the StreamRequestFactory has been removed. The way this +was used in Guzzle 3 broke the actual interface of sending streaming requests +(instead of getting back a Response, you got a StreamInterface). Streaming +PHP requests are now implemented through the `GuzzleHttp\Adapter\StreamAdapter`. + +3.6 to 3.7 +---------- + +### Deprecations + +- You can now enable E_USER_DEPRECATED warnings to see if you are using any deprecated methods.: + +```php +\Guzzle\Common\Version::$emitWarnings = true; +``` + +The following APIs and options have been marked as deprecated: + +- Marked `Guzzle\Http\Message\Request::isResponseBodyRepeatable()` as deprecated. Use `$request->getResponseBody()->isRepeatable()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::canCache()` as deprecated. Use `Guzzle\Plugin\Cache\DefaultCanCacheStrategy->canCacheRequest()` instead. +- Marked `Guzzle\Http\Message\Request::setIsRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Http\Message\Request::isRedirect()` as deprecated. Use the HistoryPlugin instead. +- Marked `Guzzle\Cache\CacheAdapterFactory::factory()` as deprecated +- Marked `Guzzle\Service\Client::enableMagicMethods()` as deprecated. Magic methods can no longer be disabled on a Guzzle\Service\Client. +- Marked `Guzzle\Parser\Url\UrlParser` as deprecated. Just use PHP's `parse_url()` and percent encode your UTF-8. +- Marked `Guzzle\Common\Collection::inject()` as deprecated. +- Marked `Guzzle\Plugin\CurlAuth\CurlAuthPlugin` as deprecated. Use + `$client->getConfig()->setPath('request.options/auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` or + `$client->setDefaultOption('auth', array('user', 'pass', 'Basic|Digest|NTLM|Any'));` + +3.7 introduces `request.options` as a parameter for a client configuration and as an optional argument to all creational +request methods. When paired with a client's configuration settings, these options allow you to specify default settings +for various aspects of a request. Because these options make other previous configuration options redundant, several +configuration options and methods of a client and AbstractCommand have been deprecated. + +- Marked `Guzzle\Service\Client::getDefaultHeaders()` as deprecated. Use `$client->getDefaultOption('headers')`. +- Marked `Guzzle\Service\Client::setDefaultHeaders()` as deprecated. Use `$client->setDefaultOption('headers/{header_name}', 'value')`. +- Marked 'request.params' for `Guzzle\Http\Client` as deprecated. Use `$client->setDefaultOption('params/{param_name}', 'value')` +- Marked 'command.headers', 'command.response_body' and 'command.on_complete' as deprecated for AbstractCommand. These will work through Guzzle 4.0 + + $command = $client->getCommand('foo', array( + 'command.headers' => array('Test' => '123'), + 'command.response_body' => '/path/to/file' + )); + + // Should be changed to: + + $command = $client->getCommand('foo', array( + 'command.request_options' => array( + 'headers' => array('Test' => '123'), + 'save_as' => '/path/to/file' + ) + )); + +### Interface changes + +Additions and changes (you will need to update any implementations or subclasses you may have created): + +- Added an `$options` argument to the end of the following methods of `Guzzle\Http\ClientInterface`: + createRequest, head, delete, put, patch, post, options, prepareRequest +- Added an `$options` argument to the end of `Guzzle\Http\Message\Request\RequestFactoryInterface::createRequest()` +- Added an `applyOptions()` method to `Guzzle\Http\Message\Request\RequestFactoryInterface` +- Changed `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $body = null)` to + `Guzzle\Http\ClientInterface::get($uri = null, $headers = null, $options = array())`. You can still pass in a + resource, string, or EntityBody into the $options parameter to specify the download location of the response. +- Changed `Guzzle\Common\Collection::__construct($data)` to no longer accepts a null value for `$data` but a + default `array()` +- Added `Guzzle\Stream\StreamInterface::isRepeatable` +- Made `Guzzle\Http\Client::expandTemplate` and `getUriTemplate` protected methods. + +The following methods were removed from interfaces. All of these methods are still available in the concrete classes +that implement them, but you should update your code to use alternative methods: + +- Removed `Guzzle\Http\ClientInterface::setDefaultHeaders(). Use + `$client->getConfig()->setPath('request.options/headers/{header_name}', 'value')`. or + `$client->getConfig()->setPath('request.options/headers', array('header_name' => 'value'))` or + `$client->setDefaultOption('headers/{header_name}', 'value')`. or + `$client->setDefaultOption('headers', array('header_name' => 'value'))`. +- Removed `Guzzle\Http\ClientInterface::getDefaultHeaders(). Use `$client->getConfig()->getPath('request.options/headers')`. +- Removed `Guzzle\Http\ClientInterface::expandTemplate()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::setRequestFactory()`. This is an implementation detail. +- Removed `Guzzle\Http\ClientInterface::getCurlMulti()`. This is a very specific implementation detail. +- Removed `Guzzle\Http\Message\RequestInterface::canCache`. Use the CachePlugin. +- Removed `Guzzle\Http\Message\RequestInterface::setIsRedirect`. Use the HistoryPlugin. +- Removed `Guzzle\Http\Message\RequestInterface::isRedirect`. Use the HistoryPlugin. + +### Cache plugin breaking changes + +- CacheKeyProviderInterface and DefaultCacheKeyProvider are no longer used. All of this logic is handled in a + CacheStorageInterface. These two objects and interface will be removed in a future version. +- Always setting X-cache headers on cached responses +- Default cache TTLs are now handled by the CacheStorageInterface of a CachePlugin +- `CacheStorageInterface::cache($key, Response $response, $ttl = null)` has changed to `cache(RequestInterface + $request, Response $response);` +- `CacheStorageInterface::fetch($key)` has changed to `fetch(RequestInterface $request);` +- `CacheStorageInterface::delete($key)` has changed to `delete(RequestInterface $request);` +- Added `CacheStorageInterface::purge($url)` +- `DefaultRevalidation::__construct(CacheKeyProviderInterface $cacheKey, CacheStorageInterface $cache, CachePlugin + $plugin)` has changed to `DefaultRevalidation::__construct(CacheStorageInterface $cache, + CanCacheStrategyInterface $canCache = null)` +- Added `RevalidationInterface::shouldRevalidate(RequestInterface $request, Response $response)` + +3.5 to 3.6 +---------- + +* Mixed casing of headers are now forced to be a single consistent casing across all values for that header. +* Messages internally use a HeaderCollection object to delegate handling case-insensitive header resolution +* Removed the whole changedHeader() function system of messages because all header changes now go through addHeader(). + For example, setHeader() first removes the header using unset on a HeaderCollection and then calls addHeader(). + Keeping the Host header and URL host in sync is now handled by overriding the addHeader method in Request. +* Specific header implementations can be created for complex headers. When a message creates a header, it uses a + HeaderFactory which can map specific headers to specific header classes. There is now a Link header and + CacheControl header implementation. +* Moved getLinks() from Response to just be used on a Link header object. + +If you previously relied on Guzzle\Http\Message\Header::raw(), then you will need to update your code to use the +HeaderInterface (e.g. toArray(), getAll(), etc.). + +### Interface changes + +* Removed from interface: Guzzle\Http\ClientInterface::setUriTemplate +* Removed from interface: Guzzle\Http\ClientInterface::setCurlMulti() +* Removed Guzzle\Http\Message\Request::receivedRequestHeader() and implemented this functionality in + Guzzle\Http\Curl\RequestMediator +* Removed the optional $asString parameter from MessageInterface::getHeader(). Just cast the header to a string. +* Removed the optional $tryChunkedTransfer option from Guzzle\Http\Message\EntityEnclosingRequestInterface +* Removed the $asObjects argument from Guzzle\Http\Message\MessageInterface::getHeaders() + +### Removed deprecated functions + +* Removed Guzzle\Parser\ParserRegister::get(). Use getParser() +* Removed Guzzle\Parser\ParserRegister::set(). Use registerParser(). + +### Deprecations + +* The ability to case-insensitively search for header values +* Guzzle\Http\Message\Header::hasExactHeader +* Guzzle\Http\Message\Header::raw. Use getAll() +* Deprecated cache control specific methods on Guzzle\Http\Message\AbstractMessage. Use the CacheControl header object + instead. + +### Other changes + +* All response header helper functions return a string rather than mixing Header objects and strings inconsistently +* Removed cURL blacklist support. This is no longer necessary now that Expect, Accept, etc. are managed by Guzzle + directly via interfaces +* Removed the injecting of a request object onto a response object. The methods to get and set a request still exist + but are a no-op until removed. +* Most classes that used to require a `Guzzle\Service\Command\CommandInterface` typehint now request a + `Guzzle\Service\Command\ArrayCommandInterface`. +* Added `Guzzle\Http\Message\RequestInterface::startResponse()` to the RequestInterface to handle injecting a response + on a request while the request is still being transferred +* `Guzzle\Service\Command\CommandInterface` now extends from ToArrayInterface and ArrayAccess + +3.3 to 3.4 +---------- + +Base URLs of a client now follow the rules of http://tools.ietf.org/html/rfc3986#section-5.2.2 when merging URLs. + +3.2 to 3.3 +---------- + +### Response::getEtag() quote stripping removed + +`Guzzle\Http\Message\Response::getEtag()` no longer strips quotes around the ETag response header + +### Removed `Guzzle\Http\Utils` + +The `Guzzle\Http\Utils` class was removed. This class was only used for testing. + +### Stream wrapper and type + +`Guzzle\Stream\Stream::getWrapper()` and `Guzzle\Stream\Stream::getStreamType()` are no longer converted to lowercase. + +### curl.emit_io became emit_io + +Emitting IO events from a RequestMediator is now a parameter that must be set in a request's curl options using the +'emit_io' key. This was previously set under a request's parameters using 'curl.emit_io' + +3.1 to 3.2 +---------- + +### CurlMulti is no longer reused globally + +Before 3.2, the same CurlMulti object was reused globally for each client. This can cause issue where plugins added +to a single client can pollute requests dispatched from other clients. + +If you still wish to reuse the same CurlMulti object with each client, then you can add a listener to the +ServiceBuilder's `service_builder.create_client` event to inject a custom CurlMulti object into each client as it is +created. + +```php +$multi = new Guzzle\Http\Curl\CurlMulti(); +$builder = Guzzle\Service\Builder\ServiceBuilder::factory('/path/to/config.json'); +$builder->addListener('service_builder.create_client', function ($event) use ($multi) { + $event['client']->setCurlMulti($multi); +} +}); +``` + +### No default path + +URLs no longer have a default path value of '/' if no path was specified. + +Before: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com/ +``` + +After: + +```php +$request = $client->get('http://www.foo.com'); +echo $request->getUrl(); +// >> http://www.foo.com +``` + +### Less verbose BadResponseException + +The exception message for `Guzzle\Http\Exception\BadResponseException` no longer contains the full HTTP request and +response information. You can, however, get access to the request and response object by calling `getRequest()` or +`getResponse()` on the exception object. + +### Query parameter aggregation + +Multi-valued query parameters are no longer aggregated using a callback function. `Guzzle\Http\Query` now has a +setAggregator() method that accepts a `Guzzle\Http\QueryAggregator\QueryAggregatorInterface` object. This object is +responsible for handling the aggregation of multi-valued query string variables into a flattened hash. + +2.8 to 3.x +---------- + +### Guzzle\Service\Inspector + +Change `\Guzzle\Service\Inspector::fromConfig` to `\Guzzle\Common\Collection::fromConfig` + +**Before** + +```php +use Guzzle\Service\Inspector; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Inspector::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +**After** + +```php +use Guzzle\Common\Collection; + +class YourClient extends \Guzzle\Service\Client +{ + public static function factory($config = array()) + { + $default = array(); + $required = array('base_url', 'username', 'api_key'); + $config = Collection::fromConfig($config, $default, $required); + + $client = new self( + $config->get('base_url'), + $config->get('username'), + $config->get('api_key') + ); + $client->setConfig($config); + + $client->setDescription(ServiceDescription::factory(__DIR__ . DIRECTORY_SEPARATOR . 'client.json')); + + return $client; + } +``` + +### Convert XML Service Descriptions to JSON + +**Before** + +```xml + + + + + + Get a list of groups + + + Uses a search query to get a list of groups + + + + Create a group + + + + + Delete a group by ID + + + + + + + Update a group + + + + + + +``` + +**After** + +```json +{ + "name": "Zendesk REST API v2", + "apiVersion": "2012-12-31", + "description":"Provides access to Zendesk views, groups, tickets, ticket fields, and users", + "operations": { + "list_groups": { + "httpMethod":"GET", + "uri": "groups.json", + "summary": "Get a list of groups" + }, + "search_groups":{ + "httpMethod":"GET", + "uri": "search.json?query=\"{query} type:group\"", + "summary": "Uses a search query to get a list of groups", + "parameters":{ + "query":{ + "location": "uri", + "description":"Zendesk Search Query", + "type": "string", + "required": true + } + } + }, + "create_group": { + "httpMethod":"POST", + "uri": "groups.json", + "summary": "Create a group", + "parameters":{ + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + }, + "delete_group": { + "httpMethod":"DELETE", + "uri": "groups/{id}.json", + "summary": "Delete a group", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to delete by ID", + "type": "integer", + "required": true + } + } + }, + "get_group": { + "httpMethod":"GET", + "uri": "groups/{id}.json", + "summary": "Get a ticket", + "parameters":{ + "id":{ + "location": "uri", + "description":"Group to get by ID", + "type": "integer", + "required": true + } + } + }, + "update_group": { + "httpMethod":"PUT", + "uri": "groups/{id}.json", + "summary": "Update a group", + "parameters":{ + "id": { + "location": "uri", + "description":"Group to update by ID", + "type": "integer", + "required": true + }, + "data": { + "type": "array", + "location": "body", + "description":"Group JSON", + "filters": "json_encode", + "required": true + }, + "Content-Type":{ + "type": "string", + "location":"header", + "static": "application/json" + } + } + } +} +``` + +### Guzzle\Service\Description\ServiceDescription + +Commands are now called Operations + +**Before** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getCommands(); // @returns ApiCommandInterface[] +$sd->hasCommand($name); +$sd->getCommand($name); // @returns ApiCommandInterface|null +$sd->addCommand($command); // @param ApiCommandInterface $command +``` + +**After** + +```php +use Guzzle\Service\Description\ServiceDescription; + +$sd = new ServiceDescription(); +$sd->getOperations(); // @returns OperationInterface[] +$sd->hasOperation($name); +$sd->getOperation($name); // @returns OperationInterface|null +$sd->addOperation($operation); // @param OperationInterface $operation +``` + +### Guzzle\Common\Inflection\Inflector + +Namespace is now `Guzzle\Inflection\Inflector` + +### Guzzle\Http\Plugin + +Namespace is now `Guzzle\Plugin`. Many other changes occur within this namespace and are detailed in their own sections below. + +### Guzzle\Http\Plugin\LogPlugin and Guzzle\Common\Log + +Now `Guzzle\Plugin\Log\LogPlugin` and `Guzzle\Log` respectively. + +**Before** + +```php +use Guzzle\Common\Log\ClosureLogAdapter; +use Guzzle\Http\Plugin\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $verbosity is an integer indicating desired message verbosity level +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $verbosity = LogPlugin::LOG_VERBOSE); +``` + +**After** + +```php +use Guzzle\Log\ClosureLogAdapter; +use Guzzle\Log\MessageFormatter; +use Guzzle\Plugin\Log\LogPlugin; + +/** @var \Guzzle\Http\Client */ +$client; + +// $format is a string indicating desired message format -- @see MessageFormatter +$client->addSubscriber(new LogPlugin(new ClosureLogAdapter(function($m) { echo $m; }, $format = MessageFormatter::DEBUG_FORMAT); +``` + +### Guzzle\Http\Plugin\CurlAuthPlugin + +Now `Guzzle\Plugin\CurlAuth\CurlAuthPlugin`. + +### Guzzle\Http\Plugin\ExponentialBackoffPlugin + +Now `Guzzle\Plugin\Backoff\BackoffPlugin`, and other changes. + +**Before** + +```php +use Guzzle\Http\Plugin\ExponentialBackoffPlugin; + +$backoffPlugin = new ExponentialBackoffPlugin($maxRetries, array_merge( + ExponentialBackoffPlugin::getDefaultFailureCodes(), array(429) + )); + +$client->addSubscriber($backoffPlugin); +``` + +**After** + +```php +use Guzzle\Plugin\Backoff\BackoffPlugin; +use Guzzle\Plugin\Backoff\HttpBackoffStrategy; + +// Use convenient factory method instead -- see implementation for ideas of what +// you can do with chaining backoff strategies +$backoffPlugin = BackoffPlugin::getExponentialBackoff($maxRetries, array_merge( + HttpBackoffStrategy::getDefaultFailureCodes(), array(429) + )); +$client->addSubscriber($backoffPlugin); +``` + +### Known Issues + +#### [BUG] Accept-Encoding header behavior changed unintentionally. + +(See #217) (Fixed in 09daeb8c666fb44499a0646d655a8ae36456575e) + +In version 2.8 setting the `Accept-Encoding` header would set the CURLOPT_ENCODING option, which permitted cURL to +properly handle gzip/deflate compressed responses from the server. In versions affected by this bug this does not happen. +See issue #217 for a workaround, or use a version containing the fix. diff --git a/vendor/guzzlehttp/guzzle/composer.json b/vendor/guzzlehttp/guzzle/composer.json new file mode 100755 index 0000000..1f328e3 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/composer.json @@ -0,0 +1,44 @@ +{ + "name": "guzzlehttp/guzzle", + "type": "library", + "description": "Guzzle is a PHP HTTP client library", + "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"], + "homepage": "http://guzzlephp.org/", + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "require": { + "php": ">=5.5", + "guzzlehttp/psr7": "^1.4", + "guzzlehttp/promises": "^1.0" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.0" + }, + "autoload": { + "files": ["src/functions_include.php"], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Tests\\": "tests/" + } + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "extra": { + "branch-alias": { + "dev-master": "6.3-dev" + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Client.php b/vendor/guzzlehttp/guzzle/src/Client.php new file mode 100755 index 0000000..8041791 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Client.php @@ -0,0 +1,422 @@ + 'http://www.foo.com/1.0/', + * 'timeout' => 0, + * 'allow_redirects' => false, + * 'proxy' => '192.168.16.1:10' + * ]); + * + * Client configuration settings include the following options: + * + * - handler: (callable) Function that transfers HTTP requests over the + * wire. The function is called with a Psr7\Http\Message\RequestInterface + * and array of transfer options, and must return a + * GuzzleHttp\Promise\PromiseInterface that is fulfilled with a + * Psr7\Http\Message\ResponseInterface on success. "handler" is a + * constructor only option that cannot be overridden in per/request + * options. If no handler is provided, a default handler will be created + * that enables all of the request options below by attaching all of the + * default middleware to the handler. + * - base_uri: (string|UriInterface) Base URI of the client that is merged + * into relative URIs. Can be a string or instance of UriInterface. + * - **: any request option + * + * @param array $config Client configuration settings. + * + * @see \GuzzleHttp\RequestOptions for a list of available request options. + */ + public function __construct(array $config = []) + { + if (!isset($config['handler'])) { + $config['handler'] = HandlerStack::create(); + } elseif (!is_callable($config['handler'])) { + throw new \InvalidArgumentException('handler must be a callable'); + } + + // Convert the base_uri to a UriInterface + if (isset($config['base_uri'])) { + $config['base_uri'] = Psr7\uri_for($config['base_uri']); + } + + $this->configureDefaults($config); + } + + public function __call($method, $args) + { + if (count($args) < 1) { + throw new \InvalidArgumentException('Magic request methods require a URI and optional options array'); + } + + $uri = $args[0]; + $opts = isset($args[1]) ? $args[1] : []; + + return substr($method, -5) === 'Async' + ? $this->requestAsync(substr($method, 0, -5), $uri, $opts) + : $this->request($method, $uri, $opts); + } + + public function sendAsync(RequestInterface $request, array $options = []) + { + // Merge the base URI into the request URI if needed. + $options = $this->prepareDefaults($options); + + return $this->transfer( + $request->withUri($this->buildUri($request->getUri(), $options), $request->hasHeader('Host')), + $options + ); + } + + public function send(RequestInterface $request, array $options = []) + { + $options[RequestOptions::SYNCHRONOUS] = true; + return $this->sendAsync($request, $options)->wait(); + } + + public function requestAsync($method, $uri = '', array $options = []) + { + $options = $this->prepareDefaults($options); + // Remove request modifying parameter because it can be done up-front. + $headers = isset($options['headers']) ? $options['headers'] : []; + $body = isset($options['body']) ? $options['body'] : null; + $version = isset($options['version']) ? $options['version'] : '1.1'; + // Merge the URI into the base URI. + $uri = $this->buildUri($uri, $options); + if (is_array($body)) { + $this->invalidBody(); + } + $request = new Psr7\Request($method, $uri, $headers, $body, $version); + // Remove the option so that they are not doubly-applied. + unset($options['headers'], $options['body'], $options['version']); + + return $this->transfer($request, $options); + } + + public function request($method, $uri = '', array $options = []) + { + $options[RequestOptions::SYNCHRONOUS] = true; + return $this->requestAsync($method, $uri, $options)->wait(); + } + + public function getConfig($option = null) + { + return $option === null + ? $this->config + : (isset($this->config[$option]) ? $this->config[$option] : null); + } + + private function buildUri($uri, array $config) + { + // for BC we accept null which would otherwise fail in uri_for + $uri = Psr7\uri_for($uri === null ? '' : $uri); + + if (isset($config['base_uri'])) { + $uri = Psr7\UriResolver::resolve(Psr7\uri_for($config['base_uri']), $uri); + } + + return $uri->getScheme() === '' && $uri->getHost() !== '' ? $uri->withScheme('http') : $uri; + } + + /** + * Configures the default options for a client. + * + * @param array $config + */ + private function configureDefaults(array $config) + { + $defaults = [ + 'allow_redirects' => RedirectMiddleware::$defaultSettings, + 'http_errors' => true, + 'decode_content' => true, + 'verify' => true, + 'cookies' => false + ]; + + // Use the standard Linux HTTP_PROXY and HTTPS_PROXY if set. + + // We can only trust the HTTP_PROXY environment variable in a CLI + // process due to the fact that PHP has no reliable mechanism to + // get environment variables that start with "HTTP_". + if (php_sapi_name() == 'cli' && getenv('HTTP_PROXY')) { + $defaults['proxy']['http'] = getenv('HTTP_PROXY'); + } + + if ($proxy = getenv('HTTPS_PROXY')) { + $defaults['proxy']['https'] = $proxy; + } + + if ($noProxy = getenv('NO_PROXY')) { + $cleanedNoProxy = str_replace(' ', '', $noProxy); + $defaults['proxy']['no'] = explode(',', $cleanedNoProxy); + } + + $this->config = $config + $defaults; + + if (!empty($config['cookies']) && $config['cookies'] === true) { + $this->config['cookies'] = new CookieJar(); + } + + // Add the default user-agent header. + if (!isset($this->config['headers'])) { + $this->config['headers'] = ['User-Agent' => default_user_agent()]; + } else { + // Add the User-Agent header if one was not already set. + foreach (array_keys($this->config['headers']) as $name) { + if (strtolower($name) === 'user-agent') { + return; + } + } + $this->config['headers']['User-Agent'] = default_user_agent(); + } + } + + /** + * Merges default options into the array. + * + * @param array $options Options to modify by reference + * + * @return array + */ + private function prepareDefaults($options) + { + $defaults = $this->config; + + if (!empty($defaults['headers'])) { + // Default headers are only added if they are not present. + $defaults['_conditional'] = $defaults['headers']; + unset($defaults['headers']); + } + + // Special handling for headers is required as they are added as + // conditional headers and as headers passed to a request ctor. + if (array_key_exists('headers', $options)) { + // Allows default headers to be unset. + if ($options['headers'] === null) { + $defaults['_conditional'] = null; + unset($options['headers']); + } elseif (!is_array($options['headers'])) { + throw new \InvalidArgumentException('headers must be an array'); + } + } + + // Shallow merge defaults underneath options. + $result = $options + $defaults; + + // Remove null values. + foreach ($result as $k => $v) { + if ($v === null) { + unset($result[$k]); + } + } + + return $result; + } + + /** + * Transfers the given request and applies request options. + * + * The URI of the request is not modified and the request options are used + * as-is without merging in default options. + * + * @param RequestInterface $request + * @param array $options + * + * @return Promise\PromiseInterface + */ + private function transfer(RequestInterface $request, array $options) + { + // save_to -> sink + if (isset($options['save_to'])) { + $options['sink'] = $options['save_to']; + unset($options['save_to']); + } + + // exceptions -> http_errors + if (isset($options['exceptions'])) { + $options['http_errors'] = $options['exceptions']; + unset($options['exceptions']); + } + + $request = $this->applyOptions($request, $options); + $handler = $options['handler']; + + try { + return Promise\promise_for($handler($request, $options)); + } catch (\Exception $e) { + return Promise\rejection_for($e); + } + } + + /** + * Applies the array of request options to a request. + * + * @param RequestInterface $request + * @param array $options + * + * @return RequestInterface + */ + private function applyOptions(RequestInterface $request, array &$options) + { + $modify = [ + 'set_headers' => [], + ]; + + if (isset($options['headers'])) { + $modify['set_headers'] = $options['headers']; + unset($options['headers']); + } + + if (isset($options['form_params'])) { + if (isset($options['multipart'])) { + throw new \InvalidArgumentException('You cannot use ' + . 'form_params and multipart at the same time. Use the ' + . 'form_params option if you want to send application/' + . 'x-www-form-urlencoded requests, and the multipart ' + . 'option to send multipart/form-data requests.'); + } + $options['body'] = http_build_query($options['form_params'], '', '&'); + unset($options['form_params']); + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'application/x-www-form-urlencoded'; + } + + if (isset($options['multipart'])) { + $options['body'] = new Psr7\MultipartStream($options['multipart']); + unset($options['multipart']); + } + + if (isset($options['json'])) { + $options['body'] = \GuzzleHttp\json_encode($options['json']); + unset($options['json']); + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'application/json'; + } + + if (!empty($options['decode_content']) + && $options['decode_content'] !== true + ) { + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\_caseless_remove(['Accept-Encoding'], $options['_conditional']); + $modify['set_headers']['Accept-Encoding'] = $options['decode_content']; + } + + if (isset($options['body'])) { + if (is_array($options['body'])) { + $this->invalidBody(); + } + $modify['body'] = Psr7\stream_for($options['body']); + unset($options['body']); + } + + if (!empty($options['auth']) && is_array($options['auth'])) { + $value = $options['auth']; + $type = isset($value[2]) ? strtolower($value[2]) : 'basic'; + switch ($type) { + case 'basic': + // Ensure that we don't have the header in different case and set the new value. + $modify['set_headers'] = Psr7\_caseless_remove(['Authorization'], $modify['set_headers']); + $modify['set_headers']['Authorization'] = 'Basic ' + . base64_encode("$value[0]:$value[1]"); + break; + case 'digest': + // @todo: Do not rely on curl + $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_DIGEST; + $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; + break; + case 'ntlm': + $options['curl'][CURLOPT_HTTPAUTH] = CURLAUTH_NTLM; + $options['curl'][CURLOPT_USERPWD] = "$value[0]:$value[1]"; + break; + } + } + + if (isset($options['query'])) { + $value = $options['query']; + if (is_array($value)) { + $value = http_build_query($value, null, '&', PHP_QUERY_RFC3986); + } + if (!is_string($value)) { + throw new \InvalidArgumentException('query must be a string or array'); + } + $modify['query'] = $value; + unset($options['query']); + } + + // Ensure that sink is not an invalid value. + if (isset($options['sink'])) { + // TODO: Add more sink validation? + if (is_bool($options['sink'])) { + throw new \InvalidArgumentException('sink must not be a boolean'); + } + } + + $request = Psr7\modify_request($request, $modify); + if ($request->getBody() instanceof Psr7\MultipartStream) { + // Use a multipart/form-data POST if a Content-Type is not set. + // Ensure that we don't have the header in different case and set the new value. + $options['_conditional'] = Psr7\_caseless_remove(['Content-Type'], $options['_conditional']); + $options['_conditional']['Content-Type'] = 'multipart/form-data; boundary=' + . $request->getBody()->getBoundary(); + } + + // Merge in conditional headers if they are not present. + if (isset($options['_conditional'])) { + // Build up the changes so it's in a single clone of the message. + $modify = []; + foreach ($options['_conditional'] as $k => $v) { + if (!$request->hasHeader($k)) { + $modify['set_headers'][$k] = $v; + } + } + $request = Psr7\modify_request($request, $modify); + // Don't pass this internal value along to middleware/handlers. + unset($options['_conditional']); + } + + return $request; + } + + private function invalidBody() + { + throw new \InvalidArgumentException('Passing in the "body" request ' + . 'option as an array to send a POST request has been deprecated. ' + . 'Please use the "form_params" request option to send a ' + . 'application/x-www-form-urlencoded request, or the "multipart" ' + . 'request option to send a multipart/form-data request.'); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/ClientInterface.php b/vendor/guzzlehttp/guzzle/src/ClientInterface.php new file mode 100755 index 0000000..2dbcffa --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/ClientInterface.php @@ -0,0 +1,84 @@ +strictMode = $strictMode; + + foreach ($cookieArray as $cookie) { + if (!($cookie instanceof SetCookie)) { + $cookie = new SetCookie($cookie); + } + $this->setCookie($cookie); + } + } + + /** + * Create a new Cookie jar from an associative array and domain. + * + * @param array $cookies Cookies to create the jar from + * @param string $domain Domain to set the cookies to + * + * @return self + */ + public static function fromArray(array $cookies, $domain) + { + $cookieJar = new self(); + foreach ($cookies as $name => $value) { + $cookieJar->setCookie(new SetCookie([ + 'Domain' => $domain, + 'Name' => $name, + 'Value' => $value, + 'Discard' => true + ])); + } + + return $cookieJar; + } + + /** + * @deprecated + */ + public static function getCookieValue($value) + { + return $value; + } + + /** + * Evaluate if this cookie should be persisted to storage + * that survives between requests. + * + * @param SetCookie $cookie Being evaluated. + * @param bool $allowSessionCookies If we should persist session cookies + * @return bool + */ + public static function shouldPersist( + SetCookie $cookie, + $allowSessionCookies = false + ) { + if ($cookie->getExpires() || $allowSessionCookies) { + if (!$cookie->getDiscard()) { + return true; + } + } + + return false; + } + + /** + * Finds and returns the cookie based on the name + * + * @param string $name cookie name to search for + * @return SetCookie|null cookie that was found or null if not found + */ + public function getCookieByName($name) + { + // don't allow a null name + if ($name === null) { + return null; + } + foreach ($this->cookies as $cookie) { + if ($cookie->getName() !== null && strcasecmp($cookie->getName(), $name) === 0) { + return $cookie; + } + } + } + + public function toArray() + { + return array_map(function (SetCookie $cookie) { + return $cookie->toArray(); + }, $this->getIterator()->getArrayCopy()); + } + + public function clear($domain = null, $path = null, $name = null) + { + if (!$domain) { + $this->cookies = []; + return; + } elseif (!$path) { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) use ($path, $domain) { + return !$cookie->matchesDomain($domain); + } + ); + } elseif (!$name) { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) use ($path, $domain) { + return !($cookie->matchesPath($path) && + $cookie->matchesDomain($domain)); + } + ); + } else { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) use ($path, $domain, $name) { + return !($cookie->getName() == $name && + $cookie->matchesPath($path) && + $cookie->matchesDomain($domain)); + } + ); + } + } + + public function clearSessionCookies() + { + $this->cookies = array_filter( + $this->cookies, + function (SetCookie $cookie) { + return !$cookie->getDiscard() && $cookie->getExpires(); + } + ); + } + + public function setCookie(SetCookie $cookie) + { + // If the name string is empty (but not 0), ignore the set-cookie + // string entirely. + $name = $cookie->getName(); + if (!$name && $name !== '0') { + return false; + } + + // Only allow cookies with set and valid domain, name, value + $result = $cookie->validate(); + if ($result !== true) { + if ($this->strictMode) { + throw new \RuntimeException('Invalid cookie: ' . $result); + } else { + $this->removeCookieIfEmpty($cookie); + return false; + } + } + + // Resolve conflicts with previously set cookies + foreach ($this->cookies as $i => $c) { + + // Two cookies are identical, when their path, and domain are + // identical. + if ($c->getPath() != $cookie->getPath() || + $c->getDomain() != $cookie->getDomain() || + $c->getName() != $cookie->getName() + ) { + continue; + } + + // The previously set cookie is a discard cookie and this one is + // not so allow the new cookie to be set + if (!$cookie->getDiscard() && $c->getDiscard()) { + unset($this->cookies[$i]); + continue; + } + + // If the new cookie's expiration is further into the future, then + // replace the old cookie + if ($cookie->getExpires() > $c->getExpires()) { + unset($this->cookies[$i]); + continue; + } + + // If the value has changed, we better change it + if ($cookie->getValue() !== $c->getValue()) { + unset($this->cookies[$i]); + continue; + } + + // The cookie exists, so no need to continue + return false; + } + + $this->cookies[] = $cookie; + + return true; + } + + public function count() + { + return count($this->cookies); + } + + public function getIterator() + { + return new \ArrayIterator(array_values($this->cookies)); + } + + public function extractCookies( + RequestInterface $request, + ResponseInterface $response + ) { + if ($cookieHeader = $response->getHeader('Set-Cookie')) { + foreach ($cookieHeader as $cookie) { + $sc = SetCookie::fromString($cookie); + if (!$sc->getDomain()) { + $sc->setDomain($request->getUri()->getHost()); + } + if (0 !== strpos($sc->getPath(), '/')) { + $sc->setPath($this->getCookiePathFromRequest($request)); + } + $this->setCookie($sc); + } + } + } + + /** + * Computes cookie path following RFC 6265 section 5.1.4 + * + * @link https://tools.ietf.org/html/rfc6265#section-5.1.4 + * + * @param RequestInterface $request + * @return string + */ + private function getCookiePathFromRequest(RequestInterface $request) + { + $uriPath = $request->getUri()->getPath(); + if ('' === $uriPath) { + return '/'; + } + if (0 !== strpos($uriPath, '/')) { + return '/'; + } + if ('/' === $uriPath) { + return '/'; + } + if (0 === $lastSlashPos = strrpos($uriPath, '/')) { + return '/'; + } + + return substr($uriPath, 0, $lastSlashPos); + } + + public function withCookieHeader(RequestInterface $request) + { + $values = []; + $uri = $request->getUri(); + $scheme = $uri->getScheme(); + $host = $uri->getHost(); + $path = $uri->getPath() ?: '/'; + + foreach ($this->cookies as $cookie) { + if ($cookie->matchesPath($path) && + $cookie->matchesDomain($host) && + !$cookie->isExpired() && + (!$cookie->getSecure() || $scheme === 'https') + ) { + $values[] = $cookie->getName() . '=' + . $cookie->getValue(); + } + } + + return $values + ? $request->withHeader('Cookie', implode('; ', $values)) + : $request; + } + + /** + * If a cookie already exists and the server asks to set it again with a + * null value, the cookie must be deleted. + * + * @param SetCookie $cookie + */ + private function removeCookieIfEmpty(SetCookie $cookie) + { + $cookieValue = $cookie->getValue(); + if ($cookieValue === null || $cookieValue === '') { + $this->clear( + $cookie->getDomain(), + $cookie->getPath(), + $cookie->getName() + ); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php new file mode 100755 index 0000000..2cf298a --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/CookieJarInterface.php @@ -0,0 +1,84 @@ +filename = $cookieFile; + $this->storeSessionCookies = $storeSessionCookies; + + if (file_exists($cookieFile)) { + $this->load($cookieFile); + } + } + + /** + * Saves the file when shutting down + */ + public function __destruct() + { + $this->save($this->filename); + } + + /** + * Saves the cookies to a file. + * + * @param string $filename File to save + * @throws \RuntimeException if the file cannot be found or created + */ + public function save($filename) + { + $json = []; + foreach ($this as $cookie) { + /** @var SetCookie $cookie */ + if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + + $jsonStr = \GuzzleHttp\json_encode($json); + if (false === file_put_contents($filename, $jsonStr)) { + throw new \RuntimeException("Unable to save file {$filename}"); + } + } + + /** + * Load cookies from a JSON formatted file. + * + * Old cookies are kept unless overwritten by newly loaded ones. + * + * @param string $filename Cookie file to load. + * @throws \RuntimeException if the file cannot be loaded. + */ + public function load($filename) + { + $json = file_get_contents($filename); + if (false === $json) { + throw new \RuntimeException("Unable to load file {$filename}"); + } elseif ($json === '') { + return; + } + + $data = \GuzzleHttp\json_decode($json, true); + if (is_array($data)) { + foreach (json_decode($json, true) as $cookie) { + $this->setCookie(new SetCookie($cookie)); + } + } elseif (strlen($data)) { + throw new \RuntimeException("Invalid cookie file: {$filename}"); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php new file mode 100755 index 0000000..4497bcf --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php @@ -0,0 +1,71 @@ +sessionKey = $sessionKey; + $this->storeSessionCookies = $storeSessionCookies; + $this->load(); + } + + /** + * Saves cookies to session when shutting down + */ + public function __destruct() + { + $this->save(); + } + + /** + * Save cookies to the client session + */ + public function save() + { + $json = []; + foreach ($this as $cookie) { + /** @var SetCookie $cookie */ + if (CookieJar::shouldPersist($cookie, $this->storeSessionCookies)) { + $json[] = $cookie->toArray(); + } + } + + $_SESSION[$this->sessionKey] = json_encode($json); + } + + /** + * Load the contents of the client session into the data array + */ + protected function load() + { + if (!isset($_SESSION[$this->sessionKey])) { + return; + } + $data = json_decode($_SESSION[$this->sessionKey], true); + if (is_array($data)) { + foreach ($data as $cookie) { + $this->setCookie(new SetCookie($cookie)); + } + } elseif (strlen($data)) { + throw new \RuntimeException("Invalid cookie data"); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php new file mode 100755 index 0000000..f699394 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php @@ -0,0 +1,403 @@ + null, + 'Value' => null, + 'Domain' => null, + 'Path' => '/', + 'Max-Age' => null, + 'Expires' => null, + 'Secure' => false, + 'Discard' => false, + 'HttpOnly' => false + ]; + + /** @var array Cookie data */ + private $data; + + /** + * Create a new SetCookie object from a string + * + * @param string $cookie Set-Cookie header string + * + * @return self + */ + public static function fromString($cookie) + { + // Create the default return array + $data = self::$defaults; + // Explode the cookie string using a series of semicolons + $pieces = array_filter(array_map('trim', explode(';', $cookie))); + // The name of the cookie (first kvp) must exist and include an equal sign. + if (empty($pieces[0]) || !strpos($pieces[0], '=')) { + return new self($data); + } + + // Add the cookie pieces into the parsed data array + foreach ($pieces as $part) { + $cookieParts = explode('=', $part, 2); + $key = trim($cookieParts[0]); + $value = isset($cookieParts[1]) + ? trim($cookieParts[1], " \n\r\t\0\x0B") + : true; + + // Only check for non-cookies when cookies have been found + if (empty($data['Name'])) { + $data['Name'] = $key; + $data['Value'] = $value; + } else { + foreach (array_keys(self::$defaults) as $search) { + if (!strcasecmp($search, $key)) { + $data[$search] = $value; + continue 2; + } + } + $data[$key] = $value; + } + } + + return new self($data); + } + + /** + * @param array $data Array of cookie data provided by a Cookie parser + */ + public function __construct(array $data = []) + { + $this->data = array_replace(self::$defaults, $data); + // Extract the Expires value and turn it into a UNIX timestamp if needed + if (!$this->getExpires() && $this->getMaxAge()) { + // Calculate the Expires date + $this->setExpires(time() + $this->getMaxAge()); + } elseif ($this->getExpires() && !is_numeric($this->getExpires())) { + $this->setExpires($this->getExpires()); + } + } + + public function __toString() + { + $str = $this->data['Name'] . '=' . $this->data['Value'] . '; '; + foreach ($this->data as $k => $v) { + if ($k !== 'Name' && $k !== 'Value' && $v !== null && $v !== false) { + if ($k === 'Expires') { + $str .= 'Expires=' . gmdate('D, d M Y H:i:s \G\M\T', $v) . '; '; + } else { + $str .= ($v === true ? $k : "{$k}={$v}") . '; '; + } + } + } + + return rtrim($str, '; '); + } + + public function toArray() + { + return $this->data; + } + + /** + * Get the cookie name + * + * @return string + */ + public function getName() + { + return $this->data['Name']; + } + + /** + * Set the cookie name + * + * @param string $name Cookie name + */ + public function setName($name) + { + $this->data['Name'] = $name; + } + + /** + * Get the cookie value + * + * @return string + */ + public function getValue() + { + return $this->data['Value']; + } + + /** + * Set the cookie value + * + * @param string $value Cookie value + */ + public function setValue($value) + { + $this->data['Value'] = $value; + } + + /** + * Get the domain + * + * @return string|null + */ + public function getDomain() + { + return $this->data['Domain']; + } + + /** + * Set the domain of the cookie + * + * @param string $domain + */ + public function setDomain($domain) + { + $this->data['Domain'] = $domain; + } + + /** + * Get the path + * + * @return string + */ + public function getPath() + { + return $this->data['Path']; + } + + /** + * Set the path of the cookie + * + * @param string $path Path of the cookie + */ + public function setPath($path) + { + $this->data['Path'] = $path; + } + + /** + * Maximum lifetime of the cookie in seconds + * + * @return int|null + */ + public function getMaxAge() + { + return $this->data['Max-Age']; + } + + /** + * Set the max-age of the cookie + * + * @param int $maxAge Max age of the cookie in seconds + */ + public function setMaxAge($maxAge) + { + $this->data['Max-Age'] = $maxAge; + } + + /** + * The UNIX timestamp when the cookie Expires + * + * @return mixed + */ + public function getExpires() + { + return $this->data['Expires']; + } + + /** + * Set the unix timestamp for which the cookie will expire + * + * @param int $timestamp Unix timestamp + */ + public function setExpires($timestamp) + { + $this->data['Expires'] = is_numeric($timestamp) + ? (int) $timestamp + : strtotime($timestamp); + } + + /** + * Get whether or not this is a secure cookie + * + * @return null|bool + */ + public function getSecure() + { + return $this->data['Secure']; + } + + /** + * Set whether or not the cookie is secure + * + * @param bool $secure Set to true or false if secure + */ + public function setSecure($secure) + { + $this->data['Secure'] = $secure; + } + + /** + * Get whether or not this is a session cookie + * + * @return null|bool + */ + public function getDiscard() + { + return $this->data['Discard']; + } + + /** + * Set whether or not this is a session cookie + * + * @param bool $discard Set to true or false if this is a session cookie + */ + public function setDiscard($discard) + { + $this->data['Discard'] = $discard; + } + + /** + * Get whether or not this is an HTTP only cookie + * + * @return bool + */ + public function getHttpOnly() + { + return $this->data['HttpOnly']; + } + + /** + * Set whether or not this is an HTTP only cookie + * + * @param bool $httpOnly Set to true or false if this is HTTP only + */ + public function setHttpOnly($httpOnly) + { + $this->data['HttpOnly'] = $httpOnly; + } + + /** + * Check if the cookie matches a path value. + * + * A request-path path-matches a given cookie-path if at least one of + * the following conditions holds: + * + * - The cookie-path and the request-path are identical. + * - The cookie-path is a prefix of the request-path, and the last + * character of the cookie-path is %x2F ("/"). + * - The cookie-path is a prefix of the request-path, and the first + * character of the request-path that is not included in the cookie- + * path is a %x2F ("/") character. + * + * @param string $requestPath Path to check against + * + * @return bool + */ + public function matchesPath($requestPath) + { + $cookiePath = $this->getPath(); + + // Match on exact matches or when path is the default empty "/" + if ($cookiePath === '/' || $cookiePath == $requestPath) { + return true; + } + + // Ensure that the cookie-path is a prefix of the request path. + if (0 !== strpos($requestPath, $cookiePath)) { + return false; + } + + // Match if the last character of the cookie-path is "/" + if (substr($cookiePath, -1, 1) === '/') { + return true; + } + + // Match if the first character not included in cookie path is "/" + return substr($requestPath, strlen($cookiePath), 1) === '/'; + } + + /** + * Check if the cookie matches a domain value + * + * @param string $domain Domain to check against + * + * @return bool + */ + public function matchesDomain($domain) + { + // Remove the leading '.' as per spec in RFC 6265. + // http://tools.ietf.org/html/rfc6265#section-5.2.3 + $cookieDomain = ltrim($this->getDomain(), '.'); + + // Domain not set or exact match. + if (!$cookieDomain || !strcasecmp($domain, $cookieDomain)) { + return true; + } + + // Matching the subdomain according to RFC 6265. + // http://tools.ietf.org/html/rfc6265#section-5.1.3 + if (filter_var($domain, FILTER_VALIDATE_IP)) { + return false; + } + + return (bool) preg_match('/\.' . preg_quote($cookieDomain, '/') . '$/', $domain); + } + + /** + * Check if the cookie is expired + * + * @return bool + */ + public function isExpired() + { + return $this->getExpires() !== null && time() > $this->getExpires(); + } + + /** + * Check if the cookie is valid according to RFC 6265 + * + * @return bool|string Returns true if valid or an error message if invalid + */ + public function validate() + { + // Names must not be empty, but can be 0 + $name = $this->getName(); + if (empty($name) && !is_numeric($name)) { + return 'The cookie name must not be empty'; + } + + // Check if any of the invalid characters are present in the cookie name + if (preg_match( + '/[\x00-\x20\x22\x28-\x29\x2c\x2f\x3a-\x40\x5c\x7b\x7d\x7f]/', + $name + )) { + return 'Cookie name must not contain invalid characters: ASCII ' + . 'Control characters (0-31;127), space, tab and the ' + . 'following characters: ()<>@,;:\"/?={}'; + } + + // Value must not be empty, but can be 0 + $value = $this->getValue(); + if (empty($value) && !is_numeric($value)) { + return 'The cookie value must not be empty'; + } + + // Domains must not be empty, but can be 0 + // A "0" is not a valid internet domain, but may be used as server name + // in a private network. + $domain = $this->getDomain(); + if (empty($domain) && !is_numeric($domain)) { + return 'The cookie domain must not be empty'; + } + + return true; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php new file mode 100755 index 0000000..427d896 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php @@ -0,0 +1,27 @@ +getStatusCode() + : 0; + parent::__construct($message, $code, $previous); + $this->request = $request; + $this->response = $response; + $this->handlerContext = $handlerContext; + } + + /** + * Wrap non-RequestExceptions with a RequestException + * + * @param RequestInterface $request + * @param \Exception $e + * + * @return RequestException + */ + public static function wrapException(RequestInterface $request, \Exception $e) + { + return $e instanceof RequestException + ? $e + : new RequestException($e->getMessage(), $request, null, $e); + } + + /** + * Factory method to create a new exception with a normalized error message + * + * @param RequestInterface $request Request + * @param ResponseInterface $response Response received + * @param \Exception $previous Previous exception + * @param array $ctx Optional handler context. + * + * @return self + */ + public static function create( + RequestInterface $request, + ResponseInterface $response = null, + \Exception $previous = null, + array $ctx = [] + ) { + if (!$response) { + return new self( + 'Error completing request', + $request, + null, + $previous, + $ctx + ); + } + + $level = (int) floor($response->getStatusCode() / 100); + if ($level === 4) { + $label = 'Client error'; + $className = ClientException::class; + } elseif ($level === 5) { + $label = 'Server error'; + $className = ServerException::class; + } else { + $label = 'Unsuccessful request'; + $className = __CLASS__; + } + + $uri = $request->getUri(); + $uri = static::obfuscateUri($uri); + + // Client Error: `GET /` resulted in a `404 Not Found` response: + // ... (truncated) + $message = sprintf( + '%s: `%s %s` resulted in a `%s %s` response', + $label, + $request->getMethod(), + $uri, + $response->getStatusCode(), + $response->getReasonPhrase() + ); + + $summary = static::getResponseBodySummary($response); + + if ($summary !== null) { + $message .= ":\n{$summary}\n"; + } + + return new $className($message, $request, $response, $previous, $ctx); + } + + /** + * Get a short summary of the response + * + * Will return `null` if the response is not printable. + * + * @param ResponseInterface $response + * + * @return string|null + */ + public static function getResponseBodySummary(ResponseInterface $response) + { + $body = $response->getBody(); + + if (!$body->isSeekable()) { + return null; + } + + $size = $body->getSize(); + + if ($size === 0) { + return null; + } + + $summary = $body->read(120); + $body->rewind(); + + if ($size > 120) { + $summary .= ' (truncated...)'; + } + + // Matches any printable character, including unicode characters: + // letters, marks, numbers, punctuation, spacing, and separators. + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) { + return null; + } + + return $summary; + } + + /** + * Obfuscates URI if there is an username and a password present + * + * @param UriInterface $uri + * + * @return UriInterface + */ + private static function obfuscateUri($uri) + { + $userInfo = $uri->getUserInfo(); + + if (false !== ($pos = strpos($userInfo, ':'))) { + return $uri->withUserInfo(substr($userInfo, 0, $pos), '***'); + } + + return $uri; + } + + /** + * Get the request that caused the exception + * + * @return RequestInterface + */ + public function getRequest() + { + return $this->request; + } + + /** + * Get the associated response + * + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + + /** + * Check if a response was received + * + * @return bool + */ + public function hasResponse() + { + return $this->response !== null; + } + + /** + * Get contextual information about the error from the underlying handler. + * + * The contents of this array will vary depending on which handler you are + * using. It may also be just an empty array. Relying on this data will + * couple you to a specific handler, but can give more debug information + * when needed. + * + * @return array + */ + public function getHandlerContext() + { + return $this->handlerContext; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php b/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php new file mode 100755 index 0000000..a77c289 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/SeekException.php @@ -0,0 +1,27 @@ +stream = $stream; + $msg = $msg ?: 'Could not seek the stream to position ' . $pos; + parent::__construct($msg); + } + + /** + * @return StreamInterface + */ + public function getStream() + { + return $this->stream; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php new file mode 100755 index 0000000..7cdd340 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php @@ -0,0 +1,7 @@ +maxHandles = $maxHandles; + } + + public function create(RequestInterface $request, array $options) + { + if (isset($options['curl']['body_as_string'])) { + $options['_body_as_string'] = $options['curl']['body_as_string']; + unset($options['curl']['body_as_string']); + } + + $easy = new EasyHandle; + $easy->request = $request; + $easy->options = $options; + $conf = $this->getDefaultConf($easy); + $this->applyMethod($easy, $conf); + $this->applyHandlerOptions($easy, $conf); + $this->applyHeaders($easy, $conf); + unset($conf['_headers']); + + // Add handler options from the request configuration options + if (isset($options['curl'])) { + $conf = array_replace($conf, $options['curl']); + } + + $conf[CURLOPT_HEADERFUNCTION] = $this->createHeaderFn($easy); + $easy->handle = $this->handles + ? array_pop($this->handles) + : curl_init(); + curl_setopt_array($easy->handle, $conf); + + return $easy; + } + + public function release(EasyHandle $easy) + { + $resource = $easy->handle; + unset($easy->handle); + + if (count($this->handles) >= $this->maxHandles) { + curl_close($resource); + } else { + // Remove all callback functions as they can hold onto references + // and are not cleaned up by curl_reset. Using curl_setopt_array + // does not work for some reason, so removing each one + // individually. + curl_setopt($resource, CURLOPT_HEADERFUNCTION, null); + curl_setopt($resource, CURLOPT_READFUNCTION, null); + curl_setopt($resource, CURLOPT_WRITEFUNCTION, null); + curl_setopt($resource, CURLOPT_PROGRESSFUNCTION, null); + curl_reset($resource); + $this->handles[] = $resource; + } + } + + /** + * Completes a cURL transaction, either returning a response promise or a + * rejected promise. + * + * @param callable $handler + * @param EasyHandle $easy + * @param CurlFactoryInterface $factory Dictates how the handle is released + * + * @return \GuzzleHttp\Promise\PromiseInterface + */ + public static function finish( + callable $handler, + EasyHandle $easy, + CurlFactoryInterface $factory + ) { + if (isset($easy->options['on_stats'])) { + self::invokeStats($easy); + } + + if (!$easy->response || $easy->errno) { + return self::finishError($handler, $easy, $factory); + } + + // Return the response if it is present and there is no error. + $factory->release($easy); + + // Rewind the body of the response if possible. + $body = $easy->response->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + + return new FulfilledPromise($easy->response); + } + + private static function invokeStats(EasyHandle $easy) + { + $curlStats = curl_getinfo($easy->handle); + $stats = new TransferStats( + $easy->request, + $easy->response, + $curlStats['total_time'], + $easy->errno, + $curlStats + ); + call_user_func($easy->options['on_stats'], $stats); + } + + private static function finishError( + callable $handler, + EasyHandle $easy, + CurlFactoryInterface $factory + ) { + // Get error information and release the handle to the factory. + $ctx = [ + 'errno' => $easy->errno, + 'error' => curl_error($easy->handle), + ] + curl_getinfo($easy->handle); + $factory->release($easy); + + // Retry when nothing is present or when curl failed to rewind. + if (empty($easy->options['_err_message']) + && (!$easy->errno || $easy->errno == 65) + ) { + return self::retryFailedRewind($handler, $easy, $ctx); + } + + return self::createRejection($easy, $ctx); + } + + private static function createRejection(EasyHandle $easy, array $ctx) + { + static $connectionErrors = [ + CURLE_OPERATION_TIMEOUTED => true, + CURLE_COULDNT_RESOLVE_HOST => true, + CURLE_COULDNT_CONNECT => true, + CURLE_SSL_CONNECT_ERROR => true, + CURLE_GOT_NOTHING => true, + ]; + + // If an exception was encountered during the onHeaders event, then + // return a rejected promise that wraps that exception. + if ($easy->onHeadersException) { + return \GuzzleHttp\Promise\rejection_for( + new RequestException( + 'An error was encountered during the on_headers event', + $easy->request, + $easy->response, + $easy->onHeadersException, + $ctx + ) + ); + } + + $message = sprintf( + 'cURL error %s: %s (%s)', + $ctx['errno'], + $ctx['error'], + 'see http://curl.haxx.se/libcurl/c/libcurl-errors.html' + ); + + // Create a connection exception if it was a specific error code. + $error = isset($connectionErrors[$easy->errno]) + ? new ConnectException($message, $easy->request, null, $ctx) + : new RequestException($message, $easy->request, $easy->response, null, $ctx); + + return \GuzzleHttp\Promise\rejection_for($error); + } + + private function getDefaultConf(EasyHandle $easy) + { + $conf = [ + '_headers' => $easy->request->getHeaders(), + CURLOPT_CUSTOMREQUEST => $easy->request->getMethod(), + CURLOPT_URL => (string) $easy->request->getUri()->withFragment(''), + CURLOPT_RETURNTRANSFER => false, + CURLOPT_HEADER => false, + CURLOPT_CONNECTTIMEOUT => 150, + ]; + + if (defined('CURLOPT_PROTOCOLS')) { + $conf[CURLOPT_PROTOCOLS] = CURLPROTO_HTTP | CURLPROTO_HTTPS; + } + + $version = $easy->request->getProtocolVersion(); + if ($version == 1.1) { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_1; + } elseif ($version == 2.0) { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_2_0; + } else { + $conf[CURLOPT_HTTP_VERSION] = CURL_HTTP_VERSION_1_0; + } + + return $conf; + } + + private function applyMethod(EasyHandle $easy, array &$conf) + { + $body = $easy->request->getBody(); + $size = $body->getSize(); + + if ($size === null || $size > 0) { + $this->applyBody($easy->request, $easy->options, $conf); + return; + } + + $method = $easy->request->getMethod(); + if ($method === 'PUT' || $method === 'POST') { + // See http://tools.ietf.org/html/rfc7230#section-3.3.2 + if (!$easy->request->hasHeader('Content-Length')) { + $conf[CURLOPT_HTTPHEADER][] = 'Content-Length: 0'; + } + } elseif ($method === 'HEAD') { + $conf[CURLOPT_NOBODY] = true; + unset( + $conf[CURLOPT_WRITEFUNCTION], + $conf[CURLOPT_READFUNCTION], + $conf[CURLOPT_FILE], + $conf[CURLOPT_INFILE] + ); + } + } + + private function applyBody(RequestInterface $request, array $options, array &$conf) + { + $size = $request->hasHeader('Content-Length') + ? (int) $request->getHeaderLine('Content-Length') + : null; + + // Send the body as a string if the size is less than 1MB OR if the + // [curl][body_as_string] request value is set. + if (($size !== null && $size < 1000000) || + !empty($options['_body_as_string']) + ) { + $conf[CURLOPT_POSTFIELDS] = (string) $request->getBody(); + // Don't duplicate the Content-Length header + $this->removeHeader('Content-Length', $conf); + $this->removeHeader('Transfer-Encoding', $conf); + } else { + $conf[CURLOPT_UPLOAD] = true; + if ($size !== null) { + $conf[CURLOPT_INFILESIZE] = $size; + $this->removeHeader('Content-Length', $conf); + } + $body = $request->getBody(); + if ($body->isSeekable()) { + $body->rewind(); + } + $conf[CURLOPT_READFUNCTION] = function ($ch, $fd, $length) use ($body) { + return $body->read($length); + }; + } + + // If the Expect header is not present, prevent curl from adding it + if (!$request->hasHeader('Expect')) { + $conf[CURLOPT_HTTPHEADER][] = 'Expect:'; + } + + // cURL sometimes adds a content-type by default. Prevent this. + if (!$request->hasHeader('Content-Type')) { + $conf[CURLOPT_HTTPHEADER][] = 'Content-Type:'; + } + } + + private function applyHeaders(EasyHandle $easy, array &$conf) + { + foreach ($conf['_headers'] as $name => $values) { + foreach ($values as $value) { + $value = (string) $value; + if ($value === '') { + // cURL requires a special format for empty headers. + // See https://github.com/guzzle/guzzle/issues/1882 for more details. + $conf[CURLOPT_HTTPHEADER][] = "$name;"; + } else { + $conf[CURLOPT_HTTPHEADER][] = "$name: $value"; + } + } + } + + // Remove the Accept header if one was not set + if (!$easy->request->hasHeader('Accept')) { + $conf[CURLOPT_HTTPHEADER][] = 'Accept:'; + } + } + + /** + * Remove a header from the options array. + * + * @param string $name Case-insensitive header to remove + * @param array $options Array of options to modify + */ + private function removeHeader($name, array &$options) + { + foreach (array_keys($options['_headers']) as $key) { + if (!strcasecmp($key, $name)) { + unset($options['_headers'][$key]); + return; + } + } + } + + private function applyHandlerOptions(EasyHandle $easy, array &$conf) + { + $options = $easy->options; + if (isset($options['verify'])) { + if ($options['verify'] === false) { + unset($conf[CURLOPT_CAINFO]); + $conf[CURLOPT_SSL_VERIFYHOST] = 0; + $conf[CURLOPT_SSL_VERIFYPEER] = false; + } else { + $conf[CURLOPT_SSL_VERIFYHOST] = 2; + $conf[CURLOPT_SSL_VERIFYPEER] = true; + if (is_string($options['verify'])) { + // Throw an error if the file/folder/link path is not valid or doesn't exist. + if (!file_exists($options['verify'])) { + throw new \InvalidArgumentException( + "SSL CA bundle not found: {$options['verify']}" + ); + } + // If it's a directory or a link to a directory use CURLOPT_CAPATH. + // If not, it's probably a file, or a link to a file, so use CURLOPT_CAINFO. + if (is_dir($options['verify']) || + (is_link($options['verify']) && is_dir(readlink($options['verify'])))) { + $conf[CURLOPT_CAPATH] = $options['verify']; + } else { + $conf[CURLOPT_CAINFO] = $options['verify']; + } + } + } + } + + if (!empty($options['decode_content'])) { + $accept = $easy->request->getHeaderLine('Accept-Encoding'); + if ($accept) { + $conf[CURLOPT_ENCODING] = $accept; + } else { + $conf[CURLOPT_ENCODING] = ''; + // Don't let curl send the header over the wire + $conf[CURLOPT_HTTPHEADER][] = 'Accept-Encoding:'; + } + } + + if (isset($options['sink'])) { + $sink = $options['sink']; + if (!is_string($sink)) { + $sink = \GuzzleHttp\Psr7\stream_for($sink); + } elseif (!is_dir(dirname($sink))) { + // Ensure that the directory exists before failing in curl. + throw new \RuntimeException(sprintf( + 'Directory %s does not exist for sink value of %s', + dirname($sink), + $sink + )); + } else { + $sink = new LazyOpenStream($sink, 'w+'); + } + $easy->sink = $sink; + $conf[CURLOPT_WRITEFUNCTION] = function ($ch, $write) use ($sink) { + return $sink->write($write); + }; + } else { + // Use a default temp stream if no sink was set. + $conf[CURLOPT_FILE] = fopen('php://temp', 'w+'); + $easy->sink = Psr7\stream_for($conf[CURLOPT_FILE]); + } + $timeoutRequiresNoSignal = false; + if (isset($options['timeout'])) { + $timeoutRequiresNoSignal |= $options['timeout'] < 1; + $conf[CURLOPT_TIMEOUT_MS] = $options['timeout'] * 1000; + } + + // CURL default value is CURL_IPRESOLVE_WHATEVER + if (isset($options['force_ip_resolve'])) { + if ('v4' === $options['force_ip_resolve']) { + $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V4; + } elseif ('v6' === $options['force_ip_resolve']) { + $conf[CURLOPT_IPRESOLVE] = CURL_IPRESOLVE_V6; + } + } + + if (isset($options['connect_timeout'])) { + $timeoutRequiresNoSignal |= $options['connect_timeout'] < 1; + $conf[CURLOPT_CONNECTTIMEOUT_MS] = $options['connect_timeout'] * 1000; + } + + if ($timeoutRequiresNoSignal && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') { + $conf[CURLOPT_NOSIGNAL] = true; + } + + if (isset($options['proxy'])) { + if (!is_array($options['proxy'])) { + $conf[CURLOPT_PROXY] = $options['proxy']; + } else { + $scheme = $easy->request->getUri()->getScheme(); + if (isset($options['proxy'][$scheme])) { + $host = $easy->request->getUri()->getHost(); + if (!isset($options['proxy']['no']) || + !\GuzzleHttp\is_host_in_noproxy($host, $options['proxy']['no']) + ) { + $conf[CURLOPT_PROXY] = $options['proxy'][$scheme]; + } + } + } + } + + if (isset($options['cert'])) { + $cert = $options['cert']; + if (is_array($cert)) { + $conf[CURLOPT_SSLCERTPASSWD] = $cert[1]; + $cert = $cert[0]; + } + if (!file_exists($cert)) { + throw new \InvalidArgumentException( + "SSL certificate not found: {$cert}" + ); + } + $conf[CURLOPT_SSLCERT] = $cert; + } + + if (isset($options['ssl_key'])) { + $sslKey = $options['ssl_key']; + if (is_array($sslKey)) { + $conf[CURLOPT_SSLKEYPASSWD] = $sslKey[1]; + $sslKey = $sslKey[0]; + } + if (!file_exists($sslKey)) { + throw new \InvalidArgumentException( + "SSL private key not found: {$sslKey}" + ); + } + $conf[CURLOPT_SSLKEY] = $sslKey; + } + + if (isset($options['progress'])) { + $progress = $options['progress']; + if (!is_callable($progress)) { + throw new \InvalidArgumentException( + 'progress client option must be callable' + ); + } + $conf[CURLOPT_NOPROGRESS] = false; + $conf[CURLOPT_PROGRESSFUNCTION] = function () use ($progress) { + $args = func_get_args(); + // PHP 5.5 pushed the handle onto the start of the args + if (is_resource($args[0])) { + array_shift($args); + } + call_user_func_array($progress, $args); + }; + } + + if (!empty($options['debug'])) { + $conf[CURLOPT_STDERR] = \GuzzleHttp\debug_resource($options['debug']); + $conf[CURLOPT_VERBOSE] = true; + } + } + + /** + * This function ensures that a response was set on a transaction. If one + * was not set, then the request is retried if possible. This error + * typically means you are sending a payload, curl encountered a + * "Connection died, retrying a fresh connect" error, tried to rewind the + * stream, and then encountered a "necessary data rewind wasn't possible" + * error, causing the request to be sent through curl_multi_info_read() + * without an error status. + */ + private static function retryFailedRewind( + callable $handler, + EasyHandle $easy, + array $ctx + ) { + try { + // Only rewind if the body has been read from. + $body = $easy->request->getBody(); + if ($body->tell() > 0) { + $body->rewind(); + } + } catch (\RuntimeException $e) { + $ctx['error'] = 'The connection unexpectedly failed without ' + . 'providing an error. The request would have been retried, ' + . 'but attempting to rewind the request body failed. ' + . 'Exception: ' . $e; + return self::createRejection($easy, $ctx); + } + + // Retry no more than 3 times before giving up. + if (!isset($easy->options['_curl_retries'])) { + $easy->options['_curl_retries'] = 1; + } elseif ($easy->options['_curl_retries'] == 2) { + $ctx['error'] = 'The cURL request was retried 3 times ' + . 'and did not succeed. The most likely reason for the failure ' + . 'is that cURL was unable to rewind the body of the request ' + . 'and subsequent retries resulted in the same error. Turn on ' + . 'the debug option to see what went wrong. See ' + . 'https://bugs.php.net/bug.php?id=47204 for more information.'; + return self::createRejection($easy, $ctx); + } else { + $easy->options['_curl_retries']++; + } + + return $handler($easy->request, $easy->options); + } + + private function createHeaderFn(EasyHandle $easy) + { + if (isset($easy->options['on_headers'])) { + $onHeaders = $easy->options['on_headers']; + + if (!is_callable($onHeaders)) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + } else { + $onHeaders = null; + } + + return function ($ch, $h) use ( + $onHeaders, + $easy, + &$startingResponse + ) { + $value = trim($h); + if ($value === '') { + $startingResponse = true; + $easy->createResponse(); + if ($onHeaders !== null) { + try { + $onHeaders($easy->response); + } catch (\Exception $e) { + // Associate the exception with the handle and trigger + // a curl header write error by returning 0. + $easy->onHeadersException = $e; + return -1; + } + } + } elseif ($startingResponse) { + $startingResponse = false; + $easy->headers = [$value]; + } else { + $easy->headers[] = $value; + } + return strlen($h); + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php new file mode 100755 index 0000000..b0fc236 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlFactoryInterface.php @@ -0,0 +1,27 @@ +factory = isset($options['handle_factory']) + ? $options['handle_factory'] + : new CurlFactory(3); + } + + public function __invoke(RequestInterface $request, array $options) + { + if (isset($options['delay'])) { + usleep($options['delay'] * 1000); + } + + $easy = $this->factory->create($request, $options); + curl_exec($easy->handle); + $easy->errno = curl_errno($easy->handle); + + return CurlFactory::finish($this, $easy, $this->factory); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php new file mode 100755 index 0000000..2754d8e --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php @@ -0,0 +1,199 @@ +factory = isset($options['handle_factory']) + ? $options['handle_factory'] : new CurlFactory(50); + $this->selectTimeout = isset($options['select_timeout']) + ? $options['select_timeout'] : 1; + } + + public function __get($name) + { + if ($name === '_mh') { + return $this->_mh = curl_multi_init(); + } + + throw new \BadMethodCallException(); + } + + public function __destruct() + { + if (isset($this->_mh)) { + curl_multi_close($this->_mh); + unset($this->_mh); + } + } + + public function __invoke(RequestInterface $request, array $options) + { + $easy = $this->factory->create($request, $options); + $id = (int) $easy->handle; + + $promise = new Promise( + [$this, 'execute'], + function () use ($id) { + return $this->cancel($id); + } + ); + + $this->addRequest(['easy' => $easy, 'deferred' => $promise]); + + return $promise; + } + + /** + * Ticks the curl event loop. + */ + public function tick() + { + // Add any delayed handles if needed. + if ($this->delays) { + $currentTime = microtime(true); + foreach ($this->delays as $id => $delay) { + if ($currentTime >= $delay) { + unset($this->delays[$id]); + curl_multi_add_handle( + $this->_mh, + $this->handles[$id]['easy']->handle + ); + } + } + } + + // Step through the task queue which may add additional requests. + P\queue()->run(); + + if ($this->active && + curl_multi_select($this->_mh, $this->selectTimeout) === -1 + ) { + // Perform a usleep if a select returns -1. + // See: https://bugs.php.net/bug.php?id=61141 + usleep(250); + } + + while (curl_multi_exec($this->_mh, $this->active) === CURLM_CALL_MULTI_PERFORM); + + $this->processMessages(); + } + + /** + * Runs until all outstanding connections have completed. + */ + public function execute() + { + $queue = P\queue(); + + while ($this->handles || !$queue->isEmpty()) { + // If there are no transfers, then sleep for the next delay + if (!$this->active && $this->delays) { + usleep($this->timeToNext()); + } + $this->tick(); + } + } + + private function addRequest(array $entry) + { + $easy = $entry['easy']; + $id = (int) $easy->handle; + $this->handles[$id] = $entry; + if (empty($easy->options['delay'])) { + curl_multi_add_handle($this->_mh, $easy->handle); + } else { + $this->delays[$id] = microtime(true) + ($easy->options['delay'] / 1000); + } + } + + /** + * Cancels a handle from sending and removes references to it. + * + * @param int $id Handle ID to cancel and remove. + * + * @return bool True on success, false on failure. + */ + private function cancel($id) + { + // Cannot cancel if it has been processed. + if (!isset($this->handles[$id])) { + return false; + } + + $handle = $this->handles[$id]['easy']->handle; + unset($this->delays[$id], $this->handles[$id]); + curl_multi_remove_handle($this->_mh, $handle); + curl_close($handle); + + return true; + } + + private function processMessages() + { + while ($done = curl_multi_info_read($this->_mh)) { + $id = (int) $done['handle']; + curl_multi_remove_handle($this->_mh, $done['handle']); + + if (!isset($this->handles[$id])) { + // Probably was cancelled. + continue; + } + + $entry = $this->handles[$id]; + unset($this->handles[$id], $this->delays[$id]); + $entry['easy']->errno = $done['result']; + $entry['deferred']->resolve( + CurlFactory::finish( + $this, + $entry['easy'], + $this->factory + ) + ); + } + } + + private function timeToNext() + { + $currentTime = microtime(true); + $nextTime = PHP_INT_MAX; + foreach ($this->delays as $time) { + if ($time < $nextTime) { + $nextTime = $time; + } + } + + return max(0, $nextTime - $currentTime) * 1000000; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php new file mode 100755 index 0000000..7754e91 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/EasyHandle.php @@ -0,0 +1,92 @@ +headers)) { + throw new \RuntimeException('No headers have been received'); + } + + // HTTP-version SP status-code SP reason-phrase + $startLine = explode(' ', array_shift($this->headers), 3); + $headers = \GuzzleHttp\headers_from_lines($this->headers); + $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); + + if (!empty($this->options['decode_content']) + && isset($normalizedKeys['content-encoding']) + ) { + $headers['x-encoded-content-encoding'] + = $headers[$normalizedKeys['content-encoding']]; + unset($headers[$normalizedKeys['content-encoding']]); + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] + = $headers[$normalizedKeys['content-length']]; + + $bodyLength = (int) $this->sink->getSize(); + if ($bodyLength) { + $headers[$normalizedKeys['content-length']] = $bodyLength; + } else { + unset($headers[$normalizedKeys['content-length']]); + } + } + } + + // Attach a response to the easy handle with the parsed headers. + $this->response = new Response( + $startLine[1], + $headers, + $this->sink, + substr($startLine[0], 5), + isset($startLine[2]) ? (string) $startLine[2] : null + ); + } + + public function __get($name) + { + $msg = $name === 'handle' + ? 'The EasyHandle has been released' + : 'Invalid property: ' . $name; + throw new \BadMethodCallException($msg); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php new file mode 100755 index 0000000..d892061 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php @@ -0,0 +1,189 @@ +onFulfilled = $onFulfilled; + $this->onRejected = $onRejected; + + if ($queue) { + call_user_func_array([$this, 'append'], $queue); + } + } + + public function __invoke(RequestInterface $request, array $options) + { + if (!$this->queue) { + throw new \OutOfBoundsException('Mock queue is empty'); + } + + if (isset($options['delay'])) { + usleep($options['delay'] * 1000); + } + + $this->lastRequest = $request; + $this->lastOptions = $options; + $response = array_shift($this->queue); + + if (isset($options['on_headers'])) { + if (!is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + try { + $options['on_headers']($response); + } catch (\Exception $e) { + $msg = 'An error was encountered during the on_headers event'; + $response = new RequestException($msg, $request, $response, $e); + } + } + + if (is_callable($response)) { + $response = call_user_func($response, $request, $options); + } + + $response = $response instanceof \Exception + ? \GuzzleHttp\Promise\rejection_for($response) + : \GuzzleHttp\Promise\promise_for($response); + + return $response->then( + function ($value) use ($request, $options) { + $this->invokeStats($request, $options, $value); + if ($this->onFulfilled) { + call_user_func($this->onFulfilled, $value); + } + if (isset($options['sink'])) { + $contents = (string) $value->getBody(); + $sink = $options['sink']; + + if (is_resource($sink)) { + fwrite($sink, $contents); + } elseif (is_string($sink)) { + file_put_contents($sink, $contents); + } elseif ($sink instanceof \Psr\Http\Message\StreamInterface) { + $sink->write($contents); + } + } + + return $value; + }, + function ($reason) use ($request, $options) { + $this->invokeStats($request, $options, null, $reason); + if ($this->onRejected) { + call_user_func($this->onRejected, $reason); + } + return \GuzzleHttp\Promise\rejection_for($reason); + } + ); + } + + /** + * Adds one or more variadic requests, exceptions, callables, or promises + * to the queue. + */ + public function append() + { + foreach (func_get_args() as $value) { + if ($value instanceof ResponseInterface + || $value instanceof \Exception + || $value instanceof PromiseInterface + || is_callable($value) + ) { + $this->queue[] = $value; + } else { + throw new \InvalidArgumentException('Expected a response or ' + . 'exception. Found ' . \GuzzleHttp\describe_type($value)); + } + } + } + + /** + * Get the last received request. + * + * @return RequestInterface + */ + public function getLastRequest() + { + return $this->lastRequest; + } + + /** + * Get the last received request options. + * + * @return array + */ + public function getLastOptions() + { + return $this->lastOptions; + } + + /** + * Returns the number of remaining items in the queue. + * + * @return int + */ + public function count() + { + return count($this->queue); + } + + private function invokeStats( + RequestInterface $request, + array $options, + ResponseInterface $response = null, + $reason = null + ) { + if (isset($options['on_stats'])) { + $stats = new TransferStats($request, $response, 0, $reason); + call_user_func($options['on_stats'], $stats); + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php new file mode 100755 index 0000000..f8b00be --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php @@ -0,0 +1,55 @@ +withoutHeader('Expect'); + + // Append a content-length header if body size is zero to match + // cURL's behavior. + if (0 === $request->getBody()->getSize()) { + $request = $request->withHeader('Content-Length', 0); + } + + return $this->createResponse( + $request, + $options, + $this->createStream($request, $options), + $startTime + ); + } catch (\InvalidArgumentException $e) { + throw $e; + } catch (\Exception $e) { + // Determine if the error was a networking error. + $message = $e->getMessage(); + // This list can probably get more comprehensive. + if (strpos($message, 'getaddrinfo') // DNS lookup failed + || strpos($message, 'Connection refused') + || strpos($message, "couldn't connect to host") // error on HHVM + || strpos($message, "connection attempt failed") + ) { + $e = new ConnectException($e->getMessage(), $request, $e); + } + $e = RequestException::wrapException($request, $e); + $this->invokeStats($options, $request, $startTime, null, $e); + + return \GuzzleHttp\Promise\rejection_for($e); + } + } + + private function invokeStats( + array $options, + RequestInterface $request, + $startTime, + ResponseInterface $response = null, + $error = null + ) { + if (isset($options['on_stats'])) { + $stats = new TransferStats( + $request, + $response, + microtime(true) - $startTime, + $error, + [] + ); + call_user_func($options['on_stats'], $stats); + } + } + + private function createResponse( + RequestInterface $request, + array $options, + $stream, + $startTime + ) { + $hdrs = $this->lastHeaders; + $this->lastHeaders = []; + $parts = explode(' ', array_shift($hdrs), 3); + $ver = explode('/', $parts[0])[1]; + $status = $parts[1]; + $reason = isset($parts[2]) ? $parts[2] : null; + $headers = \GuzzleHttp\headers_from_lines($hdrs); + list($stream, $headers) = $this->checkDecode($options, $headers, $stream); + $stream = Psr7\stream_for($stream); + $sink = $stream; + + if (strcasecmp('HEAD', $request->getMethod())) { + $sink = $this->createSink($stream, $options); + } + + $response = new Psr7\Response($status, $headers, $sink, $ver, $reason); + + if (isset($options['on_headers'])) { + try { + $options['on_headers']($response); + } catch (\Exception $e) { + $msg = 'An error was encountered during the on_headers event'; + $ex = new RequestException($msg, $request, $response, $e); + return \GuzzleHttp\Promise\rejection_for($ex); + } + } + + // Do not drain when the request is a HEAD request because they have + // no body. + if ($sink !== $stream) { + $this->drain( + $stream, + $sink, + $response->getHeaderLine('Content-Length') + ); + } + + $this->invokeStats($options, $request, $startTime, $response, null); + + return new FulfilledPromise($response); + } + + private function createSink(StreamInterface $stream, array $options) + { + if (!empty($options['stream'])) { + return $stream; + } + + $sink = isset($options['sink']) + ? $options['sink'] + : fopen('php://temp', 'r+'); + + return is_string($sink) + ? new Psr7\LazyOpenStream($sink, 'w+') + : Psr7\stream_for($sink); + } + + private function checkDecode(array $options, array $headers, $stream) + { + // Automatically decode responses when instructed. + if (!empty($options['decode_content'])) { + $normalizedKeys = \GuzzleHttp\normalize_header_keys($headers); + if (isset($normalizedKeys['content-encoding'])) { + $encoding = $headers[$normalizedKeys['content-encoding']]; + if ($encoding[0] === 'gzip' || $encoding[0] === 'deflate') { + $stream = new Psr7\InflateStream( + Psr7\stream_for($stream) + ); + $headers['x-encoded-content-encoding'] + = $headers[$normalizedKeys['content-encoding']]; + // Remove content-encoding header + unset($headers[$normalizedKeys['content-encoding']]); + // Fix content-length header + if (isset($normalizedKeys['content-length'])) { + $headers['x-encoded-content-length'] + = $headers[$normalizedKeys['content-length']]; + + $length = (int) $stream->getSize(); + if ($length === 0) { + unset($headers[$normalizedKeys['content-length']]); + } else { + $headers[$normalizedKeys['content-length']] = [$length]; + } + } + } + } + } + + return [$stream, $headers]; + } + + /** + * Drains the source stream into the "sink" client option. + * + * @param StreamInterface $source + * @param StreamInterface $sink + * @param string $contentLength Header specifying the amount of + * data to read. + * + * @return StreamInterface + * @throws \RuntimeException when the sink option is invalid. + */ + private function drain( + StreamInterface $source, + StreamInterface $sink, + $contentLength + ) { + // If a content-length header is provided, then stop reading once + // that number of bytes has been read. This can prevent infinitely + // reading from a stream when dealing with servers that do not honor + // Connection: Close headers. + Psr7\copy_to_stream( + $source, + $sink, + (strlen($contentLength) > 0 && (int) $contentLength > 0) ? (int) $contentLength : -1 + ); + + $sink->seek(0); + $source->close(); + + return $sink; + } + + /** + * Create a resource and check to ensure it was created successfully + * + * @param callable $callback Callable that returns stream resource + * + * @return resource + * @throws \RuntimeException on error + */ + private function createResource(callable $callback) + { + $errors = null; + set_error_handler(function ($_, $msg, $file, $line) use (&$errors) { + $errors[] = [ + 'message' => $msg, + 'file' => $file, + 'line' => $line + ]; + return true; + }); + + $resource = $callback(); + restore_error_handler(); + + if (!$resource) { + $message = 'Error creating resource: '; + foreach ($errors as $err) { + foreach ($err as $key => $value) { + $message .= "[$key] $value" . PHP_EOL; + } + } + throw new \RuntimeException(trim($message)); + } + + return $resource; + } + + private function createStream(RequestInterface $request, array $options) + { + static $methods; + if (!$methods) { + $methods = array_flip(get_class_methods(__CLASS__)); + } + + // HTTP/1.1 streams using the PHP stream wrapper require a + // Connection: close header + if ($request->getProtocolVersion() == '1.1' + && !$request->hasHeader('Connection') + ) { + $request = $request->withHeader('Connection', 'close'); + } + + // Ensure SSL is verified by default + if (!isset($options['verify'])) { + $options['verify'] = true; + } + + $params = []; + $context = $this->getDefaultContext($request); + + if (isset($options['on_headers']) && !is_callable($options['on_headers'])) { + throw new \InvalidArgumentException('on_headers must be callable'); + } + + if (!empty($options)) { + foreach ($options as $key => $value) { + $method = "add_{$key}"; + if (isset($methods[$method])) { + $this->{$method}($request, $context, $value, $params); + } + } + } + + if (isset($options['stream_context'])) { + if (!is_array($options['stream_context'])) { + throw new \InvalidArgumentException('stream_context must be an array'); + } + $context = array_replace_recursive( + $context, + $options['stream_context'] + ); + } + + // Microsoft NTLM authentication only supported with curl handler + if (isset($options['auth']) + && is_array($options['auth']) + && isset($options['auth'][2]) + && 'ntlm' == $options['auth'][2] + ) { + throw new \InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'); + } + + $uri = $this->resolveHost($request, $options); + + $context = $this->createResource( + function () use ($context, $params) { + return stream_context_create($context, $params); + } + ); + + return $this->createResource( + function () use ($uri, &$http_response_header, $context, $options) { + $resource = fopen((string) $uri, 'r', null, $context); + $this->lastHeaders = $http_response_header; + + if (isset($options['read_timeout'])) { + $readTimeout = $options['read_timeout']; + $sec = (int) $readTimeout; + $usec = ($readTimeout - $sec) * 100000; + stream_set_timeout($resource, $sec, $usec); + } + + return $resource; + } + ); + } + + private function resolveHost(RequestInterface $request, array $options) + { + $uri = $request->getUri(); + + if (isset($options['force_ip_resolve']) && !filter_var($uri->getHost(), FILTER_VALIDATE_IP)) { + if ('v4' === $options['force_ip_resolve']) { + $records = dns_get_record($uri->getHost(), DNS_A); + if (!isset($records[0]['ip'])) { + throw new ConnectException(sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); + } + $uri = $uri->withHost($records[0]['ip']); + } elseif ('v6' === $options['force_ip_resolve']) { + $records = dns_get_record($uri->getHost(), DNS_AAAA); + if (!isset($records[0]['ipv6'])) { + throw new ConnectException(sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); + } + $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']'); + } + } + + return $uri; + } + + private function getDefaultContext(RequestInterface $request) + { + $headers = ''; + foreach ($request->getHeaders() as $name => $value) { + foreach ($value as $val) { + $headers .= "$name: $val\r\n"; + } + } + + $context = [ + 'http' => [ + 'method' => $request->getMethod(), + 'header' => $headers, + 'protocol_version' => $request->getProtocolVersion(), + 'ignore_errors' => true, + 'follow_location' => 0, + ], + ]; + + $body = (string) $request->getBody(); + + if (!empty($body)) { + $context['http']['content'] = $body; + // Prevent the HTTP handler from adding a Content-Type header. + if (!$request->hasHeader('Content-Type')) { + $context['http']['header'] .= "Content-Type:\r\n"; + } + } + + $context['http']['header'] = rtrim($context['http']['header']); + + return $context; + } + + private function add_proxy(RequestInterface $request, &$options, $value, &$params) + { + if (!is_array($value)) { + $options['http']['proxy'] = $value; + } else { + $scheme = $request->getUri()->getScheme(); + if (isset($value[$scheme])) { + if (!isset($value['no']) + || !\GuzzleHttp\is_host_in_noproxy( + $request->getUri()->getHost(), + $value['no'] + ) + ) { + $options['http']['proxy'] = $value[$scheme]; + } + } + } + } + + private function add_timeout(RequestInterface $request, &$options, $value, &$params) + { + if ($value > 0) { + $options['http']['timeout'] = $value; + } + } + + private function add_verify(RequestInterface $request, &$options, $value, &$params) + { + if ($value === true) { + // PHP 5.6 or greater will find the system cert by default. When + // < 5.6, use the Guzzle bundled cacert. + if (PHP_VERSION_ID < 50600) { + $options['ssl']['cafile'] = \GuzzleHttp\default_ca_bundle(); + } + } elseif (is_string($value)) { + $options['ssl']['cafile'] = $value; + if (!file_exists($value)) { + throw new \RuntimeException("SSL CA bundle not found: $value"); + } + } elseif ($value === false) { + $options['ssl']['verify_peer'] = false; + $options['ssl']['verify_peer_name'] = false; + return; + } else { + throw new \InvalidArgumentException('Invalid verify request option'); + } + + $options['ssl']['verify_peer'] = true; + $options['ssl']['verify_peer_name'] = true; + $options['ssl']['allow_self_signed'] = false; + } + + private function add_cert(RequestInterface $request, &$options, $value, &$params) + { + if (is_array($value)) { + $options['ssl']['passphrase'] = $value[1]; + $value = $value[0]; + } + + if (!file_exists($value)) { + throw new \RuntimeException("SSL certificate not found: {$value}"); + } + + $options['ssl']['local_cert'] = $value; + } + + private function add_progress(RequestInterface $request, &$options, $value, &$params) + { + $this->addNotification( + $params, + function ($code, $a, $b, $c, $transferred, $total) use ($value) { + if ($code == STREAM_NOTIFY_PROGRESS) { + $value($total, $transferred, null, null); + } + } + ); + } + + private function add_debug(RequestInterface $request, &$options, $value, &$params) + { + if ($value === false) { + return; + } + + static $map = [ + STREAM_NOTIFY_CONNECT => 'CONNECT', + STREAM_NOTIFY_AUTH_REQUIRED => 'AUTH_REQUIRED', + STREAM_NOTIFY_AUTH_RESULT => 'AUTH_RESULT', + STREAM_NOTIFY_MIME_TYPE_IS => 'MIME_TYPE_IS', + STREAM_NOTIFY_FILE_SIZE_IS => 'FILE_SIZE_IS', + STREAM_NOTIFY_REDIRECTED => 'REDIRECTED', + STREAM_NOTIFY_PROGRESS => 'PROGRESS', + STREAM_NOTIFY_FAILURE => 'FAILURE', + STREAM_NOTIFY_COMPLETED => 'COMPLETED', + STREAM_NOTIFY_RESOLVE => 'RESOLVE', + ]; + static $args = ['severity', 'message', 'message_code', + 'bytes_transferred', 'bytes_max']; + + $value = \GuzzleHttp\debug_resource($value); + $ident = $request->getMethod() . ' ' . $request->getUri()->withFragment(''); + $this->addNotification( + $params, + function () use ($ident, $value, $map, $args) { + $passed = func_get_args(); + $code = array_shift($passed); + fprintf($value, '<%s> [%s] ', $ident, $map[$code]); + foreach (array_filter($passed) as $i => $v) { + fwrite($value, $args[$i] . ': "' . $v . '" '); + } + fwrite($value, "\n"); + } + ); + } + + private function addNotification(array &$params, callable $notify) + { + // Wrap the existing function if needed. + if (!isset($params['notification'])) { + $params['notification'] = $notify; + } else { + $params['notification'] = $this->callArray([ + $params['notification'], + $notify + ]); + } + } + + private function callArray(array $functions) + { + return function () use ($functions) { + $args = func_get_args(); + foreach ($functions as $fn) { + call_user_func_array($fn, $args); + } + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/HandlerStack.php b/vendor/guzzlehttp/guzzle/src/HandlerStack.php new file mode 100755 index 0000000..24c46fd --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/HandlerStack.php @@ -0,0 +1,273 @@ +push(Middleware::httpErrors(), 'http_errors'); + $stack->push(Middleware::redirect(), 'allow_redirects'); + $stack->push(Middleware::cookies(), 'cookies'); + $stack->push(Middleware::prepareBody(), 'prepare_body'); + + return $stack; + } + + /** + * @param callable $handler Underlying HTTP handler. + */ + public function __construct(callable $handler = null) + { + $this->handler = $handler; + } + + /** + * Invokes the handler stack as a composed handler + * + * @param RequestInterface $request + * @param array $options + */ + public function __invoke(RequestInterface $request, array $options) + { + $handler = $this->resolve(); + + return $handler($request, $options); + } + + /** + * Dumps a string representation of the stack. + * + * @return string + */ + public function __toString() + { + $depth = 0; + $stack = []; + if ($this->handler) { + $stack[] = "0) Handler: " . $this->debugCallable($this->handler); + } + + $result = ''; + foreach (array_reverse($this->stack) as $tuple) { + $depth++; + $str = "{$depth}) Name: '{$tuple[1]}', "; + $str .= "Function: " . $this->debugCallable($tuple[0]); + $result = "> {$str}\n{$result}"; + $stack[] = $str; + } + + foreach (array_keys($stack) as $k) { + $result .= "< {$stack[$k]}\n"; + } + + return $result; + } + + /** + * Set the HTTP handler that actually returns a promise. + * + * @param callable $handler Accepts a request and array of options and + * returns a Promise. + */ + public function setHandler(callable $handler) + { + $this->handler = $handler; + $this->cached = null; + } + + /** + * Returns true if the builder has a handler. + * + * @return bool + */ + public function hasHandler() + { + return (bool) $this->handler; + } + + /** + * Unshift a middleware to the bottom of the stack. + * + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function unshift(callable $middleware, $name = null) + { + array_unshift($this->stack, [$middleware, $name]); + $this->cached = null; + } + + /** + * Push a middleware to the top of the stack. + * + * @param callable $middleware Middleware function + * @param string $name Name to register for this middleware. + */ + public function push(callable $middleware, $name = '') + { + $this->stack[] = [$middleware, $name]; + $this->cached = null; + } + + /** + * Add a middleware before another middleware by name. + * + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function before($findName, callable $middleware, $withName = '') + { + $this->splice($findName, $withName, $middleware, true); + } + + /** + * Add a middleware after another middleware by name. + * + * @param string $findName Middleware to find + * @param callable $middleware Middleware function + * @param string $withName Name to register for this middleware. + */ + public function after($findName, callable $middleware, $withName = '') + { + $this->splice($findName, $withName, $middleware, false); + } + + /** + * Remove a middleware by instance or name from the stack. + * + * @param callable|string $remove Middleware to remove by instance or name. + */ + public function remove($remove) + { + $this->cached = null; + $idx = is_callable($remove) ? 0 : 1; + $this->stack = array_values(array_filter( + $this->stack, + function ($tuple) use ($idx, $remove) { + return $tuple[$idx] !== $remove; + } + )); + } + + /** + * Compose the middleware and handler into a single callable function. + * + * @return callable + */ + public function resolve() + { + if (!$this->cached) { + if (!($prev = $this->handler)) { + throw new \LogicException('No handler has been specified'); + } + + foreach (array_reverse($this->stack) as $fn) { + $prev = $fn[0]($prev); + } + + $this->cached = $prev; + } + + return $this->cached; + } + + /** + * @param $name + * @return int + */ + private function findByName($name) + { + foreach ($this->stack as $k => $v) { + if ($v[1] === $name) { + return $k; + } + } + + throw new \InvalidArgumentException("Middleware not found: $name"); + } + + /** + * Splices a function into the middleware list at a specific position. + * + * @param $findName + * @param $withName + * @param callable $middleware + * @param $before + */ + private function splice($findName, $withName, callable $middleware, $before) + { + $this->cached = null; + $idx = $this->findByName($findName); + $tuple = [$middleware, $withName]; + + if ($before) { + if ($idx === 0) { + array_unshift($this->stack, $tuple); + } else { + $replacement = [$tuple, $this->stack[$idx]]; + array_splice($this->stack, $idx, 1, $replacement); + } + } elseif ($idx === count($this->stack) - 1) { + $this->stack[] = $tuple; + } else { + $replacement = [$this->stack[$idx], $tuple]; + array_splice($this->stack, $idx, 1, $replacement); + } + } + + /** + * Provides a debug string for a given callable. + * + * @param array|callable $fn Function to write as a string. + * + * @return string + */ + private function debugCallable($fn) + { + if (is_string($fn)) { + return "callable({$fn})"; + } + + if (is_array($fn)) { + return is_string($fn[0]) + ? "callable({$fn[0]}::{$fn[1]})" + : "callable(['" . get_class($fn[0]) . "', '{$fn[1]}'])"; + } + + return 'callable(' . spl_object_hash($fn) . ')'; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/MessageFormatter.php b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php new file mode 100755 index 0000000..663ac73 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/MessageFormatter.php @@ -0,0 +1,180 @@ +>>>>>>>\n{request}\n<<<<<<<<\n{response}\n--------\n{error}"; + const SHORT = '[{ts}] "{method} {target} HTTP/{version}" {code}'; + + /** @var string Template used to format log messages */ + private $template; + + /** + * @param string $template Log message template + */ + public function __construct($template = self::CLF) + { + $this->template = $template ?: self::CLF; + } + + /** + * Returns a formatted message string. + * + * @param RequestInterface $request Request that was sent + * @param ResponseInterface $response Response that was received + * @param \Exception $error Exception that was received + * + * @return string + */ + public function format( + RequestInterface $request, + ResponseInterface $response = null, + \Exception $error = null + ) { + $cache = []; + + return preg_replace_callback( + '/{\s*([A-Za-z_\-\.0-9]+)\s*}/', + function (array $matches) use ($request, $response, $error, &$cache) { + if (isset($cache[$matches[1]])) { + return $cache[$matches[1]]; + } + + $result = ''; + switch ($matches[1]) { + case 'request': + $result = Psr7\str($request); + break; + case 'response': + $result = $response ? Psr7\str($response) : ''; + break; + case 'req_headers': + $result = trim($request->getMethod() + . ' ' . $request->getRequestTarget()) + . ' HTTP/' . $request->getProtocolVersion() . "\r\n" + . $this->headers($request); + break; + case 'res_headers': + $result = $response ? + sprintf( + 'HTTP/%s %d %s', + $response->getProtocolVersion(), + $response->getStatusCode(), + $response->getReasonPhrase() + ) . "\r\n" . $this->headers($response) + : 'NULL'; + break; + case 'req_body': + $result = $request->getBody(); + break; + case 'res_body': + $result = $response ? $response->getBody() : 'NULL'; + break; + case 'ts': + case 'date_iso_8601': + $result = gmdate('c'); + break; + case 'date_common_log': + $result = date('d/M/Y:H:i:s O'); + break; + case 'method': + $result = $request->getMethod(); + break; + case 'version': + $result = $request->getProtocolVersion(); + break; + case 'uri': + case 'url': + $result = $request->getUri(); + break; + case 'target': + $result = $request->getRequestTarget(); + break; + case 'req_version': + $result = $request->getProtocolVersion(); + break; + case 'res_version': + $result = $response + ? $response->getProtocolVersion() + : 'NULL'; + break; + case 'host': + $result = $request->getHeaderLine('Host'); + break; + case 'hostname': + $result = gethostname(); + break; + case 'code': + $result = $response ? $response->getStatusCode() : 'NULL'; + break; + case 'phrase': + $result = $response ? $response->getReasonPhrase() : 'NULL'; + break; + case 'error': + $result = $error ? $error->getMessage() : 'NULL'; + break; + default: + // handle prefixed dynamic headers + if (strpos($matches[1], 'req_header_') === 0) { + $result = $request->getHeaderLine(substr($matches[1], 11)); + } elseif (strpos($matches[1], 'res_header_') === 0) { + $result = $response + ? $response->getHeaderLine(substr($matches[1], 11)) + : 'NULL'; + } + } + + $cache[$matches[1]] = $result; + return $result; + }, + $this->template + ); + } + + private function headers(MessageInterface $message) + { + $result = ''; + foreach ($message->getHeaders() as $name => $values) { + $result .= $name . ': ' . implode(', ', $values) . "\r\n"; + } + + return trim($result); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Middleware.php b/vendor/guzzlehttp/guzzle/src/Middleware.php new file mode 100755 index 0000000..d4ad75c --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Middleware.php @@ -0,0 +1,255 @@ +withCookieHeader($request); + return $handler($request, $options) + ->then( + function ($response) use ($cookieJar, $request) { + $cookieJar->extractCookies($request, $response); + return $response; + } + ); + }; + }; + } + + /** + * Middleware that throws exceptions for 4xx or 5xx responses when the + * "http_error" request option is set to true. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function httpErrors() + { + return function (callable $handler) { + return function ($request, array $options) use ($handler) { + if (empty($options['http_errors'])) { + return $handler($request, $options); + } + return $handler($request, $options)->then( + function (ResponseInterface $response) use ($request, $handler) { + $code = $response->getStatusCode(); + if ($code < 400) { + return $response; + } + throw RequestException::create($request, $response); + } + ); + }; + }; + } + + /** + * Middleware that pushes history data to an ArrayAccess container. + * + * @param array|\ArrayAccess $container Container to hold the history (by reference). + * + * @return callable Returns a function that accepts the next handler. + * @throws \InvalidArgumentException if container is not an array or ArrayAccess. + */ + public static function history(&$container) + { + if (!is_array($container) && !$container instanceof \ArrayAccess) { + throw new \InvalidArgumentException('history container must be an array or object implementing ArrayAccess'); + } + + return function (callable $handler) use (&$container) { + return function ($request, array $options) use ($handler, &$container) { + return $handler($request, $options)->then( + function ($value) use ($request, &$container, $options) { + $container[] = [ + 'request' => $request, + 'response' => $value, + 'error' => null, + 'options' => $options + ]; + return $value; + }, + function ($reason) use ($request, &$container, $options) { + $container[] = [ + 'request' => $request, + 'response' => null, + 'error' => $reason, + 'options' => $options + ]; + return \GuzzleHttp\Promise\rejection_for($reason); + } + ); + }; + }; + } + + /** + * Middleware that invokes a callback before and after sending a request. + * + * The provided listener cannot modify or alter the response. It simply + * "taps" into the chain to be notified before returning the promise. The + * before listener accepts a request and options array, and the after + * listener accepts a request, options array, and response promise. + * + * @param callable $before Function to invoke before forwarding the request. + * @param callable $after Function invoked after forwarding. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function tap(callable $before = null, callable $after = null) + { + return function (callable $handler) use ($before, $after) { + return function ($request, array $options) use ($handler, $before, $after) { + if ($before) { + $before($request, $options); + } + $response = $handler($request, $options); + if ($after) { + $after($request, $options, $response); + } + return $response; + }; + }; + } + + /** + * Middleware that handles request redirects. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function redirect() + { + return function (callable $handler) { + return new RedirectMiddleware($handler); + }; + } + + /** + * Middleware that retries requests based on the boolean result of + * invoking the provided "decider" function. + * + * If no delay function is provided, a simple implementation of exponential + * backoff will be utilized. + * + * @param callable $decider Function that accepts the number of retries, + * a request, [response], and [exception] and + * returns true if the request is to be retried. + * @param callable $delay Function that accepts the number of retries and + * returns the number of milliseconds to delay. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function retry(callable $decider, callable $delay = null) + { + return function (callable $handler) use ($decider, $delay) { + return new RetryMiddleware($decider, $handler, $delay); + }; + } + + /** + * Middleware that logs requests, responses, and errors using a message + * formatter. + * + * @param LoggerInterface $logger Logs messages. + * @param MessageFormatter $formatter Formatter used to create message strings. + * @param string $logLevel Level at which to log requests. + * + * @return callable Returns a function that accepts the next handler. + */ + public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO) + { + return function (callable $handler) use ($logger, $formatter, $logLevel) { + return function ($request, array $options) use ($handler, $logger, $formatter, $logLevel) { + return $handler($request, $options)->then( + function ($response) use ($logger, $request, $formatter, $logLevel) { + $message = $formatter->format($request, $response); + $logger->log($logLevel, $message); + return $response; + }, + function ($reason) use ($logger, $request, $formatter) { + $response = $reason instanceof RequestException + ? $reason->getResponse() + : null; + $message = $formatter->format($request, $response, $reason); + $logger->notice($message); + return \GuzzleHttp\Promise\rejection_for($reason); + } + ); + }; + }; + } + + /** + * This middleware adds a default content-type if possible, a default + * content-length or transfer-encoding header, and the expect header. + * + * @return callable + */ + public static function prepareBody() + { + return function (callable $handler) { + return new PrepareBodyMiddleware($handler); + }; + } + + /** + * Middleware that applies a map function to the request before passing to + * the next handler. + * + * @param callable $fn Function that accepts a RequestInterface and returns + * a RequestInterface. + * @return callable + */ + public static function mapRequest(callable $fn) + { + return function (callable $handler) use ($fn) { + return function ($request, array $options) use ($handler, $fn) { + return $handler($fn($request), $options); + }; + }; + } + + /** + * Middleware that applies a map function to the resolved promise's + * response. + * + * @param callable $fn Function that accepts a ResponseInterface and + * returns a ResponseInterface. + * @return callable + */ + public static function mapResponse(callable $fn) + { + return function (callable $handler) use ($fn) { + return function ($request, array $options) use ($handler, $fn) { + return $handler($request, $options)->then($fn); + }; + }; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/Pool.php b/vendor/guzzlehttp/guzzle/src/Pool.php new file mode 100755 index 0000000..8f1be33 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/Pool.php @@ -0,0 +1,123 @@ + $rfn) { + if ($rfn instanceof RequestInterface) { + yield $key => $client->sendAsync($rfn, $opts); + } elseif (is_callable($rfn)) { + yield $key => $rfn($opts); + } else { + throw new \InvalidArgumentException('Each value yielded by ' + . 'the iterator must be a Psr7\Http\Message\RequestInterface ' + . 'or a callable that returns a promise that fulfills ' + . 'with a Psr7\Message\Http\ResponseInterface object.'); + } + } + }; + + $this->each = new EachPromise($requests(), $config); + } + + public function promise() + { + return $this->each->promise(); + } + + /** + * Sends multiple requests concurrently and returns an array of responses + * and exceptions that uses the same ordering as the provided requests. + * + * IMPORTANT: This method keeps every request and response in memory, and + * as such, is NOT recommended when sending a large number or an + * indeterminate number of requests concurrently. + * + * @param ClientInterface $client Client used to send the requests + * @param array|\Iterator $requests Requests to send concurrently. + * @param array $options Passes through the options available in + * {@see GuzzleHttp\Pool::__construct} + * + * @return array Returns an array containing the response or an exception + * in the same order that the requests were sent. + * @throws \InvalidArgumentException if the event format is incorrect. + */ + public static function batch( + ClientInterface $client, + $requests, + array $options = [] + ) { + $res = []; + self::cmpCallback($options, 'fulfilled', $res); + self::cmpCallback($options, 'rejected', $res); + $pool = new static($client, $requests, $options); + $pool->promise()->wait(); + ksort($res); + + return $res; + } + + private static function cmpCallback(array &$options, $name, array &$results) + { + if (!isset($options[$name])) { + $options[$name] = function ($v, $k) use (&$results) { + $results[$k] = $v; + }; + } else { + $currentFn = $options[$name]; + $options[$name] = function ($v, $k) use (&$results, $currentFn) { + $currentFn($v, $k); + $results[$k] = $v; + }; + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php new file mode 100755 index 0000000..2eb95f9 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php @@ -0,0 +1,106 @@ +nextHandler = $nextHandler; + } + + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + $fn = $this->nextHandler; + + // Don't do anything if the request has no body. + if ($request->getBody()->getSize() === 0) { + return $fn($request, $options); + } + + $modify = []; + + // Add a default content-type if possible. + if (!$request->hasHeader('Content-Type')) { + if ($uri = $request->getBody()->getMetadata('uri')) { + if ($type = Psr7\mimetype_from_filename($uri)) { + $modify['set_headers']['Content-Type'] = $type; + } + } + } + + // Add a default content-length or transfer-encoding header. + if (!$request->hasHeader('Content-Length') + && !$request->hasHeader('Transfer-Encoding') + ) { + $size = $request->getBody()->getSize(); + if ($size !== null) { + $modify['set_headers']['Content-Length'] = $size; + } else { + $modify['set_headers']['Transfer-Encoding'] = 'chunked'; + } + } + + // Add the expect header if needed. + $this->addExpectHeader($request, $options, $modify); + + return $fn(Psr7\modify_request($request, $modify), $options); + } + + private function addExpectHeader( + RequestInterface $request, + array $options, + array &$modify + ) { + // Determine if the Expect header should be used + if ($request->hasHeader('Expect')) { + return; + } + + $expect = isset($options['expect']) ? $options['expect'] : null; + + // Return if disabled or if you're not using HTTP/1.1 or HTTP/2.0 + if ($expect === false || $request->getProtocolVersion() < 1.1) { + return; + } + + // The expect header is unconditionally enabled + if ($expect === true) { + $modify['set_headers']['Expect'] = '100-Continue'; + return; + } + + // By default, send the expect header when the payload is > 1mb + if ($expect === null) { + $expect = 1048576; + } + + // Always add if the body cannot be rewound, the size cannot be + // determined, or the size is greater than the cutoff threshold + $body = $request->getBody(); + $size = $body->getSize(); + + if ($size === null || $size >= (int) $expect || !$body->isSeekable()) { + $modify['set_headers']['Expect'] = '100-Continue'; + } + } +} diff --git a/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php new file mode 100755 index 0000000..131b771 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php @@ -0,0 +1,237 @@ + 5, + 'protocols' => ['http', 'https'], + 'strict' => false, + 'referer' => false, + 'track_redirects' => false, + ]; + + /** @var callable */ + private $nextHandler; + + /** + * @param callable $nextHandler Next handler to invoke. + */ + public function __construct(callable $nextHandler) + { + $this->nextHandler = $nextHandler; + } + + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + $fn = $this->nextHandler; + + if (empty($options['allow_redirects'])) { + return $fn($request, $options); + } + + if ($options['allow_redirects'] === true) { + $options['allow_redirects'] = self::$defaultSettings; + } elseif (!is_array($options['allow_redirects'])) { + throw new \InvalidArgumentException('allow_redirects must be true, false, or array'); + } else { + // Merge the default settings with the provided settings + $options['allow_redirects'] += self::$defaultSettings; + } + + if (empty($options['allow_redirects']['max'])) { + return $fn($request, $options); + } + + return $fn($request, $options) + ->then(function (ResponseInterface $response) use ($request, $options) { + return $this->checkRedirect($request, $options, $response); + }); + } + + /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface|PromiseInterface $response + * + * @return ResponseInterface|PromiseInterface + */ + public function checkRedirect( + RequestInterface $request, + array $options, + ResponseInterface $response + ) { + if (substr($response->getStatusCode(), 0, 1) != '3' + || !$response->hasHeader('Location') + ) { + return $response; + } + + $this->guardMax($request, $options); + $nextRequest = $this->modifyRequest($request, $options, $response); + + if (isset($options['allow_redirects']['on_redirect'])) { + call_user_func( + $options['allow_redirects']['on_redirect'], + $request, + $response, + $nextRequest->getUri() + ); + } + + /** @var PromiseInterface|ResponseInterface $promise */ + $promise = $this($nextRequest, $options); + + // Add headers to be able to track history of redirects. + if (!empty($options['allow_redirects']['track_redirects'])) { + return $this->withTracking( + $promise, + (string) $nextRequest->getUri(), + $response->getStatusCode() + ); + } + + return $promise; + } + + private function withTracking(PromiseInterface $promise, $uri, $statusCode) + { + return $promise->then( + function (ResponseInterface $response) use ($uri, $statusCode) { + // Note that we are pushing to the front of the list as this + // would be an earlier response than what is currently present + // in the history header. + $historyHeader = $response->getHeader(self::HISTORY_HEADER); + $statusHeader = $response->getHeader(self::STATUS_HISTORY_HEADER); + array_unshift($historyHeader, $uri); + array_unshift($statusHeader, $statusCode); + return $response->withHeader(self::HISTORY_HEADER, $historyHeader) + ->withHeader(self::STATUS_HISTORY_HEADER, $statusHeader); + } + ); + } + + private function guardMax(RequestInterface $request, array &$options) + { + $current = isset($options['__redirect_count']) + ? $options['__redirect_count'] + : 0; + $options['__redirect_count'] = $current + 1; + $max = $options['allow_redirects']['max']; + + if ($options['__redirect_count'] > $max) { + throw new TooManyRedirectsException( + "Will not follow more than {$max} redirects", + $request + ); + } + } + + /** + * @param RequestInterface $request + * @param array $options + * @param ResponseInterface $response + * + * @return RequestInterface + */ + public function modifyRequest( + RequestInterface $request, + array $options, + ResponseInterface $response + ) { + // Request modifications to apply. + $modify = []; + $protocols = $options['allow_redirects']['protocols']; + + // Use a GET request if this is an entity enclosing request and we are + // not forcing RFC compliance, but rather emulating what all browsers + // would do. + $statusCode = $response->getStatusCode(); + if ($statusCode == 303 || + ($statusCode <= 302 && $request->getBody() && !$options['allow_redirects']['strict']) + ) { + $modify['method'] = 'GET'; + $modify['body'] = ''; + } + + $modify['uri'] = $this->redirectUri($request, $response, $protocols); + Psr7\rewind_body($request); + + // Add the Referer header if it is told to do so and only + // add the header if we are not redirecting from https to http. + if ($options['allow_redirects']['referer'] + && $modify['uri']->getScheme() === $request->getUri()->getScheme() + ) { + $uri = $request->getUri()->withUserInfo('', ''); + $modify['set_headers']['Referer'] = (string) $uri; + } else { + $modify['remove_headers'][] = 'Referer'; + } + + // Remove Authorization header if host is different. + if ($request->getUri()->getHost() !== $modify['uri']->getHost()) { + $modify['remove_headers'][] = 'Authorization'; + } + + return Psr7\modify_request($request, $modify); + } + + /** + * Set the appropriate URL on the request based on the location header + * + * @param RequestInterface $request + * @param ResponseInterface $response + * @param array $protocols + * + * @return UriInterface + */ + private function redirectUri( + RequestInterface $request, + ResponseInterface $response, + array $protocols + ) { + $location = Psr7\UriResolver::resolve( + $request->getUri(), + new Psr7\Uri($response->getHeaderLine('Location')) + ); + + // Ensure that the redirect URI is allowed based on the protocols. + if (!in_array($location->getScheme(), $protocols)) { + throw new BadResponseException( + sprintf( + 'Redirect URI, %s, does not use one of the allowed redirect protocols: %s', + $location, + implode(', ', $protocols) + ), + $request, + $response + ); + } + + return $location; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/RequestOptions.php b/vendor/guzzlehttp/guzzle/src/RequestOptions.php new file mode 100755 index 0000000..c6aacfb --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/RequestOptions.php @@ -0,0 +1,255 @@ +decider = $decider; + $this->nextHandler = $nextHandler; + $this->delay = $delay ?: __CLASS__ . '::exponentialDelay'; + } + + /** + * Default exponential backoff delay function. + * + * @param $retries + * + * @return int + */ + public static function exponentialDelay($retries) + { + return (int) pow(2, $retries - 1); + } + + /** + * @param RequestInterface $request + * @param array $options + * + * @return PromiseInterface + */ + public function __invoke(RequestInterface $request, array $options) + { + if (!isset($options['retries'])) { + $options['retries'] = 0; + } + + $fn = $this->nextHandler; + return $fn($request, $options) + ->then( + $this->onFulfilled($request, $options), + $this->onRejected($request, $options) + ); + } + + private function onFulfilled(RequestInterface $req, array $options) + { + return function ($value) use ($req, $options) { + if (!call_user_func( + $this->decider, + $options['retries'], + $req, + $value, + null + )) { + return $value; + } + return $this->doRetry($req, $options, $value); + }; + } + + private function onRejected(RequestInterface $req, array $options) + { + return function ($reason) use ($req, $options) { + if (!call_user_func( + $this->decider, + $options['retries'], + $req, + null, + $reason + )) { + return \GuzzleHttp\Promise\rejection_for($reason); + } + return $this->doRetry($req, $options); + }; + } + + private function doRetry(RequestInterface $request, array $options, ResponseInterface $response = null) + { + $options['delay'] = call_user_func($this->delay, ++$options['retries'], $response); + + return $this($request, $options); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/TransferStats.php b/vendor/guzzlehttp/guzzle/src/TransferStats.php new file mode 100755 index 0000000..15f717e --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/TransferStats.php @@ -0,0 +1,126 @@ +request = $request; + $this->response = $response; + $this->transferTime = $transferTime; + $this->handlerErrorData = $handlerErrorData; + $this->handlerStats = $handlerStats; + } + + /** + * @return RequestInterface + */ + public function getRequest() + { + return $this->request; + } + + /** + * Returns the response that was received (if any). + * + * @return ResponseInterface|null + */ + public function getResponse() + { + return $this->response; + } + + /** + * Returns true if a response was received. + * + * @return bool + */ + public function hasResponse() + { + return $this->response !== null; + } + + /** + * Gets handler specific error data. + * + * This might be an exception, a integer representing an error code, or + * anything else. Relying on this value assumes that you know what handler + * you are using. + * + * @return mixed + */ + public function getHandlerErrorData() + { + return $this->handlerErrorData; + } + + /** + * Get the effective URI the request was sent to. + * + * @return UriInterface + */ + public function getEffectiveUri() + { + return $this->request->getUri(); + } + + /** + * Get the estimated time the request was being transferred by the handler. + * + * @return float Time in seconds. + */ + public function getTransferTime() + { + return $this->transferTime; + } + + /** + * Gets an array of all of the handler specific transfer data. + * + * @return array + */ + public function getHandlerStats() + { + return $this->handlerStats; + } + + /** + * Get a specific handler statistic from the handler by name. + * + * @param string $stat Handler specific transfer stat to retrieve. + * + * @return mixed|null + */ + public function getHandlerStat($stat) + { + return isset($this->handlerStats[$stat]) + ? $this->handlerStats[$stat] + : null; + } +} diff --git a/vendor/guzzlehttp/guzzle/src/UriTemplate.php b/vendor/guzzlehttp/guzzle/src/UriTemplate.php new file mode 100755 index 0000000..96dcfd0 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/UriTemplate.php @@ -0,0 +1,237 @@ + ['prefix' => '', 'joiner' => ',', 'query' => false], + '+' => ['prefix' => '', 'joiner' => ',', 'query' => false], + '#' => ['prefix' => '#', 'joiner' => ',', 'query' => false], + '.' => ['prefix' => '.', 'joiner' => '.', 'query' => false], + '/' => ['prefix' => '/', 'joiner' => '/', 'query' => false], + ';' => ['prefix' => ';', 'joiner' => ';', 'query' => true], + '?' => ['prefix' => '?', 'joiner' => '&', 'query' => true], + '&' => ['prefix' => '&', 'joiner' => '&', 'query' => true] + ]; + + /** @var array Delimiters */ + private static $delims = [':', '/', '?', '#', '[', ']', '@', '!', '$', + '&', '\'', '(', ')', '*', '+', ',', ';', '=']; + + /** @var array Percent encoded delimiters */ + private static $delimsPct = ['%3A', '%2F', '%3F', '%23', '%5B', '%5D', + '%40', '%21', '%24', '%26', '%27', '%28', '%29', '%2A', '%2B', '%2C', + '%3B', '%3D']; + + public function expand($template, array $variables) + { + if (false === strpos($template, '{')) { + return $template; + } + + $this->template = $template; + $this->variables = $variables; + + return preg_replace_callback( + '/\{([^\}]+)\}/', + [$this, 'expandMatch'], + $this->template + ); + } + + /** + * Parse an expression into parts + * + * @param string $expression Expression to parse + * + * @return array Returns an associative array of parts + */ + private function parseExpression($expression) + { + $result = []; + + if (isset(self::$operatorHash[$expression[0]])) { + $result['operator'] = $expression[0]; + $expression = substr($expression, 1); + } else { + $result['operator'] = ''; + } + + foreach (explode(',', $expression) as $value) { + $value = trim($value); + $varspec = []; + if ($colonPos = strpos($value, ':')) { + $varspec['value'] = substr($value, 0, $colonPos); + $varspec['modifier'] = ':'; + $varspec['position'] = (int) substr($value, $colonPos + 1); + } elseif (substr($value, -1) === '*') { + $varspec['modifier'] = '*'; + $varspec['value'] = substr($value, 0, -1); + } else { + $varspec['value'] = (string) $value; + $varspec['modifier'] = ''; + } + $result['values'][] = $varspec; + } + + return $result; + } + + /** + * Process an expansion + * + * @param array $matches Matches met in the preg_replace_callback + * + * @return string Returns the replacement string + */ + private function expandMatch(array $matches) + { + static $rfc1738to3986 = ['+' => '%20', '%7e' => '~']; + + $replacements = []; + $parsed = self::parseExpression($matches[1]); + $prefix = self::$operatorHash[$parsed['operator']]['prefix']; + $joiner = self::$operatorHash[$parsed['operator']]['joiner']; + $useQuery = self::$operatorHash[$parsed['operator']]['query']; + + foreach ($parsed['values'] as $value) { + if (!isset($this->variables[$value['value']])) { + continue; + } + + $variable = $this->variables[$value['value']]; + $actuallyUseQuery = $useQuery; + $expanded = ''; + + if (is_array($variable)) { + $isAssoc = $this->isAssoc($variable); + $kvp = []; + foreach ($variable as $key => $var) { + if ($isAssoc) { + $key = rawurlencode($key); + $isNestedArray = is_array($var); + } else { + $isNestedArray = false; + } + + if (!$isNestedArray) { + $var = rawurlencode($var); + if ($parsed['operator'] === '+' || + $parsed['operator'] === '#' + ) { + $var = $this->decodeReserved($var); + } + } + + if ($value['modifier'] === '*') { + if ($isAssoc) { + if ($isNestedArray) { + // Nested arrays must allow for deeply nested + // structures. + $var = strtr( + http_build_query([$key => $var]), + $rfc1738to3986 + ); + } else { + $var = $key . '=' . $var; + } + } elseif ($key > 0 && $actuallyUseQuery) { + $var = $value['value'] . '=' . $var; + } + } + + $kvp[$key] = $var; + } + + if (empty($variable)) { + $actuallyUseQuery = false; + } elseif ($value['modifier'] === '*') { + $expanded = implode($joiner, $kvp); + if ($isAssoc) { + // Don't prepend the value name when using the explode + // modifier with an associative array. + $actuallyUseQuery = false; + } + } else { + if ($isAssoc) { + // When an associative array is encountered and the + // explode modifier is not set, then the result must be + // a comma separated list of keys followed by their + // respective values. + foreach ($kvp as $k => &$v) { + $v = $k . ',' . $v; + } + } + $expanded = implode(',', $kvp); + } + } else { + if ($value['modifier'] === ':') { + $variable = substr($variable, 0, $value['position']); + } + $expanded = rawurlencode($variable); + if ($parsed['operator'] === '+' || $parsed['operator'] === '#') { + $expanded = $this->decodeReserved($expanded); + } + } + + if ($actuallyUseQuery) { + if (!$expanded && $joiner !== '&') { + $expanded = $value['value']; + } else { + $expanded = $value['value'] . '=' . $expanded; + } + } + + $replacements[] = $expanded; + } + + $ret = implode($joiner, $replacements); + if ($ret && $prefix) { + return $prefix . $ret; + } + + return $ret; + } + + /** + * Determines if an array is associative. + * + * This makes the assumption that input arrays are sequences or hashes. + * This assumption is a tradeoff for accuracy in favor of speed, but it + * should work in almost every case where input is supplied for a URI + * template. + * + * @param array $array Array to check + * + * @return bool + */ + private function isAssoc(array $array) + { + return $array && array_keys($array)[0] !== 0; + } + + /** + * Removes percent encoding on reserved characters (used with + and # + * modifiers). + * + * @param string $string String to fix + * + * @return string + */ + private function decodeReserved($string) + { + return str_replace(self::$delimsPct, self::$delims, $string); + } +} diff --git a/vendor/guzzlehttp/guzzle/src/functions.php b/vendor/guzzlehttp/guzzle/src/functions.php new file mode 100755 index 0000000..a3ac450 --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/functions.php @@ -0,0 +1,333 @@ +expand($template, $variables); +} + +/** + * Debug function used to describe the provided value type and class. + * + * @param mixed $input + * + * @return string Returns a string containing the type of the variable and + * if a class is provided, the class name. + */ +function describe_type($input) +{ + switch (gettype($input)) { + case 'object': + return 'object(' . get_class($input) . ')'; + case 'array': + return 'array(' . count($input) . ')'; + default: + ob_start(); + var_dump($input); + // normalize float vs double + return str_replace('double(', 'float(', rtrim(ob_get_clean())); + } +} + +/** + * Parses an array of header lines into an associative array of headers. + * + * @param array $lines Header lines array of strings in the following + * format: "Name: Value" + * @return array + */ +function headers_from_lines($lines) +{ + $headers = []; + + foreach ($lines as $line) { + $parts = explode(':', $line, 2); + $headers[trim($parts[0])][] = isset($parts[1]) + ? trim($parts[1]) + : null; + } + + return $headers; +} + +/** + * Returns a debug stream based on the provided variable. + * + * @param mixed $value Optional value + * + * @return resource + */ +function debug_resource($value = null) +{ + if (is_resource($value)) { + return $value; + } elseif (defined('STDOUT')) { + return STDOUT; + } + + return fopen('php://output', 'w'); +} + +/** + * Chooses and creates a default handler to use based on the environment. + * + * The returned handler is not wrapped by any default middlewares. + * + * @throws \RuntimeException if no viable Handler is available. + * @return callable Returns the best handler for the given system. + */ +function choose_handler() +{ + $handler = null; + if (function_exists('curl_multi_exec') && function_exists('curl_exec')) { + $handler = Proxy::wrapSync(new CurlMultiHandler(), new CurlHandler()); + } elseif (function_exists('curl_exec')) { + $handler = new CurlHandler(); + } elseif (function_exists('curl_multi_exec')) { + $handler = new CurlMultiHandler(); + } + + if (ini_get('allow_url_fopen')) { + $handler = $handler + ? Proxy::wrapStreaming($handler, new StreamHandler()) + : new StreamHandler(); + } elseif (!$handler) { + throw new \RuntimeException('GuzzleHttp requires cURL, the ' + . 'allow_url_fopen ini setting, or a custom HTTP handler.'); + } + + return $handler; +} + +/** + * Get the default User-Agent string to use with Guzzle + * + * @return string + */ +function default_user_agent() +{ + static $defaultAgent = ''; + + if (!$defaultAgent) { + $defaultAgent = 'GuzzleHttp/' . Client::VERSION; + if (extension_loaded('curl') && function_exists('curl_version')) { + $defaultAgent .= ' curl/' . \curl_version()['version']; + } + $defaultAgent .= ' PHP/' . PHP_VERSION; + } + + return $defaultAgent; +} + +/** + * Returns the default cacert bundle for the current system. + * + * First, the openssl.cafile and curl.cainfo php.ini settings are checked. + * If those settings are not configured, then the common locations for + * bundles found on Red Hat, CentOS, Fedora, Ubuntu, Debian, FreeBSD, OS X + * and Windows are checked. If any of these file locations are found on + * disk, they will be utilized. + * + * Note: the result of this function is cached for subsequent calls. + * + * @return string + * @throws \RuntimeException if no bundle can be found. + */ +function default_ca_bundle() +{ + static $cached = null; + static $cafiles = [ + // Red Hat, CentOS, Fedora (provided by the ca-certificates package) + '/etc/pki/tls/certs/ca-bundle.crt', + // Ubuntu, Debian (provided by the ca-certificates package) + '/etc/ssl/certs/ca-certificates.crt', + // FreeBSD (provided by the ca_root_nss package) + '/usr/local/share/certs/ca-root-nss.crt', + // SLES 12 (provided by the ca-certificates package) + '/var/lib/ca-certificates/ca-bundle.pem', + // OS X provided by homebrew (using the default path) + '/usr/local/etc/openssl/cert.pem', + // Google app engine + '/etc/ca-certificates.crt', + // Windows? + 'C:\\windows\\system32\\curl-ca-bundle.crt', + 'C:\\windows\\curl-ca-bundle.crt', + ]; + + if ($cached) { + return $cached; + } + + if ($ca = ini_get('openssl.cafile')) { + return $cached = $ca; + } + + if ($ca = ini_get('curl.cainfo')) { + return $cached = $ca; + } + + foreach ($cafiles as $filename) { + if (file_exists($filename)) { + return $cached = $filename; + } + } + + throw new \RuntimeException(<<< EOT +No system CA bundle could be found in any of the the common system locations. +PHP versions earlier than 5.6 are not properly configured to use the system's +CA bundle by default. In order to verify peer certificates, you will need to +supply the path on disk to a certificate bundle to the 'verify' request +option: http://docs.guzzlephp.org/en/latest/clients.html#verify. If you do not +need a specific certificate bundle, then Mozilla provides a commonly used CA +bundle which can be downloaded here (provided by the maintainer of cURL): +https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt. Once +you have a CA bundle available on disk, you can set the 'openssl.cafile' PHP +ini setting to point to the path to the file, allowing you to omit the 'verify' +request option. See http://curl.haxx.se/docs/sslcerts.html for more +information. +EOT + ); +} + +/** + * Creates an associative array of lowercase header names to the actual + * header casing. + * + * @param array $headers + * + * @return array + */ +function normalize_header_keys(array $headers) +{ + $result = []; + foreach (array_keys($headers) as $key) { + $result[strtolower($key)] = $key; + } + + return $result; +} + +/** + * Returns true if the provided host matches any of the no proxy areas. + * + * This method will strip a port from the host if it is present. Each pattern + * can be matched with an exact match (e.g., "foo.com" == "foo.com") or a + * partial match: (e.g., "foo.com" == "baz.foo.com" and ".foo.com" == + * "baz.foo.com", but ".foo.com" != "foo.com"). + * + * Areas are matched in the following cases: + * 1. "*" (without quotes) always matches any hosts. + * 2. An exact match. + * 3. The area starts with "." and the area is the last part of the host. e.g. + * '.mit.edu' will match any host that ends with '.mit.edu'. + * + * @param string $host Host to check against the patterns. + * @param array $noProxyArray An array of host patterns. + * + * @return bool + */ +function is_host_in_noproxy($host, array $noProxyArray) +{ + if (strlen($host) === 0) { + throw new \InvalidArgumentException('Empty host provided'); + } + + // Strip port if present. + if (strpos($host, ':')) { + $host = explode($host, ':', 2)[0]; + } + + foreach ($noProxyArray as $area) { + // Always match on wildcards. + if ($area === '*') { + return true; + } elseif (empty($area)) { + // Don't match on empty values. + continue; + } elseif ($area === $host) { + // Exact matches. + return true; + } else { + // Special match if the area when prefixed with ".". Remove any + // existing leading "." and add a new leading ".". + $area = '.' . ltrim($area, '.'); + if (substr($host, -(strlen($area))) === $area) { + return true; + } + } + } + + return false; +} + +/** + * Wrapper for json_decode that throws when an error occurs. + * + * @param string $json JSON data to parse + * @param bool $assoc When true, returned objects will be converted + * into associative arrays. + * @param int $depth User specified recursion depth. + * @param int $options Bitmask of JSON decode options. + * + * @return mixed + * @throws \InvalidArgumentException if the JSON cannot be decoded. + * @link http://www.php.net/manual/en/function.json-decode.php + */ +function json_decode($json, $assoc = false, $depth = 512, $options = 0) +{ + $data = \json_decode($json, $assoc, $depth, $options); + if (JSON_ERROR_NONE !== json_last_error()) { + throw new \InvalidArgumentException( + 'json_decode error: ' . json_last_error_msg() + ); + } + + return $data; +} + +/** + * Wrapper for JSON encoding that throws when an error occurs. + * + * @param mixed $value The value being encoded + * @param int $options JSON encode option bitmask + * @param int $depth Set the maximum depth. Must be greater than zero. + * + * @return string + * @throws \InvalidArgumentException if the JSON cannot be encoded. + * @link http://www.php.net/manual/en/function.json-encode.php + */ +function json_encode($value, $options = 0, $depth = 512) +{ + $json = \json_encode($value, $options, $depth); + if (JSON_ERROR_NONE !== json_last_error()) { + throw new \InvalidArgumentException( + 'json_encode error: ' . json_last_error_msg() + ); + } + + return $json; +} diff --git a/vendor/guzzlehttp/guzzle/src/functions_include.php b/vendor/guzzlehttp/guzzle/src/functions_include.php new file mode 100755 index 0000000..a93393a --- /dev/null +++ b/vendor/guzzlehttp/guzzle/src/functions_include.php @@ -0,0 +1,6 @@ + + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/promises/Makefile b/vendor/guzzlehttp/promises/Makefile new file mode 100755 index 0000000..8d5b3ef --- /dev/null +++ b/vendor/guzzlehttp/promises/Makefile @@ -0,0 +1,13 @@ +all: clean test + +test: + vendor/bin/phpunit + +coverage: + vendor/bin/phpunit --coverage-html=artifacts/coverage + +view-coverage: + open artifacts/coverage/index.html + +clean: + rm -rf artifacts/* diff --git a/vendor/guzzlehttp/promises/README.md b/vendor/guzzlehttp/promises/README.md new file mode 100755 index 0000000..7b607e2 --- /dev/null +++ b/vendor/guzzlehttp/promises/README.md @@ -0,0 +1,504 @@ +# Guzzle Promises + +[Promises/A+](https://promisesaplus.com/) implementation that handles promise +chaining and resolution iteratively, allowing for "infinite" promise chaining +while keeping the stack size constant. Read [this blog post](https://blog.domenic.me/youre-missing-the-point-of-promises/) +for a general introduction to promises. + +- [Features](#features) +- [Quick start](#quick-start) +- [Synchronous wait](#synchronous-wait) +- [Cancellation](#cancellation) +- [API](#api) + - [Promise](#promise) + - [FulfilledPromise](#fulfilledpromise) + - [RejectedPromise](#rejectedpromise) +- [Promise interop](#promise-interop) +- [Implementation notes](#implementation-notes) + + +# Features + +- [Promises/A+](https://promisesaplus.com/) implementation. +- Promise resolution and chaining is handled iteratively, allowing for + "infinite" promise chaining. +- Promises have a synchronous `wait` method. +- Promises can be cancelled. +- Works with any object that has a `then` function. +- C# style async/await coroutine promises using + `GuzzleHttp\Promise\coroutine()`. + + +# Quick start + +A *promise* represents the eventual result of an asynchronous operation. The +primary way of interacting with a promise is through its `then` method, which +registers callbacks to receive either a promise's eventual value or the reason +why the promise cannot be fulfilled. + + +## Callbacks + +Callbacks are registered with the `then` method by providing an optional +`$onFulfilled` followed by an optional `$onRejected` function. + + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then( + // $onFulfilled + function ($value) { + echo 'The promise was fulfilled.'; + }, + // $onRejected + function ($reason) { + echo 'The promise was rejected.'; + } +); +``` + +*Resolving* a promise means that you either fulfill a promise with a *value* or +reject a promise with a *reason*. Resolving a promises triggers callbacks +registered with the promises's `then` method. These callbacks are triggered +only once and in the order in which they were added. + + +## Resolving a promise + +Promises are fulfilled using the `resolve($value)` method. Resolving a promise +with any value other than a `GuzzleHttp\Promise\RejectedPromise` will trigger +all of the onFulfilled callbacks (resolving a promise with a rejected promise +will reject the promise and trigger the `$onRejected` callbacks). + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise + ->then(function ($value) { + // Return a value and don't break the chain + return "Hello, " . $value; + }) + // This then is executed after the first then and receives the value + // returned from the first then. + ->then(function ($value) { + echo $value; + }); + +// Resolving the promise triggers the $onFulfilled callbacks and outputs +// "Hello, reader". +$promise->resolve('reader.'); +``` + + +## Promise forwarding + +Promises can be chained one after the other. Each then in the chain is a new +promise. The return value of a promise is what's forwarded to the next +promise in the chain. Returning a promise in a `then` callback will cause the +subsequent promises in the chain to only be fulfilled when the returned promise +has been fulfilled. The next promise in the chain will be invoked with the +resolved value of the promise. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$nextPromise = new Promise(); + +$promise + ->then(function ($value) use ($nextPromise) { + echo $value; + return $nextPromise; + }) + ->then(function ($value) { + echo $value; + }); + +// Triggers the first callback and outputs "A" +$promise->resolve('A'); +// Triggers the second callback and outputs "B" +$nextPromise->resolve('B'); +``` + +## Promise rejection + +When a promise is rejected, the `$onRejected` callbacks are invoked with the +rejection reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + echo $reason; +}); + +$promise->reject('Error!'); +// Outputs "Error!" +``` + +## Rejection forwarding + +If an exception is thrown in an `$onRejected` callback, subsequent +`$onRejected` callbacks are invoked with the thrown exception as the reason. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + throw new \Exception($reason); +})->then(null, function ($reason) { + assert($reason->getMessage() === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +You can also forward a rejection down the promise chain by returning a +`GuzzleHttp\Promise\RejectedPromise` in either an `$onFulfilled` or +`$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new Promise(); +$promise->then(null, function ($reason) { + return new RejectedPromise($reason); +})->then(null, function ($reason) { + assert($reason === 'Error!'); +}); + +$promise->reject('Error!'); +``` + +If an exception is not thrown in a `$onRejected` callback and the callback +does not return a rejected promise, downstream `$onFulfilled` callbacks are +invoked using the value returned from the `$onRejected` callback. + +```php +use GuzzleHttp\Promise\Promise; +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new Promise(); +$promise + ->then(null, function ($reason) { + return "It's ok"; + }) + ->then(function ($value) { + assert($value === "It's ok"); + }); + +$promise->reject('Error!'); +``` + +# Synchronous wait + +You can synchronously force promises to complete using a promise's `wait` +method. When creating a promise, you can provide a wait function that is used +to synchronously force a promise to complete. When a wait function is invoked +it is expected to deliver a value to the promise or reject the promise. If the +wait function does not deliver a value, then an exception is thrown. The wait +function provided to a promise constructor is invoked when the `wait` function +of the promise is called. + +```php +$promise = new Promise(function () use (&$promise) { + $promise->resolve('foo'); +}); + +// Calling wait will return the value of the promise. +echo $promise->wait(); // outputs "foo" +``` + +If an exception is encountered while invoking the wait function of a promise, +the promise is rejected with the exception and the exception is thrown. + +```php +$promise = new Promise(function () use (&$promise) { + throw new \Exception('foo'); +}); + +$promise->wait(); // throws the exception. +``` + +Calling `wait` on a promise that has been fulfilled will not trigger the wait +function. It will simply return the previously resolved value. + +```php +$promise = new Promise(function () { die('this is not called!'); }); +$promise->resolve('foo'); +echo $promise->wait(); // outputs "foo" +``` + +Calling `wait` on a promise that has been rejected will throw an exception. If +the rejection reason is an instance of `\Exception` the reason is thrown. +Otherwise, a `GuzzleHttp\Promise\RejectionException` is thrown and the reason +can be obtained by calling the `getReason` method of the exception. + +```php +$promise = new Promise(); +$promise->reject('foo'); +$promise->wait(); +``` + +> PHP Fatal error: Uncaught exception 'GuzzleHttp\Promise\RejectionException' with message 'The promise was rejected with value: foo' + + +## Unwrapping a promise + +When synchronously waiting on a promise, you are joining the state of the +promise into the current state of execution (i.e., return the value of the +promise if it was fulfilled or throw an exception if it was rejected). This is +called "unwrapping" the promise. Waiting on a promise will by default unwrap +the promise state. + +You can force a promise to resolve and *not* unwrap the state of the promise +by passing `false` to the first argument of the `wait` function: + +```php +$promise = new Promise(); +$promise->reject('foo'); +// This will not throw an exception. It simply ensures the promise has +// been resolved. +$promise->wait(false); +``` + +When unwrapping a promise, the resolved value of the promise will be waited +upon until the unwrapped value is not a promise. This means that if you resolve +promise A with a promise B and unwrap promise A, the value returned by the +wait function will be the value delivered to promise B. + +**Note**: when you do not unwrap the promise, no value is returned. + + +# Cancellation + +You can cancel a promise that has not yet been fulfilled using the `cancel()` +method of a promise. When creating a promise you can provide an optional +cancel function that when invoked cancels the action of computing a resolution +of the promise. + + +# API + + +## Promise + +When creating a promise object, you can provide an optional `$waitFn` and +`$cancelFn`. `$waitFn` is a function that is invoked with no arguments and is +expected to resolve the promise. `$cancelFn` is a function with no arguments +that is expected to cancel the computation of a promise. It is invoked when the +`cancel()` method of a promise is called. + +```php +use GuzzleHttp\Promise\Promise; + +$promise = new Promise( + function () use (&$promise) { + $promise->resolve('waited'); + }, + function () { + // do something that will cancel the promise computation (e.g., close + // a socket, cancel a database query, etc...) + } +); + +assert('waited' === $promise->wait()); +``` + +A promise has the following methods: + +- `then(callable $onFulfilled, callable $onRejected) : PromiseInterface` + + Appends fulfillment and rejection handlers to the promise, and returns a new promise resolving to the return value of the called handler. + +- `otherwise(callable $onRejected) : PromiseInterface` + + Appends a rejection handler callback to the promise, and returns a new promise resolving to the return value of the callback if it is called, or to its original fulfillment value if the promise is instead fulfilled. + +- `wait($unwrap = true) : mixed` + + Synchronously waits on the promise to complete. + + `$unwrap` controls whether or not the value of the promise is returned for a + fulfilled promise or if an exception is thrown if the promise is rejected. + This is set to `true` by default. + +- `cancel()` + + Attempts to cancel the promise if possible. The promise being cancelled and + the parent most ancestor that has not yet been resolved will also be + cancelled. Any promises waiting on the cancelled promise to resolve will also + be cancelled. + +- `getState() : string` + + Returns the state of the promise. One of `pending`, `fulfilled`, or + `rejected`. + +- `resolve($value)` + + Fulfills the promise with the given `$value`. + +- `reject($reason)` + + Rejects the promise with the given `$reason`. + + +## FulfilledPromise + +A fulfilled promise can be created to represent a promise that has been +fulfilled. + +```php +use GuzzleHttp\Promise\FulfilledPromise; + +$promise = new FulfilledPromise('value'); + +// Fulfilled callbacks are immediately invoked. +$promise->then(function ($value) { + echo $value; +}); +``` + + +## RejectedPromise + +A rejected promise can be created to represent a promise that has been +rejected. + +```php +use GuzzleHttp\Promise\RejectedPromise; + +$promise = new RejectedPromise('Error'); + +// Rejected callbacks are immediately invoked. +$promise->then(null, function ($reason) { + echo $reason; +}); +``` + + +# Promise interop + +This library works with foreign promises that have a `then` method. This means +you can use Guzzle promises with [React promises](https://github.com/reactphp/promise) +for example. When a foreign promise is returned inside of a then method +callback, promise resolution will occur recursively. + +```php +// Create a React promise +$deferred = new React\Promise\Deferred(); +$reactPromise = $deferred->promise(); + +// Create a Guzzle promise that is fulfilled with a React promise. +$guzzlePromise = new \GuzzleHttp\Promise\Promise(); +$guzzlePromise->then(function ($value) use ($reactPromise) { + // Do something something with the value... + // Return the React promise + return $reactPromise; +}); +``` + +Please note that wait and cancel chaining is no longer possible when forwarding +a foreign promise. You will need to wrap a third-party promise with a Guzzle +promise in order to utilize wait and cancel functions with foreign promises. + + +## Event Loop Integration + +In order to keep the stack size constant, Guzzle promises are resolved +asynchronously using a task queue. When waiting on promises synchronously, the +task queue will be automatically run to ensure that the blocking promise and +any forwarded promises are resolved. When using promises asynchronously in an +event loop, you will need to run the task queue on each tick of the loop. If +you do not run the task queue, then promises will not be resolved. + +You can run the task queue using the `run()` method of the global task queue +instance. + +```php +// Get the global task queue +$queue = \GuzzleHttp\Promise\queue(); +$queue->run(); +``` + +For example, you could use Guzzle promises with React using a periodic timer: + +```php +$loop = React\EventLoop\Factory::create(); +$loop->addPeriodicTimer(0, [$queue, 'run']); +``` + +*TODO*: Perhaps adding a `futureTick()` on each tick would be faster? + + +# Implementation notes + + +## Promise resolution and chaining is handled iteratively + +By shuffling pending handlers from one owner to another, promises are +resolved iteratively, allowing for "infinite" then chaining. + +```php +then(function ($v) { + // The stack size remains constant (a good thing) + echo xdebug_get_stack_depth() . ', '; + return $v + 1; + }); +} + +$parent->resolve(0); +var_dump($p->wait()); // int(1000) + +``` + +When a promise is fulfilled or rejected with a non-promise value, the promise +then takes ownership of the handlers of each child promise and delivers values +down the chain without using recursion. + +When a promise is resolved with another promise, the original promise transfers +all of its pending handlers to the new promise. When the new promise is +eventually resolved, all of the pending handlers are delivered the forwarded +value. + + +## A promise is the deferred. + +Some promise libraries implement promises using a deferred object to represent +a computation and a promise object to represent the delivery of the result of +the computation. This is a nice separation of computation and delivery because +consumers of the promise cannot modify the value that will be eventually +delivered. + +One side effect of being able to implement promise resolution and chaining +iteratively is that you need to be able for one promise to reach into the state +of another promise to shuffle around ownership of handlers. In order to achieve +this without making the handlers of a promise publicly mutable, a promise is +also the deferred value, allowing promises of the same parent class to reach +into and modify the private properties of promises of the same type. While this +does allow consumers of the value to modify the resolution or rejection of the +deferred, it is a small price to pay for keeping the stack size constant. + +```php +$promise = new Promise(); +$promise->then(function ($value) { echo $value; }); +// The promise is the deferred value, so you can deliver a value to it. +$promise->resolve('foo'); +// prints "foo" +``` diff --git a/vendor/guzzlehttp/promises/composer.json b/vendor/guzzlehttp/promises/composer.json new file mode 100755 index 0000000..ec41a61 --- /dev/null +++ b/vendor/guzzlehttp/promises/composer.json @@ -0,0 +1,34 @@ +{ + "name": "guzzlehttp/promises", + "description": "Guzzle promises library", + "keywords": ["promise"], + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": ["src/functions_include.php"] + }, + "scripts": { + "test": "vendor/bin/phpunit", + "test-ci": "vendor/bin/phpunit --coverage-text" + }, + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + } +} diff --git a/vendor/guzzlehttp/promises/src/AggregateException.php b/vendor/guzzlehttp/promises/src/AggregateException.php new file mode 100755 index 0000000..6a5690c --- /dev/null +++ b/vendor/guzzlehttp/promises/src/AggregateException.php @@ -0,0 +1,16 @@ +then(function ($v) { echo $v; }); + * + * @param callable $generatorFn Generator function to wrap into a promise. + * + * @return Promise + * @link https://github.com/petkaantonov/bluebird/blob/master/API.md#generators inspiration + */ +final class Coroutine implements PromiseInterface +{ + /** + * @var PromiseInterface|null + */ + private $currentPromise; + + /** + * @var Generator + */ + private $generator; + + /** + * @var Promise + */ + private $result; + + public function __construct(callable $generatorFn) + { + $this->generator = $generatorFn(); + $this->result = new Promise(function () { + while (isset($this->currentPromise)) { + $this->currentPromise->wait(); + } + }); + $this->nextCoroutine($this->generator->current()); + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + return $this->result->then($onFulfilled, $onRejected); + } + + public function otherwise(callable $onRejected) + { + return $this->result->otherwise($onRejected); + } + + public function wait($unwrap = true) + { + return $this->result->wait($unwrap); + } + + public function getState() + { + return $this->result->getState(); + } + + public function resolve($value) + { + $this->result->resolve($value); + } + + public function reject($reason) + { + $this->result->reject($reason); + } + + public function cancel() + { + $this->currentPromise->cancel(); + $this->result->cancel(); + } + + private function nextCoroutine($yielded) + { + $this->currentPromise = promise_for($yielded) + ->then([$this, '_handleSuccess'], [$this, '_handleFailure']); + } + + /** + * @internal + */ + public function _handleSuccess($value) + { + unset($this->currentPromise); + try { + $next = $this->generator->send($value); + if ($this->generator->valid()) { + $this->nextCoroutine($next); + } else { + $this->result->resolve($value); + } + } catch (Exception $exception) { + $this->result->reject($exception); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } + + /** + * @internal + */ + public function _handleFailure($reason) + { + unset($this->currentPromise); + try { + $nextYield = $this->generator->throw(exception_for($reason)); + // The throw was caught, so keep iterating on the coroutine + $this->nextCoroutine($nextYield); + } catch (Exception $exception) { + $this->result->reject($exception); + } catch (Throwable $throwable) { + $this->result->reject($throwable); + } + } +} diff --git a/vendor/guzzlehttp/promises/src/EachPromise.php b/vendor/guzzlehttp/promises/src/EachPromise.php new file mode 100755 index 0000000..d0ddf60 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/EachPromise.php @@ -0,0 +1,229 @@ +iterable = iter_for($iterable); + + if (isset($config['concurrency'])) { + $this->concurrency = $config['concurrency']; + } + + if (isset($config['fulfilled'])) { + $this->onFulfilled = $config['fulfilled']; + } + + if (isset($config['rejected'])) { + $this->onRejected = $config['rejected']; + } + } + + public function promise() + { + if ($this->aggregate) { + return $this->aggregate; + } + + try { + $this->createPromise(); + $this->iterable->rewind(); + $this->refillPending(); + } catch (\Throwable $e) { + $this->aggregate->reject($e); + } catch (\Exception $e) { + $this->aggregate->reject($e); + } + + return $this->aggregate; + } + + private function createPromise() + { + $this->mutex = false; + $this->aggregate = new Promise(function () { + reset($this->pending); + if (empty($this->pending) && !$this->iterable->valid()) { + $this->aggregate->resolve(null); + return; + } + + // Consume a potentially fluctuating list of promises while + // ensuring that indexes are maintained (precluding array_shift). + while ($promise = current($this->pending)) { + next($this->pending); + $promise->wait(); + if ($this->aggregate->getState() !== PromiseInterface::PENDING) { + return; + } + } + }); + + // Clear the references when the promise is resolved. + $clearFn = function () { + $this->iterable = $this->concurrency = $this->pending = null; + $this->onFulfilled = $this->onRejected = null; + }; + + $this->aggregate->then($clearFn, $clearFn); + } + + private function refillPending() + { + if (!$this->concurrency) { + // Add all pending promises. + while ($this->addPending() && $this->advanceIterator()); + return; + } + + // Add only up to N pending promises. + $concurrency = is_callable($this->concurrency) + ? call_user_func($this->concurrency, count($this->pending)) + : $this->concurrency; + $concurrency = max($concurrency - count($this->pending), 0); + // Concurrency may be set to 0 to disallow new promises. + if (!$concurrency) { + return; + } + // Add the first pending promise. + $this->addPending(); + // Note this is special handling for concurrency=1 so that we do + // not advance the iterator after adding the first promise. This + // helps work around issues with generators that might not have the + // next value to yield until promise callbacks are called. + while (--$concurrency + && $this->advanceIterator() + && $this->addPending()); + } + + private function addPending() + { + if (!$this->iterable || !$this->iterable->valid()) { + return false; + } + + $promise = promise_for($this->iterable->current()); + $idx = $this->iterable->key(); + + $this->pending[$idx] = $promise->then( + function ($value) use ($idx) { + if ($this->onFulfilled) { + call_user_func( + $this->onFulfilled, $value, $idx, $this->aggregate + ); + } + $this->step($idx); + }, + function ($reason) use ($idx) { + if ($this->onRejected) { + call_user_func( + $this->onRejected, $reason, $idx, $this->aggregate + ); + } + $this->step($idx); + } + ); + + return true; + } + + private function advanceIterator() + { + // Place a lock on the iterator so that we ensure to not recurse, + // preventing fatal generator errors. + if ($this->mutex) { + return false; + } + + $this->mutex = true; + + try { + $this->iterable->next(); + $this->mutex = false; + return true; + } catch (\Throwable $e) { + $this->aggregate->reject($e); + $this->mutex = false; + return false; + } catch (\Exception $e) { + $this->aggregate->reject($e); + $this->mutex = false; + return false; + } + } + + private function step($idx) + { + // If the promise was already resolved, then ignore this step. + if ($this->aggregate->getState() !== PromiseInterface::PENDING) { + return; + } + + unset($this->pending[$idx]); + + // Only refill pending promises if we are not locked, preventing the + // EachPromise to recursively invoke the provided iterator, which + // cause a fatal error: "Cannot resume an already running generator" + if ($this->advanceIterator() && !$this->checkIfFinished()) { + // Add more pending promises if possible. + $this->refillPending(); + } + } + + private function checkIfFinished() + { + if (!$this->pending && !$this->iterable->valid()) { + // Resolve the promise if there's nothing left to do. + $this->aggregate->resolve(null); + return true; + } + + return false; + } +} diff --git a/vendor/guzzlehttp/promises/src/FulfilledPromise.php b/vendor/guzzlehttp/promises/src/FulfilledPromise.php new file mode 100755 index 0000000..dbbeeb9 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/FulfilledPromise.php @@ -0,0 +1,82 @@ +value = $value; + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + // Return itself if there is no onFulfilled function. + if (!$onFulfilled) { + return $this; + } + + $queue = queue(); + $p = new Promise([$queue, 'run']); + $value = $this->value; + $queue->add(static function () use ($p, $value, $onFulfilled) { + if ($p->getState() === self::PENDING) { + try { + $p->resolve($onFulfilled($value)); + } catch (\Throwable $e) { + $p->reject($e); + } catch (\Exception $e) { + $p->reject($e); + } + } + }); + + return $p; + } + + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + + public function wait($unwrap = true, $defaultDelivery = null) + { + return $unwrap ? $this->value : null; + } + + public function getState() + { + return self::FULFILLED; + } + + public function resolve($value) + { + if ($value !== $this->value) { + throw new \LogicException("Cannot resolve a fulfilled promise"); + } + } + + public function reject($reason) + { + throw new \LogicException("Cannot reject a fulfilled promise"); + } + + public function cancel() + { + // pass + } +} diff --git a/vendor/guzzlehttp/promises/src/Promise.php b/vendor/guzzlehttp/promises/src/Promise.php new file mode 100755 index 0000000..844ada0 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/Promise.php @@ -0,0 +1,280 @@ +waitFn = $waitFn; + $this->cancelFn = $cancelFn; + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + if ($this->state === self::PENDING) { + $p = new Promise(null, [$this, 'cancel']); + $this->handlers[] = [$p, $onFulfilled, $onRejected]; + $p->waitList = $this->waitList; + $p->waitList[] = $this; + return $p; + } + + // Return a fulfilled promise and immediately invoke any callbacks. + if ($this->state === self::FULFILLED) { + return $onFulfilled + ? promise_for($this->result)->then($onFulfilled) + : promise_for($this->result); + } + + // It's either cancelled or rejected, so return a rejected promise + // and immediately invoke any callbacks. + $rejection = rejection_for($this->result); + return $onRejected ? $rejection->then(null, $onRejected) : $rejection; + } + + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + + public function wait($unwrap = true) + { + $this->waitIfPending(); + + $inner = $this->result instanceof PromiseInterface + ? $this->result->wait($unwrap) + : $this->result; + + if ($unwrap) { + if ($this->result instanceof PromiseInterface + || $this->state === self::FULFILLED + ) { + return $inner; + } else { + // It's rejected so "unwrap" and throw an exception. + throw exception_for($inner); + } + } + } + + public function getState() + { + return $this->state; + } + + public function cancel() + { + if ($this->state !== self::PENDING) { + return; + } + + $this->waitFn = $this->waitList = null; + + if ($this->cancelFn) { + $fn = $this->cancelFn; + $this->cancelFn = null; + try { + $fn(); + } catch (\Throwable $e) { + $this->reject($e); + } catch (\Exception $e) { + $this->reject($e); + } + } + + // Reject the promise only if it wasn't rejected in a then callback. + if ($this->state === self::PENDING) { + $this->reject(new CancellationException('Promise has been cancelled')); + } + } + + public function resolve($value) + { + $this->settle(self::FULFILLED, $value); + } + + public function reject($reason) + { + $this->settle(self::REJECTED, $reason); + } + + private function settle($state, $value) + { + if ($this->state !== self::PENDING) { + // Ignore calls with the same resolution. + if ($state === $this->state && $value === $this->result) { + return; + } + throw $this->state === $state + ? new \LogicException("The promise is already {$state}.") + : new \LogicException("Cannot change a {$this->state} promise to {$state}"); + } + + if ($value === $this) { + throw new \LogicException('Cannot fulfill or reject a promise with itself'); + } + + // Clear out the state of the promise but stash the handlers. + $this->state = $state; + $this->result = $value; + $handlers = $this->handlers; + $this->handlers = null; + $this->waitList = $this->waitFn = null; + $this->cancelFn = null; + + if (!$handlers) { + return; + } + + // If the value was not a settled promise or a thenable, then resolve + // it in the task queue using the correct ID. + if (!method_exists($value, 'then')) { + $id = $state === self::FULFILLED ? 1 : 2; + // It's a success, so resolve the handlers in the queue. + queue()->add(static function () use ($id, $value, $handlers) { + foreach ($handlers as $handler) { + self::callHandler($id, $value, $handler); + } + }); + } elseif ($value instanceof Promise + && $value->getState() === self::PENDING + ) { + // We can just merge our handlers onto the next promise. + $value->handlers = array_merge($value->handlers, $handlers); + } else { + // Resolve the handlers when the forwarded promise is resolved. + $value->then( + static function ($value) use ($handlers) { + foreach ($handlers as $handler) { + self::callHandler(1, $value, $handler); + } + }, + static function ($reason) use ($handlers) { + foreach ($handlers as $handler) { + self::callHandler(2, $reason, $handler); + } + } + ); + } + } + + /** + * Call a stack of handlers using a specific callback index and value. + * + * @param int $index 1 (resolve) or 2 (reject). + * @param mixed $value Value to pass to the callback. + * @param array $handler Array of handler data (promise and callbacks). + * + * @return array Returns the next group to resolve. + */ + private static function callHandler($index, $value, array $handler) + { + /** @var PromiseInterface $promise */ + $promise = $handler[0]; + + // The promise may have been cancelled or resolved before placing + // this thunk in the queue. + if ($promise->getState() !== self::PENDING) { + return; + } + + try { + if (isset($handler[$index])) { + $promise->resolve($handler[$index]($value)); + } elseif ($index === 1) { + // Forward resolution values as-is. + $promise->resolve($value); + } else { + // Forward rejections down the chain. + $promise->reject($value); + } + } catch (\Throwable $reason) { + $promise->reject($reason); + } catch (\Exception $reason) { + $promise->reject($reason); + } + } + + private function waitIfPending() + { + if ($this->state !== self::PENDING) { + return; + } elseif ($this->waitFn) { + $this->invokeWaitFn(); + } elseif ($this->waitList) { + $this->invokeWaitList(); + } else { + // If there's not wait function, then reject the promise. + $this->reject('Cannot wait on a promise that has ' + . 'no internal wait function. You must provide a wait ' + . 'function when constructing the promise to be able to ' + . 'wait on a promise.'); + } + + queue()->run(); + + if ($this->state === self::PENDING) { + $this->reject('Invoking the wait callback did not resolve the promise'); + } + } + + private function invokeWaitFn() + { + try { + $wfn = $this->waitFn; + $this->waitFn = null; + $wfn(true); + } catch (\Exception $reason) { + if ($this->state === self::PENDING) { + // The promise has not been resolved yet, so reject the promise + // with the exception. + $this->reject($reason); + } else { + // The promise was already resolved, so there's a problem in + // the application. + throw $reason; + } + } + } + + private function invokeWaitList() + { + $waitList = $this->waitList; + $this->waitList = null; + + foreach ($waitList as $result) { + while (true) { + $result->waitIfPending(); + + if ($result->result instanceof Promise) { + $result = $result->result; + } else { + if ($result->result instanceof PromiseInterface) { + $result->result->wait(false); + } + break; + } + } + } + } +} diff --git a/vendor/guzzlehttp/promises/src/PromiseInterface.php b/vendor/guzzlehttp/promises/src/PromiseInterface.php new file mode 100755 index 0000000..8f5f4b9 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/PromiseInterface.php @@ -0,0 +1,93 @@ +reason = $reason; + } + + public function then( + callable $onFulfilled = null, + callable $onRejected = null + ) { + // If there's no onRejected callback then just return self. + if (!$onRejected) { + return $this; + } + + $queue = queue(); + $reason = $this->reason; + $p = new Promise([$queue, 'run']); + $queue->add(static function () use ($p, $reason, $onRejected) { + if ($p->getState() === self::PENDING) { + try { + // Return a resolved promise if onRejected does not throw. + $p->resolve($onRejected($reason)); + } catch (\Throwable $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); + } catch (\Exception $e) { + // onRejected threw, so return a rejected promise. + $p->reject($e); + } + } + }); + + return $p; + } + + public function otherwise(callable $onRejected) + { + return $this->then(null, $onRejected); + } + + public function wait($unwrap = true, $defaultDelivery = null) + { + if ($unwrap) { + throw exception_for($this->reason); + } + } + + public function getState() + { + return self::REJECTED; + } + + public function resolve($value) + { + throw new \LogicException("Cannot resolve a rejected promise"); + } + + public function reject($reason) + { + if ($reason !== $this->reason) { + throw new \LogicException("Cannot reject a rejected promise"); + } + } + + public function cancel() + { + // pass + } +} diff --git a/vendor/guzzlehttp/promises/src/RejectionException.php b/vendor/guzzlehttp/promises/src/RejectionException.php new file mode 100755 index 0000000..07c1136 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/RejectionException.php @@ -0,0 +1,47 @@ +reason = $reason; + + $message = 'The promise was rejected'; + + if ($description) { + $message .= ' with reason: ' . $description; + } elseif (is_string($reason) + || (is_object($reason) && method_exists($reason, '__toString')) + ) { + $message .= ' with reason: ' . $this->reason; + } elseif ($reason instanceof \JsonSerializable) { + $message .= ' with reason: ' + . json_encode($this->reason, JSON_PRETTY_PRINT); + } + + parent::__construct($message); + } + + /** + * Returns the rejection reason. + * + * @return mixed + */ + public function getReason() + { + return $this->reason; + } +} diff --git a/vendor/guzzlehttp/promises/src/TaskQueue.php b/vendor/guzzlehttp/promises/src/TaskQueue.php new file mode 100755 index 0000000..6e8a2a0 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/TaskQueue.php @@ -0,0 +1,66 @@ +run(); + */ +class TaskQueue implements TaskQueueInterface +{ + private $enableShutdown = true; + private $queue = []; + + public function __construct($withShutdown = true) + { + if ($withShutdown) { + register_shutdown_function(function () { + if ($this->enableShutdown) { + // Only run the tasks if an E_ERROR didn't occur. + $err = error_get_last(); + if (!$err || ($err['type'] ^ E_ERROR)) { + $this->run(); + } + } + }); + } + } + + public function isEmpty() + { + return !$this->queue; + } + + public function add(callable $task) + { + $this->queue[] = $task; + } + + public function run() + { + /** @var callable $task */ + while ($task = array_shift($this->queue)) { + $task(); + } + } + + /** + * The task queue will be run and exhausted by default when the process + * exits IFF the exit is not the result of a PHP E_ERROR error. + * + * You can disable running the automatic shutdown of the queue by calling + * this function. If you disable the task queue shutdown process, then you + * MUST either run the task queue (as a result of running your event loop + * or manually using the run() method) or wait on each outstanding promise. + * + * Note: This shutdown will occur before any destructors are triggered. + */ + public function disableShutdown() + { + $this->enableShutdown = false; + } +} diff --git a/vendor/guzzlehttp/promises/src/TaskQueueInterface.php b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php new file mode 100755 index 0000000..ac8306e --- /dev/null +++ b/vendor/guzzlehttp/promises/src/TaskQueueInterface.php @@ -0,0 +1,25 @@ + + * while ($eventLoop->isRunning()) { + * GuzzleHttp\Promise\queue()->run(); + * } + * + * + * @param TaskQueueInterface $assign Optionally specify a new queue instance. + * + * @return TaskQueueInterface + */ +function queue(TaskQueueInterface $assign = null) +{ + static $queue; + + if ($assign) { + $queue = $assign; + } elseif (!$queue) { + $queue = new TaskQueue(); + } + + return $queue; +} + +/** + * Adds a function to run in the task queue when it is next `run()` and returns + * a promise that is fulfilled or rejected with the result. + * + * @param callable $task Task function to run. + * + * @return PromiseInterface + */ +function task(callable $task) +{ + $queue = queue(); + $promise = new Promise([$queue, 'run']); + $queue->add(function () use ($task, $promise) { + try { + $promise->resolve($task()); + } catch (\Throwable $e) { + $promise->reject($e); + } catch (\Exception $e) { + $promise->reject($e); + } + }); + + return $promise; +} + +/** + * Creates a promise for a value if the value is not a promise. + * + * @param mixed $value Promise or value. + * + * @return PromiseInterface + */ +function promise_for($value) +{ + if ($value instanceof PromiseInterface) { + return $value; + } + + // Return a Guzzle promise that shadows the given promise. + if (method_exists($value, 'then')) { + $wfn = method_exists($value, 'wait') ? [$value, 'wait'] : null; + $cfn = method_exists($value, 'cancel') ? [$value, 'cancel'] : null; + $promise = new Promise($wfn, $cfn); + $value->then([$promise, 'resolve'], [$promise, 'reject']); + return $promise; + } + + return new FulfilledPromise($value); +} + +/** + * Creates a rejected promise for a reason if the reason is not a promise. If + * the provided reason is a promise, then it is returned as-is. + * + * @param mixed $reason Promise or reason. + * + * @return PromiseInterface + */ +function rejection_for($reason) +{ + if ($reason instanceof PromiseInterface) { + return $reason; + } + + return new RejectedPromise($reason); +} + +/** + * Create an exception for a rejected promise value. + * + * @param mixed $reason + * + * @return \Exception|\Throwable + */ +function exception_for($reason) +{ + return $reason instanceof \Exception || $reason instanceof \Throwable + ? $reason + : new RejectionException($reason); +} + +/** + * Returns an iterator for the given value. + * + * @param mixed $value + * + * @return \Iterator + */ +function iter_for($value) +{ + if ($value instanceof \Iterator) { + return $value; + } elseif (is_array($value)) { + return new \ArrayIterator($value); + } else { + return new \ArrayIterator([$value]); + } +} + +/** + * Synchronously waits on a promise to resolve and returns an inspection state + * array. + * + * Returns a state associative array containing a "state" key mapping to a + * valid promise state. If the state of the promise is "fulfilled", the array + * will contain a "value" key mapping to the fulfilled value of the promise. If + * the promise is rejected, the array will contain a "reason" key mapping to + * the rejection reason of the promise. + * + * @param PromiseInterface $promise Promise or value. + * + * @return array + */ +function inspect(PromiseInterface $promise) +{ + try { + return [ + 'state' => PromiseInterface::FULFILLED, + 'value' => $promise->wait() + ]; + } catch (RejectionException $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e->getReason()]; + } catch (\Throwable $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; + } catch (\Exception $e) { + return ['state' => PromiseInterface::REJECTED, 'reason' => $e]; + } +} + +/** + * Waits on all of the provided promises, but does not unwrap rejected promises + * as thrown exception. + * + * Returns an array of inspection state arrays. + * + * @param PromiseInterface[] $promises Traversable of promises to wait upon. + * + * @return array + * @see GuzzleHttp\Promise\inspect for the inspection state array format. + */ +function inspect_all($promises) +{ + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = inspect($promise); + } + + return $results; +} + +/** + * Waits on all of the provided promises and returns the fulfilled values. + * + * Returns an array that contains the value of each promise (in the same order + * the promises were provided). An exception is thrown if any of the promises + * are rejected. + * + * @param mixed $promises Iterable of PromiseInterface objects to wait on. + * + * @return array + * @throws \Exception on error + * @throws \Throwable on error in PHP >=7 + */ +function unwrap($promises) +{ + $results = []; + foreach ($promises as $key => $promise) { + $results[$key] = $promise->wait(); + } + + return $results; +} + +/** + * Given an array of promises, return a promise that is fulfilled when all the + * items in the array are fulfilled. + * + * The promise's fulfillment value is an array with fulfillment values at + * respective positions to the original array. If any promise in the array + * rejects, the returned promise is rejected with the rejection reason. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function all($promises) +{ + $results = []; + return each( + $promises, + function ($value, $idx) use (&$results) { + $results[$idx] = $value; + }, + function ($reason, $idx, Promise $aggregate) { + $aggregate->reject($reason); + } + )->then(function () use (&$results) { + ksort($results); + return $results; + }); +} + +/** + * Initiate a competitive race between multiple promises or values (values will + * become immediately fulfilled promises). + * + * When count amount of promises have been fulfilled, the returned promise is + * fulfilled with an array that contains the fulfillment values of the winners + * in order of resolution. + * + * This prommise is rejected with a {@see GuzzleHttp\Promise\AggregateException} + * if the number of fulfilled promises is less than the desired $count. + * + * @param int $count Total number of promises. + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function some($count, $promises) +{ + $results = []; + $rejections = []; + + return each( + $promises, + function ($value, $idx, PromiseInterface $p) use (&$results, $count) { + if ($p->getState() !== PromiseInterface::PENDING) { + return; + } + $results[$idx] = $value; + if (count($results) >= $count) { + $p->resolve(null); + } + }, + function ($reason) use (&$rejections) { + $rejections[] = $reason; + } + )->then( + function () use (&$results, &$rejections, $count) { + if (count($results) !== $count) { + throw new AggregateException( + 'Not enough promises to fulfill count', + $rejections + ); + } + ksort($results); + return array_values($results); + } + ); +} + +/** + * Like some(), with 1 as count. However, if the promise fulfills, the + * fulfillment value is not an array of 1 but the value directly. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + */ +function any($promises) +{ + return some(1, $promises)->then(function ($values) { return $values[0]; }); +} + +/** + * Returns a promise that is fulfilled when all of the provided promises have + * been fulfilled or rejected. + * + * The returned promise is fulfilled with an array of inspection state arrays. + * + * @param mixed $promises Promises or values. + * + * @return PromiseInterface + * @see GuzzleHttp\Promise\inspect for the inspection state array format. + */ +function settle($promises) +{ + $results = []; + + return each( + $promises, + function ($value, $idx) use (&$results) { + $results[$idx] = ['state' => PromiseInterface::FULFILLED, 'value' => $value]; + }, + function ($reason, $idx) use (&$results) { + $results[$idx] = ['state' => PromiseInterface::REJECTED, 'reason' => $reason]; + } + )->then(function () use (&$results) { + ksort($results); + return $results; + }); +} + +/** + * Given an iterator that yields promises or values, returns a promise that is + * fulfilled with a null value when the iterator has been consumed or the + * aggregate promise has been fulfilled or rejected. + * + * $onFulfilled is a function that accepts the fulfilled value, iterator + * index, and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate promise if needed. + * + * $onRejected is a function that accepts the rejection reason, iterator + * index, and the aggregate promise. The callback can invoke any necessary side + * effects and choose to resolve or reject the aggregate promise if needed. + * + * @param mixed $iterable Iterator or array to iterate over. + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + */ +function each( + $iterable, + callable $onFulfilled = null, + callable $onRejected = null +) { + return (new EachPromise($iterable, [ + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected + ]))->promise(); +} + +/** + * Like each, but only allows a certain number of outstanding promises at any + * given time. + * + * $concurrency may be an integer or a function that accepts the number of + * pending promises and returns a numeric concurrency limit value to allow for + * dynamic a concurrency size. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * @param callable $onRejected + * + * @return PromiseInterface + */ +function each_limit( + $iterable, + $concurrency, + callable $onFulfilled = null, + callable $onRejected = null +) { + return (new EachPromise($iterable, [ + 'fulfilled' => $onFulfilled, + 'rejected' => $onRejected, + 'concurrency' => $concurrency + ]))->promise(); +} + +/** + * Like each_limit, but ensures that no promise in the given $iterable argument + * is rejected. If any promise is rejected, then the aggregate promise is + * rejected with the encountered rejection. + * + * @param mixed $iterable + * @param int|callable $concurrency + * @param callable $onFulfilled + * + * @return PromiseInterface + */ +function each_limit_all( + $iterable, + $concurrency, + callable $onFulfilled = null +) { + return each_limit( + $iterable, + $concurrency, + $onFulfilled, + function ($reason, $idx, PromiseInterface $aggregate) { + $aggregate->reject($reason); + } + ); +} + +/** + * Returns true if a promise is fulfilled. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_fulfilled(PromiseInterface $promise) +{ + return $promise->getState() === PromiseInterface::FULFILLED; +} + +/** + * Returns true if a promise is rejected. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_rejected(PromiseInterface $promise) +{ + return $promise->getState() === PromiseInterface::REJECTED; +} + +/** + * Returns true if a promise is fulfilled or rejected. + * + * @param PromiseInterface $promise + * + * @return bool + */ +function is_settled(PromiseInterface $promise) +{ + return $promise->getState() !== PromiseInterface::PENDING; +} + +/** + * @see Coroutine + * + * @param callable $generatorFn + * + * @return PromiseInterface + */ +function coroutine(callable $generatorFn) +{ + return new Coroutine($generatorFn); +} diff --git a/vendor/guzzlehttp/promises/src/functions_include.php b/vendor/guzzlehttp/promises/src/functions_include.php new file mode 100755 index 0000000..34cd171 --- /dev/null +++ b/vendor/guzzlehttp/promises/src/functions_include.php @@ -0,0 +1,6 @@ +withPath('foo')->withHost('example.com')` will throw an exception + because the path of a URI with an authority must start with a slash "/" or be empty + - `(new Uri())->withScheme('http')` will return `'http://localhost'` + +### Deprecated + +- `Uri::resolve` in favor of `UriResolver::resolve` +- `Uri::removeDotSegments` in favor of `UriResolver::removeDotSegments` + +### Fixed + +- `Stream::read` when length parameter <= 0. +- `copy_to_stream` reads bytes in chunks instead of `maxLen` into memory. +- `ServerRequest::getUriFromGlobals` when `Host` header contains port. +- Compatibility of URIs with `file` scheme and empty host. + + +## [1.3.1] - 2016-06-25 + +### Fixed + +- `Uri::__toString` for network path references, e.g. `//example.org`. +- Missing lowercase normalization for host. +- Handling of URI components in case they are `'0'` in a lot of places, + e.g. as a user info password. +- `Uri::withAddedHeader` to correctly merge headers with different case. +- Trimming of header values in `Uri::withAddedHeader`. Header values may + be surrounded by whitespace which should be ignored according to RFC 7230 + Section 3.2.4. This does not apply to header names. +- `Uri::withAddedHeader` with an array of header values. +- `Uri::resolve` when base path has no slash and handling of fragment. +- Handling of encoding in `Uri::with(out)QueryValue` so one can pass the + key/value both in encoded as well as decoded form to those methods. This is + consistent with withPath, withQuery etc. +- `ServerRequest::withoutAttribute` when attribute value is null. + + +## [1.3.0] - 2016-04-13 + +### Added + +- Remaining interfaces needed for full PSR7 compatibility + (ServerRequestInterface, UploadedFileInterface, etc.). +- Support for stream_for from scalars. + +### Changed + +- Can now extend Uri. + +### Fixed +- A bug in validating request methods by making it more permissive. + + +## [1.2.3] - 2016-02-18 + +### Fixed + +- Support in `GuzzleHttp\Psr7\CachingStream` for seeking forward on remote + streams, which can sometimes return fewer bytes than requested with `fread`. +- Handling of gzipped responses with FNAME headers. + + +## [1.2.2] - 2016-01-22 + +### Added + +- Support for URIs without any authority. +- Support for HTTP 451 'Unavailable For Legal Reasons.' +- Support for using '0' as a filename. +- Support for including non-standard ports in Host headers. + + +## [1.2.1] - 2015-11-02 + +### Changes + +- Now supporting negative offsets when seeking to SEEK_END. + + +## [1.2.0] - 2015-08-15 + +### Changed + +- Body as `"0"` is now properly added to a response. +- Now allowing forward seeking in CachingStream. +- Now properly parsing HTTP requests that contain proxy targets in + `parse_request`. +- functions.php is now conditionally required. +- user-info is no longer dropped when resolving URIs. + + +## [1.1.0] - 2015-06-24 + +### Changed + +- URIs can now be relative. +- `multipart/form-data` headers are now overridden case-insensitively. +- URI paths no longer encode the following characters because they are allowed + in URIs: "(", ")", "*", "!", "'" +- A port is no longer added to a URI when the scheme is missing and no port is + present. + + +## 1.0.0 - 2015-05-19 + +Initial release. + +Currently unsupported: + +- `Psr\Http\Message\ServerRequestInterface` +- `Psr\Http\Message\UploadedFileInterface` + + + +[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD +[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0 +[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2 +[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1 +[1.5.0]: https://github.com/guzzle/psr7/compare/1.4.2...1.5.0 +[1.4.2]: https://github.com/guzzle/psr7/compare/1.4.1...1.4.2 +[1.4.1]: https://github.com/guzzle/psr7/compare/1.4.0...1.4.1 +[1.4.0]: https://github.com/guzzle/psr7/compare/1.3.1...1.4.0 +[1.3.1]: https://github.com/guzzle/psr7/compare/1.3.0...1.3.1 +[1.3.0]: https://github.com/guzzle/psr7/compare/1.2.3...1.3.0 +[1.2.3]: https://github.com/guzzle/psr7/compare/1.2.2...1.2.3 +[1.2.2]: https://github.com/guzzle/psr7/compare/1.2.1...1.2.2 +[1.2.1]: https://github.com/guzzle/psr7/compare/1.2.0...1.2.1 +[1.2.0]: https://github.com/guzzle/psr7/compare/1.1.0...1.2.0 +[1.1.0]: https://github.com/guzzle/psr7/compare/1.0.0...1.1.0 diff --git a/vendor/guzzlehttp/psr7/LICENSE b/vendor/guzzlehttp/psr7/LICENSE new file mode 100755 index 0000000..581d95f --- /dev/null +++ b/vendor/guzzlehttp/psr7/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/guzzlehttp/psr7/README.md b/vendor/guzzlehttp/psr7/README.md new file mode 100755 index 0000000..c60a6a3 --- /dev/null +++ b/vendor/guzzlehttp/psr7/README.md @@ -0,0 +1,745 @@ +# PSR-7 Message Implementation + +This repository contains a full [PSR-7](http://www.php-fig.org/psr/psr-7/) +message implementation, several stream decorators, and some helpful +functionality like query string parsing. + + +[![Build Status](https://travis-ci.org/guzzle/psr7.svg?branch=master)](https://travis-ci.org/guzzle/psr7) + + +# Stream implementation + +This package comes with a number of stream implementations and stream +decorators. + + +## AppendStream + +`GuzzleHttp\Psr7\AppendStream` + +Reads from multiple streams, one after the other. + +```php +use GuzzleHttp\Psr7; + +$a = Psr7\stream_for('abc, '); +$b = Psr7\stream_for('123.'); +$composed = new Psr7\AppendStream([$a, $b]); + +$composed->addStream(Psr7\stream_for(' Above all listen to me')); + +echo $composed; // abc, 123. Above all listen to me. +``` + + +## BufferStream + +`GuzzleHttp\Psr7\BufferStream` + +Provides a buffer stream that can be written to fill a buffer, and read +from to remove bytes from the buffer. + +This stream returns a "hwm" metadata value that tells upstream consumers +what the configured high water mark of the stream is, or the maximum +preferred size of the buffer. + +```php +use GuzzleHttp\Psr7; + +// When more than 1024 bytes are in the buffer, it will begin returning +// false to writes. This is an indication that writers should slow down. +$buffer = new Psr7\BufferStream(1024); +``` + + +## CachingStream + +The CachingStream is used to allow seeking over previously read bytes on +non-seekable streams. This can be useful when transferring a non-seekable +entity body fails due to needing to rewind the stream (for example, resulting +from a redirect). Data that is read from the remote stream will be buffered in +a PHP temp stream so that previously read bytes are cached first in memory, +then on disk. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for(fopen('http://www.google.com', 'r')); +$stream = new Psr7\CachingStream($original); + +$stream->read(1024); +echo $stream->tell(); +// 1024 + +$stream->seek(0); +echo $stream->tell(); +// 0 +``` + + +## DroppingStream + +`GuzzleHttp\Psr7\DroppingStream` + +Stream decorator that begins dropping data once the size of the underlying +stream becomes too full. + +```php +use GuzzleHttp\Psr7; + +// Create an empty stream +$stream = Psr7\stream_for(); + +// Start dropping data when the stream has more than 10 bytes +$dropping = new Psr7\DroppingStream($stream, 10); + +$dropping->write('01234567890123456789'); +echo $stream; // 0123456789 +``` + + +## FnStream + +`GuzzleHttp\Psr7\FnStream` + +Compose stream implementations based on a hash of functions. + +Allows for easy testing and extension of a provided stream without needing +to create a concrete class for a simple extension point. + +```php + +use GuzzleHttp\Psr7; + +$stream = Psr7\stream_for('hi'); +$fnStream = Psr7\FnStream::decorate($stream, [ + 'rewind' => function () use ($stream) { + echo 'About to rewind - '; + $stream->rewind(); + echo 'rewound!'; + } +]); + +$fnStream->rewind(); +// Outputs: About to rewind - rewound! +``` + + +## InflateStream + +`GuzzleHttp\Psr7\InflateStream` + +Uses PHP's zlib.inflate filter to inflate deflate or gzipped content. + +This stream decorator skips the first 10 bytes of the given stream to remove +the gzip header, converts the provided stream to a PHP stream resource, +then appends the zlib.inflate filter. The stream is then converted back +to a Guzzle stream resource to be used as a Guzzle stream. + + +## LazyOpenStream + +`GuzzleHttp\Psr7\LazyOpenStream` + +Lazily reads or writes to a file that is opened only after an IO operation +take place on the stream. + +```php +use GuzzleHttp\Psr7; + +$stream = new Psr7\LazyOpenStream('/path/to/file', 'r'); +// The file has not yet been opened... + +echo $stream->read(10); +// The file is opened and read from only when needed. +``` + + +## LimitStream + +`GuzzleHttp\Psr7\LimitStream` + +LimitStream can be used to read a subset or slice of an existing stream object. +This can be useful for breaking a large file into smaller pieces to be sent in +chunks (e.g. Amazon S3's multipart upload API). + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for(fopen('/tmp/test.txt', 'r+')); +echo $original->getSize(); +// >>> 1048576 + +// Limit the size of the body to 1024 bytes and start reading from byte 2048 +$stream = new Psr7\LimitStream($original, 1024, 2048); +echo $stream->getSize(); +// >>> 1024 +echo $stream->tell(); +// >>> 0 +``` + + +## MultipartStream + +`GuzzleHttp\Psr7\MultipartStream` + +Stream that when read returns bytes for a streaming multipart or +multipart/form-data stream. + + +## NoSeekStream + +`GuzzleHttp\Psr7\NoSeekStream` + +NoSeekStream wraps a stream and does not allow seeking. + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for('foo'); +$noSeek = new Psr7\NoSeekStream($original); + +echo $noSeek->read(3); +// foo +var_export($noSeek->isSeekable()); +// false +$noSeek->seek(0); +var_export($noSeek->read(3)); +// NULL +``` + + +## PumpStream + +`GuzzleHttp\Psr7\PumpStream` + +Provides a read only stream that pumps data from a PHP callable. + +When invoking the provided callable, the PumpStream will pass the amount of +data requested to read to the callable. The callable can choose to ignore +this value and return fewer or more bytes than requested. Any extra data +returned by the provided callable is buffered internally until drained using +the read() function of the PumpStream. The provided callable MUST return +false when there is no more data to read. + + +## Implementing stream decorators + +Creating a stream decorator is very easy thanks to the +`GuzzleHttp\Psr7\StreamDecoratorTrait`. This trait provides methods that +implement `Psr\Http\Message\StreamInterface` by proxying to an underlying +stream. Just `use` the `StreamDecoratorTrait` and implement your custom +methods. + +For example, let's say we wanted to call a specific function each time the last +byte is read from a stream. This could be implemented by overriding the +`read()` method. + +```php +use Psr\Http\Message\StreamInterface; +use GuzzleHttp\Psr7\StreamDecoratorTrait; + +class EofCallbackStream implements StreamInterface +{ + use StreamDecoratorTrait; + + private $callback; + + public function __construct(StreamInterface $stream, callable $cb) + { + $this->stream = $stream; + $this->callback = $cb; + } + + public function read($length) + { + $result = $this->stream->read($length); + + // Invoke the callback when EOF is hit. + if ($this->eof()) { + call_user_func($this->callback); + } + + return $result; + } +} +``` + +This decorator could be added to any existing stream and used like so: + +```php +use GuzzleHttp\Psr7; + +$original = Psr7\stream_for('foo'); + +$eofStream = new EofCallbackStream($original, function () { + echo 'EOF!'; +}); + +$eofStream->read(2); +$eofStream->read(1); +// echoes "EOF!" +$eofStream->seek(0); +$eofStream->read(3); +// echoes "EOF!" +``` + + +## PHP StreamWrapper + +You can use the `GuzzleHttp\Psr7\StreamWrapper` class if you need to use a +PSR-7 stream as a PHP stream resource. + +Use the `GuzzleHttp\Psr7\StreamWrapper::getResource()` method to create a PHP +stream from a PSR-7 stream. + +```php +use GuzzleHttp\Psr7\StreamWrapper; + +$stream = GuzzleHttp\Psr7\stream_for('hello!'); +$resource = StreamWrapper::getResource($stream); +echo fread($resource, 6); // outputs hello! +``` + + +# Function API + +There are various functions available under the `GuzzleHttp\Psr7` namespace. + + +## `function str` + +`function str(MessageInterface $message)` + +Returns the string representation of an HTTP message. + +```php +$request = new GuzzleHttp\Psr7\Request('GET', 'http://example.com'); +echo GuzzleHttp\Psr7\str($request); +``` + + +## `function uri_for` + +`function uri_for($uri)` + +This function accepts a string or `Psr\Http\Message\UriInterface` and returns a +UriInterface for the given value. If the value is already a `UriInterface`, it +is returned as-is. + +```php +$uri = GuzzleHttp\Psr7\uri_for('http://example.com'); +assert($uri === GuzzleHttp\Psr7\uri_for($uri)); +``` + + +## `function stream_for` + +`function stream_for($resource = '', array $options = [])` + +Create a new stream based on the input type. + +Options is an associative array that can contain the following keys: + +* - metadata: Array of custom metadata. +* - size: Size of the stream. + +This method accepts the following `$resource` types: + +- `Psr\Http\Message\StreamInterface`: Returns the value as-is. +- `string`: Creates a stream object that uses the given string as the contents. +- `resource`: Creates a stream object that wraps the given PHP stream resource. +- `Iterator`: If the provided value implements `Iterator`, then a read-only + stream object will be created that wraps the given iterable. Each time the + stream is read from, data from the iterator will fill a buffer and will be + continuously called until the buffer is equal to the requested read size. + Subsequent read calls will first read from the buffer and then call `next` + on the underlying iterator until it is exhausted. +- `object` with `__toString()`: If the object has the `__toString()` method, + the object will be cast to a string and then a stream will be returned that + uses the string value. +- `NULL`: When `null` is passed, an empty stream object is returned. +- `callable` When a callable is passed, a read-only stream object will be + created that invokes the given callable. The callable is invoked with the + number of suggested bytes to read. The callable can return any number of + bytes, but MUST return `false` when there is no more data to return. The + stream object that wraps the callable will invoke the callable until the + number of requested bytes are available. Any additional bytes will be + buffered and used in subsequent reads. + +```php +$stream = GuzzleHttp\Psr7\stream_for('foo'); +$stream = GuzzleHttp\Psr7\stream_for(fopen('/path/to/file', 'r')); + +$generator = function ($bytes) { + for ($i = 0; $i < $bytes; $i++) { + yield ' '; + } +} + +$stream = GuzzleHttp\Psr7\stream_for($generator(100)); +``` + + +## `function parse_header` + +`function parse_header($header)` + +Parse an array of header values containing ";" separated data into an array of +associative arrays representing the header key value pair data of the header. +When a parameter does not contain a value, but just contains a key, this +function will inject a key with a '' string value. + + +## `function normalize_header` + +`function normalize_header($header)` + +Converts an array of header values that may contain comma separated headers +into an array of headers with no comma separated values. + + +## `function modify_request` + +`function modify_request(RequestInterface $request, array $changes)` + +Clone and modify a request with the given changes. This method is useful for +reducing the number of clones needed to mutate a message. + +The changes can be one of: + +- method: (string) Changes the HTTP method. +- set_headers: (array) Sets the given headers. +- remove_headers: (array) Remove the given headers. +- body: (mixed) Sets the given body. +- uri: (UriInterface) Set the URI. +- query: (string) Set the query string value of the URI. +- version: (string) Set the protocol version. + + +## `function rewind_body` + +`function rewind_body(MessageInterface $message)` + +Attempts to rewind a message body and throws an exception on failure. The body +of the message will only be rewound if a call to `tell()` returns a value other +than `0`. + + +## `function try_fopen` + +`function try_fopen($filename, $mode)` + +Safely opens a PHP stream resource using a filename. + +When fopen fails, PHP normally raises a warning. This function adds an error +handler that checks for errors and throws an exception instead. + + +## `function copy_to_string` + +`function copy_to_string(StreamInterface $stream, $maxLen = -1)` + +Copy the contents of a stream into a string until the given number of bytes +have been read. + + +## `function copy_to_stream` + +`function copy_to_stream(StreamInterface $source, StreamInterface $dest, $maxLen = -1)` + +Copy the contents of a stream into another stream until the given number of +bytes have been read. + + +## `function hash` + +`function hash(StreamInterface $stream, $algo, $rawOutput = false)` + +Calculate a hash of a Stream. This method reads the entire stream to calculate +a rolling hash (based on PHP's hash_init functions). + + +## `function readline` + +`function readline(StreamInterface $stream, $maxLength = null)` + +Read a line from the stream up to the maximum allowed buffer length. + + +## `function parse_request` + +`function parse_request($message)` + +Parses a request message string into a request object. + + +## `function parse_response` + +`function parse_response($message)` + +Parses a response message string into a response object. + + +## `function parse_query` + +`function parse_query($str, $urlEncoding = true)` + +Parse a query string into an associative array. + +If multiple values are found for the same key, the value of that key value pair +will become an array. This function does not parse nested PHP style arrays into +an associative array (e.g., `foo[a]=1&foo[b]=2` will be parsed into +`['foo[a]' => '1', 'foo[b]' => '2']`). + + +## `function build_query` + +`function build_query(array $params, $encoding = PHP_QUERY_RFC3986)` + +Build a query string from an array of key value pairs. + +This function can use the return value of parse_query() to build a query string. +This function does not modify the provided keys when an array is encountered +(like http_build_query would). + + +## `function mimetype_from_filename` + +`function mimetype_from_filename($filename)` + +Determines the mimetype of a file by looking at its extension. + + +## `function mimetype_from_extension` + +`function mimetype_from_extension($extension)` + +Maps a file extensions to a mimetype. + + +# Additional URI Methods + +Aside from the standard `Psr\Http\Message\UriInterface` implementation in form of the `GuzzleHttp\Psr7\Uri` class, +this library also provides additional functionality when working with URIs as static methods. + +## URI Types + +An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference. +An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI, +the base URI. Relative references can be divided into several forms according to +[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2): + +- network-path references, e.g. `//example.com/path` +- absolute-path references, e.g. `/path` +- relative-path references, e.g. `subpath` + +The following methods can be used to identify the type of the URI. + +### `GuzzleHttp\Psr7\Uri::isAbsolute` + +`public static function isAbsolute(UriInterface $uri): bool` + +Whether the URI is absolute, i.e. it has a scheme. + +### `GuzzleHttp\Psr7\Uri::isNetworkPathReference` + +`public static function isNetworkPathReference(UriInterface $uri): bool` + +Whether the URI is a network-path reference. A relative reference that begins with two slash characters is +termed an network-path reference. + +### `GuzzleHttp\Psr7\Uri::isAbsolutePathReference` + +`public static function isAbsolutePathReference(UriInterface $uri): bool` + +Whether the URI is a absolute-path reference. A relative reference that begins with a single slash character is +termed an absolute-path reference. + +### `GuzzleHttp\Psr7\Uri::isRelativePathReference` + +`public static function isRelativePathReference(UriInterface $uri): bool` + +Whether the URI is a relative-path reference. A relative reference that does not begin with a slash character is +termed a relative-path reference. + +### `GuzzleHttp\Psr7\Uri::isSameDocumentReference` + +`public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool` + +Whether the URI is a same-document reference. A same-document reference refers to a URI that is, aside from its +fragment component, identical to the base URI. When no base URI is given, only an empty URI reference +(apart from its fragment) is considered a same-document reference. + +## URI Components + +Additional methods to work with URI components. + +### `GuzzleHttp\Psr7\Uri::isDefaultPort` + +`public static function isDefaultPort(UriInterface $uri): bool` + +Whether the URI has the default port of the current scheme. `Psr\Http\Message\UriInterface::getPort` may return null +or the standard port. This method can be used independently of the implementation. + +### `GuzzleHttp\Psr7\Uri::composeComponents` + +`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string` + +Composes a URI reference string from its various components according to +[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called +manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`. + +### `GuzzleHttp\Psr7\Uri::fromParts` + +`public static function fromParts(array $parts): UriInterface` + +Creates a URI from a hash of [`parse_url`](http://php.net/manual/en/function.parse-url.php) components. + + +### `GuzzleHttp\Psr7\Uri::withQueryValue` + +`public static function withQueryValue(UriInterface $uri, $key, $value): UriInterface` + +Creates a new URI with a specific query string value. Any existing query string values that exactly match the +provided key are removed and replaced with the given key value pair. A value of null will set the query string +key without a value, e.g. "key" instead of "key=value". + +### `GuzzleHttp\Psr7\Uri::withQueryValues` + +`public static function withQueryValues(UriInterface $uri, array $keyValueArray): UriInterface` + +Creates a new URI with multiple query string values. It has the same behavior as `withQueryValue()` but for an +associative array of key => value. + +### `GuzzleHttp\Psr7\Uri::withoutQueryValue` + +`public static function withoutQueryValue(UriInterface $uri, $key): UriInterface` + +Creates a new URI with a specific query string value removed. Any existing query string values that exactly match the +provided key are removed. + +## Reference Resolution + +`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according +to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers +do when resolving a link in a website based on the current request URI. + +### `GuzzleHttp\Psr7\UriResolver::resolve` + +`public static function resolve(UriInterface $base, UriInterface $rel): UriInterface` + +Converts the relative URI into a new URI that is resolved against the base URI. + +### `GuzzleHttp\Psr7\UriResolver::removeDotSegments` + +`public static function removeDotSegments(string $path): string` + +Removes dot segments from a path and returns the new path according to +[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4). + +### `GuzzleHttp\Psr7\UriResolver::relativize` + +`public static function relativize(UriInterface $base, UriInterface $target): UriInterface` + +Returns the target URI as a relative reference from the base URI. This method is the counterpart to resolve(): + +```php +(string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) +``` + +One use-case is to use the current request URI as base URI and then generate relative links in your documents +to reduce the document size or offer self-contained downloadable document archives. + +```php +$base = new Uri('http://example.com/a/b/'); +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. +echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. +echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. +``` + +## Normalization and Comparison + +`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to +[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6). + +### `GuzzleHttp\Psr7\UriNormalizer::normalize` + +`public static function normalize(UriInterface $uri, $flags = self::PRESERVING_NORMALIZATIONS): UriInterface` + +Returns a normalized URI. The scheme and host component are already normalized to lowercase per PSR-7 UriInterface. +This methods adds additional normalizations that can be configured with the `$flags` parameter which is a bitmask +of normalizations to apply. The following normalizations are available: + +- `UriNormalizer::PRESERVING_NORMALIZATIONS` + + Default normalizations which only include the ones that preserve semantics. + +- `UriNormalizer::CAPITALIZE_PERCENT_ENCODING` + + All letters within a percent-encoding triplet (e.g., "%3A") are case-insensitive, and should be capitalized. + + Example: `http://example.org/a%c2%b1b` → `http://example.org/a%C2%B1b` + +- `UriNormalizer::DECODE_UNRESERVED_CHARACTERS` + + Decodes percent-encoded octets of unreserved characters. For consistency, percent-encoded octets in the ranges of + ALPHA (%41–%5A and %61–%7A), DIGIT (%30–%39), hyphen (%2D), period (%2E), underscore (%5F), or tilde (%7E) should + not be created by URI producers and, when found in a URI, should be decoded to their corresponding unreserved + characters by URI normalizers. + + Example: `http://example.org/%7Eusern%61me/` → `http://example.org/~username/` + +- `UriNormalizer::CONVERT_EMPTY_PATH` + + Converts the empty path to "/" for http and https URIs. + + Example: `http://example.org` → `http://example.org/` + +- `UriNormalizer::REMOVE_DEFAULT_HOST` + + Removes the default host of the given URI scheme from the URI. Only the "file" scheme defines the default host + "localhost". All of `file:/myfile`, `file:///myfile`, and `file://localhost/myfile` are equivalent according to + RFC 3986. + + Example: `file://localhost/myfile` → `file:///myfile` + +- `UriNormalizer::REMOVE_DEFAULT_PORT` + + Removes the default port of the given URI scheme from the URI. + + Example: `http://example.org:80/` → `http://example.org/` + +- `UriNormalizer::REMOVE_DOT_SEGMENTS` + + Removes unnecessary dot-segments. Dot-segments in relative-path references are not removed as it would + change the semantics of the URI reference. + + Example: `http://example.org/../a/b/../c/./d.html` → `http://example.org/a/c/d.html` + +- `UriNormalizer::REMOVE_DUPLICATE_SLASHES` + + Paths which include two or more adjacent slashes are converted to one. Webservers usually ignore duplicate slashes + and treat those URIs equivalent. But in theory those URIs do not need to be equivalent. So this normalization + may change the semantics. Encoded slashes (%2F) are not removed. + + Example: `http://example.org//foo///bar.html` → `http://example.org/foo/bar.html` + +- `UriNormalizer::SORT_QUERY_PARAMETERS` + + Sort query parameters with their values in alphabetical order. However, the order of parameters in a URI may be + significant (this is not defined by the standard). So this normalization is not safe and may change the semantics + of the URI. + + Example: `?lang=en&article=fred` → `?article=fred&lang=en` + +### `GuzzleHttp\Psr7\UriNormalizer::isEquivalent` + +`public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS): bool` + +Whether two URIs can be considered equivalent. Both URIs are normalized automatically before comparison with the given +`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. +This of course assumes they will be resolved against the same base URI. If this is not the case, determination of +equivalence or difference of relative references does not mean anything. diff --git a/vendor/guzzlehttp/psr7/composer.json b/vendor/guzzlehttp/psr7/composer.json new file mode 100755 index 0000000..168a055 --- /dev/null +++ b/vendor/guzzlehttp/psr7/composer.json @@ -0,0 +1,49 @@ +{ + "name": "guzzlehttp/psr7", + "type": "library", + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"], + "license": "MIT", + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8", + "ext-zlib": "*" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "suggest": { + "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses" + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": ["src/functions_include.php"] + }, + "autoload-dev": { + "psr-4": { + "GuzzleHttp\\Tests\\Psr7\\": "tests/" + } + }, + "extra": { + "branch-alias": { + "dev-master": "1.6-dev" + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/AppendStream.php b/vendor/guzzlehttp/psr7/src/AppendStream.php new file mode 100755 index 0000000..472a0d6 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/AppendStream.php @@ -0,0 +1,241 @@ +addStream($stream); + } + } + + public function __toString() + { + try { + $this->rewind(); + return $this->getContents(); + } catch (\Exception $e) { + return ''; + } + } + + /** + * Add a stream to the AppendStream + * + * @param StreamInterface $stream Stream to append. Must be readable. + * + * @throws \InvalidArgumentException if the stream is not readable + */ + public function addStream(StreamInterface $stream) + { + if (!$stream->isReadable()) { + throw new \InvalidArgumentException('Each stream must be readable'); + } + + // The stream is only seekable if all streams are seekable + if (!$stream->isSeekable()) { + $this->seekable = false; + } + + $this->streams[] = $stream; + } + + public function getContents() + { + return copy_to_string($this); + } + + /** + * Closes each attached stream. + * + * {@inheritdoc} + */ + public function close() + { + $this->pos = $this->current = 0; + $this->seekable = true; + + foreach ($this->streams as $stream) { + $stream->close(); + } + + $this->streams = []; + } + + /** + * Detaches each attached stream. + * + * Returns null as it's not clear which underlying stream resource to return. + * + * {@inheritdoc} + */ + public function detach() + { + $this->pos = $this->current = 0; + $this->seekable = true; + + foreach ($this->streams as $stream) { + $stream->detach(); + } + + $this->streams = []; + } + + public function tell() + { + return $this->pos; + } + + /** + * Tries to calculate the size by adding the size of each stream. + * + * If any of the streams do not return a valid number, then the size of the + * append stream cannot be determined and null is returned. + * + * {@inheritdoc} + */ + public function getSize() + { + $size = 0; + + foreach ($this->streams as $stream) { + $s = $stream->getSize(); + if ($s === null) { + return null; + } + $size += $s; + } + + return $size; + } + + public function eof() + { + return !$this->streams || + ($this->current >= count($this->streams) - 1 && + $this->streams[$this->current]->eof()); + } + + public function rewind() + { + $this->seek(0); + } + + /** + * Attempts to seek to the given position. Only supports SEEK_SET. + * + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + if (!$this->seekable) { + throw new \RuntimeException('This AppendStream is not seekable'); + } elseif ($whence !== SEEK_SET) { + throw new \RuntimeException('The AppendStream can only seek with SEEK_SET'); + } + + $this->pos = $this->current = 0; + + // Rewind each stream + foreach ($this->streams as $i => $stream) { + try { + $stream->rewind(); + } catch (\Exception $e) { + throw new \RuntimeException('Unable to seek stream ' + . $i . ' of the AppendStream', 0, $e); + } + } + + // Seek to the actual position by reading from each stream + while ($this->pos < $offset && !$this->eof()) { + $result = $this->read(min(8096, $offset - $this->pos)); + if ($result === '') { + break; + } + } + } + + /** + * Reads from all of the appended streams until the length is met or EOF. + * + * {@inheritdoc} + */ + public function read($length) + { + $buffer = ''; + $total = count($this->streams) - 1; + $remaining = $length; + $progressToNext = false; + + while ($remaining > 0) { + + // Progress to the next stream if needed. + if ($progressToNext || $this->streams[$this->current]->eof()) { + $progressToNext = false; + if ($this->current === $total) { + break; + } + $this->current++; + } + + $result = $this->streams[$this->current]->read($remaining); + + // Using a loose comparison here to match on '', false, and null + if ($result == null) { + $progressToNext = true; + continue; + } + + $buffer .= $result; + $remaining = $length - strlen($buffer); + } + + $this->pos += strlen($buffer); + + return $buffer; + } + + public function isReadable() + { + return true; + } + + public function isWritable() + { + return false; + } + + public function isSeekable() + { + return $this->seekable; + } + + public function write($string) + { + throw new \RuntimeException('Cannot write to an AppendStream'); + } + + public function getMetadata($key = null) + { + return $key ? null : []; + } +} diff --git a/vendor/guzzlehttp/psr7/src/BufferStream.php b/vendor/guzzlehttp/psr7/src/BufferStream.php new file mode 100755 index 0000000..af4d4c2 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/BufferStream.php @@ -0,0 +1,137 @@ +hwm = $hwm; + } + + public function __toString() + { + return $this->getContents(); + } + + public function getContents() + { + $buffer = $this->buffer; + $this->buffer = ''; + + return $buffer; + } + + public function close() + { + $this->buffer = ''; + } + + public function detach() + { + $this->close(); + } + + public function getSize() + { + return strlen($this->buffer); + } + + public function isReadable() + { + return true; + } + + public function isWritable() + { + return true; + } + + public function isSeekable() + { + return false; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a BufferStream'); + } + + public function eof() + { + return strlen($this->buffer) === 0; + } + + public function tell() + { + throw new \RuntimeException('Cannot determine the position of a BufferStream'); + } + + /** + * Reads data from the buffer. + */ + public function read($length) + { + $currentLength = strlen($this->buffer); + + if ($length >= $currentLength) { + // No need to slice the buffer because we don't have enough data. + $result = $this->buffer; + $this->buffer = ''; + } else { + // Slice up the result to provide a subset of the buffer. + $result = substr($this->buffer, 0, $length); + $this->buffer = substr($this->buffer, $length); + } + + return $result; + } + + /** + * Writes data to the buffer. + */ + public function write($string) + { + $this->buffer .= $string; + + // TODO: What should happen here? + if (strlen($this->buffer) >= $this->hwm) { + return false; + } + + return strlen($string); + } + + public function getMetadata($key = null) + { + if ($key == 'hwm') { + return $this->hwm; + } + + return $key ? null : []; + } +} diff --git a/vendor/guzzlehttp/psr7/src/CachingStream.php b/vendor/guzzlehttp/psr7/src/CachingStream.php new file mode 100755 index 0000000..ed68f08 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/CachingStream.php @@ -0,0 +1,138 @@ +remoteStream = $stream; + $this->stream = $target ?: new Stream(fopen('php://temp', 'r+')); + } + + public function getSize() + { + return max($this->stream->getSize(), $this->remoteStream->getSize()); + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + if ($whence == SEEK_SET) { + $byte = $offset; + } elseif ($whence == SEEK_CUR) { + $byte = $offset + $this->tell(); + } elseif ($whence == SEEK_END) { + $size = $this->remoteStream->getSize(); + if ($size === null) { + $size = $this->cacheEntireStream(); + } + $byte = $size + $offset; + } else { + throw new \InvalidArgumentException('Invalid whence'); + } + + $diff = $byte - $this->stream->getSize(); + + if ($diff > 0) { + // Read the remoteStream until we have read in at least the amount + // of bytes requested, or we reach the end of the file. + while ($diff > 0 && !$this->remoteStream->eof()) { + $this->read($diff); + $diff = $byte - $this->stream->getSize(); + } + } else { + // We can just do a normal seek since we've already seen this byte. + $this->stream->seek($byte); + } + } + + public function read($length) + { + // Perform a regular read on any previously read data from the buffer + $data = $this->stream->read($length); + $remaining = $length - strlen($data); + + // More data was requested so read from the remote stream + if ($remaining) { + // If data was written to the buffer in a position that would have + // been filled from the remote stream, then we must skip bytes on + // the remote stream to emulate overwriting bytes from that + // position. This mimics the behavior of other PHP stream wrappers. + $remoteData = $this->remoteStream->read( + $remaining + $this->skipReadBytes + ); + + if ($this->skipReadBytes) { + $len = strlen($remoteData); + $remoteData = substr($remoteData, $this->skipReadBytes); + $this->skipReadBytes = max(0, $this->skipReadBytes - $len); + } + + $data .= $remoteData; + $this->stream->write($remoteData); + } + + return $data; + } + + public function write($string) + { + // When appending to the end of the currently read stream, you'll want + // to skip bytes from being read from the remote stream to emulate + // other stream wrappers. Basically replacing bytes of data of a fixed + // length. + $overflow = (strlen($string) + $this->tell()) - $this->remoteStream->tell(); + if ($overflow > 0) { + $this->skipReadBytes += $overflow; + } + + return $this->stream->write($string); + } + + public function eof() + { + return $this->stream->eof() && $this->remoteStream->eof(); + } + + /** + * Close both the remote stream and buffer stream + */ + public function close() + { + $this->remoteStream->close() && $this->stream->close(); + } + + private function cacheEntireStream() + { + $target = new FnStream(['write' => 'strlen']); + copy_to_stream($this, $target); + + return $this->tell(); + } +} diff --git a/vendor/guzzlehttp/psr7/src/DroppingStream.php b/vendor/guzzlehttp/psr7/src/DroppingStream.php new file mode 100755 index 0000000..8935c80 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/DroppingStream.php @@ -0,0 +1,42 @@ +stream = $stream; + $this->maxLength = $maxLength; + } + + public function write($string) + { + $diff = $this->maxLength - $this->stream->getSize(); + + // Begin returning 0 when the underlying stream is too large. + if ($diff <= 0) { + return 0; + } + + // Write the stream or a subset of the stream if needed. + if (strlen($string) < $diff) { + return $this->stream->write($string); + } + + return $this->stream->write(substr($string, 0, $diff)); + } +} diff --git a/vendor/guzzlehttp/psr7/src/FnStream.php b/vendor/guzzlehttp/psr7/src/FnStream.php new file mode 100755 index 0000000..73daea6 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/FnStream.php @@ -0,0 +1,158 @@ +methods = $methods; + + // Create the functions on the class + foreach ($methods as $name => $fn) { + $this->{'_fn_' . $name} = $fn; + } + } + + /** + * Lazily determine which methods are not implemented. + * @throws \BadMethodCallException + */ + public function __get($name) + { + throw new \BadMethodCallException(str_replace('_fn_', '', $name) + . '() is not implemented in the FnStream'); + } + + /** + * The close method is called on the underlying stream only if possible. + */ + public function __destruct() + { + if (isset($this->_fn_close)) { + call_user_func($this->_fn_close); + } + } + + /** + * An unserialize would allow the __destruct to run when the unserialized value goes out of scope. + * @throws \LogicException + */ + public function __wakeup() + { + throw new \LogicException('FnStream should never be unserialized'); + } + + /** + * Adds custom functionality to an underlying stream by intercepting + * specific method calls. + * + * @param StreamInterface $stream Stream to decorate + * @param array $methods Hash of method name to a closure + * + * @return FnStream + */ + public static function decorate(StreamInterface $stream, array $methods) + { + // If any of the required methods were not provided, then simply + // proxy to the decorated stream. + foreach (array_diff(self::$slots, array_keys($methods)) as $diff) { + $methods[$diff] = [$stream, $diff]; + } + + return new self($methods); + } + + public function __toString() + { + return call_user_func($this->_fn___toString); + } + + public function close() + { + return call_user_func($this->_fn_close); + } + + public function detach() + { + return call_user_func($this->_fn_detach); + } + + public function getSize() + { + return call_user_func($this->_fn_getSize); + } + + public function tell() + { + return call_user_func($this->_fn_tell); + } + + public function eof() + { + return call_user_func($this->_fn_eof); + } + + public function isSeekable() + { + return call_user_func($this->_fn_isSeekable); + } + + public function rewind() + { + call_user_func($this->_fn_rewind); + } + + public function seek($offset, $whence = SEEK_SET) + { + call_user_func($this->_fn_seek, $offset, $whence); + } + + public function isWritable() + { + return call_user_func($this->_fn_isWritable); + } + + public function write($string) + { + return call_user_func($this->_fn_write, $string); + } + + public function isReadable() + { + return call_user_func($this->_fn_isReadable); + } + + public function read($length) + { + return call_user_func($this->_fn_read, $length); + } + + public function getContents() + { + return call_user_func($this->_fn_getContents); + } + + public function getMetadata($key = null) + { + return call_user_func($this->_fn_getMetadata, $key); + } +} diff --git a/vendor/guzzlehttp/psr7/src/InflateStream.php b/vendor/guzzlehttp/psr7/src/InflateStream.php new file mode 100755 index 0000000..5e4f602 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/InflateStream.php @@ -0,0 +1,52 @@ +read(10); + $filenameHeaderLength = $this->getLengthOfPossibleFilenameHeader($stream, $header); + // Skip the header, that is 10 + length of filename + 1 (nil) bytes + $stream = new LimitStream($stream, -1, 10 + $filenameHeaderLength); + $resource = StreamWrapper::getResource($stream); + stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ); + $this->stream = $stream->isSeekable() ? new Stream($resource) : new NoSeekStream(new Stream($resource)); + } + + /** + * @param StreamInterface $stream + * @param $header + * @return int + */ + private function getLengthOfPossibleFilenameHeader(StreamInterface $stream, $header) + { + $filename_header_length = 0; + + if (substr(bin2hex($header), 6, 2) === '08') { + // we have a filename, read until nil + $filename_header_length = 1; + while ($stream->read(1) !== chr(0)) { + $filename_header_length++; + } + } + + return $filename_header_length; + } +} diff --git a/vendor/guzzlehttp/psr7/src/LazyOpenStream.php b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php new file mode 100755 index 0000000..02cec3a --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/LazyOpenStream.php @@ -0,0 +1,39 @@ +filename = $filename; + $this->mode = $mode; + } + + /** + * Creates the underlying stream lazily when required. + * + * @return StreamInterface + */ + protected function createStream() + { + return stream_for(try_fopen($this->filename, $this->mode)); + } +} diff --git a/vendor/guzzlehttp/psr7/src/LimitStream.php b/vendor/guzzlehttp/psr7/src/LimitStream.php new file mode 100755 index 0000000..e4f239e --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/LimitStream.php @@ -0,0 +1,155 @@ +stream = $stream; + $this->setLimit($limit); + $this->setOffset($offset); + } + + public function eof() + { + // Always return true if the underlying stream is EOF + if ($this->stream->eof()) { + return true; + } + + // No limit and the underlying stream is not at EOF + if ($this->limit == -1) { + return false; + } + + return $this->stream->tell() >= $this->offset + $this->limit; + } + + /** + * Returns the size of the limited subset of data + * {@inheritdoc} + */ + public function getSize() + { + if (null === ($length = $this->stream->getSize())) { + return null; + } elseif ($this->limit == -1) { + return $length - $this->offset; + } else { + return min($this->limit, $length - $this->offset); + } + } + + /** + * Allow for a bounded seek on the read limited stream + * {@inheritdoc} + */ + public function seek($offset, $whence = SEEK_SET) + { + if ($whence !== SEEK_SET || $offset < 0) { + throw new \RuntimeException(sprintf( + 'Cannot seek to offset %s with whence %s', + $offset, + $whence + )); + } + + $offset += $this->offset; + + if ($this->limit !== -1) { + if ($offset > $this->offset + $this->limit) { + $offset = $this->offset + $this->limit; + } + } + + $this->stream->seek($offset); + } + + /** + * Give a relative tell() + * {@inheritdoc} + */ + public function tell() + { + return $this->stream->tell() - $this->offset; + } + + /** + * Set the offset to start limiting from + * + * @param int $offset Offset to seek to and begin byte limiting from + * + * @throws \RuntimeException if the stream cannot be seeked. + */ + public function setOffset($offset) + { + $current = $this->stream->tell(); + + if ($current !== $offset) { + // If the stream cannot seek to the offset position, then read to it + if ($this->stream->isSeekable()) { + $this->stream->seek($offset); + } elseif ($current > $offset) { + throw new \RuntimeException("Could not seek to stream offset $offset"); + } else { + $this->stream->read($offset - $current); + } + } + + $this->offset = $offset; + } + + /** + * Set the limit of bytes that the decorator allows to be read from the + * stream. + * + * @param int $limit Number of bytes to allow to be read from the stream. + * Use -1 for no limit. + */ + public function setLimit($limit) + { + $this->limit = $limit; + } + + public function read($length) + { + if ($this->limit == -1) { + return $this->stream->read($length); + } + + // Check if the current position is less than the total allowed + // bytes + original offset + $remaining = ($this->offset + $this->limit) - $this->stream->tell(); + if ($remaining > 0) { + // Only return the amount of requested data, ensuring that the byte + // limit is not exceeded + return $this->stream->read(min($remaining, $length)); + } + + return ''; + } +} diff --git a/vendor/guzzlehttp/psr7/src/MessageTrait.php b/vendor/guzzlehttp/psr7/src/MessageTrait.php new file mode 100755 index 0000000..a7966d1 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/MessageTrait.php @@ -0,0 +1,213 @@ + array of values */ + private $headers = []; + + /** @var array Map of lowercase header name => original name at registration */ + private $headerNames = []; + + /** @var string */ + private $protocol = '1.1'; + + /** @var StreamInterface */ + private $stream; + + public function getProtocolVersion() + { + return $this->protocol; + } + + public function withProtocolVersion($version) + { + if ($this->protocol === $version) { + return $this; + } + + $new = clone $this; + $new->protocol = $version; + return $new; + } + + public function getHeaders() + { + return $this->headers; + } + + public function hasHeader($header) + { + return isset($this->headerNames[strtolower($header)]); + } + + public function getHeader($header) + { + $header = strtolower($header); + + if (!isset($this->headerNames[$header])) { + return []; + } + + $header = $this->headerNames[$header]; + + return $this->headers[$header]; + } + + public function getHeaderLine($header) + { + return implode(', ', $this->getHeader($header)); + } + + public function withHeader($header, $value) + { + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + unset($new->headers[$new->headerNames[$normalized]]); + } + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + + return $new; + } + + public function withAddedHeader($header, $value) + { + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + + $new = clone $this; + if (isset($new->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $new->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $new->headerNames[$normalized] = $header; + $new->headers[$header] = $value; + } + + return $new; + } + + public function withoutHeader($header) + { + $normalized = strtolower($header); + + if (!isset($this->headerNames[$normalized])) { + return $this; + } + + $header = $this->headerNames[$normalized]; + + $new = clone $this; + unset($new->headers[$header], $new->headerNames[$normalized]); + + return $new; + } + + public function getBody() + { + if (!$this->stream) { + $this->stream = stream_for(''); + } + + return $this->stream; + } + + public function withBody(StreamInterface $body) + { + if ($body === $this->stream) { + return $this; + } + + $new = clone $this; + $new->stream = $body; + return $new; + } + + private function setHeaders(array $headers) + { + $this->headerNames = $this->headers = []; + foreach ($headers as $header => $value) { + if (is_int($header)) { + // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec + // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass. + $header = (string) $header; + } + $this->assertHeader($header); + $value = $this->normalizeHeaderValue($value); + $normalized = strtolower($header); + if (isset($this->headerNames[$normalized])) { + $header = $this->headerNames[$normalized]; + $this->headers[$header] = array_merge($this->headers[$header], $value); + } else { + $this->headerNames[$normalized] = $header; + $this->headers[$header] = $value; + } + } + } + + private function normalizeHeaderValue($value) + { + if (!is_array($value)) { + return $this->trimHeaderValues([$value]); + } + + if (count($value) === 0) { + throw new \InvalidArgumentException('Header value can not be an empty array.'); + } + + return $this->trimHeaderValues($value); + } + + /** + * Trims whitespace from the header values. + * + * Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field. + * + * header-field = field-name ":" OWS field-value OWS + * OWS = *( SP / HTAB ) + * + * @param string[] $values Header values + * + * @return string[] Trimmed header values + * + * @see https://tools.ietf.org/html/rfc7230#section-3.2.4 + */ + private function trimHeaderValues(array $values) + { + return array_map(function ($value) { + if (!is_scalar($value) && null !== $value) { + throw new \InvalidArgumentException(sprintf( + 'Header value must be scalar or null but %s provided.', + is_object($value) ? get_class($value) : gettype($value) + )); + } + + return trim((string) $value, " \t"); + }, $values); + } + + private function assertHeader($header) + { + if (!is_string($header)) { + throw new \InvalidArgumentException(sprintf( + 'Header name must be a string but %s provided.', + is_object($header) ? get_class($header) : gettype($header) + )); + } + + if ($header === '') { + throw new \InvalidArgumentException('Header name can not be empty.'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/MultipartStream.php b/vendor/guzzlehttp/psr7/src/MultipartStream.php new file mode 100755 index 0000000..c0fd584 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/MultipartStream.php @@ -0,0 +1,153 @@ +boundary = $boundary ?: sha1(uniqid('', true)); + $this->stream = $this->createStream($elements); + } + + /** + * Get the boundary + * + * @return string + */ + public function getBoundary() + { + return $this->boundary; + } + + public function isWritable() + { + return false; + } + + /** + * Get the headers needed before transferring the content of a POST file + */ + private function getHeaders(array $headers) + { + $str = ''; + foreach ($headers as $key => $value) { + $str .= "{$key}: {$value}\r\n"; + } + + return "--{$this->boundary}\r\n" . trim($str) . "\r\n\r\n"; + } + + /** + * Create the aggregate stream that will be used to upload the POST data + */ + protected function createStream(array $elements) + { + $stream = new AppendStream(); + + foreach ($elements as $element) { + $this->addElement($stream, $element); + } + + // Add the trailing boundary with CRLF + $stream->addStream(stream_for("--{$this->boundary}--\r\n")); + + return $stream; + } + + private function addElement(AppendStream $stream, array $element) + { + foreach (['contents', 'name'] as $key) { + if (!array_key_exists($key, $element)) { + throw new \InvalidArgumentException("A '{$key}' key is required"); + } + } + + $element['contents'] = stream_for($element['contents']); + + if (empty($element['filename'])) { + $uri = $element['contents']->getMetadata('uri'); + if (substr($uri, 0, 6) !== 'php://') { + $element['filename'] = $uri; + } + } + + list($body, $headers) = $this->createElement( + $element['name'], + $element['contents'], + isset($element['filename']) ? $element['filename'] : null, + isset($element['headers']) ? $element['headers'] : [] + ); + + $stream->addStream(stream_for($this->getHeaders($headers))); + $stream->addStream($body); + $stream->addStream(stream_for("\r\n")); + } + + /** + * @return array + */ + private function createElement($name, StreamInterface $stream, $filename, array $headers) + { + // Set a default content-disposition header if one was no provided + $disposition = $this->getHeader($headers, 'content-disposition'); + if (!$disposition) { + $headers['Content-Disposition'] = ($filename === '0' || $filename) + ? sprintf('form-data; name="%s"; filename="%s"', + $name, + basename($filename)) + : "form-data; name=\"{$name}\""; + } + + // Set a default content-length header if one was no provided + $length = $this->getHeader($headers, 'content-length'); + if (!$length) { + if ($length = $stream->getSize()) { + $headers['Content-Length'] = (string) $length; + } + } + + // Set a default Content-Type if one was not supplied + $type = $this->getHeader($headers, 'content-type'); + if (!$type && ($filename === '0' || $filename)) { + if ($type = mimetype_from_filename($filename)) { + $headers['Content-Type'] = $type; + } + } + + return [$stream, $headers]; + } + + private function getHeader(array $headers, $key) + { + $lowercaseHeader = strtolower($key); + foreach ($headers as $k => $v) { + if (strtolower($k) === $lowercaseHeader) { + return $v; + } + } + + return null; + } +} diff --git a/vendor/guzzlehttp/psr7/src/NoSeekStream.php b/vendor/guzzlehttp/psr7/src/NoSeekStream.php new file mode 100755 index 0000000..2332218 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/NoSeekStream.php @@ -0,0 +1,22 @@ +source = $source; + $this->size = isset($options['size']) ? $options['size'] : null; + $this->metadata = isset($options['metadata']) ? $options['metadata'] : []; + $this->buffer = new BufferStream(); + } + + public function __toString() + { + try { + return copy_to_string($this); + } catch (\Exception $e) { + return ''; + } + } + + public function close() + { + $this->detach(); + } + + public function detach() + { + $this->tellPos = false; + $this->source = null; + } + + public function getSize() + { + return $this->size; + } + + public function tell() + { + return $this->tellPos; + } + + public function eof() + { + return !$this->source; + } + + public function isSeekable() + { + return false; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + throw new \RuntimeException('Cannot seek a PumpStream'); + } + + public function isWritable() + { + return false; + } + + public function write($string) + { + throw new \RuntimeException('Cannot write to a PumpStream'); + } + + public function isReadable() + { + return true; + } + + public function read($length) + { + $data = $this->buffer->read($length); + $readLen = strlen($data); + $this->tellPos += $readLen; + $remaining = $length - $readLen; + + if ($remaining) { + $this->pump($remaining); + $data .= $this->buffer->read($remaining); + $this->tellPos += strlen($data) - $readLen; + } + + return $data; + } + + public function getContents() + { + $result = ''; + while (!$this->eof()) { + $result .= $this->read(1000000); + } + + return $result; + } + + public function getMetadata($key = null) + { + if (!$key) { + return $this->metadata; + } + + return isset($this->metadata[$key]) ? $this->metadata[$key] : null; + } + + private function pump($length) + { + if ($this->source) { + do { + $data = call_user_func($this->source, $length); + if ($data === false || $data === null) { + $this->source = null; + return; + } + $this->buffer->write($data); + $length -= strlen($data); + } while ($length > 0); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Request.php b/vendor/guzzlehttp/psr7/src/Request.php new file mode 100755 index 0000000..59f337d --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Request.php @@ -0,0 +1,151 @@ +assertMethod($method); + if (!($uri instanceof UriInterface)) { + $uri = new Uri($uri); + } + + $this->method = strtoupper($method); + $this->uri = $uri; + $this->setHeaders($headers); + $this->protocol = $version; + + if (!isset($this->headerNames['host'])) { + $this->updateHostFromUri(); + } + + if ($body !== '' && $body !== null) { + $this->stream = stream_for($body); + } + } + + public function getRequestTarget() + { + if ($this->requestTarget !== null) { + return $this->requestTarget; + } + + $target = $this->uri->getPath(); + if ($target == '') { + $target = '/'; + } + if ($this->uri->getQuery() != '') { + $target .= '?' . $this->uri->getQuery(); + } + + return $target; + } + + public function withRequestTarget($requestTarget) + { + if (preg_match('#\s#', $requestTarget)) { + throw new InvalidArgumentException( + 'Invalid request target provided; cannot contain whitespace' + ); + } + + $new = clone $this; + $new->requestTarget = $requestTarget; + return $new; + } + + public function getMethod() + { + return $this->method; + } + + public function withMethod($method) + { + $this->assertMethod($method); + $new = clone $this; + $new->method = strtoupper($method); + return $new; + } + + public function getUri() + { + return $this->uri; + } + + public function withUri(UriInterface $uri, $preserveHost = false) + { + if ($uri === $this->uri) { + return $this; + } + + $new = clone $this; + $new->uri = $uri; + + if (!$preserveHost || !isset($this->headerNames['host'])) { + $new->updateHostFromUri(); + } + + return $new; + } + + private function updateHostFromUri() + { + $host = $this->uri->getHost(); + + if ($host == '') { + return; + } + + if (($port = $this->uri->getPort()) !== null) { + $host .= ':' . $port; + } + + if (isset($this->headerNames['host'])) { + $header = $this->headerNames['host']; + } else { + $header = 'Host'; + $this->headerNames['host'] = 'Host'; + } + // Ensure Host is the first header. + // See: http://tools.ietf.org/html/rfc7230#section-5.4 + $this->headers = [$header => [$host]] + $this->headers; + } + + private function assertMethod($method) + { + if (!is_string($method) || $method === '') { + throw new \InvalidArgumentException('Method must be a non-empty string.'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Response.php b/vendor/guzzlehttp/psr7/src/Response.php new file mode 100755 index 0000000..e7e04d8 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Response.php @@ -0,0 +1,154 @@ + 'Continue', + 101 => 'Switching Protocols', + 102 => 'Processing', + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 207 => 'Multi-status', + 208 => 'Already Reported', + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 306 => 'Switch Proxy', + 307 => 'Temporary Redirect', + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Time-out', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Large', + 415 => 'Unsupported Media Type', + 416 => 'Requested range not satisfiable', + 417 => 'Expectation Failed', + 418 => 'I\'m a teapot', + 422 => 'Unprocessable Entity', + 423 => 'Locked', + 424 => 'Failed Dependency', + 425 => 'Unordered Collection', + 426 => 'Upgrade Required', + 428 => 'Precondition Required', + 429 => 'Too Many Requests', + 431 => 'Request Header Fields Too Large', + 451 => 'Unavailable For Legal Reasons', + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Time-out', + 505 => 'HTTP Version not supported', + 506 => 'Variant Also Negotiates', + 507 => 'Insufficient Storage', + 508 => 'Loop Detected', + 511 => 'Network Authentication Required', + ]; + + /** @var string */ + private $reasonPhrase = ''; + + /** @var int */ + private $statusCode = 200; + + /** + * @param int $status Status code + * @param array $headers Response headers + * @param string|null|resource|StreamInterface $body Response body + * @param string $version Protocol version + * @param string|null $reason Reason phrase (when empty a default will be used based on the status code) + */ + public function __construct( + $status = 200, + array $headers = [], + $body = null, + $version = '1.1', + $reason = null + ) { + $this->assertStatusCodeIsInteger($status); + $status = (int) $status; + $this->assertStatusCodeRange($status); + + $this->statusCode = $status; + + if ($body !== '' && $body !== null) { + $this->stream = stream_for($body); + } + + $this->setHeaders($headers); + if ($reason == '' && isset(self::$phrases[$this->statusCode])) { + $this->reasonPhrase = self::$phrases[$this->statusCode]; + } else { + $this->reasonPhrase = (string) $reason; + } + + $this->protocol = $version; + } + + public function getStatusCode() + { + return $this->statusCode; + } + + public function getReasonPhrase() + { + return $this->reasonPhrase; + } + + public function withStatus($code, $reasonPhrase = '') + { + $this->assertStatusCodeIsInteger($code); + $code = (int) $code; + $this->assertStatusCodeRange($code); + + $new = clone $this; + $new->statusCode = $code; + if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) { + $reasonPhrase = self::$phrases[$new->statusCode]; + } + $new->reasonPhrase = $reasonPhrase; + return $new; + } + + private function assertStatusCodeIsInteger($statusCode) + { + if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) { + throw new \InvalidArgumentException('Status code must be an integer value.'); + } + } + + private function assertStatusCodeRange($statusCode) + { + if ($statusCode < 100 || $statusCode >= 600) { + throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/Rfc7230.php b/vendor/guzzlehttp/psr7/src/Rfc7230.php new file mode 100755 index 0000000..505e474 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Rfc7230.php @@ -0,0 +1,18 @@ +@,;:\\\"/[\]?={}\x01-\x20\x7F]++):[ \t]*+((?:[ \t]*+[\x21-\x7E\x80-\xFF]++)*+)[ \t]*+\r?\n)m"; + const HEADER_FOLD_REGEX = "(\r?\n[ \t]++)"; +} diff --git a/vendor/guzzlehttp/psr7/src/ServerRequest.php b/vendor/guzzlehttp/psr7/src/ServerRequest.php new file mode 100755 index 0000000..1a09a6c --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/ServerRequest.php @@ -0,0 +1,376 @@ +serverParams = $serverParams; + + parent::__construct($method, $uri, $headers, $body, $version); + } + + /** + * Return an UploadedFile instance array. + * + * @param array $files A array which respect $_FILES structure + * @throws InvalidArgumentException for unrecognized values + * @return array + */ + public static function normalizeFiles(array $files) + { + $normalized = []; + + foreach ($files as $key => $value) { + if ($value instanceof UploadedFileInterface) { + $normalized[$key] = $value; + } elseif (is_array($value) && isset($value['tmp_name'])) { + $normalized[$key] = self::createUploadedFileFromSpec($value); + } elseif (is_array($value)) { + $normalized[$key] = self::normalizeFiles($value); + continue; + } else { + throw new InvalidArgumentException('Invalid value in files specification'); + } + } + + return $normalized; + } + + /** + * Create and return an UploadedFile instance from a $_FILES specification. + * + * If the specification represents an array of values, this method will + * delegate to normalizeNestedFileSpec() and return that return value. + * + * @param array $value $_FILES struct + * @return array|UploadedFileInterface + */ + private static function createUploadedFileFromSpec(array $value) + { + if (is_array($value['tmp_name'])) { + return self::normalizeNestedFileSpec($value); + } + + return new UploadedFile( + $value['tmp_name'], + (int) $value['size'], + (int) $value['error'], + $value['name'], + $value['type'] + ); + } + + /** + * Normalize an array of file specifications. + * + * Loops through all nested files and returns a normalized array of + * UploadedFileInterface instances. + * + * @param array $files + * @return UploadedFileInterface[] + */ + private static function normalizeNestedFileSpec(array $files = []) + { + $normalizedFiles = []; + + foreach (array_keys($files['tmp_name']) as $key) { + $spec = [ + 'tmp_name' => $files['tmp_name'][$key], + 'size' => $files['size'][$key], + 'error' => $files['error'][$key], + 'name' => $files['name'][$key], + 'type' => $files['type'][$key], + ]; + $normalizedFiles[$key] = self::createUploadedFileFromSpec($spec); + } + + return $normalizedFiles; + } + + /** + * Return a ServerRequest populated with superglobals: + * $_GET + * $_POST + * $_COOKIE + * $_FILES + * $_SERVER + * + * @return ServerRequestInterface + */ + public static function fromGlobals() + { + $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET'; + $headers = getallheaders(); + $uri = self::getUriFromGlobals(); + $body = new CachingStream(new LazyOpenStream('php://input', 'r+')); + $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1'; + + $serverRequest = new ServerRequest($method, $uri, $headers, $body, $protocol, $_SERVER); + + return $serverRequest + ->withCookieParams($_COOKIE) + ->withQueryParams($_GET) + ->withParsedBody($_POST) + ->withUploadedFiles(self::normalizeFiles($_FILES)); + } + + private static function extractHostAndPortFromAuthority($authority) + { + $uri = 'http://'.$authority; + $parts = parse_url($uri); + if (false === $parts) { + return [null, null]; + } + + $host = isset($parts['host']) ? $parts['host'] : null; + $port = isset($parts['port']) ? $parts['port'] : null; + + return [$host, $port]; + } + + /** + * Get a Uri populated with values from $_SERVER. + * + * @return UriInterface + */ + public static function getUriFromGlobals() + { + $uri = new Uri(''); + + $uri = $uri->withScheme(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https' : 'http'); + + $hasPort = false; + if (isset($_SERVER['HTTP_HOST'])) { + list($host, $port) = self::extractHostAndPortFromAuthority($_SERVER['HTTP_HOST']); + if ($host !== null) { + $uri = $uri->withHost($host); + } + + if ($port !== null) { + $hasPort = true; + $uri = $uri->withPort($port); + } + } elseif (isset($_SERVER['SERVER_NAME'])) { + $uri = $uri->withHost($_SERVER['SERVER_NAME']); + } elseif (isset($_SERVER['SERVER_ADDR'])) { + $uri = $uri->withHost($_SERVER['SERVER_ADDR']); + } + + if (!$hasPort && isset($_SERVER['SERVER_PORT'])) { + $uri = $uri->withPort($_SERVER['SERVER_PORT']); + } + + $hasQuery = false; + if (isset($_SERVER['REQUEST_URI'])) { + $requestUriParts = explode('?', $_SERVER['REQUEST_URI'], 2); + $uri = $uri->withPath($requestUriParts[0]); + if (isset($requestUriParts[1])) { + $hasQuery = true; + $uri = $uri->withQuery($requestUriParts[1]); + } + } + + if (!$hasQuery && isset($_SERVER['QUERY_STRING'])) { + $uri = $uri->withQuery($_SERVER['QUERY_STRING']); + } + + return $uri; + } + + + /** + * {@inheritdoc} + */ + public function getServerParams() + { + return $this->serverParams; + } + + /** + * {@inheritdoc} + */ + public function getUploadedFiles() + { + return $this->uploadedFiles; + } + + /** + * {@inheritdoc} + */ + public function withUploadedFiles(array $uploadedFiles) + { + $new = clone $this; + $new->uploadedFiles = $uploadedFiles; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getCookieParams() + { + return $this->cookieParams; + } + + /** + * {@inheritdoc} + */ + public function withCookieParams(array $cookies) + { + $new = clone $this; + $new->cookieParams = $cookies; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getQueryParams() + { + return $this->queryParams; + } + + /** + * {@inheritdoc} + */ + public function withQueryParams(array $query) + { + $new = clone $this; + $new->queryParams = $query; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getParsedBody() + { + return $this->parsedBody; + } + + /** + * {@inheritdoc} + */ + public function withParsedBody($data) + { + $new = clone $this; + $new->parsedBody = $data; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * {@inheritdoc} + */ + public function getAttribute($attribute, $default = null) + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $default; + } + + return $this->attributes[$attribute]; + } + + /** + * {@inheritdoc} + */ + public function withAttribute($attribute, $value) + { + $new = clone $this; + $new->attributes[$attribute] = $value; + + return $new; + } + + /** + * {@inheritdoc} + */ + public function withoutAttribute($attribute) + { + if (false === array_key_exists($attribute, $this->attributes)) { + return $this; + } + + $new = clone $this; + unset($new->attributes[$attribute]); + + return $new; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Stream.php b/vendor/guzzlehttp/psr7/src/Stream.php new file mode 100755 index 0000000..d9e7409 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Stream.php @@ -0,0 +1,267 @@ +size = $options['size']; + } + + $this->customMetadata = isset($options['metadata']) + ? $options['metadata'] + : []; + + $this->stream = $stream; + $meta = stream_get_meta_data($this->stream); + $this->seekable = $meta['seekable']; + $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']); + $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']); + $this->uri = $this->getMetadata('uri'); + } + + /** + * Closes the stream when the destructed + */ + public function __destruct() + { + $this->close(); + } + + public function __toString() + { + try { + $this->seek(0); + return (string) stream_get_contents($this->stream); + } catch (\Exception $e) { + return ''; + } + } + + public function getContents() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + $contents = stream_get_contents($this->stream); + + if ($contents === false) { + throw new \RuntimeException('Unable to read stream contents'); + } + + return $contents; + } + + public function close() + { + if (isset($this->stream)) { + if (is_resource($this->stream)) { + fclose($this->stream); + } + $this->detach(); + } + } + + public function detach() + { + if (!isset($this->stream)) { + return null; + } + + $result = $this->stream; + unset($this->stream); + $this->size = $this->uri = null; + $this->readable = $this->writable = $this->seekable = false; + + return $result; + } + + public function getSize() + { + if ($this->size !== null) { + return $this->size; + } + + if (!isset($this->stream)) { + return null; + } + + // Clear the stat cache if the stream has a URI + if ($this->uri) { + clearstatcache(true, $this->uri); + } + + $stats = fstat($this->stream); + if (isset($stats['size'])) { + $this->size = $stats['size']; + return $this->size; + } + + return null; + } + + public function isReadable() + { + return $this->readable; + } + + public function isWritable() + { + return $this->writable; + } + + public function isSeekable() + { + return $this->seekable; + } + + public function eof() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + return feof($this->stream); + } + + public function tell() + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + + $result = ftell($this->stream); + + if ($result === false) { + throw new \RuntimeException('Unable to determine stream position'); + } + + return $result; + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + $whence = (int) $whence; + + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->seekable) { + throw new \RuntimeException('Stream is not seekable'); + } + if (fseek($this->stream, $offset, $whence) === -1) { + throw new \RuntimeException('Unable to seek to stream position ' + . $offset . ' with whence ' . var_export($whence, true)); + } + } + + public function read($length) + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->readable) { + throw new \RuntimeException('Cannot read from non-readable stream'); + } + if ($length < 0) { + throw new \RuntimeException('Length parameter cannot be negative'); + } + + if (0 === $length) { + return ''; + } + + $string = fread($this->stream, $length); + if (false === $string) { + throw new \RuntimeException('Unable to read from stream'); + } + + return $string; + } + + public function write($string) + { + if (!isset($this->stream)) { + throw new \RuntimeException('Stream is detached'); + } + if (!$this->writable) { + throw new \RuntimeException('Cannot write to a non-writable stream'); + } + + // We can't know the size after writing anything + $this->size = null; + $result = fwrite($this->stream, $string); + + if ($result === false) { + throw new \RuntimeException('Unable to write to stream'); + } + + return $result; + } + + public function getMetadata($key = null) + { + if (!isset($this->stream)) { + return $key ? null : []; + } elseif (!$key) { + return $this->customMetadata + stream_get_meta_data($this->stream); + } elseif (isset($this->customMetadata[$key])) { + return $this->customMetadata[$key]; + } + + $meta = stream_get_meta_data($this->stream); + + return isset($meta[$key]) ? $meta[$key] : null; + } +} diff --git a/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php new file mode 100755 index 0000000..daec6f5 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/StreamDecoratorTrait.php @@ -0,0 +1,149 @@ +stream = $stream; + } + + /** + * Magic method used to create a new stream if streams are not added in + * the constructor of a decorator (e.g., LazyOpenStream). + * + * @param string $name Name of the property (allows "stream" only). + * + * @return StreamInterface + */ + public function __get($name) + { + if ($name == 'stream') { + $this->stream = $this->createStream(); + return $this->stream; + } + + throw new \UnexpectedValueException("$name not found on class"); + } + + public function __toString() + { + try { + if ($this->isSeekable()) { + $this->seek(0); + } + return $this->getContents(); + } catch (\Exception $e) { + // Really, PHP? https://bugs.php.net/bug.php?id=53648 + trigger_error('StreamDecorator::__toString exception: ' + . (string) $e, E_USER_ERROR); + return ''; + } + } + + public function getContents() + { + return copy_to_string($this); + } + + /** + * Allow decorators to implement custom methods + * + * @param string $method Missing method name + * @param array $args Method arguments + * + * @return mixed + */ + public function __call($method, array $args) + { + $result = call_user_func_array([$this->stream, $method], $args); + + // Always return the wrapped object if the result is a return $this + return $result === $this->stream ? $this : $result; + } + + public function close() + { + $this->stream->close(); + } + + public function getMetadata($key = null) + { + return $this->stream->getMetadata($key); + } + + public function detach() + { + return $this->stream->detach(); + } + + public function getSize() + { + return $this->stream->getSize(); + } + + public function eof() + { + return $this->stream->eof(); + } + + public function tell() + { + return $this->stream->tell(); + } + + public function isReadable() + { + return $this->stream->isReadable(); + } + + public function isWritable() + { + return $this->stream->isWritable(); + } + + public function isSeekable() + { + return $this->stream->isSeekable(); + } + + public function rewind() + { + $this->seek(0); + } + + public function seek($offset, $whence = SEEK_SET) + { + $this->stream->seek($offset, $whence); + } + + public function read($length) + { + return $this->stream->read($length); + } + + public function write($string) + { + return $this->stream->write($string); + } + + /** + * Implement in subclasses to dynamically create streams when requested. + * + * @return StreamInterface + * @throws \BadMethodCallException + */ + protected function createStream() + { + throw new \BadMethodCallException('Not implemented'); + } +} diff --git a/vendor/guzzlehttp/psr7/src/StreamWrapper.php b/vendor/guzzlehttp/psr7/src/StreamWrapper.php new file mode 100755 index 0000000..0f3a285 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/StreamWrapper.php @@ -0,0 +1,161 @@ +isReadable()) { + $mode = $stream->isWritable() ? 'r+' : 'r'; + } elseif ($stream->isWritable()) { + $mode = 'w'; + } else { + throw new \InvalidArgumentException('The stream must be readable, ' + . 'writable, or both.'); + } + + return fopen('guzzle://stream', $mode, null, self::createStreamContext($stream)); + } + + /** + * Creates a stream context that can be used to open a stream as a php stream resource. + * + * @param StreamInterface $stream + * + * @return resource + */ + public static function createStreamContext(StreamInterface $stream) + { + return stream_context_create([ + 'guzzle' => ['stream' => $stream] + ]); + } + + /** + * Registers the stream wrapper if needed + */ + public static function register() + { + if (!in_array('guzzle', stream_get_wrappers())) { + stream_wrapper_register('guzzle', __CLASS__); + } + } + + public function stream_open($path, $mode, $options, &$opened_path) + { + $options = stream_context_get_options($this->context); + + if (!isset($options['guzzle']['stream'])) { + return false; + } + + $this->mode = $mode; + $this->stream = $options['guzzle']['stream']; + + return true; + } + + public function stream_read($count) + { + return $this->stream->read($count); + } + + public function stream_write($data) + { + return (int) $this->stream->write($data); + } + + public function stream_tell() + { + return $this->stream->tell(); + } + + public function stream_eof() + { + return $this->stream->eof(); + } + + public function stream_seek($offset, $whence) + { + $this->stream->seek($offset, $whence); + + return true; + } + + public function stream_cast($cast_as) + { + $stream = clone($this->stream); + + return $stream->detach(); + } + + public function stream_stat() + { + static $modeMap = [ + 'r' => 33060, + 'rb' => 33060, + 'r+' => 33206, + 'w' => 33188, + 'wb' => 33188 + ]; + + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => $modeMap[$this->mode], + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => $this->stream->getSize() ?: 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ]; + } + + public function url_stat($path, $flags) + { + return [ + 'dev' => 0, + 'ino' => 0, + 'mode' => 0, + 'nlink' => 0, + 'uid' => 0, + 'gid' => 0, + 'rdev' => 0, + 'size' => 0, + 'atime' => 0, + 'mtime' => 0, + 'ctime' => 0, + 'blksize' => 0, + 'blocks' => 0 + ]; + } +} diff --git a/vendor/guzzlehttp/psr7/src/UploadedFile.php b/vendor/guzzlehttp/psr7/src/UploadedFile.php new file mode 100755 index 0000000..e62bd5c --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UploadedFile.php @@ -0,0 +1,316 @@ +setError($errorStatus); + $this->setSize($size); + $this->setClientFilename($clientFilename); + $this->setClientMediaType($clientMediaType); + + if ($this->isOk()) { + $this->setStreamOrFile($streamOrFile); + } + } + + /** + * Depending on the value set file or stream variable + * + * @param mixed $streamOrFile + * @throws InvalidArgumentException + */ + private function setStreamOrFile($streamOrFile) + { + if (is_string($streamOrFile)) { + $this->file = $streamOrFile; + } elseif (is_resource($streamOrFile)) { + $this->stream = new Stream($streamOrFile); + } elseif ($streamOrFile instanceof StreamInterface) { + $this->stream = $streamOrFile; + } else { + throw new InvalidArgumentException( + 'Invalid stream or file provided for UploadedFile' + ); + } + } + + /** + * @param int $error + * @throws InvalidArgumentException + */ + private function setError($error) + { + if (false === is_int($error)) { + throw new InvalidArgumentException( + 'Upload file error status must be an integer' + ); + } + + if (false === in_array($error, UploadedFile::$errors)) { + throw new InvalidArgumentException( + 'Invalid error status for UploadedFile' + ); + } + + $this->error = $error; + } + + /** + * @param int $size + * @throws InvalidArgumentException + */ + private function setSize($size) + { + if (false === is_int($size)) { + throw new InvalidArgumentException( + 'Upload file size must be an integer' + ); + } + + $this->size = $size; + } + + /** + * @param mixed $param + * @return boolean + */ + private function isStringOrNull($param) + { + return in_array(gettype($param), ['string', 'NULL']); + } + + /** + * @param mixed $param + * @return boolean + */ + private function isStringNotEmpty($param) + { + return is_string($param) && false === empty($param); + } + + /** + * @param string|null $clientFilename + * @throws InvalidArgumentException + */ + private function setClientFilename($clientFilename) + { + if (false === $this->isStringOrNull($clientFilename)) { + throw new InvalidArgumentException( + 'Upload file client filename must be a string or null' + ); + } + + $this->clientFilename = $clientFilename; + } + + /** + * @param string|null $clientMediaType + * @throws InvalidArgumentException + */ + private function setClientMediaType($clientMediaType) + { + if (false === $this->isStringOrNull($clientMediaType)) { + throw new InvalidArgumentException( + 'Upload file client media type must be a string or null' + ); + } + + $this->clientMediaType = $clientMediaType; + } + + /** + * Return true if there is no upload error + * + * @return boolean + */ + private function isOk() + { + return $this->error === UPLOAD_ERR_OK; + } + + /** + * @return boolean + */ + public function isMoved() + { + return $this->moved; + } + + /** + * @throws RuntimeException if is moved or not ok + */ + private function validateActive() + { + if (false === $this->isOk()) { + throw new RuntimeException('Cannot retrieve stream due to upload error'); + } + + if ($this->isMoved()) { + throw new RuntimeException('Cannot retrieve stream after it has already been moved'); + } + } + + /** + * {@inheritdoc} + * @throws RuntimeException if the upload was not successful. + */ + public function getStream() + { + $this->validateActive(); + + if ($this->stream instanceof StreamInterface) { + return $this->stream; + } + + return new LazyOpenStream($this->file, 'r+'); + } + + /** + * {@inheritdoc} + * + * @see http://php.net/is_uploaded_file + * @see http://php.net/move_uploaded_file + * @param string $targetPath Path to which to move the uploaded file. + * @throws RuntimeException if the upload was not successful. + * @throws InvalidArgumentException if the $path specified is invalid. + * @throws RuntimeException on any error during the move operation, or on + * the second or subsequent call to the method. + */ + public function moveTo($targetPath) + { + $this->validateActive(); + + if (false === $this->isStringNotEmpty($targetPath)) { + throw new InvalidArgumentException( + 'Invalid path provided for move operation; must be a non-empty string' + ); + } + + if ($this->file) { + $this->moved = php_sapi_name() == 'cli' + ? rename($this->file, $targetPath) + : move_uploaded_file($this->file, $targetPath); + } else { + copy_to_stream( + $this->getStream(), + new LazyOpenStream($targetPath, 'w') + ); + + $this->moved = true; + } + + if (false === $this->moved) { + throw new RuntimeException( + sprintf('Uploaded file could not be moved to %s', $targetPath) + ); + } + } + + /** + * {@inheritdoc} + * + * @return int|null The file size in bytes or null if unknown. + */ + public function getSize() + { + return $this->size; + } + + /** + * {@inheritdoc} + * + * @see http://php.net/manual/en/features.file-upload.errors.php + * @return int One of PHP's UPLOAD_ERR_XXX constants. + */ + public function getError() + { + return $this->error; + } + + /** + * {@inheritdoc} + * + * @return string|null The filename sent by the client or null if none + * was provided. + */ + public function getClientFilename() + { + return $this->clientFilename; + } + + /** + * {@inheritdoc} + */ + public function getClientMediaType() + { + return $this->clientMediaType; + } +} diff --git a/vendor/guzzlehttp/psr7/src/Uri.php b/vendor/guzzlehttp/psr7/src/Uri.php new file mode 100755 index 0000000..825a25e --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/Uri.php @@ -0,0 +1,760 @@ + 80, + 'https' => 443, + 'ftp' => 21, + 'gopher' => 70, + 'nntp' => 119, + 'news' => 119, + 'telnet' => 23, + 'tn3270' => 23, + 'imap' => 143, + 'pop' => 110, + 'ldap' => 389, + ]; + + private static $charUnreserved = 'a-zA-Z0-9_\-\.~'; + private static $charSubDelims = '!\$&\'\(\)\*\+,;='; + private static $replaceQuery = ['=' => '%3D', '&' => '%26']; + + /** @var string Uri scheme. */ + private $scheme = ''; + + /** @var string Uri user info. */ + private $userInfo = ''; + + /** @var string Uri host. */ + private $host = ''; + + /** @var int|null Uri port. */ + private $port; + + /** @var string Uri path. */ + private $path = ''; + + /** @var string Uri query string. */ + private $query = ''; + + /** @var string Uri fragment. */ + private $fragment = ''; + + /** + * @param string $uri URI to parse + */ + public function __construct($uri = '') + { + // weak type check to also accept null until we can add scalar type hints + if ($uri != '') { + $parts = parse_url($uri); + if ($parts === false) { + throw new \InvalidArgumentException("Unable to parse URI: $uri"); + } + $this->applyParts($parts); + } + } + + public function __toString() + { + return self::composeComponents( + $this->scheme, + $this->getAuthority(), + $this->path, + $this->query, + $this->fragment + ); + } + + /** + * Composes a URI reference string from its various components. + * + * Usually this method does not need to be called manually but instead is used indirectly via + * `Psr\Http\Message\UriInterface::__toString`. + * + * PSR-7 UriInterface treats an empty component the same as a missing component as + * getQuery(), getFragment() etc. always return a string. This explains the slight + * difference to RFC 3986 Section 5.3. + * + * Another adjustment is that the authority separator is added even when the authority is missing/empty + * for the "file" scheme. This is because PHP stream functions like `file_get_contents` only work with + * `file:///myfile` but not with `file:/myfile` although they are equivalent according to RFC 3986. But + * `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to + * that format). + * + * @param string $scheme + * @param string $authority + * @param string $path + * @param string $query + * @param string $fragment + * + * @return string + * + * @link https://tools.ietf.org/html/rfc3986#section-5.3 + */ + public static function composeComponents($scheme, $authority, $path, $query, $fragment) + { + $uri = ''; + + // weak type checks to also accept null until we can add scalar type hints + if ($scheme != '') { + $uri .= $scheme . ':'; + } + + if ($authority != ''|| $scheme === 'file') { + $uri .= '//' . $authority; + } + + $uri .= $path; + + if ($query != '') { + $uri .= '?' . $query; + } + + if ($fragment != '') { + $uri .= '#' . $fragment; + } + + return $uri; + } + + /** + * Whether the URI has the default port of the current scheme. + * + * `Psr\Http\Message\UriInterface::getPort` may return null or the standard port. This method can be used + * independently of the implementation. + * + * @param UriInterface $uri + * + * @return bool + */ + public static function isDefaultPort(UriInterface $uri) + { + return $uri->getPort() === null + || (isset(self::$defaultPorts[$uri->getScheme()]) && $uri->getPort() === self::$defaultPorts[$uri->getScheme()]); + } + + /** + * Whether the URI is absolute, i.e. it has a scheme. + * + * An instance of UriInterface can either be an absolute URI or a relative reference. This method returns true + * if it is the former. An absolute URI has a scheme. A relative reference is used to express a URI relative + * to another URI, the base URI. Relative references can be divided into several forms: + * - network-path references, e.g. '//example.com/path' + * - absolute-path references, e.g. '/path' + * - relative-path references, e.g. 'subpath' + * + * @param UriInterface $uri + * + * @return bool + * @see Uri::isNetworkPathReference + * @see Uri::isAbsolutePathReference + * @see Uri::isRelativePathReference + * @link https://tools.ietf.org/html/rfc3986#section-4 + */ + public static function isAbsolute(UriInterface $uri) + { + return $uri->getScheme() !== ''; + } + + /** + * Whether the URI is a network-path reference. + * + * A relative reference that begins with two slash characters is termed an network-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isNetworkPathReference(UriInterface $uri) + { + return $uri->getScheme() === '' && $uri->getAuthority() !== ''; + } + + /** + * Whether the URI is a absolute-path reference. + * + * A relative reference that begins with a single slash character is termed an absolute-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isAbsolutePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && isset($uri->getPath()[0]) + && $uri->getPath()[0] === '/'; + } + + /** + * Whether the URI is a relative-path reference. + * + * A relative reference that does not begin with a slash character is termed a relative-path reference. + * + * @param UriInterface $uri + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.2 + */ + public static function isRelativePathReference(UriInterface $uri) + { + return $uri->getScheme() === '' + && $uri->getAuthority() === '' + && (!isset($uri->getPath()[0]) || $uri->getPath()[0] !== '/'); + } + + /** + * Whether the URI is a same-document reference. + * + * A same-document reference refers to a URI that is, aside from its fragment + * component, identical to the base URI. When no base URI is given, only an empty + * URI reference (apart from its fragment) is considered a same-document reference. + * + * @param UriInterface $uri The URI to check + * @param UriInterface|null $base An optional base URI to compare against + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-4.4 + */ + public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null) + { + if ($base !== null) { + $uri = UriResolver::resolve($base, $uri); + + return ($uri->getScheme() === $base->getScheme()) + && ($uri->getAuthority() === $base->getAuthority()) + && ($uri->getPath() === $base->getPath()) + && ($uri->getQuery() === $base->getQuery()); + } + + return $uri->getScheme() === '' && $uri->getAuthority() === '' && $uri->getPath() === '' && $uri->getQuery() === ''; + } + + /** + * Removes dot segments from a path and returns the new path. + * + * @param string $path + * + * @return string + * + * @deprecated since version 1.4. Use UriResolver::removeDotSegments instead. + * @see UriResolver::removeDotSegments + */ + public static function removeDotSegments($path) + { + return UriResolver::removeDotSegments($path); + } + + /** + * Converts the relative URI into a new URI that is resolved against the base URI. + * + * @param UriInterface $base Base URI + * @param string|UriInterface $rel Relative URI + * + * @return UriInterface + * + * @deprecated since version 1.4. Use UriResolver::resolve instead. + * @see UriResolver::resolve + */ + public static function resolve(UriInterface $base, $rel) + { + if (!($rel instanceof UriInterface)) { + $rel = new self($rel); + } + + return UriResolver::resolve($base, $rel); + } + + /** + * Creates a new URI with a specific query string value removed. + * + * Any existing query string values that exactly match the provided key are + * removed. + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Query string key to remove. + * + * @return UriInterface + */ + public static function withoutQueryValue(UriInterface $uri, $key) + { + $result = self::getFilteredQueryString($uri, [$key]); + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a new URI with a specific query string value. + * + * Any existing query string values that exactly match the provided key are + * removed and replaced with the given key value pair. + * + * A value of null will set the query string key without a value, e.g. "key" + * instead of "key=value". + * + * @param UriInterface $uri URI to use as a base. + * @param string $key Key to set. + * @param string|null $value Value to set + * + * @return UriInterface + */ + public static function withQueryValue(UriInterface $uri, $key, $value) + { + $result = self::getFilteredQueryString($uri, [$key]); + + $result[] = self::generateQueryString($key, $value); + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a new URI with multiple specific query string values. + * + * It has the same behavior as withQueryValue() but for an associative array of key => value. + * + * @param UriInterface $uri URI to use as a base. + * @param array $keyValueArray Associative array of key and values + * + * @return UriInterface + */ + public static function withQueryValues(UriInterface $uri, array $keyValueArray) + { + $result = self::getFilteredQueryString($uri, array_keys($keyValueArray)); + + foreach ($keyValueArray as $key => $value) { + $result[] = self::generateQueryString($key, $value); + } + + return $uri->withQuery(implode('&', $result)); + } + + /** + * Creates a URI from a hash of `parse_url` components. + * + * @param array $parts + * + * @return UriInterface + * @link http://php.net/manual/en/function.parse-url.php + * + * @throws \InvalidArgumentException If the components do not form a valid URI. + */ + public static function fromParts(array $parts) + { + $uri = new self(); + $uri->applyParts($parts); + $uri->validateState(); + + return $uri; + } + + public function getScheme() + { + return $this->scheme; + } + + public function getAuthority() + { + $authority = $this->host; + if ($this->userInfo !== '') { + $authority = $this->userInfo . '@' . $authority; + } + + if ($this->port !== null) { + $authority .= ':' . $this->port; + } + + return $authority; + } + + public function getUserInfo() + { + return $this->userInfo; + } + + public function getHost() + { + return $this->host; + } + + public function getPort() + { + return $this->port; + } + + public function getPath() + { + return $this->path; + } + + public function getQuery() + { + return $this->query; + } + + public function getFragment() + { + return $this->fragment; + } + + public function withScheme($scheme) + { + $scheme = $this->filterScheme($scheme); + + if ($this->scheme === $scheme) { + return $this; + } + + $new = clone $this; + $new->scheme = $scheme; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withUserInfo($user, $password = null) + { + $info = $this->filterUserInfoComponent($user); + if ($password !== null) { + $info .= ':' . $this->filterUserInfoComponent($password); + } + + if ($this->userInfo === $info) { + return $this; + } + + $new = clone $this; + $new->userInfo = $info; + $new->validateState(); + + return $new; + } + + public function withHost($host) + { + $host = $this->filterHost($host); + + if ($this->host === $host) { + return $this; + } + + $new = clone $this; + $new->host = $host; + $new->validateState(); + + return $new; + } + + public function withPort($port) + { + $port = $this->filterPort($port); + + if ($this->port === $port) { + return $this; + } + + $new = clone $this; + $new->port = $port; + $new->removeDefaultPort(); + $new->validateState(); + + return $new; + } + + public function withPath($path) + { + $path = $this->filterPath($path); + + if ($this->path === $path) { + return $this; + } + + $new = clone $this; + $new->path = $path; + $new->validateState(); + + return $new; + } + + public function withQuery($query) + { + $query = $this->filterQueryAndFragment($query); + + if ($this->query === $query) { + return $this; + } + + $new = clone $this; + $new->query = $query; + + return $new; + } + + public function withFragment($fragment) + { + $fragment = $this->filterQueryAndFragment($fragment); + + if ($this->fragment === $fragment) { + return $this; + } + + $new = clone $this; + $new->fragment = $fragment; + + return $new; + } + + /** + * Apply parse_url parts to a URI. + * + * @param array $parts Array of parse_url parts to apply. + */ + private function applyParts(array $parts) + { + $this->scheme = isset($parts['scheme']) + ? $this->filterScheme($parts['scheme']) + : ''; + $this->userInfo = isset($parts['user']) + ? $this->filterUserInfoComponent($parts['user']) + : ''; + $this->host = isset($parts['host']) + ? $this->filterHost($parts['host']) + : ''; + $this->port = isset($parts['port']) + ? $this->filterPort($parts['port']) + : null; + $this->path = isset($parts['path']) + ? $this->filterPath($parts['path']) + : ''; + $this->query = isset($parts['query']) + ? $this->filterQueryAndFragment($parts['query']) + : ''; + $this->fragment = isset($parts['fragment']) + ? $this->filterQueryAndFragment($parts['fragment']) + : ''; + if (isset($parts['pass'])) { + $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']); + } + + $this->removeDefaultPort(); + } + + /** + * @param string $scheme + * + * @return string + * + * @throws \InvalidArgumentException If the scheme is invalid. + */ + private function filterScheme($scheme) + { + if (!is_string($scheme)) { + throw new \InvalidArgumentException('Scheme must be a string'); + } + + return strtolower($scheme); + } + + /** + * @param string $component + * + * @return string + * + * @throws \InvalidArgumentException If the user info is invalid. + */ + private function filterUserInfoComponent($component) + { + if (!is_string($component)) { + throw new \InvalidArgumentException('User info must be a string'); + } + + return preg_replace_callback( + '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $component + ); + } + + /** + * @param string $host + * + * @return string + * + * @throws \InvalidArgumentException If the host is invalid. + */ + private function filterHost($host) + { + if (!is_string($host)) { + throw new \InvalidArgumentException('Host must be a string'); + } + + return strtolower($host); + } + + /** + * @param int|null $port + * + * @return int|null + * + * @throws \InvalidArgumentException If the port is invalid. + */ + private function filterPort($port) + { + if ($port === null) { + return null; + } + + $port = (int) $port; + if (0 > $port || 0xffff < $port) { + throw new \InvalidArgumentException( + sprintf('Invalid port: %d. Must be between 0 and 65535', $port) + ); + } + + return $port; + } + + /** + * @param UriInterface $uri + * @param array $keys + * + * @return array + */ + private static function getFilteredQueryString(UriInterface $uri, array $keys) + { + $current = $uri->getQuery(); + + if ($current === '') { + return []; + } + + $decodedKeys = array_map('rawurldecode', $keys); + + return array_filter(explode('&', $current), function ($part) use ($decodedKeys) { + return !in_array(rawurldecode(explode('=', $part)[0]), $decodedKeys, true); + }); + } + + /** + * @param string $key + * @param string|null $value + * + * @return string + */ + private static function generateQueryString($key, $value) + { + // Query string separators ("=", "&") within the key or value need to be encoded + // (while preventing double-encoding) before setting the query string. All other + // chars that need percent-encoding will be encoded by withQuery(). + $queryString = strtr($key, self::$replaceQuery); + + if ($value !== null) { + $queryString .= '=' . strtr($value, self::$replaceQuery); + } + + return $queryString; + } + + private function removeDefaultPort() + { + if ($this->port !== null && self::isDefaultPort($this)) { + $this->port = null; + } + } + + /** + * Filters the path of a URI + * + * @param string $path + * + * @return string + * + * @throws \InvalidArgumentException If the path is invalid. + */ + private function filterPath($path) + { + if (!is_string($path)) { + throw new \InvalidArgumentException('Path must be a string'); + } + + return preg_replace_callback( + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $path + ); + } + + /** + * Filters the query string or fragment of a URI. + * + * @param string $str + * + * @return string + * + * @throws \InvalidArgumentException If the query or fragment is invalid. + */ + private function filterQueryAndFragment($str) + { + if (!is_string($str)) { + throw new \InvalidArgumentException('Query and fragment must be a string'); + } + + return preg_replace_callback( + '/(?:[^' . self::$charUnreserved . self::$charSubDelims . '%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/', + [$this, 'rawurlencodeMatchZero'], + $str + ); + } + + private function rawurlencodeMatchZero(array $match) + { + return rawurlencode($match[0]); + } + + private function validateState() + { + if ($this->host === '' && ($this->scheme === 'http' || $this->scheme === 'https')) { + $this->host = self::HTTP_DEFAULT_HOST; + } + + if ($this->getAuthority() === '') { + if (0 === strpos($this->path, '//')) { + throw new \InvalidArgumentException('The path of a URI without an authority must not start with two slashes "//"'); + } + if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) { + throw new \InvalidArgumentException('A relative URI must not have a path beginning with a segment containing a colon'); + } + } elseif (isset($this->path[0]) && $this->path[0] !== '/') { + @trigger_error( + 'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI ' . + 'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.', + E_USER_DEPRECATED + ); + $this->path = '/'. $this->path; + //throw new \InvalidArgumentException('The path of a URI with an authority must start with a slash "/" or be empty'); + } + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriNormalizer.php b/vendor/guzzlehttp/psr7/src/UriNormalizer.php new file mode 100755 index 0000000..384c29e --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriNormalizer.php @@ -0,0 +1,216 @@ +getPath() === '' && + ($uri->getScheme() === 'http' || $uri->getScheme() === 'https') + ) { + $uri = $uri->withPath('/'); + } + + if ($flags & self::REMOVE_DEFAULT_HOST && $uri->getScheme() === 'file' && $uri->getHost() === 'localhost') { + $uri = $uri->withHost(''); + } + + if ($flags & self::REMOVE_DEFAULT_PORT && $uri->getPort() !== null && Uri::isDefaultPort($uri)) { + $uri = $uri->withPort(null); + } + + if ($flags & self::REMOVE_DOT_SEGMENTS && !Uri::isRelativePathReference($uri)) { + $uri = $uri->withPath(UriResolver::removeDotSegments($uri->getPath())); + } + + if ($flags & self::REMOVE_DUPLICATE_SLASHES) { + $uri = $uri->withPath(preg_replace('#//++#', '/', $uri->getPath())); + } + + if ($flags & self::SORT_QUERY_PARAMETERS && $uri->getQuery() !== '') { + $queryKeyValues = explode('&', $uri->getQuery()); + sort($queryKeyValues); + $uri = $uri->withQuery(implode('&', $queryKeyValues)); + } + + return $uri; + } + + /** + * Whether two URIs can be considered equivalent. + * + * Both URIs are normalized automatically before comparison with the given $normalizations bitmask. The method also + * accepts relative URI references and returns true when they are equivalent. This of course assumes they will be + * resolved against the same base URI. If this is not the case, determination of equivalence or difference of + * relative references does not mean anything. + * + * @param UriInterface $uri1 An URI to compare + * @param UriInterface $uri2 An URI to compare + * @param int $normalizations A bitmask of normalizations to apply, see constants + * + * @return bool + * @link https://tools.ietf.org/html/rfc3986#section-6.1 + */ + public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, $normalizations = self::PRESERVING_NORMALIZATIONS) + { + return (string) self::normalize($uri1, $normalizations) === (string) self::normalize($uri2, $normalizations); + } + + private static function capitalizePercentEncoding(UriInterface $uri) + { + $regex = '/(?:%[A-Fa-f0-9]{2})++/'; + + $callback = function (array $match) { + return strtoupper($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private static function decodeUnreservedCharacters(UriInterface $uri) + { + $regex = '/%(?:2D|2E|5F|7E|3[0-9]|[46][1-9A-F]|[57][0-9A])/i'; + + $callback = function (array $match) { + return rawurldecode($match[0]); + }; + + return + $uri->withPath( + preg_replace_callback($regex, $callback, $uri->getPath()) + )->withQuery( + preg_replace_callback($regex, $callback, $uri->getQuery()) + ); + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/UriResolver.php b/vendor/guzzlehttp/psr7/src/UriResolver.php new file mode 100755 index 0000000..c1cb8a2 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/UriResolver.php @@ -0,0 +1,219 @@ +getScheme() != '') { + return $rel->withPath(self::removeDotSegments($rel->getPath())); + } + + if ($rel->getAuthority() != '') { + $targetAuthority = $rel->getAuthority(); + $targetPath = self::removeDotSegments($rel->getPath()); + $targetQuery = $rel->getQuery(); + } else { + $targetAuthority = $base->getAuthority(); + if ($rel->getPath() === '') { + $targetPath = $base->getPath(); + $targetQuery = $rel->getQuery() != '' ? $rel->getQuery() : $base->getQuery(); + } else { + if ($rel->getPath()[0] === '/') { + $targetPath = $rel->getPath(); + } else { + if ($targetAuthority != '' && $base->getPath() === '') { + $targetPath = '/' . $rel->getPath(); + } else { + $lastSlashPos = strrpos($base->getPath(), '/'); + if ($lastSlashPos === false) { + $targetPath = $rel->getPath(); + } else { + $targetPath = substr($base->getPath(), 0, $lastSlashPos + 1) . $rel->getPath(); + } + } + } + $targetPath = self::removeDotSegments($targetPath); + $targetQuery = $rel->getQuery(); + } + } + + return new Uri(Uri::composeComponents( + $base->getScheme(), + $targetAuthority, + $targetPath, + $targetQuery, + $rel->getFragment() + )); + } + + /** + * Returns the target URI as a relative reference from the base URI. + * + * This method is the counterpart to resolve(): + * + * (string) $target === (string) UriResolver::resolve($base, UriResolver::relativize($base, $target)) + * + * One use-case is to use the current request URI as base URI and then generate relative links in your documents + * to reduce the document size or offer self-contained downloadable document archives. + * + * $base = new Uri('http://example.com/a/b/'); + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/c')); // prints 'c'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/x/y')); // prints '../x/y'. + * echo UriResolver::relativize($base, new Uri('http://example.com/a/b/?q')); // prints '?q'. + * echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // prints '//example.org/a/b/'. + * + * This method also accepts a target that is already relative and will try to relativize it further. Only a + * relative-path reference will be returned as-is. + * + * echo UriResolver::relativize($base, new Uri('/a/b/c')); // prints 'c' as well + * + * @param UriInterface $base Base URI + * @param UriInterface $target Target URI + * + * @return UriInterface The relative URI reference + */ + public static function relativize(UriInterface $base, UriInterface $target) + { + if ($target->getScheme() !== '' && + ($base->getScheme() !== $target->getScheme() || $target->getAuthority() === '' && $base->getAuthority() !== '') + ) { + return $target; + } + + if (Uri::isRelativePathReference($target)) { + // As the target is already highly relative we return it as-is. It would be possible to resolve + // the target with `$target = self::resolve($base, $target);` and then try make it more relative + // by removing a duplicate query. But let's not do that automatically. + return $target; + } + + if ($target->getAuthority() !== '' && $base->getAuthority() !== $target->getAuthority()) { + return $target->withScheme(''); + } + + // We must remove the path before removing the authority because if the path starts with two slashes, the URI + // would turn invalid. And we also cannot set a relative path before removing the authority, as that is also + // invalid. + $emptyPathUri = $target->withScheme('')->withPath('')->withUserInfo('')->withPort(null)->withHost(''); + + if ($base->getPath() !== $target->getPath()) { + return $emptyPathUri->withPath(self::getRelativePath($base, $target)); + } + + if ($base->getQuery() === $target->getQuery()) { + // Only the target fragment is left. And it must be returned even if base and target fragment are the same. + return $emptyPathUri->withQuery(''); + } + + // If the base URI has a query but the target has none, we cannot return an empty path reference as it would + // inherit the base query component when resolving. + if ($target->getQuery() === '') { + $segments = explode('/', $target->getPath()); + $lastSegment = end($segments); + + return $emptyPathUri->withPath($lastSegment === '' ? './' : $lastSegment); + } + + return $emptyPathUri; + } + + private static function getRelativePath(UriInterface $base, UriInterface $target) + { + $sourceSegments = explode('/', $base->getPath()); + $targetSegments = explode('/', $target->getPath()); + array_pop($sourceSegments); + $targetLastSegment = array_pop($targetSegments); + foreach ($sourceSegments as $i => $segment) { + if (isset($targetSegments[$i]) && $segment === $targetSegments[$i]) { + unset($sourceSegments[$i], $targetSegments[$i]); + } else { + break; + } + } + $targetSegments[] = $targetLastSegment; + $relativePath = str_repeat('../', count($sourceSegments)) . implode('/', $targetSegments); + + // A reference to am empty last segment or an empty first sub-segment must be prefixed with "./". + // This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used + // as the first segment of a relative-path reference, as it would be mistaken for a scheme name. + if ('' === $relativePath || false !== strpos(explode('/', $relativePath, 2)[0], ':')) { + $relativePath = "./$relativePath"; + } elseif ('/' === $relativePath[0]) { + if ($base->getAuthority() != '' && $base->getPath() === '') { + // In this case an extra slash is added by resolve() automatically. So we must not add one here. + $relativePath = ".$relativePath"; + } else { + $relativePath = "./$relativePath"; + } + } + + return $relativePath; + } + + private function __construct() + { + // cannot be instantiated + } +} diff --git a/vendor/guzzlehttp/psr7/src/functions.php b/vendor/guzzlehttp/psr7/src/functions.php new file mode 100755 index 0000000..8e6dafe --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/functions.php @@ -0,0 +1,899 @@ +getMethod() . ' ' + . $message->getRequestTarget()) + . ' HTTP/' . $message->getProtocolVersion(); + if (!$message->hasHeader('host')) { + $msg .= "\r\nHost: " . $message->getUri()->getHost(); + } + } elseif ($message instanceof ResponseInterface) { + $msg = 'HTTP/' . $message->getProtocolVersion() . ' ' + . $message->getStatusCode() . ' ' + . $message->getReasonPhrase(); + } else { + throw new \InvalidArgumentException('Unknown message type'); + } + + foreach ($message->getHeaders() as $name => $values) { + $msg .= "\r\n{$name}: " . implode(', ', $values); + } + + return "{$msg}\r\n\r\n" . $message->getBody(); +} + +/** + * Returns a UriInterface for the given value. + * + * This function accepts a string or {@see Psr\Http\Message\UriInterface} and + * returns a UriInterface for the given value. If the value is already a + * `UriInterface`, it is returned as-is. + * + * @param string|UriInterface $uri + * + * @return UriInterface + * @throws \InvalidArgumentException + */ +function uri_for($uri) +{ + if ($uri instanceof UriInterface) { + return $uri; + } elseif (is_string($uri)) { + return new Uri($uri); + } + + throw new \InvalidArgumentException('URI must be a string or UriInterface'); +} + +/** + * Create a new stream based on the input type. + * + * Options is an associative array that can contain the following keys: + * - metadata: Array of custom metadata. + * - size: Size of the stream. + * + * @param resource|string|null|int|float|bool|StreamInterface|callable|\Iterator $resource Entity body data + * @param array $options Additional options + * + * @return StreamInterface + * @throws \InvalidArgumentException if the $resource arg is not valid. + */ +function stream_for($resource = '', array $options = []) +{ + if (is_scalar($resource)) { + $stream = fopen('php://temp', 'r+'); + if ($resource !== '') { + fwrite($stream, $resource); + fseek($stream, 0); + } + return new Stream($stream, $options); + } + + switch (gettype($resource)) { + case 'resource': + return new Stream($resource, $options); + case 'object': + if ($resource instanceof StreamInterface) { + return $resource; + } elseif ($resource instanceof \Iterator) { + return new PumpStream(function () use ($resource) { + if (!$resource->valid()) { + return false; + } + $result = $resource->current(); + $resource->next(); + return $result; + }, $options); + } elseif (method_exists($resource, '__toString')) { + return stream_for((string) $resource, $options); + } + break; + case 'NULL': + return new Stream(fopen('php://temp', 'r+'), $options); + } + + if (is_callable($resource)) { + return new PumpStream($resource, $options); + } + + throw new \InvalidArgumentException('Invalid resource type: ' . gettype($resource)); +} + +/** + * Parse an array of header values containing ";" separated data into an + * array of associative arrays representing the header key value pair + * data of the header. When a parameter does not contain a value, but just + * contains a key, this function will inject a key with a '' string value. + * + * @param string|array $header Header to parse into components. + * + * @return array Returns the parsed header values. + */ +function parse_header($header) +{ + static $trimmed = "\"' \n\t\r"; + $params = $matches = []; + + foreach (normalize_header($header) as $val) { + $part = []; + foreach (preg_split('/;(?=([^"]*"[^"]*")*[^"]*$)/', $val) as $kvp) { + if (preg_match_all('/<[^>]+>|[^=]+/', $kvp, $matches)) { + $m = $matches[0]; + if (isset($m[1])) { + $part[trim($m[0], $trimmed)] = trim($m[1], $trimmed); + } else { + $part[] = trim($m[0], $trimmed); + } + } + } + if ($part) { + $params[] = $part; + } + } + + return $params; +} + +/** + * Converts an array of header values that may contain comma separated + * headers into an array of headers with no comma separated values. + * + * @param string|array $header Header to normalize. + * + * @return array Returns the normalized header field values. + */ +function normalize_header($header) +{ + if (!is_array($header)) { + return array_map('trim', explode(',', $header)); + } + + $result = []; + foreach ($header as $value) { + foreach ((array) $value as $v) { + if (strpos($v, ',') === false) { + $result[] = $v; + continue; + } + foreach (preg_split('/,(?=([^"]*"[^"]*")*[^"]*$)/', $v) as $vv) { + $result[] = trim($vv); + } + } + } + + return $result; +} + +/** + * Clone and modify a request with the given changes. + * + * The changes can be one of: + * - method: (string) Changes the HTTP method. + * - set_headers: (array) Sets the given headers. + * - remove_headers: (array) Remove the given headers. + * - body: (mixed) Sets the given body. + * - uri: (UriInterface) Set the URI. + * - query: (string) Set the query string value of the URI. + * - version: (string) Set the protocol version. + * + * @param RequestInterface $request Request to clone and modify. + * @param array $changes Changes to apply. + * + * @return RequestInterface + */ +function modify_request(RequestInterface $request, array $changes) +{ + if (!$changes) { + return $request; + } + + $headers = $request->getHeaders(); + + if (!isset($changes['uri'])) { + $uri = $request->getUri(); + } else { + // Remove the host header if one is on the URI + if ($host = $changes['uri']->getHost()) { + $changes['set_headers']['Host'] = $host; + + if ($port = $changes['uri']->getPort()) { + $standardPorts = ['http' => 80, 'https' => 443]; + $scheme = $changes['uri']->getScheme(); + if (isset($standardPorts[$scheme]) && $port != $standardPorts[$scheme]) { + $changes['set_headers']['Host'] .= ':'.$port; + } + } + } + $uri = $changes['uri']; + } + + if (!empty($changes['remove_headers'])) { + $headers = _caseless_remove($changes['remove_headers'], $headers); + } + + if (!empty($changes['set_headers'])) { + $headers = _caseless_remove(array_keys($changes['set_headers']), $headers); + $headers = $changes['set_headers'] + $headers; + } + + if (isset($changes['query'])) { + $uri = $uri->withQuery($changes['query']); + } + + if ($request instanceof ServerRequestInterface) { + return (new ServerRequest( + isset($changes['method']) ? $changes['method'] : $request->getMethod(), + $uri, + $headers, + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion(), + $request->getServerParams() + )) + ->withParsedBody($request->getParsedBody()) + ->withQueryParams($request->getQueryParams()) + ->withCookieParams($request->getCookieParams()) + ->withUploadedFiles($request->getUploadedFiles()); + } + + return new Request( + isset($changes['method']) ? $changes['method'] : $request->getMethod(), + $uri, + $headers, + isset($changes['body']) ? $changes['body'] : $request->getBody(), + isset($changes['version']) + ? $changes['version'] + : $request->getProtocolVersion() + ); +} + +/** + * Attempts to rewind a message body and throws an exception on failure. + * + * The body of the message will only be rewound if a call to `tell()` returns a + * value other than `0`. + * + * @param MessageInterface $message Message to rewind + * + * @throws \RuntimeException + */ +function rewind_body(MessageInterface $message) +{ + $body = $message->getBody(); + + if ($body->tell()) { + $body->rewind(); + } +} + +/** + * Safely opens a PHP stream resource using a filename. + * + * When fopen fails, PHP normally raises a warning. This function adds an + * error handler that checks for errors and throws an exception instead. + * + * @param string $filename File to open + * @param string $mode Mode used to open the file + * + * @return resource + * @throws \RuntimeException if the file cannot be opened + */ +function try_fopen($filename, $mode) +{ + $ex = null; + set_error_handler(function () use ($filename, $mode, &$ex) { + $ex = new \RuntimeException(sprintf( + 'Unable to open %s using mode %s: %s', + $filename, + $mode, + func_get_args()[1] + )); + }); + + $handle = fopen($filename, $mode); + restore_error_handler(); + + if ($ex) { + /** @var $ex \RuntimeException */ + throw $ex; + } + + return $handle; +} + +/** + * Copy the contents of a stream into a string until the given number of + * bytes have been read. + * + * @param StreamInterface $stream Stream to read + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * @return string + * @throws \RuntimeException on error. + */ +function copy_to_string(StreamInterface $stream, $maxLen = -1) +{ + $buffer = ''; + + if ($maxLen === -1) { + while (!$stream->eof()) { + $buf = $stream->read(1048576); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + } + return $buffer; + } + + $len = 0; + while (!$stream->eof() && $len < $maxLen) { + $buf = $stream->read($maxLen - $len); + // Using a loose equality here to match on '' and false. + if ($buf == null) { + break; + } + $buffer .= $buf; + $len = strlen($buffer); + } + + return $buffer; +} + +/** + * Copy the contents of a stream into another stream until the given number + * of bytes have been read. + * + * @param StreamInterface $source Stream to read from + * @param StreamInterface $dest Stream to write to + * @param int $maxLen Maximum number of bytes to read. Pass -1 + * to read the entire stream. + * + * @throws \RuntimeException on error. + */ +function copy_to_stream( + StreamInterface $source, + StreamInterface $dest, + $maxLen = -1 +) { + $bufferSize = 8192; + + if ($maxLen === -1) { + while (!$source->eof()) { + if (!$dest->write($source->read($bufferSize))) { + break; + } + } + } else { + $remaining = $maxLen; + while ($remaining > 0 && !$source->eof()) { + $buf = $source->read(min($bufferSize, $remaining)); + $len = strlen($buf); + if (!$len) { + break; + } + $remaining -= $len; + $dest->write($buf); + } + } +} + +/** + * Calculate a hash of a Stream + * + * @param StreamInterface $stream Stream to calculate the hash for + * @param string $algo Hash algorithm (e.g. md5, crc32, etc) + * @param bool $rawOutput Whether or not to use raw output + * + * @return string Returns the hash of the stream + * @throws \RuntimeException on error. + */ +function hash( + StreamInterface $stream, + $algo, + $rawOutput = false +) { + $pos = $stream->tell(); + + if ($pos > 0) { + $stream->rewind(); + } + + $ctx = hash_init($algo); + while (!$stream->eof()) { + hash_update($ctx, $stream->read(1048576)); + } + + $out = hash_final($ctx, (bool) $rawOutput); + $stream->seek($pos); + + return $out; +} + +/** + * Read a line from the stream up to the maximum allowed buffer length + * + * @param StreamInterface $stream Stream to read from + * @param int $maxLength Maximum buffer length + * + * @return string + */ +function readline(StreamInterface $stream, $maxLength = null) +{ + $buffer = ''; + $size = 0; + + while (!$stream->eof()) { + // Using a loose equality here to match on '' and false. + if (null == ($byte = $stream->read(1))) { + return $buffer; + } + $buffer .= $byte; + // Break when a new line is found or the max length - 1 is reached + if ($byte === "\n" || ++$size === $maxLength - 1) { + break; + } + } + + return $buffer; +} + +/** + * Parses a request message string into a request object. + * + * @param string $message Request message string. + * + * @return Request + */ +function parse_request($message) +{ + $data = _parse_message($message); + $matches = []; + if (!preg_match('/^[\S]+\s+([a-zA-Z]+:\/\/|\/).*/', $data['start-line'], $matches)) { + throw new \InvalidArgumentException('Invalid request string'); + } + $parts = explode(' ', $data['start-line'], 3); + $version = isset($parts[2]) ? explode('/', $parts[2])[1] : '1.1'; + + $request = new Request( + $parts[0], + $matches[1] === '/' ? _parse_request_uri($parts[1], $data['headers']) : $parts[1], + $data['headers'], + $data['body'], + $version + ); + + return $matches[1] === '/' ? $request : $request->withRequestTarget($parts[1]); +} + +/** + * Parses a response message string into a response object. + * + * @param string $message Response message string. + * + * @return Response + */ +function parse_response($message) +{ + $data = _parse_message($message); + // According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space + // between status-code and reason-phrase is required. But browsers accept + // responses without space and reason as well. + if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) { + throw new \InvalidArgumentException('Invalid response string: ' . $data['start-line']); + } + $parts = explode(' ', $data['start-line'], 3); + + return new Response( + $parts[1], + $data['headers'], + $data['body'], + explode('/', $parts[0])[1], + isset($parts[2]) ? $parts[2] : null + ); +} + +/** + * Parse a query string into an associative array. + * + * If multiple values are found for the same key, the value of that key + * value pair will become an array. This function does not parse nested + * PHP style arrays into an associative array (e.g., foo[a]=1&foo[b]=2 will + * be parsed into ['foo[a]' => '1', 'foo[b]' => '2']). + * + * @param string $str Query string to parse + * @param int|bool $urlEncoding How the query string is encoded + * + * @return array + */ +function parse_query($str, $urlEncoding = true) +{ + $result = []; + + if ($str === '') { + return $result; + } + + if ($urlEncoding === true) { + $decoder = function ($value) { + return rawurldecode(str_replace('+', ' ', $value)); + }; + } elseif ($urlEncoding === PHP_QUERY_RFC3986) { + $decoder = 'rawurldecode'; + } elseif ($urlEncoding === PHP_QUERY_RFC1738) { + $decoder = 'urldecode'; + } else { + $decoder = function ($str) { return $str; }; + } + + foreach (explode('&', $str) as $kvp) { + $parts = explode('=', $kvp, 2); + $key = $decoder($parts[0]); + $value = isset($parts[1]) ? $decoder($parts[1]) : null; + if (!isset($result[$key])) { + $result[$key] = $value; + } else { + if (!is_array($result[$key])) { + $result[$key] = [$result[$key]]; + } + $result[$key][] = $value; + } + } + + return $result; +} + +/** + * Build a query string from an array of key value pairs. + * + * This function can use the return value of parse_query() to build a query + * string. This function does not modify the provided keys when an array is + * encountered (like http_build_query would). + * + * @param array $params Query string parameters. + * @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986 + * to encode using RFC3986, or PHP_QUERY_RFC1738 + * to encode using RFC1738. + * @return string + */ +function build_query(array $params, $encoding = PHP_QUERY_RFC3986) +{ + if (!$params) { + return ''; + } + + if ($encoding === false) { + $encoder = function ($str) { return $str; }; + } elseif ($encoding === PHP_QUERY_RFC3986) { + $encoder = 'rawurlencode'; + } elseif ($encoding === PHP_QUERY_RFC1738) { + $encoder = 'urlencode'; + } else { + throw new \InvalidArgumentException('Invalid type'); + } + + $qs = ''; + foreach ($params as $k => $v) { + $k = $encoder($k); + if (!is_array($v)) { + $qs .= $k; + if ($v !== null) { + $qs .= '=' . $encoder($v); + } + $qs .= '&'; + } else { + foreach ($v as $vv) { + $qs .= $k; + if ($vv !== null) { + $qs .= '=' . $encoder($vv); + } + $qs .= '&'; + } + } + } + + return $qs ? (string) substr($qs, 0, -1) : ''; +} + +/** + * Determines the mimetype of a file by looking at its extension. + * + * @param $filename + * + * @return null|string + */ +function mimetype_from_filename($filename) +{ + return mimetype_from_extension(pathinfo($filename, PATHINFO_EXTENSION)); +} + +/** + * Maps a file extensions to a mimetype. + * + * @param $extension string The file extension. + * + * @return string|null + * @link http://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x/conf/mime.types + */ +function mimetype_from_extension($extension) +{ + static $mimetypes = [ + '3gp' => 'video/3gpp', + '7z' => 'application/x-7z-compressed', + 'aac' => 'audio/x-aac', + 'ai' => 'application/postscript', + 'aif' => 'audio/x-aiff', + 'asc' => 'text/plain', + 'asf' => 'video/x-ms-asf', + 'atom' => 'application/atom+xml', + 'avi' => 'video/x-msvideo', + 'bmp' => 'image/bmp', + 'bz2' => 'application/x-bzip2', + 'cer' => 'application/pkix-cert', + 'crl' => 'application/pkix-crl', + 'crt' => 'application/x-x509-ca-cert', + 'css' => 'text/css', + 'csv' => 'text/csv', + 'cu' => 'application/cu-seeme', + 'deb' => 'application/x-debian-package', + 'doc' => 'application/msword', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dvi' => 'application/x-dvi', + 'eot' => 'application/vnd.ms-fontobject', + 'eps' => 'application/postscript', + 'epub' => 'application/epub+zip', + 'etx' => 'text/x-setext', + 'flac' => 'audio/flac', + 'flv' => 'video/x-flv', + 'gif' => 'image/gif', + 'gz' => 'application/gzip', + 'htm' => 'text/html', + 'html' => 'text/html', + 'ico' => 'image/x-icon', + 'ics' => 'text/calendar', + 'ini' => 'text/plain', + 'iso' => 'application/x-iso9660-image', + 'jar' => 'application/java-archive', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'js' => 'text/javascript', + 'json' => 'application/json', + 'latex' => 'application/x-latex', + 'log' => 'text/plain', + 'm4a' => 'audio/mp4', + 'm4v' => 'video/mp4', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mov' => 'video/quicktime', + 'mkv' => 'video/x-matroska', + 'mp3' => 'audio/mpeg', + 'mp4' => 'video/mp4', + 'mp4a' => 'audio/mp4', + 'mp4v' => 'video/mp4', + 'mpe' => 'video/mpeg', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpg4' => 'video/mp4', + 'oga' => 'audio/ogg', + 'ogg' => 'audio/ogg', + 'ogv' => 'video/ogg', + 'ogx' => 'application/ogg', + 'pbm' => 'image/x-portable-bitmap', + 'pdf' => 'application/pdf', + 'pgm' => 'image/x-portable-graymap', + 'png' => 'image/png', + 'pnm' => 'image/x-portable-anymap', + 'ppm' => 'image/x-portable-pixmap', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'ps' => 'application/postscript', + 'qt' => 'video/quicktime', + 'rar' => 'application/x-rar-compressed', + 'ras' => 'image/x-cmu-raster', + 'rss' => 'application/rss+xml', + 'rtf' => 'application/rtf', + 'sgm' => 'text/sgml', + 'sgml' => 'text/sgml', + 'svg' => 'image/svg+xml', + 'swf' => 'application/x-shockwave-flash', + 'tar' => 'application/x-tar', + 'tif' => 'image/tiff', + 'tiff' => 'image/tiff', + 'torrent' => 'application/x-bittorrent', + 'ttf' => 'application/x-font-ttf', + 'txt' => 'text/plain', + 'wav' => 'audio/x-wav', + 'webm' => 'video/webm', + 'webp' => 'image/webp', + 'wma' => 'audio/x-ms-wma', + 'wmv' => 'video/x-ms-wmv', + 'woff' => 'application/x-font-woff', + 'wsdl' => 'application/wsdl+xml', + 'xbm' => 'image/x-xbitmap', + 'xls' => 'application/vnd.ms-excel', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xml' => 'application/xml', + 'xpm' => 'image/x-xpixmap', + 'xwd' => 'image/x-xwindowdump', + 'yaml' => 'text/yaml', + 'yml' => 'text/yaml', + 'zip' => 'application/zip', + ]; + + $extension = strtolower($extension); + + return isset($mimetypes[$extension]) + ? $mimetypes[$extension] + : null; +} + +/** + * Parses an HTTP message into an associative array. + * + * The array contains the "start-line" key containing the start line of + * the message, "headers" key containing an associative array of header + * array values, and a "body" key containing the body of the message. + * + * @param string $message HTTP request or response to parse. + * + * @return array + * @internal + */ +function _parse_message($message) +{ + if (!$message) { + throw new \InvalidArgumentException('Invalid message'); + } + + $message = ltrim($message, "\r\n"); + + $messageParts = preg_split("/\r?\n\r?\n/", $message, 2); + + if ($messageParts === false || count($messageParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing header delimiter'); + } + + list($rawHeaders, $body) = $messageParts; + $rawHeaders .= "\r\n"; // Put back the delimiter we split previously + $headerParts = preg_split("/\r?\n/", $rawHeaders, 2); + + if ($headerParts === false || count($headerParts) !== 2) { + throw new \InvalidArgumentException('Invalid message: Missing status line'); + } + + list($startLine, $rawHeaders) = $headerParts; + + if (preg_match("/(?:^HTTP\/|^[A-Z]+ \S+ HTTP\/)(\d+(?:\.\d+)?)/i", $startLine, $matches) && $matches[1] === '1.0') { + // Header folding is deprecated for HTTP/1.1, but allowed in HTTP/1.0 + $rawHeaders = preg_replace(Rfc7230::HEADER_FOLD_REGEX, ' ', $rawHeaders); + } + + /** @var array[] $headerLines */ + $count = preg_match_all(Rfc7230::HEADER_REGEX, $rawHeaders, $headerLines, PREG_SET_ORDER); + + // If these aren't the same, then one line didn't match and there's an invalid header. + if ($count !== substr_count($rawHeaders, "\n")) { + // Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4 + if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) { + throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding'); + } + + throw new \InvalidArgumentException('Invalid header syntax'); + } + + $headers = []; + + foreach ($headerLines as $headerLine) { + $headers[$headerLine[1]][] = $headerLine[2]; + } + + return [ + 'start-line' => $startLine, + 'headers' => $headers, + 'body' => $body, + ]; +} + +/** + * Constructs a URI for an HTTP request message. + * + * @param string $path Path from the start-line + * @param array $headers Array of headers (each value an array). + * + * @return string + * @internal + */ +function _parse_request_uri($path, array $headers) +{ + $hostKey = array_filter(array_keys($headers), function ($k) { + return strtolower($k) === 'host'; + }); + + // If no host is found, then a full URI cannot be constructed. + if (!$hostKey) { + return $path; + } + + $host = $headers[reset($hostKey)][0]; + $scheme = substr($host, -4) === ':443' ? 'https' : 'http'; + + return $scheme . '://' . $host . '/' . ltrim($path, '/'); +} + +/** + * Get a short summary of the message body + * + * Will return `null` if the response is not printable. + * + * @param MessageInterface $message The message to get the body summary + * @param int $truncateAt The maximum allowed size of the summary + * + * @return null|string + */ +function get_message_body_summary(MessageInterface $message, $truncateAt = 120) +{ + $body = $message->getBody(); + + if (!$body->isSeekable() || !$body->isReadable()) { + return null; + } + + $size = $body->getSize(); + + if ($size === 0) { + return null; + } + + $summary = $body->read($truncateAt); + $body->rewind(); + + if ($size > $truncateAt) { + $summary .= ' (truncated...)'; + } + + // Matches any printable character, including unicode characters: + // letters, marks, numbers, punctuation, spacing, and separators. + if (preg_match('/[^\pL\pM\pN\pP\pS\pZ\n\r\t]/', $summary)) { + return null; + } + + return $summary; +} + +/** @internal */ +function _caseless_remove($keys, array $data) +{ + $result = []; + + foreach ($keys as &$key) { + $key = strtolower($key); + } + + foreach ($data as $k => $v) { + if (!in_array(strtolower($k), $keys)) { + $result[$k] = $v; + } + } + + return $result; +} diff --git a/vendor/guzzlehttp/psr7/src/functions_include.php b/vendor/guzzlehttp/psr7/src/functions_include.php new file mode 100755 index 0000000..96a4a83 --- /dev/null +++ b/vendor/guzzlehttp/psr7/src/functions_include.php @@ -0,0 +1,6 @@ +This is first and only QR code reader that works without extensions.
                            +Ported from [ZXing library](https://github.com/zxing/zxing) + + +## Installation +The recommended method of installing this library is via [Composer](https://getcomposer.org/). + +Run the following command from your project root: + +```bash +$ composer require khanamiryan/qrcode-detector-decoder +``` + + +## Usage +```php +require __DIR__ . "/vendor/autoload.php"; +$qrcode = new QrReader('path/to_image'); +$text = $qrcode->text(); //return decoded text from QR Code +``` + +## Requirements +* PHP >= 5.6 +* GD Library + + +## Contributing + +You can help the project by adding features, cleaning the code, adding composer and other. + + +1. Fork it +2. Create your feature branch: `git checkout -b my-new-feature` +3. Commit your changes: `git commit -am 'Add some feature'` +4. Push to the branch: `git push origin my-new-feature` +5. Submit a pull request diff --git a/vendor/khanamiryan/qrcode-detector-decoder/composer.json b/vendor/khanamiryan/qrcode-detector-decoder/composer.json new file mode 100755 index 0000000..4e75736 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/composer.json @@ -0,0 +1,34 @@ +{ + "name": "khanamiryan/qrcode-detector-decoder", + "type": "library", + "description": "QR code decoder / reader", + "keywords": [ + "qr", + "zxing", + "barcode" + ], + "homepage": "https://github.com/khanamiryan/php-qrcode-detector-decoder/", + "license": "MIT", + "authors": [ + { + "name": "Ashot Khanamiryan", + "email": "a.khanamiryan@gmail.com", + "homepage": "https://github.com/khanamiryan", + "role": "Developer" + } + ], + "require": { + "php": "^5.6|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, + "autoload": { + "psr-4": { + "Zxing\\": "lib/" + }, + "files": [ + "lib/Common/customFunctions.php" + ] + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Binarizer.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Binarizer.php new file mode 100755 index 0000000..056890c --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Binarizer.php @@ -0,0 +1,96 @@ +source = $source; + } + + /** + * @return LuminanceSource + */ + public final function getLuminanceSource() + { + return $this->source; + } + + /** + * Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + * cached data. Callers should assume this method is expensive and call it as seldom as possible. + * This method is intended for decoding 1D barcodes and may choose to apply sharpening. + * For callers which only examine one row of pixels at a time, the same BitArray should be reused + * and passed in with each call for performance. However it is legal to keep more than one row + * at a time if needed. + * + * @param y The row to fetch, which must be in [0, bitmap height) + * @param row An optional preallocated array. If null or too small, it will be ignored. + * If used, the Binarizer will call BitArray.clear(). Always use the returned object. + * + * @return array The array of bits for this row (true means black). + * @throws NotFoundException if row can't be binarized + */ + public abstract function getBlackRow($y, $row); + + /** + * Converts a 2D array of luminance data to 1 bit data. As above, assume this method is expensive + * and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + * may not apply sharpening. Therefore, a row from this matrix may not be identical to one + * fetched using getBlackRow(), so don't mix and match between them. + * + * @return BitMatrix The 2D array of bits for the image (true means black). + * @throws NotFoundException if image can't be binarized to make a matrix + */ + public abstract function getBlackMatrix(); + + /** + * Creates a new object with the same type as this Binarizer implementation, but with pristine + * state. This is needed because Binarizer implementations may be stateful, e.g. keeping a cache + * of 1 bit data. See Effective Java for why we can't use Java's clone() method. + * + * @param source The LuminanceSource this Binarizer will operate on. + * + * @return Binarizer A new concrete Binarizer implementation object. + */ + public abstract function createBinarizer($source); + + public final function getWidth() + { + return $this->source->getWidth(); + } + + public final function getHeight() + { + return $this->source->getHeight(); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/BinaryBitmap.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/BinaryBitmap.php new file mode 100755 index 0000000..b23cb5f --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/BinaryBitmap.php @@ -0,0 +1,166 @@ +binarizer = $binarizer; + } + + /** + * @return int The width of the bitmap. + */ + public function getWidth() + { + return $this->binarizer->getWidth(); + } + + /** + * @return int The height of the bitmap. + */ + public function getHeight() + { + return $this->binarizer->getHeight(); + } + + /** + * Converts one row of luminance data to 1 bit data. May actually do the conversion, or return + * cached data. Callers should assume this method is expensive and call it as seldom as possible. + * This method is intended for decoding 1D barcodes and may choose to apply sharpening. + * + * @param y The row to fetch, which must be in [0, bitmap height) + * @param row An optional preallocated array. If null or too small, it will be ignored. + * If used, the Binarizer will call BitArray.clear(). Always use the returned object. + * + * @return array The array of bits for this row (true means black). + * @throws NotFoundException if row can't be binarized + */ + public function getBlackRow($y, $row) + { + return $this->binarizer->getBlackRow($y, $row); + } + + /** + * @return bool Whether this bitmap can be cropped. + */ + public function isCropSupported() + { + return $this->binarizer->getLuminanceSource()->isCropSupported(); + } + + /** + * Returns a new object with cropped image data. Implementations may keep a reference to the + * original data rather than a copy. Only callable if isCropSupported() is true. + * + * @param left The left coordinate, which must be in [0,getWidth()) + * @param top The top coordinate, which must be in [0,getHeight()) + * @param width The width of the rectangle to crop. + * @param height The height of the rectangle to crop. + * + * @return BinaryBitmap A cropped version of this object. + */ + public function crop($left, $top, $width, $height) + { + $newSource = $this->binarizer->getLuminanceSource()->crop($left, $top, $width, $height); + + return new BinaryBitmap($this->binarizer->createBinarizer($newSource)); + } + + /** + * @return Whether this bitmap supports counter-clockwise rotation. + */ + public function isRotateSupported() + { + return $this->binarizer->getLuminanceSource()->isRotateSupported(); + } + + /** + * Returns a new object with rotated image data by 90 degrees counterclockwise. + * Only callable if {@link #isRotateSupported()} is true. + * + * @return BinaryBitmap A rotated version of this object. + */ + public function rotateCounterClockwise() + { + $newSource = $this->binarizer->getLuminanceSource()->rotateCounterClockwise(); + + return new BinaryBitmap($this->binarizer->createBinarizer($newSource)); + } + + /** + * Returns a new object with rotated image data by 45 degrees counterclockwise. + * Only callable if {@link #isRotateSupported()} is true. + * + * @return BinaryBitmap A rotated version of this object. + */ + public function rotateCounterClockwise45() + { + $newSource = $this->binarizer->getLuminanceSource()->rotateCounterClockwise45(); + + return new BinaryBitmap($this->binarizer->createBinarizer($newSource)); + } + + public function toString() + { + try { + return $this->getBlackMatrix()->toString(); + } catch (NotFoundException $e) { + } + + return ''; + } + + /** + * Converts a 2D array of luminance data to 1 bit. As above, assume this method is expensive + * and do not call it repeatedly. This method is intended for decoding 2D barcodes and may or + * may not apply sharpening. Therefore, a row from this matrix may not be identical to one + * fetched using getBlackRow(), so don't mix and match between them. + * + * @return BitMatrix The 2D array of bits for the image (true means black). + * @throws NotFoundException if image can't be binarized to make a matrix + */ + public function getBlackMatrix() + { + // The matrix is created on demand the first time it is requested, then cached. There are two + // reasons for this: + // 1. This work will never be done if the caller only installs 1D Reader objects, or if a + // 1D Reader finds a barcode before the 2D Readers run. + // 2. This work will only be done once even if the caller installs multiple 2D Readers. + if ($this->matrix === null) { + $this->matrix = $this->binarizer->getBlackMatrix(); + } + + return $this->matrix; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/ChecksumException.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/ChecksumException.php new file mode 100755 index 0000000..ea23209 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/ChecksumException.php @@ -0,0 +1,42 @@ +strict = $strict; + $this->change($initialValue); + } + + /** + * Changes the value of the enum. + * + * @param mixed $value + * + * @return void + */ + public function change($value) + { + if (!in_array($value, $this->getConstList(), $this->strict)) { + throw new \UnexpectedValueException('Value not a const in enum ' . get_class($this)); + } + $this->value = $value; + } + + /** + * Gets all constants (possible values) as an array. + * + * @param boolean $includeDefault + * + * @return array + */ + public function getConstList($includeDefault = true) + { + if ($this->constants === null) { + $reflection = new ReflectionClass($this); + $this->constants = $reflection->getConstants(); + } + if ($includeDefault) { + return $this->constants; + } + $constants = $this->constants; + unset($constants['__default']); + + return $constants; + } + + /** + * Gets current value. + * + * @return mixed + */ + public function get() + { + return $this->value; + } + + /** + * Gets the name of the enum. + * + * @return string + */ + public function __toString() + { + return (string)array_search($this->value, $this->getConstList()); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/BitArray.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/BitArray.php new file mode 100755 index 0000000..4ab5a4c --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/BitArray.php @@ -0,0 +1,422 @@ +A simple, fast array of bits, represented compactly by an array of ints internally.

                            + * + * @author Sean Owen + */ + +final class BitArray +{ + + private $bits; + private $size; + + + public function __construct($bits = [], $size = 0) + { + + if (!$bits && !$size) { + $this->$size = 0; + $this->bits = []; + } elseif ($bits && !$size) { + $this->size = $bits; + $this->bits = $this->makeArray($bits); + } else { + $this->bits = $bits; + $this->size = $size; + } + + } + + private static function makeArray($size) + { + return []; + } + + public function getSize() + { + return $this->size; + } + + public function getSizeInBytes() + { + return ($this->size + 7) / 8; + } + + /** + * Sets bit i. + * + * @param i bit to set + */ + public function set($i) + { + $this->bits[(int)($i / 32)] |= 1 << ($i & 0x1F); + $this->bits[(int)($i / 32)] = ($this->bits[(int)($i / 32)]); + } + + /** + * Flips bit i. + * + * @param i bit to set + */ + public function flip($i) + { + $this->bits[(int)($i / 32)] ^= 1 << ($i & 0x1F); + $this->bits[(int)($i / 32)] = ($this->bits[(int)($i / 32)]); + } + + /** + * @param from first bit to check + * + * @return index of first bit that is set, starting from the given index, or size if none are set + * at or beyond this given index + * @see #getNextUnset(int) + */ + public function getNextSet($from) + { + if ($from >= $this->size) { + return $this->size; + } + $bitsOffset = (int)($from / 32); + $currentBits = (int)$this->bits[$bitsOffset]; + // mask off lesser bits first + $currentBits &= ~((1 << ($from & 0x1F)) - 1); + while ($currentBits == 0) { + if (++$bitsOffset == count($this->bits)) { + return $this->size; + } + $currentBits = $this->bits[$bitsOffset]; + } + $result = ($bitsOffset * 32) + numberOfTrailingZeros($currentBits); //numberOfTrailingZeros + + return $result > $this->size ? $this->size : $result; + } + + /** + * @param from index to start looking for unset bit + * + * @return index of next unset bit, or {@code size} if none are unset until the end + * @see #getNextSet(int) + */ + public function getNextUnset($from) + { + if ($from >= $this->size) { + return $this->size; + } + $bitsOffset = (int)($from / 32); + $currentBits = ~$this->bits[$bitsOffset]; + // mask off lesser bits first + $currentBits &= ~((1 << ($from & 0x1F)) - 1); + while ($currentBits == 0) { + if (++$bitsOffset == count($this->bits)) { + return $this->size; + } + $currentBits = (~$this->bits[$bitsOffset]); + } + $result = ($bitsOffset * 32) + numberOfTrailingZeros($currentBits); + + return $result > $this->size ? $this->size : $result; + } + + /** + * Sets a block of 32 bits, starting at bit i. + * + * @param i first bit to set + * @param newBits the new value of the next 32 bits. Note again that the least-significant bit + * corresponds to bit i, the next-least-significant to i+1, and so on. + */ + public function setBulk($i, $newBits) + { + $this->bits[(int)($i / 32)] = $newBits; + } + + /** + * Sets a range of bits. + * + * @param start start of range, inclusive. + * @param end end of range, exclusive + */ + public function setRange($start, $end) + { + if ($end < $start) { + throw new \InvalidArgumentException(); + } + if ($end == $start) { + return; + } + $end--; // will be easier to treat this as the last actually set bit -- inclusive + $firstInt = (int)($start / 32); + $lastInt = (int)($end / 32); + for ($i = $firstInt; $i <= $lastInt; $i++) { + $firstBit = $i > $firstInt ? 0 : $start & 0x1F; + $lastBit = $i < $lastInt ? 31 : $end & 0x1F; + $mask = 0; + if ($firstBit == 0 && $lastBit == 31) { + $mask = -1; + } else { + $mask = 0; + for ($j = $firstBit; $j <= $lastBit; $j++) { + $mask |= 1 << $j; + } + } + $this->bits[$i] = ($this->bits[$i] | $mask); + } + } + + /** + * Clears all bits (sets to false). + */ + public function clear() + { + $max = count($this->bits); + for ($i = 0; $i < $max; $i++) { + $this->bits[$i] = 0; + } + } + + /** + * Efficient method to check if a range of bits is set, or not set. + * + * @param start start of range, inclusive. + * @param end end of range, exclusive + * @param value if true, checks that bits in range are set, otherwise checks that they are not set + * + * @return true iff all bits are set or not set in range, according to value argument + * @throws InvalidArgumentException if end is less than or equal to start + */ + public function isRange($start, $end, $value) + { + if ($end < $start) { + throw new \InvalidArgumentException(); + } + if ($end == $start) { + return true; // empty range matches + } + $end--; // will be easier to treat this as the last actually set bit -- inclusive + $firstInt = (int)($start / 32); + $lastInt = (int)($end / 32); + for ($i = $firstInt; $i <= $lastInt; $i++) { + $firstBit = $i > $firstInt ? 0 : $start & 0x1F; + $lastBit = $i < $lastInt ? 31 : $end & 0x1F; + $mask = 0; + if ($firstBit == 0 && $lastBit == 31) { + $mask = -1; + } else { + $mask = 0; + for ($j = $firstBit; $j <= $lastBit; $j++) { + $mask = ($mask | (1 << $j)); + } + } + + // Return false if we're looking for 1s and the masked bits[i] isn't all 1s (that is, + // equals the mask, or we're looking for 0s and the masked portion is not all 0s + if (($this->bits[$i] & $mask) != ($value ? $mask : 0)) { + return false; + } + } + + return true; + } + + /** + * Appends the least-significant bits, from value, in order from most-significant to + * least-significant. For example, appending 6 bits from 0x000001E will append the bits + * 0, 1, 1, 1, 1, 0 in that order. + * + * @param value {@code int} containing bits to append + * @param numBits bits from value to append + */ + public function appendBits($value, $numBits) + { + if ($numBits < 0 || $numBits > 32) { + throw new \InvalidArgumentException("Num bits must be between 0 and 32"); + } + $this->ensureCapacity($this->size + $numBits); + for ($numBitsLeft = $numBits; $numBitsLeft > 0; $numBitsLeft--) { + $this->appendBit((($value >> ($numBitsLeft - 1)) & 0x01) == 1); + } + } + + private function ensureCapacity($size) + { + if ($size > count($this->bits) * 32) { + $newBits = $this->makeArray($size); + $newBits = arraycopy($this->bits, 0, $newBits, 0, count($this->bits)); + $this->bits = $newBits; + } + } + + public function appendBit($bit) + { + $this->ensureCapacity($this->size + 1); + if ($bit) { + $this->bits[(int)($this->size / 32)] |= 1 << ($this->size & 0x1F); + } + $this->size++; + } + + public function appendBitArray($other) + { + $otherSize = $other->size; + $this->ensureCapacity($this->size + $otherSize); + for ($i = 0; $i < $otherSize; $i++) { + $this->appendBit($other->get($i)); + } + } + + public function _xor($other) + { + if (count($this->bits) !== count($other->bits)) { + throw new \InvalidArgumentException("Sizes don't match"); + } + $count = count($this->bits); + for ($i = 0; $i < $count; $i++) { + // The last byte could be incomplete (i.e. not have 8 bits in + // it) but there is no problem since 0 XOR 0 == 0. + $this->bits[$i] ^= $other->bits[$i]; + } + } + + /** + * + * @param bitOffset first bit to start writing + * @param array array to write into. Bytes are written most-significant byte first. This is the opposite + * of the internal representation, which is exposed by {@link #getBitArray()} + * @param offset position in array to start writing + * @param numBytes how many bytes to write + */ + public function toBytes($bitOffset, &$array, $offset, $numBytes) + { + for ($i = 0; $i < $numBytes; $i++) { + $theByte = 0; + for ($j = 0; $j < 8; $j++) { + if ($this->get($bitOffset)) { + $theByte |= 1 << (7 - $j); + } + $bitOffset++; + } + $array[(int)($offset + $i)] = $theByte; + } + } + + /** + * @param $i ; bit to get + * + * @return true iff bit i is set + */ + public function get($i) + { + $key = (int)($i / 32); + + return ($this->bits[$key] & (1 << ($i & 0x1F))) != 0; + } + + /** + * @return array underlying array of ints. The first element holds the first 32 bits, and the least + * significant bit is bit 0. + */ + public function getBitArray() + { + return $this->bits; + } + + /** + * Reverses all bits in the array. + */ + public function reverse() + { + $newBits = []; + // reverse all int's first + $len = (($this->size - 1) / 32); + $oldBitsLen = $len + 1; + for ($i = 0; $i < $oldBitsLen; $i++) { + $x = $this->bits[$i];/* + $x = (($x >> 1) & 0x55555555L) | (($x & 0x55555555L) << 1); + $x = (($x >> 2) & 0x33333333L) | (($x & 0x33333333L) << 2); + $x = (($x >> 4) & 0x0f0f0f0fL) | (($x & 0x0f0f0f0fL) << 4); + $x = (($x >> 8) & 0x00ff00ffL) | (($x & 0x00ff00ffL) << 8); + $x = (($x >> 16) & 0x0000ffffL) | (($x & 0x0000ffffL) << 16);*/ + $x = (($x >> 1) & 0x55555555) | (($x & 0x55555555) << 1); + $x = (($x >> 2) & 0x33333333) | (($x & 0x33333333) << 2); + $x = (($x >> 4) & 0x0f0f0f0f) | (($x & 0x0f0f0f0f) << 4); + $x = (($x >> 8) & 0x00ff00ff) | (($x & 0x00ff00ff) << 8); + $x = (($x >> 16) & 0x0000ffff) | (($x & 0x0000ffff) << 16); + $newBits[(int)$len - $i] = (int)$x; + } + // now correct the int's if the bit size isn't a multiple of 32 + if ($this->size != $oldBitsLen * 32) { + $leftOffset = $oldBitsLen * 32 - $this->size; + $mask = 1; + for ($i = 0; $i < 31 - $leftOffset; $i++) { + $mask = ($mask << 1) | 1; + } + $currentInt = ($newBits[0] >> $leftOffset) & $mask; + for ($i = 1; $i < $oldBitsLen; $i++) { + $nextInt = $newBits[$i]; + $currentInt |= $nextInt << (32 - $leftOffset); + $newBits[(int)($i) - 1] = $currentInt; + $currentInt = ($nextInt >> $leftOffset) & $mask; + } + $newBits[(int)($oldBitsLen) - 1] = $currentInt; + } +// $bits = $newBits; + } + + public function equals($o) + { + if (!($o instanceof BitArray)) { + return false; + } + $other = $o; + + return $this->size == $other->size && $this->bits === $other->bits; + } + + public function hashCode() + { + return 31 * $this->size + hashCode($this->bits); + } + + public function toString() + { + $result = ''; + for ($i = 0; $i < $this->size; $i++) { + if (($i & 0x07) == 0) { + $result .= ' '; + } + $result .= ($this->get($i) ? 'X' : '.'); + } + + return (string)$result; + } + + public function _clone() + { + return new BitArray($this->bits, $this->size); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/BitMatrix.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/BitMatrix.php new file mode 100755 index 0000000..112862d --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/BitMatrix.php @@ -0,0 +1,458 @@ +width = $width; + $this->height = $height; + $this->rowSize = $rowSize; + $this->bits = $bits; + } + + public static function parse($stringRepresentation, $setString, $unsetString) + { + if (!$stringRepresentation) { + throw new \InvalidArgumentException(); + } + $bits = []; + $bitsPos = 0; + $rowStartPos = 0; + $rowLength = -1; + $nRows = 0; + $pos = 0; + while ($pos < strlen($stringRepresentation)) { + if ($stringRepresentation{$pos} == '\n' || + $stringRepresentation->{$pos} == '\r') { + if ($bitsPos > $rowStartPos) { + if ($rowLength == -1) { + $rowLength = $bitsPos - $rowStartPos; + } else if ($bitsPos - $rowStartPos != $rowLength) { + throw new \InvalidArgumentException("row lengths do not match"); + } + $rowStartPos = $bitsPos; + $nRows++; + } + $pos++; + } else if (substr($stringRepresentation, $pos, strlen($setString)) == $setString) { + $pos += strlen($setString); + $bits[$bitsPos] = true; + $bitsPos++; + } else if (substr($stringRepresentation, $pos + strlen($unsetString)) == $unsetString) { + $pos += strlen($unsetString); + $bits[$bitsPos] = false; + $bitsPos++; + } else { + throw new \InvalidArgumentException( + "illegal character encountered: " . substr($stringRepresentation, $pos)); + } + } + + // no EOL at end? + if ($bitsPos > $rowStartPos) { + if ($rowLength == -1) { + $rowLength = $bitsPos - $rowStartPos; + } else if ($bitsPos - $rowStartPos != $rowLength) { + throw new \InvalidArgumentException("row lengths do not match"); + } + $nRows++; + } + + $matrix = new BitMatrix($rowLength, $nRows); + for ($i = 0; $i < $bitsPos; $i++) { + if ($bits[$i]) { + $matrix->set($i % $rowLength, $i / $rowLength); + } + } + + return $matrix; + } + + /** + *

                            Sets the given bit to true.

                            + * + * @param $x ; The horizontal component (i.e. which column) + * @param $y ; The vertical component (i.e. which row) + */ + public function set($x, $y) + { + $offset = (int)($y * $this->rowSize + ($x / 32)); + if (!isset($this->bits[$offset])) { + $this->bits[$offset] = 0; + } + //$this->bits[$offset] = $this->bits[$offset]; + + // if($this->bits[$offset]>200748364){ + //$this->bits= array(0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-16777216,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-1090519040,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,1056964608,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,-1358954496,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,117440512,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,50331648,-1,-1,-1,-1,65535,0,0,0,0,0,0,0,33554432,-1,-1,536870911,-4096,65279,0,0,0,0,0,0,0,0,-1,-1,65535,-4096,65535,0,0,0,0,0,0,0,0,-193,536870911,0,-4096,65279,0,0,0,0,0,0,0,0,-254,32767,0,-4096,61951,0,0,0,0,0,0,0,0,20913920,0,0,-4096,50175,0,0,0,0,0,0,0,0,0,0,0,-4096,60159,0,0,0,0,0,0,0,0,0,0,0,-4096,64255,0,0,0,0,0,0,0,0,0,0,0,-8192,56319,0,0,0,0,0,0,0,0,0,0,0,-4096,16777215,0,0,0,0,0,0,0,0,0,0,0,-4096,16777215,0,0,0,0,0,0,0,0,0,0,0,-4096,16777215,0,0,0,0,0,0,0,0,0,0,0,-4096,16777215,0,0,0,0,0,0,0,0,0,0,0,-4096,16777215,0,0,0,0,0,0,0,0,0,0,0,-4096,16777215,0,0,0,0,0,0,0,0,0,0,0,-4096,16777215,0,0,0,0,0,0,0,0,0,0,0,-4096,16777215,0,0,0,0,0,0,0,251658240,0,0,0,-4096,-1,255,0,256,0,0,0,0,117440512,0,0,0,-4096,-1,255,0,512,0,0,0,0,117440512,0,0,0,-4096,-1,255,0,1024,0,0,0,0,117440512,0,0,0,-4096,-1,223,0,256,0,0,0,0,117440512,0,0,33030144,-4096,-1,191,0,256,0,0,0,0,117440512,0,0,33554428,-4096,-1,255,0,768,0,0,0,0,117440512,0,402849792,67108862,-8192,-1,255,0,768,0,0,0,0,117440512,0,470278396,63045630,-8192,-1,255,0,256,0,0,0,0,251658240,-8388608,470278399,58720286,-8192,-1,2686975,0,3842,0,0,0,0,251658240,-131072,1007149567,58720286,-8192,-1,2031615,0,3879,0,0,0,0,251658240,536739840,1007092192,58720286,-8192,-1,851967,0,3840,0,0,0,0,251658240,917504,1007092192,58720284,-8192,-1,2031615,0,3968,0,0,0,0,251658240,917504,1007092160,59244060,-8192,-1,65535,0,7936,0,0,0,0,251658240,917504,1009779136,59244060,-8192,-1,9371647,0,1792,0,0,0,0,251658240,917504,946921920,59244060,-8192,-1,8585215,0,1792,0,0,0,0,117440512,-15859712,477159875,59244060,-8192,-1,65535,0,12032,0,0,0,0,251658240,-15859712,52490691,59244060,-8192,-1,-1,0,65408,0,0,0,0,251658240,-15859712,58778051,59244060,-8192,-1,-1,0,65473,0,0,0,0,251658240,-15859712,125886915,59244060,-8192,-1,-1,0,65472,0,0,0,0,251658240,-15859712,58778051,59244060,-8192,-1,-1,0,65408,0,0,0,0,251658240,-15859712,8380867,59244060,-8192,-1,-1,0,65473,0,0,0,0,251658240,-15859712,8380867,59244060,-8192,-1,-1,0,131011,0,0,0,0,251658240,-15859712,8380867,58720284,-8192,-1,-1,0,130947,0,0,0,0,251658240,-15859712,2089411,58720284,-8192,-1,-1,0,130947,0,0,0,0,251658240,-32636928,449,58720284,-8192,-1,-1,33554431,131015,0,0,0,0,251658240,786432,448,62914588,-8192,-1,-1,16777215,131015,0,0,0,0,251658240,786432,448,67108860,-8192,-1,-1,553648127,131015,0,0,0,0,251658240,786432,946864576,67108860,-8192,-1,-1,32505855,131015,0,0,0,0,251658240,786432,946921976,8388604,-8192,-1,-1,8191999,131015,0,0,0,0,251658240,-262144,946921983,248,-8192,-1,-1,8126463,196551,0,0,0,0,251658240,-262144,7397887,0,-8192,-1,-1,16777215,262087,0,0,0,0,251658240,-262144,8257543,0,-8192,-1,-1,-2121269249,262095,0,0,0,0,520093696,0,8257536,0,-8192,-1,-1,-201326593,262095,0,0,0,0,520290304,0,8257536,117963776,-8192,-1,-1,-201326593,262095,0,0,0,0,520093696,0,-2140143616,118488579,-8192,-1,-1,-201326593,131023,0,0,0,0,520093696,0,-2131697280,118488579,-8192,-1,-1,-503316481,131023,0,0,0,0,520093696,2145386496,-2131631232,118484995,-16384,-1,-1,-469762049,262095,0,0,0,0,520093696,2147221504,552649600,118481344,-16384,-1,-1,-469762049,131023,0,0,0,0,520290304,2147221504,2029002240,118481344,-16384,-1,-1,-469762049,262031,0,0,0,0,520290304,-266600448,2029001791,125952960,-16384,-1,-1,-469762049,262031,0,0,0,0,1057423360,-266600448,2027953215,133177312,-16384,-1,-1,-134217729,262111,0,0,0,0,1058471936,-266600448,-119531393,133177343,-16384,-1,-1,-134217729,262111,0,0,0,0,1058471936,-2145648640,-253754369,66068479,-16384,-1,-1,-134217729,262111,0,0,0,0,1058471936,236716032,-253754369,15729663,-16384,-1,-1,-134217729,262095,0,0,0,0,1057947648,236716032,-253754369,6348807,-16384,-1,-1,-134217729,262095,0,0,0,0,524222464,236716032,-253690305,6348803,-16384,-1,-1,-134217729,262111,0,0,0,0,521076736,2115764224,-253625344,14737411,-16384,-1,-1,-134217729,262095,0,0,0,0,522125312,2115764224,-253625344,14743555,-16384,-1,-1,-134217729,262111,0,0,16772608,0,1073676288,-31719424,-2014283776,14810115,-16384,-1,-1,-1,262143,0,0,16776704,0,1065287680,-1642594304,-1879178880,14810115,-16384,-1,-1,-1,524287,0,0,16776192,0,2139029504,264241152,-2013396089,14809091,-16384,-1,-1,-1,262095,0,0,16776192,0,2139029504,264241152,-2080636025,14803335,-16384,-1,-1,-1,262087,0,0,16776192,0,2147418112,264241152,-2132803581,14803847,-16384,-1,-1,-402653185,524259,0,0,8386048,0,2147418112,0,-2132688896,123783,-16384,-1,-1,1207959551,262112,0,0,16775168,0,2147418112,0,14794752,1046535,-16384,-1,-1,268435455,262128,0,0,16775168,0,2147418112,0,14712832,1047615,-16384,-1,-1,536870911,524284,0,0,16776705,0,2147418112,0,14680832,1047615,-16384,-1,-1,-1,524287,0,0,16776704,0,2147418112,-1048576,14681087,1046591,-32768,-1,-1,-1,524287,0,0,16776704,0,2147418112,-524288,-2132802561,2080831,-32768,-1,-1,-1,524287,0,0,16776705,0,2147418112,-524288,-31718401,2080831,-32768,-1,-1,-1,1048575,0,0,16776193,0,2147418112,3670016,-31718528,2080831,-32768,-1,-1,-1,524287,0,0,16776195,0,2147418112,3670016,-31718528,134086719,-32768,-1,-1,-1,524287,0,0,16776195,0,2147418112,3670016,253494144,268173368,-32768,-1,-1,-1,524287,0,0,16775171,0,2147418112,3670016,268174208,268173368,-32768,-1,-1,-1,1048575,0,0,16771072,0,2147418112,-63438848,268174223,31457328,-32768,-1,-1,-1,1048575,0,0,10418176,0,-65536,-63438848,133957519,14807040,-32768,-1,-1,-1,2097151,0,0,15923200,0,2147418112,-63438848,1968015,14809095,-32768,-1,-1,-1,1048575,0,0,12808192,0,2147418112,-63438848,2082703,12711943,-32768,-1,-1,-1,2097151,0,0,6420480,0,2147418112,-63438848,2082703,14343,-32768,-1,-1,-1,2097151,0,0,15202304,0,-65536,-63438848,2082703,1849351,-32768,-1,-1,-1,2097151,0,0,15464448,0,-65536,-63438848,264472335,1849351,-32768,-1,-1,-1,4194303,0,0,16371712,0,-65536,-63438848,264472335,14343,-32768,-1,-1,-1,8388607,0,0,0,0,-65536,-63438848,532907791,235010048,-32768,-1,-1,-1,16777215,0,0,0,0,-65536,-63438848,-1603833,235010160,-32768,-1,-1,-1,16777215,0,0,0,0,-65536,3670016,-30976,67238000,-32768,-1,-1,-1,16777215,0,0,0,0,-65536,3670016,-30976,48,-32768,-1,-1,-1,16777215,0,0,0,0,-65536,3670016,-29391104,768,-32768,-1,-1,-1,16777215,0,0,0,0,-65536,3670016,-29391104,768,-32768,-1,-1,-1,16777215,0,0,0,0,-65536,-524287,-65042433,768,-32768,-1,-1,-1,16777215,0,0,0,0,-65536,-524287,2082441215,0,-65536,-1,-1,-1,16777215,0,0,0,0,-13697024,-524287,511,0,-65536,-1,-1,-1,16777215,0,0,0,0,-12648448,1,0,0,-65536,-1,-1,-1,14680063,0,0,0,0,-12648448,1,0,0,-65536,-1,-1,-1,16777215,0,0,0,0,-65536,1,0,0,-65536,-1,-1,-1,14680063,0,0,0,0,-8454144,1,0,0,-65536,-1,-1,-1,12582911,0,0,0,0,-12648448,1,0,0,-65536,-1,-1,-1,2097151,0,0,0,0,-12648448,1,0,0,-65536,-1,-1,-1,1048575,0,0,0,0,-14745600,1,0,0,-65536,-1,-1,-1,3145727,0,0,0,0,1056964608,1,0,0,-65536,-1,-1,-1,1048575,0,0,0,0,1056964608,1,0,0,-65536,-1,-1,-1,1048575,0,0,0,0,1056964608,1,0,0,-65536,-1,-1,-1,524287,0,0,0,0,2130706432,1,0,0,-65536,-1,-1,-1,1048575,0,0,0,0,1056964608,1,0,0,-65536,-1,-1,-1,524287,0,0,0,0,2130706432,1,0,0,-65536,-1,-1,-1,524287,0,0,0,0,2130706432,1,0,0,-65536,-1,-1,-1,1048575,0,0,0,0,2130706432,1,0,0,-65536,-1,-1,-1,1048575,0,0,0,0,50331648,1,0,0,-65536,-1,-1,-1,1048575,0,0,0,0,117440512,1,0,-268435456,-1,-1,-1,-1,524287,0,0,0,0,251658240,1,0,-320,-1,-1,-1,-1,262143,0,0,0,0,520093696,1,-2048,-1,-1,-1,-1,-1,262143,0,0,0,0,1056964608,-16777213,-1,-1,-1,-1,-1,-1,131071,0,0,0,0,-16777216,-121,-1,-1,-1,-1,-1,-1,131071,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,131071,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,131071,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,131071,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,65535,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,65535,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,131071,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,262143,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,524287,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,524287,0,0,0,0,-16777216,-1,-1,-1,-1,-1,-1,-1,589823,0,0,0,0,0,-1,-1,-1,-1,-1,-1,-1,8179,0,0,0,0,50331648,-1,-1,-1,-1,-1,-1,-1,4080,0,0,0,0,117440512,-1,-1,-1,-1,-1,-1,-1,1016,0,0,0,0,251658240,-1,-1,-1,-1,-1,-1,1073741823,1020,0,0,0,0,50331648,-1,-1,-1,-1,-1,-1,536870911,254,0,0,0,0,50331648,-1,-1,-1,-1,-1,-1,536870911,255,0,0,0,0,50331648,-1,-1,-1,-1,-1,-1,-1879048193,127,0,0,0,0,50331648,-1,-1,-1,-1,-1,-1,-469762049,63,0,0,0,0,1191182336,-1,-1,-1,-1,1023999,0,-520093712,15,0,0,0,0,-218103808,-1,-1,-1,-1,0,-8454144,-260046849,7,0,0,0,0,0,-193,-1,-1,-1057947649,-2147483648,-1,-58720257,1,0,0,0,0,0,-251,-1,-1,-1057423361,-2074,-1,-1,0,0,0,0,0,0,-59648,-1,-1,-1,-1,-1,1073741823,0,0,0,0,0,0,-65536,-1,-1,-1,-1,-1,268435455,0,0,0,0,0,0,-65536,-1,-1,-1,-1,-1,67108863,0,0,0,0,0,0,-65536,-1,-1,-1,-1,-1,8388607,0,0,0,0,0,0,0,-403603456,-1,-1,-1,-1,262143,0,0,0,8388656,0,0,0,-1891434496,-1,-1,-1,-1,16383,0,0,0,8388608,0,0,0,-1612513280,-1,-1,-1,-1,63,0,0,0,0,0,0,0,-24320,-1,-1,-1,8388607,0,0,0,0,0,0,0,0,-256,-1,-1,1073741823,1,0,0,0,0,0,0,0,1610612736,-15,-1,-1,16383,0,0,0,0,0,0,0,0,-16646144,-1,-1,251658239,0,0,0,0,0,0,0,0,0,-51200,-1,-1,40959,0,0,0,0,0,0,268419584,103809024,-12713984,-1,-2147483137,4194303,0,0,0,0,0,0,0,402620416,-2144010240,-13631487,-32513,3,20480,0,0,0,0,0,0,0,419299328,0,-262144,-1,0,0,0,0,0,0,0,0,0,0,0,-5832704,268049407,0,0,0,0,0,0,0,0,0,0,0,0,33030144,0,0,0,0,0,0,0,0,0,0,0,0,3670016,0,0,0,0,0,0,0,0,0,0,0,0,1572864,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,458752,0,0,0,0,0,0,0,0,0,0,0,0,229376,0,0,0,0,0,0,0,0,0,0,0,0,32768,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,0,0,0,0,0,0,0,0,0,0,0,8192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,31744,0,0,0,0,0,0,0,0,0,0,0,0,31744,0,0,0,0,0,0,0,0,0,0,0,0,64512,0,0,0,0,0,0,0,0,0,0,0,0,15872,0,0,0,0,0,0,0,0,0,0,0,0,3584,0,0,0,0,0,0,0,0,0,0,0,0,7680,0,0,0,0,0,0,0,0,0,0,0,0,512,0,0,0,0,0,0,0,0,0,0,0,0,3968,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3840,0,0,0,0,0,0,0,0,0,0,0,0,1855,0,0,0,0,0,0,0,0,0,0,0,0,63,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,134217728,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0,0,0,0,0,0,0,0,0,0,-260046848,63,0,0,0,0,0,0,0,0,0,0,0,-17301504,127,0,0,0,0,0,0,0,0,0,0,0,-524288,127,0,0,0,0,0,0,0,0,0,0,0,-262144,127,0,0,0,0,0,0,0,0,0,0,0,-262144,63,0,0,0,0,0,0,0,0,0,0,0,-262144,63,0,0,0,0,0,0,0,0,0,0,0,-262144,63,0,0,0,0,0,0,0,0,0,0,0,-262144,31,0,0,0,0,0,0,0,0,0,0,0,-262144,63,0,0,0,0,3,0,0,0,0,0,0,-262144,63,0,0,0,0,7,0,0,0,0,0,0,-262144,63,0,0,0,0,63,0,0,0,0,0,0,-262144,63,0,0,0,0,511,0,0,0,0,0,0,-524288,31,0,0,0,0,8191,0,0,0,0,0,0,-1048576,63,0,0,0,0,131071,0,0,0,0,0,0,-524288,63,0,0,0,0,262143,0,0,0,0,0,0,-524288,63,0,0,0,0,131071,0,0,0,0,0,0,-1048576,63,0,0,0,0,262143,0,0,0,0,0,0,-1048576,63,0,0,0,0,262143,0,0,0,0,0,0,-1048576,63,0,0,0,0,262143,0,0,0,0,0,0,-1048576,63,0,0,0,0,262143,0,0,0,0,0,0,-2097152,127,0,0,0,0,262143,0,0,0,0,0,0,-2097152,127,0,0,0,0,262143,0,0,0,0,0,0,-1048576,127,0,0,0,0,262143,0,0,0,0,0,0,-1048576,127,0,0,0,0,262143,0,0,0,0,0,0,-2097152,255,0,0,0,0,262143,0,0,0,0,0,0,-2097152,255,0,0,0,0,262142,0,0,0,0,0,0,-2097152,255,0,0,0,0,262142,0,0,0,0,0,0,-2097152,255,0,0,0,0,262142,0,0,0,0,0,0,-2097152,255,0,0,0,0,262140,0,0,0,0,0,0,-2097152,255,0,0,0,0,131068,0,0,0,0,0,0,-4194304,255,0,0,0,0,131068,0,0,0,0,0,0,-4194304,255,0,0,0,0,65528,0,0,0,0,0,0,-8388608,255,0,0,0,0,65528,0,0,0,0,0,0,-8388608,255,0,0,0,0,65528,0,0,0,0,0,0,-8388608,255,0,0,0,0,32760,0,0,0,0,0,0,-8388608,255,0,0,0,0,32760,0,0,0,0,0,0,-16777216,255,0,0,-2147483648,255,16368,0,0,0,0,0,0,-16777216,255,0,0,-536870912,1023,16368,0,0,0,0,0,0,-33554432,255,0,0,-16777216,4095,16352,0,0,0,0,0,0,-33554432,255,0,0,-8388608,262143,16352,0,0,0,0,0,0,-33554432,255,0,0,-1048576,2097151,16352,0,0,0,0,0,0,-67108864,255,0,0,-524288,8388607,16352,0,0,0,0,0,0,-67108864,255,0,0,-262144,16777215,16320,0,0,0,0,0,0,-67108864,255,0,0,-131072,16777215,100679648,0,0,0,0,0,0,-67108864,255,0,0,-16384,16776959,125861824,0,0,0,0,0,0,-134217728,255,0,0,-4096,16773121,62930880,0,0,0,0,0,0,-134217728,127,0,0,2147482624,16252928,32704,0,0,0,0,0,0,-134217728,127,0,0,268435200,14680064,16320,0,0,0,0,0,0,-134217728,127,0,0,134217600,0,32704,0,0,0,0,0,0,-33554432,127,0,1056964608,67108736,0,32704,0,0,0,0,0,0,-33554432,127,0,2130706432,33554368,0,65408,0,0,0,0,0,0,-33554432,127,0,-16777216,8388576,0,32640,0,0,0,0,0,0,-134217728,127,0,-16777216,2097136,0,32640,0,0,0,0,0,0,-134217728,63,0,-16776960,1048573,0,32640,0,0,0,0,0,0,-536870912,63,0,-16776448,1048575,0,32640,0,0,0,0,0,0,-536870912,63,0,-33553664,6291455,66752,32640,0,0,0,0,0,0,-536870912,63,0,2013266688,2097148,229376,32640,0,0,0,0,0,0,-536870912,63,0,256,4194300,229376,32640,0,0,0,0,0,0,-536870912,63,0,0,524280,196608,32512,0,0,8,0,0,0,-1073741824,63,0,0,-200,15,65280,0,0,24,0,0,0,-1073741824,63,0,0,-1867768,127,32512,0,0,56,0,0,0,-1073741824,63,0,0,-1056768,4095,32512,0,0,124,0,0,0,-1073741824,63,0,0,-1050624,8191,32512,0,0,508,0,0,0,-2147483648,31,0,0,-7866368,8191,32512,0,0,1020,0,0,0,-2147483648,31,0,0,-33030656,8095,32512,0,0,2046,0,0,0,-2147483648,63,0,0,-66586624,771,32512,0,0,4094,0,0,0,0,63,0,0,-134184960,1,32256,0,0,8190,0,0,0,0,63,0,0,1610612736,0,32256,0,0,16382,0,0,0,-2147483648,63,0,0,0,0,15872,0,0,32767,0,0,0,-2147483648,31,0,0,0,0,15872,0,-2147483648,65535,0,0,0,-2147483648,31,0,0,0,0,7680,0,0,65535,0,0,0,-2147483648,31,0,0,134217728,0,7680,0,-2147483648,65535,0,0,0,-2147483648,31,0,0,0,0,7680,0,-2147483648,65535,0,0,0,-2147483648,31,0,0,0,0,7680,0,-1073741824,65535,0,0,0,-2147483648,31,0,0,0,0,3072,0,-1073741824,65535,0,0,0,-2147483648,31,0,0,0,0,3072,0,-1073741824,65535,0,0,0,-2147483648,31,0,0,0,0,0,0,-2147483648,65535,0,0,0,-2147483648,31,0,0,0,0,0,0,-1073741824,65535,0,0,0,0,31,0,0,0,0,0,0,-1073741824,65535,0,0,0,0,31,0,0,0,0,0,0,-2147483648,65535,0,0,0,0,30,0,0,0,0,0,0,-1073741824,65535,0,0,0,0,30,0,0,0,0,0,0,-2147483648,65535,0,0,0,0,30,0,0,0,0,0,0,0,65535,0,0,0,0,28,0,0,0,0,0,0,0,65535,0,0,0,0,28,0,0,0,0,0,0,0,65535,0,0,0,0,28,0,0,0,0,0,0,0,65535,0,0,0,0,24,0,0,0,0,0,0,-2147483648,65535,0,0,0,0,0,0,0,0,0,0,0,-536870912,65535);//[$offset] |= intval32bits(1 << ($x & 0x1f)); + $bob = $this->bits[$offset]; + $bob |= 1 << ($x & 0x1f); + $this->bits[$offset] |= ($bob); + //$this->bits[$offset] = intval32bits($this->bits[$offset]); + + //} +//16777216 + } + + public function _unset($x, $y) + {//было unset, php не позволяет использовать unset + $offset = (int)($y * $this->rowSize + ($x / 32)); + $this->bits[$offset] &= ~(1 << ($x & 0x1f)); + } + + /**1 << (249 & 0x1f) + *

                            Flips the given bit.

                            + * + * @param $x ; The horizontal component (i.e. which column) + * @param $y ; The vertical component (i.e. which row) + */ + public function flip($x, $y) + { + $offset = $y * $this->rowSize + (int)($x / 32); + + $this->bits[$offset] = ($this->bits[$offset] ^ (1 << ($x & 0x1f))); + } + + /** + * Exclusive-or (XOR): Flip the bit in this {@code BitMatrix} if the corresponding + * mask bit is set. + * + * @param $mask ; XOR mask + */ + public function _xor($mask) + {//было xor, php не позволяет использовать xor + if ($this->width != $mask->getWidth() || $this->height != $mask->getHeight() + || $this->rowSize != $mask->getRowSize()) { + throw new \InvalidArgumentException("input matrix dimensions do not match"); + } + $rowArray = new BitArray($this->width / 32 + 1); + for ($y = 0; $y < $this->height; $y++) { + $offset = $y * $this->rowSize; + $row = $mask->getRow($y, $rowArray)->getBitArray(); + for ($x = 0; $x < $this->rowSize; $x++) { + $this->bits[$offset + $x] ^= $row[$x]; + } + } + } + + /** + * Clears all bits (sets to false). + */ + public function clear() + { + $max = count($this->bits); + for ($i = 0; $i < $max; $i++) { + $this->bits[$i] = 0; + } + } + + /** + *

                            Sets a square region of the bit matrix to true.

                            + * + * @param $left ; The horizontal position to begin at (inclusive) + * @param $top ; The vertical position to begin at (inclusive) + * @param $width ; The width of the region + * @param $height ; The height of the region + */ + public function setRegion($left, $top, $width, $height) + { + if ($top < 0 || $left < 0) { + throw new \InvalidArgumentException("Left and top must be nonnegative"); + } + if ($height < 1 || $width < 1) { + throw new \InvalidArgumentException("Height and width must be at least 1"); + } + $right = $left + $width; + $bottom = $top + $height; + if ($bottom > $this->height || $right > $this->width) { //> this.height || right > this.width + throw new \InvalidArgumentException("The region must fit inside the matrix"); + } + for ($y = $top; $y < $bottom; $y++) { + $offset = $y * $this->rowSize; + for ($x = $left; $x < $right; $x++) { + $this->bits[$offset + (int)($x / 32)] = ($this->bits[$offset + (int)($x / 32)] |= 1 << ($x & 0x1f)); + } + } + } + + /** + * Modifies this {@code BitMatrix} to represent the same but rotated 180 degrees + */ + public function rotate180() + { + $width = $this->getWidth(); + $height = $this->getHeight(); + $topRow = new BitArray($width); + $bottomRow = new BitArray($width); + for ($i = 0; $i < ($height + 1) / 2; $i++) { + $topRow = $this->getRow($i, $topRow); + $bottomRow = $this->getRow($height - 1 - $i, $bottomRow); + $topRow->reverse(); + $bottomRow->reverse(); + $this->setRow($i, $bottomRow); + $this->setRow($height - 1 - $i, $topRow); + } + } + + /** + * @return The width of the matrix + */ + public function getWidth() + { + return $this->width; + } + + /** + * A fast method to retrieve one row of data from the matrix as a BitArray. + * + * @param $y ; The row to retrieve + * @param $row ; An optional caller-allocated BitArray, will be allocated if null or too small + * + * @return The resulting BitArray - this reference should always be used even when passing + * your own row + */ + public function getRow($y, $row) + { + if ($row == null || $row->getSize() < $this->width) { + $row = new BitArray($this->width); + } else { + $row->clear(); + } + $offset = $y * $this->rowSize; + for ($x = 0; $x < $this->rowSize; $x++) { + $row->setBulk($x * 32, $this->bits[$offset + $x]); + } + + return $row; + } + + /** + * @param $y ; row to set + * @param $row ; {@link BitArray} to copy from + */ + public function setRow($y, $row) + { + $this->bits = arraycopy($row->getBitArray(), 0, $this->bits, $y * $this->rowSize, $this->rowSize); + } + + /** + * This is useful in detecting the enclosing rectangle of a 'pure' barcode. + * + * @return {@code left,top,width,height} enclosing rectangle of all 1 bits, or null if it is all white + */ + public function getEnclosingRectangle() + { + $left = $this->width; + $top = $this->height; + $right = -1; + $bottom = -1; + + for ($y = 0; $y < $this->height; $y++) { + for ($x32 = 0; $x32 < $this->rowSize; $x32++) { + $theBits = $this->bits[$y * $this->rowSize + $x32]; + if ($theBits != 0) { + if ($y < $top) { + $top = $y; + } + if ($y > $bottom) { + $bottom = $y; + } + if ($x32 * 32 < $left) { + $bit = 0; + while (($theBits << (31 - $bit)) == 0) { + $bit++; + } + if (($x32 * 32 + $bit) < $left) { + $left = $x32 * 32 + $bit; + } + } + if ($x32 * 32 + 31 > $right) { + $bit = 31; + while ((sdvig3($theBits, $bit)) == 0) {//>>> + $bit--; + } + if (($x32 * 32 + $bit) > $right) { + $right = $x32 * 32 + $bit; + } + } + } + } + } + + $width = $right - $left; + $height = $bottom - $top; + + if ($width < 0 || $height < 0) { + return null; + } + + return [$left, $top, $width, $height]; + } + + /** + * This is useful in detecting a corner of a 'pure' barcode. + * + * @return {@code x,y} coordinate of top-left-most 1 bit, or null if it is all white + */ + public function getTopLeftOnBit() + { + $bitsOffset = 0; + while ($bitsOffset < count($this->bits) && $this->bits[$bitsOffset] == 0) { + $bitsOffset++; + } + if ($bitsOffset == count($this->bits)) { + return null; + } + $y = $bitsOffset / $this->rowSize; + $x = ($bitsOffset % $this->rowSize) * 32; + + $theBits = $this->bits[$bitsOffset]; + $bit = 0; + while (($theBits << (31 - $bit)) == 0) { + $bit++; + } + $x += $bit; + + return [$x, $y]; + } + + public function getBottomRightOnBit() + { + $bitsOffset = count($this->bits) - 1; + while ($bitsOffset >= 0 && $this->bits[$bitsOffset] == 0) { + $bitsOffset--; + } + if ($bitsOffset < 0) { + return null; + } + + $y = $bitsOffset / $this->rowSize; + $x = ($bitsOffset % $this->rowSize) * 32; + + $theBits = $this->bits[$bitsOffset]; + $bit = 31; + while ((sdvig3($theBits, $bit)) == 0) {//>>> + $bit--; + } + $x += $bit; + + return [$x, $y]; + } + + /** + * @return The height of the matrix + */ + public function getHeight() + { + return $this->height; + } + + /** + * @return The row size of the matrix + */ + public function getRowSize() + { + return $this->rowSize; + } + + public function equals($o) + { + if (!($o instanceof BitMatrix)) { + return false; + } + $other = $o; + + return $this->width == $other->width + && $this->height == $other->height + && $this->rowSize == $other->rowSize + && $this->bits === $other->bits; + } + + //@Override + + public function hashCode() + { + $hash = $this->width; + $hash = 31 * $hash + $this->width; + $hash = 31 * $hash + $this->height; + $hash = 31 * $hash + $this->rowSize; + $hash = 31 * $hash + hashCode($this->bits); + + return $hash; + } + + //@Override + + public function toString($setString = '', $unsetString = '', $lineSeparator = '') + { + if (!$setString || !$unsetString) { + return (string)'X ' . ' '; + } + if ($lineSeparator && $lineSeparator !== "\n") { + return $this->toString_($setString, $unsetString, $lineSeparator); + } + + return (string)($setString . $unsetString . "\n"); + } + + public function toString_($setString, $unsetString, $lineSeparator) + { + //$result = new StringBuilder(height * (width + 1)); + $result = ''; + for ($y = 0; $y < $this->height; $y++) { + for ($x = 0; $x < $this->width; $x++) { + $result .= ($this->get($x, $y) ? $setString : $unsetString); + } + $result .= ($lineSeparator); + } + + return (string)$result; + } + + /** + * @deprecated call {@link #toString(String,String)} only, which uses \n line separator always + */ + // @Deprecated + /** + *

                            Gets the requested bit, where true means black.

                            + * + * @param $x ; The horizontal component (i.e. which column) + * @param $y ; The vertical component (i.e. which row) + * + * @return value of given bit in matrix + */ + public function get($x, $y) + { + + $offset = (int)($y * $this->rowSize + ($x / 32)); + if (!isset($this->bits[$offset])) { + $this->bits[$offset] = 0; + } + + // return (($this->bits[$offset] >> ($x & 0x1f)) & 1) != 0; + return (uRShift($this->bits[$offset], ($x & 0x1f)) & 1) != 0;//было >>> вместо >>, не знаю как эмулировать беззнаковый сдвиг + } + +// @Override + + public function _clone() + { + return new BitMatrix($this->width, $this->height, $this->rowSize, $this->bits); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/BitSource.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/BitSource.php new file mode 100755 index 0000000..0ce7f4c --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/BitSource.php @@ -0,0 +1,118 @@ +This provides an easy abstraction to read bits at a time from a sequence of bytes, where the + * number of bits read is not often a multiple of 8.

                            + * + *

                            This class is thread-safe but not reentrant -- unless the caller modifies the bytes array + * it passed in, in which case all bets are off.

                            + * + * @author Sean Owen + */ +final class BitSource +{ + + private $bytes; + private $byteOffset = 0; + private $bitOffset = 0; + + /** + * @param bytes bytes from which this will read bits. Bits will be read from the first byte first. + * Bits are read within a byte from most-significant to least-significant bit. + */ + public function __construct($bytes) + { + $this->bytes = $bytes; + } + + /** + * @return index of next bit in current byte which would be read by the next call to {@link #readBits(int)}. + */ + public function getBitOffset() + { + return $this->bitOffset; + } + + /** + * @return index of next byte in input byte array which would be read by the next call to {@link #readBits(int)}. + */ + public function getByteOffset() + { + return $this->byteOffset; + } + + /** + * @param numBits number of bits to read + * + * @return int representing the bits read. The bits will appear as the least-significant + * bits of the int + * @throws IllegalArgumentException if numBits isn't in [1,32] or more than is available + */ + public function readBits($numBits) + { + if ($numBits < 1 || $numBits > 32 || $numBits > $this->available()) { + throw new \InvalidArgumentException(strval($numBits)); + } + + $result = 0; + + // First, read remainder from current byte + if ($this->bitOffset > 0) { + $bitsLeft = 8 - $this->bitOffset; + $toRead = $numBits < $bitsLeft ? $numBits : $bitsLeft; + $bitsToNotRead = $bitsLeft - $toRead; + $mask = (0xFF >> (8 - $toRead)) << $bitsToNotRead; + $result = ($this->bytes[$this->byteOffset] & $mask) >> $bitsToNotRead; + $numBits -= $toRead; + $this->bitOffset += $toRead; + if ($this->bitOffset == 8) { + $this->bitOffset = 0; + $this->byteOffset++; + } + } + + // Next read whole bytes + if ($numBits > 0) { + while ($numBits >= 8) { + $result = ($result << 8) | ($this->bytes[$this->byteOffset] & 0xFF); + $this->byteOffset++; + $numBits -= 8; + } + + // Finally read a partial byte + if ($numBits > 0) { + $bitsToNotRead = 8 - $numBits; + $mask = (0xFF >> $bitsToNotRead) << $bitsToNotRead; + $result = ($result << $numBits) | (($this->bytes[$this->byteOffset] & $mask) >> $bitsToNotRead); + $this->bitOffset += $numBits; + } + } + + return $result; + } + + /** + * @return number of bits that can be read successfully + */ + public function available() + { + return 8 * (count($this->bytes) - $this->byteOffset) - $this->bitOffset; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/CharacterSetECI.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/CharacterSetECI.php new file mode 100755 index 0000000..086d593 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/CharacterSetECI.php @@ -0,0 +1,158 @@ + self::ISO8859_1, + 'ISO-8859-2' => self::ISO8859_2, + 'ISO-8859-3' => self::ISO8859_3, + 'ISO-8859-4' => self::ISO8859_4, + 'ISO-8859-5' => self::ISO8859_5, + 'ISO-8859-6' => self::ISO8859_6, + 'ISO-8859-7' => self::ISO8859_7, + 'ISO-8859-8' => self::ISO8859_8, + 'ISO-8859-9' => self::ISO8859_9, + 'ISO-8859-10' => self::ISO8859_10, + 'ISO-8859-11' => self::ISO8859_11, + 'ISO-8859-12' => self::ISO8859_12, + 'ISO-8859-13' => self::ISO8859_13, + 'ISO-8859-14' => self::ISO8859_14, + 'ISO-8859-15' => self::ISO8859_15, + 'ISO-8859-16' => self::ISO8859_16, + 'SHIFT-JIS' => self::SJIS, + 'WINDOWS-1250' => self::CP1250, + 'WINDOWS-1251' => self::CP1251, + 'WINDOWS-1252' => self::CP1252, + 'WINDOWS-1256' => self::CP1256, + 'UTF-16BE' => self::UNICODE_BIG_UNMARKED, + 'UTF-8' => self::UTF8, + 'ASCII' => self::ASCII, + 'GBK' => self::GB18030, + 'EUC-KR' => self::EUC_KR, + ]; + /**#@-*/ + /** + * Additional possible values for character sets. + * + * @var array + */ + protected static $additionalValues = [ + self::CP437 => 2, + self::ASCII => 170, + ]; + private static $name = null; + + /** + * Gets character set ECI by value. + * + * @param string $name + * + * @return CharacterSetEci|null + */ + public static function getCharacterSetECIByValue($value) + { + if ($value < 0 || $value >= 900) { + throw new \InvalidArgumentException('Value must be between 0 and 900'); + } + if (false !== ($key = array_search($value, self::$additionalValues))) { + $value = $key; + } + array_search($value, self::$nameToEci); + try { + self::setName($value); + + return new self($value); + } catch (\UnexpectedValueException $e) { + return null; + } + } + + private static function setName($value) + { + foreach (self::$nameToEci as $name => $key) { + if ($key == $value) { + self::$name = $name; + + return true; + } + } + if (self::$name == null) { + foreach (self::$additionalValues as $name => $key) { + if ($key == $value) { + self::$name = $name; + + return true; + } + } + } + } + + /** + * Gets character set ECI name. + * + * @return character set ECI name|null + */ + public static function name() + { + return self::$name; + } + + /** + * Gets character set ECI by name. + * + * @param string $name + * + * @return CharacterSetEci|null + */ + public static function getCharacterSetECIByName($name) + { + $name = strtoupper($name); + if (isset(self::$nameToEci[$name])) { + return new self(self::$nameToEci[$name]); + } + + return null; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DecoderResult.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DecoderResult.php new file mode 100755 index 0000000..22aee04 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DecoderResult.php @@ -0,0 +1,122 @@ +Encapsulates the result of decoding a matrix of bits. This typically + * applies to 2D barcode formats. For now it contains the raw bytes obtained, + * as well as a String interpretation of those bytes, if applicable.

                            + * + * @author Sean Owen + */ +final class DecoderResult +{ + + private $rawBytes; + private $text; + private $byteSegments; + private $ecLevel; + private $errorsCorrected; + private $erasures; + private $other; + private $structuredAppendParity; + private $structuredAppendSequenceNumber; + + + public function __construct( + $rawBytes, + $text, + $byteSegments, + $ecLevel, + $saSequence = -1, + $saParity = -1 + ) { + $this->rawBytes = $rawBytes; + $this->text = $text; + $this->byteSegments = $byteSegments; + $this->ecLevel = $ecLevel; + $this->structuredAppendParity = $saParity; + $this->structuredAppendSequenceNumber = $saSequence; + } + + public function getRawBytes() + { + return $this->rawBytes; + } + + public function getText() + { + return $this->text; + } + + public function getByteSegments() + { + return $this->byteSegments; + } + + public function getECLevel() + { + return $this->ecLevel; + } + + public function getErrorsCorrected() + { + return $this->errorsCorrected; + } + + public function setErrorsCorrected($errorsCorrected) + { + $this->errorsCorrected = $errorsCorrected; + } + + public function getErasures() + { + return $this->erasures; + } + + public function setErasures($erasures) + { + $this->erasures = $erasures; + } + + public function getOther() + { + return $this->other; + } + + public function setOther($other) + { + $this->other = $other; + } + + public function hasStructuredAppend() + { + return $this->structuredAppendParity >= 0 && $this->structuredAppendSequenceNumber >= 0; + } + + public function getStructuredAppendParity() + { + return $this->structuredAppendParity; + } + + public function getStructuredAppendSequenceNumber() + { + return $this->structuredAppendSequenceNumber; + } + +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DefaultGridSampler.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DefaultGridSampler.php new file mode 100755 index 0000000..d2326d3 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DefaultGridSampler.php @@ -0,0 +1,93 @@ +sampleGrid_($image, $dimensionX, $dimensionY, $transform); + } + +//@Override + public function sampleGrid_( + $image, + $dimensionX, + $dimensionY, + $transform + ) { + if ($dimensionX <= 0 || $dimensionY <= 0) { + throw NotFoundException::getNotFoundInstance(); + } + $bits = new BitMatrix($dimensionX, $dimensionY); + $points = fill_array(0, 2 * $dimensionX, 0.0); + for ($y = 0; $y < $dimensionY; $y++) { + $max = count($points); + $iValue = (float)$y + 0.5; + for ($x = 0; $x < $max; $x += 2) { + $points[$x] = (float)($x / 2) + 0.5; + $points[$x + 1] = $iValue; + } + $transform->transformPoints($points); +// Quick check to see if points transformed to something inside the image; +// sufficient to check the endpoints + $this->checkAndNudgePoints($image, $points); + try { + for ($x = 0; $x < $max; $x += 2) { + if ($image->get((int)$points[$x], (int)$points[$x + 1])) { +// Black(-ish) pixel + $bits->set($x / 2, $y); + } + } + } catch (\Exception $aioobe) {//ArrayIndexOutOfBoundsException +// This feels wrong, but, sometimes if the finder patterns are misidentified, the resulting +// transform gets "twisted" such that it maps a straight line of points to a set of points +// whose endpoints are in bounds, but others are not. There is probably some mathematical +// way to detect this about the transformation that I don't know yet. +// This results in an ugly runtime exception despite our clever checks above -- can't have +// that. We could check each point's coordinates but that feels duplicative. We settle for +// catching and wrapping ArrayIndexOutOfBoundsException. + throw NotFoundException::getNotFoundInstance(); + } + } + + return $bits; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Detector/MathUtils.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Detector/MathUtils.php new file mode 100755 index 0000000..e88cfc8 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Detector/MathUtils.php @@ -0,0 +1,49 @@ +A somewhat generic detector that looks for a barcode-like rectangular region within an image. + * It looks within a mostly white region of an image for a region of black and white, but mostly + * black. It returns the four corners of the region, as best it can determine.

                            + * + * @author Sean Owen + * @port Ashot Khanamiryan + */ +class MonochromeRectangleDetector +{ + private static $MAX_MODULES = 32; + private $image; + + public function __construct(BinaryBitmap $image) + { + $this->image = $image; + + } + + /** + *

                            Detects a rectangular region of black and white -- mostly black -- with a region of mostly + * white, in an image.

                            + * + * @return {@link ResultPoint}[] describing the corners of the rectangular region. The first and + * last points are opposed on the diagonal, as are the second and third. The first point will be + * the topmost point and the last, the bottommost. The second point will be leftmost and the + * third, the rightmost + * @throws NotFoundException if no Data Matrix Code can be found + */ + public function detect() + { + + $height = $this->image->getHeight(); + $width = $this->image->getWidth(); + $halfHeight = $height / 2; + $halfWidth = $width / 2; + + $deltaY = max(1, $height / (self::$MAX_MODULES * 8)); + $deltaX = max(1, $width / (self::$MAX_MODULES * 8)); + + + $top = 0; + $bottom = $height; + $left = 0; + $right = $width; + $pointA = $this->findCornerFromCenter($halfWidth, 0, $left, $right, + $halfHeight, -$deltaY, $top, $bottom, $halfWidth / 2); + $top = (int)$pointA->getY() - 1; + $pointB = $this->findCornerFromCenter($halfWidth, -$deltaX, $left, $right, + $halfHeight, 0, $top, $bottom, $halfHeight / 2); + $left = (int)$pointB->getX() - 1; + $pointC = $this->findCornerFromCenter($halfWidth, $deltaX, $left, $right, + $halfHeight, 0, $top, $bottom, $halfHeight / 2); + $right = (int)$pointC->getX() + 1; + $pointD = $this->findCornerFromCenter($halfWidth, 0, $left, $right, + $halfHeight, $deltaY, $top, $bottom, $halfWidth / 2); + $bottom = (int)$pointD->getY() + 1; + + // Go try to find po$A again with better information -- might have been off at first. + $pointA = $this->findCornerFromCenter($halfWidth, 0, $left, $right, + $halfHeight, -$deltaY, $top, $bottom, $halfWidth / 4); + + return new ResultPoint($pointA, $pointB, $pointC, $pointD); + + } + + + /** + * Attempts to locate a corner of the barcode by scanning up, down, left or right from a center + * point which should be within the barcode. + * + * @param float $centerX center's x component (horizontal) + * @param float $deltaX same as deltaY but change in x per step instead + * @param float $left minimum value of x + * @param float $right maximum value of x + * @param float $centerY center's y component (vertical) + * @param float $deltaY change in y per step. If scanning up this is negative; down, positive; + * left or right, 0 + * @param float $top minimum value of y to search through (meaningless when di == 0) + * @param float $bottom maximum value of y + * @param float $maxWhiteRun maximum run of white pixels that can still be considered to be within + * the barcode + * + * @return ResultPoint $a {@link com.google.zxing.ResultPoint} encapsulating the corner that was found + * @throws NotFoundException if such a point cannot be found + */ + private function findCornerFromCenter($centerX, + $deltaX, + $left, + $right, + $centerY, + $deltaY, + $top, + $bottom, + $maxWhiteRun) + { + $lastRange = null; + for ($y = $centerY, $x = $centerX; + $y < $bottom && $y >= $top && $x < $right && $x >= $left; + $y += $deltaY, $x += $deltaX) { + $range = 0; + if ($deltaX == 0) { + // horizontal slices, up and down + $range = $this->blackWhiteRange($y, $maxWhiteRun, $left, $right, true); + } else { + // vertical slices, left and right + $range = $this->blackWhiteRange($x, $maxWhiteRun, $top, $bottom, false); + } + if ($range == null) { + if ($lastRange == null) { + throw NotFoundException::getNotFoundInstance(); + } + // lastRange was found + if ($deltaX == 0) { + $lastY = $y - $deltaY; + if ($lastRange[0] < $centerX) { + if ($lastRange[1] > $centerX) { + // straddle, choose one or the other based on direction + return new ResultPoint($deltaY > 0 ? $lastRange[0] : $lastRange[1], $lastY); + } + + return new ResultPoint($lastRange[0], $lastY); + } else { + return new ResultPoint($lastRange[1], $lastY); + } + } else { + $lastX = $x - $deltaX; + if ($lastRange[0] < $centerY) { + if ($lastRange[1] > $centerY) { + return new ResultPoint($lastX, $deltaX < 0 ? $lastRange[0] : $lastRange[1]); + } + + return new ResultPoint($lastX, $lastRange[0]); + } else { + return new ResultPoint($lastX, $lastRange[1]); + } + } + } + $lastRange = $range; + } + throw NotFoundException::getNotFoundInstance(); + } + + + /** + * Computes the start and end of a region of pixels, either horizontally or vertically, that could + * be part of a Data Matrix barcode. + * + * @param fixedDimension if scanning horizontally, this is the row (the fixed vertical location) + * where we are scanning. If scanning vertically it's the column, the fixed horizontal location + * @param maxWhiteRun largest run of white pixels that can still be considered part of the + * barcode region + * @param minDim minimum pixel location, horizontally or vertically, to consider + * @param maxDim maximum pixel location, horizontally or vertically, to consider + * @param horizontal if true, we're scanning left-right, instead of up-down + * + * @return int[] with start and end of found range, or null if no such range is found + * (e.g. only white was found) + */ + + private function blackWhiteRange($fixedDimension, $maxWhiteRun, $minDim, $maxDim, $horizontal) + { + $center = ($minDim + $maxDim) / 2; + + // Scan left/up first + $start = $center; + while ($start >= $minDim) { + if ($horizontal ? $this->image->get($start, $fixedDimension) : $this->image->get($fixedDimension, $start)) { + $start--; + } else { + $whiteRunStart = $start; + do { + $start--; + } while ($start >= $minDim && !($horizontal ? $this->image->get($start, $fixedDimension) : + $this->image->get($fixedDimension, $start))); + $whiteRunSize = $whiteRunStart - $start; + if ($start < $minDim || $whiteRunSize > $maxWhiteRun) { + $start = $whiteRunStart; + break; + } + } + } + $start++; + + // Then try right/down + $end = $center; + while ($end < $maxDim) { + if ($horizontal ? $this->image->get($end, $fixedDimension) : $this->image->get($fixedDimension, $end)) { + $end++; + } else { + $whiteRunStart = $end; + do { + $end++; + } while ($end < $maxDim && !($horizontal ? $this->image->get($end, $fixedDimension) : + $this->image->get($fixedDimension, $end))); + $whiteRunSize = $end - $whiteRunStart; + if ($end >= $maxDim || $whiteRunSize > $maxWhiteRun) { + $end = $whiteRunStart; + break; + } + } + } + $end--; + + return $end > $start ? [$start, $end] : null; + } +} \ No newline at end of file diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DetectorResult.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DetectorResult.php new file mode 100755 index 0000000..d2e9bc8 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DetectorResult.php @@ -0,0 +1,47 @@ +Encapsulates the result of detecting a barcode in an image. This includes the raw + * matrix of black/white pixels corresponding to the barcode, and possibly points of interest + * in the image, like the location of finder patterns or corners of the barcode in the image.

                            + * + * @author Sean Owen + */ +class DetectorResult +{ + private $bits; + private $points; + + public function __construct($bits, $points) + { + $this->bits = $bits; + $this->points = $points; + } + + public final function getBits() + { + return $this->bits; + } + + public final function getPoints() + { + return $this->points; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/GlobalHistogramBinarizer.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/GlobalHistogramBinarizer.php new file mode 100755 index 0000000..267c3f0 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/GlobalHistogramBinarizer.php @@ -0,0 +1,207 @@ +luminances = self::$EMPTY; + $this->buckets = fill_array(0, self::$LUMINANCE_BUCKETS, 0); + $this->source = $source; + } + + // Applies simple sharpening to the row data to improve performance of the 1D Readers. + public function getBlackRow($y, $row = null) + { + $this->source = $this->getLuminanceSource(); + $width = $this->source->getWidth(); + if ($row == null || $row->getSize() < $width) { + $row = new BitArray($width); + } else { + $row->clear(); + } + + $this->initArrays($width); + $localLuminances = $this->source->getRow($y, $this->luminances); + $localBuckets = $this->buckets; + for ($x = 0; $x < $width; $x++) { + $pixel = $localLuminances[$x] & 0xff; + $localBuckets[$pixel >> self::$LUMINANCE_SHIFT]++; + } + $blackPoint = self::estimateBlackPoint($localBuckets); + + $left = $localLuminances[0] & 0xff; + $center = $localLuminances[1] & 0xff; + for ($x = 1; $x < $width - 1; $x++) { + $right = $localLuminances[$x + 1] & 0xff; + // A simple -1 4 -1 box filter with a weight of 2. + $luminance = (($center * 4) - $left - $right) / 2; + if ($luminance < $blackPoint) { + $row->set($x); + } + $left = $center; + $center = $right; + } + + return $row; + } + + // Does not sharpen the data, as this call is intended to only be used by 2D Readers. + private function initArrays($luminanceSize) + { + if (count($this->luminances) < $luminanceSize) { + $this->luminances = []; + } + for ($x = 0; $x < self::$LUMINANCE_BUCKETS; $x++) { + $this->buckets[$x] = 0; + } + } + + private static function estimateBlackPoint($buckets) + { + // Find the tallest peak in the histogram. + $numBuckets = count($buckets); + $maxBucketCount = 0; + $firstPeak = 0; + $firstPeakSize = 0; + for ($x = 0; $x < $numBuckets; $x++) { + if ($buckets[$x] > $firstPeakSize) { + $firstPeak = $x; + $firstPeakSize = $buckets[$x]; + } + if ($buckets[$x] > $maxBucketCount) { + $maxBucketCount = $buckets[$x]; + } + } + + // Find the second-tallest peak which is somewhat far from the tallest peak. + $secondPeak = 0; + $secondPeakScore = 0; + for ($x = 0; $x < $numBuckets; $x++) { + $distanceToBiggest = $x - $firstPeak; + // Encourage more distant second peaks by multiplying by square of distance. + $score = $buckets[$x] * $distanceToBiggest * $distanceToBiggest; + if ($score > $secondPeakScore) { + $secondPeak = $x; + $secondPeakScore = $score; + } + } + + // Make sure firstPeak corresponds to the black peak. + if ($firstPeak > $secondPeak) { + $temp = $firstPeak; + $firstPeak = $secondPeak; + $secondPeak = $temp; + } + + // If there is too little contrast in the image to pick a meaningful black point, throw rather + // than waste time trying to decode the image, and risk false positives. + if ($secondPeak - $firstPeak <= $numBuckets / 16) { + throw NotFoundException::getNotFoundInstance(); + } + + // Find a valley between them that is low and closer to the white peak. + $bestValley = $secondPeak - 1; + $bestValleyScore = -1; + for ($x = $secondPeak - 1; $x > $firstPeak; $x--) { + $fromFirst = $x - $firstPeak; + $score = $fromFirst * $fromFirst * ($secondPeak - $x) * ($maxBucketCount - $buckets[$x]); + if ($score > $bestValleyScore) { + $bestValley = $x; + $bestValleyScore = $score; + } + } + + return ($bestValley << self::$LUMINANCE_SHIFT); + } + + public function getBlackMatrix() + { + $source = $this->getLuminanceSource(); + $width = $source->getWidth(); + $height = $source->getHeight(); + $matrix = new BitMatrix($width, $height); + + // Quickly calculates the histogram by sampling four rows from the image. This proved to be + // more robust on the blackbox tests than sampling a diagonal as we used to do. + $this->initArrays($width); + $localBuckets = $this->buckets; + for ($y = 1; $y < 5; $y++) { + $row = (int)($height * $y / 5); + $localLuminances = $source->getRow($row, $this->luminances); + $right = (int)(($width * 4) / 5); + for ($x = (int)($width / 5); $x < $right; $x++) { + $pixel = ($localLuminances[(int)($x)] & 0xff); + $localBuckets[($pixel >> self::$LUMINANCE_SHIFT)]++; + } + } + $blackPoint = self::estimateBlackPoint($localBuckets); + + // We delay reading the entire image luminance until the black point estimation succeeds. + // Although we end up reading four rows twice, it is consistent with our motto of + // "fail quickly" which is necessary for continuous scanning. + $localLuminances = $source->getMatrix(); + for ($y = 0; $y < $height; $y++) { + $offset = $y * $width; + for ($x = 0; $x < $width; $x++) { + $pixel = (int)($localLuminances[$offset + $x] & 0xff); + if ($pixel < $blackPoint) { + $matrix->set($x, $y); + } + } + } + + return $matrix; + } + + public function createBinarizer($source) + { + return new GlobalHistogramBinarizer($source); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/GridSampler.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/GridSampler.php new file mode 100755 index 0000000..affea31 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/GridSampler.php @@ -0,0 +1,188 @@ +Checks a set of points that have been transformed to sample points on an image against + * the image's dimensions to see if the point are even within the image.

                            + * + *

                            This method will actually "nudge" the endpoints back onto the image if they are found to be + * barely (less than 1 pixel) off the image. This accounts for imperfect detection of finder + * patterns in an image where the QR Code runs all the way to the image border.

                            + * + *

                            For efficiency, the method will check points from either end of the line until one is found + * to be within the image. Because the set of points are assumed to be linear, this is valid.

                            + * + * @param image image into which the points should map + * @param points actual points in x1,y1,...,xn,yn form + * + * @throws NotFoundException if an endpoint is lies outside the image boundaries + */ + protected static function checkAndNudgePoints( + $image, + $points + ) { + $width = $image->getWidth(); + $height = $image->getHeight(); +// Check and nudge points from start until we see some that are OK: + $nudged = true; + for ($offset = 0; $offset < count($points) && $nudged; $offset += 2) { + $x = (int)$points[$offset]; + $y = (int)$points[$offset + 1]; + if ($x < -1 || $x > $width || $y < -1 || $y > $height) { + throw NotFoundException::getNotFoundInstance(); + } + $nudged = false; + if ($x == -1) { + $points[$offset] = 0.0; + $nudged = true; + } else if ($x == $width) { + $points[$offset] = $width - 1; + $nudged = true; + } + if ($y == -1) { + $points[$offset + 1] = 0.0; + $nudged = true; + } else if ($y == $height) { + $points[$offset + 1] = $height - 1; + $nudged = true; + } + } +// Check and nudge points from end: + $nudged = true; + for ($offset = count($points) - 2; $offset >= 0 && $nudged; $offset -= 2) { + $x = (int)$points[$offset]; + $y = (int)$points[$offset + 1]; + if ($x < -1 || $x > $width || $y < -1 || $y > $height) { + throw NotFoundException::getNotFoundInstance(); + } + $nudged = false; + if ($x == -1) { + $points[$offset] = 0.0; + $nudged = true; + } else if ($x == $width) { + $points[$offset] = $width - 1; + $nudged = true; + } + if ($y == -1) { + $points[$offset + 1] = 0.0; + $nudged = true; + } else if ($y == $height) { + $points[$offset + 1] = $height - 1; + $nudged = true; + } + } + } + + /** + * Samples an image for a rectangular matrix of bits of the given dimension. The sampling + * transformation is determined by the coordinates of 4 points, in the original and transformed + * image space. + * + * @param image image to sample + * @param dimensionX width of {@link BitMatrix} to sample from image + * @param dimensionY height of {@link BitMatrix} to sample from image + * @param p1ToX point 1 preimage X + * @param p1ToY point 1 preimage Y + * @param p2ToX point 2 preimage X + * @param p2ToY point 2 preimage Y + * @param p3ToX point 3 preimage X + * @param p3ToY point 3 preimage Y + * @param p4ToX point 4 preimage X + * @param p4ToY point 4 preimage Y + * @param p1FromX point 1 image X + * @param p1FromY point 1 image Y + * @param p2FromX point 2 image X + * @param p2FromY point 2 image Y + * @param p3FromX point 3 image X + * @param p3FromY point 3 image Y + * @param p4FromX point 4 image X + * @param p4FromY point 4 image Y + * + * @return {@link BitMatrix} representing a grid of points sampled from the image within a region + * defined by the "from" parameters + * @throws NotFoundException if image can't be sampled, for example, if the transformation defined + * by the given points is invalid or results in sampling outside the image boundaries + */ + public abstract function sampleGrid( + $image, + $dimensionX, + $dimensionY, + $p1ToX, $p1ToY, + $p2ToX, $p2ToY, + $p3ToX, $p3ToY, + $p4ToX, $p4ToY, + $p1FromX, $p1FromY, + $p2FromX, $p2FromY, + $p3FromX, $p3FromY, + $p4FromX, $p4FromY + ); + + public abstract function sampleGrid_( + $image, + $dimensionX, + $dimensionY, + $transform + ); + +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/HybridBinarizer.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/HybridBinarizer.php new file mode 100755 index 0000000..c71cc1b --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/HybridBinarizer.php @@ -0,0 +1,264 @@ +matrix !== null) { + return $this->matrix; + } + $source = $this->getLuminanceSource(); + $width = $source->getWidth(); + $height = $source->getHeight(); + if ($width >= self::$MINIMUM_DIMENSION && $height >= self::$MINIMUM_DIMENSION) { + $luminances = $source->getMatrix(); + $subWidth = $width >> self::$BLOCK_SIZE_POWER; + if (($width & self::$BLOCK_SIZE_MASK) != 0) { + $subWidth++; + } + $subHeight = $height >> self::$BLOCK_SIZE_POWER; + if (($height & self::$BLOCK_SIZE_MASK) != 0) { + $subHeight++; + } + $blackPoints = self::calculateBlackPoints($luminances, $subWidth, $subHeight, $width, $height); + + $newMatrix = new BitMatrix($width, $height); + self::calculateThresholdForBlock($luminances, $subWidth, $subHeight, $width, $height, $blackPoints, $newMatrix); + $this->matrix = $newMatrix; + } else { + // If the image is too small, fall back to the global histogram approach. + $this->matrix = parent::getBlackMatrix(); + } + + return $this->matrix; + } + + /** + * Calculates a single black point for each block of pixels and saves it away. + * See the following thread for a discussion of this algorithm: + * http://groups.google.com/group/zxing/browse_thread/thread/d06efa2c35a7ddc0 + */ + private static function calculateBlackPoints( + $luminances, + $subWidth, + $subHeight, + $width, + $height + ) { + $blackPoints = fill_array(0, $subHeight, 0); + foreach ($blackPoints as $key => $point) { + $blackPoints[$key] = fill_array(0, $subWidth, 0); + } + for ($y = 0; $y < $subHeight; $y++) { + $yoffset = ($y << self::$BLOCK_SIZE_POWER); + $maxYOffset = $height - self::$BLOCK_SIZE; + if ($yoffset > $maxYOffset) { + $yoffset = $maxYOffset; + } + for ($x = 0; $x < $subWidth; $x++) { + $xoffset = ($x << self::$BLOCK_SIZE_POWER); + $maxXOffset = $width - self::$BLOCK_SIZE; + if ($xoffset > $maxXOffset) { + $xoffset = $maxXOffset; + } + $sum = 0; + $min = 0xFF; + $max = 0; + for ($yy = 0, $offset = $yoffset * $width + $xoffset; $yy < self::$BLOCK_SIZE; $yy++, $offset += $width) { + for ($xx = 0; $xx < self::$BLOCK_SIZE; $xx++) { + $pixel = ((int)($luminances[(int)($offset + $xx)]) & 0xFF); + $sum += $pixel; + // still looking for good contrast + if ($pixel < $min) { + $min = $pixel; + } + if ($pixel > $max) { + $max = $pixel; + } + } + // short-circuit min/max tests once dynamic range is met + if ($max - $min > self::$MIN_DYNAMIC_RANGE) { + // finish the rest of the rows quickly + for ($yy++, $offset += $width; $yy < self::$BLOCK_SIZE; $yy++, $offset += $width) { + for ($xx = 0; $xx < self::$BLOCK_SIZE; $xx++) { + $sum += ($luminances[$offset + $xx] & 0xFF); + } + } + } + } + + // The default estimate is the average of the values in the block. + $average = ($sum >> (self::$BLOCK_SIZE_POWER * 2)); + if ($max - $min <= self::$MIN_DYNAMIC_RANGE) { + // If variation within the block is low, assume this is a block with only light or only + // dark pixels. In that case we do not want to use the average, as it would divide this + // low contrast area into black and white pixels, essentially creating data out of noise. + // + // The default assumption is that the block is light/background. Since no estimate for + // the level of dark pixels exists locally, use half the min for the block. + $average = (int)($min / 2); + + if ($y > 0 && $x > 0) { + // Correct the "white background" assumption for blocks that have neighbors by comparing + // the pixels in this block to the previously calculated black points. This is based on + // the fact that dark barcode symbology is always surrounded by some amount of light + // background for which reasonable black point estimates were made. The bp estimated at + // the boundaries is used for the interior. + + // The (min < bp) is arbitrary but works better than other heuristics that were tried. + $averageNeighborBlackPoint = + (int)(($blackPoints[$y - 1][$x] + (2 * $blackPoints[$y][$x - 1]) + $blackPoints[$y - 1][$x - 1]) / 4); + if ($min < $averageNeighborBlackPoint) { + $average = $averageNeighborBlackPoint; + } + } + } + $blackPoints[$y][$x] = (int)($average); + } + } + + return $blackPoints; + } + + /** + * For each block in the image, calculate the average black point using a 5x5 grid + * of the blocks around it. Also handles the corner cases (fractional blocks are computed based + * on the last pixels in the row/column which are also used in the previous block). + */ + private static function calculateThresholdForBlock( + $luminances, + $subWidth, + $subHeight, + $width, + $height, + $blackPoints, + $matrix + ) { + for ($y = 0; $y < $subHeight; $y++) { + $yoffset = ($y << self::$BLOCK_SIZE_POWER); + $maxYOffset = $height - self::$BLOCK_SIZE; + if ($yoffset > $maxYOffset) { + $yoffset = $maxYOffset; + } + for ($x = 0; $x < $subWidth; $x++) { + $xoffset = ($x << self::$BLOCK_SIZE_POWER); + $maxXOffset = $width - self::$BLOCK_SIZE; + if ($xoffset > $maxXOffset) { + $xoffset = $maxXOffset; + } + $left = self::cap($x, 2, $subWidth - 3); + $top = self::cap($y, 2, $subHeight - 3); + $sum = 0; + for ($z = -2; $z <= 2; $z++) { + $blackRow = $blackPoints[$top + $z]; + $sum += $blackRow[$left - 2] + $blackRow[$left - 1] + $blackRow[$left] + $blackRow[$left + 1] + $blackRow[$left + 2]; + } + $average = (int)($sum / 25); + + self::thresholdBlock($luminances, $xoffset, $yoffset, $average, $width, $matrix); + } + } + } + + private static function cap($value, $min, $max) + { + if ($value < $min) { + return $min; + } elseif ($value > $max) { + return $max; + } else { + return $value; + } + } + + /** + * Applies a single threshold to a block of pixels. + */ + private static function thresholdBlock( + $luminances, + $xoffset, + $yoffset, + $threshold, + $stride, + $matrix + ) { + + for ($y = 0, $offset = $yoffset * $stride + $xoffset; $y < self::$BLOCK_SIZE; $y++, $offset += $stride) { + for ($x = 0; $x < self::$BLOCK_SIZE; $x++) { + // Comparison needs to be <= so that black == 0 pixels are black even if the threshold is 0. + if (($luminances[$offset + $x] & 0xFF) <= $threshold) { + $matrix->set($xoffset + $x, $yoffset + $y); + } + } + } + } + + public function createBinarizer($source) + { + return new HybridBinarizer($source); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/PerspectiveTransform.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/PerspectiveTransform.php new file mode 100755 index 0000000..a3a0b97 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/PerspectiveTransform.php @@ -0,0 +1,175 @@ +This class implements a perspective transform in two dimensions. Given four source and four + * destination points, it will compute the transformation implied between them. The code is based + * directly upon section 3.4.2 of George Wolberg's "Digital Image Warping"; see pages 54-56.

                            + * + * @author Sean Owen + */ +final class PerspectiveTransform +{ + private $a11; + private $a12; + private $a13; + private $a21; + private $a22; + private $a23; + private $a31; + private $a32; + private $a33; + + private function __construct( + $a11, $a21, $a31, + $a12, $a22, $a32, + $a13, $a23, $a33 + ) { + $this->a11 = $a11; + $this->a12 = $a12; + $this->a13 = $a13; + $this->a21 = $a21; + $this->a22 = $a22; + $this->a23 = $a23; + $this->a31 = $a31; + $this->a32 = $a32; + $this->a33 = $a33; + } + + public static function quadrilateralToQuadrilateral( + $x0, $y0, + $x1, $y1, + $x2, $y2, + $x3, $y3, + $x0p, $y0p, + $x1p, $y1p, + $x2p, $y2p, + $x3p, $y3p + ) { + + $qToS = self::quadrilateralToSquare($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3); + $sToQ = self::squareToQuadrilateral($x0p, $y0p, $x1p, $y1p, $x2p, $y2p, $x3p, $y3p); + + return $sToQ->times($qToS); + } + + public static function quadrilateralToSquare( + $x0, $y0, + $x1, $y1, + $x2, $y2, + $x3, $y3 + ) { +// Here, the adjoint serves as the inverse: + return self::squareToQuadrilateral($x0, $y0, $x1, $y1, $x2, $y2, $x3, $y3)->buildAdjoint(); + } + + public function buildAdjoint() + { +// Adjoint is the transpose of the cofactor matrix: + return new PerspectiveTransform($this->a22 * $this->a33 - $this->a23 * $this->a32, + $this->a23 * $this->a31 - $this->a21 * $this->a33, + $this->a21 * $this->a32 - $this->a22 * $this->a31, + $this->a13 * $this->a32 - $this->a12 * $this->a33, + $this->a11 * $this->a33 - $this->a13 * $this->a31, + $this->a12 * $this->a31 - $this->a11 * $this->a32, + $this->a12 * $this->a23 - $this->a13 * $this->a22, + $this->a13 * $this->a21 - $this->a11 * $this->a23, + $this->a11 * $this->a22 - $this->a12 * $this->a21); + } + + public static function squareToQuadrilateral( + $x0, $y0, + $x1, $y1, + $x2, $y2, + $x3, $y3 + ) { + $dx3 = $x0 - $x1 + $x2 - $x3; + $dy3 = $y0 - $y1 + $y2 - $y3; + if ($dx3 == 0.0 && $dy3 == 0.0) { +// Affine + return new PerspectiveTransform($x1 - $x0, $x2 - $x1, $x0, + $y1 - $y0, $y2 - $y1, $y0, + 0.0, 0.0, 1.0); + } else { + $dx1 = $x1 - $x2; + $dx2 = $x3 - $x2; + $dy1 = $y1 - $y2; + $dy2 = $y3 - $y2; + $denominator = $dx1 * $dy2 - $dx2 * $dy1; + $a13 = ($dx3 * $dy2 - $dx2 * $dy3) / $denominator; + $a23 = ($dx1 * $dy3 - $dx3 * $dy1) / $denominator; + + return new PerspectiveTransform($x1 - $x0 + $a13 * $x1, $x3 - $x0 + $a23 * $x3, $x0, + $y1 - $y0 + $a13 * $y1, $y3 - $y0 + $a23 * $y3, $y0, + $a13, $a23, 1.0); + } + } + + public function times($other) + { + return new PerspectiveTransform($this->a11 * $other->a11 + $this->a21 * $other->a12 + $this->a31 * $other->a13, + $this->a11 * $other->a21 + $this->a21 * $other->a22 + $this->a31 * $other->a23, + $this->a11 * $other->a31 + $this->a21 * $other->a32 + $this->a31 * $other->a33, + $this->a12 * $other->a11 + $this->a22 * $other->a12 + $this->a32 * $other->a13, + $this->a12 * $other->a21 + $this->a22 * $other->a22 + $this->a32 * $other->a23, + $this->a12 * $other->a31 + $this->a22 * $other->a32 + $this->a32 * $other->a33, + $this->a13 * $other->a11 + $this->a23 * $other->a12 + $this->a33 * $other->a13, + $this->a13 * $other->a21 + $this->a23 * $other->a22 + $this->a33 * $other->a23, + $this->a13 * $other->a31 + $this->a23 * $other->a32 + $this->a33 * $other->a33); + + } + + public function transformPoints(&$points, &$yValues = 0) + { + if ($yValues) { + $this->transformPoints_($points, $yValues); + + return; + } + $max = count($points); + $a11 = $this->a11; + $a12 = $this->a12; + $a13 = $this->a13; + $a21 = $this->a21; + $a22 = $this->a22; + $a23 = $this->a23; + $a31 = $this->a31; + $a32 = $this->a32; + $a33 = $this->a33; + for ($i = 0; $i < $max; $i += 2) { + $x = $points[$i]; + $y = $points[$i + 1]; + $denominator = $a13 * $x + $a23 * $y + $a33; + $points[$i] = ($a11 * $x + $a21 * $y + $a31) / $denominator; + $points[$i + 1] = ($a12 * $x + $a22 * $y + $a32) / $denominator; + } + } + + public function transformPoints_(&$xValues, &$yValues) + { + $n = count($xValues); + for ($i = 0; $i < $n; $i++) { + $x = $xValues[$i]; + $y = $yValues[$i]; + $denominator = $this->a13 * $x + $this->a23 * $y + $this->a33; + $xValues[$i] = ($this->a11 * $x + $this->a21 * $y + $this->a31) / $denominator; + $yValues[$i] = ($this->a12 * $x + $this->a22 * $y + $this->a32) / $denominator; + } + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/GenericGF.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/GenericGF.php new file mode 100755 index 0000000..49d7b61 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/GenericGF.php @@ -0,0 +1,198 @@ +This class contains utility methods for performing mathematical operations over + * the Galois Fields. Operations use a given primitive polynomial in calculations.

                            + * + *

                            Throughout this package, elements of the GF are represented as an {@code int} + * for convenience and speed (but at the cost of memory). + *

                            + * + * @author Sean Owen + * @author David Olivier + */ +final class GenericGF +{ + + public static $AZTEC_DATA_12; + public static $AZTEC_DATA_10; + public static $AZTEC_DATA_6; + public static $AZTEC_PARAM; + public static $QR_CODE_FIELD_256; + public static $DATA_MATRIX_FIELD_256; + public static $AZTEC_DATA_8; + public static $MAXICODE_FIELD_64; + + private $expTable; + private $logTable; + private $zero; + private $one; + private $size; + private $primitive; + private $generatorBase; + + /** + * Create a representation of GF(size) using the given primitive polynomial. + * + * @param primitive irreducible polynomial whose coefficients are represented by + * the bits of an int, where the least-significant bit represents the constant + * coefficient + * @param size the size of the field + * @param b the factor b in the generator polynomial can be 0- or 1-based + * (g(x) = (x+a^b)(x+a^(b+1))...(x+a^(b+2t-1))). + * In most cases it should be 1, but for QR code it is 0. + */ + public function __construct($primitive, $size, $b) + { + $this->primitive = $primitive; + $this->size = $size; + $this->generatorBase = $b; + + $this->expTable = []; + $this->logTable = []; + $x = 1; + for ($i = 0; $i < $size; $i++) { + $this->expTable[$i] = $x; + $x *= 2; // we're assuming the generator alpha is 2 + if ($x >= $size) { + $x ^= $primitive; + $x &= $size - 1; + } + } + for ($i = 0; $i < $size - 1; $i++) { + $this->logTable[$this->expTable[$i]] = $i; + } + // logTable[0] == 0 but this should never be used + $this->zero = new GenericGFPoly($this, [0]); + $this->one = new GenericGFPoly($this, [1]); + } + + public static function Init() + { + self::$AZTEC_DATA_12 = new GenericGF(0x1069, 4096, 1); // x^12 + x^6 + x^5 + x^3 + 1 + self::$AZTEC_DATA_10 = new GenericGF(0x409, 1024, 1); // x^10 + x^3 + 1 + self::$AZTEC_DATA_6 = new GenericGF(0x43, 64, 1); // x^6 + x + 1 + self::$AZTEC_PARAM = new GenericGF(0x13, 16, 1); // x^4 + x + 1 + self::$QR_CODE_FIELD_256 = new GenericGF(0x011D, 256, 0); // x^8 + x^4 + x^3 + x^2 + 1 + self::$DATA_MATRIX_FIELD_256 = new GenericGF(0x012D, 256, 1); // x^8 + x^5 + x^3 + x^2 + 1 + self::$AZTEC_DATA_8 = self::$DATA_MATRIX_FIELD_256; + self::$MAXICODE_FIELD_64 = self::$AZTEC_DATA_6; + } + + /** + * Implements both addition and subtraction -- they are the same in GF(size). + * + * @return sum/difference of a and b + */ + public static function addOrSubtract($a, $b) + { + return $a ^ $b; + } + + public function getZero() + { + return $this->zero; + } + + public function getOne() + { + return $this->one; + } + + /** + * @return the monomial representing coefficient * x^degree + */ + public function buildMonomial($degree, $coefficient) + { + if ($degree < 0) { + throw new \InvalidArgumentException(); + } + if ($coefficient == 0) { + return $this->zero; + } + $coefficients = fill_array(0, $degree + 1, 0);//new int[degree + 1]; + $coefficients[0] = $coefficient; + + return new GenericGFPoly($this, $coefficients); + } + + /** + * @return 2 to the power of a in GF(size) + */ + public function exp($a) + { + return $this->expTable[$a]; + } + + /** + * @return base 2 log of a in GF(size) + */ + public function log($a) + { + if ($a == 0) { + throw new \InvalidArgumentException(); + } + + return $this->logTable[$a]; + } + + /** + * @return multiplicative inverse of a + */ + public function inverse($a) + { + if ($a == 0) { + throw new \Exception(); + } + + return $this->expTable[$this->size - $this->logTable[$a] - 1]; + } + + /** + * @return int product of a and b in GF(size) + */ + public function multiply($a, $b) + { + if ($a == 0 || $b == 0) { + return 0; + } + + return $this->expTable[($this->logTable[$a] + $this->logTable[$b]) % ($this->size - 1)]; + } + + public function getSize() + { + return $this->size; + } + + public function getGeneratorBase() + { + return $this->generatorBase; + } + + // @Override + public function toString() + { + return "GF(0x" . dechex((int)($this->primitive)) . ',' . $this->size . ')'; + } + +} + +GenericGF::Init(); diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/GenericGFPoly.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/GenericGFPoly.php new file mode 100755 index 0000000..024af20 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/GenericGFPoly.php @@ -0,0 +1,289 @@ +Represents a polynomial whose coefficients are elements of a GF. + * Instances of this class are immutable.

                            + * + *

                            Much credit is due to William Rucklidge since portions of this code are an indirect + * port of his C++ Reed-Solomon implementation.

                            + * + * @author Sean Owen + */ +final class GenericGFPoly +{ + + private $field; + private $coefficients; + + /** + * @param field the {@link GenericGF} instance representing the field to use + * to perform computations + * @param coefficients array coefficients as ints representing elements of GF(size), arranged + * from most significant (highest-power term) coefficient to least significant + * + * @throws IllegalArgumentException if argument is null or empty, + * or if leading coefficient is 0 and this is not a + * constant polynomial (that is, it is not the monomial "0") + */ + public function __construct($field, $coefficients) + { + if (count($coefficients) == 0) { + throw new \InvalidArgumentException(); + } + $this->field = $field; + $coefficientsLength = count($coefficients); + if ($coefficientsLength > 1 && $coefficients[0] == 0) { + // Leading term must be non-zero for anything except the constant polynomial "0" + $firstNonZero = 1; + while ($firstNonZero < $coefficientsLength && $coefficients[$firstNonZero] == 0) { + $firstNonZero++; + } + if ($firstNonZero == $coefficientsLength) { + $this->coefficients = [0]; + } else { + $this->coefficients = fill_array(0, $coefficientsLength - $firstNonZero, 0); + $this->coefficients = arraycopy($coefficients, + $firstNonZero, + $this->coefficients, + 0, + count($this->coefficients)); + } + } else { + $this->coefficients = $coefficients; + } + } + + public function getCoefficients() + { + return $this->coefficients; + } + + /** + * @return evaluation of this polynomial at a given point + */ + public function evaluateAt($a) + { + if ($a == 0) { + // Just return the x^0 coefficient + return $this->getCoefficient(0); + } + $size = count($this->coefficients); + if ($a == 1) { + // Just the sum of the coefficients + $result = 0; + foreach ($this->coefficients as $coefficient) { + $result = GenericGF::addOrSubtract($result, $coefficient); + } + + return $result; + } + $result = $this->coefficients[0]; + for ($i = 1; $i < $size; $i++) { + $result = GenericGF::addOrSubtract($this->field->multiply($a, $result), $this->coefficients[$i]); + } + + return $result; + } + + /** + * @return coefficient of x^degree term in this polynomial + */ + public function getCoefficient($degree) + { + return $this->coefficients[count($this->coefficients) - 1 - $degree]; + } + + public function multiply($other) + { + if (is_int($other)) { + return $this->multiply_($other); + } + if ($this->field !== $other->field) { + throw new \InvalidArgumentException("GenericGFPolys do not have same GenericGF field"); + } + if ($this->isZero() || $other->isZero()) { + return $this->field->getZero(); + } + $aCoefficients = $this->coefficients; + $aLength = count($aCoefficients); + $bCoefficients = $other->coefficients; + $bLength = count($bCoefficients); + $product = fill_array(0, $aLength + $bLength - 1, 0); + for ($i = 0; $i < $aLength; $i++) { + $aCoeff = $aCoefficients[$i]; + for ($j = 0; $j < $bLength; $j++) { + $product[$i + $j] = GenericGF::addOrSubtract($product[$i + $j], + $this->field->multiply($aCoeff, $bCoefficients[$j])); + } + } + + return new GenericGFPoly($this->field, $product); + } + + public function multiply_($scalar) + { + if ($scalar == 0) { + return $this->field->getZero(); + } + if ($scalar == 1) { + return $this; + } + $size = count($this->coefficients); + $product = fill_array(0, $size, 0); + for ($i = 0; $i < $size; $i++) { + $product[$i] = $this->field->multiply($this->coefficients[$i], $scalar); + } + + return new GenericGFPoly($this->field, $product); + } + + /** + * @return true iff this polynomial is the monomial "0" + */ + public function isZero() + { + return $this->coefficients[0] == 0; + } + + public function multiplyByMonomial($degree, $coefficient) + { + if ($degree < 0) { + throw new \InvalidArgumentException(); + } + if ($coefficient == 0) { + return $this->field->getZero(); + } + $size = count($this->coefficients); + $product = fill_array(0, $size + $degree, 0); + for ($i = 0; $i < $size; $i++) { + $product[$i] = $this->field->multiply($this->coefficients[$i], $coefficient); + } + + return new GenericGFPoly($this->field, $product); + } + + public function divide($other) + { + if ($this->field !== $other->field) { + throw new \InvalidArgumentException("GenericGFPolys do not have same GenericGF field"); + } + if ($other->isZero()) { + throw new \InvalidArgumentException("Divide by 0"); + } + + $quotient = $this->field->getZero(); + $remainder = $this; + + $denominatorLeadingTerm = $other->getCoefficient($other->getDegree()); + $inverseDenominatorLeadingTerm = $this->field->inverse($denominatorLeadingTerm); + + while ($remainder->getDegree() >= $other->getDegree() && !$remainder->isZero()) { + $degreeDifference = $remainder->getDegree() - $other->getDegree(); + $scale = $this->field->multiply($remainder->getCoefficient($remainder->getDegree()), $inverseDenominatorLeadingTerm); + $term = $other->multiplyByMonomial($degreeDifference, $scale); + $iterationQuotient = $this->field->buildMonomial($degreeDifference, $scale); + $quotient = $quotient->addOrSubtract($iterationQuotient); + $remainder = $remainder->addOrSubtract($term); + } + + return [$quotient, $remainder]; + } + + /** + * @return degree of this polynomial + */ + public function getDegree() + { + return count($this->coefficients) - 1; + } + + public function addOrSubtract($other) + { + if ($this->field !== $other->field) { + throw new \InvalidArgumentException("GenericGFPolys do not have same GenericGF field"); + } + if ($this->isZero()) { + return $other; + } + if ($other->isZero()) { + return $this; + } + + $smallerCoefficients = $this->coefficients; + $largerCoefficients = $other->coefficients; + if (count($smallerCoefficients) > count($largerCoefficients)) { + $temp = $smallerCoefficients; + $smallerCoefficients = $largerCoefficients; + $largerCoefficients = $temp; + } + $sumDiff = fill_array(0, count($largerCoefficients), 0); + $lengthDiff = count($largerCoefficients) - count($smallerCoefficients); + // Copy high-order terms only found in higher-degree polynomial's coefficients + $sumDiff = arraycopy($largerCoefficients, 0, $sumDiff, 0, $lengthDiff); + + $countLargerCoefficients = count($largerCoefficients); + for ($i = $lengthDiff; $i < $countLargerCoefficients; $i++) { + $sumDiff[$i] = GenericGF::addOrSubtract($smallerCoefficients[$i - $lengthDiff], $largerCoefficients[$i]); + } + + return new GenericGFPoly($this->field, $sumDiff); + } + + //@Override + + public function toString() + { + $result = ''; + for ($degree = $this->getDegree(); $degree >= 0; $degree--) { + $coefficient = $this->getCoefficient($degree); + if ($coefficient != 0) { + if ($coefficient < 0) { + $result .= " - "; + $coefficient = -$coefficient; + } else { + if (strlen($result) > 0) { + $result .= " + "; + } + } + if ($degree == 0 || $coefficient != 1) { + $alphaPower = $this->field->log($coefficient); + if ($alphaPower == 0) { + $result .= '1'; + } else if ($alphaPower == 1) { + $result .= 'a'; + } else { + $result .= "a^"; + $result .= ($alphaPower); + } + } + if ($degree != 0) { + if ($degree == 1) { + $result .= 'x'; + } else { + $result .= "x^"; + $result .= $degree; + } + } + } + } + + return $result; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/ReedSolomonDecoder.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/ReedSolomonDecoder.php new file mode 100755 index 0000000..f9a3e70 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/ReedSolomonDecoder.php @@ -0,0 +1,201 @@ +Implements Reed-Solomon decoding, as the name implies.

                            + * + *

                            The algorithm will not be explained here, but the following references were helpful + * in creating this implementation:

                            + * + * + * + *

                            Much credit is due to William Rucklidge since portions of this code are an indirect + * port of his C++ Reed-Solomon implementation.

                            + * + * @author Sean Owen + * @author William Rucklidge + * @author sanfordsquires + */ +final class ReedSolomonDecoder +{ + + private $field; + + public function __construct($field) + { + $this->field = $field; + } + + /** + *

                            Decodes given set of received codewords, which include both data and error-correction + * codewords. Really, this means it uses Reed-Solomon to detect and correct errors, in-place, + * in the input.

                            + * + * @param received data and error-correction codewords + * @param twoS number of error-correction codewords available + * + * @throws ReedSolomonException if decoding fails for any reason + */ + public function decode(&$received, $twoS) + { + $poly = new GenericGFPoly($this->field, $received); + $syndromeCoefficients = fill_array(0, $twoS, 0); + $noError = true; + for ($i = 0; $i < $twoS; $i++) { + $eval = $poly->evaluateAt($this->field->exp($i + $this->field->getGeneratorBase())); + $syndromeCoefficients[count($syndromeCoefficients) - 1 - $i] = $eval; + if ($eval != 0) { + $noError = false; + } + } + if ($noError) { + return; + } + $syndrome = new GenericGFPoly($this->field, $syndromeCoefficients); + $sigmaOmega = + $this->runEuclideanAlgorithm($this->field->buildMonomial($twoS, 1), $syndrome, $twoS); + $sigma = $sigmaOmega[0]; + $omega = $sigmaOmega[1]; + $errorLocations = $this->findErrorLocations($sigma); + $errorMagnitudes = $this->findErrorMagnitudes($omega, $errorLocations); + $errorLocationsCount = count($errorLocations); + for ($i = 0; $i < $errorLocationsCount; $i++) { + $position = count($received) - 1 - $this->field->log($errorLocations[$i]); + if ($position < 0) { + throw new ReedSolomonException("Bad error location"); + } + $received[$position] = GenericGF::addOrSubtract($received[$position], $errorMagnitudes[$i]); + } + + } + + private function runEuclideanAlgorithm($a, $b, $R) + { + // Assume a's degree is >= b's + if ($a->getDegree() < $b->getDegree()) { + $temp = $a; + $a = $b; + $b = $temp; + } + + $rLast = $a; + $r = $b; + $tLast = $this->field->getZero(); + $t = $this->field->getOne(); + + // Run Euclidean algorithm until r's degree is less than R/2 + while ($r->getDegree() >= $R / 2) { + $rLastLast = $rLast; + $tLastLast = $tLast; + $rLast = $r; + $tLast = $t; + + // Divide rLastLast by rLast, with quotient in q and remainder in r + if ($rLast->isZero()) { + // Oops, Euclidean algorithm already terminated? + throw new ReedSolomonException("r_{i-1} was zero"); + } + $r = $rLastLast; + $q = $this->field->getZero(); + $denominatorLeadingTerm = $rLast->getCoefficient($rLast->getDegree()); + $dltInverse = $this->field->inverse($denominatorLeadingTerm); + while ($r->getDegree() >= $rLast->getDegree() && !$r->isZero()) { + $degreeDiff = $r->getDegree() - $rLast->getDegree(); + $scale = $this->field->multiply($r->getCoefficient($r->getDegree()), $dltInverse); + $q = $q->addOrSubtract($this->field->buildMonomial($degreeDiff, $scale)); + $r = $r->addOrSubtract($rLast->multiplyByMonomial($degreeDiff, $scale)); + } + + $t = $q->multiply($tLast)->addOrSubtract($tLastLast); + + if ($r->getDegree() >= $rLast->getDegree()) { + throw new IllegalStateException("Division algorithm failed to reduce polynomial?"); + } + } + + $sigmaTildeAtZero = $t->getCoefficient(0); + if ($sigmaTildeAtZero == 0) { + throw new ReedSolomonException("sigmaTilde(0) was zero"); + } + + $inverse = $this->field->inverse($sigmaTildeAtZero); + $sigma = $t->multiply($inverse); + $omega = $r->multiply($inverse); + + return [$sigma, $omega]; + } + + private function findErrorLocations($errorLocator) + { + // This is a direct application of Chien's search + $numErrors = $errorLocator->getDegree(); + if ($numErrors == 1) { // shortcut + return [$errorLocator->getCoefficient(1)]; + } + $result = fill_array(0, $numErrors, 0); + $e = 0; + for ($i = 1; $i < $this->field->getSize() && $e < $numErrors; $i++) { + if ($errorLocator->evaluateAt($i) == 0) { + $result[$e] = $this->field->inverse($i); + $e++; + } + } + if ($e != $numErrors) { + throw new ReedSolomonException("Error locator degree does not match number of roots"); + } + + return $result; + } + + private function findErrorMagnitudes($errorEvaluator, $errorLocations) + { + // This is directly applying Forney's Formula + $s = count($errorLocations); + $result = fill_array(0, $s, 0); + for ($i = 0; $i < $s; $i++) { + $xiInverse = $this->field->inverse($errorLocations[$i]); + $denominator = 1; + for ($j = 0; $j < $s; $j++) { + if ($i != $j) { + //denominator = field.multiply(denominator, + // GenericGF.addOrSubtract(1, field.multiply(errorLocations[j], xiInverse))); + // Above should work but fails on some Apple and Linux JDKs due to a Hotspot bug. + // Below is a funny-looking workaround from Steven Parkes + $term = $this->field->multiply($errorLocations[$j], $xiInverse); + $termPlus1 = ($term & 0x1) == 0 ? $term | 1 : $term & ~1; + $denominator = $this->field->multiply($denominator, $termPlus1); + } + } + $result[$i] = $this->field->multiply($errorEvaluator->evaluateAt($xiInverse), + $this->field->inverse($denominator)); + if ($this->field->getGeneratorBase() != 0) { + $result[$i] = $this->field->multiply($result[$i], $xiInverse); + } + } + + return $result; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/ReedSolomonException.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/ReedSolomonException.php new file mode 100755 index 0000000..cd7babd --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/Reedsolomon/ReedSolomonException.php @@ -0,0 +1,28 @@ +Thrown when an exception occurs during Reed-Solomon decoding, such as when + * there are too many errors to correct.

                            + * + * @author Sean Owen + */ +final class ReedSolomonException extends \Exception +{ +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php new file mode 100755 index 0000000..c336f57 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php @@ -0,0 +1,101 @@ +>= 1; + $num++; + } + + return $num; + } +} + +if (!function_exists('uRShift')) { + function uRShift($a, $b) + { + static $mask = (8 * PHP_INT_SIZE - 1); + if ($b === 0) { + return $a; + } + + return ($a >> $b) & ~(1 << $mask >> ($b - 1)); + } +} + +/* +function sdvig3($num,$count=1){//>>> 32 bit + $s = decbin($num); + + $sarray = str_split($s,1); + $sarray = array_slice($sarray,-32);//32bit + + for($i=0;$i<=1;$i++) { + array_pop($sarray); + array_unshift($sarray, '0'); + } + return bindec(implode($sarray)); +} +*/ + +if (!function_exists('sdvig3')) { + function sdvig3($a, $b) + { + if ($a >= 0) { + return bindec(decbin($a >> $b)); //simply right shift for positive number + } + + $bin = decbin($a >> $b); + + $bin = substr($bin, $b); // zero fill on the left side + + return bindec($bin); + } +} + +if (!function_exists('floatToIntBits')) { + function floatToIntBits($float_val) + { + $int = unpack('i', pack('f', $float_val)); + + return $int[1]; + } +} + + +if (!function_exists('fill_array')) { + function fill_array($index, $count, $value) + { + if ($count <= 0) { + return [0]; + } + + return array_fill($index, $count, $value); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/FormatException.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/FormatException.php new file mode 100755 index 0000000..64de650 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/FormatException.php @@ -0,0 +1,49 @@ +GDLuminanceSource($gdImage, $dataWidth, $dataHeight); + + return; + } + parent::__construct($width, $height); + if ($left + $width > $dataWidth || $top + $height > $dataHeight) { + throw new \InvalidArgumentException("Crop rectangle does not fit within image data."); + } + $this->luminances = $gdImage; + $this->dataWidth = $dataWidth; + $this->dataHeight = $dataHeight; + $this->left = $left; + $this->top = $top; + } + + public function GDLuminanceSource($gdImage, $width, $height) + { + parent::__construct($width, $height); + + $this->dataWidth = $width; + $this->dataHeight = $height; + $this->left = 0; + $this->top = 0; + $this->$gdImage = $gdImage; + + +// In order to measure pure decoding speed, we convert the entire image to a greyscale array +// up front, which is the same as the Y channel of the YUVLuminanceSource in the real app. + $this->luminances = []; + //$this->luminances = $this->grayScaleToBitmap($this->grayscale()); + + $array = []; + $rgb = []; + + for ($j = 0; $j < $height; $j++) { + for ($i = 0; $i < $width; $i++) { + $argb = imagecolorat($this->$gdImage, $i, $j); + $pixel = imagecolorsforindex($this->$gdImage, $argb); + $r = $pixel['red']; + $g = $pixel['green']; + $b = $pixel['blue']; + if ($r == $g && $g == $b) { +// Image is already greyscale, so pick any channel. + + $this->luminances[] = $r;//(($r + 128) % 256) - 128; + } else { +// Calculate luminance cheaply, favoring green. + $this->luminances[] = ($r + 2 * $g + $b) / 4;//(((($r + 2 * $g + $b) / 4) + 128) % 256) - 128; + } + } + } + + /* + for ($y = 0; $y < $height; $y++) { + $offset = $y * $width; + for ($x = 0; $x < $width; $x++) { + $pixel = $pixels[$offset + $x]; + $r = ($pixel >> 16) & 0xff; + $g = ($pixel >> 8) & 0xff; + $b = $pixel & 0xff; + if ($r == $g && $g == $b) { +// Image is already greyscale, so pick any channel. + + $this->luminances[(int)($offset + $x)] = (($r+128) % 256) - 128; + } else { +// Calculate luminance cheaply, favoring green. + $this->luminances[(int)($offset + $x)] = (((($r + 2 * $g + $b) / 4)+128)%256) - 128; + } + + + + } + */ + //} + // $this->luminances = $this->grayScaleToBitmap($this->luminances); + } + +//@Override + public function getRow($y, $row = null) + { + if ($y < 0 || $y >= $this->getHeight()) { + throw new \InvalidArgumentException('Requested row is outside the image: ' . $y); + } + $width = $this->getWidth(); + if ($row == null || count($row) < $width) { + $row = []; + } + $offset = ($y + $this->top) * $this->dataWidth + $this->left; + $row = arraycopy($this->luminances, $offset, $row, 0, $width); + + return $row; + } + +//@Override + public function getMatrix() + { + $width = $this->getWidth(); + $height = $this->getHeight(); + +// If the caller asks for the entire underlying image, save the copy and give them the +// original data. The docs specifically warn that result.length must be ignored. + if ($width == $this->dataWidth && $height == $this->dataHeight) { + return $this->luminances; + } + + $area = $width * $height; + $matrix = []; + $inputOffset = $this->top * $this->dataWidth + $this->left; + +// If the width matches the full width of the underlying data, perform a single copy. + if ($width == $this->dataWidth) { + $matrix = arraycopy($this->luminances, $inputOffset, $matrix, 0, $area); + + return $matrix; + } + +// Otherwise copy one cropped row at a time. + $rgb = $this->luminances; + for ($y = 0; $y < $height; $y++) { + $outputOffset = $y * $width; + $matrix = arraycopy($rgb, $inputOffset, $matrix, $outputOffset, $width); + $inputOffset += $this->dataWidth; + } + + return $matrix; + } + +//@Override + public function isCropSupported() + { + return true; + } + +//@Override + public function crop($left, $top, $width, $height) + { + return new GDLuminanceSource($this->luminances, + $this->dataWidth, + $this->dataHeight, + $this->left + $left, + $this->top + $top, + $width, + $height); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/IMagickLuminanceSource.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/IMagickLuminanceSource.php new file mode 100755 index 0000000..aac6d54 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/IMagickLuminanceSource.php @@ -0,0 +1,150 @@ +_IMagickLuminanceSource($image, $dataWidth, $dataHeight); + + return; + } + parent::__construct($width, $height); + if ($left + $width > $dataWidth || $top + $height > $dataHeight) { + throw new \InvalidArgumentException("Crop rectangle does not fit within image data."); + } + $this->luminances = $image; + $this->dataWidth = $dataWidth; + $this->dataHeight = $dataHeight; + $this->left = $left; + $this->top = $top; + } + + public function _IMagickLuminanceSource(\Imagick $image, $width, $height) + { + parent::__construct($width, $height); + + $this->dataWidth = $width; + $this->dataHeight = $height; + $this->left = 0; + $this->top = 0; + $this->image = $image; + + +// In order to measure pure decoding speed, we convert the entire image to a greyscale array +// up front, which is the same as the Y channel of the YUVLuminanceSource in the real app. + $this->luminances = []; + + $image->setImageColorspace(\Imagick::COLORSPACE_GRAY); + // $image->newPseudoImage(0, 0, "magick:rose"); + $pixels = $image->exportImagePixels(1, 1, $width, $height, "RGB", \Imagick::PIXEL_CHAR); + + $array = []; + $rgb = []; + + $countPixels = count($pixels); + for ($i = 0; $i < $countPixels; $i += 3) { + $r = $pixels[$i] & 0xff; + $g = $pixels[$i + 1] & 0xff; + $b = $pixels[$i + 2] & 0xff; + if ($r == $g && $g == $b) { +// Image is already greyscale, so pick any channel. + + $this->luminances[] = $r;//(($r + 128) % 256) - 128; + } else { +// Calculate luminance cheaply, favoring green. + $this->luminances[] = ($r + 2 * $g + $b) / 4;//(((($r + 2 * $g + $b) / 4) + 128) % 256) - 128; + } + } + } + +//@Override + public function getRow($y, $row = null) + { + if ($y < 0 || $y >= $this->getHeight()) { + throw new \InvalidArgumentException('Requested row is outside the image: ' . $y); + } + $width = $this->getWidth(); + if ($row == null || count($row) < $width) { + $row = []; + } + $offset = ($y + $this->top) * $this->dataWidth + $this->left; + $row = arraycopy($this->luminances, $offset, $row, 0, $width); + + return $row; + } + +//@Override + public function getMatrix() + { + $width = $this->getWidth(); + $height = $this->getHeight(); + +// If the caller asks for the entire underlying image, save the copy and give them the +// original data. The docs specifically warn that result.length must be ignored. + if ($width == $this->dataWidth && $height == $this->dataHeight) { + return $this->luminances; + } + + $area = $width * $height; + $matrix = []; + $inputOffset = $this->top * $this->dataWidth + $this->left; + +// If the width matches the full width of the underlying data, perform a single copy. + if ($width == $this->dataWidth) { + $matrix = arraycopy($this->luminances, $inputOffset, $matrix, 0, $area); + + return $matrix; + } + +// Otherwise copy one cropped row at a time. + $rgb = $this->luminances; + for ($y = 0; $y < $height; $y++) { + $outputOffset = $y * $width; + $matrix = arraycopy($rgb, $inputOffset, $matrix, $outputOffset, $width); + $inputOffset += $this->dataWidth; + } + + return $matrix; + } + +//@Override + public function isCropSupported() + { + return true; + } + +//@Override + public function crop($left, $top, $width, $height) + { + return $this->luminances->cropImage($width, $height, $left, $top); + + return new GDLuminanceSource($this->luminances, + $this->dataWidth, + $this->dataHeight, + $this->left + $left, + $this->top + $top, + $width, + $height); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/LuminanceSource.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/LuminanceSource.php new file mode 100755 index 0000000..ab971cf --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/LuminanceSource.php @@ -0,0 +1,171 @@ +width = $width; + $this->height = $height; + } + + /** + * Fetches luminance data for the underlying bitmap. Values should be fetched using: + * {@code int luminance = array[y * width + x] & 0xff} + * + * @return A row-major 2D array of luminance values. Do not use result.length as it may be + * larger than width * height bytes on some platforms. Do not modify the contents + * of the result. + */ + public abstract function getMatrix(); + + /** + * @return The width of the bitmap. + */ + public final function getWidth() + { + return $this->width; + } + + /** + * @return The height of the bitmap. + */ + public final function getHeight() + { + return $this->height; + } + + /** + * @return bool Whether this subclass supports cropping. + */ + public function isCropSupported() + { + return false; + } + + /** + * Returns a new object with cropped image data. Implementations may keep a reference to the + * original data rather than a copy. Only callable if isCropSupported() is true. + * + * @param left The left coordinate, which must be in [0,getWidth()) + * @param top The top coordinate, which must be in [0,getHeight()) + * @param width The width of the rectangle to crop. + * @param height The height of the rectangle to crop. + * + * @return A cropped version of this object. + */ + public function crop($left, $top, $width, $height) + { + throw new \Exception("This luminance source does not support cropping."); + } + + /** + * @return Whether this subclass supports counter-clockwise rotation. + */ + public function isRotateSupported() + { + return false; + } + + /** + * @return a wrapper of this {@code LuminanceSource} which inverts the luminances it returns -- black becomes + * white and vice versa, and each value becomes (255-value). + */ + public function invert() + { + return new InvertedLuminanceSource($this); + } + + /** + * Returns a new object with rotated image data by 90 degrees counterclockwise. + * Only callable if {@link #isRotateSupported()} is true. + * + * @return A rotated version of this object. + */ + public function rotateCounterClockwise() + { + throw new \Exception("This luminance source does not support rotation by 90 degrees."); + } + + /** + * Returns a new object with rotated image data by 45 degrees counterclockwise. + * Only callable if {@link #isRotateSupported()} is true. + * + * @return A rotated version of this object. + */ + public function rotateCounterClockwise45() + { + throw new \Exception("This luminance source does not support rotation by 45 degrees."); + } + + public final function toString() + { + $row = []; + $result = ''; + for ($y = 0; $y < $this->height; $y++) { + $row = $this->getRow($y, $row); + for ($x = 0; $x < $this->width; $x++) { + $luminance = $row[$x] & 0xFF; + $c = ''; + if ($luminance < 0x40) { + $c = '#'; + } else if ($luminance < 0x80) { + $c = '+'; + } else if ($luminance < 0xC0) { + $c = '.'; + } else { + $c = ' '; + } + $result .= ($c); + } + $result .= ('\n'); + } + + return $result; + } + + /** + * Fetches one row of luminance data from the underlying platform's bitmap. Values range from + * 0 (black) to 255 (white). Because Java does not have an unsigned byte type, callers will have + * to bitwise and with 0xff for each value. It is preferable for implementations of this method + * to only fetch this row rather than the whole image, since no 2D Readers may be installed and + * getMatrix() may never be called. + * + * @param $y ; The row to fetch, which must be in [0,getHeight()) + * @param $row ; An optional preallocated array. If null or too small, it will be ignored. + * Always use the returned object, and ignore the .length of the array. + * + * @return array + * An array containing the luminance data. + */ + public abstract function getRow($y, $row); +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/NotFoundException.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/NotFoundException.php new file mode 100755 index 0000000..0b3c423 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/NotFoundException.php @@ -0,0 +1,38 @@ + $dataWidth || $top + $height > $dataHeight) { + throw new \InvalidArgumentException("Crop rectangle does not fit within image data."); + } + + $this->yuvData = $yuvData; + $this->dataWidth = $dataWidth; + $this->dataHeight = $dataHeight; + $this->left = $left; + $this->top = $top; + if ($reverseHorizontal) { + $this->reverseHorizontal($width, $height); + } + } + + //@Override + public function getRow($y, $row = null) + { + if ($y < 0 || $y >= getHeight()) { + throw new \InvalidArgumentException("Requested row is outside the image: " + y); + } + $width = $this->getWidth(); + if ($row == null || count($row) < $width) { + $row = [];//new byte[width]; + } + $offset = ($y + $this->top) * $this->dataWidth + $this->left; + $row = arraycopy($this->yuvData, $offset, $row, 0, $width); + + return $row; + } + + //@Override + public function getMatrix() + { + $width = $this->getWidth(); + $height = $this->getHeight(); + + // If the caller asks for the entire underlying image, save the copy and give them the + // original data. The docs specifically warn that result.length must be ignored. + if ($width == $this->dataWidth && $height == $this->dataHeight) { + return $this->yuvData; + } + + $area = $width * $height; + $matrix = [];//new byte[area]; + $inputOffset = $this->top * $this->dataWidth + $this->left; + + // If the width matches the full width of the underlying data, perform a single copy. + if ($width == $this->dataWidth) { + $matrix = arraycopy($this->yuvData, $inputOffset, $matrix, 0, $area); + + return $matrix; + } + + // Otherwise copy one cropped row at a time. + $yuv = $this->yuvData; + for ($y = 0; $y < $height; $y++) { + $outputOffset = $y * $width; + $matrix = arraycopy($this->yuvData, $inputOffset, $matrix, $outputOffset, $width); + $inputOffset += $this->dataWidth; + } + + return $matrix; + } + + // @Override + public function isCropSupported() + { + return true; + } + + // @Override + public function crop($left, $top, $width, $height) + { + return new PlanarYUVLuminanceSource($this->yuvData, + $this->dataWidth, + $this->dataHeight, + $this->left + $left, + $this->top + $top, + $width, + $height, + false); + } + + public function renderThumbnail() + { + $width = (int)($this->getWidth() / self::$THUMBNAIL_SCALE_FACTOR); + $height = (int)($this->getHeight() / self::$THUMBNAIL_SCALE_FACTOR); + $pixels = [];//new int[width * height]; + $yuv = $this->yuvData; + $inputOffset = $this->top * $this->dataWidth + $this->left; + + for ($y = 0; $y < $height; $y++) { + $outputOffset = $y * $width; + for ($x = 0; $x < $width; $x++) { + $grey = ($yuv[$inputOffset + $x * self::$THUMBNAIL_SCALE_FACTOR] & 0xff); + $pixels[$outputOffset + $x] = (0xFF000000 | ($grey * 0x00010101)); + } + $inputOffset += $this->dataWidth * self::$THUMBNAIL_SCALE_FACTOR; + } + + return $pixels; + } + + /** + * @return width of image from {@link #renderThumbnail()} + */ + /* + public int getThumbnailWidth() { + return getWidth() / THUMBNAIL_SCALE_FACTOR; + }*/ + + /** + * @return height of image from {@link #renderThumbnail()} + */ + /* + public int getThumbnailHeight() { + return getHeight() / THUMBNAIL_SCALE_FACTOR; + } + + private void reverseHorizontal(int width, int height) { + byte[] yuvData = this.yuvData; + for (int y = 0, rowStart = top * dataWidth + left; y < height; y++, rowStart += dataWidth) { + int middle = rowStart + width / 2; + for (int x1 = rowStart, x2 = rowStart + width - 1; x1 < middle; x1++, x2--) { + byte temp = yuvData[x1]; + yuvData[x1] = yuvData[x2]; + yuvData[x2] = temp; + } + } + } +*/ +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/QrReader.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/QrReader.php new file mode 100755 index 0000000..200f910 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/QrReader.php @@ -0,0 +1,105 @@ +readImage($imgSource); + } else { + $image = file_get_contents($imgSource); + $im = imagecreatefromstring($image); + } + break; + + case QrReader::SOURCE_TYPE_BLOB: + if ($useImagickIfAvailable && extension_loaded('imagick')) { + $im = new \Imagick(); + $im->readImageBlob($imgSource); + } else { + $im = imagecreatefromstring($imgSource); + } + break; + + case QrReader::SOURCE_TYPE_RESOURCE: + $im = $imgSource; + if ($useImagickIfAvailable && extension_loaded('imagick')) { + $useImagickIfAvailable = true; + } else { + $useImagickIfAvailable = false; + } + break; + } + if ($useImagickIfAvailable && extension_loaded('imagick')) { + if (!$im instanceof \Imagick) { + throw new \InvalidArgumentException('Invalid image source.'); + } + $width = $im->getImageWidth(); + $height = $im->getImageHeight(); + $source = new IMagickLuminanceSource($im, $width, $height); + } else { + if (!is_resource($im)) { + throw new \InvalidArgumentException('Invalid image source.'); + } + $width = imagesx($im); + $height = imagesy($im); + $source = new GDLuminanceSource($im, $width, $height); + } + $histo = new HybridBinarizer($source); + $this->bitmap = new BinaryBitmap($histo); + $this->reader = new QRCodeReader(); + } + + public function decode() + { + try { + $this->result = $this->reader->decode($this->bitmap); + } catch (NotFoundException $er) { + $this->result = false; + } catch (FormatException $er) { + $this->result = false; + } catch (ChecksumException $er) { + $this->result = false; + } + } + + public function text() + { + $this->decode(); + + if (method_exists($this->result, 'toString')) { + return $this->result->toString(); + } + + return $this->result; + } + + public function getResult() + { + return $this->result; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/BitMatrixParser.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/BitMatrixParser.php new file mode 100755 index 0000000..8060720 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/BitMatrixParser.php @@ -0,0 +1,263 @@ += 21 and 1 mod 4 + */ + public function __construct($bitMatrix) + { + $dimension = $bitMatrix->getHeight(); + if ($dimension < 21 || ($dimension & 0x03) != 1) { + throw FormatException::getFormatInstance(); + } + $this->bitMatrix = $bitMatrix; + } + + /** + *

                            Reads the bits in the {@link BitMatrix} representing the finder pattern in the + * correct order in order to reconstruct the codewords bytes contained within the + * QR Code.

                            + * + * @return bytes encoded within the QR Code + * @throws FormatException if the exact number of bytes expected is not read + */ + public function readCodewords() + { + + $formatInfo = $this->readFormatInformation(); + $version = $this->readVersion(); + + // Get the data mask for the format used in this QR Code. This will exclude + // some bits from reading as we wind through the bit matrix. + $dataMask = DataMask::forReference($formatInfo->getDataMask()); + $dimension = $this->bitMatrix->getHeight(); + $dataMask->unmaskBitMatrix($this->bitMatrix, $dimension); + + $functionPattern = $version->buildFunctionPattern(); + + $readingUp = true; + if ($version->getTotalCodewords()) { + $result = fill_array(0, $version->getTotalCodewords(), 0); + } else { + $result = []; + } + $resultOffset = 0; + $currentByte = 0; + $bitsRead = 0; + // Read columns in pairs, from right to left + for ($j = $dimension - 1; $j > 0; $j -= 2) { + if ($j == 6) { + // Skip whole column with vertical alignment pattern; + // saves time and makes the other code proceed more cleanly + $j--; + } + // Read alternatingly from bottom to top then top to bottom + for ($count = 0; $count < $dimension; $count++) { + $i = $readingUp ? $dimension - 1 - $count : $count; + for ($col = 0; $col < 2; $col++) { + // Ignore bits covered by the function pattern + if (!$functionPattern->get($j - $col, $i)) { + // Read a bit + $bitsRead++; + $currentByte <<= 1; + if ($this->bitMatrix->get($j - $col, $i)) { + $currentByte |= 1; + } + // If we've made a whole byte, save it off + if ($bitsRead == 8) { + $result[$resultOffset++] = $currentByte; //(byte) + $bitsRead = 0; + $currentByte = 0; + } + } + } + } + $readingUp ^= true; // readingUp = !readingUp; // switch directions + } + if ($resultOffset != $version->getTotalCodewords()) { + throw FormatException::getFormatInstance(); + } + + return $result; + } + + /** + *

                            Reads format information from one of its two locations within the QR Code.

                            + * + * @return {@link FormatInformation} encapsulating the QR Code's format info + * @throws FormatException if both format information locations cannot be parsed as + * the valid encoding of format information + */ + public function readFormatInformation() + { + + if ($this->parsedFormatInfo != null) { + return $this->parsedFormatInfo; + } + + // Read top-left format info bits + $formatInfoBits1 = 0; + for ($i = 0; $i < 6; $i++) { + $formatInfoBits1 = $this->copyBit($i, 8, $formatInfoBits1); + } + // .. and skip a bit in the timing pattern ... + $formatInfoBits1 = $this->copyBit(7, 8, $formatInfoBits1); + $formatInfoBits1 = $this->copyBit(8, 8, $formatInfoBits1); + $formatInfoBits1 = $this->copyBit(8, 7, $formatInfoBits1); + // .. and skip a bit in the timing pattern ... + for ($j = 5; $j >= 0; $j--) { + $formatInfoBits1 = $this->copyBit(8, $j, $formatInfoBits1); + } + + // Read the top-right/bottom-left pattern too + $dimension = $this->bitMatrix->getHeight(); + $formatInfoBits2 = 0; + $jMin = $dimension - 7; + for ($j = $dimension - 1; $j >= $jMin; $j--) { + $formatInfoBits2 = $this->copyBit(8, $j, $formatInfoBits2); + } + for ($i = $dimension - 8; $i < $dimension; $i++) { + $formatInfoBits2 = $this->copyBit($i, 8, $formatInfoBits2); + } + + $parsedFormatInfo = FormatInformation::decodeFormatInformation($formatInfoBits1, $formatInfoBits2); + if ($parsedFormatInfo != null) { + return $parsedFormatInfo; + } + throw FormatException::getFormatInstance(); + } + + private function copyBit($i, $j, $versionBits) + { + $bit = $this->mirror ? $this->bitMatrix->get($j, $i) : $this->bitMatrix->get($i, $j); + + return $bit ? ($versionBits << 1) | 0x1 : $versionBits << 1; + } + + /** + *

                            Reads version information from one of its two locations within the QR Code.

                            + * + * @return {@link Version} encapsulating the QR Code's version + * @throws FormatException if both version information locations cannot be parsed as + * the valid encoding of version information + */ + public function readVersion() + { + + if ($this->parsedVersion != null) { + return $this->parsedVersion; + } + + $dimension = $this->bitMatrix->getHeight(); + + $provisionalVersion = ($dimension - 17) / 4; + if ($provisionalVersion <= 6) { + return Version::getVersionForNumber($provisionalVersion); + } + + // Read top-right version info: 3 wide by 6 tall + $versionBits = 0; + $ijMin = $dimension - 11; + for ($j = 5; $j >= 0; $j--) { + for ($i = $dimension - 9; $i >= $ijMin; $i--) { + $versionBits = $this->copyBit($i, $j, $versionBits); + } + } + + $theParsedVersion = Version::decodeVersionInformation($versionBits); + if ($theParsedVersion != null && $theParsedVersion->getDimensionForVersion() == $dimension) { + $this->parsedVersion = $theParsedVersion; + + return $theParsedVersion; + } + + // Hmm, failed. Try bottom left: 6 wide by 3 tall + $versionBits = 0; + for ($i = 5; $i >= 0; $i--) { + for ($j = $dimension - 9; $j >= $ijMin; $j--) { + $versionBits = $this->copyBit($i, $j, $versionBits); + } + } + + $theParsedVersion = Version::decodeVersionInformation($versionBits); + if ($theParsedVersion != null && $theParsedVersion->getDimensionForVersion() == $dimension) { + $this->parsedVersion = $theParsedVersion; + + return $theParsedVersion; + } + throw FormatException::getFormatInstance(); + } + + /** + * Revert the mask removal done while reading the code words. The bit matrix should revert to its original state. + */ + public function remask() + { + if ($this->parsedFormatInfo == null) { + return; // We have no format information, and have no data mask + } + $dataMask = DataMask::forReference($this->parsedFormatInfo->getDataMask()); + $dimension = $this->bitMatrix->getHeight(); + $dataMask->unmaskBitMatrix($this->bitMatrix, $dimension); + } + + /** + * Prepare the parser for a mirrored operation. + * This flag has effect only on the {@link #readFormatInformation()} and the + * {@link #readVersion()}. Before proceeding with {@link #readCodewords()} the + * {@link #mirror()} method should be called. + * + * @param mirror Whether to read version and format information mirrored. + */ + public function setMirror($mirror) + { + $parsedVersion = null; + $parsedFormatInfo = null; + $this->mirror = $mirror; + } + + /** Mirror the bit matrix in order to attempt a second reading. */ + public function mirror() + { + for ($x = 0; $x < $this->bitMatrix->getWidth(); $x++) { + for ($y = $x + 1; $y < $this->bitMatrix->getHeight(); $y++) { + if ($this->bitMatrix->get($x, $y) != $this->bitMatrix->get($y, $x)) { + $this->bitMatrix->flip($y, $x); + $this->bitMatrix->flip($x, $y); + } + } + } + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DataBlock.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DataBlock.php new file mode 100755 index 0000000..c845247 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DataBlock.php @@ -0,0 +1,129 @@ +Encapsulates a block of data within a QR Code. QR Codes may split their data into + * multiple blocks, each of which is a unit of data and error-correction codewords. Each + * is represented by an instance of this class.

                            + * + * @author Sean Owen + */ +final class DataBlock +{ + private $numDataCodewords; + private $codewords; //byte[] + + private function __construct($numDataCodewords, $codewords) + { + $this->numDataCodewords = $numDataCodewords; + $this->codewords = $codewords; + } + + /** + *

                            When QR Codes use multiple data blocks, they are actually interleaved. + * That is, the first byte of data block 1 to n is written, then the second bytes, and so on. This + * method will separate the data into original blocks.

                            + * + * @param rawCodewords bytes as read directly from the QR Code + * @param version version of the QR Code + * @param ecLevel error-correction level of the QR Code + * + * @return array DataBlocks containing original bytes, "de-interleaved" from representation in the + * QR Code + */ + public static function getDataBlocks($rawCodewords, + $version, + $ecLevel) + { + + if (count($rawCodewords) != $version->getTotalCodewords()) { + throw new \InvalidArgumentException(); + } + + // Figure out the number and size of data blocks used by this version and + // error correction level + $ecBlocks = $version->getECBlocksForLevel($ecLevel); + + // First count the total number of data blocks + $totalBlocks = 0; + $ecBlockArray = $ecBlocks->getECBlocks(); + foreach ($ecBlockArray as $ecBlock) { + $totalBlocks += $ecBlock->getCount(); + } + + // Now establish DataBlocks of the appropriate size and number of data codewords + $result = [];//new DataBlock[$totalBlocks]; + $numResultBlocks = 0; + foreach ($ecBlockArray as $ecBlock) { + $ecBlockCount = $ecBlock->getCount(); + for ($i = 0; $i < $ecBlockCount; $i++) { + $numDataCodewords = $ecBlock->getDataCodewords(); + $numBlockCodewords = $ecBlocks->getECCodewordsPerBlock() + $numDataCodewords; + $result[$numResultBlocks++] = new DataBlock($numDataCodewords, fill_array(0, $numBlockCodewords, 0)); + } + } + + // All blocks have the same amount of data, except that the last n + // (where n may be 0) have 1 more byte. Figure out where these start. + $shorterBlocksTotalCodewords = count($result[0]->codewords); + $longerBlocksStartAt = count($result) - 1; + while ($longerBlocksStartAt >= 0) { + $numCodewords = count($result[$longerBlocksStartAt]->codewords); + if ($numCodewords == $shorterBlocksTotalCodewords) { + break; + } + $longerBlocksStartAt--; + } + $longerBlocksStartAt++; + + $shorterBlocksNumDataCodewords = $shorterBlocksTotalCodewords - $ecBlocks->getECCodewordsPerBlock(); + // The last elements of result may be 1 element longer; + // first fill out as many elements as all of them have + $rawCodewordsOffset = 0; + for ($i = 0; $i < $shorterBlocksNumDataCodewords; $i++) { + for ($j = 0; $j < $numResultBlocks; $j++) { + $result[$j]->codewords[$i] = $rawCodewords[$rawCodewordsOffset++]; + } + } + // Fill out the last data block in the longer ones + for ($j = $longerBlocksStartAt; $j < $numResultBlocks; $j++) { + $result[$j]->codewords[$shorterBlocksNumDataCodewords] = $rawCodewords[$rawCodewordsOffset++]; + } + // Now add in error correction blocks + $max = count($result[0]->codewords); + for ($i = $shorterBlocksNumDataCodewords; $i < $max; $i++) { + for ($j = 0; $j < $numResultBlocks; $j++) { + $iOffset = $j < $longerBlocksStartAt ? $i : $i + 1; + $result[$j]->codewords[$iOffset] = $rawCodewords[$rawCodewordsOffset++]; + } + } + + return $result; + } + + public function getNumDataCodewords() + { + return $this->numDataCodewords; + } + + public function getCodewords() + { + return $this->codewords; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DataMask.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DataMask.php new file mode 100755 index 0000000..5fa2098 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DataMask.php @@ -0,0 +1,196 @@ +Encapsulates data masks for the data bits in a QR code, per ISO 18004:2006 6.8. Implementations + * of this class can un-mask a raw BitMatrix. For simplicity, they will unmask the entire BitMatrix, + * including areas used for finder patterns, timing patterns, etc. These areas should be unused + * after the point they are unmasked anyway.

                            + * + *

                            Note that the diagram in section 6.8.1 is misleading since it indicates that i is column position + * and j is row position. In fact, as the text says, i is row position and j is column position.

                            + * + * @author Sean Owen + */ +abstract class DataMask +{ + + /** + * See ISO 18004:2006 6.8.1 + */ + private static $DATA_MASKS = []; + + public function __construct() + { + + } + + public static function Init() + { + self::$DATA_MASKS = [ + new DataMask000(), + new DataMask001(), + new DataMask010(), + new DataMask011(), + new DataMask100(), + new DataMask101(), + new DataMask110(), + new DataMask111(), + ]; + } + + /** + * @param reference a value between 0 and 7 indicating one of the eight possible + * data mask patterns a QR Code may use + * + * @return DataMask encapsulating the data mask pattern + */ + public static function forReference($reference) + { + if ($reference < 0 || $reference > 7) { + throw new \InvalidArgumentException(); + } + + return self::$DATA_MASKS[$reference]; + } + + /** + *

                            Implementations of this method reverse the data masking process applied to a QR Code and + * make its bits ready to read.

                            + * + * @param bits representation of QR Code bits + * @param dimension dimension of QR Code, represented by bits, being unmasked + */ + final public function unmaskBitMatrix($bits, $dimension) + { + for ($i = 0; $i < $dimension; $i++) { + for ($j = 0; $j < $dimension; $j++) { + if ($this->isMasked($i, $j)) { + $bits->flip($j, $i); + } + } + } + } + + abstract public function isMasked($i, $j); +} + +DataMask::Init(); + +/** + * 000: mask bits for which (x + y) mod 2 == 0 + */ +final class DataMask000 extends DataMask +{ + // @Override + public function isMasked($i, $j) + { + return (($i + $j) & 0x01) == 0; + } +} + +/** + * 001: mask bits for which x mod 2 == 0 + */ +final class DataMask001 extends DataMask +{ + //@Override + public function isMasked($i, $j) + { + return ($i & 0x01) == 0; + } +} + +/** + * 010: mask bits for which y mod 3 == 0 + */ +final class DataMask010 extends DataMask +{ + //@Override + public function isMasked($i, $j) + { + return $j % 3 == 0; + } +} + +/** + * 011: mask bits for which (x + y) mod 3 == 0 + */ +final class DataMask011 extends DataMask +{ + //@Override + public function isMasked($i, $j) + { + return ($i + $j) % 3 == 0; + } +} + +/** + * 100: mask bits for which (x/2 + y/3) mod 2 == 0 + */ +final class DataMask100 extends DataMask +{ + //@Override + public function isMasked($i, $j) + { + return (int)(((int)($i / 2) + (int)($j / 3)) & 0x01) == 0; + } +} + +/** + * 101: mask bits for which xy mod 2 + xy mod 3 == 0 + */ +final class DataMask101 extends DataMask +{ + //@Override + public function isMasked($i, $j) + { + $temp = $i * $j; + + return ($temp & 0x01) + ($temp % 3) == 0; + } +} + +/** + * 110: mask bits for which (xy mod 2 + xy mod 3) mod 2 == 0 + */ +final class DataMask110 extends DataMask +{ + //@Override + public function isMasked($i, $j) + { + $temp = $i * $j; + + return ((($temp & 0x01) + ($temp % 3)) & 0x01) == 0; + } +} + +/** + * 111: mask bits for which ((x+y)mod 2 + xy mod 3) mod 2 == 0 + */ +final class DataMask111 extends DataMask +{ + //@Override + public function isMasked($i, $j) + { + return (((($i + $j) & 0x01) + (($i * $j) % 3)) & 0x01) == 0; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DecodedBitStreamParser.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DecodedBitStreamParser.php new file mode 100755 index 0000000..75e5942 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/DecodedBitStreamParser.php @@ -0,0 +1,355 @@ +QR Codes can encode text as bits in one of several modes, and can use multiple modes + * in one QR Code. This class decodes the bits back into text.

                            + * + *

                            See ISO 18004:2006, 6.4.3 - 6.4.7

                            + * + * @author Sean Owen + */ +final class DecodedBitStreamParser +{ + + /** + * See ISO 18004:2006, 6.4.4 Table 5 + */ + private static $ALPHANUMERIC_CHARS = [ + '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', + 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', + 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + ' ', '$', '%', '*', '+', '-', '.', '/', ':', + ]; + private static $GB2312_SUBSET = 1; + + public static function decode($bytes, + $version, + $ecLevel, + $hints) + { + $bits = new BitSource($bytes); + $result = '';//new StringBuilder(50); + $byteSegments = []; + $symbolSequence = -1; + $parityData = -1; + + try { + $currentCharacterSetECI = null; + $fc1InEffect = false; + $mode = ''; + do { + // While still another segment to read... + if ($bits->available() < 4) { + // OK, assume we're done. Really, a TERMINATOR mode should have been recorded here + $mode = Mode::$TERMINATOR; + } else { + $mode = Mode::forBits($bits->readBits(4)); // mode is encoded by 4 bits + } + if ($mode != Mode::$TERMINATOR) { + if ($mode == Mode::$FNC1_FIRST_POSITION || $mode == Mode::$FNC1_SECOND_POSITION) { + // We do little with FNC1 except alter the parsed result a bit according to the spec + $fc1InEffect = true; + } else if ($mode == Mode::$STRUCTURED_APPEND) { + if ($bits->available() < 16) { + throw FormatException::getFormatInstance(); + } + // sequence number and parity is added later to the result metadata + // Read next 8 bits (symbol sequence #) and 8 bits (parity data), then continue + $symbolSequence = $bits->readBits(8); + $parityData = $bits->readBits(8); + } else if ($mode == Mode::$ECI) { + // Count doesn't apply to ECI + $value = self::parseECIValue($bits); + $currentCharacterSetECI = CharacterSetECI::getCharacterSetECIByValue($value); + if ($currentCharacterSetECI == null) { + throw FormatException::getFormatInstance(); + } + } else { + // First handle Hanzi mode which does not start with character count + if ($mode == Mode::$HANZI) { + //chinese mode contains a sub set indicator right after mode indicator + $subset = $bits->readBits(4); + $countHanzi = $bits->readBits($mode->getCharacterCountBits($version)); + if ($subset == self::$GB2312_SUBSET) { + self::decodeHanziSegment($bits, $result, $countHanzi); + } + } else { + // "Normal" QR code modes: + // How many characters will follow, encoded in this mode? + $count = $bits->readBits($mode->getCharacterCountBits($version)); + if ($mode == Mode::$NUMERIC) { + self::decodeNumericSegment($bits, $result, $count); + } else if ($mode == Mode::$ALPHANUMERIC) { + self::decodeAlphanumericSegment($bits, $result, $count, $fc1InEffect); + } else if ($mode == Mode::$BYTE) { + self::decodeByteSegment($bits, $result, $count, $currentCharacterSetECI, $byteSegments, $hints); + } else if ($mode == Mode::$KANJI) { + self::decodeKanjiSegment($bits, $result, $count); + } else { + throw FormatException::getFormatInstance(); + } + } + } + } + } while ($mode != Mode::$TERMINATOR); + } catch (\InvalidArgumentException $iae) { + // from readBits() calls + throw FormatException::getFormatInstance(); + } + + return new DecoderResult($bytes, + $result, + empty($byteSegments) ? null : $byteSegments, + $ecLevel == null ? null : 'L',//ErrorCorrectionLevel::toString($ecLevel), + $symbolSequence, + $parityData); + } + + private static function parseECIValue($bits) + { + $firstByte = $bits->readBits(8); + if (($firstByte & 0x80) == 0) { + // just one byte + return $firstByte & 0x7F; + } + if (($firstByte & 0xC0) == 0x80) { + // two bytes + $secondByte = $bits->readBits(8); + + return (($firstByte & 0x3F) << 8) | $secondByte; + } + if (($firstByte & 0xE0) == 0xC0) { + // three bytes + $secondThirdBytes = $bits->readBits(16); + + return (($firstByte & 0x1F) << 16) | $secondThirdBytes; + } + throw FormatException::getFormatInstance(); + } + + /** + * See specification GBT 18284-2000 + */ + private static function decodeHanziSegment($bits, + &$result, + $count) + { + // Don't crash trying to read more bits than we have available. + if ($count * 13 > $bits->available()) { + throw FormatException::getFormatInstance(); + } + + // Each character will require 2 bytes. Read the characters as 2-byte pairs + // and decode as GB2312 afterwards + $buffer = fill_array(0, 2 * $count, 0); + $offset = 0; + while ($count > 0) { + // Each 13 bits encodes a 2-byte character + $twoBytes = $bits->readBits(13); + $assembledTwoBytes = (($twoBytes / 0x060) << 8) | ($twoBytes % 0x060); + if ($assembledTwoBytes < 0x003BF) { + // In the 0xA1A1 to 0xAAFE range + $assembledTwoBytes += 0x0A1A1; + } else { + // In the 0xB0A1 to 0xFAFE range + $assembledTwoBytes += 0x0A6A1; + } + $buffer[$offset] = (($assembledTwoBytes >> 8) & 0xFF);//(byte) + $buffer[$offset + 1] = ($assembledTwoBytes & 0xFF);//(byte) + $offset += 2; + $count--; + } + $result .= iconv('GB2312', 'UTF-8', implode($buffer)); + } + + private static function decodeNumericSegment($bits, + &$result, + $count) + { + // Read three digits at a time + while ($count >= 3) { + // Each 10 bits encodes three digits + if ($bits->available() < 10) { + throw FormatException::getFormatInstance(); + } + $threeDigitsBits = $bits->readBits(10); + if ($threeDigitsBits >= 1000) { + throw FormatException::getFormatInstance(); + } + $result .= (self::toAlphaNumericChar($threeDigitsBits / 100)); + $result .= (self::toAlphaNumericChar(($threeDigitsBits / 10) % 10)); + $result .= (self::toAlphaNumericChar($threeDigitsBits % 10)); + $count -= 3; + } + if ($count == 2) { + // Two digits left over to read, encoded in 7 bits + if ($bits->available() < 7) { + throw FormatException::getFormatInstance(); + } + $twoDigitsBits = $bits->readBits(7); + if ($twoDigitsBits >= 100) { + throw FormatException::getFormatInstance(); + } + $result .= (self::toAlphaNumericChar($twoDigitsBits / 10)); + $result .= (self::toAlphaNumericChar($twoDigitsBits % 10)); + } else if ($count == 1) { + // One digit left over to read + if ($bits->available() < 4) { + throw FormatException::getFormatInstance(); + } + $digitBits = $bits->readBits(4); + if ($digitBits >= 10) { + throw FormatException::getFormatInstance(); + } + $result .= (self::toAlphaNumericChar($digitBits)); + } + } + + private static function toAlphaNumericChar($value) + { + if ($value >= count(self::$ALPHANUMERIC_CHARS)) { + throw FormatException::getFormatInstance(); + } + + return self::$ALPHANUMERIC_CHARS[$value]; + } + + private static function decodeAlphanumericSegment($bits, + &$result, + $count, + $fc1InEffect) + { + // Read two characters at a time + $start = strlen($result); + while ($count > 1) { + if ($bits->available() < 11) { + throw FormatException::getFormatInstance(); + } + $nextTwoCharsBits = $bits->readBits(11); + $result .= (self::toAlphaNumericChar($nextTwoCharsBits / 45)); + $result .= (self::toAlphaNumericChar($nextTwoCharsBits % 45)); + $count -= 2; + } + if ($count == 1) { + // special case: one character left + if ($bits->available() < 6) { + throw FormatException::getFormatInstance(); + } + $result .= self::toAlphaNumericChar($bits->readBits(6)); + } + // See section 6.4.8.1, 6.4.8.2 + if ($fc1InEffect) { + // We need to massage the result a bit if in an FNC1 mode: + for ($i = $start; $i < strlen($result); $i++) { + if ($result{$i} == '%') { + if ($i < strlen($result) - 1 && $result{$i + 1} == '%') { + // %% is rendered as % + $result = substr_replace($result, '', $i + 1, 1);//deleteCharAt(i + 1); + } else { + // In alpha mode, % should be converted to FNC1 separator 0x1D + $result . setCharAt($i, chr(0x1D)); + } + } + } + } + } + + private static function decodeByteSegment($bits, + &$result, + $count, + $currentCharacterSetECI, + &$byteSegments, + $hints) + { + // Don't crash trying to read more bits than we have available. + if (8 * $count > $bits->available()) { + throw FormatException::getFormatInstance(); + } + + $readBytes = fill_array(0, $count, 0); + for ($i = 0; $i < $count; $i++) { + $readBytes[$i] = $bits->readBits(8);//(byte) + } + $text = implode(array_map('chr', $readBytes)); + $encoding = ''; + if ($currentCharacterSetECI == null) { + // The spec isn't clear on this mode; see + // section 6.4.5: t does not say which encoding to assuming + // upon decoding. I have seen ISO-8859-1 used as well as + // Shift_JIS -- without anything like an ECI designator to + // give a hint. + + $encoding = mb_detect_encoding($text, $hints); + } else { + $encoding = $currentCharacterSetECI->name(); + } + // $result.= mb_convert_encoding($text ,$encoding);//(new String(readBytes, encoding)); + $result .= $text;//(new String(readBytes, encoding)); + + $byteSegments = array_merge($byteSegments, $readBytes); + } + + private static function decodeKanjiSegment($bits, + &$result, + $count) + { + // Don't crash trying to read more bits than we have available. + if ($count * 13 > $bits->available()) { + throw FormatException::getFormatInstance(); + } + + // Each character will require 2 bytes. Read the characters as 2-byte pairs + // and decode as Shift_JIS afterwards + $buffer = [0, 2 * $count, 0]; + $offset = 0; + while ($count > 0) { + // Each 13 bits encodes a 2-byte character + $twoBytes = $bits->readBits(13); + $assembledTwoBytes = (($twoBytes / 0x0C0) << 8) | ($twoBytes % 0x0C0); + if ($assembledTwoBytes < 0x01F00) { + // In the 0x8140 to 0x9FFC range + $assembledTwoBytes += 0x08140; + } else { + // In the 0xE040 to 0xEBBF range + $assembledTwoBytes += 0x0C140; + } + $buffer[$offset] = ($assembledTwoBytes >> 8);//(byte) + $buffer[$offset + 1] = $assembledTwoBytes; //(byte) + $offset += 2; + $count--; + } + // Shift_JIS may not be supported in some environments: + + $result .= iconv('shift-jis', 'utf-8', implode($buffer)); + } + + private function DecodedBitStreamParser() + { + + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Decoder.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Decoder.php new file mode 100755 index 0000000..ff181ec --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Decoder.php @@ -0,0 +1,213 @@ +The main class which implements QR Code decoding -- as opposed to locating and extracting + * the QR Code from an image.

                            + * + * @author Sean Owen + */ +final class Decoder +{ + + private $rsDecoder; + + public function __construct() + { + $this->rsDecoder = new ReedSolomonDecoder(GenericGF::$QR_CODE_FIELD_256); + } + + public function decode($variable, $hints = null) + { + if (is_array($variable)) { + return $this->decodeImage($variable, $hints); + } elseif ($variable instanceof BitMatrix) { + return $this->decodeBits($variable, $hints); + } elseif ($variable instanceof BitMatrixParser) { + return $this->decodeParser($variable, $hints); + } + die('decode error Decoder.php'); + } + + /** + *

                            Convenience method that can decode a QR Code represented as a 2D array of booleans. + * "true" is taken to mean a black module.

                            + * + * @param array $image booleans representing white/black QR Code modules + * @param hints decoding hints that should be used to influence decoding + * + * @return text and bytes encoded within the QR Code + * @throws FormatException if the QR Code cannot be decoded + * @throws ChecksumException if error correction fails + */ + public function decodeImage($image, $hints = null) + { + $dimension = count($image); + $bits = new BitMatrix($dimension); + for ($i = 0; $i < $dimension; $i++) { + for ($j = 0; $j < $dimension; $j++) { + if ($image[$i][$j]) { + $bits->set($j, $i); + } + } + } + + return $this->decode($bits, $hints); + } + + + /** + *

                            Decodes a QR Code represented as a {@link BitMatrix}. A 1 or "true" is taken to mean a black module.

                            + * + * @param BitMatrix $bits booleans representing white/black QR Code modules + * @param hints decoding hints that should be used to influence decoding + * + * @return text and bytes encoded within the QR Code + * @throws FormatException if the QR Code cannot be decoded + * @throws ChecksumException if error correction fails + */ + public function decodeBits($bits, $hints = null) + { + +// Construct a parser and read version, error-correction level + $parser = new BitMatrixParser($bits); + $fe = null; + $ce = null; + try { + return $this->decode($parser, $hints); + } catch (FormatException $e) { + $fe = $e; + } catch (ChecksumException $e) { + $ce = $e; + } + + try { + + // Revert the bit matrix + $parser->remask(); + + // Will be attempting a mirrored reading of the version and format info. + $parser->setMirror(true); + + // Preemptively read the version. + $parser->readVersion(); + + // Preemptively read the format information. + $parser->readFormatInformation(); + + /* + * Since we're here, this means we have successfully detected some kind + * of version and format information when mirrored. This is a good sign, + * that the QR code may be mirrored, and we should try once more with a + * mirrored content. + */ + // Prepare for a mirrored reading. + $parser->mirror(); + + $result = $this->decode($parser, $hints); + + // Success! Notify the caller that the code was mirrored. + $result->setOther(new QRCodeDecoderMetaData(true)); + + return $result; + + } catch (FormatException $e) {// catch (FormatException | ChecksumException e) { + // Throw the exception from the original reading + if ($fe != null) { + throw $fe; + } + if ($ce != null) { + throw $ce; + } + throw $e; + + } + } + + private function decodeParser($parser, $hints = null) + { + $version = $parser->readVersion(); + $ecLevel = $parser->readFormatInformation()->getErrorCorrectionLevel(); + +// Read codewords + $codewords = $parser->readCodewords(); +// Separate into data blocks + $dataBlocks = DataBlock::getDataBlocks($codewords, $version, $ecLevel); + +// Count total number of data bytes + $totalBytes = 0; + foreach ($dataBlocks as $dataBlock) { + $totalBytes += $dataBlock->getNumDataCodewords(); + } + $resultBytes = fill_array(0, $totalBytes, 0); + $resultOffset = 0; + +// Error-correct and copy data blocks together into a stream of bytes + foreach ($dataBlocks as $dataBlock) { + $codewordBytes = $dataBlock->getCodewords(); + $numDataCodewords = $dataBlock->getNumDataCodewords(); + $this->correctErrors($codewordBytes, $numDataCodewords); + for ($i = 0; $i < $numDataCodewords; $i++) { + $resultBytes[$resultOffset++] = $codewordBytes[$i]; + } + } + +// Decode the contents of that stream of bytes + return DecodedBitStreamParser::decode($resultBytes, $version, $ecLevel, $hints); + } + + /** + *

                            Given data and error-correction codewords received, possibly corrupted by errors, attempts to + * correct the errors in-place using Reed-Solomon error correction.

                            + * + * @param codewordBytes data and error correction codewords + * @param numDataCodewords number of codewords that are data bytes + * + * @throws ChecksumException if error correction fails + */ + private function correctErrors(&$codewordBytes, $numDataCodewords) + { + $numCodewords = count($codewordBytes); +// First read into an array of ints + $codewordsInts = fill_array(0, $numCodewords, 0); + for ($i = 0; $i < $numCodewords; $i++) { + $codewordsInts[$i] = $codewordBytes[$i] & 0xFF; + } + $numECCodewords = count($codewordBytes) - $numDataCodewords; + try { + $this->rsDecoder->decode($codewordsInts, $numECCodewords); + } catch (ReedSolomonException $ignored) { + throw ChecksumException::getChecksumInstance(); + } +// Copy back into array of bytes -- only need to worry about the bytes that were data +// We don't care about errors in the error-correction codewords + for ($i = 0; $i < $numDataCodewords; $i++) { + $codewordBytes[$i] = $codewordsInts[$i]; + } + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/ErrorCorrectionLevel.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/ErrorCorrectionLevel.php new file mode 100755 index 0000000..38ae6a6 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/ErrorCorrectionLevel.php @@ -0,0 +1,91 @@ +See ISO 18004:2006, 6.5.1. This enum encapsulates the four error correction levels + * defined by the QR code standard.

                            + * + * @author Sean Owen + */ +class ErrorCorrectionLevel +{ + private static $FOR_BITS; + private $bits; + private $ordinal; + + public function __construct($bits, $ordinal = 0) + { + $this->bits = $bits; + $this->ordinal = $ordinal; + } + + public static function Init() + { + self::$FOR_BITS = [ + + + new ErrorCorrectionLevel(0x00, 1), //M + new ErrorCorrectionLevel(0x01, 0), //L + new ErrorCorrectionLevel(0x02, 3), //H + new ErrorCorrectionLevel(0x03, 2), //Q + + ]; + } + /** L = ~7% correction */ + // self::$L = new ErrorCorrectionLevel(0x01); + /** M = ~15% correction */ + //self::$M = new ErrorCorrectionLevel(0x00); + /** Q = ~25% correction */ + //self::$Q = new ErrorCorrectionLevel(0x03); + /** H = ~30% correction */ + //self::$H = new ErrorCorrectionLevel(0x02); + /** + * @param bits int containing the two bits encoding a QR Code's error correction level + * + * @return ErrorCorrectionLevel representing the encoded error correction level + */ + public static function forBits($bits) + { + if ($bits < 0 || $bits >= count(self::$FOR_BITS)) { + throw new \InvalidArgumentException(); + } + $level = self::$FOR_BITS[$bits]; + + // $lev = self::$$bit; + return $level; + } + + + public function getBits() + { + return $this->bits; + } + + public function toString() + { + return $this->bits; + } + + public function getOrdinal() + { + return $this->ordinal; + } +} + +ErrorCorrectionLevel::Init(); diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/FormatInformation.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/FormatInformation.php new file mode 100755 index 0000000..fedcb63 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/FormatInformation.php @@ -0,0 +1,190 @@ +Encapsulates a QR Code's format information, including the data mask used and + * error correction level.

                            + * + * @author Sean Owen + * @see DataMask + * @see ErrorCorrectionLevel + */ +final class FormatInformation +{ + public static $FORMAT_INFO_MASK_QR; + + /** + * See ISO 18004:2006, Annex C, Table C.1 + */ + public static $FORMAT_INFO_DECODE_LOOKUP; + /** + * Offset i holds the number of 1 bits in the binary representation of i + */ + private static $BITS_SET_IN_HALF_BYTE; + + private $errorCorrectionLevel; + private $dataMask; + + private function __construct($formatInfo) + { + // Bits 3,4 + $this->errorCorrectionLevel = ErrorCorrectionLevel::forBits(($formatInfo >> 3) & 0x03); + // Bottom 3 bits + $this->dataMask = ($formatInfo & 0x07);//(byte) + } + + public static function Init() + { + self::$FORMAT_INFO_MASK_QR = 0x5412; + self::$BITS_SET_IN_HALF_BYTE = [0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4]; + self::$FORMAT_INFO_DECODE_LOOKUP = [ + [0x5412, 0x00], + [0x5125, 0x01], + [0x5E7C, 0x02], + [0x5B4B, 0x03], + [0x45F9, 0x04], + [0x40CE, 0x05], + [0x4F97, 0x06], + [0x4AA0, 0x07], + [0x77C4, 0x08], + [0x72F3, 0x09], + [0x7DAA, 0x0A], + [0x789D, 0x0B], + [0x662F, 0x0C], + [0x6318, 0x0D], + [0x6C41, 0x0E], + [0x6976, 0x0F], + [0x1689, 0x10], + [0x13BE, 0x11], + [0x1CE7, 0x12], + [0x19D0, 0x13], + [0x0762, 0x14], + [0x0255, 0x15], + [0x0D0C, 0x16], + [0x083B, 0x17], + [0x355F, 0x18], + [0x3068, 0x19], + [0x3F31, 0x1A], + [0x3A06, 0x1B], + [0x24B4, 0x1C], + [0x2183, 0x1D], + [0x2EDA, 0x1E], + [0x2BED, 0x1F], + ]; + } + + /** + * @param maskedFormatInfo1 ; format info indicator, with mask still applied + * @param maskedFormatInfo2 ; second copy of same info; both are checked at the same time + * to establish best match + * + * @return information about the format it specifies, or {@code null} + * if doesn't seem to match any known pattern + */ + public static function decodeFormatInformation($maskedFormatInfo1, $maskedFormatInfo2) + { + $formatInfo = self::doDecodeFormatInformation($maskedFormatInfo1, $maskedFormatInfo2); + if ($formatInfo != null) { + return $formatInfo; + } + // Should return null, but, some QR codes apparently + // do not mask this info. Try again by actually masking the pattern + // first + return self::doDecodeFormatInformation($maskedFormatInfo1 ^ self::$FORMAT_INFO_MASK_QR, + $maskedFormatInfo2 ^ self::$FORMAT_INFO_MASK_QR); + } + + private static function doDecodeFormatInformation($maskedFormatInfo1, $maskedFormatInfo2) + { + // Find the int in FORMAT_INFO_DECODE_LOOKUP with fewest bits differing + $bestDifference = PHP_INT_MAX; + $bestFormatInfo = 0; + foreach (self::$FORMAT_INFO_DECODE_LOOKUP as $decodeInfo) { + $targetInfo = $decodeInfo[0]; + if ($targetInfo == $maskedFormatInfo1 || $targetInfo == $maskedFormatInfo2) { + // Found an exact match + return new FormatInformation($decodeInfo[1]); + } + $bitsDifference = self::numBitsDiffering($maskedFormatInfo1, $targetInfo); + if ($bitsDifference < $bestDifference) { + $bestFormatInfo = $decodeInfo[1]; + $bestDifference = $bitsDifference; + } + if ($maskedFormatInfo1 != $maskedFormatInfo2) { + // also try the other option + $bitsDifference = self::numBitsDiffering($maskedFormatInfo2, $targetInfo); + if ($bitsDifference < $bestDifference) { + $bestFormatInfo = $decodeInfo[1]; + $bestDifference = $bitsDifference; + } + } + } + // Hamming distance of the 32 masked codes is 7, by construction, so <= 3 bits + // differing means we found a match + if ($bestDifference <= 3) { + return new FormatInformation($bestFormatInfo); + } + + return null; + } + + public static function numBitsDiffering($a, $b) + { + $a ^= $b; // a now has a 1 bit exactly where its bit differs with b's + // Count bits set quickly with a series of lookups: + return self::$BITS_SET_IN_HALF_BYTE[$a & 0x0F] + + self::$BITS_SET_IN_HALF_BYTE[(int)(uRShift($a, 4) & 0x0F)] + + self::$BITS_SET_IN_HALF_BYTE[(uRShift($a, 8) & 0x0F)] + + self::$BITS_SET_IN_HALF_BYTE[(uRShift($a, 12) & 0x0F)] + + self::$BITS_SET_IN_HALF_BYTE[(uRShift($a, 16) & 0x0F)] + + self::$BITS_SET_IN_HALF_BYTE[(uRShift($a, 20) & 0x0F)] + + self::$BITS_SET_IN_HALF_BYTE[(uRShift($a, 24) & 0x0F)] + + self::$BITS_SET_IN_HALF_BYTE[(uRShift($a, 28) & 0x0F)]; + } + + public function getErrorCorrectionLevel() + { + return $this->errorCorrectionLevel; + } + + public function getDataMask() + { + return $this->dataMask; + } + + //@Override + public function hashCode() + { + return ($this->errorCorrectionLevel->ordinal() << 3) | (int)($this->dataMask); + } + + //@Override + public function equals($o) + { + if (!($o instanceof FormatInformation)) { + return false; + } + $other = $o; + + return $this->errorCorrectionLevel == $other->errorCorrectionLevel && + $this->dataMask == $other->dataMask; + } +} + +FormatInformation::Init(); diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Mode.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Mode.php new file mode 100755 index 0000000..5047279 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Mode.php @@ -0,0 +1,128 @@ +See ISO 18004:2006, 6.4.1, Tables 2 and 3. This enum encapsulates the various modes in which + * data can be encoded to bits in the QR code standard.

                            + * + * @author Sean Owen + */ +class Mode +{ + public static $TERMINATOR; + public static $NUMERIC; + public static $ALPHANUMERIC; + public static $STRUCTURED_APPEND; + public static $BYTE; + public static $ECI; + public static $KANJI; + public static $FNC1_FIRST_POSITION; + public static $FNC1_SECOND_POSITION; + public static $HANZI; + + private $characterCountBitsForVersions; + private $bits; + + public function __construct($characterCountBitsForVersions, $bits) + { + $this->characterCountBitsForVersions = $characterCountBitsForVersions; + $this->bits = $bits; + } + + public static function Init() + { + + + self::$TERMINATOR = new Mode([0, 0, 0], 0x00); // Not really a mode... + self::$NUMERIC = new Mode([10, 12, 14], 0x01); + self::$ALPHANUMERIC = new Mode([9, 11, 13], 0x02); + self::$STRUCTURED_APPEND = new Mode([0, 0, 0], 0x03); // Not supported + self::$BYTE = new Mode([8, 16, 16], 0x04); + self::$ECI = new Mode([0, 0, 0], 0x07); // character counts don't apply + self::$KANJI = new Mode([8, 10, 12], 0x08); + self::$FNC1_FIRST_POSITION = new Mode([0, 0, 0], 0x05); + self::$FNC1_SECOND_POSITION = new Mode([0, 0, 0], 0x09); + /** See GBT 18284-2000; "Hanzi" is a transliteration of this mode name. */ + self::$HANZI = new Mode([8, 10, 12], 0x0D); + } + + /** + * @param bits four bits encoding a QR Code data mode + * + * @return Mode encoded by these bits + * @throws IllegalArgumentException if bits do not correspond to a known mode + */ + public static function forBits($bits) + { + switch ($bits) { + case 0x0: + return self::$TERMINATOR; + case 0x1: + return self::$NUMERIC; + case 0x2: + return self::$ALPHANUMERIC; + case 0x3: + return self::$STRUCTURED_APPEND; + case 0x4: + return self::$BYTE; + case 0x5: + return self::$FNC1_FIRST_POSITION; + case 0x7: + return self::$ECI; + case 0x8: + return self::$KANJI; + case 0x9: + return self::$FNC1_SECOND_POSITION; + case 0xD: + // 0xD is defined in GBT 18284-2000, may not be supported in foreign country + return self::$HANZI; + default: + throw new \InvalidArgumentException(); + } + } + + /** + * @param version version in question + * + * @return number of bits used, in this QR Code symbol {@link Version}, to encode the + * count of characters that will follow encoded in this Mode + */ + public function getCharacterCountBits($version) + { + $number = $version->getVersionNumber(); + $offset = 0; + if ($number <= 9) { + $offset = 0; + } else if ($number <= 26) { + $offset = 1; + } else { + $offset = 2; + } + + return $this->characterCountBitsForVersions[$offset]; + } + + public function getBits() + { + return $this->bits; + } + +} + +Mode::Init(); \ No newline at end of file diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Version.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Version.php new file mode 100755 index 0000000..a3cc03f --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Decoder/Version.php @@ -0,0 +1,619 @@ +versionNumber = $versionNumber; + $this->alignmentPatternCenters = $alignmentPatternCenters; + $this->ecBlocks = $ecBlocks; + $total = 0; + if(is_array($ecBlocks)) { + $ecCodewords = $ecBlocks[0]->getECCodewordsPerBlock(); + $ecbArray = $ecBlocks[0]->getECBlocks(); + }else{ + $ecCodewords = $ecBlocks->getECCodewordsPerBlock(); + $ecbArray = $ecBlocks->getECBlocks(); + } + foreach ($ecbArray as $ecBlock) { + $total += $ecBlock->getCount() * ($ecBlock->getDataCodewords() + $ecCodewords); + } + $this->totalCodewords = $total; + } + public function getVersionNumber() + { + return $this->versionNumber; + } + + public function getAlignmentPatternCenters() + { + return $this->alignmentPatternCenters; + } + + public function getTotalCodewords() + { + return $this->totalCodewords; + } + + public function getDimensionForVersion() + { + return 17 + 4 * $this->versionNumber; + } + + public function getECBlocksForLevel($ecLevel) + { + return $this->ecBlocks[$ecLevel->getOrdinal()]; + } + + /** + *

                            Deduces version information purely from QR Code dimensions.

                            + * + * @param dimension dimension in modules + * @return Version for a QR Code of that dimension + * @throws FormatException if dimension is not 1 mod 4 + */ + public static function getProvisionalVersionForDimension($dimension) + { + if ($dimension % 4 != 1) { + throw FormatException::getFormatInstance(); + } + try { + return self::getVersionForNumber(($dimension - 17) / 4); + } catch (InvalidArgumentException $ignored) { + throw FormatException::getFormatInstance(); + } + } + + public static function getVersionForNumber($versionNumber) + { + if ($versionNumber < 1 || $versionNumber > 40) { + throw new \InvalidArgumentException(); + } + if(!self::$VERSIONS){ + + self::$VERSIONS = self::buildVersions(); + + } + return self::$VERSIONS[$versionNumber - 1]; + } + + static function decodeVersionInformation($versionBits) + { + $bestDifference = PHP_INT_MAX; + $bestVersion = 0; + for ($i = 0; $i < count(self::$VERSION_DECODE_INFO); $i++) { + $targetVersion = self::$VERSION_DECODE_INFO[$i]; +// Do the version info bits match exactly? done. + if ($targetVersion == $versionBits) { + return self::getVersionForNumber($i + 7); + } +// Otherwise see if this is the closest to a real version info bit string +// we have seen so far + $bitsDifference = FormatInformation::numBitsDiffering($versionBits, $targetVersion); + if ($bitsDifference < $bestDifference) { + $bestVersion = $i + 7; + $bestDifference = $bitsDifference; + } + } +// We can tolerate up to 3 bits of error since no two version info codewords will +// differ in less than 8 bits. + if ($bestDifference <= 3) { + return self::getVersionForNumber($bestVersion); + } +// If we didn't find a close enough match, fail + return null; + } + + /** + * See ISO 18004:2006 Annex E + */ + function buildFunctionPattern() + { + $dimension = self::getDimensionForVersion(); + $bitMatrix = new BitMatrix($dimension); + +// Top left finder pattern + separator + format + $bitMatrix->setRegion(0, 0, 9, 9); +// Top right finder pattern + separator + format + $bitMatrix->setRegion($dimension - 8, 0, 8, 9); +// Bottom left finder pattern + separator + format + $bitMatrix->setRegion(0, $dimension - 8, 9, 8); + +// Alignment patterns + $max = count($this->alignmentPatternCenters); + for ($x = 0; $x < $max; $x++) { + $i = $this->alignmentPatternCenters[$x] - 2; + for ($y = 0; $y < $max; $y++) { + if (($x == 0 && ($y == 0 || $y == $max - 1)) || ($x == $max - 1 && $y == 0)) { +// No alignment patterns near the three finder paterns + continue; + } + $bitMatrix->setRegion($this->alignmentPatternCenters[$y] - 2, $i, 5, 5); + } + } + +// Vertical timing pattern + $bitMatrix->setRegion(6, 9, 1, $dimension - 17); +// Horizontal timing pattern + $bitMatrix->setRegion(9, 6, $dimension - 17, 1); + + if ($this->versionNumber > 6) { +// Version info, top right + $bitMatrix->setRegion($dimension - 11, 0, 3, 6); +// Version info, bottom left + $bitMatrix->setRegion(0, $dimension - 11, 6, 3); + } + + return $bitMatrix; + } + /** + * See ISO 18004:2006 6.5.1 Table 9 + */ + private static function buildVersions() + { + + + return array( + new Version(1, array(), + array(new ECBlocks(7, array(new ECB(1, 19))), + new ECBlocks(10, array(new ECB(1, 16))), + new ECBlocks(13, array(new ECB(1, 13))), + new ECBlocks(17, array(new ECB(1, 9))))), + new Version(2, array(6, 18), + array(new ECBlocks(10, array(new ECB(1, 34))), + new ECBlocks(16, array(new ECB(1, 28))), + new ECBlocks(22, array(new ECB(1, 22))), + new ECBlocks(28, array(new ECB(1, 16))))), + new Version(3, array(6, 22), + array( new ECBlocks(15, array(new ECB(1, 55))), + new ECBlocks(26, array(new ECB(1, 44))), + new ECBlocks(18, array(new ECB(2, 17))), + new ECBlocks(22, array(new ECB(2, 13))))), + new Version(4, array(6, 26), + array(new ECBlocks(20, array(new ECB(1, 80))), + new ECBlocks(18, array(new ECB(2, 32))), + new ECBlocks(26, array(new ECB(2, 24))), + new ECBlocks(16, array(new ECB(4, 9))))), + new Version(5, array(6, 30), + array(new ECBlocks(26, array(new ECB(1, 108))), + new ECBlocks(24, array(new ECB(2, 43))), + new ECBlocks(18, array(new ECB(2, 15), + new ECB(2, 16))), + new ECBlocks(22, array(new ECB(2, 11), + new ECB(2, 12))))), + new Version(6, array(6, 34), + array(new ECBlocks(18, array(new ECB(2, 68))), + new ECBlocks(16, array(new ECB(4, 27))), + new ECBlocks(24, array(new ECB(4, 19))), + new ECBlocks(28, array(new ECB(4, 15))))), + new Version(7, array(6, 22, 38), + array(new ECBlocks(20, array(new ECB(2, 78))), + new ECBlocks(18, array(new ECB(4, 31))), + new ECBlocks(18, array(new ECB(2, 14), + new ECB(4, 15))), + new ECBlocks(26, array(new ECB(4, 13), + new ECB(1, 14))))), + new Version(8, array(6, 24, 42), + array(new ECBlocks(24, array(new ECB(2, 97))), + new ECBlocks(22, array(new ECB(2, 38), + new ECB(2, 39))), + new ECBlocks(22, array(new ECB(4, 18), + new ECB(2, 19))), + new ECBlocks(26, array(new ECB(4, 14), + new ECB(2, 15))))), + new Version(9, array(6, 26, 46), + array(new ECBlocks(30, array(new ECB(2, 116))), + new ECBlocks(22, array(new ECB(3, 36), + new ECB(2, 37))), + new ECBlocks(20, array(new ECB(4, 16), + new ECB(4, 17))), + new ECBlocks(24, array(new ECB(4, 12), + new ECB(4, 13))))), + new Version(10, array(6, 28, 50), + array(new ECBlocks(18, array(new ECB(2, 68), + new ECB(2, 69))), + new ECBlocks(26, array(new ECB(4, 43), + new ECB(1, 44))), + new ECBlocks(24, array(new ECB(6, 19), + new ECB(2, 20))), + new ECBlocks(28, array(new ECB(6, 15), + new ECB(2, 16))))), + new Version(11, array(6, 30, 54), + array(new ECBlocks(20, array(new ECB(4, 81))), + new ECBlocks(30, array(new ECB(1, 50), + new ECB(4, 51))), + new ECBlocks(28, array(new ECB(4, 22), + new ECB(4, 23))), + new ECBlocks(24, array(new ECB(3, 12), + new ECB(8, 13))))), + new Version(12, array(6, 32, 58), + array(new ECBlocks(24, array(new ECB(2, 92), + new ECB(2, 93))), + new ECBlocks(22, array(new ECB(6, 36), + new ECB(2, 37))), + new ECBlocks(26, array(new ECB(4, 20), + new ECB(6, 21))), + new ECBlocks(28, array(new ECB(7, 14), + new ECB(4, 15))))), + new Version(13, array(6, 34, 62), + array(new ECBlocks(26, array(new ECB(4, 107))), + new ECBlocks(22, array(new ECB(8, 37), + new ECB(1, 38))), + new ECBlocks(24, array(new ECB(8, 20), + new ECB(4, 21))), + new ECBlocks(22, array(new ECB(12, 11), + new ECB(4, 12))))), + new Version(14, array(6, 26, 46, 66), + array(new ECBlocks(30, array(new ECB(3, 115), + new ECB(1, 116))), + new ECBlocks(24, array(new ECB(4, 40), + new ECB(5, 41))), + new ECBlocks(20, array(new ECB(11, 16), + new ECB(5, 17))), + new ECBlocks(24, array(new ECB(11, 12), + new ECB(5, 13))))), + new Version(15, array(6, 26, 48, 70), + array(new ECBlocks(22, array(new ECB(5, 87), + new ECB(1, 88))), + new ECBlocks(24, array(new ECB(5, 41), + new ECB(5, 42))), + new ECBlocks(30, array(new ECB(5, 24), + new ECB(7, 25))), + new ECBlocks(24, array(new ECB(11, 12), + new ECB(7, 13))))), + new Version(16, array(6, 26, 50, 74), + array(new ECBlocks(24, array(new ECB(5, 98), + new ECB(1, 99))), + new ECBlocks(28, array(new ECB(7, 45), + new ECB(3, 46))), + new ECBlocks(24, array(new ECB(15, 19), + new ECB(2, 20))), + new ECBlocks(30, array(new ECB(3, 15), + new ECB(13, 16))))), + new Version(17, array(6, 30, 54, 78), + array(new ECBlocks(28, array(new ECB(1, 107), + new ECB(5, 108))), + new ECBlocks(28, array(new ECB(10, 46), + new ECB(1, 47))), + new ECBlocks(28, array(new ECB(1, 22), + new ECB(15, 23))), + new ECBlocks(28, array(new ECB(2, 14), + new ECB(17, 15))))), + new Version(18, array(6, 30, 56, 82), + array(new ECBlocks(30, array(new ECB(5, 120), + new ECB(1, 121))), + new ECBlocks(26, array(new ECB(9, 43), + new ECB(4, 44))), + new ECBlocks(28, array(new ECB(17, 22), + new ECB(1, 23))), + new ECBlocks(28, array(new ECB(2, 14), + new ECB(19, 15))))), + new Version(19, array(6, 30, 58, 86), + array(new ECBlocks(28, array(new ECB(3, 113), + new ECB(4, 114))), + new ECBlocks(26, array(new ECB(3, 44), + new ECB(11, 45))), + new ECBlocks(26, array(new ECB(17, 21), + new ECB(4, 22))), + new ECBlocks(26, array(new ECB(9, 13), + new ECB(16, 14))))), + new Version(20, array(6, 34, 62, 90), + array(new ECBlocks(28, array(new ECB(3, 107), + new ECB(5, 108))), + new ECBlocks(26, array(new ECB(3, 41), + new ECB(13, 42))), + new ECBlocks(30, array(new ECB(15, 24), + new ECB(5, 25))), + new ECBlocks(28, array(new ECB(15, 15), + new ECB(10, 16))))), + new Version(21, array(6, 28, 50, 72, 94), + array( new ECBlocks(28, array(new ECB(4, 116), + new ECB(4, 117))), + new ECBlocks(26, array(new ECB(17, 42))), + new ECBlocks(28, array(new ECB(17, 22), + new ECB(6, 23))), + new ECBlocks(30, array(new ECB(19, 16), + new ECB(6, 17))))), + new Version(22, array(6, 26, 50, 74, 98), + array(new ECBlocks(28, array(new ECB(2, 111), + new ECB(7, 112))), + new ECBlocks(28, array(new ECB(17, 46))), + new ECBlocks(30, array(new ECB(7, 24), + new ECB(16, 25))), + new ECBlocks(24, array(new ECB(34, 13))))), + new Version(23, array(6, 30, 54, 78, 102), + new ECBlocks(30, array(new ECB(4, 121), + new ECB(5, 122))), + new ECBlocks(28, array(new ECB(4, 47), + new ECB(14, 48))), + new ECBlocks(30, array(new ECB(11, 24), + new ECB(14, 25))), + new ECBlocks(30, array(new ECB(16, 15), + new ECB(14, 16)))), + new Version(24, array(6, 28, 54, 80, 106), + array(new ECBlocks(30, array(new ECB(6, 117), + new ECB(4, 118))), + new ECBlocks(28, array(new ECB(6, 45), + new ECB(14, 46))), + new ECBlocks(30, array(new ECB(11, 24), + new ECB(16, 25))), + new ECBlocks(30, array(new ECB(30, 16), + new ECB(2, 17))))), + new Version(25, array(6, 32, 58, 84, 110), + array(new ECBlocks(26, array(new ECB(8, 106), + new ECB(4, 107))), + new ECBlocks(28, array(new ECB(8, 47), + new ECB(13, 48))), + new ECBlocks(30, array(new ECB(7, 24), + new ECB(22, 25))), + new ECBlocks(30, array(new ECB(22, 15), + new ECB(13, 16))))), + new Version(26, array(6, 30, 58, 86, 114), + array(new ECBlocks(28, array(new ECB(10, 114), + new ECB(2, 115))), + new ECBlocks(28, array(new ECB(19, 46), + new ECB(4, 47))), + new ECBlocks(28, array(new ECB(28, 22), + new ECB(6, 23))), + new ECBlocks(30, array(new ECB(33, 16), + new ECB(4, 17))))), + new Version(27, array(6, 34, 62, 90, 118), + array(new ECBlocks(30, array(new ECB(8, 122), + new ECB(4, 123))), + new ECBlocks(28, array(new ECB(22, 45), + new ECB(3, 46))), + new ECBlocks(30, array(new ECB(8, 23), + new ECB(26, 24))), + new ECBlocks(30, array(new ECB(12, 15), + new ECB(28, 16))))), + new Version(28, array(6, 26, 50, 74, 98, 122), + array(new ECBlocks(30, array(new ECB(3, 117), + new ECB(10, 118))), + new ECBlocks(28, array(new ECB(3, 45), + new ECB(23, 46))), + new ECBlocks(30, array(new ECB(4, 24), + new ECB(31, 25))), + new ECBlocks(30, array(new ECB(11, 15), + new ECB(31, 16))))), + new Version(29, array(6, 30, 54, 78, 102, 126), + array(new ECBlocks(30, array(new ECB(7, 116), + new ECB(7, 117))), + new ECBlocks(28, array(new ECB(21, 45), + new ECB(7, 46))), + new ECBlocks(30, array(new ECB(1, 23), + new ECB(37, 24))), + new ECBlocks(30, array(new ECB(19, 15), + new ECB(26, 16))))), + new Version(30, array(6, 26, 52, 78, 104, 130), + array(new ECBlocks(30, array(new ECB(5, 115), + new ECB(10, 116))), + new ECBlocks(28, array(new ECB(19, 47), + new ECB(10, 48))), + new ECBlocks(30, array(new ECB(15, 24), + new ECB(25, 25))), + new ECBlocks(30, array(new ECB(23, 15), + new ECB(25, 16))))), + new Version(31, array(6, 30, 56, 82, 108, 134), + array(new ECBlocks(30, array(new ECB(13, 115), + new ECB(3, 116))), + new ECBlocks(28, array(new ECB(2, 46), + new ECB(29, 47))), + new ECBlocks(30, array(new ECB(42, 24), + new ECB(1, 25))), + new ECBlocks(30, array(new ECB(23, 15), + new ECB(28, 16))))), + new Version(32, array(6, 34, 60, 86, 112, 138), + array(new ECBlocks(30, array(new ECB(17, 115))), + new ECBlocks(28, array(new ECB(10, 46), + new ECB(23, 47))), + new ECBlocks(30, array(new ECB(10, 24), + new ECB(35, 25))), + new ECBlocks(30, array(new ECB(19, 15), + new ECB(35, 16))))), + new Version(33, array(6, 30, 58, 86, 114, 142), + array(new ECBlocks(30, array(new ECB(17, 115), + new ECB(1, 116))), + new ECBlocks(28, array(new ECB(14, 46), + new ECB(21, 47))), + new ECBlocks(30, array(new ECB(29, 24), + new ECB(19, 25))), + new ECBlocks(30, array(new ECB(11, 15), + new ECB(46, 16))))), + new Version(34, array(6, 34, 62, 90, 118, 146), + array(new ECBlocks(30, array(new ECB(13, 115), + new ECB(6, 116))), + new ECBlocks(28, array(new ECB(14, 46), + new ECB(23, 47))), + new ECBlocks(30, array(new ECB(44, 24), + new ECB(7, 25))), + new ECBlocks(30, array(new ECB(59, 16), + new ECB(1, 17))))), + new Version(35, array(6, 30, 54, 78, 102, 126, 150), + array(new ECBlocks(30, array(new ECB(12, 121), + new ECB(7, 122))), + new ECBlocks(28, array(new ECB(12, 47), + new ECB(26, 48))), + new ECBlocks(30, array(new ECB(39, 24), + new ECB(14, 25))), + new ECBlocks(30, array(new ECB(22, 15), + new ECB(41, 16))))), + new Version(36, array(6, 24, 50, 76, 102, 128, 154), + array(new ECBlocks(30, array(new ECB(6, 121), + new ECB(14, 122))), + new ECBlocks(28, array(new ECB(6, 47), + new ECB(34, 48))), + new ECBlocks(30, array(new ECB(46, 24), + new ECB(10, 25))), + new ECBlocks(30, array(new ECB(2, 15), + new ECB(64, 16))))), + new Version(37, array(6, 28, 54, 80, 106, 132, 158), + array(new ECBlocks(30, array(new ECB(17, 122), + new ECB(4, 123))), + new ECBlocks(28, array(new ECB(29, 46), + new ECB(14, 47))), + new ECBlocks(30, array(new ECB(49, 24), + new ECB(10, 25))), + new ECBlocks(30, array(new ECB(24, 15), + new ECB(46, 16))))), + new Version(38, array(6, 32, 58, 84, 110, 136, 162), + array(new ECBlocks(30, array(new ECB(4, 122), + new ECB(18, 123))), + new ECBlocks(28, array(new ECB(13, 46), + new ECB(32, 47))), + new ECBlocks(30, array(new ECB(48, 24), + new ECB(14, 25))), + new ECBlocks(30, array(new ECB(42, 15), + new ECB(32, 16))))), + new Version(39, array(6, 26, 54, 82, 110, 138, 166), + array(new ECBlocks(30, array(new ECB(20, 117), + new ECB(4, 118))), + new ECBlocks(28, array(new ECB(40, 47), + new ECB(7, 48))), + new ECBlocks(30, array(new ECB(43, 24), + new ECB(22, 25))), + new ECBlocks(30, array(new ECB(10, 15), + new ECB(67, 16))))), + new Version(40, array(6, 30, 58, 86, 114, 142, 170), + array(new ECBlocks(30, array(new ECB(19, 118), + new ECB(6, 119))), + new ECBlocks(28, array(new ECB(18, 47), + new ECB(31, 48))), + new ECBlocks(30, array(new ECB(34, 24), + new ECB(34, 25))), + new ECBlocks(30, array(new ECB(20, 15), + new ECB(61, 16))))) + ); + } +} + +/** + *

                            Encapsulates a set of error-correction blocks in one symbol version. Most versions will + * use blocks of differing sizes within one version, so, this encapsulates the parameters for + * each set of blocks. It also holds the number of error-correction codewords per block since it + * will be the same across all blocks within one version.

                            + */ +final class ECBlocks +{ + private $ecCodewordsPerBlock; + private $ecBlocks; + + function __construct($ecCodewordsPerBlock, $ecBlocks) + { + $this->ecCodewordsPerBlock = $ecCodewordsPerBlock; + $this->ecBlocks = $ecBlocks; + } + + public function getECCodewordsPerBlock() + { + return $this->ecCodewordsPerBlock; + } + + public function getNumBlocks() + { + $total = 0; + foreach ($this->ecBlocks as $ecBlock) { + $total += $ecBlock->getCount(); + } + return $total; + } + + public function getTotalECCodewords() + { + return $this->ecCodewordsPerBlock * $this->getNumBlocks(); + } + + public function getECBlocks() + { + return $this->ecBlocks; + } +} + +/** + *

                            Encapsualtes the parameters for one error-correction block in one symbol version. + * This includes the number of data codewords, and the number of times a block with these + * parameters is used consecutively in the QR code version's format.

                            + */ +final class ECB +{ + private $count; + private $dataCodewords; + + function __construct($count, $dataCodewords) + { + $this->count = $count; + $this->dataCodewords = $dataCodewords; + } + + public function getCount() + { + return $this->count; + } + + public function getDataCodewords() + { + return $this->dataCodewords; + } + + +//@Override + public function toString() + { + die('Version ECB toString()'); + // return parent::$versionNumber; + } + + +} + + diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/AlignmentPattern.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/AlignmentPattern.php new file mode 100755 index 0000000..9c3091a --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/AlignmentPattern.php @@ -0,0 +1,65 @@ +Encapsulates an alignment pattern, which are the smaller square patterns found in + * all but the simplest QR Codes.

                            + * + * @author Sean Owen + */ +final class AlignmentPattern extends ResultPoint +{ + private $estimatedModuleSize; + + public function __construct($posX, $posY, $estimatedModuleSize) + { + parent::__construct($posX, $posY); + $this->estimatedModuleSize = $estimatedModuleSize; + } + + /** + *

                            Determines if this alignment pattern "about equals" an alignment pattern at the stated + * position and size -- meaning, it is at nearly the same center with nearly the same size.

                            + */ + public function aboutEquals($moduleSize, $i, $j) + { + if (abs($i - $this->getY()) <= $moduleSize && abs($j - $this->getX()) <= $moduleSize) { + $moduleSizeDiff = abs($moduleSize - $this->estimatedModuleSize); + + return $moduleSizeDiff <= 1.0 || $moduleSizeDiff <= $this->estimatedModuleSize; + } + + return false; + } + + /** + * Combines this object's current estimate of a finder pattern position and module size + * with a new estimate. It returns a new {@code FinderPattern} containing an average of the two. + */ + public function combineEstimate($i, $j, $newModuleSize) + { + $combinedX = ($this->getX() + $j) / 2.0; + $combinedY = ($this->getY() + $i) / 2.0; + $combinedModuleSize = ($this->estimatedModuleSize + $newModuleSize) / 2.0; + + return new AlignmentPattern($combinedX, $combinedY, $combinedModuleSize); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/AlignmentPatternFinder.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/AlignmentPatternFinder.php new file mode 100755 index 0000000..499c6b4 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/AlignmentPatternFinder.php @@ -0,0 +1,286 @@ +This class attempts to find alignment patterns in a QR Code. Alignment patterns look like finder + * patterns but are smaller and appear at regular intervals throughout the image.

                            + * + *

                            At the moment this only looks for the bottom-right alignment pattern.

                            + * + *

                            This is mostly a simplified copy of {@link FinderPatternFinder}. It is copied, + * pasted and stripped down here for maximum performance but does unfortunately duplicate + * some code.

                            + * + *

                            This class is thread-safe but not reentrant. Each thread must allocate its own object.

                            + * + * @author Sean Owen + */ +final class AlignmentPatternFinder +{ + private $image; + private $possibleCenters; + private $startX; + private $startY; + private $width; + private $height; + private $moduleSize; + private $crossCheckStateCount; + private $resultPointCallback; + + /** + *

                            Creates a finder that will look in a portion of the whole image.

                            + * + * @param image image to search + * @param startX left column from which to start searching + * @param startY top row from which to start searching + * @param width width of region to search + * @param height height of region to search + * @param moduleSize estimated module size so far + */ + public function __construct($image, + $startX, + $startY, + $width, + $height, + $moduleSize, + $resultPointCallback) + { + $this->image = $image; + $this->possibleCenters = []; + $this->startX = $startX; + $this->startY = $startY; + $this->width = $width; + $this->height = $height; + $this->moduleSize = $moduleSize; + $this->crossCheckStateCount = []; + $this->resultPointCallback = $resultPointCallback; + } + + /** + *

                            This method attempts to find the bottom-right alignment pattern in the image. It is a bit messy since + * it's pretty performance-critical and so is written to be fast foremost.

                            + * + * @return {@link AlignmentPattern} if found + * @throws NotFoundException if not found + */ + public function find() + { + $startX = $this->startX; + $height = $this->height; + $maxJ = $startX + $this->width; + $middleI = $this->startY + ($height / 2); + // We are looking for black/white/black modules in 1:1:1 ratio; + // this tracks the number of black/white/black modules seen so far + $stateCount = []; + for ($iGen = 0; $iGen < $height; $iGen++) { + // Search from middle outwards + $i = $middleI + (($iGen & 0x01) == 0 ? ($iGen + 1) / 2 : -(($iGen + 1) / 2)); + $i = (int)($i); + $stateCount[0] = 0; + $stateCount[1] = 0; + $stateCount[2] = 0; + $j = $startX; + // Burn off leading white pixels before anything else; if we start in the middle of + // a white run, it doesn't make sense to count its length, since we don't know if the + // white run continued to the left of the start point + while ($j < $maxJ && !$this->image->get($j, $i)) { + $j++; + } + $currentState = 0; + while ($j < $maxJ) { + if ($this->image->get($j, $i)) { + // Black pixel + if ($currentState == 1) { // Counting black pixels + $stateCount[$currentState]++; + } else { // Counting white pixels + if ($currentState == 2) { // A winner? + if ($this->foundPatternCross($stateCount)) { // Yes + $confirmed = $this->handlePossibleCenter($stateCount, $i, $j); + if ($confirmed != null) { + return $confirmed; + } + } + $stateCount[0] = $stateCount[2]; + $stateCount[1] = 1; + $stateCount[2] = 0; + $currentState = 1; + } else { + $stateCount[++$currentState]++; + } + } + } else { // White pixel + if ($currentState == 1) { // Counting black pixels + $currentState++; + } + $stateCount[$currentState]++; + } + $j++; + } + if ($this->foundPatternCross($stateCount)) { + $confirmed = $this->handlePossibleCenter($stateCount, $i, $maxJ); + if ($confirmed != null) { + return $confirmed; + } + } + + } + + // Hmm, nothing we saw was observed and confirmed twice. If we had + // any guess at all, return it. + if (count($this->possibleCenters)) { + return $this->possibleCenters[0]; + } + + throw NotFoundException::getNotFoundInstance(); + } + + /** + * @param stateCount count of black/white/black pixels just read + * + * @return true iff the proportions of the counts is close enough to the 1/1/1 ratios + * used by alignment patterns to be considered a match + */ + private function foundPatternCross($stateCount) + { + $moduleSize = $this->moduleSize; + $maxVariance = $moduleSize / 2.0; + for ($i = 0; $i < 3; $i++) { + if (abs($moduleSize - $stateCount[$i]) >= $maxVariance) { + return false; + } + } + + return true; + } + + /** + *

                            This is called when a horizontal scan finds a possible alignment pattern. It will + * cross check with a vertical scan, and if successful, will see if this pattern had been + * found on a previous horizontal scan. If so, we consider it confirmed and conclude we have + * found the alignment pattern.

                            + * + * @param stateCount reading state module counts from horizontal scan + * @param i row where alignment pattern may be found + * @param j end of possible alignment pattern in row + * + * @return {@link AlignmentPattern} if we have found the same pattern twice, or null if not + */ + private function handlePossibleCenter($stateCount, $i, $j) + { + $stateCountTotal = $stateCount[0] + $stateCount[1] + $stateCount[2]; + $centerJ = $this->centerFromEnd($stateCount, $j); + $centerI = $this->crossCheckVertical($i, (int)$centerJ, 2 * $stateCount[1], $stateCountTotal); + if (!is_nan($centerI)) { + $estimatedModuleSize = (float)($stateCount[0] + $stateCount[1] + $stateCount[2]) / 3.0; + foreach ($this->possibleCenters as $center) { + // Look for about the same center and module size: + if ($center->aboutEquals($estimatedModuleSize, $centerI, $centerJ)) { + return $center->combineEstimate($centerI, $centerJ, $estimatedModuleSize); + } + } + // Hadn't found this before; save it + $point = new AlignmentPattern($centerJ, $centerI, $estimatedModuleSize); + $this->possibleCenters[] = $point; + if ($this->resultPointCallback != null) { + $this->resultPointCallback->foundPossibleResultPoint($point); + } + } + + return null; + } + + /** + * Given a count of black/white/black pixels just seen and an end position, + * figures the location of the center of this black/white/black run. + */ + private static function centerFromEnd($stateCount, $end) + { + return (float)($end - $stateCount[2]) - $stateCount[1] / 2.0; + } + + /** + *

                            After a horizontal scan finds a potential alignment pattern, this method + * "cross-checks" by scanning down vertically through the center of the possible + * alignment pattern to see if the same proportion is detected.

                            + * + * @param startI row where an alignment pattern was detected + * @param centerJ center of the section that appears to cross an alignment pattern + * @param maxCount maximum reasonable number of modules that should be + * observed in any reading state, based on the results of the horizontal scan + * + * @return vertical center of alignment pattern, or {@link Float#NaN} if not found + */ + private function crossCheckVertical($startI, $centerJ, $maxCount, + $originalStateCountTotal) + { + $image = $this->image; + + $maxI = $image->getHeight(); + $stateCount = $this->crossCheckStateCount; + $stateCount[0] = 0; + $stateCount[1] = 0; + $stateCount[2] = 0; + + // Start counting up from center + $i = $startI; + while ($i >= 0 && $image->get($centerJ, $i) && $stateCount[1] <= $maxCount) { + $stateCount[1]++; + $i--; + } + // If already too many modules in this state or ran off the edge: + if ($i < 0 || $stateCount[1] > $maxCount) { + return NAN; + } + while ($i >= 0 && !$image->get($centerJ, $i) && $stateCount[0] <= $maxCount) { + $stateCount[0]++; + $i--; + } + if ($stateCount[0] > $maxCount) { + return NAN; + } + + // Now also count down from center + $i = $startI + 1; + while ($i < $maxI && $image->get($centerJ, $i) && $stateCount[1] <= $maxCount) { + $stateCount[1]++; + $i++; + } + if ($i == $maxI || $stateCount[1] > $maxCount) { + return NAN; + } + while ($i < $maxI && !$image->get($centerJ, $i) && $stateCount[2] <= $maxCount) { + $stateCount[2]++; + $i++; + } + if ($stateCount[2] > $maxCount) { + return NAN; + } + + $stateCountTotal = $stateCount[0] + $stateCount[1] + $stateCount[2]; + if (5 * abs($stateCountTotal - $originalStateCountTotal) >= 2 * $originalStateCountTotal) { + return NAN; + } + + return $this->foundPatternCross($stateCount) ? $this->centerFromEnd($stateCount, $i) : NAN; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/Detector.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/Detector.php new file mode 100755 index 0000000..897dbb2 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/Detector.php @@ -0,0 +1,420 @@ +Encapsulates logic that can detect a QR Code in an image, even if the QR Code + * is rotated or skewed, or partially obscured.

                            + * + * @author Sean Owen + */ +class Detector +{ + + private $image; + private $resultPointCallback; + + public function __construct($image) + { + $this->image = $image; + } + + /** + *

                            Detects a QR Code in an image.

                            + * + * @param hints optional hints to detector + * + * @return {@link DetectorResult} encapsulating results of detecting a QR Code + * @throws NotFoundException if QR Code cannot be found + * @throws FormatException if a QR Code cannot be decoded + */ + public final function detect($hints = null) + {/*Map*/ + + $resultPointCallback = $hints == null ? null : + $hints->get('NEED_RESULT_POINT_CALLBACK'); + /* resultPointCallback = hints == null ? null : + (ResultPointCallback) hints.get(DecodeHintType.NEED_RESULT_POINT_CALLBACK);*/ + $finder = new FinderPatternFinder($this->image, $resultPointCallback); + $info = $finder->find($hints); + + return $this->processFinderPatternInfo($info); + } + + protected final function processFinderPatternInfo($info) + { + + $topLeft = $info->getTopLeft(); + $topRight = $info->getTopRight(); + $bottomLeft = $info->getBottomLeft(); + + $moduleSize = (float)$this->calculateModuleSize($topLeft, $topRight, $bottomLeft); + if ($moduleSize < 1.0) { + throw NotFoundException::getNotFoundInstance(); + } + $dimension = (int)self::computeDimension($topLeft, $topRight, $bottomLeft, $moduleSize); + $provisionalVersion = \Zxing\Qrcode\Decoder\Version::getProvisionalVersionForDimension($dimension); + $modulesBetweenFPCenters = $provisionalVersion->getDimensionForVersion() - 7; + + $alignmentPattern = null; +// Anything above version 1 has an alignment pattern + if (count($provisionalVersion->getAlignmentPatternCenters()) > 0) { + +// Guess where a "bottom right" finder pattern would have been + $bottomRightX = $topRight->getX() - $topLeft->getX() + $bottomLeft->getX(); + $bottomRightY = $topRight->getY() - $topLeft->getY() + $bottomLeft->getY(); + +// Estimate that alignment pattern is closer by 3 modules +// from "bottom right" to known top left location + $correctionToTopLeft = 1.0 - 3.0 / (float)$modulesBetweenFPCenters; + $estAlignmentX = (int)($topLeft->getX() + $correctionToTopLeft * ($bottomRightX - $topLeft->getX())); + $estAlignmentY = (int)($topLeft->getY() + $correctionToTopLeft * ($bottomRightY - $topLeft->getY())); + +// Kind of arbitrary -- expand search radius before giving up + for ($i = 4; $i <= 16; $i <<= 1) {//?????????? + try { + $alignmentPattern = $this->findAlignmentInRegion( + $moduleSize, + $estAlignmentX, + $estAlignmentY, + (float)$i + ); + break; + } catch (NotFoundException $re) { +// try next round + } + } +// If we didn't find alignment pattern... well try anyway without it + } + + $transform = self::createTransform($topLeft, $topRight, $bottomLeft, $alignmentPattern, $dimension); + + $bits = self::sampleGrid($this->image, $transform, $dimension); + + $points = []; + if ($alignmentPattern == null) { + $points = [$bottomLeft, $topLeft, $topRight]; + } else { + // die('$points = new ResultPoint[]{bottomLeft, topLeft, topRight, alignmentPattern};'); + $points = [$bottomLeft, $topLeft, $topRight, $alignmentPattern]; + } + + return new DetectorResult($bits, $points); + } + + /** + *

                            Detects a QR Code in an image.

                            + * + * @return {@link DetectorResult} encapsulating results of detecting a QR Code + * @throws NotFoundException if QR Code cannot be found + * @throws FormatException if a QR Code cannot be decoded + */ + + /** + *

                            Computes an average estimated module size based on estimated derived from the positions + * of the three finder patterns.

                            + * + * @param topLeft detected top-left finder pattern center + * @param topRight detected top-right finder pattern center + * @param bottomLeft detected bottom-left finder pattern center + * + * @return estimated module size + */ + protected final function calculateModuleSize($topLeft, $topRight, $bottomLeft) + { +// Take the average + return ($this->calculateModuleSizeOneWay($topLeft, $topRight) + + $this->calculateModuleSizeOneWay($topLeft, $bottomLeft)) / 2.0; + } + + /** + *

                            Estimates module size based on two finder patterns -- it uses + * {@link #sizeOfBlackWhiteBlackRunBothWays(int, int, int, int)} to figure the + * width of each, measuring along the axis between their centers.

                            + */ + private function calculateModuleSizeOneWay($pattern, $otherPattern) + { + $moduleSizeEst1 = $this->sizeOfBlackWhiteBlackRunBothWays($pattern->getX(), + (int)$pattern->getY(), + (int)$otherPattern->getX(), + (int)$otherPattern->getY()); + $moduleSizeEst2 = $this->sizeOfBlackWhiteBlackRunBothWays((int)$otherPattern->getX(), + (int)$otherPattern->getY(), + (int)$pattern->getX(), + (int)$pattern->getY()); + if (is_nan($moduleSizeEst1)) { + return $moduleSizeEst2 / 7.0; + } + if (is_nan($moduleSizeEst2)) { + return $moduleSizeEst1 / 7.0; + } +// Average them, and divide by 7 since we've counted the width of 3 black modules, +// and 1 white and 1 black module on either side. Ergo, divide sum by 14. + return ($moduleSizeEst1 + $moduleSizeEst2) / 14.0; + } + + /** + * See {@link #sizeOfBlackWhiteBlackRun(int, int, int, int)}; computes the total width of + * a finder pattern by looking for a black-white-black run from the center in the direction + * of another po$(another finder pattern center), and in the opposite direction too.

                            + */ + private function sizeOfBlackWhiteBlackRunBothWays($fromX, $fromY, $toX, $toY) + { + + $result = $this->sizeOfBlackWhiteBlackRun($fromX, $fromY, $toX, $toY); + +// Now count other way -- don't run off image though of course + $scale = 1.0; + $otherToX = $fromX - ($toX - $fromX); + if ($otherToX < 0) { + $scale = (float)$fromX / (float)($fromX - $otherToX); + $otherToX = 0; + } else if ($otherToX >= $this->image->getWidth()) { + $scale = (float)($this->image->getWidth() - 1 - $fromX) / (float)($otherToX - $fromX); + $otherToX = $this->image->getWidth() - 1; + } + $otherToY = (int)($fromY - ($toY - $fromY) * $scale); + + $scale = 1.0; + if ($otherToY < 0) { + $scale = (float)$fromY / (float)($fromY - $otherToY); + $otherToY = 0; + } else if ($otherToY >= $this->image->getHeight()) { + $scale = (float)($this->image->getHeight() - 1 - $fromY) / (float)($otherToY - $fromY); + $otherToY = $this->image->getHeight() - 1; + } + $otherToX = (int)($fromX + ($otherToX - $fromX) * $scale); + + $result += $this->sizeOfBlackWhiteBlackRun($fromX, $fromY, $otherToX, $otherToY); + +// Middle pixel is double-counted this way; subtract 1 + return $result - 1.0; + } + + /** + *

                            This method traces a line from a po$in the image, in the direction towards another point. + * It begins in a black region, and keeps going until it finds white, then black, then white again. + * It reports the distance from the start to this point.

                            + * + *

                            This is used when figuring out how wide a finder pattern is, when the finder pattern + * may be skewed or rotated.

                            + */ + private function sizeOfBlackWhiteBlackRun($fromX, $fromY, $toX, $toY) + { +// Mild variant of Bresenham's algorithm; +// see http://en.wikipedia.org/wiki/Bresenham's_line_algorithm + $steep = abs($toY - $fromY) > abs($toX - $fromX); + if ($steep) { + $temp = $fromX; + $fromX = $fromY; + $fromY = $temp; + $temp = $toX; + $toX = $toY; + $toY = $temp; + } + + $dx = abs($toX - $fromX); + $dy = abs($toY - $fromY); + $error = -$dx / 2; + $xstep = $fromX < $toX ? 1 : -1; + $ystep = $fromY < $toY ? 1 : -1; + +// In black pixels, looking for white, first or second time. + $state = 0; +// Loop up until x == toX, but not beyond + $xLimit = $toX + $xstep; + for ($x = $fromX, $y = $fromY; $x != $xLimit; $x += $xstep) { + $realX = $steep ? $y : $x; + $realY = $steep ? $x : $y; + +// Does current pixel mean we have moved white to black or vice versa? +// Scanning black in state 0,2 and white in state 1, so if we find the wrong +// color, advance to next state or end if we are in state 2 already + if (($state == 1) == $this->image->get($realX, $realY)) { + if ($state == 2) { + return MathUtils::distance($x, $y, $fromX, $fromY); + } + $state++; + } + + $error += $dy; + if ($error > 0) { + if ($y == $toY) { + break; + } + $y += $ystep; + $error -= $dx; + } + } +// Found black-white-black; give the benefit of the doubt that the next pixel outside the image +// is "white" so this last po$at (toX+xStep,toY) is the right ending. This is really a +// small approximation; (toX+xStep,toY+yStep) might be really correct. Ignore this. + if ($state == 2) { + return MathUtils::distance($toX + $xstep, $toY, $fromX, $fromY); + } + +// else we didn't find even black-white-black; no estimate is really possible + return NAN; + } + + /** + *

                            Computes the dimension (number of modules on a size) of the QR Code based on the position + * of the finder patterns and estimated module size.

                            + */ + private static function computeDimension($topLeft, + $topRight, + $bottomLeft, + $moduleSize) + { + $tltrCentersDimension = MathUtils::round(ResultPoint::distance($topLeft, $topRight) / $moduleSize); + $tlblCentersDimension = MathUtils::round(ResultPoint::distance($topLeft, $bottomLeft) / $moduleSize); + $dimension = (($tltrCentersDimension + $tlblCentersDimension) / 2) + 7; + switch ($dimension & 0x03) { // mod 4 + case 0: + $dimension++; + break; +// 1? do nothing + case 2: + $dimension--; + break; + case 3: + throw NotFoundException::getNotFoundInstance(); + } + + return $dimension; + } + + /** + *

                            Attempts to locate an alignment pattern in a limited region of the image, which is + * guessed to contain it. This method uses {@link AlignmentPattern}.

                            + * + * @param overallEstModuleSize estimated module size so far + * @param estAlignmentX x coordinate of center of area probably containing alignment pattern + * @param estAlignmentY y coordinate of above + * @param allowanceFactor number of pixels in all directions to search from the center + * + * @return {@link AlignmentPattern} if found, or null otherwise + * @throws NotFoundException if an unexpected error occurs during detection + */ + protected final function findAlignmentInRegion($overallEstModuleSize, + $estAlignmentX, + $estAlignmentY, + $allowanceFactor) + { +// Look for an alignment pattern (3 modules in size) around where it +// should be + $allowance = (int)($allowanceFactor * $overallEstModuleSize); + $alignmentAreaLeftX = max(0, $estAlignmentX - $allowance); + $alignmentAreaRightX = min($this->image->getWidth() - 1, $estAlignmentX + $allowance); + if ($alignmentAreaRightX - $alignmentAreaLeftX < $overallEstModuleSize * 3) { + throw NotFoundException::getNotFoundInstance(); + } + + $alignmentAreaTopY = max(0, $estAlignmentY - $allowance); + $alignmentAreaBottomY = min($this->image->getHeight() - 1, $estAlignmentY + $allowance); + if ($alignmentAreaBottomY - $alignmentAreaTopY < $overallEstModuleSize * 3) { + throw NotFoundException::getNotFoundInstance(); + } + + $alignmentFinder = + new AlignmentPatternFinder( + $this->image, + $alignmentAreaLeftX, + $alignmentAreaTopY, + $alignmentAreaRightX - $alignmentAreaLeftX, + $alignmentAreaBottomY - $alignmentAreaTopY, + $overallEstModuleSize, + $this->resultPointCallback); + + return $alignmentFinder->find(); + } + + private static function createTransform($topLeft, + $topRight, + $bottomLeft, + $alignmentPattern, + $dimension) + { + $dimMinusThree = (float)$dimension - 3.5; + $bottomRightX = 0.0; + $bottomRightY = 0.0; + $sourceBottomRightX = 0.0; + $sourceBottomRightY = 0.0; + if ($alignmentPattern != null) { + $bottomRightX = $alignmentPattern->getX(); + $bottomRightY = $alignmentPattern->getY(); + $sourceBottomRightX = $dimMinusThree - 3.0; + $sourceBottomRightY = $sourceBottomRightX; + } else { +// Don't have an alignment pattern, just make up the bottom-right point + $bottomRightX = ($topRight->getX() - $topLeft->getX()) + $bottomLeft->getX(); + $bottomRightY = ($topRight->getY() - $topLeft->getY()) + $bottomLeft->getY(); + $sourceBottomRightX = $dimMinusThree; + $sourceBottomRightY = $dimMinusThree; + } + + return PerspectiveTransform::quadrilateralToQuadrilateral( + 3.5, + 3.5, + $dimMinusThree, + 3.5, + $sourceBottomRightX, + $sourceBottomRightY, + 3.5, + $dimMinusThree, + $topLeft->getX(), + $topLeft->getY(), + $topRight->getX(), + $topRight->getY(), + $bottomRightX, + $bottomRightY, + $bottomLeft->getX(), + $bottomLeft->getY()); + } + + private static function sampleGrid($image, $transform, + $dimension) + { + $sampler = GridSampler::getInstance(); + + return $sampler->sampleGrid_($image, $dimension, $dimension, $transform); + } + + protected final function getImage() + { + return $this->image; + } + + protected final function getResultPointCallback() + { + return $this->resultPointCallback; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/FinderPattern.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/FinderPattern.php new file mode 100755 index 0000000..ac93d38 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/FinderPattern.php @@ -0,0 +1,86 @@ +Encapsulates a finder pattern, which are the three square patterns found in + * the corners of QR Codes. It also encapsulates a count of similar finder patterns, + * as a convenience to the finder's bookkeeping.

                            + * + * @author Sean Owen + */ +final class FinderPattern extends ResultPoint +{ + private $estimatedModuleSize; + private $count; + + public function __construct($posX, $posY, $estimatedModuleSize, $count = 1) + { + parent::__construct($posX, $posY); + $this->estimatedModuleSize = $estimatedModuleSize; + $this->count = $count; + } + + public function getEstimatedModuleSize() + { + return $this->estimatedModuleSize; + } + + public function getCount() + { + return $this->count; + } + + /* + void incrementCount() { + this.count++; + } + */ + + /** + *

                            Determines if this finder pattern "about equals" a finder pattern at the stated + * position and size -- meaning, it is at nearly the same center with nearly the same size.

                            + */ + public function aboutEquals($moduleSize, $i, $j) + { + if (abs($i - $this->getY()) <= $moduleSize && abs($j - $this->getX()) <= $moduleSize) { + $moduleSizeDiff = abs($moduleSize - $this->estimatedModuleSize); + + return $moduleSizeDiff <= 1.0 || $moduleSizeDiff <= $this->estimatedModuleSize; + } + + return false; + } + + /** + * Combines this object's current estimate of a finder pattern position and module size + * with a new estimate. It returns a new {@code FinderPattern} containing a weighted average + * based on count. + */ + public function combineEstimate($i, $j, $newModuleSize) + { + $combinedCount = $this->count + 1; + $combinedX = ($this->count * $this->getX() + $j) / $combinedCount; + $combinedY = ($this->count * $this->getY() + $i) / $combinedCount; + $combinedModuleSize = ($this->count * $this->estimatedModuleSize + $newModuleSize) / $combinedCount; + + return new FinderPattern($combinedX, $combinedY, $combinedModuleSize, $combinedCount); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/FinderPatternFinder.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/FinderPatternFinder.php new file mode 100755 index 0000000..1fe030f --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/FinderPatternFinder.php @@ -0,0 +1,699 @@ +This class attempts to find finder patterns in a QR Code. Finder patterns are the square + * markers at three corners of a QR Code.

                            + * + *

                            This class is thread-safe but not reentrant. Each thread must allocate its own object. + * + * @author Sean Owen + */ +class FinderPatternFinder +{ + protected static $MIN_SKIP = 3; + protected static $MAX_MODULES = 57; // 1 pixel/module times 3 modules/center + private static $CENTER_QUORUM = 2; // support up to version 10 for mobile clients + private $image; + private $average; + private $possibleCenters; //private final List possibleCenters; + private $hasSkipped = false; + private $crossCheckStateCount; + private $resultPointCallback; + + /** + *

                            Creates a finder that will search the image for three finder patterns.

                            + * + * @param BitMatrix $image image to search + */ + public function __construct($image, $resultPointCallback = null) + { + $this->image = $image; + + + $this->possibleCenters = [];//new ArrayList<>(); + $this->crossCheckStateCount = fill_array(0, 5, 0); + $this->resultPointCallback = $resultPointCallback; + } + + final public function find($hints) + {/*final FinderPatternInfo find(Map hints) throws NotFoundException {*/ + $tryHarder = true;//$hints != null && $hints['TRY_HARDER']; + $pureBarcode = $hints != null && $hints['PURE_BARCODE']; + $maxI = $this->image->getHeight(); + $maxJ = $this->image->getWidth(); + // We are looking for black/white/black/white/black modules in + // 1:1:3:1:1 ratio; this tracks the number of such modules seen so far + + // Let's assume that the maximum version QR Code we support takes up 1/4 the height of the + // image, and then account for the center being 3 modules in size. This gives the smallest + // number of pixels the center could be, so skip this often. When trying harder, look for all + // QR versions regardless of how dense they are. + $iSkip = (int)((3 * $maxI) / (4 * self::$MAX_MODULES)); + if ($iSkip < self::$MIN_SKIP || $tryHarder) { + $iSkip = self::$MIN_SKIP; + } + + $done = false; + $stateCount = []; + for ($i = $iSkip - 1; $i < $maxI && !$done; $i += $iSkip) { + // Get a row of black/white values + $stateCount[0] = 0; + $stateCount[1] = 0; + $stateCount[2] = 0; + $stateCount[3] = 0; + $stateCount[4] = 0; + $currentState = 0; + for ($j = 0; $j < $maxJ; $j++) { + if ($this->image->get($j, $i)) { + // Black pixel + if (($currentState & 1) == 1) { // Counting white pixels + $currentState++; + } + $stateCount[$currentState]++; + } else { // White pixel + if (($currentState & 1) == 0) { // Counting black pixels + if ($currentState == 4) { // A winner? + if (self::foundPatternCross($stateCount)) { // Yes + $confirmed = $this->handlePossibleCenter($stateCount, $i, $j, $pureBarcode); + if ($confirmed) { + // Start examining every other line. Checking each line turned out to be too + // expensive and didn't improve performance. + $iSkip = 3; + if ($this->hasSkipped) { + $done = $this->haveMultiplyConfirmedCenters(); + } else { + $rowSkip = $this->findRowSkip(); + if ($rowSkip > $stateCount[2]) { + // Skip rows between row of lower confirmed center + // and top of presumed third confirmed center + // but back up a bit to get a full chance of detecting + // it, entire width of center of finder pattern + + // Skip by rowSkip, but back off by $stateCount[2] (size of last center + // of pattern we saw) to be conservative, and also back off by iSkip which + // is about to be re-added + $i += $rowSkip - $stateCount[2] - $iSkip; + $j = $maxJ - 1; + } + } + } else { + $stateCount[0] = $stateCount[2]; + $stateCount[1] = $stateCount[3]; + $stateCount[2] = $stateCount[4]; + $stateCount[3] = 1; + $stateCount[4] = 0; + $currentState = 3; + continue; + } + // Clear state to start looking again + $currentState = 0; + $stateCount[0] = 0; + $stateCount[1] = 0; + $stateCount[2] = 0; + $stateCount[3] = 0; + $stateCount[4] = 0; + } else { // No, shift counts back by two + $stateCount[0] = $stateCount[2]; + $stateCount[1] = $stateCount[3]; + $stateCount[2] = $stateCount[4]; + $stateCount[3] = 1; + $stateCount[4] = 0; + $currentState = 3; + } + } else { + $stateCount[++$currentState]++; + } + } else { // Counting white pixels + $stateCount[$currentState]++; + } + } + } + if (self::foundPatternCross($stateCount)) { + $confirmed = $this->handlePossibleCenter($stateCount, $i, $maxJ, $pureBarcode); + if ($confirmed) { + $iSkip = $stateCount[0]; + if ($this->hasSkipped) { + // Found a third one + $done = $this->haveMultiplyConfirmedCenters(); + } + } + } + } + + $patternInfo = $this->selectBestPatterns(); + $patternInfo = ResultPoint::orderBestPatterns($patternInfo); + + return new FinderPatternInfo($patternInfo); + } + + /** + * @param $stateCount ; count of black/white/black/white/black pixels just read + * + * @return true iff the proportions of the counts is close enough to the 1/1/3/1/1 ratios + * used by finder patterns to be considered a match + */ + protected static function foundPatternCross($stateCount) + { + $totalModuleSize = 0; + for ($i = 0; $i < 5; $i++) { + $count = $stateCount[$i]; + if ($count == 0) { + return false; + } + $totalModuleSize += $count; + } + if ($totalModuleSize < 7) { + return false; + } + $moduleSize = $totalModuleSize / 7.0; + $maxVariance = $moduleSize / 2.0; + + // Allow less than 50% variance from 1-1-3-1-1 proportions + return + abs($moduleSize - $stateCount[0]) < $maxVariance && + abs($moduleSize - $stateCount[1]) < $maxVariance && + abs(3.0 * $moduleSize - $stateCount[2]) < 3 * $maxVariance && + abs($moduleSize - $stateCount[3]) < $maxVariance && + abs($moduleSize - $stateCount[4]) < $maxVariance; + } + + /** + *

                            This is called when a horizontal scan finds a possible alignment pattern. It will + * cross check with a vertical scan, and if successful, will, ah, cross-cross-check + * with another horizontal scan. This is needed primarily to locate the real horizontal + * center of the pattern in cases of extreme skew. + * And then we cross-cross-cross check with another diagonal scan.

                            + * + *

                            If that succeeds the finder pattern location is added to a list that tracks + * the number of times each location has been nearly-matched as a finder pattern. + * Each additional find is more evidence that the location is in fact a finder + * pattern center + * + * @param $stateCount reading state module counts from horizontal scan + * @param i row where finder pattern may be found + * @param j end of possible finder pattern in row + * @param pureBarcode true if in "pure barcode" mode + * + * @return true if a finder pattern candidate was found this time + */ + protected final function handlePossibleCenter($stateCount, $i, $j, $pureBarcode) + { + $stateCountTotal = $stateCount[0] + $stateCount[1] + $stateCount[2] + $stateCount[3] + + $stateCount[4]; + $centerJ = $this->centerFromEnd($stateCount, $j); + $centerI = $this->crossCheckVertical($i, (int)($centerJ), $stateCount[2], $stateCountTotal); + if (!is_nan($centerI)) { + // Re-cross check + $centerJ = $this->crossCheckHorizontal((int)($centerJ), (int)($centerI), $stateCount[2], $stateCountTotal); + if (!is_nan($centerJ) && + (!$pureBarcode || $this->crossCheckDiagonal((int)($centerI), (int)($centerJ), $stateCount[2], $stateCountTotal)) + ) { + $estimatedModuleSize = (float)$stateCountTotal / 7.0; + $found = false; + for ($index = 0; $index < count($this->possibleCenters); $index++) { + $center = $this->possibleCenters[$index]; + // Look for about the same center and module size: + if ($center->aboutEquals($estimatedModuleSize, $centerI, $centerJ)) { + $this->possibleCenters[$index] = $center->combineEstimate($centerI, $centerJ, $estimatedModuleSize); + $found = true; + break; + } + } + if (!$found) { + $point = new FinderPattern($centerJ, $centerI, $estimatedModuleSize); + $this->possibleCenters[] = $point; + if ($this->resultPointCallback != null) { + $this->resultPointCallback->foundPossibleResultPoint($point); + } + } + + return true; + } + } + + return false; + } + + /** + * Given a count of black/white/black/white/black pixels just seen and an end position, + * figures the location of the center of this run. + */ + private static function centerFromEnd($stateCount, $end) + { + return (float)($end - $stateCount[4] - $stateCount[3]) - $stateCount[2] / 2.0; + } + + /** + *

                            After a horizontal scan finds a potential finder pattern, this method + * "cross-checks" by scanning down vertically through the center of the possible + * finder pattern to see if the same proportion is detected.

                            + * + * @param $startI ; row where a finder pattern was detected + * @param centerJ ; center of the section that appears to cross a finder pattern + * @param $maxCount ; maximum reasonable number of modules that should be + * observed in any reading state, based on the results of the horizontal scan + * + * @return vertical center of finder pattern, or {@link Float#NaN} if not found + */ + private function crossCheckVertical($startI, $centerJ, $maxCount, + $originalStateCountTotal) + { + $image = $this->image; + + $maxI = $image->getHeight(); + $stateCount = $this->getCrossCheckStateCount(); + + // Start counting up from center + $i = $startI; + while ($i >= 0 && $image->get($centerJ, $i)) { + $stateCount[2]++; + $i--; + } + if ($i < 0) { + return NAN; + } + while ($i >= 0 && !$image->get($centerJ, $i) && $stateCount[1] <= $maxCount) { + $stateCount[1]++; + $i--; + } + // If already too many modules in this state or ran off the edge: + if ($i < 0 || $stateCount[1] > $maxCount) { + return NAN; + } + while ($i >= 0 && $image->get($centerJ, $i) && $stateCount[0] <= $maxCount) { + $stateCount[0]++; + $i--; + } + if ($stateCount[0] > $maxCount) { + return NAN; + } + + // Now also count down from center + $i = $startI + 1; + while ($i < $maxI && $image->get($centerJ, $i)) { + $stateCount[2]++; + $i++; + } + if ($i == $maxI) { + return NAN; + } + while ($i < $maxI && !$image->get($centerJ, $i) && $stateCount[3] < $maxCount) { + $stateCount[3]++; + $i++; + } + if ($i == $maxI || $stateCount[3] >= $maxCount) { + return NAN; + } + while ($i < $maxI && $image->get($centerJ, $i) && $stateCount[4] < $maxCount) { + $stateCount[4]++; + $i++; + } + if ($stateCount[4] >= $maxCount) { + return NAN; + } + + // If we found a finder-pattern-like section, but its size is more than 40% different than + // the original, assume it's a false positive + $stateCountTotal = $stateCount[0] + $stateCount[1] + $stateCount[2] + $stateCount[3] + + $stateCount[4]; + if (5 * abs($stateCountTotal - $originalStateCountTotal) >= 2 * $originalStateCountTotal) { + return NAN; + } + + return self::foundPatternCross($stateCount) ? $this->centerFromEnd($stateCount, $i) : NAN; + } + + private function getCrossCheckStateCount() + { + $this->crossCheckStateCount[0] = 0; + $this->crossCheckStateCount[1] = 0; + $this->crossCheckStateCount[2] = 0; + $this->crossCheckStateCount[3] = 0; + $this->crossCheckStateCount[4] = 0; + + return $this->crossCheckStateCount; + } + + /** + *

                            Like {@link #crossCheckVertical(int, int, int, int)}, and in fact is basically identical, + * except it reads horizontally instead of vertically. This is used to cross-cross + * check a vertical cross check and locate the real center of the alignment pattern.

                            + */ + private function crossCheckHorizontal($startJ, $centerI, $maxCount, + $originalStateCountTotal) + { + $image = $this->image; + + $maxJ = $this->image->getWidth(); + $stateCount = $this->getCrossCheckStateCount(); + + $j = $startJ; + while ($j >= 0 && $image->get($j, $centerI)) { + $stateCount[2]++; + $j--; + } + if ($j < 0) { + return NAN; + } + while ($j >= 0 && !$image->get($j, $centerI) && $stateCount[1] <= $maxCount) { + $stateCount[1]++; + $j--; + } + if ($j < 0 || $stateCount[1] > $maxCount) { + return NAN; + } + while ($j >= 0 && $image->get($j, $centerI) && $stateCount[0] <= $maxCount) { + $stateCount[0]++; + $j--; + } + if ($stateCount[0] > $maxCount) { + return NAN; + } + + $j = $startJ + 1; + while ($j < $maxJ && $image->get($j, $centerI)) { + $stateCount[2]++; + $j++; + } + if ($j == $maxJ) { + return NAN; + } + while ($j < $maxJ && !$image->get($j, $centerI) && $stateCount[3] < $maxCount) { + $stateCount[3]++; + $j++; + } + if ($j == $maxJ || $stateCount[3] >= $maxCount) { + return NAN; + } + while ($j < $maxJ && $this->image->get($j, $centerI) && $stateCount[4] < $maxCount) { + $stateCount[4]++; + $j++; + } + if ($stateCount[4] >= $maxCount) { + return NAN; + } + + // If we found a finder-pattern-like section, but its size is significantly different than + // the original, assume it's a false positive + $stateCountTotal = $stateCount[0] + $stateCount[1] + $stateCount[2] + $stateCount[3] + + $stateCount[4]; + if (5 * abs($stateCountTotal - $originalStateCountTotal) >= $originalStateCountTotal) { + return NAN; + } + + return $this->foundPatternCross($stateCount) ? $this->centerFromEnd($stateCount, $j) : NAN; + } + + /** + * After a vertical and horizontal scan finds a potential finder pattern, this method + * "cross-cross-cross-checks" by scanning down diagonally through the center of the possible + * finder pattern to see if the same proportion is detected. + * + * @param $startI ; row where a finder pattern was detected + * @param centerJ ; center of the section that appears to cross a finder pattern + * @param $maxCount ; maximum reasonable number of modules that should be + * observed in any reading state, based on the results of the horizontal scan + * @param originalStateCountTotal ; The original state count total. + * + * @return true if proportions are withing expected limits + */ + private function crossCheckDiagonal($startI, $centerJ, $maxCount, $originalStateCountTotal) + { + $stateCount = $this->getCrossCheckStateCount(); + + // Start counting up, left from center finding black center mass + $i = 0; + $startI = (int)($startI); + $centerJ = (int)($centerJ); + while ($startI >= $i && $centerJ >= $i && $this->image->get($centerJ - $i, $startI - $i)) { + $stateCount[2]++; + $i++; + } + + if ($startI < $i || $centerJ < $i) { + return false; + } + + // Continue up, left finding white space + while ($startI >= $i && $centerJ >= $i && !$this->image->get($centerJ - $i, $startI - $i) && + $stateCount[1] <= $maxCount) { + $stateCount[1]++; + $i++; + } + + // If already too many modules in this state or ran off the edge: + if ($startI < $i || $centerJ < $i || $stateCount[1] > $maxCount) { + return false; + } + + // Continue up, left finding black border + while ($startI >= $i && $centerJ >= $i && $this->image->get($centerJ - $i, $startI - $i) && + $stateCount[0] <= $maxCount) { + $stateCount[0]++; + $i++; + } + if ($stateCount[0] > $maxCount) { + return false; + } + + $maxI = $this->image->getHeight(); + $maxJ = $this->image->getWidth(); + + // Now also count down, right from center + $i = 1; + while ($startI + $i < $maxI && $centerJ + $i < $maxJ && $this->image->get($centerJ + $i, $startI + $i)) { + $stateCount[2]++; + $i++; + } + + // Ran off the edge? + if ($startI + $i >= $maxI || $centerJ + $i >= $maxJ) { + return false; + } + + while ($startI + $i < $maxI && $centerJ + $i < $maxJ && !$this->image->get($centerJ + $i, $startI + $i) && + $stateCount[3] < $maxCount) { + $stateCount[3]++; + $i++; + } + + if ($startI + $i >= $maxI || $centerJ + $i >= $maxJ || $stateCount[3] >= $maxCount) { + return false; + } + + while ($startI + $i < $maxI && $centerJ + $i < $maxJ && $this->image->get($centerJ + $i, $startI + $i) && + $stateCount[4] < $maxCount) { + $stateCount[4]++; + $i++; + } + + if ($stateCount[4] >= $maxCount) { + return false; + } + + // If we found a finder-pattern-like section, but its size is more than 100% different than + // the original, assume it's a false positive + $stateCountTotal = $stateCount[0] + $stateCount[1] + $stateCount[2] + $stateCount[3] + $stateCount[4]; + + return + abs($stateCountTotal - $originalStateCountTotal) < 2 * $originalStateCountTotal && + self::foundPatternCross($stateCount); + } + + /** + * @return true iff we have found at least 3 finder patterns that have been detected + * at least {@link #CENTER_QUORUM} times each, and, the estimated module size of the + * candidates is "pretty similar" + */ + private function haveMultiplyConfirmedCenters() + { + $confirmedCount = 0; + $totalModuleSize = 0.0; + $max = count($this->possibleCenters); + foreach ($this->possibleCenters as $pattern) { + if ($pattern->getCount() >= self::$CENTER_QUORUM) { + $confirmedCount++; + $totalModuleSize += $pattern->getEstimatedModuleSize(); + } + } + if ($confirmedCount < 3) { + return false; + } + // OK, we have at least 3 confirmed centers, but, it's possible that one is a "false positive" + // and that we need to keep looking. We detect this by asking if the estimated module sizes + // vary too much. We arbitrarily say that when the total deviation from average exceeds + // 5% of the total module size estimates, it's too much. + $average = $totalModuleSize / (float)$max; + $totalDeviation = 0.0; + foreach ($this->possibleCenters as $pattern) { + $totalDeviation += abs($pattern->getEstimatedModuleSize() - $average); + } + + return $totalDeviation <= 0.05 * $totalModuleSize; + } + + /** + * @return number of rows we could safely skip during scanning, based on the first + * two finder patterns that have been located. In some cases their position will + * allow us to infer that the third pattern must lie below a certain point farther + * down in the image. + */ + private function findRowSkip() + { + $max = count($this->possibleCenters); + if ($max <= 1) { + return 0; + } + $firstConfirmedCenter = null; + foreach ($this->possibleCenters as $center) { + + + if ($center->getCount() >= self::$CENTER_QUORUM) { + if ($firstConfirmedCenter == null) { + $firstConfirmedCenter = $center; + } else { + // We have two confirmed centers + // How far down can we skip before resuming looking for the next + // pattern? In the worst case, only the difference between the + // difference in the x / y coordinates of the two centers. + // This is the case where you find top left last. + $this->hasSkipped = true; + + return (int)((abs($firstConfirmedCenter->getX() - $center->getX()) - + abs($firstConfirmedCenter->getY() - $center->getY())) / 2); + } + } + } + + return 0; + } + + /** + * @return array the 3 best {@link FinderPattern}s from our list of candidates. The "best" are + * those that have been detected at least {@link #CENTER_QUORUM} times, and whose module + * size differs from the average among those patterns the least + * @throws NotFoundException if 3 such finder patterns do not exist + */ + private function selectBestPatterns() + { + $startSize = count($this->possibleCenters); + if ($startSize < 3) { + // Couldn't find enough finder patterns + throw new NotFoundException; + } + + // Filter outlier possibilities whose module size is too different + if ($startSize > 3) { + // But we can only afford to do so if we have at least 4 possibilities to choose from + $totalModuleSize = 0.0; + $square = 0.0; + foreach ($this->possibleCenters as $center) { + $size = $center->getEstimatedModuleSize(); + $totalModuleSize += $size; + $square += $size * $size; + } + $this->average = $totalModuleSize / (float)$startSize; + $stdDev = (float)sqrt($square / $startSize - $this->average * $this->average); + + usort($this->possibleCenters, [$this, 'FurthestFromAverageComparator']); + + $limit = max(0.2 * $this->average, $stdDev); + + for ($i = 0; $i < count($this->possibleCenters) && count($this->possibleCenters) > 3; $i++) { + $pattern = $this->possibleCenters[$i]; + if (abs($pattern->getEstimatedModuleSize() - $this->average) > $limit) { + unset($this->possibleCenters[$i]);//возможно что ключи меняются в java при вызове .remove(i) ??? + $this->possibleCenters = array_values($this->possibleCenters); + $i--; + } + } + } + + if (count($this->possibleCenters) > 3) { + // Throw away all but those first size candidate points we found. + + $totalModuleSize = 0.0; + foreach ($this->possibleCenters as $possibleCenter) { + $totalModuleSize += $possibleCenter->getEstimatedModuleSize(); + } + + $this->average = $totalModuleSize / (float)count($this->possibleCenters); + + usort($this->possibleCenters, [$this, 'CenterComparator']); + + array_slice($this->possibleCenters, 3, count($this->possibleCenters) - 3); + } + + return [$this->possibleCenters[0], $this->possibleCenters[1], $this->possibleCenters[2]]; + } + + /** + *

                            Orders by furthest from average

                            + */ + public function FurthestFromAverageComparator($center1, $center2) + { + + $dA = abs($center2->getEstimatedModuleSize() - $this->average); + $dB = abs($center1->getEstimatedModuleSize() - $this->average); + if ($dA < $dB) { + return -1; + } elseif ($dA == $dB) { + return 0; + } else { + return 1; + } + } + + public function CenterComparator($center1, $center2) + { + if ($center2->getCount() == $center1->getCount()) { + $dA = abs($center2->getEstimatedModuleSize() - $this->average); + $dB = abs($center1->getEstimatedModuleSize() - $this->average); + if ($dA < $dB) { + return 1; + } elseif ($dA == $dB) { + return 0; + } else { + return -1; + } + } else { + return $center2->getCount() - $center1->getCount(); + } + } + + protected final function getImage() + { + return $this->image; + } + /** + *

                            Orders by {@link FinderPattern#getCount()}, descending.

                            + */ + + //@Override + protected final function getPossibleCenters() + { //List getPossibleCenters() + return $this->possibleCenters; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/FinderPatternInfo.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/FinderPatternInfo.php new file mode 100755 index 0000000..28091a4 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/Detector/FinderPatternInfo.php @@ -0,0 +1,53 @@ +Encapsulates information about finder patterns in an image, including the location of + * the three finder patterns, and their estimated module size.

                            + * + * @author Sean Owen + */ +final class FinderPatternInfo +{ + private $bottomLeft; + private $topLeft; + private $topRight; + + public function __construct($patternCenters) + { + $this->bottomLeft = $patternCenters[0]; + $this->topLeft = $patternCenters[1]; + $this->topRight = $patternCenters[2]; + } + + public function getBottomLeft() + { + return $this->bottomLeft; + } + + public function getTopLeft() + { + return $this->topLeft; + } + + public function getTopRight() + { + return $this->topRight; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/QRCodeReader.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/QRCodeReader.php new file mode 100755 index 0000000..2fd1c46 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Qrcode/QRCodeReader.php @@ -0,0 +1,222 @@ +decoder = new Decoder(); + } + + /** + * @param BinaryBitmap $image + * @param null $hints + * + * @return Result + * @throws \Zxing\FormatException + * @throws \Zxing\NotFoundException + */ + public function decode(BinaryBitmap $image, $hints = null) + { + $decoderResult = null; + if ($hints !== null && $hints['PURE_BARCODE']) { + $bits = self::extractPureBits($image->getBlackMatrix()); + $decoderResult = $this->decoder->decode($bits, $hints); + $points = self::$NO_POINTS; + } else { + $detector = new Detector($image->getBlackMatrix()); + $detectorResult = $detector->detect($hints); + + $decoderResult = $this->decoder->decode($detectorResult->getBits(), $hints); + $points = $detectorResult->getPoints(); + } + $result = new Result($decoderResult->getText(), $decoderResult->getRawBytes(), $points, 'QR_CODE');//BarcodeFormat.QR_CODE + + $byteSegments = $decoderResult->getByteSegments(); + if ($byteSegments !== null) { + $result->putMetadata('BYTE_SEGMENTS', $byteSegments);//ResultMetadataType.BYTE_SEGMENTS + } + $ecLevel = $decoderResult->getECLevel(); + if ($ecLevel !== null) { + $result->putMetadata('ERROR_CORRECTION_LEVEL', $ecLevel);//ResultMetadataType.ERROR_CORRECTION_LEVEL + } + if ($decoderResult->hasStructuredAppend()) { + $result->putMetadata( + 'STRUCTURED_APPEND_SEQUENCE',//ResultMetadataType.STRUCTURED_APPEND_SEQUENCE + $decoderResult->getStructuredAppendSequenceNumber() + ); + $result->putMetadata( + 'STRUCTURED_APPEND_PARITY',//ResultMetadataType.STRUCTURED_APPEND_PARITY + $decoderResult->getStructuredAppendParity() + ); + } + + return $result; + } + + /** + * Locates and decodes a QR code in an image. + * + * @return a String representing the content encoded by the QR code + * @throws NotFoundException if a QR code cannot be found + * @throws FormatException if a QR code cannot be decoded + * @throws ChecksumException if error correction fails + */ + + /** + * This method detects a code in a "pure" image -- that is, pure monochrome image + * which contains only an unrotated, unskewed, image of a code, with some white border + * around it. This is a specialized method that works exceptionally fast in this special + * case. + * + * @see com.google.zxing.datamatrix.DataMatrixReader#extractPureBits(BitMatrix) + */ + private static function extractPureBits(BitMatrix $image) + { + $leftTopBlack = $image->getTopLeftOnBit(); + $rightBottomBlack = $image->getBottomRightOnBit(); + if ($leftTopBlack === null || $rightBottomBlack == null) { + throw NotFoundException::getNotFoundInstance(); + } + + $moduleSize = self::moduleSize($leftTopBlack, $image); + + $top = $leftTopBlack[1]; + $bottom = $rightBottomBlack[1]; + $left = $leftTopBlack[0]; + $right = $rightBottomBlack[0]; + + // Sanity check! + if ($left >= $right || $top >= $bottom) { + throw NotFoundException::getNotFoundInstance(); + } + + if ($bottom - $top != $right - $left) { + // Special case, where bottom-right module wasn't black so we found something else in the last row + // Assume it's a square, so use height as the width + $right = $left + ($bottom - $top); + } + + $matrixWidth = round(($right - $left + 1) / $moduleSize); + $matrixHeight = round(($bottom - $top + 1) / $moduleSize); + if ($matrixWidth <= 0 || $matrixHeight <= 0) { + throw NotFoundException::getNotFoundInstance(); + } + if ($matrixHeight != $matrixWidth) { + // Only possibly decode square regions + throw NotFoundException::getNotFoundInstance(); + } + + // Push in the "border" by half the module width so that we start + // sampling in the middle of the module. Just in case the image is a + // little off, this will help recover. + $nudge = (int)($moduleSize / 2.0);// $nudge = (int) ($moduleSize / 2.0f); + $top += $nudge; + $left += $nudge; + + // But careful that this does not sample off the edge + // "right" is the farthest-right valid pixel location -- right+1 is not necessarily + // This is positive by how much the inner x loop below would be too large + $nudgedTooFarRight = $left + (int)(($matrixWidth - 1) * $moduleSize) - $right; + if ($nudgedTooFarRight > 0) { + if ($nudgedTooFarRight > $nudge) { + // Neither way fits; abort + throw NotFoundException::getNotFoundInstance(); + } + $left -= $nudgedTooFarRight; + } + // See logic above + $nudgedTooFarDown = $top + (int)(($matrixHeight - 1) * $moduleSize) - $bottom; + if ($nudgedTooFarDown > 0) { + if ($nudgedTooFarDown > $nudge) { + // Neither way fits; abort + throw NotFoundException::getNotFoundInstance(); + } + $top -= $nudgedTooFarDown; + } + + // Now just read off the bits + $bits = new BitMatrix($matrixWidth, $matrixHeight); + for ($y = 0; $y < $matrixHeight; $y++) { + $iOffset = $top + (int)($y * $moduleSize); + for ($x = 0; $x < $matrixWidth; $x++) { + if ($image->get($left + (int)($x * $moduleSize), $iOffset)) { + $bits->set($x, $y); + } + } + } + + return $bits; + } + + private static function moduleSize($leftTopBlack, BitMatrix $image) + { + $height = $image->getHeight(); + $width = $image->getWidth(); + $x = $leftTopBlack[0]; + $y = $leftTopBlack[1]; + /*$x = $leftTopBlack[0]; + $y = $leftTopBlack[1];*/ + $inBlack = true; + $transitions = 0; + while ($x < $width && $y < $height) { + if ($inBlack != $image->get($x, $y)) { + if (++$transitions == 5) { + break; + } + $inBlack = !$inBlack; + } + $x++; + $y++; + } + if ($x == $width || $y == $height) { + throw NotFoundException::getNotFoundInstance(); + } + + return ($x - $leftTopBlack[0]) / 7.0; //return ($x - $leftTopBlack[0]) / 7.0f; + } + + public function reset() + { + // do nothing + } + + protected final function getDecoder() + { + return $this->decoder; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/RGBLuminanceSource.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/RGBLuminanceSource.php new file mode 100755 index 0000000..e3fe222 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/RGBLuminanceSource.php @@ -0,0 +1,309 @@ +RGBLuminanceSource_($pixels, $dataWidth, $dataHeight); + + return; + } + parent::__construct($width, $height); + if ($left + $width > $dataWidth || $top + $height > $dataHeight) { + throw new \InvalidArgumentException("Crop rectangle does not fit within image data."); + } + $this->luminances = $pixels; + $this->dataWidth = $dataWidth; + $this->dataHeight = $dataHeight; + $this->left = $left; + $this->top = $top; + } + + public function RGBLuminanceSource_($width, $height, $pixels) + { + parent::__construct($width, $height); + + $this->dataWidth = $width; + $this->dataHeight = $height; + $this->left = 0; + $this->top = 0; + $this->pixels = $pixels; + + +// In order to measure pure decoding speed, we convert the entire image to a greyscale array +// up front, which is the same as the Y channel of the YUVLuminanceSource in the real app. + $this->luminances = []; + //$this->luminances = $this->grayScaleToBitmap($this->grayscale()); + + foreach ($pixels as $key => $pixel) { + $r = $pixel['red']; + $g = $pixel['green']; + $b = $pixel['blue']; + + /* if (($pixel & 0xFF000000) == 0) { + $pixel = 0xFFFFFFFF; // = white + } + + // .229R + 0.587G + 0.114B (YUV/YIQ for PAL and NTSC) + + $this->luminances[$key] = + (306 * (($pixel >> 16) & 0xFF) + + 601 * (($pixel >> 8) & 0xFF) + + 117 * ($pixel & 0xFF) + + 0x200) >> 10; + + */ + //$r = ($pixel >> 16) & 0xff; + //$g = ($pixel >> 8) & 0xff; + //$b = $pixel & 0xff; + if ($r == $g && $g == $b) { +// Image is already greyscale, so pick any channel. + + $this->luminances[$key] = $r;//(($r + 128) % 256) - 128; + } else { +// Calculate luminance cheaply, favoring green. + $this->luminances[$key] = ($r + 2 * $g + $b) / 4;//(((($r + 2 * $g + $b) / 4) + 128) % 256) - 128; + } + + } + + /* + + for ($y = 0; $y < $height; $y++) { + $offset = $y * $width; + for ($x = 0; $x < $width; $x++) { + $pixel = $pixels[$offset + $x]; + $r = ($pixel >> 16) & 0xff; + $g = ($pixel >> 8) & 0xff; + $b = $pixel & 0xff; + if ($r == $g && $g == $b) { +// Image is already greyscale, so pick any channel. + + $this->luminances[(int)($offset + $x)] = (($r+128) % 256) - 128; + } else { +// Calculate luminance cheaply, favoring green. + $this->luminances[(int)($offset + $x)] = (((($r + 2 * $g + $b) / 4)+128)%256) - 128; + } + + + + } + */ + //} + // $this->luminances = $this->grayScaleToBitmap($this->luminances); + + } + + public function grayscale() + { + $width = $this->dataWidth; + $height = $this->dataHeight; + + $ret = fill_array(0, $width * $height, 0); + for ($y = 0; $y < $height; $y++) { + for ($x = 0; $x < $width; $x++) { + $gray = $this->getPixel($x, $y, $width, $height); + + $ret[$x + $y * $width] = $gray; + } + } + + return $ret; + } + + public function getPixel($x, $y, $width, $height) + { + $image = $this->pixels; + if ($width < $x) { + die('error'); + } + if ($height < $y) { + die('error'); + } + $point = ($x) + ($y * $width); + + $r = $image[$point]['red'];//($image[$point] >> 16) & 0xff; + $g = $image[$point]['green'];//($image[$point] >> 8) & 0xff; + $b = $image[$point]['blue'];//$image[$point] & 0xff; + + $p = (int)(($r * 33 + $g * 34 + $b * 33) / 100); + + + return $p; + + } + + public function grayScaleToBitmap($grayScale) + { + $middle = $this->getMiddleBrightnessPerArea($grayScale); + $sqrtNumArea = count($middle); + $areaWidth = floor($this->dataWidth / $sqrtNumArea); + $areaHeight = floor($this->dataHeight / $sqrtNumArea); + $bitmap = fill_array(0, $this->dataWidth * $this->dataHeight, 0); + + for ($ay = 0; $ay < $sqrtNumArea; $ay++) { + for ($ax = 0; $ax < $sqrtNumArea; $ax++) { + for ($dy = 0; $dy < $areaHeight; $dy++) { + for ($dx = 0; $dx < $areaWidth; $dx++) { + $bitmap[(int)($areaWidth * $ax + $dx + ($areaHeight * $ay + $dy) * $this->dataWidth)] = ($grayScale[(int)($areaWidth * $ax + $dx + ($areaHeight * $ay + $dy) * $this->dataWidth)] < $middle[$ax][$ay]) ? 0 : 255; + } + } + } + } + + return $bitmap; + } + + public function getMiddleBrightnessPerArea($image) + { + $numSqrtArea = 4; + //obtain middle brightness((min + max) / 2) per area + $areaWidth = floor($this->dataWidth / $numSqrtArea); + $areaHeight = floor($this->dataHeight / $numSqrtArea); + $minmax = fill_array(0, $numSqrtArea, 0); + for ($i = 0; $i < $numSqrtArea; $i++) { + $minmax[$i] = fill_array(0, $numSqrtArea, 0); + for ($i2 = 0; $i2 < $numSqrtArea; $i2++) { + $minmax[$i][$i2] = [0, 0]; + } + } + for ($ay = 0; $ay < $numSqrtArea; $ay++) { + for ($ax = 0; $ax < $numSqrtArea; $ax++) { + $minmax[$ax][$ay][0] = 0xFF; + for ($dy = 0; $dy < $areaHeight; $dy++) { + for ($dx = 0; $dx < $areaWidth; $dx++) { + $target = $image[(int)($areaWidth * $ax + $dx + ($areaHeight * $ay + $dy) * $this->dataWidth)]; + if ($target < $minmax[$ax][$ay][0]) + $minmax[$ax][$ay][0] = $target; + if ($target > $minmax[$ax][$ay][1]) + $minmax[$ax][$ay][1] = $target; + } + } + //minmax[ax][ay][0] = (minmax[ax][ay][0] + minmax[ax][ay][1]) / 2; + } + } + $middle = []; + for ($i3 = 0; $i3 < $numSqrtArea; $i3++) { + $middle[$i3] = []; + } + for ($ay = 0; $ay < $numSqrtArea; $ay++) { + for ($ax = 0; $ax < $numSqrtArea; $ax++) { + $middle[$ax][$ay] = floor(($minmax[$ax][$ay][0] + $minmax[$ax][$ay][1]) / 2); + //Console.out.print(middle[ax][ay] + ","); + } + //Console.out.println(""); + } + + //Console.out.println(""); + + return $middle; + } + +//@Override + public function getRow($y, $row = null) + { + if ($y < 0 || $y >= $this->getHeight()) { + throw new \InvalidArgumentException("Requested row is outside the image: " + y); + } + $width = $this->getWidth(); + if ($row == null || count($row) < $width) { + $row = []; + } + $offset = ($y + $this->top) * $this->dataWidth + $this->left; + $row = arraycopy($this->luminances, $offset, $row, 0, $width); + + return $row; + } + +//@Override + public function getMatrix() + { + $width = $this->getWidth(); + $height = $this->getHeight(); + +// If the caller asks for the entire underlying image, save the copy and give them the +// original data. The docs specifically warn that result.length must be ignored. + if ($width == $this->dataWidth && $height == $this->dataHeight) { + return $this->luminances; + } + + $area = $width * $height; + $matrix = []; + $inputOffset = $this->top * $this->dataWidth + $this->left; + +// If the width matches the full width of the underlying data, perform a single copy. + if ($width == $this->dataWidth) { + $matrix = arraycopy($this->luminances, $inputOffset, $matrix, 0, $area); + + return $matrix; + } + +// Otherwise copy one cropped row at a time. + $rgb = $this->luminances; + for ($y = 0; $y < $height; $y++) { + $outputOffset = $y * $width; + $matrix = arraycopy($rgb, $inputOffset, $matrix, $outputOffset, $width); + $inputOffset += $this->dataWidth; + } + + return $matrix; + } + +//@Override + public function isCropSupported() + { + return true; + } + +//@Override + public function crop($left, $top, $width, $height) + { + return new RGBLuminanceSource($this->luminances, + $this->dataWidth, + $this->dataHeight, + $this->left + $left, + $this->top + $top, + $width, + $height); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/Reader.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/Reader.php new file mode 100755 index 0000000..cc18ccc --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/Reader.php @@ -0,0 +1,10 @@ +Encapsulates the result of decoding a barcode within an image.

                            + * + * @author Sean Owen + */ +final class Result +{ + private $text; + private $rawBytes; + private $resultPoints; + private $format; + private $resultMetadata; + private $timestamp; + + public function __construct( + $text, + $rawBytes, + $resultPoints, + $format, + $timestamp = '' + ) { + + $this->text = $text; + $this->rawBytes = $rawBytes; + $this->resultPoints = $resultPoints; + $this->format = $format; + $this->resultMetadata = null; + $this->timestamp = $timestamp ?: time(); + } + + /** + * @return raw text encoded by the barcode + */ + public function getText() + { + return $this->text; + } + + /** + * @return raw bytes encoded by the barcode, if applicable, otherwise {@code null} + */ + public function getRawBytes() + { + return $this->rawBytes; + } + + /** + * @return points related to the barcode in the image. These are typically points + * identifying finder patterns or the corners of the barcode. The exact meaning is + * specific to the type of barcode that was decoded. + */ + public function getResultPoints() + { + return $this->resultPoints; + } + + /** + * @return {@link BarcodeFormat} representing the format of the barcode that was decoded + */ + public function getBarcodeFormat() + { + return $this->format; + } + + /** + * @return {@link Map} mapping {@link ResultMetadataType} keys to values. May be + * {@code null}. This contains optional metadata about what was detected about the barcode, + * like orientation. + */ + public function getResultMetadata() + { + return $this->resultMetadata; + } + + public function putMetadata($type, $value) + { + if ($this->resultMetadata === null) { + $this->resultMetadata = []; + } + $resultMetadata[$type] = $value; + } + + public function putAllMetadata($metadata) + { + if ($metadata !== null) { + if ($this->resultMetadata === null) { + $this->resultMetadata = $metadata; + } else { + $this->resultMetadata = array_merge($this->resultMetadata, $metadata); + } + } + } + + public function addResultPoints($newPoints) + { + $oldPoints = $this->resultPoints; + if ($oldPoints === null) { + $this->resultPoints = $newPoints; + } else if ($newPoints !== null && count($newPoints) > 0) { + $allPoints = fill_array(0, count($oldPoints) + count($newPoints), 0); + $allPoints = arraycopy($oldPoints, 0, $allPoints, 0, count($oldPoints)); + $allPoints = arraycopy($newPoints, 0, $allPoints, count($oldPoints), count($newPoints)); + $this->resultPoints = $allPoints; + } + } + + public function getTimestamp() + { + return $this->timestamp; + } + + public function toString() + { + return $this->text; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/lib/ResultPoint.php b/vendor/khanamiryan/qrcode-detector-decoder/lib/ResultPoint.php new file mode 100755 index 0000000..f0720b3 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/lib/ResultPoint.php @@ -0,0 +1,155 @@ +Encapsulates a point of interest in an image containing a barcode. Typically, this + * would be the location of a finder pattern or the corner of the barcode, for example.

                            + * + * @author Sean Owen + */ +class ResultPoint +{ + private $x; + private $y; + + public function __construct($x, $y) + { + $this->x = (float)($x); + $this->y = (float)($y); + } + + /** + * Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC + * and BC is less than AC, and the angle between BC and BA is less than 180 degrees. + * + * @param patterns array of three {@code ResultPoint} to order + */ + public static function orderBestPatterns($patterns) + { + +// Find distances between pattern centers + $zeroOneDistance = self::distance($patterns[0], $patterns[1]); + $oneTwoDistance = self::distance($patterns[1], $patterns[2]); + $zeroTwoDistance = self::distance($patterns[0], $patterns[2]); + + $pointA = ''; + $pointB = ''; + $pointC = ''; +// Assume one closest to other two is B; A and C will just be guesses at first + if ($oneTwoDistance >= $zeroOneDistance && $oneTwoDistance >= $zeroTwoDistance) { + $pointB = $patterns[0]; + $pointA = $patterns[1]; + $pointC = $patterns[2]; + } else if ($zeroTwoDistance >= $oneTwoDistance && $zeroTwoDistance >= $zeroOneDistance) { + $pointB = $patterns[1]; + $pointA = $patterns[0]; + $pointC = $patterns[2]; + } else { + $pointB = $patterns[2]; + $pointA = $patterns[0]; + $pointC = $patterns[1]; + } + +// Use cross product to figure out whether A and C are correct or flipped. +// This asks whether BC x BA has a positive z component, which is the arrangement +// we want for A, B, C. If it's negative, then we've got it flipped around and +// should swap A and C. + if (self::crossProductZ($pointA, $pointB, $pointC) < 0.0) { + $temp = $pointA; + $pointA = $pointC; + $pointC = $temp; + } + + $patterns[0] = $pointA; + $patterns[1] = $pointB; + $patterns[2] = $pointC; + + return $patterns; + } + + /** + * @param pattern1 first pattern + * @param pattern2 second pattern + * + * @return distance between two points + */ + public static function distance($pattern1, $pattern2) + { + return MathUtils::distance($pattern1->x, $pattern1->y, $pattern2->x, $pattern2->y); + } + +//@Override + + /** + * Returns the z component of the cross product between vectors BC and BA. + */ + private static function crossProductZ($pointA, + $pointB, + $pointC) + { + $bX = $pointB->x; + $bY = $pointB->y; + + return (($pointC->x - $bX) * ($pointA->y - $bY)) - (($pointC->y - $bY) * ($pointA->x - $bX)); + } + +//@Override + + public final function getX() + { + return (float)($this->x); + } + +//@Override + + public final function getY() + { + return (float)($this->y); + } + + public final function equals($other) + { + if ($other instanceof ResultPoint) { + $otherPoint = $other; + + return $this->x == $otherPoint->x && $this->y == $otherPoint->y; + } + + return false; + } + + public final function hashCode() + { + return 31 * floatToIntBits($this->x) + floatToIntBits($this->y); + } + + public final function toString() + { + $result = ''; + $result .= ('('); + $result .= ($this->x); + $result .= (','); + $result .= ($this->y); + $result .= (')'); + + return $result; + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/phpunit.xml.dist b/vendor/khanamiryan/qrcode-detector-decoder/phpunit.xml.dist new file mode 100755 index 0000000..7c557c8 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/phpunit.xml.dist @@ -0,0 +1,10 @@ + + + tests + + + + src + + + diff --git a/vendor/khanamiryan/qrcode-detector-decoder/tests/QrReaderTest.php b/vendor/khanamiryan/qrcode-detector-decoder/tests/QrReaderTest.php new file mode 100755 index 0000000..c5ac9c2 --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/tests/QrReaderTest.php @@ -0,0 +1,17 @@ +assertSame("Hello world!", $qrcode->text()); + } +} diff --git a/vendor/khanamiryan/qrcode-detector-decoder/tests/bootstrap.php b/vendor/khanamiryan/qrcode-detector-decoder/tests/bootstrap.php new file mode 100755 index 0000000..9d0835e --- /dev/null +++ b/vendor/khanamiryan/qrcode-detector-decoder/tests/bootstrap.php @@ -0,0 +1,15 @@ +issuedBy('http://example.com') // Configures the issuer (iss claim) + ->permittedFor('http://example.org') // Configures the audience (aud claim) + ->identifiedBy('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item + ->issuedAt($time) // Configures the time that the token was issue (iat claim) + ->canOnlyBeUsedAfter($time + 60) // Configures the time that the token can be used (nbf claim) + ->expiresAt($time + 3600) // Configures the expiration time of the token (exp claim) + ->withClaim('uid', 1) // Configures a new claim, called "uid" + ->getToken(); // Retrieves the generated token + + +$token->getHeaders(); // Retrieves the token headers +$token->getClaims(); // Retrieves the token claims + +echo $token->getHeader('jti'); // will print "4f1g23a12aa" +echo $token->getClaim('iss'); // will print "http://example.com" +echo $token->getClaim('uid'); // will print "1" +echo $token; // The string representation of the object is a JWT string (pretty easy, right?) +``` + +### Parsing from strings + +Use the parser to create a new token from a JWT string (using the previous token as example): + +```php +use Lcobucci\JWT\Parser; + +$token = (new Parser())->parse((string) $token); // Parses from a string +$token->getHeaders(); // Retrieves the token header +$token->getClaims(); // Retrieves the token claims + +echo $token->getHeader('jti'); // will print "4f1g23a12aa" +echo $token->getClaim('iss'); // will print "http://example.com" +echo $token->getClaim('uid'); // will print "1" +``` + +### Validating + +We can easily validate if the token is valid (using the previous token and time as example): + +```php +use Lcobucci\JWT\ValidationData; + +$data = new ValidationData(); // It will use the current time to validate (iat, nbf and exp) +$data->setIssuer('http://example.com'); +$data->setAudience('http://example.org'); +$data->setId('4f1g23a12aa'); + +var_dump($token->validate($data)); // false, because token cannot be used before now() + 60 + +$data->setCurrentTime($time + 61); // changing the validation time to future + +var_dump($token->validate($data)); // true, because current time is between "nbf" and "exp" claims + +$data->setCurrentTime($time + 4000); // changing the validation time to future + +var_dump($token->validate($data)); // false, because token is expired since current time is greater than exp + +// We can also use the $leeway parameter to deal with clock skew (see notes below) +// If token's claimed time is invalid but the difference between that and the validation time is less than $leeway, +// then token is still considered valid +$dataWithLeeway = new ValidationData($time, 20); +$dataWithLeeway->setIssuer('http://example.com'); +$dataWithLeeway->setAudience('http://example.org'); +$dataWithLeeway->setId('4f1g23a12aa'); + +var_dump($token->validate($dataWithLeeway)); // false, because token can't be used before now() + 60, not within leeway + +$dataWithLeeway->setCurrentTime($time + 51); // changing the validation time to future + +var_dump($token->validate($dataWithLeeway)); // true, because current time plus leeway is between "nbf" and "exp" claims + +$dataWithLeeway->setCurrentTime($time + 3610); // changing the validation time to future but within leeway + +var_dump($token->validate($dataWithLeeway)); // true, because current time - 20 seconds leeway is less than exp + +$dataWithLeeway->setCurrentTime($time + 4000); // changing the validation time to future outside of leeway + +var_dump($token->validate($dataWithLeeway)); // false, because token is expired since current time is greater than exp +``` + +#### Important + +- You have to configure ```ValidationData``` informing all claims you want to validate the token. +- If ```ValidationData``` contains claims that are not being used in token or token has claims that are not +configured in ```ValidationData``` they will be ignored by ```Token::validate()```. +- ```exp```, ```nbf``` and ```iat``` claims are configured by default in ```ValidationData::__construct()``` +with the current UNIX time (```time()```). +- The optional ```$leeway``` parameter of ```ValidationData``` will cause us to use that number of seconds of leeway +when validating the time-based claims, pretending we are further in the future for the "Issued At" (```iat```) and "Not +Before" (```nbf```) claims and pretending we are further in the past for the "Expiration Time" (```exp```) claim. This +allows for situations where the clock of the issuing server has a different time than the clock of the verifying server, +as mentioned in [section 4.1 of RFC 7519](https://tools.ietf.org/html/rfc7519#section-4.1). + +## Token signature + +We can use signatures to be able to verify if the token was not modified after its generation. This library implements Hmac, RSA and ECDSA signatures (using 256, 384 and 512). + +### Important + +Do not allow the string sent to the Parser to dictate which signature algorithm +to use, or else your application will be vulnerable to a [critical JWT security vulnerability](https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries). + +The examples below are safe because the choice in `Signer` is hard-coded and +cannot be influenced by malicious users. + +### Hmac + +Hmac signatures are really simple to be used: + +```php +use Lcobucci\JWT\Builder; +use Lcobucci\JWT\Signer\Key; +use Lcobucci\JWT\Signer\Hmac\Sha256; + +$signer = new Sha256(); +$time = time(); + +$token = (new Builder())->issuedBy('http://example.com') // Configures the issuer (iss claim) + ->permittedFor('http://example.org') // Configures the audience (aud claim) + ->identifiedBy('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item + ->issuedAt($time) // Configures the time that the token was issue (iat claim) + ->canOnlyBeUsedAfter($time + 60) // Configures the time that the token can be used (nbf claim) + ->expiresAt($time + 3600) // Configures the expiration time of the token (exp claim) + ->withClaim('uid', 1) // Configures a new claim, called "uid" + ->getToken($signer, new Key('testing')); // Retrieves the generated token + + +var_dump($token->verify($signer, 'testing 1')); // false, because the key is different +var_dump($token->verify($signer, 'testing')); // true, because the key is the same +``` + +### RSA and ECDSA + +RSA and ECDSA signatures are based on public and private keys so you have to generate using the private key and verify using the public key: + +```php +use Lcobucci\JWT\Builder; +use Lcobucci\JWT\Signer\Key; +use Lcobucci\JWT\Signer\Rsa\Sha256; // you can use Lcobucci\JWT\Signer\Ecdsa\Sha256 if you're using ECDSA keys + +$signer = new Sha256(); +$privateKey = new Key('file://{path to your private key}'); +$time = time(); + +$token = (new Builder())->issuedBy('http://example.com') // Configures the issuer (iss claim) + ->permittedFor('http://example.org') // Configures the audience (aud claim) + ->identifiedBy('4f1g23a12aa', true) // Configures the id (jti claim), replicating as a header item + ->issuedAt($time) // Configures the time that the token was issue (iat claim) + ->canOnlyBeUsedAfter($time + 60) // Configures the time that the token can be used (nbf claim) + ->expiresAt($time + 3600) // Configures the expiration time of the token (exp claim) + ->withClaim('uid', 1) // Configures a new claim, called "uid" + ->getToken($signer, $privateKey); // Retrieves the generated token + +$publicKey = new Key('file://{path to your public key}'); + +var_dump($token->verify($signer, $publicKey)); // true when the public key was generated by the private one =) +``` + +**It's important to say that if you're using RSA keys you shouldn't invoke ECDSA signers (and vice-versa), otherwise ```sign()``` and ```verify()``` will raise an exception!** diff --git a/vendor/lcobucci/jwt/composer.json b/vendor/lcobucci/jwt/composer.json new file mode 100755 index 0000000..5823bf8 --- /dev/null +++ b/vendor/lcobucci/jwt/composer.json @@ -0,0 +1,49 @@ +{ + "name": "lcobucci/jwt", + "description": "A simple library to work with JSON Web Token and JSON Web Signature", + "type": "library", + "authors": [ + { + "name": "Luís Otávio Cobucci Oblonczyk", + "email": "lcobucci@gmail.com", + "role": "Developer" + } + ], + "keywords": [ + "JWT", + "JWS" + ], + "license": [ + "BSD-3-Clause" + ], + "require": { + "php": "^5.6 || ^7.0", + "ext-mbstring": "*", + "ext-openssl": "*" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^7.3", + "squizlabs/php_codesniffer": "~2.3", + "phpmd/phpmd": "~2.2", + "phpunit/php-invoker": "~1.1", + "mikey179/vfsstream": "~1.5" + }, + "autoload": { + "psr-4": { + "Lcobucci\\JWT\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Lcobucci\\JWT\\": [ + "test/unit", + "test/functional" + ] + } + }, + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + } +} diff --git a/vendor/lcobucci/jwt/phpunit.xml.dist b/vendor/lcobucci/jwt/phpunit.xml.dist new file mode 100755 index 0000000..e84d0f2 --- /dev/null +++ b/vendor/lcobucci/jwt/phpunit.xml.dist @@ -0,0 +1,27 @@ + + + + + test/unit + + + test/functional + + + + + + src + + + diff --git a/vendor/lcobucci/jwt/src/Builder.php b/vendor/lcobucci/jwt/src/Builder.php new file mode 100755 index 0000000..f7aa9b6 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Builder.php @@ -0,0 +1,472 @@ + + * @since 0.1.0 + */ +class Builder +{ + /** + * The token header + * + * @var array + */ + private $headers = ['typ'=> 'JWT', 'alg' => 'none']; + + /** + * The token claim set + * + * @var array + */ + private $claims = []; + + /** + * The data encoder + * + * @var Encoder + */ + private $encoder; + + /** + * The factory of claims + * + * @var ClaimFactory + */ + private $claimFactory; + + /** + * @var Signer|null + */ + private $signer; + + /** + * @var Key|null + */ + private $key; + + /** + * Initializes a new builder + * + * @param Encoder $encoder + * @param ClaimFactory $claimFactory + */ + public function __construct( + Encoder $encoder = null, + ClaimFactory $claimFactory = null + ) { + $this->encoder = $encoder ?: new Encoder(); + $this->claimFactory = $claimFactory ?: new ClaimFactory(); + } + + /** + * Configures the audience + * + * @deprecated This method has been wrongly added and doesn't exist on v4 + * @see Builder::permittedFor() + * + * @param string $audience + * @param bool $replicateAsHeader + * + * @return Builder + */ + public function canOnlyBeUsedBy($audience, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('aud', (string) $audience, $replicateAsHeader); + } + + /** + * Configures the audience + * + * @param string $audience + * @param bool $replicateAsHeader + * + * @return Builder + */ + public function permittedFor($audience, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('aud', (string) $audience, $replicateAsHeader); + } + + /** + * Configures the audience + * + * @deprecated This method will be removed on v4 + * @see Builder::permittedFor() + * + * @param string $audience + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setAudience($audience, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('aud', (string) $audience, $replicateAsHeader); + } + + /** + * Configures the expiration time + * + * @param int $expiration + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function expiresAt($expiration, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('exp', (int) $expiration, $replicateAsHeader); + } + + /** + * Configures the expiration time + * + * @deprecated This method will be removed on v4 + * @see Builder::expiresAt() + * + * @param int $expiration + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setExpiration($expiration, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('exp', (int) $expiration, $replicateAsHeader); + } + + /** + * Configures the token id + * + * @param string $id + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function identifiedBy($id, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('jti', (string) $id, $replicateAsHeader); + } + + /** + * Configures the token id + * + * @deprecated This method will be removed on v4 + * @see Builder::identifiedBy() + * + * @param string $id + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setId($id, $replicateAsHeader = false) + { + return $this->identifiedBy($id, $replicateAsHeader); + } + + /** + * Configures the time that the token was issued + * + * @param int $issuedAt + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function issuedAt($issuedAt, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('iat', (int) $issuedAt, $replicateAsHeader); + } + + /** + * Configures the time that the token was issued + * + * @deprecated This method will be removed on v4 + * @see Builder::issuedAt() + * + * @param int $issuedAt + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setIssuedAt($issuedAt, $replicateAsHeader = false) + { + return $this->issuedAt($issuedAt, $replicateAsHeader); + } + + /** + * Configures the issuer + * + * @param string $issuer + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function issuedBy($issuer, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('iss', (string) $issuer, $replicateAsHeader); + } + + /** + * Configures the issuer + * + * @deprecated This method will be removed on v4 + * @see Builder::issuedBy() + * + * @param string $issuer + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setIssuer($issuer, $replicateAsHeader = false) + { + return $this->issuedBy($issuer, $replicateAsHeader); + } + + /** + * Configures the time before which the token cannot be accepted + * + * @param int $notBefore + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function canOnlyBeUsedAfter($notBefore, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('nbf', (int) $notBefore, $replicateAsHeader); + } + + /** + * Configures the time before which the token cannot be accepted + * + * @deprecated This method will be removed on v4 + * @see Builder::canOnlyBeUsedAfter() + * + * @param int $notBefore + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setNotBefore($notBefore, $replicateAsHeader = false) + { + return $this->canOnlyBeUsedAfter($notBefore, $replicateAsHeader); + } + + /** + * Configures the subject + * + * @param string $subject + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function relatedTo($subject, $replicateAsHeader = false) + { + return $this->setRegisteredClaim('sub', (string) $subject, $replicateAsHeader); + } + + /** + * Configures the subject + * + * @deprecated This method will be removed on v4 + * @see Builder::relatedTo() + * + * @param string $subject + * @param boolean $replicateAsHeader + * + * @return Builder + */ + public function setSubject($subject, $replicateAsHeader = false) + { + return $this->relatedTo($subject, $replicateAsHeader); + } + + /** + * Configures a registered claim + * + * @param string $name + * @param mixed $value + * @param boolean $replicate + * + * @return Builder + */ + protected function setRegisteredClaim($name, $value, $replicate) + { + $this->withClaim($name, $value); + + if ($replicate) { + $this->headers[$name] = $this->claims[$name]; + } + + return $this; + } + + /** + * Configures a header item + * + * @param string $name + * @param mixed $value + * + * @return Builder + */ + public function withHeader($name, $value) + { + $this->headers[(string) $name] = $this->claimFactory->create($name, $value); + + return $this; + } + + /** + * Configures a header item + * + * @deprecated This method will be removed on v4 + * @see Builder::withHeader() + * + * @param string $name + * @param mixed $value + * + * @return Builder + */ + public function setHeader($name, $value) + { + return $this->withHeader($name, $value); + } + + /** + * Configures a claim item + * + * @deprecated This method has been wrongly added and doesn't exist on v4 + * @see Builder::withClaim() + * + * @param string $name + * @param mixed $value + * + * @return Builder + */ + public function with($name, $value) + { + return $this->withClaim($name, $value); + } + + /** + * Configures a claim item + * + * @param string $name + * @param mixed $value + * + * @return Builder + */ + public function withClaim($name, $value) + { + $this->claims[(string) $name] = $this->claimFactory->create($name, $value); + + return $this; + } + + /** + * Configures a claim item + * + * @deprecated This method will be removed on v4 + * @see Builder::withClaim() + * + * @param string $name + * @param mixed $value + * + * @return Builder + */ + public function set($name, $value) + { + return $this->withClaim($name, $value); + } + + /** + * Signs the data + * + * @deprecated This method will be removed on v4 + * @see Builder::getToken() + * + * @param Signer $signer + * @param Key|string $key + * + * @return Builder + */ + public function sign(Signer $signer, $key) + { + if (! $key instanceof Key) { + $key = new Key($key); + } + + $this->signer = $signer; + $this->key = $key; + + return $this; + } + + /** + * Removes the signature from the builder + * + * @deprecated This method will be removed on v4 + * @see Builder::getToken() + * + * @return Builder + */ + public function unsign() + { + $this->signer = null; + $this->key = null; + + return $this; + } + + /** + * Returns the resultant token + * + * @return Token + */ + public function getToken(Signer $signer = null, Key $key = null) + { + $signer = $signer ?: $this->signer; + $key = $key ?: $this->key; + + if ($signer instanceof Signer) { + $signer->modifyHeader($this->headers); + } + + $payload = [ + $this->encoder->base64UrlEncode($this->encoder->jsonEncode($this->headers)), + $this->encoder->base64UrlEncode($this->encoder->jsonEncode($this->claims)) + ]; + + $signature = $this->createSignature($payload, $signer, $key); + + if ($signature !== null) { + $payload[] = $this->encoder->base64UrlEncode($signature); + } + + return new Token($this->headers, $this->claims, $signature, $payload); + } + + /** + * @param string[] $payload + * + * @return Signature|null + */ + private function createSignature(array $payload, Signer $signer = null, Key $key = null) + { + if ($signer === null || $key === null) { + return null; + } + + return $signer->sign(implode('.', $payload), $key); + } +} diff --git a/vendor/lcobucci/jwt/src/Claim.php b/vendor/lcobucci/jwt/src/Claim.php new file mode 100755 index 0000000..e561740 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Claim.php @@ -0,0 +1,40 @@ + + * @since 2.0.0 + */ +interface Claim extends JsonSerializable +{ + /** + * Returns the claim name + * + * @return string + */ + public function getName(); + + /** + * Returns the claim value + * + * @return string + */ + public function getValue(); + + /** + * Returns the string representation of the claim + * + * @return string + */ + public function __toString(); +} diff --git a/vendor/lcobucci/jwt/src/Claim/Basic.php b/vendor/lcobucci/jwt/src/Claim/Basic.php new file mode 100755 index 0000000..3626d1b --- /dev/null +++ b/vendor/lcobucci/jwt/src/Claim/Basic.php @@ -0,0 +1,75 @@ + + * @since 2.0.0 + */ +class Basic implements Claim +{ + /** + * @var string + */ + private $name; + + /** + * @var mixed + */ + private $value; + + /** + * Initializes the claim + * + * @param string $name + * @param mixed $value + */ + public function __construct($name, $value) + { + $this->name = $name; + $this->value = $value; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return $this->name; + } + + /** + * {@inheritdoc} + */ + public function getValue() + { + return $this->value; + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() + { + return $this->value; + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return (string) $this->value; + } +} diff --git a/vendor/lcobucci/jwt/src/Claim/EqualsTo.php b/vendor/lcobucci/jwt/src/Claim/EqualsTo.php new file mode 100755 index 0000000..b6cc49b --- /dev/null +++ b/vendor/lcobucci/jwt/src/Claim/EqualsTo.php @@ -0,0 +1,34 @@ + + * @since 2.0.0 + */ +class EqualsTo extends Basic implements Claim, Validatable +{ + /** + * {@inheritdoc} + */ + public function validate(ValidationData $data) + { + if ($data->has($this->getName())) { + return $this->getValue() === $data->get($this->getName()); + } + + return true; + } +} diff --git a/vendor/lcobucci/jwt/src/Claim/Factory.php b/vendor/lcobucci/jwt/src/Claim/Factory.php new file mode 100755 index 0000000..6a94105 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Claim/Factory.php @@ -0,0 +1,118 @@ + + * @since 2.0.0 + */ +class Factory +{ + /** + * The list of claim callbacks + * + * @var array + */ + private $callbacks; + + /** + * Initializes the factory, registering the default callbacks + * + * @param array $callbacks + */ + public function __construct(array $callbacks = []) + { + $this->callbacks = array_merge( + [ + 'iat' => [$this, 'createLesserOrEqualsTo'], + 'nbf' => [$this, 'createLesserOrEqualsTo'], + 'exp' => [$this, 'createGreaterOrEqualsTo'], + 'iss' => [$this, 'createEqualsTo'], + 'aud' => [$this, 'createEqualsTo'], + 'sub' => [$this, 'createEqualsTo'], + 'jti' => [$this, 'createEqualsTo'] + ], + $callbacks + ); + } + + /** + * Create a new claim + * + * @param string $name + * @param mixed $value + * + * @return Claim + */ + public function create($name, $value) + { + if (!empty($this->callbacks[$name])) { + return call_user_func($this->callbacks[$name], $name, $value); + } + + return $this->createBasic($name, $value); + } + + /** + * Creates a claim that can be compared (greator or equals) + * + * @param string $name + * @param mixed $value + * + * @return GreaterOrEqualsTo + */ + private function createGreaterOrEqualsTo($name, $value) + { + return new GreaterOrEqualsTo($name, $value); + } + + /** + * Creates a claim that can be compared (greator or equals) + * + * @param string $name + * @param mixed $value + * + * @return LesserOrEqualsTo + */ + private function createLesserOrEqualsTo($name, $value) + { + return new LesserOrEqualsTo($name, $value); + } + + /** + * Creates a claim that can be compared (equals) + * + * @param string $name + * @param mixed $value + * + * @return EqualsTo + */ + private function createEqualsTo($name, $value) + { + return new EqualsTo($name, $value); + } + + /** + * Creates a basic claim + * + * @param string $name + * @param mixed $value + * + * @return Basic + */ + private function createBasic($name, $value) + { + return new Basic($name, $value); + } +} diff --git a/vendor/lcobucci/jwt/src/Claim/GreaterOrEqualsTo.php b/vendor/lcobucci/jwt/src/Claim/GreaterOrEqualsTo.php new file mode 100755 index 0000000..550e21e --- /dev/null +++ b/vendor/lcobucci/jwt/src/Claim/GreaterOrEqualsTo.php @@ -0,0 +1,34 @@ + + * @since 2.0.0 + */ +class GreaterOrEqualsTo extends Basic implements Claim, Validatable +{ + /** + * {@inheritdoc} + */ + public function validate(ValidationData $data) + { + if ($data->has($this->getName())) { + return $this->getValue() >= $data->get($this->getName()); + } + + return true; + } +} diff --git a/vendor/lcobucci/jwt/src/Claim/LesserOrEqualsTo.php b/vendor/lcobucci/jwt/src/Claim/LesserOrEqualsTo.php new file mode 100755 index 0000000..962edc8 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Claim/LesserOrEqualsTo.php @@ -0,0 +1,34 @@ + + * @since 2.0.0 + */ +class LesserOrEqualsTo extends Basic implements Claim, Validatable +{ + /** + * {@inheritdoc} + */ + public function validate(ValidationData $data) + { + if ($data->has($this->getName())) { + return $this->getValue() <= $data->get($this->getName()); + } + + return true; + } +} diff --git a/vendor/lcobucci/jwt/src/Claim/Validatable.php b/vendor/lcobucci/jwt/src/Claim/Validatable.php new file mode 100755 index 0000000..63a2774 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Claim/Validatable.php @@ -0,0 +1,30 @@ + + * @since 2.0.0 + */ +interface Validatable +{ + /** + * Returns if claim is valid according with given data + * + * @param ValidationData $data + * + * @return boolean + */ + public function validate(ValidationData $data); +} diff --git a/vendor/lcobucci/jwt/src/Parser.php b/vendor/lcobucci/jwt/src/Parser.php new file mode 100755 index 0000000..9497395 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Parser.php @@ -0,0 +1,157 @@ + + * @since 0.1.0 + */ +class Parser +{ + /** + * The data decoder + * + * @var Decoder + */ + private $decoder; + + /** + * The claims factory + * + * @var ClaimFactory + */ + private $claimFactory; + + /** + * Initializes the object + * + * @param Decoder $decoder + * @param ClaimFactory $claimFactory + */ + public function __construct( + Decoder $decoder = null, + ClaimFactory $claimFactory = null + ) { + $this->decoder = $decoder ?: new Decoder(); + $this->claimFactory = $claimFactory ?: new ClaimFactory(); + } + + /** + * Parses the JWT and returns a token + * + * @param string $jwt + * + * @return Token + */ + public function parse($jwt) + { + $data = $this->splitJwt($jwt); + $header = $this->parseHeader($data[0]); + $claims = $this->parseClaims($data[1]); + $signature = $this->parseSignature($header, $data[2]); + + foreach ($claims as $name => $value) { + if (isset($header[$name])) { + $header[$name] = $value; + } + } + + if ($signature === null) { + unset($data[2]); + } + + return new Token($header, $claims, $signature, $data); + } + + /** + * Splits the JWT string into an array + * + * @param string $jwt + * + * @return array + * + * @throws InvalidArgumentException When JWT is not a string or is invalid + */ + protected function splitJwt($jwt) + { + if (!is_string($jwt)) { + throw new InvalidArgumentException('The JWT string must have two dots'); + } + + $data = explode('.', $jwt); + + if (count($data) != 3) { + throw new InvalidArgumentException('The JWT string must have two dots'); + } + + return $data; + } + + /** + * Parses the header from a string + * + * @param string $data + * + * @return array + * + * @throws InvalidArgumentException When an invalid header is informed + */ + protected function parseHeader($data) + { + $header = (array) $this->decoder->jsonDecode($this->decoder->base64UrlDecode($data)); + + if (isset($header['enc'])) { + throw new InvalidArgumentException('Encryption is not supported yet'); + } + + return $header; + } + + /** + * Parses the claim set from a string + * + * @param string $data + * + * @return array + */ + protected function parseClaims($data) + { + $claims = (array) $this->decoder->jsonDecode($this->decoder->base64UrlDecode($data)); + + foreach ($claims as $name => &$value) { + $value = $this->claimFactory->create($name, $value); + } + + return $claims; + } + + /** + * Returns the signature from given data + * + * @param array $header + * @param string $data + * + * @return Signature + */ + protected function parseSignature(array $header, $data) + { + if ($data == '' || !isset($header['alg']) || $header['alg'] == 'none') { + return null; + } + + $hash = $this->decoder->base64UrlDecode($data); + + return new Signature($hash); + } +} diff --git a/vendor/lcobucci/jwt/src/Parsing/Decoder.php b/vendor/lcobucci/jwt/src/Parsing/Decoder.php new file mode 100755 index 0000000..86336b0 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Parsing/Decoder.php @@ -0,0 +1,56 @@ + + * @since 0.1.0 + * + * @link http://tools.ietf.org/html/rfc4648#section-5 + */ +class Decoder +{ + /** + * Decodes from JSON, validating the errors (will return an associative array + * instead of objects) + * + * @param string $json + * @return mixed + * + * @throws RuntimeException When something goes wrong while decoding + */ + public function jsonDecode($json) + { + $data = json_decode($json); + + if (json_last_error() != JSON_ERROR_NONE) { + throw new RuntimeException('Error while decoding to JSON: ' . json_last_error_msg()); + } + + return $data; + } + + /** + * Decodes from base64url + * + * @param string $data + * @return string + */ + public function base64UrlDecode($data) + { + if ($remainder = strlen($data) % 4) { + $data .= str_repeat('=', 4 - $remainder); + } + + return base64_decode(strtr($data, '-_', '+/')); + } +} diff --git a/vendor/lcobucci/jwt/src/Parsing/Encoder.php b/vendor/lcobucci/jwt/src/Parsing/Encoder.php new file mode 100755 index 0000000..ece5b28 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Parsing/Encoder.php @@ -0,0 +1,51 @@ + + * @since 0.1.0 + * + * @link http://tools.ietf.org/html/rfc4648#section-5 + */ +class Encoder +{ + /** + * Encodes to JSON, validating the errors + * + * @param mixed $data + * @return string + * + * @throws RuntimeException When something goes wrong while encoding + */ + public function jsonEncode($data) + { + $json = json_encode($data); + + if (json_last_error() != JSON_ERROR_NONE) { + throw new RuntimeException('Error while encoding to JSON: ' . json_last_error_msg()); + } + + return $json; + } + + /** + * Encodes to base64url + * + * @param string $data + * @return string + */ + public function base64UrlEncode($data) + { + return str_replace('=', '', strtr(base64_encode($data), '+/', '-_')); + } +} diff --git a/vendor/lcobucci/jwt/src/Signature.php b/vendor/lcobucci/jwt/src/Signature.php new file mode 100755 index 0000000..42f2b22 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signature.php @@ -0,0 +1,59 @@ + + * @since 0.1.0 + */ +class Signature +{ + /** + * The resultant hash + * + * @var string + */ + protected $hash; + + /** + * Initializes the object + * + * @param string $hash + */ + public function __construct($hash) + { + $this->hash = $hash; + } + + /** + * Verifies if the current hash matches with with the result of the creation of + * a new signature with given data + * + * @param Signer $signer + * @param string $payload + * @param string $key + * + * @return boolean + */ + public function verify(Signer $signer, $payload, $key) + { + return $signer->verify($this->hash, $payload, $key); + } + + /** + * Returns the current hash as a string representation of the signature + * + * @return string + */ + public function __toString() + { + return $this->hash; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer.php b/vendor/lcobucci/jwt/src/Signer.php new file mode 100755 index 0000000..9b2cd47 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer.php @@ -0,0 +1,59 @@ + + * @since 0.1.0 + */ +interface Signer +{ + /** + * Returns the algorithm id + * + * @return string + */ + public function getAlgorithmId(); + + /** + * Apply changes on headers according with algorithm + * + * @param array $headers + */ + public function modifyHeader(array &$headers); + + /** + * Returns a signature for given data + * + * @param string $payload + * @param Key|string $key + * + * @return Signature + * + * @throws InvalidArgumentException When given key is invalid + */ + public function sign($payload, $key); + + /** + * Returns if the expected hash matches with the data and key + * + * @param string $expected + * @param string $payload + * @param Key|string $key + * + * @return boolean + * + * @throws InvalidArgumentException When given key is invalid + */ + public function verify($expected, $payload, $key); +} diff --git a/vendor/lcobucci/jwt/src/Signer/BaseSigner.php b/vendor/lcobucci/jwt/src/Signer/BaseSigner.php new file mode 100755 index 0000000..dc659aa --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/BaseSigner.php @@ -0,0 +1,85 @@ + + * @since 0.1.0 + */ +abstract class BaseSigner implements Signer +{ + /** + * {@inheritdoc} + */ + public function modifyHeader(array &$headers) + { + $headers['alg'] = $this->getAlgorithmId(); + } + + /** + * {@inheritdoc} + */ + public function sign($payload, $key) + { + return new Signature($this->createHash($payload, $this->getKey($key))); + } + + /** + * {@inheritdoc} + */ + public function verify($expected, $payload, $key) + { + return $this->doVerify($expected, $payload, $this->getKey($key)); + } + + /** + * @param Key|string $key + * + * @return Key + */ + private function getKey($key) + { + if (is_string($key)) { + $key = new Key($key); + } + + return $key; + } + + /** + * Creates a hash with the given data + * + * @internal + * + * @param string $payload + * @param Key $key + * + * @return string + */ + abstract public function createHash($payload, Key $key); + + /** + * Performs the signature verification + * + * @internal + * + * @param string $expected + * @param string $payload + * @param Key $key + * + * @return boolean + */ + abstract public function doVerify($expected, $payload, Key $key); +} diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa.php new file mode 100755 index 0000000..ccb029e --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa.php @@ -0,0 +1,69 @@ + + * @since 2.1.0 + */ +abstract class Ecdsa extends OpenSSL +{ + /** + * @var SignatureConverter + */ + private $converter; + + public function __construct(SignatureConverter $converter = null) + { + $this->converter = $converter ?: new MultibyteStringConverter(); + } + + /** + * {@inheritdoc} + */ + public function createHash($payload, Key $key) + { + return $this->converter->fromAsn1( + parent::createHash($payload, $key), + $this->getKeyLength() + ); + } + + /** + * {@inheritdoc} + */ + public function doVerify($expected, $payload, Key $key) + { + return parent::doVerify( + $this->converter->toAsn1($expected, $this->getKeyLength()), + $payload, + $key + ); + } + + /** + * Returns the length of each point in the signature, so that we can calculate and verify R and S points properly + * + * @internal + */ + abstract public function getKeyLength(); + + /** + * {@inheritdoc} + */ + final public function getKeyType() + { + return OPENSSL_KEYTYPE_EC; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php new file mode 100755 index 0000000..729267e --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/MultibyteStringConverter.php @@ -0,0 +1,134 @@ + self::ASN1_MAX_SINGLE_BYTE ? self::ASN1_LENGTH_2BYTES : ''; + + $asn1 = hex2bin( + self::ASN1_SEQUENCE + . $lengthPrefix . dechex($totalLength) + . self::ASN1_INTEGER . dechex($lengthR) . $pointR + . self::ASN1_INTEGER . dechex($lengthS) . $pointS + ); + + return $asn1; + } + + private static function octetLength($data) + { + return (int) (mb_strlen($data, '8bit') / self::BYTE_SIZE); + } + + private static function preparePositiveInteger($data) + { + if (mb_substr($data, 0, self::BYTE_SIZE, '8bit') > self::ASN1_BIG_INTEGER_LIMIT) { + return self::ASN1_NEGATIVE_INTEGER . $data; + } + + while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER + && mb_substr($data, 2, self::BYTE_SIZE, '8bit') <= self::ASN1_BIG_INTEGER_LIMIT) { + $data = mb_substr($data, 2, null, '8bit'); + } + + return $data; + } + + public function fromAsn1($signature, $length) + { + $message = bin2hex($signature); + $position = 0; + + if (self::readAsn1Content($message, $position, self::BYTE_SIZE) !== self::ASN1_SEQUENCE) { + throw new InvalidArgumentException('Invalid data. Should start with a sequence.'); + } + + if (self::readAsn1Content($message, $position, self::BYTE_SIZE) === self::ASN1_LENGTH_2BYTES) { + $position += self::BYTE_SIZE; + } + + $pointR = self::retrievePositiveInteger(self::readAsn1Integer($message, $position)); + $pointS = self::retrievePositiveInteger(self::readAsn1Integer($message, $position)); + + $points = hex2bin(str_pad($pointR, $length, '0', STR_PAD_LEFT) . str_pad($pointS, $length, '0', STR_PAD_LEFT)); + + return $points; + } + + private static function readAsn1Content($message, &$position, $length) + { + $content = mb_substr($message, $position, $length, '8bit'); + $position += $length; + + return $content; + } + + private static function readAsn1Integer($message, &$position) + { + if (self::readAsn1Content($message, $position, self::BYTE_SIZE) !== self::ASN1_INTEGER) { + throw new InvalidArgumentException('Invalid data. Should contain an integer.'); + } + + $length = (int) hexdec(self::readAsn1Content($message, $position, self::BYTE_SIZE)); + + return self::readAsn1Content($message, $position, $length * self::BYTE_SIZE); + } + + private static function retrievePositiveInteger($data) + { + while (mb_substr($data, 0, self::BYTE_SIZE, '8bit') === self::ASN1_NEGATIVE_INTEGER + && mb_substr($data, 2, self::BYTE_SIZE, '8bit') > self::ASN1_BIG_INTEGER_LIMIT) { + $data = mb_substr($data, 2, null, '8bit'); + } + + return $data; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php new file mode 100755 index 0000000..16a010f --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha256.php @@ -0,0 +1,43 @@ + + * @since 2.1.0 + */ +class Sha256 extends Ecdsa +{ + /** + * {@inheritdoc} + */ + public function getAlgorithmId() + { + return 'ES256'; + } + + /** + * {@inheritdoc} + */ + public function getAlgorithm() + { + return 'sha256'; + } + + /** + * {@inheritdoc} + */ + public function getKeyLength() + { + return 64; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php new file mode 100755 index 0000000..ee56c24 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha384.php @@ -0,0 +1,43 @@ + + * @since 2.1.0 + */ +class Sha384 extends Ecdsa +{ + /** + * {@inheritdoc} + */ + public function getAlgorithmId() + { + return 'ES384'; + } + + /** + * {@inheritdoc} + */ + public function getAlgorithm() + { + return 'sha384'; + } + + /** + * {@inheritdoc} + */ + public function getKeyLength() + { + return 96; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php new file mode 100755 index 0000000..e0bf4d6 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/Sha512.php @@ -0,0 +1,43 @@ + + * @since 2.1.0 + */ +class Sha512 extends Ecdsa +{ + /** + * {@inheritdoc} + */ + public function getAlgorithmId() + { + return 'ES512'; + } + + /** + * {@inheritdoc} + */ + public function getAlgorithm() + { + return 'sha512'; + } + + /** + * {@inheritdoc} + */ + public function getKeyLength() + { + return 132; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php b/vendor/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php new file mode 100755 index 0000000..b411dd3 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Ecdsa/SignatureConverter.php @@ -0,0 +1,38 @@ + + * @since 0.1.0 + */ +abstract class Hmac extends BaseSigner +{ + /** + * {@inheritdoc} + */ + public function createHash($payload, Key $key) + { + return hash_hmac($this->getAlgorithm(), $payload, $key->getContent(), true); + } + + /** + * {@inheritdoc} + */ + public function doVerify($expected, $payload, Key $key) + { + if (!is_string($expected)) { + return false; + } + + $callback = function_exists('hash_equals') ? 'hash_equals' : [$this, 'hashEquals']; + + return call_user_func($callback, $expected, $this->createHash($payload, $key)); + } + + /** + * PHP < 5.6 timing attack safe hash comparison + * + * @internal + * + * @param string $expected + * @param string $generated + * + * @return boolean + */ + public function hashEquals($expected, $generated) + { + $expectedLength = strlen($expected); + + if ($expectedLength !== strlen($generated)) { + return false; + } + + $res = 0; + + for ($i = 0; $i < $expectedLength; ++$i) { + $res |= ord($expected[$i]) ^ ord($generated[$i]); + } + + return $res === 0; + } + + /** + * Returns the algorithm name + * + * @internal + * + * @return string + */ + abstract public function getAlgorithm(); +} diff --git a/vendor/lcobucci/jwt/src/Signer/Hmac/Sha256.php b/vendor/lcobucci/jwt/src/Signer/Hmac/Sha256.php new file mode 100755 index 0000000..49d10b3 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Hmac/Sha256.php @@ -0,0 +1,35 @@ + + * @since 0.1.0 + */ +class Sha256 extends Hmac +{ + /** + * {@inheritdoc} + */ + public function getAlgorithmId() + { + return 'HS256'; + } + + /** + * {@inheritdoc} + */ + public function getAlgorithm() + { + return 'sha256'; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Hmac/Sha384.php b/vendor/lcobucci/jwt/src/Signer/Hmac/Sha384.php new file mode 100755 index 0000000..8618801 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Hmac/Sha384.php @@ -0,0 +1,35 @@ + + * @since 0.1.0 + */ +class Sha384 extends Hmac +{ + /** + * {@inheritdoc} + */ + public function getAlgorithmId() + { + return 'HS384'; + } + + /** + * {@inheritdoc} + */ + public function getAlgorithm() + { + return 'sha384'; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Hmac/Sha512.php b/vendor/lcobucci/jwt/src/Signer/Hmac/Sha512.php new file mode 100755 index 0000000..8ae19d8 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Hmac/Sha512.php @@ -0,0 +1,35 @@ + + * @since 0.1.0 + */ +class Sha512 extends Hmac +{ + /** + * {@inheritdoc} + */ + public function getAlgorithmId() + { + return 'HS512'; + } + + /** + * {@inheritdoc} + */ + public function getAlgorithm() + { + return 'sha512'; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Key.php b/vendor/lcobucci/jwt/src/Signer/Key.php new file mode 100755 index 0000000..317de1c --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Key.php @@ -0,0 +1,92 @@ + + * @since 3.0.4 + */ +final class Key +{ + /** + * @var string + */ + private $content; + + /** + * @var string + */ + private $passphrase; + + /** + * @param string $content + * @param string $passphrase + */ + public function __construct($content, $passphrase = null) + { + $this->setContent($content); + $this->passphrase = $passphrase; + } + + /** + * @param string $content + * + * @throws InvalidArgumentException + */ + private function setContent($content) + { + if (strpos($content, 'file://') === 0) { + $content = $this->readFile($content); + } + + $this->content = $content; + } + + /** + * @param string $content + * + * @return string + * + * @throws InvalidArgumentException + */ + private function readFile($content) + { + try { + $file = new SplFileObject(substr($content, 7)); + $content = ''; + + while (! $file->eof()) { + $content .= $file->fgets(); + } + + return $content; + } catch (Exception $exception) { + throw new InvalidArgumentException('You must provide a valid key file', 0, $exception); + } + } + + /** + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * @return string + */ + public function getPassphrase() + { + return $this->passphrase; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Keychain.php b/vendor/lcobucci/jwt/src/Signer/Keychain.php new file mode 100755 index 0000000..3b367b6 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Keychain.php @@ -0,0 +1,44 @@ + + * @since 2.1.0 + * + * @deprecated Since we've removed OpenSSL from ECDSA there's no reason to use this class + */ +class Keychain +{ + /** + * Returns a private key from file path or content + * + * @param string $key + * @param string $passphrase + * + * @return Key + */ + public function getPrivateKey($key, $passphrase = null) + { + return new Key($key, $passphrase); + } + + /** + * Returns a public key from file path or content + * + * @param string $certificate + * + * @return Key + */ + public function getPublicKey($certificate) + { + return new Key($certificate); + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/OpenSSL.php b/vendor/lcobucci/jwt/src/Signer/OpenSSL.php new file mode 100755 index 0000000..af1026c --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/OpenSSL.php @@ -0,0 +1,115 @@ +getPrivateKey($key->getContent(), $key->getPassphrase()); + + try { + $signature = ''; + + if (! openssl_sign($payload, $signature, $privateKey, $this->getAlgorithm())) { + throw new InvalidArgumentException( + 'There was an error while creating the signature: ' . openssl_error_string() + ); + } + + return $signature; + } finally { + openssl_free_key($privateKey); + } + } + + /** + * @param string $pem + * @param string $passphrase + * + * @return resource + */ + private function getPrivateKey($pem, $passphrase) + { + $privateKey = openssl_pkey_get_private($pem, $passphrase); + $this->validateKey($privateKey); + + return $privateKey; + } + + /** + * @param $expected + * @param $payload + * @param $pem + * @return bool + */ + public function doVerify($expected, $payload, Key $key) + { + $publicKey = $this->getPublicKey($key->getContent()); + $result = openssl_verify($payload, $expected, $publicKey, $this->getAlgorithm()); + openssl_free_key($publicKey); + + return $result === 1; + } + + /** + * @param string $pem + * + * @return resource + */ + private function getPublicKey($pem) + { + $publicKey = openssl_pkey_get_public($pem); + $this->validateKey($publicKey); + + return $publicKey; + } + + /** + * Raises an exception when the key type is not the expected type + * + * @param resource|bool $key + * + * @throws InvalidArgumentException + */ + private function validateKey($key) + { + if (! is_resource($key)) { + throw new InvalidArgumentException( + 'It was not possible to parse your key, reason: ' . openssl_error_string() + ); + } + + $details = openssl_pkey_get_details($key); + + if (! isset($details['key']) || $details['type'] !== $this->getKeyType()) { + throw new InvalidArgumentException('This key is not compatible with this signer'); + } + } + + /** + * Returns the type of key to be used to create/verify the signature (using OpenSSL constants) + * + * @internal + */ + abstract public function getKeyType(); + + /** + * Returns which algorithm to be used to create/verify the signature (using OpenSSL constants) + * + * @internal + */ + abstract public function getAlgorithm(); +} diff --git a/vendor/lcobucci/jwt/src/Signer/Rsa.php b/vendor/lcobucci/jwt/src/Signer/Rsa.php new file mode 100755 index 0000000..55cc361 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Rsa.php @@ -0,0 +1,24 @@ + + * @since 2.1.0 + */ +abstract class Rsa extends OpenSSL +{ + final public function getKeyType() + { + return OPENSSL_KEYTYPE_RSA; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Rsa/Sha256.php b/vendor/lcobucci/jwt/src/Signer/Rsa/Sha256.php new file mode 100755 index 0000000..4e873e1 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Rsa/Sha256.php @@ -0,0 +1,35 @@ + + * @since 2.1.0 + */ +class Sha256 extends Rsa +{ + /** + * {@inheritdoc} + */ + public function getAlgorithmId() + { + return 'RS256'; + } + + /** + * {@inheritdoc} + */ + public function getAlgorithm() + { + return OPENSSL_ALGO_SHA256; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Rsa/Sha384.php b/vendor/lcobucci/jwt/src/Signer/Rsa/Sha384.php new file mode 100755 index 0000000..c5d2631 --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Rsa/Sha384.php @@ -0,0 +1,35 @@ + + * @since 2.1.0 + */ +class Sha384 extends Rsa +{ + /** + * {@inheritdoc} + */ + public function getAlgorithmId() + { + return 'RS384'; + } + + /** + * {@inheritdoc} + */ + public function getAlgorithm() + { + return OPENSSL_ALGO_SHA384; + } +} diff --git a/vendor/lcobucci/jwt/src/Signer/Rsa/Sha512.php b/vendor/lcobucci/jwt/src/Signer/Rsa/Sha512.php new file mode 100755 index 0000000..0d8074b --- /dev/null +++ b/vendor/lcobucci/jwt/src/Signer/Rsa/Sha512.php @@ -0,0 +1,35 @@ + + * @since 2.1.0 + */ +class Sha512 extends Rsa +{ + /** + * {@inheritdoc} + */ + public function getAlgorithmId() + { + return 'RS512'; + } + + /** + * {@inheritdoc} + */ + public function getAlgorithm() + { + return OPENSSL_ALGO_SHA512; + } +} diff --git a/vendor/lcobucci/jwt/src/Token.php b/vendor/lcobucci/jwt/src/Token.php new file mode 100755 index 0000000..2f6299b --- /dev/null +++ b/vendor/lcobucci/jwt/src/Token.php @@ -0,0 +1,284 @@ + + * @since 0.1.0 + */ +class Token +{ + /** + * The token headers + * + * @var array + */ + private $headers; + + /** + * The token claim set + * + * @var array + */ + private $claims; + + /** + * The token signature + * + * @var Signature + */ + private $signature; + + /** + * The encoded data + * + * @var array + */ + private $payload; + + /** + * Initializes the object + * + * @param array $headers + * @param array $claims + * @param array $payload + * @param Signature $signature + */ + public function __construct( + array $headers = ['alg' => 'none'], + array $claims = [], + Signature $signature = null, + array $payload = ['', ''] + ) { + $this->headers = $headers; + $this->claims = $claims; + $this->signature = $signature; + $this->payload = $payload; + } + + /** + * Returns the token headers + * + * @return array + */ + public function getHeaders() + { + return $this->headers; + } + + /** + * Returns if the header is configured + * + * @param string $name + * + * @return boolean + */ + public function hasHeader($name) + { + return array_key_exists($name, $this->headers); + } + + /** + * Returns the value of a token header + * + * @param string $name + * @param mixed $default + * + * @return mixed + * + * @throws OutOfBoundsException + */ + public function getHeader($name, $default = null) + { + if ($this->hasHeader($name)) { + return $this->getHeaderValue($name); + } + + if ($default === null) { + throw new OutOfBoundsException('Requested header is not configured'); + } + + return $default; + } + + /** + * Returns the value stored in header + * + * @param string $name + * + * @return mixed + */ + private function getHeaderValue($name) + { + $header = $this->headers[$name]; + + if ($header instanceof Claim) { + return $header->getValue(); + } + + return $header; + } + + /** + * Returns the token claim set + * + * @return array + */ + public function getClaims() + { + return $this->claims; + } + + /** + * Returns if the claim is configured + * + * @param string $name + * + * @return boolean + */ + public function hasClaim($name) + { + return array_key_exists($name, $this->claims); + } + + /** + * Returns the value of a token claim + * + * @param string $name + * @param mixed $default + * + * @return mixed + * + * @throws OutOfBoundsException + */ + public function getClaim($name, $default = null) + { + if ($this->hasClaim($name)) { + return $this->claims[$name]->getValue(); + } + + if ($default === null) { + throw new OutOfBoundsException('Requested claim is not configured'); + } + + return $default; + } + + /** + * Verify if the key matches with the one that created the signature + * + * @param Signer $signer + * @param string $key + * + * @return boolean + * + * @throws BadMethodCallException When token is not signed + */ + public function verify(Signer $signer, $key) + { + if ($this->signature === null) { + throw new BadMethodCallException('This token is not signed'); + } + + if ($this->headers['alg'] !== $signer->getAlgorithmId()) { + return false; + } + + return $this->signature->verify($signer, $this->getPayload(), $key); + } + + /** + * Validates if the token is valid + * + * @param ValidationData $data + * + * @return boolean + */ + public function validate(ValidationData $data) + { + foreach ($this->getValidatableClaims() as $claim) { + if (!$claim->validate($data)) { + return false; + } + } + + return true; + } + + /** + * Determine if the token is expired. + * + * @param DateTimeInterface $now Defaults to the current time. + * + * @return bool + */ + public function isExpired(DateTimeInterface $now = null) + { + $exp = $this->getClaim('exp', false); + + if ($exp === false) { + return false; + } + + $now = $now ?: new DateTime(); + + $expiresAt = new DateTime(); + $expiresAt->setTimestamp($exp); + + return $now > $expiresAt; + } + + /** + * Yields the validatable claims + * + * @return Generator + */ + private function getValidatableClaims() + { + foreach ($this->claims as $claim) { + if ($claim instanceof Validatable) { + yield $claim; + } + } + } + + /** + * Returns the token payload + * + * @return string + */ + public function getPayload() + { + return $this->payload[0] . '.' . $this->payload[1]; + } + + /** + * Returns an encoded representation of the token + * + * @return string + */ + public function __toString() + { + $data = implode('.', $this->payload); + + if ($this->signature === null) { + $data .= '.'; + } + + return $data; + } +} diff --git a/vendor/lcobucci/jwt/src/ValidationData.php b/vendor/lcobucci/jwt/src/ValidationData.php new file mode 100755 index 0000000..6052ee5 --- /dev/null +++ b/vendor/lcobucci/jwt/src/ValidationData.php @@ -0,0 +1,129 @@ + + * @since 2.0.0 + */ +class ValidationData +{ + /** + * The list of things to be validated + * + * @var array + */ + private $items; + + /** + * The leeway (in seconds) to use when validating time claims + * @var int + */ + private $leeway; + + /** + * Initializes the object + * + * @param int $currentTime + * @param int $leeway + */ + public function __construct($currentTime = null, $leeway = 0) + { + $currentTime = $currentTime ?: time(); + $this->leeway = (int) $leeway; + + $this->items = [ + 'jti' => null, + 'iss' => null, + 'aud' => null, + 'sub' => null + ]; + + $this->setCurrentTime($currentTime); + } + + /** + * Configures the id + * + * @param string $id + */ + public function setId($id) + { + $this->items['jti'] = (string) $id; + } + + /** + * Configures the issuer + * + * @param string $issuer + */ + public function setIssuer($issuer) + { + $this->items['iss'] = (string) $issuer; + } + + /** + * Configures the audience + * + * @param string $audience + */ + public function setAudience($audience) + { + $this->items['aud'] = (string) $audience; + } + + /** + * Configures the subject + * + * @param string $subject + */ + public function setSubject($subject) + { + $this->items['sub'] = (string) $subject; + } + + /** + * Configures the time that "iat", "nbf" and "exp" should be based on + * + * @param int $currentTime + */ + public function setCurrentTime($currentTime) + { + $currentTime = (int) $currentTime; + + $this->items['iat'] = $currentTime + $this->leeway; + $this->items['nbf'] = $currentTime + $this->leeway; + $this->items['exp'] = $currentTime - $this->leeway; + } + + /** + * Returns the requested item + * + * @param string $name + * + * @return mixed + */ + public function get($name) + { + return isset($this->items[$name]) ? $this->items[$name] : null; + } + + /** + * Returns if the item is present + * + * @param string $name + * + * @return boolean + */ + public function has($name) + { + return !empty($this->items[$name]); + } +} diff --git a/vendor/lcobucci/jwt/test/functional/EcdsaTokenTest.php b/vendor/lcobucci/jwt/test/functional/EcdsaTokenTest.php new file mode 100755 index 0000000..5a18f95 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/EcdsaTokenTest.php @@ -0,0 +1,328 @@ + + * @since 2.1.0 + */ +class EcdsaTokenTest extends \PHPUnit\Framework\TestCase +{ + use Keys; + + /** + * @var Sha256 + */ + private $signer; + + /** + * @before + */ + public function createSigner() + { + $this->signer = new Sha256(); + } + + /** + * @test + * + * @expectedException \InvalidArgumentException + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Ecdsa + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + */ + public function builderShouldRaiseExceptionWhenKeyIsInvalid() + { + $user = (object) ['name' => 'testing', 'email' => 'testing@abc.com']; + + (new Builder())->setId(1) + ->setAudience('http://client.abc.com') + ->setIssuer('http://api.abc.com') + ->set('user', $user) + ->getToken($this->signer, new Key('testing')); + } + + /** + * @test + * + * @expectedException \InvalidArgumentException + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Ecdsa + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + */ + public function builderShouldRaiseExceptionWhenKeyIsNotEcdsaCompatible() + { + $user = (object) ['name' => 'testing', 'email' => 'testing@abc.com']; + + (new Builder())->setId(1) + ->setAudience('http://client.abc.com') + ->setIssuer('http://api.abc.com') + ->set('user', $user) + ->getToken($this->signer, static::$rsaKeys['private']); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Ecdsa + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + */ + public function builderCanGenerateAToken() + { + $user = (object) ['name' => 'testing', 'email' => 'testing@abc.com']; + + $token = (new Builder())->setId(1) + ->setAudience('http://client.abc.com') + ->setIssuer('http://api.abc.com') + ->set('user', $user) + ->setHeader('jki', '1234') + ->sign($this->signer, static::$ecdsaKeys['private']) + ->getToken(); + + $this->assertAttributeInstanceOf(Signature::class, 'signature', $token); + $this->assertEquals('1234', $token->getHeader('jki')); + $this->assertEquals('http://client.abc.com', $token->getClaim('aud')); + $this->assertEquals('http://api.abc.com', $token->getClaim('iss')); + $this->assertEquals($user, $token->getClaim('user')); + + return $token; + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + * @covers Lcobucci\JWT\Signer\Ecdsa + */ + public function parserCanReadAToken(Token $generated) + { + $read = (new Parser())->parse((string) $generated); + + $this->assertEquals($generated, $read); + $this->assertEquals('testing', $read->getClaim('user')->name); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Ecdsa + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + */ + public function verifyShouldReturnFalseWhenKeyIsNotRight(Token $token) + { + $this->assertFalse($token->verify($this->signer, static::$ecdsaKeys['public2'])); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Ecdsa + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512 + * @covers \Lcobucci\JWT\Signer\OpenSSL + */ + public function verifyShouldReturnFalseWhenAlgorithmIsDifferent(Token $token) + { + $this->assertFalse($token->verify(new Sha512(), static::$ecdsaKeys['public1'])); + } + + /** + * @test + * + * @expectedException \InvalidArgumentException + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Ecdsa + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + */ + public function verifyShouldRaiseExceptionWhenKeyIsNotEcdsaCompatible(Token $token) + { + $this->assertFalse($token->verify($this->signer, static::$rsaKeys['public'])); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Ecdsa + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + */ + public function verifyShouldReturnTrueWhenKeyIsRight(Token $token) + { + $this->assertTrue($token->verify($this->signer, static::$ecdsaKeys['public1'])); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Ecdsa + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256 + * @covers \Lcobucci\JWT\Signer\OpenSSL + */ + public function everythingShouldWorkWithAKeyWithParams() + { + $user = (object) ['name' => 'testing', 'email' => 'testing@abc.com']; + + $token = (new Builder())->setId(1) + ->setAudience('http://client.abc.com') + ->setIssuer('http://api.abc.com') + ->set('user', $user) + ->setHeader('jki', '1234') + ->sign($this->signer, static::$ecdsaKeys['private-params']) + ->getToken(); + + $this->assertTrue($token->verify($this->signer, static::$ecdsaKeys['public-params'])); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Ecdsa + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512 + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers Lcobucci\JWT\Signer\Keychain + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function everythingShouldWorkWhenUsingATokenGeneratedByOtherLibs() + { + $data = 'eyJhbGciOiJFUzUxMiIsInR5cCI6IkpXVCJ9.eyJoZWxsbyI6IndvcmxkIn0.' + . 'AQx1MqdTni6KuzfOoedg2-7NUiwe-b88SWbdmviz40GTwrM0Mybp1i1tVtm' + . 'TSQ91oEXGXBdtwsN6yalzP9J-sp2YATX_Tv4h-BednbdSvYxZsYnUoZ--ZU' + . 'dL10t7g8Yt3y9hdY_diOjIptcha6ajX8yzkDGYG42iSe3f5LywSuD6FO5c'; + + $key = '-----BEGIN PUBLIC KEY-----' . PHP_EOL + . 'MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQAcpkss6wI7PPlxj3t7A1RqMH3nvL4' . PHP_EOL + . 'L5Tzxze/XeeYZnHqxiX+gle70DlGRMqqOq+PJ6RYX7vK0PJFdiAIXlyPQq0B3KaU' . PHP_EOL + . 'e86IvFeQSFrJdCc0K8NfiH2G1loIk3fiR+YLqlXk6FAeKtpXJKxR1pCQCAM+vBCs' . PHP_EOL + . 'mZudf1zCUZ8/4eodlHU=' . PHP_EOL + . '-----END PUBLIC KEY-----'; + + $keychain = new Keychain(); + $token = (new Parser())->parse((string) $data); + + $this->assertEquals('world', $token->getClaim('hello')); + $this->assertTrue($token->verify(new Sha512(), $keychain->getPublicKey($key))); + } +} diff --git a/vendor/lcobucci/jwt/test/functional/HmacTokenTest.php b/vendor/lcobucci/jwt/test/functional/HmacTokenTest.php new file mode 100755 index 0000000..20101dd --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/HmacTokenTest.php @@ -0,0 +1,186 @@ + + * @since 2.1.0 + */ +class HmacTokenTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var Sha256 + */ + private $signer; + + /** + * @before + */ + public function createSigner() + { + $this->signer = new Sha256(); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Hmac + * @covers Lcobucci\JWT\Signer\Hmac\Sha256 + */ + public function builderCanGenerateAToken() + { + $user = (object) ['name' => 'testing', 'email' => 'testing@abc.com']; + + $token = (new Builder())->setId(1) + ->setAudience('http://client.abc.com') + ->setIssuer('http://api.abc.com') + ->set('user', $user) + ->setHeader('jki', '1234') + ->sign($this->signer, 'testing') + ->getToken(); + + $this->assertAttributeInstanceOf(Signature::class, 'signature', $token); + $this->assertEquals('1234', $token->getHeader('jki')); + $this->assertEquals('http://client.abc.com', $token->getClaim('aud')); + $this->assertEquals('http://api.abc.com', $token->getClaim('iss')); + $this->assertEquals($user, $token->getClaim('user')); + + return $token; + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function parserCanReadAToken(Token $generated) + { + $read = (new Parser())->parse((string) $generated); + + $this->assertEquals($generated, $read); + $this->assertEquals('testing', $read->getClaim('user')->name); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Hmac + * @covers Lcobucci\JWT\Signer\Hmac\Sha256 + */ + public function verifyShouldReturnFalseWhenKeyIsNotRight(Token $token) + { + $this->assertFalse($token->verify($this->signer, 'testing1')); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Hmac + * @covers Lcobucci\JWT\Signer\Hmac\Sha256 + * @covers Lcobucci\JWT\Signer\Hmac\Sha512 + */ + public function verifyShouldReturnFalseWhenAlgorithmIsDifferent(Token $token) + { + $this->assertFalse($token->verify(new Sha512(), 'testing')); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Hmac + * @covers Lcobucci\JWT\Signer\Hmac\Sha256 + */ + public function verifyShouldReturnTrueWhenKeyIsRight(Token $token) + { + $this->assertTrue($token->verify($this->signer, 'testing')); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers Lcobucci\JWT\Signer\Hmac + * @covers Lcobucci\JWT\Signer\Hmac\Sha256 + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function everythingShouldWorkWhenUsingATokenGeneratedByOtherLibs() + { + $data = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXUyJ9.eyJoZWxsbyI6IndvcmxkIn0.Rh' + . '7AEgqCB7zae1PkgIlvOpeyw9Ab8NGTbeOH7heHO0o'; + + $token = (new Parser())->parse((string) $data); + + $this->assertEquals('world', $token->getClaim('hello')); + $this->assertTrue($token->verify($this->signer, 'testing')); + } +} diff --git a/vendor/lcobucci/jwt/test/functional/Keys.php b/vendor/lcobucci/jwt/test/functional/Keys.php new file mode 100755 index 0000000..f3a83d2 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/Keys.php @@ -0,0 +1,53 @@ + + */ +trait Keys +{ + /** + * @var array + */ + protected static $rsaKeys; + + /** + * @var array + */ + protected static $ecdsaKeys; + + /** + * @beforeClass + */ + public static function createRsaKeys() + { + $keychain = new Keychain(); + $dir = 'file://' . __DIR__; + + static::$rsaKeys = [ + 'private' => $keychain->getPrivateKey($dir . '/rsa/private.key'), + 'public' => $keychain->getPublicKey($dir . '/rsa/public.key'), + 'encrypted-private' => $keychain->getPrivateKey($dir . '/rsa/encrypted-private.key', 'testing'), + 'encrypted-public' => $keychain->getPublicKey($dir . '/rsa/encrypted-public.key') + ]; + } + + /** + * @beforeClass + */ + public static function createEcdsaKeys() + { + $keychain = new Keychain(); + $dir = 'file://' . __DIR__; + + static::$ecdsaKeys = [ + 'private' => $keychain->getPrivateKey($dir . '/ecdsa/private.key'), + 'private-params' => $keychain->getPrivateKey($dir . '/ecdsa/private2.key'), + 'public1' => $keychain->getPublicKey($dir . '/ecdsa/public1.key'), + 'public2' => $keychain->getPublicKey($dir . '/ecdsa/public2.key'), + 'public-params' => $keychain->getPublicKey($dir . '/ecdsa/public3.key'), + ]; + } +} diff --git a/vendor/lcobucci/jwt/test/functional/RFC6978VectorTest.php b/vendor/lcobucci/jwt/test/functional/RFC6978VectorTest.php new file mode 100755 index 0000000..0076b6d --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/RFC6978VectorTest.php @@ -0,0 +1,154 @@ +verify($signature, $payload, $key)); + } + + /** + * @return mixed[] + */ + public function dataRFC6979() + { + return $this->sha256Data() + $this->sha384Data() + $this->sha512Data(); + } + + /** + * @return mixed[] + */ + public function sha256Data() + { + $signer = new Sha256(); + $key = new Key( + '-----BEGIN PUBLIC KEY-----' . PHP_EOL + . 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEYP7UuiVanTHJYet0xjVtaMBJuJI7' . PHP_EOL + . 'Yfps5mliLmDyn7Z5A/4QCLi8maQa6elWKLxk8vGyDC1+n1F3o8KU1EYimQ==' . PHP_EOL + . '-----END PUBLIC KEY-----' + ); + + return [ + 'SHA-256 (sample)' => [ + $signer, + $key, + 'sample', + 'EFD48B2AACB6A8FD1140DD9CD45E81D69D2C877B56AAF991C34D0EA84EAF3716', + 'F7CB1C942D657C41D436C7A1B6E29F65F3E900DBB9AFF4064DC4AB2F843ACDA8', + ], + 'SHA-256 (test)' => [ + $signer, + $key, + 'test', + 'F1ABB023518351CD71D881567B1EA663ED3EFCF6C5132B354F28D3B0B7D38367', + '019F4113742A2B14BD25926B49C649155F267E60D3814B4C0CC84250E46F0083', + ] + ]; + } + + /** + * @return mixed[] + */ + public function sha384Data() + { + $signer = new Sha384(); + $key = new Key( + '-----BEGIN PUBLIC KEY-----' . PHP_EOL + . 'MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAE7DpOQVtOGaRWhhgCn0J/pdqai8SukuAu' . PHP_EOL + . 'BqrlKGswDGTe+PDqkFWGYGSiVFFUgLwTgBXZty19VyROqO+awMYhiWcIpZNn+d+5' . PHP_EOL + . '9UyoSz8cnbEoiyMcOuDU/nNE/SUzJkcg' . PHP_EOL + . '-----END PUBLIC KEY-----' + ); + + return [ + 'SHA-384 (sample)' => [ + $signer, + $key, + 'sample', + '94EDBB92A5ECB8AAD4736E56C691916B3F88140666CE9FA73D64C4EA95AD133C81A648152E44ACF96E36DD1E80FABE46', + '99EF4AEB15F178CEA1FE40DB2603138F130E740A19624526203B6351D0A3A94FA329C145786E679E7B82C71A38628AC8', + ], + 'SHA-384 (test)' => [ + $signer, + $key, + 'test', + '8203B63D3C853E8D77227FB377BCF7B7B772E97892A80F36AB775D509D7A5FEB0542A7F0812998DA8F1DD3CA3CF023DB', + 'DDD0760448D42D8A43AF45AF836FCE4DE8BE06B485E9B61B827C2F13173923E06A739F040649A667BF3B828246BAA5A5', + ] + ]; + } + + /** + * @return mixed[] + */ + public function sha512Data() + { + $signer = new Sha512(); + $key = new Key( + '-----BEGIN PUBLIC KEY-----' . PHP_EOL + . 'MIGbMBAGByqGSM49AgEGBSuBBAAjA4GGAAQBiUVQ0HhZMuAOqiO2lPIT+MMSH4bc' . PHP_EOL + . 'l6BOWnFn205bzTcRI9RuRdtrXVNwp/IPtjMVXTj/oW0r12HcrEdLmi9QI6QASTEB' . PHP_EOL + . 'yWLNTS/d94IoXmRYQTnC+RtH+H/4I1TWYw90aiig2yV0G1s0qCgAiyKswj+ST6r7' . PHP_EOL + . '1NM/gepmlW3+qiv9/PU=' . PHP_EOL + . '-----END PUBLIC KEY-----' + ); + + return [ + 'SHA-512 (sample)' => [ + $signer, + $key, + 'sample', + '00C328FAFCBD79DD77850370C46325D987CB525569FB63C5D3BC53950E6D4C5F174E25A1EE9017B5D450606ADD152B534931D7D4E8' + . '455CC91F9B15BF05EC36E377FA', + '00617CCE7CF5064806C467F678D3B4080D6F1CC50AF26CA209417308281B68AF282623EAA63E5B5C0723D8B8C37FF0777B1A20F8CC' + . 'B1DCCC43997F1EE0E44DA4A67A', + ], + 'SHA-512 (test)' => [ + $signer, + $key, + 'test', + '013E99020ABF5CEE7525D16B69B229652AB6BDF2AFFCAEF38773B4B7D08725F10CDB93482FDCC54EDCEE91ECA4166B2A7C6265EF0C' + . 'E2BD7051B7CEF945BABD47EE6D', + '01FBD0013C674AA79CB39849527916CE301C66EA7CE8B80682786AD60F98F7E78A19CA69EFF5C57400E3B3A0AD66CE0978214D13BA' + . 'F4E9AC60752F7B155E2DE4DCE3', + ], + ]; + } +} diff --git a/vendor/lcobucci/jwt/test/functional/RsaTokenTest.php b/vendor/lcobucci/jwt/test/functional/RsaTokenTest.php new file mode 100755 index 0000000..9993183 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/RsaTokenTest.php @@ -0,0 +1,280 @@ + + * @since 2.1.0 + */ +class RsaTokenTest extends \PHPUnit\Framework\TestCase +{ + use Keys; + + /** + * @var Sha256 + */ + private $signer; + + /** + * @before + */ + public function createSigner() + { + $this->signer = new Sha256(); + } + + /** + * @test + * + * @expectedException \InvalidArgumentException + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 + */ + public function builderShouldRaiseExceptionWhenKeyIsInvalid() + { + $user = (object) ['name' => 'testing', 'email' => 'testing@abc.com']; + + (new Builder())->setId(1) + ->setAudience('http://client.abc.com') + ->setIssuer('http://api.abc.com') + ->set('user', $user) + ->getToken($this->signer, new Key('testing')); + } + + /** + * @test + * + * @expectedException \InvalidArgumentException + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 + */ + public function builderShouldRaiseExceptionWhenKeyIsNotRsaCompatible() + { + $user = (object) ['name' => 'testing', 'email' => 'testing@abc.com']; + + (new Builder())->setId(1) + ->setAudience('http://client.abc.com') + ->setIssuer('http://api.abc.com') + ->set('user', $user) + ->getToken($this->signer, static::$ecdsaKeys['private']); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 + */ + public function builderCanGenerateAToken() + { + $user = (object) ['name' => 'testing', 'email' => 'testing@abc.com']; + + $token = (new Builder())->setId(1) + ->setAudience('http://client.abc.com') + ->setIssuer('http://api.abc.com') + ->set('user', $user) + ->setHeader('jki', '1234') + ->sign($this->signer, static::$rsaKeys['private']) + ->getToken(); + + $this->assertAttributeInstanceOf(Signature::class, 'signature', $token); + $this->assertEquals('1234', $token->getHeader('jki')); + $this->assertEquals('http://client.abc.com', $token->getClaim('aud')); + $this->assertEquals('http://api.abc.com', $token->getClaim('iss')); + $this->assertEquals($user, $token->getClaim('user')); + + return $token; + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function parserCanReadAToken(Token $generated) + { + $read = (new Parser())->parse((string) $generated); + + $this->assertEquals($generated, $read); + $this->assertEquals('testing', $read->getClaim('user')->name); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 + */ + public function verifyShouldReturnFalseWhenKeyIsNotRight(Token $token) + { + $this->assertFalse($token->verify($this->signer, self::$rsaKeys['encrypted-public'])); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers \Lcobucci\JWT\Signer\Rsa\Sha512 + */ + public function verifyShouldReturnFalseWhenAlgorithmIsDifferent(Token $token) + { + $this->assertFalse($token->verify(new Sha512(), self::$rsaKeys['public'])); + } + + /** + * @test + * + * @expectedException \InvalidArgumentException + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 + */ + public function verifyShouldRaiseExceptionWhenKeyIsNotRsaCompatible(Token $token) + { + $this->assertFalse($token->verify($this->signer, self::$ecdsaKeys['public1'])); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 + */ + public function verifyShouldReturnTrueWhenKeyIsRight(Token $token) + { + $this->assertTrue($token->verify($this->signer, self::$rsaKeys['public'])); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Signature + * @covers Lcobucci\JWT\Signer\Key + * @covers Lcobucci\JWT\Signer\BaseSigner + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\Rsa + * @covers \Lcobucci\JWT\Signer\Rsa\Sha256 + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function everythingShouldWorkWhenUsingATokenGeneratedByOtherLibs() + { + $data = 'eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9.eyJoZWxsbyI6IndvcmxkIn0.s' + . 'GYbB1KrmnESNfJ4D9hOe1Zad_BMyxdb8G4p4LNP7StYlOyBWck6q7XPpPj_6gB' + . 'Bo1ohD3MA2o0HY42lNIrAStaVhfsFKGdIou8TarwMGZBPcif_3ThUV1pGS3fZc' + . 'lFwF2SP7rqCngQis_xcUVCyqa8E1Wa_v28grnl1QZrnmQFO8B5JGGLqcrfUHJO' + . 'nJCupP-Lqh4TmIhftIimSCgLNmJg80wyrpUEfZYReE7hPuEmY0ClTqAGIMQoNS' + . '98ljwDxwhfbSuL2tAdbV4DekbTpWzspe3dOJ7RSzmPKVZ6NoezaIazKqyqkmHZfcMaHI1lQeGia6LTbHU1bp0gINi74Vw'; + + $token = (new Parser())->parse((string) $data); + + $this->assertEquals('world', $token->getClaim('hello')); + $this->assertTrue($token->verify($this->signer, self::$rsaKeys['public'])); + } +} diff --git a/vendor/lcobucci/jwt/test/functional/UnsignedTokenTest.php b/vendor/lcobucci/jwt/test/functional/UnsignedTokenTest.php new file mode 100755 index 0000000..6e26fdf --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/UnsignedTokenTest.php @@ -0,0 +1,161 @@ + + * @since 2.1.0 + */ +class UnsignedTokenTest extends \PHPUnit\Framework\TestCase +{ + const CURRENT_TIME = 100000; + + /** + * @test + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + */ + public function builderCanGenerateAToken() + { + $user = (object) ['name' => 'testing', 'email' => 'testing@abc.com']; + + $token = (new Builder())->setId(1) + ->setAudience('http://client.abc.com') + ->setIssuer('http://api.abc.com') + ->setExpiration(self::CURRENT_TIME + 3000) + ->set('user', $user) + ->getToken(); + + $this->assertAttributeEquals(null, 'signature', $token); + $this->assertEquals('http://client.abc.com', $token->getClaim('aud')); + $this->assertEquals('http://api.abc.com', $token->getClaim('iss')); + $this->assertEquals(self::CURRENT_TIME + 3000, $token->getClaim('exp')); + $this->assertEquals($user, $token->getClaim('user')); + + return $token; + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function parserCanReadAToken(Token $generated) + { + $read = (new Parser())->parse((string) $generated); + + $this->assertEquals($generated, $read); + $this->assertEquals('testing', $read->getClaim('user')->name); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\ValidationData + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Claim\EqualsTo + * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function tokenValidationShouldReturnWhenEverythingIsFine(Token $generated) + { + $data = new ValidationData(self::CURRENT_TIME - 10); + $data->setAudience('http://client.abc.com'); + $data->setIssuer('http://api.abc.com'); + + $this->assertTrue($generated->validate($data)); + } + + /** + * @test + * + * @dataProvider invalidValidationData + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\ValidationData + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Claim\EqualsTo + * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function tokenValidationShouldReturnFalseWhenExpectedDataDontMatch(ValidationData $data, Token $generated) + { + $this->assertFalse($generated->validate($data)); + } + + /** + * @test + * + * @depends builderCanGenerateAToken + * + * @covers Lcobucci\JWT\Builder + * @covers Lcobucci\JWT\Parser + * @covers Lcobucci\JWT\Token + * @covers Lcobucci\JWT\ValidationData + * @covers Lcobucci\JWT\Claim\Factory + * @covers Lcobucci\JWT\Claim\Basic + * @covers Lcobucci\JWT\Claim\EqualsTo + * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo + * @covers Lcobucci\JWT\Parsing\Encoder + * @covers Lcobucci\JWT\Parsing\Decoder + */ + public function tokenValidationShouldReturnTrueWhenExpectedDataMatchBecauseOfLeeway(Token $generated) + { + $notExpiredDueToLeeway = new ValidationData(self::CURRENT_TIME + 3020, 50); + $notExpiredDueToLeeway->setAudience('http://client.abc.com'); + $notExpiredDueToLeeway->setIssuer('http://api.abc.com'); + $this->assertTrue($generated->validate($notExpiredDueToLeeway)); + } + + public function invalidValidationData() + { + $expired = new ValidationData(self::CURRENT_TIME + 3020); + $expired->setAudience('http://client.abc.com'); + $expired->setIssuer('http://api.abc.com'); + + $invalidAudience = new ValidationData(self::CURRENT_TIME - 10); + $invalidAudience->setAudience('http://cclient.abc.com'); + $invalidAudience->setIssuer('http://api.abc.com'); + + $invalidIssuer = new ValidationData(self::CURRENT_TIME - 10); + $invalidIssuer->setAudience('http://client.abc.com'); + $invalidIssuer->setIssuer('http://aapi.abc.com'); + + return [[$expired], [$invalidAudience], [$invalidIssuer]]; + } +} diff --git a/vendor/lcobucci/jwt/test/functional/ecdsa/private.key b/vendor/lcobucci/jwt/test/functional/ecdsa/private.key new file mode 100755 index 0000000..d8ac3a2 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/ecdsa/private.key @@ -0,0 +1,5 @@ +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIBGpMoZJ64MMSzuo5JbmXpf9V4qSWdLIl/8RmJLcfn/qoAoGCCqGSM49 +AwEHoUQDQgAE7it/EKmcv9bfpcV1fBreLMRXxWpnd0wxa2iFruiI2tsEdGFTLTsy +U+GeRqC7zN0aTnTQajarUylKJ3UWr/r1kg== +-----END EC PRIVATE KEY----- \ No newline at end of file diff --git a/vendor/lcobucci/jwt/test/functional/ecdsa/private2.key b/vendor/lcobucci/jwt/test/functional/ecdsa/private2.key new file mode 100755 index 0000000..7c4e131 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/ecdsa/private2.key @@ -0,0 +1,8 @@ +-----BEGIN EC PARAMETERS----- +BggqhkjOPQMBBw== +-----END EC PARAMETERS----- +-----BEGIN EC PRIVATE KEY----- +MHcCAQEEIM6G7WZ6SqoPwrHwGXhOJkYD+ErT8dfRvrNifgBQvSb7oAoGCCqGSM49 +AwEHoUQDQgAE09Hkp/u0tIGdzlQ99R/sXCOr9DTZAfLex4D4Po0C1L3qUqHrzZ0m +B3bAhe+pwEDQ/jqVqdzxhA9i4PqT7F4Aew== +-----END EC PRIVATE KEY----- diff --git a/vendor/lcobucci/jwt/test/functional/ecdsa/public1.key b/vendor/lcobucci/jwt/test/functional/ecdsa/public1.key new file mode 100755 index 0000000..21ea2e7 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/ecdsa/public1.key @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE7it/EKmcv9bfpcV1fBreLMRXxWpn +d0wxa2iFruiI2tsEdGFTLTsyU+GeRqC7zN0aTnTQajarUylKJ3UWr/r1kg== +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/vendor/lcobucci/jwt/test/functional/ecdsa/public2.key b/vendor/lcobucci/jwt/test/functional/ecdsa/public2.key new file mode 100755 index 0000000..ad11abd --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/ecdsa/public2.key @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdgxRxlhzhHGj+v6S2ikp+33LoGp5 +QWbEWv8BORsr2Ayg6C7deDDRM/s/f0R++4zZqXro1gDTVF5VDv7nE+EfEw== +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/vendor/lcobucci/jwt/test/functional/ecdsa/public3.key b/vendor/lcobucci/jwt/test/functional/ecdsa/public3.key new file mode 100755 index 0000000..3bf5cd7 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/ecdsa/public3.key @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE09Hkp/u0tIGdzlQ99R/sXCOr9DTZ +AfLex4D4Po0C1L3qUqHrzZ0mB3bAhe+pwEDQ/jqVqdzxhA9i4PqT7F4Aew== +-----END PUBLIC KEY----- diff --git a/vendor/lcobucci/jwt/test/functional/rsa/encrypted-private.key b/vendor/lcobucci/jwt/test/functional/rsa/encrypted-private.key new file mode 100755 index 0000000..121f88f --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/rsa/encrypted-private.key @@ -0,0 +1,30 @@ +-----BEGIN RSA PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-128-CBC,0D71668CE71033CB9150ED82FC87F4A1 + +uLzPNDdlHnZ77tAGMHyPYERDMBcdV4SsQJYcSjiHhR2o0dLGTdgOpQrXTHPX4GJF +LlEWLhAAV9wx2mM/2kHDWB4uZwThtT9/v+RFoW1WbVO/d3lhI9fg4/73/DWAH/7/ +afMRc7ZOVoAmVCESotPx4khCHoE97RdY/JtkLTzc3+peqmL53AbYXrg9rTN1B+ZV +U3w4ciQS8Uki87zDYIBjYtaOCyMUTvug25CvdssvUMBoc/Jc0xps6/vAyXrnzlGT +pZD0Tst8idswfDi613BhAaxJspeY0AErWA59qJ3eGzbiQq5RDWcbJe/Tz5r/6+NN +DkvNQ7DaEZ6LpeWX0MUq6/QWfrM8yE95XhjyC1d3LYn32lXHUygbgTFWIgLDoOE6 +nBhu34SWtbLAnqYGewaJFxhlYVS9rb/uvYQg70r5X9Sx6alCQPiPyIv39IItezn2 +HF2GRfE91MPZUeDhdqdvvOlSZVM5KnYc1fhamGAwM48gdDDXe8Czu/JEGoANNvC3 +l/Z1p5RtGF4hrel9WpeX9zQq3pvtfVcVIiWuRUwCOSQytXlieRK37sMuYeggvmjV +VvaCods3mS/panWg9T/D/deIXjhzNJLvyiJg8+3sY5H4yNe0XpbaAc/ySwt9Rcxy +FzFQ+5pghLSZgR1uV3AhdcnzXBU2GkYhdGKt2tUsH0UeVQ2BXxTlBFsCOh2dWqcj +y3suIG65bukDAAWidQ4q3S6ZIMpXBhhCj7nwB5jQ7wSlU3U9So0ndr7zxdUILiMm +chHi3q5apVZnMGcwv2B33rt4nD7HgGEmRKkCelrSrBATY1ut+T4rCDzKDqDs3jpv +hYIWrlNPTkJyQz3eWly6Db+FJEfdYGadYJusc7/nOxCh/QmUu8Sh3NhKT6TH0bS7 +1AAqd8H+2hJ9I32Dhd2qwAF7PkNe2LGi+P8tbAtepKGim5w65wnsPePMnrfxumsG +PeDnMrqeCKy+fME7a/MS5kmEBpmD4BMhVC6/OhFVz8gBty1f8yIEZggHNQN2QK7m +NIrG+PwqW2w8HoxOlAi2Ix4LTPifrdfsH02U7aM1pgo1rZzD4AOzqvzCaK43H2VB +BHLeTBGoLEUxXA9C+iGbeQlKXkMC00QKkjK5+nvkvnvePFfsrTQIpuyGufD/MoPb +6fpwsyHZDxhxMN1PJk1b1lPq2Ui4hXpVNOYd4Q6OQz7bwxTMRX9XQromUlKMMgAT +edX8v2NdM7Ssy1IwHuGVbDEpZdjoeaWZ1iNRV17i/EaJAqwYDQLfsuHBlzZL1ov1 +xkKVJdL8Y3q80oRAzTQDVdzL/rI44LLAfv609YByCnw29feYJY2W6gV0O7ZSw413 +XUkc5CaEbR1LuG8NtnOOPJV4Tb/hNsIDtvVm7Hl5npBKBe4iVgQ2LNuC2eT69d/z +uvzgjISlumPiO5ivuYe0QtLPuJSc+/Bl8bPL8gcNQEtqkzj7IftHPPZNs+bJC2uY +bPjq5KoDNAMF6VHuKHwu48MBYpnXDIg3ZenmJwGRULRBhK6324hDS6NJ7ULTBU2M +TZCHmg89ySLBfCAspVeo63o/R7bs9a7BP9x2h5uwCBogSvkEwhhPKnboVN45bp9c +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/vendor/lcobucci/jwt/test/functional/rsa/encrypted-public.key b/vendor/lcobucci/jwt/test/functional/rsa/encrypted-public.key new file mode 100755 index 0000000..ae4a37c --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/rsa/encrypted-public.key @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwLpbUP8a9yflt5LKUUS3 +NPuRM7yEouPWg0VKeY5AURu4i8bqQ20K5jwfRJ+w05FvlywG4EuxpnpTFTVS2/do +q3xufzTf/C3KIDOAHEifkdx4140btKxxm4mD9Eu2CQ32adZyScha50KUFlfnAAic +Hb8wYxjFyWo3PAbGYmCQCn2z97Ab0Ar6NR1e+V9f8EL9Orr2f04puKJfQTZdWVDF +UJR4w7QZ/CPY0LEsiFLW3QQCNraka1mtrLJwPqreBtDEkj8IoISNkrguu/97RQZz +miJgBQkVjr6OfqG5WIFr0MzbRZc1/aK9g8ft88nhhQm0E3GqkCxBKTwgA03HtK07 +qQIDAQAB +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/vendor/lcobucci/jwt/test/functional/rsa/private.key b/vendor/lcobucci/jwt/test/functional/rsa/private.key new file mode 100755 index 0000000..962c7f9 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/rsa/private.key @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDTvwE87MtgREYL +TL4aHhQo3ZzogmxxvMUsKnPzyxRs1YrXOSOpwN0npsXarBKKVIUMNLfFODp/vnQn +2Zp06N8XG59WAOKwvC4MfxLDQkA+JXggzHlkbVoTN+dUkdYIFqSKuAPGwiWToRK2 +SxEhij3rE2FON8jQZvDxZkiP9a4vxJO3OTPQwKredXFiObsXD/c3RtLFhKctjCyH +OIrP0bQEsee/m7JNtG4ry6BPusN6wb+vJo5ieBYPa3c19akNq6q/nYWhplhkkJSu +aOrL5xXEFzI5TvcvnXR568GVcxK8YLfFkdxpsXGt5rAbeh0h/U5kILEAqv8P9PGT +ZpicKbrnAgMBAAECggEAd3yTQEQHR91/ASVfKPHMQns77eCbPVtekFusbugsMHYY +EPdHbqVMpvFvOMRc+f5Tzd15ziq6qBdbCJm8lThLm4iU0z1QrpaiDZ8vgUvDYM5Y +CXoZDli+uZWUTp60/n94fmb0ipZIChScsI2PrzOJWTvobvD/uso8MJydWc8zafQm +uqYzygOfjFZvU4lSfgzpefhpquy0JUy5TiKRmGUnwLb3TtcsVavjsn4QmNwLYgOF +2OE+R12ex3pAKTiRE6FcnE1xFIo1GKhBa2Otgw3MDO6Gg+kn8Q4alKz6C6RRlgaH +R7sYzEfJhsk/GGFTYOzXKQz2lSaStKt9wKCor04RcQKBgQDzPOu5jCTfayUo7xY2 +jHtiogHyKLLObt9l3qbwgXnaD6rnxYNvCrA0OMvT+iZXsFZKJkYzJr8ZOxOpPROk +10WdOaefiwUyL5dypueSwlIDwVm+hI4Bs82MajHtzOozh+73wA+aw5rPs84Uix9w +VbbwaVR6qP/BV09yJYS5kQ7fmwKBgQDe2xjywX2d2MC+qzRr+LfU+1+gq0jjhBCX +WHqRN6IECB0xTnXUf9WL/VCoI1/55BhdbbEja+4btYgcXSPmlXBIRKQ4VtFfVmYB +kPXeD8oZ7LyuNdCsbKNe+x1IHXDe6Wfs3L9ulCfXxeIE84wy3fd66mQahyXV9iD9 +CkuifMqUpQKBgQCiydHlY1LGJ/o9tA2Ewm5Na6mrvOs2V2Ox1NqbObwoYbX62eiF +53xX5u8bVl5U75JAm+79it/4bd5RtKux9dUETbLOhwcaOFm+hM+VG/IxyzRZ2nMD +1qcpY2U5BpxzknUvYF3RMTop6edxPk7zKpp9ubCtSu+oINvtxAhY/SkcIwKBgGP1 +upcImyO2GZ5shLL5eNubdSVILwV+M0LveOqyHYXZbd6z5r5OKKcGFKuWUnJwEU22 +6gGNY9wh7M9sJ7JBzX9c6pwqtPcidda2AtJ8GpbOTUOG9/afNBhiYpv6OKqD3w2r +ZmJfKg/qvpqh83zNezgy8nvDqwDxyZI2j/5uIx/RAoGBAMWRmxtv6H2cKhibI/aI +MTJM4QRjyPNxQqvAQsv+oHUbid06VK3JE+9iQyithjcfNOwnCaoO7I7qAj9QEfJS +MZQc/W/4DHJebo2kd11yoXPVTXXOuEwLSKCejBXABBY0MPNuPUmiXeU0O3Tyi37J +TUKzrgcd7NvlA41Y4xKcOqEA +-----END PRIVATE KEY----- \ No newline at end of file diff --git a/vendor/lcobucci/jwt/test/functional/rsa/public.key b/vendor/lcobucci/jwt/test/functional/rsa/public.key new file mode 100755 index 0000000..9992179 --- /dev/null +++ b/vendor/lcobucci/jwt/test/functional/rsa/public.key @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA078BPOzLYERGC0y+Gh4U +KN2c6IJscbzFLCpz88sUbNWK1zkjqcDdJ6bF2qwSilSFDDS3xTg6f750J9madOjf +FxufVgDisLwuDH8Sw0JAPiV4IMx5ZG1aEzfnVJHWCBakirgDxsIlk6EStksRIYo9 +6xNhTjfI0Gbw8WZIj/WuL8STtzkz0MCq3nVxYjm7Fw/3N0bSxYSnLYwshziKz9G0 +BLHnv5uyTbRuK8ugT7rDesG/ryaOYngWD2t3NfWpDauqv52FoaZYZJCUrmjqy+cV +xBcyOU73L510eevBlXMSvGC3xZHcabFxreawG3odIf1OZCCxAKr/D/Txk2aYnCm6 +5wIDAQAB +-----END PUBLIC KEY----- \ No newline at end of file diff --git a/vendor/lcobucci/jwt/test/unit/BuilderTest.php b/vendor/lcobucci/jwt/test/unit/BuilderTest.php new file mode 100755 index 0000000..30c43b6 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/BuilderTest.php @@ -0,0 +1,633 @@ + + * @since 0.1.0 + */ +class BuilderTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var Encoder|\PHPUnit_Framework_MockObject_MockObject + */ + protected $encoder; + + /** + * @var ClaimFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $claimFactory; + + /** + * @var Claim|\PHPUnit_Framework_MockObject_MockObject + */ + protected $defaultClaim; + + /** + * {@inheritdoc} + */ + protected function setUp() + { + $this->encoder = $this->createMock(Encoder::class); + $this->claimFactory = $this->createMock(ClaimFactory::class); + $this->defaultClaim = $this->createMock(Claim::class); + + $this->claimFactory->expects($this->any()) + ->method('create') + ->willReturn($this->defaultClaim); + } + + /** + * @return Builder + */ + private function createBuilder() + { + return new Builder($this->encoder, $this->claimFactory); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Builder::__construct + */ + public function constructMustInitializeTheAttributes() + { + $builder = $this->createBuilder(); + + $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); + $this->assertAttributeEquals([], 'claims', $builder); + $this->assertAttributeSame($this->encoder, 'encoder', $builder); + $this->assertAttributeSame($this->claimFactory, 'claimFactory', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::permittedFor + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function permittedForMustChangeTheAudClaim() + { + $builder = $this->createBuilder(); + $builder->permittedFor('test'); + + $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); + $this->assertAttributeEquals(['aud' => $this->defaultClaim], 'claims', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::permittedFor + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function permittedForCanReplicateItemOnHeader() + { + $builder = $this->createBuilder(); + $builder->permittedFor('test', true); + + $this->assertAttributeEquals(['aud' => $this->defaultClaim], 'claims', $builder); + + $this->assertAttributeEquals( + ['alg' => 'none', 'typ' => 'JWT', 'aud' => $this->defaultClaim], + 'headers', + $builder + ); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::permittedFor + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function permittedForMustKeepAFluentInterface() + { + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->permittedFor('test')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::expiresAt + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function expiresAtMustChangeTheExpClaim() + { + $builder = $this->createBuilder(); + $builder->expiresAt('2'); + + $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); + $this->assertAttributeEquals(['exp' => $this->defaultClaim], 'claims', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::expiresAt + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function expiresAtCanReplicateItemOnHeader() + { + $builder = $this->createBuilder(); + $builder->expiresAt('2', true); + + $this->assertAttributeEquals(['exp' => $this->defaultClaim], 'claims', $builder); + + $this->assertAttributeEquals( + ['alg' => 'none', 'typ' => 'JWT', 'exp' => $this->defaultClaim], + 'headers', + $builder + ); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::expiresAt + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function expiresAtMustKeepAFluentInterface() + { + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->expiresAt('2')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::identifiedBy + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function identifiedByMustChangeTheJtiClaim() + { + $builder = $this->createBuilder(); + $builder->identifiedBy('2'); + + $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); + $this->assertAttributeEquals(['jti' => $this->defaultClaim], 'claims', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::identifiedBy + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function identifiedByCanReplicateItemOnHeader() + { + $builder = $this->createBuilder(); + $builder->identifiedBy('2', true); + + $this->assertAttributeEquals(['jti' => $this->defaultClaim], 'claims', $builder); + + $this->assertAttributeEquals( + ['alg' => 'none', 'typ' => 'JWT', 'jti' => $this->defaultClaim], + 'headers', + $builder + ); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::identifiedBy + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function identifiedByMustKeepAFluentInterface() + { + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->identifiedBy('2')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::issuedAt + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function issuedAtMustChangeTheIatClaim() + { + $builder = $this->createBuilder(); + $builder->issuedAt('2'); + + $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); + $this->assertAttributeEquals(['iat' => $this->defaultClaim], 'claims', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::issuedAt + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function issuedAtCanReplicateItemOnHeader() + { + $builder = $this->createBuilder(); + $builder->issuedAt('2', true); + + $this->assertAttributeEquals(['iat' => $this->defaultClaim], 'claims', $builder); + + $this->assertAttributeEquals( + ['alg' => 'none', 'typ' => 'JWT', 'iat' => $this->defaultClaim], + 'headers', + $builder + ); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::issuedAt + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function issuedAtMustKeepAFluentInterface() + { + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->issuedAt('2')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::issuedBy + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function issuedByMustChangeTheIssClaim() + { + $builder = $this->createBuilder(); + $builder->issuedBy('2'); + + $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); + $this->assertAttributeEquals(['iss' => $this->defaultClaim], 'claims', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::issuedBy + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function issuedByCanReplicateItemOnHeader() + { + $builder = $this->createBuilder(); + $builder->issuedBy('2', true); + + $this->assertAttributeEquals(['iss' => $this->defaultClaim], 'claims', $builder); + + $this->assertAttributeEquals( + ['alg' => 'none', 'typ' => 'JWT', 'iss' => $this->defaultClaim], + 'headers', + $builder + ); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::issuedBy + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function issuedByMustKeepAFluentInterface() + { + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->issuedBy('2')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::canOnlyBeUsedAfter + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function canOnlyBeUsedAfterMustChangeTheNbfClaim() + { + $builder = $this->createBuilder(); + $builder->canOnlyBeUsedAfter('2'); + + $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); + $this->assertAttributeEquals(['nbf' => $this->defaultClaim], 'claims', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::canOnlyBeUsedAfter + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function canOnlyBeUsedAfterCanReplicateItemOnHeader() + { + $builder = $this->createBuilder(); + $builder->canOnlyBeUsedAfter('2', true); + + $this->assertAttributeEquals(['nbf' => $this->defaultClaim], 'claims', $builder); + + $this->assertAttributeEquals( + ['alg' => 'none', 'typ' => 'JWT', 'nbf' => $this->defaultClaim], + 'headers', + $builder + ); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::canOnlyBeUsedAfter + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function canOnlyBeUsedAfterMustKeepAFluentInterface() + { + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->canOnlyBeUsedAfter('2')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::relatedTo + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function relatedToMustChangeTheSubClaim() + { + $builder = $this->createBuilder(); + $builder->relatedTo('2'); + + $this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'headers', $builder); + $this->assertAttributeEquals(['sub' => $this->defaultClaim], 'claims', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::relatedTo + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function relatedToCanReplicateItemOnHeader() + { + $builder = $this->createBuilder(); + $builder->relatedTo('2', true); + + $this->assertAttributeEquals(['sub' => $this->defaultClaim], 'claims', $builder); + + $this->assertAttributeEquals( + ['alg' => 'none', 'typ' => 'JWT', 'sub' => $this->defaultClaim], + 'headers', + $builder + ); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * + * @covers Lcobucci\JWT\Builder::relatedTo + * @covers Lcobucci\JWT\Builder::setRegisteredClaim + */ + public function relatedToMustKeepAFluentInterface() + { + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->relatedTo('2')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * + * @covers Lcobucci\JWT\Builder::withClaim + */ + public function withClaimMustConfigureTheGivenClaim() + { + $builder = $this->createBuilder(); + $builder->withClaim('userId', 2); + + $this->assertAttributeEquals(['userId' => $this->defaultClaim], 'claims', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * + * @covers Lcobucci\JWT\Builder::withClaim + */ + public function withClaimMustKeepAFluentInterface() + { + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->withClaim('userId', 2)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * + * @covers Lcobucci\JWT\Builder::withHeader + */ + public function withHeaderMustConfigureTheGivenClaim() + { + $builder = $this->createBuilder(); + $builder->withHeader('userId', 2); + + $this->assertAttributeEquals( + ['alg' => 'none', 'typ' => 'JWT', 'userId' => $this->defaultClaim], + 'headers', + $builder + ); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * + * @covers Lcobucci\JWT\Builder::withHeader + */ + public function withHeaderMustKeepAFluentInterface() + { + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->withHeader('userId', 2)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::getToken + * @uses Lcobucci\JWT\Token + * + * @covers Lcobucci\JWT\Builder::sign + */ + public function signMustConfigureSignerAndKey() + { + $signer = $this->createMock(Signer::class); + + $builder = $this->createBuilder(); + $builder->sign($signer, 'test'); + + $this->assertAttributeSame($signer, 'signer', $builder); + $this->assertAttributeEquals(new Key('test'), 'key', $builder); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::getToken + * @uses Lcobucci\JWT\Token + * + * @covers Lcobucci\JWT\Builder::sign + */ + public function signMustKeepAFluentInterface() + { + $signer = $this->createMock(Signer::class); + $builder = $this->createBuilder(); + + $this->assertSame($builder, $builder->sign($signer, 'test')); + + return $builder; + } + + /** + * @test + * + * @depends signMustKeepAFluentInterface + * + * @covers Lcobucci\JWT\Builder::unsign + */ + public function unsignMustRemoveTheSignerAndKey(Builder $builder) + { + $builder->unsign(); + + $this->assertAttributeSame(null, 'signer', $builder); + $this->assertAttributeSame(null, 'key', $builder); + } + + /** + * @test + * + * @depends signMustKeepAFluentInterface + * + * @covers Lcobucci\JWT\Builder::unsign + */ + public function unsignMustKeepAFluentInterface(Builder $builder) + { + $this->assertSame($builder, $builder->unsign()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Builder::__construct + * @uses Lcobucci\JWT\Builder::withClaim + * @uses Lcobucci\JWT\Token + * + * @covers Lcobucci\JWT\Builder::getToken + */ + public function getTokenMustReturnANewTokenWithCurrentConfiguration() + { + $signer = $this->createMock(Signer::class); + $signature = $this->createMock(Signature::class); + + $signer->method('sign')->willReturn($signature); + + $this->encoder->expects($this->exactly(2)) + ->method('jsonEncode') + ->withConsecutive([['typ'=> 'JWT', 'alg' => 'none']], [['test' => $this->defaultClaim]]) + ->willReturnOnConsecutiveCalls('1', '2'); + + $this->encoder->expects($this->exactly(3)) + ->method('base64UrlEncode') + ->withConsecutive(['1'], ['2'], [$signature]) + ->willReturnOnConsecutiveCalls('1', '2', '3'); + + $builder = $this->createBuilder()->withClaim('test', 123); + $token = $builder->getToken($signer, new Key('testing')); + + $this->assertAttributeEquals(['1', '2', '3'], 'payload', $token); + $this->assertAttributeEquals($token->getHeaders(), 'headers', $builder); + $this->assertAttributeEquals($token->getClaims(), 'claims', $builder); + $this->assertAttributeSame($signature, 'signature', $token); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Claim/BasicTest.php b/vendor/lcobucci/jwt/test/unit/Claim/BasicTest.php new file mode 100755 index 0000000..3a0d928 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Claim/BasicTest.php @@ -0,0 +1,84 @@ + + * @since 2.0.0 + */ +class BasicTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Claim\Basic::__construct + */ + public function constructorShouldConfigureTheAttributes() + { + $claim = new Basic('test', 1); + + $this->assertAttributeEquals('test', 'name', $claim); + $this->assertAttributeEquals(1, 'value', $claim); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Basic::getName + */ + public function getNameShouldReturnTheClaimName() + { + $claim = new Basic('test', 1); + + $this->assertEquals('test', $claim->getName()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Basic::getValue + */ + public function getValueShouldReturnTheClaimValue() + { + $claim = new Basic('test', 1); + + $this->assertEquals(1, $claim->getValue()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Basic::jsonSerialize + */ + public function jsonSerializeShouldReturnTheClaimValue() + { + $claim = new Basic('test', 1); + + $this->assertEquals(1, $claim->jsonSerialize()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Basic::__toString + */ + public function toStringShouldReturnTheClaimValue() + { + $claim = new Basic('test', 1); + + $this->assertEquals('1', (string) $claim); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Claim/EqualsToTest.php b/vendor/lcobucci/jwt/test/unit/Claim/EqualsToTest.php new file mode 100755 index 0000000..aef76a9 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Claim/EqualsToTest.php @@ -0,0 +1,83 @@ + + * @since 2.0.0 + */ +class EqualsToTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\EqualsTo::validate + */ + public function validateShouldReturnTrueWhenValidationDontHaveTheClaim() + { + $claim = new EqualsTo('iss', 'test'); + + $this->assertTrue($claim->validate(new ValidationData())); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\Claim\Basic::getValue + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setIssuer + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\EqualsTo::validate + */ + public function validateShouldReturnTrueWhenValueIsEqualsToValidationData() + { + $claim = new EqualsTo('iss', 'test'); + + $data = new ValidationData(); + $data->setIssuer('test'); + + $this->assertTrue($claim->validate($data)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\Claim\Basic::getValue + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setIssuer + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\EqualsTo::validate + */ + public function validateShouldReturnFalseWhenValueIsNotEqualsToValidationData() + { + $claim = new EqualsTo('iss', 'test'); + + $data = new ValidationData(); + $data->setIssuer('test1'); + + $this->assertFalse($claim->validate($data)); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Claim/FactoryTest.php b/vendor/lcobucci/jwt/test/unit/Claim/FactoryTest.php new file mode 100755 index 0000000..7569257 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Claim/FactoryTest.php @@ -0,0 +1,168 @@ + + * @since 2.0.0 + */ +class FactoryTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Claim\Factory::__construct + */ + public function constructMustConfigureTheCallbacks() + { + $callback = function () { + }; + $factory = new Factory(['test' => $callback]); + + $expected = [ + 'iat' => [$factory, 'createLesserOrEqualsTo'], + 'nbf' => [$factory, 'createLesserOrEqualsTo'], + 'exp' => [$factory, 'createGreaterOrEqualsTo'], + 'iss' => [$factory, 'createEqualsTo'], + 'aud' => [$factory, 'createEqualsTo'], + 'sub' => [$factory, 'createEqualsTo'], + 'jti' => [$factory, 'createEqualsTo'], + 'test' => $callback + ]; + + $this->assertAttributeEquals($expected, 'callbacks', $factory); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Factory::__construct + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Factory::create + * @covers Lcobucci\JWT\Claim\Factory::createLesserOrEqualsTo + */ + public function createShouldReturnALesserOrEqualsToClaimForIssuedAt() + { + $claim = new Factory(); + + $this->assertInstanceOf(LesserOrEqualsTo::class, $claim->create('iat', 1)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Factory::__construct + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Factory::create + * @covers Lcobucci\JWT\Claim\Factory::createLesserOrEqualsTo + */ + public function createShouldReturnALesserOrEqualsToClaimForNotBefore() + { + $claim = new Factory(); + + $this->assertInstanceOf(LesserOrEqualsTo::class, $claim->create('nbf', 1)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Factory::__construct + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Factory::create + * @covers Lcobucci\JWT\Claim\Factory::createGreaterOrEqualsTo + */ + public function createShouldReturnAGreaterOrEqualsToClaimForExpiration() + { + $claim = new Factory(); + + $this->assertInstanceOf(GreaterOrEqualsTo::class, $claim->create('exp', 1)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Factory::__construct + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Factory::create + * @covers Lcobucci\JWT\Claim\Factory::createEqualsTo + */ + public function createShouldReturnAnEqualsToClaimForId() + { + $claim = new Factory(); + + $this->assertInstanceOf(EqualsTo::class, $claim->create('jti', 1)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Factory::__construct + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Factory::create + * @covers Lcobucci\JWT\Claim\Factory::createEqualsTo + */ + public function createShouldReturnAnEqualsToClaimForIssuer() + { + $claim = new Factory(); + + $this->assertInstanceOf(EqualsTo::class, $claim->create('iss', 1)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Factory::__construct + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Factory::create + * @covers Lcobucci\JWT\Claim\Factory::createEqualsTo + */ + public function createShouldReturnAnEqualsToClaimForAudience() + { + $claim = new Factory(); + + $this->assertInstanceOf(EqualsTo::class, $claim->create('aud', 1)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Factory::__construct + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Factory::create + * @covers Lcobucci\JWT\Claim\Factory::createEqualsTo + */ + public function createShouldReturnAnEqualsToClaimForSubject() + { + $claim = new Factory(); + + $this->assertInstanceOf(EqualsTo::class, $claim->create('sub', 1)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Factory::__construct + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Claim\Factory::create + * @covers Lcobucci\JWT\Claim\Factory::createBasic + */ + public function createShouldReturnABasiclaimForOtherClaims() + { + $claim = new Factory(); + + $this->assertInstanceOf(Basic::class, $claim->create('test', 1)); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Claim/GreaterOrEqualsToTest.php b/vendor/lcobucci/jwt/test/unit/Claim/GreaterOrEqualsToTest.php new file mode 100755 index 0000000..38abc75 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Claim/GreaterOrEqualsToTest.php @@ -0,0 +1,107 @@ + + * @since 2.0.0 + */ +class GreaterOrEqualsToTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo::validate + */ + public function validateShouldReturnTrueWhenValidationDontHaveTheClaim() + { + $claim = new GreaterOrEqualsTo('iss', 10); + + $this->assertTrue($claim->validate(new ValidationData())); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\Claim\Basic::getValue + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setIssuer + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo::validate + */ + public function validateShouldReturnTrueWhenValueIsGreaterThanValidationData() + { + $claim = new GreaterOrEqualsTo('iss', 11); + + $data = new ValidationData(); + $data->setIssuer(10); + + $this->assertTrue($claim->validate($data)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\Claim\Basic::getValue + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setIssuer + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo::validate + */ + public function validateShouldReturnTrueWhenValueIsEqualsToValidationData() + { + $claim = new GreaterOrEqualsTo('iss', 10); + + $data = new ValidationData(); + $data->setIssuer(10); + + $this->assertTrue($claim->validate($data)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\Claim\Basic::getValue + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setIssuer + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\GreaterOrEqualsTo::validate + */ + public function validateShouldReturnFalseWhenValueIsLesserThanValidationData() + { + $claim = new GreaterOrEqualsTo('iss', 10); + + $data = new ValidationData(); + $data->setIssuer(11); + + $this->assertFalse($claim->validate($data)); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Claim/LesserOrEqualsToTest.php b/vendor/lcobucci/jwt/test/unit/Claim/LesserOrEqualsToTest.php new file mode 100755 index 0000000..edb32d9 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Claim/LesserOrEqualsToTest.php @@ -0,0 +1,107 @@ + + * @since 2.0.0 + */ +class LesserOrEqualsToTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\LesserOrEqualsTo::validate + */ + public function validateShouldReturnTrueWhenValidationDontHaveTheClaim() + { + $claim = new LesserOrEqualsTo('iss', 10); + + $this->assertTrue($claim->validate(new ValidationData())); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\Claim\Basic::getValue + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setIssuer + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\LesserOrEqualsTo::validate + */ + public function validateShouldReturnTrueWhenValueIsLesserThanValidationData() + { + $claim = new LesserOrEqualsTo('iss', 10); + + $data = new ValidationData(); + $data->setIssuer(11); + + $this->assertTrue($claim->validate($data)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\Claim\Basic::getValue + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setIssuer + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\LesserOrEqualsTo::validate + */ + public function validateShouldReturnTrueWhenValueIsEqualsToValidationData() + { + $claim = new LesserOrEqualsTo('iss', 10); + + $data = new ValidationData(); + $data->setIssuer(10); + + $this->assertTrue($claim->validate($data)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Claim\Basic::__construct + * @uses Lcobucci\JWT\Claim\Basic::getName + * @uses Lcobucci\JWT\Claim\Basic::getValue + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setIssuer + * @uses Lcobucci\JWT\ValidationData::has + * @uses Lcobucci\JWT\ValidationData::get + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Claim\LesserOrEqualsTo::validate + */ + public function validateShouldReturnFalseWhenValueIsGreaterThanValidationData() + { + $claim = new LesserOrEqualsTo('iss', 11); + + $data = new ValidationData(); + $data->setIssuer(10); + + $this->assertFalse($claim->validate($data)); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/ParserTest.php b/vendor/lcobucci/jwt/test/unit/ParserTest.php new file mode 100755 index 0000000..664a731 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/ParserTest.php @@ -0,0 +1,244 @@ + + * @since 0.1.0 + */ +class ParserTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var Decoder|\PHPUnit_Framework_MockObject_MockObject + */ + protected $decoder; + + /** + * @var ClaimFactory|\PHPUnit_Framework_MockObject_MockObject + */ + protected $claimFactory; + + /** + * @var Claim|\PHPUnit_Framework_MockObject_MockObject + */ + protected $defaultClaim; + + /** + * {@inheritdoc} + */ + protected function setUp() + { + $this->decoder = $this->createMock(Decoder::class); + $this->claimFactory = $this->createMock(ClaimFactory::class, [], [], '', false); + $this->defaultClaim = $this->createMock(Claim::class); + + $this->claimFactory->expects($this->any()) + ->method('create') + ->willReturn($this->defaultClaim); + } + + /** + * @return Parser + */ + private function createParser() + { + return new Parser($this->decoder, $this->claimFactory); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Parser::__construct + */ + public function constructMustConfigureTheAttributes() + { + $parser = $this->createParser(); + + $this->assertAttributeSame($this->decoder, 'decoder', $parser); + $this->assertAttributeSame($this->claimFactory, 'claimFactory', $parser); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Parser::__construct + * + * @covers Lcobucci\JWT\Parser::parse + * @covers Lcobucci\JWT\Parser::splitJwt + * + * @expectedException InvalidArgumentException + */ + public function parseMustRaiseExceptionWhenJWSIsNotAString() + { + $parser = $this->createParser(); + $parser->parse(['asdasd']); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Parser::__construct + * + * @covers Lcobucci\JWT\Parser::parse + * @covers Lcobucci\JWT\Parser::splitJwt + * + * @expectedException InvalidArgumentException + */ + public function parseMustRaiseExceptionWhenJWSDontHaveThreeParts() + { + $parser = $this->createParser(); + $parser->parse(''); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Parser::__construct + * + * @covers Lcobucci\JWT\Parser::parse + * @covers Lcobucci\JWT\Parser::splitJwt + * @covers Lcobucci\JWT\Parser::parseHeader + * + * @expectedException RuntimeException + */ + public function parseMustRaiseExceptionWhenHeaderCannotBeDecoded() + { + $this->decoder->expects($this->any()) + ->method('jsonDecode') + ->willThrowException(new RuntimeException()); + + $parser = $this->createParser(); + $parser->parse('asdfad.asdfasdf.'); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Parser::__construct + * + * @covers Lcobucci\JWT\Parser::parse + * @covers Lcobucci\JWT\Parser::splitJwt + * @covers Lcobucci\JWT\Parser::parseHeader + * + * @expectedException InvalidArgumentException + */ + public function parseMustRaiseExceptionWhenHeaderIsFromAnEncryptedToken() + { + $this->decoder->expects($this->any()) + ->method('jsonDecode') + ->willReturn(['enc' => 'AAA']); + + $parser = $this->createParser(); + $parser->parse('a.a.'); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Parser::__construct + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Parser::parse + * @covers Lcobucci\JWT\Parser::splitJwt + * @covers Lcobucci\JWT\Parser::parseHeader + * @covers Lcobucci\JWT\Parser::parseClaims + * @covers Lcobucci\JWT\Parser::parseSignature + * + */ + public function parseMustReturnANonSignedTokenWhenSignatureIsNotInformed() + { + $this->decoder->expects($this->at(1)) + ->method('jsonDecode') + ->willReturn(['typ' => 'JWT', 'alg' => 'none']); + + $this->decoder->expects($this->at(3)) + ->method('jsonDecode') + ->willReturn(['aud' => 'test']); + + $parser = $this->createParser(); + $token = $parser->parse('a.a.'); + + $this->assertAttributeEquals(['typ' => 'JWT', 'alg' => 'none'], 'headers', $token); + $this->assertAttributeEquals(['aud' => $this->defaultClaim], 'claims', $token); + $this->assertAttributeEquals(null, 'signature', $token); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Parser::__construct + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Parser::parse + * @covers Lcobucci\JWT\Parser::splitJwt + * @covers Lcobucci\JWT\Parser::parseHeader + * @covers Lcobucci\JWT\Parser::parseClaims + * @covers Lcobucci\JWT\Parser::parseSignature + */ + public function parseShouldReplicateClaimValueOnHeaderWhenNeeded() + { + $this->decoder->expects($this->at(1)) + ->method('jsonDecode') + ->willReturn(['typ' => 'JWT', 'alg' => 'none', 'aud' => 'test']); + + $this->decoder->expects($this->at(3)) + ->method('jsonDecode') + ->willReturn(['aud' => 'test']); + + $parser = $this->createParser(); + $token = $parser->parse('a.a.'); + + $this->assertAttributeEquals( + ['typ' => 'JWT', 'alg' => 'none', 'aud' => $this->defaultClaim], + 'headers', + $token + ); + + $this->assertAttributeEquals(['aud' => $this->defaultClaim], 'claims', $token); + $this->assertAttributeEquals(null, 'signature', $token); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Parser::__construct + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Signature::__construct + * + * @covers Lcobucci\JWT\Parser::parse + * @covers Lcobucci\JWT\Parser::splitJwt + * @covers Lcobucci\JWT\Parser::parseHeader + * @covers Lcobucci\JWT\Parser::parseClaims + * @covers Lcobucci\JWT\Parser::parseSignature + */ + public function parseMustReturnASignedTokenWhenSignatureIsInformed() + { + $this->decoder->expects($this->at(1)) + ->method('jsonDecode') + ->willReturn(['typ' => 'JWT', 'alg' => 'HS256']); + + $this->decoder->expects($this->at(3)) + ->method('jsonDecode') + ->willReturn(['aud' => 'test']); + + $this->decoder->expects($this->at(4)) + ->method('base64UrlDecode') + ->willReturn('aaa'); + + $parser = $this->createParser(); + $token = $parser->parse('a.a.a'); + + $this->assertAttributeEquals(['typ' => 'JWT', 'alg' => 'HS256'], 'headers', $token); + $this->assertAttributeEquals(['aud' => $this->defaultClaim], 'claims', $token); + $this->assertAttributeEquals(new Signature('aaa'), 'signature', $token); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Parsing/DecoderTest.php b/vendor/lcobucci/jwt/test/unit/Parsing/DecoderTest.php new file mode 100755 index 0000000..04b8d5d --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Parsing/DecoderTest.php @@ -0,0 +1,56 @@ + + * @since 0.1.0 + */ +class DecoderTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Parsing\Decoder::jsonDecode + */ + public function jsonDecodeMustReturnTheDecodedData() + { + $decoder = new Decoder(); + + $this->assertEquals( + (object) ['test' => 'test'], + $decoder->jsonDecode('{"test":"test"}') + ); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Parsing\Decoder::jsonDecode + * + * @expectedException \RuntimeException + */ + public function jsonDecodeMustRaiseExceptionWhenAnErrorHasOccured() + { + $decoder = new Decoder(); + $decoder->jsonDecode('{"test":\'test\'}'); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Parsing\Decoder::base64UrlDecode + */ + public function base64UrlDecodeMustReturnTheRightData() + { + $data = base64_decode('0MB2wKB+L3yvIdzeggmJ+5WOSLaRLTUPXbpzqUe0yuo='); + + $decoder = new Decoder(); + $this->assertEquals($data, $decoder->base64UrlDecode('0MB2wKB-L3yvIdzeggmJ-5WOSLaRLTUPXbpzqUe0yuo')); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Parsing/EncoderTest.php b/vendor/lcobucci/jwt/test/unit/Parsing/EncoderTest.php new file mode 100755 index 0000000..4aed318 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Parsing/EncoderTest.php @@ -0,0 +1,53 @@ + + * @since 0.1.0 + */ +class EncoderTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Parsing\Encoder::jsonEncode + */ + public function jsonEncodeMustReturnAJSONString() + { + $encoder = new Encoder(); + + $this->assertEquals('{"test":"test"}', $encoder->jsonEncode(['test' => 'test'])); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Parsing\Encoder::jsonEncode + * + * @expectedException \RuntimeException + */ + public function jsonEncodeMustRaiseExceptionWhenAnErrorHasOccured() + { + $encoder = new Encoder(); + $encoder->jsonEncode("\xB1\x31"); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Parsing\Encoder::base64UrlEncode + */ + public function base64UrlEncodeMustReturnAnUrlSafeBase64() + { + $data = base64_decode('0MB2wKB+L3yvIdzeggmJ+5WOSLaRLTUPXbpzqUe0yuo='); + + $encoder = new Encoder(); + $this->assertEquals('0MB2wKB-L3yvIdzeggmJ-5WOSLaRLTUPXbpzqUe0yuo', $encoder->base64UrlEncode($data)); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/SignatureTest.php b/vendor/lcobucci/jwt/test/unit/SignatureTest.php new file mode 100755 index 0000000..7a87e9d --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/SignatureTest.php @@ -0,0 +1,73 @@ + + * @since 0.1.0 + */ +class SignatureTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var Signer|\PHPUnit_Framework_MockObject_MockObject + */ + protected $signer; + + /** + * {@inheritdoc} + */ + protected function setUp() + { + $this->signer = $this->createMock(Signer::class); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signature::__construct + */ + public function constructorMustConfigureAttributes() + { + $signature = new Signature('test'); + + $this->assertAttributeEquals('test', 'hash', $signature); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signature::__construct + * + * @covers Lcobucci\JWT\Signature::__toString + */ + public function toStringMustReturnTheHash() + { + $signature = new Signature('test'); + + $this->assertEquals('test', (string) $signature); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signature::__construct + * @uses Lcobucci\JWT\Signature::__toString + * + * @covers Lcobucci\JWT\Signature::verify + */ + public function verifyMustReturnWhatSignerSays() + { + $this->signer->expects($this->any()) + ->method('verify') + ->willReturn(true); + + $signature = new Signature('test'); + + $this->assertTrue($signature->verify($this->signer, 'one', 'key')); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/BaseSignerTest.php b/vendor/lcobucci/jwt/test/unit/Signer/BaseSignerTest.php new file mode 100755 index 0000000..799c9d0 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/BaseSignerTest.php @@ -0,0 +1,128 @@ + + * @since 0.1.0 + */ +class BaseSignerTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var BaseSigner|\PHPUnit_Framework_MockObject_MockObject + */ + protected $signer; + + /** + * {@inheritdoc} + */ + protected function setUp() + { + $this->signer = $this->getMockForAbstractClass(BaseSigner::class); + + $this->signer->method('getAlgorithmId') + ->willReturn('TEST123'); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\BaseSigner::modifyHeader + */ + public function modifyHeaderShouldChangeAlgorithm() + { + $headers = ['typ' => 'JWT']; + + $this->signer->modifyHeader($headers); + + $this->assertEquals($headers['typ'], 'JWT'); + $this->assertEquals($headers['alg'], 'TEST123'); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signature::__construct + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\BaseSigner::sign + * @covers Lcobucci\JWT\Signer\BaseSigner::getKey + */ + public function signMustReturnANewSignature() + { + $key = new Key('123'); + + $this->signer->expects($this->once()) + ->method('createHash') + ->with('test', $key) + ->willReturn('test'); + + $this->assertEquals(new Signature('test'), $this->signer->sign('test', $key)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signature::__construct + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\BaseSigner::sign + * @covers Lcobucci\JWT\Signer\BaseSigner::getKey + */ + public function signShouldConvertKeyWhenItsNotAnObject() + { + $this->signer->expects($this->once()) + ->method('createHash') + ->with('test', new Key('123')) + ->willReturn('test'); + + $this->assertEquals(new Signature('test'), $this->signer->sign('test', '123')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signature::__construct + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\BaseSigner::verify + * @covers Lcobucci\JWT\Signer\BaseSigner::getKey + */ + public function verifyShouldDelegateTheCallToAbstractMethod() + { + $key = new Key('123'); + + $this->signer->expects($this->once()) + ->method('doVerify') + ->with('test', 'test', $key) + ->willReturn(true); + + $this->assertTrue($this->signer->verify('test', 'test', $key)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signature::__construct + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\BaseSigner::verify + * @covers Lcobucci\JWT\Signer\BaseSigner::getKey + */ + public function verifyShouldConvertKeyWhenItsNotAnObject() + { + $this->signer->expects($this->once()) + ->method('doVerify') + ->with('test', 'test', new Key('123')) + ->willReturn(true); + + $this->assertTrue($this->signer->verify('test', 'test', '123')); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/MultibyteStringConverterTest.php b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/MultibyteStringConverterTest.php new file mode 100755 index 0000000..f18e8bc --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/MultibyteStringConverterTest.php @@ -0,0 +1,127 @@ +toAsn1($message, strlen($r)))); + } + + /** + * @test + * + * @covers ::toAsn1 + * @covers ::octetLength + */ + public function toAsn1ShouldRaiseExceptionWhenPointsDoNotHaveCorrectLength() + { + $converter = new MultibyteStringConverter(); + + self::expectException(InvalidArgumentException::class); + $converter->toAsn1('a very wrong string', 64); + } + + /** + * @test + * @dataProvider pointsConversionData + * + * @covers ::fromAsn1 + * @covers ::readAsn1Content + * @covers ::readAsn1Integer + * @covers ::retrievePositiveInteger + */ + public function fromAsn1ShouldReturnTheConcatenatedPoints($r, $s, $asn1) + { + $converter = new MultibyteStringConverter(); + $message = hex2bin($asn1); + + self::assertSame($r . $s, bin2hex($converter->fromAsn1($message, strlen($r)))); + } + + /** + * @return string[][] + */ + public function pointsConversionData() + { + return [ + [ + 'efd48b2aacb6a8fd1140dd9cd45e81d69d2c877b56aaf991c34d0ea84eaf3716', + 'f7cb1c942d657c41d436c7a1b6e29f65f3e900dbb9aff4064dc4ab2f843acda8', + '3046022100efd48b2aacb6a8fd1140dd9cd45e81d69d2c877b56aaf991c34d0ea84eaf3716022100f7cb1c942d657c41d436c7' + . 'a1b6e29f65f3e900dbb9aff4064dc4ab2f843acda8', + ], + [ + '94edbb92a5ecb8aad4736e56c691916b3f88140666ce9fa73d64c4ea95ad133c81a648152e44acf96e36dd1e80fabe46', + '99ef4aeb15f178cea1fe40db2603138f130e740a19624526203b6351d0a3a94fa329c145786e679e7b82c71a38628ac8', + '306602310094edbb92a5ecb8aad4736e56c691916b3f88140666ce9fa73d64c4ea95ad133c81a648152e44acf96e36dd1e80fa' + . 'be4602310099ef4aeb15f178cea1fe40db2603138f130e740a19624526203b6351d0a3a94fa329c145786e679e7b82c71a38' + . '628ac8', + ], + [ + '00c328fafcbd79dd77850370c46325d987cb525569fb63c5d3bc53950e6d4c5f174e25a1ee9017b5d450606add152b534931d7' + . 'd4e8455cc91f9b15bf05ec36e377fa', + '00617cce7cf5064806c467f678d3b4080d6f1cc50af26ca209417308281b68af282623eaa63e5b5c0723d8b8c37ff0777b1a20' + . 'f8ccb1dccc43997f1ee0e44da4a67a', + '308187024200c328fafcbd79dd77850370c46325d987cb525569fb63c5d3bc53950e6d4c5f174e25a1ee9017b5d450606add15' + . '2b534931d7d4e8455cc91f9b15bf05ec36e377fa0241617cce7cf5064806c467f678d3b4080d6f1cc50af26ca20941730828' + . '1b68af282623eaa63e5b5c0723d8b8c37ff0777b1a20f8ccb1dccc43997f1ee0e44da4a67a', + ], + ]; + } + + /** + * @test + * @dataProvider invalidAsn1Structures + * + * @covers ::fromAsn1 + * @covers ::readAsn1Content + * @covers ::readAsn1Integer + * @covers ::retrievePositiveInteger + */ + public function fromAsn1ShouldRaiseExceptionOnInvalidMessage($message) + { + $converter = new MultibyteStringConverter(); + $message = hex2bin($message); + + $this->expectException(InvalidArgumentException::class); + $converter->fromAsn1($message, 64); + } + + /** + * @return string[][] + */ + public function invalidAsn1Structures() + { + return [ + 'Not a sequence' => [''], + 'Sequence without length' => ['30'], + 'Only one string element' => ['3006030204f0'], + 'Only one integer element' => ['3004020101'], + 'Integer+string elements' => ['300a020101030204f0'], + ]; + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha256Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha256Test.php new file mode 100755 index 0000000..3c6f663 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha256Test.php @@ -0,0 +1,60 @@ + + * @since 2.1.0 + */ +class Sha256Test extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Ecdsa + * @uses Lcobucci\JWT\Signer\OpenSSL + * + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256::getAlgorithmId + */ + public function getAlgorithmIdMustBeCorrect() + { + $signer = new Sha256(); + + $this->assertEquals('ES256', $signer->getAlgorithmId()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Ecdsa + * @uses Lcobucci\JWT\Signer\OpenSSL + * + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256::getAlgorithm + */ + public function getAlgorithmMustBeCorrect() + { + $signer = new Sha256(); + + $this->assertEquals('sha256', $signer->getAlgorithm()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Ecdsa + * @uses Lcobucci\JWT\Signer\OpenSSL + * + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha256::getKeyLength + */ + public function getKeyLengthMustBeCorrect() + { + $signer = new Sha256(); + + $this->assertEquals(64, $signer->getKeyLength()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha384Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha384Test.php new file mode 100755 index 0000000..335d051 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha384Test.php @@ -0,0 +1,60 @@ + + * @since 2.1.0 + */ +class Sha384Test extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Ecdsa + * @uses Lcobucci\JWT\Signer\OpenSSL + * + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha384::getAlgorithmId + */ + public function getAlgorithmIdMustBeCorrect() + { + $signer = new Sha384(); + + $this->assertEquals('ES384', $signer->getAlgorithmId()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Ecdsa + * @uses Lcobucci\JWT\Signer\OpenSSL + * + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha384::getAlgorithm + */ + public function getAlgorithmMustBeCorrect() + { + $signer = new Sha384(); + + $this->assertEquals('sha384', $signer->getAlgorithm()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Ecdsa + * @uses Lcobucci\JWT\Signer\OpenSSL + * + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha384::getKeyLength + */ + public function getKeyLengthMustBeCorrect() + { + $signer = new Sha384(); + + $this->assertEquals(96, $signer->getKeyLength()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha512Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha512Test.php new file mode 100755 index 0000000..0e1ab79 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Ecdsa/Sha512Test.php @@ -0,0 +1,60 @@ + + * @since 2.1.0 + */ +class Sha512Test extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Ecdsa + * @uses Lcobucci\JWT\Signer\OpenSSL + * + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512::getAlgorithmId + */ + public function getAlgorithmIdMustBeCorrect() + { + $signer = new Sha512(); + + $this->assertEquals('ES512', $signer->getAlgorithmId()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Ecdsa + * @uses Lcobucci\JWT\Signer\OpenSSL + * + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512::getAlgorithm + */ + public function getAlgorithmMustBeCorrect() + { + $signer = new Sha512(); + + $this->assertEquals('sha512', $signer->getAlgorithm()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Ecdsa + * @uses Lcobucci\JWT\Signer\OpenSSL + * + * @covers Lcobucci\JWT\Signer\Ecdsa\Sha512::getKeyLength + */ + public function getKeyLengthMustBeCorrect() + { + $signer = new Sha512(); + + $this->assertEquals(132, $signer->getKeyLength()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/EcdsaTest.php b/vendor/lcobucci/jwt/test/unit/Signer/EcdsaTest.php new file mode 100755 index 0000000..95f8408 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/EcdsaTest.php @@ -0,0 +1,117 @@ +pointsManipulator = new MultibyteStringConverter(); + } + + private function getSigner() + { + $signer = $this->getMockForAbstractClass(Ecdsa::class, [$this->pointsManipulator]); + + $signer->method('getAlgorithm') + ->willReturn(OPENSSL_ALGO_SHA256); + + $signer->method('getAlgorithmId') + ->willReturn('ES256'); + + $signer->method('getKeyLength') + ->willReturn(64); + + return $signer; + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Ecdsa::createHash + * @covers \Lcobucci\JWT\Signer\Ecdsa::getKeyType + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Ecdsa::__construct + * @uses \Lcobucci\JWT\Signer\Key + * @uses \Lcobucci\JWT\Signature + */ + public function createHashShouldReturnTheAHashBasedOnTheOpenSslSignature() + { + $payload = 'testing'; + + $signer = $this->getSigner(); + $signature = $signer->sign($payload, self::$ecdsaKeys['private']); + + $publicKey = openssl_pkey_get_public(self::$ecdsaKeys['public1']->getContent()); + + self::assertInternalType('resource', $publicKey); + self::assertSame( + 1, + openssl_verify( + $payload, + $this->pointsManipulator->toAsn1($signature, $signer->getKeyLength()), + $publicKey, + OPENSSL_ALGO_SHA256 + ) + ); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Ecdsa::doVerify + * @covers \Lcobucci\JWT\Signer\Ecdsa::getKeyType + * @covers \Lcobucci\JWT\Signer\Ecdsa\MultibyteStringConverter + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Ecdsa::__construct + * @uses \Lcobucci\JWT\Signer\Key + */ + public function doVerifyShouldDelegateToEcdsaSignerUsingPublicKey() + { + $payload = 'testing'; + $privateKey = openssl_pkey_get_private(self::$ecdsaKeys['private']->getContent()); + + self::assertInternalType('resource', $privateKey); + + $signature = ''; + openssl_sign($payload, $signature, $privateKey, OPENSSL_ALGO_SHA256); + + $signer = $this->getSigner(); + + self::assertTrue( + $signer->verify( + $this->pointsManipulator->fromAsn1($signature, $signer->getKeyLength()), + $payload, + self::$ecdsaKeys['public1'] + ) + ); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha256Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha256Test.php new file mode 100755 index 0000000..80abad0 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha256Test.php @@ -0,0 +1,39 @@ + + * @since 0.1.0 + */ +class Sha256Test extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Hmac\Sha256::getAlgorithmId + */ + public function getAlgorithmIdMustBeCorrect() + { + $signer = new Sha256(); + + $this->assertEquals('HS256', $signer->getAlgorithmId()); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Hmac\Sha256::getAlgorithm + */ + public function getAlgorithmMustBeCorrect() + { + $signer = new Sha256(); + + $this->assertEquals('sha256', $signer->getAlgorithm()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha384Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha384Test.php new file mode 100755 index 0000000..804d0a0 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha384Test.php @@ -0,0 +1,39 @@ + + * @since 0.1.0 + */ +class Sha384Test extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Hmac\Sha384::getAlgorithmId + */ + public function getAlgorithmIdMustBeCorrect() + { + $signer = new Sha384(); + + $this->assertEquals('HS384', $signer->getAlgorithmId()); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Hmac\Sha384::getAlgorithm + */ + public function getAlgorithmMustBeCorrect() + { + $signer = new Sha384(); + + $this->assertEquals('sha384', $signer->getAlgorithm()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha512Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha512Test.php new file mode 100755 index 0000000..603c118 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Hmac/Sha512Test.php @@ -0,0 +1,39 @@ + + * @since 0.1.0 + */ +class Sha512Test extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Hmac\Sha512::getAlgorithmId + */ + public function getAlgorithmIdMustBeCorrect() + { + $signer = new Sha512(); + + $this->assertEquals('HS512', $signer->getAlgorithmId()); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Hmac\Sha512::getAlgorithm + */ + public function getAlgorithmMustBeCorrect() + { + $signer = new Sha512(); + + $this->assertEquals('sha512', $signer->getAlgorithm()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/HmacTest.php b/vendor/lcobucci/jwt/test/unit/Signer/HmacTest.php new file mode 100755 index 0000000..cb44fc9 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/HmacTest.php @@ -0,0 +1,134 @@ + + * @since 0.1.0 + */ +class HmacTest extends \PHPUnit\Framework\TestCase +{ + /** + * @var Hmac|\PHPUnit_Framework_MockObject_MockObject + */ + protected $signer; + + /** + * {@inheritdoc} + */ + protected function setUp() + { + $this->signer = $this->getMockForAbstractClass(Hmac::class); + + $this->signer->expects($this->any()) + ->method('getAlgorithmId') + ->willReturn('TEST123'); + + $this->signer->expects($this->any()) + ->method('getAlgorithm') + ->willReturn('sha256'); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\Hmac::createHash + */ + public function createHashMustReturnAHashAccordingWithTheAlgorithm() + { + $hash = hash_hmac('sha256', 'test', '123', true); + + $this->assertEquals($hash, $this->signer->createHash('test', new Key('123'))); + + return $hash; + } + + /** + * @test + * + * @depends createHashMustReturnAHashAccordingWithTheAlgorithm + * + * @uses Lcobucci\JWT\Signer\Hmac::createHash + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\Hmac::doVerify + */ + public function doVerifyShouldReturnTrueWhenExpectedHashWasCreatedWithSameInformation($expected) + { + $this->assertTrue($this->signer->doVerify($expected, 'test', new Key('123'))); + } + + /** + * @test + * + * @depends createHashMustReturnAHashAccordingWithTheAlgorithm + * + * @uses Lcobucci\JWT\Signer\Hmac::createHash + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\Hmac::doVerify + */ + public function doVerifyShouldReturnFalseWhenExpectedHashWasNotCreatedWithSameInformation($expected) + { + $this->assertFalse($this->signer->doVerify($expected, 'test', new Key('1234'))); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\Hmac::doVerify + */ + public function doVerifyShouldReturnFalseWhenExpectedHashIsNotString() + { + $this->assertFalse($this->signer->doVerify(false, 'test', new Key('1234'))); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Hmac::hashEquals + */ + public function hashEqualsShouldReturnFalseWhenExpectedHashHasDifferentLengthThanGenerated() + { + $this->assertFalse($this->signer->hashEquals('123', '1234')); + } + + /** + * @test + * + * @depends createHashMustReturnAHashAccordingWithTheAlgorithm + * + * @uses Lcobucci\JWT\Signer\Hmac::createHash + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\Hmac::hashEquals + */ + public function hashEqualsShouldReturnFalseWhenExpectedHashIsDifferentThanGenerated($expected) + { + $this->assertFalse($this->signer->hashEquals($expected, $this->signer->createHash('test', new Key('1234')))); + } + + /** + * @test + * + * @depends createHashMustReturnAHashAccordingWithTheAlgorithm + * + * @uses Lcobucci\JWT\Signer\Hmac::createHash + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\Hmac::hashEquals + */ + public function hashEqualsShouldReturnTrueWhenExpectedHashIsEqualsThanGenerated($expected) + { + $this->assertTrue($this->signer->hashEquals($expected, $this->signer->createHash('test', new Key('123')))); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/KeyTest.php b/vendor/lcobucci/jwt/test/unit/Signer/KeyTest.php new file mode 100755 index 0000000..7fda4a3 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/KeyTest.php @@ -0,0 +1,119 @@ + + * @since 3.0.4 + */ +class KeyTest extends \PHPUnit\Framework\TestCase +{ + /** + * @before + */ + public function configureRootDir() + { + vfsStream::setup( + 'root', + null, + [ + 'test.pem' => 'testing', + 'emptyFolder' => [] + ] + ); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Key::__construct + * @covers Lcobucci\JWT\Signer\Key::setContent + */ + public function constructShouldConfigureContentAndPassphrase() + { + $key = new Key('testing', 'test'); + + $this->assertAttributeEquals('testing', 'content', $key); + $this->assertAttributeEquals('test', 'passphrase', $key); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Key::__construct + * @covers Lcobucci\JWT\Signer\Key::setContent + * @covers Lcobucci\JWT\Signer\Key::readFile + */ + public function constructShouldBeAbleToConfigureContentFromFile() + { + $key = new Key('file://' . vfsStream::url('root/test.pem')); + + $this->assertAttributeEquals('testing', 'content', $key); + $this->assertAttributeEquals(null, 'passphrase', $key); + } + + /** + * @test + * + * @expectedException \InvalidArgumentException + * + * @covers Lcobucci\JWT\Signer\Key::__construct + * @covers Lcobucci\JWT\Signer\Key::setContent + * @covers Lcobucci\JWT\Signer\Key::readFile + */ + public function constructShouldRaiseExceptionWhenFileDoesNotExists() + { + new Key('file://' . vfsStream::url('root/test2.pem')); + } + + /** + * @test + * + * @expectedException \InvalidArgumentException + * + * @covers Lcobucci\JWT\Signer\Key::__construct + * @covers Lcobucci\JWT\Signer\Key::setContent + * @covers Lcobucci\JWT\Signer\Key::readFile + */ + public function constructShouldRaiseExceptionWhenFileGetContentsFailed() + { + new Key('file://' . vfsStream::url('root/emptyFolder')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Key::__construct + * @uses Lcobucci\JWT\Signer\Key::setContent + * + * @covers Lcobucci\JWT\Signer\Key::getContent + */ + public function getContentShouldReturnConfiguredData() + { + $key = new Key('testing', 'test'); + + $this->assertEquals('testing', $key->getContent()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Key::__construct + * @uses Lcobucci\JWT\Signer\Key::setContent + * + * @covers Lcobucci\JWT\Signer\Key::getPassphrase + */ + public function getPassphraseShouldReturnConfiguredData() + { + $key = new Key('testing', 'test'); + + $this->assertEquals('test', $key->getPassphrase()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/KeychainTest.php b/vendor/lcobucci/jwt/test/unit/Signer/KeychainTest.php new file mode 100755 index 0000000..40ccfc5 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/KeychainTest.php @@ -0,0 +1,49 @@ + + * @since 2.1.0 + */ +class KeychainTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\Keychain::getPrivateKey + */ + public function getPrivateKeyShouldReturnAKey() + { + $keychain = new Keychain(); + $key = $keychain->getPrivateKey('testing', 'test'); + + $this->assertInstanceOf(Key::class, $key); + $this->assertAttributeEquals('testing', 'content', $key); + $this->assertAttributeEquals('test', 'passphrase', $key); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Signer\Key + * + * @covers Lcobucci\JWT\Signer\Keychain::getPublicKey + */ + public function getPublicKeyShouldReturnAValidResource() + { + $keychain = new Keychain(); + $key = $keychain->getPublicKey('testing'); + + $this->assertInstanceOf(Key::class, $key); + $this->assertAttributeEquals('testing', 'content', $key); + $this->assertAttributeEquals(null, 'passphrase', $key); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha256Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha256Test.php new file mode 100755 index 0000000..3c38988 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha256Test.php @@ -0,0 +1,39 @@ + + * @since 2.1.0 + */ +class Sha256Test extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Rsa\Sha256::getAlgorithmId + */ + public function getAlgorithmIdMustBeCorrect() + { + $signer = new Sha256(); + + $this->assertEquals('RS256', $signer->getAlgorithmId()); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Rsa\Sha256::getAlgorithm + */ + public function getAlgorithmMustBeCorrect() + { + $signer = new Sha256(); + + $this->assertEquals(OPENSSL_ALGO_SHA256, $signer->getAlgorithm()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha384Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha384Test.php new file mode 100755 index 0000000..292f7b5 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha384Test.php @@ -0,0 +1,39 @@ + + * @since 2.1.0 + */ +class Sha384Test extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Rsa\Sha384::getAlgorithmId + */ + public function getAlgorithmIdMustBeCorrect() + { + $signer = new Sha384(); + + $this->assertEquals('RS384', $signer->getAlgorithmId()); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Rsa\Sha384::getAlgorithm + */ + public function getAlgorithmMustBeCorrect() + { + $signer = new Sha384(); + + $this->assertEquals(OPENSSL_ALGO_SHA384, $signer->getAlgorithm()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha512Test.php b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha512Test.php new file mode 100755 index 0000000..3036e3e --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/Rsa/Sha512Test.php @@ -0,0 +1,39 @@ + + * @since 2.1.0 + */ +class Sha512Test extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Rsa\Sha512::getAlgorithmId + */ + public function getAlgorithmIdMustBeCorrect() + { + $signer = new Sha512(); + + $this->assertEquals('RS512', $signer->getAlgorithmId()); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Signer\Rsa\Sha512::getAlgorithm + */ + public function getAlgorithmMustBeCorrect() + { + $signer = new Sha512(); + + $this->assertEquals(OPENSSL_ALGO_SHA512, $signer->getAlgorithm()); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/Signer/RsaTest.php b/vendor/lcobucci/jwt/test/unit/Signer/RsaTest.php new file mode 100755 index 0000000..46c5f89 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/Signer/RsaTest.php @@ -0,0 +1,188 @@ +getSigner(); + $signature = $signer->sign($payload, self::$rsaKeys['private']); + + $publicKey = openssl_pkey_get_public(self::$rsaKeys['public']->getContent()); + self::assertInternalType('resource', $publicKey); + self::assertSame(1, openssl_verify($payload, $signature, $publicKey, OPENSSL_ALGO_SHA256)); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::createHash + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\Rsa::getKeyType + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function createHashShouldRaiseAnExceptionWhenKeyIsInvalid() + { + $key = <<getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('There was an error while creating the signature'); + + $signer->sign('testing', new Key($key)); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::createHash + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function createHashShouldRaiseAnExceptionWhenKeyIsNotParseable() + { + $signer = $this->getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('It was not possible to parse your key'); + + $signer->sign('testing', new Key('blablabla')); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::createHash + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\Rsa::getKeyType + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function createHashShouldRaiseAnExceptionWhenKeyTypeIsNotRsa() + { + $signer = $this->getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('This key is not compatible with this signer'); + + $signer->sign('testing', self::$ecdsaKeys['private']); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::doVerify + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\Rsa::getKeyType + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function doVerifyShouldReturnTrueWhenSignatureIsValid() + { + $payload = 'testing'; + $privateKey = openssl_pkey_get_private(self::$rsaKeys['private']->getContent()); + self::assertInternalType('resource', $privateKey); + + $signature = ''; + openssl_sign($payload, $signature, $privateKey, OPENSSL_ALGO_SHA256); + + $signer = $this->getSigner(); + + self::assertTrue($signer->verify($signature, $payload, self::$rsaKeys['public'])); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::doVerify + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function doVerifyShouldRaiseAnExceptionWhenKeyIsNotParseable() + { + $signer = $this->getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('It was not possible to parse your key'); + + $signer->verify('testing', 'testing', new Key('blablabla')); + } + + /** + * @test + * + * @covers \Lcobucci\JWT\Signer\Rsa::doVerify + * @covers \Lcobucci\JWT\Signer\Rsa::validateKey + * @covers \Lcobucci\JWT\Signer\OpenSSL + * @covers \Lcobucci\JWT\Signer\BaseSigner + * + * @uses \Lcobucci\JWT\Signer\Key + */ + public function doVerifyShouldRaiseAnExceptionWhenKeyTypeIsNotRsa() + { + $signer = $this->getSigner(); + + $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('It was not possible to parse your key'); + + $signer->verify('testing', 'testing', self::$ecdsaKeys['private']); + } + + private function getSigner() + { + $signer = $this->getMockForAbstractClass(Rsa::class); + + $signer->method('getAlgorithm') + ->willReturn(OPENSSL_ALGO_SHA256); + + $signer->method('getAlgorithmId') + ->willReturn('RS256'); + + return $signer; + } +} diff --git a/vendor/lcobucci/jwt/test/unit/TokenTest.php b/vendor/lcobucci/jwt/test/unit/TokenTest.php new file mode 100755 index 0000000..092d1b6 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/TokenTest.php @@ -0,0 +1,573 @@ + + * @since 0.1.0 + */ +class TokenTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\Token::__construct + */ + public function constructMustInitializeAnEmptyPlainTextTokenWhenNoArgumentsArePassed() + { + $token = new Token(); + + $this->assertAttributeEquals(['alg' => 'none'], 'headers', $token); + $this->assertAttributeEquals([], 'claims', $token); + $this->assertAttributeEquals(null, 'signature', $token); + $this->assertAttributeEquals(['', ''], 'payload', $token); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Token::hasHeader + */ + public function hasHeaderMustReturnTrueWhenItIsConfigured() + { + $token = new Token(['test' => 'testing']); + + $this->assertTrue($token->hasHeader('test')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Token::hasHeader + */ + public function hasHeaderMustReturnFalseWhenItIsNotConfigured() + { + $token = new Token(['test' => 'testing']); + + $this->assertFalse($token->hasHeader('testing')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::hasHeader + * + * @covers Lcobucci\JWT\Token::getHeader + * + * @expectedException \OutOfBoundsException + */ + public function getHeaderMustRaiseExceptionWhenHeaderIsNotConfigured() + { + $token = new Token(['test' => 'testing']); + + $token->getHeader('testing'); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::hasHeader + * + * @covers Lcobucci\JWT\Token::getHeader + */ + public function getHeaderMustReturnTheDefaultValueWhenIsNotConfigured() + { + $token = new Token(['test' => 'testing']); + + $this->assertEquals('blah', $token->getHeader('testing', 'blah')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::hasHeader + * + * @covers Lcobucci\JWT\Token::getHeader + * @covers Lcobucci\JWT\Token::getHeaderValue + */ + public function getHeaderMustReturnTheRequestedHeader() + { + $token = new Token(['test' => 'testing']); + + $this->assertEquals('testing', $token->getHeader('test')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::hasHeader + * @uses Lcobucci\JWT\Claim\Basic + * + * @covers Lcobucci\JWT\Token::getHeader + * @covers Lcobucci\JWT\Token::getHeaderValue + */ + public function getHeaderMustReturnValueWhenItIsAReplicatedClaim() + { + $token = new Token(['jti' => new EqualsTo('jti', 1)]); + + $this->assertEquals(1, $token->getHeader('jti')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Token::getHeaders + */ + public function getHeadersMustReturnTheConfiguredHeader() + { + $token = new Token(['test' => 'testing']); + + $this->assertEquals(['test' => 'testing'], $token->getHeaders()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Token::getClaims + */ + public function getClaimsMustReturnTheConfiguredClaims() + { + $token = new Token([], ['test' => 'testing']); + + $this->assertEquals(['test' => 'testing'], $token->getClaims()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Claim\Basic + * + * @covers Lcobucci\JWT\Token::hasClaim + */ + public function hasClaimMustReturnTrueWhenItIsConfigured() + { + $token = new Token([], ['test' => new Basic('test', 'testing')]); + + $this->assertTrue($token->hasClaim('test')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Claim\Basic + * + * @covers Lcobucci\JWT\Token::hasClaim + */ + public function hasClaimMustReturnFalseWhenItIsNotConfigured() + { + $token = new Token([], ['test' => new Basic('test', 'testing')]); + + $this->assertFalse($token->hasClaim('testing')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::hasClaim + * @uses Lcobucci\JWT\Claim\Basic + * + * @covers Lcobucci\JWT\Token::getClaim + */ + public function getClaimMustReturnTheDefaultValueWhenIsNotConfigured() + { + $token = new Token([], ['test' => new Basic('test', 'testing')]); + + $this->assertEquals('blah', $token->getClaim('testing', 'blah')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::hasClaim + * @uses Lcobucci\JWT\Claim\Basic + * + * @covers Lcobucci\JWT\Token::getClaim + * + * @expectedException \OutOfBoundsException + */ + public function getClaimShouldRaiseExceptionWhenClaimIsNotConfigured() + { + $token = new Token(); + $token->getClaim('testing'); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::hasClaim + * @uses Lcobucci\JWT\Claim\Basic + * + * @covers Lcobucci\JWT\Token::getClaim + */ + public function getClaimShouldReturnTheClaimValueWhenItExists() + { + $token = new Token([], ['testing' => new Basic('testing', 'test')]); + + $this->assertEquals('test', $token->getClaim('testing')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Token::verify + * + * @expectedException BadMethodCallException + */ + public function verifyMustRaiseExceptionWhenTokenIsUnsigned() + { + $signer = $this->createMock(Signer::class); + + $token = new Token(); + $token->verify($signer, 'test'); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Token::verify + * @covers Lcobucci\JWT\Token::getPayload + */ + public function verifyShouldReturnFalseWhenTokenAlgorithmIsDifferent() + { + $signer = $this->createMock(Signer::class); + $signature = $this->createMock(Signature::class, [], [], '', false); + + $signer->expects($this->any()) + ->method('getAlgorithmId') + ->willReturn('HS256'); + + $signature->expects($this->never()) + ->method('verify'); + + $token = new Token(['alg' => 'RS256'], [], $signature); + + $this->assertFalse($token->verify($signer, 'test')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Token::verify + * @covers Lcobucci\JWT\Token::getPayload + */ + public function verifyMustDelegateTheValidationToSignature() + { + $signer = $this->createMock(Signer::class); + $signature = $this->createMock(Signature::class, [], [], '', false); + + $signer->expects($this->any()) + ->method('getAlgorithmId') + ->willReturn('HS256'); + + $signature->expects($this->once()) + ->method('verify') + ->with($signer, $this->isType('string'), 'test') + ->willReturn(true); + + $token = new Token(['alg' => 'HS256'], [], $signature); + + $this->assertTrue($token->verify($signer, 'test')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\Token::validate + * @covers Lcobucci\JWT\Token::getValidatableClaims + */ + public function validateShouldReturnTrueWhenClaimsAreEmpty() + { + $token = new Token(); + + $this->assertTrue($token->validate(new ValidationData())); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * @uses Lcobucci\JWT\Claim\Basic::__construct + * + * @covers Lcobucci\JWT\Token::validate + * @covers Lcobucci\JWT\Token::getValidatableClaims + */ + public function validateShouldReturnTrueWhenThereAreNoValidatableClaims() + { + $token = new Token([], ['testing' => new Basic('testing', 'test')]); + + $this->assertTrue($token->validate(new ValidationData())); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\ValidationData + * @uses Lcobucci\JWT\Claim\Basic + * @uses Lcobucci\JWT\Claim\EqualsTo + * + * @covers Lcobucci\JWT\Token::validate + * @covers Lcobucci\JWT\Token::getValidatableClaims + */ + public function validateShouldReturnFalseWhenThereIsAtLeastOneFailedValidatableClaim() + { + $token = new Token( + [], + [ + 'iss' => new EqualsTo('iss', 'test'), + 'testing' => new Basic('testing', 'test') + ] + ); + + $data = new ValidationData(); + $data->setIssuer('test1'); + + $this->assertFalse($token->validate($data)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\ValidationData + * @uses Lcobucci\JWT\Claim\Basic + * @uses Lcobucci\JWT\Claim\EqualsTo + * @uses Lcobucci\JWT\Claim\LesserOrEqualsTo + * @uses Lcobucci\JWT\Claim\GreaterOrEqualsTo + * + * @covers Lcobucci\JWT\Token::validate + * @covers Lcobucci\JWT\Token::getValidatableClaims + */ + public function validateShouldReturnFalseWhenATimeBasedClaimFails() + { + $now = time(); + + $token = new Token( + [], + [ + 'iss' => new EqualsTo('iss', 'test'), + 'iat' => new LesserOrEqualsTo('iat', $now), + 'nbf' => new LesserOrEqualsTo('nbf', $now + 20), + 'exp' => new GreaterOrEqualsTo('exp', $now + 500), + 'testing' => new Basic('testing', 'test') + ] + ); + + $data = new ValidationData($now + 10); + $data->setIssuer('test'); + + $this->assertFalse($token->validate($data)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\ValidationData + * @uses Lcobucci\JWT\Claim\Basic + * @uses Lcobucci\JWT\Claim\EqualsTo + * @uses Lcobucci\JWT\Claim\LesserOrEqualsTo + * @uses Lcobucci\JWT\Claim\GreaterOrEqualsTo + * + * @covers Lcobucci\JWT\Token::validate + * @covers Lcobucci\JWT\Token::getValidatableClaims + */ + public function validateShouldReturnTrueWhenThereAreNoFailedValidatableClaims() + { + $now = time(); + + $token = new Token( + [], + [ + 'iss' => new EqualsTo('iss', 'test'), + 'iat' => new LesserOrEqualsTo('iat', $now), + 'exp' => new GreaterOrEqualsTo('exp', $now + 500), + 'testing' => new Basic('testing', 'test') + ] + ); + + $data = new ValidationData($now + 10); + $data->setIssuer('test'); + + $this->assertTrue($token->validate($data)); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\ValidationData + * @uses Lcobucci\JWT\Claim\Basic + * @uses Lcobucci\JWT\Claim\EqualsTo + * @uses Lcobucci\JWT\Claim\LesserOrEqualsTo + * @uses Lcobucci\JWT\Claim\GreaterOrEqualsTo + * + * @covers Lcobucci\JWT\Token::validate + * @covers Lcobucci\JWT\Token::getValidatableClaims + */ + public function validateShouldReturnTrueWhenLeewayMakesAllTimeBasedClaimsTrueAndOtherClaimsAreTrue() + { + $now = time(); + + $token = new Token( + [], + [ + 'iss' => new EqualsTo('iss', 'test'), + 'iat' => new LesserOrEqualsTo('iat', $now), + 'nbf' => new LesserOrEqualsTo('nbf', $now + 20), + 'exp' => new GreaterOrEqualsTo('exp', $now + 500), + 'testing' => new Basic('testing', 'test') + ] + ); + + $data = new ValidationData($now + 10, 20); + $data->setIssuer('test'); + + $this->assertTrue($token->validate($data)); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Token::isExpired + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::getClaim + * @uses Lcobucci\JWT\Token::hasClaim + */ + public function isExpiredShouldReturnFalseWhenTokenDoesNotExpires() + { + $token = new Token(['alg' => 'none']); + + $this->assertFalse($token->isExpired()); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Token::isExpired + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::getClaim + * @uses Lcobucci\JWT\Token::hasClaim + * @uses Lcobucci\JWT\Claim\Basic + * @uses Lcobucci\JWT\Claim\GreaterOrEqualsTo + */ + public function isExpiredShouldReturnFalseWhenTokenIsNotExpired() + { + $token = new Token( + ['alg' => 'none'], + ['exp' => new GreaterOrEqualsTo('exp', time() + 500)] + ); + + $this->assertFalse($token->isExpired()); + } + + /** + * @test + * + * @covers Lcobucci\JWT\Token::isExpired + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::getClaim + * @uses Lcobucci\JWT\Token::hasClaim + * @uses Lcobucci\JWT\Claim\Basic + * @uses Lcobucci\JWT\Claim\GreaterOrEqualsTo + */ + public function isExpiredShouldReturnTrueAfterTokenExpires() + { + $token = new Token( + ['alg' => 'none'], + ['exp' => new GreaterOrEqualsTo('exp', time())] + ); + + $this->assertTrue($token->isExpired(new DateTime('+10 days'))); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * + * @covers Lcobucci\JWT\Token::getPayload + */ + public function getPayloadShouldReturnAStringWithTheTwoEncodePartsThatGeneratedTheToken() + { + $token = new Token(['alg' => 'none'], [], null, ['test1', 'test2', 'test3']); + + $this->assertEquals('test1.test2', $token->getPayload()); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::getPayload + * + * @covers Lcobucci\JWT\Token::__toString + */ + public function toStringMustReturnEncodedDataWithEmptySignature() + { + $token = new Token(['alg' => 'none'], [], null, ['test', 'test']); + + $this->assertEquals('test.test.', (string) $token); + } + + /** + * @test + * + * @uses Lcobucci\JWT\Token::__construct + * @uses Lcobucci\JWT\Token::getPayload + * + * @covers Lcobucci\JWT\Token::__toString + */ + public function toStringMustReturnEncodedData() + { + $signature = $this->createMock(Signature::class, [], [], '', false); + + $token = new Token(['alg' => 'none'], [], $signature, ['test', 'test', 'test']); + + $this->assertEquals('test.test.test', (string) $token); + } +} diff --git a/vendor/lcobucci/jwt/test/unit/ValidationDataTest.php b/vendor/lcobucci/jwt/test/unit/ValidationDataTest.php new file mode 100755 index 0000000..32df8d4 --- /dev/null +++ b/vendor/lcobucci/jwt/test/unit/ValidationDataTest.php @@ -0,0 +1,270 @@ + + * @since 2.0.0 + */ +class ValidationDataTest extends \PHPUnit\Framework\TestCase +{ + /** + * @test + * + * @covers Lcobucci\JWT\ValidationData::__construct + * @covers Lcobucci\JWT\ValidationData::setCurrentTime + */ + public function constructorShouldConfigureTheItems() + { + $expected = $this->createExpectedData(); + $data = new ValidationData(1); + + $this->assertAttributeSame($expected, 'items', $data); + } + + /** + * @test + * + * @covers Lcobucci\JWT\ValidationData::__construct + * @covers Lcobucci\JWT\ValidationData::setCurrentTime + */ + public function constructorWithLeewayShouldConfigureTheItems() + { + $expected = $this->createExpectedData(null, null, null, null, 111, 111, 89); + $data = new ValidationData(100, 11); + + $this->assertAttributeSame($expected, 'items', $data); + } + + /** + * @test + * + * @dataProvider claimValues + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::setId + */ + public function setIdShouldChangeTheId($id) + { + $expected = $this->createExpectedData($id); + $data = new ValidationData(1); + $data->setId($id); + + $this->assertAttributeSame($expected, 'items', $data); + } + + /** + * @test + * + * @dataProvider claimValues + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::setIssuer + */ + public function setIssuerShouldChangeTheIssuer($iss) + { + $expected = $this->createExpectedData(null, null, $iss); + $data = new ValidationData(1); + $data->setIssuer($iss); + + $this->assertAttributeSame($expected, 'items', $data); + } + + /** + * @test + * + * @dataProvider claimValues + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::setAudience + */ + public function setAudienceShouldChangeTheAudience($aud) + { + $expected = $this->createExpectedData(null, null, null, $aud); + $data = new ValidationData(1); + $data->setAudience($aud); + + $this->assertAttributeSame($expected, 'items', $data); + } + + /** + * @test + * + * @dataProvider claimValues + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::setSubject + */ + public function setSubjectShouldChangeTheSubject($sub) + { + $expected = $this->createExpectedData(null, $sub); + $data = new ValidationData(1); + $data->setSubject($sub); + + $this->assertAttributeSame($expected, 'items', $data); + } + + /** + * @test + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::setCurrentTime + */ + public function setCurrentTimeShouldChangeTheTimeBasedValues() + { + $expected = $this->createExpectedData(null, null, null, null, 2); + $data = new ValidationData(1); + $data->setCurrentTime(2); + + $this->assertAttributeSame($expected, 'items', $data); + } + + /** + * @test + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::setCurrentTime + */ + public function setCurrentTimeShouldChangeTheTimeBasedValuesUsingLeeway() + { + $expected = $this->createExpectedData(null, null, null, null, 30, 30, 10); + $data = new ValidationData(15, 10); + $data->setCurrentTime(20); + + $this->assertAttributeSame($expected, 'items', $data); + } + + /** + * @test + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::has + */ + public function hasShouldReturnTrueWhenItemIsNotEmpty() + { + $data = new ValidationData(1); + + $this->assertTrue($data->has('iat')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::has + */ + public function hasShouldReturnFalseWhenItemIsEmpty() + { + $data = new ValidationData(1); + + $this->assertFalse($data->has('jti')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::has + */ + public function hasShouldReturnFalseWhenItemIsNotDefined() + { + $data = new ValidationData(1); + + $this->assertFalse($data->has('test')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::get + */ + public function getShouldReturnTheItemValue() + { + $data = new ValidationData(1); + + $this->assertEquals(1, $data->get('iat')); + } + + /** + * @test + * + * @uses Lcobucci\JWT\ValidationData::__construct + * @uses Lcobucci\JWT\ValidationData::setCurrentTime + * + * @covers Lcobucci\JWT\ValidationData::get + */ + public function getShouldReturnNullWhenItemIsNotDefined() + { + $data = new ValidationData(1); + + $this->assertNull($data->get('test')); + } + + /** + * @return array + */ + public function claimValues() + { + return [ + [1], + ['test'] + ]; + } + + /** + * @param string|null $id + * @param string|null $sub + * @param string|null $iss + * @param string|null $aud + * @param int $iat + * @param int|null $nbf + * @param int|null $exp + * + * @return array + */ + private function createExpectedData( + $id = null, + $sub = null, + $iss = null, + $aud = null, + $iat = 1, + $nbf = null, + $exp = null + ) { + return [ + 'jti' => $id !== null ? (string) $id : null, + 'iss' => $iss !== null ? (string) $iss : null, + 'aud' => $aud !== null ? (string) $aud : null, + 'sub' => $sub !== null ? (string) $sub : null, + 'iat' => $iat, + 'nbf' => $nbf !== null ? $nbf: $iat, + 'exp' => $exp !== null ? $exp: $iat + ]; + } +} diff --git a/vendor/markbaker/complex/README.md b/vendor/markbaker/complex/README.md new file mode 100755 index 0000000..c306394 --- /dev/null +++ b/vendor/markbaker/complex/README.md @@ -0,0 +1,156 @@ +PHPComplex +========== + +--- + +PHP Class for handling Complex numbers + +Master: [![Build Status](https://travis-ci.org/MarkBaker/PHPComplex.png?branch=master)](http://travis-ci.org/MarkBaker/PHPComplex) + +Develop: [![Build Status](https://travis-ci.org/MarkBaker/PHPComplex.png?branch=develop)](http://travis-ci.org/MarkBaker/PHPComplex) + +[![Complex Numbers](https://imgs.xkcd.com/comics/complex_numbers_2x.png)](https://xkcd.com/2028/) + +--- + +The library currently provides the following operations: + + - addition + - subtraction + - multiplication + - division + - division by + - division into + +together with functions for + + - theta (polar theta angle) + - rho (polar distance/radius) + - conjugate + * negative + - inverse (1 / complex) + - cos (cosine) + - acos (inverse cosine) + - cosh (hyperbolic cosine) + - acosh (inverse hyperbolic cosine) + - sin (sine) + - asin (inverse sine) + - sinh (hyperbolic sine) + - asinh (inverse hyperbolic sine) + - sec (secant) + - asec (inverse secant) + - sech (hyperbolic secant) + - asech (inverse hyperbolic secant) + - csc (cosecant) + - acsc (inverse cosecant) + - csch (hyperbolic secant) + - acsch (inverse hyperbolic secant) + - tan (tangent) + - atan (inverse tangent) + - tanh (hyperbolic tangent) + - atanh (inverse hyperbolic tangent) + - cot (cotangent) + - acot (inverse cotangent) + - coth (hyperbolic cotangent) + - acoth (inverse hyperbolic cotangent) + - sqrt (square root) + - exp (exponential) + - ln (natural log) + - log10 (base-10 log) + - log2 (base-2 log) + - pow (raised to the power of a real number) + + +--- + +# Usage + +To create a new complex object, you can provide either the real, imaginary and suffix parts as individual values, or as an array of values passed passed to the constructor; or a string representing the value. e.g + +``` +$real = 1.23; +$imaginary = -4.56; +$suffix = 'i'; + +$complexObject = new Complex\Complex($real, $imaginary, $suffix); +``` +or +``` +$real = 1.23; +$imaginary = -4.56; +$suffix = 'i'; + +$arguments = [$real, $imaginary, $suffix]; + +$complexObject = new Complex\Complex($arguments); +``` +or +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +``` + +Complex objects are immutable: whenever you call a method or pass a complex value to a function that returns a complex value, a new Complex object will be returned, and the original will remain unchanged. +This also allows you to chain multiple methods as you would for a fluent interface (as long as they are methods that will return a Complex result). + +## Performing Mathematical Operations + +To perform mathematical operations with Complex values, you can call the appropriate method against a complex value, passing other values as arguments + +``` +$complexString1 = '1.23-4.56i'; +$complexString2 = '2.34+5.67i'; + +$complexObject = new Complex\Complex($complexString1); +echo $complexObject->add($complexString2); +``` +or pass all values to the appropriate function +``` +$complexString1 = '1.23-4.56i'; +$complexString2 = '2.34+5.67i'; + +echo Complex\add($complexString1, $complexString2); +``` +If you want to perform the same operation against multiple values (e.g. to add three or more complex numbers), then you can pass multiple arguments to any of the operations. + +You can pass these arguments as Complex objects, or as an array or string that will parse to a complex object. + +## Using functions + +When calling any of the available functions for a complex value, you can either call the relevant method for the Complex object +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo $complexObject->sinh(); +``` +or you can call the function as you would in procedural code, passing the Complex object as an argument +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo Complex\sinh($complexObject); +``` +When called procedurally using the function, you can pass in the argument as a Complex object, or as an array or string that will parse to a complex object. +``` +$complexString = '1.23-4.56i'; + +echo Complex\sinh($complexString); +``` + +In the case of the `pow()` function (the only implemented function that requires an additional argument) you need to pass both arguments when calling the function procedurally + +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo Complex\pow($complexObject, 2); +``` +or pass the additional argument when calling the method +``` +$complexString = '1.23-4.56i'; + +$complexObject = new Complex\Complex($complexString); +echo $complexObject->pow(2); +``` diff --git a/vendor/markbaker/complex/classes/Autoloader.php b/vendor/markbaker/complex/classes/Autoloader.php new file mode 100755 index 0000000..e6e03ac --- /dev/null +++ b/vendor/markbaker/complex/classes/Autoloader.php @@ -0,0 +1,53 @@ +regex = $regex; + parent::__construct($it, $regex); + } +} + +class FilenameFilter extends FilesystemRegexFilter +{ + // Filter files against the regex + public function accept() + { + return (!$this->isFile() || preg_match($this->regex, $this->getFilename())); + } +} + + +$srcFolder = __DIR__ . DIRECTORY_SEPARATOR . 'src'; +$srcDirectory = new RecursiveDirectoryIterator($srcFolder); + +$filteredFileList = new FilenameFilter($srcDirectory, '/(?:php)$/i'); +$filteredFileList = new FilenameFilter($filteredFileList, '/^(?!.*(Complex|Exception)\.php).*$/i'); + +foreach (new RecursiveIteratorIterator($filteredFileList) as $file) { + if ($file->isFile()) { + include_once $file; + } +} diff --git a/vendor/markbaker/complex/classes/src/Complex.php b/vendor/markbaker/complex/classes/src/Complex.php new file mode 100755 index 0000000..5671eb2 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/Complex.php @@ -0,0 +1,387 @@ + 0.0 && empty($suffix)) { + $suffix = 'i'; + } + + // Set parsed values in our properties + $this->realPart = (float) $realPart; + $this->imaginaryPart = (float) $imaginaryPart; + $this->suffix = strtolower($suffix); + } + + /** + * Gets the real part of this complex number + * + * @return Float + */ + public function getReal() + { + return $this->realPart; + } + + /** + * Gets the imaginary part of this complex number + * + * @return Float + */ + public function getImaginary() + { + return $this->imaginaryPart; + } + + /** + * Gets the suffix of this complex number + * + * @return String + */ + public function getSuffix() + { + return $this->suffix; + } + + /** + * Returns true if this is a real value, false if a complex value + * + * @return Bool + */ + public function isReal() + { + return $this->imaginaryPart == 0.0; + } + + /** + * Returns true if this is a complex value, false if a real value + * + * @return Bool + */ + public function isComplex() + { + return !$this->isReal(); + } + + public function format() + { + $str = ""; + if ($this->imaginaryPart != 0.0) { + if (\abs($this->imaginaryPart) != 1.0) { + $str .= $this->imaginaryPart . $this->suffix; + } else { + $str .= (($this->imaginaryPart < 0.0) ? '-' : '') . $this->suffix; + } + } + if ($this->realPart != 0.0) { + if (($str) && ($this->imaginaryPart > 0.0)) { + $str = "+" . $str; + } + $str = $this->realPart . $str; + } + if (!$str) { + $str = "0.0"; + } + + return $str; + } + + public function __toString() + { + return $this->format(); + } + + /** + * Validates whether the argument is a valid complex number, converting scalar or array values if possible + * + * @param mixed $complex The value to validate + * @return Complex + * @throws Exception If the argument isn't a Complex number or cannot be converted to one + */ + public static function validateComplexArgument($complex) + { + if (is_scalar($complex) || is_array($complex)) { + $complex = new Complex($complex); + } elseif (!is_object($complex) || !($complex instanceof Complex)) { + throw new Exception('Value is not a valid complex number'); + } + + return $complex; + } + + /** + * Returns the reverse of this complex number + * + * @return Complex + */ + public function reverse() + { + return new Complex( + $this->imaginaryPart, + $this->realPart, + ($this->realPart == 0.0) ? null : $this->suffix + ); + } + + public function invertImaginary() + { + return new Complex( + $this->realPart, + $this->imaginaryPart * -1, + ($this->imaginaryPart == 0.0) ? null : $this->suffix + ); + } + + public function invertReal() + { + return new Complex( + $this->realPart * -1, + $this->imaginaryPart, + ($this->imaginaryPart == 0.0) ? null : $this->suffix + ); + } + + protected static $functions = [ + 'abs', + 'acos', + 'acosh', + 'acot', + 'acoth', + 'acsc', + 'acsch', + 'argument', + 'asec', + 'asech', + 'asin', + 'asinh', + 'atan', + 'atanh', + 'conjugate', + 'cos', + 'cosh', + 'cot', + 'coth', + 'csc', + 'csch', + 'exp', + 'inverse', + 'ln', + 'log2', + 'log10', + 'negative', + 'pow', + 'rho', + 'sec', + 'sech', + 'sin', + 'sinh', + 'sqrt', + 'tan', + 'tanh', + 'theta', + ]; + + protected static $operations = [ + 'add', + 'subtract', + 'multiply', + 'divideby', + 'divideinto', + ]; + + /** + * Returns the result of the function call or operation + * + * @return Complex|float + * @throws Exception|\InvalidArgumentException + */ + public function __call($functionName, $arguments) + { + $functionName = strtolower(str_replace('_', '', $functionName)); + + // Test for function calls + if (in_array($functionName, self::$functions)) { + $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; + return $functionName($this, ...$arguments); + } + // Test for operation calls + if (in_array($functionName, self::$operations)) { + $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; + return $functionName($this, ...$arguments); + } + throw new Exception('Function or Operation does not exist'); + } +} diff --git a/vendor/markbaker/complex/classes/src/Exception.php b/vendor/markbaker/complex/classes/src/Exception.php new file mode 100755 index 0000000..a2beb73 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/Exception.php @@ -0,0 +1,13 @@ +getReal() - $invsqrt->getImaginary(), + $complex->getImaginary() + $invsqrt->getReal() + ); + $log = ln($adjust); + + return new Complex( + $log->getImaginary(), + -1 * $log->getReal() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/acosh.php b/vendor/markbaker/complex/classes/src/functions/acosh.php new file mode 100755 index 0000000..18a992e --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/acosh.php @@ -0,0 +1,34 @@ +isReal() && ($complex->getReal() > 1)) { + return new Complex(\acosh($complex->getReal())); + } + + $acosh = acos($complex) + ->reverse(); + if ($acosh->getReal() < 0.0) { + $acosh = $acosh->invertReal(); + } + + return $acosh; +} diff --git a/vendor/markbaker/complex/classes/src/functions/acot.php b/vendor/markbaker/complex/classes/src/functions/acot.php new file mode 100755 index 0000000..11bee46 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/acot.php @@ -0,0 +1,25 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return asin(inverse($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/acsch.php b/vendor/markbaker/complex/classes/src/functions/acsch.php new file mode 100755 index 0000000..bb45d34 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/acsch.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return asinh(inverse($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/argument.php b/vendor/markbaker/complex/classes/src/functions/argument.php new file mode 100755 index 0000000..d7209cc --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/argument.php @@ -0,0 +1,28 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return acos(inverse($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/asech.php b/vendor/markbaker/complex/classes/src/functions/asech.php new file mode 100755 index 0000000..b36c40e --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/asech.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return acosh(inverse($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/asin.php b/vendor/markbaker/complex/classes/src/functions/asin.php new file mode 100755 index 0000000..9c982ac --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/asin.php @@ -0,0 +1,37 @@ +getReal() - $complex->getImaginary(), + $invsqrt->getImaginary() + $complex->getReal() + ); + $log = ln($adjust); + + return new Complex( + $log->getImaginary(), + -1 * $log->getReal() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/asinh.php b/vendor/markbaker/complex/classes/src/functions/asinh.php new file mode 100755 index 0000000..c1243fd --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/asinh.php @@ -0,0 +1,33 @@ +isReal() && ($complex->getReal() > 1)) { + return new Complex(\asinh($complex->getReal())); + } + + $asinh = clone $complex; + $asinh = $asinh->reverse() + ->invertReal(); + $asinh = asin($asinh); + return $asinh->reverse() + ->invertImaginary(); +} diff --git a/vendor/markbaker/complex/classes/src/functions/atan.php b/vendor/markbaker/complex/classes/src/functions/atan.php new file mode 100755 index 0000000..2c75dcf --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/atan.php @@ -0,0 +1,45 @@ +isReal()) { + return new Complex(\atan($complex->getReal())); + } + + $t1Value = new Complex(-1 * $complex->getImaginary(), $complex->getReal()); + $uValue = new Complex(1, 0); + + $d1Value = clone $uValue; + $d1Value = subtract($d1Value, $t1Value); + $d2Value = add($t1Value, $uValue); + $uResult = $d1Value->divideBy($d2Value); + $uResult = ln($uResult); + + return new Complex( + (($uResult->getImaginary() == M_PI) ? -M_PI : $uResult->getImaginary()) * -0.5, + $uResult->getReal() * 0.5, + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/atanh.php b/vendor/markbaker/complex/classes/src/functions/atanh.php new file mode 100755 index 0000000..c53f2a9 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/atanh.php @@ -0,0 +1,38 @@ +isReal()) { + $real = $complex->getReal(); + if ($real >= -1.0 && $real <= 1.0) { + return new Complex(\atanh($real)); + } else { + return new Complex(\atanh(1 / $real), (($real < 0.0) ? M_PI_2 : -1 * M_PI_2)); + } + } + + $iComplex = clone $complex; + $iComplex = $iComplex->invertImaginary() + ->reverse(); + return atan($iComplex) + ->invertReal() + ->reverse(); +} diff --git a/vendor/markbaker/complex/classes/src/functions/conjugate.php b/vendor/markbaker/complex/classes/src/functions/conjugate.php new file mode 100755 index 0000000..bd1984b --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/conjugate.php @@ -0,0 +1,28 @@ +getReal(), + -1 * $complex->getImaginary(), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/cos.php b/vendor/markbaker/complex/classes/src/functions/cos.php new file mode 100755 index 0000000..80a4683 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/cos.php @@ -0,0 +1,34 @@ +isReal()) { + return new Complex(\cos($complex->getReal())); + } + + return conjugate( + new Complex( + \cos($complex->getReal()) * \cosh($complex->getImaginary()), + \sin($complex->getReal()) * \sinh($complex->getImaginary()), + $complex->getSuffix() + ) + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/cosh.php b/vendor/markbaker/complex/classes/src/functions/cosh.php new file mode 100755 index 0000000..a4bea65 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/cosh.php @@ -0,0 +1,32 @@ +isReal()) { + return new Complex(\cosh($complex->getReal())); + } + + return new Complex( + \cosh($complex->getReal()) * \cos($complex->getImaginary()), + \sinh($complex->getReal()) * \sin($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/cot.php b/vendor/markbaker/complex/classes/src/functions/cot.php new file mode 100755 index 0000000..339101e --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/cot.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return new Complex(INF); + } + + return inverse(tan($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/coth.php b/vendor/markbaker/complex/classes/src/functions/coth.php new file mode 100755 index 0000000..7fe705a --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/coth.php @@ -0,0 +1,24 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return inverse(sin($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/csch.php b/vendor/markbaker/complex/classes/src/functions/csch.php new file mode 100755 index 0000000..f450098 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/csch.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + return INF; + } + + return inverse(sinh($complex)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/exp.php b/vendor/markbaker/complex/classes/src/functions/exp.php new file mode 100755 index 0000000..4cac696 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/exp.php @@ -0,0 +1,34 @@ +getReal() == 0.0) && (\abs($complex->getImaginary()) == M_PI)) { + return new Complex(-1.0, 0.0); + } + + $rho = \exp($complex->getReal()); + + return new Complex( + $rho * \cos($complex->getImaginary()), + $rho * \sin($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/inverse.php b/vendor/markbaker/complex/classes/src/functions/inverse.php new file mode 100755 index 0000000..7d3182a --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/inverse.php @@ -0,0 +1,29 @@ +getReal() == 0.0 && $complex->getImaginary() == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + return $complex->divideInto(1.0); +} diff --git a/vendor/markbaker/complex/classes/src/functions/ln.php b/vendor/markbaker/complex/classes/src/functions/ln.php new file mode 100755 index 0000000..39071cf --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/ln.php @@ -0,0 +1,33 @@ +getReal() == 0.0) && ($complex->getImaginary() == 0.0)) { + throw new \InvalidArgumentException(); + } + + return new Complex( + \log(rho($complex)), + theta($complex), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/log10.php b/vendor/markbaker/complex/classes/src/functions/log10.php new file mode 100755 index 0000000..694d3d0 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/log10.php @@ -0,0 +1,32 @@ +getReal() == 0.0) && ($complex->getImaginary() == 0.0)) { + throw new \InvalidArgumentException(); + } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) { + return new Complex(\log10($complex->getReal()), 0.0, $complex->getSuffix()); + } + + return ln($complex) + ->multiply(\log10(Complex::EULER)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/log2.php b/vendor/markbaker/complex/classes/src/functions/log2.php new file mode 100755 index 0000000..081f2c4 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/log2.php @@ -0,0 +1,32 @@ +getReal() == 0.0) && ($complex->getImaginary() == 0.0)) { + throw new \InvalidArgumentException(); + } elseif (($complex->getReal() > 0.0) && ($complex->getImaginary() == 0.0)) { + return new Complex(\log($complex->getReal(), 2), 0.0, $complex->getSuffix()); + } + + return ln($complex) + ->multiply(\log(Complex::EULER, 2)); +} diff --git a/vendor/markbaker/complex/classes/src/functions/negative.php b/vendor/markbaker/complex/classes/src/functions/negative.php new file mode 100755 index 0000000..dbd1192 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/negative.php @@ -0,0 +1,31 @@ +getReal(), + -1 * $complex->getImaginary(), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/pow.php b/vendor/markbaker/complex/classes/src/functions/pow.php new file mode 100755 index 0000000..18ee269 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/pow.php @@ -0,0 +1,40 @@ +getImaginary() == 0.0 && $complex->getReal() >= 0.0) { + return new Complex(\pow($complex->getReal(), $power)); + } + + $rValue = \sqrt(($complex->getReal() * $complex->getReal()) + ($complex->getImaginary() * $complex->getImaginary())); + $rPower = \pow($rValue, $power); + $theta = $complex->argument() * $power; + if ($theta == 0) { + return new Complex(1); + } + + return new Complex($rPower * \cos($theta), $rPower * \sin($theta), $complex->getSuffix()); +} diff --git a/vendor/markbaker/complex/classes/src/functions/rho.php b/vendor/markbaker/complex/classes/src/functions/rho.php new file mode 100755 index 0000000..750f3f9 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/rho.php @@ -0,0 +1,28 @@ +getReal() * $complex->getReal()) + + ($complex->getImaginary() * $complex->getImaginary()) + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/sec.php b/vendor/markbaker/complex/classes/src/functions/sec.php new file mode 100755 index 0000000..7dd43ea --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/sec.php @@ -0,0 +1,25 @@ +isReal()) { + return new Complex(\sin($complex->getReal())); + } + + return new Complex( + \sin($complex->getReal()) * \cosh($complex->getImaginary()), + \cos($complex->getReal()) * \sinh($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/sinh.php b/vendor/markbaker/complex/classes/src/functions/sinh.php new file mode 100755 index 0000000..4c0f650 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/sinh.php @@ -0,0 +1,32 @@ +isReal()) { + return new Complex(\sinh($complex->getReal())); + } + + return new Complex( + \sinh($complex->getReal()) * \cos($complex->getImaginary()), + \cosh($complex->getReal()) * \sin($complex->getImaginary()), + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/sqrt.php b/vendor/markbaker/complex/classes/src/functions/sqrt.php new file mode 100755 index 0000000..9c171b8 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/sqrt.php @@ -0,0 +1,29 @@ +getSuffix()); +} diff --git a/vendor/markbaker/complex/classes/src/functions/tan.php b/vendor/markbaker/complex/classes/src/functions/tan.php new file mode 100755 index 0000000..014d798 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/tan.php @@ -0,0 +1,40 @@ +isReal()) { + return new Complex(\tan($complex->getReal())); + } + + $real = $complex->getReal(); + $imaginary = $complex->getImaginary(); + $divisor = 1 + \pow(\tan($real), 2) * \pow(\tanh($imaginary), 2); + if ($divisor == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + return new Complex( + \pow(sech($imaginary)->getReal(), 2) * \tan($real) / $divisor, + \pow(sec($real)->getReal(), 2) * \tanh($imaginary) / $divisor, + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/tanh.php b/vendor/markbaker/complex/classes/src/functions/tanh.php new file mode 100755 index 0000000..028741d --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/tanh.php @@ -0,0 +1,35 @@ +getReal(); + $imaginary = $complex->getImaginary(); + $divisor = \cos($imaginary) * \cos($imaginary) + \sinh($real) * \sinh($real); + if ($divisor == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + return new Complex( + \sinh($real) * \cosh($real) / $divisor, + 0.5 * \sin(2 * $imaginary) / $divisor, + $complex->getSuffix() + ); +} diff --git a/vendor/markbaker/complex/classes/src/functions/theta.php b/vendor/markbaker/complex/classes/src/functions/theta.php new file mode 100755 index 0000000..d12866c --- /dev/null +++ b/vendor/markbaker/complex/classes/src/functions/theta.php @@ -0,0 +1,38 @@ +getReal() == 0.0) { + if ($complex->isReal()) { + return 0.0; + } elseif ($complex->getImaginary() < 0.0) { + return M_PI / -2; + } + return M_PI / 2; + } elseif ($complex->getReal() > 0.0) { + return \atan($complex->getImaginary() / $complex->getReal()); + } elseif ($complex->getImaginary() < 0.0) { + return -(M_PI - \atan(\abs($complex->getImaginary()) / \abs($complex->getReal()))); + } + + return M_PI - \atan($complex->getImaginary() / \abs($complex->getReal())); +} diff --git a/vendor/markbaker/complex/classes/src/operations/add.php b/vendor/markbaker/complex/classes/src/operations/add.php new file mode 100755 index 0000000..10bd42f --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/add.php @@ -0,0 +1,46 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + + $real = $result->getReal() + $complex->getReal(); + $imaginary = $result->getImaginary() + $complex->getImaginary(); + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/classes/src/operations/divideby.php b/vendor/markbaker/complex/classes/src/operations/divideby.php new file mode 100755 index 0000000..089e0ef --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/divideby.php @@ -0,0 +1,56 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + if ($complex->getReal() == 0.0 && $complex->getImaginary() == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + $delta1 = ($result->getReal() * $complex->getReal()) + + ($result->getImaginary() * $complex->getImaginary()); + $delta2 = ($result->getImaginary() * $complex->getReal()) - + ($result->getReal() * $complex->getImaginary()); + $delta3 = ($complex->getReal() * $complex->getReal()) + + ($complex->getImaginary() * $complex->getImaginary()); + + $real = $delta1 / $delta3; + $imaginary = $delta2 / $delta3; + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/classes/src/operations/divideinto.php b/vendor/markbaker/complex/classes/src/operations/divideinto.php new file mode 100755 index 0000000..3dfe085 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/divideinto.php @@ -0,0 +1,56 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + if ($result->getReal() == 0.0 && $result->getImaginary() == 0.0) { + throw new \InvalidArgumentException('Division by zero'); + } + + $delta1 = ($complex->getReal() * $result->getReal()) + + ($complex->getImaginary() * $result->getImaginary()); + $delta2 = ($complex->getImaginary() * $result->getReal()) - + ($complex->getReal() * $result->getImaginary()); + $delta3 = ($result->getReal() * $result->getReal()) + + ($result->getImaginary() * $result->getImaginary()); + + $real = $delta1 / $delta3; + $imaginary = $delta2 / $delta3; + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/classes/src/operations/multiply.php b/vendor/markbaker/complex/classes/src/operations/multiply.php new file mode 100755 index 0000000..bf2473e --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/multiply.php @@ -0,0 +1,48 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + + $real = ($result->getReal() * $complex->getReal()) - + ($result->getImaginary() * $complex->getImaginary()); + $imaginary = ($result->getReal() * $complex->getImaginary()) + + ($result->getImaginary() * $complex->getReal()); + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/classes/src/operations/subtract.php b/vendor/markbaker/complex/classes/src/operations/subtract.php new file mode 100755 index 0000000..075ef44 --- /dev/null +++ b/vendor/markbaker/complex/classes/src/operations/subtract.php @@ -0,0 +1,46 @@ +isComplex() && $complex->isComplex() && + $result->getSuffix() !== $complex->getSuffix()) { + throw new Exception('Suffix Mismatch'); + } + + $real = $result->getReal() - $complex->getReal(); + $imaginary = $result->getImaginary() - $complex->getImaginary(); + + $result = new Complex( + $real, + $imaginary, + ($imaginary == 0.0) ? null : max($result->getSuffix(), $complex->getSuffix()) + ); + } + + return $result; +} diff --git a/vendor/markbaker/complex/composer.json b/vendor/markbaker/complex/composer.json new file mode 100755 index 0000000..91e9e23 --- /dev/null +++ b/vendor/markbaker/complex/composer.json @@ -0,0 +1,91 @@ +{ + "name": "markbaker/complex", + "type": "library", + "description": "PHP Class for working with complex numbers", + "keywords": ["complex", "mathematics"], + "homepage": "https://github.com/MarkBaker/PHPComplex", + "license": "MIT", + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.0", + "phpdocumentor/phpdocumentor":"2.*", + "phpmd/phpmd": "2.*", + "sebastian/phpcpd": "2.*", + "phploc/phploc": "2.*", + "squizlabs/php_codesniffer": "^3.3.0", + "phpcompatibility/php-compatibility": "^8.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3" + }, + "autoload": { + "psr-4": { + "Complex\\": "classes/src/" + }, + "files": [ + "classes/src/functions/abs.php", + "classes/src/functions/acos.php", + "classes/src/functions/acosh.php", + "classes/src/functions/acot.php", + "classes/src/functions/acoth.php", + "classes/src/functions/acsc.php", + "classes/src/functions/acsch.php", + "classes/src/functions/argument.php", + "classes/src/functions/asec.php", + "classes/src/functions/asech.php", + "classes/src/functions/asin.php", + "classes/src/functions/asinh.php", + "classes/src/functions/atan.php", + "classes/src/functions/atanh.php", + "classes/src/functions/conjugate.php", + "classes/src/functions/cos.php", + "classes/src/functions/cosh.php", + "classes/src/functions/cot.php", + "classes/src/functions/coth.php", + "classes/src/functions/csc.php", + "classes/src/functions/csch.php", + "classes/src/functions/exp.php", + "classes/src/functions/inverse.php", + "classes/src/functions/ln.php", + "classes/src/functions/log2.php", + "classes/src/functions/log10.php", + "classes/src/functions/negative.php", + "classes/src/functions/pow.php", + "classes/src/functions/rho.php", + "classes/src/functions/sec.php", + "classes/src/functions/sech.php", + "classes/src/functions/sin.php", + "classes/src/functions/sinh.php", + "classes/src/functions/sqrt.php", + "classes/src/functions/tan.php", + "classes/src/functions/tanh.php", + "classes/src/functions/theta.php", + "classes/src/operations/add.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "scripts": { + "style": [ + "phpcs --report-width=200 --report-summary --report-full classes/src/ --standard=PSR2 -n" + ], + "mess": [ + "phpmd classes/src/ xml codesize,unusedcode,design,naming -n" + ], + "lines": [ + "phploc classes/src/ -n" + ], + "cpd": [ + "phpcpd classes/src/ -n" + ] + }, + "minimum-stability": "dev" +} \ No newline at end of file diff --git a/vendor/markbaker/complex/examples/complexTest.php b/vendor/markbaker/complex/examples/complexTest.php new file mode 100755 index 0000000..7dafd8a --- /dev/null +++ b/vendor/markbaker/complex/examples/complexTest.php @@ -0,0 +1,154 @@ +add(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->add(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->add(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->add(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->add(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->add(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Subtract', PHP_EOL; + +$x = new Complex(123); +$x->subtract(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->subtract(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->subtract(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->subtract(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->subtract(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->subtract(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Multiply', PHP_EOL; + +$x = new Complex(123); +$x->multiply(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->multiply(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->multiply(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->multiply(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->multiply(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->multiply(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Divide By', PHP_EOL; + +$x = new Complex(123); +$x->divideBy(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->divideBy(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideBy(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideBy(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideBy(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideBy(new Complex(0, -1)); +echo $x, PHP_EOL; + + +echo PHP_EOL, 'Divide Into', PHP_EOL; + +$x = new Complex(123); +$x->divideInto(456); +echo $x, PHP_EOL; + +$x = new Complex(123.456); +$x->divideInto(789.012); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideInto(new Complex(-987.654, -32.1)); +echo $x, PHP_EOL; + +$x = new Complex(123.456, 78.90); +$x->divideInto(-987.654); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideInto(new Complex(0, 1)); +echo $x, PHP_EOL; + +$x = new Complex(-987.654, -32.1); +$x->divideInto(new Complex(0, -1)); +echo $x, PHP_EOL; diff --git a/vendor/markbaker/complex/examples/testFunctions.php b/vendor/markbaker/complex/examples/testFunctions.php new file mode 100755 index 0000000..4d5ed73 --- /dev/null +++ b/vendor/markbaker/complex/examples/testFunctions.php @@ -0,0 +1,52 @@ +getMessage(), PHP_EOL; + } + } + echo PHP_EOL; + } +} diff --git a/vendor/markbaker/complex/examples/testOperations.php b/vendor/markbaker/complex/examples/testOperations.php new file mode 100755 index 0000000..f791263 --- /dev/null +++ b/vendor/markbaker/complex/examples/testOperations.php @@ -0,0 +1,34 @@ + ', $result, PHP_EOL; + +echo PHP_EOL; + +echo 'Subtraction', PHP_EOL; + +$result = \Complex\subtract(...$values); +echo '=> ', $result, PHP_EOL; + +echo PHP_EOL; + +echo 'Multiplication', PHP_EOL; + +$result = \Complex\multiply(...$values); +echo '=> ', $result, PHP_EOL; diff --git a/vendor/markbaker/complex/license.md b/vendor/markbaker/complex/license.md new file mode 100755 index 0000000..5b4b156 --- /dev/null +++ b/vendor/markbaker/complex/license.md @@ -0,0 +1,25 @@ +The MIT License (MIT) +===================== + +Copyright © `2017` `Mark Baker` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/markbaker/matrix/README.md b/vendor/markbaker/matrix/README.md new file mode 100755 index 0000000..66a1de4 --- /dev/null +++ b/vendor/markbaker/matrix/README.md @@ -0,0 +1,165 @@ +PHPMatrix +========== + +--- + +PHP Class for handling Matrices + +Master: [![Build Status](https://travis-ci.org/MarkBaker/PHPMatrix.png?branch=master)](http://travis-ci.org/MarkBaker/PHPMatrix) + +Develop: [![Build Status](https://travis-ci.org/MarkBaker/PHPMatrix.png?branch=develop)](http://travis-ci.org/MarkBaker/PHPMatrix) + +[![Matrix Transform](https://imgs.xkcd.com/comics/matrix_transform.png)](https://xkcd.com/184/) + +Matrix Transform + +--- + +This library currently provides the following operations: + + - addition + - direct sum + - subtraction + - multiplication + - division (using [A].[B]-1) + - division by + - division into + +together with functions for + + - adjoint + - antidiagonal + - cofactors + - determinant + - diagonal + - identity + - inverse + - minors + - trace + - transpose + + +## TO DO + + - power() + - EigenValues + - EigenVectors + - Decomposition + +--- + +# Usage + +To create a new Matrix object, provide an array as the constructor argument + +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +$matrix = new Matrix\Matrix($grid); +``` +The `Builder` class provides helper methods for creating specific matrices, specifically an identity matrix of a specified size; or a matrix of a specified dimensions, with every cell containing a set value. +``` +$matrix = new Matrix\Builder::createFilledMatrix(1, 5, 3); +``` +Will create a matrix of 5 rows and 3 columns, filled with a `1` in every cell; while +``` +$matrix = new Matrix\Builder::createIdentityMatrix(3); +``` +will create a 3x3 identity matrix. + + +Matrix objects are immutable: whenever you call a method or pass a grid to a function that returns a matrix value, a new Matrix object will be returned, and the original will remain unchanged. This also allows you to chain multiple methods as you would for a fluent interface (as long as they are methods that will return a Matrix result). + +## Performing Mathematical Operations + +To perform mathematical operations with Matrices, you can call the appropriate method against a matrix value, passing other values as arguments + +``` +$matrix1 = new Matrix([ + [2, 7, 6], + [9, 5, 1], + [4, 3, 8], +]); +$matrix2 = new Matrix([ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9], +]); + +echo $matrix1->multiply($matrix2); +``` +or pass all values to the appropriate function +``` +$matrix1 = new Matrix([ + [2, 7, 6], + [9, 5, 1], + [4, 3, 8], +]); +$matrix2 = new Matrix([ + [1, 2, 3], + [4, 5, 6], + [7, 8, 9], +]); + +echo Matrix\multiply($matrix1, $matrix2); +``` +You can pass in the arguments as Matrix objects, or as arrays. + +If you want to perform the same operation against multiple values (e.g. to add three or more matrices), then you can pass multiple arguments to any of the operations. + +## Using functions + +When calling any of the available functions for a matrix value, you can either call the relevant method for the Matrix object +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +$matrix = new Matrix\Matrix($grid); + +echo $matrix->trace(); +``` +or you can call the function as you would in procedural code, passing the Matrix object as an argument +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +$matrix = new Matrix\Matrix($grid); +echo Matrix\trace($matrix); +``` +When called procedurally using the function, you can pass in the argument as a Matrix object, or as an array. +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +echo Matrix\trace($grid); +``` +As an alternative, it is also possible to call the method directly from the `Functions` class. +``` +$grid = [ + [16, 3, 2, 13], + [ 5, 10, 11, 8], + [ 9, 6, 7, 12], + [ 4, 15, 14, 1], +]; + +$matrix = new Matrix\Matrix($grid); +echo Matrix\Functions::trace($matrix); +``` +Used this way, methods must be called statically, and the argument must be the Matrix object, and cannot be an array. diff --git a/vendor/markbaker/matrix/buildPhar.php b/vendor/markbaker/matrix/buildPhar.php new file mode 100755 index 0000000..e1b8f96 --- /dev/null +++ b/vendor/markbaker/matrix/buildPhar.php @@ -0,0 +1,62 @@ + 'Mark Baker ', + 'Description' => 'PHP Class for working with Matrix numbers', + 'Copyright' => 'Mark Baker (c) 2013-' . date('Y'), + 'Timestamp' => time(), + 'Version' => '0.1.0', + 'Date' => date('Y-m-d') +); + +// cleanup +if (file_exists($pharName)) { + echo "Removed: {$pharName}\n"; + unlink($pharName); +} + +echo "Building phar file...\n"; + +// the phar object +$phar = new Phar($pharName, null, 'Matrix'); +$phar->buildFromDirectory($sourceDir); +$phar->setStub( +<<<'EOT' +getMessage()); + exit(1); + } + + include 'phar://functions/sqrt.php'; + + __HALT_COMPILER(); +EOT +); +$phar->setMetadata($metaData); +$phar->compressFiles(Phar::GZ); + +echo "Complete.\n"; + +exit(); diff --git a/vendor/markbaker/matrix/classes/Autoloader.php b/vendor/markbaker/matrix/classes/Autoloader.php new file mode 100755 index 0000000..279d176 --- /dev/null +++ b/vendor/markbaker/matrix/classes/Autoloader.php @@ -0,0 +1,53 @@ +regex = $regex; + parent::__construct($it, $regex); + } +} + +class FilenameFilter extends FilesystemRegexFilter +{ + // Filter files against the regex + public function accept() + { + return (!$this->isFile() || preg_match($this->regex, $this->getFilename())); + } +} + + +$srcFolder = __DIR__ . DIRECTORY_SEPARATOR . 'src'; +$srcDirectory = new RecursiveDirectoryIterator($srcFolder); + +$filteredFileList = new FilenameFilter($srcDirectory, '/(?:php)$/i'); +$filteredFileList = new FilenameFilter($filteredFileList, '/^(?!.*(Matrix|Exception)\.php).*$/i'); + +foreach (new RecursiveIteratorIterator($filteredFileList) as $file) { + if ($file->isFile()) { + include_once $file; + } +} diff --git a/vendor/markbaker/matrix/classes/src/Builder.php b/vendor/markbaker/matrix/classes/src/Builder.php new file mode 100755 index 0000000..8d0116f --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/Builder.php @@ -0,0 +1,69 @@ +toArray(); + + for ($x = 0; $x < $dimensions; ++$x) { + $grid[$x][$x] = 1; + } + + return new Matrix($grid); + } +} diff --git a/vendor/markbaker/matrix/classes/src/Exception.php b/vendor/markbaker/matrix/classes/src/Exception.php new file mode 100755 index 0000000..55a428c --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/Exception.php @@ -0,0 +1,13 @@ +isSquare()) { + throw new Exception('Adjoint can only be calculated for a square matrix'); + } + + return self::getAdjoint($matrix); + } + + /** + * Calculate the cofactors of the matrix + * + * @param Matrix $matrix The matrix whose cofactors we wish to calculate + * @return Matrix + **/ + private static function getCofactors(Matrix $matrix) + { + $cofactors = self::getMinors($matrix); + $dimensions = $matrix->rows; + + $cof = 1; + for ($i = 0; $i < $dimensions; ++$i) { + $cofs = $cof; + for ($j = 0; $j < $dimensions; ++$j) { + $cofactors[$i][$j] *= $cofs; + $cofs = -$cofs; + } + $cof = -$cof; + } + + return new Matrix($cofactors); + } + + /** + * Return the cofactors of this matrix + * + * @param Matrix $matrix The matrix whose cofactors we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function cofactors(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Cofactors can only be calculated for a square matrix'); + } + + return self::getCofactors($matrix); + } + + private static function getDeterminantSegment(Matrix $matrix, $row, $column) + { + $tmpMatrix = $matrix->toArray(); + unset($tmpMatrix[$row]); + array_walk( + $tmpMatrix, + function (&$row) use ($column) { + unset($row[$column]); + } + ); + + return self::getDeterminant(new Matrix($tmpMatrix)); + } + + /** + * Calculate the determinant of the matrix + * + * @param Matrix $matrix The matrix whose determinant we wish to calculate + * @return float + **/ + private static function getDeterminant(Matrix $matrix) + { + $dimensions = $matrix->rows; + if ($dimensions == 1) { + return $matrix->getValue(1, 1); + } elseif ($dimensions == 2) { + return $matrix->getValue(1, 1) * $matrix->getValue(2, 2) - $matrix->getValue(1, 2) * $matrix->getValue(2, 1); + } + + $determinant = 0; + for ($i = 1; $i <= $dimensions; ++$i) { + $det = $matrix->getValue(1, $i) * self::getDeterminantSegment($matrix, 0, $i-1); + if (($i % 2) == 0) { + $determinant -= $det; + } else { + $determinant += $det; + } + } + + return $determinant; + } + + /** + * Return the determinant of this matrix + * + * @param Matrix $matrix The matrix whose determinant we wish to calculate + * @return float + * @throws Exception + **/ + public static function determinant(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Determinant can only be calculated for a square matrix'); + } + + return self::getDeterminant($matrix); + } + + /** + * Return the diagonal of this matrix + * + * @param Matrix $matrix The matrix whose diagonal we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function diagonal(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Diagonal can only be extracted from a square matrix'); + } + + $dimensions = $matrix->rows; + $grid = Builder::createFilledMatrix(0, $dimensions, $dimensions) + ->toArray(); + + for ($i = 0; $i < $dimensions; ++$i) { + $grid[$i][$i] = $matrix->getValue($i + 1, $i + 1); + } + + return new Matrix($grid); + } + + /** + * Return the antidiagonal of this matrix + * + * @param Matrix $matrix The matrix whose antidiagonal we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function antidiagonal(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Anti-Diagonal can only be extracted from a square matrix'); + } + + $dimensions = $matrix->rows; + $grid = Builder::createFilledMatrix(0, $dimensions, $dimensions) + ->toArray(); + + for ($i = 0; $i < $dimensions; ++$i) { + $grid[$i][$dimensions - $i - 1] = $matrix->getValue($i + 1, $dimensions - $i); + } + + return new Matrix($grid); + } + + /** + * Return the identity matrix + * The identity matrix, or sometimes ambiguously called a unit matrix, of size n is the n × n square matrix + * with ones on the main diagonal and zeros elsewhere + * + * @param Matrix $matrix The matrix whose identity we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function identity(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Identity can only be created for a square matrix'); + } + + $dimensions = $matrix->rows; + + return Builder::createIdentityMatrix($dimensions); + } + + /** + * Return the inverse of this matrix + * + * @param Matrix $matrix The matrix whose inverse we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function inverse(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Inverse can only be calculated for a square matrix'); + } + + $determinant = self::getDeterminant($matrix); + if ($determinant == 0.0) { + throw new Exception('Inverse can only be calculated for a matrix with a non-zero determinant'); + } + + if ($matrix->rows == 1) { + return new Matrix([[1 / $matrix->getValue(1, 1)]]); + } + + return self::getAdjoint($matrix) + ->multiply(1 / $determinant); + } + + /** + * Calculate the minors of the matrix + * + * @param Matrix $matrix The matrix whose minors we wish to calculate + * @return array[] + **/ + protected static function getMinors(Matrix $matrix) + { + $minors = $matrix->toArray(); + $dimensions = $matrix->rows; + if ($dimensions == 1) { + return $minors; + } + + for ($i = 0; $i < $dimensions; ++$i) { + for ($j = 0; $j < $dimensions; ++$j) { + $minors[$i][$j] = self::getDeterminantSegment($matrix, $i, $j); + } + } + + return $minors; + } + + /** + * Return the minors of the matrix + * The minor of a matrix A is the determinant of some smaller square matrix, cut down from A by removing one or + * more of its rows or columns. + * Minors obtained by removing just one row and one column from square matrices (first minors) are required for + * calculating matrix cofactors, which in turn are useful for computing both the determinant and inverse of + * square matrices. + * + * @param Matrix $matrix The matrix whose minors we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function minors(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Minors can only be calculated for a square matrix'); + } + + return new Matrix(self::getMinors($matrix)); + } + + /** + * Return the trace of this matrix + * The trace is defined as the sum of the elements on the main diagonal (the diagonal from the upper left to the lower right) + * of the matrix + * + * @param Matrix $matrix The matrix whose trace we wish to calculate + * @return float + * @throws Exception + **/ + public static function trace(Matrix $matrix) + { + if (!$matrix->isSquare()) { + throw new Exception('Trace can only be extracted from a square matrix'); + } + + $dimensions = $matrix->rows; + $result = 0; + for ($i = 1; $i <= $dimensions; ++$i) { + $result += $matrix->getValue($i, $i); + } + + return $result; + } + + /** + * Return the transpose of this matrix + * + * @param Matrix $matrix The matrix whose transpose we wish to calculate + * @return Matrix + * @throws Exception + **/ + public static function transpose(Matrix $matrix) + { + $grid = call_user_func_array( + 'array_map', + array_merge( + [null], + $matrix->toArray() + ) + ); + + return new Matrix($grid); + } +} diff --git a/vendor/markbaker/matrix/classes/src/Matrix.php b/vendor/markbaker/matrix/classes/src/Matrix.php new file mode 100755 index 0000000..c2a4594 --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/Matrix.php @@ -0,0 +1,403 @@ +buildFromArray(array_values($grid)); + } + + /* + * Create a new Matrix object from an array of values + * + * @param array $grid + */ + protected function buildFromArray(array $grid) + { + $this->rows = count($grid); + $columns = array_reduce( + $grid, + function ($carry, $value) { + return max($carry, is_array($value) ? count($value) : 1); + }, + 0 + ); + $this->columns = $columns; + + array_walk( + $grid, + function (&$value) use ($columns) { + if (!is_array($value)) { + $value = [$value]; + } + $value = array_pad(array_values($value), $columns, null); + } + ); + + $this->grid = $grid; + } + + /** + * Validate that a row number is a positive integer + * + * @param $row + * @return int + * @throws Exception + */ + public static function validateRow($row) + { + if ((!is_numeric($row)) || (intval($row) < 1)) { + throw new Exception('Invalid Row'); + } + + return (int) $row; + } + + /** + * Validate that a column number is a positive integer + * + * @param $column + * @return int + * @throws Exception + */ + public static function validateColumn($column) + { + if ((!is_numeric($column)) || (intval($column) < 1)) { + throw new Exception('Invalid Column'); + } + + return (int) $column; + } + + /** + * Validate that a row number falls within the set of rows for this matrix + * + * @param $row + * @return int + * @throws Exception + */ + protected function validateRowInRange($row) + { + $row = static::validateRow($row); + if ($row > $this->rows) { + throw new Exception('Requested Row exceeds matrix size'); + } + + return $row; + } + + /** + * Validate that a column number falls within the set of columns for this matrix + * + * @param $column + * @return int + * @throws Exception + */ + protected function validateColumnInRange($column) + { + $column = static::validateColumn($column); + if ($column > $this->columns) { + throw new Exception('Requested Column exceeds matrix size'); + } + + return $column; + } + + /** + * Return a new matrix as a subset of rows from this matrix, starting at row number $row, and $rowCount rows + * A $rowCount value of 0 will return all rows of the matrix from $row + * A negative $rowCount value will return rows until that many rows from the end of the matrix + * + * Note that row numbers start from 1, not from 0 + * + * @param $row + * @param int $rowCount + * @return static + * @throws Exception + */ + public function getRows($row, $rowCount = 1) + { + $row = $this->validateRowInRange($row); + if ($rowCount == 0) { + $rowCount = $this->rows - $row + 1; + } + + return new static(array_slice($this->grid, $row - 1, $rowCount)); + } + + /** + * Return a new matrix as a subset of columns from this matrix, starting at column number $column, and $columnCount columns + * A $columnCount value of 0 will return all columns of the matrix from $column + * A negative $columnCount value will return columns until that many columns from the end of the matrix + * + * Note that column numbers start from 1, not from 0 + * + * @param $column + * @param int $columnCount + * @return static + * @throws Exception + */ + public function getColumns($column, $columnCount = 1) + { + $column = $this->validateColumnInRange($column); + if ($columnCount < 1) { + $columnCount = $this->columns + $columnCount - $column + 1; + } + + $grid = []; + for ($i = $column - 1; $i < $column + $columnCount - 1; ++$i) { + $grid[] = array_column($this->grid, $i); + } + + return (new static($grid))->transpose(); + } + + /** + * Return a new matrix as a subset of rows from this matrix, dropping rows starting at row number $row, + * and $rowCount rows + * A negative $rowCount value will drop rows until that many rows from the end of the matrix + * A $rowCount value of 0 will remove all rows of the matrix from $row + * + * Note that row numbers start from 1, not from 0 + * + * @param $row + * @param int $rowCount + * @return static + * @throws Exception + */ + public function dropRows($row, $rowCount = 1) + { + $this->validateRowInRange($row); + if ($rowCount == 0) { + $rowCount = $this->rows - $row + 1; + } + + $grid = $this->grid; + array_splice($grid, $row - 1, $rowCount); + + return new static($grid); + } + + /** + * Return a new matrix as a subset of columns from this matrix, dropping columns starting at column number $column, + * and $columnCount columns + * A negative $columnCount value will drop columns until that many columns from the end of the matrix + * A $columnCount value of 0 will remove all columns of the matrix from $column + * + * Note that column numbers start from 1, not from 0 + * + * @param $column + * @param int $columnCount + * @return static + * @throws Exception + */ + public function dropColumns($column, $columnCount = 1) + { + $this->validateColumnInRange($column); + if ($columnCount < 1) { + $columnCount = $this->columns + $columnCount - $column + 1; + } + + $grid = $this->grid; + array_walk( + $grid, + function (&$row) use ($column, $columnCount) { + array_splice($row, $column - 1, $columnCount); + } + ); + + return new static($grid); + } + + /** + * Return a value from this matrix, from the "cell" identified by the row and column numbers + * Note that row and column numbers start from 1, not from 0 + * + * @param $row + * @param $column + * @return static + * @throws Exception + */ + public function getValue($row, $column) + { + $row = $this->validateRowInRange($row); + $column = $this->validateColumnInRange($column); + + return $this->grid[$row - 1][$column - 1]; + } + + /** + * Returns a Generator that will yield each row of the matrix in turn as a vector matrix + * or the value of each cell if the matrix is a vector + * + * @return \Generator|Matrix[]|mixed[] + */ + public function rows() + { + foreach ($this->grid as $i => $row) { + yield $i + 1 => ($this->columns == 1) + ? $row[0] + : new static([$row]); + } + } + + /** + * Returns a Generator that will yield each column of the matrix in turn as a vector matrix + * or the value of each cell if the matrix is a vector + * + * @return \Generator|Matrix[]|mixed[] + */ + public function columns() + { + for ($i = 0; $i < $this->columns; ++$i) { + yield $i + 1 => ($this->rows == 1) + ? $this->grid[0][$i] + : new static(array_column($this->grid, $i)); + } + } + + /** + * Identify if the row and column dimensions of this matrix are equal, + * i.e. if it is a "square" matrix + * + * @return bool + */ + public function isSquare() + { + return $this->rows == $this->columns; + } + + /** + * Identify if this matrix is a vector + * i.e. if it comprises only a single row or a single column + * + * @return bool + */ + public function isVector() + { + return $this->rows == 1 || $this->columns == 1; + } + + /** + * Return the matrix as a 2-dimensional array + * + * @return array + */ + public function toArray() + { + return $this->grid; + } + + protected static $getters = [ + 'rows', + 'columns', + ]; + + /** + * Access specific properties as read-only (no setters) + * + * @param $propertyName + * @return mixed + * @throws Exception + */ + public function __get($propertyName) + { + $propertyName = strtolower($propertyName); + + // Test for function calls + if (in_array($propertyName, self::$getters)) { + return $this->$propertyName; + } + + throw new Exception('Property does not exist'); + } + + protected static $functions = [ + 'antidiagonal', + 'adjoint', + 'cofactors', + 'determinant', + 'diagonal', + 'identity', + 'inverse', + 'minors', + 'trace', + 'transpose', + ]; + + protected static $operations = [ + 'add', + 'subtract', + 'multiply', + 'divideby', + 'divideinto', + 'directsum', + ]; + + /** + * Returns the result of the function call or operation + * + * @param string $functionName + * @param mixed[] $arguments + * @return Matrix|float + * @throws Exception|\InvalidArgumentException + */ + public function __call($functionName, $arguments) + { + $functionName = strtolower(str_replace('_', '', $functionName)); + + // Test for function calls + if (in_array($functionName, self::$functions)) { + $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; + return $functionName($this, ...$arguments); + } + // Test for operation calls + if (in_array($functionName, self::$operations)) { + $functionName = "\\" . __NAMESPACE__ . "\\{$functionName}"; + return $functionName($this, ...$arguments); + } + throw new Exception('Function or Operation does not exist'); + } +} diff --git a/vendor/markbaker/matrix/classes/src/Operators/Addition.php b/vendor/markbaker/matrix/classes/src/Operators/Addition.php new file mode 100755 index 0000000..e78c6d7 --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/Operators/Addition.php @@ -0,0 +1,68 @@ +addMatrix($value); + } elseif (is_numeric($value)) { + return $this->addScalar($value); + } + + throw new Exception('Invalid argument for addition'); + } + + /** + * Execute the addition for a scalar + * + * @param mixed $value The numeric value to add to the current base value + * @return $this The operation object, allowing multiple additions to be chained + **/ + protected function addScalar($value) + { + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] += $value; + } + } + + return $this; + } + + /** + * Execute the addition for a matrix + * + * @param Matrix $value The numeric value to add to the current base value + * @return $this The operation object, allowing multiple additions to be chained + * @throws Exception If the provided argument is not appropriate for the operation + **/ + protected function addMatrix(Matrix $value) + { + $this->validateMatchingDimensions($value); + + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] += $value->getValue($row + 1, $column + 1); + } + } + + return $this; + } +} diff --git a/vendor/markbaker/matrix/classes/src/Operators/DirectSum.php b/vendor/markbaker/matrix/classes/src/Operators/DirectSum.php new file mode 100755 index 0000000..bbf104a --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/Operators/DirectSum.php @@ -0,0 +1,65 @@ +directSumMatrix($value); + } + + throw new Exception('Invalid argument for addition'); + } + + /** + * Execute the direct sum for a matrix + * + * @param Matrix $value The numeric value to concatenate/direct sum with the current base value + * @return $this The operation object, allowing multiple additions to be chained + * @throws Exception If the provided argument is not appropriate for the operation + **/ + protected function directSumMatrix(Matrix $value) + { + $originalColumnCount = count($this->matrix[0]); + $originalRowCount = count($this->matrix); + $additionalColumnCount = $value->columns; + $additionalRowCount = $value->rows; + $value = $value->toArray(); + + for ($row = 0; $row < $this->rows; ++$row) { + $this->matrix[$row] = array_merge($this->matrix[$row], array_fill(0, $additionalColumnCount, 0)); + } + + $this->matrix = array_merge( + $this->matrix, + array_fill(0, $additionalRowCount, array_fill(0, $originalColumnCount, 0)) + ); + + for ($row = $originalRowCount; $row < $originalRowCount + $additionalRowCount; ++$row) { + array_splice( + $this->matrix[$row], + $originalColumnCount, + $additionalColumnCount, + $value[$row - $originalRowCount] + ); + } + + return $this; + } +} diff --git a/vendor/markbaker/matrix/classes/src/Operators/Division.php b/vendor/markbaker/matrix/classes/src/Operators/Division.php new file mode 100755 index 0000000..2a573f5 --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/Operators/Division.php @@ -0,0 +1,38 @@ +multiplyMatrix($value); + } elseif (is_numeric($value)) { + return $this->multiplyScalar(1 / $value); + } + + throw new Exception('Invalid argument for division'); + } +} diff --git a/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php b/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php new file mode 100755 index 0000000..63df162 --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/Operators/Multiplication.php @@ -0,0 +1,77 @@ +multiplyMatrix($value); + } elseif (is_numeric($value)) { + return $this->multiplyScalar($value); + } + + throw new Exception('Invalid argument for multiplication'); + } + + /** + * Execute the multiplication for a scalar + * + * @param mixed $value The numeric value to multiply with the current base value + * @return $this The operation object, allowing multiple mutiplications to be chained + **/ + protected function multiplyScalar($value) + { + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] *= $value; + } + } + + return $this; + } + + /** + * Execute the multiplication for a matrix + * + * @param Matrix $value The numeric value to multiply with the current base value + * @return $this The operation object, allowing multiple mutiplications to be chained + * @throws Exception If the provided argument is not appropriate for the operation + **/ + protected function multiplyMatrix(Matrix $value) + { + $this->validateReflectingDimensions($value); + + $newRows = $this->rows; + $newColumns = $value->columns; + $matrix = Builder::createFilledMatrix(0, $newRows, $newColumns) + ->toArray(); + for ($row = 0; $row < $newRows; ++$row) { + for ($column = 0; $column < $newColumns; ++$column) { + $columnData = $value->getColumns($column + 1)->toArray(); + foreach ($this->matrix[$row] as $key => $valueData) { + $matrix[$row][$column] += $valueData * $columnData[$key][0]; + } + } + } + $this->matrix = $matrix; + + return $this; + } +} diff --git a/vendor/markbaker/matrix/classes/src/Operators/Operator.php b/vendor/markbaker/matrix/classes/src/Operators/Operator.php new file mode 100755 index 0000000..87d3f3b --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/Operators/Operator.php @@ -0,0 +1,78 @@ +rows = $matrix->rows; + $this->columns = $matrix->columns; + $this->matrix = $matrix->toArray(); + } + + /** + * Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtraction + * + * @param Matrix $matrix The second Matrix object on which the operation will be performed + * @throws Exception + */ + protected function validateMatchingDimensions(Matrix $matrix) + { + if (($this->rows != $matrix->rows) || ($this->columns != $matrix->columns)) { + throw new Exception('Matrices have mismatched dimensions'); + } + } + + /** + * Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/division + * + * @param Matrix $matrix The second Matrix object on which the operation will be performed + * @throws Exception + */ + protected function validateReflectingDimensions(Matrix $matrix) + { + if ($this->columns != $matrix->rows) { + throw new Exception('Matrices have mismatched dimensions'); + } + } + + /** + * Return the result of the operation + * + * @return Matrix + */ + public function result() + { + return new Matrix($this->matrix); + } +} diff --git a/vendor/markbaker/matrix/classes/src/Operators/Subtraction.php b/vendor/markbaker/matrix/classes/src/Operators/Subtraction.php new file mode 100755 index 0000000..57c0b14 --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/Operators/Subtraction.php @@ -0,0 +1,68 @@ +subtractMatrix($value); + } elseif (is_numeric($value)) { + return $this->subtractScalar($value); + } + + throw new Exception('Invalid argument for subtraction'); + } + + /** + * Execute the subtraction for a scalar + * + * @param mixed $value The numeric value to subtracted from the current base value + * @return $this The operation object, allowing multiple additions to be chained + **/ + protected function subtractScalar($value) + { + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] -= $value; + } + } + + return $this; + } + + /** + * Execute the subtraction for a matrix + * + * @param Matrix $value The numeric value to subtract from the current base value + * @return $this The operation object, allowing multiple subtractions to be chained + * @throws Exception If the provided argument is not appropriate for the operation + **/ + protected function subtractMatrix(Matrix $value) + { + $this->validateMatchingDimensions($value); + + for ($row = 0; $row < $this->rows; ++$row) { + for ($column = 0; $column < $this->columns; ++$column) { + $this->matrix[$row][$column] -= $value->getValue($row + 1, $column + 1); + } + } + + return $this; + } +} diff --git a/vendor/markbaker/matrix/classes/src/functions/adjoint.php b/vendor/markbaker/matrix/classes/src/functions/adjoint.php new file mode 100755 index 0000000..d402833 --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/functions/adjoint.php @@ -0,0 +1,26 @@ +execute($matrix); + } + + return $result->result(); +} diff --git a/vendor/markbaker/matrix/classes/src/operations/directsum.php b/vendor/markbaker/matrix/classes/src/operations/directsum.php new file mode 100755 index 0000000..16001ce --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/operations/directsum.php @@ -0,0 +1,39 @@ +execute($matrix); + } + + return $result->result(); +} diff --git a/vendor/markbaker/matrix/classes/src/operations/divideby.php b/vendor/markbaker/matrix/classes/src/operations/divideby.php new file mode 100755 index 0000000..80a8f1b --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/operations/divideby.php @@ -0,0 +1,38 @@ +execute($matrix); + } + + return $result->result(); +} diff --git a/vendor/markbaker/matrix/classes/src/operations/divideinto.php b/vendor/markbaker/matrix/classes/src/operations/divideinto.php new file mode 100755 index 0000000..8a26b52 --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/operations/divideinto.php @@ -0,0 +1,39 @@ +execute($matrix); + } + + return $result->result(); +} diff --git a/vendor/markbaker/matrix/classes/src/operations/multiply.php b/vendor/markbaker/matrix/classes/src/operations/multiply.php new file mode 100755 index 0000000..be60d7a --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/operations/multiply.php @@ -0,0 +1,39 @@ +execute($matrix); + } + + return $result->result(); +} diff --git a/vendor/markbaker/matrix/classes/src/operations/subtract.php b/vendor/markbaker/matrix/classes/src/operations/subtract.php new file mode 100755 index 0000000..de61806 --- /dev/null +++ b/vendor/markbaker/matrix/classes/src/operations/subtract.php @@ -0,0 +1,39 @@ +execute($matrix); + } + + return $result->result(); +} diff --git a/vendor/markbaker/matrix/composer.json b/vendor/markbaker/matrix/composer.json new file mode 100755 index 0000000..6627bd2 --- /dev/null +++ b/vendor/markbaker/matrix/composer.json @@ -0,0 +1,68 @@ +{ + "name": "markbaker/matrix", + "type": "library", + "description": "PHP Class for working with matrices", + "keywords": ["matrix", "vector", "mathematics"], + "homepage": "https://github.com/MarkBaker/PHPMatrix", + "license": "MIT", + "authors": [ + { + "name": "Mark Baker", + "email": "mark@lange.demon.co.uk" + } + ], + "require": { + "php": "^5.6.0|^7.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.4.0", + "phpdocumentor/phpdocumentor":"2.*", + "phpmd/phpmd": "2.*", + "sebastian/phpcpd": "2.*", + "phploc/phploc": "2.*", + "squizlabs/php_codesniffer": "^3.3.0", + "phpcompatibility/php-compatibility": "^8.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3" + }, + "autoload": { + "psr-4": { + "Matrix\\": "classes/src/" + }, + "files": [ + "classes/src/functions/adjoint.php", + "classes/src/functions/antidiagonal.php", + "classes/src/functions/cofactors.php", + "classes/src/functions/determinant.php", + "classes/src/functions/diagonal.php", + "classes/src/functions/identity.php", + "classes/src/functions/inverse.php", + "classes/src/functions/minors.php", + "classes/src/functions/trace.php", + "classes/src/functions/transpose.php", + "classes/src/operations/add.php", + "classes/src/operations/directsum.php", + "classes/src/operations/subtract.php", + "classes/src/operations/multiply.php", + "classes/src/operations/divideby.php", + "classes/src/operations/divideinto.php" + ] + }, + "scripts": { + "style": [ + "phpcs --report-width=200 --report-summary --report-full classes/src/ --standard=PSR2 -n" + ], + "test": [ + "phpunit" + ], + "mess": [ + "phpmd classes/src/ xml codesize,unusedcode,design,naming -n" + ], + "lines": [ + "phploc classes/src/ -n" + ], + "cpd": [ + "phpcpd classes/src/ -n" + ] + }, + "minimum-stability": "dev" +} \ No newline at end of file diff --git a/vendor/markbaker/matrix/examples/test.php b/vendor/markbaker/matrix/examples/test.php new file mode 100755 index 0000000..d8b56dc --- /dev/null +++ b/vendor/markbaker/matrix/examples/test.php @@ -0,0 +1,19 @@ +directsum(new Matrix\Matrix($grid2)); + +var_dump($new); diff --git a/vendor/markbaker/matrix/license.md b/vendor/markbaker/matrix/license.md new file mode 100755 index 0000000..7329058 --- /dev/null +++ b/vendor/markbaker/matrix/license.md @@ -0,0 +1,25 @@ +The MIT License (MIT) +===================== + +Copyright © `2018` `Mark Baker` + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the “Software”), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/vendor/monolog/monolog/.php_cs b/vendor/monolog/monolog/.php_cs new file mode 100755 index 0000000..366ccd0 --- /dev/null +++ b/vendor/monolog/monolog/.php_cs @@ -0,0 +1,59 @@ + + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. +EOF; + +$finder = Symfony\CS\Finder::create() + ->files() + ->name('*.php') + ->exclude('Fixtures') + ->in(__DIR__.'/src') + ->in(__DIR__.'/tests') +; + +return Symfony\CS\Config::create() + ->setUsingCache(true) + //->setUsingLinter(false) + ->setRiskyAllowed(true) + ->setRules(array( + '@PSR2' => true, + 'binary_operator_spaces' => true, + 'blank_line_before_return' => true, + 'header_comment' => array('header' => $header), + 'include' => true, + 'long_array_syntax' => true, + 'method_separation' => true, + 'no_blank_lines_after_class_opening' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_blank_lines_between_uses' => true, + 'no_duplicate_semicolons' => true, + 'no_extra_consecutive_blank_lines' => true, + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_unused_imports' => true, + 'object_operator_without_whitespace' => true, + 'phpdoc_align' => true, + 'phpdoc_indent' => true, + 'phpdoc_no_access' => true, + 'phpdoc_no_package' => true, + 'phpdoc_order' => true, + 'phpdoc_scalar' => true, + 'phpdoc_trim' => true, + 'phpdoc_type_to_var' => true, + 'psr0' => true, + 'single_blank_line_before_namespace' => true, + 'spaces_cast' => true, + 'standardize_not_equals' => true, + 'ternary_operator_spaces' => true, + 'trailing_comma_in_multiline_array' => true, + 'whitespacy_lines' => true, + )) + ->finder($finder) +; diff --git a/vendor/monolog/monolog/CHANGELOG.md b/vendor/monolog/monolog/CHANGELOG.md new file mode 100755 index 0000000..bcf679c --- /dev/null +++ b/vendor/monolog/monolog/CHANGELOG.md @@ -0,0 +1,370 @@ +### 1.24.0 (2018-11-05) + + * Added a `ResettableInterface` in order to reset/reset/clear/flush handlers and processors + * Added a `ProcessorInterface` as an optional way to label a class as being a processor (mostly useful for autowiring dependency containers) + * Added a way to log signals being received using Monolog\SignalHandler + * Added ability to customize error handling at the Logger level using Logger::setExceptionHandler + * Added InsightOpsHandler to migrate users of the LogEntriesHandler + * Added protection to NormalizerHandler against circular and very deep structures, it now stops normalizing at a depth of 9 + * Added capture of stack traces to ErrorHandler when logging PHP errors + * Added RavenHandler support for a `contexts` context or extra key to forward that to Sentry's contexts + * Added forwarding of context info to FluentdFormatter + * Added SocketHandler::setChunkSize to override the default chunk size in case you must send large log lines to rsyslog for example + * Added ability to extend/override BrowserConsoleHandler + * Added SlackWebhookHandler::getWebhookUrl and SlackHandler::getToken to enable class extensibility + * Added SwiftMailerHandler::getSubjectFormatter to enable class extensibility + * Dropped official support for HHVM in test builds + * Fixed normalization of exception traces when call_user_func is used to avoid serializing objects and the data they contain + * Fixed naming of fields in Slack handler, all field names are now capitalized in all cases + * Fixed HipChatHandler bug where slack dropped messages randomly + * Fixed normalization of objects in Slack handlers + * Fixed support for PHP7's Throwable in NewRelicHandler + * Fixed race bug when StreamHandler sometimes incorrectly reported it failed to create a directory + * Fixed table row styling issues in HtmlFormatter + * Fixed RavenHandler dropping the message when logging exception + * Fixed WhatFailureGroupHandler skipping processors when using handleBatch + and implement it where possible + * Fixed display of anonymous class names + +### 1.23.0 (2017-06-19) + + * Improved SyslogUdpHandler's support for RFC5424 and added optional `$ident` argument + * Fixed GelfHandler truncation to be per field and not per message + * Fixed compatibility issue with PHP <5.3.6 + * Fixed support for headless Chrome in ChromePHPHandler + * Fixed support for latest Aws SDK in DynamoDbHandler + * Fixed support for SwiftMailer 6.0+ in SwiftMailerHandler + +### 1.22.1 (2017-03-13) + + * Fixed lots of minor issues in the new Slack integrations + * Fixed support for allowInlineLineBreaks in LineFormatter when formatting exception backtraces + +### 1.22.0 (2016-11-26) + + * Added SlackbotHandler and SlackWebhookHandler to set up Slack integration more easily + * Added MercurialProcessor to add mercurial revision and branch names to log records + * Added support for AWS SDK v3 in DynamoDbHandler + * Fixed fatal errors occuring when normalizing generators that have been fully consumed + * Fixed RollbarHandler to include a level (rollbar level), monolog_level (original name), channel and datetime (unix) + * Fixed RollbarHandler not flushing records automatically, calling close() explicitly is not necessary anymore + * Fixed SyslogUdpHandler to avoid sending empty frames + * Fixed a few PHP 7.0 and 7.1 compatibility issues + +### 1.21.0 (2016-07-29) + + * Break: Reverted the addition of $context when the ErrorHandler handles regular php errors from 1.20.0 as it was causing issues + * Added support for more formats in RotatingFileHandler::setFilenameFormat as long as they have Y, m and d in order + * Added ability to format the main line of text the SlackHandler sends by explictly setting a formatter on the handler + * Added information about SoapFault instances in NormalizerFormatter + * Added $handleOnlyReportedErrors option on ErrorHandler::registerErrorHandler (default true) to allow logging of all errors no matter the error_reporting level + +### 1.20.0 (2016-07-02) + + * Added FingersCrossedHandler::activate() to manually trigger the handler regardless of the activation policy + * Added StreamHandler::getUrl to retrieve the stream's URL + * Added ability to override addRow/addTitle in HtmlFormatter + * Added the $context to context information when the ErrorHandler handles a regular php error + * Deprecated RotatingFileHandler::setFilenameFormat to only support 3 formats: Y, Y-m and Y-m-d + * Fixed WhatFailureGroupHandler to work with PHP7 throwables + * Fixed a few minor bugs + +### 1.19.0 (2016-04-12) + + * Break: StreamHandler will not close streams automatically that it does not own. If you pass in a stream (not a path/url), then it will not close it for you. You can retrieve those using getStream() if needed + * Added DeduplicationHandler to remove duplicate records from notifications across multiple requests, useful for email or other notifications on errors + * Added ability to use `%message%` and other LineFormatter replacements in the subject line of emails sent with NativeMailHandler and SwiftMailerHandler + * Fixed HipChatHandler handling of long messages + +### 1.18.2 (2016-04-02) + + * Fixed ElasticaFormatter to use more precise dates + * Fixed GelfMessageFormatter sending too long messages + +### 1.18.1 (2016-03-13) + + * Fixed SlackHandler bug where slack dropped messages randomly + * Fixed RedisHandler issue when using with the PHPRedis extension + * Fixed AmqpHandler content-type being incorrectly set when using with the AMQP extension + * Fixed BrowserConsoleHandler regression + +### 1.18.0 (2016-03-01) + + * Added optional reduction of timestamp precision via `Logger->useMicrosecondTimestamps(false)`, disabling it gets you a bit of performance boost but reduces the precision to the second instead of microsecond + * Added possibility to skip some extra stack frames in IntrospectionProcessor if you have some library wrapping Monolog that is always adding frames + * Added `Logger->withName` to clone a logger (keeping all handlers) with a new name + * Added FluentdFormatter for the Fluentd unix socket protocol + * Added HandlerWrapper base class to ease the creation of handler wrappers, just extend it and override as needed + * Added support for replacing context sub-keys using `%context.*%` in LineFormatter + * Added support for `payload` context value in RollbarHandler + * Added setRelease to RavenHandler to describe the application version, sent with every log + * Added support for `fingerprint` context value in RavenHandler + * Fixed JSON encoding errors that would gobble up the whole log record, we now handle those more gracefully by dropping chars as needed + * Fixed write timeouts in SocketHandler and derivatives, set to 10sec by default, lower it with `setWritingTimeout()` + * Fixed PHP7 compatibility with regard to Exception/Throwable handling in a few places + +### 1.17.2 (2015-10-14) + + * Fixed ErrorHandler compatibility with non-Monolog PSR-3 loggers + * Fixed SlackHandler handling to use slack functionalities better + * Fixed SwiftMailerHandler bug when sending multiple emails they all had the same id + * Fixed 5.3 compatibility regression + +### 1.17.1 (2015-08-31) + + * Fixed RollbarHandler triggering PHP notices + +### 1.17.0 (2015-08-30) + + * Added support for `checksum` and `release` context/extra values in RavenHandler + * Added better support for exceptions in RollbarHandler + * Added UidProcessor::getUid + * Added support for showing the resource type in NormalizedFormatter + * Fixed IntrospectionProcessor triggering PHP notices + +### 1.16.0 (2015-08-09) + + * Added IFTTTHandler to notify ifttt.com triggers + * Added Logger::setHandlers() to allow setting/replacing all handlers + * Added $capSize in RedisHandler to cap the log size + * Fixed StreamHandler creation of directory to only trigger when the first log write happens + * Fixed bug in the handling of curl failures + * Fixed duplicate logging of fatal errors when both error and fatal error handlers are registered in monolog's ErrorHandler + * Fixed missing fatal errors records with handlers that need to be closed to flush log records + * Fixed TagProcessor::addTags support for associative arrays + +### 1.15.0 (2015-07-12) + + * Added addTags and setTags methods to change a TagProcessor + * Added automatic creation of directories if they are missing for a StreamHandler to open a log file + * Added retry functionality to Loggly, Cube and Mandrill handlers so they retry up to 5 times in case of network failure + * Fixed process exit code being incorrectly reset to 0 if ErrorHandler::registerExceptionHandler was used + * Fixed HTML/JS escaping in BrowserConsoleHandler + * Fixed JSON encoding errors being silently suppressed (PHP 5.5+ only) + +### 1.14.0 (2015-06-19) + + * Added PHPConsoleHandler to send record to Chrome's PHP Console extension and library + * Added support for objects implementing __toString in the NormalizerFormatter + * Added support for HipChat's v2 API in HipChatHandler + * Added Logger::setTimezone() to initialize the timezone monolog should use in case date.timezone isn't correct for your app + * Added an option to send formatted message instead of the raw record on PushoverHandler via ->useFormattedMessage(true) + * Fixed curl errors being silently suppressed + +### 1.13.1 (2015-03-09) + + * Fixed regression in HipChat requiring a new token to be created + +### 1.13.0 (2015-03-05) + + * Added Registry::hasLogger to check for the presence of a logger instance + * Added context.user support to RavenHandler + * Added HipChat API v2 support in the HipChatHandler + * Added NativeMailerHandler::addParameter to pass params to the mail() process + * Added context data to SlackHandler when $includeContextAndExtra is true + * Added ability to customize the Swift_Message per-email in SwiftMailerHandler + * Fixed SwiftMailerHandler to lazily create message instances if a callback is provided + * Fixed serialization of INF and NaN values in Normalizer and LineFormatter + +### 1.12.0 (2014-12-29) + + * Break: HandlerInterface::isHandling now receives a partial record containing only a level key. This was always the intent and does not break any Monolog handler but is strictly speaking a BC break and you should check if you relied on any other field in your own handlers. + * Added PsrHandler to forward records to another PSR-3 logger + * Added SamplingHandler to wrap around a handler and include only every Nth record + * Added MongoDBFormatter to support better storage with MongoDBHandler (it must be enabled manually for now) + * Added exception codes in the output of most formatters + * Added LineFormatter::includeStacktraces to enable exception stack traces in logs (uses more than one line) + * Added $useShortAttachment to SlackHandler to minify attachment size and $includeExtra to append extra data + * Added $host to HipChatHandler for users of private instances + * Added $transactionName to NewRelicHandler and support for a transaction_name context value + * Fixed MandrillHandler to avoid outputing API call responses + * Fixed some non-standard behaviors in SyslogUdpHandler + +### 1.11.0 (2014-09-30) + + * Break: The NewRelicHandler extra and context data are now prefixed with extra_ and context_ to avoid clashes. Watch out if you have scripts reading those from the API and rely on names + * Added WhatFailureGroupHandler to suppress any exception coming from the wrapped handlers and avoid chain failures if a logging service fails + * Added MandrillHandler to send emails via the Mandrillapp.com API + * Added SlackHandler to log records to a Slack.com account + * Added FleepHookHandler to log records to a Fleep.io account + * Added LogglyHandler::addTag to allow adding tags to an existing handler + * Added $ignoreEmptyContextAndExtra to LineFormatter to avoid empty [] at the end + * Added $useLocking to StreamHandler and RotatingFileHandler to enable flock() while writing + * Added support for PhpAmqpLib in the AmqpHandler + * Added FingersCrossedHandler::clear and BufferHandler::clear to reset them between batches in long running jobs + * Added support for adding extra fields from $_SERVER in the WebProcessor + * Fixed support for non-string values in PrsLogMessageProcessor + * Fixed SwiftMailer messages being sent with the wrong date in long running scripts + * Fixed minor PHP 5.6 compatibility issues + * Fixed BufferHandler::close being called twice + +### 1.10.0 (2014-06-04) + + * Added Logger::getHandlers() and Logger::getProcessors() methods + * Added $passthruLevel argument to FingersCrossedHandler to let it always pass some records through even if the trigger level is not reached + * Added support for extra data in NewRelicHandler + * Added $expandNewlines flag to the ErrorLogHandler to create multiple log entries when a message has multiple lines + +### 1.9.1 (2014-04-24) + + * Fixed regression in RotatingFileHandler file permissions + * Fixed initialization of the BufferHandler to make sure it gets flushed after receiving records + * Fixed ChromePHPHandler and FirePHPHandler's activation strategies to be more conservative + +### 1.9.0 (2014-04-20) + + * Added LogEntriesHandler to send logs to a LogEntries account + * Added $filePermissions to tweak file mode on StreamHandler and RotatingFileHandler + * Added $useFormatting flag to MemoryProcessor to make it send raw data in bytes + * Added support for table formatting in FirePHPHandler via the table context key + * Added a TagProcessor to add tags to records, and support for tags in RavenHandler + * Added $appendNewline flag to the JsonFormatter to enable using it when logging to files + * Added sound support to the PushoverHandler + * Fixed multi-threading support in StreamHandler + * Fixed empty headers issue when ChromePHPHandler received no records + * Fixed default format of the ErrorLogHandler + +### 1.8.0 (2014-03-23) + + * Break: the LineFormatter now strips newlines by default because this was a bug, set $allowInlineLineBreaks to true if you need them + * Added BrowserConsoleHandler to send logs to any browser's console via console.log() injection in the output + * Added FilterHandler to filter records and only allow those of a given list of levels through to the wrapped handler + * Added FlowdockHandler to send logs to a Flowdock account + * Added RollbarHandler to send logs to a Rollbar account + * Added HtmlFormatter to send prettier log emails with colors for each log level + * Added GitProcessor to add the current branch/commit to extra record data + * Added a Monolog\Registry class to allow easier global access to pre-configured loggers + * Added support for the new official graylog2/gelf-php lib for GelfHandler, upgrade if you can by replacing the mlehner/gelf-php requirement + * Added support for HHVM + * Added support for Loggly batch uploads + * Added support for tweaking the content type and encoding in NativeMailerHandler + * Added $skipClassesPartials to tweak the ignored classes in the IntrospectionProcessor + * Fixed batch request support in GelfHandler + +### 1.7.0 (2013-11-14) + + * Added ElasticSearchHandler to send logs to an Elastic Search server + * Added DynamoDbHandler and ScalarFormatter to send logs to Amazon's Dynamo DB + * Added SyslogUdpHandler to send logs to a remote syslogd server + * Added LogglyHandler to send logs to a Loggly account + * Added $level to IntrospectionProcessor so it only adds backtraces when needed + * Added $version to LogstashFormatter to allow using the new v1 Logstash format + * Added $appName to NewRelicHandler + * Added configuration of Pushover notification retries/expiry + * Added $maxColumnWidth to NativeMailerHandler to change the 70 chars default + * Added chainability to most setters for all handlers + * Fixed RavenHandler batch processing so it takes the message from the record with highest priority + * Fixed HipChatHandler batch processing so it sends all messages at once + * Fixed issues with eAccelerator + * Fixed and improved many small things + +### 1.6.0 (2013-07-29) + + * Added HipChatHandler to send logs to a HipChat chat room + * Added ErrorLogHandler to send logs to PHP's error_log function + * Added NewRelicHandler to send logs to NewRelic's service + * Added Monolog\ErrorHandler helper class to register a Logger as exception/error/fatal handler + * Added ChannelLevelActivationStrategy for the FingersCrossedHandler to customize levels by channel + * Added stack traces output when normalizing exceptions (json output & co) + * Added Monolog\Logger::API constant (currently 1) + * Added support for ChromePHP's v4.0 extension + * Added support for message priorities in PushoverHandler, see $highPriorityLevel and $emergencyLevel + * Added support for sending messages to multiple users at once with the PushoverHandler + * Fixed RavenHandler's support for batch sending of messages (when behind a Buffer or FingersCrossedHandler) + * Fixed normalization of Traversables with very large data sets, only the first 1000 items are shown now + * Fixed issue in RotatingFileHandler when an open_basedir restriction is active + * Fixed minor issues in RavenHandler and bumped the API to Raven 0.5.0 + * Fixed SyslogHandler issue when many were used concurrently with different facilities + +### 1.5.0 (2013-04-23) + + * Added ProcessIdProcessor to inject the PID in log records + * Added UidProcessor to inject a unique identifier to all log records of one request/run + * Added support for previous exceptions in the LineFormatter exception serialization + * Added Monolog\Logger::getLevels() to get all available levels + * Fixed ChromePHPHandler so it avoids sending headers larger than Chrome can handle + +### 1.4.1 (2013-04-01) + + * Fixed exception formatting in the LineFormatter to be more minimalistic + * Fixed RavenHandler's handling of context/extra data, requires Raven client >0.1.0 + * Fixed log rotation in RotatingFileHandler to work with long running scripts spanning multiple days + * Fixed WebProcessor array access so it checks for data presence + * Fixed Buffer, Group and FingersCrossed handlers to make use of their processors + +### 1.4.0 (2013-02-13) + + * Added RedisHandler to log to Redis via the Predis library or the phpredis extension + * Added ZendMonitorHandler to log to the Zend Server monitor + * Added the possibility to pass arrays of handlers and processors directly in the Logger constructor + * Added `$useSSL` option to the PushoverHandler which is enabled by default + * Fixed ChromePHPHandler and FirePHPHandler issue when multiple instances are used simultaneously + * Fixed header injection capability in the NativeMailHandler + +### 1.3.1 (2013-01-11) + + * Fixed LogstashFormatter to be usable with stream handlers + * Fixed GelfMessageFormatter levels on Windows + +### 1.3.0 (2013-01-08) + + * Added PSR-3 compliance, the `Monolog\Logger` class is now an instance of `Psr\Log\LoggerInterface` + * Added PsrLogMessageProcessor that you can selectively enable for full PSR-3 compliance + * Added LogstashFormatter (combine with SocketHandler or StreamHandler to send logs to Logstash) + * Added PushoverHandler to send mobile notifications + * Added CouchDBHandler and DoctrineCouchDBHandler + * Added RavenHandler to send data to Sentry servers + * Added support for the new MongoClient class in MongoDBHandler + * Added microsecond precision to log records' timestamps + * Added `$flushOnOverflow` param to BufferHandler to flush by batches instead of losing + the oldest entries + * Fixed normalization of objects with cyclic references + +### 1.2.1 (2012-08-29) + + * Added new $logopts arg to SyslogHandler to provide custom openlog options + * Fixed fatal error in SyslogHandler + +### 1.2.0 (2012-08-18) + + * Added AmqpHandler (for use with AMQP servers) + * Added CubeHandler + * Added NativeMailerHandler::addHeader() to send custom headers in mails + * Added the possibility to specify more than one recipient in NativeMailerHandler + * Added the possibility to specify float timeouts in SocketHandler + * Added NOTICE and EMERGENCY levels to conform with RFC 5424 + * Fixed the log records to use the php default timezone instead of UTC + * Fixed BufferHandler not being flushed properly on PHP fatal errors + * Fixed normalization of exotic resource types + * Fixed the default format of the SyslogHandler to avoid duplicating datetimes in syslog + +### 1.1.0 (2012-04-23) + + * Added Monolog\Logger::isHandling() to check if a handler will + handle the given log level + * Added ChromePHPHandler + * Added MongoDBHandler + * Added GelfHandler (for use with Graylog2 servers) + * Added SocketHandler (for use with syslog-ng for example) + * Added NormalizerFormatter + * Added the possibility to change the activation strategy of the FingersCrossedHandler + * Added possibility to show microseconds in logs + * Added `server` and `referer` to WebProcessor output + +### 1.0.2 (2011-10-24) + + * Fixed bug in IE with large response headers and FirePHPHandler + +### 1.0.1 (2011-08-25) + + * Added MemoryPeakUsageProcessor and MemoryUsageProcessor + * Added Monolog\Logger::getName() to get a logger's channel name + +### 1.0.0 (2011-07-06) + + * Added IntrospectionProcessor to get info from where the logger was called + * Fixed WebProcessor in CLI + +### 1.0.0-RC1 (2011-07-01) + + * Initial release diff --git a/vendor/monolog/monolog/LICENSE b/vendor/monolog/monolog/LICENSE new file mode 100755 index 0000000..1647321 --- /dev/null +++ b/vendor/monolog/monolog/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2011-2016 Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/monolog/monolog/README.md b/vendor/monolog/monolog/README.md new file mode 100755 index 0000000..d756944 --- /dev/null +++ b/vendor/monolog/monolog/README.md @@ -0,0 +1,94 @@ +# Monolog - Logging for PHP [![Build Status](https://img.shields.io/travis/Seldaek/monolog.svg)](https://travis-ci.org/Seldaek/monolog) + +[![Total Downloads](https://img.shields.io/packagist/dt/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) +[![Latest Stable Version](https://img.shields.io/packagist/v/monolog/monolog.svg)](https://packagist.org/packages/monolog/monolog) + + +Monolog sends your logs to files, sockets, inboxes, databases and various +web services. See the complete list of handlers below. Special handlers +allow you to build advanced logging strategies. + +This library implements the [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) +interface that you can type-hint against in your own libraries to keep +a maximum of interoperability. You can also use it in your applications to +make sure you can always use another compatible logger at a later time. +As of 1.11.0 Monolog public APIs will also accept PSR-3 log levels. +Internally Monolog still uses its own level scheme since it predates PSR-3. + +## Installation + +Install the latest version with + +```bash +$ composer require monolog/monolog +``` + +## Basic Usage + +```php +pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING)); + +// add records to the log +$log->addWarning('Foo'); +$log->addError('Bar'); +``` + +## Documentation + +- [Usage Instructions](doc/01-usage.md) +- [Handlers, Formatters and Processors](doc/02-handlers-formatters-processors.md) +- [Utility classes](doc/03-utilities.md) +- [Extending Monolog](doc/04-extending.md) + +## Third Party Packages + +Third party handlers, formatters and processors are +[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You +can also add your own there if you publish one. + +## About + +### Requirements + +- Monolog works with PHP 5.3 or above, and is also tested to work with HHVM. + +### Submitting bugs and feature requests + +Bugs and feature request are tracked on [GitHub](https://github.com/Seldaek/monolog/issues) + +### Framework Integrations + +- Frameworks and libraries using [PSR-3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) + can be used very easily with Monolog since it implements the interface. +- [Symfony2](http://symfony.com) comes out of the box with Monolog. +- [Silex](http://silex.sensiolabs.org/) comes out of the box with Monolog. +- [Laravel 4 & 5](http://laravel.com/) come out of the box with Monolog. +- [Lumen](http://lumen.laravel.com/) comes out of the box with Monolog. +- [PPI](http://www.ppi.io/) comes out of the box with Monolog. +- [CakePHP](http://cakephp.org/) is usable with Monolog via the [cakephp-monolog](https://github.com/jadb/cakephp-monolog) plugin. +- [Slim](http://www.slimframework.com/) is usable with Monolog via the [Slim-Monolog](https://github.com/Flynsarmy/Slim-Monolog) log writer. +- [XOOPS 2.6](http://xoops.org/) comes out of the box with Monolog. +- [Aura.Web_Project](https://github.com/auraphp/Aura.Web_Project) comes out of the box with Monolog. +- [Nette Framework](http://nette.org/en/) can be used with Monolog via [Kdyby/Monolog](https://github.com/Kdyby/Monolog) extension. +- [Proton Micro Framework](https://github.com/alexbilbie/Proton) comes out of the box with Monolog. + +### Author + +Jordi Boggiano - -
                            +See also the list of [contributors](https://github.com/Seldaek/monolog/contributors) which participated in this project. + +### License + +Monolog is licensed under the MIT License - see the `LICENSE` file for details + +### Acknowledgements + +This library is heavily inspired by Python's [Logbook](http://packages.python.org/Logbook/) +library, although most concepts have been adjusted to fit to the PHP world. diff --git a/vendor/monolog/monolog/composer.json b/vendor/monolog/monolog/composer.json new file mode 100755 index 0000000..3b0c880 --- /dev/null +++ b/vendor/monolog/monolog/composer.json @@ -0,0 +1,66 @@ +{ + "name": "monolog/monolog", + "description": "Sends your logs to files, sockets, inboxes, databases and various web services", + "keywords": ["log", "logging", "psr-3"], + "homepage": "http://github.com/Seldaek/monolog", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be" + } + ], + "require": { + "php": ">=5.3.0", + "psr/log": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.5", + "graylog2/gelf-php": "~1.0", + "sentry/sentry": "^0.13", + "ruflin/elastica": ">=0.90 <3.0", + "doctrine/couchdb": "~1.0@dev", + "aws/aws-sdk-php": "^2.4.9 || ^3.0", + "php-amqplib/php-amqplib": "~2.4", + "swiftmailer/swiftmailer": "^5.3|^6.0", + "php-console/php-console": "^3.1.3", + "phpunit/phpunit-mock-objects": "2.3.0", + "jakub-onderka/php-parallel-lint": "0.9" + }, + "_": "phpunit/phpunit-mock-objects required in 2.3.0 due to https://github.com/sebastianbergmann/phpunit-mock-objects/issues/223 - needs hhvm 3.8+ on travis", + "suggest": { + "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", + "sentry/sentry": "Allow sending log messages to a Sentry server", + "doctrine/couchdb": "Allow sending log messages to a CouchDB server", + "ruflin/elastica": "Allow sending log messages to an Elastic Search server", + "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", + "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-mongo": "Allow sending log messages to a MongoDB server", + "mongodb/mongodb": "Allow sending log messages to a MongoDB server via PHP Driver", + "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", + "rollbar/rollbar": "Allow sending log messages to Rollbar", + "php-console/php-console": "Allow sending log messages to Google Chrome" + }, + "autoload": { + "psr-4": {"Monolog\\": "src/Monolog"} + }, + "autoload-dev": { + "psr-4": {"Monolog\\": "tests/Monolog"} + }, + "provide": { + "psr/log-implementation": "1.0.0" + }, + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "scripts": { + "test": [ + "parallel-lint . --exclude vendor", + "phpunit" + ] + } +} diff --git a/vendor/monolog/monolog/doc/01-usage.md b/vendor/monolog/monolog/doc/01-usage.md new file mode 100755 index 0000000..8e2551f --- /dev/null +++ b/vendor/monolog/monolog/doc/01-usage.md @@ -0,0 +1,231 @@ +# Using Monolog + +- [Installation](#installation) +- [Core Concepts](#core-concepts) +- [Log Levels](#log-levels) +- [Configuring a logger](#configuring-a-logger) +- [Adding extra data in the records](#adding-extra-data-in-the-records) +- [Leveraging channels](#leveraging-channels) +- [Customizing the log format](#customizing-the-log-format) + +## Installation + +Monolog is available on Packagist ([monolog/monolog](http://packagist.org/packages/monolog/monolog)) +and as such installable via [Composer](http://getcomposer.org/). + +```bash +composer require monolog/monolog +``` + +If you do not use Composer, you can grab the code from GitHub, and use any +PSR-0 compatible autoloader (e.g. the [Symfony2 ClassLoader component](https://github.com/symfony/ClassLoader)) +to load Monolog classes. + +## Core Concepts + +Every `Logger` instance has a channel (name) and a stack of handlers. Whenever +you add a record to the logger, it traverses the handler stack. Each handler +decides whether it fully handled the record, and if so, the propagation of the +record ends there. + +This allows for flexible logging setups, for example having a `StreamHandler` at +the bottom of the stack that will log anything to disk, and on top of that add +a `MailHandler` that will send emails only when an error message is logged. +Handlers also have a `$bubble` property which defines whether they block the +record or not if they handled it. In this example, setting the `MailHandler`'s +`$bubble` argument to false means that records handled by the `MailHandler` will +not propagate to the `StreamHandler` anymore. + +You can create many `Logger`s, each defining a channel (e.g.: db, request, +router, ..) and each of them combining various handlers, which can be shared +or not. The channel is reflected in the logs and allows you to easily see or +filter records. + +Each Handler also has a Formatter, a default one with settings that make sense +will be created if you don't set one. The formatters normalize and format +incoming records so that they can be used by the handlers to output useful +information. + +Custom severity levels are not available. Only the eight +[RFC 5424](http://tools.ietf.org/html/rfc5424) levels (debug, info, notice, +warning, error, critical, alert, emergency) are present for basic filtering +purposes, but for sorting and other use cases that would require +flexibility, you should add Processors to the Logger that can add extra +information (tags, user ip, ..) to the records before they are handled. + +## Log Levels + +Monolog supports the logging levels described by [RFC 5424](http://tools.ietf.org/html/rfc5424). + +- **DEBUG** (100): Detailed debug information. + +- **INFO** (200): Interesting events. Examples: User logs in, SQL logs. + +- **NOTICE** (250): Normal but significant events. + +- **WARNING** (300): Exceptional occurrences that are not errors. Examples: + Use of deprecated APIs, poor use of an API, undesirable things that are not + necessarily wrong. + +- **ERROR** (400): Runtime errors that do not require immediate action but + should typically be logged and monitored. + +- **CRITICAL** (500): Critical conditions. Example: Application component + unavailable, unexpected exception. + +- **ALERT** (550): Action must be taken immediately. Example: Entire website + down, database unavailable, etc. This should trigger the SMS alerts and wake + you up. + +- **EMERGENCY** (600): Emergency: system is unusable. + +## Configuring a logger + +Here is a basic setup to log to a file and to firephp on the DEBUG level: + +```php +pushHandler(new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG)); +$logger->pushHandler(new FirePHPHandler()); + +// You can now use your logger +$logger->addInfo('My logger is now ready'); +``` + +Let's explain it. The first step is to create the logger instance which will +be used in your code. The argument is a channel name, which is useful when +you use several loggers (see below for more details about it). + +The logger itself does not know how to handle a record. It delegates it to +some handlers. The code above registers two handlers in the stack to allow +handling records in two different ways. + +Note that the FirePHPHandler is called first as it is added on top of the +stack. This allows you to temporarily add a logger with bubbling disabled if +you want to override other configured loggers. + +> If you use Monolog standalone and are looking for an easy way to +> configure many handlers, the [theorchard/monolog-cascade](https://github.com/theorchard/monolog-cascade) +> can help you build complex logging configs via PHP arrays, yaml or json configs. + +## Adding extra data in the records + +Monolog provides two different ways to add extra informations along the simple +textual message. + +### Using the logging context + +The first way is the context, allowing to pass an array of data along the +record: + +```php +addInfo('Adding a new user', array('username' => 'Seldaek')); +``` + +Simple handlers (like the StreamHandler for instance) will simply format +the array to a string but richer handlers can take advantage of the context +(FirePHP is able to display arrays in pretty way for instance). + +### Using processors + +The second way is to add extra data for all records by using a processor. +Processors can be any callable. They will get the record as parameter and +must return it after having eventually changed the `extra` part of it. Let's +write a processor adding some dummy data in the record: + +```php +pushProcessor(function ($record) { + $record['extra']['dummy'] = 'Hello world!'; + + return $record; +}); +``` + +Monolog provides some built-in processors that can be used in your project. +Look at the [dedicated chapter](https://github.com/Seldaek/monolog/blob/master/doc/02-handlers-formatters-processors.md#processors) for the list. + +> Tip: processors can also be registered on a specific handler instead of + the logger to apply only for this handler. + +## Leveraging channels + +Channels are a great way to identify to which part of the application a record +is related. This is useful in big applications (and is leveraged by +MonologBundle in Symfony2). + +Picture two loggers sharing a handler that writes to a single log file. +Channels would allow you to identify the logger that issued every record. +You can easily grep through the log files filtering this or that channel. + +```php +pushHandler($stream); +$logger->pushHandler($firephp); + +// Create a logger for the security-related stuff with a different channel +$securityLogger = new Logger('security'); +$securityLogger->pushHandler($stream); +$securityLogger->pushHandler($firephp); + +// Or clone the first one to only change the channel +$securityLogger = $logger->withName('security'); +``` + +## Customizing the log format + +In Monolog it's easy to customize the format of the logs written into files, +sockets, mails, databases and other handlers. Most of the handlers use the + +```php +$record['formatted'] +``` + +value to be automatically put into the log device. This value depends on the +formatter settings. You can choose between predefined formatter classes or +write your own (e.g. a multiline text file for human-readable output). + +To configure a predefined formatter class, just set it as the handler's field: + +```php +// the default date format is "Y-m-d H:i:s" +$dateFormat = "Y n j, g:i a"; +// the default output format is "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n" +$output = "%datetime% > %level_name% > %message% %context% %extra%\n"; +// finally, create a formatter +$formatter = new LineFormatter($output, $dateFormat); + +// Create a handler +$stream = new StreamHandler(__DIR__.'/my_app.log', Logger::DEBUG); +$stream->setFormatter($formatter); +// bind it to a logger object +$securityLogger = new Logger('security'); +$securityLogger->pushHandler($stream); +``` + +You may also reuse the same formatter between multiple handlers and share those +handlers between multiple loggers. + +[Handlers, Formatters and Processors](02-handlers-formatters-processors.md) → diff --git a/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md b/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md new file mode 100755 index 0000000..af45913 --- /dev/null +++ b/vendor/monolog/monolog/doc/02-handlers-formatters-processors.md @@ -0,0 +1,158 @@ +# Handlers, Formatters and Processors + +- [Handlers](#handlers) + - [Log to files and syslog](#log-to-files-and-syslog) + - [Send alerts and emails](#send-alerts-and-emails) + - [Log specific servers and networked logging](#log-specific-servers-and-networked-logging) + - [Logging in development](#logging-in-development) + - [Log to databases](#log-to-databases) + - [Wrappers / Special Handlers](#wrappers--special-handlers) +- [Formatters](#formatters) +- [Processors](#processors) +- [Third Party Packages](#third-party-packages) + +## Handlers + +### Log to files and syslog + +- _StreamHandler_: Logs records into any PHP stream, use this for log files. +- _RotatingFileHandler_: Logs records to a file and creates one logfile per day. + It will also delete files older than `$maxFiles`. You should use + [logrotate](http://linuxcommand.org/man_pages/logrotate8.html) for high profile + setups though, this is just meant as a quick and dirty solution. +- _SyslogHandler_: Logs records to the syslog. +- _ErrorLogHandler_: Logs records to PHP's + [`error_log()`](http://docs.php.net/manual/en/function.error-log.php) function. + +### Send alerts and emails + +- _NativeMailerHandler_: Sends emails using PHP's + [`mail()`](http://php.net/manual/en/function.mail.php) function. +- _SwiftMailerHandler_: Sends emails using a [`Swift_Mailer`](http://swiftmailer.org/) instance. +- _PushoverHandler_: Sends mobile notifications via the [Pushover](https://www.pushover.net/) API. +- _HipChatHandler_: Logs records to a [HipChat](http://hipchat.com) chat room using its API. +- _FlowdockHandler_: Logs records to a [Flowdock](https://www.flowdock.com/) account. +- _SlackHandler_: Logs records to a [Slack](https://www.slack.com/) account using the Slack API. +- _SlackbotHandler_: Logs records to a [Slack](https://www.slack.com/) account using the Slackbot incoming hook. +- _SlackWebhookHandler_: Logs records to a [Slack](https://www.slack.com/) account using Slack Webhooks. +- _MandrillHandler_: Sends emails via the Mandrill API using a [`Swift_Message`](http://swiftmailer.org/) instance. +- _FleepHookHandler_: Logs records to a [Fleep](https://fleep.io/) conversation using Webhooks. +- _IFTTTHandler_: Notifies an [IFTTT](https://ifttt.com/maker) trigger with the log channel, level name and message. + +### Log specific servers and networked logging + +- _SocketHandler_: Logs records to [sockets](http://php.net/fsockopen), use this + for UNIX and TCP sockets. See an [example](sockets.md). +- _AmqpHandler_: Logs records to an [amqp](http://www.amqp.org/) compatible + server. Requires the [php-amqp](http://pecl.php.net/package/amqp) extension (1.0+). +- _GelfHandler_: Logs records to a [Graylog2](http://www.graylog2.org) server. +- _CubeHandler_: Logs records to a [Cube](http://square.github.com/cube/) server. +- _RavenHandler_: Logs records to a [Sentry](http://getsentry.com/) server using + [raven](https://packagist.org/packages/raven/raven). +- _ZendMonitorHandler_: Logs records to the Zend Monitor present in Zend Server. +- _NewRelicHandler_: Logs records to a [NewRelic](http://newrelic.com/) application. +- _LogglyHandler_: Logs records to a [Loggly](http://www.loggly.com/) account. +- _RollbarHandler_: Logs records to a [Rollbar](https://rollbar.com/) account. +- _SyslogUdpHandler_: Logs records to a remote [Syslogd](http://www.rsyslog.com/) server. +- _LogEntriesHandler_: Logs records to a [LogEntries](http://logentries.com/) account. +- _InsightOpsHandler_: Logs records to a [InsightOps](https://www.rapid7.com/products/insightops/) account. + +### Logging in development + +- _FirePHPHandler_: Handler for [FirePHP](http://www.firephp.org/), providing + inline `console` messages within [FireBug](http://getfirebug.com/). +- _ChromePHPHandler_: Handler for [ChromePHP](http://www.chromephp.com/), providing + inline `console` messages within Chrome. +- _BrowserConsoleHandler_: Handler to send logs to browser's Javascript `console` with + no browser extension required. Most browsers supporting `console` API are supported. +- _PHPConsoleHandler_: Handler for [PHP Console](https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef), providing + inline `console` and notification popup messages within Chrome. + +### Log to databases + +- _RedisHandler_: Logs records to a [redis](http://redis.io) server. +- _MongoDBHandler_: Handler to write records in MongoDB via a + [Mongo](http://pecl.php.net/package/mongo) extension connection. +- _CouchDBHandler_: Logs records to a CouchDB server. +- _DoctrineCouchDBHandler_: Logs records to a CouchDB server via the Doctrine CouchDB ODM. +- _ElasticSearchHandler_: Logs records to an Elastic Search server. +- _DynamoDbHandler_: Logs records to a DynamoDB table with the [AWS SDK](https://github.com/aws/aws-sdk-php). + +### Wrappers / Special Handlers + +- _FingersCrossedHandler_: A very interesting wrapper. It takes a logger as + parameter and will accumulate log records of all levels until a record + exceeds the defined severity level. At which point it delivers all records, + including those of lower severity, to the handler it wraps. This means that + until an error actually happens you will not see anything in your logs, but + when it happens you will have the full information, including debug and info + records. This provides you with all the information you need, but only when + you need it. +- _DeduplicationHandler_: Useful if you are sending notifications or emails + when critical errors occur. It takes a logger as parameter and will + accumulate log records of all levels until the end of the request (or + `flush()` is called). At that point it delivers all records to the handler + it wraps, but only if the records are unique over a given time period + (60seconds by default). If the records are duplicates they are simply + discarded. The main use of this is in case of critical failure like if your + database is unreachable for example all your requests will fail and that + can result in a lot of notifications being sent. Adding this handler reduces + the amount of notifications to a manageable level. +- _WhatFailureGroupHandler_: This handler extends the _GroupHandler_ ignoring + exceptions raised by each child handler. This allows you to ignore issues + where a remote tcp connection may have died but you do not want your entire + application to crash and may wish to continue to log to other handlers. +- _BufferHandler_: This handler will buffer all the log records it receives + until `close()` is called at which point it will call `handleBatch()` on the + handler it wraps with all the log messages at once. This is very useful to + send an email with all records at once for example instead of having one mail + for every log record. +- _GroupHandler_: This handler groups other handlers. Every record received is + sent to all the handlers it is configured with. +- _FilterHandler_: This handler only lets records of the given levels through + to the wrapped handler. +- _SamplingHandler_: Wraps around another handler and lets you sample records + if you only want to store some of them. +- _NullHandler_: Any record it can handle will be thrown away. This can be used + to put on top of an existing handler stack to disable it temporarily. +- _PsrHandler_: Can be used to forward log records to an existing PSR-3 logger +- _TestHandler_: Used for testing, it records everything that is sent to it and + has accessors to read out the information. +- _HandlerWrapper_: A simple handler wrapper you can inherit from to create + your own wrappers easily. + +## Formatters + +- _LineFormatter_: Formats a log record into a one-line string. +- _HtmlFormatter_: Used to format log records into a human readable html table, mainly suitable for emails. +- _NormalizerFormatter_: Normalizes objects/resources down to strings so a record can easily be serialized/encoded. +- _ScalarFormatter_: Used to format log records into an associative array of scalar values. +- _JsonFormatter_: Encodes a log record into json. +- _WildfireFormatter_: Used to format log records into the Wildfire/FirePHP protocol, only useful for the FirePHPHandler. +- _ChromePHPFormatter_: Used to format log records into the ChromePHP format, only useful for the ChromePHPHandler. +- _GelfMessageFormatter_: Used to format log records into Gelf message instances, only useful for the GelfHandler. +- _LogstashFormatter_: Used to format log records into [logstash](http://logstash.net/) event json, useful for any handler listed under inputs [here](http://logstash.net/docs/latest). +- _ElasticaFormatter_: Used to format log records into an Elastica\Document object, only useful for the ElasticSearchHandler. +- _LogglyFormatter_: Used to format log records into Loggly messages, only useful for the LogglyHandler. +- _FlowdockFormatter_: Used to format log records into Flowdock messages, only useful for the FlowdockHandler. +- _MongoDBFormatter_: Converts \DateTime instances to \MongoDate and objects recursively to arrays, only useful with the MongoDBHandler. + +## Processors + +- _PsrLogMessageProcessor_: Processes a log record's message according to PSR-3 rules, replacing `{foo}` with the value from `$context['foo']`. +- _IntrospectionProcessor_: Adds the line/file/class/method from which the log call originated. +- _WebProcessor_: Adds the current request URI, request method and client IP to a log record. +- _MemoryUsageProcessor_: Adds the current memory usage to a log record. +- _MemoryPeakUsageProcessor_: Adds the peak memory usage to a log record. +- _ProcessIdProcessor_: Adds the process id to a log record. +- _UidProcessor_: Adds a unique identifier to a log record. +- _GitProcessor_: Adds the current git branch and commit to a log record. +- _TagProcessor_: Adds an array of predefined tags to a log record. + +## Third Party Packages + +Third party handlers, formatters and processors are +[listed in the wiki](https://github.com/Seldaek/monolog/wiki/Third-Party-Packages). You +can also add your own there if you publish one. + +← [Usage](01-usage.md) | [Utility classes](03-utilities.md) → diff --git a/vendor/monolog/monolog/doc/03-utilities.md b/vendor/monolog/monolog/doc/03-utilities.md new file mode 100755 index 0000000..fd3fd0e --- /dev/null +++ b/vendor/monolog/monolog/doc/03-utilities.md @@ -0,0 +1,15 @@ +# Utilities + +- _Registry_: The `Monolog\Registry` class lets you configure global loggers that you + can then statically access from anywhere. It is not really a best practice but can + help in some older codebases or for ease of use. +- _ErrorHandler_: The `Monolog\ErrorHandler` class allows you to easily register + a Logger instance as an exception handler, error handler or fatal error handler. +- _SignalHandler_: The `Monolog\SignalHandler` class allows you to easily register + a Logger instance as a POSIX signal handler. +- _ErrorLevelActivationStrategy_: Activates a FingersCrossedHandler when a certain log + level is reached. +- _ChannelLevelActivationStrategy_: Activates a FingersCrossedHandler when a certain + log level is reached, depending on which channel received the log record. + +← [Handlers, Formatters and Processors](02-handlers-formatters-processors.md) | [Extending Monolog](04-extending.md) → diff --git a/vendor/monolog/monolog/doc/04-extending.md b/vendor/monolog/monolog/doc/04-extending.md new file mode 100755 index 0000000..ebd9104 --- /dev/null +++ b/vendor/monolog/monolog/doc/04-extending.md @@ -0,0 +1,76 @@ +# Extending Monolog + +Monolog is fully extensible, allowing you to adapt your logger to your needs. + +## Writing your own handler + +Monolog provides many built-in handlers. But if the one you need does not +exist, you can write it and use it in your logger. The only requirement is +to implement `Monolog\Handler\HandlerInterface`. + +Let's write a PDOHandler to log records to a database. We will extend the +abstract class provided by Monolog to keep things DRY. + +```php +pdo = $pdo; + parent::__construct($level, $bubble); + } + + protected function write(array $record) + { + if (!$this->initialized) { + $this->initialize(); + } + + $this->statement->execute(array( + 'channel' => $record['channel'], + 'level' => $record['level'], + 'message' => $record['formatted'], + 'time' => $record['datetime']->format('U'), + )); + } + + private function initialize() + { + $this->pdo->exec( + 'CREATE TABLE IF NOT EXISTS monolog ' + .'(channel VARCHAR(255), level INTEGER, message LONGTEXT, time INTEGER UNSIGNED)' + ); + $this->statement = $this->pdo->prepare( + 'INSERT INTO monolog (channel, level, message, time) VALUES (:channel, :level, :message, :time)' + ); + + $this->initialized = true; + } +} +``` + +You can now use this handler in your logger: + +```php +pushHandler(new PDOHandler(new PDO('sqlite:logs.sqlite'))); + +// You can now use your logger +$logger->addInfo('My logger is now ready'); +``` + +The `Monolog\Handler\AbstractProcessingHandler` class provides most of the +logic needed for the handler, including the use of processors and the formatting +of the record (which is why we use ``$record['formatted']`` instead of ``$record['message']``). + +← [Utility classes](03-utilities.md) diff --git a/vendor/monolog/monolog/doc/sockets.md b/vendor/monolog/monolog/doc/sockets.md new file mode 100755 index 0000000..ea9cf0e --- /dev/null +++ b/vendor/monolog/monolog/doc/sockets.md @@ -0,0 +1,39 @@ +Sockets Handler +=============== + +This handler allows you to write your logs to sockets using [fsockopen](http://php.net/fsockopen) +or [pfsockopen](http://php.net/pfsockopen). + +Persistent sockets are mainly useful in web environments where you gain some performance not closing/opening +the connections between requests. + +You can use a `unix://` prefix to access unix sockets and `udp://` to open UDP sockets instead of the default TCP. + +Basic Example +------------- + +```php +setPersistent(true); + +// Now add the handler +$logger->pushHandler($handler, Logger::DEBUG); + +// You can now use your logger +$logger->addInfo('My logger is now ready'); + +``` + +In this example, using syslog-ng, you should see the log on the log server: + + cweb1 [2012-02-26 00:12:03] my_logger.INFO: My logger is now ready [] [] + diff --git a/vendor/monolog/monolog/phpunit.xml.dist b/vendor/monolog/monolog/phpunit.xml.dist new file mode 100755 index 0000000..20d82b6 --- /dev/null +++ b/vendor/monolog/monolog/phpunit.xml.dist @@ -0,0 +1,19 @@ + + + + + + tests/Monolog/ + + + + + + src/Monolog/ + + + + + + + diff --git a/vendor/monolog/monolog/src/Monolog/ErrorHandler.php b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php new file mode 100755 index 0000000..adc55bd --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/ErrorHandler.php @@ -0,0 +1,239 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Psr\Log\LoggerInterface; +use Psr\Log\LogLevel; +use Monolog\Handler\AbstractHandler; +use Monolog\Registry; + +/** + * Monolog error handler + * + * A facility to enable logging of runtime errors, exceptions and fatal errors. + * + * Quick setup: ErrorHandler::register($logger); + * + * @author Jordi Boggiano + */ +class ErrorHandler +{ + private $logger; + + private $previousExceptionHandler; + private $uncaughtExceptionLevel; + + private $previousErrorHandler; + private $errorLevelMap; + private $handleOnlyReportedErrors; + + private $hasFatalErrorHandler; + private $fatalLevel; + private $reservedMemory; + private $lastFatalTrace; + private static $fatalErrors = array(E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR); + + public function __construct(LoggerInterface $logger) + { + $this->logger = $logger; + } + + /** + * Registers a new ErrorHandler for a given Logger + * + * By default it will handle errors, exceptions and fatal errors + * + * @param LoggerInterface $logger + * @param array|false $errorLevelMap an array of E_* constant to LogLevel::* constant mapping, or false to disable error handling + * @param int|false $exceptionLevel a LogLevel::* constant, or false to disable exception handling + * @param int|false $fatalLevel a LogLevel::* constant, or false to disable fatal error handling + * @return ErrorHandler + */ + public static function register(LoggerInterface $logger, $errorLevelMap = array(), $exceptionLevel = null, $fatalLevel = null) + { + //Forces the autoloader to run for LogLevel. Fixes an autoload issue at compile-time on PHP5.3. See https://github.com/Seldaek/monolog/pull/929 + class_exists('\\Psr\\Log\\LogLevel', true); + + $handler = new static($logger); + if ($errorLevelMap !== false) { + $handler->registerErrorHandler($errorLevelMap); + } + if ($exceptionLevel !== false) { + $handler->registerExceptionHandler($exceptionLevel); + } + if ($fatalLevel !== false) { + $handler->registerFatalHandler($fatalLevel); + } + + return $handler; + } + + public function registerExceptionHandler($level = null, $callPrevious = true) + { + $prev = set_exception_handler(array($this, 'handleException')); + $this->uncaughtExceptionLevel = $level; + if ($callPrevious && $prev) { + $this->previousExceptionHandler = $prev; + } + } + + public function registerErrorHandler(array $levelMap = array(), $callPrevious = true, $errorTypes = -1, $handleOnlyReportedErrors = true) + { + $prev = set_error_handler(array($this, 'handleError'), $errorTypes); + $this->errorLevelMap = array_replace($this->defaultErrorLevelMap(), $levelMap); + if ($callPrevious) { + $this->previousErrorHandler = $prev ?: true; + } + + $this->handleOnlyReportedErrors = $handleOnlyReportedErrors; + } + + public function registerFatalHandler($level = null, $reservedMemorySize = 20) + { + register_shutdown_function(array($this, 'handleFatalError')); + + $this->reservedMemory = str_repeat(' ', 1024 * $reservedMemorySize); + $this->fatalLevel = $level; + $this->hasFatalErrorHandler = true; + } + + protected function defaultErrorLevelMap() + { + return array( + E_ERROR => LogLevel::CRITICAL, + E_WARNING => LogLevel::WARNING, + E_PARSE => LogLevel::ALERT, + E_NOTICE => LogLevel::NOTICE, + E_CORE_ERROR => LogLevel::CRITICAL, + E_CORE_WARNING => LogLevel::WARNING, + E_COMPILE_ERROR => LogLevel::ALERT, + E_COMPILE_WARNING => LogLevel::WARNING, + E_USER_ERROR => LogLevel::ERROR, + E_USER_WARNING => LogLevel::WARNING, + E_USER_NOTICE => LogLevel::NOTICE, + E_STRICT => LogLevel::NOTICE, + E_RECOVERABLE_ERROR => LogLevel::ERROR, + E_DEPRECATED => LogLevel::NOTICE, + E_USER_DEPRECATED => LogLevel::NOTICE, + ); + } + + /** + * @private + */ + public function handleException($e) + { + $this->logger->log( + $this->uncaughtExceptionLevel === null ? LogLevel::ERROR : $this->uncaughtExceptionLevel, + sprintf('Uncaught Exception %s: "%s" at %s line %s', Utils::getClass($e), $e->getMessage(), $e->getFile(), $e->getLine()), + array('exception' => $e) + ); + + if ($this->previousExceptionHandler) { + call_user_func($this->previousExceptionHandler, $e); + } + + exit(255); + } + + /** + * @private + */ + public function handleError($code, $message, $file = '', $line = 0, $context = array()) + { + if ($this->handleOnlyReportedErrors && !(error_reporting() & $code)) { + return; + } + + // fatal error codes are ignored if a fatal error handler is present as well to avoid duplicate log entries + if (!$this->hasFatalErrorHandler || !in_array($code, self::$fatalErrors, true)) { + $level = isset($this->errorLevelMap[$code]) ? $this->errorLevelMap[$code] : LogLevel::CRITICAL; + $this->logger->log($level, self::codeToString($code).': '.$message, array('code' => $code, 'message' => $message, 'file' => $file, 'line' => $line)); + } else { + // http://php.net/manual/en/function.debug-backtrace.php + // As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added. + // Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'. + $trace = debug_backtrace((PHP_VERSION_ID < 50306) ? 2 : DEBUG_BACKTRACE_IGNORE_ARGS); + array_shift($trace); // Exclude handleError from trace + $this->lastFatalTrace = $trace; + } + + if ($this->previousErrorHandler === true) { + return false; + } elseif ($this->previousErrorHandler) { + return call_user_func($this->previousErrorHandler, $code, $message, $file, $line, $context); + } + } + + /** + * @private + */ + public function handleFatalError() + { + $this->reservedMemory = null; + + $lastError = error_get_last(); + if ($lastError && in_array($lastError['type'], self::$fatalErrors, true)) { + $this->logger->log( + $this->fatalLevel === null ? LogLevel::ALERT : $this->fatalLevel, + 'Fatal Error ('.self::codeToString($lastError['type']).'): '.$lastError['message'], + array('code' => $lastError['type'], 'message' => $lastError['message'], 'file' => $lastError['file'], 'line' => $lastError['line'], 'trace' => $this->lastFatalTrace) + ); + + if ($this->logger instanceof Logger) { + foreach ($this->logger->getHandlers() as $handler) { + if ($handler instanceof AbstractHandler) { + $handler->close(); + } + } + } + } + } + + private static function codeToString($code) + { + switch ($code) { + case E_ERROR: + return 'E_ERROR'; + case E_WARNING: + return 'E_WARNING'; + case E_PARSE: + return 'E_PARSE'; + case E_NOTICE: + return 'E_NOTICE'; + case E_CORE_ERROR: + return 'E_CORE_ERROR'; + case E_CORE_WARNING: + return 'E_CORE_WARNING'; + case E_COMPILE_ERROR: + return 'E_COMPILE_ERROR'; + case E_COMPILE_WARNING: + return 'E_COMPILE_WARNING'; + case E_USER_ERROR: + return 'E_USER_ERROR'; + case E_USER_WARNING: + return 'E_USER_WARNING'; + case E_USER_NOTICE: + return 'E_USER_NOTICE'; + case E_STRICT: + return 'E_STRICT'; + case E_RECOVERABLE_ERROR: + return 'E_RECOVERABLE_ERROR'; + case E_DEPRECATED: + return 'E_DEPRECATED'; + case E_USER_DEPRECATED: + return 'E_USER_DEPRECATED'; + } + + return 'Unknown PHP error'; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php new file mode 100755 index 0000000..9beda1e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/ChromePHPFormatter.php @@ -0,0 +1,78 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +/** + * Formats a log message according to the ChromePHP array format + * + * @author Christophe Coevoet + */ +class ChromePHPFormatter implements FormatterInterface +{ + /** + * Translates Monolog log levels to Wildfire levels. + */ + private $logLevels = array( + Logger::DEBUG => 'log', + Logger::INFO => 'info', + Logger::NOTICE => 'info', + Logger::WARNING => 'warn', + Logger::ERROR => 'error', + Logger::CRITICAL => 'error', + Logger::ALERT => 'error', + Logger::EMERGENCY => 'error', + ); + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + // Retrieve the line and file if set and remove them from the formatted extra + $backtrace = 'unknown'; + if (isset($record['extra']['file'], $record['extra']['line'])) { + $backtrace = $record['extra']['file'].' : '.$record['extra']['line']; + unset($record['extra']['file'], $record['extra']['line']); + } + + $message = array('message' => $record['message']); + if ($record['context']) { + $message['context'] = $record['context']; + } + if ($record['extra']) { + $message['extra'] = $record['extra']; + } + if (count($message) === 1) { + $message = reset($message); + } + + return array( + $record['channel'], + $message, + $backtrace, + $this->logLevels[$record['level']], + ); + } + + public function formatBatch(array $records) + { + $formatted = array(); + + foreach ($records as $record) { + $formatted[] = $this->format($record); + } + + return $formatted; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php new file mode 100755 index 0000000..4c556cf --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/ElasticaFormatter.php @@ -0,0 +1,89 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Elastica\Document; + +/** + * Format a log message into an Elastica Document + * + * @author Jelle Vink + */ +class ElasticaFormatter extends NormalizerFormatter +{ + /** + * @var string Elastic search index name + */ + protected $index; + + /** + * @var string Elastic search document type + */ + protected $type; + + /** + * @param string $index Elastic Search index name + * @param string $type Elastic Search document type + */ + public function __construct($index, $type) + { + // elasticsearch requires a ISO 8601 format date with optional millisecond precision. + parent::__construct('Y-m-d\TH:i:s.uP'); + + $this->index = $index; + $this->type = $type; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $record = parent::format($record); + + return $this->getDocument($record); + } + + /** + * Getter index + * @return string + */ + public function getIndex() + { + return $this->index; + } + + /** + * Getter type + * @return string + */ + public function getType() + { + return $this->type; + } + + /** + * Convert a log message into an Elastica Document + * + * @param array $record Log message + * @return Document + */ + protected function getDocument($record) + { + $document = new Document(); + $document->setData($record); + $document->setType($this->type); + $document->setIndex($this->index); + + return $document; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php new file mode 100755 index 0000000..5094af3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FlowdockFormatter.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * formats the record to be used in the FlowdockHandler + * + * @author Dominik Liebler + */ +class FlowdockFormatter implements FormatterInterface +{ + /** + * @var string + */ + private $source; + + /** + * @var string + */ + private $sourceEmail; + + /** + * @param string $source + * @param string $sourceEmail + */ + public function __construct($source, $sourceEmail) + { + $this->source = $source; + $this->sourceEmail = $sourceEmail; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $tags = array( + '#logs', + '#' . strtolower($record['level_name']), + '#' . $record['channel'], + ); + + foreach ($record['extra'] as $value) { + $tags[] = '#' . $value; + } + + $subject = sprintf( + 'in %s: %s - %s', + $this->source, + $record['level_name'], + $this->getShortMessage($record['message']) + ); + + $record['flowdock'] = array( + 'source' => $this->source, + 'from_address' => $this->sourceEmail, + 'subject' => $subject, + 'content' => $record['message'], + 'tags' => $tags, + 'project' => $this->source, + ); + + return $record; + } + + /** + * {@inheritdoc} + */ + public function formatBatch(array $records) + { + $formatted = array(); + + foreach ($records as $record) { + $formatted[] = $this->format($record); + } + + return $formatted; + } + + /** + * @param string $message + * + * @return string + */ + public function getShortMessage($message) + { + static $hasMbString; + + if (null === $hasMbString) { + $hasMbString = function_exists('mb_strlen'); + } + + $maxLength = 45; + + if ($hasMbString) { + if (mb_strlen($message, 'UTF-8') > $maxLength) { + $message = mb_substr($message, 0, $maxLength - 4, 'UTF-8') . ' ...'; + } + } else { + if (strlen($message) > $maxLength) { + $message = substr($message, 0, $maxLength - 4) . ' ...'; + } + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php new file mode 100755 index 0000000..46a91ff --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FluentdFormatter.php @@ -0,0 +1,86 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Class FluentdFormatter + * + * Serializes a log message to Fluentd unix socket protocol + * + * Fluentd config: + * + * + * type unix + * path /var/run/td-agent/td-agent.sock + * + * + * Monolog setup: + * + * $logger = new Monolog\Logger('fluent.tag'); + * $fluentHandler = new Monolog\Handler\SocketHandler('unix:///var/run/td-agent/td-agent.sock'); + * $fluentHandler->setFormatter(new Monolog\Formatter\FluentdFormatter()); + * $logger->pushHandler($fluentHandler); + * + * @author Andrius Putna + */ +class FluentdFormatter implements FormatterInterface +{ + /** + * @var bool $levelTag should message level be a part of the fluentd tag + */ + protected $levelTag = false; + + public function __construct($levelTag = false) + { + if (!function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s FluentdUnixFormatter'); + } + + $this->levelTag = (bool) $levelTag; + } + + public function isUsingLevelsInTag() + { + return $this->levelTag; + } + + public function format(array $record) + { + $tag = $record['channel']; + if ($this->levelTag) { + $tag .= '.' . strtolower($record['level_name']); + } + + $message = array( + 'message' => $record['message'], + 'context' => $record['context'], + 'extra' => $record['extra'], + ); + + if (!$this->levelTag) { + $message['level'] = $record['level']; + $message['level_name'] = $record['level_name']; + } + + return json_encode(array($tag, $record['datetime']->getTimestamp(), $message)); + } + + public function formatBatch(array $records) + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php new file mode 100755 index 0000000..b5de751 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/FormatterInterface.php @@ -0,0 +1,36 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Interface for formatters + * + * @author Jordi Boggiano + */ +interface FormatterInterface +{ + /** + * Formats a log record. + * + * @param array $record A record to format + * @return mixed The formatted record + */ + public function format(array $record); + + /** + * Formats a set of log records. + * + * @param array $records A set of records to format + * @return mixed The formatted set of records + */ + public function formatBatch(array $records); +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php new file mode 100755 index 0000000..2c1b0e8 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/GelfMessageFormatter.php @@ -0,0 +1,138 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; +use Gelf\Message; + +/** + * Serializes a log message to GELF + * @see http://www.graylog2.org/about/gelf + * + * @author Matt Lehner + */ +class GelfMessageFormatter extends NormalizerFormatter +{ + const DEFAULT_MAX_LENGTH = 32766; + + /** + * @var string the name of the system for the Gelf log message + */ + protected $systemName; + + /** + * @var string a prefix for 'extra' fields from the Monolog record (optional) + */ + protected $extraPrefix; + + /** + * @var string a prefix for 'context' fields from the Monolog record (optional) + */ + protected $contextPrefix; + + /** + * @var int max length per field + */ + protected $maxLength; + + /** + * Translates Monolog log levels to Graylog2 log priorities. + */ + private $logLevels = array( + Logger::DEBUG => 7, + Logger::INFO => 6, + Logger::NOTICE => 5, + Logger::WARNING => 4, + Logger::ERROR => 3, + Logger::CRITICAL => 2, + Logger::ALERT => 1, + Logger::EMERGENCY => 0, + ); + + public function __construct($systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $maxLength = null) + { + parent::__construct('U.u'); + + $this->systemName = $systemName ?: gethostname(); + + $this->extraPrefix = $extraPrefix; + $this->contextPrefix = $contextPrefix; + $this->maxLength = is_null($maxLength) ? self::DEFAULT_MAX_LENGTH : $maxLength; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $record = parent::format($record); + + if (!isset($record['datetime'], $record['message'], $record['level'])) { + throw new \InvalidArgumentException('The record should at least contain datetime, message and level keys, '.var_export($record, true).' given'); + } + + $message = new Message(); + $message + ->setTimestamp($record['datetime']) + ->setShortMessage((string) $record['message']) + ->setHost($this->systemName) + ->setLevel($this->logLevels[$record['level']]); + + // message length + system name length + 200 for padding / metadata + $len = 200 + strlen((string) $record['message']) + strlen($this->systemName); + + if ($len > $this->maxLength) { + $message->setShortMessage(substr($record['message'], 0, $this->maxLength)); + } + + if (isset($record['channel'])) { + $message->setFacility($record['channel']); + } + if (isset($record['extra']['line'])) { + $message->setLine($record['extra']['line']); + unset($record['extra']['line']); + } + if (isset($record['extra']['file'])) { + $message->setFile($record['extra']['file']); + unset($record['extra']['file']); + } + + foreach ($record['extra'] as $key => $val) { + $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); + $len = strlen($this->extraPrefix . $key . $val); + if ($len > $this->maxLength) { + $message->setAdditional($this->extraPrefix . $key, substr($val, 0, $this->maxLength)); + break; + } + $message->setAdditional($this->extraPrefix . $key, $val); + } + + foreach ($record['context'] as $key => $val) { + $val = is_scalar($val) || null === $val ? $val : $this->toJson($val); + $len = strlen($this->contextPrefix . $key . $val); + if ($len > $this->maxLength) { + $message->setAdditional($this->contextPrefix . $key, substr($val, 0, $this->maxLength)); + break; + } + $message->setAdditional($this->contextPrefix . $key, $val); + } + + if (null === $message->getFile() && isset($record['context']['exception']['file'])) { + if (preg_match("/^(.+):([0-9]+)$/", $record['context']['exception']['file'], $matches)) { + $message->setFile($matches[1]); + $message->setLine($matches[2]); + } + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php new file mode 100755 index 0000000..dfc0b4a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/HtmlFormatter.php @@ -0,0 +1,141 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +/** + * Formats incoming records into an HTML table + * + * This is especially useful for html email logging + * + * @author Tiago Brito + */ +class HtmlFormatter extends NormalizerFormatter +{ + /** + * Translates Monolog log levels to html color priorities. + */ + protected $logLevels = array( + Logger::DEBUG => '#cccccc', + Logger::INFO => '#468847', + Logger::NOTICE => '#3a87ad', + Logger::WARNING => '#c09853', + Logger::ERROR => '#f0ad4e', + Logger::CRITICAL => '#FF7708', + Logger::ALERT => '#C12A19', + Logger::EMERGENCY => '#000000', + ); + + /** + * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + */ + public function __construct($dateFormat = null) + { + parent::__construct($dateFormat); + } + + /** + * Creates an HTML table row + * + * @param string $th Row header content + * @param string $td Row standard cell content + * @param bool $escapeTd false if td content must not be html escaped + * @return string + */ + protected function addRow($th, $td = ' ', $escapeTd = true) + { + $th = htmlspecialchars($th, ENT_NOQUOTES, 'UTF-8'); + if ($escapeTd) { + $td = '
                            '.htmlspecialchars($td, ENT_NOQUOTES, 'UTF-8').'
                            '; + } + + return "\n$th:\n".$td."\n"; + } + + /** + * Create a HTML h1 tag + * + * @param string $title Text to be in the h1 + * @param int $level Error level + * @return string + */ + protected function addTitle($title, $level) + { + $title = htmlspecialchars($title, ENT_NOQUOTES, 'UTF-8'); + + return '

                            '.$title.'

                            '; + } + + /** + * Formats a log record. + * + * @param array $record A record to format + * @return mixed The formatted record + */ + public function format(array $record) + { + $output = $this->addTitle($record['level_name'], $record['level']); + $output .= ''; + + $output .= $this->addRow('Message', (string) $record['message']); + $output .= $this->addRow('Time', $record['datetime']->format($this->dateFormat)); + $output .= $this->addRow('Channel', $record['channel']); + if ($record['context']) { + $embeddedTable = '
                            '; + foreach ($record['context'] as $key => $value) { + $embeddedTable .= $this->addRow($key, $this->convertToString($value)); + } + $embeddedTable .= '
                            '; + $output .= $this->addRow('Context', $embeddedTable, false); + } + if ($record['extra']) { + $embeddedTable = ''; + foreach ($record['extra'] as $key => $value) { + $embeddedTable .= $this->addRow($key, $this->convertToString($value)); + } + $embeddedTable .= '
                            '; + $output .= $this->addRow('Extra', $embeddedTable, false); + } + + return $output.''; + } + + /** + * Formats a set of log records. + * + * @param array $records A set of records to format + * @return mixed The formatted set of records + */ + public function formatBatch(array $records) + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } + + protected function convertToString($data) + { + if (null === $data || is_scalar($data)) { + return (string) $data; + } + + $data = $this->normalize($data); + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + return json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + } + + return str_replace('\\/', '/', json_encode($data)); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php new file mode 100755 index 0000000..9bd305f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/JsonFormatter.php @@ -0,0 +1,214 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Exception; +use Monolog\Utils; +use Throwable; + +/** + * Encodes whatever record data is passed to it as json + * + * This can be useful to log to databases or remote APIs + * + * @author Jordi Boggiano + */ +class JsonFormatter extends NormalizerFormatter +{ + const BATCH_MODE_JSON = 1; + const BATCH_MODE_NEWLINES = 2; + + protected $batchMode; + protected $appendNewline; + + /** + * @var bool + */ + protected $includeStacktraces = false; + + /** + * @param int $batchMode + * @param bool $appendNewline + */ + public function __construct($batchMode = self::BATCH_MODE_JSON, $appendNewline = true) + { + $this->batchMode = $batchMode; + $this->appendNewline = $appendNewline; + } + + /** + * The batch mode option configures the formatting style for + * multiple records. By default, multiple records will be + * formatted as a JSON-encoded array. However, for + * compatibility with some API endpoints, alternative styles + * are available. + * + * @return int + */ + public function getBatchMode() + { + return $this->batchMode; + } + + /** + * True if newlines are appended to every formatted record + * + * @return bool + */ + public function isAppendingNewlines() + { + return $this->appendNewline; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + return $this->toJson($this->normalize($record), true) . ($this->appendNewline ? "\n" : ''); + } + + /** + * {@inheritdoc} + */ + public function formatBatch(array $records) + { + switch ($this->batchMode) { + case static::BATCH_MODE_NEWLINES: + return $this->formatBatchNewlines($records); + + case static::BATCH_MODE_JSON: + default: + return $this->formatBatchJson($records); + } + } + + /** + * @param bool $include + */ + public function includeStacktraces($include = true) + { + $this->includeStacktraces = $include; + } + + /** + * Return a JSON-encoded array of records. + * + * @param array $records + * @return string + */ + protected function formatBatchJson(array $records) + { + return $this->toJson($this->normalize($records), true); + } + + /** + * Use new lines to separate records instead of a + * JSON-encoded array. + * + * @param array $records + * @return string + */ + protected function formatBatchNewlines(array $records) + { + $instance = $this; + + $oldNewline = $this->appendNewline; + $this->appendNewline = false; + array_walk($records, function (&$value, $key) use ($instance) { + $value = $instance->format($value); + }); + $this->appendNewline = $oldNewline; + + return implode("\n", $records); + } + + /** + * Normalizes given $data. + * + * @param mixed $data + * + * @return mixed + */ + protected function normalize($data, $depth = 0) + { + if ($depth > 9) { + return 'Over 9 levels deep, aborting normalization'; + } + + if (is_array($data) || $data instanceof \Traversable) { + $normalized = array(); + + $count = 1; + foreach ($data as $key => $value) { + if ($count++ > 1000) { + $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; + break; + } + + $normalized[$key] = $this->normalize($value, $depth+1); + } + + return $normalized; + } + + if ($data instanceof Exception || $data instanceof Throwable) { + return $this->normalizeException($data); + } + + return $data; + } + + /** + * Normalizes given exception with or without its own stack trace based on + * `includeStacktraces` property. + * + * @param Exception|Throwable $e + * + * @return array + */ + protected function normalizeException($e) + { + // TODO 2.0 only check for Throwable + if (!$e instanceof Exception && !$e instanceof Throwable) { + throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); + } + + $data = array( + 'class' => Utils::getClass($e), + 'message' => $e->getMessage(), + 'code' => $e->getCode(), + 'file' => $e->getFile().':'.$e->getLine(), + ); + + if ($this->includeStacktraces) { + $trace = $e->getTrace(); + foreach ($trace as $frame) { + if (isset($frame['file'])) { + $data['trace'][] = $frame['file'].':'.$frame['line']; + } elseif (isset($frame['function']) && $frame['function'] === '{closure}') { + // We should again normalize the frames, because it might contain invalid items + $data['trace'][] = $frame['function']; + } else { + // We should again normalize the frames, because it might contain invalid items + $data['trace'][] = $this->normalize($frame); + } + } + } + + if ($previous = $e->getPrevious()) { + $data['previous'] = $this->normalizeException($previous); + } + + return $data; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php new file mode 100755 index 0000000..f98e1a6 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php @@ -0,0 +1,181 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Utils; + +/** + * Formats incoming records into a one-line string + * + * This is especially useful for logging to files + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +class LineFormatter extends NormalizerFormatter +{ + const SIMPLE_FORMAT = "[%datetime%] %channel%.%level_name%: %message% %context% %extra%\n"; + + protected $format; + protected $allowInlineLineBreaks; + protected $ignoreEmptyContextAndExtra; + protected $includeStacktraces; + + /** + * @param string $format The format of the message + * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + * @param bool $allowInlineLineBreaks Whether to allow inline line breaks in log entries + * @param bool $ignoreEmptyContextAndExtra + */ + public function __construct($format = null, $dateFormat = null, $allowInlineLineBreaks = false, $ignoreEmptyContextAndExtra = false) + { + $this->format = $format ?: static::SIMPLE_FORMAT; + $this->allowInlineLineBreaks = $allowInlineLineBreaks; + $this->ignoreEmptyContextAndExtra = $ignoreEmptyContextAndExtra; + parent::__construct($dateFormat); + } + + public function includeStacktraces($include = true) + { + $this->includeStacktraces = $include; + if ($this->includeStacktraces) { + $this->allowInlineLineBreaks = true; + } + } + + public function allowInlineLineBreaks($allow = true) + { + $this->allowInlineLineBreaks = $allow; + } + + public function ignoreEmptyContextAndExtra($ignore = true) + { + $this->ignoreEmptyContextAndExtra = $ignore; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $vars = parent::format($record); + + $output = $this->format; + + foreach ($vars['extra'] as $var => $val) { + if (false !== strpos($output, '%extra.'.$var.'%')) { + $output = str_replace('%extra.'.$var.'%', $this->stringify($val), $output); + unset($vars['extra'][$var]); + } + } + + + foreach ($vars['context'] as $var => $val) { + if (false !== strpos($output, '%context.'.$var.'%')) { + $output = str_replace('%context.'.$var.'%', $this->stringify($val), $output); + unset($vars['context'][$var]); + } + } + + if ($this->ignoreEmptyContextAndExtra) { + if (empty($vars['context'])) { + unset($vars['context']); + $output = str_replace('%context%', '', $output); + } + + if (empty($vars['extra'])) { + unset($vars['extra']); + $output = str_replace('%extra%', '', $output); + } + } + + foreach ($vars as $var => $val) { + if (false !== strpos($output, '%'.$var.'%')) { + $output = str_replace('%'.$var.'%', $this->stringify($val), $output); + } + } + + // remove leftover %extra.xxx% and %context.xxx% if any + if (false !== strpos($output, '%')) { + $output = preg_replace('/%(?:extra|context)\..+?%/', '', $output); + } + + return $output; + } + + public function formatBatch(array $records) + { + $message = ''; + foreach ($records as $record) { + $message .= $this->format($record); + } + + return $message; + } + + public function stringify($value) + { + return $this->replaceNewlines($this->convertToString($value)); + } + + protected function normalizeException($e) + { + // TODO 2.0 only check for Throwable + if (!$e instanceof \Exception && !$e instanceof \Throwable) { + throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); + } + + $previousText = ''; + if ($previous = $e->getPrevious()) { + do { + $previousText .= ', '.Utils::getClass($previous).'(code: '.$previous->getCode().'): '.$previous->getMessage().' at '.$previous->getFile().':'.$previous->getLine(); + } while ($previous = $previous->getPrevious()); + } + + $str = '[object] ('.Utils::getClass($e).'(code: '.$e->getCode().'): '.$e->getMessage().' at '.$e->getFile().':'.$e->getLine().$previousText.')'; + if ($this->includeStacktraces) { + $str .= "\n[stacktrace]\n".$e->getTraceAsString()."\n"; + } + + return $str; + } + + protected function convertToString($data) + { + if (null === $data || is_bool($data)) { + return var_export($data, true); + } + + if (is_scalar($data)) { + return (string) $data; + } + + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + return $this->toJson($data, true); + } + + return str_replace('\\/', '/', @json_encode($data)); + } + + protected function replaceNewlines($str) + { + if ($this->allowInlineLineBreaks) { + if (0 === strpos($str, '{')) { + return str_replace(array('\r', '\n'), array("\r", "\n"), $str); + } + + return $str; + } + + return str_replace(array("\r\n", "\r", "\n"), ' ', $str); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php new file mode 100755 index 0000000..401859b --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Encodes message information into JSON in a format compatible with Loggly. + * + * @author Adam Pancutt + */ +class LogglyFormatter extends JsonFormatter +{ + /** + * Overrides the default batch mode to new lines for compatibility with the + * Loggly bulk API. + * + * @param int $batchMode + */ + public function __construct($batchMode = self::BATCH_MODE_NEWLINES, $appendNewline = false) + { + parent::__construct($batchMode, $appendNewline); + } + + /** + * Appends the 'timestamp' parameter for indexing by Loggly. + * + * @see https://www.loggly.com/docs/automated-parsing/#json + * @see \Monolog\Formatter\JsonFormatter::format() + */ + public function format(array $record) + { + if (isset($record["datetime"]) && ($record["datetime"] instanceof \DateTime)) { + $record["timestamp"] = $record["datetime"]->format("Y-m-d\TH:i:s.uO"); + // TODO 2.0 unset the 'datetime' parameter, retained for BC + } + + return parent::format($record); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php new file mode 100755 index 0000000..8f83bec --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/LogstashFormatter.php @@ -0,0 +1,166 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Serializes a log message to Logstash Event Format + * + * @see http://logstash.net/ + * @see https://github.com/logstash/logstash/blob/master/lib/logstash/event.rb + * + * @author Tim Mower + */ +class LogstashFormatter extends NormalizerFormatter +{ + const V0 = 0; + const V1 = 1; + + /** + * @var string the name of the system for the Logstash log message, used to fill the @source field + */ + protected $systemName; + + /** + * @var string an application name for the Logstash log message, used to fill the @type field + */ + protected $applicationName; + + /** + * @var string a prefix for 'extra' fields from the Monolog record (optional) + */ + protected $extraPrefix; + + /** + * @var string a prefix for 'context' fields from the Monolog record (optional) + */ + protected $contextPrefix; + + /** + * @var int logstash format version to use + */ + protected $version; + + /** + * @param string $applicationName the application that sends the data, used as the "type" field of logstash + * @param string $systemName the system/machine name, used as the "source" field of logstash, defaults to the hostname of the machine + * @param string $extraPrefix prefix for extra keys inside logstash "fields" + * @param string $contextPrefix prefix for context keys inside logstash "fields", defaults to ctxt_ + * @param int $version the logstash format version to use, defaults to 0 + */ + public function __construct($applicationName, $systemName = null, $extraPrefix = null, $contextPrefix = 'ctxt_', $version = self::V0) + { + // logstash requires a ISO 8601 format date with optional millisecond precision. + parent::__construct('Y-m-d\TH:i:s.uP'); + + $this->systemName = $systemName ?: gethostname(); + $this->applicationName = $applicationName; + $this->extraPrefix = $extraPrefix; + $this->contextPrefix = $contextPrefix; + $this->version = $version; + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + $record = parent::format($record); + + if ($this->version === self::V1) { + $message = $this->formatV1($record); + } else { + $message = $this->formatV0($record); + } + + return $this->toJson($message) . "\n"; + } + + protected function formatV0(array $record) + { + if (empty($record['datetime'])) { + $record['datetime'] = gmdate('c'); + } + $message = array( + '@timestamp' => $record['datetime'], + '@source' => $this->systemName, + '@fields' => array(), + ); + if (isset($record['message'])) { + $message['@message'] = $record['message']; + } + if (isset($record['channel'])) { + $message['@tags'] = array($record['channel']); + $message['@fields']['channel'] = $record['channel']; + } + if (isset($record['level'])) { + $message['@fields']['level'] = $record['level']; + } + if ($this->applicationName) { + $message['@type'] = $this->applicationName; + } + if (isset($record['extra']['server'])) { + $message['@source_host'] = $record['extra']['server']; + } + if (isset($record['extra']['url'])) { + $message['@source_path'] = $record['extra']['url']; + } + if (!empty($record['extra'])) { + foreach ($record['extra'] as $key => $val) { + $message['@fields'][$this->extraPrefix . $key] = $val; + } + } + if (!empty($record['context'])) { + foreach ($record['context'] as $key => $val) { + $message['@fields'][$this->contextPrefix . $key] = $val; + } + } + + return $message; + } + + protected function formatV1(array $record) + { + if (empty($record['datetime'])) { + $record['datetime'] = gmdate('c'); + } + $message = array( + '@timestamp' => $record['datetime'], + '@version' => 1, + 'host' => $this->systemName, + ); + if (isset($record['message'])) { + $message['message'] = $record['message']; + } + if (isset($record['channel'])) { + $message['type'] = $record['channel']; + $message['channel'] = $record['channel']; + } + if (isset($record['level_name'])) { + $message['level'] = $record['level_name']; + } + if ($this->applicationName) { + $message['type'] = $this->applicationName; + } + if (!empty($record['extra'])) { + foreach ($record['extra'] as $key => $val) { + $message[$this->extraPrefix . $key] = $val; + } + } + if (!empty($record['context'])) { + foreach ($record['context'] as $key => $val) { + $message[$this->contextPrefix . $key] = $val; + } + } + + return $message; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php new file mode 100755 index 0000000..eb7be84 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/MongoDBFormatter.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Utils; + +/** + * Formats a record for use with the MongoDBHandler. + * + * @author Florian Plattner + */ +class MongoDBFormatter implements FormatterInterface +{ + private $exceptionTraceAsString; + private $maxNestingLevel; + + /** + * @param int $maxNestingLevel 0 means infinite nesting, the $record itself is level 1, $record['context'] is 2 + * @param bool $exceptionTraceAsString set to false to log exception traces as a sub documents instead of strings + */ + public function __construct($maxNestingLevel = 3, $exceptionTraceAsString = true) + { + $this->maxNestingLevel = max($maxNestingLevel, 0); + $this->exceptionTraceAsString = (bool) $exceptionTraceAsString; + } + + /** + * {@inheritDoc} + */ + public function format(array $record) + { + return $this->formatArray($record); + } + + /** + * {@inheritDoc} + */ + public function formatBatch(array $records) + { + foreach ($records as $key => $record) { + $records[$key] = $this->format($record); + } + + return $records; + } + + protected function formatArray(array $record, $nestingLevel = 0) + { + if ($this->maxNestingLevel == 0 || $nestingLevel <= $this->maxNestingLevel) { + foreach ($record as $name => $value) { + if ($value instanceof \DateTime) { + $record[$name] = $this->formatDate($value, $nestingLevel + 1); + } elseif ($value instanceof \Exception) { + $record[$name] = $this->formatException($value, $nestingLevel + 1); + } elseif (is_array($value)) { + $record[$name] = $this->formatArray($value, $nestingLevel + 1); + } elseif (is_object($value)) { + $record[$name] = $this->formatObject($value, $nestingLevel + 1); + } + } + } else { + $record = '[...]'; + } + + return $record; + } + + protected function formatObject($value, $nestingLevel) + { + $objectVars = get_object_vars($value); + $objectVars['class'] = Utils::getClass($value); + + return $this->formatArray($objectVars, $nestingLevel); + } + + protected function formatException(\Exception $exception, $nestingLevel) + { + $formattedException = array( + 'class' => Utils::getClass($exception), + 'message' => $exception->getMessage(), + 'code' => $exception->getCode(), + 'file' => $exception->getFile() . ':' . $exception->getLine(), + ); + + if ($this->exceptionTraceAsString === true) { + $formattedException['trace'] = $exception->getTraceAsString(); + } else { + $formattedException['trace'] = $exception->getTrace(); + } + + return $this->formatArray($formattedException, $nestingLevel); + } + + protected function formatDate(\DateTime $value, $nestingLevel) + { + return new \MongoDate($value->getTimestamp()); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php new file mode 100755 index 0000000..6686657 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php @@ -0,0 +1,314 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Exception; +use Monolog\Utils; + +/** + * Normalizes incoming records to remove objects/resources so it's easier to dump to various targets + * + * @author Jordi Boggiano + */ +class NormalizerFormatter implements FormatterInterface +{ + const SIMPLE_DATE = "Y-m-d H:i:s"; + + protected $dateFormat; + + /** + * @param string $dateFormat The format of the timestamp: one supported by DateTime::format + */ + public function __construct($dateFormat = null) + { + $this->dateFormat = $dateFormat ?: static::SIMPLE_DATE; + if (!function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s NormalizerFormatter'); + } + } + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + return $this->normalize($record); + } + + /** + * {@inheritdoc} + */ + public function formatBatch(array $records) + { + foreach ($records as $key => $record) { + $records[$key] = $this->format($record); + } + + return $records; + } + + protected function normalize($data, $depth = 0) + { + if ($depth > 9) { + return 'Over 9 levels deep, aborting normalization'; + } + + if (null === $data || is_scalar($data)) { + if (is_float($data)) { + if (is_infinite($data)) { + return ($data > 0 ? '' : '-') . 'INF'; + } + if (is_nan($data)) { + return 'NaN'; + } + } + + return $data; + } + + if (is_array($data)) { + $normalized = array(); + + $count = 1; + foreach ($data as $key => $value) { + if ($count++ > 1000) { + $normalized['...'] = 'Over 1000 items ('.count($data).' total), aborting normalization'; + break; + } + + $normalized[$key] = $this->normalize($value, $depth+1); + } + + return $normalized; + } + + if ($data instanceof \DateTime) { + return $data->format($this->dateFormat); + } + + if (is_object($data)) { + // TODO 2.0 only check for Throwable + if ($data instanceof Exception || (PHP_VERSION_ID > 70000 && $data instanceof \Throwable)) { + return $this->normalizeException($data); + } + + // non-serializable objects that implement __toString stringified + if (method_exists($data, '__toString') && !$data instanceof \JsonSerializable) { + $value = $data->__toString(); + } else { + // the rest is json-serialized in some way + $value = $this->toJson($data, true); + } + + return sprintf("[object] (%s: %s)", Utils::getClass($data), $value); + } + + if (is_resource($data)) { + return sprintf('[resource] (%s)', get_resource_type($data)); + } + + return '[unknown('.gettype($data).')]'; + } + + protected function normalizeException($e) + { + // TODO 2.0 only check for Throwable + if (!$e instanceof Exception && !$e instanceof \Throwable) { + throw new \InvalidArgumentException('Exception/Throwable expected, got '.gettype($e).' / '.Utils::getClass($e)); + } + + $data = array( + 'class' => Utils::getClass($e), + 'message' => $e->getMessage(), + 'code' => $e->getCode(), + 'file' => $e->getFile().':'.$e->getLine(), + ); + + if ($e instanceof \SoapFault) { + if (isset($e->faultcode)) { + $data['faultcode'] = $e->faultcode; + } + + if (isset($e->faultactor)) { + $data['faultactor'] = $e->faultactor; + } + + if (isset($e->detail)) { + $data['detail'] = $e->detail; + } + } + + $trace = $e->getTrace(); + foreach ($trace as $frame) { + if (isset($frame['file'])) { + $data['trace'][] = $frame['file'].':'.$frame['line']; + } elseif (isset($frame['function']) && $frame['function'] === '{closure}') { + // Simplify closures handling + $data['trace'][] = $frame['function']; + } else { + if (isset($frame['args'])) { + // Make sure that objects present as arguments are not serialized nicely but rather only + // as a class name to avoid any unexpected leak of sensitive information + $frame['args'] = array_map(function ($arg) { + if (is_object($arg) && !($arg instanceof \DateTime || $arg instanceof \DateTimeInterface)) { + return sprintf("[object] (%s)", Utils::getClass($arg)); + } + + return $arg; + }, $frame['args']); + } + // We should again normalize the frames, because it might contain invalid items + $data['trace'][] = $this->toJson($this->normalize($frame), true); + } + } + + if ($previous = $e->getPrevious()) { + $data['previous'] = $this->normalizeException($previous); + } + + return $data; + } + + /** + * Return the JSON representation of a value + * + * @param mixed $data + * @param bool $ignoreErrors + * @throws \RuntimeException if encoding fails and errors are not ignored + * @return string + */ + protected function toJson($data, $ignoreErrors = false) + { + // suppress json_encode errors since it's twitchy with some inputs + if ($ignoreErrors) { + return @$this->jsonEncode($data); + } + + $json = $this->jsonEncode($data); + + if ($json === false) { + $json = $this->handleJsonError(json_last_error(), $data); + } + + return $json; + } + + /** + * @param mixed $data + * @return string JSON encoded data or null on failure + */ + private function jsonEncode($data) + { + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + } + + return json_encode($data); + } + + /** + * Handle a json_encode failure. + * + * If the failure is due to invalid string encoding, try to clean the + * input and encode again. If the second encoding attempt fails, the + * inital error is not encoding related or the input can't be cleaned then + * raise a descriptive exception. + * + * @param int $code return code of json_last_error function + * @param mixed $data data that was meant to be encoded + * @throws \RuntimeException if failure can't be corrected + * @return string JSON encoded data after error correction + */ + private function handleJsonError($code, $data) + { + if ($code !== JSON_ERROR_UTF8) { + $this->throwEncodeError($code, $data); + } + + if (is_string($data)) { + $this->detectAndCleanUtf8($data); + } elseif (is_array($data)) { + array_walk_recursive($data, array($this, 'detectAndCleanUtf8')); + } else { + $this->throwEncodeError($code, $data); + } + + $json = $this->jsonEncode($data); + + if ($json === false) { + $this->throwEncodeError(json_last_error(), $data); + } + + return $json; + } + + /** + * Throws an exception according to a given code with a customized message + * + * @param int $code return code of json_last_error function + * @param mixed $data data that was meant to be encoded + * @throws \RuntimeException + */ + private function throwEncodeError($code, $data) + { + switch ($code) { + case JSON_ERROR_DEPTH: + $msg = 'Maximum stack depth exceeded'; + break; + case JSON_ERROR_STATE_MISMATCH: + $msg = 'Underflow or the modes mismatch'; + break; + case JSON_ERROR_CTRL_CHAR: + $msg = 'Unexpected control character found'; + break; + case JSON_ERROR_UTF8: + $msg = 'Malformed UTF-8 characters, possibly incorrectly encoded'; + break; + default: + $msg = 'Unknown error'; + } + + throw new \RuntimeException('JSON encoding failed: '.$msg.'. Encoding: '.var_export($data, true)); + } + + /** + * Detect invalid UTF-8 string characters and convert to valid UTF-8. + * + * Valid UTF-8 input will be left unmodified, but strings containing + * invalid UTF-8 codepoints will be reencoded as UTF-8 with an assumed + * original encoding of ISO-8859-15. This conversion may result in + * incorrect output if the actual encoding was not ISO-8859-15, but it + * will be clean UTF-8 output and will not rely on expensive and fragile + * detection algorithms. + * + * Function converts the input in place in the passed variable so that it + * can be used as a callback for array_walk_recursive. + * + * @param mixed &$data Input to check and convert if needed + * @private + */ + public function detectAndCleanUtf8(&$data) + { + if (is_string($data) && !preg_match('//u', $data)) { + $data = preg_replace_callback( + '/[\x80-\xFF]+/', + function ($m) { return utf8_encode($m[0]); }, + $data + ); + $data = str_replace( + array('¤', '¦', '¨', '´', '¸', '¼', '½', '¾'), + array('€', 'Š', 'š', 'Ž', 'ž', 'Œ', 'œ', 'Ÿ'), + $data + ); + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php new file mode 100755 index 0000000..5d345d5 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/ScalarFormatter.php @@ -0,0 +1,48 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * Formats data into an associative array of scalar values. + * Objects and arrays will be JSON encoded. + * + * @author Andrew Lawson + */ +class ScalarFormatter extends NormalizerFormatter +{ + /** + * {@inheritdoc} + */ + public function format(array $record) + { + foreach ($record as $key => $value) { + $record[$key] = $this->normalizeValue($value); + } + + return $record; + } + + /** + * @param mixed $value + * @return mixed + */ + protected function normalizeValue($value) + { + $normalized = $this->normalize($value); + + if (is_array($normalized) || is_object($normalized)) { + return $this->toJson($normalized, true); + } + + return $normalized; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php new file mode 100755 index 0000000..65dba99 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Formatter/WildfireFormatter.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +/** + * Serializes a log message according to Wildfire's header requirements + * + * @author Eric Clemmons (@ericclemmons) + * @author Christophe Coevoet + * @author Kirill chEbba Chebunin + */ +class WildfireFormatter extends NormalizerFormatter +{ + const TABLE = 'table'; + + /** + * Translates Monolog log levels to Wildfire levels. + */ + private $logLevels = array( + Logger::DEBUG => 'LOG', + Logger::INFO => 'INFO', + Logger::NOTICE => 'INFO', + Logger::WARNING => 'WARN', + Logger::ERROR => 'ERROR', + Logger::CRITICAL => 'ERROR', + Logger::ALERT => 'ERROR', + Logger::EMERGENCY => 'ERROR', + ); + + /** + * {@inheritdoc} + */ + public function format(array $record) + { + // Retrieve the line and file if set and remove them from the formatted extra + $file = $line = ''; + if (isset($record['extra']['file'])) { + $file = $record['extra']['file']; + unset($record['extra']['file']); + } + if (isset($record['extra']['line'])) { + $line = $record['extra']['line']; + unset($record['extra']['line']); + } + + $record = $this->normalize($record); + $message = array('message' => $record['message']); + $handleError = false; + if ($record['context']) { + $message['context'] = $record['context']; + $handleError = true; + } + if ($record['extra']) { + $message['extra'] = $record['extra']; + $handleError = true; + } + if (count($message) === 1) { + $message = reset($message); + } + + if (isset($record['context'][self::TABLE])) { + $type = 'TABLE'; + $label = $record['channel'] .': '. $record['message']; + $message = $record['context'][self::TABLE]; + } else { + $type = $this->logLevels[$record['level']]; + $label = $record['channel']; + } + + // Create JSON object describing the appearance of the message in the console + $json = $this->toJson(array( + array( + 'Type' => $type, + 'File' => $file, + 'Line' => $line, + 'Label' => $label, + ), + $message, + ), $handleError); + + // The message itself is a serialization of the above JSON object + it's length + return sprintf( + '%s|%s|', + strlen($json), + $json + ); + } + + public function formatBatch(array $records) + { + throw new \BadMethodCallException('Batch formatting does not make sense for the WildfireFormatter'); + } + + protected function normalize($data, $depth = 0) + { + if (is_object($data) && !$data instanceof \DateTime) { + return $data; + } + + return parent::normalize($data, $depth); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php new file mode 100755 index 0000000..92b9d45 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractHandler.php @@ -0,0 +1,196 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; +use Monolog\ResettableInterface; + +/** + * Base Handler class providing the Handler structure + * + * @author Jordi Boggiano + */ +abstract class AbstractHandler implements HandlerInterface, ResettableInterface +{ + protected $level = Logger::DEBUG; + protected $bubble = true; + + /** + * @var FormatterInterface + */ + protected $formatter; + protected $processors = array(); + + /** + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + $this->setLevel($level); + $this->bubble = $bubble; + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return $record['level'] >= $this->level; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + foreach ($records as $record) { + $this->handle($record); + } + } + + /** + * Closes the handler. + * + * This will be called automatically when the object is destroyed + */ + public function close() + { + } + + /** + * {@inheritdoc} + */ + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); + } + array_unshift($this->processors, $callback); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + + return array_shift($this->processors); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->formatter = $formatter; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + if (!$this->formatter) { + $this->formatter = $this->getDefaultFormatter(); + } + + return $this->formatter; + } + + /** + * Sets minimum logging level at which this handler will be triggered. + * + * @param int|string $level Level or level name + * @return self + */ + public function setLevel($level) + { + $this->level = Logger::toMonologLevel($level); + + return $this; + } + + /** + * Gets minimum logging level at which this handler will be triggered. + * + * @return int + */ + public function getLevel() + { + return $this->level; + } + + /** + * Sets the bubbling behavior. + * + * @param bool $bubble true means that this handler allows bubbling. + * false means that bubbling is not permitted. + * @return self + */ + public function setBubble($bubble) + { + $this->bubble = $bubble; + + return $this; + } + + /** + * Gets the bubbling behavior. + * + * @return bool true means that this handler allows bubbling. + * false means that bubbling is not permitted. + */ + public function getBubble() + { + return $this->bubble; + } + + public function __destruct() + { + try { + $this->close(); + } catch (\Exception $e) { + // do nothing + } catch (\Throwable $e) { + // do nothing + } + } + + public function reset() + { + foreach ($this->processors as $processor) { + if ($processor instanceof ResettableInterface) { + $processor->reset(); + } + } + } + + /** + * Gets the default formatter. + * + * @return FormatterInterface + */ + protected function getDefaultFormatter() + { + return new LineFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php new file mode 100755 index 0000000..e1e8953 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\ResettableInterface; + +/** + * Base Handler class providing the Handler structure + * + * Classes extending it should (in most cases) only implement write($record) + * + * @author Jordi Boggiano + * @author Christophe Coevoet + */ +abstract class AbstractProcessingHandler extends AbstractHandler +{ + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + + $record = $this->processRecord($record); + + $record['formatted'] = $this->getFormatter()->format($record); + + $this->write($record); + + return false === $this->bubble; + } + + /** + * Writes the record down to the log of the implementing handler + * + * @param array $record + * @return void + */ + abstract protected function write(array $record); + + /** + * Processes a record. + * + * @param array $record + * @return array + */ + protected function processRecord(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php new file mode 100755 index 0000000..8c76aca --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AbstractSyslogHandler.php @@ -0,0 +1,101 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; + +/** + * Common syslog functionality + */ +abstract class AbstractSyslogHandler extends AbstractProcessingHandler +{ + protected $facility; + + /** + * Translates Monolog log levels to syslog log priorities. + */ + protected $logLevels = array( + Logger::DEBUG => LOG_DEBUG, + Logger::INFO => LOG_INFO, + Logger::NOTICE => LOG_NOTICE, + Logger::WARNING => LOG_WARNING, + Logger::ERROR => LOG_ERR, + Logger::CRITICAL => LOG_CRIT, + Logger::ALERT => LOG_ALERT, + Logger::EMERGENCY => LOG_EMERG, + ); + + /** + * List of valid log facility names. + */ + protected $facilities = array( + 'auth' => LOG_AUTH, + 'authpriv' => LOG_AUTHPRIV, + 'cron' => LOG_CRON, + 'daemon' => LOG_DAEMON, + 'kern' => LOG_KERN, + 'lpr' => LOG_LPR, + 'mail' => LOG_MAIL, + 'news' => LOG_NEWS, + 'syslog' => LOG_SYSLOG, + 'user' => LOG_USER, + 'uucp' => LOG_UUCP, + ); + + /** + * @param mixed $facility + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($facility = LOG_USER, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + if (!defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->facilities['local0'] = LOG_LOCAL0; + $this->facilities['local1'] = LOG_LOCAL1; + $this->facilities['local2'] = LOG_LOCAL2; + $this->facilities['local3'] = LOG_LOCAL3; + $this->facilities['local4'] = LOG_LOCAL4; + $this->facilities['local5'] = LOG_LOCAL5; + $this->facilities['local6'] = LOG_LOCAL6; + $this->facilities['local7'] = LOG_LOCAL7; + } else { + $this->facilities['local0'] = 128; // LOG_LOCAL0 + $this->facilities['local1'] = 136; // LOG_LOCAL1 + $this->facilities['local2'] = 144; // LOG_LOCAL2 + $this->facilities['local3'] = 152; // LOG_LOCAL3 + $this->facilities['local4'] = 160; // LOG_LOCAL4 + $this->facilities['local5'] = 168; // LOG_LOCAL5 + $this->facilities['local6'] = 176; // LOG_LOCAL6 + $this->facilities['local7'] = 184; // LOG_LOCAL7 + } + + // convert textual description of facility to syslog constant + if (array_key_exists(strtolower($facility), $this->facilities)) { + $facility = $this->facilities[strtolower($facility)]; + } elseif (!in_array($facility, array_values($this->facilities), true)) { + throw new \UnexpectedValueException('Unknown facility value "'.$facility.'" given'); + } + + $this->facility = $facility; + } + + /** + * {@inheritdoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('%channel%.%level_name%: %message% %context% %extra%'); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php new file mode 100755 index 0000000..e5a46bc --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php @@ -0,0 +1,148 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\JsonFormatter; +use PhpAmqpLib\Message\AMQPMessage; +use PhpAmqpLib\Channel\AMQPChannel; +use AMQPExchange; + +class AmqpHandler extends AbstractProcessingHandler +{ + /** + * @var AMQPExchange|AMQPChannel $exchange + */ + protected $exchange; + + /** + * @var string + */ + protected $exchangeName; + + /** + * @param AMQPExchange|AMQPChannel $exchange AMQPExchange (php AMQP ext) or PHP AMQP lib channel, ready for use + * @param string $exchangeName + * @param int $level + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($exchange, $exchangeName = 'log', $level = Logger::DEBUG, $bubble = true) + { + if ($exchange instanceof AMQPExchange) { + $exchange->setName($exchangeName); + } elseif ($exchange instanceof AMQPChannel) { + $this->exchangeName = $exchangeName; + } else { + throw new \InvalidArgumentException('PhpAmqpLib\Channel\AMQPChannel or AMQPExchange instance required'); + } + $this->exchange = $exchange; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $data = $record["formatted"]; + $routingKey = $this->getRoutingKey($record); + + if ($this->exchange instanceof AMQPExchange) { + $this->exchange->publish( + $data, + $routingKey, + 0, + array( + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ) + ); + } else { + $this->exchange->basic_publish( + $this->createAmqpMessage($data), + $this->exchangeName, + $routingKey + ); + } + } + + /** + * {@inheritDoc} + */ + public function handleBatch(array $records) + { + if ($this->exchange instanceof AMQPExchange) { + parent::handleBatch($records); + + return; + } + + foreach ($records as $record) { + if (!$this->isHandling($record)) { + continue; + } + + $record = $this->processRecord($record); + $data = $this->getFormatter()->format($record); + + $this->exchange->batch_basic_publish( + $this->createAmqpMessage($data), + $this->exchangeName, + $this->getRoutingKey($record) + ); + } + + $this->exchange->publish_batch(); + } + + /** + * Gets the routing key for the AMQP exchange + * + * @param array $record + * @return string + */ + protected function getRoutingKey(array $record) + { + $routingKey = sprintf( + '%s.%s', + // TODO 2.0 remove substr call + substr($record['level_name'], 0, 4), + $record['channel'] + ); + + return strtolower($routingKey); + } + + /** + * @param string $data + * @return AMQPMessage + */ + private function createAmqpMessage($data) + { + return new AMQPMessage( + (string) $data, + array( + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ) + ); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php new file mode 100755 index 0000000..23cf23b --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/BrowserConsoleHandler.php @@ -0,0 +1,240 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; + +/** + * Handler sending logs to browser's javascript console with no browser extension required + * + * @author Olivier Poitrey + */ +class BrowserConsoleHandler extends AbstractProcessingHandler +{ + protected static $initialized = false; + protected static $records = array(); + + /** + * {@inheritDoc} + * + * Formatted output may contain some formatting markers to be transferred to `console.log` using the %c format. + * + * Example of formatted string: + * + * You can do [[blue text]]{color: blue} or [[green background]]{background-color: green; color: white} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('[[%channel%]]{macro: autolabel} [[%level_name%]]{font-weight: bold} %message%'); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + // Accumulate records + static::$records[] = $record; + + // Register shutdown handler if not already done + if (!static::$initialized) { + static::$initialized = true; + $this->registerShutdownFunction(); + } + } + + /** + * Convert records to javascript console commands and send it to the browser. + * This method is automatically called on PHP shutdown if output is HTML or Javascript. + */ + public static function send() + { + $format = static::getResponseFormat(); + if ($format === 'unknown') { + return; + } + + if (count(static::$records)) { + if ($format === 'html') { + static::writeOutput(''); + } elseif ($format === 'js') { + static::writeOutput(static::generateScript()); + } + static::resetStatic(); + } + } + + public function close() + { + self::resetStatic(); + } + + public function reset() + { + self::resetStatic(); + } + + /** + * Forget all logged records + */ + public static function resetStatic() + { + static::$records = array(); + } + + /** + * Wrapper for register_shutdown_function to allow overriding + */ + protected function registerShutdownFunction() + { + if (PHP_SAPI !== 'cli') { + register_shutdown_function(array('Monolog\Handler\BrowserConsoleHandler', 'send')); + } + } + + /** + * Wrapper for echo to allow overriding + * + * @param string $str + */ + protected static function writeOutput($str) + { + echo $str; + } + + /** + * Checks the format of the response + * + * If Content-Type is set to application/javascript or text/javascript -> js + * If Content-Type is set to text/html, or is unset -> html + * If Content-Type is anything else -> unknown + * + * @return string One of 'js', 'html' or 'unknown' + */ + protected static function getResponseFormat() + { + // Check content type + foreach (headers_list() as $header) { + if (stripos($header, 'content-type:') === 0) { + // This handler only works with HTML and javascript outputs + // text/javascript is obsolete in favour of application/javascript, but still used + if (stripos($header, 'application/javascript') !== false || stripos($header, 'text/javascript') !== false) { + return 'js'; + } + if (stripos($header, 'text/html') === false) { + return 'unknown'; + } + break; + } + } + + return 'html'; + } + + private static function generateScript() + { + $script = array(); + foreach (static::$records as $record) { + $context = static::dump('Context', $record['context']); + $extra = static::dump('Extra', $record['extra']); + + if (empty($context) && empty($extra)) { + $script[] = static::call_array('log', static::handleStyles($record['formatted'])); + } else { + $script = array_merge($script, + array(static::call_array('groupCollapsed', static::handleStyles($record['formatted']))), + $context, + $extra, + array(static::call('groupEnd')) + ); + } + } + + return "(function (c) {if (c && c.groupCollapsed) {\n" . implode("\n", $script) . "\n}})(console);"; + } + + private static function handleStyles($formatted) + { + $args = array(static::quote('font-weight: normal')); + $format = '%c' . $formatted; + preg_match_all('/\[\[(.*?)\]\]\{([^}]*)\}/s', $format, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER); + + foreach (array_reverse($matches) as $match) { + $args[] = static::quote(static::handleCustomStyles($match[2][0], $match[1][0])); + $args[] = '"font-weight: normal"'; + + $pos = $match[0][1]; + $format = substr($format, 0, $pos) . '%c' . $match[1][0] . '%c' . substr($format, $pos + strlen($match[0][0])); + } + + array_unshift($args, static::quote($format)); + + return $args; + } + + private static function handleCustomStyles($style, $string) + { + static $colors = array('blue', 'green', 'red', 'magenta', 'orange', 'black', 'grey'); + static $labels = array(); + + return preg_replace_callback('/macro\s*:(.*?)(?:;|$)/', function ($m) use ($string, &$colors, &$labels) { + if (trim($m[1]) === 'autolabel') { + // Format the string as a label with consistent auto assigned background color + if (!isset($labels[$string])) { + $labels[$string] = $colors[count($labels) % count($colors)]; + } + $color = $labels[$string]; + + return "background-color: $color; color: white; border-radius: 3px; padding: 0 2px 0 2px"; + } + + return $m[1]; + }, $style); + } + + private static function dump($title, array $dict) + { + $script = array(); + $dict = array_filter($dict); + if (empty($dict)) { + return $script; + } + $script[] = static::call('log', static::quote('%c%s'), static::quote('font-weight: bold'), static::quote($title)); + foreach ($dict as $key => $value) { + $value = json_encode($value); + if (empty($value)) { + $value = static::quote(''); + } + $script[] = static::call('log', static::quote('%s: %o'), static::quote($key), $value); + } + + return $script; + } + + private static function quote($arg) + { + return '"' . addcslashes($arg, "\"\n\\") . '"'; + } + + private static function call() + { + $args = func_get_args(); + $method = array_shift($args); + + return static::call_array($method, $args); + } + + private static function call_array($method, array $args) + { + return 'c.' . $method . '(' . implode(', ', $args) . ');'; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php new file mode 100755 index 0000000..61d1b50 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/BufferHandler.php @@ -0,0 +1,129 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\ResettableInterface; + +/** + * Buffers all records until closing the handler and then pass them as batch. + * + * This is useful for a MailHandler to send only one mail per request instead of + * sending one per log message. + * + * @author Christophe Coevoet + */ +class BufferHandler extends AbstractHandler +{ + protected $handler; + protected $bufferSize = 0; + protected $bufferLimit; + protected $flushOnOverflow; + protected $buffer = array(); + protected $initialized = false; + + /** + * @param HandlerInterface $handler Handler. + * @param int $bufferLimit How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $flushOnOverflow If true, the buffer is flushed when the max size has been reached, by default oldest entries are discarded + */ + public function __construct(HandlerInterface $handler, $bufferLimit = 0, $level = Logger::DEBUG, $bubble = true, $flushOnOverflow = false) + { + parent::__construct($level, $bubble); + $this->handler = $handler; + $this->bufferLimit = (int) $bufferLimit; + $this->flushOnOverflow = $flushOnOverflow; + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($record['level'] < $this->level) { + return false; + } + + if (!$this->initialized) { + // __destructor() doesn't get called on Fatal errors + register_shutdown_function(array($this, 'close')); + $this->initialized = true; + } + + if ($this->bufferLimit > 0 && $this->bufferSize === $this->bufferLimit) { + if ($this->flushOnOverflow) { + $this->flush(); + } else { + array_shift($this->buffer); + $this->bufferSize--; + } + } + + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + $this->buffer[] = $record; + $this->bufferSize++; + + return false === $this->bubble; + } + + public function flush() + { + if ($this->bufferSize === 0) { + return; + } + + $this->handler->handleBatch($this->buffer); + $this->clear(); + } + + public function __destruct() + { + // suppress the parent behavior since we already have register_shutdown_function() + // to call close(), and the reference contained there will prevent this from being + // GC'd until the end of the request + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->flush(); + } + + /** + * Clears the buffer without flushing any messages down to the wrapped handler. + */ + public function clear() + { + $this->bufferSize = 0; + $this->buffer = array(); + } + + public function reset() + { + $this->flush(); + + parent::reset(); + + if ($this->handler instanceof ResettableInterface) { + $this->handler->reset(); + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php new file mode 100755 index 0000000..37419a0 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ChromePHPHandler.php @@ -0,0 +1,211 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\ChromePHPFormatter; +use Monolog\Logger; + +/** + * Handler sending logs to the ChromePHP extension (http://www.chromephp.com/) + * + * This also works out of the box with Firefox 43+ + * + * @author Christophe Coevoet + */ +class ChromePHPHandler extends AbstractProcessingHandler +{ + /** + * Version of the extension + */ + const VERSION = '4.0'; + + /** + * Header name + */ + const HEADER_NAME = 'X-ChromeLogger-Data'; + + /** + * Regular expression to detect supported browsers (matches any Chrome, or Firefox 43+) + */ + const USER_AGENT_REGEX = '{\b(?:Chrome/\d+(?:\.\d+)*|HeadlessChrome|Firefox/(?:4[3-9]|[5-9]\d|\d{3,})(?:\.\d)*)\b}'; + + protected static $initialized = false; + + /** + * Tracks whether we sent too much data + * + * Chrome limits the headers to 256KB, so when we sent 240KB we stop sending + * + * @var bool + */ + protected static $overflowed = false; + + protected static $json = array( + 'version' => self::VERSION, + 'columns' => array('label', 'log', 'backtrace', 'type'), + 'rows' => array(), + ); + + protected static $sendHeaders = true; + + /** + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + if (!function_exists('json_encode')) { + throw new \RuntimeException('PHP\'s json extension is required to use Monolog\'s ChromePHPHandler'); + } + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $messages = array(); + + foreach ($records as $record) { + if ($record['level'] < $this->level) { + continue; + } + $messages[] = $this->processRecord($record); + } + + if (!empty($messages)) { + $messages = $this->getFormatter()->formatBatch($messages); + self::$json['rows'] = array_merge(self::$json['rows'], $messages); + $this->send(); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new ChromePHPFormatter(); + } + + /** + * Creates & sends header for a record + * + * @see sendHeader() + * @see send() + * @param array $record + */ + protected function write(array $record) + { + self::$json['rows'][] = $record['formatted']; + + $this->send(); + } + + /** + * Sends the log header + * + * @see sendHeader() + */ + protected function send() + { + if (self::$overflowed || !self::$sendHeaders) { + return; + } + + if (!self::$initialized) { + self::$initialized = true; + + self::$sendHeaders = $this->headersAccepted(); + if (!self::$sendHeaders) { + return; + } + + self::$json['request_uri'] = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : ''; + } + + $json = @json_encode(self::$json); + $data = base64_encode(utf8_encode($json)); + if (strlen($data) > 240 * 1024) { + self::$overflowed = true; + + $record = array( + 'message' => 'Incomplete logs, chrome header size limit reached', + 'context' => array(), + 'level' => Logger::WARNING, + 'level_name' => Logger::getLevelName(Logger::WARNING), + 'channel' => 'monolog', + 'datetime' => new \DateTime(), + 'extra' => array(), + ); + self::$json['rows'][count(self::$json['rows']) - 1] = $this->getFormatter()->format($record); + $json = @json_encode(self::$json); + $data = base64_encode(utf8_encode($json)); + } + + if (trim($data) !== '') { + $this->sendHeader(self::HEADER_NAME, $data); + } + } + + /** + * Send header string to the client + * + * @param string $header + * @param string $content + */ + protected function sendHeader($header, $content) + { + if (!headers_sent() && self::$sendHeaders) { + header(sprintf('%s: %s', $header, $content)); + } + } + + /** + * Verifies if the headers are accepted by the current user agent + * + * @return bool + */ + protected function headersAccepted() + { + if (empty($_SERVER['HTTP_USER_AGENT'])) { + return false; + } + + return preg_match(self::USER_AGENT_REGEX, $_SERVER['HTTP_USER_AGENT']); + } + + /** + * BC getter for the sendHeaders property that has been made static + */ + public function __get($property) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + return static::$sendHeaders; + } + + /** + * BC setter for the sendHeaders property that has been made static + */ + public function __set($property, $value) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + static::$sendHeaders = $value; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php new file mode 100755 index 0000000..cc98697 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/CouchDBHandler.php @@ -0,0 +1,72 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\JsonFormatter; +use Monolog\Logger; + +/** + * CouchDB handler + * + * @author Markus Bachmann + */ +class CouchDBHandler extends AbstractProcessingHandler +{ + private $options; + + public function __construct(array $options = array(), $level = Logger::DEBUG, $bubble = true) + { + $this->options = array_merge(array( + 'host' => 'localhost', + 'port' => 5984, + 'dbname' => 'logger', + 'username' => null, + 'password' => null, + ), $options); + + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $basicAuth = null; + if ($this->options['username']) { + $basicAuth = sprintf('%s:%s@', $this->options['username'], $this->options['password']); + } + + $url = 'http://'.$basicAuth.$this->options['host'].':'.$this->options['port'].'/'.$this->options['dbname']; + $context = stream_context_create(array( + 'http' => array( + 'method' => 'POST', + 'content' => $record['formatted'], + 'ignore_errors' => true, + 'max_redirects' => 0, + 'header' => 'Content-type: application/json', + ), + )); + + if (false === @file_get_contents($url, null, $context)) { + throw new \RuntimeException(sprintf('Could not connect to %s', $url)); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php new file mode 100755 index 0000000..96b3ca0 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/CubeHandler.php @@ -0,0 +1,151 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Logs to Cube. + * + * @link http://square.github.com/cube/ + * @author Wan Chen + */ +class CubeHandler extends AbstractProcessingHandler +{ + private $udpConnection; + private $httpConnection; + private $scheme; + private $host; + private $port; + private $acceptedSchemes = array('http', 'udp'); + + /** + * Create a Cube handler + * + * @throws \UnexpectedValueException when given url is not a valid url. + * A valid url must consist of three parts : protocol://host:port + * Only valid protocols used by Cube are http and udp + */ + public function __construct($url, $level = Logger::DEBUG, $bubble = true) + { + $urlInfo = parse_url($url); + + if (!isset($urlInfo['scheme'], $urlInfo['host'], $urlInfo['port'])) { + throw new \UnexpectedValueException('URL "'.$url.'" is not valid'); + } + + if (!in_array($urlInfo['scheme'], $this->acceptedSchemes)) { + throw new \UnexpectedValueException( + 'Invalid protocol (' . $urlInfo['scheme'] . ').' + . ' Valid options are ' . implode(', ', $this->acceptedSchemes)); + } + + $this->scheme = $urlInfo['scheme']; + $this->host = $urlInfo['host']; + $this->port = $urlInfo['port']; + + parent::__construct($level, $bubble); + } + + /** + * Establish a connection to an UDP socket + * + * @throws \LogicException when unable to connect to the socket + * @throws MissingExtensionException when there is no socket extension + */ + protected function connectUdp() + { + if (!extension_loaded('sockets')) { + throw new MissingExtensionException('The sockets extension is required to use udp URLs with the CubeHandler'); + } + + $this->udpConnection = socket_create(AF_INET, SOCK_DGRAM, 0); + if (!$this->udpConnection) { + throw new \LogicException('Unable to create a socket'); + } + + if (!socket_connect($this->udpConnection, $this->host, $this->port)) { + throw new \LogicException('Unable to connect to the socket at ' . $this->host . ':' . $this->port); + } + } + + /** + * Establish a connection to a http server + * @throws \LogicException when no curl extension + */ + protected function connectHttp() + { + if (!extension_loaded('curl')) { + throw new \LogicException('The curl extension is needed to use http URLs with the CubeHandler'); + } + + $this->httpConnection = curl_init('http://'.$this->host.':'.$this->port.'/1.0/event/put'); + + if (!$this->httpConnection) { + throw new \LogicException('Unable to connect to ' . $this->host . ':' . $this->port); + } + + curl_setopt($this->httpConnection, CURLOPT_CUSTOMREQUEST, "POST"); + curl_setopt($this->httpConnection, CURLOPT_RETURNTRANSFER, true); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $date = $record['datetime']; + + $data = array('time' => $date->format('Y-m-d\TH:i:s.uO')); + unset($record['datetime']); + + if (isset($record['context']['type'])) { + $data['type'] = $record['context']['type']; + unset($record['context']['type']); + } else { + $data['type'] = $record['channel']; + } + + $data['data'] = $record['context']; + $data['data']['level'] = $record['level']; + + if ($this->scheme === 'http') { + $this->writeHttp(json_encode($data)); + } else { + $this->writeUdp(json_encode($data)); + } + } + + private function writeUdp($data) + { + if (!$this->udpConnection) { + $this->connectUdp(); + } + + socket_send($this->udpConnection, $data, strlen($data), 0); + } + + private function writeHttp($data) + { + if (!$this->httpConnection) { + $this->connectHttp(); + } + + curl_setopt($this->httpConnection, CURLOPT_POSTFIELDS, '['.$data.']'); + curl_setopt($this->httpConnection, CURLOPT_HTTPHEADER, array( + 'Content-Type: application/json', + 'Content-Length: ' . strlen('['.$data.']'), + )); + + Curl\Util::execute($this->httpConnection, 5, false); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php b/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php new file mode 100755 index 0000000..48d30b3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/Curl/Util.php @@ -0,0 +1,57 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\Curl; + +class Util +{ + private static $retriableErrorCodes = array( + CURLE_COULDNT_RESOLVE_HOST, + CURLE_COULDNT_CONNECT, + CURLE_HTTP_NOT_FOUND, + CURLE_READ_ERROR, + CURLE_OPERATION_TIMEOUTED, + CURLE_HTTP_POST_ERROR, + CURLE_SSL_CONNECT_ERROR, + ); + + /** + * Executes a CURL request with optional retries and exception on failure + * + * @param resource $ch curl handler + * @throws \RuntimeException + */ + public static function execute($ch, $retries = 5, $closeAfterDone = true) + { + while ($retries--) { + if (curl_exec($ch) === false) { + $curlErrno = curl_errno($ch); + + if (false === in_array($curlErrno, self::$retriableErrorCodes, true) || !$retries) { + $curlError = curl_error($ch); + + if ($closeAfterDone) { + curl_close($ch); + } + + throw new \RuntimeException(sprintf('Curl error (code %s): %s', $curlErrno, $curlError)); + } + + continue; + } + + if ($closeAfterDone) { + curl_close($ch); + } + break; + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php new file mode 100755 index 0000000..35b55cb --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/DeduplicationHandler.php @@ -0,0 +1,169 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Simple handler wrapper that deduplicates log records across multiple requests + * + * It also includes the BufferHandler functionality and will buffer + * all messages until the end of the request or flush() is called. + * + * This works by storing all log records' messages above $deduplicationLevel + * to the file specified by $deduplicationStore. When further logs come in at the end of the + * request (or when flush() is called), all those above $deduplicationLevel are checked + * against the existing stored logs. If they match and the timestamps in the stored log is + * not older than $time seconds, the new log record is discarded. If no log record is new, the + * whole data set is discarded. + * + * This is mainly useful in combination with Mail handlers or things like Slack or HipChat handlers + * that send messages to people, to avoid spamming with the same message over and over in case of + * a major component failure like a database server being down which makes all requests fail in the + * same way. + * + * @author Jordi Boggiano + */ +class DeduplicationHandler extends BufferHandler +{ + /** + * @var string + */ + protected $deduplicationStore; + + /** + * @var int + */ + protected $deduplicationLevel; + + /** + * @var int + */ + protected $time; + + /** + * @var bool + */ + private $gc = false; + + /** + * @param HandlerInterface $handler Handler. + * @param string $deduplicationStore The file/path where the deduplication log should be kept + * @param int $deduplicationLevel The minimum logging level for log records to be looked at for deduplication purposes + * @param int $time The period (in seconds) during which duplicate entries should be suppressed after a given log is sent through + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(HandlerInterface $handler, $deduplicationStore = null, $deduplicationLevel = Logger::ERROR, $time = 60, $bubble = true) + { + parent::__construct($handler, 0, Logger::DEBUG, $bubble, false); + + $this->deduplicationStore = $deduplicationStore === null ? sys_get_temp_dir() . '/monolog-dedup-' . substr(md5(__FILE__), 0, 20) .'.log' : $deduplicationStore; + $this->deduplicationLevel = Logger::toMonologLevel($deduplicationLevel); + $this->time = $time; + } + + public function flush() + { + if ($this->bufferSize === 0) { + return; + } + + $passthru = null; + + foreach ($this->buffer as $record) { + if ($record['level'] >= $this->deduplicationLevel) { + + $passthru = $passthru || !$this->isDuplicate($record); + if ($passthru) { + $this->appendRecord($record); + } + } + } + + // default of null is valid as well as if no record matches duplicationLevel we just pass through + if ($passthru === true || $passthru === null) { + $this->handler->handleBatch($this->buffer); + } + + $this->clear(); + + if ($this->gc) { + $this->collectLogs(); + } + } + + private function isDuplicate(array $record) + { + if (!file_exists($this->deduplicationStore)) { + return false; + } + + $store = file($this->deduplicationStore, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); + if (!is_array($store)) { + return false; + } + + $yesterday = time() - 86400; + $timestampValidity = $record['datetime']->getTimestamp() - $this->time; + $expectedMessage = preg_replace('{[\r\n].*}', '', $record['message']); + + for ($i = count($store) - 1; $i >= 0; $i--) { + list($timestamp, $level, $message) = explode(':', $store[$i], 3); + + if ($level === $record['level_name'] && $message === $expectedMessage && $timestamp > $timestampValidity) { + return true; + } + + if ($timestamp < $yesterday) { + $this->gc = true; + } + } + + return false; + } + + private function collectLogs() + { + if (!file_exists($this->deduplicationStore)) { + return false; + } + + $handle = fopen($this->deduplicationStore, 'rw+'); + flock($handle, LOCK_EX); + $validLogs = array(); + + $timestampValidity = time() - $this->time; + + while (!feof($handle)) { + $log = fgets($handle); + if (substr($log, 0, 10) >= $timestampValidity) { + $validLogs[] = $log; + } + } + + ftruncate($handle, 0); + rewind($handle); + foreach ($validLogs as $log) { + fwrite($handle, $log); + } + + flock($handle, LOCK_UN); + fclose($handle); + + $this->gc = false; + } + + private function appendRecord(array $record) + { + file_put_contents($this->deduplicationStore, $record['datetime']->getTimestamp() . ':' . $record['level_name'] . ':' . preg_replace('{[\r\n].*}', '', $record['message']) . "\n", FILE_APPEND); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php new file mode 100755 index 0000000..b91ffec --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/DoctrineCouchDBHandler.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\NormalizerFormatter; +use Doctrine\CouchDB\CouchDBClient; + +/** + * CouchDB handler for Doctrine CouchDB ODM + * + * @author Markus Bachmann + */ +class DoctrineCouchDBHandler extends AbstractProcessingHandler +{ + private $client; + + public function __construct(CouchDBClient $client, $level = Logger::DEBUG, $bubble = true) + { + $this->client = $client; + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $this->client->postDocument($record['formatted']); + } + + protected function getDefaultFormatter() + { + return new NormalizerFormatter; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php new file mode 100755 index 0000000..237b71f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Aws\Sdk; +use Aws\DynamoDb\DynamoDbClient; +use Aws\DynamoDb\Marshaler; +use Monolog\Formatter\ScalarFormatter; +use Monolog\Logger; + +/** + * Amazon DynamoDB handler (http://aws.amazon.com/dynamodb/) + * + * @link https://github.com/aws/aws-sdk-php/ + * @author Andrew Lawson + */ +class DynamoDbHandler extends AbstractProcessingHandler +{ + const DATE_FORMAT = 'Y-m-d\TH:i:s.uO'; + + /** + * @var DynamoDbClient + */ + protected $client; + + /** + * @var string + */ + protected $table; + + /** + * @var int + */ + protected $version; + + /** + * @var Marshaler + */ + protected $marshaler; + + /** + * @param DynamoDbClient $client + * @param string $table + * @param int $level + * @param bool $bubble + */ + public function __construct(DynamoDbClient $client, $table, $level = Logger::DEBUG, $bubble = true) + { + if (defined('Aws\Sdk::VERSION') && version_compare(Sdk::VERSION, '3.0', '>=')) { + $this->version = 3; + $this->marshaler = new Marshaler; + } else { + $this->version = 2; + } + + $this->client = $client; + $this->table = $table; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $filtered = $this->filterEmptyFields($record['formatted']); + if ($this->version === 3) { + $formatted = $this->marshaler->marshalItem($filtered); + } else { + $formatted = $this->client->formatAttributes($filtered); + } + + $this->client->putItem(array( + 'TableName' => $this->table, + 'Item' => $formatted, + )); + } + + /** + * @param array $record + * @return array + */ + protected function filterEmptyFields(array $record) + { + return array_filter($record, function ($value) { + return !empty($value) || false === $value || 0 === $value; + }); + } + + /** + * {@inheritdoc} + */ + protected function getDefaultFormatter() + { + return new ScalarFormatter(self::DATE_FORMAT); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php new file mode 100755 index 0000000..bb0f83e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ElasticSearchHandler.php @@ -0,0 +1,128 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\ElasticaFormatter; +use Monolog\Logger; +use Elastica\Client; +use Elastica\Exception\ExceptionInterface; + +/** + * Elastic Search handler + * + * Usage example: + * + * $client = new \Elastica\Client(); + * $options = array( + * 'index' => 'elastic_index_name', + * 'type' => 'elastic_doc_type', + * ); + * $handler = new ElasticSearchHandler($client, $options); + * $log = new Logger('application'); + * $log->pushHandler($handler); + * + * @author Jelle Vink + */ +class ElasticSearchHandler extends AbstractProcessingHandler +{ + /** + * @var Client + */ + protected $client; + + /** + * @var array Handler config options + */ + protected $options = array(); + + /** + * @param Client $client Elastica Client object + * @param array $options Handler configuration + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(Client $client, array $options = array(), $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + $this->client = $client; + $this->options = array_merge( + array( + 'index' => 'monolog', // Elastic index name + 'type' => 'record', // Elastic document type + 'ignore_error' => false, // Suppress Elastica exceptions + ), + $options + ); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + $this->bulkSend(array($record['formatted'])); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + if ($formatter instanceof ElasticaFormatter) { + return parent::setFormatter($formatter); + } + throw new \InvalidArgumentException('ElasticSearchHandler is only compatible with ElasticaFormatter'); + } + + /** + * Getter options + * @return array + */ + public function getOptions() + { + return $this->options; + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new ElasticaFormatter($this->options['index'], $this->options['type']); + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $documents = $this->getFormatter()->formatBatch($records); + $this->bulkSend($documents); + } + + /** + * Use Elasticsearch bulk API to send list of documents + * @param array $documents + * @throws \RuntimeException + */ + protected function bulkSend(array $documents) + { + try { + $this->client->addDocuments($documents); + } catch (ExceptionInterface $e) { + if (!$this->options['ignore_error']) { + throw new \RuntimeException("Error sending messages to Elasticsearch", 0, $e); + } + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php new file mode 100755 index 0000000..b2986b0 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ErrorLogHandler.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; + +/** + * Stores to PHP error_log() handler. + * + * @author Elan Ruusamäe + */ +class ErrorLogHandler extends AbstractProcessingHandler +{ + const OPERATING_SYSTEM = 0; + const SAPI = 4; + + protected $messageType; + protected $expandNewlines; + + /** + * @param int $messageType Says where the error should go. + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $expandNewlines If set to true, newlines in the message will be expanded to be take multiple log entries + */ + public function __construct($messageType = self::OPERATING_SYSTEM, $level = Logger::DEBUG, $bubble = true, $expandNewlines = false) + { + parent::__construct($level, $bubble); + + if (false === in_array($messageType, self::getAvailableTypes())) { + $message = sprintf('The given message type "%s" is not supported', print_r($messageType, true)); + throw new \InvalidArgumentException($message); + } + + $this->messageType = $messageType; + $this->expandNewlines = $expandNewlines; + } + + /** + * @return array With all available types + */ + public static function getAvailableTypes() + { + return array( + self::OPERATING_SYSTEM, + self::SAPI, + ); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('[%datetime%] %channel%.%level_name%: %message% %context% %extra%'); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if ($this->expandNewlines) { + $lines = preg_split('{[\r\n]+}', (string) $record['formatted']); + foreach ($lines as $line) { + error_log($line, $this->messageType); + } + } else { + error_log((string) $record['formatted'], $this->messageType); + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php new file mode 100755 index 0000000..938c1a7 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php @@ -0,0 +1,140 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Simple handler wrapper that filters records based on a list of levels + * + * It can be configured with an exact list of levels to allow, or a min/max level. + * + * @author Hennadiy Verkh + * @author Jordi Boggiano + */ +class FilterHandler extends AbstractHandler +{ + /** + * Handler or factory callable($record, $this) + * + * @var callable|\Monolog\Handler\HandlerInterface + */ + protected $handler; + + /** + * Minimum level for logs that are passed to handler + * + * @var int[] + */ + protected $acceptedLevels; + + /** + * Whether the messages that are handled can bubble up the stack or not + * + * @var bool + */ + protected $bubble; + + /** + * @param callable|HandlerInterface $handler Handler or factory callable($record, $this). + * @param int|array $minLevelOrList A list of levels to accept or a minimum level if maxLevel is provided + * @param int $maxLevel Maximum level to accept, only used if $minLevelOrList is not an array + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($handler, $minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY, $bubble = true) + { + $this->handler = $handler; + $this->bubble = $bubble; + $this->setAcceptedLevels($minLevelOrList, $maxLevel); + + if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { + throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); + } + } + + /** + * @return array + */ + public function getAcceptedLevels() + { + return array_flip($this->acceptedLevels); + } + + /** + * @param int|string|array $minLevelOrList A list of levels to accept or a minimum level or level name if maxLevel is provided + * @param int|string $maxLevel Maximum level or level name to accept, only used if $minLevelOrList is not an array + */ + public function setAcceptedLevels($minLevelOrList = Logger::DEBUG, $maxLevel = Logger::EMERGENCY) + { + if (is_array($minLevelOrList)) { + $acceptedLevels = array_map('Monolog\Logger::toMonologLevel', $minLevelOrList); + } else { + $minLevelOrList = Logger::toMonologLevel($minLevelOrList); + $maxLevel = Logger::toMonologLevel($maxLevel); + $acceptedLevels = array_values(array_filter(Logger::getLevels(), function ($level) use ($minLevelOrList, $maxLevel) { + return $level >= $minLevelOrList && $level <= $maxLevel; + })); + } + $this->acceptedLevels = array_flip($acceptedLevels); + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return isset($this->acceptedLevels[$record['level']]); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + + // The same logic as in FingersCrossedHandler + if (!$this->handler instanceof HandlerInterface) { + $this->handler = call_user_func($this->handler, $record, $this); + if (!$this->handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory callable should return a HandlerInterface"); + } + } + + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + $this->handler->handle($record); + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $filtered = array(); + foreach ($records as $record) { + if ($this->isHandling($record)) { + $filtered[] = $record; + } + } + + $this->handler->handleBatch($filtered); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php new file mode 100755 index 0000000..aaca12c --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ActivationStrategyInterface.php @@ -0,0 +1,28 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +/** + * Interface for activation strategies for the FingersCrossedHandler. + * + * @author Johannes M. Schmitt + */ +interface ActivationStrategyInterface +{ + /** + * Returns whether the given record activates the handler. + * + * @param array $record + * @return bool + */ + public function isHandlerActivated(array $record); +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php new file mode 100755 index 0000000..2a2a64d --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ChannelLevelActivationStrategy.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +use Monolog\Logger; + +/** + * Channel and Error level based monolog activation strategy. Allows to trigger activation + * based on level per channel. e.g. trigger activation on level 'ERROR' by default, except + * for records of the 'sql' channel; those should trigger activation on level 'WARN'. + * + * Example: + * + * + * $activationStrategy = new ChannelLevelActivationStrategy( + * Logger::CRITICAL, + * array( + * 'request' => Logger::ALERT, + * 'sensitive' => Logger::ERROR, + * ) + * ); + * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy); + * + * + * @author Mike Meessen + */ +class ChannelLevelActivationStrategy implements ActivationStrategyInterface +{ + private $defaultActionLevel; + private $channelToActionLevel; + + /** + * @param int $defaultActionLevel The default action level to be used if the record's category doesn't match any + * @param array $channelToActionLevel An array that maps channel names to action levels. + */ + public function __construct($defaultActionLevel, $channelToActionLevel = array()) + { + $this->defaultActionLevel = Logger::toMonologLevel($defaultActionLevel); + $this->channelToActionLevel = array_map('Monolog\Logger::toMonologLevel', $channelToActionLevel); + } + + public function isHandlerActivated(array $record) + { + if (isset($this->channelToActionLevel[$record['channel']])) { + return $record['level'] >= $this->channelToActionLevel[$record['channel']]; + } + + return $record['level'] >= $this->defaultActionLevel; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php new file mode 100755 index 0000000..6e63085 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossed/ErrorLevelActivationStrategy.php @@ -0,0 +1,34 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\FingersCrossed; + +use Monolog\Logger; + +/** + * Error level based activation strategy. + * + * @author Johannes M. Schmitt + */ +class ErrorLevelActivationStrategy implements ActivationStrategyInterface +{ + private $actionLevel; + + public function __construct($actionLevel) + { + $this->actionLevel = Logger::toMonologLevel($actionLevel); + } + + public function isHandlerActivated(array $record) + { + return $record['level'] >= $this->actionLevel; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php new file mode 100755 index 0000000..275fd51 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FingersCrossedHandler.php @@ -0,0 +1,177 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; +use Monolog\Handler\FingersCrossed\ActivationStrategyInterface; +use Monolog\Logger; +use Monolog\ResettableInterface; + +/** + * Buffers all records until a certain level is reached + * + * The advantage of this approach is that you don't get any clutter in your log files. + * Only requests which actually trigger an error (or whatever your actionLevel is) will be + * in the logs, but they will contain all records, not only those above the level threshold. + * + * You can find the various activation strategies in the + * Monolog\Handler\FingersCrossed\ namespace. + * + * @author Jordi Boggiano + */ +class FingersCrossedHandler extends AbstractHandler +{ + protected $handler; + protected $activationStrategy; + protected $buffering = true; + protected $bufferSize; + protected $buffer = array(); + protected $stopBuffering; + protected $passthruLevel; + + /** + * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler). + * @param int|ActivationStrategyInterface $activationStrategy Strategy which determines when this handler takes action + * @param int $bufferSize How many entries should be buffered at most, beyond that the oldest items are removed from the buffer. + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $stopBuffering Whether the handler should stop buffering after being triggered (default true) + * @param int $passthruLevel Minimum level to always flush to handler on close, even if strategy not triggered + */ + public function __construct($handler, $activationStrategy = null, $bufferSize = 0, $bubble = true, $stopBuffering = true, $passthruLevel = null) + { + if (null === $activationStrategy) { + $activationStrategy = new ErrorLevelActivationStrategy(Logger::WARNING); + } + + // convert simple int activationStrategy to an object + if (!$activationStrategy instanceof ActivationStrategyInterface) { + $activationStrategy = new ErrorLevelActivationStrategy($activationStrategy); + } + + $this->handler = $handler; + $this->activationStrategy = $activationStrategy; + $this->bufferSize = $bufferSize; + $this->bubble = $bubble; + $this->stopBuffering = $stopBuffering; + + if ($passthruLevel !== null) { + $this->passthruLevel = Logger::toMonologLevel($passthruLevel); + } + + if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { + throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); + } + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return true; + } + + /** + * Manually activate this logger regardless of the activation strategy + */ + public function activate() + { + if ($this->stopBuffering) { + $this->buffering = false; + } + if (!$this->handler instanceof HandlerInterface) { + $record = end($this->buffer) ?: null; + + $this->handler = call_user_func($this->handler, $record, $this); + if (!$this->handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory callable should return a HandlerInterface"); + } + } + $this->handler->handleBatch($this->buffer); + $this->buffer = array(); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + if ($this->buffering) { + $this->buffer[] = $record; + if ($this->bufferSize > 0 && count($this->buffer) > $this->bufferSize) { + array_shift($this->buffer); + } + if ($this->activationStrategy->isHandlerActivated($record)) { + $this->activate(); + } + } else { + $this->handler->handle($record); + } + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->flushBuffer(); + } + + public function reset() + { + $this->flushBuffer(); + + parent::reset(); + + if ($this->handler instanceof ResettableInterface) { + $this->handler->reset(); + } + } + + /** + * Clears the buffer without flushing any messages down to the wrapped handler. + * + * It also resets the handler to its initial buffering state. + */ + public function clear() + { + $this->buffer = array(); + $this->reset(); + } + + /** + * Resets the state of the handler. Stops forwarding records to the wrapped handler. + */ + private function flushBuffer() + { + if (null !== $this->passthruLevel) { + $level = $this->passthruLevel; + $this->buffer = array_filter($this->buffer, function ($record) use ($level) { + return $record['level'] >= $level; + }); + if (count($this->buffer) > 0) { + $this->handler->handleBatch($this->buffer); + } + } + + $this->buffer = array(); + $this->buffering = true; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php new file mode 100755 index 0000000..c30b184 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FirePHPHandler.php @@ -0,0 +1,195 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\WildfireFormatter; + +/** + * Simple FirePHP Handler (http://www.firephp.org/), which uses the Wildfire protocol. + * + * @author Eric Clemmons (@ericclemmons) + */ +class FirePHPHandler extends AbstractProcessingHandler +{ + /** + * WildFire JSON header message format + */ + const PROTOCOL_URI = 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2'; + + /** + * FirePHP structure for parsing messages & their presentation + */ + const STRUCTURE_URI = 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1'; + + /** + * Must reference a "known" plugin, otherwise headers won't display in FirePHP + */ + const PLUGIN_URI = 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3'; + + /** + * Header prefix for Wildfire to recognize & parse headers + */ + const HEADER_PREFIX = 'X-Wf'; + + /** + * Whether or not Wildfire vendor-specific headers have been generated & sent yet + */ + protected static $initialized = false; + + /** + * Shared static message index between potentially multiple handlers + * @var int + */ + protected static $messageIndex = 1; + + protected static $sendHeaders = true; + + /** + * Base header creation function used by init headers & record headers + * + * @param array $meta Wildfire Plugin, Protocol & Structure Indexes + * @param string $message Log message + * @return array Complete header string ready for the client as key and message as value + */ + protected function createHeader(array $meta, $message) + { + $header = sprintf('%s-%s', self::HEADER_PREFIX, join('-', $meta)); + + return array($header => $message); + } + + /** + * Creates message header from record + * + * @see createHeader() + * @param array $record + * @return string + */ + protected function createRecordHeader(array $record) + { + // Wildfire is extensible to support multiple protocols & plugins in a single request, + // but we're not taking advantage of that (yet), so we're using "1" for simplicity's sake. + return $this->createHeader( + array(1, 1, 1, self::$messageIndex++), + $record['formatted'] + ); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new WildfireFormatter(); + } + + /** + * Wildfire initialization headers to enable message parsing + * + * @see createHeader() + * @see sendHeader() + * @return array + */ + protected function getInitHeaders() + { + // Initial payload consists of required headers for Wildfire + return array_merge( + $this->createHeader(array('Protocol', 1), self::PROTOCOL_URI), + $this->createHeader(array(1, 'Structure', 1), self::STRUCTURE_URI), + $this->createHeader(array(1, 'Plugin', 1), self::PLUGIN_URI) + ); + } + + /** + * Send header string to the client + * + * @param string $header + * @param string $content + */ + protected function sendHeader($header, $content) + { + if (!headers_sent() && self::$sendHeaders) { + header(sprintf('%s: %s', $header, $content)); + } + } + + /** + * Creates & sends header for a record, ensuring init headers have been sent prior + * + * @see sendHeader() + * @see sendInitHeaders() + * @param array $record + */ + protected function write(array $record) + { + if (!self::$sendHeaders) { + return; + } + + // WildFire-specific headers must be sent prior to any messages + if (!self::$initialized) { + self::$initialized = true; + + self::$sendHeaders = $this->headersAccepted(); + if (!self::$sendHeaders) { + return; + } + + foreach ($this->getInitHeaders() as $header => $content) { + $this->sendHeader($header, $content); + } + } + + $header = $this->createRecordHeader($record); + if (trim(current($header)) !== '') { + $this->sendHeader(key($header), current($header)); + } + } + + /** + * Verifies if the headers are accepted by the current user agent + * + * @return bool + */ + protected function headersAccepted() + { + if (!empty($_SERVER['HTTP_USER_AGENT']) && preg_match('{\bFirePHP/\d+\.\d+\b}', $_SERVER['HTTP_USER_AGENT'])) { + return true; + } + + return isset($_SERVER['HTTP_X_FIREPHP_VERSION']); + } + + /** + * BC getter for the sendHeaders property that has been made static + */ + public function __get($property) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + return static::$sendHeaders; + } + + /** + * BC setter for the sendHeaders property that has been made static + */ + public function __set($property, $value) + { + if ('sendHeaders' !== $property) { + throw new \InvalidArgumentException('Undefined property '.$property); + } + + static::$sendHeaders = $value; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php new file mode 100755 index 0000000..c43c013 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FleepHookHandler.php @@ -0,0 +1,126 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; + +/** + * Sends logs to Fleep.io using Webhook integrations + * + * You'll need a Fleep.io account to use this handler. + * + * @see https://fleep.io/integrations/webhooks/ Fleep Webhooks Documentation + * @author Ando Roots + */ +class FleepHookHandler extends SocketHandler +{ + const FLEEP_HOST = 'fleep.io'; + + const FLEEP_HOOK_URI = '/hook/'; + + /** + * @var string Webhook token (specifies the conversation where logs are sent) + */ + protected $token; + + /** + * Construct a new Fleep.io Handler. + * + * For instructions on how to create a new web hook in your conversations + * see https://fleep.io/integrations/webhooks/ + * + * @param string $token Webhook token + * @param bool|int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @throws MissingExtensionException + */ + public function __construct($token, $level = Logger::DEBUG, $bubble = true) + { + if (!extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FleepHookHandler'); + } + + $this->token = $token; + + $connectionString = 'ssl://' . self::FLEEP_HOST . ':443'; + parent::__construct($connectionString, $level, $bubble); + } + + /** + * Returns the default formatter to use with this handler + * + * Overloaded to remove empty context and extra arrays from the end of the log message. + * + * @return LineFormatter + */ + protected function getDefaultFormatter() + { + return new LineFormatter(null, null, true, true); + } + + /** + * Handles a log record + * + * @param array $record + */ + public function write(array $record) + { + parent::write($record); + $this->closeSocket(); + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + $header = "POST " . self::FLEEP_HOOK_URI . $this->token . " HTTP/1.1\r\n"; + $header .= "Host: " . self::FLEEP_HOST . "\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + $dataArray = array( + 'message' => $record['formatted'], + ); + + return http_build_query($dataArray); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php new file mode 100755 index 0000000..dd9a361 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/FlowdockHandler.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\FlowdockFormatter; +use Monolog\Formatter\FormatterInterface; + +/** + * Sends notifications through the Flowdock push API + * + * This must be configured with a FlowdockFormatter instance via setFormatter() + * + * Notes: + * API token - Flowdock API token + * + * @author Dominik Liebler + * @see https://www.flowdock.com/api/push + */ +class FlowdockHandler extends SocketHandler +{ + /** + * @var string + */ + protected $apiToken; + + /** + * @param string $apiToken + * @param bool|int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * + * @throws MissingExtensionException if OpenSSL is missing + */ + public function __construct($apiToken, $level = Logger::DEBUG, $bubble = true) + { + if (!extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the FlowdockHandler'); + } + + parent::__construct('ssl://api.flowdock.com:443', $level, $bubble); + $this->apiToken = $apiToken; + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + if (!$formatter instanceof FlowdockFormatter) { + throw new \InvalidArgumentException('The FlowdockHandler requires an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); + } + + return parent::setFormatter($formatter); + } + + /** + * Gets the default formatter. + * + * @return FormatterInterface + */ + protected function getDefaultFormatter() + { + throw new \InvalidArgumentException('The FlowdockHandler must be configured (via setFormatter) with an instance of Monolog\Formatter\FlowdockFormatter to function correctly'); + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + parent::write($record); + + $this->closeSocket(); + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + return json_encode($record['formatted']['flowdock']); + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + $header = "POST /v1/messages/team_inbox/" . $this->apiToken . " HTTP/1.1\r\n"; + $header .= "Host: api.flowdock.com\r\n"; + $header .= "Content-Type: application/json\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php new file mode 100755 index 0000000..71e4669 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Gelf\IMessagePublisher; +use Gelf\PublisherInterface; +use Gelf\Publisher; +use InvalidArgumentException; +use Monolog\Logger; +use Monolog\Formatter\GelfMessageFormatter; + +/** + * Handler to send messages to a Graylog2 (http://www.graylog2.org) server + * + * @author Matt Lehner + * @author Benjamin Zikarsky + */ +class GelfHandler extends AbstractProcessingHandler +{ + /** + * @var Publisher the publisher object that sends the message to the server + */ + protected $publisher; + + /** + * @param PublisherInterface|IMessagePublisher|Publisher $publisher a publisher object + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($publisher, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + if (!$publisher instanceof Publisher && !$publisher instanceof IMessagePublisher && !$publisher instanceof PublisherInterface) { + throw new InvalidArgumentException('Invalid publisher, expected a Gelf\Publisher, Gelf\IMessagePublisher or Gelf\PublisherInterface instance'); + } + + $this->publisher = $publisher; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->publisher->publish($record['formatted']); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new GelfMessageFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php new file mode 100755 index 0000000..28e5c56 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/GroupHandler.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\ResettableInterface; + +/** + * Forwards records to multiple handlers + * + * @author Lenar Lõhmus + */ +class GroupHandler extends AbstractHandler +{ + protected $handlers; + + /** + * @param array $handlers Array of Handlers. + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(array $handlers, $bubble = true) + { + foreach ($handlers as $handler) { + if (!$handler instanceof HandlerInterface) { + throw new \InvalidArgumentException('The first argument of the GroupHandler must be an array of HandlerInterface instances.'); + } + } + + $this->handlers = $handlers; + $this->bubble = $bubble; + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + foreach ($this->handlers as $handler) { + $handler->handle($record); + } + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + if ($this->processors) { + $processed = array(); + foreach ($records as $record) { + foreach ($this->processors as $processor) { + $processed[] = call_user_func($processor, $record); + } + } + $records = $processed; + } + + foreach ($this->handlers as $handler) { + $handler->handleBatch($records); + } + } + + public function reset() + { + parent::reset(); + + foreach ($this->handlers as $handler) { + if ($handler instanceof ResettableInterface) { + $handler->reset(); + } + } + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + foreach ($this->handlers as $handler) { + $handler->setFormatter($formatter); + } + + return $this; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php new file mode 100755 index 0000000..8d5a4a0 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/HandlerInterface.php @@ -0,0 +1,90 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; + +/** + * Interface that all Monolog Handlers must implement + * + * @author Jordi Boggiano + */ +interface HandlerInterface +{ + /** + * Checks whether the given record will be handled by this handler. + * + * This is mostly done for performance reasons, to avoid calling processors for nothing. + * + * Handlers should still check the record levels within handle(), returning false in isHandling() + * is no guarantee that handle() will not be called, and isHandling() might not be called + * for a given record. + * + * @param array $record Partial log record containing only a level key + * + * @return bool + */ + public function isHandling(array $record); + + /** + * Handles a record. + * + * All records may be passed to this method, and the handler should discard + * those that it does not want to handle. + * + * The return value of this function controls the bubbling process of the handler stack. + * Unless the bubbling is interrupted (by returning true), the Logger class will keep on + * calling further handlers in the stack with a given log record. + * + * @param array $record The record to handle + * @return bool true means that this handler handled the record, and that bubbling is not permitted. + * false means the record was either not processed or that this handler allows bubbling. + */ + public function handle(array $record); + + /** + * Handles a set of records at once. + * + * @param array $records The records to handle (an array of record arrays) + */ + public function handleBatch(array $records); + + /** + * Adds a processor in the stack. + * + * @param callable $callback + * @return self + */ + public function pushProcessor($callback); + + /** + * Removes the processor on top of the stack and returns it. + * + * @return callable + */ + public function popProcessor(); + + /** + * Sets the formatter. + * + * @param FormatterInterface $formatter + * @return self + */ + public function setFormatter(FormatterInterface $formatter); + + /** + * Gets the formatter. + * + * @return FormatterInterface + */ + public function getFormatter(); +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php b/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php new file mode 100755 index 0000000..55e6498 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/HandlerWrapper.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\ResettableInterface; +use Monolog\Formatter\FormatterInterface; + +/** + * This simple wrapper class can be used to extend handlers functionality. + * + * Example: A custom filtering that can be applied to any handler. + * + * Inherit from this class and override handle() like this: + * + * public function handle(array $record) + * { + * if ($record meets certain conditions) { + * return false; + * } + * return $this->handler->handle($record); + * } + * + * @author Alexey Karapetov + */ +class HandlerWrapper implements HandlerInterface, ResettableInterface +{ + /** + * @var HandlerInterface + */ + protected $handler; + + /** + * HandlerWrapper constructor. + * @param HandlerInterface $handler + */ + public function __construct(HandlerInterface $handler) + { + $this->handler = $handler; + } + + /** + * {@inheritdoc} + */ + public function isHandling(array $record) + { + return $this->handler->isHandling($record); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + return $this->handler->handle($record); + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + return $this->handler->handleBatch($records); + } + + /** + * {@inheritdoc} + */ + public function pushProcessor($callback) + { + $this->handler->pushProcessor($callback); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function popProcessor() + { + return $this->handler->popProcessor(); + } + + /** + * {@inheritdoc} + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->handler->setFormatter($formatter); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getFormatter() + { + return $this->handler->getFormatter(); + } + + public function reset() + { + if ($this->handler instanceof ResettableInterface) { + return $this->handler->reset(); + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php new file mode 100755 index 0000000..73233c9 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/HipChatHandler.php @@ -0,0 +1,365 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Sends notifications through the hipchat api to a hipchat room + * + * Notes: + * API token - HipChat API token + * Room - HipChat Room Id or name, where messages are sent + * Name - Name used to send the message (from) + * notify - Should the message trigger a notification in the clients + * version - The API version to use (HipChatHandler::API_V1 | HipChatHandler::API_V2) + * + * @author Rafael Dohms + * @see https://www.hipchat.com/docs/api + */ +class HipChatHandler extends SocketHandler +{ + /** + * Use API version 1 + */ + const API_V1 = 'v1'; + + /** + * Use API version v2 + */ + const API_V2 = 'v2'; + + /** + * The maximum allowed length for the name used in the "from" field. + */ + const MAXIMUM_NAME_LENGTH = 15; + + /** + * The maximum allowed length for the message. + */ + const MAXIMUM_MESSAGE_LENGTH = 9500; + + /** + * @var string + */ + private $token; + + /** + * @var string + */ + private $room; + + /** + * @var string + */ + private $name; + + /** + * @var bool + */ + private $notify; + + /** + * @var string + */ + private $format; + + /** + * @var string + */ + private $host; + + /** + * @var string + */ + private $version; + + /** + * @param string $token HipChat API Token + * @param string $room The room that should be alerted of the message (Id or Name) + * @param string $name Name used in the "from" field. + * @param bool $notify Trigger a notification in clients or not + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $useSSL Whether to connect via SSL. + * @param string $format The format of the messages (default to text, can be set to html if you have html in the messages) + * @param string $host The HipChat server hostname. + * @param string $version The HipChat API version (default HipChatHandler::API_V1) + */ + public function __construct($token, $room, $name = 'Monolog', $notify = false, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $format = 'text', $host = 'api.hipchat.com', $version = self::API_V1) + { + if ($version == self::API_V1 && !$this->validateStringLength($name, static::MAXIMUM_NAME_LENGTH)) { + throw new \InvalidArgumentException('The supplied name is too long. HipChat\'s v1 API supports names up to 15 UTF-8 characters.'); + } + + $connectionString = $useSSL ? 'ssl://'.$host.':443' : $host.':80'; + parent::__construct($connectionString, $level, $bubble); + + $this->token = $token; + $this->name = $name; + $this->notify = $notify; + $this->room = $room; + $this->format = $format; + $this->host = $host; + $this->version = $version; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + $dataArray = array( + 'notify' => $this->version == self::API_V1 ? + ($this->notify ? 1 : 0) : + ($this->notify ? 'true' : 'false'), + 'message' => $record['formatted'], + 'message_format' => $this->format, + 'color' => $this->getAlertColor($record['level']), + ); + + if (!$this->validateStringLength($dataArray['message'], static::MAXIMUM_MESSAGE_LENGTH)) { + if (function_exists('mb_substr')) { + $dataArray['message'] = mb_substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH).' [truncated]'; + } else { + $dataArray['message'] = substr($dataArray['message'], 0, static::MAXIMUM_MESSAGE_LENGTH).' [truncated]'; + } + } + + // if we are using the legacy API then we need to send some additional information + if ($this->version == self::API_V1) { + $dataArray['room_id'] = $this->room; + } + + // append the sender name if it is set + // always append it if we use the v1 api (it is required in v1) + if ($this->version == self::API_V1 || $this->name !== null) { + $dataArray['from'] = (string) $this->name; + } + + return http_build_query($dataArray); + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + if ($this->version == self::API_V1) { + $header = "POST /v1/rooms/message?format=json&auth_token={$this->token} HTTP/1.1\r\n"; + } else { + // needed for rooms with special (spaces, etc) characters in the name + $room = rawurlencode($this->room); + $header = "POST /v2/room/{$room}/notification?auth_token={$this->token} HTTP/1.1\r\n"; + } + + $header .= "Host: {$this->host}\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * Assigns a color to each level of log records. + * + * @param int $level + * @return string + */ + protected function getAlertColor($level) + { + switch (true) { + case $level >= Logger::ERROR: + return 'red'; + case $level >= Logger::WARNING: + return 'yellow'; + case $level >= Logger::INFO: + return 'green'; + case $level == Logger::DEBUG: + return 'gray'; + default: + return 'yellow'; + } + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + parent::write($record); + $this->finalizeWrite(); + } + + /** + * Finalizes the request by reading some bytes and then closing the socket + * + * If we do not read some but close the socket too early, hipchat sometimes + * drops the request entirely. + */ + protected function finalizeWrite() + { + $res = $this->getResource(); + if (is_resource($res)) { + @fread($res, 2048); + } + $this->closeSocket(); + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + if (count($records) == 0) { + return true; + } + + $batchRecords = $this->combineRecords($records); + + $handled = false; + foreach ($batchRecords as $batchRecord) { + if ($this->isHandling($batchRecord)) { + $this->write($batchRecord); + $handled = true; + } + } + + if (!$handled) { + return false; + } + + return false === $this->bubble; + } + + /** + * Combines multiple records into one. Error level of the combined record + * will be the highest level from the given records. Datetime will be taken + * from the first record. + * + * @param $records + * @return array + */ + private function combineRecords($records) + { + $batchRecord = null; + $batchRecords = array(); + $messages = array(); + $formattedMessages = array(); + $level = 0; + $levelName = null; + $datetime = null; + + foreach ($records as $record) { + $record = $this->processRecord($record); + + if ($record['level'] > $level) { + $level = $record['level']; + $levelName = $record['level_name']; + } + + if (null === $datetime) { + $datetime = $record['datetime']; + } + + $messages[] = $record['message']; + $messageStr = implode(PHP_EOL, $messages); + $formattedMessages[] = $this->getFormatter()->format($record); + $formattedMessageStr = implode('', $formattedMessages); + + $batchRecord = array( + 'message' => $messageStr, + 'formatted' => $formattedMessageStr, + 'context' => array(), + 'extra' => array(), + ); + + if (!$this->validateStringLength($batchRecord['formatted'], static::MAXIMUM_MESSAGE_LENGTH)) { + // Pop the last message and implode the remaining messages + $lastMessage = array_pop($messages); + $lastFormattedMessage = array_pop($formattedMessages); + $batchRecord['message'] = implode(PHP_EOL, $messages); + $batchRecord['formatted'] = implode('', $formattedMessages); + + $batchRecords[] = $batchRecord; + $messages = array($lastMessage); + $formattedMessages = array($lastFormattedMessage); + + $batchRecord = null; + } + } + + if (null !== $batchRecord) { + $batchRecords[] = $batchRecord; + } + + // Set the max level and datetime for all records + foreach ($batchRecords as &$batchRecord) { + $batchRecord = array_merge( + $batchRecord, + array( + 'level' => $level, + 'level_name' => $levelName, + 'datetime' => $datetime, + ) + ); + } + + return $batchRecords; + } + + /** + * Validates the length of a string. + * + * If the `mb_strlen()` function is available, it will use that, as HipChat + * allows UTF-8 characters. Otherwise, it will fall back to `strlen()`. + * + * Note that this might cause false failures in the specific case of using + * a valid name with less than 16 characters, but 16 or more bytes, on a + * system where `mb_strlen()` is unavailable. + * + * @param string $str + * @param int $length + * + * @return bool + */ + private function validateStringLength($str, $length) + { + if (function_exists('mb_strlen')) { + return (mb_strlen($str) <= $length); + } + + return (strlen($str) <= $length); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php new file mode 100755 index 0000000..7f22622 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/IFTTTHandler.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * IFTTTHandler uses cURL to trigger IFTTT Maker actions + * + * Register a secret key and trigger/event name at https://ifttt.com/maker + * + * value1 will be the channel from monolog's Logger constructor, + * value2 will be the level name (ERROR, WARNING, ..) + * value3 will be the log record's message + * + * @author Nehal Patel + */ +class IFTTTHandler extends AbstractProcessingHandler +{ + private $eventName; + private $secretKey; + + /** + * @param string $eventName The name of the IFTTT Maker event that should be triggered + * @param string $secretKey A valid IFTTT secret key + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($eventName, $secretKey, $level = Logger::ERROR, $bubble = true) + { + $this->eventName = $eventName; + $this->secretKey = $secretKey; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + public function write(array $record) + { + $postData = array( + "value1" => $record["channel"], + "value2" => $record["level_name"], + "value3" => $record["message"], + ); + $postString = json_encode($postData); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, "https://maker.ifttt.com/trigger/" . $this->eventName . "/with/key/" . $this->secretKey); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $postString); + curl_setopt($ch, CURLOPT_HTTPHEADER, array( + "Content-Type: application/json", + )); + + Curl\Util::execute($ch); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php new file mode 100755 index 0000000..a12e3de --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/InsightOpsHandler.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + + namespace Monolog\Handler; + + use Monolog\Logger; + +/** + * Inspired on LogEntriesHandler. + * + * @author Robert Kaufmann III + * @author Gabriel Machado + */ +class InsightOpsHandler extends SocketHandler +{ + /** + * @var string + */ + protected $logToken; + + /** + * @param string $token Log token supplied by InsightOps + * @param string $region Region where InsightOps account is hosted. Could be 'us' or 'eu'. + * @param bool $useSSL Whether or not SSL encryption should be used + * @param int $level The minimum logging level to trigger this handler + * @param bool $bubble Whether or not messages that are handled should bubble up the stack. + * + * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing + */ + public function __construct($token, $region = 'us', $useSSL = true, $level = Logger::DEBUG, $bubble = true) + { + if ($useSSL && !extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); + } + + $endpoint = $useSSL + ? 'ssl://' . $region . '.data.logs.insight.rapid7.com:443' + : $region . '.data.logs.insight.rapid7.com:80'; + + parent::__construct($endpoint, $level, $bubble); + $this->logToken = $token; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + return $this->logToken . ' ' . $record['formatted']; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php new file mode 100755 index 0000000..ea89fb3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/LogEntriesHandler.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * @author Robert Kaufmann III + */ +class LogEntriesHandler extends SocketHandler +{ + /** + * @var string + */ + protected $logToken; + + /** + * @param string $token Log token supplied by LogEntries + * @param bool $useSSL Whether or not SSL encryption should be used. + * @param int $level The minimum logging level to trigger this handler + * @param bool $bubble Whether or not messages that are handled should bubble up the stack. + * + * @throws MissingExtensionException If SSL encryption is set to true and OpenSSL is missing + */ + public function __construct($token, $useSSL = true, $level = Logger::DEBUG, $bubble = true, $host = 'data.logentries.com') + { + if ($useSSL && !extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP plugin is required to use SSL encrypted connection for LogEntriesHandler'); + } + + $endpoint = $useSSL ? 'ssl://' . $host . ':443' : $host . ':80'; + parent::__construct($endpoint, $level, $bubble); + $this->logToken = $token; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + return $this->logToken . ' ' . $record['formatted']; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php new file mode 100755 index 0000000..bcd62e1 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/LogglyHandler.php @@ -0,0 +1,102 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\LogglyFormatter; + +/** + * Sends errors to Loggly. + * + * @author Przemek Sobstel + * @author Adam Pancutt + * @author Gregory Barchard + */ +class LogglyHandler extends AbstractProcessingHandler +{ + const HOST = 'logs-01.loggly.com'; + const ENDPOINT_SINGLE = 'inputs'; + const ENDPOINT_BATCH = 'bulk'; + + protected $token; + + protected $tag = array(); + + public function __construct($token, $level = Logger::DEBUG, $bubble = true) + { + if (!extension_loaded('curl')) { + throw new \LogicException('The curl extension is needed to use the LogglyHandler'); + } + + $this->token = $token; + + parent::__construct($level, $bubble); + } + + public function setTag($tag) + { + $tag = !empty($tag) ? $tag : array(); + $this->tag = is_array($tag) ? $tag : array($tag); + } + + public function addTag($tag) + { + if (!empty($tag)) { + $tag = is_array($tag) ? $tag : array($tag); + $this->tag = array_unique(array_merge($this->tag, $tag)); + } + } + + protected function write(array $record) + { + $this->send($record["formatted"], self::ENDPOINT_SINGLE); + } + + public function handleBatch(array $records) + { + $level = $this->level; + + $records = array_filter($records, function ($record) use ($level) { + return ($record['level'] >= $level); + }); + + if ($records) { + $this->send($this->getFormatter()->formatBatch($records), self::ENDPOINT_BATCH); + } + } + + protected function send($data, $endpoint) + { + $url = sprintf("https://%s/%s/%s/", self::HOST, $endpoint, $this->token); + + $headers = array('Content-Type: application/json'); + + if (!empty($this->tag)) { + $headers[] = 'X-LOGGLY-TAG: '.implode(',', $this->tag); + } + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $data); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + + Curl\Util::execute($ch); + } + + protected function getDefaultFormatter() + { + return new LogglyFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php new file mode 100755 index 0000000..9e23283 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MailHandler.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Base class for all mail handlers + * + * @author Gyula Sallai + */ +abstract class MailHandler extends AbstractProcessingHandler +{ + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $messages = array(); + + foreach ($records as $record) { + if ($record['level'] < $this->level) { + continue; + } + $messages[] = $this->processRecord($record); + } + + if (!empty($messages)) { + $this->send((string) $this->getFormatter()->formatBatch($messages), $messages); + } + } + + /** + * Send a mail with the given content + * + * @param string $content formatted email body to be sent + * @param array $records the array of log records that formed this content + */ + abstract protected function send($content, array $records); + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->send((string) $record['formatted'], array($record)); + } + + protected function getHighestRecord(array $records) + { + $highestRecord = null; + foreach ($records as $record) { + if ($highestRecord === null || $highestRecord['level'] < $record['level']) { + $highestRecord = $record; + } + } + + return $highestRecord; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php new file mode 100755 index 0000000..3f0956a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MandrillHandler.php @@ -0,0 +1,68 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * MandrillHandler uses cURL to send the emails to the Mandrill API + * + * @author Adam Nicholson + */ +class MandrillHandler extends MailHandler +{ + protected $message; + protected $apiKey; + + /** + * @param string $apiKey A valid Mandrill API key + * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($apiKey, $message, $level = Logger::ERROR, $bubble = true) + { + parent::__construct($level, $bubble); + + if (!$message instanceof \Swift_Message && is_callable($message)) { + $message = call_user_func($message); + } + if (!$message instanceof \Swift_Message) { + throw new \InvalidArgumentException('You must provide either a Swift_Message instance or a callable returning it'); + } + $this->message = $message; + $this->apiKey = $apiKey; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + $message = clone $this->message; + $message->setBody($content); + $message->setDate(time()); + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, 'https://mandrillapp.com/api/1.0/messages/send-raw.json'); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(array( + 'key' => $this->apiKey, + 'raw_message' => (string) $message, + 'async' => false, + ))); + + Curl\Util::execute($ch); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php new file mode 100755 index 0000000..4724a7e --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MissingExtensionException.php @@ -0,0 +1,21 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Exception can be thrown if an extension for an handler is missing + * + * @author Christian Bergau + */ +class MissingExtensionException extends \Exception +{ +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php new file mode 100755 index 0000000..56fe755 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/MongoDBHandler.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\NormalizerFormatter; + +/** + * Logs to a MongoDB database. + * + * usage example: + * + * $log = new Logger('application'); + * $mongodb = new MongoDBHandler(new \Mongo("mongodb://localhost:27017"), "logs", "prod"); + * $log->pushHandler($mongodb); + * + * @author Thomas Tourlourat + */ +class MongoDBHandler extends AbstractProcessingHandler +{ + protected $mongoCollection; + + public function __construct($mongo, $database, $collection, $level = Logger::DEBUG, $bubble = true) + { + if (!($mongo instanceof \MongoClient || $mongo instanceof \Mongo || $mongo instanceof \MongoDB\Client)) { + throw new \InvalidArgumentException('MongoClient, Mongo or MongoDB\Client instance required'); + } + + $this->mongoCollection = $mongo->selectCollection($database, $collection); + + parent::__construct($level, $bubble); + } + + protected function write(array $record) + { + if ($this->mongoCollection instanceof \MongoDB\Collection) { + $this->mongoCollection->insertOne($record["formatted"]); + } else { + $this->mongoCollection->save($record["formatted"]); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new NormalizerFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php new file mode 100755 index 0000000..d7807fd --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/NativeMailerHandler.php @@ -0,0 +1,185 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; + +/** + * NativeMailerHandler uses the mail() function to send the emails + * + * @author Christophe Coevoet + * @author Mark Garrett + */ +class NativeMailerHandler extends MailHandler +{ + /** + * The email addresses to which the message will be sent + * @var array + */ + protected $to; + + /** + * The subject of the email + * @var string + */ + protected $subject; + + /** + * Optional headers for the message + * @var array + */ + protected $headers = array(); + + /** + * Optional parameters for the message + * @var array + */ + protected $parameters = array(); + + /** + * The wordwrap length for the message + * @var int + */ + protected $maxColumnWidth; + + /** + * The Content-type for the message + * @var string + */ + protected $contentType = 'text/plain'; + + /** + * The encoding for the message + * @var string + */ + protected $encoding = 'utf-8'; + + /** + * @param string|array $to The receiver of the mail + * @param string $subject The subject of the mail + * @param string $from The sender of the mail + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param int $maxColumnWidth The maximum column width that the message lines will have + */ + public function __construct($to, $subject, $from, $level = Logger::ERROR, $bubble = true, $maxColumnWidth = 70) + { + parent::__construct($level, $bubble); + $this->to = is_array($to) ? $to : array($to); + $this->subject = $subject; + $this->addHeader(sprintf('From: %s', $from)); + $this->maxColumnWidth = $maxColumnWidth; + } + + /** + * Add headers to the message + * + * @param string|array $headers Custom added headers + * @return self + */ + public function addHeader($headers) + { + foreach ((array) $headers as $header) { + if (strpos($header, "\n") !== false || strpos($header, "\r") !== false) { + throw new \InvalidArgumentException('Headers can not contain newline characters for security reasons'); + } + $this->headers[] = $header; + } + + return $this; + } + + /** + * Add parameters to the message + * + * @param string|array $parameters Custom added parameters + * @return self + */ + public function addParameter($parameters) + { + $this->parameters = array_merge($this->parameters, (array) $parameters); + + return $this; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + $content = wordwrap($content, $this->maxColumnWidth); + $headers = ltrim(implode("\r\n", $this->headers) . "\r\n", "\r\n"); + $headers .= 'Content-type: ' . $this->getContentType() . '; charset=' . $this->getEncoding() . "\r\n"; + if ($this->getContentType() == 'text/html' && false === strpos($headers, 'MIME-Version:')) { + $headers .= 'MIME-Version: 1.0' . "\r\n"; + } + + $subject = $this->subject; + if ($records) { + $subjectFormatter = new LineFormatter($this->subject); + $subject = $subjectFormatter->format($this->getHighestRecord($records)); + } + + $parameters = implode(' ', $this->parameters); + foreach ($this->to as $to) { + mail($to, $subject, $content, $headers, $parameters); + } + } + + /** + * @return string $contentType + */ + public function getContentType() + { + return $this->contentType; + } + + /** + * @return string $encoding + */ + public function getEncoding() + { + return $this->encoding; + } + + /** + * @param string $contentType The content type of the email - Defaults to text/plain. Use text/html for HTML + * messages. + * @return self + */ + public function setContentType($contentType) + { + if (strpos($contentType, "\n") !== false || strpos($contentType, "\r") !== false) { + throw new \InvalidArgumentException('The content type can not contain newline characters to prevent email header injection'); + } + + $this->contentType = $contentType; + + return $this; + } + + /** + * @param string $encoding + * @return self + */ + public function setEncoding($encoding) + { + if (strpos($encoding, "\n") !== false || strpos($encoding, "\r") !== false) { + throw new \InvalidArgumentException('The encoding can not contain newline characters to prevent email header injection'); + } + + $this->encoding = $encoding; + + return $this; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php new file mode 100755 index 0000000..f911997 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/NewRelicHandler.php @@ -0,0 +1,204 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\NormalizerFormatter; + +/** + * Class to record a log on a NewRelic application. + * Enabling New Relic High Security mode may prevent capture of useful information. + * + * This handler requires a NormalizerFormatter to function and expects an array in $record['formatted'] + * + * @see https://docs.newrelic.com/docs/agents/php-agent + * @see https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security + */ +class NewRelicHandler extends AbstractProcessingHandler +{ + /** + * Name of the New Relic application that will receive logs from this handler. + * + * @var string + */ + protected $appName; + + /** + * Name of the current transaction + * + * @var string + */ + protected $transactionName; + + /** + * Some context and extra data is passed into the handler as arrays of values. Do we send them as is + * (useful if we are using the API), or explode them for display on the NewRelic RPM website? + * + * @var bool + */ + protected $explodeArrays; + + /** + * {@inheritDoc} + * + * @param string $appName + * @param bool $explodeArrays + * @param string $transactionName + */ + public function __construct( + $level = Logger::ERROR, + $bubble = true, + $appName = null, + $explodeArrays = false, + $transactionName = null + ) { + parent::__construct($level, $bubble); + + $this->appName = $appName; + $this->explodeArrays = $explodeArrays; + $this->transactionName = $transactionName; + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + if (!$this->isNewRelicEnabled()) { + throw new MissingExtensionException('The newrelic PHP extension is required to use the NewRelicHandler'); + } + + if ($appName = $this->getAppName($record['context'])) { + $this->setNewRelicAppName($appName); + } + + if ($transactionName = $this->getTransactionName($record['context'])) { + $this->setNewRelicTransactionName($transactionName); + unset($record['formatted']['context']['transaction_name']); + } + + if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { + newrelic_notice_error($record['message'], $record['context']['exception']); + unset($record['formatted']['context']['exception']); + } else { + newrelic_notice_error($record['message']); + } + + if (isset($record['formatted']['context']) && is_array($record['formatted']['context'])) { + foreach ($record['formatted']['context'] as $key => $parameter) { + if (is_array($parameter) && $this->explodeArrays) { + foreach ($parameter as $paramKey => $paramValue) { + $this->setNewRelicParameter('context_' . $key . '_' . $paramKey, $paramValue); + } + } else { + $this->setNewRelicParameter('context_' . $key, $parameter); + } + } + } + + if (isset($record['formatted']['extra']) && is_array($record['formatted']['extra'])) { + foreach ($record['formatted']['extra'] as $key => $parameter) { + if (is_array($parameter) && $this->explodeArrays) { + foreach ($parameter as $paramKey => $paramValue) { + $this->setNewRelicParameter('extra_' . $key . '_' . $paramKey, $paramValue); + } + } else { + $this->setNewRelicParameter('extra_' . $key, $parameter); + } + } + } + } + + /** + * Checks whether the NewRelic extension is enabled in the system. + * + * @return bool + */ + protected function isNewRelicEnabled() + { + return extension_loaded('newrelic'); + } + + /** + * Returns the appname where this log should be sent. Each log can override the default appname, set in this + * handler's constructor, by providing the appname in it's context. + * + * @param array $context + * @return null|string + */ + protected function getAppName(array $context) + { + if (isset($context['appname'])) { + return $context['appname']; + } + + return $this->appName; + } + + /** + * Returns the name of the current transaction. Each log can override the default transaction name, set in this + * handler's constructor, by providing the transaction_name in it's context + * + * @param array $context + * + * @return null|string + */ + protected function getTransactionName(array $context) + { + if (isset($context['transaction_name'])) { + return $context['transaction_name']; + } + + return $this->transactionName; + } + + /** + * Sets the NewRelic application that should receive this log. + * + * @param string $appName + */ + protected function setNewRelicAppName($appName) + { + newrelic_set_appname($appName); + } + + /** + * Overwrites the name of the current transaction + * + * @param string $transactionName + */ + protected function setNewRelicTransactionName($transactionName) + { + newrelic_name_transaction($transactionName); + } + + /** + * @param string $key + * @param mixed $value + */ + protected function setNewRelicParameter($key, $value) + { + if (null === $value || is_scalar($value)) { + newrelic_add_custom_parameter($key, $value); + } else { + newrelic_add_custom_parameter($key, @json_encode($value)); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new NormalizerFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php new file mode 100755 index 0000000..4b84588 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/NullHandler.php @@ -0,0 +1,45 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Blackhole + * + * Any record it can handle will be thrown away. This can be used + * to put on top of an existing stack to override it temporarily. + * + * @author Jordi Boggiano + */ +class NullHandler extends AbstractHandler +{ + /** + * @param int $level The minimum logging level at which this handler will be triggered + */ + public function __construct($level = Logger::DEBUG) + { + parent::__construct($level, false); + } + + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($record['level'] < $this->level) { + return false; + } + + return true; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php new file mode 100755 index 0000000..1f2076a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/PHPConsoleHandler.php @@ -0,0 +1,242 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Exception; +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; +use PhpConsole\Connector; +use PhpConsole\Handler; +use PhpConsole\Helper; + +/** + * Monolog handler for Google Chrome extension "PHP Console" + * + * Display PHP error/debug log messages in Google Chrome console and notification popups, executes PHP code remotely + * + * Usage: + * 1. Install Google Chrome extension https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef + * 2. See overview https://github.com/barbushin/php-console#overview + * 3. Install PHP Console library https://github.com/barbushin/php-console#installation + * 4. Example (result will looks like http://i.hizliresim.com/vg3Pz4.png) + * + * $logger = new \Monolog\Logger('all', array(new \Monolog\Handler\PHPConsoleHandler())); + * \Monolog\ErrorHandler::register($logger); + * echo $undefinedVar; + * $logger->addDebug('SELECT * FROM users', array('db', 'time' => 0.012)); + * PC::debug($_SERVER); // PHP Console debugger for any type of vars + * + * @author Sergey Barbushin https://www.linkedin.com/in/barbushin + */ +class PHPConsoleHandler extends AbstractProcessingHandler +{ + private $options = array( + 'enabled' => true, // bool Is PHP Console server enabled + 'classesPartialsTraceIgnore' => array('Monolog\\'), // array Hide calls of classes started with... + 'debugTagsKeysInContext' => array(0, 'tag'), // bool Is PHP Console server enabled + 'useOwnErrorsHandler' => false, // bool Enable errors handling + 'useOwnExceptionsHandler' => false, // bool Enable exceptions handling + 'sourcesBasePath' => null, // string Base path of all project sources to strip in errors source paths + 'registerHelper' => true, // bool Register PhpConsole\Helper that allows short debug calls like PC::debug($var, 'ta.g.s') + 'serverEncoding' => null, // string|null Server internal encoding + 'headersLimit' => null, // int|null Set headers size limit for your web-server + 'password' => null, // string|null Protect PHP Console connection by password + 'enableSslOnlyMode' => false, // bool Force connection by SSL for clients with PHP Console installed + 'ipMasks' => array(), // array Set IP masks of clients that will be allowed to connect to PHP Console: array('192.168.*.*', '127.0.0.1') + 'enableEvalListener' => false, // bool Enable eval request to be handled by eval dispatcher(if enabled, 'password' option is also required) + 'dumperDetectCallbacks' => false, // bool Convert callback items in dumper vars to (callback SomeClass::someMethod) strings + 'dumperLevelLimit' => 5, // int Maximum dumped vars array or object nested dump level + 'dumperItemsCountLimit' => 100, // int Maximum dumped var same level array items or object properties number + 'dumperItemSizeLimit' => 5000, // int Maximum length of any string or dumped array item + 'dumperDumpSizeLimit' => 500000, // int Maximum approximate size of dumped vars result formatted in JSON + 'detectDumpTraceAndSource' => false, // bool Autodetect and append trace data to debug + 'dataStorage' => null, // PhpConsole\Storage|null Fixes problem with custom $_SESSION handler(see http://goo.gl/Ne8juJ) + ); + + /** @var Connector */ + private $connector; + + /** + * @param array $options See \Monolog\Handler\PHPConsoleHandler::$options for more details + * @param Connector|null $connector Instance of \PhpConsole\Connector class (optional) + * @param int $level + * @param bool $bubble + * @throws Exception + */ + public function __construct(array $options = array(), Connector $connector = null, $level = Logger::DEBUG, $bubble = true) + { + if (!class_exists('PhpConsole\Connector')) { + throw new Exception('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); + } + parent::__construct($level, $bubble); + $this->options = $this->initOptions($options); + $this->connector = $this->initConnector($connector); + } + + private function initOptions(array $options) + { + $wrongOptions = array_diff(array_keys($options), array_keys($this->options)); + if ($wrongOptions) { + throw new Exception('Unknown options: ' . implode(', ', $wrongOptions)); + } + + return array_replace($this->options, $options); + } + + private function initConnector(Connector $connector = null) + { + if (!$connector) { + if ($this->options['dataStorage']) { + Connector::setPostponeStorage($this->options['dataStorage']); + } + $connector = Connector::getInstance(); + } + + if ($this->options['registerHelper'] && !Helper::isRegistered()) { + Helper::register(); + } + + if ($this->options['enabled'] && $connector->isActiveClient()) { + if ($this->options['useOwnErrorsHandler'] || $this->options['useOwnExceptionsHandler']) { + $handler = Handler::getInstance(); + $handler->setHandleErrors($this->options['useOwnErrorsHandler']); + $handler->setHandleExceptions($this->options['useOwnExceptionsHandler']); + $handler->start(); + } + if ($this->options['sourcesBasePath']) { + $connector->setSourcesBasePath($this->options['sourcesBasePath']); + } + if ($this->options['serverEncoding']) { + $connector->setServerEncoding($this->options['serverEncoding']); + } + if ($this->options['password']) { + $connector->setPassword($this->options['password']); + } + if ($this->options['enableSslOnlyMode']) { + $connector->enableSslOnlyMode(); + } + if ($this->options['ipMasks']) { + $connector->setAllowedIpMasks($this->options['ipMasks']); + } + if ($this->options['headersLimit']) { + $connector->setHeadersLimit($this->options['headersLimit']); + } + if ($this->options['detectDumpTraceAndSource']) { + $connector->getDebugDispatcher()->detectTraceAndSource = true; + } + $dumper = $connector->getDumper(); + $dumper->levelLimit = $this->options['dumperLevelLimit']; + $dumper->itemsCountLimit = $this->options['dumperItemsCountLimit']; + $dumper->itemSizeLimit = $this->options['dumperItemSizeLimit']; + $dumper->dumpSizeLimit = $this->options['dumperDumpSizeLimit']; + $dumper->detectCallbacks = $this->options['dumperDetectCallbacks']; + if ($this->options['enableEvalListener']) { + $connector->startEvalRequestsListener(); + } + } + + return $connector; + } + + public function getConnector() + { + return $this->connector; + } + + public function getOptions() + { + return $this->options; + } + + public function handle(array $record) + { + if ($this->options['enabled'] && $this->connector->isActiveClient()) { + return parent::handle($record); + } + + return !$this->bubble; + } + + /** + * Writes the record down to the log of the implementing handler + * + * @param array $record + * @return void + */ + protected function write(array $record) + { + if ($record['level'] < Logger::NOTICE) { + $this->handleDebugRecord($record); + } elseif (isset($record['context']['exception']) && $record['context']['exception'] instanceof Exception) { + $this->handleExceptionRecord($record); + } else { + $this->handleErrorRecord($record); + } + } + + private function handleDebugRecord(array $record) + { + $tags = $this->getRecordTags($record); + $message = $record['message']; + if ($record['context']) { + $message .= ' ' . json_encode($this->connector->getDumper()->dump(array_filter($record['context']))); + } + $this->connector->getDebugDispatcher()->dispatchDebug($message, $tags, $this->options['classesPartialsTraceIgnore']); + } + + private function handleExceptionRecord(array $record) + { + $this->connector->getErrorsDispatcher()->dispatchException($record['context']['exception']); + } + + private function handleErrorRecord(array $record) + { + $context = $record['context']; + + $this->connector->getErrorsDispatcher()->dispatchError( + isset($context['code']) ? $context['code'] : null, + isset($context['message']) ? $context['message'] : $record['message'], + isset($context['file']) ? $context['file'] : null, + isset($context['line']) ? $context['line'] : null, + $this->options['classesPartialsTraceIgnore'] + ); + } + + private function getRecordTags(array &$record) + { + $tags = null; + if (!empty($record['context'])) { + $context = & $record['context']; + foreach ($this->options['debugTagsKeysInContext'] as $key) { + if (!empty($context[$key])) { + $tags = $context[$key]; + if ($key === 0) { + array_shift($context); + } else { + unset($context[$key]); + } + break; + } + } + } + + return $tags ?: strtolower($record['level_name']); + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('%message%'); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php new file mode 100755 index 0000000..a99e6ab --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/PsrHandler.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Psr\Log\LoggerInterface; + +/** + * Proxies log messages to an existing PSR-3 compliant logger. + * + * @author Michael Moussa + */ +class PsrHandler extends AbstractHandler +{ + /** + * PSR-3 compliant logger + * + * @var LoggerInterface + */ + protected $logger; + + /** + * @param LoggerInterface $logger The underlying PSR-3 compliant logger to which messages will be proxied + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(LoggerInterface $logger, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->logger = $logger; + } + + /** + * {@inheritDoc} + */ + public function handle(array $record) + { + if (!$this->isHandling($record)) { + return false; + } + + $this->logger->log(strtolower($record['level_name']), $record['message'], $record['context']); + + return false === $this->bubble; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php new file mode 100755 index 0000000..f27bb3d --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/PushoverHandler.php @@ -0,0 +1,185 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Sends notifications through the pushover api to mobile phones + * + * @author Sebastian Göttschkes + * @see https://www.pushover.net/api + */ +class PushoverHandler extends SocketHandler +{ + private $token; + private $users; + private $title; + private $user; + private $retry; + private $expire; + + private $highPriorityLevel; + private $emergencyLevel; + private $useFormattedMessage = false; + + /** + * All parameters that can be sent to Pushover + * @see https://pushover.net/api + * @var array + */ + private $parameterNames = array( + 'token' => true, + 'user' => true, + 'message' => true, + 'device' => true, + 'title' => true, + 'url' => true, + 'url_title' => true, + 'priority' => true, + 'timestamp' => true, + 'sound' => true, + 'retry' => true, + 'expire' => true, + 'callback' => true, + ); + + /** + * Sounds the api supports by default + * @see https://pushover.net/api#sounds + * @var array + */ + private $sounds = array( + 'pushover', 'bike', 'bugle', 'cashregister', 'classical', 'cosmic', 'falling', 'gamelan', 'incoming', + 'intermission', 'magic', 'mechanical', 'pianobar', 'siren', 'spacealarm', 'tugboat', 'alien', 'climb', + 'persistent', 'echo', 'updown', 'none', + ); + + /** + * @param string $token Pushover api token + * @param string|array $users Pushover user id or array of ids the message will be sent to + * @param string $title Title sent to the Pushover API + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $useSSL Whether to connect via SSL. Required when pushing messages to users that are not + * the pushover.net app owner. OpenSSL is required for this option. + * @param int $highPriorityLevel The minimum logging level at which this handler will start + * sending "high priority" requests to the Pushover API + * @param int $emergencyLevel The minimum logging level at which this handler will start + * sending "emergency" requests to the Pushover API + * @param int $retry The retry parameter specifies how often (in seconds) the Pushover servers will send the same notification to the user. + * @param int $expire The expire parameter specifies how many seconds your notification will continue to be retried for (every retry seconds). + */ + public function __construct($token, $users, $title = null, $level = Logger::CRITICAL, $bubble = true, $useSSL = true, $highPriorityLevel = Logger::CRITICAL, $emergencyLevel = Logger::EMERGENCY, $retry = 30, $expire = 25200) + { + $connectionString = $useSSL ? 'ssl://api.pushover.net:443' : 'api.pushover.net:80'; + parent::__construct($connectionString, $level, $bubble); + + $this->token = $token; + $this->users = (array) $users; + $this->title = $title ?: gethostname(); + $this->highPriorityLevel = Logger::toMonologLevel($highPriorityLevel); + $this->emergencyLevel = Logger::toMonologLevel($emergencyLevel); + $this->retry = $retry; + $this->expire = $expire; + } + + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + private function buildContent($record) + { + // Pushover has a limit of 512 characters on title and message combined. + $maxMessageLength = 512 - strlen($this->title); + + $message = ($this->useFormattedMessage) ? $record['formatted'] : $record['message']; + $message = substr($message, 0, $maxMessageLength); + + $timestamp = $record['datetime']->getTimestamp(); + + $dataArray = array( + 'token' => $this->token, + 'user' => $this->user, + 'message' => $message, + 'title' => $this->title, + 'timestamp' => $timestamp, + ); + + if (isset($record['level']) && $record['level'] >= $this->emergencyLevel) { + $dataArray['priority'] = 2; + $dataArray['retry'] = $this->retry; + $dataArray['expire'] = $this->expire; + } elseif (isset($record['level']) && $record['level'] >= $this->highPriorityLevel) { + $dataArray['priority'] = 1; + } + + // First determine the available parameters + $context = array_intersect_key($record['context'], $this->parameterNames); + $extra = array_intersect_key($record['extra'], $this->parameterNames); + + // Least important info should be merged with subsequent info + $dataArray = array_merge($extra, $context, $dataArray); + + // Only pass sounds that are supported by the API + if (isset($dataArray['sound']) && !in_array($dataArray['sound'], $this->sounds)) { + unset($dataArray['sound']); + } + + return http_build_query($dataArray); + } + + private function buildHeader($content) + { + $header = "POST /1/messages.json HTTP/1.1\r\n"; + $header .= "Host: api.pushover.net\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + protected function write(array $record) + { + foreach ($this->users as $user) { + $this->user = $user; + + parent::write($record); + $this->closeSocket(); + } + + $this->user = null; + } + + public function setHighPriorityLevel($value) + { + $this->highPriorityLevel = $value; + } + + public function setEmergencyLevel($value) + { + $this->emergencyLevel = $value; + } + + /** + * Use the formatted message? + * @param bool $value + */ + public function useFormattedMessage($value) + { + $this->useFormattedMessage = (bool) $value; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php new file mode 100755 index 0000000..10d7f43 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RavenHandler.php @@ -0,0 +1,232 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Formatter\FormatterInterface; +use Monolog\Logger; +use Raven_Client; + +/** + * Handler to send messages to a Sentry (https://github.com/getsentry/sentry) server + * using sentry-php (https://github.com/getsentry/sentry-php) + * + * @author Marc Abramowitz + */ +class RavenHandler extends AbstractProcessingHandler +{ + /** + * Translates Monolog log levels to Raven log levels. + */ + protected $logLevels = array( + Logger::DEBUG => Raven_Client::DEBUG, + Logger::INFO => Raven_Client::INFO, + Logger::NOTICE => Raven_Client::INFO, + Logger::WARNING => Raven_Client::WARNING, + Logger::ERROR => Raven_Client::ERROR, + Logger::CRITICAL => Raven_Client::FATAL, + Logger::ALERT => Raven_Client::FATAL, + Logger::EMERGENCY => Raven_Client::FATAL, + ); + + /** + * @var string should represent the current version of the calling + * software. Can be any string (git commit, version number) + */ + protected $release; + + /** + * @var Raven_Client the client object that sends the message to the server + */ + protected $ravenClient; + + /** + * @var LineFormatter The formatter to use for the logs generated via handleBatch() + */ + protected $batchFormatter; + + /** + * @param Raven_Client $ravenClient + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(Raven_Client $ravenClient, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->ravenClient = $ravenClient; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + $level = $this->level; + + // filter records based on their level + $records = array_filter($records, function ($record) use ($level) { + return $record['level'] >= $level; + }); + + if (!$records) { + return; + } + + // the record with the highest severity is the "main" one + $record = array_reduce($records, function ($highest, $record) { + if ($record['level'] > $highest['level']) { + return $record; + } + + return $highest; + }); + + // the other ones are added as a context item + $logs = array(); + foreach ($records as $r) { + $logs[] = $this->processRecord($r); + } + + if ($logs) { + $record['context']['logs'] = (string) $this->getBatchFormatter()->formatBatch($logs); + } + + $this->handle($record); + } + + /** + * Sets the formatter for the logs generated by handleBatch(). + * + * @param FormatterInterface $formatter + */ + public function setBatchFormatter(FormatterInterface $formatter) + { + $this->batchFormatter = $formatter; + } + + /** + * Gets the formatter for the logs generated by handleBatch(). + * + * @return FormatterInterface + */ + public function getBatchFormatter() + { + if (!$this->batchFormatter) { + $this->batchFormatter = $this->getDefaultBatchFormatter(); + } + + return $this->batchFormatter; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $previousUserContext = false; + $options = array(); + $options['level'] = $this->logLevels[$record['level']]; + $options['tags'] = array(); + if (!empty($record['extra']['tags'])) { + $options['tags'] = array_merge($options['tags'], $record['extra']['tags']); + unset($record['extra']['tags']); + } + if (!empty($record['context']['tags'])) { + $options['tags'] = array_merge($options['tags'], $record['context']['tags']); + unset($record['context']['tags']); + } + if (!empty($record['context']['fingerprint'])) { + $options['fingerprint'] = $record['context']['fingerprint']; + unset($record['context']['fingerprint']); + } + if (!empty($record['context']['logger'])) { + $options['logger'] = $record['context']['logger']; + unset($record['context']['logger']); + } else { + $options['logger'] = $record['channel']; + } + foreach ($this->getExtraParameters() as $key) { + foreach (array('extra', 'context') as $source) { + if (!empty($record[$source][$key])) { + $options[$key] = $record[$source][$key]; + unset($record[$source][$key]); + } + } + } + if (!empty($record['context'])) { + $options['extra']['context'] = $record['context']; + if (!empty($record['context']['user'])) { + $previousUserContext = $this->ravenClient->context->user; + $this->ravenClient->user_context($record['context']['user']); + unset($options['extra']['context']['user']); + } + } + if (!empty($record['extra'])) { + $options['extra']['extra'] = $record['extra']; + } + + if (!empty($this->release) && !isset($options['release'])) { + $options['release'] = $this->release; + } + + if (isset($record['context']['exception']) && ($record['context']['exception'] instanceof \Exception || (PHP_VERSION_ID >= 70000 && $record['context']['exception'] instanceof \Throwable))) { + $options['message'] = $record['formatted']; + $this->ravenClient->captureException($record['context']['exception'], $options); + } else { + $this->ravenClient->captureMessage($record['formatted'], array(), $options); + } + + if ($previousUserContext !== false) { + $this->ravenClient->user_context($previousUserContext); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter('[%channel%] %message%'); + } + + /** + * Gets the default formatter for the logs generated by handleBatch(). + * + * @return FormatterInterface + */ + protected function getDefaultBatchFormatter() + { + return new LineFormatter(); + } + + /** + * Gets extra parameters supported by Raven that can be found in "extra" and "context" + * + * @return array + */ + protected function getExtraParameters() + { + return array('contexts', 'checksum', 'release', 'event_id'); + } + + /** + * @param string $value + * @return self + */ + public function setRelease($value) + { + $this->release = $value; + + return $this; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php new file mode 100755 index 0000000..590f996 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RedisHandler.php @@ -0,0 +1,97 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; + +/** + * Logs to a Redis key using rpush + * + * usage example: + * + * $log = new Logger('application'); + * $redis = new RedisHandler(new Predis\Client("tcp://localhost:6379"), "logs", "prod"); + * $log->pushHandler($redis); + * + * @author Thomas Tourlourat + */ +class RedisHandler extends AbstractProcessingHandler +{ + private $redisClient; + private $redisKey; + protected $capSize; + + /** + * @param \Predis\Client|\Redis $redis The redis instance + * @param string $key The key name to push records to + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param int $capSize Number of entries to limit list size to + */ + public function __construct($redis, $key, $level = Logger::DEBUG, $bubble = true, $capSize = false) + { + if (!(($redis instanceof \Predis\Client) || ($redis instanceof \Redis))) { + throw new \InvalidArgumentException('Predis\Client or Redis instance required'); + } + + $this->redisClient = $redis; + $this->redisKey = $key; + $this->capSize = $capSize; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritDoc} + */ + protected function write(array $record) + { + if ($this->capSize) { + $this->writeCapped($record); + } else { + $this->redisClient->rpush($this->redisKey, $record["formatted"]); + } + } + + /** + * Write and cap the collection + * Writes the record to the redis list and caps its + * + * @param array $record associative record array + * @return void + */ + protected function writeCapped(array $record) + { + if ($this->redisClient instanceof \Redis) { + $this->redisClient->multi() + ->rpush($this->redisKey, $record["formatted"]) + ->ltrim($this->redisKey, -$this->capSize, -1) + ->exec(); + } else { + $redisKey = $this->redisKey; + $capSize = $this->capSize; + $this->redisClient->transaction(function ($tx) use ($record, $redisKey, $capSize) { + $tx->rpush($redisKey, $record["formatted"]); + $tx->ltrim($redisKey, -$capSize, -1); + }); + } + } + + /** + * {@inheritDoc} + */ + protected function getDefaultFormatter() + { + return new LineFormatter(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php new file mode 100755 index 0000000..65073ff --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RollbarHandler.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use RollbarNotifier; +use Exception; +use Monolog\Logger; + +/** + * Sends errors to Rollbar + * + * If the context data contains a `payload` key, that is used as an array + * of payload options to RollbarNotifier's report_message/report_exception methods. + * + * Rollbar's context info will contain the context + extra keys from the log record + * merged, and then on top of that a few keys: + * + * - level (rollbar level name) + * - monolog_level (monolog level name, raw level, as rollbar only has 5 but monolog 8) + * - channel + * - datetime (unix timestamp) + * + * @author Paul Statezny + */ +class RollbarHandler extends AbstractProcessingHandler +{ + /** + * Rollbar notifier + * + * @var RollbarNotifier + */ + protected $rollbarNotifier; + + protected $levelMap = array( + Logger::DEBUG => 'debug', + Logger::INFO => 'info', + Logger::NOTICE => 'info', + Logger::WARNING => 'warning', + Logger::ERROR => 'error', + Logger::CRITICAL => 'critical', + Logger::ALERT => 'critical', + Logger::EMERGENCY => 'critical', + ); + + /** + * Records whether any log records have been added since the last flush of the rollbar notifier + * + * @var bool + */ + private $hasRecords = false; + + protected $initialized = false; + + /** + * @param RollbarNotifier $rollbarNotifier RollbarNotifier object constructed with valid token + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(RollbarNotifier $rollbarNotifier, $level = Logger::ERROR, $bubble = true) + { + $this->rollbarNotifier = $rollbarNotifier; + + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if (!$this->initialized) { + // __destructor() doesn't get called on Fatal errors + register_shutdown_function(array($this, 'close')); + $this->initialized = true; + } + + $context = $record['context']; + $payload = array(); + if (isset($context['payload'])) { + $payload = $context['payload']; + unset($context['payload']); + } + $context = array_merge($context, $record['extra'], array( + 'level' => $this->levelMap[$record['level']], + 'monolog_level' => $record['level_name'], + 'channel' => $record['channel'], + 'datetime' => $record['datetime']->format('U'), + )); + + if (isset($context['exception']) && $context['exception'] instanceof Exception) { + $payload['level'] = $context['level']; + $exception = $context['exception']; + unset($context['exception']); + + $this->rollbarNotifier->report_exception($exception, $context, $payload); + } else { + $this->rollbarNotifier->report_message( + $record['message'], + $context['level'], + $context, + $payload + ); + } + + $this->hasRecords = true; + } + + public function flush() + { + if ($this->hasRecords) { + $this->rollbarNotifier->flush(); + $this->hasRecords = false; + } + } + + /** + * {@inheritdoc} + */ + public function close() + { + $this->flush(); + } + + /** + * {@inheritdoc} + */ + public function reset() + { + $this->flush(); + + parent::reset(); + } + + +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php new file mode 100755 index 0000000..ae2309f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/RotatingFileHandler.php @@ -0,0 +1,190 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Stores logs to files that are rotated every day and a limited number of files are kept. + * + * This rotation is only intended to be used as a workaround. Using logrotate to + * handle the rotation is strongly encouraged when you can use it. + * + * @author Christophe Coevoet + * @author Jordi Boggiano + */ +class RotatingFileHandler extends StreamHandler +{ + const FILE_PER_DAY = 'Y-m-d'; + const FILE_PER_MONTH = 'Y-m'; + const FILE_PER_YEAR = 'Y'; + + protected $filename; + protected $maxFiles; + protected $mustRotate; + protected $nextRotation; + protected $filenameFormat; + protected $dateFormat; + + /** + * @param string $filename + * @param int $maxFiles The maximal amount of files to keep (0 means unlimited) + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) + * @param bool $useLocking Try to lock log file before doing any writes + */ + public function __construct($filename, $maxFiles = 0, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) + { + $this->filename = $filename; + $this->maxFiles = (int) $maxFiles; + $this->nextRotation = new \DateTime('tomorrow'); + $this->filenameFormat = '{filename}-{date}'; + $this->dateFormat = 'Y-m-d'; + + parent::__construct($this->getTimedFilename(), $level, $bubble, $filePermission, $useLocking); + } + + /** + * {@inheritdoc} + */ + public function close() + { + parent::close(); + + if (true === $this->mustRotate) { + $this->rotate(); + } + } + + /** + * {@inheritdoc} + */ + public function reset() + { + parent::reset(); + + if (true === $this->mustRotate) { + $this->rotate(); + } + } + + public function setFilenameFormat($filenameFormat, $dateFormat) + { + if (!preg_match('{^Y(([/_.-]?m)([/_.-]?d)?)?$}', $dateFormat)) { + trigger_error( + 'Invalid date format - format must be one of '. + 'RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), RotatingFileHandler::FILE_PER_MONTH ("Y-m") '. + 'or RotatingFileHandler::FILE_PER_YEAR ("Y"), or you can set one of the '. + 'date formats using slashes, underscores and/or dots instead of dashes.', + E_USER_DEPRECATED + ); + } + if (substr_count($filenameFormat, '{date}') === 0) { + trigger_error( + 'Invalid filename format - format should contain at least `{date}`, because otherwise rotating is impossible.', + E_USER_DEPRECATED + ); + } + $this->filenameFormat = $filenameFormat; + $this->dateFormat = $dateFormat; + $this->url = $this->getTimedFilename(); + $this->close(); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + // on the first record written, if the log is new, we should rotate (once per day) + if (null === $this->mustRotate) { + $this->mustRotate = !file_exists($this->url); + } + + if ($this->nextRotation < $record['datetime']) { + $this->mustRotate = true; + $this->close(); + } + + parent::write($record); + } + + /** + * Rotates the files. + */ + protected function rotate() + { + // update filename + $this->url = $this->getTimedFilename(); + $this->nextRotation = new \DateTime('tomorrow'); + + // skip GC of old logs if files are unlimited + if (0 === $this->maxFiles) { + return; + } + + $logFiles = glob($this->getGlobPattern()); + if ($this->maxFiles >= count($logFiles)) { + // no files to remove + return; + } + + // Sorting the files by name to remove the older ones + usort($logFiles, function ($a, $b) { + return strcmp($b, $a); + }); + + foreach (array_slice($logFiles, $this->maxFiles) as $file) { + if (is_writable($file)) { + // suppress errors here as unlink() might fail if two processes + // are cleaning up/rotating at the same time + set_error_handler(function ($errno, $errstr, $errfile, $errline) {}); + unlink($file); + restore_error_handler(); + } + } + + $this->mustRotate = false; + } + + protected function getTimedFilename() + { + $fileInfo = pathinfo($this->filename); + $timedFilename = str_replace( + array('{filename}', '{date}'), + array($fileInfo['filename'], date($this->dateFormat)), + $fileInfo['dirname'] . '/' . $this->filenameFormat + ); + + if (!empty($fileInfo['extension'])) { + $timedFilename .= '.'.$fileInfo['extension']; + } + + return $timedFilename; + } + + protected function getGlobPattern() + { + $fileInfo = pathinfo($this->filename); + $glob = str_replace( + array('{filename}', '{date}'), + array($fileInfo['filename'], '[0-9][0-9][0-9][0-9]*'), + $fileInfo['dirname'] . '/' . $this->filenameFormat + ); + if (!empty($fileInfo['extension'])) { + $glob .= '.'.$fileInfo['extension']; + } + + return $glob; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php new file mode 100755 index 0000000..9509ae3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SamplingHandler.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Sampling handler + * + * A sampled event stream can be useful for logging high frequency events in + * a production environment where you only need an idea of what is happening + * and are not concerned with capturing every occurrence. Since the decision to + * handle or not handle a particular event is determined randomly, the + * resulting sampled log is not guaranteed to contain 1/N of the events that + * occurred in the application, but based on the Law of large numbers, it will + * tend to be close to this ratio with a large number of attempts. + * + * @author Bryan Davis + * @author Kunal Mehta + */ +class SamplingHandler extends AbstractHandler +{ + /** + * @var callable|HandlerInterface $handler + */ + protected $handler; + + /** + * @var int $factor + */ + protected $factor; + + /** + * @param callable|HandlerInterface $handler Handler or factory callable($record, $fingersCrossedHandler). + * @param int $factor Sample factor + */ + public function __construct($handler, $factor) + { + parent::__construct(); + $this->handler = $handler; + $this->factor = $factor; + + if (!$this->handler instanceof HandlerInterface && !is_callable($this->handler)) { + throw new \RuntimeException("The given handler (".json_encode($this->handler).") is not a callable nor a Monolog\Handler\HandlerInterface object"); + } + } + + public function isHandling(array $record) + { + return $this->handler->isHandling($record); + } + + public function handle(array $record) + { + if ($this->isHandling($record) && mt_rand(1, $this->factor) === 1) { + // The same logic as in FingersCrossedHandler + if (!$this->handler instanceof HandlerInterface) { + $this->handler = call_user_func($this->handler, $record, $this); + if (!$this->handler instanceof HandlerInterface) { + throw new \RuntimeException("The factory callable should return a HandlerInterface"); + } + } + + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + $this->handler->handle($record); + } + + return false === $this->bubble; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php new file mode 100755 index 0000000..e55e0e2 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php @@ -0,0 +1,294 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\Slack; + +use Monolog\Logger; +use Monolog\Formatter\NormalizerFormatter; +use Monolog\Formatter\FormatterInterface; + +/** + * Slack record utility helping to log to Slack webhooks or API. + * + * @author Greg Kedzierski + * @author Haralan Dobrev + * @see https://api.slack.com/incoming-webhooks + * @see https://api.slack.com/docs/message-attachments + */ +class SlackRecord +{ + const COLOR_DANGER = 'danger'; + + const COLOR_WARNING = 'warning'; + + const COLOR_GOOD = 'good'; + + const COLOR_DEFAULT = '#e3e4e6'; + + /** + * Slack channel (encoded ID or name) + * @var string|null + */ + private $channel; + + /** + * Name of a bot + * @var string|null + */ + private $username; + + /** + * User icon e.g. 'ghost', 'http://example.com/user.png' + * @var string + */ + private $userIcon; + + /** + * Whether the message should be added to Slack as attachment (plain text otherwise) + * @var bool + */ + private $useAttachment; + + /** + * Whether the the context/extra messages added to Slack as attachments are in a short style + * @var bool + */ + private $useShortAttachment; + + /** + * Whether the attachment should include context and extra data + * @var bool + */ + private $includeContextAndExtra; + + /** + * Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + * @var array + */ + private $excludeFields; + + /** + * @var FormatterInterface + */ + private $formatter; + + /** + * @var NormalizerFormatter + */ + private $normalizerFormatter; + + public function __construct($channel = null, $username = null, $useAttachment = true, $userIcon = null, $useShortAttachment = false, $includeContextAndExtra = false, array $excludeFields = array(), FormatterInterface $formatter = null) + { + $this->channel = $channel; + $this->username = $username; + $this->userIcon = trim($userIcon, ':'); + $this->useAttachment = $useAttachment; + $this->useShortAttachment = $useShortAttachment; + $this->includeContextAndExtra = $includeContextAndExtra; + $this->excludeFields = $excludeFields; + $this->formatter = $formatter; + + if ($this->includeContextAndExtra) { + $this->normalizerFormatter = new NormalizerFormatter(); + } + } + + public function getSlackData(array $record) + { + $dataArray = array(); + $record = $this->excludeFields($record); + + if ($this->username) { + $dataArray['username'] = $this->username; + } + + if ($this->channel) { + $dataArray['channel'] = $this->channel; + } + + if ($this->formatter && !$this->useAttachment) { + $message = $this->formatter->format($record); + } else { + $message = $record['message']; + } + + if ($this->useAttachment) { + $attachment = array( + 'fallback' => $message, + 'text' => $message, + 'color' => $this->getAttachmentColor($record['level']), + 'fields' => array(), + 'mrkdwn_in' => array('fields'), + 'ts' => $record['datetime']->getTimestamp() + ); + + if ($this->useShortAttachment) { + $attachment['title'] = $record['level_name']; + } else { + $attachment['title'] = 'Message'; + $attachment['fields'][] = $this->generateAttachmentField('Level', $record['level_name']); + } + + + if ($this->includeContextAndExtra) { + foreach (array('extra', 'context') as $key) { + if (empty($record[$key])) { + continue; + } + + if ($this->useShortAttachment) { + $attachment['fields'][] = $this->generateAttachmentField( + $key, + $record[$key] + ); + } else { + // Add all extra fields as individual fields in attachment + $attachment['fields'] = array_merge( + $attachment['fields'], + $this->generateAttachmentFields($record[$key]) + ); + } + } + } + + $dataArray['attachments'] = array($attachment); + } else { + $dataArray['text'] = $message; + } + + if ($this->userIcon) { + if (filter_var($this->userIcon, FILTER_VALIDATE_URL)) { + $dataArray['icon_url'] = $this->userIcon; + } else { + $dataArray['icon_emoji'] = ":{$this->userIcon}:"; + } + } + + return $dataArray; + } + + /** + * Returned a Slack message attachment color associated with + * provided level. + * + * @param int $level + * @return string + */ + public function getAttachmentColor($level) + { + switch (true) { + case $level >= Logger::ERROR: + return self::COLOR_DANGER; + case $level >= Logger::WARNING: + return self::COLOR_WARNING; + case $level >= Logger::INFO: + return self::COLOR_GOOD; + default: + return self::COLOR_DEFAULT; + } + } + + /** + * Stringifies an array of key/value pairs to be used in attachment fields + * + * @param array $fields + * + * @return string + */ + public function stringify($fields) + { + $normalized = $this->normalizerFormatter->format($fields); + $prettyPrintFlag = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 128; + + $hasSecondDimension = count(array_filter($normalized, 'is_array')); + $hasNonNumericKeys = !count(array_filter(array_keys($normalized), 'is_numeric')); + + return $hasSecondDimension || $hasNonNumericKeys + ? json_encode($normalized, $prettyPrintFlag) + : json_encode($normalized); + } + + /** + * Sets the formatter + * + * @param FormatterInterface $formatter + */ + public function setFormatter(FormatterInterface $formatter) + { + $this->formatter = $formatter; + } + + /** + * Generates attachment field + * + * @param string $title + * @param string|array $value + * + * @return array + */ + private function generateAttachmentField($title, $value) + { + $value = is_array($value) + ? sprintf('```%s```', $this->stringify($value)) + : $value; + + return array( + 'title' => ucfirst($title), + 'value' => $value, + 'short' => false + ); + } + + /** + * Generates a collection of attachment fields from array + * + * @param array $data + * + * @return array + */ + private function generateAttachmentFields(array $data) + { + $fields = array(); + foreach ($this->normalizerFormatter->format($data) as $key => $value) { + $fields[] = $this->generateAttachmentField($key, $value); + } + + return $fields; + } + + /** + * Get a copy of record with fields excluded according to $this->excludeFields + * + * @param array $record + * + * @return array + */ + private function excludeFields(array $record) + { + foreach ($this->excludeFields as $field) { + $keys = explode('.', $field); + $node = &$record; + $lastKey = end($keys); + foreach ($keys as $key) { + if (!isset($node[$key])) { + break; + } + if ($lastKey === $key) { + unset($node[$key]); + break; + } + $node = &$node[$key]; + } + } + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php new file mode 100755 index 0000000..45d634f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SlackHandler.php @@ -0,0 +1,220 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Logger; +use Monolog\Handler\Slack\SlackRecord; + +/** + * Sends notifications through Slack API + * + * @author Greg Kedzierski + * @see https://api.slack.com/ + */ +class SlackHandler extends SocketHandler +{ + /** + * Slack API token + * @var string + */ + private $token; + + /** + * Instance of the SlackRecord util class preparing data for Slack API. + * @var SlackRecord + */ + private $slackRecord; + + /** + * @param string $token Slack API token + * @param string $channel Slack channel (encoded ID or name) + * @param string|null $username Name of a bot + * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) + * @param string|null $iconEmoji The emoji name to use (or null) + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style + * @param bool $includeContextAndExtra Whether the attachment should include context and extra data + * @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + * @throws MissingExtensionException If no OpenSSL PHP extension configured + */ + public function __construct($token, $channel, $username = null, $useAttachment = true, $iconEmoji = null, $level = Logger::CRITICAL, $bubble = true, $useShortAttachment = false, $includeContextAndExtra = false, array $excludeFields = array()) + { + if (!extension_loaded('openssl')) { + throw new MissingExtensionException('The OpenSSL PHP extension is required to use the SlackHandler'); + } + + parent::__construct('ssl://slack.com:443', $level, $bubble); + + $this->slackRecord = new SlackRecord( + $channel, + $username, + $useAttachment, + $iconEmoji, + $useShortAttachment, + $includeContextAndExtra, + $excludeFields, + $this->formatter + ); + + $this->token = $token; + } + + public function getSlackRecord() + { + return $this->slackRecord; + } + + public function getToken() + { + return $this->token; + } + + /** + * {@inheritdoc} + * + * @param array $record + * @return string + */ + protected function generateDataStream($record) + { + $content = $this->buildContent($record); + + return $this->buildHeader($content) . $content; + } + + /** + * Builds the body of API call + * + * @param array $record + * @return string + */ + private function buildContent($record) + { + $dataArray = $this->prepareContentData($record); + + return http_build_query($dataArray); + } + + /** + * Prepares content data + * + * @param array $record + * @return array + */ + protected function prepareContentData($record) + { + $dataArray = $this->slackRecord->getSlackData($record); + $dataArray['token'] = $this->token; + + if (!empty($dataArray['attachments'])) { + $dataArray['attachments'] = json_encode($dataArray['attachments']); + } + + return $dataArray; + } + + /** + * Builds the header of the API Call + * + * @param string $content + * @return string + */ + private function buildHeader($content) + { + $header = "POST /api/chat.postMessage HTTP/1.1\r\n"; + $header .= "Host: slack.com\r\n"; + $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; + $header .= "Content-Length: " . strlen($content) . "\r\n"; + $header .= "\r\n"; + + return $header; + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + parent::write($record); + $this->finalizeWrite(); + } + + /** + * Finalizes the request by reading some bytes and then closing the socket + * + * If we do not read some but close the socket too early, slack sometimes + * drops the request entirely. + */ + protected function finalizeWrite() + { + $res = $this->getResource(); + if (is_resource($res)) { + @fread($res, 2048); + } + $this->closeSocket(); + } + + /** + * Returned a Slack message attachment color associated with + * provided level. + * + * @param int $level + * @return string + * @deprecated Use underlying SlackRecord instead + */ + protected function getAttachmentColor($level) + { + trigger_error( + 'SlackHandler::getAttachmentColor() is deprecated. Use underlying SlackRecord instead.', + E_USER_DEPRECATED + ); + + return $this->slackRecord->getAttachmentColor($level); + } + + /** + * Stringifies an array of key/value pairs to be used in attachment fields + * + * @param array $fields + * @return string + * @deprecated Use underlying SlackRecord instead + */ + protected function stringify($fields) + { + trigger_error( + 'SlackHandler::stringify() is deprecated. Use underlying SlackRecord instead.', + E_USER_DEPRECATED + ); + + return $this->slackRecord->stringify($fields); + } + + public function setFormatter(FormatterInterface $formatter) + { + parent::setFormatter($formatter); + $this->slackRecord->setFormatter($formatter); + + return $this; + } + + public function getFormatter() + { + $formatter = parent::getFormatter(); + $this->slackRecord->setFormatter($formatter); + + return $formatter; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php new file mode 100755 index 0000000..1ef85fa --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php @@ -0,0 +1,120 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FormatterInterface; +use Monolog\Logger; +use Monolog\Handler\Slack\SlackRecord; + +/** + * Sends notifications through Slack Webhooks + * + * @author Haralan Dobrev + * @see https://api.slack.com/incoming-webhooks + */ +class SlackWebhookHandler extends AbstractProcessingHandler +{ + /** + * Slack Webhook token + * @var string + */ + private $webhookUrl; + + /** + * Instance of the SlackRecord util class preparing data for Slack API. + * @var SlackRecord + */ + private $slackRecord; + + /** + * @param string $webhookUrl Slack Webhook URL + * @param string|null $channel Slack channel (encoded ID or name) + * @param string|null $username Name of a bot + * @param bool $useAttachment Whether the message should be added to Slack as attachment (plain text otherwise) + * @param string|null $iconEmoji The emoji name to use (or null) + * @param bool $useShortAttachment Whether the the context/extra messages added to Slack as attachments are in a short style + * @param bool $includeContextAndExtra Whether the attachment should include context and extra data + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param array $excludeFields Dot separated list of fields to exclude from slack message. E.g. ['context.field1', 'extra.field2'] + */ + public function __construct($webhookUrl, $channel = null, $username = null, $useAttachment = true, $iconEmoji = null, $useShortAttachment = false, $includeContextAndExtra = false, $level = Logger::CRITICAL, $bubble = true, array $excludeFields = array()) + { + parent::__construct($level, $bubble); + + $this->webhookUrl = $webhookUrl; + + $this->slackRecord = new SlackRecord( + $channel, + $username, + $useAttachment, + $iconEmoji, + $useShortAttachment, + $includeContextAndExtra, + $excludeFields, + $this->formatter + ); + } + + public function getSlackRecord() + { + return $this->slackRecord; + } + + public function getWebhookUrl() + { + return $this->webhookUrl; + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + $postData = $this->slackRecord->getSlackData($record); + $postString = json_encode($postData); + + $ch = curl_init(); + $options = array( + CURLOPT_URL => $this->webhookUrl, + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_HTTPHEADER => array('Content-type: application/json'), + CURLOPT_POSTFIELDS => $postString + ); + if (defined('CURLOPT_SAFE_UPLOAD')) { + $options[CURLOPT_SAFE_UPLOAD] = true; + } + + curl_setopt_array($ch, $options); + + Curl\Util::execute($ch); + } + + public function setFormatter(FormatterInterface $formatter) + { + parent::setFormatter($formatter); + $this->slackRecord->setFormatter($formatter); + + return $this; + } + + public function getFormatter() + { + $formatter = parent::getFormatter(); + $this->slackRecord->setFormatter($formatter); + + return $formatter; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php new file mode 100755 index 0000000..baead52 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SlackbotHandler.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Sends notifications through Slack's Slackbot + * + * @author Haralan Dobrev + * @see https://slack.com/apps/A0F81R8ET-slackbot + */ +class SlackbotHandler extends AbstractProcessingHandler +{ + /** + * The slug of the Slack team + * @var string + */ + private $slackTeam; + + /** + * Slackbot token + * @var string + */ + private $token; + + /** + * Slack channel name + * @var string + */ + private $channel; + + /** + * @param string $slackTeam Slack team slug + * @param string $token Slackbot token + * @param string $channel Slack channel (encoded ID or name) + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($slackTeam, $token, $channel, $level = Logger::CRITICAL, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->slackTeam = $slackTeam; + $this->token = $token; + $this->channel = $channel; + } + + /** + * {@inheritdoc} + * + * @param array $record + */ + protected function write(array $record) + { + $slackbotUrl = sprintf( + 'https://%s.slack.com/services/hooks/slackbot?token=%s&channel=%s', + $this->slackTeam, + $this->token, + $this->channel + ); + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $slackbotUrl); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $record['message']); + + Curl\Util::execute($ch); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php new file mode 100755 index 0000000..db50d97 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SocketHandler.php @@ -0,0 +1,385 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Stores to any socket - uses fsockopen() or pfsockopen(). + * + * @author Pablo de Leon Belloc + * @see http://php.net/manual/en/function.fsockopen.php + */ +class SocketHandler extends AbstractProcessingHandler +{ + private $connectionString; + private $connectionTimeout; + private $resource; + private $timeout = 0; + private $writingTimeout = 10; + private $lastSentBytes = null; + private $chunkSize = null; + private $persistent = false; + private $errno; + private $errstr; + private $lastWritingAt; + + /** + * @param string $connectionString Socket connection string + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct($connectionString, $level = Logger::DEBUG, $bubble = true) + { + parent::__construct($level, $bubble); + $this->connectionString = $connectionString; + $this->connectionTimeout = (float) ini_get('default_socket_timeout'); + } + + /** + * Connect (if necessary) and write to the socket + * + * @param array $record + * + * @throws \UnexpectedValueException + * @throws \RuntimeException + */ + protected function write(array $record) + { + $this->connectIfNotConnected(); + $data = $this->generateDataStream($record); + $this->writeToSocket($data); + } + + /** + * We will not close a PersistentSocket instance so it can be reused in other requests. + */ + public function close() + { + if (!$this->isPersistent()) { + $this->closeSocket(); + } + } + + /** + * Close socket, if open + */ + public function closeSocket() + { + if (is_resource($this->resource)) { + fclose($this->resource); + $this->resource = null; + } + } + + /** + * Set socket connection to nbe persistent. It only has effect before the connection is initiated. + * + * @param bool $persistent + */ + public function setPersistent($persistent) + { + $this->persistent = (bool) $persistent; + } + + /** + * Set connection timeout. Only has effect before we connect. + * + * @param float $seconds + * + * @see http://php.net/manual/en/function.fsockopen.php + */ + public function setConnectionTimeout($seconds) + { + $this->validateTimeout($seconds); + $this->connectionTimeout = (float) $seconds; + } + + /** + * Set write timeout. Only has effect before we connect. + * + * @param float $seconds + * + * @see http://php.net/manual/en/function.stream-set-timeout.php + */ + public function setTimeout($seconds) + { + $this->validateTimeout($seconds); + $this->timeout = (float) $seconds; + } + + /** + * Set writing timeout. Only has effect during connection in the writing cycle. + * + * @param float $seconds 0 for no timeout + */ + public function setWritingTimeout($seconds) + { + $this->validateTimeout($seconds); + $this->writingTimeout = (float) $seconds; + } + + /** + * Set chunk size. Only has effect during connection in the writing cycle. + * + * @param float $bytes + */ + public function setChunkSize($bytes) + { + $this->chunkSize = $bytes; + } + + /** + * Get current connection string + * + * @return string + */ + public function getConnectionString() + { + return $this->connectionString; + } + + /** + * Get persistent setting + * + * @return bool + */ + public function isPersistent() + { + return $this->persistent; + } + + /** + * Get current connection timeout setting + * + * @return float + */ + public function getConnectionTimeout() + { + return $this->connectionTimeout; + } + + /** + * Get current in-transfer timeout + * + * @return float + */ + public function getTimeout() + { + return $this->timeout; + } + + /** + * Get current local writing timeout + * + * @return float + */ + public function getWritingTimeout() + { + return $this->writingTimeout; + } + + /** + * Get current chunk size + * + * @return float + */ + public function getChunkSize() + { + return $this->chunkSize; + } + + /** + * Check to see if the socket is currently available. + * + * UDP might appear to be connected but might fail when writing. See http://php.net/fsockopen for details. + * + * @return bool + */ + public function isConnected() + { + return is_resource($this->resource) + && !feof($this->resource); // on TCP - other party can close connection. + } + + /** + * Wrapper to allow mocking + */ + protected function pfsockopen() + { + return @pfsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); + } + + /** + * Wrapper to allow mocking + */ + protected function fsockopen() + { + return @fsockopen($this->connectionString, -1, $this->errno, $this->errstr, $this->connectionTimeout); + } + + /** + * Wrapper to allow mocking + * + * @see http://php.net/manual/en/function.stream-set-timeout.php + */ + protected function streamSetTimeout() + { + $seconds = floor($this->timeout); + $microseconds = round(($this->timeout - $seconds) * 1e6); + + return stream_set_timeout($this->resource, $seconds, $microseconds); + } + + /** + * Wrapper to allow mocking + * + * @see http://php.net/manual/en/function.stream-set-chunk-size.php + */ + protected function streamSetChunkSize() + { + return stream_set_chunk_size($this->resource, $this->chunkSize); + } + + /** + * Wrapper to allow mocking + */ + protected function fwrite($data) + { + return @fwrite($this->resource, $data); + } + + /** + * Wrapper to allow mocking + */ + protected function streamGetMetadata() + { + return stream_get_meta_data($this->resource); + } + + private function validateTimeout($value) + { + $ok = filter_var($value, FILTER_VALIDATE_FLOAT); + if ($ok === false || $value < 0) { + throw new \InvalidArgumentException("Timeout must be 0 or a positive float (got $value)"); + } + } + + private function connectIfNotConnected() + { + if ($this->isConnected()) { + return; + } + $this->connect(); + } + + protected function generateDataStream($record) + { + return (string) $record['formatted']; + } + + /** + * @return resource|null + */ + protected function getResource() + { + return $this->resource; + } + + private function connect() + { + $this->createSocketResource(); + $this->setSocketTimeout(); + $this->setStreamChunkSize(); + } + + private function createSocketResource() + { + if ($this->isPersistent()) { + $resource = $this->pfsockopen(); + } else { + $resource = $this->fsockopen(); + } + if (!$resource) { + throw new \UnexpectedValueException("Failed connecting to $this->connectionString ($this->errno: $this->errstr)"); + } + $this->resource = $resource; + } + + private function setSocketTimeout() + { + if (!$this->streamSetTimeout()) { + throw new \UnexpectedValueException("Failed setting timeout with stream_set_timeout()"); + } + } + + private function setStreamChunkSize() + { + if ($this->chunkSize && !$this->streamSetChunkSize()) { + throw new \UnexpectedValueException("Failed setting chunk size with stream_set_chunk_size()"); + } + } + + private function writeToSocket($data) + { + $length = strlen($data); + $sent = 0; + $this->lastSentBytes = $sent; + while ($this->isConnected() && $sent < $length) { + if (0 == $sent) { + $chunk = $this->fwrite($data); + } else { + $chunk = $this->fwrite(substr($data, $sent)); + } + if ($chunk === false) { + throw new \RuntimeException("Could not write to socket"); + } + $sent += $chunk; + $socketInfo = $this->streamGetMetadata(); + if ($socketInfo['timed_out']) { + throw new \RuntimeException("Write timed-out"); + } + + if ($this->writingIsTimedOut($sent)) { + throw new \RuntimeException("Write timed-out, no data sent for `{$this->writingTimeout}` seconds, probably we got disconnected (sent $sent of $length)"); + } + } + if (!$this->isConnected() && $sent < $length) { + throw new \RuntimeException("End-of-file reached, probably we got disconnected (sent $sent of $length)"); + } + } + + private function writingIsTimedOut($sent) + { + $writingTimeout = (int) floor($this->writingTimeout); + if (0 === $writingTimeout) { + return false; + } + + if ($sent !== $this->lastSentBytes) { + $this->lastWritingAt = time(); + $this->lastSentBytes = $sent; + + return false; + } else { + usleep(100); + } + + if ((time() - $this->lastWritingAt) >= $writingTimeout) { + $this->closeSocket(); + + return true; + } + + return false; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php new file mode 100755 index 0000000..a35b7e4 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php @@ -0,0 +1,176 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Stores to any stream resource + * + * Can be used to store into php://stderr, remote and local files, etc. + * + * @author Jordi Boggiano + */ +class StreamHandler extends AbstractProcessingHandler +{ + protected $stream; + protected $url; + private $errorMessage; + protected $filePermission; + protected $useLocking; + private $dirCreated; + + /** + * @param resource|string $stream + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param int|null $filePermission Optional file permissions (default (0644) are only for owner read/write) + * @param bool $useLocking Try to lock log file before doing any writes + * + * @throws \Exception If a missing directory is not buildable + * @throws \InvalidArgumentException If stream is not a resource or string + */ + public function __construct($stream, $level = Logger::DEBUG, $bubble = true, $filePermission = null, $useLocking = false) + { + parent::__construct($level, $bubble); + if (is_resource($stream)) { + $this->stream = $stream; + } elseif (is_string($stream)) { + $this->url = $stream; + } else { + throw new \InvalidArgumentException('A stream must either be a resource or a string.'); + } + + $this->filePermission = $filePermission; + $this->useLocking = $useLocking; + } + + /** + * {@inheritdoc} + */ + public function close() + { + if ($this->url && is_resource($this->stream)) { + fclose($this->stream); + } + $this->stream = null; + } + + /** + * Return the currently active stream if it is open + * + * @return resource|null + */ + public function getStream() + { + return $this->stream; + } + + /** + * Return the stream URL if it was configured with a URL and not an active resource + * + * @return string|null + */ + public function getUrl() + { + return $this->url; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if (!is_resource($this->stream)) { + if (null === $this->url || '' === $this->url) { + throw new \LogicException('Missing stream url, the stream can not be opened. This may be caused by a premature call to close().'); + } + $this->createDir(); + $this->errorMessage = null; + set_error_handler(array($this, 'customErrorHandler')); + $this->stream = fopen($this->url, 'a'); + if ($this->filePermission !== null) { + @chmod($this->url, $this->filePermission); + } + restore_error_handler(); + if (!is_resource($this->stream)) { + $this->stream = null; + throw new \UnexpectedValueException(sprintf('The stream or file "%s" could not be opened: '.$this->errorMessage, $this->url)); + } + } + + if ($this->useLocking) { + // ignoring errors here, there's not much we can do about them + flock($this->stream, LOCK_EX); + } + + $this->streamWrite($this->stream, $record); + + if ($this->useLocking) { + flock($this->stream, LOCK_UN); + } + } + + /** + * Write to stream + * @param resource $stream + * @param array $record + */ + protected function streamWrite($stream, array $record) + { + fwrite($stream, (string) $record['formatted']); + } + + private function customErrorHandler($code, $msg) + { + $this->errorMessage = preg_replace('{^(fopen|mkdir)\(.*?\): }', '', $msg); + } + + /** + * @param string $stream + * + * @return null|string + */ + private function getDirFromStream($stream) + { + $pos = strpos($stream, '://'); + if ($pos === false) { + return dirname($stream); + } + + if ('file://' === substr($stream, 0, 7)) { + return dirname(substr($stream, 7)); + } + + return; + } + + private function createDir() + { + // Do not try to create dir if it has already been tried. + if ($this->dirCreated) { + return; + } + + $dir = $this->getDirFromStream($this->url); + if (null !== $dir && !is_dir($dir)) { + $this->errorMessage = null; + set_error_handler(array($this, 'customErrorHandler')); + $status = mkdir($dir, 0777, true); + restore_error_handler(); + if (false === $status && !is_dir($dir)) { + throw new \UnexpectedValueException(sprintf('There is no existing directory at "%s" and its not buildable: '.$this->errorMessage, $dir)); + } + } + $this->dirCreated = true; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php new file mode 100755 index 0000000..ac7b16f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SwiftMailerHandler.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Formatter\FormatterInterface; +use Monolog\Formatter\LineFormatter; +use Swift; + +/** + * SwiftMailerHandler uses Swift_Mailer to send the emails + * + * @author Gyula Sallai + */ +class SwiftMailerHandler extends MailHandler +{ + protected $mailer; + private $messageTemplate; + + /** + * @param \Swift_Mailer $mailer The mailer to use + * @param callable|\Swift_Message $message An example message for real messages, only the body will be replaced + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + */ + public function __construct(\Swift_Mailer $mailer, $message, $level = Logger::ERROR, $bubble = true) + { + parent::__construct($level, $bubble); + + $this->mailer = $mailer; + $this->messageTemplate = $message; + } + + /** + * {@inheritdoc} + */ + protected function send($content, array $records) + { + $this->mailer->send($this->buildMessage($content, $records)); + } + + /** + * Gets the formatter for the Swift_Message subject. + * + * @param string $format The format of the subject + * @return FormatterInterface + */ + protected function getSubjectFormatter($format) + { + return new LineFormatter($format); + } + + /** + * Creates instance of Swift_Message to be sent + * + * @param string $content formatted email body to be sent + * @param array $records Log records that formed the content + * @return \Swift_Message + */ + protected function buildMessage($content, array $records) + { + $message = null; + if ($this->messageTemplate instanceof \Swift_Message) { + $message = clone $this->messageTemplate; + $message->generateId(); + } elseif (is_callable($this->messageTemplate)) { + $message = call_user_func($this->messageTemplate, $content, $records); + } + + if (!$message instanceof \Swift_Message) { + throw new \InvalidArgumentException('Could not resolve message as instance of Swift_Message or a callable returning it'); + } + + if ($records) { + $subjectFormatter = $this->getSubjectFormatter($message->getSubject()); + $message->setSubject($subjectFormatter->format($this->getHighestRecord($records))); + } + + $message->setBody($content); + if (version_compare(Swift::VERSION, '6.0.0', '>=')) { + $message->setDate(new \DateTimeImmutable()); + } else { + $message->setDate(time()); + } + + return $message; + } + + /** + * BC getter, to be removed in 2.0 + */ + public function __get($name) + { + if ($name === 'message') { + trigger_error('SwiftMailerHandler->message is deprecated, use ->buildMessage() instead to retrieve the message', E_USER_DEPRECATED); + + return $this->buildMessage(null, array()); + } + + throw new \InvalidArgumentException('Invalid property '.$name); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php new file mode 100755 index 0000000..f770c80 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogHandler.php @@ -0,0 +1,67 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +/** + * Logs to syslog service. + * + * usage example: + * + * $log = new Logger('application'); + * $syslog = new SyslogHandler('myfacility', 'local6'); + * $formatter = new LineFormatter("%channel%.%level_name%: %message% %extra%"); + * $syslog->setFormatter($formatter); + * $log->pushHandler($syslog); + * + * @author Sven Paulus + */ +class SyslogHandler extends AbstractSyslogHandler +{ + protected $ident; + protected $logopts; + + /** + * @param string $ident + * @param mixed $facility + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param int $logopts Option flags for the openlog() call, defaults to LOG_PID + */ + public function __construct($ident, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $logopts = LOG_PID) + { + parent::__construct($facility, $level, $bubble); + + $this->ident = $ident; + $this->logopts = $logopts; + } + + /** + * {@inheritdoc} + */ + public function close() + { + closelog(); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + if (!openlog($this->ident, $this->logopts, $this->facility)) { + throw new \LogicException('Can\'t open syslog for ident "'.$this->ident.'" and facility "'.$this->facility.'"'); + } + syslog($this->logLevels[$record['level']], (string) $record['formatted']); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php new file mode 100755 index 0000000..3bff085 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdp/UdpSocket.php @@ -0,0 +1,56 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\SyslogUdp; + +class UdpSocket +{ + const DATAGRAM_MAX_LENGTH = 65023; + + protected $ip; + protected $port; + protected $socket; + + public function __construct($ip, $port = 514) + { + $this->ip = $ip; + $this->port = $port; + $this->socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); + } + + public function write($line, $header = "") + { + $this->send($this->assembleMessage($line, $header)); + } + + public function close() + { + if (is_resource($this->socket)) { + socket_close($this->socket); + $this->socket = null; + } + } + + protected function send($chunk) + { + if (!is_resource($this->socket)) { + throw new \LogicException('The UdpSocket to '.$this->ip.':'.$this->port.' has been closed and can not be written to anymore'); + } + socket_sendto($this->socket, $chunk, strlen($chunk), $flags = 0, $this->ip, $this->port); + } + + protected function assembleMessage($line, $header) + { + $chunkSize = self::DATAGRAM_MAX_LENGTH - strlen($header); + + return $header . substr($line, 0, $chunkSize); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php new file mode 100755 index 0000000..e14b378 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php @@ -0,0 +1,103 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\Handler\SyslogUdp\UdpSocket; + +/** + * A Handler for logging to a remote syslogd server. + * + * @author Jesper Skovgaard Nielsen + */ +class SyslogUdpHandler extends AbstractSyslogHandler +{ + protected $socket; + protected $ident; + + /** + * @param string $host + * @param int $port + * @param mixed $facility + * @param int $level The minimum logging level at which this handler will be triggered + * @param bool $bubble Whether the messages that are handled can bubble up the stack or not + * @param string $ident Program name or tag for each log message. + */ + public function __construct($host, $port = 514, $facility = LOG_USER, $level = Logger::DEBUG, $bubble = true, $ident = 'php') + { + parent::__construct($facility, $level, $bubble); + + $this->ident = $ident; + + $this->socket = new UdpSocket($host, $port ?: 514); + } + + protected function write(array $record) + { + $lines = $this->splitMessageIntoLines($record['formatted']); + + $header = $this->makeCommonSyslogHeader($this->logLevels[$record['level']]); + + foreach ($lines as $line) { + $this->socket->write($line, $header); + } + } + + public function close() + { + $this->socket->close(); + } + + private function splitMessageIntoLines($message) + { + if (is_array($message)) { + $message = implode("\n", $message); + } + + return preg_split('/$\R?^/m', $message, -1, PREG_SPLIT_NO_EMPTY); + } + + /** + * Make common syslog header (see rfc5424) + */ + protected function makeCommonSyslogHeader($severity) + { + $priority = $severity + $this->facility; + + if (!$pid = getmypid()) { + $pid = '-'; + } + + if (!$hostname = gethostname()) { + $hostname = '-'; + } + + return "<$priority>1 " . + $this->getDateTime() . " " . + $hostname . " " . + $this->ident . " " . + $pid . " - - "; + } + + protected function getDateTime() + { + return date(\DateTime::RFC3339); + } + + /** + * Inject your own socket, mainly used for testing + */ + public function setSocket($socket) + { + $this->socket = $socket; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php new file mode 100755 index 0000000..b6b1343 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/TestHandler.php @@ -0,0 +1,164 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Used for testing purposes. + * + * It records all records and gives you access to them for verification. + * + * @author Jordi Boggiano + * + * @method bool hasEmergency($record) + * @method bool hasAlert($record) + * @method bool hasCritical($record) + * @method bool hasError($record) + * @method bool hasWarning($record) + * @method bool hasNotice($record) + * @method bool hasInfo($record) + * @method bool hasDebug($record) + * + * @method bool hasEmergencyRecords() + * @method bool hasAlertRecords() + * @method bool hasCriticalRecords() + * @method bool hasErrorRecords() + * @method bool hasWarningRecords() + * @method bool hasNoticeRecords() + * @method bool hasInfoRecords() + * @method bool hasDebugRecords() + * + * @method bool hasEmergencyThatContains($message) + * @method bool hasAlertThatContains($message) + * @method bool hasCriticalThatContains($message) + * @method bool hasErrorThatContains($message) + * @method bool hasWarningThatContains($message) + * @method bool hasNoticeThatContains($message) + * @method bool hasInfoThatContains($message) + * @method bool hasDebugThatContains($message) + * + * @method bool hasEmergencyThatMatches($message) + * @method bool hasAlertThatMatches($message) + * @method bool hasCriticalThatMatches($message) + * @method bool hasErrorThatMatches($message) + * @method bool hasWarningThatMatches($message) + * @method bool hasNoticeThatMatches($message) + * @method bool hasInfoThatMatches($message) + * @method bool hasDebugThatMatches($message) + * + * @method bool hasEmergencyThatPasses($message) + * @method bool hasAlertThatPasses($message) + * @method bool hasCriticalThatPasses($message) + * @method bool hasErrorThatPasses($message) + * @method bool hasWarningThatPasses($message) + * @method bool hasNoticeThatPasses($message) + * @method bool hasInfoThatPasses($message) + * @method bool hasDebugThatPasses($message) + */ +class TestHandler extends AbstractProcessingHandler +{ + protected $records = array(); + protected $recordsByLevel = array(); + + public function getRecords() + { + return $this->records; + } + + public function clear() + { + $this->records = array(); + $this->recordsByLevel = array(); + } + + public function hasRecords($level) + { + return isset($this->recordsByLevel[$level]); + } + + /** + * @param string|array $record Either a message string or an array containing message and optionally context keys that will be checked against all records + * @param int $level Logger::LEVEL constant value + */ + public function hasRecord($record, $level) + { + if (is_string($record)) { + $record = array('message' => $record); + } + + return $this->hasRecordThatPasses(function ($rec) use ($record) { + if ($rec['message'] !== $record['message']) { + return false; + } + if (isset($record['context']) && $rec['context'] !== $record['context']) { + return false; + } + return true; + }, $level); + } + + public function hasRecordThatContains($message, $level) + { + return $this->hasRecordThatPasses(function ($rec) use ($message) { + return strpos($rec['message'], $message) !== false; + }, $level); + } + + public function hasRecordThatMatches($regex, $level) + { + return $this->hasRecordThatPasses(function ($rec) use ($regex) { + return preg_match($regex, $rec['message']) > 0; + }, $level); + } + + public function hasRecordThatPasses($predicate, $level) + { + if (!is_callable($predicate)) { + throw new \InvalidArgumentException("Expected a callable for hasRecordThatSucceeds"); + } + + if (!isset($this->recordsByLevel[$level])) { + return false; + } + + foreach ($this->recordsByLevel[$level] as $i => $rec) { + if (call_user_func($predicate, $rec, $i)) { + return true; + } + } + + return false; + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->recordsByLevel[$record['level']][] = $record; + $this->records[] = $record; + } + + public function __call($method, $args) + { + if (preg_match('/(.*)(Debug|Info|Notice|Warning|Error|Critical|Alert|Emergency)(.*)/', $method, $matches) > 0) { + $genericMethod = $matches[1] . ('Records' !== $matches[3] ? 'Record' : '') . $matches[3]; + $level = constant('Monolog\Logger::' . strtoupper($matches[2])); + if (method_exists($this, $genericMethod)) { + $args[] = $level; + + return call_user_func_array(array($this, $genericMethod), $args); + } + } + + throw new \BadMethodCallException('Call to undefined method ' . get_class($this) . '::' . $method . '()'); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php new file mode 100755 index 0000000..6bc4671 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/WhatFailureGroupHandler.php @@ -0,0 +1,71 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +/** + * Forwards records to multiple handlers suppressing failures of each handler + * and continuing through to give every handler a chance to succeed. + * + * @author Craig D'Amelio + */ +class WhatFailureGroupHandler extends GroupHandler +{ + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + if ($this->processors) { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + } + + foreach ($this->handlers as $handler) { + try { + $handler->handle($record); + } catch (\Exception $e) { + // What failure? + } catch (\Throwable $e) { + // What failure? + } + } + + return false === $this->bubble; + } + + /** + * {@inheritdoc} + */ + public function handleBatch(array $records) + { + if ($this->processors) { + $processed = array(); + foreach ($records as $record) { + foreach ($this->processors as $processor) { + $processed[] = call_user_func($processor, $record); + } + } + $records = $processed; + } + + foreach ($this->handlers as $handler) { + try { + $handler->handleBatch($records); + } catch (\Exception $e) { + // What failure? + } catch (\Throwable $e) { + // What failure? + } + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php new file mode 100755 index 0000000..f22cf21 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Handler/ZendMonitorHandler.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\NormalizerFormatter; +use Monolog\Logger; + +/** + * Handler sending logs to Zend Monitor + * + * @author Christian Bergau + */ +class ZendMonitorHandler extends AbstractProcessingHandler +{ + /** + * Monolog level / ZendMonitor Custom Event priority map + * + * @var array + */ + protected $levelMap = array( + Logger::DEBUG => 1, + Logger::INFO => 2, + Logger::NOTICE => 3, + Logger::WARNING => 4, + Logger::ERROR => 5, + Logger::CRITICAL => 6, + Logger::ALERT => 7, + Logger::EMERGENCY => 0, + ); + + /** + * Construct + * + * @param int $level + * @param bool $bubble + * @throws MissingExtensionException + */ + public function __construct($level = Logger::DEBUG, $bubble = true) + { + if (!function_exists('zend_monitor_custom_event')) { + throw new MissingExtensionException('You must have Zend Server installed in order to use this handler'); + } + parent::__construct($level, $bubble); + } + + /** + * {@inheritdoc} + */ + protected function write(array $record) + { + $this->writeZendMonitorCustomEvent( + $this->levelMap[$record['level']], + $record['message'], + $record['formatted'] + ); + } + + /** + * Write a record to Zend Monitor + * + * @param int $level + * @param string $message + * @param array $formatted + */ + protected function writeZendMonitorCustomEvent($level, $message, $formatted) + { + zend_monitor_custom_event($level, $message, $formatted); + } + + /** + * {@inheritdoc} + */ + public function getDefaultFormatter() + { + return new NormalizerFormatter(); + } + + /** + * Get the level map + * + * @return array + */ + public function getLevelMap() + { + return $this->levelMap; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Logger.php b/vendor/monolog/monolog/src/Monolog/Logger.php new file mode 100755 index 0000000..05dfc81 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Logger.php @@ -0,0 +1,791 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Monolog\Handler\HandlerInterface; +use Monolog\Handler\StreamHandler; +use Psr\Log\LoggerInterface; +use Psr\Log\InvalidArgumentException; +use Exception; + +/** + * Monolog log channel + * + * It contains a stack of Handlers and a stack of Processors, + * and uses them to store records that are added to it. + * + * @author Jordi Boggiano + */ +class Logger implements LoggerInterface, ResettableInterface +{ + /** + * Detailed debug information + */ + const DEBUG = 100; + + /** + * Interesting events + * + * Examples: User logs in, SQL logs. + */ + const INFO = 200; + + /** + * Uncommon events + */ + const NOTICE = 250; + + /** + * Exceptional occurrences that are not errors + * + * Examples: Use of deprecated APIs, poor use of an API, + * undesirable things that are not necessarily wrong. + */ + const WARNING = 300; + + /** + * Runtime errors + */ + const ERROR = 400; + + /** + * Critical conditions + * + * Example: Application component unavailable, unexpected exception. + */ + const CRITICAL = 500; + + /** + * Action must be taken immediately + * + * Example: Entire website down, database unavailable, etc. + * This should trigger the SMS alerts and wake you up. + */ + const ALERT = 550; + + /** + * Urgent alert. + */ + const EMERGENCY = 600; + + /** + * Monolog API version + * + * This is only bumped when API breaks are done and should + * follow the major version of the library + * + * @var int + */ + const API = 1; + + /** + * Logging levels from syslog protocol defined in RFC 5424 + * + * @var array $levels Logging levels + */ + protected static $levels = array( + self::DEBUG => 'DEBUG', + self::INFO => 'INFO', + self::NOTICE => 'NOTICE', + self::WARNING => 'WARNING', + self::ERROR => 'ERROR', + self::CRITICAL => 'CRITICAL', + self::ALERT => 'ALERT', + self::EMERGENCY => 'EMERGENCY', + ); + + /** + * @var \DateTimeZone + */ + protected static $timezone; + + /** + * @var string + */ + protected $name; + + /** + * The handler stack + * + * @var HandlerInterface[] + */ + protected $handlers; + + /** + * Processors that will process all log records + * + * To process records of a single handler instead, add the processor on that specific handler + * + * @var callable[] + */ + protected $processors; + + /** + * @var bool + */ + protected $microsecondTimestamps = true; + + /** + * @var callable + */ + protected $exceptionHandler; + + /** + * @param string $name The logging channel + * @param HandlerInterface[] $handlers Optional stack of handlers, the first one in the array is called first, etc. + * @param callable[] $processors Optional array of processors + */ + public function __construct($name, array $handlers = array(), array $processors = array()) + { + $this->name = $name; + $this->setHandlers($handlers); + $this->processors = $processors; + } + + /** + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Return a new cloned instance with the name changed + * + * @return static + */ + public function withName($name) + { + $new = clone $this; + $new->name = $name; + + return $new; + } + + /** + * Pushes a handler on to the stack. + * + * @param HandlerInterface $handler + * @return $this + */ + public function pushHandler(HandlerInterface $handler) + { + array_unshift($this->handlers, $handler); + + return $this; + } + + /** + * Pops a handler from the stack + * + * @return HandlerInterface + */ + public function popHandler() + { + if (!$this->handlers) { + throw new \LogicException('You tried to pop from an empty handler stack.'); + } + + return array_shift($this->handlers); + } + + /** + * Set handlers, replacing all existing ones. + * + * If a map is passed, keys will be ignored. + * + * @param HandlerInterface[] $handlers + * @return $this + */ + public function setHandlers(array $handlers) + { + $this->handlers = array(); + foreach (array_reverse($handlers) as $handler) { + $this->pushHandler($handler); + } + + return $this; + } + + /** + * @return HandlerInterface[] + */ + public function getHandlers() + { + return $this->handlers; + } + + /** + * Adds a processor on to the stack. + * + * @param callable $callback + * @return $this + */ + public function pushProcessor($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Processors must be valid callables (callback or object with an __invoke method), '.var_export($callback, true).' given'); + } + array_unshift($this->processors, $callback); + + return $this; + } + + /** + * Removes the processor on top of the stack and returns it. + * + * @return callable + */ + public function popProcessor() + { + if (!$this->processors) { + throw new \LogicException('You tried to pop from an empty processor stack.'); + } + + return array_shift($this->processors); + } + + /** + * @return callable[] + */ + public function getProcessors() + { + return $this->processors; + } + + /** + * Control the use of microsecond resolution timestamps in the 'datetime' + * member of new records. + * + * Generating microsecond resolution timestamps by calling + * microtime(true), formatting the result via sprintf() and then parsing + * the resulting string via \DateTime::createFromFormat() can incur + * a measurable runtime overhead vs simple usage of DateTime to capture + * a second resolution timestamp in systems which generate a large number + * of log events. + * + * @param bool $micro True to use microtime() to create timestamps + */ + public function useMicrosecondTimestamps($micro) + { + $this->microsecondTimestamps = (bool) $micro; + } + + /** + * Adds a log record. + * + * @param int $level The logging level + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function addRecord($level, $message, array $context = array()) + { + if (!$this->handlers) { + $this->pushHandler(new StreamHandler('php://stderr', static::DEBUG)); + } + + $levelName = static::getLevelName($level); + + // check if any handler will handle this message so we can return early and save cycles + $handlerKey = null; + reset($this->handlers); + while ($handler = current($this->handlers)) { + if ($handler->isHandling(array('level' => $level))) { + $handlerKey = key($this->handlers); + break; + } + + next($this->handlers); + } + + if (null === $handlerKey) { + return false; + } + + if (!static::$timezone) { + static::$timezone = new \DateTimeZone(date_default_timezone_get() ?: 'UTC'); + } + + // php7.1+ always has microseconds enabled, so we do not need this hack + if ($this->microsecondTimestamps && PHP_VERSION_ID < 70100) { + $ts = \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true)), static::$timezone); + } else { + $ts = new \DateTime(null, static::$timezone); + } + $ts->setTimezone(static::$timezone); + + $record = array( + 'message' => (string) $message, + 'context' => $context, + 'level' => $level, + 'level_name' => $levelName, + 'channel' => $this->name, + 'datetime' => $ts, + 'extra' => array(), + ); + + try { + foreach ($this->processors as $processor) { + $record = call_user_func($processor, $record); + } + + while ($handler = current($this->handlers)) { + if (true === $handler->handle($record)) { + break; + } + + next($this->handlers); + } + } catch (Exception $e) { + $this->handleException($e, $record); + } + + return true; + } + + /** + * Ends a log cycle and frees all resources used by handlers. + * + * Closing a Handler means flushing all buffers and freeing any open resources/handles. + * Handlers that have been closed should be able to accept log records again and re-open + * themselves on demand, but this may not always be possible depending on implementation. + * + * This is useful at the end of a request and will be called automatically on every handler + * when they get destructed. + */ + public function close() + { + foreach ($this->handlers as $handler) { + if (method_exists($handler, 'close')) { + $handler->close(); + } + } + } + + /** + * Ends a log cycle and resets all handlers and processors to their initial state. + * + * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal + * state, and getting it back to a state in which it can receive log records again. + * + * This is useful in case you want to avoid logs leaking between two requests or jobs when you + * have a long running process like a worker or an application server serving multiple requests + * in one process. + */ + public function reset() + { + foreach ($this->handlers as $handler) { + if ($handler instanceof ResettableInterface) { + $handler->reset(); + } + } + + foreach ($this->processors as $processor) { + if ($processor instanceof ResettableInterface) { + $processor->reset(); + } + } + } + + /** + * Adds a log record at the DEBUG level. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function addDebug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + + /** + * Adds a log record at the INFO level. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function addInfo($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + + /** + * Adds a log record at the NOTICE level. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function addNotice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + + /** + * Adds a log record at the WARNING level. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function addWarning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + + /** + * Adds a log record at the ERROR level. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function addError($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + + /** + * Adds a log record at the CRITICAL level. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function addCritical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + + /** + * Adds a log record at the ALERT level. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function addAlert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + + /** + * Adds a log record at the EMERGENCY level. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function addEmergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + + /** + * Gets all supported logging levels. + * + * @return array Assoc array with human-readable level names => level codes. + */ + public static function getLevels() + { + return array_flip(static::$levels); + } + + /** + * Gets the name of the logging level. + * + * @param int $level + * @return string + */ + public static function getLevelName($level) + { + if (!isset(static::$levels[$level])) { + throw new InvalidArgumentException('Level "'.$level.'" is not defined, use one of: '.implode(', ', array_keys(static::$levels))); + } + + return static::$levels[$level]; + } + + /** + * Converts PSR-3 levels to Monolog ones if necessary + * + * @param string|int Level number (monolog) or name (PSR-3) + * @return int + */ + public static function toMonologLevel($level) + { + if (is_string($level) && defined(__CLASS__.'::'.strtoupper($level))) { + return constant(__CLASS__.'::'.strtoupper($level)); + } + + return $level; + } + + /** + * Checks whether the Logger has a handler that listens on the given level + * + * @param int $level + * @return bool + */ + public function isHandling($level) + { + $record = array( + 'level' => $level, + ); + + foreach ($this->handlers as $handler) { + if ($handler->isHandling($record)) { + return true; + } + } + + return false; + } + + /** + * Set a custom exception handler + * + * @param callable $callback + * @return $this + */ + public function setExceptionHandler($callback) + { + if (!is_callable($callback)) { + throw new \InvalidArgumentException('Exception handler must be valid callable (callback or object with an __invoke method), '.var_export($callback, true).' given'); + } + $this->exceptionHandler = $callback; + + return $this; + } + + /** + * @return callable + */ + public function getExceptionHandler() + { + return $this->exceptionHandler; + } + + /** + * Delegates exception management to the custom exception handler, + * or throws the exception if no custom handler is set. + */ + protected function handleException(Exception $e, array $record) + { + if (!$this->exceptionHandler) { + throw $e; + } + + call_user_func($this->exceptionHandler, $e, $record); + } + + /** + * Adds a log record at an arbitrary level. + * + * This method allows for compatibility with common interfaces. + * + * @param mixed $level The log level + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function log($level, $message, array $context = array()) + { + $level = static::toMonologLevel($level); + + return $this->addRecord($level, $message, $context); + } + + /** + * Adds a log record at the DEBUG level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function debug($message, array $context = array()) + { + return $this->addRecord(static::DEBUG, $message, $context); + } + + /** + * Adds a log record at the INFO level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function info($message, array $context = array()) + { + return $this->addRecord(static::INFO, $message, $context); + } + + /** + * Adds a log record at the NOTICE level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function notice($message, array $context = array()) + { + return $this->addRecord(static::NOTICE, $message, $context); + } + + /** + * Adds a log record at the WARNING level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function warn($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + + /** + * Adds a log record at the WARNING level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function warning($message, array $context = array()) + { + return $this->addRecord(static::WARNING, $message, $context); + } + + /** + * Adds a log record at the ERROR level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function err($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + + /** + * Adds a log record at the ERROR level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function error($message, array $context = array()) + { + return $this->addRecord(static::ERROR, $message, $context); + } + + /** + * Adds a log record at the CRITICAL level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function crit($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + + /** + * Adds a log record at the CRITICAL level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function critical($message, array $context = array()) + { + return $this->addRecord(static::CRITICAL, $message, $context); + } + + /** + * Adds a log record at the ALERT level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function alert($message, array $context = array()) + { + return $this->addRecord(static::ALERT, $message, $context); + } + + /** + * Adds a log record at the EMERGENCY level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function emerg($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + + /** + * Adds a log record at the EMERGENCY level. + * + * This method allows for compatibility with common interfaces. + * + * @param string $message The log message + * @param array $context The log context + * @return bool Whether the record has been processed + */ + public function emergency($message, array $context = array()) + { + return $this->addRecord(static::EMERGENCY, $message, $context); + } + + /** + * Set the timezone to be used for the timestamp of log records. + * + * This is stored globally for all Logger instances + * + * @param \DateTimeZone $tz Timezone object + */ + public static function setTimezone(\DateTimeZone $tz) + { + self::$timezone = $tz; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php new file mode 100755 index 0000000..9fc3f50 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/GitProcessor.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Logger; + +/** + * Injects Git branch and Git commit SHA in all records + * + * @author Nick Otter + * @author Jordi Boggiano + */ +class GitProcessor implements ProcessorInterface +{ + private $level; + private static $cache; + + public function __construct($level = Logger::DEBUG) + { + $this->level = Logger::toMonologLevel($level); + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // return if the level is not high enough + if ($record['level'] < $this->level) { + return $record; + } + + $record['extra']['git'] = self::getGitInfo(); + + return $record; + } + + private static function getGitInfo() + { + if (self::$cache) { + return self::$cache; + } + + $branches = `git branch -v --no-abbrev`; + if (preg_match('{^\* (.+?)\s+([a-f0-9]{40})(?:\s|$)}m', $branches, $matches)) { + return self::$cache = array( + 'branch' => $matches[1], + 'commit' => $matches[2], + ); + } + + return self::$cache = array(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php new file mode 100755 index 0000000..6ae192a --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/IntrospectionProcessor.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Logger; + +/** + * Injects line/file:class/function where the log message came from + * + * Warning: This only works if the handler processes the logs directly. + * If you put the processor on a handler that is behind a FingersCrossedHandler + * for example, the processor will only be called once the trigger level is reached, + * and all the log records will have the same file/line/.. data from the call that + * triggered the FingersCrossedHandler. + * + * @author Jordi Boggiano + */ +class IntrospectionProcessor implements ProcessorInterface +{ + private $level; + + private $skipClassesPartials; + + private $skipStackFramesCount; + + private $skipFunctions = array( + 'call_user_func', + 'call_user_func_array', + ); + + public function __construct($level = Logger::DEBUG, array $skipClassesPartials = array(), $skipStackFramesCount = 0) + { + $this->level = Logger::toMonologLevel($level); + $this->skipClassesPartials = array_merge(array('Monolog\\'), $skipClassesPartials); + $this->skipStackFramesCount = $skipStackFramesCount; + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // return if the level is not high enough + if ($record['level'] < $this->level) { + return $record; + } + + /* + * http://php.net/manual/en/function.debug-backtrace.php + * As of 5.3.6, DEBUG_BACKTRACE_IGNORE_ARGS option was added. + * Any version less than 5.3.6 must use the DEBUG_BACKTRACE_IGNORE_ARGS constant value '2'. + */ + $trace = debug_backtrace((PHP_VERSION_ID < 50306) ? 2 : DEBUG_BACKTRACE_IGNORE_ARGS); + + // skip first since it's always the current method + array_shift($trace); + // the call_user_func call is also skipped + array_shift($trace); + + $i = 0; + + while ($this->isTraceClassOrSkippedFunction($trace, $i)) { + if (isset($trace[$i]['class'])) { + foreach ($this->skipClassesPartials as $part) { + if (strpos($trace[$i]['class'], $part) !== false) { + $i++; + continue 2; + } + } + } elseif (in_array($trace[$i]['function'], $this->skipFunctions)) { + $i++; + continue; + } + + break; + } + + $i += $this->skipStackFramesCount; + + // we should have the call source now + $record['extra'] = array_merge( + $record['extra'], + array( + 'file' => isset($trace[$i - 1]['file']) ? $trace[$i - 1]['file'] : null, + 'line' => isset($trace[$i - 1]['line']) ? $trace[$i - 1]['line'] : null, + 'class' => isset($trace[$i]['class']) ? $trace[$i]['class'] : null, + 'function' => isset($trace[$i]['function']) ? $trace[$i]['function'] : null, + ) + ); + + return $record; + } + + private function isTraceClassOrSkippedFunction(array $trace, $index) + { + if (!isset($trace[$index])) { + return false; + } + + return isset($trace[$index]['class']) || in_array($trace[$index]['function'], $this->skipFunctions); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php new file mode 100755 index 0000000..0543e92 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MemoryPeakUsageProcessor.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Injects memory_get_peak_usage in all records + * + * @see Monolog\Processor\MemoryProcessor::__construct() for options + * @author Rob Jensen + */ +class MemoryPeakUsageProcessor extends MemoryProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + $bytes = memory_get_peak_usage($this->realUsage); + $formatted = $this->formatBytes($bytes); + + $record['extra']['memory_peak_usage'] = $formatted; + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php new file mode 100755 index 0000000..2a379a3 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MemoryProcessor.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Some methods that are common for all memory processors + * + * @author Rob Jensen + */ +abstract class MemoryProcessor implements ProcessorInterface +{ + /** + * @var bool If true, get the real size of memory allocated from system. Else, only the memory used by emalloc() is reported. + */ + protected $realUsage; + + /** + * @var bool If true, then format memory size to human readable string (MB, KB, B depending on size) + */ + protected $useFormatting; + + /** + * @param bool $realUsage Set this to true to get the real size of memory allocated from system. + * @param bool $useFormatting If true, then format memory size to human readable string (MB, KB, B depending on size) + */ + public function __construct($realUsage = true, $useFormatting = true) + { + $this->realUsage = (bool) $realUsage; + $this->useFormatting = (bool) $useFormatting; + } + + /** + * Formats bytes into a human readable string if $this->useFormatting is true, otherwise return $bytes as is + * + * @param int $bytes + * @return string|int Formatted string if $this->useFormatting is true, otherwise return $bytes as is + */ + protected function formatBytes($bytes) + { + $bytes = (int) $bytes; + + if (!$this->useFormatting) { + return $bytes; + } + + if ($bytes > 1024 * 1024) { + return round($bytes / 1024 / 1024, 2).' MB'; + } elseif ($bytes > 1024) { + return round($bytes / 1024, 2).' KB'; + } + + return $bytes . ' B'; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php new file mode 100755 index 0000000..2783d65 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MemoryUsageProcessor.php @@ -0,0 +1,35 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Injects memory_get_usage in all records + * + * @see Monolog\Processor\MemoryProcessor::__construct() for options + * @author Rob Jensen + */ +class MemoryUsageProcessor extends MemoryProcessor +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + $bytes = memory_get_usage($this->realUsage); + $formatted = $this->formatBytes($bytes); + + $record['extra']['memory_usage'] = $formatted; + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php new file mode 100755 index 0000000..2f5b326 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php @@ -0,0 +1,63 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Logger; + +/** + * Injects Hg branch and Hg revision number in all records + * + * @author Jonathan A. Schweder + */ +class MercurialProcessor implements ProcessorInterface +{ + private $level; + private static $cache; + + public function __construct($level = Logger::DEBUG) + { + $this->level = Logger::toMonologLevel($level); + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // return if the level is not high enough + if ($record['level'] < $this->level) { + return $record; + } + + $record['extra']['hg'] = self::getMercurialInfo(); + + return $record; + } + + private static function getMercurialInfo() + { + if (self::$cache) { + return self::$cache; + } + + $result = explode(' ', trim(`hg id -nb`)); + if (count($result) >= 3) { + return self::$cache = array( + 'branch' => $result[1], + 'revision' => $result[2], + ); + } + + return self::$cache = array(); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php new file mode 100755 index 0000000..66b80fb --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/ProcessIdProcessor.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Adds value of getmypid into records + * + * @author Andreas Hörnicke + */ +class ProcessIdProcessor implements ProcessorInterface +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + $record['extra']['process_id'] = getmypid(); + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php b/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php new file mode 100755 index 0000000..7e64d4d --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/ProcessorInterface.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * An optional interface to allow labelling Monolog processors. + * + * @author Nicolas Grekas + */ +interface ProcessorInterface +{ + /** + * @return array The processed records + */ + public function __invoke(array $records); +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php new file mode 100755 index 0000000..0088505 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\Utils; + +/** + * Processes a record's message according to PSR-3 rules + * + * It replaces {foo} with the value from $context['foo'] + * + * @author Jordi Boggiano + */ +class PsrLogMessageProcessor implements ProcessorInterface +{ + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + if (false === strpos($record['message'], '{')) { + return $record; + } + + $replacements = array(); + foreach ($record['context'] as $key => $val) { + if (is_null($val) || is_scalar($val) || (is_object($val) && method_exists($val, "__toString"))) { + $replacements['{'.$key.'}'] = $val; + } elseif (is_object($val)) { + $replacements['{'.$key.'}'] = '[object '.Utils::getClass($val).']'; + } else { + $replacements['{'.$key.'}'] = '['.gettype($val).']'; + } + } + + $record['message'] = strtr($record['message'], $replacements); + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php new file mode 100755 index 0000000..615a4d9 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/TagProcessor.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Adds a tags array into record + * + * @author Martijn Riemers + */ +class TagProcessor implements ProcessorInterface +{ + private $tags; + + public function __construct(array $tags = array()) + { + $this->setTags($tags); + } + + public function addTags(array $tags = array()) + { + $this->tags = array_merge($this->tags, $tags); + } + + public function setTags(array $tags = array()) + { + $this->tags = $tags; + } + + public function __invoke(array $record) + { + $record['extra']['tags'] = $this->tags; + + return $record; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php new file mode 100755 index 0000000..d1f708c --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/UidProcessor.php @@ -0,0 +1,59 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\ResettableInterface; + +/** + * Adds a unique identifier into records + * + * @author Simon Mönch + */ +class UidProcessor implements ProcessorInterface, ResettableInterface +{ + private $uid; + + public function __construct($length = 7) + { + if (!is_int($length) || $length > 32 || $length < 1) { + throw new \InvalidArgumentException('The uid length must be an integer between 1 and 32'); + } + + + $this->uid = $this->generateUid($length); + } + + public function __invoke(array $record) + { + $record['extra']['uid'] = $this->uid; + + return $record; + } + + /** + * @return string + */ + public function getUid() + { + return $this->uid; + } + + public function reset() + { + $this->uid = $this->generateUid(strlen($this->uid)); + } + + private function generateUid($length) + { + return substr(hash('md5', uniqid('', true)), 0, $length); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php new file mode 100755 index 0000000..684188f --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Processor/WebProcessor.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +/** + * Injects url/method and remote IP of the current web request in all records + * + * @author Jordi Boggiano + */ +class WebProcessor implements ProcessorInterface +{ + /** + * @var array|\ArrayAccess + */ + protected $serverData; + + /** + * Default fields + * + * Array is structured as [key in record.extra => key in $serverData] + * + * @var array + */ + protected $extraFields = array( + 'url' => 'REQUEST_URI', + 'ip' => 'REMOTE_ADDR', + 'http_method' => 'REQUEST_METHOD', + 'server' => 'SERVER_NAME', + 'referrer' => 'HTTP_REFERER', + ); + + /** + * @param array|\ArrayAccess $serverData Array or object w/ ArrayAccess that provides access to the $_SERVER data + * @param array|null $extraFields Field names and the related key inside $serverData to be added. If not provided it defaults to: url, ip, http_method, server, referrer + */ + public function __construct($serverData = null, array $extraFields = null) + { + if (null === $serverData) { + $this->serverData = &$_SERVER; + } elseif (is_array($serverData) || $serverData instanceof \ArrayAccess) { + $this->serverData = $serverData; + } else { + throw new \UnexpectedValueException('$serverData must be an array or object implementing ArrayAccess.'); + } + + if (null !== $extraFields) { + if (isset($extraFields[0])) { + foreach (array_keys($this->extraFields) as $fieldName) { + if (!in_array($fieldName, $extraFields)) { + unset($this->extraFields[$fieldName]); + } + } + } else { + $this->extraFields = $extraFields; + } + } + } + + /** + * @param array $record + * @return array + */ + public function __invoke(array $record) + { + // skip processing if for some reason request data + // is not present (CLI or wonky SAPIs) + if (!isset($this->serverData['REQUEST_URI'])) { + return $record; + } + + $record['extra'] = $this->appendExtraFields($record['extra']); + + return $record; + } + + /** + * @param string $extraName + * @param string $serverName + * @return $this + */ + public function addExtraField($extraName, $serverName) + { + $this->extraFields[$extraName] = $serverName; + + return $this; + } + + /** + * @param array $extra + * @return array + */ + private function appendExtraFields(array $extra) + { + foreach ($this->extraFields as $extraName => $serverName) { + $extra[$extraName] = isset($this->serverData[$serverName]) ? $this->serverData[$serverName] : null; + } + + if (isset($this->serverData['UNIQUE_ID'])) { + $extra['unique_id'] = $this->serverData['UNIQUE_ID']; + } + + return $extra; + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Registry.php b/vendor/monolog/monolog/src/Monolog/Registry.php new file mode 100755 index 0000000..159b751 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Registry.php @@ -0,0 +1,134 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use InvalidArgumentException; + +/** + * Monolog log registry + * + * Allows to get `Logger` instances in the global scope + * via static method calls on this class. + * + * + * $application = new Monolog\Logger('application'); + * $api = new Monolog\Logger('api'); + * + * Monolog\Registry::addLogger($application); + * Monolog\Registry::addLogger($api); + * + * function testLogger() + * { + * Monolog\Registry::api()->addError('Sent to $api Logger instance'); + * Monolog\Registry::application()->addError('Sent to $application Logger instance'); + * } + * + * + * @author Tomas Tatarko + */ +class Registry +{ + /** + * List of all loggers in the registry (by named indexes) + * + * @var Logger[] + */ + private static $loggers = array(); + + /** + * Adds new logging channel to the registry + * + * @param Logger $logger Instance of the logging channel + * @param string|null $name Name of the logging channel ($logger->getName() by default) + * @param bool $overwrite Overwrite instance in the registry if the given name already exists? + * @throws \InvalidArgumentException If $overwrite set to false and named Logger instance already exists + */ + public static function addLogger(Logger $logger, $name = null, $overwrite = false) + { + $name = $name ?: $logger->getName(); + + if (isset(self::$loggers[$name]) && !$overwrite) { + throw new InvalidArgumentException('Logger with the given name already exists'); + } + + self::$loggers[$name] = $logger; + } + + /** + * Checks if such logging channel exists by name or instance + * + * @param string|Logger $logger Name or logger instance + */ + public static function hasLogger($logger) + { + if ($logger instanceof Logger) { + $index = array_search($logger, self::$loggers, true); + + return false !== $index; + } else { + return isset(self::$loggers[$logger]); + } + } + + /** + * Removes instance from registry by name or instance + * + * @param string|Logger $logger Name or logger instance + */ + public static function removeLogger($logger) + { + if ($logger instanceof Logger) { + if (false !== ($idx = array_search($logger, self::$loggers, true))) { + unset(self::$loggers[$idx]); + } + } else { + unset(self::$loggers[$logger]); + } + } + + /** + * Clears the registry + */ + public static function clear() + { + self::$loggers = array(); + } + + /** + * Gets Logger instance from the registry + * + * @param string $name Name of the requested Logger instance + * @throws \InvalidArgumentException If named Logger instance is not in the registry + * @return Logger Requested instance of Logger + */ + public static function getInstance($name) + { + if (!isset(self::$loggers[$name])) { + throw new InvalidArgumentException(sprintf('Requested "%s" logger instance is not in the registry', $name)); + } + + return self::$loggers[$name]; + } + + /** + * Gets Logger instance from the registry via static method call + * + * @param string $name Name of the requested Logger instance + * @param array $arguments Arguments passed to static method call + * @throws \InvalidArgumentException If named Logger instance is not in the registry + * @return Logger Requested instance of Logger + */ + public static function __callStatic($name, $arguments) + { + return self::getInstance($name); + } +} diff --git a/vendor/monolog/monolog/src/Monolog/ResettableInterface.php b/vendor/monolog/monolog/src/Monolog/ResettableInterface.php new file mode 100755 index 0000000..635bc77 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/ResettableInterface.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +/** + * Handler or Processor implementing this interface will be reset when Logger::reset() is called. + * + * Resetting ends a log cycle gets them back to their initial state. + * + * Resetting a Handler or a Processor means flushing/cleaning all buffers, resetting internal + * state, and getting it back to a state in which it can receive log records again. + * + * This is useful in case you want to avoid logs leaking between two requests or jobs when you + * have a long running process like a worker or an application server serving multiple requests + * in one process. + * + * @author Grégoire Pineau + */ +interface ResettableInterface +{ + public function reset(); +} diff --git a/vendor/monolog/monolog/src/Monolog/SignalHandler.php b/vendor/monolog/monolog/src/Monolog/SignalHandler.php new file mode 100755 index 0000000..d590780 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/SignalHandler.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Psr\Log\LoggerInterface; +use Psr\Log\LogLevel; +use ReflectionExtension; + +/** + * Monolog POSIX signal handler + * + * @author Robert Gust-Bardon + */ +class SignalHandler +{ + private $logger; + + private $previousSignalHandler = array(); + private $signalLevelMap = array(); + private $signalRestartSyscalls = array(); + + public function __construct(LoggerInterface $logger) + { + $this->logger = $logger; + } + + public function registerSignalHandler($signo, $level = LogLevel::CRITICAL, $callPrevious = true, $restartSyscalls = true, $async = true) + { + if (!extension_loaded('pcntl') || !function_exists('pcntl_signal')) { + return $this; + } + + if ($callPrevious) { + if (function_exists('pcntl_signal_get_handler')) { + $handler = pcntl_signal_get_handler($signo); + if ($handler === false) { + return $this; + } + $this->previousSignalHandler[$signo] = $handler; + } else { + $this->previousSignalHandler[$signo] = true; + } + } else { + unset($this->previousSignalHandler[$signo]); + } + $this->signalLevelMap[$signo] = $level; + $this->signalRestartSyscalls[$signo] = $restartSyscalls; + + if (function_exists('pcntl_async_signals') && $async !== null) { + pcntl_async_signals($async); + } + + pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls); + + return $this; + } + + public function handleSignal($signo, array $siginfo = null) + { + static $signals = array(); + + if (!$signals && extension_loaded('pcntl')) { + $pcntl = new ReflectionExtension('pcntl'); + $constants = $pcntl->getConstants(); + if (!$constants) { + // HHVM 3.24.2 returns an empty array. + $constants = get_defined_constants(true); + $constants = $constants['Core']; + } + foreach ($constants as $name => $value) { + if (substr($name, 0, 3) === 'SIG' && $name[3] !== '_' && is_int($value)) { + $signals[$value] = $name; + } + } + unset($constants); + } + + $level = isset($this->signalLevelMap[$signo]) ? $this->signalLevelMap[$signo] : LogLevel::CRITICAL; + $signal = isset($signals[$signo]) ? $signals[$signo] : $signo; + $context = isset($siginfo) ? $siginfo : array(); + $this->logger->log($level, sprintf('Program received signal %s', $signal), $context); + + if (!isset($this->previousSignalHandler[$signo])) { + return; + } + + if ($this->previousSignalHandler[$signo] === true || $this->previousSignalHandler[$signo] === SIG_DFL) { + if (extension_loaded('pcntl') && function_exists('pcntl_signal') && function_exists('pcntl_sigprocmask') && function_exists('pcntl_signal_dispatch') + && extension_loaded('posix') && function_exists('posix_getpid') && function_exists('posix_kill')) { + $restartSyscalls = isset($this->restartSyscalls[$signo]) ? $this->restartSyscalls[$signo] : true; + pcntl_signal($signo, SIG_DFL, $restartSyscalls); + pcntl_sigprocmask(SIG_UNBLOCK, array($signo), $oldset); + posix_kill(posix_getpid(), $signo); + pcntl_signal_dispatch(); + pcntl_sigprocmask(SIG_SETMASK, $oldset); + pcntl_signal($signo, array($this, 'handleSignal'), $restartSyscalls); + } + } elseif (is_callable($this->previousSignalHandler[$signo])) { + if (PHP_VERSION_ID >= 70100) { + $this->previousSignalHandler[$signo]($signo, $siginfo); + } else { + $this->previousSignalHandler[$signo]($signo); + } + } + } +} diff --git a/vendor/monolog/monolog/src/Monolog/Utils.php b/vendor/monolog/monolog/src/Monolog/Utils.php new file mode 100755 index 0000000..eb9be86 --- /dev/null +++ b/vendor/monolog/monolog/src/Monolog/Utils.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +class Utils +{ + /** + * @internal + */ + public static function getClass($object) + { + $class = \get_class($object); + + return 'c' === $class[0] && 0 === strpos($class, "class@anonymous\0") ? get_parent_class($class).'@anonymous' : $class; + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php new file mode 100755 index 0000000..a9a3f30 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/ErrorHandlerTest.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Monolog\Handler\TestHandler; + +class ErrorHandlerTest extends \PHPUnit_Framework_TestCase +{ + public function testHandleError() + { + $logger = new Logger('test', array($handler = new TestHandler)); + $errHandler = new ErrorHandler($logger); + + $errHandler->registerErrorHandler(array(E_USER_NOTICE => Logger::EMERGENCY), false); + trigger_error('Foo', E_USER_ERROR); + $this->assertCount(1, $handler->getRecords()); + $this->assertTrue($handler->hasErrorRecords()); + trigger_error('Foo', E_USER_NOTICE); + $this->assertCount(2, $handler->getRecords()); + $this->assertTrue($handler->hasEmergencyRecords()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php new file mode 100755 index 0000000..71c4204 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/ChromePHPFormatterTest.php @@ -0,0 +1,158 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +class ChromePHPFormatterTest extends \PHPUnit_Framework_TestCase +{ + /** + * @covers Monolog\Formatter\ChromePHPFormatter::format + */ + public function testDefaultFormat() + { + $formatter = new ChromePHPFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('ip' => '127.0.0.1'), + 'message' => 'log', + ); + + $message = $formatter->format($record); + + $this->assertEquals( + array( + 'meh', + array( + 'message' => 'log', + 'context' => array('from' => 'logger'), + 'extra' => array('ip' => '127.0.0.1'), + ), + 'unknown', + 'error', + ), + $message + ); + } + + /** + * @covers Monolog\Formatter\ChromePHPFormatter::format + */ + public function testFormatWithFileAndLine() + { + $formatter = new ChromePHPFormatter(); + $record = array( + 'level' => Logger::CRITICAL, + 'level_name' => 'CRITICAL', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('ip' => '127.0.0.1', 'file' => 'test', 'line' => 14), + 'message' => 'log', + ); + + $message = $formatter->format($record); + + $this->assertEquals( + array( + 'meh', + array( + 'message' => 'log', + 'context' => array('from' => 'logger'), + 'extra' => array('ip' => '127.0.0.1'), + ), + 'test : 14', + 'error', + ), + $message + ); + } + + /** + * @covers Monolog\Formatter\ChromePHPFormatter::format + */ + public function testFormatWithoutContext() + { + $formatter = new ChromePHPFormatter(); + $record = array( + 'level' => Logger::DEBUG, + 'level_name' => 'DEBUG', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + $message = $formatter->format($record); + + $this->assertEquals( + array( + 'meh', + 'log', + 'unknown', + 'log', + ), + $message + ); + } + + /** + * @covers Monolog\Formatter\ChromePHPFormatter::formatBatch + */ + public function testBatchFormatThrowException() + { + $formatter = new ChromePHPFormatter(); + $records = array( + array( + 'level' => Logger::INFO, + 'level_name' => 'INFO', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ), + array( + 'level' => Logger::WARNING, + 'level_name' => 'WARNING', + 'channel' => 'foo', + 'context' => array(), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log2', + ), + ); + + $this->assertEquals( + array( + array( + 'meh', + 'log', + 'unknown', + 'info', + ), + array( + 'foo', + 'log2', + 'unknown', + 'warn', + ), + ), + $formatter->formatBatch($records) + ); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php new file mode 100755 index 0000000..90cc48d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/ElasticaFormatterTest.php @@ -0,0 +1,79 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +class ElasticaFormatterTest extends \PHPUnit_Framework_TestCase +{ + public function setUp() + { + if (!class_exists("Elastica\Document")) { + $this->markTestSkipped("ruflin/elastica not installed"); + } + } + + /** + * @covers Monolog\Formatter\ElasticaFormatter::__construct + * @covers Monolog\Formatter\ElasticaFormatter::format + * @covers Monolog\Formatter\ElasticaFormatter::getDocument + */ + public function testFormat() + { + // test log message + $msg = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('foo' => 7, 'bar', 'class' => new \stdClass), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + // expected values + $expected = $msg; + $expected['datetime'] = '1970-01-01T00:00:00.000000+00:00'; + $expected['context'] = array( + 'class' => '[object] (stdClass: {})', + 'foo' => 7, + 0 => 'bar', + ); + + // format log message + $formatter = new ElasticaFormatter('my_index', 'doc_type'); + $doc = $formatter->format($msg); + $this->assertInstanceOf('Elastica\Document', $doc); + + // Document parameters + $params = $doc->getParams(); + $this->assertEquals('my_index', $params['_index']); + $this->assertEquals('doc_type', $params['_type']); + + // Document data values + $data = $doc->getData(); + foreach (array_keys($expected) as $key) { + $this->assertEquals($expected[$key], $data[$key]); + } + } + + /** + * @covers Monolog\Formatter\ElasticaFormatter::getIndex + * @covers Monolog\Formatter\ElasticaFormatter::getType + */ + public function testGetters() + { + $formatter = new ElasticaFormatter('my_index', 'doc_type'); + $this->assertEquals('my_index', $formatter->getIndex()); + $this->assertEquals('doc_type', $formatter->getType()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php new file mode 100755 index 0000000..1b2fd97 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/FlowdockFormatterTest.php @@ -0,0 +1,55 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; +use Monolog\TestCase; + +class FlowdockFormatterTest extends TestCase +{ + /** + * @covers Monolog\Formatter\FlowdockFormatter::format + */ + public function testFormat() + { + $formatter = new FlowdockFormatter('test_source', 'source@test.com'); + $record = $this->getRecord(); + + $expected = array( + 'source' => 'test_source', + 'from_address' => 'source@test.com', + 'subject' => 'in test_source: WARNING - test', + 'content' => 'test', + 'tags' => array('#logs', '#warning', '#test'), + 'project' => 'test_source', + ); + $formatted = $formatter->format($record); + + $this->assertEquals($expected, $formatted['flowdock']); + } + + /** + * @ covers Monolog\Formatter\FlowdockFormatter::formatBatch + */ + public function testFormatBatch() + { + $formatter = new FlowdockFormatter('test_source', 'source@test.com'); + $records = array( + $this->getRecord(Logger::WARNING), + $this->getRecord(Logger::DEBUG), + ); + $formatted = $formatter->formatBatch($records); + + $this->assertArrayHasKey('flowdock', $formatted[0]); + $this->assertArrayHasKey('flowdock', $formatted[1]); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php new file mode 100755 index 0000000..fd36dbc --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/FluentdFormatterTest.php @@ -0,0 +1,62 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; +use Monolog\TestCase; + +class FluentdFormatterTest extends TestCase +{ + /** + * @covers Monolog\Formatter\FluentdFormatter::__construct + * @covers Monolog\Formatter\FluentdFormatter::isUsingLevelsInTag + */ + public function testConstruct() + { + $formatter = new FluentdFormatter(); + $this->assertEquals(false, $formatter->isUsingLevelsInTag()); + $formatter = new FluentdFormatter(false); + $this->assertEquals(false, $formatter->isUsingLevelsInTag()); + $formatter = new FluentdFormatter(true); + $this->assertEquals(true, $formatter->isUsingLevelsInTag()); + } + + /** + * @covers Monolog\Formatter\FluentdFormatter::format + */ + public function testFormat() + { + $record = $this->getRecord(Logger::WARNING); + $record['datetime'] = new \DateTime("@0"); + + $formatter = new FluentdFormatter(); + $this->assertEquals( + '["test",0,{"message":"test","context":[],"extra":[],"level":300,"level_name":"WARNING"}]', + $formatter->format($record) + ); + } + + /** + * @covers Monolog\Formatter\FluentdFormatter::format + */ + public function testFormatWithTag() + { + $record = $this->getRecord(Logger::ERROR); + $record['datetime'] = new \DateTime("@0"); + + $formatter = new FluentdFormatter(true); + $this->assertEquals( + '["test.error",0,{"message":"test","context":[],"extra":[]}]', + $formatter->format($record) + ); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php new file mode 100755 index 0000000..4a24761 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/GelfMessageFormatterTest.php @@ -0,0 +1,258 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +class GelfMessageFormatterTest extends \PHPUnit_Framework_TestCase +{ + public function setUp() + { + if (!class_exists('\Gelf\Message')) { + $this->markTestSkipped("graylog2/gelf-php or mlehner/gelf-php is not installed"); + } + } + + /** + * @covers Monolog\Formatter\GelfMessageFormatter::format + */ + public function testDefaultFormatter() + { + $formatter = new GelfMessageFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + $message = $formatter->format($record); + + $this->assertInstanceOf('Gelf\Message', $message); + $this->assertEquals(0, $message->getTimestamp()); + $this->assertEquals('log', $message->getShortMessage()); + $this->assertEquals('meh', $message->getFacility()); + $this->assertEquals(null, $message->getLine()); + $this->assertEquals(null, $message->getFile()); + $this->assertEquals($this->isLegacy() ? 3 : 'error', $message->getLevel()); + $this->assertNotEmpty($message->getHost()); + + $formatter = new GelfMessageFormatter('mysystem'); + + $message = $formatter->format($record); + + $this->assertInstanceOf('Gelf\Message', $message); + $this->assertEquals('mysystem', $message->getHost()); + } + + /** + * @covers Monolog\Formatter\GelfMessageFormatter::format + */ + public function testFormatWithFileAndLine() + { + $formatter = new GelfMessageFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('file' => 'test', 'line' => 14), + 'message' => 'log', + ); + + $message = $formatter->format($record); + + $this->assertInstanceOf('Gelf\Message', $message); + $this->assertEquals('test', $message->getFile()); + $this->assertEquals(14, $message->getLine()); + } + + /** + * @covers Monolog\Formatter\GelfMessageFormatter::format + * @expectedException InvalidArgumentException + */ + public function testFormatInvalidFails() + { + $formatter = new GelfMessageFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + ); + + $formatter->format($record); + } + + /** + * @covers Monolog\Formatter\GelfMessageFormatter::format + */ + public function testFormatWithContext() + { + $formatter = new GelfMessageFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => 'pair'), + 'message' => 'log', + ); + + $message = $formatter->format($record); + + $this->assertInstanceOf('Gelf\Message', $message); + + $message_array = $message->toArray(); + + $this->assertArrayHasKey('_ctxt_from', $message_array); + $this->assertEquals('logger', $message_array['_ctxt_from']); + + // Test with extraPrefix + $formatter = new GelfMessageFormatter(null, null, 'CTX'); + $message = $formatter->format($record); + + $this->assertInstanceOf('Gelf\Message', $message); + + $message_array = $message->toArray(); + + $this->assertArrayHasKey('_CTXfrom', $message_array); + $this->assertEquals('logger', $message_array['_CTXfrom']); + } + + /** + * @covers Monolog\Formatter\GelfMessageFormatter::format + */ + public function testFormatWithContextContainingException() + { + $formatter = new GelfMessageFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger', 'exception' => array( + 'class' => '\Exception', + 'file' => '/some/file/in/dir.php:56', + 'trace' => array('/some/file/1.php:23', '/some/file/2.php:3'), + )), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + $message = $formatter->format($record); + + $this->assertInstanceOf('Gelf\Message', $message); + + $this->assertEquals("/some/file/in/dir.php", $message->getFile()); + $this->assertEquals("56", $message->getLine()); + } + + /** + * @covers Monolog\Formatter\GelfMessageFormatter::format + */ + public function testFormatWithExtra() + { + $formatter = new GelfMessageFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => 'pair'), + 'message' => 'log', + ); + + $message = $formatter->format($record); + + $this->assertInstanceOf('Gelf\Message', $message); + + $message_array = $message->toArray(); + + $this->assertArrayHasKey('_key', $message_array); + $this->assertEquals('pair', $message_array['_key']); + + // Test with extraPrefix + $formatter = new GelfMessageFormatter(null, 'EXT'); + $message = $formatter->format($record); + + $this->assertInstanceOf('Gelf\Message', $message); + + $message_array = $message->toArray(); + + $this->assertArrayHasKey('_EXTkey', $message_array); + $this->assertEquals('pair', $message_array['_EXTkey']); + } + + public function testFormatWithLargeData() + { + $formatter = new GelfMessageFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('exception' => str_repeat(' ', 32767)), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => str_repeat(' ', 32767)), + 'message' => 'log' + ); + $message = $formatter->format($record); + $messageArray = $message->toArray(); + + // 200 for padding + metadata + $length = 200; + + foreach ($messageArray as $key => $value) { + if (!in_array($key, array('level', 'timestamp'))) { + $length += strlen($value); + } + } + + $this->assertLessThanOrEqual(65792, $length, 'The message length is no longer than the maximum allowed length'); + } + + public function testFormatWithUnlimitedLength() + { + $formatter = new GelfMessageFormatter('LONG_SYSTEM_NAME', null, 'ctxt_', PHP_INT_MAX); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('exception' => str_repeat(' ', 32767 * 2)), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => str_repeat(' ', 32767 * 2)), + 'message' => 'log' + ); + $message = $formatter->format($record); + $messageArray = $message->toArray(); + + // 200 for padding + metadata + $length = 200; + + foreach ($messageArray as $key => $value) { + if (!in_array($key, array('level', 'timestamp'))) { + $length += strlen($value); + } + } + + $this->assertGreaterThanOrEqual(131289, $length, 'The message should not be truncated'); + } + + private function isLegacy() + { + return interface_exists('\Gelf\IMessagePublisher'); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php new file mode 100755 index 0000000..24b06cc --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php @@ -0,0 +1,219 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; +use Monolog\TestCase; + +class JsonFormatterTest extends TestCase +{ + /** + * @covers Monolog\Formatter\JsonFormatter::__construct + * @covers Monolog\Formatter\JsonFormatter::getBatchMode + * @covers Monolog\Formatter\JsonFormatter::isAppendingNewlines + */ + public function testConstruct() + { + $formatter = new JsonFormatter(); + $this->assertEquals(JsonFormatter::BATCH_MODE_JSON, $formatter->getBatchMode()); + $this->assertEquals(true, $formatter->isAppendingNewlines()); + $formatter = new JsonFormatter(JsonFormatter::BATCH_MODE_NEWLINES, false); + $this->assertEquals(JsonFormatter::BATCH_MODE_NEWLINES, $formatter->getBatchMode()); + $this->assertEquals(false, $formatter->isAppendingNewlines()); + } + + /** + * @covers Monolog\Formatter\JsonFormatter::format + */ + public function testFormat() + { + $formatter = new JsonFormatter(); + $record = $this->getRecord(); + $this->assertEquals(json_encode($record)."\n", $formatter->format($record)); + + $formatter = new JsonFormatter(JsonFormatter::BATCH_MODE_JSON, false); + $record = $this->getRecord(); + $this->assertEquals(json_encode($record), $formatter->format($record)); + } + + /** + * @covers Monolog\Formatter\JsonFormatter::formatBatch + * @covers Monolog\Formatter\JsonFormatter::formatBatchJson + */ + public function testFormatBatch() + { + $formatter = new JsonFormatter(); + $records = array( + $this->getRecord(Logger::WARNING), + $this->getRecord(Logger::DEBUG), + ); + $this->assertEquals(json_encode($records), $formatter->formatBatch($records)); + } + + /** + * @covers Monolog\Formatter\JsonFormatter::formatBatch + * @covers Monolog\Formatter\JsonFormatter::formatBatchNewlines + */ + public function testFormatBatchNewlines() + { + $formatter = new JsonFormatter(JsonFormatter::BATCH_MODE_NEWLINES); + $records = $expected = array( + $this->getRecord(Logger::WARNING), + $this->getRecord(Logger::DEBUG), + ); + array_walk($expected, function (&$value, $key) { + $value = json_encode($value); + }); + $this->assertEquals(implode("\n", $expected), $formatter->formatBatch($records)); + } + + public function testDefFormatWithException() + { + $formatter = new JsonFormatter(); + $exception = new \RuntimeException('Foo'); + $formattedException = $this->formatException($exception); + + $message = $this->formatRecordWithExceptionInContext($formatter, $exception); + + $this->assertContextContainsFormattedException($formattedException, $message); + } + + public function testDefFormatWithPreviousException() + { + $formatter = new JsonFormatter(); + $exception = new \RuntimeException('Foo', 0, new \LogicException('Wut?')); + $formattedPrevException = $this->formatException($exception->getPrevious()); + $formattedException = $this->formatException($exception, $formattedPrevException); + + $message = $this->formatRecordWithExceptionInContext($formatter, $exception); + + $this->assertContextContainsFormattedException($formattedException, $message); + } + + public function testDefFormatWithThrowable() + { + if (!class_exists('Error') || !is_subclass_of('Error', 'Throwable')) { + $this->markTestSkipped('Requires PHP >=7'); + } + + $formatter = new JsonFormatter(); + $throwable = new \Error('Foo'); + $formattedThrowable = $this->formatException($throwable); + + $message = $this->formatRecordWithExceptionInContext($formatter, $throwable); + + $this->assertContextContainsFormattedException($formattedThrowable, $message); + } + + /** + * @param string $expected + * @param string $actual + * + * @internal param string $exception + */ + private function assertContextContainsFormattedException($expected, $actual) + { + $this->assertEquals( + '{"level_name":"CRITICAL","channel":"core","context":{"exception":'.$expected.'},"datetime":null,"extra":[],"message":"foobar"}'."\n", + $actual + ); + } + + /** + * @param JsonFormatter $formatter + * @param \Exception|\Throwable $exception + * + * @return string + */ + private function formatRecordWithExceptionInContext(JsonFormatter $formatter, $exception) + { + $message = $formatter->format(array( + 'level_name' => 'CRITICAL', + 'channel' => 'core', + 'context' => array('exception' => $exception), + 'datetime' => null, + 'extra' => array(), + 'message' => 'foobar', + )); + return $message; + } + + /** + * @param \Exception|\Throwable $exception + * + * @return string + */ + private function formatExceptionFilePathWithLine($exception) + { + $options = 0; + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + $options = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; + } + $path = substr(json_encode($exception->getFile(), $options), 1, -1); + return $path . ':' . $exception->getLine(); + } + + /** + * @param \Exception|\Throwable $exception + * + * @param null|string $previous + * + * @return string + */ + private function formatException($exception, $previous = null) + { + $formattedException = + '{"class":"' . get_class($exception) . + '","message":"' . $exception->getMessage() . + '","code":' . $exception->getCode() . + ',"file":"' . $this->formatExceptionFilePathWithLine($exception) . + ($previous ? '","previous":' . $previous : '"') . + '}'; + return $formattedException; + } + + public function testNormalizeHandleLargeArraysWithExactly1000Items() + { + $formatter = new NormalizerFormatter(); + $largeArray = range(1, 1000); + + $res = $formatter->format(array( + 'level_name' => 'CRITICAL', + 'channel' => 'test', + 'message' => 'bar', + 'context' => array($largeArray), + 'datetime' => new \DateTime, + 'extra' => array(), + )); + + $this->assertCount(1000, $res['context'][0]); + $this->assertArrayNotHasKey('...', $res['context'][0]); + } + + public function testNormalizeHandleLargeArrays() + { + $formatter = new NormalizerFormatter(); + $largeArray = range(1, 2000); + + $res = $formatter->format(array( + 'level_name' => 'CRITICAL', + 'channel' => 'test', + 'message' => 'bar', + 'context' => array($largeArray), + 'datetime' => new \DateTime, + 'extra' => array(), + )); + + $this->assertCount(1001, $res['context'][0]); + $this->assertEquals('Over 1000 items (2000 total), aborting normalization', $res['context'][0]['...']); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php new file mode 100755 index 0000000..310d93c --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/LineFormatterTest.php @@ -0,0 +1,222 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * @covers Monolog\Formatter\LineFormatter + */ +class LineFormatterTest extends \PHPUnit_Framework_TestCase +{ + public function testDefFormatWithString() + { + $formatter = new LineFormatter(null, 'Y-m-d'); + $message = $formatter->format(array( + 'level_name' => 'WARNING', + 'channel' => 'log', + 'context' => array(), + 'message' => 'foo', + 'datetime' => new \DateTime, + 'extra' => array(), + )); + $this->assertEquals('['.date('Y-m-d').'] log.WARNING: foo [] []'."\n", $message); + } + + public function testDefFormatWithArrayContext() + { + $formatter = new LineFormatter(null, 'Y-m-d'); + $message = $formatter->format(array( + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'message' => 'foo', + 'datetime' => new \DateTime, + 'extra' => array(), + 'context' => array( + 'foo' => 'bar', + 'baz' => 'qux', + 'bool' => false, + 'null' => null, + ), + )); + $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: foo {"foo":"bar","baz":"qux","bool":false,"null":null} []'."\n", $message); + } + + public function testDefFormatExtras() + { + $formatter = new LineFormatter(null, 'Y-m-d'); + $message = $formatter->format(array( + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime, + 'extra' => array('ip' => '127.0.0.1'), + 'message' => 'log', + )); + $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: log [] {"ip":"127.0.0.1"}'."\n", $message); + } + + public function testFormatExtras() + { + $formatter = new LineFormatter("[%datetime%] %channel%.%level_name%: %message% %context% %extra.file% %extra%\n", 'Y-m-d'); + $message = $formatter->format(array( + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime, + 'extra' => array('ip' => '127.0.0.1', 'file' => 'test'), + 'message' => 'log', + )); + $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: log [] test {"ip":"127.0.0.1"}'."\n", $message); + } + + public function testContextAndExtraOptionallyNotShownIfEmpty() + { + $formatter = new LineFormatter(null, 'Y-m-d', false, true); + $message = $formatter->format(array( + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime, + 'extra' => array(), + 'message' => 'log', + )); + $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: log '."\n", $message); + } + + public function testContextAndExtraReplacement() + { + $formatter = new LineFormatter('%context.foo% => %extra.foo%'); + $message = $formatter->format(array( + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('foo' => 'bar'), + 'datetime' => new \DateTime, + 'extra' => array('foo' => 'xbar'), + 'message' => 'log', + )); + $this->assertEquals('bar => xbar', $message); + } + + public function testDefFormatWithObject() + { + $formatter = new LineFormatter(null, 'Y-m-d'); + $message = $formatter->format(array( + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime, + 'extra' => array('foo' => new TestFoo, 'bar' => new TestBar, 'baz' => array(), 'res' => fopen('php://memory', 'rb')), + 'message' => 'foobar', + )); + + $this->assertEquals('['.date('Y-m-d').'] meh.ERROR: foobar [] {"foo":"[object] (Monolog\\\\Formatter\\\\TestFoo: {\\"foo\\":\\"foo\\"})","bar":"[object] (Monolog\\\\Formatter\\\\TestBar: bar)","baz":[],"res":"[resource] (stream)"}'."\n", $message); + } + + public function testDefFormatWithException() + { + $formatter = new LineFormatter(null, 'Y-m-d'); + $message = $formatter->format(array( + 'level_name' => 'CRITICAL', + 'channel' => 'core', + 'context' => array('exception' => new \RuntimeException('Foo')), + 'datetime' => new \DateTime, + 'extra' => array(), + 'message' => 'foobar', + )); + + $path = str_replace('\\/', '/', json_encode(__FILE__)); + + $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code: 0): Foo at '.substr($path, 1, -1).':'.(__LINE__ - 8).')"} []'."\n", $message); + } + + public function testDefFormatWithPreviousException() + { + $formatter = new LineFormatter(null, 'Y-m-d'); + $previous = new \LogicException('Wut?'); + $message = $formatter->format(array( + 'level_name' => 'CRITICAL', + 'channel' => 'core', + 'context' => array('exception' => new \RuntimeException('Foo', 0, $previous)), + 'datetime' => new \DateTime, + 'extra' => array(), + 'message' => 'foobar', + )); + + $path = str_replace('\\/', '/', json_encode(__FILE__)); + + $this->assertEquals('['.date('Y-m-d').'] core.CRITICAL: foobar {"exception":"[object] (RuntimeException(code: 0): Foo at '.substr($path, 1, -1).':'.(__LINE__ - 8).', LogicException(code: 0): Wut? at '.substr($path, 1, -1).':'.(__LINE__ - 12).')"} []'."\n", $message); + } + + public function testBatchFormat() + { + $formatter = new LineFormatter(null, 'Y-m-d'); + $message = $formatter->formatBatch(array( + array( + 'level_name' => 'CRITICAL', + 'channel' => 'test', + 'message' => 'bar', + 'context' => array(), + 'datetime' => new \DateTime, + 'extra' => array(), + ), + array( + 'level_name' => 'WARNING', + 'channel' => 'log', + 'message' => 'foo', + 'context' => array(), + 'datetime' => new \DateTime, + 'extra' => array(), + ), + )); + $this->assertEquals('['.date('Y-m-d').'] test.CRITICAL: bar [] []'."\n".'['.date('Y-m-d').'] log.WARNING: foo [] []'."\n", $message); + } + + public function testFormatShouldStripInlineLineBreaks() + { + $formatter = new LineFormatter(null, 'Y-m-d'); + $message = $formatter->format( + array( + 'message' => "foo\nbar", + 'context' => array(), + 'extra' => array(), + ) + ); + + $this->assertRegExp('/foo bar/', $message); + } + + public function testFormatShouldNotStripInlineLineBreaksWhenFlagIsSet() + { + $formatter = new LineFormatter(null, 'Y-m-d', true); + $message = $formatter->format( + array( + 'message' => "foo\nbar", + 'context' => array(), + 'extra' => array(), + ) + ); + + $this->assertRegExp('/foo\nbar/', $message); + } +} + +class TestFoo +{ + public $foo = 'foo'; +} + +class TestBar +{ + public function __toString() + { + return 'bar'; + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php new file mode 100755 index 0000000..6d59b3f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/LogglyFormatterTest.php @@ -0,0 +1,40 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\TestCase; + +class LogglyFormatterTest extends TestCase +{ + /** + * @covers Monolog\Formatter\LogglyFormatter::__construct + */ + public function testConstruct() + { + $formatter = new LogglyFormatter(); + $this->assertEquals(LogglyFormatter::BATCH_MODE_NEWLINES, $formatter->getBatchMode()); + $formatter = new LogglyFormatter(LogglyFormatter::BATCH_MODE_JSON); + $this->assertEquals(LogglyFormatter::BATCH_MODE_JSON, $formatter->getBatchMode()); + } + + /** + * @covers Monolog\Formatter\LogglyFormatter::format + */ + public function testFormat() + { + $formatter = new LogglyFormatter(); + $record = $this->getRecord(); + $formatted_decoded = json_decode($formatter->format($record), true); + $this->assertArrayHasKey("timestamp", $formatted_decoded); + $this->assertEquals(new \DateTime($formatted_decoded["timestamp"]), $record["datetime"]); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php new file mode 100755 index 0000000..9f6b1cc --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/LogstashFormatterTest.php @@ -0,0 +1,333 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +class LogstashFormatterTest extends \PHPUnit_Framework_TestCase +{ + public function tearDown() + { + \PHPUnit_Framework_Error_Warning::$enabled = true; + + return parent::tearDown(); + } + + /** + * @covers Monolog\Formatter\LogstashFormatter::format + */ + public function testDefaultFormatter() + { + $formatter = new LogstashFormatter('test', 'hostname'); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $this->assertEquals("1970-01-01T00:00:00.000000+00:00", $message['@timestamp']); + $this->assertEquals('log', $message['@message']); + $this->assertEquals('meh', $message['@fields']['channel']); + $this->assertContains('meh', $message['@tags']); + $this->assertEquals(Logger::ERROR, $message['@fields']['level']); + $this->assertEquals('test', $message['@type']); + $this->assertEquals('hostname', $message['@source']); + + $formatter = new LogstashFormatter('mysystem'); + + $message = json_decode($formatter->format($record), true); + + $this->assertEquals('mysystem', $message['@type']); + } + + /** + * @covers Monolog\Formatter\LogstashFormatter::format + */ + public function testFormatWithFileAndLine() + { + $formatter = new LogstashFormatter('test'); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('file' => 'test', 'line' => 14), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $this->assertEquals('test', $message['@fields']['file']); + $this->assertEquals(14, $message['@fields']['line']); + } + + /** + * @covers Monolog\Formatter\LogstashFormatter::format + */ + public function testFormatWithContext() + { + $formatter = new LogstashFormatter('test'); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => 'pair'), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $message_array = $message['@fields']; + + $this->assertArrayHasKey('ctxt_from', $message_array); + $this->assertEquals('logger', $message_array['ctxt_from']); + + // Test with extraPrefix + $formatter = new LogstashFormatter('test', null, null, 'CTX'); + $message = json_decode($formatter->format($record), true); + + $message_array = $message['@fields']; + + $this->assertArrayHasKey('CTXfrom', $message_array); + $this->assertEquals('logger', $message_array['CTXfrom']); + } + + /** + * @covers Monolog\Formatter\LogstashFormatter::format + */ + public function testFormatWithExtra() + { + $formatter = new LogstashFormatter('test'); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => 'pair'), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $message_array = $message['@fields']; + + $this->assertArrayHasKey('key', $message_array); + $this->assertEquals('pair', $message_array['key']); + + // Test with extraPrefix + $formatter = new LogstashFormatter('test', null, 'EXT'); + $message = json_decode($formatter->format($record), true); + + $message_array = $message['@fields']; + + $this->assertArrayHasKey('EXTkey', $message_array); + $this->assertEquals('pair', $message_array['EXTkey']); + } + + public function testFormatWithApplicationName() + { + $formatter = new LogstashFormatter('app', 'test'); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => 'pair'), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $this->assertArrayHasKey('@type', $message); + $this->assertEquals('app', $message['@type']); + } + + /** + * @covers Monolog\Formatter\LogstashFormatter::format + */ + public function testDefaultFormatterV1() + { + $formatter = new LogstashFormatter('test', 'hostname', null, 'ctxt_', LogstashFormatter::V1); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $this->assertEquals("1970-01-01T00:00:00.000000+00:00", $message['@timestamp']); + $this->assertEquals("1", $message['@version']); + $this->assertEquals('log', $message['message']); + $this->assertEquals('meh', $message['channel']); + $this->assertEquals('ERROR', $message['level']); + $this->assertEquals('test', $message['type']); + $this->assertEquals('hostname', $message['host']); + + $formatter = new LogstashFormatter('mysystem', null, null, 'ctxt_', LogstashFormatter::V1); + + $message = json_decode($formatter->format($record), true); + + $this->assertEquals('mysystem', $message['type']); + } + + /** + * @covers Monolog\Formatter\LogstashFormatter::format + */ + public function testFormatWithFileAndLineV1() + { + $formatter = new LogstashFormatter('test', null, null, 'ctxt_', LogstashFormatter::V1); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('file' => 'test', 'line' => 14), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $this->assertEquals('test', $message['file']); + $this->assertEquals(14, $message['line']); + } + + /** + * @covers Monolog\Formatter\LogstashFormatter::format + */ + public function testFormatWithContextV1() + { + $formatter = new LogstashFormatter('test', null, null, 'ctxt_', LogstashFormatter::V1); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => 'pair'), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $this->assertArrayHasKey('ctxt_from', $message); + $this->assertEquals('logger', $message['ctxt_from']); + + // Test with extraPrefix + $formatter = new LogstashFormatter('test', null, null, 'CTX', LogstashFormatter::V1); + $message = json_decode($formatter->format($record), true); + + $this->assertArrayHasKey('CTXfrom', $message); + $this->assertEquals('logger', $message['CTXfrom']); + } + + /** + * @covers Monolog\Formatter\LogstashFormatter::format + */ + public function testFormatWithExtraV1() + { + $formatter = new LogstashFormatter('test', null, null, 'ctxt_', LogstashFormatter::V1); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => 'pair'), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $this->assertArrayHasKey('key', $message); + $this->assertEquals('pair', $message['key']); + + // Test with extraPrefix + $formatter = new LogstashFormatter('test', null, 'EXT', 'ctxt_', LogstashFormatter::V1); + $message = json_decode($formatter->format($record), true); + + $this->assertArrayHasKey('EXTkey', $message); + $this->assertEquals('pair', $message['EXTkey']); + } + + public function testFormatWithApplicationNameV1() + { + $formatter = new LogstashFormatter('app', 'test', null, 'ctxt_', LogstashFormatter::V1); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('key' => 'pair'), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $this->assertArrayHasKey('type', $message); + $this->assertEquals('app', $message['type']); + } + + public function testFormatWithLatin9Data() + { + if (version_compare(PHP_VERSION, '5.5.0', '<')) { + // Ignore the warning that will be emitted by PHP <5.5.0 + \PHPUnit_Framework_Error_Warning::$enabled = false; + } + $formatter = new LogstashFormatter('test', 'hostname'); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => '¯\_(ツ)_/¯', + 'context' => array(), + 'datetime' => new \DateTime("@0"), + 'extra' => array( + 'user_agent' => "\xD6WN; FBCR/OrangeEspa\xF1a; Vers\xE3o/4.0; F\xE4rist", + ), + 'message' => 'log', + ); + + $message = json_decode($formatter->format($record), true); + + $this->assertEquals("1970-01-01T00:00:00.000000+00:00", $message['@timestamp']); + $this->assertEquals('log', $message['@message']); + $this->assertEquals('¯\_(ツ)_/¯', $message['@fields']['channel']); + $this->assertContains('¯\_(ツ)_/¯', $message['@tags']); + $this->assertEquals(Logger::ERROR, $message['@fields']['level']); + $this->assertEquals('test', $message['@type']); + $this->assertEquals('hostname', $message['@source']); + if (version_compare(PHP_VERSION, '5.5.0', '>=')) { + $this->assertEquals('ÖWN; FBCR/OrangeEspaña; Versão/4.0; Färist', $message['@fields']['user_agent']); + } else { + // PHP <5.5 does not return false for an element encoding failure, + // instead it emits a warning (possibly) and nulls the value. + $this->assertEquals(null, $message['@fields']['user_agent']); + } + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php new file mode 100755 index 0000000..52e699e --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/MongoDBFormatterTest.php @@ -0,0 +1,262 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +/** + * @author Florian Plattner + */ +class MongoDBFormatterTest extends \PHPUnit_Framework_TestCase +{ + public function setUp() + { + if (!class_exists('MongoDate')) { + $this->markTestSkipped('mongo extension not installed'); + } + } + + public function constructArgumentProvider() + { + return array( + array(1, true, 1, true), + array(0, false, 0, false), + ); + } + + /** + * @param $traceDepth + * @param $traceAsString + * @param $expectedTraceDepth + * @param $expectedTraceAsString + * + * @dataProvider constructArgumentProvider + */ + public function testConstruct($traceDepth, $traceAsString, $expectedTraceDepth, $expectedTraceAsString) + { + $formatter = new MongoDBFormatter($traceDepth, $traceAsString); + + $reflTrace = new \ReflectionProperty($formatter, 'exceptionTraceAsString'); + $reflTrace->setAccessible(true); + $this->assertEquals($expectedTraceAsString, $reflTrace->getValue($formatter)); + + $reflDepth = new\ReflectionProperty($formatter, 'maxNestingLevel'); + $reflDepth->setAccessible(true); + $this->assertEquals($expectedTraceDepth, $reflDepth->getValue($formatter)); + } + + public function testSimpleFormat() + { + $record = array( + 'message' => 'some log message', + 'context' => array(), + 'level' => Logger::WARNING, + 'level_name' => Logger::getLevelName(Logger::WARNING), + 'channel' => 'test', + 'datetime' => new \DateTime('2014-02-01 00:00:00'), + 'extra' => array(), + ); + + $formatter = new MongoDBFormatter(); + $formattedRecord = $formatter->format($record); + + $this->assertCount(7, $formattedRecord); + $this->assertEquals('some log message', $formattedRecord['message']); + $this->assertEquals(array(), $formattedRecord['context']); + $this->assertEquals(Logger::WARNING, $formattedRecord['level']); + $this->assertEquals(Logger::getLevelName(Logger::WARNING), $formattedRecord['level_name']); + $this->assertEquals('test', $formattedRecord['channel']); + $this->assertInstanceOf('\MongoDate', $formattedRecord['datetime']); + $this->assertEquals('0.00000000 1391212800', $formattedRecord['datetime']->__toString()); + $this->assertEquals(array(), $formattedRecord['extra']); + } + + public function testRecursiveFormat() + { + $someObject = new \stdClass(); + $someObject->foo = 'something'; + $someObject->bar = 'stuff'; + + $record = array( + 'message' => 'some log message', + 'context' => array( + 'stuff' => new \DateTime('2014-02-01 02:31:33'), + 'some_object' => $someObject, + 'context_string' => 'some string', + 'context_int' => 123456, + 'except' => new \Exception('exception message', 987), + ), + 'level' => Logger::WARNING, + 'level_name' => Logger::getLevelName(Logger::WARNING), + 'channel' => 'test', + 'datetime' => new \DateTime('2014-02-01 00:00:00'), + 'extra' => array(), + ); + + $formatter = new MongoDBFormatter(); + $formattedRecord = $formatter->format($record); + + $this->assertCount(5, $formattedRecord['context']); + $this->assertInstanceOf('\MongoDate', $formattedRecord['context']['stuff']); + $this->assertEquals('0.00000000 1391221893', $formattedRecord['context']['stuff']->__toString()); + $this->assertEquals( + array( + 'foo' => 'something', + 'bar' => 'stuff', + 'class' => 'stdClass', + ), + $formattedRecord['context']['some_object'] + ); + $this->assertEquals('some string', $formattedRecord['context']['context_string']); + $this->assertEquals(123456, $formattedRecord['context']['context_int']); + + $this->assertCount(5, $formattedRecord['context']['except']); + $this->assertEquals('exception message', $formattedRecord['context']['except']['message']); + $this->assertEquals(987, $formattedRecord['context']['except']['code']); + $this->assertInternalType('string', $formattedRecord['context']['except']['file']); + $this->assertInternalType('integer', $formattedRecord['context']['except']['code']); + $this->assertInternalType('string', $formattedRecord['context']['except']['trace']); + $this->assertEquals('Exception', $formattedRecord['context']['except']['class']); + } + + public function testFormatDepthArray() + { + $record = array( + 'message' => 'some log message', + 'context' => array( + 'nest2' => array( + 'property' => 'anything', + 'nest3' => array( + 'nest4' => 'value', + 'property' => 'nothing', + ), + ), + ), + 'level' => Logger::WARNING, + 'level_name' => Logger::getLevelName(Logger::WARNING), + 'channel' => 'test', + 'datetime' => new \DateTime('2014-02-01 00:00:00'), + 'extra' => array(), + ); + + $formatter = new MongoDBFormatter(2); + $formattedResult = $formatter->format($record); + + $this->assertEquals( + array( + 'nest2' => array( + 'property' => 'anything', + 'nest3' => '[...]', + ), + ), + $formattedResult['context'] + ); + } + + public function testFormatDepthArrayInfiniteNesting() + { + $record = array( + 'message' => 'some log message', + 'context' => array( + 'nest2' => array( + 'property' => 'something', + 'nest3' => array( + 'property' => 'anything', + 'nest4' => array( + 'property' => 'nothing', + ), + ), + ), + ), + 'level' => Logger::WARNING, + 'level_name' => Logger::getLevelName(Logger::WARNING), + 'channel' => 'test', + 'datetime' => new \DateTime('2014-02-01 00:00:00'), + 'extra' => array(), + ); + + $formatter = new MongoDBFormatter(0); + $formattedResult = $formatter->format($record); + + $this->assertEquals( + array( + 'nest2' => array( + 'property' => 'something', + 'nest3' => array( + 'property' => 'anything', + 'nest4' => array( + 'property' => 'nothing', + ), + ), + ), + ), + $formattedResult['context'] + ); + } + + public function testFormatDepthObjects() + { + $someObject = new \stdClass(); + $someObject->property = 'anything'; + $someObject->nest3 = new \stdClass(); + $someObject->nest3->property = 'nothing'; + $someObject->nest3->nest4 = 'invisible'; + + $record = array( + 'message' => 'some log message', + 'context' => array( + 'nest2' => $someObject, + ), + 'level' => Logger::WARNING, + 'level_name' => Logger::getLevelName(Logger::WARNING), + 'channel' => 'test', + 'datetime' => new \DateTime('2014-02-01 00:00:00'), + 'extra' => array(), + ); + + $formatter = new MongoDBFormatter(2, true); + $formattedResult = $formatter->format($record); + + $this->assertEquals( + array( + 'nest2' => array( + 'property' => 'anything', + 'nest3' => '[...]', + 'class' => 'stdClass', + ), + ), + $formattedResult['context'] + ); + } + + public function testFormatDepthException() + { + $record = array( + 'message' => 'some log message', + 'context' => array( + 'nest2' => new \Exception('exception message', 987), + ), + 'level' => Logger::WARNING, + 'level_name' => Logger::getLevelName(Logger::WARNING), + 'channel' => 'test', + 'datetime' => new \DateTime('2014-02-01 00:00:00'), + 'extra' => array(), + ); + + $formatter = new MongoDBFormatter(2, false); + $formattedRecord = $formatter->format($record); + + $this->assertEquals('exception message', $formattedRecord['context']['nest2']['message']); + $this->assertEquals(987, $formattedRecord['context']['nest2']['code']); + $this->assertEquals('[...]', $formattedRecord['context']['nest2']['trace']); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php new file mode 100755 index 0000000..bafd1c7 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php @@ -0,0 +1,481 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +/** + * @covers Monolog\Formatter\NormalizerFormatter + */ +class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase +{ + public function tearDown() + { + \PHPUnit_Framework_Error_Warning::$enabled = true; + + return parent::tearDown(); + } + + public function testFormat() + { + $formatter = new NormalizerFormatter('Y-m-d'); + $formatted = $formatter->format(array( + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'message' => 'foo', + 'datetime' => new \DateTime, + 'extra' => array('foo' => new TestFooNorm, 'bar' => new TestBarNorm, 'baz' => array(), 'res' => fopen('php://memory', 'rb')), + 'context' => array( + 'foo' => 'bar', + 'baz' => 'qux', + 'inf' => INF, + '-inf' => -INF, + 'nan' => acos(4), + ), + )); + + $this->assertEquals(array( + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'message' => 'foo', + 'datetime' => date('Y-m-d'), + 'extra' => array( + 'foo' => '[object] (Monolog\\Formatter\\TestFooNorm: {"foo":"foo"})', + 'bar' => '[object] (Monolog\\Formatter\\TestBarNorm: bar)', + 'baz' => array(), + 'res' => '[resource] (stream)', + ), + 'context' => array( + 'foo' => 'bar', + 'baz' => 'qux', + 'inf' => 'INF', + '-inf' => '-INF', + 'nan' => 'NaN', + ), + ), $formatted); + } + + public function testFormatExceptions() + { + $formatter = new NormalizerFormatter('Y-m-d'); + $e = new \LogicException('bar'); + $e2 = new \RuntimeException('foo', 0, $e); + $formatted = $formatter->format(array( + 'exception' => $e2, + )); + + $this->assertGreaterThan(5, count($formatted['exception']['trace'])); + $this->assertTrue(isset($formatted['exception']['previous'])); + unset($formatted['exception']['trace'], $formatted['exception']['previous']); + + $this->assertEquals(array( + 'exception' => array( + 'class' => get_class($e2), + 'message' => $e2->getMessage(), + 'code' => $e2->getCode(), + 'file' => $e2->getFile().':'.$e2->getLine(), + ), + ), $formatted); + } + + public function testFormatSoapFaultException() + { + if (!class_exists('SoapFault')) { + $this->markTestSkipped('Requires the soap extension'); + } + + $formatter = new NormalizerFormatter('Y-m-d'); + $e = new \SoapFault('foo', 'bar', 'hello', 'world'); + $formatted = $formatter->format(array( + 'exception' => $e, + )); + + unset($formatted['exception']['trace']); + + $this->assertEquals(array( + 'exception' => array( + 'class' => 'SoapFault', + 'message' => 'bar', + 'code' => 0, + 'file' => $e->getFile().':'.$e->getLine(), + 'faultcode' => 'foo', + 'faultactor' => 'hello', + 'detail' => 'world', + ), + ), $formatted); + } + + public function testFormatToStringExceptionHandle() + { + $formatter = new NormalizerFormatter('Y-m-d'); + $this->setExpectedException('RuntimeException', 'Could not convert to string'); + $formatter->format(array( + 'myObject' => new TestToStringError(), + )); + } + + public function testBatchFormat() + { + $formatter = new NormalizerFormatter('Y-m-d'); + $formatted = $formatter->formatBatch(array( + array( + 'level_name' => 'CRITICAL', + 'channel' => 'test', + 'message' => 'bar', + 'context' => array(), + 'datetime' => new \DateTime, + 'extra' => array(), + ), + array( + 'level_name' => 'WARNING', + 'channel' => 'log', + 'message' => 'foo', + 'context' => array(), + 'datetime' => new \DateTime, + 'extra' => array(), + ), + )); + $this->assertEquals(array( + array( + 'level_name' => 'CRITICAL', + 'channel' => 'test', + 'message' => 'bar', + 'context' => array(), + 'datetime' => date('Y-m-d'), + 'extra' => array(), + ), + array( + 'level_name' => 'WARNING', + 'channel' => 'log', + 'message' => 'foo', + 'context' => array(), + 'datetime' => date('Y-m-d'), + 'extra' => array(), + ), + ), $formatted); + } + + /** + * Test issue #137 + */ + public function testIgnoresRecursiveObjectReferences() + { + // set up the recursion + $foo = new \stdClass(); + $bar = new \stdClass(); + + $foo->bar = $bar; + $bar->foo = $foo; + + // set an error handler to assert that the error is not raised anymore + $that = $this; + set_error_handler(function ($level, $message, $file, $line, $context) use ($that) { + if (error_reporting() & $level) { + restore_error_handler(); + $that->fail("$message should not be raised"); + } + }); + + $formatter = new NormalizerFormatter(); + $reflMethod = new \ReflectionMethod($formatter, 'toJson'); + $reflMethod->setAccessible(true); + $res = $reflMethod->invoke($formatter, array($foo, $bar), true); + + restore_error_handler(); + + $this->assertEquals(@json_encode(array($foo, $bar)), $res); + } + + public function testCanNormalizeReferences() + { + $formatter = new NormalizerFormatter(); + $x = array('foo' => 'bar'); + $y = array('x' => &$x); + $x['y'] = &$y; + $formatter->format($y); + } + + public function testIgnoresInvalidTypes() + { + // set up the recursion + $resource = fopen(__FILE__, 'r'); + + // set an error handler to assert that the error is not raised anymore + $that = $this; + set_error_handler(function ($level, $message, $file, $line, $context) use ($that) { + if (error_reporting() & $level) { + restore_error_handler(); + $that->fail("$message should not be raised"); + } + }); + + $formatter = new NormalizerFormatter(); + $reflMethod = new \ReflectionMethod($formatter, 'toJson'); + $reflMethod->setAccessible(true); + $res = $reflMethod->invoke($formatter, array($resource), true); + + restore_error_handler(); + + $this->assertEquals(@json_encode(array($resource)), $res); + } + + public function testNormalizeHandleLargeArraysWithExactly1000Items() + { + $formatter = new NormalizerFormatter(); + $largeArray = range(1, 1000); + + $res = $formatter->format(array( + 'level_name' => 'CRITICAL', + 'channel' => 'test', + 'message' => 'bar', + 'context' => array($largeArray), + 'datetime' => new \DateTime, + 'extra' => array(), + )); + + $this->assertCount(1000, $res['context'][0]); + $this->assertArrayNotHasKey('...', $res['context'][0]); + } + + public function testNormalizeHandleLargeArrays() + { + $formatter = new NormalizerFormatter(); + $largeArray = range(1, 2000); + + $res = $formatter->format(array( + 'level_name' => 'CRITICAL', + 'channel' => 'test', + 'message' => 'bar', + 'context' => array($largeArray), + 'datetime' => new \DateTime, + 'extra' => array(), + )); + + $this->assertCount(1001, $res['context'][0]); + $this->assertEquals('Over 1000 items (2000 total), aborting normalization', $res['context'][0]['...']); + } + + /** + * @expectedException RuntimeException + */ + public function testThrowsOnInvalidEncoding() + { + if (version_compare(PHP_VERSION, '5.5.0', '<')) { + // Ignore the warning that will be emitted by PHP <5.5.0 + \PHPUnit_Framework_Error_Warning::$enabled = false; + } + $formatter = new NormalizerFormatter(); + $reflMethod = new \ReflectionMethod($formatter, 'toJson'); + $reflMethod->setAccessible(true); + + // send an invalid unicode sequence as a object that can't be cleaned + $record = new \stdClass; + $record->message = "\xB1\x31"; + $res = $reflMethod->invoke($formatter, $record); + if (PHP_VERSION_ID < 50500 && $res === '{"message":null}') { + throw new \RuntimeException('PHP 5.3/5.4 throw a warning and null the value instead of returning false entirely'); + } + } + + public function testConvertsInvalidEncodingAsLatin9() + { + if (version_compare(PHP_VERSION, '5.5.0', '<')) { + // Ignore the warning that will be emitted by PHP <5.5.0 + \PHPUnit_Framework_Error_Warning::$enabled = false; + } + $formatter = new NormalizerFormatter(); + $reflMethod = new \ReflectionMethod($formatter, 'toJson'); + $reflMethod->setAccessible(true); + + $res = $reflMethod->invoke($formatter, array('message' => "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE")); + + if (version_compare(PHP_VERSION, '5.5.0', '>=')) { + $this->assertSame('{"message":"€ŠšŽžŒœŸ"}', $res); + } else { + // PHP <5.5 does not return false for an element encoding failure, + // instead it emits a warning (possibly) and nulls the value. + $this->assertSame('{"message":null}', $res); + } + } + + /** + * @param mixed $in Input + * @param mixed $expect Expected output + * @covers Monolog\Formatter\NormalizerFormatter::detectAndCleanUtf8 + * @dataProvider providesDetectAndCleanUtf8 + */ + public function testDetectAndCleanUtf8($in, $expect) + { + $formatter = new NormalizerFormatter(); + $formatter->detectAndCleanUtf8($in); + $this->assertSame($expect, $in); + } + + public function providesDetectAndCleanUtf8() + { + $obj = new \stdClass; + + return array( + 'null' => array(null, null), + 'int' => array(123, 123), + 'float' => array(123.45, 123.45), + 'bool false' => array(false, false), + 'bool true' => array(true, true), + 'ascii string' => array('abcdef', 'abcdef'), + 'latin9 string' => array("\xB1\x31\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE\xFF", '±1€ŠšŽžŒœŸÿ'), + 'unicode string' => array('¤¦¨´¸¼½¾€ŠšŽžŒœŸ', '¤¦¨´¸¼½¾€ŠšŽžŒœŸ'), + 'empty array' => array(array(), array()), + 'array' => array(array('abcdef'), array('abcdef')), + 'object' => array($obj, $obj), + ); + } + + /** + * @param int $code + * @param string $msg + * @dataProvider providesHandleJsonErrorFailure + */ + public function testHandleJsonErrorFailure($code, $msg) + { + $formatter = new NormalizerFormatter(); + $reflMethod = new \ReflectionMethod($formatter, 'handleJsonError'); + $reflMethod->setAccessible(true); + + $this->setExpectedException('RuntimeException', $msg); + $reflMethod->invoke($formatter, $code, 'faked'); + } + + public function providesHandleJsonErrorFailure() + { + return array( + 'depth' => array(JSON_ERROR_DEPTH, 'Maximum stack depth exceeded'), + 'state' => array(JSON_ERROR_STATE_MISMATCH, 'Underflow or the modes mismatch'), + 'ctrl' => array(JSON_ERROR_CTRL_CHAR, 'Unexpected control character found'), + 'default' => array(-1, 'Unknown error'), + ); + } + + public function testExceptionTraceWithArgs() + { + if (defined('HHVM_VERSION')) { + $this->markTestSkipped('Not supported in HHVM since it detects errors differently'); + } + + // This happens i.e. in React promises or Guzzle streams where stream wrappers are registered + // and no file or line are included in the trace because it's treated as internal function + set_error_handler(function ($errno, $errstr, $errfile, $errline) { + throw new \ErrorException($errstr, 0, $errno, $errfile, $errline); + }); + + try { + // This will contain $resource and $wrappedResource as arguments in the trace item + $resource = fopen('php://memory', 'rw+'); + fwrite($resource, 'test_resource'); + $wrappedResource = new TestFooNorm; + $wrappedResource->foo = $resource; + // Just do something stupid with a resource/wrapped resource as argument + array_keys($wrappedResource); + } catch (\Exception $e) { + restore_error_handler(); + } + + $formatter = new NormalizerFormatter(); + $record = array('context' => array('exception' => $e)); + $result = $formatter->format($record); + + $this->assertRegExp( + '%"resource":"\[resource\] \(stream\)"%', + $result['context']['exception']['trace'][0] + ); + + if (version_compare(PHP_VERSION, '5.5.0', '>=')) { + $pattern = '%"wrappedResource":"\[object\] \(Monolog\\\\\\\\Formatter\\\\\\\\TestFooNorm: \)"%'; + } else { + $pattern = '%\\\\"foo\\\\":null%'; + } + + // Tests that the wrapped resource is ignored while encoding, only works for PHP <= 5.4 + $this->assertRegExp( + $pattern, + $result['context']['exception']['trace'][0] + ); + } + + public function testExceptionTraceDoesNotLeakCallUserFuncArgs() + { + try { + $arg = new TestInfoLeak; + call_user_func(array($this, 'throwHelper'), $arg, $dt = new \DateTime()); + } catch (\Exception $e) { + } + + $formatter = new NormalizerFormatter(); + $record = array('context' => array('exception' => $e)); + $result = $formatter->format($record); + + $this->assertSame( + '{"function":"throwHelper","class":"Monolog\\\\Formatter\\\\NormalizerFormatterTest","type":"->","args":["[object] (Monolog\\\\Formatter\\\\TestInfoLeak)","'.$dt->format('Y-m-d H:i:s').'"]}', + $result['context']['exception']['trace'][0] + ); + } + + private function throwHelper($arg) + { + throw new \RuntimeException('Thrown'); + } +} + +class TestFooNorm +{ + public $foo = 'foo'; +} + +class TestBarNorm +{ + public function __toString() + { + return 'bar'; + } +} + +class TestStreamFoo +{ + public $foo; + public $resource; + + public function __construct($resource) + { + $this->resource = $resource; + $this->foo = 'BAR'; + } + + public function __toString() + { + fseek($this->resource, 0); + + return $this->foo . ' - ' . (string) stream_get_contents($this->resource); + } +} + +class TestToStringError +{ + public function __toString() + { + throw new \RuntimeException('Could not convert to string'); + } +} + +class TestInfoLeak +{ + public function __toString() + { + return 'Sensitive information'; + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php new file mode 100755 index 0000000..b1c8fd4 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/ScalarFormatterTest.php @@ -0,0 +1,110 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +class ScalarFormatterTest extends \PHPUnit_Framework_TestCase +{ + private $formatter; + + public function setUp() + { + $this->formatter = new ScalarFormatter(); + } + + public function buildTrace(\Exception $e) + { + $data = array(); + $trace = $e->getTrace(); + foreach ($trace as $frame) { + if (isset($frame['file'])) { + $data[] = $frame['file'].':'.$frame['line']; + } else { + $data[] = json_encode($frame); + } + } + + return $data; + } + + public function encodeJson($data) + { + if (version_compare(PHP_VERSION, '5.4.0', '>=')) { + return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + } + + return json_encode($data); + } + + public function testFormat() + { + $exception = new \Exception('foo'); + $formatted = $this->formatter->format(array( + 'foo' => 'string', + 'bar' => 1, + 'baz' => false, + 'bam' => array(1, 2, 3), + 'bat' => array('foo' => 'bar'), + 'bap' => \DateTime::createFromFormat(\DateTime::ISO8601, '1970-01-01T00:00:00+0000'), + 'ban' => $exception, + )); + + $this->assertSame(array( + 'foo' => 'string', + 'bar' => 1, + 'baz' => false, + 'bam' => $this->encodeJson(array(1, 2, 3)), + 'bat' => $this->encodeJson(array('foo' => 'bar')), + 'bap' => '1970-01-01 00:00:00', + 'ban' => $this->encodeJson(array( + 'class' => get_class($exception), + 'message' => $exception->getMessage(), + 'code' => $exception->getCode(), + 'file' => $exception->getFile() . ':' . $exception->getLine(), + 'trace' => $this->buildTrace($exception), + )), + ), $formatted); + } + + public function testFormatWithErrorContext() + { + $context = array('file' => 'foo', 'line' => 1); + $formatted = $this->formatter->format(array( + 'context' => $context, + )); + + $this->assertSame(array( + 'context' => $this->encodeJson($context), + ), $formatted); + } + + public function testFormatWithExceptionContext() + { + $exception = new \Exception('foo'); + $formatted = $this->formatter->format(array( + 'context' => array( + 'exception' => $exception, + ), + )); + + $this->assertSame(array( + 'context' => $this->encodeJson(array( + 'exception' => array( + 'class' => get_class($exception), + 'message' => $exception->getMessage(), + 'code' => $exception->getCode(), + 'file' => $exception->getFile() . ':' . $exception->getLine(), + 'trace' => $this->buildTrace($exception), + ), + )), + ), $formatted); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php b/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php new file mode 100755 index 0000000..52f15a3 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Formatter/WildfireFormatterTest.php @@ -0,0 +1,142 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Formatter; + +use Monolog\Logger; + +class WildfireFormatterTest extends \PHPUnit_Framework_TestCase +{ + /** + * @covers Monolog\Formatter\WildfireFormatter::format + */ + public function testDefaultFormat() + { + $wildfire = new WildfireFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('ip' => '127.0.0.1'), + 'message' => 'log', + ); + + $message = $wildfire->format($record); + + $this->assertEquals( + '125|[{"Type":"ERROR","File":"","Line":"","Label":"meh"},' + .'{"message":"log","context":{"from":"logger"},"extra":{"ip":"127.0.0.1"}}]|', + $message + ); + } + + /** + * @covers Monolog\Formatter\WildfireFormatter::format + */ + public function testFormatWithFileAndLine() + { + $wildfire = new WildfireFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('from' => 'logger'), + 'datetime' => new \DateTime("@0"), + 'extra' => array('ip' => '127.0.0.1', 'file' => 'test', 'line' => 14), + 'message' => 'log', + ); + + $message = $wildfire->format($record); + + $this->assertEquals( + '129|[{"Type":"ERROR","File":"test","Line":14,"Label":"meh"},' + .'{"message":"log","context":{"from":"logger"},"extra":{"ip":"127.0.0.1"}}]|', + $message + ); + } + + /** + * @covers Monolog\Formatter\WildfireFormatter::format + */ + public function testFormatWithoutContext() + { + $wildfire = new WildfireFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + $message = $wildfire->format($record); + + $this->assertEquals( + '58|[{"Type":"ERROR","File":"","Line":"","Label":"meh"},"log"]|', + $message + ); + } + + /** + * @covers Monolog\Formatter\WildfireFormatter::formatBatch + * @expectedException BadMethodCallException + */ + public function testBatchFormatThrowException() + { + $wildfire = new WildfireFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array(), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + $wildfire->formatBatch(array($record)); + } + + /** + * @covers Monolog\Formatter\WildfireFormatter::format + */ + public function testTableFormat() + { + $wildfire = new WildfireFormatter(); + $record = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'table-channel', + 'context' => array( + WildfireFormatter::TABLE => array( + array('col1', 'col2', 'col3'), + array('val1', 'val2', 'val3'), + array('foo1', 'foo2', 'foo3'), + array('bar1', 'bar2', 'bar3'), + ), + ), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'table-message', + ); + + $message = $wildfire->format($record); + + $this->assertEquals( + '171|[{"Type":"TABLE","File":"","Line":"","Label":"table-channel: table-message"},[["col1","col2","col3"],["val1","val2","val3"],["foo1","foo2","foo3"],["bar1","bar2","bar3"]]]|', + $message + ); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php new file mode 100755 index 0000000..568eb9d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractHandlerTest.php @@ -0,0 +1,115 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; +use Monolog\Processor\WebProcessor; + +class AbstractHandlerTest extends TestCase +{ + /** + * @covers Monolog\Handler\AbstractHandler::__construct + * @covers Monolog\Handler\AbstractHandler::getLevel + * @covers Monolog\Handler\AbstractHandler::setLevel + * @covers Monolog\Handler\AbstractHandler::getBubble + * @covers Monolog\Handler\AbstractHandler::setBubble + * @covers Monolog\Handler\AbstractHandler::getFormatter + * @covers Monolog\Handler\AbstractHandler::setFormatter + */ + public function testConstructAndGetSet() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler', array(Logger::WARNING, false)); + $this->assertEquals(Logger::WARNING, $handler->getLevel()); + $this->assertEquals(false, $handler->getBubble()); + + $handler->setLevel(Logger::ERROR); + $handler->setBubble(true); + $handler->setFormatter($formatter = new LineFormatter); + $this->assertEquals(Logger::ERROR, $handler->getLevel()); + $this->assertEquals(true, $handler->getBubble()); + $this->assertSame($formatter, $handler->getFormatter()); + } + + /** + * @covers Monolog\Handler\AbstractHandler::handleBatch + */ + public function testHandleBatch() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); + $handler->expects($this->exactly(2)) + ->method('handle'); + $handler->handleBatch(array($this->getRecord(), $this->getRecord())); + } + + /** + * @covers Monolog\Handler\AbstractHandler::isHandling + */ + public function testIsHandling() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler', array(Logger::WARNING, false)); + $this->assertTrue($handler->isHandling($this->getRecord())); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); + } + + /** + * @covers Monolog\Handler\AbstractHandler::__construct + */ + public function testHandlesPsrStyleLevels() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler', array('warning', false)); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); + $handler->setLevel('debug'); + $this->assertTrue($handler->isHandling($this->getRecord(Logger::DEBUG))); + } + + /** + * @covers Monolog\Handler\AbstractHandler::getFormatter + * @covers Monolog\Handler\AbstractHandler::getDefaultFormatter + */ + public function testGetFormatterInitializesDefault() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); + $this->assertInstanceOf('Monolog\Formatter\LineFormatter', $handler->getFormatter()); + } + + /** + * @covers Monolog\Handler\AbstractHandler::pushProcessor + * @covers Monolog\Handler\AbstractHandler::popProcessor + * @expectedException LogicException + */ + public function testPushPopProcessor() + { + $logger = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); + $processor1 = new WebProcessor; + $processor2 = new WebProcessor; + + $logger->pushProcessor($processor1); + $logger->pushProcessor($processor2); + + $this->assertEquals($processor2, $logger->popProcessor()); + $this->assertEquals($processor1, $logger->popProcessor()); + $logger->popProcessor(); + } + + /** + * @covers Monolog\Handler\AbstractHandler::pushProcessor + * @expectedException InvalidArgumentException + */ + public function testPushProcessorWithNonCallable() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractHandler'); + + $handler->pushProcessor(new \stdClass()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php new file mode 100755 index 0000000..24d4f63 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/AbstractProcessingHandlerTest.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Processor\WebProcessor; + +class AbstractProcessingHandlerTest extends TestCase +{ + /** + * @covers Monolog\Handler\AbstractProcessingHandler::handle + */ + public function testHandleLowerLevelMessage() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, true)); + $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); + } + + /** + * @covers Monolog\Handler\AbstractProcessingHandler::handle + */ + public function testHandleBubbling() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, true)); + $this->assertFalse($handler->handle($this->getRecord())); + } + + /** + * @covers Monolog\Handler\AbstractProcessingHandler::handle + */ + public function testHandleNotBubbling() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::DEBUG, false)); + $this->assertTrue($handler->handle($this->getRecord())); + } + + /** + * @covers Monolog\Handler\AbstractProcessingHandler::handle + */ + public function testHandleIsFalseWhenNotHandled() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler', array(Logger::WARNING, false)); + $this->assertTrue($handler->handle($this->getRecord())); + $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); + } + + /** + * @covers Monolog\Handler\AbstractProcessingHandler::processRecord + */ + public function testProcessRecord() + { + $handler = $this->getMockForAbstractClass('Monolog\Handler\AbstractProcessingHandler'); + $handler->pushProcessor(new WebProcessor(array( + 'REQUEST_URI' => '', + 'REQUEST_METHOD' => '', + 'REMOTE_ADDR' => '', + 'SERVER_NAME' => '', + 'UNIQUE_ID' => '', + ))); + $handledRecord = null; + $handler->expects($this->once()) + ->method('write') + ->will($this->returnCallback(function ($record) use (&$handledRecord) { + $handledRecord = $record; + })) + ; + $handler->handle($this->getRecord()); + $this->assertEquals(6, count($handledRecord['extra'])); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php new file mode 100755 index 0000000..8e0e723 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/AmqpHandlerTest.php @@ -0,0 +1,136 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use PhpAmqpLib\Message\AMQPMessage; +use PhpAmqpLib\Connection\AMQPConnection; + +/** + * @covers Monolog\Handler\RotatingFileHandler + */ +class AmqpHandlerTest extends TestCase +{ + public function testHandleAmqpExt() + { + if (!class_exists('AMQPConnection') || !class_exists('AMQPExchange')) { + $this->markTestSkipped("amqp-php not installed"); + } + + if (!class_exists('AMQPChannel')) { + $this->markTestSkipped("Please update AMQP to version >= 1.0"); + } + + $messages = array(); + + $exchange = $this->getMock('AMQPExchange', array('publish', 'setName'), array(), '', false); + $exchange->expects($this->once()) + ->method('setName') + ->with('log') + ; + $exchange->expects($this->any()) + ->method('publish') + ->will($this->returnCallback(function ($message, $routing_key, $flags = 0, $attributes = array()) use (&$messages) { + $messages[] = array($message, $routing_key, $flags, $attributes); + })) + ; + + $handler = new AmqpHandler($exchange, 'log'); + + $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); + + $expected = array( + array( + 'message' => 'test', + 'context' => array( + 'data' => array(), + 'foo' => 34, + ), + 'level' => 300, + 'level_name' => 'WARNING', + 'channel' => 'test', + 'extra' => array(), + ), + 'warn.test', + 0, + array( + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ), + ); + + $handler->handle($record); + + $this->assertCount(1, $messages); + $messages[0][0] = json_decode($messages[0][0], true); + unset($messages[0][0]['datetime']); + $this->assertEquals($expected, $messages[0]); + } + + public function testHandlePhpAmqpLib() + { + if (!class_exists('PhpAmqpLib\Connection\AMQPConnection')) { + $this->markTestSkipped("php-amqplib not installed"); + } + + $messages = array(); + + $exchange = $this->getMock('PhpAmqpLib\Channel\AMQPChannel', array('basic_publish', '__destruct'), array(), '', false); + + $exchange->expects($this->any()) + ->method('basic_publish') + ->will($this->returnCallback(function (AMQPMessage $msg, $exchange = "", $routing_key = "", $mandatory = false, $immediate = false, $ticket = null) use (&$messages) { + $messages[] = array($msg, $exchange, $routing_key, $mandatory, $immediate, $ticket); + })) + ; + + $handler = new AmqpHandler($exchange, 'log'); + + $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); + + $expected = array( + array( + 'message' => 'test', + 'context' => array( + 'data' => array(), + 'foo' => 34, + ), + 'level' => 300, + 'level_name' => 'WARNING', + 'channel' => 'test', + 'extra' => array(), + ), + 'log', + 'warn.test', + false, + false, + null, + array( + 'delivery_mode' => 2, + 'content_type' => 'application/json', + ), + ); + + $handler->handle($record); + + $this->assertCount(1, $messages); + + /* @var $msg AMQPMessage */ + $msg = $messages[0][0]; + $messages[0][0] = json_decode($msg->body, true); + $messages[0][] = $msg->get_properties(); + unset($messages[0][0]['datetime']); + + $this->assertEquals($expected, $messages[0]); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php new file mode 100755 index 0000000..ffe45da --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/BrowserConsoleHandlerTest.php @@ -0,0 +1,130 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @covers Monolog\Handler\BrowserConsoleHandlerTest + */ +class BrowserConsoleHandlerTest extends TestCase +{ + protected function setUp() + { + BrowserConsoleHandler::resetStatic(); + } + + protected function generateScript() + { + $reflMethod = new \ReflectionMethod('Monolog\Handler\BrowserConsoleHandler', 'generateScript'); + $reflMethod->setAccessible(true); + + return $reflMethod->invoke(null); + } + + public function testStyling() + { + $handler = new BrowserConsoleHandler(); + $handler->setFormatter($this->getIdentityFormatter()); + + $handler->handle($this->getRecord(Logger::DEBUG, 'foo[[bar]]{color: red}')); + + $expected = <<assertEquals($expected, $this->generateScript()); + } + + public function testEscaping() + { + $handler = new BrowserConsoleHandler(); + $handler->setFormatter($this->getIdentityFormatter()); + + $handler->handle($this->getRecord(Logger::DEBUG, "[foo] [[\"bar\n[baz]\"]]{color: red}")); + + $expected = <<assertEquals($expected, $this->generateScript()); + } + + public function testAutolabel() + { + $handler = new BrowserConsoleHandler(); + $handler->setFormatter($this->getIdentityFormatter()); + + $handler->handle($this->getRecord(Logger::DEBUG, '[[foo]]{macro: autolabel}')); + $handler->handle($this->getRecord(Logger::DEBUG, '[[bar]]{macro: autolabel}')); + $handler->handle($this->getRecord(Logger::DEBUG, '[[foo]]{macro: autolabel}')); + + $expected = <<assertEquals($expected, $this->generateScript()); + } + + public function testContext() + { + $handler = new BrowserConsoleHandler(); + $handler->setFormatter($this->getIdentityFormatter()); + + $handler->handle($this->getRecord(Logger::DEBUG, 'test', array('foo' => 'bar'))); + + $expected = <<assertEquals($expected, $this->generateScript()); + } + + public function testConcurrentHandlers() + { + $handler1 = new BrowserConsoleHandler(); + $handler1->setFormatter($this->getIdentityFormatter()); + + $handler2 = new BrowserConsoleHandler(); + $handler2->setFormatter($this->getIdentityFormatter()); + + $handler1->handle($this->getRecord(Logger::DEBUG, 'test1')); + $handler2->handle($this->getRecord(Logger::DEBUG, 'test2')); + $handler1->handle($this->getRecord(Logger::DEBUG, 'test3')); + $handler2->handle($this->getRecord(Logger::DEBUG, 'test4')); + + $expected = <<assertEquals($expected, $this->generateScript()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php new file mode 100755 index 0000000..da8b3c3 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php @@ -0,0 +1,158 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +class BufferHandlerTest extends TestCase +{ + private $shutdownCheckHandler; + + /** + * @covers Monolog\Handler\BufferHandler::__construct + * @covers Monolog\Handler\BufferHandler::handle + * @covers Monolog\Handler\BufferHandler::close + */ + public function testHandleBuffers() + { + $test = new TestHandler(); + $handler = new BufferHandler($test); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $this->assertFalse($test->hasDebugRecords()); + $this->assertFalse($test->hasInfoRecords()); + $handler->close(); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue(count($test->getRecords()) === 2); + } + + /** + * @covers Monolog\Handler\BufferHandler::close + * @covers Monolog\Handler\BufferHandler::flush + */ + public function testPropagatesRecordsAtEndOfRequest() + { + $test = new TestHandler(); + $handler = new BufferHandler($test); + $handler->handle($this->getRecord(Logger::WARNING)); + $handler->handle($this->getRecord(Logger::DEBUG)); + $this->shutdownCheckHandler = $test; + register_shutdown_function(array($this, 'checkPropagation')); + } + + public function checkPropagation() + { + if (!$this->shutdownCheckHandler->hasWarningRecords() || !$this->shutdownCheckHandler->hasDebugRecords()) { + echo '!!! BufferHandlerTest::testPropagatesRecordsAtEndOfRequest failed to verify that the messages have been propagated' . PHP_EOL; + exit(1); + } + } + + /** + * @covers Monolog\Handler\BufferHandler::handle + */ + public function testHandleBufferLimit() + { + $test = new TestHandler(); + $handler = new BufferHandler($test, 2); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $handler->handle($this->getRecord(Logger::WARNING)); + $handler->close(); + $this->assertTrue($test->hasWarningRecords()); + $this->assertTrue($test->hasInfoRecords()); + $this->assertFalse($test->hasDebugRecords()); + } + + /** + * @covers Monolog\Handler\BufferHandler::handle + */ + public function testHandleBufferLimitWithFlushOnOverflow() + { + $test = new TestHandler(); + $handler = new BufferHandler($test, 3, Logger::DEBUG, true, true); + + // send two records + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::DEBUG)); + $this->assertFalse($test->hasDebugRecords()); + $this->assertCount(0, $test->getRecords()); + + // overflow + $handler->handle($this->getRecord(Logger::INFO)); + $this->assertTrue($test->hasDebugRecords()); + $this->assertCount(3, $test->getRecords()); + + // should buffer again + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertCount(3, $test->getRecords()); + + $handler->close(); + $this->assertCount(5, $test->getRecords()); + $this->assertTrue($test->hasWarningRecords()); + $this->assertTrue($test->hasInfoRecords()); + } + + /** + * @covers Monolog\Handler\BufferHandler::handle + */ + public function testHandleLevel() + { + $test = new TestHandler(); + $handler = new BufferHandler($test, 0, Logger::INFO); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $handler->handle($this->getRecord(Logger::WARNING)); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->close(); + $this->assertTrue($test->hasWarningRecords()); + $this->assertTrue($test->hasInfoRecords()); + $this->assertFalse($test->hasDebugRecords()); + } + + /** + * @covers Monolog\Handler\BufferHandler::flush + */ + public function testFlush() + { + $test = new TestHandler(); + $handler = new BufferHandler($test, 0); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $handler->flush(); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue($test->hasDebugRecords()); + $this->assertFalse($test->hasWarningRecords()); + } + + /** + * @covers Monolog\Handler\BufferHandler::handle + */ + public function testHandleUsesProcessors() + { + $test = new TestHandler(); + $handler = new BufferHandler($test); + $handler->pushProcessor(function ($record) { + $record['extra']['foo'] = true; + + return $record; + }); + $handler->handle($this->getRecord(Logger::WARNING)); + $handler->flush(); + $this->assertTrue($test->hasWarningRecords()); + $records = $test->getRecords(); + $this->assertTrue($records[0]['extra']['foo']); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php new file mode 100755 index 0000000..421cc49 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/ChromePHPHandlerTest.php @@ -0,0 +1,156 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @covers Monolog\Handler\ChromePHPHandler + */ +class ChromePHPHandlerTest extends TestCase +{ + protected function setUp() + { + TestChromePHPHandler::resetStatic(); + $_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; Chrome/1.0'; + } + + /** + * @dataProvider agentsProvider + */ + public function testHeaders($agent) + { + $_SERVER['HTTP_USER_AGENT'] = $agent; + + $handler = new TestChromePHPHandler(); + $handler->setFormatter($this->getIdentityFormatter()); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::WARNING)); + + $expected = array( + 'X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array( + 'version' => ChromePHPHandler::VERSION, + 'columns' => array('label', 'log', 'backtrace', 'type'), + 'rows' => array( + 'test', + 'test', + ), + 'request_uri' => '', + )))), + ); + + $this->assertEquals($expected, $handler->getHeaders()); + } + + public static function agentsProvider() + { + return array( + array('Monolog Test; Chrome/1.0'), + array('Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0'), + array('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/56.0.2924.76 Chrome/56.0.2924.76 Safari/537.36'), + array('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome Safari/537.36'), + ); + } + + public function testHeadersOverflow() + { + $handler = new TestChromePHPHandler(); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::WARNING, str_repeat('a', 150 * 1024))); + + // overflow chrome headers limit + $handler->handle($this->getRecord(Logger::WARNING, str_repeat('a', 100 * 1024))); + + $expected = array( + 'X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array( + 'version' => ChromePHPHandler::VERSION, + 'columns' => array('label', 'log', 'backtrace', 'type'), + 'rows' => array( + array( + 'test', + 'test', + 'unknown', + 'log', + ), + array( + 'test', + str_repeat('a', 150 * 1024), + 'unknown', + 'warn', + ), + array( + 'monolog', + 'Incomplete logs, chrome header size limit reached', + 'unknown', + 'warn', + ), + ), + 'request_uri' => '', + )))), + ); + + $this->assertEquals($expected, $handler->getHeaders()); + } + + public function testConcurrentHandlers() + { + $handler = new TestChromePHPHandler(); + $handler->setFormatter($this->getIdentityFormatter()); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::WARNING)); + + $handler2 = new TestChromePHPHandler(); + $handler2->setFormatter($this->getIdentityFormatter()); + $handler2->handle($this->getRecord(Logger::DEBUG)); + $handler2->handle($this->getRecord(Logger::WARNING)); + + $expected = array( + 'X-ChromeLogger-Data' => base64_encode(utf8_encode(json_encode(array( + 'version' => ChromePHPHandler::VERSION, + 'columns' => array('label', 'log', 'backtrace', 'type'), + 'rows' => array( + 'test', + 'test', + 'test', + 'test', + ), + 'request_uri' => '', + )))), + ); + + $this->assertEquals($expected, $handler2->getHeaders()); + } +} + +class TestChromePHPHandler extends ChromePHPHandler +{ + protected $headers = array(); + + public static function resetStatic() + { + self::$initialized = false; + self::$overflowed = false; + self::$sendHeaders = true; + self::$json['rows'] = array(); + } + + protected function sendHeader($header, $content) + { + $this->headers[$header] = $content; + } + + public function getHeaders() + { + return $this->headers; + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php new file mode 100755 index 0000000..9fc4b38 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/CouchDBHandlerTest.php @@ -0,0 +1,31 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +class CouchDBHandlerTest extends TestCase +{ + public function testHandle() + { + $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); + + $handler = new CouchDBHandler(); + + try { + $handler->handle($record); + } catch (\RuntimeException $e) { + $this->markTestSkipped('Could not connect to couchdb server on http://localhost:5984'); + } + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php new file mode 100755 index 0000000..e2aff86 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/DeduplicationHandlerTest.php @@ -0,0 +1,165 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +class DeduplicationHandlerTest extends TestCase +{ + /** + * @covers Monolog\Handler\DeduplicationHandler::flush + */ + public function testFlushPassthruIfAllRecordsUnderTrigger() + { + $test = new TestHandler(); + @unlink(sys_get_temp_dir().'/monolog_dedup.log'); + $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); + + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + + $handler->flush(); + + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue($test->hasDebugRecords()); + $this->assertFalse($test->hasWarningRecords()); + } + + /** + * @covers Monolog\Handler\DeduplicationHandler::flush + * @covers Monolog\Handler\DeduplicationHandler::appendRecord + */ + public function testFlushPassthruIfEmptyLog() + { + $test = new TestHandler(); + @unlink(sys_get_temp_dir().'/monolog_dedup.log'); + $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); + + $handler->handle($this->getRecord(Logger::ERROR, 'Foo:bar')); + $handler->handle($this->getRecord(Logger::CRITICAL, "Foo\nbar")); + + $handler->flush(); + + $this->assertTrue($test->hasErrorRecords()); + $this->assertTrue($test->hasCriticalRecords()); + $this->assertFalse($test->hasWarningRecords()); + } + + /** + * @covers Monolog\Handler\DeduplicationHandler::flush + * @covers Monolog\Handler\DeduplicationHandler::appendRecord + * @covers Monolog\Handler\DeduplicationHandler::isDuplicate + * @depends testFlushPassthruIfEmptyLog + */ + public function testFlushSkipsIfLogExists() + { + $test = new TestHandler(); + $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); + + $handler->handle($this->getRecord(Logger::ERROR, 'Foo:bar')); + $handler->handle($this->getRecord(Logger::CRITICAL, "Foo\nbar")); + + $handler->flush(); + + $this->assertFalse($test->hasErrorRecords()); + $this->assertFalse($test->hasCriticalRecords()); + $this->assertFalse($test->hasWarningRecords()); + } + + /** + * @covers Monolog\Handler\DeduplicationHandler::flush + * @covers Monolog\Handler\DeduplicationHandler::appendRecord + * @covers Monolog\Handler\DeduplicationHandler::isDuplicate + * @depends testFlushPassthruIfEmptyLog + */ + public function testFlushPassthruIfLogTooOld() + { + $test = new TestHandler(); + $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); + + $record = $this->getRecord(Logger::ERROR); + $record['datetime']->modify('+62seconds'); + $handler->handle($record); + $record = $this->getRecord(Logger::CRITICAL); + $record['datetime']->modify('+62seconds'); + $handler->handle($record); + + $handler->flush(); + + $this->assertTrue($test->hasErrorRecords()); + $this->assertTrue($test->hasCriticalRecords()); + $this->assertFalse($test->hasWarningRecords()); + } + + /** + * @covers Monolog\Handler\DeduplicationHandler::flush + * @covers Monolog\Handler\DeduplicationHandler::appendRecord + * @covers Monolog\Handler\DeduplicationHandler::isDuplicate + * @covers Monolog\Handler\DeduplicationHandler::collectLogs + */ + public function testGcOldLogs() + { + $test = new TestHandler(); + @unlink(sys_get_temp_dir().'/monolog_dedup.log'); + $handler = new DeduplicationHandler($test, sys_get_temp_dir().'/monolog_dedup.log', 0); + + // handle two records from yesterday, and one recent + $record = $this->getRecord(Logger::ERROR); + $record['datetime']->modify('-1day -10seconds'); + $handler->handle($record); + $record2 = $this->getRecord(Logger::CRITICAL); + $record2['datetime']->modify('-1day -10seconds'); + $handler->handle($record2); + $record3 = $this->getRecord(Logger::CRITICAL); + $record3['datetime']->modify('-30seconds'); + $handler->handle($record3); + + // log is written as none of them are duplicate + $handler->flush(); + $this->assertSame( + $record['datetime']->getTimestamp() . ":ERROR:test\n" . + $record2['datetime']->getTimestamp() . ":CRITICAL:test\n" . + $record3['datetime']->getTimestamp() . ":CRITICAL:test\n", + file_get_contents(sys_get_temp_dir() . '/monolog_dedup.log') + ); + $this->assertTrue($test->hasErrorRecords()); + $this->assertTrue($test->hasCriticalRecords()); + $this->assertFalse($test->hasWarningRecords()); + + // clear test handler + $test->clear(); + $this->assertFalse($test->hasErrorRecords()); + $this->assertFalse($test->hasCriticalRecords()); + + // log new records, duplicate log gets GC'd at the end of this flush call + $handler->handle($record = $this->getRecord(Logger::ERROR)); + $handler->handle($record2 = $this->getRecord(Logger::CRITICAL)); + $handler->flush(); + + // log should now contain the new errors and the previous one that was recent enough + $this->assertSame( + $record3['datetime']->getTimestamp() . ":CRITICAL:test\n" . + $record['datetime']->getTimestamp() . ":ERROR:test\n" . + $record2['datetime']->getTimestamp() . ":CRITICAL:test\n", + file_get_contents(sys_get_temp_dir() . '/monolog_dedup.log') + ); + $this->assertTrue($test->hasErrorRecords()); + $this->assertTrue($test->hasCriticalRecords()); + $this->assertFalse($test->hasWarningRecords()); + } + + public static function tearDownAfterClass() + { + @unlink(sys_get_temp_dir().'/monolog_dedup.log'); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php new file mode 100755 index 0000000..d67da90 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/DoctrineCouchDBHandlerTest.php @@ -0,0 +1,52 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +class DoctrineCouchDBHandlerTest extends TestCase +{ + protected function setup() + { + if (!class_exists('Doctrine\CouchDB\CouchDBClient')) { + $this->markTestSkipped('The "doctrine/couchdb" package is not installed'); + } + } + + public function testHandle() + { + $client = $this->getMockBuilder('Doctrine\\CouchDB\\CouchDBClient') + ->setMethods(array('postDocument')) + ->disableOriginalConstructor() + ->getMock(); + + $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); + + $expected = array( + 'message' => 'test', + 'context' => array('data' => '[object] (stdClass: {})', 'foo' => 34), + 'level' => Logger::WARNING, + 'level_name' => 'WARNING', + 'channel' => 'test', + 'datetime' => $record['datetime']->format('Y-m-d H:i:s'), + 'extra' => array(), + ); + + $client->expects($this->once()) + ->method('postDocument') + ->with($expected); + + $handler = new DoctrineCouchDBHandler($client); + $handler->handle($record); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php new file mode 100755 index 0000000..2e6c348 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/DynamoDbHandlerTest.php @@ -0,0 +1,82 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; + +class DynamoDbHandlerTest extends TestCase +{ + private $client; + + public function setUp() + { + if (!class_exists('Aws\DynamoDb\DynamoDbClient')) { + $this->markTestSkipped('aws/aws-sdk-php not installed'); + } + + $this->client = $this->getMockBuilder('Aws\DynamoDb\DynamoDbClient') + ->setMethods(array('formatAttributes', '__call')) + ->disableOriginalConstructor()->getMock(); + } + + public function testConstruct() + { + $this->assertInstanceOf('Monolog\Handler\DynamoDbHandler', new DynamoDbHandler($this->client, 'foo')); + } + + public function testInterface() + { + $this->assertInstanceOf('Monolog\Handler\HandlerInterface', new DynamoDbHandler($this->client, 'foo')); + } + + public function testGetFormatter() + { + $handler = new DynamoDbHandler($this->client, 'foo'); + $this->assertInstanceOf('Monolog\Formatter\ScalarFormatter', $handler->getFormatter()); + } + + public function testHandle() + { + $record = $this->getRecord(); + $formatter = $this->getMock('Monolog\Formatter\FormatterInterface'); + $formatted = array('foo' => 1, 'bar' => 2); + $handler = new DynamoDbHandler($this->client, 'foo'); + $handler->setFormatter($formatter); + + $isV3 = defined('Aws\Sdk::VERSION') && version_compare(\Aws\Sdk::VERSION, '3.0', '>='); + if ($isV3) { + $expFormatted = array('foo' => array('N' => 1), 'bar' => array('N' => 2)); + } else { + $expFormatted = $formatted; + } + + $formatter + ->expects($this->once()) + ->method('format') + ->with($record) + ->will($this->returnValue($formatted)); + $this->client + ->expects($isV3 ? $this->never() : $this->once()) + ->method('formatAttributes') + ->with($this->isType('array')) + ->will($this->returnValue($formatted)); + $this->client + ->expects($this->once()) + ->method('__call') + ->with('putItem', array(array( + 'TableName' => 'foo', + 'Item' => $expFormatted, + ))); + + $handler->handle($record); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php new file mode 100755 index 0000000..1687074 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/ElasticSearchHandlerTest.php @@ -0,0 +1,239 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\ElasticaFormatter; +use Monolog\Formatter\NormalizerFormatter; +use Monolog\TestCase; +use Monolog\Logger; +use Elastica\Client; +use Elastica\Request; +use Elastica\Response; + +class ElasticSearchHandlerTest extends TestCase +{ + /** + * @var Client mock + */ + protected $client; + + /** + * @var array Default handler options + */ + protected $options = array( + 'index' => 'my_index', + 'type' => 'doc_type', + ); + + public function setUp() + { + // Elastica lib required + if (!class_exists("Elastica\Client")) { + $this->markTestSkipped("ruflin/elastica not installed"); + } + + // base mock Elastica Client object + $this->client = $this->getMockBuilder('Elastica\Client') + ->setMethods(array('addDocuments')) + ->disableOriginalConstructor() + ->getMock(); + } + + /** + * @covers Monolog\Handler\ElasticSearchHandler::write + * @covers Monolog\Handler\ElasticSearchHandler::handleBatch + * @covers Monolog\Handler\ElasticSearchHandler::bulkSend + * @covers Monolog\Handler\ElasticSearchHandler::getDefaultFormatter + */ + public function testHandle() + { + // log message + $msg = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('foo' => 7, 'bar', 'class' => new \stdClass), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + // format expected result + $formatter = new ElasticaFormatter($this->options['index'], $this->options['type']); + $expected = array($formatter->format($msg)); + + // setup ES client mock + $this->client->expects($this->any()) + ->method('addDocuments') + ->with($expected); + + // perform tests + $handler = new ElasticSearchHandler($this->client, $this->options); + $handler->handle($msg); + $handler->handleBatch(array($msg)); + } + + /** + * @covers Monolog\Handler\ElasticSearchHandler::setFormatter + */ + public function testSetFormatter() + { + $handler = new ElasticSearchHandler($this->client); + $formatter = new ElasticaFormatter('index_new', 'type_new'); + $handler->setFormatter($formatter); + $this->assertInstanceOf('Monolog\Formatter\ElasticaFormatter', $handler->getFormatter()); + $this->assertEquals('index_new', $handler->getFormatter()->getIndex()); + $this->assertEquals('type_new', $handler->getFormatter()->getType()); + } + + /** + * @covers Monolog\Handler\ElasticSearchHandler::setFormatter + * @expectedException InvalidArgumentException + * @expectedExceptionMessage ElasticSearchHandler is only compatible with ElasticaFormatter + */ + public function testSetFormatterInvalid() + { + $handler = new ElasticSearchHandler($this->client); + $formatter = new NormalizerFormatter(); + $handler->setFormatter($formatter); + } + + /** + * @covers Monolog\Handler\ElasticSearchHandler::__construct + * @covers Monolog\Handler\ElasticSearchHandler::getOptions + */ + public function testOptions() + { + $expected = array( + 'index' => $this->options['index'], + 'type' => $this->options['type'], + 'ignore_error' => false, + ); + $handler = new ElasticSearchHandler($this->client, $this->options); + $this->assertEquals($expected, $handler->getOptions()); + } + + /** + * @covers Monolog\Handler\ElasticSearchHandler::bulkSend + * @dataProvider providerTestConnectionErrors + */ + public function testConnectionErrors($ignore, $expectedError) + { + $clientOpts = array('host' => '127.0.0.1', 'port' => 1); + $client = new Client($clientOpts); + $handlerOpts = array('ignore_error' => $ignore); + $handler = new ElasticSearchHandler($client, $handlerOpts); + + if ($expectedError) { + $this->setExpectedException($expectedError[0], $expectedError[1]); + $handler->handle($this->getRecord()); + } else { + $this->assertFalse($handler->handle($this->getRecord())); + } + } + + /** + * @return array + */ + public function providerTestConnectionErrors() + { + return array( + array(false, array('RuntimeException', 'Error sending messages to Elasticsearch')), + array(true, false), + ); + } + + /** + * Integration test using localhost Elastic Search server + * + * @covers Monolog\Handler\ElasticSearchHandler::__construct + * @covers Monolog\Handler\ElasticSearchHandler::handleBatch + * @covers Monolog\Handler\ElasticSearchHandler::bulkSend + * @covers Monolog\Handler\ElasticSearchHandler::getDefaultFormatter + */ + public function testHandleIntegration() + { + $msg = array( + 'level' => Logger::ERROR, + 'level_name' => 'ERROR', + 'channel' => 'meh', + 'context' => array('foo' => 7, 'bar', 'class' => new \stdClass), + 'datetime' => new \DateTime("@0"), + 'extra' => array(), + 'message' => 'log', + ); + + $expected = $msg; + $expected['datetime'] = $msg['datetime']->format(\DateTime::ISO8601); + $expected['context'] = array( + 'class' => '[object] (stdClass: {})', + 'foo' => 7, + 0 => 'bar', + ); + + $client = new Client(); + $handler = new ElasticSearchHandler($client, $this->options); + try { + $handler->handleBatch(array($msg)); + } catch (\RuntimeException $e) { + $this->markTestSkipped("Cannot connect to Elastic Search server on localhost"); + } + + // check document id from ES server response + $documentId = $this->getCreatedDocId($client->getLastResponse()); + $this->assertNotEmpty($documentId, 'No elastic document id received'); + + // retrieve document source from ES and validate + $document = $this->getDocSourceFromElastic( + $client, + $this->options['index'], + $this->options['type'], + $documentId + ); + $this->assertEquals($expected, $document); + + // remove test index from ES + $client->request("/{$this->options['index']}", Request::DELETE); + } + + /** + * Return last created document id from ES response + * @param Response $response Elastica Response object + * @return string|null + */ + protected function getCreatedDocId(Response $response) + { + $data = $response->getData(); + if (!empty($data['items'][0]['create']['_id'])) { + return $data['items'][0]['create']['_id']; + } + } + + /** + * Retrieve document by id from Elasticsearch + * @param Client $client Elastica client + * @param string $index + * @param string $type + * @param string $documentId + * @return array + */ + protected function getDocSourceFromElastic(Client $client, $index, $type, $documentId) + { + $resp = $client->request("/{$index}/{$type}/{$documentId}", Request::GET); + $data = $resp->getData(); + if (!empty($data['_source'])) { + return $data['_source']; + } + + return array(); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php new file mode 100755 index 0000000..99785cb --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/ErrorLogHandlerTest.php @@ -0,0 +1,66 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; + +function error_log() +{ + $GLOBALS['error_log'][] = func_get_args(); +} + +class ErrorLogHandlerTest extends TestCase +{ + protected function setUp() + { + $GLOBALS['error_log'] = array(); + } + + /** + * @covers Monolog\Handler\ErrorLogHandler::__construct + * @expectedException InvalidArgumentException + * @expectedExceptionMessage The given message type "42" is not supported + */ + public function testShouldNotAcceptAnInvalidTypeOnContructor() + { + new ErrorLogHandler(42); + } + + /** + * @covers Monolog\Handler\ErrorLogHandler::write + */ + public function testShouldLogMessagesUsingErrorLogFuncion() + { + $type = ErrorLogHandler::OPERATING_SYSTEM; + $handler = new ErrorLogHandler($type); + $handler->setFormatter(new LineFormatter('%channel%.%level_name%: %message% %context% %extra%', null, true)); + $handler->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); + + $this->assertSame("test.ERROR: Foo\nBar\r\n\r\nBaz [] []", $GLOBALS['error_log'][0][0]); + $this->assertSame($GLOBALS['error_log'][0][1], $type); + + $handler = new ErrorLogHandler($type, Logger::DEBUG, true, true); + $handler->setFormatter(new LineFormatter(null, null, true)); + $handler->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); + + $this->assertStringMatchesFormat('[%s] test.ERROR: Foo', $GLOBALS['error_log'][1][0]); + $this->assertSame($GLOBALS['error_log'][1][1], $type); + + $this->assertStringMatchesFormat('Bar', $GLOBALS['error_log'][2][0]); + $this->assertSame($GLOBALS['error_log'][2][1], $type); + + $this->assertStringMatchesFormat('Baz [] []', $GLOBALS['error_log'][3][0]); + $this->assertSame($GLOBALS['error_log'][3][1], $type); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php new file mode 100755 index 0000000..31b7686 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FilterHandlerTest.php @@ -0,0 +1,170 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\TestCase; + +class FilterHandlerTest extends TestCase +{ + /** + * @covers Monolog\Handler\FilterHandler::isHandling + */ + public function testIsHandling() + { + $test = new TestHandler(); + $handler = new FilterHandler($test, Logger::INFO, Logger::NOTICE); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); + $this->assertTrue($handler->isHandling($this->getRecord(Logger::INFO))); + $this->assertTrue($handler->isHandling($this->getRecord(Logger::NOTICE))); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::WARNING))); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::ERROR))); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::CRITICAL))); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::ALERT))); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::EMERGENCY))); + } + + /** + * @covers Monolog\Handler\FilterHandler::handle + * @covers Monolog\Handler\FilterHandler::setAcceptedLevels + * @covers Monolog\Handler\FilterHandler::isHandling + */ + public function testHandleProcessOnlyNeededLevels() + { + $test = new TestHandler(); + $handler = new FilterHandler($test, Logger::INFO, Logger::NOTICE); + + $handler->handle($this->getRecord(Logger::DEBUG)); + $this->assertFalse($test->hasDebugRecords()); + + $handler->handle($this->getRecord(Logger::INFO)); + $this->assertTrue($test->hasInfoRecords()); + $handler->handle($this->getRecord(Logger::NOTICE)); + $this->assertTrue($test->hasNoticeRecords()); + + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertFalse($test->hasWarningRecords()); + $handler->handle($this->getRecord(Logger::ERROR)); + $this->assertFalse($test->hasErrorRecords()); + $handler->handle($this->getRecord(Logger::CRITICAL)); + $this->assertFalse($test->hasCriticalRecords()); + $handler->handle($this->getRecord(Logger::ALERT)); + $this->assertFalse($test->hasAlertRecords()); + $handler->handle($this->getRecord(Logger::EMERGENCY)); + $this->assertFalse($test->hasEmergencyRecords()); + + $test = new TestHandler(); + $handler = new FilterHandler($test, array(Logger::INFO, Logger::ERROR)); + + $handler->handle($this->getRecord(Logger::DEBUG)); + $this->assertFalse($test->hasDebugRecords()); + $handler->handle($this->getRecord(Logger::INFO)); + $this->assertTrue($test->hasInfoRecords()); + $handler->handle($this->getRecord(Logger::NOTICE)); + $this->assertFalse($test->hasNoticeRecords()); + $handler->handle($this->getRecord(Logger::ERROR)); + $this->assertTrue($test->hasErrorRecords()); + $handler->handle($this->getRecord(Logger::CRITICAL)); + $this->assertFalse($test->hasCriticalRecords()); + } + + /** + * @covers Monolog\Handler\FilterHandler::setAcceptedLevels + * @covers Monolog\Handler\FilterHandler::getAcceptedLevels + */ + public function testAcceptedLevelApi() + { + $test = new TestHandler(); + $handler = new FilterHandler($test); + + $levels = array(Logger::INFO, Logger::ERROR); + $handler->setAcceptedLevels($levels); + $this->assertSame($levels, $handler->getAcceptedLevels()); + + $handler->setAcceptedLevels(array('info', 'error')); + $this->assertSame($levels, $handler->getAcceptedLevels()); + + $levels = array(Logger::CRITICAL, Logger::ALERT, Logger::EMERGENCY); + $handler->setAcceptedLevels(Logger::CRITICAL, Logger::EMERGENCY); + $this->assertSame($levels, $handler->getAcceptedLevels()); + + $handler->setAcceptedLevels('critical', 'emergency'); + $this->assertSame($levels, $handler->getAcceptedLevels()); + } + + /** + * @covers Monolog\Handler\FilterHandler::handle + */ + public function testHandleUsesProcessors() + { + $test = new TestHandler(); + $handler = new FilterHandler($test, Logger::DEBUG, Logger::EMERGENCY); + $handler->pushProcessor( + function ($record) { + $record['extra']['foo'] = true; + + return $record; + } + ); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertTrue($test->hasWarningRecords()); + $records = $test->getRecords(); + $this->assertTrue($records[0]['extra']['foo']); + } + + /** + * @covers Monolog\Handler\FilterHandler::handle + */ + public function testHandleRespectsBubble() + { + $test = new TestHandler(); + + $handler = new FilterHandler($test, Logger::INFO, Logger::NOTICE, false); + $this->assertTrue($handler->handle($this->getRecord(Logger::INFO))); + $this->assertFalse($handler->handle($this->getRecord(Logger::WARNING))); + + $handler = new FilterHandler($test, Logger::INFO, Logger::NOTICE, true); + $this->assertFalse($handler->handle($this->getRecord(Logger::INFO))); + $this->assertFalse($handler->handle($this->getRecord(Logger::WARNING))); + } + + /** + * @covers Monolog\Handler\FilterHandler::handle + */ + public function testHandleWithCallback() + { + $test = new TestHandler(); + $handler = new FilterHandler( + function ($record, $handler) use ($test) { + return $test; + }, Logger::INFO, Logger::NOTICE, false + ); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $this->assertFalse($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + } + + /** + * @covers Monolog\Handler\FilterHandler::handle + * @expectedException \RuntimeException + */ + public function testHandleWithBadCallbackThrowsException() + { + $handler = new FilterHandler( + function ($record, $handler) { + return 'foo'; + } + ); + $handler->handle($this->getRecord(Logger::WARNING)); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php new file mode 100755 index 0000000..0ec3653 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FingersCrossedHandlerTest.php @@ -0,0 +1,279 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy; +use Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy; +use Psr\Log\LogLevel; + +class FingersCrossedHandlerTest extends TestCase +{ + /** + * @covers Monolog\Handler\FingersCrossedHandler::__construct + * @covers Monolog\Handler\FingersCrossedHandler::handle + * @covers Monolog\Handler\FingersCrossedHandler::activate + */ + public function testHandleBuffers() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $this->assertFalse($test->hasDebugRecords()); + $this->assertFalse($test->hasInfoRecords()); + $handler->handle($this->getRecord(Logger::WARNING)); + $handler->close(); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue(count($test->getRecords()) === 3); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::handle + * @covers Monolog\Handler\FingersCrossedHandler::activate + */ + public function testHandleStopsBufferingAfterTrigger() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test); + $handler->handle($this->getRecord(Logger::WARNING)); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->close(); + $this->assertTrue($test->hasWarningRecords()); + $this->assertTrue($test->hasDebugRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::handle + * @covers Monolog\Handler\FingersCrossedHandler::activate + * @covers Monolog\Handler\FingersCrossedHandler::reset + */ + public function testHandleResetBufferingAfterReset() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test); + $handler->handle($this->getRecord(Logger::WARNING)); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->reset(); + $handler->handle($this->getRecord(Logger::INFO)); + $handler->close(); + $this->assertTrue($test->hasWarningRecords()); + $this->assertTrue($test->hasDebugRecords()); + $this->assertFalse($test->hasInfoRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::handle + * @covers Monolog\Handler\FingersCrossedHandler::activate + */ + public function testHandleResetBufferingAfterBeingTriggeredWhenStopBufferingIsDisabled() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, Logger::WARNING, 0, false, false); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::WARNING)); + $handler->handle($this->getRecord(Logger::INFO)); + $handler->close(); + $this->assertTrue($test->hasWarningRecords()); + $this->assertTrue($test->hasDebugRecords()); + $this->assertFalse($test->hasInfoRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::handle + * @covers Monolog\Handler\FingersCrossedHandler::activate + */ + public function testHandleBufferLimit() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, Logger::WARNING, 2); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertTrue($test->hasWarningRecords()); + $this->assertTrue($test->hasInfoRecords()); + $this->assertFalse($test->hasDebugRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::handle + * @covers Monolog\Handler\FingersCrossedHandler::activate + */ + public function testHandleWithCallback() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler(function ($record, $handler) use ($test) { + return $test; + }); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $this->assertFalse($test->hasDebugRecords()); + $this->assertFalse($test->hasInfoRecords()); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue(count($test->getRecords()) === 3); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::handle + * @covers Monolog\Handler\FingersCrossedHandler::activate + * @expectedException RuntimeException + */ + public function testHandleWithBadCallbackThrowsException() + { + $handler = new FingersCrossedHandler(function ($record, $handler) { + return 'foo'; + }); + $handler->handle($this->getRecord(Logger::WARNING)); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::isHandling + */ + public function testIsHandlingAlways() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, Logger::ERROR); + $this->assertTrue($handler->isHandling($this->getRecord(Logger::DEBUG))); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::__construct + * @covers Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy::__construct + * @covers Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy::isHandlerActivated + */ + public function testErrorLevelActivationStrategy() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Logger::WARNING)); + $handler->handle($this->getRecord(Logger::DEBUG)); + $this->assertFalse($test->hasDebugRecords()); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasWarningRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::__construct + * @covers Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy::__construct + * @covers Monolog\Handler\FingersCrossed\ErrorLevelActivationStrategy::isHandlerActivated + */ + public function testErrorLevelActivationStrategyWithPsrLevel() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy('warning')); + $handler->handle($this->getRecord(Logger::DEBUG)); + $this->assertFalse($test->hasDebugRecords()); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasWarningRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::__construct + * @covers Monolog\Handler\FingersCrossedHandler::activate + */ + public function testOverrideActivationStrategy() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy('warning')); + $handler->handle($this->getRecord(Logger::DEBUG)); + $this->assertFalse($test->hasDebugRecords()); + $handler->activate(); + $this->assertTrue($test->hasDebugRecords()); + $handler->handle($this->getRecord(Logger::INFO)); + $this->assertTrue($test->hasInfoRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::__construct + * @covers Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::isHandlerActivated + */ + public function testChannelLevelActivationStrategy() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, new ChannelLevelActivationStrategy(Logger::ERROR, array('othertest' => Logger::DEBUG))); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertFalse($test->hasWarningRecords()); + $record = $this->getRecord(Logger::DEBUG); + $record['channel'] = 'othertest'; + $handler->handle($record); + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasWarningRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::__construct + * @covers Monolog\Handler\FingersCrossed\ChannelLevelActivationStrategy::isHandlerActivated + */ + public function testChannelLevelActivationStrategyWithPsrLevels() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, new ChannelLevelActivationStrategy('error', array('othertest' => 'debug'))); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertFalse($test->hasWarningRecords()); + $record = $this->getRecord(Logger::DEBUG); + $record['channel'] = 'othertest'; + $handler->handle($record); + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasWarningRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::handle + * @covers Monolog\Handler\FingersCrossedHandler::activate + */ + public function testHandleUsesProcessors() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, Logger::INFO); + $handler->pushProcessor(function ($record) { + $record['extra']['foo'] = true; + + return $record; + }); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertTrue($test->hasWarningRecords()); + $records = $test->getRecords(); + $this->assertTrue($records[0]['extra']['foo']); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::close + */ + public function testPassthruOnClose() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Logger::WARNING), 0, true, true, Logger::INFO); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $handler->close(); + $this->assertFalse($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + } + + /** + * @covers Monolog\Handler\FingersCrossedHandler::close + */ + public function testPsrLevelPassthruOnClose() + { + $test = new TestHandler(); + $handler = new FingersCrossedHandler($test, new ErrorLevelActivationStrategy(Logger::WARNING), 0, true, true, LogLevel::INFO); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + $handler->close(); + $this->assertFalse($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php new file mode 100755 index 0000000..7a404e6 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FirePHPHandlerTest.php @@ -0,0 +1,96 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @covers Monolog\Handler\FirePHPHandler + */ +class FirePHPHandlerTest extends TestCase +{ + public function setUp() + { + TestFirePHPHandler::resetStatic(); + $_SERVER['HTTP_USER_AGENT'] = 'Monolog Test; FirePHP/1.0'; + } + + public function testHeaders() + { + $handler = new TestFirePHPHandler; + $handler->setFormatter($this->getIdentityFormatter()); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::WARNING)); + + $expected = array( + 'X-Wf-Protocol-1' => 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2', + 'X-Wf-1-Structure-1' => 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1', + 'X-Wf-1-Plugin-1' => 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3', + 'X-Wf-1-1-1-1' => 'test', + 'X-Wf-1-1-1-2' => 'test', + ); + + $this->assertEquals($expected, $handler->getHeaders()); + } + + public function testConcurrentHandlers() + { + $handler = new TestFirePHPHandler; + $handler->setFormatter($this->getIdentityFormatter()); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::WARNING)); + + $handler2 = new TestFirePHPHandler; + $handler2->setFormatter($this->getIdentityFormatter()); + $handler2->handle($this->getRecord(Logger::DEBUG)); + $handler2->handle($this->getRecord(Logger::WARNING)); + + $expected = array( + 'X-Wf-Protocol-1' => 'http://meta.wildfirehq.org/Protocol/JsonStream/0.2', + 'X-Wf-1-Structure-1' => 'http://meta.firephp.org/Wildfire/Structure/FirePHP/FirebugConsole/0.1', + 'X-Wf-1-Plugin-1' => 'http://meta.firephp.org/Wildfire/Plugin/FirePHP/Library-FirePHPCore/0.3', + 'X-Wf-1-1-1-1' => 'test', + 'X-Wf-1-1-1-2' => 'test', + ); + + $expected2 = array( + 'X-Wf-1-1-1-3' => 'test', + 'X-Wf-1-1-1-4' => 'test', + ); + + $this->assertEquals($expected, $handler->getHeaders()); + $this->assertEquals($expected2, $handler2->getHeaders()); + } +} + +class TestFirePHPHandler extends FirePHPHandler +{ + protected $headers = array(); + + public static function resetStatic() + { + self::$initialized = false; + self::$sendHeaders = true; + self::$messageIndex = 1; + } + + protected function sendHeader($header, $content) + { + $this->headers[$header] = $content; + } + + public function getHeaders() + { + return $this->headers; + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/Fixtures/.gitkeep b/vendor/monolog/monolog/tests/Monolog/Handler/Fixtures/.gitkeep new file mode 100755 index 0000000..e69de29 diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php new file mode 100755 index 0000000..91cdd31 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php @@ -0,0 +1,85 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\Logger; +use Monolog\TestCase; + +/** + * @coversDefaultClass \Monolog\Handler\FleepHookHandler + */ +class FleepHookHandlerTest extends TestCase +{ + /** + * Default token to use in tests + */ + const TOKEN = '123abc'; + + /** + * @var FleepHookHandler + */ + private $handler; + + public function setUp() + { + parent::setUp(); + + if (!extension_loaded('openssl')) { + $this->markTestSkipped('This test requires openssl extension to run'); + } + + // Create instances of the handler and logger for convenience + $this->handler = new FleepHookHandler(self::TOKEN); + } + + /** + * @covers ::__construct + */ + public function testConstructorSetsExpectedDefaults() + { + $this->assertEquals(Logger::DEBUG, $this->handler->getLevel()); + $this->assertEquals(true, $this->handler->getBubble()); + } + + /** + * @covers ::getDefaultFormatter + */ + public function testHandlerUsesLineFormatterWhichIgnoresEmptyArrays() + { + $record = array( + 'message' => 'msg', + 'context' => array(), + 'level' => Logger::DEBUG, + 'level_name' => Logger::getLevelName(Logger::DEBUG), + 'channel' => 'channel', + 'datetime' => new \DateTime(), + 'extra' => array(), + ); + + $expectedFormatter = new LineFormatter(null, null, true, true); + $expected = $expectedFormatter->format($record); + + $handlerFormatter = $this->handler->getFormatter(); + $actual = $handlerFormatter->format($record); + + $this->assertEquals($expected, $actual, 'Empty context and extra arrays should not be rendered'); + } + + /** + * @covers ::__construct + */ + public function testConnectionStringisConstructedCorrectly() + { + $this->assertEquals('ssl://' . FleepHookHandler::FLEEP_HOST . ':443', $this->handler->getConnectionString()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php new file mode 100755 index 0000000..4b120d5 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/FlowdockHandlerTest.php @@ -0,0 +1,88 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\FlowdockFormatter; +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @author Dominik Liebler + * @see https://www.hipchat.com/docs/api + */ +class FlowdockHandlerTest extends TestCase +{ + /** + * @var resource + */ + private $res; + + /** + * @var FlowdockHandler + */ + private $handler; + + public function setUp() + { + if (!extension_loaded('openssl')) { + $this->markTestSkipped('This test requires openssl to run'); + } + } + + public function testWriteHeader() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/POST \/v1\/messages\/team_inbox\/.* HTTP\/1.1\\r\\nHost: api.flowdock.com\\r\\nContent-Type: application\/json\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); + + return $content; + } + + /** + * @depends testWriteHeader + */ + public function testWriteContent($content) + { + $this->assertRegexp('/"source":"test_source"/', $content); + $this->assertRegexp('/"from_address":"source@test\.com"/', $content); + } + + private function createHandler($token = 'myToken') + { + $constructorArgs = array($token, Logger::DEBUG); + $this->res = fopen('php://memory', 'a'); + $this->handler = $this->getMock( + '\Monolog\Handler\FlowdockHandler', + array('fsockopen', 'streamSetTimeout', 'closeSocket'), + $constructorArgs + ); + + $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->handler, 'localhost:1234'); + + $this->handler->expects($this->any()) + ->method('fsockopen') + ->will($this->returnValue($this->res)); + $this->handler->expects($this->any()) + ->method('streamSetTimeout') + ->will($this->returnValue(true)); + $this->handler->expects($this->any()) + ->method('closeSocket') + ->will($this->returnValue(true)); + + $this->handler->setFormatter(new FlowdockFormatter('test_source', 'source@test.com')); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php new file mode 100755 index 0000000..9d007b1 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerLegacyTest.php @@ -0,0 +1,95 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Gelf\Message; +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Formatter\GelfMessageFormatter; + +class GelfHandlerLegacyTest extends TestCase +{ + public function setUp() + { + if (!class_exists('Gelf\MessagePublisher') || !class_exists('Gelf\Message')) { + $this->markTestSkipped("mlehner/gelf-php not installed"); + } + + require_once __DIR__ . '/GelfMockMessagePublisher.php'; + } + + /** + * @covers Monolog\Handler\GelfHandler::__construct + */ + public function testConstruct() + { + $handler = new GelfHandler($this->getMessagePublisher()); + $this->assertInstanceOf('Monolog\Handler\GelfHandler', $handler); + } + + protected function getHandler($messagePublisher) + { + $handler = new GelfHandler($messagePublisher); + + return $handler; + } + + protected function getMessagePublisher() + { + return new GelfMockMessagePublisher('localhost'); + } + + public function testDebug() + { + $messagePublisher = $this->getMessagePublisher(); + $handler = $this->getHandler($messagePublisher); + + $record = $this->getRecord(Logger::DEBUG, "A test debug message"); + $handler->handle($record); + + $this->assertEquals(7, $messagePublisher->lastMessage->getLevel()); + $this->assertEquals('test', $messagePublisher->lastMessage->getFacility()); + $this->assertEquals($record['message'], $messagePublisher->lastMessage->getShortMessage()); + $this->assertEquals(null, $messagePublisher->lastMessage->getFullMessage()); + } + + public function testWarning() + { + $messagePublisher = $this->getMessagePublisher(); + $handler = $this->getHandler($messagePublisher); + + $record = $this->getRecord(Logger::WARNING, "A test warning message"); + $handler->handle($record); + + $this->assertEquals(4, $messagePublisher->lastMessage->getLevel()); + $this->assertEquals('test', $messagePublisher->lastMessage->getFacility()); + $this->assertEquals($record['message'], $messagePublisher->lastMessage->getShortMessage()); + $this->assertEquals(null, $messagePublisher->lastMessage->getFullMessage()); + } + + public function testInjectedGelfMessageFormatter() + { + $messagePublisher = $this->getMessagePublisher(); + $handler = $this->getHandler($messagePublisher); + + $handler->setFormatter(new GelfMessageFormatter('mysystem', 'EXT', 'CTX')); + + $record = $this->getRecord(Logger::WARNING, "A test warning message"); + $record['extra']['blarg'] = 'yep'; + $record['context']['from'] = 'logger'; + $handler->handle($record); + + $this->assertEquals('mysystem', $messagePublisher->lastMessage->getHost()); + $this->assertArrayHasKey('_EXTblarg', $messagePublisher->lastMessage->toArray()); + $this->assertArrayHasKey('_CTXfrom', $messagePublisher->lastMessage->toArray()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php new file mode 100755 index 0000000..8cdd64f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/GelfHandlerTest.php @@ -0,0 +1,117 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Gelf\Message; +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Formatter\GelfMessageFormatter; + +class GelfHandlerTest extends TestCase +{ + public function setUp() + { + if (!class_exists('Gelf\Publisher') || !class_exists('Gelf\Message')) { + $this->markTestSkipped("graylog2/gelf-php not installed"); + } + } + + /** + * @covers Monolog\Handler\GelfHandler::__construct + */ + public function testConstruct() + { + $handler = new GelfHandler($this->getMessagePublisher()); + $this->assertInstanceOf('Monolog\Handler\GelfHandler', $handler); + } + + protected function getHandler($messagePublisher) + { + $handler = new GelfHandler($messagePublisher); + + return $handler; + } + + protected function getMessagePublisher() + { + return $this->getMock('Gelf\Publisher', array('publish'), array(), '', false); + } + + public function testDebug() + { + $record = $this->getRecord(Logger::DEBUG, "A test debug message"); + $expectedMessage = new Message(); + $expectedMessage + ->setLevel(7) + ->setFacility("test") + ->setShortMessage($record['message']) + ->setTimestamp($record['datetime']) + ; + + $messagePublisher = $this->getMessagePublisher(); + $messagePublisher->expects($this->once()) + ->method('publish') + ->with($expectedMessage); + + $handler = $this->getHandler($messagePublisher); + + $handler->handle($record); + } + + public function testWarning() + { + $record = $this->getRecord(Logger::WARNING, "A test warning message"); + $expectedMessage = new Message(); + $expectedMessage + ->setLevel(4) + ->setFacility("test") + ->setShortMessage($record['message']) + ->setTimestamp($record['datetime']) + ; + + $messagePublisher = $this->getMessagePublisher(); + $messagePublisher->expects($this->once()) + ->method('publish') + ->with($expectedMessage); + + $handler = $this->getHandler($messagePublisher); + + $handler->handle($record); + } + + public function testInjectedGelfMessageFormatter() + { + $record = $this->getRecord(Logger::WARNING, "A test warning message"); + $record['extra']['blarg'] = 'yep'; + $record['context']['from'] = 'logger'; + + $expectedMessage = new Message(); + $expectedMessage + ->setLevel(4) + ->setFacility("test") + ->setHost("mysystem") + ->setShortMessage($record['message']) + ->setTimestamp($record['datetime']) + ->setAdditional("EXTblarg", 'yep') + ->setAdditional("CTXfrom", 'logger') + ; + + $messagePublisher = $this->getMessagePublisher(); + $messagePublisher->expects($this->once()) + ->method('publish') + ->with($expectedMessage); + + $handler = $this->getHandler($messagePublisher); + $handler->setFormatter(new GelfMessageFormatter('mysystem', 'EXT', 'CTX')); + $handler->handle($record); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.php b/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.php new file mode 100755 index 0000000..873d92f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/GelfMockMessagePublisher.php @@ -0,0 +1,25 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Gelf\MessagePublisher; +use Gelf\Message; + +class GelfMockMessagePublisher extends MessagePublisher +{ + public function publish(Message $message) + { + $this->lastMessage = $message; + } + + public $lastMessage = null; +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php new file mode 100755 index 0000000..a1b8617 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/GroupHandlerTest.php @@ -0,0 +1,112 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +class GroupHandlerTest extends TestCase +{ + /** + * @covers Monolog\Handler\GroupHandler::__construct + * @expectedException InvalidArgumentException + */ + public function testConstructorOnlyTakesHandler() + { + new GroupHandler(array(new TestHandler(), "foo")); + } + + /** + * @covers Monolog\Handler\GroupHandler::__construct + * @covers Monolog\Handler\GroupHandler::handle + */ + public function testHandle() + { + $testHandlers = array(new TestHandler(), new TestHandler()); + $handler = new GroupHandler($testHandlers); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + foreach ($testHandlers as $test) { + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue(count($test->getRecords()) === 2); + } + } + + /** + * @covers Monolog\Handler\GroupHandler::handleBatch + */ + public function testHandleBatch() + { + $testHandlers = array(new TestHandler(), new TestHandler()); + $handler = new GroupHandler($testHandlers); + $handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO))); + foreach ($testHandlers as $test) { + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue(count($test->getRecords()) === 2); + } + } + + /** + * @covers Monolog\Handler\GroupHandler::isHandling + */ + public function testIsHandling() + { + $testHandlers = array(new TestHandler(Logger::ERROR), new TestHandler(Logger::WARNING)); + $handler = new GroupHandler($testHandlers); + $this->assertTrue($handler->isHandling($this->getRecord(Logger::ERROR))); + $this->assertTrue($handler->isHandling($this->getRecord(Logger::WARNING))); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); + } + + /** + * @covers Monolog\Handler\GroupHandler::handle + */ + public function testHandleUsesProcessors() + { + $test = new TestHandler(); + $handler = new GroupHandler(array($test)); + $handler->pushProcessor(function ($record) { + $record['extra']['foo'] = true; + + return $record; + }); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertTrue($test->hasWarningRecords()); + $records = $test->getRecords(); + $this->assertTrue($records[0]['extra']['foo']); + } + + /** + * @covers Monolog\Handler\GroupHandler::handle + */ + public function testHandleBatchUsesProcessors() + { + $testHandlers = array(new TestHandler(), new TestHandler()); + $handler = new GroupHandler($testHandlers); + $handler->pushProcessor(function ($record) { + $record['extra']['foo'] = true; + + return $record; + }); + $handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO))); + foreach ($testHandlers as $test) { + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue(count($test->getRecords()) === 2); + $records = $test->getRecords(); + $this->assertTrue($records[0]['extra']['foo']); + $this->assertTrue($records[1]['extra']['foo']); + } + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php new file mode 100755 index 0000000..d8d0452 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/HandlerWrapperTest.php @@ -0,0 +1,130 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; + +/** + * @author Alexey Karapetov + */ +class HandlerWrapperTest extends TestCase +{ + /** + * @var HandlerWrapper + */ + private $wrapper; + + private $handler; + + public function setUp() + { + parent::setUp(); + $this->handler = $this->getMock('Monolog\\Handler\\HandlerInterface'); + $this->wrapper = new HandlerWrapper($this->handler); + } + + /** + * @return array + */ + public function trueFalseDataProvider() + { + return array( + array(true), + array(false), + ); + } + + /** + * @param $result + * @dataProvider trueFalseDataProvider + */ + public function testIsHandling($result) + { + $record = $this->getRecord(); + $this->handler->expects($this->once()) + ->method('isHandling') + ->with($record) + ->willReturn($result); + + $this->assertEquals($result, $this->wrapper->isHandling($record)); + } + + /** + * @param $result + * @dataProvider trueFalseDataProvider + */ + public function testHandle($result) + { + $record = $this->getRecord(); + $this->handler->expects($this->once()) + ->method('handle') + ->with($record) + ->willReturn($result); + + $this->assertEquals($result, $this->wrapper->handle($record)); + } + + /** + * @param $result + * @dataProvider trueFalseDataProvider + */ + public function testHandleBatch($result) + { + $records = $this->getMultipleRecords(); + $this->handler->expects($this->once()) + ->method('handleBatch') + ->with($records) + ->willReturn($result); + + $this->assertEquals($result, $this->wrapper->handleBatch($records)); + } + + public function testPushProcessor() + { + $processor = function () {}; + $this->handler->expects($this->once()) + ->method('pushProcessor') + ->with($processor); + + $this->assertEquals($this->wrapper, $this->wrapper->pushProcessor($processor)); + } + + public function testPopProcessor() + { + $processor = function () {}; + $this->handler->expects($this->once()) + ->method('popProcessor') + ->willReturn($processor); + + $this->assertEquals($processor, $this->wrapper->popProcessor()); + } + + public function testSetFormatter() + { + $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $this->handler->expects($this->once()) + ->method('setFormatter') + ->with($formatter); + + $this->assertEquals($this->wrapper, $this->wrapper->setFormatter($formatter)); + } + + public function testGetFormatter() + { + $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $this->handler->expects($this->once()) + ->method('getFormatter') + ->willReturn($formatter); + + $this->assertEquals($formatter, $this->wrapper->getFormatter()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php new file mode 100755 index 0000000..52dc9da --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/HipChatHandlerTest.php @@ -0,0 +1,279 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @author Rafael Dohms + * @see https://www.hipchat.com/docs/api + */ +class HipChatHandlerTest extends TestCase +{ + private $res; + /** @var HipChatHandler */ + private $handler; + + public function testWriteHeader() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/POST \/v1\/rooms\/message\?format=json&auth_token=.* HTTP\/1.1\\r\\nHost: api.hipchat.com\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); + + return $content; + } + + public function testWriteCustomHostHeader() + { + $this->createHandler('myToken', 'room1', 'Monolog', true, 'hipchat.foo.bar'); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/POST \/v1\/rooms\/message\?format=json&auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); + + return $content; + } + + public function testWriteV2() + { + $this->createHandler('myToken', 'room1', 'Monolog', false, 'hipchat.foo.bar', 'v2'); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/POST \/v2\/room\/room1\/notification\?auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); + + return $content; + } + + public function testWriteV2Notify() + { + $this->createHandler('myToken', 'room1', 'Monolog', true, 'hipchat.foo.bar', 'v2'); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/POST \/v2\/room\/room1\/notification\?auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); + + return $content; + } + + public function testRoomSpaces() + { + $this->createHandler('myToken', 'room name', 'Monolog', false, 'hipchat.foo.bar', 'v2'); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/POST \/v2\/room\/room%20name\/notification\?auth_token=.* HTTP\/1.1\\r\\nHost: hipchat.foo.bar\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); + + return $content; + } + + /** + * @depends testWriteHeader + */ + public function testWriteContent($content) + { + $this->assertRegexp('/notify=0&message=test1&message_format=text&color=red&room_id=room1&from=Monolog$/', $content); + } + + public function testWriteContentV1WithoutName() + { + $this->createHandler('myToken', 'room1', null, false, 'hipchat.foo.bar', 'v1'); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/notify=0&message=test1&message_format=text&color=red&room_id=room1&from=$/', $content); + + return $content; + } + + /** + * @depends testWriteCustomHostHeader + */ + public function testWriteContentNotify($content) + { + $this->assertRegexp('/notify=1&message=test1&message_format=text&color=red&room_id=room1&from=Monolog$/', $content); + } + + /** + * @depends testWriteV2 + */ + public function testWriteContentV2($content) + { + $this->assertRegexp('/notify=false&message=test1&message_format=text&color=red&from=Monolog$/', $content); + } + + /** + * @depends testWriteV2Notify + */ + public function testWriteContentV2Notify($content) + { + $this->assertRegexp('/notify=true&message=test1&message_format=text&color=red&from=Monolog$/', $content); + } + + public function testWriteContentV2WithoutName() + { + $this->createHandler('myToken', 'room1', null, false, 'hipchat.foo.bar', 'v2'); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/notify=false&message=test1&message_format=text&color=red$/', $content); + + return $content; + } + + public function testWriteWithComplexMessage() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'Backup of database "example" finished in 16 minutes.')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/message=Backup\+of\+database\+%22example%22\+finished\+in\+16\+minutes\./', $content); + } + + public function testWriteTruncatesLongMessage() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::CRITICAL, str_repeat('abcde', 2000))); + fseek($this->res, 0); + $content = fread($this->res, 12000); + + $this->assertRegexp('/message='.str_repeat('abcde', 1900).'\+%5Btruncated%5D/', $content); + } + + /** + * @dataProvider provideLevelColors + */ + public function testWriteWithErrorLevelsAndColors($level, $expectedColor) + { + $this->createHandler(); + $this->handler->handle($this->getRecord($level, 'Backup of database "example" finished in 16 minutes.')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/color='.$expectedColor.'/', $content); + } + + public function provideLevelColors() + { + return array( + array(Logger::DEBUG, 'gray'), + array(Logger::INFO, 'green'), + array(Logger::WARNING, 'yellow'), + array(Logger::ERROR, 'red'), + array(Logger::CRITICAL, 'red'), + array(Logger::ALERT, 'red'), + array(Logger::EMERGENCY,'red'), + array(Logger::NOTICE, 'green'), + ); + } + + /** + * @dataProvider provideBatchRecords + */ + public function testHandleBatch($records, $expectedColor) + { + $this->createHandler(); + + $this->handler->handleBatch($records); + + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/color='.$expectedColor.'/', $content); + } + + public function provideBatchRecords() + { + return array( + array( + array( + array('level' => Logger::WARNING, 'message' => 'Oh bugger!', 'level_name' => 'warning', 'datetime' => new \DateTime()), + array('level' => Logger::NOTICE, 'message' => 'Something noticeable happened.', 'level_name' => 'notice', 'datetime' => new \DateTime()), + array('level' => Logger::CRITICAL, 'message' => 'Everything is broken!', 'level_name' => 'critical', 'datetime' => new \DateTime()), + ), + 'red', + ), + array( + array( + array('level' => Logger::WARNING, 'message' => 'Oh bugger!', 'level_name' => 'warning', 'datetime' => new \DateTime()), + array('level' => Logger::NOTICE, 'message' => 'Something noticeable happened.', 'level_name' => 'notice', 'datetime' => new \DateTime()), + ), + 'yellow', + ), + array( + array( + array('level' => Logger::DEBUG, 'message' => 'Just debugging.', 'level_name' => 'debug', 'datetime' => new \DateTime()), + array('level' => Logger::NOTICE, 'message' => 'Something noticeable happened.', 'level_name' => 'notice', 'datetime' => new \DateTime()), + ), + 'green', + ), + array( + array( + array('level' => Logger::DEBUG, 'message' => 'Just debugging.', 'level_name' => 'debug', 'datetime' => new \DateTime()), + ), + 'gray', + ), + ); + } + + private function createHandler($token = 'myToken', $room = 'room1', $name = 'Monolog', $notify = false, $host = 'api.hipchat.com', $version = 'v1') + { + $constructorArgs = array($token, $room, $name, $notify, Logger::DEBUG, true, true, 'text', $host, $version); + $this->res = fopen('php://memory', 'a'); + $this->handler = $this->getMock( + '\Monolog\Handler\HipChatHandler', + array('fsockopen', 'streamSetTimeout', 'closeSocket'), + $constructorArgs + ); + + $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->handler, 'localhost:1234'); + + $this->handler->expects($this->any()) + ->method('fsockopen') + ->will($this->returnValue($this->res)); + $this->handler->expects($this->any()) + ->method('streamSetTimeout') + ->will($this->returnValue(true)); + $this->handler->expects($this->any()) + ->method('closeSocket') + ->will($this->returnValue(true)); + + $this->handler->setFormatter($this->getIdentityFormatter()); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testCreateWithTooLongName() + { + $hipChatHandler = new HipChatHandler('token', 'room', 'SixteenCharsHere'); + } + + public function testCreateWithTooLongNameV2() + { + // creating a handler with too long of a name but using the v2 api doesn't matter. + $hipChatHandler = new HipChatHandler('token', 'room', 'SixteenCharsHere', false, Logger::CRITICAL, true, true, 'test', 'api.hipchat.com', 'v2'); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/InsightOpsHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/InsightOpsHandlerTest.php new file mode 100755 index 0000000..97c18b5 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/InsightOpsHandlerTest.php @@ -0,0 +1,80 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + + namespace Monolog\Handler; + + use Monolog\TestCase; + use Monolog\Logger; + +/** + * @author Robert Kaufmann III + * @author Gabriel Machado + */ +class InsightOpsHandlerTest extends TestCase +{ + /** + * @var resource + */ + private $resource; + + /** + * @var LogEntriesHandler + */ + private $handler; + + public function testWriteContent() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'Critical write test')); + + fseek($this->resource, 0); + $content = fread($this->resource, 1024); + + $this->assertRegexp('/testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] test.CRITICAL: Critical write test/', $content); + } + + public function testWriteBatchContent() + { + $this->createHandler(); + $this->handler->handleBatch($this->getMultipleRecords()); + + fseek($this->resource, 0); + $content = fread($this->resource, 1024); + + $this->assertRegexp('/(testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] .* \[\] \[\]\n){3}/', $content); + } + + private function createHandler() + { + $useSSL = extension_loaded('openssl'); + $args = array('testToken', 'us', $useSSL, Logger::DEBUG, true); + $this->resource = fopen('php://memory', 'a'); + $this->handler = $this->getMock( + '\Monolog\Handler\InsightOpsHandler', + array('fsockopen', 'streamSetTimeout', 'closeSocket'), + $args + ); + + $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->handler, 'localhost:1234'); + + $this->handler->expects($this->any()) + ->method('fsockopen') + ->will($this->returnValue($this->resource)); + $this->handler->expects($this->any()) + ->method('streamSetTimeout') + ->will($this->returnValue(true)); + $this->handler->expects($this->any()) + ->method('closeSocket') + ->will($this->returnValue(true)); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php new file mode 100755 index 0000000..b2deb40 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/LogEntriesHandlerTest.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @author Robert Kaufmann III + */ +class LogEntriesHandlerTest extends TestCase +{ + /** + * @var resource + */ + private $res; + + /** + * @var LogEntriesHandler + */ + private $handler; + + public function testWriteContent() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'Critical write test')); + + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] test.CRITICAL: Critical write test/', $content); + } + + public function testWriteBatchContent() + { + $records = array( + $this->getRecord(), + $this->getRecord(), + $this->getRecord(), + ); + $this->createHandler(); + $this->handler->handleBatch($records); + + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/(testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] .* \[\] \[\]\n){3}/', $content); + } + + private function createHandler() + { + $useSSL = extension_loaded('openssl'); + $args = array('testToken', $useSSL, Logger::DEBUG, true); + $this->res = fopen('php://memory', 'a'); + $this->handler = $this->getMock( + '\Monolog\Handler\LogEntriesHandler', + array('fsockopen', 'streamSetTimeout', 'closeSocket'), + $args + ); + + $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->handler, 'localhost:1234'); + + $this->handler->expects($this->any()) + ->method('fsockopen') + ->will($this->returnValue($this->res)); + $this->handler->expects($this->any()) + ->method('streamSetTimeout') + ->will($this->returnValue(true)); + $this->handler->expects($this->any()) + ->method('closeSocket') + ->will($this->returnValue(true)); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php new file mode 100755 index 0000000..6754f3d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/MailHandlerTest.php @@ -0,0 +1,75 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\TestCase; + +class MailHandlerTest extends TestCase +{ + /** + * @covers Monolog\Handler\MailHandler::handleBatch + */ + public function testHandleBatch() + { + $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $formatter->expects($this->once()) + ->method('formatBatch'); // Each record is formatted + + $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler'); + $handler->expects($this->once()) + ->method('send'); + $handler->expects($this->never()) + ->method('write'); // write is for individual records + + $handler->setFormatter($formatter); + + $handler->handleBatch($this->getMultipleRecords()); + } + + /** + * @covers Monolog\Handler\MailHandler::handleBatch + */ + public function testHandleBatchNotSendsMailIfMessagesAreBelowLevel() + { + $records = array( + $this->getRecord(Logger::DEBUG, 'debug message 1'), + $this->getRecord(Logger::DEBUG, 'debug message 2'), + $this->getRecord(Logger::INFO, 'information'), + ); + + $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler'); + $handler->expects($this->never()) + ->method('send'); + $handler->setLevel(Logger::ERROR); + + $handler->handleBatch($records); + } + + /** + * @covers Monolog\Handler\MailHandler::write + */ + public function testHandle() + { + $handler = $this->getMockForAbstractClass('Monolog\\Handler\\MailHandler'); + + $record = $this->getRecord(); + $records = array($record); + $records[0]['formatted'] = '['.$record['datetime']->format('Y-m-d H:i:s').'] test.WARNING: test [] []'."\n"; + + $handler->expects($this->once()) + ->method('send') + ->with($records[0]['formatted'], $records); + + $handler->handle($record); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php b/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php new file mode 100755 index 0000000..a083322 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/MockRavenClient.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Raven_Client; + +class MockRavenClient extends Raven_Client +{ + public function capture($data, $stack, $vars = null) + { + $data = array_merge($this->get_user_data(), $data); + $this->lastData = $data; + $this->lastStack = $stack; + } + + public $lastData; + public $lastStack; +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php new file mode 100755 index 0000000..0fdef63 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/MongoDBHandlerTest.php @@ -0,0 +1,65 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +class MongoDBHandlerTest extends TestCase +{ + /** + * @expectedException InvalidArgumentException + */ + public function testConstructorShouldThrowExceptionForInvalidMongo() + { + new MongoDBHandler(new \stdClass(), 'DB', 'Collection'); + } + + public function testHandle() + { + $mongo = $this->getMock('Mongo', array('selectCollection'), array(), '', false); + $collection = $this->getMock('stdClass', array('save')); + + $mongo->expects($this->once()) + ->method('selectCollection') + ->with('DB', 'Collection') + ->will($this->returnValue($collection)); + + $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); + + $expected = array( + 'message' => 'test', + 'context' => array('data' => '[object] (stdClass: {})', 'foo' => 34), + 'level' => Logger::WARNING, + 'level_name' => 'WARNING', + 'channel' => 'test', + 'datetime' => $record['datetime']->format('Y-m-d H:i:s'), + 'extra' => array(), + ); + + $collection->expects($this->once()) + ->method('save') + ->with($expected); + + $handler = new MongoDBHandler($mongo, 'DB', 'Collection'); + $handler->handle($record); + } +} + +if (!class_exists('Mongo')) { + class Mongo + { + public function selectCollection() + { + } + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php new file mode 100755 index 0000000..ddf545d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php @@ -0,0 +1,111 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use InvalidArgumentException; + +function mail($to, $subject, $message, $additional_headers = null, $additional_parameters = null) +{ + $GLOBALS['mail'][] = func_get_args(); +} + +class NativeMailerHandlerTest extends TestCase +{ + protected function setUp() + { + $GLOBALS['mail'] = array(); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testConstructorHeaderInjection() + { + $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', "receiver@example.org\r\nFrom: faked@attacker.org"); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testSetterHeaderInjection() + { + $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); + $mailer->addHeader("Content-Type: text/html\r\nFrom: faked@attacker.org"); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testSetterArrayHeaderInjection() + { + $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); + $mailer->addHeader(array("Content-Type: text/html\r\nFrom: faked@attacker.org")); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testSetterContentTypeInjection() + { + $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); + $mailer->setContentType("text/html\r\nFrom: faked@attacker.org"); + } + + /** + * @expectedException InvalidArgumentException + */ + public function testSetterEncodingInjection() + { + $mailer = new NativeMailerHandler('spammer@example.org', 'dear victim', 'receiver@example.org'); + $mailer->setEncoding("utf-8\r\nFrom: faked@attacker.org"); + } + + public function testSend() + { + $to = 'spammer@example.org'; + $subject = 'dear victim'; + $from = 'receiver@example.org'; + + $mailer = new NativeMailerHandler($to, $subject, $from); + $mailer->handleBatch(array()); + + // batch is empty, nothing sent + $this->assertEmpty($GLOBALS['mail']); + + // non-empty batch + $mailer->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); + $this->assertNotEmpty($GLOBALS['mail']); + $this->assertInternalType('array', $GLOBALS['mail']); + $this->assertArrayHasKey('0', $GLOBALS['mail']); + $params = $GLOBALS['mail'][0]; + $this->assertCount(5, $params); + $this->assertSame($to, $params[0]); + $this->assertSame($subject, $params[1]); + $this->assertStringEndsWith(" test.ERROR: Foo Bar Baz [] []\n", $params[2]); + $this->assertSame("From: $from\r\nContent-type: text/plain; charset=utf-8\r\n", $params[3]); + $this->assertSame('', $params[4]); + } + + public function testMessageSubjectFormatting() + { + $mailer = new NativeMailerHandler('to@example.org', 'Alert: %level_name% %message%', 'from@example.org'); + $mailer->handle($this->getRecord(Logger::ERROR, "Foo\nBar\r\n\r\nBaz")); + $this->assertNotEmpty($GLOBALS['mail']); + $this->assertInternalType('array', $GLOBALS['mail']); + $this->assertArrayHasKey('0', $GLOBALS['mail']); + $params = $GLOBALS['mail'][0]; + $this->assertCount(5, $params); + $this->assertSame('Alert: ERROR Foo Bar Baz', $params[1]); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php new file mode 100755 index 0000000..4d3a615 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/NewRelicHandlerTest.php @@ -0,0 +1,200 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Formatter\LineFormatter; +use Monolog\TestCase; +use Monolog\Logger; + +class NewRelicHandlerTest extends TestCase +{ + public static $appname; + public static $customParameters; + public static $transactionName; + + public function setUp() + { + self::$appname = null; + self::$customParameters = array(); + self::$transactionName = null; + } + + /** + * @expectedException Monolog\Handler\MissingExtensionException + */ + public function testThehandlerThrowsAnExceptionIfTheNRExtensionIsNotLoaded() + { + $handler = new StubNewRelicHandlerWithoutExtension(); + $handler->handle($this->getRecord(Logger::ERROR)); + } + + public function testThehandlerCanHandleTheRecord() + { + $handler = new StubNewRelicHandler(); + $handler->handle($this->getRecord(Logger::ERROR)); + } + + public function testThehandlerCanAddContextParamsToTheNewRelicTrace() + { + $handler = new StubNewRelicHandler(); + $handler->handle($this->getRecord(Logger::ERROR, 'log message', array('a' => 'b'))); + $this->assertEquals(array('context_a' => 'b'), self::$customParameters); + } + + public function testThehandlerCanAddExplodedContextParamsToTheNewRelicTrace() + { + $handler = new StubNewRelicHandler(Logger::ERROR, true, self::$appname, true); + $handler->handle($this->getRecord( + Logger::ERROR, + 'log message', + array('a' => array('key1' => 'value1', 'key2' => 'value2')) + )); + $this->assertEquals( + array('context_a_key1' => 'value1', 'context_a_key2' => 'value2'), + self::$customParameters + ); + } + + public function testThehandlerCanAddExtraParamsToTheNewRelicTrace() + { + $record = $this->getRecord(Logger::ERROR, 'log message'); + $record['extra'] = array('c' => 'd'); + + $handler = new StubNewRelicHandler(); + $handler->handle($record); + + $this->assertEquals(array('extra_c' => 'd'), self::$customParameters); + } + + public function testThehandlerCanAddExplodedExtraParamsToTheNewRelicTrace() + { + $record = $this->getRecord(Logger::ERROR, 'log message'); + $record['extra'] = array('c' => array('key1' => 'value1', 'key2' => 'value2')); + + $handler = new StubNewRelicHandler(Logger::ERROR, true, self::$appname, true); + $handler->handle($record); + + $this->assertEquals( + array('extra_c_key1' => 'value1', 'extra_c_key2' => 'value2'), + self::$customParameters + ); + } + + public function testThehandlerCanAddExtraContextAndParamsToTheNewRelicTrace() + { + $record = $this->getRecord(Logger::ERROR, 'log message', array('a' => 'b')); + $record['extra'] = array('c' => 'd'); + + $handler = new StubNewRelicHandler(); + $handler->handle($record); + + $expected = array( + 'context_a' => 'b', + 'extra_c' => 'd', + ); + + $this->assertEquals($expected, self::$customParameters); + } + + public function testThehandlerCanHandleTheRecordsFormattedUsingTheLineFormatter() + { + $handler = new StubNewRelicHandler(); + $handler->setFormatter(new LineFormatter()); + $handler->handle($this->getRecord(Logger::ERROR)); + } + + public function testTheAppNameIsNullByDefault() + { + $handler = new StubNewRelicHandler(); + $handler->handle($this->getRecord(Logger::ERROR, 'log message')); + + $this->assertEquals(null, self::$appname); + } + + public function testTheAppNameCanBeInjectedFromtheConstructor() + { + $handler = new StubNewRelicHandler(Logger::DEBUG, false, 'myAppName'); + $handler->handle($this->getRecord(Logger::ERROR, 'log message')); + + $this->assertEquals('myAppName', self::$appname); + } + + public function testTheAppNameCanBeOverriddenFromEachLog() + { + $handler = new StubNewRelicHandler(Logger::DEBUG, false, 'myAppName'); + $handler->handle($this->getRecord(Logger::ERROR, 'log message', array('appname' => 'logAppName'))); + + $this->assertEquals('logAppName', self::$appname); + } + + public function testTheTransactionNameIsNullByDefault() + { + $handler = new StubNewRelicHandler(); + $handler->handle($this->getRecord(Logger::ERROR, 'log message')); + + $this->assertEquals(null, self::$transactionName); + } + + public function testTheTransactionNameCanBeInjectedFromTheConstructor() + { + $handler = new StubNewRelicHandler(Logger::DEBUG, false, null, false, 'myTransaction'); + $handler->handle($this->getRecord(Logger::ERROR, 'log message')); + + $this->assertEquals('myTransaction', self::$transactionName); + } + + public function testTheTransactionNameCanBeOverriddenFromEachLog() + { + $handler = new StubNewRelicHandler(Logger::DEBUG, false, null, false, 'myTransaction'); + $handler->handle($this->getRecord(Logger::ERROR, 'log message', array('transaction_name' => 'logTransactName'))); + + $this->assertEquals('logTransactName', self::$transactionName); + } +} + +class StubNewRelicHandlerWithoutExtension extends NewRelicHandler +{ + protected function isNewRelicEnabled() + { + return false; + } +} + +class StubNewRelicHandler extends NewRelicHandler +{ + protected function isNewRelicEnabled() + { + return true; + } +} + +function newrelic_notice_error() +{ + return true; +} + +function newrelic_set_appname($appname) +{ + return NewRelicHandlerTest::$appname = $appname; +} + +function newrelic_name_transaction($transactionName) +{ + return NewRelicHandlerTest::$transactionName = $transactionName; +} + +function newrelic_add_custom_parameter($key, $value) +{ + NewRelicHandlerTest::$customParameters[$key] = $value; + + return true; +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php new file mode 100755 index 0000000..292df78 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/NullHandlerTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @covers Monolog\Handler\NullHandler::handle + */ +class NullHandlerTest extends TestCase +{ + public function testHandle() + { + $handler = new NullHandler(); + $this->assertTrue($handler->handle($this->getRecord())); + } + + public function testHandleLowerLevelRecord() + { + $handler = new NullHandler(Logger::WARNING); + $this->assertFalse($handler->handle($this->getRecord(Logger::DEBUG))); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php new file mode 100755 index 0000000..152573e --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/PHPConsoleHandlerTest.php @@ -0,0 +1,273 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Exception; +use Monolog\ErrorHandler; +use Monolog\Logger; +use Monolog\TestCase; +use PhpConsole\Connector; +use PhpConsole\Dispatcher\Debug as DebugDispatcher; +use PhpConsole\Dispatcher\Errors as ErrorDispatcher; +use PhpConsole\Handler; +use PHPUnit_Framework_MockObject_MockObject; + +/** + * @covers Monolog\Handler\PHPConsoleHandler + * @author Sergey Barbushin https://www.linkedin.com/in/barbushin + */ +class PHPConsoleHandlerTest extends TestCase +{ + /** @var Connector|PHPUnit_Framework_MockObject_MockObject */ + protected $connector; + /** @var DebugDispatcher|PHPUnit_Framework_MockObject_MockObject */ + protected $debugDispatcher; + /** @var ErrorDispatcher|PHPUnit_Framework_MockObject_MockObject */ + protected $errorDispatcher; + + protected function setUp() + { + if (!class_exists('PhpConsole\Connector')) { + $this->markTestSkipped('PHP Console library not found. See https://github.com/barbushin/php-console#installation'); + } + $this->connector = $this->initConnectorMock(); + + $this->debugDispatcher = $this->initDebugDispatcherMock($this->connector); + $this->connector->setDebugDispatcher($this->debugDispatcher); + + $this->errorDispatcher = $this->initErrorDispatcherMock($this->connector); + $this->connector->setErrorsDispatcher($this->errorDispatcher); + } + + protected function initDebugDispatcherMock(Connector $connector) + { + return $this->getMockBuilder('PhpConsole\Dispatcher\Debug') + ->disableOriginalConstructor() + ->setMethods(array('dispatchDebug')) + ->setConstructorArgs(array($connector, $connector->getDumper())) + ->getMock(); + } + + protected function initErrorDispatcherMock(Connector $connector) + { + return $this->getMockBuilder('PhpConsole\Dispatcher\Errors') + ->disableOriginalConstructor() + ->setMethods(array('dispatchError', 'dispatchException')) + ->setConstructorArgs(array($connector, $connector->getDumper())) + ->getMock(); + } + + protected function initConnectorMock() + { + $connector = $this->getMockBuilder('PhpConsole\Connector') + ->disableOriginalConstructor() + ->setMethods(array( + 'sendMessage', + 'onShutDown', + 'isActiveClient', + 'setSourcesBasePath', + 'setServerEncoding', + 'setPassword', + 'enableSslOnlyMode', + 'setAllowedIpMasks', + 'setHeadersLimit', + 'startEvalRequestsListener', + )) + ->getMock(); + + $connector->expects($this->any()) + ->method('isActiveClient') + ->will($this->returnValue(true)); + + return $connector; + } + + protected function getHandlerDefaultOption($name) + { + $handler = new PHPConsoleHandler(array(), $this->connector); + $options = $handler->getOptions(); + + return $options[$name]; + } + + protected function initLogger($handlerOptions = array(), $level = Logger::DEBUG) + { + return new Logger('test', array( + new PHPConsoleHandler($handlerOptions, $this->connector, $level), + )); + } + + public function testInitWithDefaultConnector() + { + $handler = new PHPConsoleHandler(); + $this->assertEquals(spl_object_hash(Connector::getInstance()), spl_object_hash($handler->getConnector())); + } + + public function testInitWithCustomConnector() + { + $handler = new PHPConsoleHandler(array(), $this->connector); + $this->assertEquals(spl_object_hash($this->connector), spl_object_hash($handler->getConnector())); + } + + public function testDebug() + { + $this->debugDispatcher->expects($this->once())->method('dispatchDebug')->with($this->equalTo('test')); + $this->initLogger()->addDebug('test'); + } + + public function testDebugContextInMessage() + { + $message = 'test'; + $tag = 'tag'; + $context = array($tag, 'custom' => mt_rand()); + $expectedMessage = $message . ' ' . json_encode(array_slice($context, 1)); + $this->debugDispatcher->expects($this->once())->method('dispatchDebug')->with( + $this->equalTo($expectedMessage), + $this->equalTo($tag) + ); + $this->initLogger()->addDebug($message, $context); + } + + public function testDebugTags($tagsContextKeys = null) + { + $expectedTags = mt_rand(); + $logger = $this->initLogger($tagsContextKeys ? array('debugTagsKeysInContext' => $tagsContextKeys) : array()); + if (!$tagsContextKeys) { + $tagsContextKeys = $this->getHandlerDefaultOption('debugTagsKeysInContext'); + } + foreach ($tagsContextKeys as $key) { + $debugDispatcher = $this->initDebugDispatcherMock($this->connector); + $debugDispatcher->expects($this->once())->method('dispatchDebug')->with( + $this->anything(), + $this->equalTo($expectedTags) + ); + $this->connector->setDebugDispatcher($debugDispatcher); + $logger->addDebug('test', array($key => $expectedTags)); + } + } + + public function testError($classesPartialsTraceIgnore = null) + { + $code = E_USER_NOTICE; + $message = 'message'; + $file = __FILE__; + $line = __LINE__; + $this->errorDispatcher->expects($this->once())->method('dispatchError')->with( + $this->equalTo($code), + $this->equalTo($message), + $this->equalTo($file), + $this->equalTo($line), + $classesPartialsTraceIgnore ?: $this->equalTo($this->getHandlerDefaultOption('classesPartialsTraceIgnore')) + ); + $errorHandler = ErrorHandler::register($this->initLogger($classesPartialsTraceIgnore ? array('classesPartialsTraceIgnore' => $classesPartialsTraceIgnore) : array()), false); + $errorHandler->registerErrorHandler(array(), false, E_USER_WARNING); + $errorHandler->handleError($code, $message, $file, $line); + } + + public function testException() + { + $e = new Exception(); + $this->errorDispatcher->expects($this->once())->method('dispatchException')->with( + $this->equalTo($e) + ); + $handler = $this->initLogger(); + $handler->log( + \Psr\Log\LogLevel::ERROR, + sprintf('Uncaught Exception %s: "%s" at %s line %s', get_class($e), $e->getMessage(), $e->getFile(), $e->getLine()), + array('exception' => $e) + ); + } + + /** + * @expectedException Exception + */ + public function testWrongOptionsThrowsException() + { + new PHPConsoleHandler(array('xxx' => 1)); + } + + public function testOptionEnabled() + { + $this->debugDispatcher->expects($this->never())->method('dispatchDebug'); + $this->initLogger(array('enabled' => false))->addDebug('test'); + } + + public function testOptionClassesPartialsTraceIgnore() + { + $this->testError(array('Class', 'Namespace\\')); + } + + public function testOptionDebugTagsKeysInContext() + { + $this->testDebugTags(array('key1', 'key2')); + } + + public function testOptionUseOwnErrorsAndExceptionsHandler() + { + $this->initLogger(array('useOwnErrorsHandler' => true, 'useOwnExceptionsHandler' => true)); + $this->assertEquals(array(Handler::getInstance(), 'handleError'), set_error_handler(function () { + })); + $this->assertEquals(array(Handler::getInstance(), 'handleException'), set_exception_handler(function () { + })); + } + + public static function provideConnectorMethodsOptionsSets() + { + return array( + array('sourcesBasePath', 'setSourcesBasePath', __DIR__), + array('serverEncoding', 'setServerEncoding', 'cp1251'), + array('password', 'setPassword', '******'), + array('enableSslOnlyMode', 'enableSslOnlyMode', true, false), + array('ipMasks', 'setAllowedIpMasks', array('127.0.0.*')), + array('headersLimit', 'setHeadersLimit', 2500), + array('enableEvalListener', 'startEvalRequestsListener', true, false), + ); + } + + /** + * @dataProvider provideConnectorMethodsOptionsSets + */ + public function testOptionCallsConnectorMethod($option, $method, $value, $isArgument = true) + { + $expectCall = $this->connector->expects($this->once())->method($method); + if ($isArgument) { + $expectCall->with($value); + } + new PHPConsoleHandler(array($option => $value), $this->connector); + } + + public function testOptionDetectDumpTraceAndSource() + { + new PHPConsoleHandler(array('detectDumpTraceAndSource' => true), $this->connector); + $this->assertTrue($this->connector->getDebugDispatcher()->detectTraceAndSource); + } + + public static function provideDumperOptionsValues() + { + return array( + array('dumperLevelLimit', 'levelLimit', 1001), + array('dumperItemsCountLimit', 'itemsCountLimit', 1002), + array('dumperItemSizeLimit', 'itemSizeLimit', 1003), + array('dumperDumpSizeLimit', 'dumpSizeLimit', 1004), + array('dumperDetectCallbacks', 'detectCallbacks', true), + ); + } + + /** + * @dataProvider provideDumperOptionsValues + */ + public function testDumperOptions($option, $dumperProperty, $value) + { + new PHPConsoleHandler(array($option => $value), $this->connector); + $this->assertEquals($value, $this->connector->getDumper()->$dumperProperty); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php new file mode 100755 index 0000000..64eaab1 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/PsrHandlerTest.php @@ -0,0 +1,50 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @covers Monolog\Handler\PsrHandler::handle + */ +class PsrHandlerTest extends TestCase +{ + public function logLevelProvider() + { + $levels = array(); + $monologLogger = new Logger(''); + + foreach ($monologLogger->getLevels() as $levelName => $level) { + $levels[] = array($levelName, $level); + } + + return $levels; + } + + /** + * @dataProvider logLevelProvider + */ + public function testHandlesAllLevels($levelName, $level) + { + $message = 'Hello, world! ' . $level; + $context = array('foo' => 'bar', 'level' => $level); + + $psrLogger = $this->getMock('Psr\Log\NullLogger'); + $psrLogger->expects($this->once()) + ->method('log') + ->with(strtolower($levelName), $message, $context); + + $handler = new PsrHandler($psrLogger); + $handler->handle(array('level' => $level, 'level_name' => $levelName, 'message' => $message, 'context' => $context)); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php new file mode 100755 index 0000000..56df474 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/PushoverHandlerTest.php @@ -0,0 +1,141 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * Almost all examples (expected header, titles, messages) taken from + * https://www.pushover.net/api + * @author Sebastian Göttschkes + * @see https://www.pushover.net/api + */ +class PushoverHandlerTest extends TestCase +{ + private $res; + private $handler; + + public function testWriteHeader() + { + $this->createHandler(); + $this->handler->setHighPriorityLevel(Logger::EMERGENCY); // skip priority notifications + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/POST \/1\/messages.json HTTP\/1.1\\r\\nHost: api.pushover.net\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); + + return $content; + } + + /** + * @depends testWriteHeader + */ + public function testWriteContent($content) + { + $this->assertRegexp('/token=myToken&user=myUser&message=test1&title=Monolog×tamp=\d{10}$/', $content); + } + + public function testWriteWithComplexTitle() + { + $this->createHandler('myToken', 'myUser', 'Backup finished - SQL1'); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/title=Backup\+finished\+-\+SQL1/', $content); + } + + public function testWriteWithComplexMessage() + { + $this->createHandler(); + $this->handler->setHighPriorityLevel(Logger::EMERGENCY); // skip priority notifications + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'Backup of database "example" finished in 16 minutes.')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/message=Backup\+of\+database\+%22example%22\+finished\+in\+16\+minutes\./', $content); + } + + public function testWriteWithTooLongMessage() + { + $message = str_pad('test', 520, 'a'); + $this->createHandler(); + $this->handler->setHighPriorityLevel(Logger::EMERGENCY); // skip priority notifications + $this->handler->handle($this->getRecord(Logger::CRITICAL, $message)); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $expectedMessage = substr($message, 0, 505); + + $this->assertRegexp('/message=' . $expectedMessage . '&title/', $content); + } + + public function testWriteWithHighPriority() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/token=myToken&user=myUser&message=test1&title=Monolog×tamp=\d{10}&priority=1$/', $content); + } + + public function testWriteWithEmergencyPriority() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::EMERGENCY, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/token=myToken&user=myUser&message=test1&title=Monolog×tamp=\d{10}&priority=2&retry=30&expire=25200$/', $content); + } + + public function testWriteToMultipleUsers() + { + $this->createHandler('myToken', array('userA', 'userB')); + $this->handler->handle($this->getRecord(Logger::EMERGENCY, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/token=myToken&user=userA&message=test1&title=Monolog×tamp=\d{10}&priority=2&retry=30&expire=25200POST/', $content); + $this->assertRegexp('/token=myToken&user=userB&message=test1&title=Monolog×tamp=\d{10}&priority=2&retry=30&expire=25200$/', $content); + } + + private function createHandler($token = 'myToken', $user = 'myUser', $title = 'Monolog') + { + $constructorArgs = array($token, $user, $title); + $this->res = fopen('php://memory', 'a'); + $this->handler = $this->getMock( + '\Monolog\Handler\PushoverHandler', + array('fsockopen', 'streamSetTimeout', 'closeSocket'), + $constructorArgs + ); + + $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->handler, 'localhost:1234'); + + $this->handler->expects($this->any()) + ->method('fsockopen') + ->will($this->returnValue($this->res)); + $this->handler->expects($this->any()) + ->method('streamSetTimeout') + ->will($this->returnValue(true)); + $this->handler->expects($this->any()) + ->method('closeSocket') + ->will($this->returnValue(true)); + + $this->handler->setFormatter($this->getIdentityFormatter()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php new file mode 100755 index 0000000..26d212b --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php @@ -0,0 +1,255 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; + +class RavenHandlerTest extends TestCase +{ + public function setUp() + { + if (!class_exists('Raven_Client')) { + $this->markTestSkipped('raven/raven not installed'); + } + + require_once __DIR__ . '/MockRavenClient.php'; + } + + /** + * @covers Monolog\Handler\RavenHandler::__construct + */ + public function testConstruct() + { + $handler = new RavenHandler($this->getRavenClient()); + $this->assertInstanceOf('Monolog\Handler\RavenHandler', $handler); + } + + protected function getHandler($ravenClient) + { + $handler = new RavenHandler($ravenClient); + + return $handler; + } + + protected function getRavenClient() + { + $dsn = 'http://43f6017361224d098402974103bfc53d:a6a0538fc2934ba2bed32e08741b2cd3@marca.python.live.cheggnet.com:9000/1'; + + return new MockRavenClient($dsn); + } + + public function testDebug() + { + $ravenClient = $this->getRavenClient(); + $handler = $this->getHandler($ravenClient); + + $record = $this->getRecord(Logger::DEBUG, 'A test debug message'); + $handler->handle($record); + + $this->assertEquals($ravenClient::DEBUG, $ravenClient->lastData['level']); + $this->assertContains($record['message'], $ravenClient->lastData['message']); + } + + public function testWarning() + { + $ravenClient = $this->getRavenClient(); + $handler = $this->getHandler($ravenClient); + + $record = $this->getRecord(Logger::WARNING, 'A test warning message'); + $handler->handle($record); + + $this->assertEquals($ravenClient::WARNING, $ravenClient->lastData['level']); + $this->assertContains($record['message'], $ravenClient->lastData['message']); + } + + public function testTag() + { + $ravenClient = $this->getRavenClient(); + $handler = $this->getHandler($ravenClient); + + $tags = array(1, 2, 'foo'); + $record = $this->getRecord(Logger::INFO, 'test', array('tags' => $tags)); + $handler->handle($record); + + $this->assertEquals($tags, $ravenClient->lastData['tags']); + } + + public function testExtraParameters() + { + $ravenClient = $this->getRavenClient(); + $handler = $this->getHandler($ravenClient); + + $checksum = '098f6bcd4621d373cade4e832627b4f6'; + $release = '05a671c66aefea124cc08b76ea6d30bb'; + $eventId = '31423'; + $record = $this->getRecord(Logger::INFO, 'test', array('checksum' => $checksum, 'release' => $release, 'event_id' => $eventId)); + $handler->handle($record); + + $this->assertEquals($checksum, $ravenClient->lastData['checksum']); + $this->assertEquals($release, $ravenClient->lastData['release']); + $this->assertEquals($eventId, $ravenClient->lastData['event_id']); + } + + public function testFingerprint() + { + $ravenClient = $this->getRavenClient(); + $handler = $this->getHandler($ravenClient); + + $fingerprint = array('{{ default }}', 'other value'); + $record = $this->getRecord(Logger::INFO, 'test', array('fingerprint' => $fingerprint)); + $handler->handle($record); + + $this->assertEquals($fingerprint, $ravenClient->lastData['fingerprint']); + } + + public function testUserContext() + { + $ravenClient = $this->getRavenClient(); + $handler = $this->getHandler($ravenClient); + + $recordWithNoContext = $this->getRecord(Logger::INFO, 'test with default user context'); + // set user context 'externally' + + $user = array( + 'id' => '123', + 'email' => 'test@test.com', + ); + + $recordWithContext = $this->getRecord(Logger::INFO, 'test', array('user' => $user)); + + $ravenClient->user_context(array('id' => 'test_user_id')); + // handle context + $handler->handle($recordWithContext); + $this->assertEquals($user, $ravenClient->lastData['user']); + + // check to see if its reset + $handler->handle($recordWithNoContext); + $this->assertInternalType('array', $ravenClient->context->user); + $this->assertSame('test_user_id', $ravenClient->context->user['id']); + + // handle with null context + $ravenClient->user_context(null); + $handler->handle($recordWithContext); + $this->assertEquals($user, $ravenClient->lastData['user']); + + // check to see if its reset + $handler->handle($recordWithNoContext); + $this->assertNull($ravenClient->context->user); + } + + public function testException() + { + $ravenClient = $this->getRavenClient(); + $handler = $this->getHandler($ravenClient); + + try { + $this->methodThatThrowsAnException(); + } catch (\Exception $e) { + $record = $this->getRecord(Logger::ERROR, $e->getMessage(), array('exception' => $e)); + $handler->handle($record); + } + + $this->assertEquals($record['message'], $ravenClient->lastData['message']); + } + + public function testHandleBatch() + { + $records = $this->getMultipleRecords(); + $records[] = $this->getRecord(Logger::WARNING, 'warning'); + $records[] = $this->getRecord(Logger::WARNING, 'warning'); + + $logFormatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $logFormatter->expects($this->once())->method('formatBatch'); + + $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $formatter->expects($this->once())->method('format')->with($this->callback(function ($record) { + return $record['level'] == 400; + })); + + $handler = $this->getHandler($this->getRavenClient()); + $handler->setBatchFormatter($logFormatter); + $handler->setFormatter($formatter); + $handler->handleBatch($records); + } + + public function testHandleBatchDoNothingIfRecordsAreBelowLevel() + { + $records = array( + $this->getRecord(Logger::DEBUG, 'debug message 1'), + $this->getRecord(Logger::DEBUG, 'debug message 2'), + $this->getRecord(Logger::INFO, 'information'), + ); + + $handler = $this->getMock('Monolog\Handler\RavenHandler', null, array($this->getRavenClient())); + $handler->expects($this->never())->method('handle'); + $handler->setLevel(Logger::ERROR); + $handler->handleBatch($records); + } + + public function testHandleBatchPicksProperMessage() + { + $records = array( + $this->getRecord(Logger::DEBUG, 'debug message 1'), + $this->getRecord(Logger::DEBUG, 'debug message 2'), + $this->getRecord(Logger::INFO, 'information 1'), + $this->getRecord(Logger::ERROR, 'error 1'), + $this->getRecord(Logger::WARNING, 'warning'), + $this->getRecord(Logger::ERROR, 'error 2'), + $this->getRecord(Logger::INFO, 'information 2'), + ); + + $logFormatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $logFormatter->expects($this->once())->method('formatBatch'); + + $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $formatter->expects($this->once())->method('format')->with($this->callback(function ($record) use ($records) { + return $record['message'] == 'error 1'; + })); + + $handler = $this->getHandler($this->getRavenClient()); + $handler->setBatchFormatter($logFormatter); + $handler->setFormatter($formatter); + $handler->handleBatch($records); + } + + public function testGetSetBatchFormatter() + { + $ravenClient = $this->getRavenClient(); + $handler = $this->getHandler($ravenClient); + + $handler->setBatchFormatter($formatter = new LineFormatter()); + $this->assertSame($formatter, $handler->getBatchFormatter()); + } + + public function testRelease() + { + $ravenClient = $this->getRavenClient(); + $handler = $this->getHandler($ravenClient); + $release = 'v42.42.42'; + $handler->setRelease($release); + $record = $this->getRecord(Logger::INFO, 'test'); + $handler->handle($record); + $this->assertEquals($release, $ravenClient->lastData['release']); + + $localRelease = 'v41.41.41'; + $record = $this->getRecord(Logger::INFO, 'test', array('release' => $localRelease)); + $handler->handle($record); + $this->assertEquals($localRelease, $ravenClient->lastData['release']); + } + + private function methodThatThrowsAnException() + { + throw new \Exception('This is an exception'); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php new file mode 100755 index 0000000..689d527 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/RedisHandlerTest.php @@ -0,0 +1,127 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; + +class RedisHandlerTest extends TestCase +{ + /** + * @expectedException InvalidArgumentException + */ + public function testConstructorShouldThrowExceptionForInvalidRedis() + { + new RedisHandler(new \stdClass(), 'key'); + } + + public function testConstructorShouldWorkWithPredis() + { + $redis = $this->getMock('Predis\Client'); + $this->assertInstanceof('Monolog\Handler\RedisHandler', new RedisHandler($redis, 'key')); + } + + public function testConstructorShouldWorkWithRedis() + { + $redis = $this->getMock('Redis'); + $this->assertInstanceof('Monolog\Handler\RedisHandler', new RedisHandler($redis, 'key')); + } + + public function testPredisHandle() + { + $redis = $this->getMock('Predis\Client', array('rpush')); + + // Predis\Client uses rpush + $redis->expects($this->once()) + ->method('rpush') + ->with('key', 'test'); + + $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); + + $handler = new RedisHandler($redis, 'key'); + $handler->setFormatter(new LineFormatter("%message%")); + $handler->handle($record); + } + + public function testRedisHandle() + { + $redis = $this->getMock('Redis', array('rpush')); + + // Redis uses rPush + $redis->expects($this->once()) + ->method('rPush') + ->with('key', 'test'); + + $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); + + $handler = new RedisHandler($redis, 'key'); + $handler->setFormatter(new LineFormatter("%message%")); + $handler->handle($record); + } + + public function testRedisHandleCapped() + { + $redis = $this->getMock('Redis', array('multi', 'rpush', 'ltrim', 'exec')); + + // Redis uses multi + $redis->expects($this->once()) + ->method('multi') + ->will($this->returnSelf()); + + $redis->expects($this->once()) + ->method('rpush') + ->will($this->returnSelf()); + + $redis->expects($this->once()) + ->method('ltrim') + ->will($this->returnSelf()); + + $redis->expects($this->once()) + ->method('exec') + ->will($this->returnSelf()); + + $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); + + $handler = new RedisHandler($redis, 'key', Logger::DEBUG, true, 10); + $handler->setFormatter(new LineFormatter("%message%")); + $handler->handle($record); + } + + public function testPredisHandleCapped() + { + $redis = $this->getMock('Predis\Client', array('transaction')); + + $redisTransaction = $this->getMock('Predis\Client', array('rpush', 'ltrim')); + + $redisTransaction->expects($this->once()) + ->method('rpush') + ->will($this->returnSelf()); + + $redisTransaction->expects($this->once()) + ->method('ltrim') + ->will($this->returnSelf()); + + // Redis uses multi + $redis->expects($this->once()) + ->method('transaction') + ->will($this->returnCallback(function ($cb) use ($redisTransaction) { + $cb($redisTransaction); + })); + + $record = $this->getRecord(Logger::WARNING, 'test', array('data' => new \stdClass, 'foo' => 34)); + + $handler = new RedisHandler($redis, 'key', Logger::DEBUG, true, 10); + $handler->setFormatter(new LineFormatter("%message%")); + $handler->handle($record); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RollbarHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RollbarHandlerTest.php new file mode 100755 index 0000000..f302e91 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/RollbarHandlerTest.php @@ -0,0 +1,84 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Exception; +use Monolog\TestCase; +use Monolog\Logger; +use PHPUnit_Framework_MockObject_MockObject as MockObject; + +/** + * @author Erik Johansson + * @see https://rollbar.com/docs/notifier/rollbar-php/ + * + * @coversDefaultClass Monolog\Handler\RollbarHandler + */ +class RollbarHandlerTest extends TestCase +{ + /** + * @var MockObject + */ + private $rollbarNotifier; + + /** + * @var array + */ + public $reportedExceptionArguments = null; + + protected function setUp() + { + parent::setUp(); + + $this->setupRollbarNotifierMock(); + } + + /** + * When reporting exceptions to Rollbar the + * level has to be set in the payload data + */ + public function testExceptionLogLevel() + { + $handler = $this->createHandler(); + + $handler->handle($this->createExceptionRecord(Logger::DEBUG)); + + $this->assertEquals('debug', $this->reportedExceptionArguments['payload']['level']); + } + + private function setupRollbarNotifierMock() + { + $this->rollbarNotifier = $this->getMockBuilder('RollbarNotifier') + ->setMethods(array('report_message', 'report_exception', 'flush')) + ->getMock(); + + $that = $this; + + $this->rollbarNotifier + ->expects($this->any()) + ->method('report_exception') + ->willReturnCallback(function ($exception, $context, $payload) use ($that) { + $that->reportedExceptionArguments = compact('exception', 'context', 'payload'); + }); + } + + private function createHandler() + { + return new RollbarHandler($this->rollbarNotifier, Logger::DEBUG); + } + + private function createExceptionRecord($level = Logger::DEBUG, $message = 'test', $exception = null) + { + return $this->getRecord($level, $message, array( + 'exception' => $exception ?: new Exception() + )); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php new file mode 100755 index 0000000..c6f5fac --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/RotatingFileHandlerTest.php @@ -0,0 +1,245 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use PHPUnit_Framework_Error_Deprecated; + +/** + * @covers Monolog\Handler\RotatingFileHandler + */ +class RotatingFileHandlerTest extends TestCase +{ + /** + * This var should be private but then the anonymous function + * in the `setUp` method won't be able to set it. `$this` cant't + * be used in the anonymous function in `setUp` because PHP 5.3 + * does not support it. + */ + public $lastError; + + public function setUp() + { + $dir = __DIR__.'/Fixtures'; + chmod($dir, 0777); + if (!is_writable($dir)) { + $this->markTestSkipped($dir.' must be writable to test the RotatingFileHandler.'); + } + $this->lastError = null; + $self = $this; + // workaround with &$self used for PHP 5.3 + set_error_handler(function($code, $message) use (&$self) { + $self->lastError = array( + 'code' => $code, + 'message' => $message, + ); + }); + } + + private function assertErrorWasTriggered($code, $message) + { + if (empty($this->lastError)) { + $this->fail( + sprintf( + 'Failed asserting that error with code `%d` and message `%s` was triggered', + $code, + $message + ) + ); + } + $this->assertEquals($code, $this->lastError['code'], sprintf('Expected an error with code %d to be triggered, got `%s` instead', $code, $this->lastError['code'])); + $this->assertEquals($message, $this->lastError['message'], sprintf('Expected an error with message `%d` to be triggered, got `%s` instead', $message, $this->lastError['message'])); + } + + public function testRotationCreatesNewFile() + { + touch(__DIR__.'/Fixtures/foo-'.date('Y-m-d', time() - 86400).'.rot'); + + $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot'); + $handler->setFormatter($this->getIdentityFormatter()); + $handler->handle($this->getRecord()); + + $log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot'; + $this->assertTrue(file_exists($log)); + $this->assertEquals('test', file_get_contents($log)); + } + + /** + * @dataProvider rotationTests + */ + public function testRotation($createFile, $dateFormat, $timeCallback) + { + touch($old1 = __DIR__.'/Fixtures/foo-'.date($dateFormat, $timeCallback(-1)).'.rot'); + touch($old2 = __DIR__.'/Fixtures/foo-'.date($dateFormat, $timeCallback(-2)).'.rot'); + touch($old3 = __DIR__.'/Fixtures/foo-'.date($dateFormat, $timeCallback(-3)).'.rot'); + touch($old4 = __DIR__.'/Fixtures/foo-'.date($dateFormat, $timeCallback(-4)).'.rot'); + + $log = __DIR__.'/Fixtures/foo-'.date($dateFormat).'.rot'; + + if ($createFile) { + touch($log); + } + + $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2); + $handler->setFormatter($this->getIdentityFormatter()); + $handler->setFilenameFormat('{filename}-{date}', $dateFormat); + $handler->handle($this->getRecord()); + + $handler->close(); + + $this->assertTrue(file_exists($log)); + $this->assertTrue(file_exists($old1)); + $this->assertEquals($createFile, file_exists($old2)); + $this->assertEquals($createFile, file_exists($old3)); + $this->assertEquals($createFile, file_exists($old4)); + $this->assertEquals('test', file_get_contents($log)); + } + + public function rotationTests() + { + $now = time(); + $dayCallback = function($ago) use ($now) { + return $now + 86400 * $ago; + }; + $monthCallback = function($ago) { + return gmmktime(0, 0, 0, date('n') + $ago, 1, date('Y')); + }; + $yearCallback = function($ago) { + return gmmktime(0, 0, 0, 1, 1, date('Y') + $ago); + }; + + return array( + 'Rotation is triggered when the file of the current day is not present' + => array(true, RotatingFileHandler::FILE_PER_DAY, $dayCallback), + 'Rotation is not triggered when the file of the current day is already present' + => array(false, RotatingFileHandler::FILE_PER_DAY, $dayCallback), + + 'Rotation is triggered when the file of the current month is not present' + => array(true, RotatingFileHandler::FILE_PER_MONTH, $monthCallback), + 'Rotation is not triggered when the file of the current month is already present' + => array(false, RotatingFileHandler::FILE_PER_MONTH, $monthCallback), + + 'Rotation is triggered when the file of the current year is not present' + => array(true, RotatingFileHandler::FILE_PER_YEAR, $yearCallback), + 'Rotation is not triggered when the file of the current year is already present' + => array(false, RotatingFileHandler::FILE_PER_YEAR, $yearCallback), + ); + } + + /** + * @dataProvider dateFormatProvider + */ + public function testAllowOnlyFixedDefinedDateFormats($dateFormat, $valid) + { + $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2); + $handler->setFilenameFormat('{filename}-{date}', $dateFormat); + if (!$valid) { + $this->assertErrorWasTriggered( + E_USER_DEPRECATED, + 'Invalid date format - format must be one of RotatingFileHandler::FILE_PER_DAY ("Y-m-d"), '. + 'RotatingFileHandler::FILE_PER_MONTH ("Y-m") or RotatingFileHandler::FILE_PER_YEAR ("Y"), '. + 'or you can set one of the date formats using slashes, underscores and/or dots instead of dashes.' + ); + } + } + + public function dateFormatProvider() + { + return array( + array(RotatingFileHandler::FILE_PER_DAY, true), + array(RotatingFileHandler::FILE_PER_MONTH, true), + array(RotatingFileHandler::FILE_PER_YEAR, true), + array('m-d-Y', false), + array('Y-m-d-h-i', false) + ); + } + + /** + * @dataProvider filenameFormatProvider + */ + public function testDisallowFilenameFormatsWithoutDate($filenameFormat, $valid) + { + $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2); + $handler->setFilenameFormat($filenameFormat, RotatingFileHandler::FILE_PER_DAY); + if (!$valid) { + $this->assertErrorWasTriggered( + E_USER_DEPRECATED, + 'Invalid filename format - format should contain at least `{date}`, because otherwise rotating is impossible.' + ); + } + } + + public function filenameFormatProvider() + { + return array( + array('{filename}', false), + array('{filename}-{date}', true), + array('{date}', true), + array('foobar-{date}', true), + array('foo-{date}-bar', true), + array('{date}-foobar', true), + array('foobar', false), + ); + } + + /** + * @dataProvider rotationWhenSimilarFilesExistTests + */ + public function testRotationWhenSimilarFileNamesExist($dateFormat) + { + touch($old1 = __DIR__.'/Fixtures/foo-foo-'.date($dateFormat).'.rot'); + touch($old2 = __DIR__.'/Fixtures/foo-bar-'.date($dateFormat).'.rot'); + + $log = __DIR__.'/Fixtures/foo-'.date($dateFormat).'.rot'; + + $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot', 2); + $handler->setFormatter($this->getIdentityFormatter()); + $handler->setFilenameFormat('{filename}-{date}', $dateFormat); + $handler->handle($this->getRecord()); + $handler->close(); + + $this->assertTrue(file_exists($log)); + } + + public function rotationWhenSimilarFilesExistTests() + { + + return array( + 'Rotation is triggered when the file of the current day is not present but similar exists' + => array(RotatingFileHandler::FILE_PER_DAY), + + 'Rotation is triggered when the file of the current month is not present but similar exists' + => array(RotatingFileHandler::FILE_PER_MONTH), + + 'Rotation is triggered when the file of the current year is not present but similar exists' + => array(RotatingFileHandler::FILE_PER_YEAR), + ); + } + + public function testReuseCurrentFile() + { + $log = __DIR__.'/Fixtures/foo-'.date('Y-m-d').'.rot'; + file_put_contents($log, "foo"); + $handler = new RotatingFileHandler(__DIR__.'/Fixtures/foo.rot'); + $handler->setFormatter($this->getIdentityFormatter()); + $handler->handle($this->getRecord()); + $this->assertEquals('footest', file_get_contents($log)); + } + + public function tearDown() + { + foreach (glob(__DIR__.'/Fixtures/*.rot') as $file) { + unlink($file); + } + restore_error_handler(); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php new file mode 100755 index 0000000..b354cee --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; + +/** + * @covers Monolog\Handler\SamplingHandler::handle + */ +class SamplingHandlerTest extends TestCase +{ + public function testHandle() + { + $testHandler = new TestHandler(); + $handler = new SamplingHandler($testHandler, 2); + for ($i = 0; $i < 10000; $i++) { + $handler->handle($this->getRecord()); + } + $count = count($testHandler->getRecords()); + // $count should be half of 10k, so between 4k and 6k + $this->assertLessThan(6000, $count); + $this->assertGreaterThan(4000, $count); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php new file mode 100755 index 0000000..b9de736 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php @@ -0,0 +1,395 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler\Slack; + +use Monolog\Logger; +use Monolog\TestCase; + +/** + * @coversDefaultClass Monolog\Handler\Slack\SlackRecord + */ +class SlackRecordTest extends TestCase +{ + private $jsonPrettyPrintFlag; + + protected function setUp() + { + $this->jsonPrettyPrintFlag = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 128; + } + + public function dataGetAttachmentColor() + { + return array( + array(Logger::DEBUG, SlackRecord::COLOR_DEFAULT), + array(Logger::INFO, SlackRecord::COLOR_GOOD), + array(Logger::NOTICE, SlackRecord::COLOR_GOOD), + array(Logger::WARNING, SlackRecord::COLOR_WARNING), + array(Logger::ERROR, SlackRecord::COLOR_DANGER), + array(Logger::CRITICAL, SlackRecord::COLOR_DANGER), + array(Logger::ALERT, SlackRecord::COLOR_DANGER), + array(Logger::EMERGENCY, SlackRecord::COLOR_DANGER), + ); + } + + /** + * @dataProvider dataGetAttachmentColor + * @param int $logLevel + * @param string $expectedColour RGB hex color or name of Slack color + * @covers ::getAttachmentColor + */ + public function testGetAttachmentColor($logLevel, $expectedColour) + { + $slackRecord = new SlackRecord(); + $this->assertSame( + $expectedColour, + $slackRecord->getAttachmentColor($logLevel) + ); + } + + public function testAddsChannel() + { + $channel = '#test'; + $record = new SlackRecord($channel); + $data = $record->getSlackData($this->getRecord()); + + $this->assertArrayHasKey('channel', $data); + $this->assertSame($channel, $data['channel']); + } + + public function testNoUsernameByDefault() + { + $record = new SlackRecord(); + $data = $record->getSlackData($this->getRecord()); + + $this->assertArrayNotHasKey('username', $data); + } + + /** + * @return array + */ + public function dataStringify() + { + $jsonPrettyPrintFlag = defined('JSON_PRETTY_PRINT') ? JSON_PRETTY_PRINT : 128; + + $multipleDimensions = array(array(1, 2)); + $numericKeys = array('library' => 'monolog'); + $singleDimension = array(1, 'Hello', 'Jordi'); + + return array( + array(array(), '[]'), + array($multipleDimensions, json_encode($multipleDimensions, $jsonPrettyPrintFlag)), + array($numericKeys, json_encode($numericKeys, $jsonPrettyPrintFlag)), + array($singleDimension, json_encode($singleDimension)) + ); + } + + /** + * @dataProvider dataStringify + */ + public function testStringify($fields, $expectedResult) + { + $slackRecord = new SlackRecord( + '#test', + 'test', + true, + null, + true, + true + ); + + $this->assertSame($expectedResult, $slackRecord->stringify($fields)); + } + + public function testAddsCustomUsername() + { + $username = 'Monolog bot'; + $record = new SlackRecord(null, $username); + $data = $record->getSlackData($this->getRecord()); + + $this->assertArrayHasKey('username', $data); + $this->assertSame($username, $data['username']); + } + + public function testNoIcon() + { + $record = new SlackRecord(); + $data = $record->getSlackData($this->getRecord()); + + $this->assertArrayNotHasKey('icon_emoji', $data); + } + + public function testAddsIcon() + { + $record = $this->getRecord(); + $slackRecord = new SlackRecord(null, null, false, 'ghost'); + $data = $slackRecord->getSlackData($record); + + $slackRecord2 = new SlackRecord(null, null, false, 'http://github.com/Seldaek/monolog'); + $data2 = $slackRecord2->getSlackData($record); + + $this->assertArrayHasKey('icon_emoji', $data); + $this->assertSame(':ghost:', $data['icon_emoji']); + $this->assertArrayHasKey('icon_url', $data2); + $this->assertSame('http://github.com/Seldaek/monolog', $data2['icon_url']); + } + + public function testAttachmentsNotPresentIfNoAttachment() + { + $record = new SlackRecord(null, null, false); + $data = $record->getSlackData($this->getRecord()); + + $this->assertArrayNotHasKey('attachments', $data); + } + + public function testAddsOneAttachment() + { + $record = new SlackRecord(); + $data = $record->getSlackData($this->getRecord()); + + $this->assertArrayHasKey('attachments', $data); + $this->assertArrayHasKey(0, $data['attachments']); + $this->assertInternalType('array', $data['attachments'][0]); + } + + public function testTextEqualsMessageIfNoAttachment() + { + $message = 'Test message'; + $record = new SlackRecord(null, null, false); + $data = $record->getSlackData($this->getRecord(Logger::WARNING, $message)); + + $this->assertArrayHasKey('text', $data); + $this->assertSame($message, $data['text']); + } + + public function testTextEqualsFormatterOutput() + { + $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $formatter + ->expects($this->any()) + ->method('format') + ->will($this->returnCallback(function ($record) { return $record['message'] . 'test'; })); + + $formatter2 = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $formatter2 + ->expects($this->any()) + ->method('format') + ->will($this->returnCallback(function ($record) { return $record['message'] . 'test1'; })); + + $message = 'Test message'; + $record = new SlackRecord(null, null, false, null, false, false, array(), $formatter); + $data = $record->getSlackData($this->getRecord(Logger::WARNING, $message)); + + $this->assertArrayHasKey('text', $data); + $this->assertSame($message . 'test', $data['text']); + + $record->setFormatter($formatter2); + $data = $record->getSlackData($this->getRecord(Logger::WARNING, $message)); + + $this->assertArrayHasKey('text', $data); + $this->assertSame($message . 'test1', $data['text']); + } + + public function testAddsFallbackAndTextToAttachment() + { + $message = 'Test message'; + $record = new SlackRecord(null); + $data = $record->getSlackData($this->getRecord(Logger::WARNING, $message)); + + $this->assertSame($message, $data['attachments'][0]['text']); + $this->assertSame($message, $data['attachments'][0]['fallback']); + } + + public function testMapsLevelToColorAttachmentColor() + { + $record = new SlackRecord(null); + $errorLoggerRecord = $this->getRecord(Logger::ERROR); + $emergencyLoggerRecord = $this->getRecord(Logger::EMERGENCY); + $warningLoggerRecord = $this->getRecord(Logger::WARNING); + $infoLoggerRecord = $this->getRecord(Logger::INFO); + $debugLoggerRecord = $this->getRecord(Logger::DEBUG); + + $data = $record->getSlackData($errorLoggerRecord); + $this->assertSame(SlackRecord::COLOR_DANGER, $data['attachments'][0]['color']); + + $data = $record->getSlackData($emergencyLoggerRecord); + $this->assertSame(SlackRecord::COLOR_DANGER, $data['attachments'][0]['color']); + + $data = $record->getSlackData($warningLoggerRecord); + $this->assertSame(SlackRecord::COLOR_WARNING, $data['attachments'][0]['color']); + + $data = $record->getSlackData($infoLoggerRecord); + $this->assertSame(SlackRecord::COLOR_GOOD, $data['attachments'][0]['color']); + + $data = $record->getSlackData($debugLoggerRecord); + $this->assertSame(SlackRecord::COLOR_DEFAULT, $data['attachments'][0]['color']); + } + + public function testAddsShortAttachmentWithoutContextAndExtra() + { + $level = Logger::ERROR; + $levelName = Logger::getLevelName($level); + $record = new SlackRecord(null, null, true, null, true); + $data = $record->getSlackData($this->getRecord($level, 'test', array('test' => 1))); + + $attachment = $data['attachments'][0]; + $this->assertArrayHasKey('title', $attachment); + $this->assertArrayHasKey('fields', $attachment); + $this->assertSame($levelName, $attachment['title']); + $this->assertSame(array(), $attachment['fields']); + } + + public function testAddsShortAttachmentWithContextAndExtra() + { + $level = Logger::ERROR; + $levelName = Logger::getLevelName($level); + $context = array('test' => 1); + $extra = array('tags' => array('web')); + $record = new SlackRecord(null, null, true, null, true, true); + $loggerRecord = $this->getRecord($level, 'test', $context); + $loggerRecord['extra'] = $extra; + $data = $record->getSlackData($loggerRecord); + + $attachment = $data['attachments'][0]; + $this->assertArrayHasKey('title', $attachment); + $this->assertArrayHasKey('fields', $attachment); + $this->assertCount(2, $attachment['fields']); + $this->assertSame($levelName, $attachment['title']); + $this->assertSame( + array( + array( + 'title' => 'Extra', + 'value' => sprintf('```%s```', json_encode($extra, $this->jsonPrettyPrintFlag)), + 'short' => false + ), + array( + 'title' => 'Context', + 'value' => sprintf('```%s```', json_encode($context, $this->jsonPrettyPrintFlag)), + 'short' => false + ) + ), + $attachment['fields'] + ); + } + + public function testAddsLongAttachmentWithoutContextAndExtra() + { + $level = Logger::ERROR; + $levelName = Logger::getLevelName($level); + $record = new SlackRecord(null, null, true, null); + $data = $record->getSlackData($this->getRecord($level, 'test', array('test' => 1))); + + $attachment = $data['attachments'][0]; + $this->assertArrayHasKey('title', $attachment); + $this->assertArrayHasKey('fields', $attachment); + $this->assertCount(1, $attachment['fields']); + $this->assertSame('Message', $attachment['title']); + $this->assertSame( + array(array( + 'title' => 'Level', + 'value' => $levelName, + 'short' => false + )), + $attachment['fields'] + ); + } + + public function testAddsLongAttachmentWithContextAndExtra() + { + $level = Logger::ERROR; + $levelName = Logger::getLevelName($level); + $context = array('test' => 1); + $extra = array('tags' => array('web')); + $record = new SlackRecord(null, null, true, null, false, true); + $loggerRecord = $this->getRecord($level, 'test', $context); + $loggerRecord['extra'] = $extra; + $data = $record->getSlackData($loggerRecord); + + $expectedFields = array( + array( + 'title' => 'Level', + 'value' => $levelName, + 'short' => false, + ), + array( + 'title' => 'Tags', + 'value' => sprintf('```%s```', json_encode($extra['tags'])), + 'short' => false + ), + array( + 'title' => 'Test', + 'value' => $context['test'], + 'short' => false + ) + ); + + $attachment = $data['attachments'][0]; + $this->assertArrayHasKey('title', $attachment); + $this->assertArrayHasKey('fields', $attachment); + $this->assertCount(3, $attachment['fields']); + $this->assertSame('Message', $attachment['title']); + $this->assertSame( + $expectedFields, + $attachment['fields'] + ); + } + + public function testAddsTimestampToAttachment() + { + $record = $this->getRecord(); + $slackRecord = new SlackRecord(); + $data = $slackRecord->getSlackData($this->getRecord()); + + $attachment = $data['attachments'][0]; + $this->assertArrayHasKey('ts', $attachment); + $this->assertSame($record['datetime']->getTimestamp(), $attachment['ts']); + } + + public function testContextHasException() + { + $record = $this->getRecord(Logger::CRITICAL, 'This is a critical message.', array('exception' => new \Exception())); + $slackRecord = new SlackRecord(null, null, true, null, false, true); + $data = $slackRecord->getSlackData($record); + $this->assertInternalType('string', $data['attachments'][0]['fields'][1]['value']); + } + + public function testExcludeExtraAndContextFields() + { + $record = $this->getRecord( + Logger::WARNING, + 'test', + array('info' => array('library' => 'monolog', 'author' => 'Jordi')) + ); + $record['extra'] = array('tags' => array('web', 'cli')); + + $slackRecord = new SlackRecord(null, null, true, null, false, true, array('context.info.library', 'extra.tags.1')); + $data = $slackRecord->getSlackData($record); + $attachment = $data['attachments'][0]; + + $expected = array( + array( + 'title' => 'Info', + 'value' => sprintf('```%s```', json_encode(array('author' => 'Jordi'), $this->jsonPrettyPrintFlag)), + 'short' => false + ), + array( + 'title' => 'Tags', + 'value' => sprintf('```%s```', json_encode(array('web'))), + 'short' => false + ), + ); + + foreach ($expected as $field) { + $this->assertNotFalse(array_search($field, $attachment['fields'])); + break; + } + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php new file mode 100755 index 0000000..b12b01f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php @@ -0,0 +1,155 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; +use Monolog\Handler\Slack\SlackRecord; + +/** + * @author Greg Kedzierski + * @see https://api.slack.com/ + */ +class SlackHandlerTest extends TestCase +{ + /** + * @var resource + */ + private $res; + + /** + * @var SlackHandler + */ + private $handler; + + public function setUp() + { + if (!extension_loaded('openssl')) { + $this->markTestSkipped('This test requires openssl to run'); + } + } + + public function testWriteHeader() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/POST \/api\/chat.postMessage HTTP\/1.1\\r\\nHost: slack.com\\r\\nContent-Type: application\/x-www-form-urlencoded\\r\\nContent-Length: \d{2,4}\\r\\n\\r\\n/', $content); + } + + public function testWriteContent() + { + $this->createHandler(); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegExp('/username=Monolog/', $content); + $this->assertRegExp('/channel=channel1/', $content); + $this->assertRegExp('/token=myToken/', $content); + $this->assertRegExp('/attachments/', $content); + } + + public function testWriteContentUsesFormatterIfProvided() + { + $this->createHandler('myToken', 'channel1', 'Monolog', false); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->createHandler('myToken', 'channel1', 'Monolog', false); + $this->handler->setFormatter(new LineFormatter('foo--%message%')); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test2')); + fseek($this->res, 0); + $content2 = fread($this->res, 1024); + + $this->assertRegexp('/text=test1/', $content); + $this->assertRegexp('/text=foo--test2/', $content2); + } + + public function testWriteContentWithEmoji() + { + $this->createHandler('myToken', 'channel1', 'Monolog', true, 'alien'); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/icon_emoji=%3Aalien%3A/', $content); + } + + /** + * @dataProvider provideLevelColors + */ + public function testWriteContentWithColors($level, $expectedColor) + { + $this->createHandler(); + $this->handler->handle($this->getRecord($level, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/%22color%22%3A%22'.$expectedColor.'/', $content); + } + + public function testWriteContentWithPlainTextMessage() + { + $this->createHandler('myToken', 'channel1', 'Monolog', false); + $this->handler->handle($this->getRecord(Logger::CRITICAL, 'test1')); + fseek($this->res, 0); + $content = fread($this->res, 1024); + + $this->assertRegexp('/text=test1/', $content); + } + + public function provideLevelColors() + { + return array( + array(Logger::DEBUG, urlencode(SlackRecord::COLOR_DEFAULT)), + array(Logger::INFO, SlackRecord::COLOR_GOOD), + array(Logger::NOTICE, SlackRecord::COLOR_GOOD), + array(Logger::WARNING, SlackRecord::COLOR_WARNING), + array(Logger::ERROR, SlackRecord::COLOR_DANGER), + array(Logger::CRITICAL, SlackRecord::COLOR_DANGER), + array(Logger::ALERT, SlackRecord::COLOR_DANGER), + array(Logger::EMERGENCY,SlackRecord::COLOR_DANGER), + ); + } + + private function createHandler($token = 'myToken', $channel = 'channel1', $username = 'Monolog', $useAttachment = true, $iconEmoji = null, $useShortAttachment = false, $includeExtra = false) + { + $constructorArgs = array($token, $channel, $username, $useAttachment, $iconEmoji, Logger::DEBUG, true, $useShortAttachment, $includeExtra); + $this->res = fopen('php://memory', 'a'); + $this->handler = $this->getMock( + '\Monolog\Handler\SlackHandler', + array('fsockopen', 'streamSetTimeout', 'closeSocket'), + $constructorArgs + ); + + $reflectionProperty = new \ReflectionProperty('\Monolog\Handler\SocketHandler', 'connectionString'); + $reflectionProperty->setAccessible(true); + $reflectionProperty->setValue($this->handler, 'localhost:1234'); + + $this->handler->expects($this->any()) + ->method('fsockopen') + ->will($this->returnValue($this->res)); + $this->handler->expects($this->any()) + ->method('streamSetTimeout') + ->will($this->returnValue(true)); + $this->handler->expects($this->any()) + ->method('closeSocket') + ->will($this->returnValue(true)); + + $this->handler->setFormatter($this->getIdentityFormatter()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php new file mode 100755 index 0000000..c9229e2 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php @@ -0,0 +1,107 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; +use Monolog\Formatter\LineFormatter; +use Monolog\Handler\Slack\SlackRecord; + +/** + * @author Haralan Dobrev + * @see https://api.slack.com/incoming-webhooks + * @coversDefaultClass Monolog\Handler\SlackWebhookHandler + */ +class SlackWebhookHandlerTest extends TestCase +{ + const WEBHOOK_URL = 'https://hooks.slack.com/services/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E'; + + /** + * @covers ::__construct + * @covers ::getSlackRecord + */ + public function testConstructorMinimal() + { + $handler = new SlackWebhookHandler(self::WEBHOOK_URL); + $record = $this->getRecord(); + $slackRecord = $handler->getSlackRecord(); + $this->assertInstanceOf('Monolog\Handler\Slack\SlackRecord', $slackRecord); + $this->assertEquals(array( + 'attachments' => array( + array( + 'fallback' => 'test', + 'text' => 'test', + 'color' => SlackRecord::COLOR_WARNING, + 'fields' => array( + array( + 'title' => 'Level', + 'value' => 'WARNING', + 'short' => false, + ), + ), + 'title' => 'Message', + 'mrkdwn_in' => array('fields'), + 'ts' => $record['datetime']->getTimestamp(), + ), + ), + ), $slackRecord->getSlackData($record)); + } + + /** + * @covers ::__construct + * @covers ::getSlackRecord + */ + public function testConstructorFull() + { + $handler = new SlackWebhookHandler( + self::WEBHOOK_URL, + 'test-channel', + 'test-username', + false, + ':ghost:', + false, + false, + Logger::DEBUG, + false + ); + + $slackRecord = $handler->getSlackRecord(); + $this->assertInstanceOf('Monolog\Handler\Slack\SlackRecord', $slackRecord); + $this->assertEquals(array( + 'username' => 'test-username', + 'text' => 'test', + 'channel' => 'test-channel', + 'icon_emoji' => ':ghost:', + ), $slackRecord->getSlackData($this->getRecord())); + } + + /** + * @covers ::getFormatter + */ + public function testGetFormatter() + { + $handler = new SlackWebhookHandler(self::WEBHOOK_URL); + $formatter = $handler->getFormatter(); + $this->assertInstanceOf('Monolog\Formatter\FormatterInterface', $formatter); + } + + /** + * @covers ::setFormatter + */ + public function testSetFormatter() + { + $handler = new SlackWebhookHandler(self::WEBHOOK_URL); + $formatter = new LineFormatter(); + $handler->setFormatter($formatter); + $this->assertSame($formatter, $handler->getFormatter()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php new file mode 100755 index 0000000..b1b02bd --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @author Haralan Dobrev + * @see https://slack.com/apps/A0F81R8ET-slackbot + * @coversDefaultClass Monolog\Handler\SlackbotHandler + */ +class SlackbotHandlerTest extends TestCase +{ + /** + * @covers ::__construct + */ + public function testConstructorMinimal() + { + $handler = new SlackbotHandler('test-team', 'test-token', 'test-channel'); + $this->assertInstanceOf('Monolog\Handler\AbstractProcessingHandler', $handler); + } + + /** + * @covers ::__construct + */ + public function testConstructorFull() + { + $handler = new SlackbotHandler( + 'test-team', + 'test-token', + 'test-channel', + Logger::DEBUG, + false + ); + $this->assertInstanceOf('Monolog\Handler\AbstractProcessingHandler', $handler); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php new file mode 100755 index 0000000..1da987c --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SocketHandlerTest.php @@ -0,0 +1,335 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @author Pablo de Leon Belloc + */ +class SocketHandlerTest extends TestCase +{ + /** + * @var Monolog\Handler\SocketHandler + */ + private $handler; + + /** + * @var resource + */ + private $res; + + /** + * @expectedException UnexpectedValueException + */ + public function testInvalidHostname() + { + $this->createHandler('garbage://here'); + $this->writeRecord('data'); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testBadConnectionTimeout() + { + $this->createHandler('localhost:1234'); + $this->handler->setConnectionTimeout(-1); + } + + public function testSetConnectionTimeout() + { + $this->createHandler('localhost:1234'); + $this->handler->setConnectionTimeout(10.1); + $this->assertEquals(10.1, $this->handler->getConnectionTimeout()); + } + + /** + * @expectedException \InvalidArgumentException + */ + public function testBadTimeout() + { + $this->createHandler('localhost:1234'); + $this->handler->setTimeout(-1); + } + + public function testSetTimeout() + { + $this->createHandler('localhost:1234'); + $this->handler->setTimeout(10.25); + $this->assertEquals(10.25, $this->handler->getTimeout()); + } + + public function testSetWritingTimeout() + { + $this->createHandler('localhost:1234'); + $this->handler->setWritingTimeout(10.25); + $this->assertEquals(10.25, $this->handler->getWritingTimeout()); + } + + public function testSetChunkSize() + { + $this->createHandler('localhost:1234'); + $this->handler->setChunkSize(1025); + $this->assertEquals(1025, $this->handler->getChunkSize()); + } + + public function testSetConnectionString() + { + $this->createHandler('tcp://localhost:9090'); + $this->assertEquals('tcp://localhost:9090', $this->handler->getConnectionString()); + } + + /** + * @expectedException UnexpectedValueException + */ + public function testExceptionIsThrownOnFsockopenError() + { + $this->setMockHandler(array('fsockopen')); + $this->handler->expects($this->once()) + ->method('fsockopen') + ->will($this->returnValue(false)); + $this->writeRecord('Hello world'); + } + + /** + * @expectedException UnexpectedValueException + */ + public function testExceptionIsThrownOnPfsockopenError() + { + $this->setMockHandler(array('pfsockopen')); + $this->handler->expects($this->once()) + ->method('pfsockopen') + ->will($this->returnValue(false)); + $this->handler->setPersistent(true); + $this->writeRecord('Hello world'); + } + + /** + * @expectedException UnexpectedValueException + */ + public function testExceptionIsThrownIfCannotSetTimeout() + { + $this->setMockHandler(array('streamSetTimeout')); + $this->handler->expects($this->once()) + ->method('streamSetTimeout') + ->will($this->returnValue(false)); + $this->writeRecord('Hello world'); + } + + /** + * @expectedException UnexpectedValueException + */ + public function testExceptionIsThrownIfCannotSetChunkSize() + { + $this->setMockHandler(array('streamSetChunkSize')); + $this->handler->setChunkSize(8192); + $this->handler->expects($this->once()) + ->method('streamSetChunkSize') + ->will($this->returnValue(false)); + $this->writeRecord('Hello world'); + } + + /** + * @expectedException RuntimeException + */ + public function testWriteFailsOnIfFwriteReturnsFalse() + { + $this->setMockHandler(array('fwrite')); + + $callback = function ($arg) { + $map = array( + 'Hello world' => 6, + 'world' => false, + ); + + return $map[$arg]; + }; + + $this->handler->expects($this->exactly(2)) + ->method('fwrite') + ->will($this->returnCallback($callback)); + + $this->writeRecord('Hello world'); + } + + /** + * @expectedException RuntimeException + */ + public function testWriteFailsIfStreamTimesOut() + { + $this->setMockHandler(array('fwrite', 'streamGetMetadata')); + + $callback = function ($arg) { + $map = array( + 'Hello world' => 6, + 'world' => 5, + ); + + return $map[$arg]; + }; + + $this->handler->expects($this->exactly(1)) + ->method('fwrite') + ->will($this->returnCallback($callback)); + $this->handler->expects($this->exactly(1)) + ->method('streamGetMetadata') + ->will($this->returnValue(array('timed_out' => true))); + + $this->writeRecord('Hello world'); + } + + /** + * @expectedException RuntimeException + */ + public function testWriteFailsOnIncompleteWrite() + { + $this->setMockHandler(array('fwrite', 'streamGetMetadata')); + + $res = $this->res; + $callback = function ($string) use ($res) { + fclose($res); + + return strlen('Hello'); + }; + + $this->handler->expects($this->exactly(1)) + ->method('fwrite') + ->will($this->returnCallback($callback)); + $this->handler->expects($this->exactly(1)) + ->method('streamGetMetadata') + ->will($this->returnValue(array('timed_out' => false))); + + $this->writeRecord('Hello world'); + } + + public function testWriteWithMemoryFile() + { + $this->setMockHandler(); + $this->writeRecord('test1'); + $this->writeRecord('test2'); + $this->writeRecord('test3'); + fseek($this->res, 0); + $this->assertEquals('test1test2test3', fread($this->res, 1024)); + } + + public function testWriteWithMock() + { + $this->setMockHandler(array('fwrite')); + + $callback = function ($arg) { + $map = array( + 'Hello world' => 6, + 'world' => 5, + ); + + return $map[$arg]; + }; + + $this->handler->expects($this->exactly(2)) + ->method('fwrite') + ->will($this->returnCallback($callback)); + + $this->writeRecord('Hello world'); + } + + public function testClose() + { + $this->setMockHandler(); + $this->writeRecord('Hello world'); + $this->assertInternalType('resource', $this->res); + $this->handler->close(); + $this->assertFalse(is_resource($this->res), "Expected resource to be closed after closing handler"); + } + + public function testCloseDoesNotClosePersistentSocket() + { + $this->setMockHandler(); + $this->handler->setPersistent(true); + $this->writeRecord('Hello world'); + $this->assertTrue(is_resource($this->res)); + $this->handler->close(); + $this->assertTrue(is_resource($this->res)); + } + + /** + * @expectedException \RuntimeException + */ + public function testAvoidInfiniteLoopWhenNoDataIsWrittenForAWritingTimeoutSeconds() + { + $this->setMockHandler(array('fwrite', 'streamGetMetadata')); + + $this->handler->expects($this->any()) + ->method('fwrite') + ->will($this->returnValue(0)); + + $this->handler->expects($this->any()) + ->method('streamGetMetadata') + ->will($this->returnValue(array('timed_out' => false))); + + $this->handler->setWritingTimeout(1); + + $this->writeRecord('Hello world'); + } + + private function createHandler($connectionString) + { + $this->handler = new SocketHandler($connectionString); + $this->handler->setFormatter($this->getIdentityFormatter()); + } + + private function writeRecord($string) + { + $this->handler->handle($this->getRecord(Logger::WARNING, $string)); + } + + private function setMockHandler(array $methods = array()) + { + $this->res = fopen('php://memory', 'a'); + + $defaultMethods = array('fsockopen', 'pfsockopen', 'streamSetTimeout'); + $newMethods = array_diff($methods, $defaultMethods); + + $finalMethods = array_merge($defaultMethods, $newMethods); + + $this->handler = $this->getMock( + '\Monolog\Handler\SocketHandler', $finalMethods, array('localhost:1234') + ); + + if (!in_array('fsockopen', $methods)) { + $this->handler->expects($this->any()) + ->method('fsockopen') + ->will($this->returnValue($this->res)); + } + + if (!in_array('pfsockopen', $methods)) { + $this->handler->expects($this->any()) + ->method('pfsockopen') + ->will($this->returnValue($this->res)); + } + + if (!in_array('streamSetTimeout', $methods)) { + $this->handler->expects($this->any()) + ->method('streamSetTimeout') + ->will($this->returnValue(true)); + } + + if (!in_array('streamSetChunkSize', $methods)) { + $this->handler->expects($this->any()) + ->method('streamSetChunkSize') + ->will($this->returnValue(8192)); + } + + $this->handler->setFormatter($this->getIdentityFormatter()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php new file mode 100755 index 0000000..487030f --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/StreamHandlerTest.php @@ -0,0 +1,184 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +class StreamHandlerTest extends TestCase +{ + /** + * @covers Monolog\Handler\StreamHandler::__construct + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWrite() + { + $handle = fopen('php://memory', 'a+'); + $handler = new StreamHandler($handle); + $handler->setFormatter($this->getIdentityFormatter()); + $handler->handle($this->getRecord(Logger::WARNING, 'test')); + $handler->handle($this->getRecord(Logger::WARNING, 'test2')); + $handler->handle($this->getRecord(Logger::WARNING, 'test3')); + fseek($handle, 0); + $this->assertEquals('testtest2test3', fread($handle, 100)); + } + + /** + * @covers Monolog\Handler\StreamHandler::close + */ + public function testCloseKeepsExternalHandlersOpen() + { + $handle = fopen('php://memory', 'a+'); + $handler = new StreamHandler($handle); + $this->assertTrue(is_resource($handle)); + $handler->close(); + $this->assertTrue(is_resource($handle)); + } + + /** + * @covers Monolog\Handler\StreamHandler::close + */ + public function testClose() + { + $handler = new StreamHandler('php://memory'); + $handler->handle($this->getRecord(Logger::WARNING, 'test')); + $streamProp = new \ReflectionProperty('Monolog\Handler\StreamHandler', 'stream'); + $streamProp->setAccessible(true); + $handle = $streamProp->getValue($handler); + + $this->assertTrue(is_resource($handle)); + $handler->close(); + $this->assertFalse(is_resource($handle)); + } + + /** + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWriteCreatesTheStreamResource() + { + $handler = new StreamHandler('php://memory'); + $handler->handle($this->getRecord()); + } + + /** + * @covers Monolog\Handler\StreamHandler::__construct + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWriteLocking() + { + $temp = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'monolog_locked_log'; + $handler = new StreamHandler($temp, Logger::DEBUG, true, null, true); + $handler->handle($this->getRecord()); + } + + /** + * @expectedException LogicException + * @covers Monolog\Handler\StreamHandler::__construct + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWriteMissingResource() + { + $handler = new StreamHandler(null); + $handler->handle($this->getRecord()); + } + + public function invalidArgumentProvider() + { + return array( + array(1), + array(array()), + array(array('bogus://url')), + ); + } + + /** + * @dataProvider invalidArgumentProvider + * @expectedException InvalidArgumentException + * @covers Monolog\Handler\StreamHandler::__construct + */ + public function testWriteInvalidArgument($invalidArgument) + { + $handler = new StreamHandler($invalidArgument); + } + + /** + * @expectedException UnexpectedValueException + * @covers Monolog\Handler\StreamHandler::__construct + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWriteInvalidResource() + { + $handler = new StreamHandler('bogus://url'); + $handler->handle($this->getRecord()); + } + + /** + * @expectedException UnexpectedValueException + * @covers Monolog\Handler\StreamHandler::__construct + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWriteNonExistingResource() + { + $handler = new StreamHandler('ftp://foo/bar/baz/'.rand(0, 10000)); + $handler->handle($this->getRecord()); + } + + /** + * @covers Monolog\Handler\StreamHandler::__construct + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWriteNonExistingPath() + { + $handler = new StreamHandler(sys_get_temp_dir().'/bar/'.rand(0, 10000).DIRECTORY_SEPARATOR.rand(0, 10000)); + $handler->handle($this->getRecord()); + } + + /** + * @covers Monolog\Handler\StreamHandler::__construct + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWriteNonExistingFileResource() + { + $handler = new StreamHandler('file://'.sys_get_temp_dir().'/bar/'.rand(0, 10000).DIRECTORY_SEPARATOR.rand(0, 10000)); + $handler->handle($this->getRecord()); + } + + /** + * @expectedException Exception + * @expectedExceptionMessageRegExp /There is no existing directory at/ + * @covers Monolog\Handler\StreamHandler::__construct + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWriteNonExistingAndNotCreatablePath() + { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->markTestSkipped('Permissions checks can not run on windows'); + } + $handler = new StreamHandler('/foo/bar/'.rand(0, 10000).DIRECTORY_SEPARATOR.rand(0, 10000)); + $handler->handle($this->getRecord()); + } + + /** + * @expectedException Exception + * @expectedExceptionMessageRegExp /There is no existing directory at/ + * @covers Monolog\Handler\StreamHandler::__construct + * @covers Monolog\Handler\StreamHandler::write + */ + public function testWriteNonExistingAndNotCreatableFileResource() + { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + $this->markTestSkipped('Permissions checks can not run on windows'); + } + $handler = new StreamHandler('file:///foo/bar/'.rand(0, 10000).DIRECTORY_SEPARATOR.rand(0, 10000)); + $handler->handle($this->getRecord()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php new file mode 100755 index 0000000..1d62940 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SwiftMailerHandlerTest.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; +use Monolog\TestCase; + +class SwiftMailerHandlerTest extends TestCase +{ + /** @var \Swift_Mailer|\PHPUnit_Framework_MockObject_MockObject */ + private $mailer; + + public function setUp() + { + $this->mailer = $this + ->getMockBuilder('Swift_Mailer') + ->disableOriginalConstructor() + ->getMock(); + } + + public function testMessageCreationIsLazyWhenUsingCallback() + { + $this->mailer->expects($this->never()) + ->method('send'); + + $callback = function () { + throw new \RuntimeException('Swift_Message creation callback should not have been called in this test'); + }; + $handler = new SwiftMailerHandler($this->mailer, $callback); + + $records = array( + $this->getRecord(Logger::DEBUG), + $this->getRecord(Logger::INFO), + ); + $handler->handleBatch($records); + } + + public function testMessageCanBeCustomizedGivenLoggedData() + { + // Wire Mailer to expect a specific Swift_Message with a customized Subject + $expectedMessage = new \Swift_Message(); + $this->mailer->expects($this->once()) + ->method('send') + ->with($this->callback(function ($value) use ($expectedMessage) { + return $value instanceof \Swift_Message + && $value->getSubject() === 'Emergency' + && $value === $expectedMessage; + })); + + // Callback dynamically changes subject based on number of logged records + $callback = function ($content, array $records) use ($expectedMessage) { + $subject = count($records) > 0 ? 'Emergency' : 'Normal'; + $expectedMessage->setSubject($subject); + + return $expectedMessage; + }; + $handler = new SwiftMailerHandler($this->mailer, $callback); + + // Logging 1 record makes this an Emergency + $records = array( + $this->getRecord(Logger::EMERGENCY), + ); + $handler->handleBatch($records); + } + + public function testMessageSubjectFormatting() + { + // Wire Mailer to expect a specific Swift_Message with a customized Subject + $messageTemplate = new \Swift_Message(); + $messageTemplate->setSubject('Alert: %level_name% %message%'); + $receivedMessage = null; + + $this->mailer->expects($this->once()) + ->method('send') + ->with($this->callback(function ($value) use (&$receivedMessage) { + $receivedMessage = $value; + return true; + })); + + $handler = new SwiftMailerHandler($this->mailer, $messageTemplate); + + $records = array( + $this->getRecord(Logger::EMERGENCY), + ); + $handler->handleBatch($records); + + $this->assertEquals('Alert: EMERGENCY test', $receivedMessage->getSubject()); + } + + public function testMessageHaveUniqueId() + { + $messageTemplate = new \Swift_Message(); + $handler = new SwiftMailerHandler($this->mailer, $messageTemplate); + + $method = new \ReflectionMethod('Monolog\Handler\SwiftMailerHandler', 'buildMessage'); + $method->setAccessible(true); + $method->invokeArgs($handler, array($messageTemplate, array())); + + $builtMessage1 = $method->invoke($handler, $messageTemplate, array()); + $builtMessage2 = $method->invoke($handler, $messageTemplate, array()); + + $this->assertFalse($builtMessage1->getId() === $builtMessage2->getId(), 'Two different messages have the same id'); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php new file mode 100755 index 0000000..8f9e46b --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogHandlerTest.php @@ -0,0 +1,44 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\Logger; + +class SyslogHandlerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @covers Monolog\Handler\SyslogHandler::__construct + */ + public function testConstruct() + { + $handler = new SyslogHandler('test'); + $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); + + $handler = new SyslogHandler('test', LOG_USER); + $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); + + $handler = new SyslogHandler('test', 'user'); + $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); + + $handler = new SyslogHandler('test', LOG_USER, Logger::DEBUG, true, LOG_PERROR); + $this->assertInstanceOf('Monolog\Handler\SyslogHandler', $handler); + } + + /** + * @covers Monolog\Handler\SyslogHandler::__construct + */ + public function testConstructInvalidFacility() + { + $this->setExpectedException('UnexpectedValueException'); + $handler = new SyslogHandler('test', 'unknown'); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php new file mode 100755 index 0000000..7ee8a98 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; + +/** + * @requires extension sockets + */ +class SyslogUdpHandlerTest extends TestCase +{ + /** + * @expectedException UnexpectedValueException + */ + public function testWeValidateFacilities() + { + $handler = new SyslogUdpHandler("ip", null, "invalidFacility"); + } + + public function testWeSplitIntoLines() + { + $time = '2014-01-07T12:34'; + $pid = getmypid(); + $host = gethostname(); + + $handler = $this->getMockBuilder('\Monolog\Handler\SyslogUdpHandler') + ->setConstructorArgs(array("127.0.0.1", 514, "authpriv")) + ->setMethods(array('getDateTime')) + ->getMock(); + + $handler->method('getDateTime') + ->willReturn($time); + + $handler->setFormatter(new \Monolog\Formatter\ChromePHPFormatter()); + + $socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('write'), array('lol', 'lol')); + $socket->expects($this->at(0)) + ->method('write') + ->with("lol", "<".(LOG_AUTHPRIV + LOG_WARNING).">1 $time $host php $pid - - "); + $socket->expects($this->at(1)) + ->method('write') + ->with("hej", "<".(LOG_AUTHPRIV + LOG_WARNING).">1 $time $host php $pid - - "); + + $handler->setSocket($socket); + + $handler->handle($this->getRecordWithMessage("hej\nlol")); + } + + public function testSplitWorksOnEmptyMsg() + { + $handler = new SyslogUdpHandler("127.0.0.1", 514, "authpriv"); + $handler->setFormatter($this->getIdentityFormatter()); + + $socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('write'), array('lol', 'lol')); + $socket->expects($this->never()) + ->method('write'); + + $handler->setSocket($socket); + + $handler->handle($this->getRecordWithMessage(null)); + } + + protected function getRecordWithMessage($msg) + { + return array('message' => $msg, 'level' => \Monolog\Logger::WARNING, 'context' => null, 'extra' => array(), 'channel' => 'lol'); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php new file mode 100755 index 0000000..a7c4fc9 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php @@ -0,0 +1,116 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +/** + * @covers Monolog\Handler\TestHandler + */ +class TestHandlerTest extends TestCase +{ + /** + * @dataProvider methodProvider + */ + public function testHandler($method, $level) + { + $handler = new TestHandler; + $record = $this->getRecord($level, 'test'.$method); + $this->assertFalse($handler->hasRecords($level)); + $this->assertFalse($handler->hasRecord($record, $level)); + $this->assertFalse($handler->{'has'.$method}($record), 'has'.$method); + $this->assertFalse($handler->{'has'.$method.'ThatContains'}('test'), 'has'.$method.'ThatContains'); + $this->assertFalse($handler->{'has'.$method.'ThatPasses'}(function ($rec) { + return true; + }), 'has'.$method.'ThatPasses'); + $this->assertFalse($handler->{'has'.$method.'ThatMatches'}('/test\w+/')); + $this->assertFalse($handler->{'has'.$method.'Records'}(), 'has'.$method.'Records'); + $handler->handle($record); + + $this->assertFalse($handler->{'has'.$method}('bar'), 'has'.$method); + $this->assertTrue($handler->hasRecords($level)); + $this->assertTrue($handler->hasRecord($record, $level)); + $this->assertTrue($handler->{'has'.$method}($record), 'has'.$method); + $this->assertTrue($handler->{'has'.$method}('test'.$method), 'has'.$method); + $this->assertTrue($handler->{'has'.$method.'ThatContains'}('test'), 'has'.$method.'ThatContains'); + $this->assertTrue($handler->{'has'.$method.'ThatPasses'}(function ($rec) { + return true; + }), 'has'.$method.'ThatPasses'); + $this->assertTrue($handler->{'has'.$method.'ThatMatches'}('/test\w+/')); + $this->assertTrue($handler->{'has'.$method.'Records'}(), 'has'.$method.'Records'); + + $records = $handler->getRecords(); + unset($records[0]['formatted']); + $this->assertEquals(array($record), $records); + } + + public function testHandlerAssertEmptyContext() { + $handler = new TestHandler; + $record = $this->getRecord(Logger::WARNING, 'test', array()); + $this->assertFalse($handler->hasWarning(array( + 'message' => 'test', + 'context' => array(), + ))); + + $handler->handle($record); + + $this->assertTrue($handler->hasWarning(array( + 'message' => 'test', + 'context' => array(), + ))); + $this->assertFalse($handler->hasWarning(array( + 'message' => 'test', + 'context' => array( + 'foo' => 'bar' + ), + ))); + } + + public function testHandlerAssertNonEmptyContext() { + $handler = new TestHandler; + $record = $this->getRecord(Logger::WARNING, 'test', array('foo' => 'bar')); + $this->assertFalse($handler->hasWarning(array( + 'message' => 'test', + 'context' => array( + 'foo' => 'bar' + ), + ))); + + $handler->handle($record); + + $this->assertTrue($handler->hasWarning(array( + 'message' => 'test', + 'context' => array( + 'foo' => 'bar' + ), + ))); + $this->assertFalse($handler->hasWarning(array( + 'message' => 'test', + 'context' => array(), + ))); + } + + public function methodProvider() + { + return array( + array('Emergency', Logger::EMERGENCY), + array('Alert' , Logger::ALERT), + array('Critical' , Logger::CRITICAL), + array('Error' , Logger::ERROR), + array('Warning' , Logger::WARNING), + array('Info' , Logger::INFO), + array('Notice' , Logger::NOTICE), + array('Debug' , Logger::DEBUG), + ); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php new file mode 100755 index 0000000..fa524d0 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/UdpSocketTest.php @@ -0,0 +1,64 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Handler\SyslogUdp\UdpSocket; + +/** + * @requires extension sockets + */ +class UdpSocketTest extends TestCase +{ + public function testWeDoNotTruncateShortMessages() + { + $socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('send'), array('lol', 'lol')); + + $socket->expects($this->at(0)) + ->method('send') + ->with("HEADER: The quick brown fox jumps over the lazy dog"); + + $socket->write("The quick brown fox jumps over the lazy dog", "HEADER: "); + } + + public function testLongMessagesAreTruncated() + { + $socket = $this->getMock('\Monolog\Handler\SyslogUdp\UdpSocket', array('send'), array('lol', 'lol')); + + $truncatedString = str_repeat("derp", 16254).'d'; + + $socket->expects($this->exactly(1)) + ->method('send') + ->with("HEADER" . $truncatedString); + + $longString = str_repeat("derp", 20000); + + $socket->write($longString, "HEADER"); + } + + public function testDoubleCloseDoesNotError() + { + $socket = new UdpSocket('127.0.0.1', 514); + $socket->close(); + $socket->close(); + } + + /** + * @expectedException LogicException + */ + public function testWriteAfterCloseErrors() + { + $socket = new UdpSocket('127.0.0.1', 514); + $socket->close(); + $socket->write('foo', "HEADER"); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php new file mode 100755 index 0000000..0594a23 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/WhatFailureGroupHandlerTest.php @@ -0,0 +1,144 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; +use Monolog\Logger; + +class WhatFailureGroupHandlerTest extends TestCase +{ + /** + * @covers Monolog\Handler\WhatFailureGroupHandler::__construct + * @expectedException InvalidArgumentException + */ + public function testConstructorOnlyTakesHandler() + { + new WhatFailureGroupHandler(array(new TestHandler(), "foo")); + } + + /** + * @covers Monolog\Handler\WhatFailureGroupHandler::__construct + * @covers Monolog\Handler\WhatFailureGroupHandler::handle + */ + public function testHandle() + { + $testHandlers = array(new TestHandler(), new TestHandler()); + $handler = new WhatFailureGroupHandler($testHandlers); + $handler->handle($this->getRecord(Logger::DEBUG)); + $handler->handle($this->getRecord(Logger::INFO)); + foreach ($testHandlers as $test) { + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue(count($test->getRecords()) === 2); + } + } + + /** + * @covers Monolog\Handler\WhatFailureGroupHandler::handleBatch + */ + public function testHandleBatch() + { + $testHandlers = array(new TestHandler(), new TestHandler()); + $handler = new WhatFailureGroupHandler($testHandlers); + $handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO))); + foreach ($testHandlers as $test) { + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue(count($test->getRecords()) === 2); + } + } + + /** + * @covers Monolog\Handler\WhatFailureGroupHandler::isHandling + */ + public function testIsHandling() + { + $testHandlers = array(new TestHandler(Logger::ERROR), new TestHandler(Logger::WARNING)); + $handler = new WhatFailureGroupHandler($testHandlers); + $this->assertTrue($handler->isHandling($this->getRecord(Logger::ERROR))); + $this->assertTrue($handler->isHandling($this->getRecord(Logger::WARNING))); + $this->assertFalse($handler->isHandling($this->getRecord(Logger::DEBUG))); + } + + /** + * @covers Monolog\Handler\WhatFailureGroupHandler::handle + */ + public function testHandleUsesProcessors() + { + $test = new TestHandler(); + $handler = new WhatFailureGroupHandler(array($test)); + $handler->pushProcessor(function ($record) { + $record['extra']['foo'] = true; + + return $record; + }); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertTrue($test->hasWarningRecords()); + $records = $test->getRecords(); + $this->assertTrue($records[0]['extra']['foo']); + } + + /** + * @covers Monolog\Handler\WhatFailureGroupHandler::handleBatch + */ + public function testHandleBatchUsesProcessors() + { + $testHandlers = array(new TestHandler(), new TestHandler()); + $handler = new WhatFailureGroupHandler($testHandlers); + $handler->pushProcessor(function ($record) { + $record['extra']['foo'] = true; + + return $record; + }); + $handler->handleBatch(array($this->getRecord(Logger::DEBUG), $this->getRecord(Logger::INFO))); + foreach ($testHandlers as $test) { + $this->assertTrue($test->hasDebugRecords()); + $this->assertTrue($test->hasInfoRecords()); + $this->assertTrue(count($test->getRecords()) === 2); + $records = $test->getRecords(); + $this->assertTrue($records[0]['extra']['foo']); + $this->assertTrue($records[1]['extra']['foo']); + } + } + + /** + * @covers Monolog\Handler\WhatFailureGroupHandler::handle + */ + public function testHandleException() + { + $test = new TestHandler(); + $exception = new ExceptionTestHandler(); + $handler = new WhatFailureGroupHandler(array($exception, $test, $exception)); + $handler->pushProcessor(function ($record) { + $record['extra']['foo'] = true; + + return $record; + }); + $handler->handle($this->getRecord(Logger::WARNING)); + $this->assertTrue($test->hasWarningRecords()); + $records = $test->getRecords(); + $this->assertTrue($records[0]['extra']['foo']); + } +} + +class ExceptionTestHandler extends TestHandler +{ + /** + * {@inheritdoc} + */ + public function handle(array $record) + { + parent::handle($record); + + throw new \Exception("ExceptionTestHandler::handle"); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php new file mode 100755 index 0000000..69b001e --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Handler/ZendMonitorHandlerTest.php @@ -0,0 +1,69 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Handler; + +use Monolog\TestCase; + +class ZendMonitorHandlerTest extends TestCase +{ + protected $zendMonitorHandler; + + public function setUp() + { + if (!function_exists('zend_monitor_custom_event')) { + $this->markTestSkipped('ZendServer is not installed'); + } + } + + /** + * @covers Monolog\Handler\ZendMonitorHandler::write + */ + public function testWrite() + { + $record = $this->getRecord(); + $formatterResult = array( + 'message' => $record['message'], + ); + + $zendMonitor = $this->getMockBuilder('Monolog\Handler\ZendMonitorHandler') + ->setMethods(array('writeZendMonitorCustomEvent', 'getDefaultFormatter')) + ->getMock(); + + $formatterMock = $this->getMockBuilder('Monolog\Formatter\NormalizerFormatter') + ->disableOriginalConstructor() + ->getMock(); + + $formatterMock->expects($this->once()) + ->method('format') + ->will($this->returnValue($formatterResult)); + + $zendMonitor->expects($this->once()) + ->method('getDefaultFormatter') + ->will($this->returnValue($formatterMock)); + + $levelMap = $zendMonitor->getLevelMap(); + + $zendMonitor->expects($this->once()) + ->method('writeZendMonitorCustomEvent') + ->with($levelMap[$record['level']], $record['message'], $formatterResult); + + $zendMonitor->handle($record); + } + + /** + * @covers Monolog\Handler\ZendMonitorHandler::getDefaultFormatter + */ + public function testGetDefaultFormatterReturnsNormalizerFormatter() + { + $zendMonitor = new ZendMonitorHandler(); + $this->assertInstanceOf('Monolog\Formatter\NormalizerFormatter', $zendMonitor->getDefaultFormatter()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/LoggerTest.php b/vendor/monolog/monolog/tests/Monolog/LoggerTest.php new file mode 100755 index 0000000..442e87d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/LoggerTest.php @@ -0,0 +1,690 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Monolog\Processor\WebProcessor; +use Monolog\Handler\TestHandler; + +class LoggerTest extends \PHPUnit_Framework_TestCase +{ + /** + * @covers Monolog\Logger::getName + */ + public function testGetName() + { + $logger = new Logger('foo'); + $this->assertEquals('foo', $logger->getName()); + } + + /** + * @covers Monolog\Logger::getLevelName + */ + public function testGetLevelName() + { + $this->assertEquals('ERROR', Logger::getLevelName(Logger::ERROR)); + } + + /** + * @covers Monolog\Logger::withName + */ + public function testWithName() + { + $first = new Logger('first', array($handler = new TestHandler())); + $second = $first->withName('second'); + + $this->assertSame('first', $first->getName()); + $this->assertSame('second', $second->getName()); + $this->assertSame($handler, $second->popHandler()); + } + + /** + * @covers Monolog\Logger::toMonologLevel + */ + public function testConvertPSR3ToMonologLevel() + { + $this->assertEquals(Logger::toMonologLevel('debug'), 100); + $this->assertEquals(Logger::toMonologLevel('info'), 200); + $this->assertEquals(Logger::toMonologLevel('notice'), 250); + $this->assertEquals(Logger::toMonologLevel('warning'), 300); + $this->assertEquals(Logger::toMonologLevel('error'), 400); + $this->assertEquals(Logger::toMonologLevel('critical'), 500); + $this->assertEquals(Logger::toMonologLevel('alert'), 550); + $this->assertEquals(Logger::toMonologLevel('emergency'), 600); + } + + /** + * @covers Monolog\Logger::getLevelName + * @expectedException InvalidArgumentException + */ + public function testGetLevelNameThrows() + { + Logger::getLevelName(5); + } + + /** + * @covers Monolog\Logger::__construct + */ + public function testChannel() + { + $logger = new Logger('foo'); + $handler = new TestHandler; + $logger->pushHandler($handler); + $logger->addWarning('test'); + list($record) = $handler->getRecords(); + $this->assertEquals('foo', $record['channel']); + } + + /** + * @covers Monolog\Logger::addRecord + */ + public function testLog() + { + $logger = new Logger(__METHOD__); + + $handler = $this->getMock('Monolog\Handler\NullHandler', array('handle')); + $handler->expects($this->once()) + ->method('handle'); + $logger->pushHandler($handler); + + $this->assertTrue($logger->addWarning('test')); + } + + /** + * @covers Monolog\Logger::addRecord + */ + public function testLogNotHandled() + { + $logger = new Logger(__METHOD__); + + $handler = $this->getMock('Monolog\Handler\NullHandler', array('handle'), array(Logger::ERROR)); + $handler->expects($this->never()) + ->method('handle'); + $logger->pushHandler($handler); + + $this->assertFalse($logger->addWarning('test')); + } + + public function testHandlersInCtor() + { + $handler1 = new TestHandler; + $handler2 = new TestHandler; + $logger = new Logger(__METHOD__, array($handler1, $handler2)); + + $this->assertEquals($handler1, $logger->popHandler()); + $this->assertEquals($handler2, $logger->popHandler()); + } + + public function testProcessorsInCtor() + { + $processor1 = new WebProcessor; + $processor2 = new WebProcessor; + $logger = new Logger(__METHOD__, array(), array($processor1, $processor2)); + + $this->assertEquals($processor1, $logger->popProcessor()); + $this->assertEquals($processor2, $logger->popProcessor()); + } + + /** + * @covers Monolog\Logger::pushHandler + * @covers Monolog\Logger::popHandler + * @expectedException LogicException + */ + public function testPushPopHandler() + { + $logger = new Logger(__METHOD__); + $handler1 = new TestHandler; + $handler2 = new TestHandler; + + $logger->pushHandler($handler1); + $logger->pushHandler($handler2); + + $this->assertEquals($handler2, $logger->popHandler()); + $this->assertEquals($handler1, $logger->popHandler()); + $logger->popHandler(); + } + + /** + * @covers Monolog\Logger::setHandlers + */ + public function testSetHandlers() + { + $logger = new Logger(__METHOD__); + $handler1 = new TestHandler; + $handler2 = new TestHandler; + + $logger->pushHandler($handler1); + $logger->setHandlers(array($handler2)); + + // handler1 has been removed + $this->assertEquals(array($handler2), $logger->getHandlers()); + + $logger->setHandlers(array( + "AMapKey" => $handler1, + "Woop" => $handler2, + )); + + // Keys have been scrubbed + $this->assertEquals(array($handler1, $handler2), $logger->getHandlers()); + } + + /** + * @covers Monolog\Logger::pushProcessor + * @covers Monolog\Logger::popProcessor + * @expectedException LogicException + */ + public function testPushPopProcessor() + { + $logger = new Logger(__METHOD__); + $processor1 = new WebProcessor; + $processor2 = new WebProcessor; + + $logger->pushProcessor($processor1); + $logger->pushProcessor($processor2); + + $this->assertEquals($processor2, $logger->popProcessor()); + $this->assertEquals($processor1, $logger->popProcessor()); + $logger->popProcessor(); + } + + /** + * @covers Monolog\Logger::pushProcessor + * @expectedException InvalidArgumentException + */ + public function testPushProcessorWithNonCallable() + { + $logger = new Logger(__METHOD__); + + $logger->pushProcessor(new \stdClass()); + } + + /** + * @covers Monolog\Logger::addRecord + */ + public function testProcessorsAreExecuted() + { + $logger = new Logger(__METHOD__); + $handler = new TestHandler; + $logger->pushHandler($handler); + $logger->pushProcessor(function ($record) { + $record['extra']['win'] = true; + + return $record; + }); + $logger->addError('test'); + list($record) = $handler->getRecords(); + $this->assertTrue($record['extra']['win']); + } + + /** + * @covers Monolog\Logger::addRecord + */ + public function testProcessorsAreCalledOnlyOnce() + { + $logger = new Logger(__METHOD__); + $handler = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler->expects($this->any()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + $handler->expects($this->any()) + ->method('handle') + ->will($this->returnValue(true)) + ; + $logger->pushHandler($handler); + + $processor = $this->getMockBuilder('Monolog\Processor\WebProcessor') + ->disableOriginalConstructor() + ->setMethods(array('__invoke')) + ->getMock() + ; + $processor->expects($this->once()) + ->method('__invoke') + ->will($this->returnArgument(0)) + ; + $logger->pushProcessor($processor); + + $logger->addError('test'); + } + + /** + * @covers Monolog\Logger::addRecord + */ + public function testProcessorsNotCalledWhenNotHandled() + { + $logger = new Logger(__METHOD__); + $handler = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler->expects($this->once()) + ->method('isHandling') + ->will($this->returnValue(false)) + ; + $logger->pushHandler($handler); + $that = $this; + $logger->pushProcessor(function ($record) use ($that) { + $that->fail('The processor should not be called'); + }); + $logger->addAlert('test'); + } + + /** + * @covers Monolog\Logger::addRecord + */ + public function testHandlersNotCalledBeforeFirstHandling() + { + $logger = new Logger(__METHOD__); + + $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler1->expects($this->never()) + ->method('isHandling') + ->will($this->returnValue(false)) + ; + $handler1->expects($this->once()) + ->method('handle') + ->will($this->returnValue(false)) + ; + $logger->pushHandler($handler1); + + $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler2->expects($this->once()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + $handler2->expects($this->once()) + ->method('handle') + ->will($this->returnValue(false)) + ; + $logger->pushHandler($handler2); + + $handler3 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler3->expects($this->once()) + ->method('isHandling') + ->will($this->returnValue(false)) + ; + $handler3->expects($this->never()) + ->method('handle') + ; + $logger->pushHandler($handler3); + + $logger->debug('test'); + } + + /** + * @covers Monolog\Logger::addRecord + */ + public function testHandlersNotCalledBeforeFirstHandlingWithAssocArray() + { + $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler1->expects($this->never()) + ->method('isHandling') + ->will($this->returnValue(false)) + ; + $handler1->expects($this->once()) + ->method('handle') + ->will($this->returnValue(false)) + ; + + $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler2->expects($this->once()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + $handler2->expects($this->once()) + ->method('handle') + ->will($this->returnValue(false)) + ; + + $handler3 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler3->expects($this->once()) + ->method('isHandling') + ->will($this->returnValue(false)) + ; + $handler3->expects($this->never()) + ->method('handle') + ; + + $logger = new Logger(__METHOD__, array('last' => $handler3, 'second' => $handler2, 'first' => $handler1)); + + $logger->debug('test'); + } + + /** + * @covers Monolog\Logger::addRecord + */ + public function testBubblingWhenTheHandlerReturnsFalse() + { + $logger = new Logger(__METHOD__); + + $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler1->expects($this->any()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + $handler1->expects($this->once()) + ->method('handle') + ->will($this->returnValue(false)) + ; + $logger->pushHandler($handler1); + + $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler2->expects($this->any()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + $handler2->expects($this->once()) + ->method('handle') + ->will($this->returnValue(false)) + ; + $logger->pushHandler($handler2); + + $logger->debug('test'); + } + + /** + * @covers Monolog\Logger::addRecord + */ + public function testNotBubblingWhenTheHandlerReturnsTrue() + { + $logger = new Logger(__METHOD__); + + $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler1->expects($this->any()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + $handler1->expects($this->never()) + ->method('handle') + ; + $logger->pushHandler($handler1); + + $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler2->expects($this->any()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + $handler2->expects($this->once()) + ->method('handle') + ->will($this->returnValue(true)) + ; + $logger->pushHandler($handler2); + + $logger->debug('test'); + } + + /** + * @covers Monolog\Logger::isHandling + */ + public function testIsHandling() + { + $logger = new Logger(__METHOD__); + + $handler1 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler1->expects($this->any()) + ->method('isHandling') + ->will($this->returnValue(false)) + ; + + $logger->pushHandler($handler1); + $this->assertFalse($logger->isHandling(Logger::DEBUG)); + + $handler2 = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler2->expects($this->any()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + + $logger->pushHandler($handler2); + $this->assertTrue($logger->isHandling(Logger::DEBUG)); + } + + /** + * @dataProvider logMethodProvider + * @covers Monolog\Logger::addDebug + * @covers Monolog\Logger::addInfo + * @covers Monolog\Logger::addNotice + * @covers Monolog\Logger::addWarning + * @covers Monolog\Logger::addError + * @covers Monolog\Logger::addCritical + * @covers Monolog\Logger::addAlert + * @covers Monolog\Logger::addEmergency + * @covers Monolog\Logger::debug + * @covers Monolog\Logger::info + * @covers Monolog\Logger::notice + * @covers Monolog\Logger::warn + * @covers Monolog\Logger::err + * @covers Monolog\Logger::crit + * @covers Monolog\Logger::alert + * @covers Monolog\Logger::emerg + */ + public function testLogMethods($method, $expectedLevel) + { + $logger = new Logger('foo'); + $handler = new TestHandler; + $logger->pushHandler($handler); + $logger->{$method}('test'); + list($record) = $handler->getRecords(); + $this->assertEquals($expectedLevel, $record['level']); + } + + public function logMethodProvider() + { + return array( + // monolog methods + array('addDebug', Logger::DEBUG), + array('addInfo', Logger::INFO), + array('addNotice', Logger::NOTICE), + array('addWarning', Logger::WARNING), + array('addError', Logger::ERROR), + array('addCritical', Logger::CRITICAL), + array('addAlert', Logger::ALERT), + array('addEmergency', Logger::EMERGENCY), + + // ZF/Sf2 compat methods + array('debug', Logger::DEBUG), + array('info', Logger::INFO), + array('notice', Logger::NOTICE), + array('warn', Logger::WARNING), + array('err', Logger::ERROR), + array('crit', Logger::CRITICAL), + array('alert', Logger::ALERT), + array('emerg', Logger::EMERGENCY), + ); + } + + /** + * @dataProvider setTimezoneProvider + * @covers Monolog\Logger::setTimezone + */ + public function testSetTimezone($tz) + { + Logger::setTimezone($tz); + $logger = new Logger('foo'); + $handler = new TestHandler; + $logger->pushHandler($handler); + $logger->info('test'); + list($record) = $handler->getRecords(); + $this->assertEquals($tz, $record['datetime']->getTimezone()); + } + + public function setTimezoneProvider() + { + return array_map( + function ($tz) { return array(new \DateTimeZone($tz)); }, + \DateTimeZone::listIdentifiers() + ); + } + + /** + * @dataProvider useMicrosecondTimestampsProvider + * @covers Monolog\Logger::useMicrosecondTimestamps + * @covers Monolog\Logger::addRecord + */ + public function testUseMicrosecondTimestamps($micro, $assert) + { + $logger = new Logger('foo'); + $logger->useMicrosecondTimestamps($micro); + $handler = new TestHandler; + $logger->pushHandler($handler); + $logger->info('test'); + list($record) = $handler->getRecords(); + $this->{$assert}('000000', $record['datetime']->format('u')); + } + + public function useMicrosecondTimestampsProvider() + { + return array( + // this has a very small chance of a false negative (1/10^6) + 'with microseconds' => array(true, 'assertNotSame'), + 'without microseconds' => array(false, PHP_VERSION_ID >= 70100 ? 'assertNotSame' : 'assertSame'), + ); + } + + /** + * @covers Monolog\Logger::setExceptionHandler + */ + public function testSetExceptionHandler() + { + $logger = new Logger(__METHOD__); + $this->assertNull($logger->getExceptionHandler()); + $callback = function ($ex) { + }; + $logger->setExceptionHandler($callback); + $this->assertEquals($callback, $logger->getExceptionHandler()); + } + + /** + * @covers Monolog\Logger::setExceptionHandler + * @expectedException InvalidArgumentException + */ + public function testBadExceptionHandlerType() + { + $logger = new Logger(__METHOD__); + $logger->setExceptionHandler(false); + } + + /** + * @covers Monolog\Logger::handleException + * @expectedException Exception + */ + public function testDefaultHandleException() + { + $logger = new Logger(__METHOD__); + $handler = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler->expects($this->any()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + $handler->expects($this->any()) + ->method('handle') + ->will($this->throwException(new \Exception('Some handler exception'))) + ; + $logger->pushHandler($handler); + $logger->info('test'); + } + + /** + * @covers Monolog\Logger::handleException + * @covers Monolog\Logger::addRecord + */ + public function testCustomHandleException() + { + $logger = new Logger(__METHOD__); + $that = $this; + $logger->setExceptionHandler(function ($e, $record) use ($that) { + $that->assertEquals($e->getMessage(), 'Some handler exception'); + $that->assertTrue(is_array($record)); + $that->assertEquals($record['message'], 'test'); + }); + $handler = $this->getMock('Monolog\Handler\HandlerInterface'); + $handler->expects($this->any()) + ->method('isHandling') + ->will($this->returnValue(true)) + ; + $handler->expects($this->any()) + ->method('handle') + ->will($this->throwException(new \Exception('Some handler exception'))) + ; + $logger->pushHandler($handler); + $logger->info('test'); + } + + public function testReset() + { + $logger = new Logger('app'); + + $testHandler = new Handler\TestHandler(); + $bufferHandler = new Handler\BufferHandler($testHandler); + $groupHandler = new Handler\GroupHandler(array($bufferHandler)); + $fingersCrossedHandler = new Handler\FingersCrossedHandler($groupHandler); + + $logger->pushHandler($fingersCrossedHandler); + + $processorUid1 = new Processor\UidProcessor(10); + $uid1 = $processorUid1->getUid(); + $groupHandler->pushProcessor($processorUid1); + + $processorUid2 = new Processor\UidProcessor(5); + $uid2 = $processorUid2->getUid(); + $logger->pushProcessor($processorUid2); + + $getProperty = function ($object, $property) { + $reflectionProperty = new \ReflectionProperty(get_class($object), $property); + $reflectionProperty->setAccessible(true); + + return $reflectionProperty->getValue($object); + }; + $that = $this; + $assertBufferOfBufferHandlerEmpty = function () use ($getProperty, $bufferHandler, $that) { + $that->assertEmpty($getProperty($bufferHandler, 'buffer')); + }; + $assertBuffersEmpty = function() use ($assertBufferOfBufferHandlerEmpty, $getProperty, $fingersCrossedHandler, $that) { + $assertBufferOfBufferHandlerEmpty(); + $that->assertEmpty($getProperty($fingersCrossedHandler, 'buffer')); + }; + + $logger->debug('debug'); + $logger->reset(); + $assertBuffersEmpty(); + $this->assertFalse($testHandler->hasDebugRecords()); + $this->assertFalse($testHandler->hasErrorRecords()); + $this->assertNotSame($uid1, $uid1 = $processorUid1->getUid()); + $this->assertNotSame($uid2, $uid2 = $processorUid2->getUid()); + + $logger->debug('debug'); + $logger->error('error'); + $logger->reset(); + $assertBuffersEmpty(); + $this->assertTrue($testHandler->hasDebugRecords()); + $this->assertTrue($testHandler->hasErrorRecords()); + $this->assertNotSame($uid1, $uid1 = $processorUid1->getUid()); + $this->assertNotSame($uid2, $uid2 = $processorUid2->getUid()); + + $logger->info('info'); + $this->assertNotEmpty($getProperty($fingersCrossedHandler, 'buffer')); + $assertBufferOfBufferHandlerEmpty(); + $this->assertFalse($testHandler->hasInfoRecords()); + + $logger->reset(); + $assertBuffersEmpty(); + $this->assertFalse($testHandler->hasInfoRecords()); + $this->assertNotSame($uid1, $uid1 = $processorUid1->getUid()); + $this->assertNotSame($uid2, $uid2 = $processorUid2->getUid()); + + $logger->notice('notice'); + $logger->emergency('emergency'); + $logger->reset(); + $assertBuffersEmpty(); + $this->assertFalse($testHandler->hasInfoRecords()); + $this->assertTrue($testHandler->hasNoticeRecords()); + $this->assertTrue($testHandler->hasEmergencyRecords()); + $this->assertNotSame($uid1, $processorUid1->getUid()); + $this->assertNotSame($uid2, $processorUid2->getUid()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php new file mode 100755 index 0000000..5adb505 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/GitProcessorTest.php @@ -0,0 +1,29 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\TestCase; + +class GitProcessorTest extends TestCase +{ + /** + * @covers Monolog\Processor\GitProcessor::__invoke + */ + public function testProcessor() + { + $processor = new GitProcessor(); + $record = $processor($this->getRecord()); + + $this->assertArrayHasKey('git', $record['extra']); + $this->assertTrue(!is_array($record['extra']['git']['branch'])); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php new file mode 100755 index 0000000..0dd411d --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/IntrospectionProcessorTest.php @@ -0,0 +1,123 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Acme; + +class Tester +{ + public function test($handler, $record) + { + $handler->handle($record); + } +} + +function tester($handler, $record) +{ + $handler->handle($record); +} + +namespace Monolog\Processor; + +use Monolog\Logger; +use Monolog\TestCase; +use Monolog\Handler\TestHandler; + +class IntrospectionProcessorTest extends TestCase +{ + public function getHandler() + { + $processor = new IntrospectionProcessor(); + $handler = new TestHandler(); + $handler->pushProcessor($processor); + + return $handler; + } + + public function testProcessorFromClass() + { + $handler = $this->getHandler(); + $tester = new \Acme\Tester; + $tester->test($handler, $this->getRecord()); + list($record) = $handler->getRecords(); + $this->assertEquals(__FILE__, $record['extra']['file']); + $this->assertEquals(18, $record['extra']['line']); + $this->assertEquals('Acme\Tester', $record['extra']['class']); + $this->assertEquals('test', $record['extra']['function']); + } + + public function testProcessorFromFunc() + { + $handler = $this->getHandler(); + \Acme\tester($handler, $this->getRecord()); + list($record) = $handler->getRecords(); + $this->assertEquals(__FILE__, $record['extra']['file']); + $this->assertEquals(24, $record['extra']['line']); + $this->assertEquals(null, $record['extra']['class']); + $this->assertEquals('Acme\tester', $record['extra']['function']); + } + + public function testLevelTooLow() + { + $input = array( + 'level' => Logger::DEBUG, + 'extra' => array(), + ); + + $expected = $input; + + $processor = new IntrospectionProcessor(Logger::CRITICAL); + $actual = $processor($input); + + $this->assertEquals($expected, $actual); + } + + public function testLevelEqual() + { + $input = array( + 'level' => Logger::CRITICAL, + 'extra' => array(), + ); + + $expected = $input; + $expected['extra'] = array( + 'file' => null, + 'line' => null, + 'class' => 'ReflectionMethod', + 'function' => 'invokeArgs', + ); + + $processor = new IntrospectionProcessor(Logger::CRITICAL); + $actual = $processor($input); + + $this->assertEquals($expected, $actual); + } + + public function testLevelHigher() + { + $input = array( + 'level' => Logger::EMERGENCY, + 'extra' => array(), + ); + + $expected = $input; + $expected['extra'] = array( + 'file' => null, + 'line' => null, + 'class' => 'ReflectionMethod', + 'function' => 'invokeArgs', + ); + + $processor = new IntrospectionProcessor(Logger::CRITICAL); + $actual = $processor($input); + + $this->assertEquals($expected, $actual); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php new file mode 100755 index 0000000..eb66614 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryPeakUsageProcessorTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\TestCase; + +class MemoryPeakUsageProcessorTest extends TestCase +{ + /** + * @covers Monolog\Processor\MemoryPeakUsageProcessor::__invoke + * @covers Monolog\Processor\MemoryProcessor::formatBytes + */ + public function testProcessor() + { + $processor = new MemoryPeakUsageProcessor(); + $record = $processor($this->getRecord()); + $this->assertArrayHasKey('memory_peak_usage', $record['extra']); + $this->assertRegExp('#[0-9.]+ (M|K)?B$#', $record['extra']['memory_peak_usage']); + } + + /** + * @covers Monolog\Processor\MemoryPeakUsageProcessor::__invoke + * @covers Monolog\Processor\MemoryProcessor::formatBytes + */ + public function testProcessorWithoutFormatting() + { + $processor = new MemoryPeakUsageProcessor(true, false); + $record = $processor($this->getRecord()); + $this->assertArrayHasKey('memory_peak_usage', $record['extra']); + $this->assertInternalType('int', $record['extra']['memory_peak_usage']); + $this->assertGreaterThan(0, $record['extra']['memory_peak_usage']); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php new file mode 100755 index 0000000..4692dbf --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/MemoryUsageProcessorTest.php @@ -0,0 +1,42 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\TestCase; + +class MemoryUsageProcessorTest extends TestCase +{ + /** + * @covers Monolog\Processor\MemoryUsageProcessor::__invoke + * @covers Monolog\Processor\MemoryProcessor::formatBytes + */ + public function testProcessor() + { + $processor = new MemoryUsageProcessor(); + $record = $processor($this->getRecord()); + $this->assertArrayHasKey('memory_usage', $record['extra']); + $this->assertRegExp('#[0-9.]+ (M|K)?B$#', $record['extra']['memory_usage']); + } + + /** + * @covers Monolog\Processor\MemoryUsageProcessor::__invoke + * @covers Monolog\Processor\MemoryProcessor::formatBytes + */ + public function testProcessorWithoutFormatting() + { + $processor = new MemoryUsageProcessor(true, false); + $record = $processor($this->getRecord()); + $this->assertArrayHasKey('memory_usage', $record['extra']); + $this->assertInternalType('int', $record['extra']['memory_usage']); + $this->assertGreaterThan(0, $record['extra']['memory_usage']); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php new file mode 100755 index 0000000..11f2b35 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php @@ -0,0 +1,41 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\TestCase; + +class MercurialProcessorTest extends TestCase +{ + /** + * @covers Monolog\Processor\MercurialProcessor::__invoke + */ + public function testProcessor() + { + if (defined('PHP_WINDOWS_VERSION_BUILD')) { + exec("where hg 2>NUL", $output, $result); + } else { + exec("which hg 2>/dev/null >/dev/null", $output, $result); + } + if ($result != 0) { + $this->markTestSkipped('hg is missing'); + return; + } + + `hg init`; + $processor = new MercurialProcessor(); + $record = $processor($this->getRecord()); + + $this->assertArrayHasKey('hg', $record['extra']); + $this->assertTrue(!is_array($record['extra']['hg']['branch'])); + $this->assertTrue(!is_array($record['extra']['hg']['revision'])); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php new file mode 100755 index 0000000..458d2a3 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/ProcessIdProcessorTest.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\TestCase; + +class ProcessIdProcessorTest extends TestCase +{ + /** + * @covers Monolog\Processor\ProcessIdProcessor::__invoke + */ + public function testProcessor() + { + $processor = new ProcessIdProcessor(); + $record = $processor($this->getRecord()); + $this->assertArrayHasKey('process_id', $record['extra']); + $this->assertInternalType('int', $record['extra']['process_id']); + $this->assertGreaterThan(0, $record['extra']['process_id']); + $this->assertEquals(getmypid(), $record['extra']['process_id']); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php new file mode 100755 index 0000000..029a0c0 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/PsrLogMessageProcessorTest.php @@ -0,0 +1,43 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +class PsrLogMessageProcessorTest extends \PHPUnit_Framework_TestCase +{ + /** + * @dataProvider getPairs + */ + public function testReplacement($val, $expected) + { + $proc = new PsrLogMessageProcessor; + + $message = $proc(array( + 'message' => '{foo}', + 'context' => array('foo' => $val), + )); + $this->assertEquals($expected, $message['message']); + } + + public function getPairs() + { + return array( + array('foo', 'foo'), + array('3', '3'), + array(3, '3'), + array(null, ''), + array(true, '1'), + array(false, ''), + array(new \stdClass, '[object stdClass]'), + array(array(), '[array]'), + ); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php new file mode 100755 index 0000000..0d860c6 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/TagProcessorTest.php @@ -0,0 +1,49 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\TestCase; + +class TagProcessorTest extends TestCase +{ + /** + * @covers Monolog\Processor\TagProcessor::__invoke + */ + public function testProcessor() + { + $tags = array(1, 2, 3); + $processor = new TagProcessor($tags); + $record = $processor($this->getRecord()); + + $this->assertEquals($tags, $record['extra']['tags']); + } + + /** + * @covers Monolog\Processor\TagProcessor::__invoke + */ + public function testProcessorTagModification() + { + $tags = array(1, 2, 3); + $processor = new TagProcessor($tags); + + $record = $processor($this->getRecord()); + $this->assertEquals($tags, $record['extra']['tags']); + + $processor->setTags(array('a', 'b')); + $record = $processor($this->getRecord()); + $this->assertEquals(array('a', 'b'), $record['extra']['tags']); + + $processor->addTags(array('a', 'c', 'foo' => 'bar')); + $record = $processor($this->getRecord()); + $this->assertEquals(array('a', 'b', 'a', 'c', 'foo' => 'bar'), $record['extra']['tags']); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php new file mode 100755 index 0000000..5d13058 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/UidProcessorTest.php @@ -0,0 +1,33 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\TestCase; + +class UidProcessorTest extends TestCase +{ + /** + * @covers Monolog\Processor\UidProcessor::__invoke + */ + public function testProcessor() + { + $processor = new UidProcessor(); + $record = $processor($this->getRecord()); + $this->assertArrayHasKey('uid', $record['extra']); + } + + public function testGetUid() + { + $processor = new UidProcessor(10); + $this->assertEquals(10, strlen($processor->getUid())); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php b/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php new file mode 100755 index 0000000..4105baf --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php @@ -0,0 +1,113 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog\Processor; + +use Monolog\TestCase; + +class WebProcessorTest extends TestCase +{ + public function testProcessor() + { + $server = array( + 'REQUEST_URI' => 'A', + 'REMOTE_ADDR' => 'B', + 'REQUEST_METHOD' => 'C', + 'HTTP_REFERER' => 'D', + 'SERVER_NAME' => 'F', + 'UNIQUE_ID' => 'G', + ); + + $processor = new WebProcessor($server); + $record = $processor($this->getRecord()); + $this->assertEquals($server['REQUEST_URI'], $record['extra']['url']); + $this->assertEquals($server['REMOTE_ADDR'], $record['extra']['ip']); + $this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']); + $this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']); + $this->assertEquals($server['SERVER_NAME'], $record['extra']['server']); + $this->assertEquals($server['UNIQUE_ID'], $record['extra']['unique_id']); + } + + public function testProcessorDoNothingIfNoRequestUri() + { + $server = array( + 'REMOTE_ADDR' => 'B', + 'REQUEST_METHOD' => 'C', + ); + $processor = new WebProcessor($server); + $record = $processor($this->getRecord()); + $this->assertEmpty($record['extra']); + } + + public function testProcessorReturnNullIfNoHttpReferer() + { + $server = array( + 'REQUEST_URI' => 'A', + 'REMOTE_ADDR' => 'B', + 'REQUEST_METHOD' => 'C', + 'SERVER_NAME' => 'F', + ); + $processor = new WebProcessor($server); + $record = $processor($this->getRecord()); + $this->assertNull($record['extra']['referrer']); + } + + public function testProcessorDoesNotAddUniqueIdIfNotPresent() + { + $server = array( + 'REQUEST_URI' => 'A', + 'REMOTE_ADDR' => 'B', + 'REQUEST_METHOD' => 'C', + 'SERVER_NAME' => 'F', + ); + $processor = new WebProcessor($server); + $record = $processor($this->getRecord()); + $this->assertFalse(isset($record['extra']['unique_id'])); + } + + public function testProcessorAddsOnlyRequestedExtraFields() + { + $server = array( + 'REQUEST_URI' => 'A', + 'REMOTE_ADDR' => 'B', + 'REQUEST_METHOD' => 'C', + 'SERVER_NAME' => 'F', + ); + + $processor = new WebProcessor($server, array('url', 'http_method')); + $record = $processor($this->getRecord()); + + $this->assertSame(array('url' => 'A', 'http_method' => 'C'), $record['extra']); + } + + public function testProcessorConfiguringOfExtraFields() + { + $server = array( + 'REQUEST_URI' => 'A', + 'REMOTE_ADDR' => 'B', + 'REQUEST_METHOD' => 'C', + 'SERVER_NAME' => 'F', + ); + + $processor = new WebProcessor($server, array('url' => 'REMOTE_ADDR')); + $record = $processor($this->getRecord()); + + $this->assertSame(array('url' => 'B'), $record['extra']); + } + + /** + * @expectedException UnexpectedValueException + */ + public function testInvalidData() + { + new WebProcessor(new \stdClass); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php b/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php new file mode 100755 index 0000000..ab89944 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/PsrLogCompatTest.php @@ -0,0 +1,47 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Monolog\Handler\TestHandler; +use Monolog\Formatter\LineFormatter; +use Monolog\Processor\PsrLogMessageProcessor; +use Psr\Log\Test\LoggerInterfaceTest; + +class PsrLogCompatTest extends LoggerInterfaceTest +{ + private $handler; + + public function getLogger() + { + $logger = new Logger('foo'); + $logger->pushHandler($handler = new TestHandler); + $logger->pushProcessor(new PsrLogMessageProcessor); + $handler->setFormatter(new LineFormatter('%level_name% %message%')); + + $this->handler = $handler; + + return $logger; + } + + public function getLogs() + { + $convert = function ($record) { + $lower = function ($match) { + return strtolower($match[0]); + }; + + return preg_replace_callback('{^[A-Z]+}', $lower, $record['formatted']); + }; + + return array_map($convert, $this->handler->getRecords()); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/RegistryTest.php b/vendor/monolog/monolog/tests/Monolog/RegistryTest.php new file mode 100755 index 0000000..15fdfbd --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/RegistryTest.php @@ -0,0 +1,153 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +class RegistryTest extends \PHPUnit_Framework_TestCase +{ + protected function setUp() + { + Registry::clear(); + } + + /** + * @dataProvider hasLoggerProvider + * @covers Monolog\Registry::hasLogger + */ + public function testHasLogger(array $loggersToAdd, array $loggersToCheck, array $expectedResult) + { + foreach ($loggersToAdd as $loggerToAdd) { + Registry::addLogger($loggerToAdd); + } + foreach ($loggersToCheck as $index => $loggerToCheck) { + $this->assertSame($expectedResult[$index], Registry::hasLogger($loggerToCheck)); + } + } + + public function hasLoggerProvider() + { + $logger1 = new Logger('test1'); + $logger2 = new Logger('test2'); + $logger3 = new Logger('test3'); + + return array( + // only instances + array( + array($logger1), + array($logger1, $logger2), + array(true, false), + ), + // only names + array( + array($logger1), + array('test1', 'test2'), + array(true, false), + ), + // mixed case + array( + array($logger1, $logger2), + array('test1', $logger2, 'test3', $logger3), + array(true, true, false, false), + ), + ); + } + + /** + * @covers Monolog\Registry::clear + */ + public function testClearClears() + { + Registry::addLogger(new Logger('test1'), 'log'); + Registry::clear(); + + $this->setExpectedException('\InvalidArgumentException'); + Registry::getInstance('log'); + } + + /** + * @dataProvider removedLoggerProvider + * @covers Monolog\Registry::addLogger + * @covers Monolog\Registry::removeLogger + */ + public function testRemovesLogger($loggerToAdd, $remove) + { + Registry::addLogger($loggerToAdd); + Registry::removeLogger($remove); + + $this->setExpectedException('\InvalidArgumentException'); + Registry::getInstance($loggerToAdd->getName()); + } + + public function removedLoggerProvider() + { + $logger1 = new Logger('test1'); + + return array( + array($logger1, $logger1), + array($logger1, 'test1'), + ); + } + + /** + * @covers Monolog\Registry::addLogger + * @covers Monolog\Registry::getInstance + * @covers Monolog\Registry::__callStatic + */ + public function testGetsSameLogger() + { + $logger1 = new Logger('test1'); + $logger2 = new Logger('test2'); + + Registry::addLogger($logger1, 'test1'); + Registry::addLogger($logger2); + + $this->assertSame($logger1, Registry::getInstance('test1')); + $this->assertSame($logger2, Registry::test2()); + } + + /** + * @expectedException \InvalidArgumentException + * @covers Monolog\Registry::getInstance + */ + public function testFailsOnNonExistantLogger() + { + Registry::getInstance('test1'); + } + + /** + * @covers Monolog\Registry::addLogger + */ + public function testReplacesLogger() + { + $log1 = new Logger('test1'); + $log2 = new Logger('test2'); + + Registry::addLogger($log1, 'log'); + + Registry::addLogger($log2, 'log', true); + + $this->assertSame($log2, Registry::getInstance('log')); + } + + /** + * @expectedException \InvalidArgumentException + * @covers Monolog\Registry::addLogger + */ + public function testFailsOnUnspecifiedReplacement() + { + $log1 = new Logger('test1'); + $log2 = new Logger('test2'); + + Registry::addLogger($log1, 'log'); + + Registry::addLogger($log2, 'log'); + } +} diff --git a/vendor/monolog/monolog/tests/Monolog/SignalHandlerTest.php b/vendor/monolog/monolog/tests/Monolog/SignalHandlerTest.php new file mode 100755 index 0000000..9fa0792 --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/SignalHandlerTest.php @@ -0,0 +1,287 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +use Monolog\Handler\StreamHandler; +use Monolog\Handler\TestHandler; +use Psr\Log\LogLevel; + +/** + * @author Robert Gust-Bardon + * @covers Monolog\SignalHandler + */ +class SignalHandlerTest extends TestCase +{ + + private $asyncSignalHandling; + private $blockedSignals; + private $signalHandlers; + + protected function setUp() + { + $this->signalHandlers = array(); + if (extension_loaded('pcntl')) { + if (function_exists('pcntl_async_signals')) { + $this->asyncSignalHandling = pcntl_async_signals(); + } + if (function_exists('pcntl_sigprocmask')) { + pcntl_sigprocmask(SIG_BLOCK, array(), $this->blockedSignals); + } + } + } + + protected function tearDown() + { + if ($this->asyncSignalHandling !== null) { + pcntl_async_signals($this->asyncSignalHandling); + } + if ($this->blockedSignals !== null) { + pcntl_sigprocmask(SIG_SETMASK, $this->blockedSignals); + } + if ($this->signalHandlers) { + pcntl_signal_dispatch(); + foreach ($this->signalHandlers as $signo => $handler) { + pcntl_signal($signo, $handler); + } + } + } + + private function setSignalHandler($signo, $handler = SIG_DFL) { + if (function_exists('pcntl_signal_get_handler')) { + $this->signalHandlers[$signo] = pcntl_signal_get_handler($signo); + } else { + $this->signalHandlers[$signo] = SIG_DFL; + } + $this->assertTrue(pcntl_signal($signo, $handler)); + } + + public function testHandleSignal() + { + $logger = new Logger('test', array($handler = new TestHandler)); + $errHandler = new SignalHandler($logger); + $signo = 2; // SIGINT. + $siginfo = array('signo' => $signo, 'errno' => 0, 'code' => 0); + $errHandler->handleSignal($signo, $siginfo); + $this->assertCount(1, $handler->getRecords()); + $this->assertTrue($handler->hasCriticalRecords()); + $records = $handler->getRecords(); + $this->assertSame($siginfo, $records[0]['context']); + } + + /** + * @depends testHandleSignal + * @requires extension pcntl + * @requires extension posix + * @requires function pcntl_signal + * @requires function pcntl_signal_dispatch + * @requires function posix_getpid + * @requires function posix_kill + */ + public function testRegisterSignalHandler() + { + // SIGCONT and SIGURG should be ignored by default. + if (!defined('SIGCONT') || !defined('SIGURG')) { + $this->markTestSkipped('This test requires the SIGCONT and SIGURG pcntl constants.'); + } + + $this->setSignalHandler(SIGCONT, SIG_IGN); + $this->setSignalHandler(SIGURG, SIG_IGN); + + $logger = new Logger('test', array($handler = new TestHandler)); + $errHandler = new SignalHandler($logger); + $pid = posix_getpid(); + + $this->assertTrue(posix_kill($pid, SIGURG)); + $this->assertTrue(pcntl_signal_dispatch()); + $this->assertCount(0, $handler->getRecords()); + + $errHandler->registerSignalHandler(SIGURG, LogLevel::INFO, false, false, false); + + $this->assertTrue(posix_kill($pid, SIGCONT)); + $this->assertTrue(pcntl_signal_dispatch()); + $this->assertCount(0, $handler->getRecords()); + + $this->assertTrue(posix_kill($pid, SIGURG)); + $this->assertTrue(pcntl_signal_dispatch()); + $this->assertCount(1, $handler->getRecords()); + $this->assertTrue($handler->hasInfoThatContains('SIGURG')); + } + + /** + * @dataProvider defaultPreviousProvider + * @depends testRegisterSignalHandler + * @requires function pcntl_fork + * @requires function pcntl_sigprocmask + * @requires function pcntl_waitpid + */ + public function testRegisterDefaultPreviousSignalHandler($signo, $callPrevious, $expected) + { + $this->setSignalHandler($signo, SIG_DFL); + + $path = tempnam(sys_get_temp_dir(), 'monolog-'); + $this->assertNotFalse($path); + + $pid = pcntl_fork(); + if ($pid === 0) { // Child. + $streamHandler = new StreamHandler($path); + $streamHandler->setFormatter($this->getIdentityFormatter()); + $logger = new Logger('test', array($streamHandler)); + $errHandler = new SignalHandler($logger); + $errHandler->registerSignalHandler($signo, LogLevel::INFO, $callPrevious, false, false); + pcntl_sigprocmask(SIG_SETMASK, array(SIGCONT)); + posix_kill(posix_getpid(), $signo); + pcntl_signal_dispatch(); + // If $callPrevious is true, SIGINT should terminate by this line. + pcntl_sigprocmask(SIG_BLOCK, array(), $oldset); + file_put_contents($path, implode(' ', $oldset), FILE_APPEND); + posix_kill(posix_getpid(), $signo); + pcntl_signal_dispatch(); + exit(); + } + + $this->assertNotSame(-1, $pid); + $this->assertNotSame(-1, pcntl_waitpid($pid, $status)); + $this->assertNotSame(-1, $status); + $this->assertSame($expected, file_get_contents($path)); + } + + public function defaultPreviousProvider() + { + if (!defined('SIGCONT') || !defined('SIGINT') || !defined('SIGURG')) { + return array(); + } + + return array( + array(SIGINT, false, 'Program received signal SIGINT'.SIGCONT.'Program received signal SIGINT'), + array(SIGINT, true, 'Program received signal SIGINT'), + array(SIGURG, false, 'Program received signal SIGURG'.SIGCONT.'Program received signal SIGURG'), + array(SIGURG, true, 'Program received signal SIGURG'.SIGCONT.'Program received signal SIGURG'), + ); + } + + /** + * @dataProvider callablePreviousProvider + * @depends testRegisterSignalHandler + * @requires function pcntl_signal_get_handler + */ + public function testRegisterCallablePreviousSignalHandler($callPrevious) + { + $this->setSignalHandler(SIGURG, SIG_IGN); + + $logger = new Logger('test', array($handler = new TestHandler)); + $errHandler = new SignalHandler($logger); + $previousCalled = 0; + pcntl_signal(SIGURG, function ($signo, array $siginfo = null) use (&$previousCalled) { + ++$previousCalled; + }); + $errHandler->registerSignalHandler(SIGURG, LogLevel::INFO, $callPrevious, false, false); + $this->assertTrue(posix_kill(posix_getpid(), SIGURG)); + $this->assertTrue(pcntl_signal_dispatch()); + $this->assertCount(1, $handler->getRecords()); + $this->assertTrue($handler->hasInfoThatContains('SIGURG')); + $this->assertSame($callPrevious ? 1 : 0, $previousCalled); + } + + public function callablePreviousProvider() + { + return array( + array(false), + array(true), + ); + } + + /** + * @dataProvider restartSyscallsProvider + * @depends testRegisterDefaultPreviousSignalHandler + * @requires function pcntl_fork + * @requires function pcntl_waitpid + */ + public function testRegisterSyscallRestartingSignalHandler($restartSyscalls) + { + $this->setSignalHandler(SIGURG, SIG_IGN); + + $parentPid = posix_getpid(); + $microtime = microtime(true); + + $pid = pcntl_fork(); + if ($pid === 0) { // Child. + usleep(100000); + posix_kill($parentPid, SIGURG); + usleep(100000); + exit(); + } + + $this->assertNotSame(-1, $pid); + $logger = new Logger('test', array($handler = new TestHandler)); + $errHandler = new SignalHandler($logger); + $errHandler->registerSignalHandler(SIGURG, LogLevel::INFO, false, $restartSyscalls, false); + if ($restartSyscalls) { + // pcntl_wait is expected to be restarted after the signal handler. + $this->assertNotSame(-1, pcntl_waitpid($pid, $status)); + } else { + // pcntl_wait is expected to be interrupted when the signal handler is invoked. + $this->assertSame(-1, pcntl_waitpid($pid, $status)); + } + $this->assertSame($restartSyscalls, microtime(true) - $microtime > 0.15); + $this->assertTrue(pcntl_signal_dispatch()); + $this->assertCount(1, $handler->getRecords()); + if ($restartSyscalls) { + // The child has already exited. + $this->assertSame(-1, pcntl_waitpid($pid, $status)); + } else { + // The child has not exited yet. + $this->assertNotSame(-1, pcntl_waitpid($pid, $status)); + } + } + + public function restartSyscallsProvider() + { + return array( + array(false), + array(true), + array(false), + array(true), + ); + } + + /** + * @dataProvider asyncProvider + * @depends testRegisterDefaultPreviousSignalHandler + * @requires function pcntl_async_signals + */ + public function testRegisterAsyncSignalHandler($initialAsync, $desiredAsync, $expectedBefore, $expectedAfter) + { + $this->setSignalHandler(SIGURG, SIG_IGN); + pcntl_async_signals($initialAsync); + + $logger = new Logger('test', array($handler = new TestHandler)); + $errHandler = new SignalHandler($logger); + $errHandler->registerSignalHandler(SIGURG, LogLevel::INFO, false, false, $desiredAsync); + $this->assertTrue(posix_kill(posix_getpid(), SIGURG)); + $this->assertCount($expectedBefore, $handler->getRecords()); + $this->assertTrue(pcntl_signal_dispatch()); + $this->assertCount($expectedAfter, $handler->getRecords()); + } + + public function asyncProvider() + { + return array( + array(false, false, 0, 1), + array(false, null, 0, 1), + array(false, true, 1, 1), + array(true, false, 0, 1), + array(true, null, 1, 1), + array(true, true, 1, 1), + ); + } + +} diff --git a/vendor/monolog/monolog/tests/Monolog/TestCase.php b/vendor/monolog/monolog/tests/Monolog/TestCase.php new file mode 100755 index 0000000..4eb7b4c --- /dev/null +++ b/vendor/monolog/monolog/tests/Monolog/TestCase.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Monolog; + +class TestCase extends \PHPUnit_Framework_TestCase +{ + /** + * @return array Record + */ + protected function getRecord($level = Logger::WARNING, $message = 'test', $context = array()) + { + return array( + 'message' => $message, + 'context' => $context, + 'level' => $level, + 'level_name' => Logger::getLevelName($level), + 'channel' => 'test', + 'datetime' => \DateTime::createFromFormat('U.u', sprintf('%.6F', microtime(true))), + 'extra' => array(), + ); + } + + /** + * @return array + */ + protected function getMultipleRecords() + { + return array( + $this->getRecord(Logger::DEBUG, 'debug message 1'), + $this->getRecord(Logger::DEBUG, 'debug message 2'), + $this->getRecord(Logger::INFO, 'information'), + $this->getRecord(Logger::WARNING, 'warning'), + $this->getRecord(Logger::ERROR, 'error'), + ); + } + + /** + * @return Monolog\Formatter\FormatterInterface + */ + protected function getIdentityFormatter() + { + $formatter = $this->getMock('Monolog\\Formatter\\FormatterInterface'); + $formatter->expects($this->any()) + ->method('format') + ->will($this->returnCallback(function ($record) { return $record['message']; })); + + return $formatter; + } +} diff --git a/vendor/myclabs/php-enum/LICENSE b/vendor/myclabs/php-enum/LICENSE new file mode 100755 index 0000000..2a8cf22 --- /dev/null +++ b/vendor/myclabs/php-enum/LICENSE @@ -0,0 +1,18 @@ +The MIT License (MIT) + +Copyright (c) 2015 My C-Labs + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and +associated documentation files (the "Software"), to deal in the Software without restriction, +including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial +portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT +NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/myclabs/php-enum/README.md b/vendor/myclabs/php-enum/README.md new file mode 100755 index 0000000..7bdd4f8 --- /dev/null +++ b/vendor/myclabs/php-enum/README.md @@ -0,0 +1,131 @@ +# PHP Enum implementation inspired from SplEnum + +[![Build Status](https://travis-ci.org/myclabs/php-enum.png?branch=master)](https://travis-ci.org/myclabs/php-enum) +[![Latest Stable Version](https://poser.pugx.org/myclabs/php-enum/version.png)](https://packagist.org/packages/myclabs/php-enum) +[![Total Downloads](https://poser.pugx.org/myclabs/php-enum/downloads.png)](https://packagist.org/packages/myclabs/php-enum) + +Maintenance for this project is [supported via Tidelift](https://tidelift.com/subscription/pkg/packagist-myclabs-php-enum?utm_source=packagist-myclabs-php-enum&utm_medium=referral&utm_campaign=readme). + +## Why? + +First, and mainly, `SplEnum` is not integrated to PHP, you have to install the extension separately. + +Using an enum instead of class constants provides the following advantages: + +- You can type-hint: `function setAction(Action $action) {` +- You can enrich the enum with methods (e.g. `format`, `parse`, …) +- You can extend the enum to add new values (make your enum `final` to prevent it) +- You can get a list of all the possible values (see below) + +This Enum class is not intended to replace class constants, but only to be used when it makes sense. + +## Installation + +``` +composer require myclabs/php-enum +``` + +## Declaration + +```php +use MyCLabs\Enum\Enum; + +/** + * Action enum + */ +class Action extends Enum +{ + private const VIEW = 'view'; + private const EDIT = 'edit'; +} +``` + +## Usage + +```php +$action = Action::VIEW(); + +// or with a dynamic key: +$action = Action::$key(); +// or with a dynamic value: +$action = new Action($value); +``` + +As you can see, static methods are automatically implemented to provide quick access to an enum value. + +One advantage over using class constants is to be able to type-hint enum values: + +```php +function setAction(Action $action) { + // ... +} +``` + +## Documentation + +- `__construct()` The constructor checks that the value exist in the enum +- `__toString()` You can `echo $myValue`, it will display the enum value (value of the constant) +- `getValue()` Returns the current value of the enum +- `getKey()` Returns the key of the current value on Enum +- `equals()` Tests whether enum instances are equal (returns `true` if enum values are equal, `false` otherwise) + +Static methods: + +- `toArray()` method Returns all possible values as an array (constant name in key, constant value in value) +- `keys()` Returns the names (keys) of all constants in the Enum class +- `values()` Returns instances of the Enum class of all Enum constants (constant name in key, Enum instance in value) +- `isValid()` Check if tested value is valid on enum set +- `isValidKey()` Check if tested key is valid on enum set +- `search()` Return key for searched value + +### Static methods + +```php +class Action extends Enum +{ + private const VIEW = 'view'; + private const EDIT = 'edit'; +} + +// Static method: +$action = Action::VIEW(); +$action = Action::EDIT(); +``` + +Static method helpers are implemented using [`__callStatic()`](http://www.php.net/manual/en/language.oop5.overloading.php#object.callstatic). + +If you care about IDE autocompletion, you can either implement the static methods yourself: + +```php +class Action extends Enum +{ + private const VIEW = 'view'; + + /** + * @return Action + */ + public static function VIEW() { + return new Action(self::VIEW); + } +} +``` + +or you can use phpdoc (this is supported in PhpStorm for example): + +```php +/** + * @method static Action VIEW() + * @method static Action EDIT() + */ +class Action extends Enum +{ + private const VIEW = 'view'; + private const EDIT = 'edit'; +} +``` + +## Related projects + +- [Doctrine enum mapping](https://github.com/acelaya/doctrine-enum-type) +- [Symfony ParamConverter integration](https://github.com/Ex3v/MyCLabsEnumParamConverter) +- [PHPStan integration](https://github.com/timeweb/phpstan-enum) diff --git a/vendor/myclabs/php-enum/SECURITY.md b/vendor/myclabs/php-enum/SECURITY.md new file mode 100755 index 0000000..84fd4e3 --- /dev/null +++ b/vendor/myclabs/php-enum/SECURITY.md @@ -0,0 +1,11 @@ +# Security Policy + +## Supported Versions + +Only the latest stable release is supported. + +## Reporting a Vulnerability + +To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). + +Tidelift will coordinate the fix and disclosure. diff --git a/vendor/myclabs/php-enum/composer.json b/vendor/myclabs/php-enum/composer.json new file mode 100755 index 0000000..871156d --- /dev/null +++ b/vendor/myclabs/php-enum/composer.json @@ -0,0 +1,32 @@ +{ + "name": "myclabs/php-enum", + "type": "library", + "description": "PHP Enum implementation", + "keywords": ["enum"], + "homepage": "http://github.com/myclabs/php-enum", + "license": "MIT", + "authors": [ + { + "name": "PHP Enum contributors", + "homepage": "https://github.com/myclabs/php-enum/graphs/contributors" + } + ], + "autoload": { + "psr-4": { + "MyCLabs\\Enum\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "MyCLabs\\Tests\\Enum\\": "tests/" + } + }, + "require": { + "php": ">=7.1", + "ext-json": "*" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35|^5.7|^6.0", + "squizlabs/php_codesniffer": "1.*" + } +} diff --git a/vendor/myclabs/php-enum/src/Enum.php b/vendor/myclabs/php-enum/src/Enum.php new file mode 100755 index 0000000..3bce0dc --- /dev/null +++ b/vendor/myclabs/php-enum/src/Enum.php @@ -0,0 +1,205 @@ + + * @author Daniel Costa + * @author Mirosław Filip + */ +abstract class Enum implements \JsonSerializable +{ + /** + * Enum value + * + * @var mixed + */ + protected $value; + + /** + * Store existing constants in a static cache per object. + * + * @var array + */ + protected static $cache = []; + + /** + * Creates a new value of some type + * + * @param mixed $value + * + * @throws \UnexpectedValueException if incompatible type is given. + */ + public function __construct($value) + { + if ($value instanceof static) { + $value = $value->getValue(); + } + + if (!$this->isValid($value)) { + throw new \UnexpectedValueException("Value '$value' is not part of the enum " . \get_called_class()); + } + + $this->value = $value; + } + + /** + * @return mixed + */ + public function getValue() + { + return $this->value; + } + + /** + * Returns the enum key (i.e. the constant name). + * + * @return mixed + */ + public function getKey() + { + return static::search($this->value); + } + + /** + * @return string + */ + public function __toString() + { + return (string)$this->value; + } + + /** + * Determines if Enum should be considered equal with the variable passed as a parameter. + * Returns false if an argument is an object of different class or not an object. + * + * This method is final, for more information read https://github.com/myclabs/php-enum/issues/4 + * + * @return bool + */ + final public function equals($variable = null): bool + { + return $variable instanceof self + && $this->getValue() === $variable->getValue() + && \get_called_class() === \get_class($variable); + } + + /** + * Returns the names (keys) of all constants in the Enum class + * + * @return array + */ + public static function keys() + { + return \array_keys(static::toArray()); + } + + /** + * Returns instances of the Enum class of all Enum constants + * + * @return static[] Constant name in key, Enum instance in value + */ + public static function values() + { + $values = array(); + + foreach (static::toArray() as $key => $value) { + $values[$key] = new static($value); + } + + return $values; + } + + /** + * Returns all possible values as an array + * + * @return array Constant name in key, constant value in value + */ + public static function toArray() + { + $class = \get_called_class(); + if (!isset(static::$cache[$class])) { + $reflection = new \ReflectionClass($class); + static::$cache[$class] = $reflection->getConstants(); + } + + return static::$cache[$class]; + } + + /** + * Check if is valid enum value + * + * @param $value + * + * @return bool + */ + public static function isValid($value) + { + return \in_array($value, static::toArray(), true); + } + + /** + * Check if is valid enum key + * + * @param $key + * + * @return bool + */ + public static function isValidKey($key) + { + $array = static::toArray(); + + return isset($array[$key]) || \array_key_exists($key, $array); + } + + /** + * Return key for value + * + * @param $value + * + * @return mixed + */ + public static function search($value) + { + return \array_search($value, static::toArray(), true); + } + + /** + * Returns a value when called statically like so: MyEnum::SOME_VALUE() given SOME_VALUE is a class constant + * + * @param string $name + * @param array $arguments + * + * @return static + * @throws \BadMethodCallException + */ + public static function __callStatic($name, $arguments) + { + $array = static::toArray(); + if (isset($array[$name]) || \array_key_exists($name, $array)) { + return new static($array[$name]); + } + + throw new \BadMethodCallException("No static method or enum constant '$name' in class " . \get_called_class()); + } + + /** + * Specify data which should be serialized to JSON. This method returns data that can be serialized by json_encode() + * natively. + * + * @return mixed + * @link http://php.net/manual/en/jsonserializable.jsonserialize.php + */ + public function jsonSerialize() + { + return $this->getValue(); + } +} diff --git a/vendor/myclabs/php-enum/src/PHPUnit/Comparator.php b/vendor/myclabs/php-enum/src/PHPUnit/Comparator.php new file mode 100755 index 0000000..302bf80 --- /dev/null +++ b/vendor/myclabs/php-enum/src/PHPUnit/Comparator.php @@ -0,0 +1,54 @@ +register(new \MyCLabs\Enum\PHPUnit\Comparator()); + */ +final class Comparator extends \SebastianBergmann\Comparator\Comparator +{ + public function accepts($expected, $actual) + { + return $expected instanceof Enum && ( + $actual instanceof Enum || $actual === null + ); + } + + /** + * @param Enum $expected + * @param Enum|null $actual + * + * @return void + */ + public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) + { + if ($expected->equals($actual)) { + return; + } + + throw new ComparisonFailure( + $expected, + $actual, + $this->formatEnum($expected), + $this->formatEnum($actual), + false, + 'Failed asserting that two Enums are equal.' + ); + } + + private function formatEnum(Enum $enum = null) + { + if ($enum === null) { + return "null"; + } + + return get_class($enum)."::{$enum->getKey()}()"; + } +} diff --git a/vendor/overtrue/easy-sms/.editorconfig b/vendor/overtrue/easy-sms/.editorconfig new file mode 100755 index 0000000..df55cd7 --- /dev/null +++ b/vendor/overtrue/easy-sms/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false + +[*.{vue,js,scss}] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/vendor/overtrue/easy-sms/README.md b/vendor/overtrue/easy-sms/README.md new file mode 100755 index 0000000..02e84ba --- /dev/null +++ b/vendor/overtrue/easy-sms/README.md @@ -0,0 +1,605 @@ +

                            Easy SMS

                            + +

                            :calling: 一款满足你的多种发送需求的短信发送组件

                            + +

                            +Build Status +Latest Stable Version +Latest Unstable Version +Scrutinizer Code Quality +Code Coverage +Total Downloads +License +

                            + + +## 特点 + +1. 支持目前市面多家服务商 +1. 一套写法兼容所有平台 +1. 简单配置即可灵活增减服务商 +1. 内置多种服务商轮询策略、支持自定义轮询策略 +1. 统一的返回值格式,便于日志与监控 +1. 自动轮询选择可用的服务商 +1. 更多等你去发现与改进... + +## 平台支持 + +- [阿里云](https://www.aliyun.com/) +- [云片](https://www.yunpian.com) +- [Submail](https://www.mysubmail.com) +- [螺丝帽](https://luosimao.com/) +- [容联云通讯](http://www.yuntongxun.com) +- [互亿无线](http://www.ihuyi.com) +- [聚合数据](https://www.juhe.cn) +- [SendCloud](http://www.sendcloud.net/) +- [百度云](https://cloud.baidu.com/) +- [华信短信平台](http://www.ipyy.com/) +- [253云通讯(创蓝)](https://www.253.com/) +- [融云](http://www.rongcloud.cn) +- [天毅无线](http://www.85hu.com/) +- [腾讯云 SMS](https://cloud.tencent.com/product/sms) +- [阿凡达数据](http://www.avatardata.cn/) +- [华为云](https://www.huaweicloud.com/product/msgsms.html) +- [网易云信](https://yunxin.163.com/sms) + +## 环境需求 + +- PHP >= 5.6 + +## 安装 + +```shell +$ composer require "overtrue/easy-sms" +``` + +**For Laravel notification** + +如果你喜欢使用 [Laravel Notification](https://laravel.com/docs/5.8/notifications), 可以考虑直接使用朋友封装的拓展包: + +https://github.com/yangliulnn/easysms-notification-channel + +## 使用 + +```php +use Overtrue\EasySms\EasySms; + +$config = [ + // HTTP 请求的超时时间(秒) + 'timeout' => 5.0, + + // 默认发送配置 + 'default' => [ + // 网关调用策略,默认:顺序调用 + 'strategy' => \Overtrue\EasySms\Strategies\OrderStrategy::class, + + // 默认可用的发送网关 + 'gateways' => [ + 'yunpian', 'aliyun', + ], + ], + // 可用的网关配置 + 'gateways' => [ + 'errorlog' => [ + 'file' => '/tmp/easy-sms.log', + ], + 'yunpian' => [ + 'api_key' => '824f0ff2f71cab52936axxxxxxxxxx', + ], + 'aliyun' => [ + 'access_key_id' => '', + 'access_key_secret' => '', + 'sign_name' => '', + ], + //... + ], +]; + +$easySms = new EasySms($config); + +$easySms->send(13188888888, [ + 'content' => '您的验证码为: 6379', + 'template' => 'SMS_001', + 'data' => [ + 'code' => 6379 + ], +]); +``` + +## 短信内容 + +由于使用多网关发送,所以一条短信要支持多平台发送,每家的发送方式不一样,但是我们抽象定义了以下公用属性: + +- `content` 文字内容,使用在像云片类似的以文字内容发送的平台 +- `template` 模板 ID,使用在以模板ID来发送短信的平台 +- `data` 模板变量,使用在以模板ID来发送短信的平台 + +所以,在使用过程中你可以根据所要使用的平台定义发送的内容。 + +```php +$easySms->send(13188888888, [ + 'content' => '您的验证码为: 6379', + 'template' => 'SMS_001', + 'data' => [ + 'code' => 6379 + ], +]); +``` + +你也可以使用闭包来返回对应的值: + +```php +$easySms->send(13188888888, [ + 'content' => function($gateway){ + return '您的验证码为: 6379'; + }, + 'template' => function($gateway){ + return 'SMS_001'; + }, + 'data' => function($gateway){ + return [ + 'code' => 6379 + ]; + }, +]); +``` + +你可以根据 `$gateway` 参数类型来判断返回值,例如: + +```php +$easySms->send(13188888888, [ + 'content' => function($gateway){ + if ($gateway->getName() == 'yunpian') { + return '云片专用验证码:1235'; + } + return '您的验证码为: 6379'; + }, + 'template' => function($gateway){ + if ($gateway->getName() == 'aliyun') { + return 'TP2818'; + } + return 'SMS_001'; + }, + 'data' => function($gateway){ + return [ + 'code' => 6379 + ]; + }, +]); +``` + +## 发送网关 + +默认使用 `default` 中的设置来发送,如果某一条短信你想要覆盖默认的设置。在 `send` 方法中使用第三个参数即可: + +```php +$easySms->send(13188888888, [ + 'content' => '您的验证码为: 6379', + 'template' => 'SMS_001', + 'data' => [ + 'code' => 6379 + ], + ], ['yunpian', 'juhe']); // 这里的网关配置将会覆盖全局默认值 +``` + +## 返回值 + +由于使用多网关发送,所以返回值为一个数组,结构如下: +```php +[ + 'yunpian' => [ + 'gateway' => 'yunpian', + 'status' => 'success', + 'result' => [...] // 平台返回值 + ], + 'juhe' => [ + 'gateway' => 'juhe', + 'status' => 'failure', + 'exception' => \Overtrue\EasySms\Exceptions\GatewayErrorException 对象 + ], + //... +] +``` + +如果所选网关列表均发送失败时,将会抛出 `Overtrue\EasySms\Exceptions\NoGatewayAvailableException` 异常,你可以使用 `$e->results` 获取发送结果。 + +你也可以使用 `$e` 提供的更多便捷方法: + +```php +$e->getResults(); // 返回所有 API 的结果,结构同上 +$e->getExceptions(); // 返回所有调用异常列表 +$e->getException($gateway); // 返回指定网关名称的异常对象 +$e->getLastException(); // 获取最后一个失败的异常对象 +``` + +## 自定义网关 + +本拓展已经支持用户自定义网关,你可以很方便的配置即可当成与其它拓展一样的使用: + +```php +$config = [ + ... + 'default' => [ + 'gateways' => [ + 'mygateway', // 配置你的网站到可用的网关列表 + ], + ], + 'gateways' => [ + 'mygateway' => [...], // 你网关所需要的参数,如果没有可以不配置 + ], +]; + +$easySms = new EasySms($config); + +// 注册 +$easySms->extend('mygateway', function($gatewayConfig){ + // $gatewayConfig 来自配置文件里的 `gateways.mygateway` + return new MyGateway($gatewayConfig); +}); + +$easySms->send(13188888888, [ + 'content' => '您的验证码为: 6379', + 'template' => 'SMS_001', + 'data' => [ + 'code' => 6379 + ], +]); +``` + +## 国际短信 + +国际短信与国内短信的区别是号码前面需要加国际码,但是由于各平台对国际号码的写法不一致,所以在发送国际短信的时候有一点区别: + +```php +use Overtrue\EasySms\PhoneNumber; + +// 发送到国际码为 31 的国际号码 +$number = new PhoneNumber(13188888888, 31); + +$easySms->send($number, [ + 'content' => '您的验证码为: 6379', + 'template' => 'SMS_001', + 'data' => [ + 'code' => 6379 + ], +]); +``` + +## 定义短信 + +你可以根据发送场景的不同,定义不同的短信类,从而实现一处定义多处调用,你可以继承 `Overtrue\EasySms\Message` 来定义短信模型: + +```php +order = $order; + } + + // 定义直接使用内容发送平台的内容 + public function getContent(GatewayInterface $gateway = null) + { + return sprintf('您的订单:%s, 已经完成付款', $this->order->no); + } + + // 定义使用模板发送方式平台所需要的模板 ID + public function getTemplate(GatewayInterface $gateway = null) + { + return 'SMS_003'; + } + + // 模板参数 + public function getData(GatewayInterface $gateway = null) + { + return [ + 'order_no' => $this->order->no + ]; + } +} +``` + +> 更多自定义方式请参考:[`Overtrue\EasySms\Message`](Overtrue\EasySms\Message;) + +发送自定义短信: + +```php +$order = ...; +$message = new OrderPaidMessage($order); + +$easySms->send(13188888888, $message); +``` + +## 各平台配置说明 + +### [阿里云](https://www.aliyun.com/) + +短信内容使用 `template` + `data` + +```php + 'aliyun' => [ + 'access_key_id' => '', + 'access_key_secret' => '', + 'sign_name' => '', + ], +``` + +### [阿里云Rest](https://www.aliyun.com/) + +短信内容使用 `template` + `data` + +```php + 'aliyunrest' => [ + 'app_key' => '', + 'app_secret_key' => '', + 'sign_name' => '', + ], +``` + +### [云片](https://www.yunpian.com) + +短信内容使用 `content` + +```php + 'yunpian' => [ + 'api_key' => '', + 'signature' => '【默认签名】', // 内容中无签名时使用 + ], +``` + +### [Submail](https://www.mysubmail.com) + +短信内容使用 `data` + +```php + 'submail' => [ + 'app_id' => '', + 'app_key' => '', + 'project' => '', // 默认 project,可在发送时 data 中指定 + ], +``` + +### [螺丝帽](https://luosimao.com/) + +短信内容使用 `content` + +```php + 'luosimao' => [ + 'api_key' => '', + ], +``` + +### [容联云通讯](http://www.yuntongxun.com) + +短信内容使用 `template` + `data` + +```php + 'yuntongxun' => [ + 'app_id' => '', + 'account_sid' => '', + 'account_token' => '', + 'is_sub_account' => false, + ], +``` + +### [互亿无线](http://www.ihuyi.com) + +短信内容使用 `content` + +```php + 'huyi' => [ + 'api_id' => '', + 'api_key' => '', + 'signature' => '', + ], +``` + +### [聚合数据](https://www.juhe.cn) + +短信内容使用 `template` + `data` + +```php + 'juhe' => [ + 'app_key' => '', + ], +``` + +### [SendCloud](http://www.sendcloud.net/) + +短信内容使用 `template` + `data` + +```php + 'sendcloud' => [ + 'sms_user' => '', + 'sms_key' => '', + 'timestamp' => false, // 是否启用时间戳 + ], +``` +### [百度云](https://cloud.baidu.com/) + +短信内容使用 `template` + `data` + +```php + 'baidu' => [ + 'ak' => '', + 'sk' => '', + 'invoke_id' => '', + 'domain' => '', + ], +``` + +### [华信短信平台](http://www.ipyy.com/) + +短信内容使用 `content` + +```php + 'huaxin' => [ + 'user_id' => '', + 'password' => '', + 'account' => '', + 'ip' => '', + 'ext_no' => '', + ], +``` + +### [253云通讯(创蓝)](https://www.253.com/) + +短信内容使用 `content` + +```php + 'chuanglan' => [ + 'account' => '', + 'password' => '', + + // \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_VALIDATE_CODE => 验证码通道(默认) + // \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_PROMOTION_CODE => 会员营销通道 + 'channel' => \Overtrue\EasySms\Gateways\ChuanglanGateway::CHANNEL_VALIDATE_CODE, + + // 会员营销通道 特定参数。创蓝规定:api提交营销短信的时候,需要自己加短信的签名及退订信息 + 'sign' => '【通讯云】', + 'unsubscribe' => '回TD退订', + ], +``` + +### [融云](http://www.rongcloud.cn) + +短信分为两大类,验证类和通知类短信。 发送验证类短信使用 `template` + `data` + +```php + 'rongcloud' => [ + 'app_key' => '', + 'app_secret' => '', + ] +``` + +### [天毅无线](http://www.85hu.com/) + +短信内容使用 `content` + +```php + 'tianyiwuxian' => [ + 'username' => '', //用户名 + 'password' => '', //密码 + 'gwid' => '', //网关ID + ] +``` + +### [twilio](https://www.twilio.com) + +短信使用 `content` +发送对象需要 使用`+`添加区号 + +```php + 'twilio' => [ + 'account_sid' => '', // sid + 'from' => '', // 发送的号码 可以在控制台购买 + 'token' => '', // apitoken + ], +``` + +### [腾讯云 SMS](https://cloud.tencent.com/product/sms) + +短信内容使用 `content`。 + +```php + 'qcloud' => [ + 'sdk_app_id' => '', // SDK APP ID + 'app_key' => '', // APP KEY + 'sign_name' => '', // 短信签名,如果使用默认签名,该字段可缺省(对应官方文档中的sign) + ], +``` + +### [阿凡达数据](http://www.avatardata.cn/) + +短信内容使用 `template` + `data` + +```php + 'avatardata' => [ + 'app_key' => '', // APP KEY + ], +``` + +### [华为云 SMS](https://www.huaweicloud.com/product/msgsms.html) + +短信内容使用 `template` + `data` + +```php + 'huawei' => [ + 'endpoint' => '', // APP接入地址 + 'app_key' => '', // APP KEY + 'app_secret' => '', // APP SECRET + 'from' => [ + 'default' => '1069012345', // 默认使用签名通道号 + 'custom' => 'csms12345', // 其他签名通道号 可以在 data 中定义 from 来指定 + 'abc' => 'csms67890', // 其他签名通道号 + ... + ], + 'callback' => '' // 短信状态回调地址 + ], +``` + +使用默认签名通道 `default` + +```php +$easySms->send(13188888888, [ + 'template' => 'SMS_001', + 'data' => [ + 6379 + ], +]); +``` + +使用指定签名通道 + +```php +$easySms->send(13188888888, [ + 'template' => 'SMS_001', + 'data' => [ + 6379, + 'from' => 'custom' // 对应 config 中的 from 数组中 custom + ], +]); +``` + +### [网易云信](https://yunxin.163.com/sms) + +短信内容使用 `template` + `data` + +```php + 'yunxin' => [ + 'app_key' => '', + 'app_secret' => '', + 'code_length' => 4, // 随机验证码长度,范围 4~10,默认为 4 + 'need_up' => false, // 是否需要支持短信上行 + ], +``` + +```php +$easySms->send(18598270525, [ + 'template' => 'SMS_001', // 不填则使用默认模板 + 'data' => [ + 'code' => 8946, // 如果设置了该参数,则 code_length 参数无效 + 'action' => 'sendCode', // 默认为 `sendCode`,校验短信验证码使用 `verifyCode` + ], +]); +``` + +## PHP 扩展包开发 + +> 想知道如何从零开始构建 PHP 扩展包? +> +> 请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package) + +## License + +MIT diff --git a/vendor/overtrue/easy-sms/composer.json b/vendor/overtrue/easy-sms/composer.json new file mode 100755 index 0000000..eb6be99 --- /dev/null +++ b/vendor/overtrue/easy-sms/composer.json @@ -0,0 +1,28 @@ +{ + "name": "overtrue/easy-sms", + "description": "The easiest way to send short message.", + "type": "library", + "require": { + "guzzlehttp/guzzle": "^6.2", + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^7.5", + "mockery/mockery": "1.2.2" + }, + "autoload": { + "psr-4": { + "Overtrue\\EasySms\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "Overtrue\\EasySms\\Tests\\": "tests" + } + }, + "license": "MIT", + "authors": [{ + "name": "overtrue", + "email": "i@overtrue.me" + }] +} \ No newline at end of file diff --git a/vendor/overtrue/easy-sms/src/Contracts/GatewayInterface.php b/vendor/overtrue/easy-sms/src/Contracts/GatewayInterface.php new file mode 100755 index 0000000..3424677 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Contracts/GatewayInterface.php @@ -0,0 +1,38 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Contracts; + +use Overtrue\EasySms\Support\Config; + +/** + * Class GatewayInterface. + */ +interface GatewayInterface +{ + /** + * Get gateway name. + * + * @return string + */ + public function getName(); + + /** + * Send a short message. + * + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config); +} diff --git a/vendor/overtrue/easy-sms/src/Contracts/MessageInterface.php b/vendor/overtrue/easy-sms/src/Contracts/MessageInterface.php new file mode 100755 index 0000000..7c17f10 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Contracts/MessageInterface.php @@ -0,0 +1,63 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Contracts; + +/** + * Interface MessageInterface. + */ +interface MessageInterface +{ + const TEXT_MESSAGE = 'text'; + + const VOICE_MESSAGE = 'voice'; + + /** + * Return the message type. + * + * @return string + */ + public function getMessageType(); + + /** + * Return message content. + * + * @param \Overtrue\EasySms\Contracts\GatewayInterface|null $gateway + * + * @return string + */ + public function getContent(GatewayInterface $gateway = null); + + /** + * Return the template id of message. + * + * @param \Overtrue\EasySms\Contracts\GatewayInterface|null $gateway + * + * @return string + */ + public function getTemplate(GatewayInterface $gateway = null); + + /** + * Return the template data of message. + * + * @param \Overtrue\EasySms\Contracts\GatewayInterface|null $gateway + * + * @return array + */ + public function getData(GatewayInterface $gateway = null); + + /** + * Return message supported gateways. + * + * @return array + */ + public function getGateways(); +} diff --git a/vendor/overtrue/easy-sms/src/Contracts/PhoneNumberInterface.php b/vendor/overtrue/easy-sms/src/Contracts/PhoneNumberInterface.php new file mode 100755 index 0000000..7d64648 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Contracts/PhoneNumberInterface.php @@ -0,0 +1,53 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Contracts; + +/** + * Interface PhoneNumberInterface. + * + * @author overtrue + */ +interface PhoneNumberInterface extends \JsonSerializable +{ + /** + * 86. + * + * @return int + */ + public function getIDDCode(); + + /** + * 18888888888. + * + * @return int + */ + public function getNumber(); + + /** + * +8618888888888. + * + * @return string + */ + public function getUniversalNumber(); + + /** + * 008618888888888. + * + * @return string + */ + public function getZeroPrefixedNumber(); + + /** + * @return string + */ + public function __toString(); +} diff --git a/vendor/overtrue/easy-sms/src/Contracts/StrategyInterface.php b/vendor/overtrue/easy-sms/src/Contracts/StrategyInterface.php new file mode 100755 index 0000000..1cda2c7 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Contracts/StrategyInterface.php @@ -0,0 +1,27 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Contracts; + +/** + * Interface StrategyInterface. + */ +interface StrategyInterface +{ + /** + * Apply the strategy and return result. + * + * @param array $gateways + * + * @return array + */ + public function apply(array $gateways); +} diff --git a/vendor/overtrue/easy-sms/src/EasySms.php b/vendor/overtrue/easy-sms/src/EasySms.php new file mode 100755 index 0000000..4d2382a --- /dev/null +++ b/vendor/overtrue/easy-sms/src/EasySms.php @@ -0,0 +1,360 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms; + +use Closure; +use Overtrue\EasySms\Contracts\GatewayInterface; +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Contracts\StrategyInterface; +use Overtrue\EasySms\Exceptions\InvalidArgumentException; +use Overtrue\EasySms\Gateways\Gateway; +use Overtrue\EasySms\Strategies\OrderStrategy; +use Overtrue\EasySms\Support\Config; +use RuntimeException; + +/** + * Class EasySms. + */ +class EasySms +{ + /** + * @var \Overtrue\EasySms\Support\Config + */ + protected $config; + + /** + * @var string + */ + protected $defaultGateway; + + /** + * @var array + */ + protected $customCreators = []; + + /** + * @var array + */ + protected $gateways = []; + + /** + * @var \Overtrue\EasySms\Messenger + */ + protected $messenger; + + /** + * @var array + */ + protected $strategies = []; + + /** + * Constructor. + * + * @param array $config + */ + public function __construct(array $config) + { + $this->config = new Config($config); + + if (!empty($config['default'])) { + $this->setDefaultGateway($config['default']); + } + } + + /** + * Send a message. + * + * @param string|array $to + * @param \Overtrue\EasySms\Contracts\MessageInterface|array $message + * @param array $gateways + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\InvalidArgumentException + * @throws \Overtrue\EasySms\Exceptions\NoGatewayAvailableException + */ + public function send($to, $message, array $gateways = []) + { + $to = $this->formatPhoneNumber($to); + $message = $this->formatMessage($message); + $gateways = empty($gateways) ? $message->getGateways() : $gateways; + + if (empty($gateways)) { + $gateways = $this->config->get('default.gateways', []); + } + + return $this->getMessenger()->send($to, $message, $this->formatGateways($gateways)); + } + + /** + * Create a gateway. + * + * @param string|null $name + * + * @return \Overtrue\EasySms\Contracts\GatewayInterface + * + * @throws \Overtrue\EasySms\Exceptions\InvalidArgumentException + */ + public function gateway($name = null) + { + $name = $name ?: $this->getDefaultGateway(); + + if (!isset($this->gateways[$name])) { + $this->gateways[$name] = $this->createGateway($name); + } + + return $this->gateways[$name]; + } + + /** + * Get a strategy instance. + * + * @param string|null $strategy + * + * @return \Overtrue\EasySms\Contracts\StrategyInterface + * + * @throws \Overtrue\EasySms\Exceptions\InvalidArgumentException + */ + public function strategy($strategy = null) + { + if (\is_null($strategy)) { + $strategy = $this->config->get('default.strategy', OrderStrategy::class); + } + + if (!\class_exists($strategy)) { + $strategy = __NAMESPACE__.'\Strategies\\'.\ucfirst($strategy); + } + + if (!\class_exists($strategy)) { + throw new InvalidArgumentException("Unsupported strategy \"{$strategy}\""); + } + + if (empty($this->strategies[$strategy]) || !($this->strategies[$strategy] instanceof StrategyInterface)) { + $this->strategies[$strategy] = new $strategy($this); + } + + return $this->strategies[$strategy]; + } + + /** + * Register a custom driver creator Closure. + * + * @param string $name + * @param \Closure $callback + * + * @return $this + */ + public function extend($name, Closure $callback) + { + $this->customCreators[$name] = $callback; + + return $this; + } + + /** + * @return \Overtrue\EasySms\Support\Config + */ + public function getConfig() + { + return $this->config; + } + + /** + * Get default gateway name. + * + * @return string + * + * @throws \RuntimeException if no default gateway configured + */ + public function getDefaultGateway() + { + if (empty($this->defaultGateway)) { + throw new RuntimeException('No default gateway configured.'); + } + + return $this->defaultGateway; + } + + /** + * Set default gateway name. + * + * @param string $name + * + * @return $this + */ + public function setDefaultGateway($name) + { + $this->defaultGateway = $name; + + return $this; + } + + /** + * @return \Overtrue\EasySms\Messenger + */ + public function getMessenger() + { + return $this->messenger ?: $this->messenger = new Messenger($this); + } + + /** + * Create a new driver instance. + * + * @param string $name + * + * @throws \InvalidArgumentException + * + * @return GatewayInterface + * + * @throws \Overtrue\EasySms\Exceptions\InvalidArgumentException + */ + protected function createGateway($name) + { + if (isset($this->customCreators[$name])) { + $gateway = $this->callCustomCreator($name); + } else { + $className = $this->formatGatewayClassName($name); + $config = $this->config->get("gateways.{$name}", []); + + if (!isset($config['timeout'])) { + $config['timeout'] = $this->config->get('timeout', Gateway::DEFAULT_TIMEOUT); + } + + $gateway = $this->makeGateway($className, $config); + } + + if (!($gateway instanceof GatewayInterface)) { + throw new InvalidArgumentException(\sprintf('Gateway "%s" must implement interface %s.', $name, GatewayInterface::class)); + } + + return $gateway; + } + + /** + * Make gateway instance. + * + * @param string $gateway + * @param array $config + * + * @return \Overtrue\EasySms\Contracts\GatewayInterface + * + * @throws \Overtrue\EasySms\Exceptions\InvalidArgumentException + */ + protected function makeGateway($gateway, $config) + { + if (!\class_exists($gateway) || !\in_array(GatewayInterface::class, \class_implements($gateway))) { + throw new InvalidArgumentException(\sprintf('Class "%s" is a invalid easy-sms gateway.', $gateway)); + } + + return new $gateway($config); + } + + /** + * Format gateway name. + * + * @param string $name + * + * @return string + */ + protected function formatGatewayClassName($name) + { + if (\class_exists($name) && \in_array(GatewayInterface::class, \class_implements($name))) { + return $name; + } + + $name = \ucfirst(\str_replace(['-', '_', ''], '', $name)); + + return __NAMESPACE__."\\Gateways\\{$name}Gateway"; + } + + /** + * Call a custom gateway creator. + * + * @param string $gateway + * + * @return mixed + */ + protected function callCustomCreator($gateway) + { + return \call_user_func($this->customCreators[$gateway], $this->config->get("gateways.{$gateway}", [])); + } + + /** + * @param string|\Overtrue\EasySms\Contracts\PhoneNumberInterface $number + * + * @return \Overtrue\EasySms\PhoneNumber + */ + protected function formatPhoneNumber($number) + { + if ($number instanceof PhoneNumberInterface) { + return $number; + } + + return new PhoneNumber(\trim($number)); + } + + /** + * @param array|string|\Overtrue\EasySms\Contracts\MessageInterface $message + * + * @return \Overtrue\EasySms\Contracts\MessageInterface + */ + protected function formatMessage($message) + { + if (!($message instanceof MessageInterface)) { + if (!\is_array($message)) { + $message = [ + 'content' => $message, + 'template' => $message, + ]; + } + + $message = new Message($message); + } + + return $message; + } + + /** + * @param array $gateways + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\InvalidArgumentException + */ + protected function formatGateways(array $gateways) + { + $formatted = []; + + foreach ($gateways as $gateway => $setting) { + if (\is_int($gateway) && \is_string($setting)) { + $gateway = $setting; + $setting = []; + } + + $formatted[$gateway] = $setting; + $globalSettings = $this->config->get("gateways.{$gateway}", []); + + if (\is_string($gateway) && !empty($globalSettings) && \is_array($setting)) { + $formatted[$gateway] = new Config(\array_merge($globalSettings, $setting)); + } + } + + $result = []; + + foreach ($this->strategy()->apply($formatted) as $name) { + $result[$name] = $formatted[$name]; + } + + return $result; + } +} diff --git a/vendor/overtrue/easy-sms/src/Exceptions/Exception.php b/vendor/overtrue/easy-sms/src/Exceptions/Exception.php new file mode 100755 index 0000000..079d415 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Exceptions/Exception.php @@ -0,0 +1,21 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Exceptions; + +/** + * Class Exception. + * + * @author overtrue + */ +class Exception extends \Exception +{ +} diff --git a/vendor/overtrue/easy-sms/src/Exceptions/GatewayErrorException.php b/vendor/overtrue/easy-sms/src/Exceptions/GatewayErrorException.php new file mode 100755 index 0000000..e183def --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Exceptions/GatewayErrorException.php @@ -0,0 +1,37 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Exceptions; + +/** + * Class GatewayErrorException. + */ +class GatewayErrorException extends Exception +{ + /** + * @var array + */ + public $raw = []; + + /** + * GatewayErrorException constructor. + * + * @param string $message + * @param int $code + * @param array $raw + */ + public function __construct($message, $code, array $raw = []) + { + parent::__construct($message, intval($code)); + + $this->raw = $raw; + } +} diff --git a/vendor/overtrue/easy-sms/src/Exceptions/InvalidArgumentException.php b/vendor/overtrue/easy-sms/src/Exceptions/InvalidArgumentException.php new file mode 100755 index 0000000..c2be998 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Exceptions/InvalidArgumentException.php @@ -0,0 +1,19 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Exceptions; + +/** + * Class InvalidArgumentException. + */ +class InvalidArgumentException extends Exception +{ +} diff --git a/vendor/overtrue/easy-sms/src/Exceptions/NoGatewayAvailableException.php b/vendor/overtrue/easy-sms/src/Exceptions/NoGatewayAvailableException.php new file mode 100755 index 0000000..7c804d9 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Exceptions/NoGatewayAvailableException.php @@ -0,0 +1,81 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Exceptions; + +use Throwable; + +/** + * Class NoGatewayAvailableException. + * + * @author overtrue + */ +class NoGatewayAvailableException extends Exception +{ + /** + * @var array + */ + public $results = []; + + /** + * @var array + */ + public $exceptions = []; + + /** + * NoGatewayAvailableException constructor. + * + * @param array $results + * @param int $code + * @param \Throwable|null $previous + */ + public function __construct(array $results = [], $code = 0, Throwable $previous = null) + { + $this->results = $results; + $this->exceptions = \array_column($results, 'exception', 'gateway'); + + parent::__construct('All the gateways have failed. You can get error details by `$exception->getExceptions()`', $code, $previous); + } + + /** + * @return array + */ + public function getResults() + { + return $this->results; + } + + /** + * @param string $gateway + * + * @return mixed|null + */ + public function getException($gateway) + { + return isset($this->exceptions[$gateway]) ? $this->exceptions[$gateway] : null; + } + + /** + * @return array + */ + public function getExceptions() + { + return $this->exceptions; + } + + /** + * @return mixed + */ + public function getLastException() + { + return end($this->exceptions); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/AliyunGateway.php b/vendor/overtrue/easy-sms/src/Gateways/AliyunGateway.php new file mode 100755 index 0000000..178dfe8 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/AliyunGateway.php @@ -0,0 +1,104 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class AliyunGateway. + * + * @author carson + * + * @see https://help.aliyun.com/document_detail/55451.html + */ +class AliyunGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_URL = 'http://dysmsapi.aliyuncs.com'; + + const ENDPOINT_METHOD = 'SendSms'; + + const ENDPOINT_VERSION = '2017-05-25'; + + const ENDPOINT_FORMAT = 'JSON'; + + const ENDPOINT_REGION_ID = 'cn-hangzhou'; + + const ENDPOINT_SIGNATURE_METHOD = 'HMAC-SHA1'; + + const ENDPOINT_SIGNATURE_VERSION = '1.0'; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $data = $message->getData($this); + + $signName = !empty($data['sign_name']) ? $data['sign_name'] : $config->get('sign_name'); + + unset($data['sign_name']); + + $params = [ + 'RegionId' => self::ENDPOINT_REGION_ID, + 'AccessKeyId' => $config->get('access_key_id'), + 'Format' => self::ENDPOINT_FORMAT, + 'SignatureMethod' => self::ENDPOINT_SIGNATURE_METHOD, + 'SignatureVersion' => self::ENDPOINT_SIGNATURE_VERSION, + 'SignatureNonce' => uniqid(), + 'Timestamp' => gmdate('Y-m-d\TH:i:s\Z'), + 'Action' => self::ENDPOINT_METHOD, + 'Version' => self::ENDPOINT_VERSION, + 'PhoneNumbers' => !\is_null($to->getIDDCode()) ? strval($to->getZeroPrefixedNumber()) : $to->getNumber(), + 'SignName' => $signName, + 'TemplateCode' => $message->getTemplate($this), + 'TemplateParam' => json_encode($data, JSON_FORCE_OBJECT), + ]; + + $params['Signature'] = $this->generateSign($params); + + $result = $this->get(self::ENDPOINT_URL, $params); + + if ('OK' != $result['Code']) { + throw new GatewayErrorException($result['Message'], $result['Code'], $result); + } + + return $result; + } + + /** + * Generate Sign. + * + * @param array $params + * + * @return string + */ + protected function generateSign($params) + { + ksort($params); + $accessKeySecret = $this->config->get('access_key_secret'); + $stringToSign = 'GET&%2F&'.urlencode(http_build_query($params, null, '&', PHP_QUERY_RFC3986)); + + return base64_encode(hash_hmac('sha1', $stringToSign, $accessKeySecret.'&', true)); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/AliyunrestGateway.php b/vendor/overtrue/easy-sms/src/Gateways/AliyunrestGateway.php new file mode 100755 index 0000000..d4359d2 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/AliyunrestGateway.php @@ -0,0 +1,107 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class AliyunrestGateway. + */ +class AliyunrestGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_URL = 'http://gw.api.taobao.com/router/rest'; + + const ENDPOINT_VERSION = '2.0'; + + const ENDPOINT_FORMAT = 'json'; + + const ENDPOINT_METHOD = 'alibaba.aliqin.fc.sms.num.send'; + + const ENDPOINT_SIGNATURE_METHOD = 'md5'; + + const ENDPOINT_PARTNER_ID = 'EasySms'; + + /** + * @param PhoneNumberInterface $to + * @param MessageInterface $message + * @param Config $config + * + * @return array|void + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $urlParams = [ + 'app_key' => $config->get('app_key'), + 'v' => self::ENDPOINT_VERSION, + 'format' => self::ENDPOINT_FORMAT, + 'sign_method' => self::ENDPOINT_SIGNATURE_METHOD, + 'method' => self::ENDPOINT_METHOD, + 'timestamp' => date('Y-m-d H:i:s'), + 'partner_id' => self::ENDPOINT_PARTNER_ID, + ]; + + $params = [ + 'extend' => '', + 'sms_type' => 'normal', + 'sms_free_sign_name' => $config->get('sign_name'), + 'sms_param' => json_encode($message->getData($this)), + 'rec_num' => !\is_null($to->getIDDCode()) ? strval($to->getZeroPrefixedNumber()) : $to->getNumber(), + 'sms_template_code' => $message->getTemplate($this), + ]; + $urlParams['sign'] = $this->generateSign(array_merge($params, $urlParams)); + + $result = $this->post($this->getEndpointUrl($urlParams), $params); + + if (isset($result['error_response']) && 0 != $result['error_response']['code']) { + throw new GatewayErrorException($result['error_response']['msg'], $result['error_response']['code'], $result); + } + + return $result; + } + + /** + * @param array $params + * + * @return string + */ + protected function getEndpointUrl($params) + { + return self::ENDPOINT_URL.'?'.http_build_query($params); + } + + /** + * @param array $params + * + * @return string + */ + protected function generateSign($params) + { + ksort($params); + + $stringToBeSigned = $this->config->get('app_secret_key'); + foreach ($params as $k => $v) { + if (!is_array($v) && '@' != substr($v, 0, 1)) { + $stringToBeSigned .= "$k$v"; + } + } + unset($k, $v); + $stringToBeSigned .= $this->config->get('app_secret_key'); + + return strtoupper(md5($stringToBeSigned)); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/AvatardataGateway.php b/vendor/overtrue/easy-sms/src/Gateways/AvatardataGateway.php new file mode 100755 index 0000000..1958cd4 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/AvatardataGateway.php @@ -0,0 +1,60 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class AvatardataGateway. + * + * @see http://www.avatardata.cn/Docs/Api/fd475e40-7809-4be7-936c-5926dd41b0fe + */ +class AvatardataGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_URL = 'http://v1.avatardata.cn/Sms/Send'; + + const ENDPOINT_FORMAT = 'json'; + + /** + * @param PhoneNumberInterface $to + * @param MessageInterface $message + * @param Config $config + * + * @return array + * + * @throws GatewayErrorException; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $params = [ + 'mobile' => $to->getNumber(), + 'templateId' => $message->getTemplate($this), + 'param' => implode(',', $message->getData($this)), + 'dtype' => self::ENDPOINT_FORMAT, + 'key' => $config->get('app_key'), + ]; + + $result = $this->get(self::ENDPOINT_URL, $params); + + if ($result['error_code']) { + throw new GatewayErrorException($result['reason'], $result['error_code'], $result); + } + + return $result; + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/BaiduGateway.php b/vendor/overtrue/easy-sms/src/Gateways/BaiduGateway.php new file mode 100755 index 0000000..cc23c41 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/BaiduGateway.php @@ -0,0 +1,165 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class BaiduGateway. + * + * @see https://cloud.baidu.com/doc/SMS/API.html + */ +class BaiduGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_HOST = 'sms.bj.baidubce.com'; + + const ENDPOINT_URI = '/bce/v2/message'; + + const BCE_AUTH_VERSION = 'bce-auth-v1'; + + const DEFAULT_EXPIRATION_IN_SECONDS = 1800; //签名有效期默认1800秒 + + const SUCCESS_CODE = 1000; + + /** + * Send message. + * + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $params = [ + 'invokeId' => $config->get('invoke_id'), + 'phoneNumber' => $to->getNumber(), + 'templateCode' => $message->getTemplate($this), + 'contentVar' => $message->getData($this), + ]; + + $datetime = gmdate('Y-m-d\TH:i:s\Z'); + + $headers = [ + 'host' => self::ENDPOINT_HOST, + 'content-type' => 'application/json', + 'x-bce-date' => $datetime, + 'x-bce-content-sha256' => hash('sha256', json_encode($params)), + ]; + //获得需要签名的数据 + $signHeaders = $this->getHeadersToSign($headers, ['host', 'x-bce-content-sha256']); + + $headers['Authorization'] = $this->generateSign($signHeaders, $datetime, $config); + + $result = $this->request('post', self::buildEndpoint($config), ['headers' => $headers, 'json' => $params]); + + if (self::SUCCESS_CODE != $result['code']) { + throw new GatewayErrorException($result['message'], $result['code'], $result); + } + + return $result; + } + + /** + * Build endpoint url. + * + * @param \Overtrue\EasySms\Support\Config $config + * + * @return string + */ + protected function buildEndpoint(Config $config) + { + return 'http://'.$config->get('domain', self::ENDPOINT_HOST).self::ENDPOINT_URI; + } + + /** + * Generate Authorization header. + * + * @param array $signHeaders + * @param int $datetime + * @param \Overtrue\EasySms\Support\Config $config + * + * @return string + */ + protected function generateSign(array $signHeaders, $datetime, Config $config) + { + // 生成 authString + $authString = self::BCE_AUTH_VERSION.'/'.$config->get('ak').'/' + .$datetime.'/'.self::DEFAULT_EXPIRATION_IN_SECONDS; + + // 使用 sk 和 authString 生成 signKey + $signingKey = hash_hmac('sha256', $authString, $config->get('sk')); + // 生成标准化 URI + // 根据 RFC 3986,除了:1.大小写英文字符 2.阿拉伯数字 3.点'.'、波浪线'~'、减号'-'以及下划线'_' 以外都要编码 + $canonicalURI = str_replace('%2F', '/', rawurlencode(self::ENDPOINT_URI)); + + // 生成标准化 QueryString + $canonicalQueryString = ''; // 此 api 不需要此项。返回空字符串 + + // 整理 headersToSign,以 ';' 号连接 + $signedHeaders = empty($signHeaders) ? '' : strtolower(trim(implode(';', array_keys($signHeaders)))); + + // 生成标准化 header + $canonicalHeader = $this->getCanonicalHeaders($signHeaders); + + // 组成标准请求串 + $canonicalRequest = "POST\n{$canonicalURI}\n{$canonicalQueryString}\n{$canonicalHeader}"; + + // 使用 signKey 和标准请求串完成签名 + $signature = hash_hmac('sha256', $canonicalRequest, $signingKey); + + // 组成最终签名串 + return "{$authString}/{$signedHeaders}/{$signature}"; + } + + /** + * 生成标准化 http 请求头串. + * + * @param array $headers + * + * @return string + */ + protected function getCanonicalHeaders(array $headers) + { + $headerStrings = []; + foreach ($headers as $name => $value) { + //trim后再encode,之后使用':'号连接起来 + $headerStrings[] = rawurlencode(strtolower(trim($name))).':'.rawurlencode(trim($value)); + } + + sort($headerStrings); + + return implode("\n", $headerStrings); + } + + /** + * 根据 指定的 keys 过滤应该参与签名的 header. + * + * @param array $headers + * @param array $keys + * + * @return array + */ + protected function getHeadersToSign(array $headers, array $keys) + { + return array_intersect_key($headers, array_flip($keys)); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/ChuanglanGateway.php b/vendor/overtrue/easy-sms/src/Gateways/ChuanglanGateway.php new file mode 100755 index 0000000..5e845da --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/ChuanglanGateway.php @@ -0,0 +1,150 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Exceptions\InvalidArgumentException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class ChuanglanGateway. + * + * @see https://zz.253.com/v5.html#/api_doc + */ +class ChuanglanGateway extends Gateway +{ + use HasHttpRequest; + + /** + * URL模板 + */ + const ENDPOINT_URL_TEMPLATE = 'https://%s.253.com/msg/send/json'; + + /** + * 国际短信 + */ + const INT_URL = 'http://intapi.253.com/send/json'; + + /** + * 验证码渠道code. + */ + const CHANNEL_VALIDATE_CODE = 'smsbj1'; + + /** + * 会员营销渠道code. + */ + const CHANNEL_PROMOTION_CODE = 'smssh1'; + + /** + * @param PhoneNumberInterface $to + * @param MessageInterface $message + * @param Config $config + * + * @return array + * + * @throws GatewayErrorException + * @throws InvalidArgumentException + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $IDDCode = !empty($to->getIDDCode()) ? $to->getIDDCode() : 86; + + $params = [ + 'account' => $config->get('account'), + 'password' => $config->get('password'), + 'phone' => $to->getNumber(), + 'msg' => $this->wrapChannelContent($message->getContent($this), $config, $IDDCode), + ]; + + if (86 != $IDDCode) { + $params['mobile'] = $to->getIDDCode().$to->getNumber(); + } + + $result = $this->postJson($this->buildEndpoint($config, $IDDCode), $params); + + if (!isset($result['code']) || '0' != $result['code']) { + throw new GatewayErrorException(json_encode($result, JSON_UNESCAPED_UNICODE), isset($result['code']) ? $result['code'] : 0, $result); + } + + return $result; + } + + /** + * @param Config $config + * @param int $IDDCode + * + * @return string + * + * @throws InvalidArgumentException + */ + protected function buildEndpoint(Config $config, $IDDCode = 86) + { + $channel = $this->getChannel($config, $IDDCode); + + return sprintf(self::ENDPOINT_URL_TEMPLATE, $channel); + } + + /** + * @param Config $config + * @param int $IDDCode + * + * @return mixed + * + * @throws InvalidArgumentException + */ + protected function getChannel(Config $config, $IDDCode) + { + if (86 != $IDDCode) { + return self::INT_URL; + } + $channel = $config->get('channel', self::CHANNEL_VALIDATE_CODE); + + if (!in_array($channel, [self::CHANNEL_VALIDATE_CODE, self::CHANNEL_PROMOTION_CODE])) { + throw new InvalidArgumentException('Invalid channel for ChuanglanGateway.'); + } + + return $channel; + } + + /** + * @param string $content + * @param Config $config + * @param int $IDDCode + * + * @return string|string + * + * @throws InvalidArgumentException + */ + protected function wrapChannelContent($content, Config $config, $IDDCode) + { + $channel = $this->getChannel($config, $IDDCode); + + if (self::CHANNEL_PROMOTION_CODE == $channel) { + $sign = (string) $config->get('sign', ''); + if (empty($sign)) { + throw new InvalidArgumentException('Invalid sign for ChuanglanGateway when using promotion channel'); + } + + $unsubscribe = (string) $config->get('unsubscribe', ''); + if (empty($unsubscribe)) { + throw new InvalidArgumentException('Invalid unsubscribe for ChuanglanGateway when using promotion channel'); + } + + $content = $sign.$content.$unsubscribe; + } + + return $content; + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/ErrorlogGateway.php b/vendor/overtrue/easy-sms/src/Gateways/ErrorlogGateway.php new file mode 100755 index 0000000..d27b40d --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/ErrorlogGateway.php @@ -0,0 +1,50 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Support\Config; + +/** + * Class ErrorlogGateway. + */ +class ErrorlogGateway extends Gateway +{ + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + if (is_array($to)) { + $to = implode(',', $to); + } + + $message = sprintf( + "[%s] to: %s | message: \"%s\" | template: \"%s\" | data: %s\n", + date('Y-m-d H:i:s'), + $to, + $message->getContent($this), + $message->getTemplate($this), + json_encode($message->getData($this)) + ); + + $file = $this->config->get('file', ini_get('error_log')); + $status = error_log($message, 3, $file); + + return compact('status', 'file'); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/Gateway.php b/vendor/overtrue/easy-sms/src/Gateways/Gateway.php new file mode 100755 index 0000000..a4b1310 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/Gateway.php @@ -0,0 +1,95 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\GatewayInterface; +use Overtrue\EasySms\Support\Config; + +/** + * Class Gateway. + */ +abstract class Gateway implements GatewayInterface +{ + const DEFAULT_TIMEOUT = 5.0; + + /** + * @var \Overtrue\EasySms\Support\Config + */ + protected $config; + + /** + * @var float + */ + protected $timeout; + + /** + * Gateway constructor. + * + * @param array $config + */ + public function __construct(array $config) + { + $this->config = new Config($config); + } + + /** + * Return timeout. + * + * @return int|mixed + */ + public function getTimeout() + { + return $this->timeout ?: $this->config->get('timeout', self::DEFAULT_TIMEOUT); + } + + /** + * Set timeout. + * + * @param int $timeout + * + * @return $this + */ + public function setTimeout($timeout) + { + $this->timeout = floatval($timeout); + + return $this; + } + + /** + * @return \Overtrue\EasySms\Support\Config + */ + public function getConfig() + { + return $this->config; + } + + /** + * @param \Overtrue\EasySms\Support\Config $config + * + * @return $this + */ + public function setConfig(Config $config) + { + $this->config = $config; + + return $this; + } + + /** + * {@inheritdoc} + */ + public function getName() + { + return \strtolower(str_replace([__NAMESPACE__.'\\', 'Gateway'], '', \get_class($this))); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/HuaweiGateway.php b/vendor/overtrue/easy-sms/src/Gateways/HuaweiGateway.php new file mode 100755 index 0000000..36043ef --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/HuaweiGateway.php @@ -0,0 +1,143 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use GuzzleHttp\Exception\RequestException; +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Exceptions\InvalidArgumentException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +class HuaweiGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_HOST = 'https://api.rtc.huaweicloud.com:10443'; + + const ENDPOINT_URI = '/sms/batchSendSms/v1'; + + const SUCCESS_CODE = '000000'; + + /** + * 发送信息. + * + * @param PhoneNumberInterface $to + * @param MessageInterface $message + * @param Config $config + * + * @return array + * + * @throws GatewayErrorException + * @throws InvalidArgumentException + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $appKey = $config->get('app_key'); + $appSecret = $config->get('app_secret'); + $channels = $config->get('from'); + $statusCallback = $config->get('callback', ''); + + $endpoint = $this->getEndpoint($config); + $headers = $this->getHeaders($appKey, $appSecret); + + $templateId = $message->getTemplate($this); + $messageData = $message->getData($this); + + // 短信签名通道号码 + $from = 'default'; + if (isset($messageData['from'])) { + $from = $messageData['from']; + unset($messageData['from']); + } + $channel = isset($channels[$from]) ? $channels[$from] : ''; + + if (empty($channel)) { + throw new InvalidArgumentException("From Channel [{$from}] Not Exist"); + } + + $params = [ + 'from' => $channel, + 'to' => $to->getUniversalNumber(), + 'templateId' => $templateId, + 'templateParas' => json_encode($messageData), + 'statusCallback' => $statusCallback, + ]; + + try { + $result = $this->request('post', $endpoint, [ + 'headers' => $headers, + 'form_params' => $params, + //为防止因HTTPS证书认证失败造成API调用失败,需要先忽略证书信任问题 + 'verify' => false, + ]); + } catch (RequestException $e) { + $result = $this->unwrapResponse($e->getResponse()); + } + + if (self::SUCCESS_CODE != $result['code']) { + throw new GatewayErrorException($result['description'], ltrim($result['code'], 'E'), $result); + } + + return $result; + } + + /** + * 构造 Endpoint. + * + * @param Config $config + * + * @return string + */ + protected function getEndpoint(Config $config) + { + $endpoint = rtrim($config->get('endpoint', self::ENDPOINT_HOST), '/'); + + return $endpoint.self::ENDPOINT_URI; + } + + /** + * 获取请求 Headers 参数. + * + * @param string $appKey + * @param string $appSecret + * + * @return array + */ + protected function getHeaders($appKey, $appSecret) + { + return [ + 'Content-Type' => 'application/x-www-form-urlencoded', + 'Authorization' => 'WSSE realm="SDP",profile="UsernameToken",type="Appkey"', + 'X-WSSE' => $this->buildWsseHeader($appKey, $appSecret), + ]; + } + + /** + * 构造X-WSSE参数值 + * + * @param string $appKey + * @param string $appSecret + * + * @return string + */ + protected function buildWsseHeader($appKey, $appSecret) + { + $now = date('Y-m-d\TH:i:s\Z'); + $nonce = uniqid(); + $passwordDigest = base64_encode(hash('sha256', ($nonce.$now.$appSecret))); + + return sprintf('UsernameToken Username="%s",PasswordDigest="%s",Nonce="%s",Created="%s"', + $appKey, $passwordDigest, $nonce, $now); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/HuaxinGateway.php b/vendor/overtrue/easy-sms/src/Gateways/HuaxinGateway.php new file mode 100755 index 0000000..3e5c9fe --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/HuaxinGateway.php @@ -0,0 +1,73 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class HuaxinGateway. + * + * @see http://www.ipyy.com/help/ + */ +class HuaxinGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_TEMPLATE = 'http://%s/smsJson.aspx'; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $endpoint = $this->buildEndpoint($config->get('ip')); + + $result = $this->post($endpoint, [ + 'userid' => $config->get('user_id'), + 'account' => $config->get('account'), + 'password' => $config->get('password'), + 'mobile' => $to->getNumber(), + 'content' => $message->getContent($this), + 'sendTime' => '', + 'action' => 'send', + 'extno' => $config->get('ext_no'), + ]); + + if ('Success' !== $result['returnstatus']) { + throw new GatewayErrorException($result['message'], 400, $result); + } + + return $result; + } + + /** + * Build endpoint url. + * + * @param string $ip + * + * @return string + */ + protected function buildEndpoint($ip) + { + return sprintf(self::ENDPOINT_TEMPLATE, $ip); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/HuyiGateway.php b/vendor/overtrue/easy-sms/src/Gateways/HuyiGateway.php new file mode 100755 index 0000000..bcdb91b --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/HuyiGateway.php @@ -0,0 +1,77 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class HuyiGateway. + * + * @see http://www.ihuyi.com/api/sms.html + */ +class HuyiGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_URL = 'http://106.ihuyi.com/webservice/sms.php?method=Submit'; + + const ENDPOINT_FORMAT = 'json'; + + const SUCCESS_CODE = 2; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $params = [ + 'account' => $config->get('api_id'), + 'mobile' => $to->getIDDCode() ? \sprintf('%s %s', $to->getIDDCode(), $to->getNumber()) : $to->getNumber(), + 'content' => $message->getContent($this), + 'time' => time(), + 'format' => self::ENDPOINT_FORMAT, + 'sign' => $config->get('signature'), + ]; + + $params['password'] = $this->generateSign($params); + + $result = $this->post(self::ENDPOINT_URL, $params); + + if (self::SUCCESS_CODE != $result['code']) { + throw new GatewayErrorException($result['msg'], $result['code'], $result); + } + + return $result; + } + + /** + * Generate Sign. + * + * @param array $params + * + * @return string + */ + protected function generateSign($params) + { + return md5($params['account'].$this->config->get('api_key').$params['mobile'].$params['content'].$params['time']); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/JuheGateway.php b/vendor/overtrue/easy-sms/src/Gateways/JuheGateway.php new file mode 100755 index 0000000..9dd3b7e --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/JuheGateway.php @@ -0,0 +1,76 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class JuheGateway. + * + * @see https://www.juhe.cn/docs/api/id/54 + */ +class JuheGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_URL = 'http://v.juhe.cn/sms/send'; + + const ENDPOINT_FORMAT = 'json'; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $params = [ + 'mobile' => $to->getNumber(), + 'tpl_id' => $message->getTemplate($this), + 'tpl_value' => $this->formatTemplateVars($message->getData($this)), + 'dtype' => self::ENDPOINT_FORMAT, + 'key' => $config->get('app_key'), + ]; + + $result = $this->get(self::ENDPOINT_URL, $params); + + if ($result['error_code']) { + throw new GatewayErrorException($result['reason'], $result['error_code'], $result); + } + + return $result; + } + + /** + * @param array $vars + * + * @return string + */ + protected function formatTemplateVars(array $vars) + { + $formatted = []; + + foreach ($vars as $key => $value) { + $formatted[sprintf('#%s#', trim($key, '#'))] = $value; + } + + return http_build_query($formatted); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/LuosimaoGateway.php b/vendor/overtrue/easy-sms/src/Gateways/LuosimaoGateway.php new file mode 100755 index 0000000..07ba2b7 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/LuosimaoGateway.php @@ -0,0 +1,74 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class LuosimaoGateway. + * + * @see https://luosimao.com/docs/api/ + */ +class LuosimaoGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_TEMPLATE = 'https://%s.luosimao.com/%s/%s.%s'; + + const ENDPOINT_VERSION = 'v1'; + + const ENDPOINT_FORMAT = 'json'; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $endpoint = $this->buildEndpoint('sms-api', 'send'); + + $result = $this->post($endpoint, [ + 'mobile' => $to->getNumber(), + 'message' => $message->getContent($this), + ], [ + 'Authorization' => 'Basic '.base64_encode('api:key-'.$config->get('api_key')), + ]); + + if ($result['error']) { + throw new GatewayErrorException($result['msg'], $result['error'], $result); + } + + return $result; + } + + /** + * Build endpoint url. + * + * @param string $type + * @param string $function + * + * @return string + */ + protected function buildEndpoint($type, $function) + { + return sprintf(self::ENDPOINT_TEMPLATE, $type, self::ENDPOINT_VERSION, $function, self::ENDPOINT_FORMAT); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/QcloudGateway.php b/vendor/overtrue/easy-sms/src/Gateways/QcloudGateway.php new file mode 100755 index 0000000..3980665 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/QcloudGateway.php @@ -0,0 +1,115 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class QcloudGateway. + * + * @see https://cloud.tencent.com/document/product/382/13297 + */ +class QcloudGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_URL = 'https://yun.tim.qq.com/v5/'; + + const ENDPOINT_METHOD = 'tlssmssvr/sendsms'; + + const ENDPOINT_VERSION = 'v5'; + + const ENDPOINT_FORMAT = 'json'; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $data = $message->getData($this); + + $signName = !empty($data['sign_name']) ? $data['sign_name'] : $config->get('sign_name', ''); + + unset($data['sign_name']); + + $msg = $message->getContent($this); + if (!empty($msg) && '【' != mb_substr($msg, 0, 1) && !empty($signName)) { + $msg = '【'.$signName.'】'.$msg; + } + + $type = !empty($data['type']) ? $data['type'] : 0; + $params = [ + 'tel' => [ + 'nationcode' => $to->getIDDCode() ?: 86, + 'mobile' => $to->getNumber(), + ], + 'type' => $type, + 'msg' => $msg, + 'time' => time(), + 'extend' => '', + 'ext' => '', + ]; + if (!is_null($message->getTemplate($this)) && is_array($data)) { + unset($params['msg']); + $params['params'] = array_values($data); + $params['tpl_id'] = $message->getTemplate($this); + $params['sign'] = $signName; + } + $random = substr(uniqid(), -10); + + $params['sig'] = $this->generateSign($params, $random); + + $url = self::ENDPOINT_URL.self::ENDPOINT_METHOD.'?sdkappid='.$config->get('sdk_app_id').'&random='.$random; + + $result = $this->request('post', $url, [ + 'headers' => ['Accept' => 'application/json'], + 'json' => $params, + ]); + + if (0 != $result['result']) { + throw new GatewayErrorException($result['errmsg'], $result['result'], $result); + } + + return $result; + } + + /** + * Generate Sign. + * + * @param array $params + * @param string $random + * + * @return string + */ + protected function generateSign($params, $random) + { + ksort($params); + + return hash('sha256', sprintf( + 'appkey=%s&random=%s&time=%s&mobile=%s', + $this->config->get('app_key'), + $random, + $params['time'], + $params['tel']['mobile'] + ), false); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/RongcloudGateway.php b/vendor/overtrue/easy-sms/src/Gateways/RongcloudGateway.php new file mode 100755 index 0000000..8464a1c --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/RongcloudGateway.php @@ -0,0 +1,134 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use GuzzleHttp\Exception\ClientException; +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class RongcloudGateway. + * + * @author Darren Gao + * + * @see http://www.rongcloud.cn/docs/sms_service.html#send_sms_code + */ +class RongcloudGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_TEMPLATE = 'http://api.sms.ronghub.com/%s.%s'; + + const ENDPOINT_ACTION = 'sendCode'; + + const ENDPOINT_FORMAT = 'json'; + + const ENDPOINT_REGION = '86'; // 中国区,目前只支持此国别 + + const SUCCESS_CODE = 200; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $data = $message->getData(); + $action = array_key_exists('action', $data) ? $data['action'] : self::ENDPOINT_ACTION; + $endpoint = $this->buildEndpoint($action); + + $headers = [ + 'Nonce' => uniqid(), + 'App-Key' => $config->get('app_key'), + 'Timestamp' => time(), + ]; + $headers['Signature'] = $this->generateSign($headers, $config); + + switch ($action) { + case 'sendCode': + $params = [ + 'mobile' => $to->getNumber(), + 'region' => self::ENDPOINT_REGION, + 'templateId' => $message->getTemplate($this), + ]; + + break; + case 'verifyCode': + if (!array_key_exists('code', $data) + or !array_key_exists('sessionId', $data)) { + throw new GatewayErrorException('"code" or "sessionId" is not set', 0); + } + $params = [ + 'code' => $data['code'], + 'sessionId' => $data['sessionId'], + ]; + + break; + case 'sendNotify': + $params = [ + 'mobile' => $to->getNumber(), + 'region' => self::ENDPOINT_REGION, + 'templateId' => $message->getTemplate($this), + ]; + $params = array_merge($params, $data); + + break; + default: + throw new GatewayErrorException(sprintf('action: %s not supported', $action)); + } + + try { + $result = $this->post($endpoint, $params, $headers); + + if (self::SUCCESS_CODE !== $result['code']) { + throw new GatewayErrorException($result['errorMessage'], $result['code'], $result); + } + } catch (ClientException $e) { + throw new GatewayErrorException($e->getMessage(), $e->getCode()); + } + + return $result; + } + + /** + * Generate Sign. + * + * @param array $params + * @param \Overtrue\EasySms\Support\Config $config + * + * @return string + */ + protected function generateSign($params, Config $config) + { + return sha1(sprintf('%s%s%s', $config->get('app_secret'), $params['Nonce'], $params['Timestamp'])); + } + + /** + * Build endpoint url. + * + * @param string $action + * + * @return string + */ + protected function buildEndpoint($action) + { + return sprintf(self::ENDPOINT_TEMPLATE, $action, self::ENDPOINT_FORMAT); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/SendcloudGateway.php b/vendor/overtrue/easy-sms/src/Gateways/SendcloudGateway.php new file mode 100755 index 0000000..5da3a4f --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/SendcloudGateway.php @@ -0,0 +1,95 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class SendcloudGateway. + * + * @see http://sendcloud.sohu.com/doc/sms/ + */ +class SendcloudGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_TEMPLATE = 'http://www.sendcloud.net/smsapi/%s'; + + /** + * Send a short message. + * + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $params = [ + 'smsUser' => $config->get('sms_user'), + 'templateId' => $message->getTemplate($this), + 'msgType' => $to->getIDDCode() ? 2 : 0, + 'phone' => $to->getZeroPrefixedNumber(), + 'vars' => $this->formatTemplateVars($message->getData($this)), + ]; + + if ($config->get('timestamp', false)) { + $params['timestamp'] = time() * 1000; + } + + $params['signature'] = $this->sign($params, $config->get('sms_key')); + + $result = $this->post(sprintf(self::ENDPOINT_TEMPLATE, 'send'), $params); + + if (!$result['result']) { + throw new GatewayErrorException($result['message'], $result['statusCode'], $result); + } + + return $result; + } + + /** + * @param array $vars + * + * @return string + */ + protected function formatTemplateVars(array $vars) + { + $formatted = []; + + foreach ($vars as $key => $value) { + $formatted[sprintf('%%%s%%', trim($key, '%'))] = $value; + } + + return json_encode($formatted, JSON_FORCE_OBJECT); + } + + /** + * @param array $params + * @param string $key + * + * @return string + */ + protected function sign($params, $key) + { + ksort($params); + + return md5(sprintf('%s&%s&%s', $key, urldecode(http_build_query($params)), $key)); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/SubmailGateway.php b/vendor/overtrue/easy-sms/src/Gateways/SubmailGateway.php new file mode 100755 index 0000000..7d4678f --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/SubmailGateway.php @@ -0,0 +1,88 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class SubmailGateway. + * + * @see https://www.mysubmail.com/chs/documents/developer/index + */ +class SubmailGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_TEMPLATE = 'https://api.mysubmail.com/%s.%s'; + + const ENDPOINT_FORMAT = 'json'; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $endpoint = $this->buildEndpoint($this->inChineseMainland($to) ? 'message/xsend' : 'internationalsms/xsend'); + + $data = $message->getData($this); + + $result = $this->post($endpoint, [ + 'appid' => $config->get('app_id'), + 'signature' => $config->get('app_key'), + 'project' => !empty($data['project']) ? $data['project'] : $config->get('project'), + 'to' => $to->getUniversalNumber(), + 'vars' => json_encode($data, JSON_FORCE_OBJECT), + ]); + + if ('success' != $result['status']) { + throw new GatewayErrorException($result['msg'], $result['code'], $result); + } + + return $result; + } + + /** + * Build endpoint url. + * + * @param string $function + * + * @return string + */ + protected function buildEndpoint($function) + { + return sprintf(self::ENDPOINT_TEMPLATE, $function, self::ENDPOINT_FORMAT); + } + + /** + * Check if the phone number belongs to chinese mainland. + * + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * + * @return bool + */ + protected function inChineseMainland($to) + { + $code = $to->getIDDCode(); + + return empty($code) || 86 === $code; + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/TianyiwuxianGateway.php b/vendor/overtrue/easy-sms/src/Gateways/TianyiwuxianGateway.php new file mode 100755 index 0000000..a30758c --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/TianyiwuxianGateway.php @@ -0,0 +1,84 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class TianyiwuxianGateway. + * + * @author Darren Gao + */ +class TianyiwuxianGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_TEMPLATE = 'http://jk.106api.cn/sms%s.aspx'; + + const ENDPOINT_ENCODE = 'UTF8'; + + const ENDPOINT_TYPE = 'send'; + + const ENDPOINT_FORMAT = 'json'; + + const SUCCESS_STATUS = 'success'; + + const SUCCESS_CODE = '0'; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $endpoint = $this->buildEndpoint(); + + $params = [ + 'gwid' => $config->get('gwid'), + 'type' => self::ENDPOINT_TYPE, + 'rece' => self::ENDPOINT_FORMAT, + 'mobile' => $to->getNumber(), + 'message' => $message->getContent($this), + 'username' => $config->get('username'), + 'password' => strtoupper(md5($config->get('password'))), + ]; + + $result = $this->post($endpoint, $params); + + $result = json_decode($result, true); + + if (self::SUCCESS_STATUS !== $result['returnstatus'] || self::SUCCESS_CODE !== $result['code']) { + throw new GatewayErrorException($result['remark'], $result['code']); + } + + return $result; + } + + /** + * Build endpoint url. + * + * @return string + */ + protected function buildEndpoint() + { + return sprintf(self::ENDPOINT_TEMPLATE, self::ENDPOINT_ENCODE); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/TwilioGateway.php b/vendor/overtrue/easy-sms/src/Gateways/TwilioGateway.php new file mode 100755 index 0000000..95e572c --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/TwilioGateway.php @@ -0,0 +1,91 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use GuzzleHttp\Exception\ClientException; +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class TwilioGateway. + * + * @see https://www.twilio.com/docs/api/messaging/send-messages + */ +class TwilioGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_URL = 'https://api.twilio.com/2010-04-01/Accounts/%s/Messages.json'; + + protected $errorStatuses = [ + 'failed', + 'undelivered', + ]; + + public function getName() + { + return 'twilio'; + } + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $accountSid = $config->get('account_sid'); + $endpoint = $this->buildEndPoint($accountSid); + + $params = [ + 'To' => $to->getUniversalNumber(), + 'From' => $config->get('from'), + 'Body' => $message->getContent($this), + ]; + + try { + $result = $this->request('post', $endpoint, [ + 'auth' => [ + $accountSid, + $config->get('token'), + ], + 'form_params' => $params, + ]); + if (in_array($result['status'], $this->errorStatuses) || !is_null($result['error_code'])) { + throw new GatewayErrorException($result['message'], $result['error_code'], $result); + } + } catch (ClientException $e) { + throw new GatewayErrorException($e->getMessage(), $e->getCode()); + } + + return $result; + } + + /** + * build endpoint url. + * + * @param string $accountSid + * + * @return string + */ + protected function buildEndPoint($accountSid) + { + return sprintf(self::ENDPOINT_URL, $accountSid); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/YunpianGateway.php b/vendor/overtrue/easy-sms/src/Gateways/YunpianGateway.php new file mode 100755 index 0000000..cf23dfd --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/YunpianGateway.php @@ -0,0 +1,81 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class YunpianGateway. + * + * @see https://www.yunpian.com/doc/zh_CN/intl/single_send.html + */ +class YunpianGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_TEMPLATE = 'https://%s.yunpian.com/%s/%s/%s.%s'; + + const ENDPOINT_VERSION = 'v2'; + + const ENDPOINT_FORMAT = 'json'; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $endpoint = $this->buildEndpoint('sms', 'sms', 'single_send'); + + $signature = $config->get('signature', ''); + + $content = $message->getContent($this); + + $result = $this->request('post', $endpoint, [ + 'form_params' => [ + 'apikey' => $config->get('api_key'), + 'mobile' => $to->getUniversalNumber(), + 'text' => 0 === \stripos($content, '【') ? $content : $signature.$content, + ], + 'exceptions' => false, + ]); + + if ($result['code']) { + throw new GatewayErrorException($result['msg'], $result['code'], $result); + } + + return $result; + } + + /** + * Build endpoint url. + * + * @param string $type + * @param string $resource + * @param string $function + * + * @return string + */ + protected function buildEndpoint($type, $resource, $function) + { + return sprintf(self::ENDPOINT_TEMPLATE, $type, self::ENDPOINT_VERSION, $resource, $function, self::ENDPOINT_FORMAT); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/YuntongxunGateway.php b/vendor/overtrue/easy-sms/src/Gateways/YuntongxunGateway.php new file mode 100755 index 0000000..589a6f0 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/YuntongxunGateway.php @@ -0,0 +1,99 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class YuntongxunGateway. + * + * @see http://www.yuntongxun.com/doc/rest/sms/3_2_2_2.html + */ +class YuntongxunGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_TEMPLATE = 'https://%s:%s/%s/%s/%s/%s/%s?sig=%s'; + + const SERVER_IP = 'app.cloopen.com'; + + const DEBUG_SERVER_IP = 'sandboxapp.cloopen.com'; + + const DEBUG_TEMPLATE_ID = 1; + + const SERVER_PORT = '8883'; + + const SDK_VERSION = '2013-12-26'; + + const SUCCESS_CODE = '000000'; + + /** + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\GatewayErrorException ; + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $datetime = date('YmdHis'); + + $endpoint = $this->buildEndpoint('SMS', 'TemplateSMS', $datetime, $config); + + $result = $this->request('post', $endpoint, [ + 'json' => [ + 'to' => $to, + 'templateId' => (int) ($this->config->get('debug') ? self::DEBUG_TEMPLATE_ID : $message->getTemplate($this)), + 'appId' => $config->get('app_id'), + 'datas' => $message->getData($this), + ], + 'headers' => [ + 'Accept' => 'application/json', + 'Content-Type' => 'application/json;charset=utf-8', + 'Authorization' => base64_encode($config->get('account_sid').':'.$datetime), + ], + ]); + + if (self::SUCCESS_CODE != $result['statusCode']) { + throw new GatewayErrorException($result['statusCode'], $result['statusCode'], $result); + } + + return $result; + } + + /** + * Build endpoint url. + * + * @param string $type + * @param string $resource + * @param string $datetime + * @param \Overtrue\EasySms\Support\Config $config + * + * @return string + */ + protected function buildEndpoint($type, $resource, $datetime, Config $config) + { + $serverIp = $this->config->get('debug') ? self::DEBUG_SERVER_IP : self::SERVER_IP; + + $accountType = $this->config->get('is_sub_account') ? 'SubAccounts' : 'Accounts'; + + $sig = strtoupper(md5($config->get('account_sid').$config->get('account_token').$datetime)); + + return sprintf(self::ENDPOINT_TEMPLATE, $serverIp, self::SERVER_PORT, self::SDK_VERSION, $accountType, $config->get('account_sid'), $type, $resource, $sig); + } +} diff --git a/vendor/overtrue/easy-sms/src/Gateways/YunxinGateway.php b/vendor/overtrue/easy-sms/src/Gateways/YunxinGateway.php new file mode 100755 index 0000000..aadf2fa --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Gateways/YunxinGateway.php @@ -0,0 +1,162 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Gateways; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\GatewayErrorException; +use Overtrue\EasySms\Support\Config; +use Overtrue\EasySms\Traits\HasHttpRequest; + +/** + * Class YunxinGateway. + * + * @author her-cat + * + * @see https://dev.yunxin.163.com/docs/product/%E7%9F%AD%E4%BF%A1/%E7%9F%AD%E4%BF%A1%E6%8E%A5%E5%8F%A3%E6%8C%87%E5%8D%97 + */ +class YunxinGateway extends Gateway +{ + use HasHttpRequest; + + const ENDPOINT_TEMPLATE = 'https://api.netease.im/%s/%s.action'; + + const ENDPOINT_ACTION = 'sendCode'; + + const SUCCESS_CODE = 200; + + /** + * Send a short message. + * + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param \Overtrue\EasySms\Support\Config $config + * + * @return array + * + * @throws GatewayErrorException + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $data = $message->getData($this); + + $action = isset($data['action']) ? $data['action'] : self::ENDPOINT_ACTION; + + $endpoint = $this->buildEndpoint('sms', $action); + + switch ($action) { + case 'sendCode': + $params = $this->buildSendCodeParams($to, $message, $config); + + break; + case 'verifyCode': + $params = $this->buildVerifyCodeParams($to, $message); + + break; + default: + throw new GatewayErrorException(sprintf('action: %s not supported', $action), 0); + } + + $headers = $this->buildHeaders($config); + + try { + $result = $this->post($endpoint, $params, $headers); + + if (!isset($result['code']) || self::SUCCESS_CODE !== $result['code']) { + $code = isset($result['code']) ? $result['code'] : 0; + $error = isset($result['msg']) ? $result['msg'] : json_encode($result, JSON_UNESCAPED_UNICODE); + + throw new GatewayErrorException($error, $code); + } + } catch (\Exception $e) { + throw new GatewayErrorException($e->getMessage(), $e->getCode()); + } + + return $result; + } + + /** + * @param $resource + * @param $function + * + * @return string + */ + protected function buildEndpoint($resource, $function) + { + return sprintf(self::ENDPOINT_TEMPLATE, $resource, strtolower($function)); + } + + /** + * Get the request headers. + * + * @param Config $config + * + * @return array + */ + protected function buildHeaders(Config $config) + { + $headers = [ + 'AppKey' => $config->get('app_key'), + 'Nonce' => md5(uniqid('easysms')), + 'CurTime' => (string) time(), + 'Content-Type' => 'application/x-www-form-urlencoded;charset=utf-8', + ]; + + $headers['CheckSum'] = sha1("{$config->get('app_secret')}{$headers['Nonce']}{$headers['CurTime']}"); + + return $headers; + } + + /** + * @param PhoneNumberInterface $to + * @param MessageInterface $message + * @param Config $config + * + * @return array + */ + public function buildSendCodeParams(PhoneNumberInterface $to, MessageInterface $message, Config $config) + { + $data = $message->getData($this); + $template = $message->getTemplate($this); + + return [ + 'mobile' => $to->getUniversalNumber(), + 'authCode' => array_key_exists('code', $data) ? $data['code'] : '', + 'deviceId' => array_key_exists('device_id', $data) ? $data['device_id'] : '', + 'templateid' => is_string($template) ? $template : '', + 'codeLen' => $config->get('code_length', 4), + 'needUp' => $config->get('need_up', false), + ]; + } + + /** + * @param PhoneNumberInterface $to + * @param MessageInterface $message + * + * @return array + * + * @throws GatewayErrorException + */ + public function buildVerifyCodeParams(PhoneNumberInterface $to, MessageInterface $message) + { + $data = $message->getData($this); + + if (!array_key_exists('code', $data)) { + throw new GatewayErrorException('"code" cannot be empty', 0); + } + + return [ + 'mobile' => $to->getUniversalNumber(), + 'code' => $data['code'], + ]; + } +} diff --git a/vendor/overtrue/easy-sms/src/Message.php b/vendor/overtrue/easy-sms/src/Message.php new file mode 100755 index 0000000..5bc9360 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Message.php @@ -0,0 +1,187 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms; + +use Overtrue\EasySms\Contracts\GatewayInterface; +use Overtrue\EasySms\Contracts\MessageInterface; + +/** + * Class Message. + */ +class Message implements MessageInterface +{ + /** + * @var array + */ + protected $gateways = []; + + /** + * @var string + */ + protected $type; + + /** + * @var string + */ + protected $content; + + /** + * @var string + */ + protected $template; + + /** + * @var array + */ + protected $data = []; + + /** + * Message constructor. + * + * @param array $attributes + * @param string $type + */ + public function __construct(array $attributes = [], $type = MessageInterface::TEXT_MESSAGE) + { + $this->type = $type; + + foreach ($attributes as $property => $value) { + if (property_exists($this, $property)) { + $this->$property = $value; + } + } + } + + /** + * Return the message type. + * + * @return string + */ + public function getMessageType() + { + return $this->type; + } + + /** + * Return message content. + * + * @param \Overtrue\EasySms\Contracts\GatewayInterface|null $gateway + * + * @return string + */ + public function getContent(GatewayInterface $gateway = null) + { + return is_callable($this->content) ? call_user_func($this->content, $gateway) : $this->content; + } + + /** + * Return the template id of message. + * + * @param \Overtrue\EasySms\Contracts\GatewayInterface|null $gateway + * + * @return string + */ + public function getTemplate(GatewayInterface $gateway = null) + { + return is_callable($this->template) ? call_user_func($this->template, $gateway) : $this->template; + } + + /** + * @param string $type + * + * @return $this + */ + public function setType(string $type) + { + $this->type = $type; + + return $this; + } + + /** + * @param mixed $content + * + * @return $this + */ + public function setContent($content) + { + $this->content = $content; + + return $this; + } + + /** + * @param mixed $template + * + * @return $this + */ + public function setTemplate($template) + { + $this->template = $template; + + return $this; + } + + /** + * @param \Overtrue\EasySms\Contracts\GatewayInterface|null $gateway + * + * @return array + */ + public function getData(GatewayInterface $gateway = null) + { + return is_callable($this->data) ? call_user_func($this->data, $gateway) : $this->data; + } + + /** + * @param array $data + * + * @return $this + */ + public function setData(array $data) + { + $this->data = $data; + + return $this; + } + + /** + * @return array + */ + public function getGateways() + { + return $this->gateways; + } + + /** + * @param array $gateways + * + * @return $this + */ + public function setGateways(array $gateways) + { + $this->gateways = $gateways; + + return $this; + } + + /** + * @param $property + * + * @return string + */ + public function __get($property) + { + if (property_exists($this, $property)) { + return $this->$property; + } + } +} diff --git a/vendor/overtrue/easy-sms/src/Messenger.php b/vendor/overtrue/easy-sms/src/Messenger.php new file mode 100755 index 0000000..c09f03d --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Messenger.php @@ -0,0 +1,89 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms; + +use Overtrue\EasySms\Contracts\MessageInterface; +use Overtrue\EasySms\Contracts\PhoneNumberInterface; +use Overtrue\EasySms\Exceptions\NoGatewayAvailableException; + +/** + * Class Messenger. + */ +class Messenger +{ + const STATUS_SUCCESS = 'success'; + + const STATUS_FAILURE = 'failure'; + + /** + * @var \Overtrue\EasySms\EasySms + */ + protected $easySms; + + /** + * Messenger constructor. + * + * @param \Overtrue\EasySms\EasySms $easySms + */ + public function __construct(EasySms $easySms) + { + $this->easySms = $easySms; + } + + /** + * Send a message. + * + * @param \Overtrue\EasySms\Contracts\PhoneNumberInterface $to + * @param \Overtrue\EasySms\Contracts\MessageInterface $message + * @param array $gateways + * + * @return array + * + * @throws \Overtrue\EasySms\Exceptions\NoGatewayAvailableException + */ + public function send(PhoneNumberInterface $to, MessageInterface $message, array $gateways = []) + { + $results = []; + $isSuccessful = false; + + foreach ($gateways as $gateway => $config) { + try { + $results[$gateway] = [ + 'gateway' => $gateway, + 'status' => self::STATUS_SUCCESS, + 'result' => $this->easySms->gateway($gateway)->send($to, $message, $config), + ]; + $isSuccessful = true; + + break; + } catch (\Exception $e) { + $results[$gateway] = [ + 'gateway' => $gateway, + 'status' => self::STATUS_FAILURE, + 'exception' => $e, + ]; + } catch (\Throwable $e) { + $results[$gateway] = [ + 'gateway' => $gateway, + 'status' => self::STATUS_FAILURE, + 'exception' => $e, + ]; + } + } + + if (!$isSuccessful) { + throw new NoGatewayAvailableException($results); + } + + return $results; + } +} diff --git a/vendor/overtrue/easy-sms/src/PhoneNumber.php b/vendor/overtrue/easy-sms/src/PhoneNumber.php new file mode 100755 index 0000000..1e8e796 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/PhoneNumber.php @@ -0,0 +1,115 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms; + +/** + * Class PhoneNumberInterface. + * + * @author overtrue + */ +class PhoneNumber implements \Overtrue\EasySms\Contracts\PhoneNumberInterface +{ + /** + * @var int + */ + protected $number; + + /** + * @var int + */ + protected $IDDCode; + + /** + * PhoneNumberInterface constructor. + * + * @param int $numberWithoutIDDCode + * @param string $IDDCode + */ + public function __construct($numberWithoutIDDCode, $IDDCode = null) + { + $this->number = $numberWithoutIDDCode; + $this->IDDCode = $IDDCode ? intval(ltrim($IDDCode, '+0')) : null; + } + + /** + * 86. + * + * @return int + */ + public function getIDDCode() + { + return $this->IDDCode; + } + + /** + * 18888888888. + * + * @return int + */ + public function getNumber() + { + return $this->number; + } + + /** + * +8618888888888. + * + * @return string + */ + public function getUniversalNumber() + { + return $this->getPrefixedIDDCode('+').$this->number; + } + + /** + * 008618888888888. + * + * @return string + */ + public function getZeroPrefixedNumber() + { + return $this->getPrefixedIDDCode('00').$this->number; + } + + /** + * @param string $prefix + * + * @return string|null + */ + public function getPrefixedIDDCode($prefix) + { + return $this->IDDCode ? $prefix.$this->IDDCode : null; + } + + /** + * @return string + */ + public function __toString() + { + return $this->getUniversalNumber(); + } + + /** + * Specify data which should be serialized to JSON. + * + * @see http://php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed data which can be serialized by json_encode, + * which is a value of any type other than a resource + * + * @since 5.4.0 + */ + public function jsonSerialize() + { + return $this->getUniversalNumber(); + } +} diff --git a/vendor/overtrue/easy-sms/src/Strategies/OrderStrategy.php b/vendor/overtrue/easy-sms/src/Strategies/OrderStrategy.php new file mode 100755 index 0000000..f44b29e --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Strategies/OrderStrategy.php @@ -0,0 +1,32 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Strategies; + +use Overtrue\EasySms\Contracts\StrategyInterface; + +/** + * Class OrderStrategy. + */ +class OrderStrategy implements StrategyInterface +{ + /** + * Apply the strategy and return result. + * + * @param array $gateways + * + * @return array + */ + public function apply(array $gateways) + { + return array_keys($gateways); + } +} diff --git a/vendor/overtrue/easy-sms/src/Strategies/RandomStrategy.php b/vendor/overtrue/easy-sms/src/Strategies/RandomStrategy.php new file mode 100755 index 0000000..605c5d9 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Strategies/RandomStrategy.php @@ -0,0 +1,34 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Strategies; + +use Overtrue\EasySms\Contracts\StrategyInterface; + +/** + * Class RandomStrategy. + */ +class RandomStrategy implements StrategyInterface +{ + /** + * @param array $gateways + * + * @return array + */ + public function apply(array $gateways) + { + uasort($gateways, function () { + return mt_rand() - mt_rand(); + }); + + return array_keys($gateways); + } +} diff --git a/vendor/overtrue/easy-sms/src/Support/Config.php b/vendor/overtrue/easy-sms/src/Support/Config.php new file mode 100755 index 0000000..6f8b2c2 --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Support/Config.php @@ -0,0 +1,143 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Support; + +use ArrayAccess; + +/** + * Class Config. + */ +class Config implements ArrayAccess +{ + /** + * @var array + */ + protected $config; + + /** + * Config constructor. + * + * @param array $config + */ + public function __construct(array $config = []) + { + $this->config = $config; + } + + /** + * Get an item from an array using "dot" notation. + * + * @param string $key + * @param mixed $default + * + * @return mixed + */ + public function get($key, $default = null) + { + $config = $this->config; + + if (isset($config[$key])) { + return $config[$key]; + } + + if (false === strpos($key, '.')) { + return $default; + } + + foreach (explode('.', $key) as $segment) { + if (!is_array($config) || !array_key_exists($segment, $config)) { + return $default; + } + $config = $config[$segment]; + } + + return $config; + } + + /** + * Whether a offset exists. + * + * @see http://php.net/manual/en/arrayaccess.offsetexists.php + * + * @param mixed $offset

                            + * An offset to check for. + *

                            + * + * @return bool true on success or false on failure. + *

                            + *

                            + * The return value will be casted to boolean if non-boolean was returned + * + * @since 5.0.0 + */ + public function offsetExists($offset) + { + return array_key_exists($offset, $this->config); + } + + /** + * Offset to retrieve. + * + * @see http://php.net/manual/en/arrayaccess.offsetget.php + * + * @param mixed $offset

                            + * The offset to retrieve. + *

                            + * + * @return mixed Can return all value types + * + * @since 5.0.0 + */ + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * Offset to set. + * + * @see http://php.net/manual/en/arrayaccess.offsetset.php + * + * @param mixed $offset

                            + * The offset to assign the value to. + *

                            + * @param mixed $value

                            + * The value to set. + *

                            + * + * @since 5.0.0 + */ + public function offsetSet($offset, $value) + { + if (isset($this->config[$offset])) { + $this->config[$offset] = $value; + } + } + + /** + * Offset to unset. + * + * @see http://php.net/manual/en/arrayaccess.offsetunset.php + * + * @param mixed $offset

                            + * The offset to unset. + *

                            + * + * @since 5.0.0 + */ + public function offsetUnset($offset) + { + if (isset($this->config[$offset])) { + unset($this->config[$offset]); + } + } +} diff --git a/vendor/overtrue/easy-sms/src/Traits/HasHttpRequest.php b/vendor/overtrue/easy-sms/src/Traits/HasHttpRequest.php new file mode 100755 index 0000000..45217bd --- /dev/null +++ b/vendor/overtrue/easy-sms/src/Traits/HasHttpRequest.php @@ -0,0 +1,136 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\EasySms\Traits; + +use GuzzleHttp\Client; +use Psr\Http\Message\ResponseInterface; + +/** + * Trait HasHttpRequest. + */ +trait HasHttpRequest +{ + /** + * Make a get request. + * + * @param string $endpoint + * @param array $query + * @param array $headers + * + * @return array + */ + protected function get($endpoint, $query = [], $headers = []) + { + return $this->request('get', $endpoint, [ + 'headers' => $headers, + 'query' => $query, + ]); + } + + /** + * Make a post request. + * + * @param string $endpoint + * @param array $params + * @param array $headers + * + * @return array + */ + protected function post($endpoint, $params = [], $headers = []) + { + return $this->request('post', $endpoint, [ + 'headers' => $headers, + 'form_params' => $params, + ]); + } + + /** + * Make a post request with json params. + * + * @param $endpoint + * @param array $params + * @param array $headers + * + * @return array + */ + protected function postJson($endpoint, $params = [], $headers = []) + { + return $this->request('post', $endpoint, [ + 'headers' => $headers, + 'json' => $params, + ]); + } + + /** + * Make a http request. + * + * @param string $method + * @param string $endpoint + * @param array $options http://docs.guzzlephp.org/en/latest/request-options.html + * + * @return array + */ + protected function request($method, $endpoint, $options = []) + { + return $this->unwrapResponse($this->getHttpClient($this->getBaseOptions())->{$method}($endpoint, $options)); + } + + /** + * Return base Guzzle options. + * + * @return array + */ + protected function getBaseOptions() + { + $options = [ + 'base_uri' => method_exists($this, 'getBaseUri') ? $this->getBaseUri() : '', + 'timeout' => method_exists($this, 'getTimeout') ? $this->getTimeout() : 5.0, + ]; + + return $options; + } + + /** + * Return http client. + * + * @param array $options + * + * @return \GuzzleHttp\Client + * + * @codeCoverageIgnore + */ + protected function getHttpClient(array $options = []) + { + return new Client($options); + } + + /** + * Convert response contents to json. + * + * @param \Psr\Http\Message\ResponseInterface $response + * + * @return ResponseInterface|array|string + */ + protected function unwrapResponse(ResponseInterface $response) + { + $contentType = $response->getHeaderLine('Content-Type'); + $contents = $response->getBody()->getContents(); + + if (false !== stripos($contentType, 'json') || stripos($contentType, 'javascript')) { + return json_decode($contents, true); + } elseif (false !== stripos($contentType, 'xml')) { + return json_decode(json_encode(simplexml_load_string($contents)), true); + } + + return $contents; + } +} diff --git a/vendor/overtrue/socialite/.github/FUNDING.yml b/vendor/overtrue/socialite/.github/FUNDING.yml new file mode 100755 index 0000000..a3be7fa --- /dev/null +++ b/vendor/overtrue/socialite/.github/FUNDING.yml @@ -0,0 +1,9 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: overtrue +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +custom: # Replace with a single custom sponsorship URL diff --git a/vendor/overtrue/socialite/.gitignore b/vendor/overtrue/socialite/.gitignore new file mode 100755 index 0000000..d6eb268 --- /dev/null +++ b/vendor/overtrue/socialite/.gitignore @@ -0,0 +1,9 @@ +/vendor +composer.phar +composer.lock +.DS_Store +/.idea +Thumbs.db +/*.php +sftp-config.json +.php_cs.cache \ No newline at end of file diff --git a/vendor/overtrue/socialite/.php_cs b/vendor/overtrue/socialite/.php_cs new file mode 100755 index 0000000..bda3644 --- /dev/null +++ b/vendor/overtrue/socialite/.php_cs @@ -0,0 +1,28 @@ + + +This source file is subject to the MIT license that is bundled +with this source code in the file LICENSE. +EOF; + +return PhpCsFixer\Config::create() + ->setRiskyAllowed(true) + ->setRules(array( + '@Symfony' => true, + 'header_comment' => array('header' => $header), + 'array_syntax' => array('syntax' => 'short'), + 'ordered_imports' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'php_unit_construct' => true, + 'php_unit_strict' => true, + )) + ->setFinder( + PhpCsFixer\Finder::create() + ->exclude('vendor') + ->in(__DIR__) + ) +; \ No newline at end of file diff --git a/vendor/overtrue/socialite/.travis.yml b/vendor/overtrue/socialite/.travis.yml new file mode 100755 index 0000000..39912f9 --- /dev/null +++ b/vendor/overtrue/socialite/.travis.yml @@ -0,0 +1,13 @@ +language: php + +php: + - 7.0 + - 7.1 + - 7.2 + +sudo: false +dist: trusty + +install: travis_retry composer install --no-interaction --prefer-source + +script: vendor/bin/phpunit --verbose diff --git a/vendor/overtrue/socialite/LICENSE.txt b/vendor/overtrue/socialite/LICENSE.txt new file mode 100755 index 0000000..c5fe984 --- /dev/null +++ b/vendor/overtrue/socialite/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) overtrue + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/vendor/overtrue/socialite/README.md b/vendor/overtrue/socialite/README.md new file mode 100755 index 0000000..ec7ea88 --- /dev/null +++ b/vendor/overtrue/socialite/README.md @@ -0,0 +1,266 @@ +

                            Socialite

                            +

                            +Build Status +Latest Stable Version +Latest Unstable Version +Build Status +Scrutinizer Code Quality +Code Coverage +Total Downloads +License +

                            + + +

                            Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, You can easily use it in any PHP project.

                            + +# Requirement + +``` +PHP >= 7.0 +``` +# Installation + +```shell +$ composer require "overtrue/socialite" -vvv +``` + +# Usage + +For Laravel 5: [overtrue/laravel-socialite](https://github.com/overtrue/laravel-socialite) + +`authorize.php`: + +```php + [ + 'client_id' => 'your-app-id', + 'client_secret' => 'your-app-secret', + 'redirect' => 'http://localhost/socialite/callback.php', + ], +]; + +$socialite = new SocialiteManager($config); + +$response = $socialite->driver('github')->redirect(); + +echo $response;// or $response->send(); +``` + +`callback.php`: + +```php + [ + 'client_id' => 'your-app-id', + 'client_secret' => 'your-app-secret', + 'redirect' => 'http://localhost/socialite/callback.php', + ], +]; + +$socialite = new SocialiteManager($config); + +$user = $socialite->driver('github')->user(); + +$user->getId(); // 1472352 +$user->getNickname(); // "overtrue" +$user->getUsername(); // "overtrue" +$user->getName(); // "安正超" +$user->getEmail(); // "anzhengchao@gmail.com" +$user->getProviderName(); // GitHub +... +``` + +### Configuration + +Now we support the following sites: + +`facebook`, `github`, `google`, `linkedin`, `outlook`, `weibo`, `taobao`, `qq`, `wechat`, `douyin`, and `douban`. + +Each driver uses the same configuration keys: `client_id`, `client_secret`, `redirect`. + +Example: +``` +... + 'weibo' => [ + 'client_id' => 'your-app-id', + 'client_secret' => 'your-app-secret', + 'redirect' => 'http://localhost/socialite/callback.php', + ], +... +``` + +### Scope + +Before redirecting the user, you may also set "scopes" on the request using the scope method. This method will overwrite all existing scopes: + +```php +$response = $socialite->driver('github') + ->scopes(['scope1', 'scope2'])->redirect(); + +``` + +### Redirect URL + +You may also want to dynamicly set `redirect`,you can use the following methods to change the `redirect` URL: + +```php +$socialite->redirect($url); +// or +$socialite->withRedirectUrl($url)->redirect(); +// or +$socialite->setRedirectUrl($url)->redirect(); +``` + +> WeChat scopes: +- `snsapi_base`, `snsapi_userinfo` - Used to Media Platform Authentication. +- `snsapi_login` - Used to web Authentication. + +### Additional parameters + +To include any optional parameters in the request, call the with method with an associative array: + +```php +$response = $socialite->driver('google') + ->with(['hd' => 'example.com'])->redirect(); +``` + +### User interface + +#### Standard user api: + +```php + +$user = $socialite->driver('weibo')->user(); +``` + +```json +{ + "id": 1472352, + "nickname": "overtrue", + "name": "安正超", + "email": "anzhengchao@gmail.com", + "avatar": "https://avatars.githubusercontent.com/u/1472352?v=3", + "original": { + "login": "overtrue", + "id": 1472352, + "avatar_url": "https://avatars.githubusercontent.com/u/1472352?v=3", + "gravatar_id": "", + "url": "https://api.github.com/users/overtrue", + "html_url": "https://github.com/overtrue", + ... + }, + "token": { + "access_token": "5b1dc56d64fffbd052359f032716cc4e0a1cb9a0", + "token_type": "bearer", + "scope": "user:email" + } +} +``` + +You can fetch the user attribute as a array keys like these: + +```php +$user['id']; // 1472352 +$user['nickname']; // "overtrue" +$user['name']; // "安正超" +$user['email']; // "anzhengchao@gmail.com" +... +``` + +Or using the method: + +```php +$user->getId(); +$user->getNickname(); +$user->getName(); +$user->getEmail(); +$user->getAvatar(); +$user->getOriginal(); +$user->getToken();// or $user->getAccessToken() +$user->getProviderName(); // GitHub/Google/Facebook... +``` + +#### Get original response from OAuth API + +The `$user->getOriginal()` method will return an array of the API raw response. + +#### Get access token Object + +You can get the access token instance of current session by call `$user->getToken()` or `$user->getAccessToken()` or `$user['token']` . + + +### Get user with access token + +```php +$accessToken = new AccessToken(['access_token' => $accessToken]); +$user = $socialite->user($accessToken); +``` + + +### Custom Session or Request instance. + +You can set the request with your custom `Request` instance which instanceof `Symfony\Component\HttpFoundation\Request` before you call `driver` method. + + +```php + +$request = new Request(); // or use AnotherCustomRequest. + +$socialite = new SocialiteManager($config, $request); +``` + +Or set request to `SocialiteManager` instance: + +```php +$socialite->setRequest($request); +``` + +You can get the request from the `SocialiteManager` instance by `getRequest()`: + +```php +$request = $socialite->getRequest(); +``` + +#### Set custom session manager. + +By default, the `SocialiteManager` uses the `Symfony\Component\HttpFoundation\Session\Session` instance as session manager, you can change it as follows: + +```php +$session = new YourCustomSessionManager(); +$socialite->getRequest()->setSession($session); +``` + +> Your custom session manager must be implement the [`Symfony\Component\HttpFoundation\Session\SessionInterface`](http://api.symfony.com/3.0/Symfony/Component/HttpFoundation/Session/SessionInterface.html). + +Enjoy it! :heart: + +# Reference + +- [Google - OpenID Connect](https://developers.google.com/identity/protocols/OpenIDConnect) +- [Facebook - Graph API](https://developers.facebook.com/docs/graph-api) +- [Linkedin - Authenticating with OAuth 2.0](https://developer.linkedin.com/docs/oauth2) +- [微博 - OAuth 2.0 授权机制说明](http://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E) +- [QQ - OAuth 2.0 登录QQ](http://wiki.connect.qq.com/oauth2-0%E7%AE%80%E4%BB%8B) +- [微信公众平台 - OAuth文档](http://mp.weixin.qq.com/wiki/9/01f711493b5a02f24b04365ac5d8fd95.html) +- [微信开放平台 - 网站应用微信登录开发指南](https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN) +- [微信开放平台 - 代公众号发起网页授权](https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419318590&token=&lang=zh_CN) +- [豆瓣 - OAuth 2.0 授权机制说明](http://developers.douban.com/wiki/?title=oauth2) +- [抖音 - 网站应用开发指南](http://open.douyin.com/platform/doc) + +## PHP 扩展包开发 + +> 想知道如何从零开始构建 PHP 扩展包? +> +> 请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package) + +# License + +MIT diff --git a/vendor/overtrue/socialite/composer.json b/vendor/overtrue/socialite/composer.json new file mode 100755 index 0000000..87dec16 --- /dev/null +++ b/vendor/overtrue/socialite/composer.json @@ -0,0 +1,26 @@ +{ + "name": "overtrue/socialite", + "description": "A collection of OAuth 2 packages that extracts from laravel/socialite.", + "keywords": ["OAuth", "social", "login", "Weibo", "WeChat", "QQ"], + "autoload": { + "psr-4": { + "Overtrue\\Socialite\\": "src/" + } + }, + "require": { + "php": ">=7.0", + "guzzlehttp/guzzle": "~5.0|~6.0", + "symfony/http-foundation": "^2.7|^3.0|^4.0" + }, + "require-dev": { + "mockery/mockery": "~1.2", + "phpunit/phpunit": "~6" + }, + "license": "MIT", + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ] +} diff --git a/vendor/overtrue/socialite/phpunit.xml b/vendor/overtrue/socialite/phpunit.xml new file mode 100755 index 0000000..3347b75 --- /dev/null +++ b/vendor/overtrue/socialite/phpunit.xml @@ -0,0 +1,18 @@ + + + + + ./tests/ + + + diff --git a/vendor/overtrue/socialite/src/AccessToken.php b/vendor/overtrue/socialite/src/AccessToken.php new file mode 100755 index 0000000..e089bfa --- /dev/null +++ b/vendor/overtrue/socialite/src/AccessToken.php @@ -0,0 +1,64 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +use ArrayAccess; +use InvalidArgumentException; +use JsonSerializable; + +/** + * Class AccessToken. + */ +class AccessToken implements AccessTokenInterface, ArrayAccess, JsonSerializable +{ + use HasAttributes; + + /** + * AccessToken constructor. + * + * @param array $attributes + */ + public function __construct(array $attributes) + { + if (empty($attributes['access_token'])) { + throw new InvalidArgumentException('The key "access_token" could not be empty.'); + } + + $this->attributes = $attributes; + } + + /** + * Return the access token string. + * + * @return string + */ + public function getToken() + { + return $this->getAttribute('access_token'); + } + + /** + * {@inheritdoc} + */ + public function __toString() + { + return strval($this->getAttribute('access_token', '')); + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() + { + return $this->getToken(); + } +} diff --git a/vendor/overtrue/socialite/src/AccessTokenInterface.php b/vendor/overtrue/socialite/src/AccessTokenInterface.php new file mode 100755 index 0000000..f6f54bc --- /dev/null +++ b/vendor/overtrue/socialite/src/AccessTokenInterface.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +/** + * Interface AccessTokenInterface. + */ +interface AccessTokenInterface +{ + /** + * Return the access token string. + * + * @return string + */ + public function getToken(); +} diff --git a/vendor/overtrue/socialite/src/AuthorizeFailedException.php b/vendor/overtrue/socialite/src/AuthorizeFailedException.php new file mode 100755 index 0000000..cc2b128 --- /dev/null +++ b/vendor/overtrue/socialite/src/AuthorizeFailedException.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +class AuthorizeFailedException extends \RuntimeException +{ + /** + * Response body. + * + * @var array + */ + public $body; + + /** + * Constructor. + * + * @param string $message + * @param array $body + */ + public function __construct($message, $body) + { + parent::__construct($message, -1); + + $this->body = $body; + } +} diff --git a/vendor/overtrue/socialite/src/Config.php b/vendor/overtrue/socialite/src/Config.php new file mode 100755 index 0000000..bbe0862 --- /dev/null +++ b/vendor/overtrue/socialite/src/Config.php @@ -0,0 +1,180 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +use ArrayAccess; +use InvalidArgumentException; + +/** + * Class Config. + */ +class Config implements ArrayAccess +{ + /** + * @var array + */ + protected $config; + + /** + * Config constructor. + * + * @param array $config + */ + public function __construct(array $config) + { + $this->config = $config; + } + + /** + * Get an item from an array using "dot" notation. + * + * @param string $key + * @param mixed $default + * + * @return mixed + */ + public function get($key, $default = null) + { + $config = $this->config; + + if (is_null($key)) { + return $config; + } + if (isset($config[$key])) { + return $config[$key]; + } + foreach (explode('.', $key) as $segment) { + if (!is_array($config) || !array_key_exists($segment, $config)) { + return $default; + } + $config = $config[$segment]; + } + + return $config; + } + + /** + * Set an array item to a given value using "dot" notation. + * + * @param string $key + * @param mixed $value + * + * @return array + */ + public function set($key, $value) + { + if (is_null($key)) { + throw new InvalidArgumentException('Invalid config key.'); + } + + $keys = explode('.', $key); + $config = &$this->config; + + while (count($keys) > 1) { + $key = array_shift($keys); + if (!isset($config[$key]) || !is_array($config[$key])) { + $config[$key] = []; + } + $config = &$config[$key]; + } + + $config[array_shift($keys)] = $value; + + return $config; + } + + /** + * Determine if the given configuration value exists. + * + * @param string $key + * + * @return bool + */ + public function has($key) + { + return (bool) $this->get($key); + } + + /** + * Whether a offset exists. + * + * @see http://php.net/manual/en/arrayaccess.offsetexists.php + * + * @param mixed $offset

                            + * An offset to check for. + *

                            + * + * @return bool true on success or false on failure. + *

                            + *

                            + * The return value will be casted to boolean if non-boolean was returned + * + * @since 5.0.0 + */ + public function offsetExists($offset) + { + return array_key_exists($offset, $this->config); + } + + /** + * Offset to retrieve. + * + * @see http://php.net/manual/en/arrayaccess.offsetget.php + * + * @param mixed $offset

                            + * The offset to retrieve. + *

                            + * + * @return mixed Can return all value types + * + * @since 5.0.0 + */ + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * Offset to set. + * + * @see http://php.net/manual/en/arrayaccess.offsetset.php + * + * @param mixed $offset

                            + * The offset to assign the value to. + *

                            + * @param mixed $value

                            + * The value to set. + *

                            + * + * @since 5.0.0 + */ + public function offsetSet($offset, $value) + { + $this->set($offset, $value); + } + + /** + * Offset to unset. + * + * @see http://php.net/manual/en/arrayaccess.offsetunset.php + * + * @param mixed $offset

                            + * The offset to unset. + *

                            + * + * @since 5.0.0 + */ + public function offsetUnset($offset) + { + $this->set($offset, null); + } +} diff --git a/vendor/overtrue/socialite/src/FactoryInterface.php b/vendor/overtrue/socialite/src/FactoryInterface.php new file mode 100755 index 0000000..7a4959c --- /dev/null +++ b/vendor/overtrue/socialite/src/FactoryInterface.php @@ -0,0 +1,27 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +/** + * Interface FactoryInterface. + */ +interface FactoryInterface +{ + /** + * Get an OAuth provider implementation. + * + * @param string $driver + * + * @return \Overtrue\Socialite\ProviderInterface + */ + public function driver($driver); +} diff --git a/vendor/overtrue/socialite/src/HasAttributes.php b/vendor/overtrue/socialite/src/HasAttributes.php new file mode 100755 index 0000000..eeff890 --- /dev/null +++ b/vendor/overtrue/socialite/src/HasAttributes.php @@ -0,0 +1,135 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +/** + * Trait HasAttributes. + */ +trait HasAttributes +{ + /** + * @var array + */ + protected $attributes = []; + + /** + * Return the attributes. + * + * @return array + */ + public function getAttributes() + { + return $this->attributes; + } + + /** + * Return the extra attribute. + * + * @param string $name + * @param string $default + * + * @return mixed + */ + public function getAttribute($name, $default = null) + { + return isset($this->attributes[$name]) ? $this->attributes[$name] : $default; + } + + /** + * Set extra attributes. + * + * @param string $name + * @param mixed $value + * + * @return $this + */ + public function setAttribute($name, $value) + { + $this->attributes[$name] = $value; + + return $this; + } + + /** + * Map the given array onto the user's properties. + * + * @param array $attributes + * + * @return $this + */ + public function merge(array $attributes) + { + $this->attributes = array_merge($this->attributes, $attributes); + + return $this; + } + + /** + * {@inheritdoc} + */ + public function offsetExists($offset) + { + return array_key_exists($offset, $this->attributes); + } + + /** + * {@inheritdoc} + */ + public function offsetGet($offset) + { + return $this->getAttribute($offset); + } + + /** + * {@inheritdoc} + */ + public function offsetSet($offset, $value) + { + $this->setAttribute($offset, $value); + } + + /** + * {@inheritdoc} + */ + public function offsetUnset($offset) + { + unset($this->attributes[$offset]); + } + + /** + * {@inheritdoc} + */ + public function __get($property) + { + return $this->getAttribute($property); + } + + /** + * Return array. + * + * @return array + */ + public function toArray() + { + return $this->getAttributes(); + } + + /** + * Return JSON. + * + * @return string + */ + public function toJSON() + { + return json_encode($this->getAttributes(), JSON_UNESCAPED_UNICODE); + } +} diff --git a/vendor/overtrue/socialite/src/InvalidArgumentException.php b/vendor/overtrue/socialite/src/InvalidArgumentException.php new file mode 100755 index 0000000..c044e64 --- /dev/null +++ b/vendor/overtrue/socialite/src/InvalidArgumentException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +class InvalidArgumentException extends \InvalidArgumentException +{ +} diff --git a/vendor/overtrue/socialite/src/InvalidStateException.php b/vendor/overtrue/socialite/src/InvalidStateException.php new file mode 100755 index 0000000..96ac503 --- /dev/null +++ b/vendor/overtrue/socialite/src/InvalidStateException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +class InvalidStateException extends \InvalidArgumentException +{ +} diff --git a/vendor/overtrue/socialite/src/ProviderInterface.php b/vendor/overtrue/socialite/src/ProviderInterface.php new file mode 100755 index 0000000..e78d172 --- /dev/null +++ b/vendor/overtrue/socialite/src/ProviderInterface.php @@ -0,0 +1,31 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +interface ProviderInterface +{ + /** + * Redirect the user to the authentication page for the provider. + * + * @return \Symfony\Component\HttpFoundation\RedirectResponse + */ + public function redirect(); + + /** + * Get the User instance for the authenticated user. + * + * @param \Overtrue\Socialite\AccessTokenInterface $token + * + * @return \Overtrue\Socialite\User + */ + public function user(AccessTokenInterface $token = null); +} diff --git a/vendor/overtrue/socialite/src/Providers/AbstractProvider.php b/vendor/overtrue/socialite/src/Providers/AbstractProvider.php new file mode 100755 index 0000000..6b7b886 --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/AbstractProvider.php @@ -0,0 +1,560 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use Overtrue\Socialite\AccessToken; +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\AuthorizeFailedException; +use Overtrue\Socialite\InvalidStateException; +use Overtrue\Socialite\ProviderInterface; +use Symfony\Component\HttpFoundation\RedirectResponse; +use Symfony\Component\HttpFoundation\Request; + +/** + * Class AbstractProvider. + */ +abstract class AbstractProvider implements ProviderInterface +{ + /** + * Provider name. + * + * @var string + */ + protected $name; + + /** + * The HTTP request instance. + * + * @var \Symfony\Component\HttpFoundation\Request + */ + protected $request; + + /** + * The client ID. + * + * @var string + */ + protected $clientId; + + /** + * The client secret. + * + * @var string + */ + protected $clientSecret; + + /** + * @var \Overtrue\Socialite\AccessTokenInterface + */ + protected $accessToken; + + /** + * The redirect URL. + * + * @var string + */ + protected $redirectUrl; + + /** + * The custom parameters to be sent with the request. + * + * @var array + */ + protected $parameters = []; + + /** + * The scopes being requested. + * + * @var array + */ + protected $scopes = []; + + /** + * The separating character for the requested scopes. + * + * @var string + */ + protected $scopeSeparator = ','; + + /** + * The type of the encoding in the query. + * + * @var int Can be either PHP_QUERY_RFC3986 or PHP_QUERY_RFC1738 + */ + protected $encodingType = PHP_QUERY_RFC1738; + + /** + * Indicates if the session state should be utilized. + * + * @var bool + */ + protected $stateless = false; + + /** + * The options for guzzle\client. + * + * @var array + */ + protected static $guzzleOptions = ['http_errors' => false]; + + /** + * Create a new provider instance. + * + * @param \Symfony\Component\HttpFoundation\Request $request + * @param string $clientId + * @param string $clientSecret + * @param string|null $redirectUrl + */ + public function __construct(Request $request, $clientId, $clientSecret, $redirectUrl = null) + { + $this->request = $request; + $this->clientId = $clientId; + $this->clientSecret = $clientSecret; + $this->redirectUrl = $redirectUrl; + } + + /** + * Get the authentication URL for the provider. + * + * @param string $state + * + * @return string + */ + abstract protected function getAuthUrl($state); + + /** + * Get the token URL for the provider. + * + * @return string + */ + abstract protected function getTokenUrl(); + + /** + * Get the raw user for the given access token. + * + * @param \Overtrue\Socialite\AccessTokenInterface $token + * + * @return array + */ + abstract protected function getUserByToken(AccessTokenInterface $token); + + /** + * Map the raw user array to a Socialite User instance. + * + * @param array $user + * + * @return \Overtrue\Socialite\User + */ + abstract protected function mapUserToObject(array $user); + + /** + * Redirect the user of the application to the provider's authentication screen. + * + * @param string $redirectUrl + * + * @return \Symfony\Component\HttpFoundation\RedirectResponse + */ + public function redirect($redirectUrl = null) + { + $state = null; + + if (!is_null($redirectUrl)) { + $this->redirectUrl = $redirectUrl; + } + + if ($this->usesState()) { + $state = $this->makeState(); + } + + return new RedirectResponse($this->getAuthUrl($state)); + } + + /** + * {@inheritdoc} + */ + public function user(AccessTokenInterface $token = null) + { + if (is_null($token) && $this->hasInvalidState()) { + throw new InvalidStateException(); + } + + $token = $token ?: $this->getAccessToken($this->getCode()); + + $user = $this->getUserByToken($token); + + $user = $this->mapUserToObject($user)->merge(['original' => $user]); + + return $user->setToken($token)->setProviderName($this->getName()); + } + + /** + * Set redirect url. + * + * @param string $redirectUrl + * + * @return $this + */ + public function setRedirectUrl($redirectUrl) + { + $this->redirectUrl = $redirectUrl; + + return $this; + } + + /** + * Set redirect url. + * + * @param string $redirectUrl + * + * @return $this + */ + public function withRedirectUrl($redirectUrl) + { + $this->redirectUrl = $redirectUrl; + + return $this; + } + + /** + * Return the redirect url. + * + * @return string + */ + public function getRedirectUrl() + { + return $this->redirectUrl; + } + + /** + * @param \Overtrue\Socialite\AccessTokenInterface $accessToken + * + * @return $this + */ + public function setAccessToken(AccessTokenInterface $accessToken) + { + $this->accessToken = $accessToken; + + return $this; + } + + /** + * Get the access token for the given code. + * + * @param string $code + * + * @return \Overtrue\Socialite\AccessTokenInterface + */ + public function getAccessToken($code) + { + if ($this->accessToken) { + return $this->accessToken; + } + + $postKey = (1 === version_compare(ClientInterface::VERSION, '6')) ? 'form_params' : 'body'; + + $response = $this->getHttpClient()->post($this->getTokenUrl(), [ + 'headers' => ['Accept' => 'application/json'], + $postKey => $this->getTokenFields($code), + ]); + + return $this->parseAccessToken($response->getBody()); + } + + /** + * Set the scopes of the requested access. + * + * @param array $scopes + * + * @return $this + */ + public function scopes(array $scopes) + { + $this->scopes = $scopes; + + return $this; + } + + /** + * Set the request instance. + * + * @param Request $request + * + * @return $this + */ + public function setRequest(Request $request) + { + $this->request = $request; + + return $this; + } + + /** + * Get the request instance. + * + * @return \Symfony\Component\HttpFoundation\Request + */ + public function getRequest() + { + return $this->request; + } + + /** + * Indicates that the provider should operate as stateless. + * + * @return $this + */ + public function stateless() + { + $this->stateless = true; + + return $this; + } + + /** + * Set the custom parameters of the request. + * + * @param array $parameters + * + * @return $this + */ + public function with(array $parameters) + { + $this->parameters = $parameters; + + return $this; + } + + /** + * @throws \ReflectionException + * + * @return string + */ + public function getName() + { + if (empty($this->name)) { + $this->name = strstr((new \ReflectionClass(get_class($this)))->getShortName(), 'Provider', true); + } + + return $this->name; + } + + /** + * Get the authentication URL for the provider. + * + * @param string $url + * @param string $state + * + * @return string + */ + protected function buildAuthUrlFromBase($url, $state) + { + return $url.'?'.http_build_query($this->getCodeFields($state), '', '&', $this->encodingType); + } + + /** + * Get the GET parameters for the code request. + * + * @param string|null $state + * + * @return array + */ + protected function getCodeFields($state = null) + { + $fields = array_merge([ + 'client_id' => $this->clientId, + 'redirect_uri' => $this->redirectUrl, + 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), + 'response_type' => 'code', + ], $this->parameters); + + if ($this->usesState()) { + $fields['state'] = $state; + } + + return $fields; + } + + /** + * Format the given scopes. + * + * @param array $scopes + * @param string $scopeSeparator + * + * @return string + */ + protected function formatScopes(array $scopes, $scopeSeparator) + { + return implode($scopeSeparator, $scopes); + } + + /** + * Determine if the current request / session has a mismatching "state". + * + * @return bool + */ + protected function hasInvalidState() + { + if ($this->isStateless()) { + return false; + } + + $state = $this->request->getSession()->get('state'); + + return !(strlen($state) > 0 && $this->request->get('state') === $state); + } + + /** + * Get the POST fields for the token request. + * + * @param string $code + * + * @return array + */ + protected function getTokenFields($code) + { + return [ + 'client_id' => $this->clientId, + 'client_secret' => $this->clientSecret, + 'code' => $code, + 'redirect_uri' => $this->redirectUrl, + ]; + } + + /** + * Get the access token from the token response body. + * + * @param \Psr\Http\Message\StreamInterface|array $body + * + * @return \Overtrue\Socialite\AccessTokenInterface + */ + protected function parseAccessToken($body) + { + if (!is_array($body)) { + $body = json_decode($body, true); + } + + if (empty($body['access_token'])) { + throw new AuthorizeFailedException('Authorize Failed: '.json_encode($body, JSON_UNESCAPED_UNICODE), $body); + } + + return new AccessToken($body); + } + + /** + * Get the code from the request. + * + * @return string + */ + protected function getCode() + { + return $this->request->get('code'); + } + + /** + * Get a fresh instance of the Guzzle HTTP client. + * + * @return \GuzzleHttp\Client + */ + protected function getHttpClient() + { + return new Client(self::$guzzleOptions); + } + + /** + * Set options for Guzzle HTTP client. + * + * @param array $config + * + * @return array + */ + public static function setGuzzleOptions($config = []) + { + return self::$guzzleOptions = $config; + } + + /** + * Determine if the provider is operating with state. + * + * @return bool + */ + protected function usesState() + { + return !$this->stateless; + } + + /** + * Determine if the provider is operating as stateless. + * + * @return bool + */ + protected function isStateless() + { + return !$this->request->hasSession() || $this->stateless; + } + + /** + * Return array item by key. + * + * @param array $array + * @param string $key + * @param mixed $default + * + * @return mixed + */ + protected function arrayItem(array $array, $key, $default = null) + { + if (is_null($key)) { + return $array; + } + + if (isset($array[$key])) { + return $array[$key]; + } + + foreach (explode('.', $key) as $segment) { + if (!is_array($array) || !array_key_exists($segment, $array)) { + return $default; + } + + $array = $array[$segment]; + } + + return $array; + } + + /** + * Put state to session storage and return it. + * + * @return string|bool + */ + protected function makeState() + { + if (!$this->request->hasSession()) { + return false; + } + + $state = sha1(uniqid(mt_rand(1, 1000000), true)); + $session = $this->request->getSession(); + + if (is_callable([$session, 'put'])) { + $session->put('state', $state); + } elseif (is_callable([$session, 'set'])) { + $session->set('state', $state); + } else { + return false; + } + + return $state; + } +} diff --git a/vendor/overtrue/socialite/src/Providers/DouYinProvider.php b/vendor/overtrue/socialite/src/Providers/DouYinProvider.php new file mode 100755 index 0000000..6e0b108 --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/DouYinProvider.php @@ -0,0 +1,168 @@ +buildAuthUrlFromBase($this->baseUrl.'/platform/oauth/connect', $state); + } + + /** + * 获取授权码接口参数. + * + * @param string|null $state + * + * @return array + */ + public function getCodeFields($state = null) + { + $fields = [ + 'client_key' => $this->clientId, + 'redirect_uri' => $this->redirectUrl, + 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), + 'response_type' => 'code', + ]; + + if ($this->usesState()) { + $fields['state'] = $state; + } + + return $fields; + } + + /** + * 获取access_token地址. + * + * {@inheritdoc} + */ + protected function getTokenUrl() + { + return $this->baseUrl.'/oauth/access_token'; + } + + /** + * 通过code获取access_token. + * + * @param string $code + * + * @return \Overtrue\Socialite\AccessToken + */ + public function getAccessToken($code) + { + $response = $this->getHttpClient()->get($this->getTokenUrl(), [ + 'query' => $this->getTokenFields($code), + ]); + + return $this->parseAccessToken($response->getBody()->getContents()); + } + + /** + * 获取access_token接口参数. + * + * @param string $code + * + * @return array + */ + protected function getTokenFields($code) + { + return [ + 'client_key' => $this->clientId, + 'client_secret' => $this->clientSecret, + 'code' => $code, + 'grant_type' => 'authorization_code', + ]; + } + + /** + * 格式化token. + * + * @param \Psr\Http\Message\StreamInterface|array $body + * + * @return \Overtrue\Socialite\AccessTokenInterface + */ + protected function parseAccessToken($body) + { + if (!is_array($body)) { + $body = json_decode($body, true); + } + + if (empty($body['data']['access_token'])) { + throw new AuthorizeFailedException('Authorize Failed: '.json_encode($body, JSON_UNESCAPED_UNICODE), $body); + } + + return new AccessToken($body['data']); + } + + /** + * 通过token 获取用户信息. + * + * @param AccessTokenInterface $token + * + * @return array|mixed + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $userUrl = $this->baseUrl.'/oauth/userinfo/'; + + $response = $this->getHttpClient()->get( + $userUrl, [ + 'query' => [ + 'access_token' => $token->getToken(), + 'open_id' => $token['open_id'], + ], + ] + ); + + return json_decode($response->getBody(), true); + } + + /** + * 格式化用户信息. + * + * @param array $user + * + * @return User + */ + protected function mapUserToObject(array $user) + { + return new User([ + 'id' => $this->arrayItem($user, 'open_id'), + 'username' => $this->arrayItem($user, 'nickname'), + 'nickname' => $this->arrayItem($user, 'nickname'), + 'avatar' => $this->arrayItem($user, 'avatar'), + ]); + } +} diff --git a/vendor/overtrue/socialite/src/Providers/DoubanProvider.php b/vendor/overtrue/socialite/src/Providers/DoubanProvider.php new file mode 100755 index 0000000..f3b5c93 --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/DoubanProvider.php @@ -0,0 +1,88 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class DoubanProvider. + * + * @see http://developers.douban.com/wiki/?title=oauth2 [使用 OAuth 2.0 访问豆瓣 API] + */ +class DoubanProvider extends AbstractProvider implements ProviderInterface +{ + /** + * {@inheritdoc}. + */ + protected function getAuthUrl($state) + { + return $this->buildAuthUrlFromBase('https://www.douban.com/service/auth2/auth', $state); + } + + /** + * {@inheritdoc}. + */ + protected function getTokenUrl() + { + return 'https://www.douban.com/service/auth2/token'; + } + + /** + * {@inheritdoc}. + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $response = $this->getHttpClient()->get('https://api.douban.com/v2/user/~me', [ + 'headers' => [ + 'Authorization' => 'Bearer '.$token->getToken(), + ], + ]); + + return json_decode($response->getBody()->getContents(), true); + } + + /** + * {@inheritdoc}. + */ + protected function mapUserToObject(array $user) + { + return new User([ + 'id' => $this->arrayItem($user, 'id'), + 'nickname' => $this->arrayItem($user, 'name'), + 'name' => $this->arrayItem($user, 'name'), + 'avatar' => $this->arrayItem($user, 'large_avatar'), + 'email' => null, + ]); + } + + /** + * {@inheritdoc}. + */ + protected function getTokenFields($code) + { + return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; + } + + /** + * {@inheritdoc}. + */ + public function getAccessToken($code) + { + $response = $this->getHttpClient()->post($this->getTokenUrl(), [ + 'form_params' => $this->getTokenFields($code), + ]); + + return $this->parseAccessToken($response->getBody()->getContents()); + } +} diff --git a/vendor/overtrue/socialite/src/Providers/FacebookProvider.php b/vendor/overtrue/socialite/src/Providers/FacebookProvider.php new file mode 100755 index 0000000..70f7b2e --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/FacebookProvider.php @@ -0,0 +1,167 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class FacebookProvider. + * + * @see https://developers.facebook.com/docs/graph-api [Facebook - Graph API] + */ +class FacebookProvider extends AbstractProvider implements ProviderInterface +{ + /** + * The base Facebook Graph URL. + * + * @var string + */ + protected $graphUrl = 'https://graph.facebook.com'; + + /** + * The Graph API version for the request. + * + * @var string + */ + protected $version = 'v3.3'; + + /** + * The user fields being requested. + * + * @var array + */ + protected $fields = ['first_name', 'last_name', 'email', 'gender', 'verified']; + + /** + * The scopes being requested. + * + * @var array + */ + protected $scopes = ['email']; + + /** + * Display the dialog in a popup view. + * + * @var bool + */ + protected $popup = false; + + /** + * {@inheritdoc} + */ + protected function getAuthUrl($state) + { + return $this->buildAuthUrlFromBase('https://www.facebook.com/'.$this->version.'/dialog/oauth', $state); + } + + /** + * {@inheritdoc} + */ + protected function getTokenUrl() + { + return $this->graphUrl.'/oauth/access_token'; + } + + /** + * Get the access token for the given code. + * + * @param string $code + * + * @return \Overtrue\Socialite\AccessToken + */ + public function getAccessToken($code) + { + $response = $this->getHttpClient()->get($this->getTokenUrl(), [ + 'query' => $this->getTokenFields($code), + ]); + + return $this->parseAccessToken($response->getBody()); + } + + /** + * {@inheritdoc} + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $appSecretProof = hash_hmac('sha256', $token->getToken(), $this->clientSecret); + + $response = $this->getHttpClient()->get($this->graphUrl.'/'.$this->version.'/me?access_token='.$token.'&appsecret_proof='.$appSecretProof.'&fields='.implode(',', $this->fields), [ + 'headers' => [ + 'Accept' => 'application/json', + ], + ]); + + return json_decode($response->getBody(), true); + } + + /** + * {@inheritdoc} + */ + protected function mapUserToObject(array $user) + { + $avatarUrl = $this->graphUrl.'/'.$this->version.'/'.$user['id'].'/picture'; + + $firstName = $this->arrayItem($user, 'first_name'); + $lastName = $this->arrayItem($user, 'last_name'); + + return new User([ + 'id' => $this->arrayItem($user, 'id'), + 'nickname' => null, + 'name' => $firstName.' '.$lastName, + 'email' => $this->arrayItem($user, 'email'), + 'avatar' => $avatarUrl.'?type=normal', + 'avatar_original' => $avatarUrl.'?width=1920', + ]); + } + + /** + * {@inheritdoc} + */ + protected function getCodeFields($state = null) + { + $fields = parent::getCodeFields($state); + + if ($this->popup) { + $fields['display'] = 'popup'; + } + + return $fields; + } + + /** + * Set the user fields to request from Facebook. + * + * @param array $fields + * + * @return $this + */ + public function fields(array $fields) + { + $this->fields = $fields; + + return $this; + } + + /** + * Set the dialog to be displayed as a popup. + * + * @return $this + */ + public function asPopup() + { + $this->popup = true; + + return $this; + } +} diff --git a/vendor/overtrue/socialite/src/Providers/GitHubProvider.php b/vendor/overtrue/socialite/src/Providers/GitHubProvider.php new file mode 100755 index 0000000..410c80f --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/GitHubProvider.php @@ -0,0 +1,121 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Exception; +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class GitHubProvider. + */ +class GitHubProvider extends AbstractProvider implements ProviderInterface +{ + /** + * The scopes being requested. + * + * @var array + */ + protected $scopes = ['user:email']; + + /** + * {@inheritdoc} + */ + protected function getAuthUrl($state) + { + return $this->buildAuthUrlFromBase('https://github.com/login/oauth/authorize', $state); + } + + /** + * {@inheritdoc} + */ + protected function getTokenUrl() + { + return 'https://github.com/login/oauth/access_token'; + } + + /** + * {@inheritdoc} + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $userUrl = 'https://api.github.com/user?access_token='.$token->getToken(); + + $response = $this->getHttpClient()->get( + $userUrl, $this->getRequestOptions() + ); + + $user = json_decode($response->getBody(), true); + + if (in_array('user:email', $this->scopes)) { + $user['email'] = $this->getEmailByToken($token); + } + + return $user; + } + + /** + * Get the email for the given access token. + * + * @param string $token + * + * @return string|null + */ + protected function getEmailByToken($token) + { + $emailsUrl = 'https://api.github.com/user/emails?access_token='.$token->getToken(); + + try { + $response = $this->getHttpClient()->get( + $emailsUrl, $this->getRequestOptions() + ); + } catch (Exception $e) { + return; + } + + foreach (json_decode($response->getBody(), true) as $email) { + if ($email['primary'] && $email['verified']) { + return $email['email']; + } + } + } + + /** + * {@inheritdoc} + */ + protected function mapUserToObject(array $user) + { + return new User([ + 'id' => $this->arrayItem($user, 'id'), + 'username' => $this->arrayItem($user, 'login'), + 'nickname' => $this->arrayItem($user, 'login'), + 'name' => $this->arrayItem($user, 'name'), + 'email' => $this->arrayItem($user, 'email'), + 'avatar' => $this->arrayItem($user, 'avatar_url'), + ]); + } + + /** + * Get the default options for an HTTP request. + * + * @return array + */ + protected function getRequestOptions() + { + return [ + 'headers' => [ + 'Accept' => 'application/vnd.github.v3+json', + ], + ]; + } +} diff --git a/vendor/overtrue/socialite/src/Providers/GoogleProvider.php b/vendor/overtrue/socialite/src/Providers/GoogleProvider.php new file mode 100755 index 0000000..e74d830 --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/GoogleProvider.php @@ -0,0 +1,118 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use GuzzleHttp\ClientInterface; +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class GoogleProvider. + * + * @see https://developers.google.com/identity/protocols/OpenIDConnect [OpenID Connect] + */ +class GoogleProvider extends AbstractProvider implements ProviderInterface +{ + /** + * The separating character for the requested scopes. + * + * @var string + */ + protected $scopeSeparator = ' '; + + /** + * The scopes being requested. + * + * @var array + */ + protected $scopes = [ + 'https://www.googleapis.com/auth/userinfo.email', + 'https://www.googleapis.com/auth/userinfo.profile', + ]; + + /** + * {@inheritdoc} + */ + protected function getAuthUrl($state) + { + return $this->buildAuthUrlFromBase('https://accounts.google.com/o/oauth2/v2/auth', $state); + } + + /** + * {@inheritdoc} + */ + protected function getTokenUrl() + { + return 'https://www.googleapis.com/oauth2/v4/token'; + } + + /** + * Get the access token for the given code. + * + * @param string $code + * + * @return string + */ + public function getAccessToken($code) + { + $postKey = (1 === version_compare(ClientInterface::VERSION, '6')) ? 'form_params' : 'body'; + + $response = $this->getHttpClient()->post($this->getTokenUrl(), [ + $postKey => $this->getTokenFields($code), + ]); + + return $this->parseAccessToken($response->getBody()); + } + + /** + * Get the POST fields for the token request. + * + * @param string $code + * + * @return array + */ + protected function getTokenFields($code) + { + return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; + } + + /** + * {@inheritdoc} + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $response = $this->getHttpClient()->get('https://www.googleapis.com/userinfo/v2/me', [ + 'headers' => [ + 'Accept' => 'application/json', + 'Authorization' => 'Bearer '.$token->getToken(), + ], + ]); + + return json_decode($response->getBody(), true); + } + + /** + * {@inheritdoc} + */ + protected function mapUserToObject(array $user) + { + return new User([ + 'id' => $this->arrayItem($user, 'id'), + 'username' => $this->arrayItem($user, 'email'), + 'nickname' => $this->arrayItem($user, 'name'), + 'name' => $this->arrayItem($user, 'name'), + 'email' => $this->arrayItem($user, 'email'), + 'avatar' => $this->arrayItem($user, 'picture'), + ]); + } +} diff --git a/vendor/overtrue/socialite/src/Providers/LinkedinProvider.php b/vendor/overtrue/socialite/src/Providers/LinkedinProvider.php new file mode 100755 index 0000000..019167a --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/LinkedinProvider.php @@ -0,0 +1,181 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class LinkedinProvider. + * + * @see https://developer.linkedin.com/docs/oauth2 [Authenticating with OAuth 2.0] + */ +class LinkedinProvider extends AbstractProvider implements ProviderInterface +{ + /** + * The scopes being requested. + * + * @var array + */ + protected $scopes = ['r_liteprofile', 'r_emailaddress']; + + /** + * {@inheritdoc} + */ + protected function getAuthUrl($state) + { + return $this->buildAuthUrlFromBase('https://www.linkedin.com/oauth/v2/authorization', $state); + } + + /** + * Get the access token for the given code. + * + * @param string $code + * + * @return \Overtrue\Socialite\AccessToken + */ + public function getAccessToken($code) + { + $response = $this->getHttpClient() + ->post($this->getTokenUrl(), ['form_params' => $this->getTokenFields($code)]); + + return $this->parseAccessToken($response->getBody()); + } + + /** + * {@inheritdoc} + */ + protected function getTokenUrl() + { + return 'https://www.linkedin.com/oauth/v2/accessToken'; + } + + /** + * Get the POST fields for the token request. + * + * @param string $code + * + * @return array + */ + protected function getTokenFields($code) + { + return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; + } + + /** + * {@inheritdoc} + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $basicProfile = $this->getBasicProfile($token); + $emailAddress = $this->getEmailAddress($token); + + return array_merge($basicProfile, $emailAddress); + } + + /** + * Get the basic profile fields for the user. + * + * @param string $token + * + * @return array + */ + protected function getBasicProfile($token) + { + $url = 'https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))'; + + $response = $this->getHttpClient()->get($url, [ + 'headers' => [ + 'Authorization' => 'Bearer '.$token, + 'X-RestLi-Protocol-Version' => '2.0.0', + ], + ]); + + return (array) json_decode($response->getBody(), true); + } + + /** + * Get the email address for the user. + * + * @param string $token + * + * @return array + */ + protected function getEmailAddress($token) + { + $url = 'https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))'; + + $response = $this->getHttpClient()->get($url, [ + 'headers' => [ + 'Authorization' => 'Bearer '.$token, + 'X-RestLi-Protocol-Version' => '2.0.0', + ], + ]); + + return (array) $this->arrayItem(json_decode($response->getBody(), true), 'elements.0.handle~'); + } + + /** + * {@inheritdoc} + */ + protected function mapUserToObject(array $user) + { + $preferredLocale = $this->arrayItem($user, 'firstName.preferredLocale.language').'_'.$this->arrayItem($user, 'firstName.preferredLocale.country'); + $firstName = $this->arrayItem($user, 'firstName.localized.'.$preferredLocale); + $lastName = $this->arrayItem($user, 'lastName.localized.'.$preferredLocale); + $name = $firstName.' '.$lastName; + + $images = (array) $this->arrayItem($user, 'profilePicture.displayImage~.elements', []); + $avatars = array_filter($images, function ($image) { + return $image['data']['com.linkedin.digitalmedia.mediaartifact.StillImage']['storageSize']['width'] === 100; + }); + $avatar = array_shift($avatars); + $originalAvatars = array_filter($images, function ($image) { + return $image['data']['com.linkedin.digitalmedia.mediaartifact.StillImage']['storageSize']['width'] === 800; + }); + $originalAvatar = array_shift($originalAvatars); + + return new User([ + 'id' => $this->arrayItem($user, 'id'), + 'nickname' => $name, + 'name' => $name, + 'email' => $this->arrayItem($user, 'emailAddress'), + 'avatar' => $avatar ? $this->arrayItem($avatar, 'identifiers.0.identifier') : null, + 'avatar_original' => $originalAvatar ? $this->arrayItem($originalAvatar, 'identifiers.0.identifier') : null, + ]); + } + + /** + * Set the user fields to request from LinkedIn. + * + * @param array $fields + * + * @return $this + */ + public function fields(array $fields) + { + $this->fields = $fields; + + return $this; + } + + /** + * Determine if the provider is operating as stateless. + * + * @return bool + */ + protected function isStateless() + { + return true; + } +} diff --git a/vendor/overtrue/socialite/src/Providers/OutlookProvider.php b/vendor/overtrue/socialite/src/Providers/OutlookProvider.php new file mode 100755 index 0000000..3a0fb56 --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/OutlookProvider.php @@ -0,0 +1,88 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class OutlookProvider. + */ +class OutlookProvider extends AbstractProvider implements ProviderInterface +{ + /** + * {@inheritdoc} + */ + protected $scopes = ['User.Read']; + + /** + * {@inheritdoc} + */ + protected $scopeSeparator = ' '; + + /** + * {@inheritdoc} + */ + protected function getAuthUrl($state) + { + return $this->buildAuthUrlFromBase('https://login.microsoftonline.com/common/oauth2/v2.0/authorize', $state); + } + + /** + * {@inheritdoc} + */ + protected function getTokenUrl() + { + return 'https://login.microsoftonline.com/common/oauth2/v2.0/token'; + } + + /** + * {@inheritdoc} + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $response = $this->getHttpClient()->get( + 'https://graph.microsoft.com/v1.0/me', + ['headers' => [ + 'Accept' => 'application/json', + 'Authorization' => 'Bearer '.$token->getToken(), + ], + ]); + + return json_decode($response->getBody()->getContents(), true); + } + + /** + * {@inheritdoc} + */ + protected function mapUserToObject(array $user) + { + return new User([ + 'id' => $this->arrayItem($user, 'id'), + 'nickname' => null, + 'name' => $this->arrayItem($user, 'displayName'), + 'email' => $this->arrayItem($user, 'userPrincipalName'), + 'avatar' => null, + ]); + } + + /** + * {@inheritdoc} + */ + protected function getTokenFields($code) + { + return array_merge(parent::getTokenFields($code), [ + 'grant_type' => 'authorization_code', + ]); + } +} diff --git a/vendor/overtrue/socialite/src/Providers/QQProvider.php b/vendor/overtrue/socialite/src/Providers/QQProvider.php new file mode 100755 index 0000000..921bc20 --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/QQProvider.php @@ -0,0 +1,206 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class QQProvider. + * + * @see http://wiki.connect.qq.com/oauth2-0%E7%AE%80%E4%BB%8B [QQ - OAuth 2.0 登录QQ] + */ +class QQProvider extends AbstractProvider implements ProviderInterface +{ + /** + * The base url of QQ API. + * + * @var string + */ + protected $baseUrl = 'https://graph.qq.com'; + + /** + * User openid. + * + * @var string + */ + protected $openId; + + /** + * get token(openid) with unionid. + * + * @var bool + */ + protected $withUnionId = false; + + /** + * User unionid. + * + * @var string + */ + protected $unionId; + + /** + * The scopes being requested. + * + * @var array + */ + protected $scopes = ['get_user_info']; + + /** + * The uid of user authorized. + * + * @var int + */ + protected $uid; + + /** + * Get the authentication URL for the provider. + * + * @param string $state + * + * @return string + */ + protected function getAuthUrl($state) + { + return $this->buildAuthUrlFromBase($this->baseUrl.'/oauth2.0/authorize', $state); + } + + /** + * Get the token URL for the provider. + * + * @return string + */ + protected function getTokenUrl() + { + return $this->baseUrl.'/oauth2.0/token'; + } + + /** + * Get the Post fields for the token request. + * + * @param string $code + * + * @return array + */ + protected function getTokenFields($code) + { + return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; + } + + /** + * Get the access token for the given code. + * + * @param string $code + * + * @return \Overtrue\Socialite\AccessToken + */ + public function getAccessToken($code) + { + $response = $this->getHttpClient()->get($this->getTokenUrl(), [ + 'query' => $this->getTokenFields($code), + ]); + + return $this->parseAccessToken($response->getBody()->getContents()); + } + + /** + * Get the access token from the token response body. + * + * @param string $body + * + * @return \Overtrue\Socialite\AccessToken + */ + public function parseAccessToken($body) + { + parse_str($body, $token); + + return parent::parseAccessToken($token); + } + + /** + * @return self + */ + public function withUnionId() + { + $this->withUnionId = true; + + return $this; + } + + /** + * Get the raw user for the given access token. + * + * @param \Overtrue\Socialite\AccessTokenInterface $token + * + * @return array + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $url = $this->baseUrl.'/oauth2.0/me?access_token='.$token->getToken(); + $this->withUnionId && $url .= '&unionid=1'; + + $response = $this->getHttpClient()->get($url); + + $me = json_decode($this->removeCallback($response->getBody()->getContents()), true); + $this->openId = $me['openid']; + $this->unionId = isset($me['unionid']) ? $me['unionid'] : ''; + + $queries = [ + 'access_token' => $token->getToken(), + 'openid' => $this->openId, + 'oauth_consumer_key' => $this->clientId, + ]; + + $response = $this->getHttpClient()->get($this->baseUrl.'/user/get_user_info?'.http_build_query($queries)); + + return json_decode($this->removeCallback($response->getBody()->getContents()), true); + } + + /** + * Map the raw user array to a Socialite User instance. + * + * @param array $user + * + * @return \Overtrue\Socialite\User + */ + protected function mapUserToObject(array $user) + { + return new User([ + 'id' => $this->openId, + 'unionid' => $this->unionId, + 'nickname' => $this->arrayItem($user, 'nickname'), + 'name' => $this->arrayItem($user, 'nickname'), + 'email' => $this->arrayItem($user, 'email'), + 'avatar' => $this->arrayItem($user, 'figureurl_qq_2'), + ]); + } + + /** + * Remove the fucking callback parentheses. + * + * @param string $response + * + * @return string + */ + protected function removeCallback($response) + { + if (false !== strpos($response, 'callback')) { + $lpos = strpos($response, '('); + $rpos = strrpos($response, ')'); + $response = substr($response, $lpos + 1, $rpos - $lpos - 1); + } + + return $response; + } +} diff --git a/vendor/overtrue/socialite/src/Providers/TaobaoProvider.php b/vendor/overtrue/socialite/src/Providers/TaobaoProvider.php new file mode 100755 index 0000000..f7da073 --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/TaobaoProvider.php @@ -0,0 +1,242 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class TaobaoProvider. + * + * @author mechono + * + * @see https://open.taobao.com/doc.htm?docId=102635&docType=1&source=search [Taobao - OAuth 2.0 授权登录] + */ +class TaobaoProvider extends AbstractProvider implements ProviderInterface +{ + /** + * The base url of Taobao API. + * + * @var string + */ + protected $baseUrl = 'https://oauth.taobao.com'; + + /** + * Taobao API service URL address. + * + * @var string + */ + protected $gatewayUrl = 'https://eco.taobao.com/router/rest'; + + /** + * The API version for the request. + * + * @var string + */ + protected $version = '2.0'; + + /** + * @var string + */ + protected $format = 'json'; + + /** + * @var string + */ + protected $signMethod = 'md5'; + + /** + * Web 对应 PC 端(淘宝 logo )浏览器页面样式;Tmall 对应天猫的浏览器页面样式;Wap 对应无线端的浏览器页面样式。 + */ + protected $view = 'web'; + + /** + * The scopes being requested. + * + * @var array + */ + protected $scopes = ['user_info']; + + /** + * Get the authentication URL for the provider. + * + * @param string $state + * + * @return string + */ + protected function getAuthUrl($state) + { + return $this->buildAuthUrlFromBase($this->baseUrl.'/authorize', $state); + } + + /** + * 获取授权码接口参数. + * + * @param string|null $state + * + * @return array + */ + public function getCodeFields($state = null) + { + $fields = [ + 'client_id' => $this->clientId, + 'redirect_uri' => $this->redirectUrl, + 'view' => $this->view, + 'response_type' => 'code', + ]; + + if ($this->usesState()) { + $fields['state'] = $state; + } + + return $fields; + } + + /** + * Get the token URL for the provider. + * + * @return string + */ + protected function getTokenUrl() + { + return $this->baseUrl.'/token'; + } + + /** + * Get the Post fields for the token request. + * + * @param string $code + * + * @return array + */ + protected function getTokenFields($code) + { + return parent::getTokenFields($code) + ['grant_type' => 'authorization_code', 'view' => $this->view]; + } + + /** + * Get the access token for the given code. + * + * @param string $code + * + * @return \Overtrue\Socialite\AccessToken + */ + public function getAccessToken($code) + { + $response = $this->getHttpClient()->post($this->getTokenUrl(), [ + 'query' => $this->getTokenFields($code), + ]); + + return $this->parseAccessToken($response->getBody()->getContents()); + } + + /** + * Get the access token from the token response body. + * + * @param string $body + * + * @return \Overtrue\Socialite\AccessToken + */ + public function parseAccessToken($body) + { + return parent::parseAccessToken($body); + } + + /** + * Get the raw user for the given access token. + * + * @param \Overtrue\Socialite\AccessTokenInterface $token + * + * @return array + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $response = $this->getHttpClient()->post($this->getUserInfoUrl($this->gatewayUrl, $token)); + + return json_decode($response->getBody(), true); + } + + /** + * Map the raw user array to a Socialite User instance. + * + * @param array $user + * + * @return \Overtrue\Socialite\User + */ + protected function mapUserToObject(array $user) + { + return new User([ + 'id' => $this->arrayItem($user, 'open_id'), + 'nickname' => $this->arrayItem($user, 'nick'), + 'name' => $this->arrayItem($user, 'nick'), + 'avatar' => $this->arrayItem($user, 'avatar'), + ]); + } + + /** + * @param $params + * + * @return string + */ + protected function generateSign($params) + { + ksort($params); + + $stringToBeSigned = $this->clientSecret; + + foreach ($params as $k => $v) { + if (!is_array($v) && '@' != substr($v, 0, 1)) { + $stringToBeSigned .= "$k$v"; + } + } + + $stringToBeSigned .= $this->clientSecret; + + return strtoupper(md5($stringToBeSigned)); + } + + /** + * @param \Overtrue\Socialite\AccessTokenInterface $token + * @param array $apiFields + * + * @return array + */ + protected function getPublicFields(AccessTokenInterface $token, array $apiFields = []) + { + $fields = [ + 'app_key' => $this->clientId, + 'sign_method' => $this->signMethod, + 'session' => $token->getToken(), + 'timestamp' => date('Y-m-d H:i:s'), + 'v' => $this->version, + 'format' => $this->format, + ]; + + $fields = array_merge($apiFields, $fields); + $fields['sign'] = $this->generateSign($fields); + + return $fields; + } + + /** + * {@inheritdoc}. + */ + protected function getUserInfoUrl($url, AccessTokenInterface $token) + { + $apiFields = ['method' => 'taobao.miniapp.userInfo.get']; + + $query = http_build_query($this->getPublicFields($token, $apiFields), '', '&', $this->encodingType); + + return $url.'?'.$query; + } +} diff --git a/vendor/overtrue/socialite/src/Providers/WeChatProvider.php b/vendor/overtrue/socialite/src/Providers/WeChatProvider.php new file mode 100755 index 0000000..8fb48d3 --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/WeChatProvider.php @@ -0,0 +1,234 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\InvalidArgumentException; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; +use Overtrue\Socialite\WeChatComponentInterface; + +/** + * Class WeChatProvider. + * + * @see http://mp.weixin.qq.com/wiki/9/01f711493b5a02f24b04365ac5d8fd95.html [WeChat - 公众平台OAuth文档] + * @see https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419316505&token=&lang=zh_CN [网站应用微信登录开发指南] + */ +class WeChatProvider extends AbstractProvider implements ProviderInterface +{ + /** + * The base url of WeChat API. + * + * @var string + */ + protected $baseUrl = 'https://api.weixin.qq.com/sns'; + + /** + * {@inheritdoc}. + */ + protected $openId; + + /** + * {@inheritdoc}. + */ + protected $scopes = ['snsapi_login']; + + /** + * Indicates if the session state should be utilized. + * + * @var bool + */ + protected $stateless = true; + + /** + * Return country code instead of country name. + * + * @var bool + */ + protected $withCountryCode = false; + + /** + * @var WeChatComponentInterface + */ + protected $component; + + /** + * Return country code instead of country name. + * + * @return $this + */ + public function withCountryCode() + { + $this->withCountryCode = true; + + return $this; + } + + /** + * WeChat OpenPlatform 3rd component. + * + * @param WeChatComponentInterface $component + * + * @return $this + */ + public function component(WeChatComponentInterface $component) + { + $this->scopes = ['snsapi_base']; + + $this->component = $component; + + return $this; + } + + /** + * {@inheritdoc}. + */ + public function getAccessToken($code) + { + $response = $this->getHttpClient()->get($this->getTokenUrl(), [ + 'headers' => ['Accept' => 'application/json'], + 'query' => $this->getTokenFields($code), + ]); + + return $this->parseAccessToken($response->getBody()); + } + + /** + * {@inheritdoc}. + */ + protected function getAuthUrl($state) + { + $path = 'oauth2/authorize'; + + if (in_array('snsapi_login', $this->scopes)) { + $path = 'qrconnect'; + } + + return $this->buildAuthUrlFromBase("https://open.weixin.qq.com/connect/{$path}", $state); + } + + /** + * {@inheritdoc}. + */ + protected function buildAuthUrlFromBase($url, $state) + { + $query = http_build_query($this->getCodeFields($state), '', '&', $this->encodingType); + + return $url.'?'.$query.'#wechat_redirect'; + } + + /** + * {@inheritdoc}. + */ + protected function getCodeFields($state = null) + { + if ($this->component) { + $this->with(['component_appid' => $this->component->getAppId()]); + } + + return array_merge([ + 'appid' => $this->clientId, + 'redirect_uri' => $this->redirectUrl, + 'response_type' => 'code', + 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), + 'state' => $state ?: md5(time()), + 'connect_redirect' => 1, + ], $this->parameters); + } + + /** + * {@inheritdoc}. + */ + protected function getTokenUrl() + { + if ($this->component) { + return $this->baseUrl.'/oauth2/component/access_token'; + } + + return $this->baseUrl.'/oauth2/access_token'; + } + + /** + * {@inheritdoc}. + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $scopes = explode(',', $token->getAttribute('scope', '')); + + if (in_array('snsapi_base', $scopes)) { + return $token->toArray(); + } + + if (empty($token['openid'])) { + throw new InvalidArgumentException('openid of AccessToken is required.'); + } + + $language = $this->withCountryCode ? null : (isset($this->parameters['lang']) ? $this->parameters['lang'] : 'zh_CN'); + + $response = $this->getHttpClient()->get($this->baseUrl.'/userinfo', [ + 'query' => array_filter([ + 'access_token' => $token->getToken(), + 'openid' => $token['openid'], + 'lang' => $language, + ]), + ]); + + return json_decode($response->getBody(), true); + } + + /** + * {@inheritdoc}. + */ + protected function mapUserToObject(array $user) + { + return new User([ + 'id' => $this->arrayItem($user, 'openid'), + 'name' => $this->arrayItem($user, 'nickname'), + 'nickname' => $this->arrayItem($user, 'nickname'), + 'avatar' => $this->arrayItem($user, 'headimgurl'), + 'email' => null, + ]); + } + + /** + * {@inheritdoc}. + */ + protected function getTokenFields($code) + { + return array_filter([ + 'appid' => $this->clientId, + 'secret' => $this->clientSecret, + 'component_appid' => $this->component ? $this->component->getAppId() : null, + 'component_access_token' => $this->component ? $this->component->getToken() : null, + 'code' => $code, + 'grant_type' => 'authorization_code', + ]); + } + + /** + * Remove the fucking callback parentheses. + * + * @param mixed $response + * + * @return string + */ + protected function removeCallback($response) + { + if (false !== strpos($response, 'callback')) { + $lpos = strpos($response, '('); + $rpos = strrpos($response, ')'); + $response = substr($response, $lpos + 1, $rpos - $lpos - 1); + } + + return $response; + } +} diff --git a/vendor/overtrue/socialite/src/Providers/WeWorkProvider.php b/vendor/overtrue/socialite/src/Providers/WeWorkProvider.php new file mode 100755 index 0000000..1327e80 --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/WeWorkProvider.php @@ -0,0 +1,214 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class WeWorkProvider. + * + * @author mingyoung + */ +class WeWorkProvider extends AbstractProvider implements ProviderInterface +{ + /** + * @var string + */ + protected $agentId; + + /** + * @var bool + */ + protected $detailed = false; + + /** + * Set agent id. + * + * @param string $agentId + * + * @return $this + */ + public function setAgentId($agentId) + { + $this->agentId = $agentId; + + return $this; + } + + /** + * @param string $agentId + * + * @return $this + */ + public function agent($agentId) + { + return $this->setAgentId($agentId); + } + + /** + * Return user details. + * + * @return $this + */ + public function detailed() + { + $this->detailed = true; + + return $this; + } + + /** + * @param string $state + * + * @return string + */ + protected function getAuthUrl($state) + { + // 网页授权登录 + if (!empty($this->scopes)) { + return $this->getOAuthUrl($state); + } + + // 第三方网页应用登录(扫码登录) + return $this->getQrConnectUrl($state); + } + + /** + * OAuth url. + * + * @param string $state + * + * @return string + */ + protected function getOAuthUrl($state) + { + $queries = [ + 'appid' => $this->clientId, + 'redirect_uri' => $this->redirectUrl, + 'response_type' => 'code', + 'scope' => $this->formatScopes($this->scopes, $this->scopeSeparator), + 'agentid' => $this->agentId, + 'state' => $state, + ]; + + return sprintf('https://open.weixin.qq.com/connect/oauth2/authorize?%s#wechat_redirect', http_build_query($queries)); + } + + /** + * Qr connect url. + * + * @param string $state + * + * @return string + */ + protected function getQrConnectUrl($state) + { + $queries = [ + 'appid' => $this->clientId, + 'agentid' => $this->agentId, + 'redirect_uri' => $this->redirectUrl, + 'state' => $state, + ]; + + return 'https://open.work.weixin.qq.com/wwopen/sso/qrConnect?'.http_build_query($queries); + } + + protected function getTokenUrl() + { + return null; + } + + /** + * @param \Overtrue\Socialite\AccessTokenInterface $token + * + * @return mixed + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $userInfo = $this->getUserInfo($token); + + if ($this->detailed && isset($userInfo['user_ticket'])) { + return $this->getUserDetail($token, $userInfo['user_ticket']); + } + + $this->detailed = false; + + return $userInfo; + } + + /** + * Get user base info. + * + * @param \Overtrue\Socialite\AccessTokenInterface $token + * + * @return mixed + */ + protected function getUserInfo(AccessTokenInterface $token) + { + $response = $this->getHttpClient()->get('https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo', [ + 'query' => array_filter([ + 'access_token' => $token->getToken(), + 'code' => $this->getCode(), + ]), + ]); + + return json_decode($response->getBody(), true); + } + + /** + * Get user detail info. + * + * @param \Overtrue\Socialite\AccessTokenInterface $token + * @param $ticket + * + * @return mixed + */ + protected function getUserDetail(AccessTokenInterface $token, $ticket) + { + $response = $this->getHttpClient()->post('https://qyapi.weixin.qq.com/cgi-bin/user/getuserdetail', [ + 'query' => [ + 'access_token' => $token->getToken(), + ], + 'json' => [ + 'user_ticket' => $ticket, + ], + ]); + + return json_decode($response->getBody(), true); + } + + /** + * @param array $user + * + * @return \Overtrue\Socialite\User + */ + protected function mapUserToObject(array $user) + { + if ($this->detailed) { + return new User([ + 'id' => $this->arrayItem($user, 'userid'), + 'name' => $this->arrayItem($user, 'name'), + 'avatar' => $this->arrayItem($user, 'avatar'), + 'email' => $this->arrayItem($user, 'email'), + ]); + } + + return new User(array_filter([ + 'id' => $this->arrayItem($user, 'UserId') ?: $this->arrayItem($user, 'OpenId'), + 'userId' => $this->arrayItem($user, 'UserId'), + 'openid' => $this->arrayItem($user, 'OpenId'), + 'deviceId' => $this->arrayItem($user, 'DeviceId'), + ])); + } +} diff --git a/vendor/overtrue/socialite/src/Providers/WeiboProvider.php b/vendor/overtrue/socialite/src/Providers/WeiboProvider.php new file mode 100755 index 0000000..47ec56d --- /dev/null +++ b/vendor/overtrue/socialite/src/Providers/WeiboProvider.php @@ -0,0 +1,126 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite\Providers; + +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\ProviderInterface; +use Overtrue\Socialite\User; + +/** + * Class WeiboProvider. + * + * @see http://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E [OAuth 2.0 授权机制说明] + */ +class WeiboProvider extends AbstractProvider implements ProviderInterface +{ + /** + * The base url of Weibo API. + * + * @var string + */ + protected $baseUrl = 'https://api.weibo.com'; + + /** + * The API version for the request. + * + * @var string + */ + protected $version = '2'; + + /** + * The scopes being requested. + * + * @var array + */ + protected $scopes = ['email']; + + /** + * The uid of user authorized. + * + * @var int + */ + protected $uid; + + /** + * Get the authentication URL for the provider. + * + * @param string $state + * + * @return string + */ + protected function getAuthUrl($state) + { + return $this->buildAuthUrlFromBase($this->baseUrl.'/oauth2/authorize', $state); + } + + /** + * Get the token URL for the provider. + * + * @return string + */ + protected function getTokenUrl() + { + return $this->baseUrl.'/'.$this->version.'/oauth2/access_token'; + } + + /** + * Get the Post fields for the token request. + * + * @param string $code + * + * @return array + */ + protected function getTokenFields($code) + { + return parent::getTokenFields($code) + ['grant_type' => 'authorization_code']; + } + + /** + * Get the raw user for the given access token. + * + * @param \Overtrue\Socialite\AccessTokenInterface $token + * + * @return array + */ + protected function getUserByToken(AccessTokenInterface $token) + { + $response = $this->getHttpClient()->get($this->baseUrl.'/'.$this->version.'/users/show.json', [ + 'query' => [ + 'uid' => $token['uid'], + 'access_token' => $token->getToken(), + ], + 'headers' => [ + 'Accept' => 'application/json', + ], + ]); + + return json_decode($response->getBody(), true); + } + + /** + * Map the raw user array to a Socialite User instance. + * + * @param array $user + * + * @return \Overtrue\Socialite\User + */ + protected function mapUserToObject(array $user) + { + return new User([ + 'id' => $this->arrayItem($user, 'id'), + 'nickname' => $this->arrayItem($user, 'screen_name'), + 'name' => $this->arrayItem($user, 'name'), + 'email' => $this->arrayItem($user, 'email'), + 'avatar' => $this->arrayItem($user, 'avatar_large'), + ]); + } +} diff --git a/vendor/overtrue/socialite/src/SocialiteManager.php b/vendor/overtrue/socialite/src/SocialiteManager.php new file mode 100755 index 0000000..8e99cf0 --- /dev/null +++ b/vendor/overtrue/socialite/src/SocialiteManager.php @@ -0,0 +1,251 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +use Closure; +use InvalidArgumentException; +use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Session\Session; + +/** + * Class SocialiteManager. + */ +class SocialiteManager implements FactoryInterface +{ + /** + * The configuration. + * + * @var \Overtrue\Socialite\Config + */ + protected $config; + + /** + * The request instance. + * + * @var Request + */ + protected $request; + + /** + * The registered custom driver creators. + * + * @var array + */ + protected $customCreators = []; + + /** + * The initial drivers. + * + * @var array + */ + protected $initialDrivers = [ + 'facebook' => 'Facebook', + 'github' => 'GitHub', + 'google' => 'Google', + 'linkedin' => 'Linkedin', + 'weibo' => 'Weibo', + 'qq' => 'QQ', + 'wechat' => 'WeChat', + 'douban' => 'Douban', + 'wework' => 'WeWork', + 'outlook' => 'Outlook', + 'douyin' => 'DouYin', + 'taobao' => 'Taobao', + ]; + + /** + * The array of created "drivers". + * + * @var ProviderInterface[] + */ + protected $drivers = []; + + /** + * SocialiteManager constructor. + * + * @param array $config + * @param Request|null $request + */ + public function __construct(array $config, Request $request = null) + { + $this->config = new Config($config); + + if ($this->config->has('guzzle')) { + Providers\AbstractProvider::setGuzzleOptions($this->config->get('guzzle')); + } + + if ($request) { + $this->setRequest($request); + } + } + + /** + * Set config instance. + * + * @param \Overtrue\Socialite\Config $config + * + * @return $this + */ + public function config(Config $config) + { + $this->config = $config; + + return $this; + } + + /** + * Get a driver instance. + * + * @param string $driver + * + * @return ProviderInterface + */ + public function driver($driver) + { + if (!isset($this->drivers[$driver])) { + $this->drivers[$driver] = $this->createDriver($driver); + } + + return $this->drivers[$driver]; + } + + /** + * @param \Symfony\Component\HttpFoundation\Request $request + * + * @return $this + */ + public function setRequest(Request $request) + { + $this->request = $request; + + return $this; + } + + /** + * @return \Symfony\Component\HttpFoundation\Request + */ + public function getRequest() + { + return $this->request ?: $this->createDefaultRequest(); + } + + /** + * Create a new driver instance. + * + * @param string $driver + * + * @throws \InvalidArgumentException + * + * @return ProviderInterface + */ + protected function createDriver($driver) + { + if (isset($this->initialDrivers[$driver])) { + $provider = $this->initialDrivers[$driver]; + $provider = __NAMESPACE__.'\\Providers\\'.$provider.'Provider'; + + return $this->buildProvider($provider, $this->formatConfig($this->config->get($driver))); + } + + if (isset($this->customCreators[$driver])) { + return $this->callCustomCreator($driver); + } + + throw new InvalidArgumentException("Driver [$driver] not supported."); + } + + /** + * Call a custom driver creator. + * + * @param string $driver + * + * @return ProviderInterface + */ + protected function callCustomCreator($driver) + { + return $this->customCreators[$driver]($this->config); + } + + /** + * Create default request instance. + * + * @return Request + */ + protected function createDefaultRequest() + { + $request = Request::createFromGlobals(); + $session = new Session(); + + $request->setSession($session); + + return $request; + } + + /** + * Register a custom driver creator Closure. + * + * @param string $driver + * @param \Closure $callback + * + * @return $this + */ + public function extend($driver, Closure $callback) + { + $this->customCreators[$driver] = $callback; + + return $this; + } + + /** + * Get all of the created "drivers". + * + * @return ProviderInterface[] + */ + public function getDrivers() + { + return $this->drivers; + } + + /** + * Build an OAuth 2 provider instance. + * + * @param string $provider + * @param array $config + * + * @return ProviderInterface + */ + public function buildProvider($provider, $config) + { + return new $provider( + $this->getRequest(), + $config['client_id'], + $config['client_secret'], + $config['redirect'] + ); + } + + /** + * Format the server configuration. + * + * @param array $config + * + * @return array + */ + public function formatConfig(array $config) + { + return array_merge([ + 'identifier' => $config['client_id'], + 'secret' => $config['client_secret'], + 'callback_uri' => $config['redirect'], + ], $config); + } +} diff --git a/vendor/overtrue/socialite/src/User.php b/vendor/overtrue/socialite/src/User.php new file mode 100755 index 0000000..82827dd --- /dev/null +++ b/vendor/overtrue/socialite/src/User.php @@ -0,0 +1,186 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +use ArrayAccess; +use JsonSerializable; + +/** + * Class User. + */ +class User implements ArrayAccess, UserInterface, JsonSerializable, \Serializable +{ + use HasAttributes; + + /** + * User constructor. + * + * @param array $attributes + */ + public function __construct(array $attributes) + { + $this->attributes = $attributes; + } + + /** + * Get the unique identifier for the user. + * + * @return string + */ + public function getId() + { + return $this->getAttribute('id'); + } + + /** + * Get the username for the user. + * + * @return string + */ + public function getUsername() + { + return $this->getAttribute('username', $this->getId()); + } + + /** + * Get the nickname / username for the user. + * + * @return string + */ + public function getNickname() + { + return $this->getAttribute('nickname'); + } + + /** + * Get the full name of the user. + * + * @return string + */ + public function getName() + { + return $this->getAttribute('name'); + } + + /** + * Get the e-mail address of the user. + * + * @return string + */ + public function getEmail() + { + return $this->getAttribute('email'); + } + + /** + * Get the avatar / image URL for the user. + * + * @return string + */ + public function getAvatar() + { + return $this->getAttribute('avatar'); + } + + /** + * Set the token on the user. + * + * @param \Overtrue\Socialite\AccessTokenInterface $token + * + * @return $this + */ + public function setToken(AccessTokenInterface $token) + { + $this->setAttribute('token', $token->getToken()); + + return $this; + } + + /** + * @param string $provider + * + * @return $this + */ + public function setProviderName($provider) + { + $this->setAttribute('provider', $provider); + + return $this; + } + + /** + * @return string + */ + public function getProviderName() + { + return $this->getAttribute('provider'); + } + + /** + * Get the authorized token. + * + * @return \Overtrue\Socialite\AccessToken + */ + public function getToken() + { + return new AccessToken(['access_token' => $this->getAttribute('token')]); + } + + /** + * Alias of getToken(). + * + * @return \Overtrue\Socialite\AccessToken + */ + public function getAccessToken() + { + return $this->getToken(); + } + + /** + * Get the original attributes. + * + * @return array + */ + public function getOriginal() + { + return $this->getAttribute('original'); + } + + /** + * {@inheritdoc} + */ + public function jsonSerialize() + { + return $this->attributes; + } + + public function serialize() + { + return serialize($this->attributes); + } + + /** + * Constructs the object. + * + * @see https://php.net/manual/en/serializable.unserialize.php + * + * @param string $serialized

                            + * The string representation of the object. + *

                            + * + * @since 5.1.0 + */ + public function unserialize($serialized) + { + $this->attributes = \unserialize($serialized) ?? []; + } +} diff --git a/vendor/overtrue/socialite/src/UserInterface.php b/vendor/overtrue/socialite/src/UserInterface.php new file mode 100755 index 0000000..1403339 --- /dev/null +++ b/vendor/overtrue/socialite/src/UserInterface.php @@ -0,0 +1,53 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +/** + * Interface UserInterface. + */ +interface UserInterface +{ + /** + * Get the unique identifier for the user. + * + * @return string + */ + public function getId(); + + /** + * Get the nickname / username for the user. + * + * @return string + */ + public function getNickname(); + + /** + * Get the full name of the user. + * + * @return string + */ + public function getName(); + + /** + * Get the e-mail address of the user. + * + * @return string + */ + public function getEmail(); + + /** + * Get the avatar / image URL for the user. + * + * @return string + */ + public function getAvatar(); +} diff --git a/vendor/overtrue/socialite/src/WeChatComponentInterface.php b/vendor/overtrue/socialite/src/WeChatComponentInterface.php new file mode 100755 index 0000000..1754521 --- /dev/null +++ b/vendor/overtrue/socialite/src/WeChatComponentInterface.php @@ -0,0 +1,32 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace Overtrue\Socialite; + +/** + * Interface WeChatComponentInterface. + */ +interface WeChatComponentInterface +{ + /** + * Return the open-platform component app id. + * + * @return string + */ + public function getAppId(); + + /** + * Return the open-platform component access token string. + * + * @return string + */ + public function getToken(); +} diff --git a/vendor/overtrue/socialite/tests/OAuthTest.php b/vendor/overtrue/socialite/tests/OAuthTest.php new file mode 100755 index 0000000..c637606 --- /dev/null +++ b/vendor/overtrue/socialite/tests/OAuthTest.php @@ -0,0 +1,161 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +use Mockery as m; +use Overtrue\Socialite\AccessTokenInterface; +use Overtrue\Socialite\Providers\AbstractProvider; +use Overtrue\Socialite\User; +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; + +class OAuthTest extends TestCase +{ + public function tearDown() + { + m::close(); + } + + public function testRedirectGeneratesTheProperSymfonyRedirectResponse() + { + $request = Request::create('foo'); + $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); + $session->shouldReceive('put')->once(); + $provider = new OAuthTwoTestProviderStub($request, 'client_id', 'client_secret', 'redirect'); + $response = $provider->redirect(); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); + $this->assertSame('http://auth.url', $response->getTargetUrl()); + } + + public function testRedirectUrl() + { + $request = Request::create('foo', 'GET', ['state' => str_repeat('A', 40), 'code' => 'code']); + $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); + + $provider = new OAuthTwoTestProviderStub($request, 'client_id', 'client_secret'); + $this->assertNull($provider->getRedirectUrl()); + + $provider = new OAuthTwoTestProviderStub($request, 'client_id', 'client_secret', 'redirect_uri'); + $this->assertSame('redirect_uri', $provider->getRedirectUrl()); + $provider->setRedirectUrl('overtrue.me'); + $this->assertSame('overtrue.me', $provider->getRedirectUrl()); + + $provider->withRedirectUrl('http://overtrue.me'); + $this->assertSame('http://overtrue.me', $provider->getRedirectUrl()); + } + + public function testUserReturnsAUserInstanceForTheAuthenticatedRequest() + { + $request = Request::create('foo', 'GET', ['state' => str_repeat('A', 40), 'code' => 'code']); + $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); + + $session->shouldReceive('get')->once()->with('state')->andReturn(str_repeat('A', 40)); + $provider = new OAuthTwoTestProviderStub($request, 'client_id', 'client_secret', 'redirect_uri'); + $provider->http = m::mock('StdClass'); + $provider->http->shouldReceive('post')->once()->with('http://token.url', [ + 'headers' => ['Accept' => 'application/json'], 'form_params' => ['client_id' => 'client_id', 'client_secret' => 'client_secret', 'code' => 'code', 'redirect_uri' => 'redirect_uri'], + ])->andReturn($response = m::mock('StdClass')); + $response->shouldReceive('getBody')->once()->andReturn('{"access_token":"access_token"}'); + $user = $provider->user(); + + $this->assertInstanceOf('Overtrue\Socialite\User', $user); + $this->assertSame('foo', $user->getId()); + } + + /** + * @expectedException \Overtrue\Socialite\InvalidStateException + */ + public function testExceptionIsThrownIfStateIsInvalid() + { + $request = Request::create('foo', 'GET', ['state' => str_repeat('B', 40), 'code' => 'code']); + $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); + $session->shouldReceive('get')->once()->with('state')->andReturn(str_repeat('A', 40)); + $provider = new OAuthTwoTestProviderStub($request, 'client_id', 'client_secret', 'redirect'); + $user = $provider->user(); + } + + /** + * @expectedException \Overtrue\Socialite\AuthorizeFailedException + * @expectedExceptionMessage Authorize Failed: {"error":"scope is invalid"} + */ + public function testExceptionisThrownIfAuthorizeFailed() + { + $request = Request::create('foo', 'GET', ['state' => str_repeat('A', 40), 'code' => 'code']); + $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); + $session->shouldReceive('get')->once()->with('state')->andReturn(str_repeat('A', 40)); + $provider = new OAuthTwoTestProviderStub($request, 'client_id', 'client_secret', 'redirect_uri'); + $provider->http = m::mock('StdClass'); + $provider->http->shouldReceive('post')->once()->with('http://token.url', [ + 'headers' => ['Accept' => 'application/json'], 'form_params' => ['client_id' => 'client_id', 'client_secret' => 'client_secret', 'code' => 'code', 'redirect_uri' => 'redirect_uri'], + ])->andReturn($response = m::mock('StdClass')); + $response->shouldReceive('getBody')->once()->andReturn('{"error":"scope is invalid"}'); + $user = $provider->user(); + } + + /** + * @expectedException \Overtrue\Socialite\InvalidStateException + */ + public function testExceptionIsThrownIfStateIsNotSet() + { + $request = Request::create('foo', 'GET', ['state' => 'state', 'code' => 'code']); + $request->setSession($session = m::mock('Symfony\Component\HttpFoundation\Session\SessionInterface')); + $session->shouldReceive('get')->once()->with('state'); + $provider = new OAuthTwoTestProviderStub($request, 'client_id', 'client_secret', 'redirect'); + $user = $provider->user(); + } + + public function testDriverName() + { + $request = Request::create('foo', 'GET', ['state' => 'state', 'code' => 'code']); + $provider = new OAuthTwoTestProviderStub($request, 'client_id', 'client_secret', 'redirect'); + + $this->assertSame('OAuthTwoTest', $provider->getName()); + } +} + +class OAuthTwoTestProviderStub extends AbstractProvider +{ + public $http; + + protected function getAuthUrl($state) + { + return 'http://auth.url'; + } + + protected function getTokenUrl() + { + return 'http://token.url'; + } + + protected function getUserByToken(AccessTokenInterface $token) + { + return ['id' => 'foo']; + } + + protected function mapUserToObject(array $user) + { + return new User(['id' => $user['id']]); + } + + /** + * Get a fresh instance of the Guzzle HTTP client. + * + * @return \GuzzleHttp\Client + */ + protected function getHttpClient() + { + if ($this->http) { + return $this->http; + } + + return $this->http = m::mock('StdClass'); + } +} diff --git a/vendor/overtrue/socialite/tests/Providers/WeWorkProviderTest.php b/vendor/overtrue/socialite/tests/Providers/WeWorkProviderTest.php new file mode 100755 index 0000000..88377a7 --- /dev/null +++ b/vendor/overtrue/socialite/tests/Providers/WeWorkProviderTest.php @@ -0,0 +1,48 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +use Overtrue\Socialite\Providers\WeWorkProvider; +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; + +class WeWorkProviderTest extends TestCase +{ + public function testQrConnect() + { + $response = (new WeWorkProvider(Request::create('foo'), 'ww100000a5f2191', 'client_secret', 'http://www.oa.com')) + ->setAgentId('1000000') + ->stateless() + ->redirect(); + + $this->assertSame('https://open.work.weixin.qq.com/wwopen/sso/qrConnect?appid=ww100000a5f2191&agentid=1000000&redirect_uri=http%3A%2F%2Fwww.oa.com', $response->getTargetUrl()); + } + + public function testOAuthWithAgentId() + { + $response = (new WeWorkProvider(Request::create('foo'), 'CORPID', 'client_secret', 'REDIRECT_URI')) + ->scopes(['snsapi_base']) + ->setAgentId('1000000') + ->stateless() + ->redirect(); + + $this->assertSame('https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base&agentid=1000000#wechat_redirect', $response->getTargetUrl()); + } + + public function testOAuthWithoutAgentId() + { + $response = (new WeWorkProvider(Request::create('foo'), 'CORPID', 'client_secret', 'REDIRECT_URI')) + ->scopes(['snsapi_base']) + ->stateless() + ->redirect(); + + $this->assertSame('https://open.weixin.qq.com/connect/oauth2/authorize?appid=CORPID&redirect_uri=REDIRECT_URI&response_type=code&scope=snsapi_base#wechat_redirect', $response->getTargetUrl()); + } +} diff --git a/vendor/overtrue/socialite/tests/UserTest.php b/vendor/overtrue/socialite/tests/UserTest.php new file mode 100755 index 0000000..dd42010 --- /dev/null +++ b/vendor/overtrue/socialite/tests/UserTest.php @@ -0,0 +1,24 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +use Overtrue\Socialite\AccessToken; +use Overtrue\Socialite\User; +use PHPUnit\Framework\TestCase; + +class UserTest extends TestCase +{ + public function testJsonserialize() + { + $this->assertSame('[]', json_encode(new User([]))); + + $this->assertSame('{"token":"mock-token"}', json_encode(new User(['token' => new AccessToken(['access_token' => 'mock-token'])]))); + } +} diff --git a/vendor/overtrue/socialite/tests/WechatProviderTest.php b/vendor/overtrue/socialite/tests/WechatProviderTest.php new file mode 100755 index 0000000..7576b02 --- /dev/null +++ b/vendor/overtrue/socialite/tests/WechatProviderTest.php @@ -0,0 +1,109 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +use Overtrue\Socialite\Providers\WeChatProvider as RealWeChatProvider; +use PHPUnit\Framework\TestCase; +use Symfony\Component\HttpFoundation\Request; + +class WechatProviderTest extends TestCase +{ + public function testWeChatProviderHasCorrectlyRedirectResponse() + { + $response = (new WeChatProvider(Request::create('foo'), 'client_id', 'client_secret', 'http://localhost/socialite/callback.php'))->redirect(); + + $this->assertInstanceOf('Symfony\Component\HttpFoundation\RedirectResponse', $response); + $this->assertStringStartsWith('https://open.weixin.qq.com/connect/qrconnect', $response->getTargetUrl()); + $this->assertRegExp('/redirect_uri=http%3A%2F%2Flocalhost%2Fsocialite%2Fcallback.php/', $response->getTargetUrl()); + } + + public function testWeChatProviderTokenUrlAndRequestFields() + { + $provider = new WeChatProvider(Request::create('foo'), 'client_id', 'client_secret', 'http://localhost/socialite/callback.php'); + + $this->assertSame('https://api.weixin.qq.com/sns/oauth2/access_token', $provider->tokenUrl()); + $this->assertSame([ + 'appid' => 'client_id', + 'secret' => 'client_secret', + 'code' => 'iloveyou', + 'grant_type' => 'authorization_code', + ], $provider->tokenFields('iloveyou')); + + $this->assertSame([ + 'appid' => 'client_id', + 'redirect_uri' => 'http://localhost/socialite/callback.php', + 'response_type' => 'code', + 'scope' => 'snsapi_login', + 'state' => 'wechat-state', + 'connect_redirect' => 1, + ], $provider->codeFields('wechat-state')); + } + + public function testOpenPlatformComponent() + { + $provider = new WeChatProvider(Request::create('foo'), 'client_id', null, 'redirect-url'); + $provider->component(new WeChatComponent()); + $this->assertSame([ + 'appid' => 'client_id', + 'redirect_uri' => 'redirect-url', + 'response_type' => 'code', + 'scope' => 'snsapi_base', + 'state' => 'state', + 'connect_redirect' => 1, + 'component_appid' => 'component-app-id', + ], $provider->codeFields('state')); + + $this->assertSame([ + 'appid' => 'client_id', + 'component_appid' => 'component-app-id', + 'component_access_token' => 'token', + 'code' => 'simcode', + 'grant_type' => 'authorization_code', + ], $provider->tokenFields('simcode')); + + $this->assertSame('https://api.weixin.qq.com/sns/oauth2/component/access_token', $provider->tokenUrl()); + } +} + +trait ProviderTrait +{ + public function tokenUrl() + { + return $this->getTokenUrl(); + } + + public function tokenFields($code) + { + return $this->getTokenFields($code); + } + + public function codeFields($state = null) + { + return $this->getCodeFields($state); + } +} + +class WeChatProvider extends RealWeChatProvider +{ + use ProviderTrait; +} + +class WeChatComponent implements \Overtrue\Socialite\WeChatComponentInterface +{ + public function getAppId() + { + return 'component-app-id'; + } + + public function getToken() + { + return 'token'; + } +} diff --git a/vendor/overtrue/wechat/CHANGELOG.md b/vendor/overtrue/wechat/CHANGELOG.md new file mode 100755 index 0000000..df42aa6 --- /dev/null +++ b/vendor/overtrue/wechat/CHANGELOG.md @@ -0,0 +1,1401 @@ +# Change Log + +## [Unreleased](https://github.com/overtrue/wechat/tree/HEAD) + +[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0...HEAD) + +**Closed issues:** + +- 能否增加对symfony4的支持 [\#1044](https://github.com/overtrue/wechat/issues/1044) + +## [4.0.0](https://github.com/overtrue/wechat/tree/4.0.0) (2017-12-11) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.21...4.0.0) + +**Closed issues:** + +- filecache.php 文件 createPathIfNeeded\(string $path\) : bool [\#1046](https://github.com/overtrue/wechat/issues/1046) +- 沙箱模式的Notify总是出错:Invalid request payloads. [\#1045](https://github.com/overtrue/wechat/issues/1045) +- 你好我是SwooleDistributed框架的作者 [\#1040](https://github.com/overtrue/wechat/issues/1040) + +## [3.3.21](https://github.com/overtrue/wechat/tree/3.3.21) (2017-12-10) +[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-beta.4...3.3.21) + +**Closed issues:** + +- 开启开放平台自动路由后报错 [\#1042](https://github.com/overtrue/wechat/issues/1042) +- 关于3.x升级4.x的问题 [\#1041](https://github.com/overtrue/wechat/issues/1041) +- 获取不了unionid [\#1038](https://github.com/overtrue/wechat/issues/1038) +- authorizer\_refresh\_token刷新问题 [\#1033](https://github.com/overtrue/wechat/issues/1033) +- lumen+swoole无法获取request信息。 [\#1032](https://github.com/overtrue/wechat/issues/1032) +- 上传素材报错, empty post data hint [\#1031](https://github.com/overtrue/wechat/issues/1031) +- 开放平台不支持全网发布接入检测(第三方) [\#1029](https://github.com/overtrue/wechat/issues/1029) +- 公众号模板消息不兼容跳转小程序 [\#1025](https://github.com/overtrue/wechat/issues/1025) +- swoole下无法使用 [\#1017](https://github.com/overtrue/wechat/issues/1017) +- 请教有没有高清素材下载方法? [\#997](https://github.com/overtrue/wechat/issues/997) +- 自动回复多图文素材,错误 [\#996](https://github.com/overtrue/wechat/issues/996) +- xml解释失败 [\#989](https://github.com/overtrue/wechat/issues/989) +- Curl error 77 [\#982](https://github.com/overtrue/wechat/issues/982) +- 3.1.10 H5支付不晓得算不算BUG的BUG [\#968](https://github.com/overtrue/wechat/issues/968) +- 请问是否有遇到微信扫码或内部打开外部网站出现请求2次的情况 [\#963](https://github.com/overtrue/wechat/issues/963) +- 请问4.0何时正式发布? [\#962](https://github.com/overtrue/wechat/issues/962) +- dev-master 不能用于laravel5.1 [\#952](https://github.com/overtrue/wechat/issues/952) +- 请教小程序的模板消息是否支持 [\#920](https://github.com/overtrue/wechat/issues/920) +- 模板消息的颜色设置问题 [\#914](https://github.com/overtrue/wechat/issues/914) +- 英文文档跳转问题 [\#854](https://github.com/overtrue/wechat/issues/854) +- \[4.0\] 功能测试 [\#849](https://github.com/overtrue/wechat/issues/849) +- \[4.0\] 命名变更 [\#743](https://github.com/overtrue/wechat/issues/743) + +**Merged pull requests:** + +- Scrutinizer Auto-Fixes [\#1043](https://github.com/overtrue/wechat/pull/1043) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- 修复解密小程序转发信息数据\(wx.getShareInfo\)失败的问题 [\#1037](https://github.com/overtrue/wechat/pull/1037) ([yyqqing](https://github.com/yyqqing)) +- 修復微信支付沙盒模式的通知結果本地校驗失敗錯誤。 [\#1036](https://github.com/overtrue/wechat/pull/1036) ([amyuki](https://github.com/amyuki)) +- 修复 verifyTicket 使用不了自定义缓存的问题 [\#1034](https://github.com/overtrue/wechat/pull/1034) ([mingyoung](https://github.com/mingyoung)) +- 🚧 Auto discover extensions. [\#1027](https://github.com/overtrue/wechat/pull/1027) ([mingyoung](https://github.com/mingyoung)) + +## [4.0.0-beta.4](https://github.com/overtrue/wechat/tree/4.0.0-beta.4) (2017-11-21) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.20...4.0.0-beta.4) + +**Closed issues:** + +- Order对象的$attributes中不能传入device\_info参数 [\#1030](https://github.com/overtrue/wechat/issues/1030) +- 默认文件缓存的路径是否可以简单修改? [\#1023](https://github.com/overtrue/wechat/issues/1023) +- 3.3.17 版本获取 token 的问题 [\#1022](https://github.com/overtrue/wechat/issues/1022) +- \[V3\] AccessToken.php:243 [\#1021](https://github.com/overtrue/wechat/issues/1021) + +**Merged pull requests:** + +- more detailed cache key. [\#1028](https://github.com/overtrue/wechat/pull/1028) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#1026](https://github.com/overtrue/wechat/pull/1026) ([mingyoung](https://github.com/mingyoung)) +- Specify the request instance. [\#1024](https://github.com/overtrue/wechat/pull/1024) ([mingyoung](https://github.com/mingyoung)) + +## [3.3.20](https://github.com/overtrue/wechat/tree/3.3.20) (2017-11-13) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.18...3.3.20) + +## [3.3.18](https://github.com/overtrue/wechat/tree/3.3.18) (2017-11-11) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.17...3.3.18) + +**Closed issues:** + +- 临时二维码接口无法生成以字符串为参数的二维码 [\#1020](https://github.com/overtrue/wechat/issues/1020) +- 现金红包出现了500错误,跟进显示http\_error:true [\#1016](https://github.com/overtrue/wechat/issues/1016) +- 4.0 企业微信agent OA的错误 [\#1015](https://github.com/overtrue/wechat/issues/1015) +- 求thinkphp框架demo [\#1010](https://github.com/overtrue/wechat/issues/1010) +- 沙箱模式获取验签 key 时产生无限循环 , 无法正常获取 [\#1009](https://github.com/overtrue/wechat/issues/1009) +- JSSDK里面url导致的invalid signature错误 [\#1002](https://github.com/overtrue/wechat/issues/1002) +- 微信支付沙箱模式下,回调验签错误 [\#998](https://github.com/overtrue/wechat/issues/998) +- 有微信退款回调接口吗? [\#985](https://github.com/overtrue/wechat/issues/985) +- 希望兼容新出的微信H5支付 [\#966](https://github.com/overtrue/wechat/issues/966) +- 小程序生成无限量二维码接口缺少参数 [\#965](https://github.com/overtrue/wechat/issues/965) + +**Merged pull requests:** + +- 查询企业付款接口参数调整,加入企业付款到银行卡接口(RSA 参数加密待完成) [\#1019](https://github.com/overtrue/wechat/pull/1019) ([tianyong90](https://github.com/tianyong90)) +- Token AESKey can be null. [\#1013](https://github.com/overtrue/wechat/pull/1013) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#1012](https://github.com/overtrue/wechat/pull/1012) ([mingyoung](https://github.com/mingyoung)) +- Add Mini-program tester's binding/unbinding feature [\#1011](https://github.com/overtrue/wechat/pull/1011) ([caikeal](https://github.com/caikeal)) +- Apply fixes from StyleCI [\#1008](https://github.com/overtrue/wechat/pull/1008) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#1007](https://github.com/overtrue/wechat/pull/1007) ([overtrue](https://github.com/overtrue)) +- Added open-platform's mini-program code management [\#1003](https://github.com/overtrue/wechat/pull/1003) ([caikeal](https://github.com/caikeal)) +- Cleanup payment [\#1001](https://github.com/overtrue/wechat/pull/1001) ([mingyoung](https://github.com/mingyoung)) +- Unify get stream. [\#995](https://github.com/overtrue/wechat/pull/995) ([mingyoung](https://github.com/mingyoung)) +- Add appCode `page` param. [\#991](https://github.com/overtrue/wechat/pull/991) ([mingyoung](https://github.com/mingyoung)) + +## [3.3.17](https://github.com/overtrue/wechat/tree/3.3.17) (2017-10-27) +[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-beta.3...3.3.17) + +**Closed issues:** + +- open platform component\_verify\_ticket 错误 [\#984](https://github.com/overtrue/wechat/issues/984) +- 请教下载语音后的文件不完整怎么处理? [\#980](https://github.com/overtrue/wechat/issues/980) +- 微信支付 API 调用下单解析缓缓 [\#977](https://github.com/overtrue/wechat/issues/977) +- 是否可以加入微信收款(个人转账版)服务接口 [\#970](https://github.com/overtrue/wechat/issues/970) +- 微信公众号消息加解密方式‘兼容模式’也需要填写‘aes\_key’参数,不能为空 [\#967](https://github.com/overtrue/wechat/issues/967) +- 第三方平台 接收消息一直报错 但是能回复消息 也会提示错误 [\#961](https://github.com/overtrue/wechat/issues/961) +- 中文官网无法访问 [\#960](https://github.com/overtrue/wechat/issues/960) +- laravel队列中使用了SDK报Component verify ticket does not exists. [\#958](https://github.com/overtrue/wechat/issues/958) +- 接口调用次数每日限额清零方法没有? [\#953](https://github.com/overtrue/wechat/issues/953) +- 获取access\_toekn失败之后抛出异常的地方,能够与其他地方统一使用下述这个 resolveResponse 返回数据 [\#951](https://github.com/overtrue/wechat/issues/951) +- 官网挂了 [\#950](https://github.com/overtrue/wechat/issues/950) +- 无法接收到菜单点击事件推送的消息 [\#949](https://github.com/overtrue/wechat/issues/949) +- 请教这个sdk是否可用于android 或者ios 登录? [\#948](https://github.com/overtrue/wechat/issues/948) +- 关于access token 后端分布式部署的中控服务器的问题 [\#947](https://github.com/overtrue/wechat/issues/947) +- 4.0 不支持laravel 5.2? [\#946](https://github.com/overtrue/wechat/issues/946) +- log不能打印出来 [\#945](https://github.com/overtrue/wechat/issues/945) +- EasyWeChat.org域名挂了?? [\#940](https://github.com/overtrue/wechat/issues/940) +- 微信静默授权的时候,页面上老是会显示一段很长的英文Redirecting to http://xxxx,很影响用户体验,有没有什么方法可以去掉,保留空白页,或者允许自定义显示内容 [\#939](https://github.com/overtrue/wechat/issues/939) +- 微信小程序生成二维码(接口B)微信扫描不出来结果 [\#938](https://github.com/overtrue/wechat/issues/938) +- 官网可否支持看老版本的文档? [\#937](https://github.com/overtrue/wechat/issues/937) +- 客服发送消息 收到的中文信息被unicode 编码 [\#935](https://github.com/overtrue/wechat/issues/935) +- 有多个商户时,订单通知的 $payment 怎么创建 [\#934](https://github.com/overtrue/wechat/issues/934) +- console中使用$app-\>user-\>get报错 [\#932](https://github.com/overtrue/wechat/issues/932) +- PC端扫描登录的问题 [\#930](https://github.com/overtrue/wechat/issues/930) +- 关于小程序支付的疑问 [\#912](https://github.com/overtrue/wechat/issues/912) +- 服务商api模式使用可以更加详细吗 [\#653](https://github.com/overtrue/wechat/issues/653) + +**Merged pull requests:** + +- 修正 微信公众号要求 所有接口使用 HTTPS 方式访问 [\#988](https://github.com/overtrue/wechat/pull/988) ([drogjh](https://github.com/drogjh)) +- Apply fixes from StyleCI [\#987](https://github.com/overtrue/wechat/pull/987) ([mingyoung](https://github.com/mingyoung)) +- 修复微信收款(个人转账版)商户添加、查询含有多余字段导致签名失败的问题 [\#986](https://github.com/overtrue/wechat/pull/986) ([chenhaizano](https://github.com/chenhaizano)) +- Add merchant client. [\#983](https://github.com/overtrue/wechat/pull/983) ([mingyoung](https://github.com/mingyoung)) +- Fix PKCS7 unpad issue. [\#981](https://github.com/overtrue/wechat/pull/981) ([mingyoung](https://github.com/mingyoung)) +- 💯 Add unit tests. [\#979](https://github.com/overtrue/wechat/pull/979) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#978](https://github.com/overtrue/wechat/pull/978) ([overtrue](https://github.com/overtrue)) +- Add sub-merchant support. [\#976](https://github.com/overtrue/wechat/pull/976) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#974](https://github.com/overtrue/wechat/pull/974) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#973](https://github.com/overtrue/wechat/pull/973) ([mingyoung](https://github.com/mingyoung)) +- Refactoring payment [\#972](https://github.com/overtrue/wechat/pull/972) ([mingyoung](https://github.com/mingyoung)) +- Fix request method. [\#964](https://github.com/overtrue/wechat/pull/964) ([mingyoung](https://github.com/mingyoung)) +- MiniProgram template. [\#959](https://github.com/overtrue/wechat/pull/959) ([mingyoung](https://github.com/mingyoung)) +- 企业微信 jssdk ticket [\#954](https://github.com/overtrue/wechat/pull/954) ([mingyoung](https://github.com/mingyoung)) +- Scrutinizer Auto-Fixes [\#944](https://github.com/overtrue/wechat/pull/944) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- 简化子商户js config [\#943](https://github.com/overtrue/wechat/pull/943) ([HanSon](https://github.com/HanSon)) +- Apply fixes from StyleCI [\#942](https://github.com/overtrue/wechat/pull/942) ([overtrue](https://github.com/overtrue)) +- 支持子商户JS CONFIG生成 [\#941](https://github.com/overtrue/wechat/pull/941) ([HanSon](https://github.com/HanSon)) + +## [4.0.0-beta.3](https://github.com/overtrue/wechat/tree/4.0.0-beta.3) (2017-09-23) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.16...4.0.0-beta.3) + +**Closed issues:** + +- 退款结果通知 [\#858](https://github.com/overtrue/wechat/issues/858) + +**Merged pull requests:** + +- Update Application.php [\#936](https://github.com/overtrue/wechat/pull/936) ([HanSon](https://github.com/HanSon)) + +## [3.3.16](https://github.com/overtrue/wechat/tree/3.3.16) (2017-09-20) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.15...3.3.16) + +**Closed issues:** + +- 希望能增加获取回复数据的方法 [\#929](https://github.com/overtrue/wechat/issues/929) +- 3.3 版本 数据类型不对导致无法运行 [\#928](https://github.com/overtrue/wechat/issues/928) + +**Merged pull requests:** + +- 增加退款回调处理 [\#931](https://github.com/overtrue/wechat/pull/931) ([leo108](https://github.com/leo108)) + +## [3.3.15](https://github.com/overtrue/wechat/tree/3.3.15) (2017-09-13) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.14...3.3.15) + +**Closed issues:** + +- 微信 for windows 发送文件的时候报错 [\#927](https://github.com/overtrue/wechat/issues/927) + +## [3.3.14](https://github.com/overtrue/wechat/tree/3.3.14) (2017-09-13) +[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-beta.2...3.3.14) + +**Closed issues:** + +- 请教授权的时候什么方法拿到用户是否关注了本公众号? [\#926](https://github.com/overtrue/wechat/issues/926) + +## [4.0.0-beta.2](https://github.com/overtrue/wechat/tree/4.0.0-beta.2) (2017-09-12) +[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-beta.1...4.0.0-beta.2) + +**Closed issues:** + +- readme.md写错了? [\#923](https://github.com/overtrue/wechat/issues/923) +- token验证成功,但还是回复暂时不可用,困扰1个星期多了,真心求助!!!有偿都可以!! [\#922](https://github.com/overtrue/wechat/issues/922) +- 条件判断错了,stripos返回的是“返回在字符串 haystack 中 needle 首次出现的数字位置。”,所以不能直接作为条件判断 [\#915](https://github.com/overtrue/wechat/issues/915) +- README中的链接是否错误 [\#913](https://github.com/overtrue/wechat/issues/913) +- 测试公众号无法接受用户信息 [\#911](https://github.com/overtrue/wechat/issues/911) +- ReadMe文件过期 [\#910](https://github.com/overtrue/wechat/issues/910) +- 开放平台服务,取消授权会有哪些参数过来? [\#909](https://github.com/overtrue/wechat/issues/909) +- token无法验证 [\#908](https://github.com/overtrue/wechat/issues/908) +- laravel 5.4 composer 失败 [\#907](https://github.com/overtrue/wechat/issues/907) +- 开放平台:组件ticket无法通过 [\#904](https://github.com/overtrue/wechat/issues/904) +- 官方网站一直登陆不了,浙江丽水地区 [\#903](https://github.com/overtrue/wechat/issues/903) +- \[4.0\] Pimple\Exception\UnknownIdentifierException [\#901](https://github.com/overtrue/wechat/issues/901) +- 4.0 报错“Your requirements could not be resolved to an installable set of packages.” [\#898](https://github.com/overtrue/wechat/issues/898) + +**Merged pull requests:** + +- 修改通过ticket换取二维码图片地址的逻辑 [\#925](https://github.com/overtrue/wechat/pull/925) ([Gwill](https://github.com/Gwill)) +- make domain more flexible [\#924](https://github.com/overtrue/wechat/pull/924) ([HanSon](https://github.com/HanSon)) +- add code & domain comment [\#921](https://github.com/overtrue/wechat/pull/921) ([HanSon](https://github.com/HanSon)) +- Apply fixes from StyleCI [\#919](https://github.com/overtrue/wechat/pull/919) ([overtrue](https://github.com/overtrue)) +- \[3.1\] Custom PreAuthCode Support [\#918](https://github.com/overtrue/wechat/pull/918) ([freyo](https://github.com/freyo)) +- 修改acess\_token无效时微信返回错误码的判断 [\#916](https://github.com/overtrue/wechat/pull/916) ([blackjune](https://github.com/blackjune)) +- \[4.0\] Add optional 'request' parameter to notify handler methods [\#905](https://github.com/overtrue/wechat/pull/905) ([edwardaa](https://github.com/edwardaa)) +- Apply fixes from StyleCI [\#902](https://github.com/overtrue/wechat/pull/902) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#897](https://github.com/overtrue/wechat/pull/897) ([overtrue](https://github.com/overtrue)) +- 增加OAuth中Guzzle\Client的配置项的设置 [\#893](https://github.com/overtrue/wechat/pull/893) ([khsing](https://github.com/khsing)) +- Apply fixes from StyleCI [\#887](https://github.com/overtrue/wechat/pull/887) ([overtrue](https://github.com/overtrue)) +- Scrutinizer Auto-Fixes [\#884](https://github.com/overtrue/wechat/pull/884) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) + +## [4.0.0-beta.1](https://github.com/overtrue/wechat/tree/4.0.0-beta.1) (2017-08-31) +[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-alpha.2...4.0.0-beta.1) + +**Closed issues:** + +- http://easywechat.org/ 网站访问不了了? [\#896](https://github.com/overtrue/wechat/issues/896) +- 关于缓存,请问为什么key中包含appId \* 2,有什么讲究吗? [\#892](https://github.com/overtrue/wechat/issues/892) +- 小程序调用解密程序报-41003错误 [\#891](https://github.com/overtrue/wechat/issues/891) +- 小程序调用加密数据解密时报错,不存在方法 [\#890](https://github.com/overtrue/wechat/issues/890) +- 有关4.0使用文档的问题 [\#883](https://github.com/overtrue/wechat/issues/883) +- \[4.0\] PHP最低版本能否降到7.0 [\#880](https://github.com/overtrue/wechat/issues/880) + +**Merged pull requests:** + +- \[4.0\] Pass proper arguments to the Response constructor [\#895](https://github.com/overtrue/wechat/pull/895) ([edwardaa](https://github.com/edwardaa)) +- Fix baseUrl and json issues. [\#894](https://github.com/overtrue/wechat/pull/894) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#889](https://github.com/overtrue/wechat/pull/889) ([overtrue](https://github.com/overtrue)) +- Scrutinizer Auto-Fixes [\#885](https://github.com/overtrue/wechat/pull/885) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- Apply fixes from StyleCI [\#882](https://github.com/overtrue/wechat/pull/882) ([overtrue](https://github.com/overtrue)) +- 补充通用卡接口 [\#881](https://github.com/overtrue/wechat/pull/881) ([XiaoLer](https://github.com/XiaoLer)) +- Apply fixes from StyleCI [\#879](https://github.com/overtrue/wechat/pull/879) ([overtrue](https://github.com/overtrue)) +- \[3.1\] Payment/API 没有使用全局的 cache [\#878](https://github.com/overtrue/wechat/pull/878) ([edwardaa](https://github.com/edwardaa)) +- Add JSON\_UNESCAPED\_UNICODE option. [\#874](https://github.com/overtrue/wechat/pull/874) ([mingyoung](https://github.com/mingyoung)) +- update \_\_set\_state magic method to static [\#872](https://github.com/overtrue/wechat/pull/872) ([8090Lambert](https://github.com/8090Lambert)) + +## [4.0.0-alpha.2](https://github.com/overtrue/wechat/tree/4.0.0-alpha.2) (2017-08-20) +[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-alpha.1...4.0.0-alpha.2) + +**Closed issues:** + +- 你好,怎么用的 [\#869](https://github.com/overtrue/wechat/issues/869) + +**Merged pull requests:** + +- Tweak dir [\#871](https://github.com/overtrue/wechat/pull/871) ([mingyoung](https://github.com/mingyoung)) +- Fix mini-program guard. [\#870](https://github.com/overtrue/wechat/pull/870) ([mingyoung](https://github.com/mingyoung)) + +## [4.0.0-alpha.1](https://github.com/overtrue/wechat/tree/4.0.0-alpha.1) (2017-08-14) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.13...4.0.0-alpha.1) + +**Closed issues:** + +- 对doctrine/cache依赖的版本锁定 [\#867](https://github.com/overtrue/wechat/issues/867) + +## [3.3.13](https://github.com/overtrue/wechat/tree/3.3.13) (2017-08-13) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.12...3.3.13) + +**Closed issues:** + +- 文档中网页授权实例写的不明确 [\#850](https://github.com/overtrue/wechat/issues/850) +- \[意见\]作者能否提供getTokenFromServer方法扩展从外部第三方获取access\_token [\#837](https://github.com/overtrue/wechat/issues/837) +- invalid credential, access\_token is invalid or not latest [\#808](https://github.com/overtrue/wechat/issues/808) +- \[4.0\] 重构卡券 [\#806](https://github.com/overtrue/wechat/issues/806) +- \[4.0\] 重构 Broadcasting [\#805](https://github.com/overtrue/wechat/issues/805) +- \[4.0\] 变更日志 [\#746](https://github.com/overtrue/wechat/issues/746) + +**Merged pull requests:** + +- Fixed open-platform authorizer server token. [\#866](https://github.com/overtrue/wechat/pull/866) ([mingyoung](https://github.com/mingyoung)) +- payment\ClientTest 优化 [\#865](https://github.com/overtrue/wechat/pull/865) ([tianyong90](https://github.com/tianyong90)) +- Apply fixes from StyleCI [\#864](https://github.com/overtrue/wechat/pull/864) ([overtrue](https://github.com/overtrue)) +- 退款通知处理及相关单元测试 [\#863](https://github.com/overtrue/wechat/pull/863) ([tianyong90](https://github.com/tianyong90)) +- Apply fixes from StyleCI [\#862](https://github.com/overtrue/wechat/pull/862) ([overtrue](https://github.com/overtrue)) +- Update dependence version. [\#861](https://github.com/overtrue/wechat/pull/861) ([mingyoung](https://github.com/mingyoung)) +- Add tests. [\#859](https://github.com/overtrue/wechat/pull/859) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#857](https://github.com/overtrue/wechat/pull/857) ([overtrue](https://github.com/overtrue)) +- Payment 单元测试优化 [\#856](https://github.com/overtrue/wechat/pull/856) ([tianyong90](https://github.com/tianyong90)) +- Apply fixes from StyleCI [\#855](https://github.com/overtrue/wechat/pull/855) ([overtrue](https://github.com/overtrue)) +- lists 方法重命名为 list,相关单元测试调整 [\#853](https://github.com/overtrue/wechat/pull/853) ([tianyong90](https://github.com/tianyong90)) +- Apply fixes from StyleCI [\#852](https://github.com/overtrue/wechat/pull/852) ([overtrue](https://github.com/overtrue)) +- Payment 单元测试及部分问题修复 [\#851](https://github.com/overtrue/wechat/pull/851) ([tianyong90](https://github.com/tianyong90)) +- Apply fixes from StyleCI [\#848](https://github.com/overtrue/wechat/pull/848) ([overtrue](https://github.com/overtrue)) +- 调整 Payment\BaseClient 注入的 $app 类型 [\#847](https://github.com/overtrue/wechat/pull/847) ([tianyong90](https://github.com/tianyong90)) +- array\_merge 方法参数类型转换, type hints [\#846](https://github.com/overtrue/wechat/pull/846) ([tianyong90](https://github.com/tianyong90)) +- Fix oauth. [\#845](https://github.com/overtrue/wechat/pull/845) ([mingyoung](https://github.com/mingyoung)) +- Text message. [\#844](https://github.com/overtrue/wechat/pull/844) ([mingyoung](https://github.com/mingyoung)) +- Rename BaseService -\> BasicService. [\#843](https://github.com/overtrue/wechat/pull/843) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#842](https://github.com/overtrue/wechat/pull/842) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#841](https://github.com/overtrue/wechat/pull/841) ([overtrue](https://github.com/overtrue)) +- phpdoc types。 [\#840](https://github.com/overtrue/wechat/pull/840) ([tianyong90](https://github.com/tianyong90)) +- Apply fixes from StyleCI [\#839](https://github.com/overtrue/wechat/pull/839) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#836](https://github.com/overtrue/wechat/pull/836) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#835](https://github.com/overtrue/wechat/pull/835) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#833](https://github.com/overtrue/wechat/pull/833) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#831](https://github.com/overtrue/wechat/pull/831) ([overtrue](https://github.com/overtrue)) + +## [3.3.12](https://github.com/overtrue/wechat/tree/3.3.12) (2017-08-01) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.11...3.3.12) + +**Closed issues:** + +- 能否整合微信开放平台在给出一套demo [\#816](https://github.com/overtrue/wechat/issues/816) +- 请教这个项目的支付部分,尤其是签名和结果回调,是否支持小程序? [\#814](https://github.com/overtrue/wechat/issues/814) +- 微信意图识别接口返回invalid param [\#804](https://github.com/overtrue/wechat/issues/804) +- 返回param invalid [\#803](https://github.com/overtrue/wechat/issues/803) + +**Merged pull requests:** + +- change comment word [\#830](https://github.com/overtrue/wechat/pull/830) ([tianyong90](https://github.com/tianyong90)) +- Fix getTicket. [\#829](https://github.com/overtrue/wechat/pull/829) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#827](https://github.com/overtrue/wechat/pull/827) ([overtrue](https://github.com/overtrue)) +- 修正 HasAttributes Trait 引用错误 [\#825](https://github.com/overtrue/wechat/pull/825) ([tianyong90](https://github.com/tianyong90)) +- Apply fixes from StyleCI [\#824](https://github.com/overtrue/wechat/pull/824) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#822](https://github.com/overtrue/wechat/pull/822) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#820](https://github.com/overtrue/wechat/pull/820) ([mingyoung](https://github.com/mingyoung)) +- Add subscribe message. [\#819](https://github.com/overtrue/wechat/pull/819) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#818](https://github.com/overtrue/wechat/pull/818) ([mingyoung](https://github.com/mingyoung)) +- 微信开放平台帐号管理 [\#817](https://github.com/overtrue/wechat/pull/817) ([XiaoLer](https://github.com/XiaoLer)) +- add method in comment [\#813](https://github.com/overtrue/wechat/pull/813) ([HanSon](https://github.com/HanSon)) +- fixed guzzle version [\#812](https://github.com/overtrue/wechat/pull/812) ([HanSon](https://github.com/HanSon)) +- Apply fixes from StyleCI [\#811](https://github.com/overtrue/wechat/pull/811) ([mingyoung](https://github.com/mingyoung)) +- Downgrade to php 7.0 [\#809](https://github.com/overtrue/wechat/pull/809) ([HanSon](https://github.com/HanSon)) + +## [3.3.11](https://github.com/overtrue/wechat/tree/3.3.11) (2017-07-17) +[Full Changelog](https://github.com/overtrue/wechat/compare/4.0.0-alpha1...3.3.11) + +**Closed issues:** + +- 请添加 「退款原因」 参数 [\#802](https://github.com/overtrue/wechat/issues/802) + +## [4.0.0-alpha1](https://github.com/overtrue/wechat/tree/4.0.0-alpha1) (2017-07-17) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.10...4.0.0-alpha1) + +**Closed issues:** + +- Overtrue\Wechat\Media not found [\#801](https://github.com/overtrue/wechat/issues/801) +- 在微信的接口配置时Token 无效,可任意输入 [\#800](https://github.com/overtrue/wechat/issues/800) + +## [3.3.10](https://github.com/overtrue/wechat/tree/3.3.10) (2017-07-13) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.9...3.3.10) + +**Closed issues:** + +- 第三方平台refresh\_token的保存问题 [\#798](https://github.com/overtrue/wechat/issues/798) +- 网页授权共享session已晚 [\#792](https://github.com/overtrue/wechat/issues/792) + +**Merged pull requests:** + +- 临时二维码也是支持scene\_str的,这里补充上 [\#797](https://github.com/overtrue/wechat/pull/797) ([lornewang](https://github.com/lornewang)) +- Apply fixes from StyleCI [\#795](https://github.com/overtrue/wechat/pull/795) ([overtrue](https://github.com/overtrue)) +- add card message type [\#794](https://github.com/overtrue/wechat/pull/794) ([IanGely](https://github.com/IanGely)) +- add staff message type wxcard [\#793](https://github.com/overtrue/wechat/pull/793) ([IanGely](https://github.com/IanGely)) + +## [3.3.9](https://github.com/overtrue/wechat/tree/3.3.9) (2017-07-07) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.8...3.3.9) + +**Closed issues:** + +- \[4.0\] Http 模块 [\#678](https://github.com/overtrue/wechat/issues/678) +- \[4.0\] Http 请求类 [\#582](https://github.com/overtrue/wechat/issues/582) + +**Merged pull requests:** + +- Apply fixes from StyleCI [\#791](https://github.com/overtrue/wechat/pull/791) ([overtrue](https://github.com/overtrue)) +- Add get user portrait method. [\#790](https://github.com/overtrue/wechat/pull/790) ([getive](https://github.com/getive)) +- \[Feature\] Move directories [\#789](https://github.com/overtrue/wechat/pull/789) ([overtrue](https://github.com/overtrue)) +- \[Feature\] Move traits to kernel. [\#788](https://github.com/overtrue/wechat/pull/788) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#787](https://github.com/overtrue/wechat/pull/787) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#786](https://github.com/overtrue/wechat/pull/786) ([overtrue](https://github.com/overtrue)) + +## [3.3.8](https://github.com/overtrue/wechat/tree/3.3.8) (2017-07-07) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.7...3.3.8) + +**Closed issues:** + +- $temporary-\>getStream\($media\_id\) 与 file\_get\_contents\(\) 有区别??? [\#742](https://github.com/overtrue/wechat/issues/742) + +## [3.3.7](https://github.com/overtrue/wechat/tree/3.3.7) (2017-07-06) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.6...3.3.7) + +**Closed issues:** + +- 多添加一个$option [\#772](https://github.com/overtrue/wechat/issues/772) +- 消息群发,指定openid群发视频时,微信报错invalid message type hint: \[JUs0Oa0779ge25\] [\#757](https://github.com/overtrue/wechat/issues/757) + +## [3.3.6](https://github.com/overtrue/wechat/tree/3.3.6) (2017-07-06) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.5...3.3.6) + +**Fixed bugs:** + +- 素材管理,如果media\_id不存在会保存网页返回的错误代码 [\#592](https://github.com/overtrue/wechat/issues/592) + +**Closed issues:** + +- https://easywechat.org网站证书刚过期了,知会作者一声 [\#781](https://github.com/overtrue/wechat/issues/781) +- access\_token 是否能不内部主动请求微信 [\#778](https://github.com/overtrue/wechat/issues/778) +- 门店创建API \($poi-\>create\) 建议返回 poi\_id / exception [\#774](https://github.com/overtrue/wechat/issues/774) +- 扩展门店小程序错误 [\#762](https://github.com/overtrue/wechat/issues/762) +- \[4.0\] jssdk 抽出独立模块 [\#754](https://github.com/overtrue/wechat/issues/754) +- \[4.0\] 消息加密解密模块提取到 Kernel [\#753](https://github.com/overtrue/wechat/issues/753) +- 网页能授权但无法获取用户信息,代码跟官方文档一样。 [\#713](https://github.com/overtrue/wechat/issues/713) + +**Merged pull requests:** + +- Feature: BaseService. [\#785](https://github.com/overtrue/wechat/pull/785) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#784](https://github.com/overtrue/wechat/pull/784) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#783](https://github.com/overtrue/wechat/pull/783) ([mingyoung](https://github.com/mingyoung)) + +## [3.3.5](https://github.com/overtrue/wechat/tree/3.3.5) (2017-07-04) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.4...3.3.5) + +**Implemented enhancements:** + +- 并发下access\_token存在脏写隐患 [\#696](https://github.com/overtrue/wechat/issues/696) + +**Merged pull requests:** + +- Apply fixes from StyleCI [\#780](https://github.com/overtrue/wechat/pull/780) ([overtrue](https://github.com/overtrue)) + +## [3.3.4](https://github.com/overtrue/wechat/tree/3.3.4) (2017-07-04) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.3...3.3.4) + +**Closed issues:** + +- 网页授权获取用户信息无法打开授权页面 [\#773](https://github.com/overtrue/wechat/issues/773) +- Class 'EasyWechat\Foundation\Application' not found [\#769](https://github.com/overtrue/wechat/issues/769) +- 获取小程序二维码报错 [\#766](https://github.com/overtrue/wechat/issues/766) +- Call to undefined method EasyWeChat\Server\Guard::setRequest\(\) [\#765](https://github.com/overtrue/wechat/issues/765) +- 网页授权问题,提示scopes类型错误 [\#764](https://github.com/overtrue/wechat/issues/764) +- 门店小程序扩展错误问题 [\#763](https://github.com/overtrue/wechat/issues/763) +- 微信开发者平台,全网发布怎么通过 [\#761](https://github.com/overtrue/wechat/issues/761) +- 微信网页授权重复请求报code无效 [\#714](https://github.com/overtrue/wechat/issues/714) + +**Merged pull requests:** + +- 新版客服功能-获取聊天记录 [\#775](https://github.com/overtrue/wechat/pull/775) ([wuwenbao](https://github.com/wuwenbao)) +- Fix mini-program qrcode. [\#768](https://github.com/overtrue/wechat/pull/768) ([mingyoung](https://github.com/mingyoung)) +- Add code comments [\#756](https://github.com/overtrue/wechat/pull/756) ([daxiong123](https://github.com/daxiong123)) + +## [3.3.3](https://github.com/overtrue/wechat/tree/3.3.3) (2017-06-22) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.2...3.3.3) + +**Implemented enhancements:** + +- \[4.0\] Trait HasHttpRequests [\#671](https://github.com/overtrue/wechat/issues/671) +- \[4.0\] 缓存抽象成 trait: InteractsWithCache [\#670](https://github.com/overtrue/wechat/issues/670) +- \[4.0\] 返回值类型可配置 [\#661](https://github.com/overtrue/wechat/issues/661) +- \[4.0\] 报错信息可选 [\#596](https://github.com/overtrue/wechat/issues/596) +- \[4.0\] 简化并完善开发者配置项 [\#584](https://github.com/overtrue/wechat/issues/584) + +**Fixed bugs:** + +- open\_platform.oauth 过早的获取 access token [\#701](https://github.com/overtrue/wechat/issues/701) + +**Closed issues:** + +- 微信网页支付配置生成 [\#751](https://github.com/overtrue/wechat/issues/751) +- configForJSSDKPayment [\#744](https://github.com/overtrue/wechat/issues/744) +- 发现微信上有管理公众号留言的接口,不知道是不是新出的 [\#721](https://github.com/overtrue/wechat/issues/721) +- oauth能获取用户信息,再通过access\_token与用户openid去获取信息,部分用户的信息为空 [\#720](https://github.com/overtrue/wechat/issues/720) +- 接入多个公众号 [\#718](https://github.com/overtrue/wechat/issues/718) +- guzzle curl error28 - 去哪设置默认timeout ? [\#715](https://github.com/overtrue/wechat/issues/715) +- 使用$server-\>getMessage\(\);报错 [\#712](https://github.com/overtrue/wechat/issues/712) +- 怎样从数据库中调取配置 [\#711](https://github.com/overtrue/wechat/issues/711) +- \[4.0\] 支持企业微信 [\#707](https://github.com/overtrue/wechat/issues/707) +- defaultColor does not work. [\#703](https://github.com/overtrue/wechat/issues/703) +- 是否支持H5支付 [\#694](https://github.com/overtrue/wechat/issues/694) +- 生成AccessToken时,似乎没有调用自定义缓存的delete方法 [\#693](https://github.com/overtrue/wechat/issues/693) +- \[4.0\] PSR-6 缓存接口 [\#692](https://github.com/overtrue/wechat/issues/692) +- 微信支付沙盒模式支持配置文件配置 [\#690](https://github.com/overtrue/wechat/issues/690) +- \[4.0\] 优化服务提供器结构 [\#689](https://github.com/overtrue/wechat/issues/689) +- 强制项目不要自动获取AccessToken [\#688](https://github.com/overtrue/wechat/issues/688) +- 小程序解密$encryptedData数据 [\#687](https://github.com/overtrue/wechat/issues/687) +- 微信坑爹timestamp已经解决不需要configForJSSDKPayment改变timestamp中s大小写 [\#686](https://github.com/overtrue/wechat/issues/686) +- \[4.0\] 所有 API 改名为 Client. [\#677](https://github.com/overtrue/wechat/issues/677) +- sandbox\_signkey 过期 [\#675](https://github.com/overtrue/wechat/issues/675) +- 接口配置失败 [\#672](https://github.com/overtrue/wechat/issues/672) +- 下载语音文件偶尔报错:ErrorException: is\_readable\(\) expects parameter 1 to be a valid path [\#667](https://github.com/overtrue/wechat/issues/667) +- 微信支付沙箱地址混乱 [\#665](https://github.com/overtrue/wechat/issues/665) +- 开放平台自动回复出错,提示“该服务号暂时无法提供服务” [\#654](https://github.com/overtrue/wechat/issues/654) +- \[4.0\]自定义微信API的区域接入点 [\#636](https://github.com/overtrue/wechat/issues/636) +- 在命令行使用easywechat如何关闭日志 [\#601](https://github.com/overtrue/wechat/issues/601) +- \[4.0\] PHP 版本最低要求 7.1 [\#586](https://github.com/overtrue/wechat/issues/586) +- \[4.0\] 简化微信 API 请求 [\#583](https://github.com/overtrue/wechat/issues/583) +- \[4.0\] 自定义 endpoint [\#521](https://github.com/overtrue/wechat/issues/521) + +**Merged pull requests:** + +- Apply fixes from StyleCI [\#750](https://github.com/overtrue/wechat/pull/750) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#749](https://github.com/overtrue/wechat/pull/749) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#747](https://github.com/overtrue/wechat/pull/747) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#745](https://github.com/overtrue/wechat/pull/745) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#740](https://github.com/overtrue/wechat/pull/740) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#737](https://github.com/overtrue/wechat/pull/737) ([mingyoung](https://github.com/mingyoung)) +- 分模块静态调用 [\#734](https://github.com/overtrue/wechat/pull/734) ([mingyoung](https://github.com/mingyoung)) +- Revert "Apply fixes from StyleCI" [\#731](https://github.com/overtrue/wechat/pull/731) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#730](https://github.com/overtrue/wechat/pull/730) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#729](https://github.com/overtrue/wechat/pull/729) ([overtrue](https://github.com/overtrue)) +- Revert "Apply fixes from StyleCI" [\#728](https://github.com/overtrue/wechat/pull/728) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#727](https://github.com/overtrue/wechat/pull/727) ([overtrue](https://github.com/overtrue)) +- 修复Https 请求判断不准 [\#726](https://github.com/overtrue/wechat/pull/726) ([xutl](https://github.com/xutl)) +- Apply fixes from StyleCI [\#725](https://github.com/overtrue/wechat/pull/725) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#724](https://github.com/overtrue/wechat/pull/724) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#723](https://github.com/overtrue/wechat/pull/723) ([mingyoung](https://github.com/mingyoung)) +- Correction notes [\#722](https://github.com/overtrue/wechat/pull/722) ([PersiLiao](https://github.com/PersiLiao)) +- Apply fixes from StyleCI [\#717](https://github.com/overtrue/wechat/pull/717) ([mingyoung](https://github.com/mingyoung)) +- 新增图文消息留言管理接口 [\#716](https://github.com/overtrue/wechat/pull/716) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#710](https://github.com/overtrue/wechat/pull/710) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#709](https://github.com/overtrue/wechat/pull/709) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#708](https://github.com/overtrue/wechat/pull/708) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#706](https://github.com/overtrue/wechat/pull/706) ([overtrue](https://github.com/overtrue)) +- 命令行下不打印日志 [\#705](https://github.com/overtrue/wechat/pull/705) ([mingyoung](https://github.com/mingyoung)) +- add defaultColor [\#704](https://github.com/overtrue/wechat/pull/704) ([damonto](https://github.com/damonto)) +- Fix [\#702](https://github.com/overtrue/wechat/pull/702) ([mingyoung](https://github.com/mingyoung)) +- Add api. [\#700](https://github.com/overtrue/wechat/pull/700) ([mingyoung](https://github.com/mingyoung)) +- Rename method. [\#699](https://github.com/overtrue/wechat/pull/699) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#698](https://github.com/overtrue/wechat/pull/698) ([mingyoung](https://github.com/mingyoung)) +- 修正素材管理中的返回值文档注释,正确的类型应该是集合,而不是字符串。 [\#695](https://github.com/overtrue/wechat/pull/695) ([starlight36](https://github.com/starlight36)) +- Payment sandbox config. [\#691](https://github.com/overtrue/wechat/pull/691) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#684](https://github.com/overtrue/wechat/pull/684) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#683](https://github.com/overtrue/wechat/pull/683) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#682](https://github.com/overtrue/wechat/pull/682) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#681](https://github.com/overtrue/wechat/pull/681) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#680](https://github.com/overtrue/wechat/pull/680) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#679](https://github.com/overtrue/wechat/pull/679) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#676](https://github.com/overtrue/wechat/pull/676) ([mingyoung](https://github.com/mingyoung)) +- checks via composer. [\#673](https://github.com/overtrue/wechat/pull/673) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#668](https://github.com/overtrue/wechat/pull/668) ([overtrue](https://github.com/overtrue)) +- Correct payment sandbox endpoint and add a method to get sandbox sign key [\#666](https://github.com/overtrue/wechat/pull/666) ([skyred](https://github.com/skyred)) + +## [3.3.2](https://github.com/overtrue/wechat/tree/3.3.2) (2017-04-27) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.1...3.3.2) + +**Implemented enhancements:** + +- \[4.0\] Open Platform 模块 [\#587](https://github.com/overtrue/wechat/issues/587) +- \[4.0\] 微信支付 sandbox模式 [\#507](https://github.com/overtrue/wechat/issues/507) + +**Closed issues:** + +- \[4.0\] staff 模块改名为 customer service [\#585](https://github.com/overtrue/wechat/issues/585) + +**Merged pull requests:** + +- Module rename. [\#664](https://github.com/overtrue/wechat/pull/664) ([mingyoung](https://github.com/mingyoung)) +- Merge branch master into branch develop. [\#663](https://github.com/overtrue/wechat/pull/663) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#662](https://github.com/overtrue/wechat/pull/662) ([mingyoung](https://github.com/mingyoung)) +- Fix payment tools API [\#660](https://github.com/overtrue/wechat/pull/660) ([mingyoung](https://github.com/mingyoung)) +- Avoid ambiguity [\#659](https://github.com/overtrue/wechat/pull/659) ([mingyoung](https://github.com/mingyoung)) +- Support Payment Sandbox mode [\#658](https://github.com/overtrue/wechat/pull/658) ([skyred](https://github.com/skyred)) +- Apply fixes from StyleCI [\#656](https://github.com/overtrue/wechat/pull/656) ([overtrue](https://github.com/overtrue)) +- Mini program datacube. [\#655](https://github.com/overtrue/wechat/pull/655) ([mingyoung](https://github.com/mingyoung)) + +## [3.3.1](https://github.com/overtrue/wechat/tree/3.3.1) (2017-04-16) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.3.0...3.3.1) + +**Closed issues:** + +- 微信第三方平台缓存位置,是否可以在配置文件中自定义 [\#648](https://github.com/overtrue/wechat/issues/648) +- 微信开放平台authorizer token缓存问题 [\#644](https://github.com/overtrue/wechat/issues/644) +- 微信开放平台发起网页授权bug [\#638](https://github.com/overtrue/wechat/issues/638) +- 微信公众号不能回复接收到的消息,日志无报错 [\#637](https://github.com/overtrue/wechat/issues/637) +- \[4.0\]黑名单管理 [\#538](https://github.com/overtrue/wechat/issues/538) + +**Merged pull requests:** + +- optimizes [\#652](https://github.com/overtrue/wechat/pull/652) ([mingyoung](https://github.com/mingyoung)) + +## [3.3.0](https://github.com/overtrue/wechat/tree/3.3.0) (2017-04-13) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.7...3.3.0) + +**Closed issues:** + +- 微信接口获取openid是怎么排序的? [\#650](https://github.com/overtrue/wechat/issues/650) +- 缺少网页扫码支付接口 [\#647](https://github.com/overtrue/wechat/issues/647) +- 微信下的单的默认过期时间是多少啊 [\#645](https://github.com/overtrue/wechat/issues/645) +- 在获取用户信息是出错 [\#643](https://github.com/overtrue/wechat/issues/643) +- 调用$app =app\('wechat'\);时报错Use of undefined constant CURLOPT\_IPRESOLVE - assumed 'CURLOPT\_IPRESOLVE' [\#633](https://github.com/overtrue/wechat/issues/633) +- 提示找不到EasyWeChat\Server\Guard::setRequest\(\)方法 [\#626](https://github.com/overtrue/wechat/issues/626) +- 开放平台接收ComponentVerifyTicket,会出现Undefined index: FromUserName [\#623](https://github.com/overtrue/wechat/issues/623) +- 美国移动网络获取不到accessToken [\#610](https://github.com/overtrue/wechat/issues/610) +- 开放平台 APP 微信登录 [\#604](https://github.com/overtrue/wechat/issues/604) + +**Merged pull requests:** + +- Merge from open-platform branch. [\#651](https://github.com/overtrue/wechat/pull/651) ([mingyoung](https://github.com/mingyoung)) +- Update code for open-platform [\#649](https://github.com/overtrue/wechat/pull/649) ([mingyoung](https://github.com/mingyoung)) +- Code cleanup & refactoring. [\#646](https://github.com/overtrue/wechat/pull/646) ([mingyoung](https://github.com/mingyoung)) +- support cash coupon [\#642](https://github.com/overtrue/wechat/pull/642) ([HanSon](https://github.com/HanSon)) +- ♻️ All tests have been namespaced. [\#641](https://github.com/overtrue/wechat/pull/641) ([mingyoung](https://github.com/mingyoung)) +- tweak code. [\#640](https://github.com/overtrue/wechat/pull/640) ([mingyoung](https://github.com/mingyoung)) +- modify oauth property [\#639](https://github.com/overtrue/wechat/pull/639) ([jekst](https://github.com/jekst)) +- Apply fixes from StyleCI [\#635](https://github.com/overtrue/wechat/pull/635) ([overtrue](https://github.com/overtrue)) +- ✨ Blacklist. [\#634](https://github.com/overtrue/wechat/pull/634) ([mingyoung](https://github.com/mingyoung)) +- 🔨 Refactoring for mini-program. [\#632](https://github.com/overtrue/wechat/pull/632) ([mingyoung](https://github.com/mingyoung)) + +## [3.2.7](https://github.com/overtrue/wechat/tree/3.2.7) (2017-03-31) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.6...3.2.7) + +**Closed issues:** + +- 不管哪个公众号,只要填写 这个接口地址,都能配置或应用成功,实际上是不成功的,不到怎么找错。。 [\#611](https://github.com/overtrue/wechat/issues/611) + +**Merged pull requests:** + +- 修复一个创建卡券时的 bug, 添加获取微信门店类目表的api [\#631](https://github.com/overtrue/wechat/pull/631) ([Hexor](https://github.com/Hexor)) + +## [3.2.6](https://github.com/overtrue/wechat/tree/3.2.6) (2017-03-31) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.5...3.2.6) + +**Closed issues:** + +- 我想大量发模板消息,但send每次都等待返回太慢,有啥解决办法吗? [\#630](https://github.com/overtrue/wechat/issues/630) +- 3.2开放平台缺少authorizer\_token和authorization [\#629](https://github.com/overtrue/wechat/issues/629) +- 微信开发平台接受消息报Invalid request signature bug [\#625](https://github.com/overtrue/wechat/issues/625) +- 图文上传thumb\_media\_id 返回 {"errcode":40007,"errmsg":"invalid media\_id hint: \[\]"} [\#622](https://github.com/overtrue/wechat/issues/622) +- Encryptor基类hack导致小程序的sessionKey base64\_decode失败 [\#614](https://github.com/overtrue/wechat/issues/614) +- 是否有 2.1 升级到最新版的方案? [\#609](https://github.com/overtrue/wechat/issues/609) +- laravel5.3 安装 "overtrue/wechat:~3.1 失败 [\#607](https://github.com/overtrue/wechat/issues/607) +- overtrue/wechat和phpdoc包依赖冲突。 [\#605](https://github.com/overtrue/wechat/issues/605) +- \[bug\]2个问题 [\#597](https://github.com/overtrue/wechat/issues/597) +- 微信第三方平台开发是否只做了一部分? [\#594](https://github.com/overtrue/wechat/issues/594) +- \[4.0\] ServiceProvider 移动到各自模块里 [\#588](https://github.com/overtrue/wechat/issues/588) +- Cannot use EasyWeChat\OpenPlatform\Traits\VerifyTicket as VerifyTicket because the name is already in use [\#579](https://github.com/overtrue/wechat/issues/579) +- 授权state值怎么设置 [\#573](https://github.com/overtrue/wechat/issues/573) +- mini\_app get jscode problem, report appid & secret value is null [\#569](https://github.com/overtrue/wechat/issues/569) +- 小程序生成二维码问题 [\#568](https://github.com/overtrue/wechat/issues/568) + +**Merged pull requests:** + +- Update OpenPlatform AppId [\#624](https://github.com/overtrue/wechat/pull/624) ([jeftom](https://github.com/jeftom)) +- Apply fixes from StyleCI [\#621](https://github.com/overtrue/wechat/pull/621) ([overtrue](https://github.com/overtrue)) +- Apply fixes from StyleCI [\#618](https://github.com/overtrue/wechat/pull/618) ([overtrue](https://github.com/overtrue)) +- Compatible with php5.5 [\#617](https://github.com/overtrue/wechat/pull/617) ([mingyoung](https://github.com/mingyoung)) +- Make the testcase works. [\#616](https://github.com/overtrue/wechat/pull/616) ([mingyoung](https://github.com/mingyoung)) +- Fix mini-program decryptor [\#615](https://github.com/overtrue/wechat/pull/615) ([mingyoung](https://github.com/mingyoung)) +- Missing message handling [\#613](https://github.com/overtrue/wechat/pull/613) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#612](https://github.com/overtrue/wechat/pull/612) ([overtrue](https://github.com/overtrue)) +- 添加卡券创建二维码接口 [\#608](https://github.com/overtrue/wechat/pull/608) ([forecho](https://github.com/forecho)) +- 开放平台大幅重构并且添加测试 [\#606](https://github.com/overtrue/wechat/pull/606) ([tsunamilx](https://github.com/tsunamilx)) +- Update MessageBuilder.php [\#603](https://github.com/overtrue/wechat/pull/603) ([U2Fsd](https://github.com/U2Fsd)) +- 生成 js添加到卡包接口 增加fixed\_begintimestamp、outer\_str字段 [\#602](https://github.com/overtrue/wechat/pull/602) ([gychg](https://github.com/gychg)) +- tests for speed [\#600](https://github.com/overtrue/wechat/pull/600) ([mingyoung](https://github.com/mingyoung)) +- Update test files [\#599](https://github.com/overtrue/wechat/pull/599) ([mingyoung](https://github.com/mingyoung)) +- 允许自定义ticket缓存key [\#598](https://github.com/overtrue/wechat/pull/598) ([XiaoLer](https://github.com/XiaoLer)) +- delete top color [\#595](https://github.com/overtrue/wechat/pull/595) ([HanSon](https://github.com/HanSon)) +- Add payment scan notify handler [\#593](https://github.com/overtrue/wechat/pull/593) ([acgrid](https://github.com/acgrid)) +- Apply fixes from StyleCI [\#591](https://github.com/overtrue/wechat/pull/591) ([overtrue](https://github.com/overtrue)) +- Upgrade packages version to 4.0 [\#590](https://github.com/overtrue/wechat/pull/590) ([reatang](https://github.com/reatang)) +- Move providers to module dir. \#588 [\#589](https://github.com/overtrue/wechat/pull/589) ([overtrue](https://github.com/overtrue)) +- 把OpenPlatform中的组件依赖解耦 [\#581](https://github.com/overtrue/wechat/pull/581) ([reatang](https://github.com/reatang)) + +## [3.2.5](https://github.com/overtrue/wechat/tree/3.2.5) (2017-02-04) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.4...3.2.5) + +**Merged pull requests:** + +- fix naming [\#580](https://github.com/overtrue/wechat/pull/580) ([mingyoung](https://github.com/mingyoung)) +- Allow client code configure its own GuzzleHTTP handler [\#578](https://github.com/overtrue/wechat/pull/578) ([acgrid](https://github.com/acgrid)) + +## [3.2.4](https://github.com/overtrue/wechat/tree/3.2.4) (2017-01-24) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.3...3.2.4) + +**Closed issues:** + +- 如何在其他框架下使用$app-\>payment-\>handleNotify [\#574](https://github.com/overtrue/wechat/issues/574) +- 前后端分离单页下获取的config,认证失败 [\#565](https://github.com/overtrue/wechat/issues/565) +- 支付签名错误 [\#563](https://github.com/overtrue/wechat/issues/563) + +**Merged pull requests:** + +- Update Authorizer.php [\#577](https://github.com/overtrue/wechat/pull/577) ([ww380459000](https://github.com/ww380459000)) +- 补全通用卡接口 [\#575](https://github.com/overtrue/wechat/pull/575) ([XiaoLer](https://github.com/XiaoLer)) +- require ext-SimpleXML [\#572](https://github.com/overtrue/wechat/pull/572) ([garveen](https://github.com/garveen)) +- fix README Contribution link [\#571](https://github.com/overtrue/wechat/pull/571) ([zhwei](https://github.com/zhwei)) +- Add user data decryption. [\#570](https://github.com/overtrue/wechat/pull/570) ([mingyoung](https://github.com/mingyoung)) +- change request parameter [\#567](https://github.com/overtrue/wechat/pull/567) ([cloudsthere](https://github.com/cloudsthere)) +- 完善小程序代码 [\#566](https://github.com/overtrue/wechat/pull/566) ([mingyoung](https://github.com/mingyoung)) +- 添加小程序支持 [\#564](https://github.com/overtrue/wechat/pull/564) ([mingyoung](https://github.com/mingyoung)) + +## [3.2.3](https://github.com/overtrue/wechat/tree/3.2.3) (2017-01-04) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.2...3.2.3) + +**Closed issues:** + +- 文档里的自定义菜单中,group\_id是否为tag\_id的误写? [\#561](https://github.com/overtrue/wechat/issues/561) +- Open Platform有简明的使用文档吗?3ks [\#560](https://github.com/overtrue/wechat/issues/560) +- 刷新access\_token有效期,未发现有相关的封装 [\#540](https://github.com/overtrue/wechat/issues/540) + +**Merged pull requests:** + +- Update Card.php [\#562](https://github.com/overtrue/wechat/pull/562) ([XiaoLer](https://github.com/XiaoLer)) +- Apply fixes from StyleCI [\#559](https://github.com/overtrue/wechat/pull/559) ([overtrue](https://github.com/overtrue)) +- Update API.php [\#558](https://github.com/overtrue/wechat/pull/558) ([drogjh](https://github.com/drogjh)) +- optimized code [\#557](https://github.com/overtrue/wechat/pull/557) ([mingyoung](https://github.com/mingyoung)) + +## [3.2.2](https://github.com/overtrue/wechat/tree/3.2.2) (2016-12-27) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.1...3.2.2) + +**Closed issues:** + +- How to get authorize url? [\#555](https://github.com/overtrue/wechat/issues/555) + +**Merged pull requests:** + +- fixed downloadBill method result [\#556](https://github.com/overtrue/wechat/pull/556) ([hidehalo](https://github.com/hidehalo)) +- add config:log.permission for monolog [\#554](https://github.com/overtrue/wechat/pull/554) ([woshizoufeng](https://github.com/woshizoufeng)) +- Improve open platform support. [\#553](https://github.com/overtrue/wechat/pull/553) ([mingyoung](https://github.com/mingyoung)) +- Improve. [\#552](https://github.com/overtrue/wechat/pull/552) ([mingyoung](https://github.com/mingyoung)) +- add $forceRefresh param to js-\>ticket\(\) method [\#551](https://github.com/overtrue/wechat/pull/551) ([leo108](https://github.com/leo108)) + +## [3.2.1](https://github.com/overtrue/wechat/tree/3.2.1) (2016-12-20) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.2.0...3.2.1) + +**Merged pull requests:** + +- 增加小程序用jscode获取用户信息的接口 [\#550](https://github.com/overtrue/wechat/pull/550) ([soone](https://github.com/soone)) + +## [3.2.0](https://github.com/overtrue/wechat/tree/3.2.0) (2016-12-19) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.9...3.2.0) + +**Closed issues:** + +- 喵喵喵 [\#545](https://github.com/overtrue/wechat/issues/545) +- HttpException with uploadArticle API [\#544](https://github.com/overtrue/wechat/issues/544) +- 是否有接入小程序的计划 [\#543](https://github.com/overtrue/wechat/issues/543) +- "Call to undefined method Overtrue\Socialite\Providers\WeChat Provider::driver\(\) [\#536](https://github.com/overtrue/wechat/issues/536) +- 服务端Server模块回复音乐消息出错 [\#533](https://github.com/overtrue/wechat/issues/533) +- 用户授权出现The key "access\_token" could not be empty [\#527](https://github.com/overtrue/wechat/issues/527) + +**Merged pull requests:** + +- Apply fixes from StyleCI [\#549](https://github.com/overtrue/wechat/pull/549) ([overtrue](https://github.com/overtrue)) +- 添加摇一摇周边模块 [\#548](https://github.com/overtrue/wechat/pull/548) ([allen05ren](https://github.com/allen05ren)) +- Make some compatible. [\#542](https://github.com/overtrue/wechat/pull/542) ([mingyoung](https://github.com/mingyoung)) +- Apply fixes from StyleCI [\#541](https://github.com/overtrue/wechat/pull/541) ([overtrue](https://github.com/overtrue)) +- 改变了http 中 json 方法的接口, 从而支持 添加 添加 query参数 [\#539](https://github.com/overtrue/wechat/pull/539) ([shoaly](https://github.com/shoaly)) +- 提交 [\#537](https://github.com/overtrue/wechat/pull/537) ([shoaly](https://github.com/shoaly)) +- Apply fixes from StyleCI [\#535](https://github.com/overtrue/wechat/pull/535) ([overtrue](https://github.com/overtrue)) + +## [3.1.9](https://github.com/overtrue/wechat/tree/3.1.9) (2016-12-01) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.8...3.1.9) + +**Closed issues:** + +- 还是不懂怎么获取unionid [\#531](https://github.com/overtrue/wechat/issues/531) +- Scope 参数错误或没有 Scope 权限 [\#528](https://github.com/overtrue/wechat/issues/528) +- $\_SERVER\['SERVER\_ADDR'\] 在mac php7中获取不到 [\#520](https://github.com/overtrue/wechat/issues/520) +- 能否永久素材其他类型封装个download方法,跟临时一样 [\#505](https://github.com/overtrue/wechat/issues/505) +- V3.1 JSSDK使用疑惑 [\#503](https://github.com/overtrue/wechat/issues/503) +- 如何加入QQ群 [\#501](https://github.com/overtrue/wechat/issues/501) +- 能否在下一个版本把企业的相关接口整合集成进去 [\#496](https://github.com/overtrue/wechat/issues/496) +- 既然使用了monolog,那么在Application::initializeLogger只使用了文件流的特定形式来记录日志是否合理? [\#494](https://github.com/overtrue/wechat/issues/494) +- configForShareAddress [\#482](https://github.com/overtrue/wechat/issues/482) +- 更新微信文章的时候MatialEasyWeChat\Material,如果设置了show\_pic\_cover和content\_source\_url不会生效 [\#470](https://github.com/overtrue/wechat/issues/470) +- 请问 SDK 是否支持授权接入的公众号接口调用? [\#438](https://github.com/overtrue/wechat/issues/438) +- 通过unionid发送信息。 [\#411](https://github.com/overtrue/wechat/issues/411) +- 【新增】设备管理 [\#77](https://github.com/overtrue/wechat/issues/77) + +**Merged pull requests:** + +- Add support wechat open platform. [\#532](https://github.com/overtrue/wechat/pull/532) ([mingyoung](https://github.com/mingyoung)) +- Applied fixes from StyleCI [\#530](https://github.com/overtrue/wechat/pull/530) ([overtrue](https://github.com/overtrue)) +- 新增硬件设备api [\#529](https://github.com/overtrue/wechat/pull/529) ([soone](https://github.com/soone)) + +## [3.1.8](https://github.com/overtrue/wechat/tree/3.1.8) (2016-11-23) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.7...3.1.8) + +**Closed issues:** + +- SCAN 事件会出现无法提供服务 [\#525](https://github.com/overtrue/wechat/issues/525) + +## [3.1.7](https://github.com/overtrue/wechat/tree/3.1.7) (2016-10-26) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.6...3.1.7) + +**Closed issues:** + +- preg\_replace unicode 的兼容问题 [\#515](https://github.com/overtrue/wechat/issues/515) + +**Merged pull requests:** + +- support psr-http-message-bridge 1.0 [\#524](https://github.com/overtrue/wechat/pull/524) ([wppd](https://github.com/wppd)) +- Applied fixes from StyleCI [\#523](https://github.com/overtrue/wechat/pull/523) ([overtrue](https://github.com/overtrue)) +- for \#520 [\#522](https://github.com/overtrue/wechat/pull/522) ([jinchun](https://github.com/jinchun)) + +## [3.1.6](https://github.com/overtrue/wechat/tree/3.1.6) (2016-10-19) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.5...3.1.6) + +**Closed issues:** + +- PHP Fatal error: Uncaught HttpException [\#517](https://github.com/overtrue/wechat/issues/517) +- 微信支付回调出错 [\#514](https://github.com/overtrue/wechat/issues/514) + +**Merged pull requests:** + +- Fix xml preg replace [\#519](https://github.com/overtrue/wechat/pull/519) ([springjk](https://github.com/springjk)) +- fix the DOC [\#518](https://github.com/overtrue/wechat/pull/518) ([ac1982](https://github.com/ac1982)) + +## [3.1.5](https://github.com/overtrue/wechat/tree/3.1.5) (2016-10-13) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.4...3.1.5) + +**Closed issues:** + +- wechat 在 larave l5.3 使用 passport 包下无法安装 [\#513](https://github.com/overtrue/wechat/issues/513) + +**Merged pull requests:** + +- Applied fixes from StyleCI [\#512](https://github.com/overtrue/wechat/pull/512) ([overtrue](https://github.com/overtrue)) + +## [3.1.4](https://github.com/overtrue/wechat/tree/3.1.4) (2016-10-12) +[Full Changelog](https://github.com/overtrue/wechat/compare/2.1.39...3.1.4) + +**Closed issues:** + +- 微信卡券特殊票券创建之后为什么无法更新卡券信息一致提示code非法。 [\#511](https://github.com/overtrue/wechat/issues/511) +- 请添加 「退款方式」 参数 [\#509](https://github.com/overtrue/wechat/issues/509) +- 2.1.40命名空间巨变引发的重大问题\(疑似提错版本了\) [\#508](https://github.com/overtrue/wechat/issues/508) +- 卡券核销、查询建议 [\#506](https://github.com/overtrue/wechat/issues/506) +- 支付重复回调问题 [\#504](https://github.com/overtrue/wechat/issues/504) + +**Merged pull requests:** + +- Changed method doc to the right accepted param type [\#510](https://github.com/overtrue/wechat/pull/510) ([marianoasselborn](https://github.com/marianoasselborn)) +- 增加判断是否有人工客服帐号,避免出现无账号时候,头像为默认头像的情况 [\#502](https://github.com/overtrue/wechat/pull/502) ([hello2t](https://github.com/hello2t)) +- Applied fixes from StyleCI [\#500](https://github.com/overtrue/wechat/pull/500) ([overtrue](https://github.com/overtrue)) +- 为initializeLogger日志初始话函数添加判断分支 [\#499](https://github.com/overtrue/wechat/pull/499) ([403studio](https://github.com/403studio)) + +## [2.1.39](https://github.com/overtrue/wechat/tree/2.1.39) (2016-09-05) +[Full Changelog](https://github.com/overtrue/wechat/compare/2.1.41...2.1.39) + +## [2.1.41](https://github.com/overtrue/wechat/tree/2.1.41) (2016-09-05) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.3...2.1.41) + +**Closed issues:** + +- 调用接口次数超过最大限制问题 [\#493](https://github.com/overtrue/wechat/issues/493) +- 微信退款证书报错 Unable to set private key file [\#492](https://github.com/overtrue/wechat/issues/492) +- 微信支付存在问题 [\#489](https://github.com/overtrue/wechat/issues/489) +- 预支付下单 response body 为空 [\#488](https://github.com/overtrue/wechat/issues/488) +- https check issue [\#486](https://github.com/overtrue/wechat/issues/486) + +**Merged pull requests:** + +- update composer.json [\#498](https://github.com/overtrue/wechat/pull/498) ([ac1982](https://github.com/ac1982)) +- use openssl instead of mcrypt [\#497](https://github.com/overtrue/wechat/pull/497) ([ac1982](https://github.com/ac1982)) +- 修复 with 方法带数据的问题 [\#491](https://github.com/overtrue/wechat/pull/491) ([XiaoLer](https://github.com/XiaoLer)) + +## [3.1.3](https://github.com/overtrue/wechat/tree/3.1.3) (2016-08-08) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.2...3.1.3) + +**Closed issues:** + +- Laravel中写的最简单的例子在phpunit出错。 [\#485](https://github.com/overtrue/wechat/issues/485) +- 微信的消息回复的FromUserName和ToUserName是不是对调了 [\#484](https://github.com/overtrue/wechat/issues/484) +- 微信红包不能发给别的公众号的用户吗 [\#483](https://github.com/overtrue/wechat/issues/483) +- 用户授权登录问题 [\#481](https://github.com/overtrue/wechat/issues/481) +- cURL error 56: SSLRead\(\) return error -9806 [\#473](https://github.com/overtrue/wechat/issues/473) +- 会员卡开卡字段文档有错误 [\#471](https://github.com/overtrue/wechat/issues/471) +- Getting more done in GitHub with ZenHub [\#439](https://github.com/overtrue/wechat/issues/439) +- 微信支付下单错误 [\#376](https://github.com/overtrue/wechat/issues/376) + +**Merged pull requests:** + +- update the File class to recognize pdf file. [\#480](https://github.com/overtrue/wechat/pull/480) ([ac1982](https://github.com/ac1982)) +- update testActivateUserForm [\#478](https://github.com/overtrue/wechat/pull/478) ([wangniuniu](https://github.com/wangniuniu)) +- Scrutinizer Auto-Fixes [\#477](https://github.com/overtrue/wechat/pull/477) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- Applied fixes from StyleCI [\#476](https://github.com/overtrue/wechat/pull/476) ([overtrue](https://github.com/overtrue)) +- Scrutinizer Auto-Fixes [\#475](https://github.com/overtrue/wechat/pull/475) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- 开放自定义prefix和缓存键值方法 [\#474](https://github.com/overtrue/wechat/pull/474) ([XiaoLer](https://github.com/XiaoLer)) +- Applied fixes from StyleCI [\#469](https://github.com/overtrue/wechat/pull/469) ([overtrue](https://github.com/overtrue)) +- modify stats [\#468](https://github.com/overtrue/wechat/pull/468) ([wangniuniu](https://github.com/wangniuniu)) + +## [3.1.2](https://github.com/overtrue/wechat/tree/3.1.2) (2016-07-21) +[Full Changelog](https://github.com/overtrue/wechat/compare/2.1.38...3.1.2) + +**Closed issues:** + +- 素材管理中,上传图文下的上传图片,关于返回内容的差异 [\#466](https://github.com/overtrue/wechat/issues/466) +- spbill\_create\_ip参数设置 [\#461](https://github.com/overtrue/wechat/issues/461) + +**Merged pull requests:** + +- 更新获取标签下粉丝列表方法 [\#467](https://github.com/overtrue/wechat/pull/467) ([dingdayu](https://github.com/dingdayu)) +- Applied fixes from StyleCI [\#465](https://github.com/overtrue/wechat/pull/465) ([overtrue](https://github.com/overtrue)) +- card module. [\#464](https://github.com/overtrue/wechat/pull/464) ([wangniuniu](https://github.com/wangniuniu)) +- Applied fixes from StyleCI [\#463](https://github.com/overtrue/wechat/pull/463) ([overtrue](https://github.com/overtrue)) +- Scrutinizer Auto-Fixes [\#462](https://github.com/overtrue/wechat/pull/462) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) + +## [2.1.38](https://github.com/overtrue/wechat/tree/2.1.38) (2016-07-16) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.1...2.1.38) + +**Closed issues:** + +- 请问卡券管理功能整合上日程表了吗 [\#454](https://github.com/overtrue/wechat/issues/454) + +**Merged pull requests:** + +- Typo. [\#460](https://github.com/overtrue/wechat/pull/460) ([tianyong90](https://github.com/tianyong90)) +- Applied fixes from StyleCI [\#459](https://github.com/overtrue/wechat/pull/459) ([overtrue](https://github.com/overtrue)) +- add voice recognition [\#458](https://github.com/overtrue/wechat/pull/458) ([leniy](https://github.com/leniy)) +- Applied fixes from StyleCI [\#457](https://github.com/overtrue/wechat/pull/457) ([overtrue](https://github.com/overtrue)) +- Update API.php [\#456](https://github.com/overtrue/wechat/pull/456) ([marvin8212](https://github.com/marvin8212)) +- Update XML.php [\#455](https://github.com/overtrue/wechat/pull/455) ([canon4ever](https://github.com/canon4ever)) + +## [3.1.1](https://github.com/overtrue/wechat/tree/3.1.1) (2016-07-12) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.1.0...3.1.1) + +**Closed issues:** + +- 拿到code=CODE&state=STATE之后怎么拿到openid? [\#452](https://github.com/overtrue/wechat/issues/452) +- 安装出错 [\#450](https://github.com/overtrue/wechat/issues/450) +- 自定义菜单接口\(新版\)出错 [\#448](https://github.com/overtrue/wechat/issues/448) +- h5上没法打开微信app授权界面 [\#447](https://github.com/overtrue/wechat/issues/447) +- 重构卡券 [\#76](https://github.com/overtrue/wechat/issues/76) + +**Merged pull requests:** + +- typos. [\#453](https://github.com/overtrue/wechat/pull/453) ([tianye](https://github.com/tianye)) +- edit readme.md [\#451](https://github.com/overtrue/wechat/pull/451) ([tianyong90](https://github.com/tianyong90)) +- Add cache driver config. [\#449](https://github.com/overtrue/wechat/pull/449) ([dingdayu](https://github.com/dingdayu)) + +## [3.1.0](https://github.com/overtrue/wechat/tree/3.1.0) (2016-06-28) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.0.21...3.1.0) + +**Merged pull requests:** + +- Applied fixes from StyleCI [\#446](https://github.com/overtrue/wechat/pull/446) ([overtrue](https://github.com/overtrue)) +- New Staff API. [\#445](https://github.com/overtrue/wechat/pull/445) ([overtrue](https://github.com/overtrue)) +- 2.1 [\#444](https://github.com/overtrue/wechat/pull/444) ([dongnanyanhai](https://github.com/dongnanyanhai)) +- Fix path. [\#443](https://github.com/overtrue/wechat/pull/443) ([overtrue](https://github.com/overtrue)) + +## [3.0.21](https://github.com/overtrue/wechat/tree/3.0.21) (2016-06-17) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.0.1...3.0.21) + +**Closed issues:** + +- scan出现公众号暂时无法服务的消息 [\#436](https://github.com/overtrue/wechat/issues/436) +- scan出现公众号暂时无法服务的消息 [\#435](https://github.com/overtrue/wechat/issues/435) +- 用户标签接口无法使用 [\#433](https://github.com/overtrue/wechat/issues/433) +- WeChatProvider下的getAuthUrl个人觉得应该暴露出来 [\#432](https://github.com/overtrue/wechat/issues/432) +- 支持二维码扫描进入公众号推送的SCAN事件 [\#431](https://github.com/overtrue/wechat/issues/431) +- \[3.0\] EasyWeChat\Support\XML::parse方法会将空节点解析为空数组,而不是空字符串 [\#426](https://github.com/overtrue/wechat/issues/426) +- 下载二维码, $qrcode-\>download\($ticket,$paths\); 目录参数不可加入 中文 [\#420](https://github.com/overtrue/wechat/issues/420) +- \[help want\]Is hard to change default configuration of GuzzleHttp [\#415](https://github.com/overtrue/wechat/issues/415) +- PHP7.0 curl\_setopt 设置问题 [\#413](https://github.com/overtrue/wechat/issues/413) +- 无法通知微信支付完成 [\#412](https://github.com/overtrue/wechat/issues/412) +- 如何获取用户的unionid? [\#407](https://github.com/overtrue/wechat/issues/407) +- 是否支持多框架 [\#406](https://github.com/overtrue/wechat/issues/406) +- fuckTheWeChatInvalidJSON [\#405](https://github.com/overtrue/wechat/issues/405) +- Class 'GuzzleHttp\Middleware' not found [\#404](https://github.com/overtrue/wechat/issues/404) +- 支付统一下单接口签名错误 [\#402](https://github.com/overtrue/wechat/issues/402) +- payment里没有configForJSSDKPayment方法 [\#401](https://github.com/overtrue/wechat/issues/401) +- 查询支付的地址多了一个空格,导致查询失败,去掉最后的那个空格后就好了 [\#393](https://github.com/overtrue/wechat/issues/393) +- 网页授权过不了 [\#392](https://github.com/overtrue/wechat/issues/392) +- 微信AccessToken被动更新可能会有并发更新的情况出现 [\#390](https://github.com/overtrue/wechat/issues/390) +- 临时素材下载,文件名和扩展名之间会有2个\[.\] [\#389](https://github.com/overtrue/wechat/issues/389) +- 有一个地方变量名对不上 [\#380](https://github.com/overtrue/wechat/issues/380) +- 自定义缓存 [\#379](https://github.com/overtrue/wechat/issues/379) +- https://easywechat.org/ 底部 “开始使用” url拼错 [\#378](https://github.com/overtrue/wechat/issues/378) +- 在server.php里面调用yii的model,一直报错 [\#375](https://github.com/overtrue/wechat/issues/375) +- overture/wechat 2.1.36\(客服消息转发错误\) [\#374](https://github.com/overtrue/wechat/issues/374) +- 建议支持开发模式下禁用验证 [\#373](https://github.com/overtrue/wechat/issues/373) +- https://easywechat.org/ 导航 首页 about:blank [\#370](https://github.com/overtrue/wechat/issues/370) +- laravel 下session问题 [\#369](https://github.com/overtrue/wechat/issues/369) +- 关于Access——toekn [\#368](https://github.com/overtrue/wechat/issues/368) +- 返回支付页面时报错:"access\_token" could not be empty [\#367](https://github.com/overtrue/wechat/issues/367) +- xampp下js-\>config报错 [\#366](https://github.com/overtrue/wechat/issues/366) +- 官方文档有误 [\#360](https://github.com/overtrue/wechat/issues/360) +- \[BUG\] 微信收货地址无法成功 [\#359](https://github.com/overtrue/wechat/issues/359) +- 无法获取 $message-\>ScanCodeInfo-\>ScanType 对象 [\#358](https://github.com/overtrue/wechat/issues/358) +- \[Bugs\] 项目文档首页跳转问题 [\#357](https://github.com/overtrue/wechat/issues/357) +- Business和UnifiedOrder没有定义 [\#356](https://github.com/overtrue/wechat/issues/356) +- 你的网站访问不了。。。。https://easywechat.org/ [\#352](https://github.com/overtrue/wechat/issues/352) +- 连续多次执行微信支付退款报错 [\#348](https://github.com/overtrue/wechat/issues/348) +- 客服操作 都是 -1 错误 [\#344](https://github.com/overtrue/wechat/issues/344) +- 请使用openssl 而不是不安全的mcrypt来加密 [\#342](https://github.com/overtrue/wechat/issues/342) +- 文本类型的通知消息 [\#341](https://github.com/overtrue/wechat/issues/341) +- 服务器配置https 并且 通过阿里云 https cdn之后, 会出现 https 判断语句失效 [\#338](https://github.com/overtrue/wechat/issues/338) +- 作者请问者个sdk支持企业号吗? [\#336](https://github.com/overtrue/wechat/issues/336) +- laravel 5.1引入包报错 [\#331](https://github.com/overtrue/wechat/issues/331) +- 申请退款有问题 [\#328](https://github.com/overtrue/wechat/issues/328) +- 订单相关接口bug [\#327](https://github.com/overtrue/wechat/issues/327) +- 临时素材接口无法使用 [\#319](https://github.com/overtrue/wechat/issues/319) +- 使用sendNormal\(\),sendGroup\(\)发送红包时,报Undefined index: HTTP\_CLIENT\_IP [\#316](https://github.com/overtrue/wechat/issues/316) +- v3中微信卡券功能缺失? [\#307](https://github.com/overtrue/wechat/issues/307) +- 测试 [\#305](https://github.com/overtrue/wechat/issues/305) +- \[3.0\] 永久素材上传视频无法上传问题 [\#304](https://github.com/overtrue/wechat/issues/304) +- Cannot destroy active lambda function [\#296](https://github.com/overtrue/wechat/issues/296) +- 微信支付-》企业付款也可以增加个类上去,跟企业红包类似 [\#232](https://github.com/overtrue/wechat/issues/232) + +**Merged pull requests:** + +- Applied fixes from StyleCI [\#442](https://github.com/overtrue/wechat/pull/442) ([overtrue](https://github.com/overtrue)) +- NGINX HTTPS无法签名 [\#441](https://github.com/overtrue/wechat/pull/441) ([ares333](https://github.com/ares333)) +- Develop [\#440](https://github.com/overtrue/wechat/pull/440) ([overtrue](https://github.com/overtrue)) +- Develop [\#437](https://github.com/overtrue/wechat/pull/437) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#434](https://github.com/overtrue/wechat/pull/434) ([overtrue](https://github.com/overtrue)) +- 修改错误提示信息,方便跟踪错误 [\#430](https://github.com/overtrue/wechat/pull/430) ([zerozh](https://github.com/zerozh)) +- Develop [\#429](https://github.com/overtrue/wechat/pull/429) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#428](https://github.com/overtrue/wechat/pull/428) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#427](https://github.com/overtrue/wechat/pull/427) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#425](https://github.com/overtrue/wechat/pull/425) ([overtrue](https://github.com/overtrue)) +- update annotation [\#424](https://github.com/overtrue/wechat/pull/424) ([lilocon](https://github.com/lilocon)) +- Develop [\#421](https://github.com/overtrue/wechat/pull/421) ([overtrue](https://github.com/overtrue)) +- Set default timeout. [\#419](https://github.com/overtrue/wechat/pull/419) ([overtrue](https://github.com/overtrue)) +- Develop [\#418](https://github.com/overtrue/wechat/pull/418) ([overtrue](https://github.com/overtrue)) +- Develop [\#416](https://github.com/overtrue/wechat/pull/416) ([overtrue](https://github.com/overtrue)) +- better implementation for prepare oauth callback url [\#414](https://github.com/overtrue/wechat/pull/414) ([lichunqiang](https://github.com/lichunqiang)) +- Develop [\#410](https://github.com/overtrue/wechat/pull/410) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#409](https://github.com/overtrue/wechat/pull/409) ([overtrue](https://github.com/overtrue)) +- 增加微信支付服务商支持 [\#408](https://github.com/overtrue/wechat/pull/408) ([takatost](https://github.com/takatost)) +- Develop [\#403](https://github.com/overtrue/wechat/pull/403) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#400](https://github.com/overtrue/wechat/pull/400) ([overtrue](https://github.com/overtrue)) +- Scrutinizer Auto-Fixes [\#399](https://github.com/overtrue/wechat/pull/399) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- Develop [\#398](https://github.com/overtrue/wechat/pull/398) ([overtrue](https://github.com/overtrue)) +- Develop [\#397](https://github.com/overtrue/wechat/pull/397) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#396](https://github.com/overtrue/wechat/pull/396) ([overtrue](https://github.com/overtrue)) +- Typo & Improve code. [\#395](https://github.com/overtrue/wechat/pull/395) ([jinchun](https://github.com/jinchun)) +- Develop [\#394](https://github.com/overtrue/wechat/pull/394) ([overtrue](https://github.com/overtrue)) +- Bugfix close \#389 [\#391](https://github.com/overtrue/wechat/pull/391) ([overtrue](https://github.com/overtrue)) +- Update NoticeNoticeTest.php [\#388](https://github.com/overtrue/wechat/pull/388) ([xiabeifeng](https://github.com/xiabeifeng)) +- Update Notice.php [\#387](https://github.com/overtrue/wechat/pull/387) ([xiabeifeng](https://github.com/xiabeifeng)) +- Tests for \#384 [\#386](https://github.com/overtrue/wechat/pull/386) ([xiabeifeng](https://github.com/xiabeifeng)) +- Improve Notice API. [\#384](https://github.com/overtrue/wechat/pull/384) ([xiabeifeng](https://github.com/xiabeifeng)) +- 对应根 版本依赖 [\#382](https://github.com/overtrue/wechat/pull/382) ([parkshinhye](https://github.com/parkshinhye)) +- Develop [\#381](https://github.com/overtrue/wechat/pull/381) ([overtrue](https://github.com/overtrue)) +- Develop [\#377](https://github.com/overtrue/wechat/pull/377) ([overtrue](https://github.com/overtrue)) +- Fix test for \#371 [\#372](https://github.com/overtrue/wechat/pull/372) ([overtrue](https://github.com/overtrue)) +- 刷卡支付不需要notify\_url参数 [\#371](https://github.com/overtrue/wechat/pull/371) ([lilocon](https://github.com/lilocon)) +- Applied fixes from StyleCI [\#365](https://github.com/overtrue/wechat/pull/365) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#364](https://github.com/overtrue/wechat/pull/364) ([overtrue](https://github.com/overtrue)) +- Merge Develop [\#363](https://github.com/overtrue/wechat/pull/363) ([overtrue](https://github.com/overtrue)) +- Update composer.json [\#361](https://github.com/overtrue/wechat/pull/361) ([jaychan](https://github.com/jaychan)) +- Applied fixes from StyleCI [\#355](https://github.com/overtrue/wechat/pull/355) ([overtrue](https://github.com/overtrue)) +- \[ci skip\]fix document typo [\#354](https://github.com/overtrue/wechat/pull/354) ([lichunqiang](https://github.com/lichunqiang)) +- 自定义Logger [\#353](https://github.com/overtrue/wechat/pull/353) ([lilocon](https://github.com/lilocon)) +- Update Refund.php [\#351](https://github.com/overtrue/wechat/pull/351) ([jaring](https://github.com/jaring)) +- Applied fixes from StyleCI [\#350](https://github.com/overtrue/wechat/pull/350) ([overtrue](https://github.com/overtrue)) +- OpenSSL bugfix. [\#349](https://github.com/overtrue/wechat/pull/349) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#347](https://github.com/overtrue/wechat/pull/347) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#346](https://github.com/overtrue/wechat/pull/346) ([overtrue](https://github.com/overtrue)) +- Merge Develop [\#345](https://github.com/overtrue/wechat/pull/345) ([overtrue](https://github.com/overtrue)) +- 添加代码提示 [\#343](https://github.com/overtrue/wechat/pull/343) ([lilocon](https://github.com/lilocon)) +- Applied fixes from StyleCI [\#340](https://github.com/overtrue/wechat/pull/340) ([overtrue](https://github.com/overtrue)) +- Fix bug: Payment::downloadBill\(\) response error. [\#339](https://github.com/overtrue/wechat/pull/339) ([overtrue](https://github.com/overtrue)) +- change get\_client\_ip to get\_server\_ip [\#335](https://github.com/overtrue/wechat/pull/335) ([tianyong90](https://github.com/tianyong90)) +- Payment SSL. [\#334](https://github.com/overtrue/wechat/pull/334) ([overtrue](https://github.com/overtrue)) +- Add a helper to get correct client ip address. fixed \#316 [\#333](https://github.com/overtrue/wechat/pull/333) ([tianyong90](https://github.com/tianyong90)) +- Dependency Bugfix. overtrue/laravel-wechat\#24 [\#332](https://github.com/overtrue/wechat/pull/332) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#330](https://github.com/overtrue/wechat/pull/330) ([overtrue](https://github.com/overtrue)) +- Merge Develop [\#329](https://github.com/overtrue/wechat/pull/329) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#326](https://github.com/overtrue/wechat/pull/326) ([overtrue](https://github.com/overtrue)) +- Add order default notify\_url. [\#325](https://github.com/overtrue/wechat/pull/325) ([foreverglory](https://github.com/foreverglory)) +- Revert "Applied fixes from StyleCI" [\#323](https://github.com/overtrue/wechat/pull/323) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#322](https://github.com/overtrue/wechat/pull/322) ([overtrue](https://github.com/overtrue)) +- Develop [\#321](https://github.com/overtrue/wechat/pull/321) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#320](https://github.com/overtrue/wechat/pull/320) ([overtrue](https://github.com/overtrue)) +- 模板消息添加【 获取模板列表】和【 删除模板】接口 [\#318](https://github.com/overtrue/wechat/pull/318) ([forecho](https://github.com/forecho)) +- Applied fixes from StyleCI [\#314](https://github.com/overtrue/wechat/pull/314) ([overtrue](https://github.com/overtrue)) +- fix Temporary upload bug [\#313](https://github.com/overtrue/wechat/pull/313) ([mani95lisa](https://github.com/mani95lisa)) +- Applied fixes from StyleCI [\#312](https://github.com/overtrue/wechat/pull/312) ([overtrue](https://github.com/overtrue)) +- MerchantPay Class [\#311](https://github.com/overtrue/wechat/pull/311) ([ac1982](https://github.com/ac1982)) +- Applied fixes from StyleCI [\#309](https://github.com/overtrue/wechat/pull/309) ([overtrue](https://github.com/overtrue)) +- Merge Develop [\#308](https://github.com/overtrue/wechat/pull/308) ([overtrue](https://github.com/overtrue)) +- 删除裂变红包接口中的ip参数 [\#306](https://github.com/overtrue/wechat/pull/306) ([xjchengo](https://github.com/xjchengo)) +- fix code style and some spelling mistakes [\#303](https://github.com/overtrue/wechat/pull/303) ([jinchun](https://github.com/jinchun)) +- Merge Develop [\#302](https://github.com/overtrue/wechat/pull/302) ([overtrue](https://github.com/overtrue)) +- Add method for app payment [\#301](https://github.com/overtrue/wechat/pull/301) ([lichunqiang](https://github.com/lichunqiang)) +- Removed the return syntax [\#300](https://github.com/overtrue/wechat/pull/300) ([lichunqiang](https://github.com/lichunqiang)) +- add return tag [\#299](https://github.com/overtrue/wechat/pull/299) ([lichunqiang](https://github.com/lichunqiang)) +- Merge Develop [\#298](https://github.com/overtrue/wechat/pull/298) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#297](https://github.com/overtrue/wechat/pull/297) ([overtrue](https://github.com/overtrue)) +- \[ci skip\]Update .gitattributes [\#295](https://github.com/overtrue/wechat/pull/295) ([lichunqiang](https://github.com/lichunqiang)) +- Merge Develop [\#294](https://github.com/overtrue/wechat/pull/294) ([overtrue](https://github.com/overtrue)) + +## [3.0.1](https://github.com/overtrue/wechat/tree/3.0.1) (2016-02-19) +[Full Changelog](https://github.com/overtrue/wechat/compare/3.0...3.0.1) + +**Closed issues:** + +- composer 安装 3.0版本,报错如下: [\#291](https://github.com/overtrue/wechat/issues/291) +- \[3.0\] 下载永久素材时,微信返回的Content-Type不正确,导致出错。 [\#290](https://github.com/overtrue/wechat/issues/290) +- 挖个坑,自己跳 [\#147](https://github.com/overtrue/wechat/issues/147) + +**Merged pull requests:** + +- Applied fixes from StyleCI [\#293](https://github.com/overtrue/wechat/pull/293) ([overtrue](https://github.com/overtrue)) +- Merge Develop [\#292](https://github.com/overtrue/wechat/pull/292) ([overtrue](https://github.com/overtrue)) + +## [3.0](https://github.com/overtrue/wechat/tree/3.0) (2016-02-17) +[Full Changelog](https://github.com/overtrue/wechat/compare/2.1.0...3.0) + +**Implemented enhancements:** + +- MIME json 格式检查优化 [\#49](https://github.com/overtrue/wechat/issues/49) +- 获取 refresh\_token,access\_token [\#43](https://github.com/overtrue/wechat/issues/43) +- 关于API\_TOKEN\_REFRESH [\#20](https://github.com/overtrue/wechat/issues/20) + +**Closed issues:** + +- \[3.0\] 无法获取用户分组信息 [\#285](https://github.com/overtrue/wechat/issues/285) +- 新的laravel 5.2 不能兼容了 [\#284](https://github.com/overtrue/wechat/issues/284) +- \[3.0\]Message/Article类的$properties内的source\_url没有正常转换为content\_source\_url. [\#281](https://github.com/overtrue/wechat/issues/281) +- 3.0删除个性菜单失败 [\#280](https://github.com/overtrue/wechat/issues/280) +- 也许你该给一个代码贡献规范 [\#277](https://github.com/overtrue/wechat/issues/277) +- 3.0网页授权时scope为snsapi\_base得不到openid [\#276](https://github.com/overtrue/wechat/issues/276) +- wechat3.0中 有2个地方的js调用参数不一样,超哥没有提供 [\#272](https://github.com/overtrue/wechat/issues/272) +- 我想知道2.X和3.0有什么大的区别! [\#270](https://github.com/overtrue/wechat/issues/270) +- 2.1: Link 消息类型没有实现 [\#269](https://github.com/overtrue/wechat/issues/269) +- 关于模板消息换行的问题 [\#266](https://github.com/overtrue/wechat/issues/266) +- easywechat Invalid request [\#265](https://github.com/overtrue/wechat/issues/265) +- 40029不合法的oauth\_code [\#264](https://github.com/overtrue/wechat/issues/264) +- 下载素材的一个小问题 [\#263](https://github.com/overtrue/wechat/issues/263) +- \[2.1\] 微信自定义菜单结构变更导致`Menu::get\(\)` 无法读取个性化菜单 [\#262](https://github.com/overtrue/wechat/issues/262) +- payment中是不是不包含H5和JS的生成配置文件的方法了? [\#261](https://github.com/overtrue/wechat/issues/261) +- payment下prepare方法bug [\#260](https://github.com/overtrue/wechat/issues/260) +- UserServiceProvider中似乎忘记注册user.group了 [\#256](https://github.com/overtrue/wechat/issues/256) +- 2.1.X版媒体下载没有扩展名 [\#252](https://github.com/overtrue/wechat/issues/252) +- 为什么所有的子模块在自己的库都是develop分支 [\#247](https://github.com/overtrue/wechat/issues/247) +- 网页授权使用跳转的bug [\#246](https://github.com/overtrue/wechat/issues/246) +- typo of variable [\#245](https://github.com/overtrue/wechat/issues/245) +- The implementation class of ServerServiceProvider missing an important [\#244](https://github.com/overtrue/wechat/issues/244) +- \[3.0\]\[payment\] 两个可能的bug [\#235](https://github.com/overtrue/wechat/issues/235) +- 发送多图文 [\#233](https://github.com/overtrue/wechat/issues/233) +- 自定义菜单返回应该把个性化自定义菜单也一起返回 [\#231](https://github.com/overtrue/wechat/issues/231) +- 发送模板消息 CRUL 错误 [\#223](https://github.com/overtrue/wechat/issues/223) +- 客服接口暂时测到有3个bug,麻烦修复 [\#222](https://github.com/overtrue/wechat/issues/222) +- JSSDK access\_token missing [\#211](https://github.com/overtrue/wechat/issues/211) +- Js.php/ticket [\#210](https://github.com/overtrue/wechat/issues/210) +- 微信支付里有一个收货地址共享 ,超哥你这里没有,可以加一下不? [\#204](https://github.com/overtrue/wechat/issues/204) +- 小问题 [\#203](https://github.com/overtrue/wechat/issues/203) +- 网页授权 跳转 [\#202](https://github.com/overtrue/wechat/issues/202) +- access token 重复添加的问题 [\#201](https://github.com/overtrue/wechat/issues/201) +- authorize snsapi\_base 下可以获取unionid [\#198](https://github.com/overtrue/wechat/issues/198) +- 网页授权 [\#189](https://github.com/overtrue/wechat/issues/189) +- 一点建议 [\#188](https://github.com/overtrue/wechat/issues/188) +- 接口更新-新增临时素材接口变动 [\#186](https://github.com/overtrue/wechat/issues/186) +- 接入多个公众号不用id [\#185](https://github.com/overtrue/wechat/issues/185) +- \[Insight\] Files should not be executable [\#184](https://github.com/overtrue/wechat/issues/184) +- 建议不要写死Http [\#183](https://github.com/overtrue/wechat/issues/183) +- laravel4.2安装不成功 [\#182](https://github.com/overtrue/wechat/issues/182) +- 是否支持laravel4.2 [\#181](https://github.com/overtrue/wechat/issues/181) +- 微信出个性化菜单了,希望支持 [\#180](https://github.com/overtrue/wechat/issues/180) +- 3.0 composer依赖Symfony2.7。能不能支持Symfony3.0? [\#179](https://github.com/overtrue/wechat/issues/179) +- 发送链接类消息错误 [\#175](https://github.com/overtrue/wechat/issues/175) +- Throw Exception的时候 Intel server status 设置为200是不是好一些 [\#174](https://github.com/overtrue/wechat/issues/174) +- 生成临时二维码时,返回EventKey不是传递的值 [\#173](https://github.com/overtrue/wechat/issues/173) +- 关于素材获取的一个建议 [\#172](https://github.com/overtrue/wechat/issues/172) +- 能否增加微信APP支付相关方法 [\#171](https://github.com/overtrue/wechat/issues/171) +- 微信回调URL回调不到 [\#170](https://github.com/overtrue/wechat/issues/170) +- 素材管理添加永久素材返回JSON/XML内容错误 [\#169](https://github.com/overtrue/wechat/issues/169) +- \[消息的使用\] 中 \[上传素材文件\] 的文档示例貌似有误 [\#168](https://github.com/overtrue/wechat/issues/168) +- 素材管理里的download方法不是很符合sdk一站式的解决. [\#165](https://github.com/overtrue/wechat/issues/165) +- \[Wechat\]不合法的oauth\_code' in /src/Wechat/Http.php:124 [\#164](https://github.com/overtrue/wechat/issues/164) +- AccessToken Expired Error Code [\#163](https://github.com/overtrue/wechat/issues/163) +- 素材管理接口出错 [\#162](https://github.com/overtrue/wechat/issues/162) +- 两处代码php5.4才能运行 [\#158](https://github.com/overtrue/wechat/issues/158) +- extension is null when calling `download video` in wechat.media [\#157](https://github.com/overtrue/wechat/issues/157) +- Payment/UnifiedOrder does not support serialize or create by array [\#155](https://github.com/overtrue/wechat/issues/155) +- 没有找到"微信支付-\>查询订单"相关功能 [\#150](https://github.com/overtrue/wechat/issues/150) +- 请教,Cache::setter中your\_custom\_set\_cache怎么使用 [\#149](https://github.com/overtrue/wechat/issues/149) +- 发生异常时, 希望能把发送和接收的原始数据记录下来. [\#148](https://github.com/overtrue/wechat/issues/148) +- 发送红包,证书错误 [\#144](https://github.com/overtrue/wechat/issues/144) +- 发视频消息总返回 -1 [\#143](https://github.com/overtrue/wechat/issues/143) +- 关于PHP版本 [\#141](https://github.com/overtrue/wechat/issues/141) +- Server消息回复必须以事件方式吗? [\#140](https://github.com/overtrue/wechat/issues/140) +- 微信支付相关文档细化 [\#138](https://github.com/overtrue/wechat/issues/138) +- 好奇地问个问题,这项目的测试用例放在哪? [\#135](https://github.com/overtrue/wechat/issues/135) +- 试了两次,真的不会用 [\#134](https://github.com/overtrue/wechat/issues/134) +- 不知道这算不算是个BUG [\#133](https://github.com/overtrue/wechat/issues/133) +- 微信小店 [\#130](https://github.com/overtrue/wechat/issues/130) +- 多次遇到 accesstoken 无效的问题 [\#129](https://github.com/overtrue/wechat/issues/129) +- MCH\_KEY 微信支付 [\#128](https://github.com/overtrue/wechat/issues/128) +- 使用flightphp框架,验证URL的时候,在Apache下接入成功,在Nginx接入失败 [\#126](https://github.com/overtrue/wechat/issues/126) +- 好东西!可惜没有我需要的微信红包 [\#125](https://github.com/overtrue/wechat/issues/125) +- Cache存储部件可定制 [\#120](https://github.com/overtrue/wechat/issues/120) +- 关于Bag [\#119](https://github.com/overtrue/wechat/issues/119) +- 将代码部署到负载均衡上如何管理access token [\#118](https://github.com/overtrue/wechat/issues/118) +- 消息接受和回复时,如果不对消息做回复,该如何做? [\#117](https://github.com/overtrue/wechat/issues/117) +- 请教一个问题 [\#116](https://github.com/overtrue/wechat/issues/116) +- 关于 Cache [\#115](https://github.com/overtrue/wechat/issues/115) +- 如何才能获取普通的access\_token [\#113](https://github.com/overtrue/wechat/issues/113) +- $HTTP\_RAW\_POST\_DATA DEPRECATED [\#111](https://github.com/overtrue/wechat/issues/111) +- App支付缺少错误码 [\#109](https://github.com/overtrue/wechat/issues/109) +- 当用户信息有 " 字符时系统出错 \(用户与用户组管理接口\) [\#107](https://github.com/overtrue/wechat/issues/107) +- 提示错误 [\#106](https://github.com/overtrue/wechat/issues/106) +- 使用企业号的时候 接入失败啊,在验证url的时候 [\#104](https://github.com/overtrue/wechat/issues/104) +- 支付签名错误 [\#101](https://github.com/overtrue/wechat/issues/101) +- 微信支付.$payment-\>getConfig\(\)调用时候\[Wechat\]系统繁忙,此时请开发者稍候再试. [\#96](https://github.com/overtrue/wechat/issues/96) +- wechat/src/Wechat/Payment/UnifiedOrder.php 小问题 [\#94](https://github.com/overtrue/wechat/issues/94) +- 请教laravel中如何在微信支付中 catch UnifiedOrder 抛出的异常? [\#93](https://github.com/overtrue/wechat/issues/93) +- 是否可以增加一个第三方接口融合功能 [\#91](https://github.com/overtrue/wechat/issues/91) +- 订单查询 [\#90](https://github.com/overtrue/wechat/issues/90) +- 如何不下载图片,通过mediaId获取图片存储的URL [\#89](https://github.com/overtrue/wechat/issues/89) +- 'Undefined index: HTTP\_HOST' [\#88](https://github.com/overtrue/wechat/issues/88) +- Undefined index: HTTP\_HOST [\#87](https://github.com/overtrue/wechat/issues/87) +- 不能上传gif格式的图片素材 [\#84](https://github.com/overtrue/wechat/issues/84) +- OAuth重构 [\#74](https://github.com/overtrue/wechat/issues/74) +- \[3.0\] Tasks [\#50](https://github.com/overtrue/wechat/issues/50) +- appId 和 appSecret不要作为各个类的构造参数 [\#114](https://github.com/overtrue/wechat/issues/114) +- 增加debug相关的选项 [\#112](https://github.com/overtrue/wechat/issues/112) +- 好像没有获取自动回复数据接口 [\#108](https://github.com/overtrue/wechat/issues/108) +- js端查看微信卡券接口 chooseCard [\#79](https://github.com/overtrue/wechat/issues/79) +- 【新增】支付 [\#78](https://github.com/overtrue/wechat/issues/78) +- 模板消息重构 [\#75](https://github.com/overtrue/wechat/issues/75) +- 素材下载自动识别MIME生成后缀 [\#54](https://github.com/overtrue/wechat/issues/54) +- \[建议\] 深度结合微信多图文与素材管理 [\#46](https://github.com/overtrue/wechat/issues/46) +- 群发功能 [\#18](https://github.com/overtrue/wechat/issues/18) + +**Merged pull requests:** + +- 3.0 [\#289](https://github.com/overtrue/wechat/pull/289) ([overtrue](https://github.com/overtrue)) +- Merge Develop [\#288](https://github.com/overtrue/wechat/pull/288) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#287](https://github.com/overtrue/wechat/pull/287) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#286](https://github.com/overtrue/wechat/pull/286) ([overtrue](https://github.com/overtrue)) +- Fix bug in batchGet method. [\#283](https://github.com/overtrue/wechat/pull/283) ([tianyong90](https://github.com/tianyong90)) +- Typo. [\#279](https://github.com/overtrue/wechat/pull/279) ([overtrue](https://github.com/overtrue)) +- Add contribution guide. resolves \#277 [\#278](https://github.com/overtrue/wechat/pull/278) ([overtrue](https://github.com/overtrue)) +- Develop [\#274](https://github.com/overtrue/wechat/pull/274) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#273](https://github.com/overtrue/wechat/pull/273) ([overtrue](https://github.com/overtrue)) +- Develop [\#271](https://github.com/overtrue/wechat/pull/271) ([overtrue](https://github.com/overtrue)) +- Merge Develop [\#268](https://github.com/overtrue/wechat/pull/268) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#267](https://github.com/overtrue/wechat/pull/267) ([overtrue](https://github.com/overtrue)) +- Update QRCode.php [\#258](https://github.com/overtrue/wechat/pull/258) ([webshiyue](https://github.com/webshiyue)) +- Add tests for LuckyMoney. [\#255](https://github.com/overtrue/wechat/pull/255) ([tianyong90](https://github.com/tianyong90)) +- CS. [\#254](https://github.com/overtrue/wechat/pull/254) ([overtrue](https://github.com/overtrue)) +- Scrutinizer Auto-Fixes [\#253](https://github.com/overtrue/wechat/pull/253) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- Applied fixes from StyleCI [\#251](https://github.com/overtrue/wechat/pull/251) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#250](https://github.com/overtrue/wechat/pull/250) ([overtrue](https://github.com/overtrue)) +- Merge Develop [\#249](https://github.com/overtrue/wechat/pull/249) ([overtrue](https://github.com/overtrue)) +- Merge Develop [\#248](https://github.com/overtrue/wechat/pull/248) ([overtrue](https://github.com/overtrue)) +- Merge from Develop [\#243](https://github.com/overtrue/wechat/pull/243) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#242](https://github.com/overtrue/wechat/pull/242) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#241](https://github.com/overtrue/wechat/pull/241) ([overtrue](https://github.com/overtrue)) +- Add Luckymoney. [\#240](https://github.com/overtrue/wechat/pull/240) ([tianyong90](https://github.com/tianyong90)) +- Applied fixes from StyleCI [\#237](https://github.com/overtrue/wechat/pull/237) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#234](https://github.com/overtrue/wechat/pull/234) ([overtrue](https://github.com/overtrue)) +- Multiple News Items Support [\#230](https://github.com/overtrue/wechat/pull/230) ([fanglinks](https://github.com/fanglinks)) +- Applied fixes from StyleCI [\#221](https://github.com/overtrue/wechat/pull/221) ([overtrue](https://github.com/overtrue)) +- \[3.0\]\[Bugfix\]发送图文消息缺少type [\#217](https://github.com/overtrue/wechat/pull/217) ([sunbiao0526](https://github.com/sunbiao0526)) +- fix Js.php 获取自定义cache对象 [\#215](https://github.com/overtrue/wechat/pull/215) ([sunbiao0526](https://github.com/sunbiao0526)) +- Applied fixes from StyleCI [\#197](https://github.com/overtrue/wechat/pull/197) ([overtrue](https://github.com/overtrue)) +- Add alias [\#196](https://github.com/overtrue/wechat/pull/196) ([ruchengtang](https://github.com/ruchengtang)) +- Applied fixes from StyleCI [\#195](https://github.com/overtrue/wechat/pull/195) ([overtrue](https://github.com/overtrue)) +- Applied fixes from StyleCI [\#194](https://github.com/overtrue/wechat/pull/194) ([overtrue](https://github.com/overtrue)) +- Add Broadcast. [\#193](https://github.com/overtrue/wechat/pull/193) ([ruchengtang](https://github.com/ruchengtang)) +- 微信红包类优化 [\#190](https://github.com/overtrue/wechat/pull/190) ([tianyong90](https://github.com/tianyong90)) +- Update ServerServiceProvider.php [\#187](https://github.com/overtrue/wechat/pull/187) ([ghost](https://github.com/ghost)) +- Update README\_EN.md [\#178](https://github.com/overtrue/wechat/pull/178) ([spekulatius](https://github.com/spekulatius)) +- 添加群发消息文档 [\#177](https://github.com/overtrue/wechat/pull/177) ([ruchengtang](https://github.com/ruchengtang)) +- 群发消息 [\#176](https://github.com/overtrue/wechat/pull/176) ([ruchengtang](https://github.com/ruchengtang)) +- Master [\#167](https://github.com/overtrue/wechat/pull/167) ([xiaohome](https://github.com/xiaohome)) +- 微信小店 [\#166](https://github.com/overtrue/wechat/pull/166) ([xiaohome](https://github.com/xiaohome)) +- 红包类更新 [\#161](https://github.com/overtrue/wechat/pull/161) ([overtrue](https://github.com/overtrue)) +- 加入摇一摇红包类,红包类提升至Overtrue命名空间 [\#160](https://github.com/overtrue/wechat/pull/160) ([tianyong90](https://github.com/tianyong90)) +- 2.1 [\#159](https://github.com/overtrue/wechat/pull/159) ([overtrue](https://github.com/overtrue)) +- Update QRCode.php [\#156](https://github.com/overtrue/wechat/pull/156) ([ruchengtang](https://github.com/ruchengtang)) +- 修复使用!=,来判断0 != null 的时候的一个bug [\#154](https://github.com/overtrue/wechat/pull/154) ([Liv1020](https://github.com/Liv1020)) +- 调整多客服类删除客服方法 [\#151](https://github.com/overtrue/wechat/pull/151) ([tianyong90](https://github.com/tianyong90)) +- 修复个bug [\#146](https://github.com/overtrue/wechat/pull/146) ([xiaohome](https://github.com/xiaohome)) +- Update README.md [\#142](https://github.com/overtrue/wechat/pull/142) ([parkshinhye](https://github.com/parkshinhye)) +- Fix code style to PSR-2 [\#139](https://github.com/overtrue/wechat/pull/139) ([tianyong90](https://github.com/tianyong90)) +- 加入红包工具类,支持现金和裂变红包的发送及查询 [\#137](https://github.com/overtrue/wechat/pull/137) ([tianyong90](https://github.com/tianyong90)) +- 卡券类批量获取卡券ID方法支持仅获取指定状态卡券 [\#132](https://github.com/overtrue/wechat/pull/132) ([tianyong90](https://github.com/tianyong90)) +- 添加客服 卡券回复!!! [\#124](https://github.com/overtrue/wechat/pull/124) ([parkshinhye](https://github.com/parkshinhye)) +- 调整退款类中一处异常抛出逻辑并修正单词拼写错误 [\#122](https://github.com/overtrue/wechat/pull/122) ([tianyong90](https://github.com/tianyong90)) +- 加入创建卡券货架接口 [\#121](https://github.com/overtrue/wechat/pull/121) ([tianyong90](https://github.com/tianyong90)) +- 增加退款类 [\#105](https://github.com/overtrue/wechat/pull/105) ([jaring](https://github.com/jaring)) +- 增加获取用户已领取卡券方法 [\#103](https://github.com/overtrue/wechat/pull/103) ([tenstone](https://github.com/tenstone)) +- Scrutinizer Auto-Fixes [\#100](https://github.com/overtrue/wechat/pull/100) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- 修正二维码类中生成卡券二维码方法 [\#99](https://github.com/overtrue/wechat/pull/99) ([tianyong90](https://github.com/tianyong90)) +- 卡券接口加入添加测试白名单方法 [\#98](https://github.com/overtrue/wechat/pull/98) ([tianyong90](https://github.com/tianyong90)) +- 依样画葫芦写了一个查询订单,更改了UnifiedOrder中Http初始化 [\#95](https://github.com/overtrue/wechat/pull/95) ([jaring](https://github.com/jaring)) +- accessToken根据appId变化 [\#92](https://github.com/overtrue/wechat/pull/92) ([keepeye](https://github.com/keepeye)) +- Fix payment sign bug. [\#82](https://github.com/overtrue/wechat/pull/82) ([0i](https://github.com/0i)) +- \[wiki\] wechat payment [\#81](https://github.com/overtrue/wechat/pull/81) ([0i](https://github.com/0i)) + +## [2.1.0](https://github.com/overtrue/wechat/tree/2.1.0) (2015-08-18) +[Full Changelog](https://github.com/overtrue/wechat/compare/2.0.35...2.1.0) + +**Merged pull requests:** + +- Wechat Payment [\#80](https://github.com/overtrue/wechat/pull/80) ([0i](https://github.com/0i)) + +## [2.0.35](https://github.com/overtrue/wechat/tree/2.0.35) (2015-08-11) +[Full Changelog](https://github.com/overtrue/wechat/compare/2.0.1...2.0.35) + +**Implemented enhancements:** + +- Overtrue\Wechat\Http识别JSON的问题 [\#47](https://github.com/overtrue/wechat/issues/47) + +**Fixed bugs:** + +- 模板消息简单格式无效 [\#34](https://github.com/overtrue/wechat/issues/34) + +**Closed issues:** + +- $data是数组,title输出不了内容 [\#73](https://github.com/overtrue/wechat/issues/73) +- 回调是如何传递外部参数的? [\#72](https://github.com/overtrue/wechat/issues/72) +- 【建议】可以添加微信js的功能吗? [\#71](https://github.com/overtrue/wechat/issues/71) +- Message::make\('link'\) 无效 [\#70](https://github.com/overtrue/wechat/issues/70) +- 监听消息 返回Bad Request [\#65](https://github.com/overtrue/wechat/issues/65) +- 微信素材管理小改版,求跟上~ [\#64](https://github.com/overtrue/wechat/issues/64) +- 在新浪SAE平台上的部署问题 [\#63](https://github.com/overtrue/wechat/issues/63) +- $xmlInput = file\_get\_contents\('php://input'\);貌似在某些版本的PHP有问题还是怎的 [\#57](https://github.com/overtrue/wechat/issues/57) +- 卡券的 attachExtension 方法 [\#56](https://github.com/overtrue/wechat/issues/56) +- 网页授权$auth-\>authorize\(\) 后还需要保存access\_token吗? [\#53](https://github.com/overtrue/wechat/issues/53) +- php 5.6版本下出现错误(5.6以下版本正常) [\#51](https://github.com/overtrue/wechat/issues/51) +- 消息发送后服务器无法正确返回响应 [\#48](https://github.com/overtrue/wechat/issues/48) +- token验证失败 [\#45](https://github.com/overtrue/wechat/issues/45) +- 微信关注自动回复问题 [\#44](https://github.com/overtrue/wechat/issues/44) +- js sdk config 建议增加 beta 字段 [\#35](https://github.com/overtrue/wechat/issues/35) +- 关于Util\HTTP::encode\(\)中的urlencode\(\)/urldecode\(\)成组操作的疑问 [\#31](https://github.com/overtrue/wechat/issues/31) +- Media::updateNews\(\) 方法与微信API不一致 [\#29](https://github.com/overtrue/wechat/issues/29) +- 希望能有一个ThinkPHP的使用示例 [\#28](https://github.com/overtrue/wechat/issues/28) +- 事件消息 [\#22](https://github.com/overtrue/wechat/issues/22) +- 模板消息notice [\#21](https://github.com/overtrue/wechat/issues/21) +- 关于获取(接收)用户发送消息 [\#19](https://github.com/overtrue/wechat/issues/19) +- 微信公众号绑定的一点问题,请教。 [\#16](https://github.com/overtrue/wechat/issues/16) +- 获取素材列表错误 [\#15](https://github.com/overtrue/wechat/issues/15) + +**Merged pull requests:** + +- Scrutinizer Auto-Fixes [\#69](https://github.com/overtrue/wechat/pull/69) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- Scrutinizer Auto-Fixes [\#68](https://github.com/overtrue/wechat/pull/68) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- Scrutinizer Auto-Fixes [\#67](https://github.com/overtrue/wechat/pull/67) ([scrutinizer-auto-fixer](https://github.com/scrutinizer-auto-fixer)) +- Fixed StyleCI config [\#66](https://github.com/overtrue/wechat/pull/66) ([GrahamCampbell](https://github.com/GrahamCampbell)) +- 洁癖爆发了。。。 [\#62](https://github.com/overtrue/wechat/pull/62) ([TheNorthMemory](https://github.com/TheNorthMemory)) +- fix: js getUrl use Url::current\(\) [\#61](https://github.com/overtrue/wechat/pull/61) ([wdjwxh](https://github.com/wdjwxh)) +- bug-fix: add x-forwarded-host for Url::current [\#60](https://github.com/overtrue/wechat/pull/60) ([wdjwxh](https://github.com/wdjwxh)) +- Fix request method for User::batchGet\(\), should be POST with JSON. [\#59](https://github.com/overtrue/wechat/pull/59) ([acgrid](https://github.com/acgrid)) +- optimize some code [\#58](https://github.com/overtrue/wechat/pull/58) ([tabalt](https://github.com/tabalt)) +- 增加使用media id发送图文消息的功能 [\#52](https://github.com/overtrue/wechat/pull/52) ([zengohm](https://github.com/zengohm)) +- fix Staff::delete, let it works [\#42](https://github.com/overtrue/wechat/pull/42) ([TheNorthMemory](https://github.com/TheNorthMemory)) +- 支持自定义菜单类型:下发消息media\_id、跳转图文消息view\_limited [\#40](https://github.com/overtrue/wechat/pull/40) ([acgrid](https://github.com/acgrid)) +- docline comments & fix AccessToken parameter typos [\#39](https://github.com/overtrue/wechat/pull/39) ([TheNorthMemory](https://github.com/TheNorthMemory)) +- Merge from master [\#38](https://github.com/overtrue/wechat/pull/38) ([overtrue](https://github.com/overtrue)) +- 客服接口Bugfix [\#37](https://github.com/overtrue/wechat/pull/37) ([overtrue](https://github.com/overtrue)) +- fix Staff and AccessToken typos [\#36](https://github.com/overtrue/wechat/pull/36) ([TheNorthMemory](https://github.com/TheNorthMemory)) +- Update QRCode.php [\#33](https://github.com/overtrue/wechat/pull/33) ([refear99](https://github.com/refear99)) +- English Readme [\#32](https://github.com/overtrue/wechat/pull/32) ([hareluya](https://github.com/hareluya)) +- 更新图文消息方法Media::updateNews\(\)与微信API不一致 [\#30](https://github.com/overtrue/wechat/pull/30) ([acgrid](https://github.com/acgrid)) +- 代码之美在于不断修正 :\) [\#27](https://github.com/overtrue/wechat/pull/27) ([TheNorthMemory](https://github.com/TheNorthMemory)) +- the json\_encode $depth parameter was added@5.5.0 [\#26](https://github.com/overtrue/wechat/pull/26) ([TheNorthMemory](https://github.com/TheNorthMemory)) +- fix \#4 for PHP5.3 [\#25](https://github.com/overtrue/wechat/pull/25) ([TheNorthMemory](https://github.com/TheNorthMemory)) +- fix \#4 for PHP5.3 [\#23](https://github.com/overtrue/wechat/pull/23) ([TheNorthMemory](https://github.com/TheNorthMemory)) +- Update QRCode.php [\#17](https://github.com/overtrue/wechat/pull/17) ([gundanx10](https://github.com/gundanx10)) + +## [2.0.1](https://github.com/overtrue/wechat/tree/2.0.1) (2015-05-08) +[Full Changelog](https://github.com/overtrue/wechat/compare/2.0.0...2.0.1) + +**Closed issues:** + +- 2.0版本使用问题 [\#14](https://github.com/overtrue/wechat/issues/14) + +## [2.0.0](https://github.com/overtrue/wechat/tree/2.0.0) (2015-05-07) +[Full Changelog](https://github.com/overtrue/wechat/compare/1.0.1...2.0.0) + +**Closed issues:** + +- 素材管理 -- 部分图片下载失败 [\#13](https://github.com/overtrue/wechat/issues/13) +- 素材管理 -- 图片下载失败 [\#12](https://github.com/overtrue/wechat/issues/12) +- 请问这样判断Mcrypt到底准不准? [\#11](https://github.com/overtrue/wechat/issues/11) +- 好奇怪啊,开发者中心的服务器配置已经提交并验证成功了,可是message不起作用 [\#10](https://github.com/overtrue/wechat/issues/10) +- 网页授权一刷新页面就出现40029 不合法的oauth\_code [\#8](https://github.com/overtrue/wechat/issues/8) +- mcrypt\_module\_open error [\#7](https://github.com/overtrue/wechat/issues/7) +- composer update 之后报错 [\#6](https://github.com/overtrue/wechat/issues/6) +- 今天开始,授权时候一直报40029,invalid code的错误 [\#5](https://github.com/overtrue/wechat/issues/5) +- Using $this when not in object context [\#4](https://github.com/overtrue/wechat/issues/4) +- 监听事件时不区分 $target(监听所有event和message) [\#3](https://github.com/overtrue/wechat/issues/3) +- Does this support Oauth already? [\#1](https://github.com/overtrue/wechat/issues/1) + +**Merged pull requests:** + +- Fix wiki url error [\#9](https://github.com/overtrue/wechat/pull/9) ([sinoon](https://github.com/sinoon)) +- Update Bag.php [\#2](https://github.com/overtrue/wechat/pull/2) ([zerozh](https://github.com/zerozh)) + +## [1.0.1](https://github.com/overtrue/wechat/tree/1.0.1) (2015-03-19) +[Full Changelog](https://github.com/overtrue/wechat/compare/1.0...1.0.1) + +## [1.0](https://github.com/overtrue/wechat/tree/1.0) (2015-03-13) + + +\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/vendor/overtrue/wechat/CONTRIBUTING.md b/vendor/overtrue/wechat/CONTRIBUTING.md new file mode 100755 index 0000000..134204f --- /dev/null +++ b/vendor/overtrue/wechat/CONTRIBUTING.md @@ -0,0 +1,67 @@ +# Contribute + +## Introduction + +First, thank you for considering contributing to wechat! It's people like you that make the open source community such a great community! 😊 + +We welcome any type of contribution, not only code. You can help with +- **QA**: file bug reports, the more details you can give the better (e.g. screenshots with the console open) +- **Marketing**: writing blog posts, howto's, printing stickers, ... +- **Community**: presenting the project at meetups, organizing a dedicated meetup for the local community, ... +- **Code**: take a look at the [open issues](issues). Even if you can't write code, commenting on them, showing that you care about a given issue matters. It helps us triage them. +- **Money**: we welcome financial contributions in full transparency on our [open collective](https://opencollective.com/wechat). + +## Your First Contribution + +Working on your first Pull Request? You can learn how from this *free* series, [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). + +## Submitting code + +Any code change should be submitted as a pull request. The description should explain what the code does and give steps to execute it. The pull request should also contain tests. + +## Code review process + +The bigger the pull request, the longer it will take to review and merge. Try to break down large pull requests in smaller chunks that are easier to review and merge. +It is also always helpful to have some context for your pull request. What was the purpose? Why does it matter to you? + +## Financial contributions + +We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/wechat). +Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed. + +## Questions + +If you have any questions, create an [issue](issue) (protip: do a quick search first to see if someone else didn't ask the same question before!). +You can also reach us at hello@wechat.opencollective.com. + +## Credits + +### Contributors + +Thank you to all the people who have already contributed to wechat! + + + +### Backers + +Thank you to all our backers! [[Become a backer](https://opencollective.com/wechat#backer)] + + + + +### Sponsors + +Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/wechat#sponsor)) + + + + + + + + + + + + + \ No newline at end of file diff --git a/vendor/overtrue/wechat/LICENSE b/vendor/overtrue/wechat/LICENSE new file mode 100755 index 0000000..f80ba02 --- /dev/null +++ b/vendor/overtrue/wechat/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) overtrue + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/vendor/overtrue/wechat/README.md b/vendor/overtrue/wechat/README.md new file mode 100755 index 0000000..0c55bff --- /dev/null +++ b/vendor/overtrue/wechat/README.md @@ -0,0 +1,92 @@ +EasyWeChat Logo + +

                            EasyWeChat

                            + +📦 It is probably the best SDK in the world for developing Wechat App. + +[![Build Status](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/badge/overtrue/wechat)](https://wdp9fww0r9.execute-api.us-west-2.amazonaws.com/production/results/overtrue/wechat) +[![Latest Stable Version](https://poser.pugx.org/overtrue/wechat/v/stable.svg)](https://packagist.org/packages/overtrue/wechat) +[![Latest Unstable Version](https://poser.pugx.org/overtrue/wechat/v/unstable.svg)](https://packagist.org/packages/overtrue/wechat) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/overtrue/wechat/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/overtrue/wechat/?branch=master) +[![Code Coverage](https://scrutinizer-ci.com/g/overtrue/wechat/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/overtrue/wechat/?branch=master) +[![Total Downloads](https://poser.pugx.org/overtrue/wechat/downloads)](https://packagist.org/packages/overtrue/wechat) +[![License](https://poser.pugx.org/overtrue/wechat/license)](https://packagist.org/packages/overtrue/wechat) + +[![7.0-9.9](https://raw.githubusercontent.com/ruffood/ruofan/master/img/ad0724.jpg)](http://prt.ruffood.com/jump/overtrue) + +## Requirement + +1. PHP >= 7.1 +2. **[Composer](https://getcomposer.org/)** +3. openssl 拓展 +4. fileinfo 拓展(素材管理模块需要用到) + +## Installation + +```shell +$ composer require "overtrue/wechat:~4.1" -vvv +``` + +## Usage + +基本使用(以服务端为例): + +```php + 'wx3cf0f39249eb0exxx', + 'secret' => 'f1c242f4f28f735d4687abb469072xxx', + 'token' => 'easywechat', + 'log' => [ + 'level' => 'debug', + 'file' => '/tmp/easywechat.log', + ], + // ... +]; + +$app = Factory::officialAccount($options); + +$server = $app->server; +$user = $app->user; + +$server->push(function($message) use ($user) { + $fromUser = $user->get($message['FromUserName']); + + return "{$fromUser->nickname} 您好!欢迎关注 overtrue!"; +}); + +$server->serve()->send(); +``` + +更多请参考 [https://www.easywechat.com/](https://www.easywechat.com/)。 + +## Documentation + +[官网](https://www.easywechat.com) · [教程](https://www.easywechat.com/tutorials) · [讨论](https://yike.io/) · [微信公众平台](https://mp.weixin.qq.com/wiki) · [WeChat Official](http://admin.wechat.com/wiki) + +## Integration + +[Laravel 5 拓展包: overtrue/laravel-wechat](https://github.com/overtrue/laravel-wechat) + +## Contributors + +This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)]. + + + +## PHP 扩展包开发 + +> 想知道如何从零开始构建 PHP 扩展包? +> +> 请关注我的实战课程,我会在此课程中分享一些扩展开发经验 —— [《PHP 扩展包实战教程 - 从入门到发布》](https://learnku.com/courses/creating-package) + + +## License + +MIT + + +[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fovertrue%2Fwechat.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fovertrue%2Fwechat?ref=badge_large) diff --git a/vendor/overtrue/wechat/composer.json b/vendor/overtrue/wechat/composer.json new file mode 100755 index 0000000..978141d --- /dev/null +++ b/vendor/overtrue/wechat/composer.json @@ -0,0 +1,59 @@ +{ + "name": "overtrue/wechat", + "description": "微信SDK", + "keywords": [ + "wechat", + "weixin", + "weixin-sdk", + "sdk" + ], + "license": "MIT", + "authors": [ + { + "name": "overtrue", + "email": "anzhengchao@gmail.com" + } + ], + "require": { + "php": ">=7.1", + "ext-fileinfo": "*", + "ext-openssl": "*", + "ext-simplexml": "*", + "easywechat-composer/easywechat-composer": "^1.1", + "guzzlehttp/guzzle": "^6.2", + "monolog/monolog": "^1.22", + "overtrue/socialite": "~2.0", + "pimple/pimple": "^3.0", + "psr/simple-cache": "^1.0", + "symfony/cache": "^3.3 || ^4.3", + "symfony/event-dispatcher": "^4.3", + "symfony/http-foundation": "^2.7 || ^3.0 || ^4.0", + "symfony/psr-http-message-bridge": "^0.3 || ^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.15", + "mikey179/vfsstream": "^1.6", + "mockery/mockery": "^1.0", + "phpstan/phpstan": "^0.11.12", + "phpunit/phpunit": "~6.5" + }, + "autoload": { + "psr-4": { + "EasyWeChat\\": "src/" + }, + "files": [ + "src/Kernel/Support/Helpers.php", + "src/Kernel/Helpers.php" + ] + }, + "autoload-dev": { + "psr-4": { + "EasyWeChat\\Tests\\": "tests/" + } + }, + "scripts": { + "phpcs": "vendor/bin/php-cs-fixer fix", + "phpstan": "vendor/bin/phpstan analyse", + "test": "vendor/bin/phpunit" + } +} diff --git a/vendor/overtrue/wechat/phpstan.neon b/vendor/overtrue/wechat/phpstan.neon new file mode 100755 index 0000000..c5996ab --- /dev/null +++ b/vendor/overtrue/wechat/phpstan.neon @@ -0,0 +1,18 @@ +parameters: + level: 3 + paths: + - src + inferPrivatePropertyTypeFromConstructor: true + ignoreErrors: + - '#EasyWeChat\\MicroMerchant\\Kernel\\BaseClient::__construct\(\) does not call parent constructor from EasyWeChat\\Payment\\Kernel\\BaseClient#' + - '#Psr.*Exception is not subtype of Throwable#' + - '#Call to an undefined method Overtrue\\Socialite\\ProviderInterface#' + - '#Access to an undefined property .*\$base#' + - '#Call to an undefined method EasyWeChat\\Payment\\Application::verifySignature\(\)#' + - '#Access to an undefined property EasyWeChat\\Kernel\\Messages\\Raw::\$content#' + - '#Default value of the parameter \#2 \$depth \(INF.0\) of method EasyWeChat\\Kernel\\Support\\Arr::flatten\(\) is incompatible with type int#' + - '#Access to an undefined property EasyWeChat\\Kernel\\ServiceContainer::\$extension#' + - '#Method EasyWeChat\\Kernel\\Contracts\\MessageInterface::transformToXml\(\) invoked with 1 parameter, 0 required#' + - '#GuzzleHttp\\Exception\\GuzzleException is not subtype of Throwable#' + - '#Method EasyWeChat\\Kernel\\Support\\Collection::__set_state\(\) should return object but returns array#' + - '#Property EasyWeChat\\Payment\\Kernel\\BaseClient::\$app \(EasyWeChat\\Payment\\Application\) does not accept EasyWeChat\\MicroMerchant\\Application#' diff --git a/vendor/overtrue/wechat/src/BasicService/Application.php b/vendor/overtrue/wechat/src/BasicService/Application.php new file mode 100755 index 0000000..e4b1e8a --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/Application.php @@ -0,0 +1,39 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService; + +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Class Application. + * + * @author overtrue + * + * @property \EasyWeChat\BasicService\Jssdk\Client $jssdk + * @property \EasyWeChat\BasicService\Media\Client $media + * @property \EasyWeChat\BasicService\QrCode\Client $qrcode + * @property \EasyWeChat\BasicService\Url\Client $url + * @property \EasyWeChat\BasicService\ContentSecurity\Client $content_security + */ +class Application extends ServiceContainer +{ + /** + * @var array + */ + protected $providers = [ + Jssdk\ServiceProvider::class, + QrCode\ServiceProvider::class, + Media\ServiceProvider::class, + Url\ServiceProvider::class, + ContentSecurity\ServiceProvider::class, + ]; +} diff --git a/vendor/overtrue/wechat/src/BasicService/ContentSecurity/Client.php b/vendor/overtrue/wechat/src/BasicService/ContentSecurity/Client.php new file mode 100755 index 0000000..7f12baa --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/ContentSecurity/Client.php @@ -0,0 +1,59 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\ContentSecurity; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author tianyong90 <412039588@qq.com> + */ +class Client extends BaseClient +{ + /** + * @var string + */ + protected $baseUri = 'https://api.weixin.qq.com/wxa/'; + + /** + * Text content security check. + * + * @param string $text + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function checkText(string $text) + { + $params = [ + 'content' => $text, + ]; + + return $this->httpPostJson('msg_sec_check', $params); + } + + /** + * Image security check. + * + * @param string $path + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function checkImage(string $path) + { + return $this->httpUpload('img_sec_check', ['media' => $path]); + } +} diff --git a/vendor/overtrue/wechat/src/BasicService/ContentSecurity/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/ContentSecurity/ServiceProvider.php new file mode 100755 index 0000000..3645de9 --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/ContentSecurity/ServiceProvider.php @@ -0,0 +1,31 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\ContentSecurity; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['content_security'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/BasicService/Jssdk/Client.php b/vendor/overtrue/wechat/src/BasicService/Jssdk/Client.php new file mode 100755 index 0000000..4a19628 --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/Jssdk/Client.php @@ -0,0 +1,205 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\Jssdk; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Support; +use EasyWeChat\Kernel\Traits\InteractsWithCache; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + use InteractsWithCache; + + /** + * @var string + */ + protected $ticketEndpoint = 'https://api.weixin.qq.com/cgi-bin/ticket/getticket'; + + /** + * Current URI. + * + * @var string + */ + protected $url; + + /** + * Get config json for jsapi. + * + * @param array $jsApiList + * @param bool $debug + * @param bool $beta + * @param bool $json + * + * @return array|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function buildConfig(array $jsApiList, bool $debug = false, bool $beta = false, bool $json = true) + { + $config = array_merge(compact('debug', 'beta', 'jsApiList'), $this->configSignature()); + + return $json ? json_encode($config) : $config; + } + + /** + * Return jsapi config as a PHP array. + * + * @param array $apis + * @param bool $debug + * @param bool $beta + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function getConfigArray(array $apis, bool $debug = false, bool $beta = false) + { + return $this->buildConfig($apis, $debug, $beta, false); + } + + /** + * Get js ticket. + * + * @param bool $refresh + * @param string $type + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function getTicket(bool $refresh = false, string $type = 'jsapi'): array + { + $cacheKey = sprintf('easywechat.basic_service.jssdk.ticket.%s.%s', $type, $this->getAppId()); + + if (!$refresh && $this->getCache()->has($cacheKey)) { + return $this->getCache()->get($cacheKey); + } + + /** @var array $result */ + $result = $this->castResponseToType( + $this->requestRaw($this->ticketEndpoint, 'GET', ['query' => ['type' => $type]]), + 'array' + ); + + $this->getCache()->set($cacheKey, $result, $result['expires_in'] - 500); + + if (!$this->getCache()->has($cacheKey)) { + throw new RuntimeException('Failed to cache jssdk ticket.'); + } + + return $result; + } + + /** + * Build signature. + * + * @param string|null $url + * @param string|null $nonce + * @param int|null $timestamp + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + protected function configSignature(string $url = null, string $nonce = null, $timestamp = null): array + { + $url = $url ?: $this->getUrl(); + $nonce = $nonce ?: Support\Str::quickRandom(10); + $timestamp = $timestamp ?: time(); + + return [ + 'appId' => $this->getAppId(), + 'nonceStr' => $nonce, + 'timestamp' => $timestamp, + 'url' => $url, + 'signature' => $this->getTicketSignature($this->getTicket()['ticket'], $nonce, $timestamp, $url), + ]; + } + + /** + * Sign the params. + * + * @param string $ticket + * @param string $nonce + * @param int $timestamp + * @param string $url + * + * @return string + */ + public function getTicketSignature($ticket, $nonce, $timestamp, $url): string + { + return sha1(sprintf('jsapi_ticket=%s&noncestr=%s×tamp=%s&url=%s', $ticket, $nonce, $timestamp, $url)); + } + + /** + * @return string + */ + public function dictionaryOrderSignature() + { + $params = func_get_args(); + + sort($params, SORT_STRING); + + return sha1(implode('', $params)); + } + + /** + * Set current url. + * + * @param string $url + * + * @return $this + */ + public function setUrl(string $url) + { + $this->url = $url; + + return $this; + } + + /** + * Get current url. + * + * @return string + */ + public function getUrl(): string + { + if ($this->url) { + return $this->url; + } + + return Support\current_url(); + } + + /** + * @return string + */ + protected function getAppId() + { + return $this->app['config']->get('app_id'); + } +} diff --git a/vendor/overtrue/wechat/src/BasicService/Jssdk/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/Jssdk/ServiceProvider.php new file mode 100755 index 0000000..5581a1e --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/Jssdk/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\Jssdk; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['jssdk'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/BasicService/Media/Client.php b/vendor/overtrue/wechat/src/BasicService/Media/Client.php new file mode 100755 index 0000000..13f1afa --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/Media/Client.php @@ -0,0 +1,212 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\Media; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Http\StreamResponse; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * @var string + */ + protected $baseUri = 'https://api.weixin.qq.com/cgi-bin/'; + + /** + * Allow media type. + * + * @var array + */ + protected $allowTypes = ['image', 'voice', 'video', 'thumb']; + + /** + * Upload image. + * + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function uploadImage($path) + { + return $this->upload('image', $path); + } + + /** + * Upload video. + * + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function uploadVideo($path) + { + return $this->upload('video', $path); + } + + /** + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function uploadVoice($path) + { + return $this->upload('voice', $path); + } + + /** + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function uploadThumb($path) + { + return $this->upload('thumb', $path); + } + + /** + * Upload temporary material. + * + * @param string $type + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function upload(string $type, string $path) + { + if (!file_exists($path) || !is_readable($path)) { + throw new InvalidArgumentException(sprintf("File does not exist, or the file is unreadable: '%s'", $path)); + } + + if (!in_array($type, $this->allowTypes, true)) { + throw new InvalidArgumentException(sprintf("Unsupported media type: '%s'", $type)); + } + + return $this->httpUpload('media/upload', ['media' => $path], ['type' => $type]); + } + + /** + * @param string $path + * @param string $title + * @param string $description + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function uploadVideoForBroadcasting(string $path, string $title, string $description) + { + $response = $this->uploadVideo($path); + /** @var array $arrayResponse */ + $arrayResponse = $this->detectAndCastResponseToType($response, 'array'); + + if (!empty($arrayResponse['media_id'])) { + return $this->createVideoForBroadcasting($arrayResponse['media_id'], $title, $description); + } + + return $response; + } + + /** + * @param string $mediaId + * @param string $title + * @param string $description + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function createVideoForBroadcasting(string $mediaId, string $title, string $description) + { + return $this->httpPostJson('media/uploadvideo', [ + 'media_id' => $mediaId, + 'title' => $title, + 'description' => $description, + ]); + } + + /** + * Fetch item from WeChat server. + * + * @param string $mediaId + * + * @return \EasyWeChat\Kernel\Http\StreamResponse|\Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function get(string $mediaId) + { + $response = $this->requestRaw('media/get', 'GET', [ + 'query' => [ + 'media_id' => $mediaId, + ], + ]); + + if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { + return StreamResponse::buildFromPsrResponse($response); + } + + return $this->castResponseToType($response, $this->app['config']->get('response_type')); + } + + /** + * @param string $mediaId + * + * @return array|\EasyWeChat\Kernel\Http\Response|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function getJssdkMedia(string $mediaId) + { + $response = $this->requestRaw('media/get/jssdk', 'GET', [ + 'query' => [ + 'media_id' => $mediaId, + ], + ]); + + if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { + return StreamResponse::buildFromPsrResponse($response); + } + + return $this->castResponseToType($response, $this->app['config']->get('response_type')); + } +} diff --git a/vendor/overtrue/wechat/src/BasicService/Media/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/Media/ServiceProvider.php new file mode 100755 index 0000000..45de142 --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/Media/ServiceProvider.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * ServiceProvider.php. + * + * This file is part of the wechat. + * + * (c) overtrue + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\Media; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['media'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/BasicService/QrCode/Client.php b/vendor/overtrue/wechat/src/BasicService/QrCode/Client.php new file mode 100755 index 0000000..564f129 --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/QrCode/Client.php @@ -0,0 +1,117 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\QrCode; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * @var string + */ + protected $baseUri = 'https://api.weixin.qq.com/cgi-bin/'; + + const DAY = 86400; + const SCENE_MAX_VALUE = 100000; + const SCENE_QR_CARD = 'QR_CARD'; + const SCENE_QR_TEMPORARY = 'QR_SCENE'; + const SCENE_QR_TEMPORARY_STR = 'QR_STR_SCENE'; + const SCENE_QR_FOREVER = 'QR_LIMIT_SCENE'; + const SCENE_QR_FOREVER_STR = 'QR_LIMIT_STR_SCENE'; + + /** + * Create forever QR code. + * + * @param string|int $sceneValue + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function forever($sceneValue) + { + if (is_int($sceneValue) && $sceneValue > 0 && $sceneValue < self::SCENE_MAX_VALUE) { + $type = self::SCENE_QR_FOREVER; + $sceneKey = 'scene_id'; + } else { + $type = self::SCENE_QR_FOREVER_STR; + $sceneKey = 'scene_str'; + } + $scene = [$sceneKey => $sceneValue]; + + return $this->create($type, $scene, false); + } + + /** + * Create temporary QR code. + * + * @param string|int $sceneValue + * @param int|null $expireSeconds + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function temporary($sceneValue, $expireSeconds = null) + { + if (is_int($sceneValue) && $sceneValue > 0) { + $type = self::SCENE_QR_TEMPORARY; + $sceneKey = 'scene_id'; + } else { + $type = self::SCENE_QR_TEMPORARY_STR; + $sceneKey = 'scene_str'; + } + $scene = [$sceneKey => $sceneValue]; + + return $this->create($type, $scene, true, $expireSeconds); + } + + /** + * Return url for ticket. + * Detail: https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1443433542 . + * + * @param string $ticket + * + * @return string + */ + public function url($ticket) + { + return sprintf('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=%s', urlencode($ticket)); + } + + /** + * Create a QrCode. + * + * @param string $actionName + * @param array $actionInfo + * @param bool $temporary + * @param int $expireSeconds + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + protected function create($actionName, $actionInfo, $temporary = true, $expireSeconds = null) + { + null !== $expireSeconds || $expireSeconds = 7 * self::DAY; + + $params = [ + 'action_name' => $actionName, + 'action_info' => ['scene' => $actionInfo], + ]; + + if ($temporary) { + $params['expire_seconds'] = min($expireSeconds, 30 * self::DAY); + } + + return $this->httpPostJson('qrcode/create', $params); + } +} diff --git a/vendor/overtrue/wechat/src/BasicService/QrCode/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/QrCode/ServiceProvider.php new file mode 100755 index 0000000..1638c66 --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/QrCode/ServiceProvider.php @@ -0,0 +1,31 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\QrCode; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['qrcode'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/BasicService/Url/Client.php b/vendor/overtrue/wechat/src/BasicService/Url/Client.php new file mode 100755 index 0000000..e146ea6 --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/Url/Client.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\Url; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * @var string + */ + protected $baseUri = 'https://api.weixin.qq.com/'; + + /** + * Shorten the url. + * + * @param string $url + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function shorten(string $url) + { + $params = [ + 'action' => 'long2short', + 'long_url' => $url, + ]; + + return $this->httpPostJson('cgi-bin/shorturl', $params); + } +} diff --git a/vendor/overtrue/wechat/src/BasicService/Url/ServiceProvider.php b/vendor/overtrue/wechat/src/BasicService/Url/ServiceProvider.php new file mode 100755 index 0000000..6740bb8 --- /dev/null +++ b/vendor/overtrue/wechat/src/BasicService/Url/ServiceProvider.php @@ -0,0 +1,31 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\BasicService\Url; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['url'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Factory.php b/vendor/overtrue/wechat/src/Factory.php new file mode 100755 index 0000000..295b4ff --- /dev/null +++ b/vendor/overtrue/wechat/src/Factory.php @@ -0,0 +1,54 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat; + +/** + * Class Factory. + * + * @method static \EasyWeChat\Payment\Application payment(array $config) + * @method static \EasyWeChat\MiniProgram\Application miniProgram(array $config) + * @method static \EasyWeChat\OpenPlatform\Application openPlatform(array $config) + * @method static \EasyWeChat\OfficialAccount\Application officialAccount(array $config) + * @method static \EasyWeChat\BasicService\Application basicService(array $config) + * @method static \EasyWeChat\Work\Application work(array $config) + * @method static \EasyWeChat\OpenWork\Application openWork(array $config) + * @method static \EasyWeChat\MicroMerchant\Application microMerchant(array $config) + */ +class Factory +{ + /** + * @param string $name + * @param array $config + * + * @return \EasyWeChat\Kernel\ServiceContainer + */ + public static function make($name, array $config) + { + $namespace = Kernel\Support\Str::studly($name); + $application = "\\EasyWeChat\\{$namespace}\\Application"; + + return new $application($config); + } + + /** + * Dynamically pass methods to the application. + * + * @param string $name + * @param array $arguments + * + * @return mixed + */ + public static function __callStatic($name, $arguments) + { + return self::make($name, ...$arguments); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/AccessToken.php b/vendor/overtrue/wechat/src/Kernel/AccessToken.php new file mode 100755 index 0000000..5a1e267 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/AccessToken.php @@ -0,0 +1,280 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel; + +use EasyWeChat\Kernel\Contracts\AccessTokenInterface; +use EasyWeChat\Kernel\Exceptions\HttpException; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Traits\HasHttpRequests; +use EasyWeChat\Kernel\Traits\InteractsWithCache; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; + +/** + * Class AccessToken. + * + * @author overtrue + */ +abstract class AccessToken implements AccessTokenInterface +{ + use HasHttpRequests; + use InteractsWithCache; + + /** + * @var \EasyWeChat\Kernel\ServiceContainer + */ + protected $app; + + /** + * @var string + */ + protected $requestMethod = 'GET'; + + /** + * @var string + */ + protected $endpointToGetToken; + + /** + * @var string + */ + protected $queryName; + + /** + * @var array + */ + protected $token; + + /** + * @var int + */ + protected $safeSeconds = 500; + + /** + * @var string + */ + protected $tokenKey = 'access_token'; + + /** + * @var string + */ + protected $cachePrefix = 'easywechat.kernel.access_token.'; + + /** + * AccessToken constructor. + * + * @param \EasyWeChat\Kernel\ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + $this->app = $app; + } + + /** + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\HttpException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function getRefreshedToken(): array + { + return $this->getToken(true); + } + + /** + * @param bool $refresh + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\HttpException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function getToken(bool $refresh = false): array + { + $cacheKey = $this->getCacheKey(); + $cache = $this->getCache(); + + if (!$refresh && $cache->has($cacheKey)) { + return $cache->get($cacheKey); + } + + /** @var array $token */ + $token = $this->requestToken($this->getCredentials(), true); + + $this->setToken($token[$this->tokenKey], $token['expires_in'] ?? 7200); + + $this->app->events->dispatch(new Events\AccessTokenRefreshed($this)); + + return $token; + } + + /** + * @param string $token + * @param int $lifetime + * + * @return \EasyWeChat\Kernel\Contracts\AccessTokenInterface + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function setToken(string $token, int $lifetime = 7200): AccessTokenInterface + { + $this->getCache()->set($this->getCacheKey(), [ + $this->tokenKey => $token, + 'expires_in' => $lifetime, + ], $lifetime - $this->safeSeconds); + + if (!$this->getCache()->has($this->getCacheKey())) { + throw new RuntimeException('Failed to cache access token.'); + } + + return $this; + } + + /** + * @return \EasyWeChat\Kernel\Contracts\AccessTokenInterface + * + * @throws \EasyWeChat\Kernel\Exceptions\HttpException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function refresh(): AccessTokenInterface + { + $this->getToken(true); + + return $this; + } + + /** + * @param array $credentials + * @param bool $toArray + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\HttpException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function requestToken(array $credentials, $toArray = false) + { + $response = $this->sendRequest($credentials); + $result = json_decode($response->getBody()->getContents(), true); + $formatted = $this->castResponseToType($response, $this->app['config']->get('response_type')); + + if (empty($result[$this->tokenKey])) { + throw new HttpException('Request access_token fail: '.json_encode($result, JSON_UNESCAPED_UNICODE), $response, $formatted); + } + + return $toArray ? $result : $formatted; + } + + /** + * @param \Psr\Http\Message\RequestInterface $request + * @param array $requestOptions + * + * @return \Psr\Http\Message\RequestInterface + * + * @throws \EasyWeChat\Kernel\Exceptions\HttpException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function applyToRequest(RequestInterface $request, array $requestOptions = []): RequestInterface + { + parse_str($request->getUri()->getQuery(), $query); + + $query = http_build_query(array_merge($this->getQuery(), $query)); + + return $request->withUri($request->getUri()->withQuery($query)); + } + + /** + * Send http request. + * + * @param array $credentials + * + * @return ResponseInterface + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + protected function sendRequest(array $credentials): ResponseInterface + { + $options = [ + ('GET' === $this->requestMethod) ? 'query' : 'json' => $credentials, + ]; + + return $this->setHttpClient($this->app['http_client'])->request($this->getEndpoint(), $this->requestMethod, $options); + } + + /** + * @return string + */ + protected function getCacheKey() + { + return $this->cachePrefix.md5(json_encode($this->getCredentials())); + } + + /** + * The request query will be used to add to the request. + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\HttpException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + protected function getQuery(): array + { + return [$this->queryName ?? $this->tokenKey => $this->getToken()[$this->tokenKey]]; + } + + /** + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function getEndpoint(): string + { + if (empty($this->endpointToGetToken)) { + throw new InvalidArgumentException('No endpoint for access token request.'); + } + + return $this->endpointToGetToken; + } + + /** + * @return string + */ + public function getTokenKey() + { + return $this->tokenKey; + } + + /** + * Credential for get token. + * + * @return array + */ + abstract protected function getCredentials(): array; +} diff --git a/vendor/overtrue/wechat/src/Kernel/BaseClient.php b/vendor/overtrue/wechat/src/Kernel/BaseClient.php new file mode 100755 index 0000000..84e8ff7 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/BaseClient.php @@ -0,0 +1,269 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel; + +use EasyWeChat\Kernel\Contracts\AccessTokenInterface; +use EasyWeChat\Kernel\Http\Response; +use EasyWeChat\Kernel\Traits\HasHttpRequests; +use GuzzleHttp\MessageFormatter; +use GuzzleHttp\Middleware; +use Psr\Http\Message\RequestInterface; +use Psr\Http\Message\ResponseInterface; +use Psr\Log\LogLevel; + +/** + * Class BaseClient. + * + * @author overtrue + */ +class BaseClient +{ + use HasHttpRequests { request as performRequest; } + + /** + * @var \EasyWeChat\Kernel\ServiceContainer + */ + protected $app; + + /** + * @var \EasyWeChat\Kernel\Contracts\AccessTokenInterface + */ + protected $accessToken; + + /** + * @var string + */ + protected $baseUri; + + /** + * BaseClient constructor. + * + * @param \EasyWeChat\Kernel\ServiceContainer $app + * @param \EasyWeChat\Kernel\Contracts\AccessTokenInterface|null $accessToken + */ + public function __construct(ServiceContainer $app, AccessTokenInterface $accessToken = null) + { + $this->app = $app; + $this->accessToken = $accessToken ?? $this->app['access_token']; + } + + /** + * GET request. + * + * @param string $url + * @param array $query + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function httpGet(string $url, array $query = []) + { + return $this->request($url, 'GET', ['query' => $query]); + } + + /** + * POST request. + * + * @param string $url + * @param array $data + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function httpPost(string $url, array $data = []) + { + return $this->request($url, 'POST', ['form_params' => $data]); + } + + /** + * JSON request. + * + * @param string $url + * @param array $data + * @param array $query + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function httpPostJson(string $url, array $data = [], array $query = []) + { + return $this->request($url, 'POST', ['query' => $query, 'json' => $data]); + } + + /** + * Upload file. + * + * @param string $url + * @param array $files + * @param array $form + * @param array $query + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function httpUpload(string $url, array $files = [], array $form = [], array $query = []) + { + $multipart = []; + + foreach ($files as $name => $path) { + $multipart[] = [ + 'name' => $name, + 'contents' => fopen($path, 'r'), + ]; + } + + foreach ($form as $name => $contents) { + $multipart[] = compact('name', 'contents'); + } + + return $this->request($url, 'POST', ['query' => $query, 'multipart' => $multipart, 'connect_timeout' => 30, 'timeout' => 30, 'read_timeout' => 30]); + } + + /** + * @return AccessTokenInterface + */ + public function getAccessToken(): AccessTokenInterface + { + return $this->accessToken; + } + + /** + * @param \EasyWeChat\Kernel\Contracts\AccessTokenInterface $accessToken + * + * @return $this + */ + public function setAccessToken(AccessTokenInterface $accessToken) + { + $this->accessToken = $accessToken; + + return $this; + } + + /** + * @param string $url + * @param string $method + * @param array $options + * @param bool $returnRaw + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function request(string $url, string $method = 'GET', array $options = [], $returnRaw = false) + { + if (empty($this->middlewares)) { + $this->registerHttpMiddlewares(); + } + + $response = $this->performRequest($url, $method, $options); + + $this->app->events->dispatch(new Events\HttpResponseCreated($response)); + + return $returnRaw ? $response : $this->castResponseToType($response, $this->app->config->get('response_type')); + } + + /** + * @param string $url + * @param string $method + * @param array $options + * + * @return \EasyWeChat\Kernel\Http\Response + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function requestRaw(string $url, string $method = 'GET', array $options = []) + { + return Response::buildFromPsrResponse($this->request($url, $method, $options, true)); + } + + /** + * Register Guzzle middlewares. + */ + protected function registerHttpMiddlewares() + { + // retry + $this->pushMiddleware($this->retryMiddleware(), 'retry'); + // access token + $this->pushMiddleware($this->accessTokenMiddleware(), 'access_token'); + // log + $this->pushMiddleware($this->logMiddleware(), 'log'); + } + + /** + * Attache access token to request query. + * + * @return \Closure + */ + protected function accessTokenMiddleware() + { + return function (callable $handler) { + return function (RequestInterface $request, array $options) use ($handler) { + if ($this->accessToken) { + $request = $this->accessToken->applyToRequest($request, $options); + } + + return $handler($request, $options); + }; + }; + } + + /** + * Log the request. + * + * @return \Closure + */ + protected function logMiddleware() + { + $formatter = new MessageFormatter($this->app['config']['http.log_template'] ?? MessageFormatter::DEBUG); + + return Middleware::log($this->app['logger'], $formatter, LogLevel::DEBUG); + } + + /** + * Return retry middleware. + * + * @return \Closure + */ + protected function retryMiddleware() + { + return Middleware::retry(function ( + $retries, + RequestInterface $request, + ResponseInterface $response = null + ) { + // Limit the number of retries to 2 + if ($retries < $this->app->config->get('http.max_retries', 1) && $response && $body = $response->getBody()) { + // Retry on server errors + $response = json_decode($body, true); + + if (!empty($response['errcode']) && in_array(abs($response['errcode']), [40001, 40014, 42001], true)) { + $this->accessToken->refresh(); + $this->app['logger']->debug('Retrying with refreshed access token.'); + + return true; + } + } + + return false; + }, function () { + return abs($this->app->config->get('http.retry_delay', 500)); + }); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Clauses/Clause.php b/vendor/overtrue/wechat/src/Kernel/Clauses/Clause.php new file mode 100755 index 0000000..49bbb22 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Clauses/Clause.php @@ -0,0 +1,64 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Clauses; + +/** + * Class Clause. + * + * @author mingyoung + */ +class Clause +{ + /** + * @var array + */ + protected $clauses = [ + 'where' => [], + ]; + + /** + * @param mixed ...$args + * + * @return $this + */ + public function where(...$args) + { + array_push($this->clauses['where'], $args); + + return $this; + } + + /** + * @param mixed $payload + * + * @return bool + */ + public function intercepted($payload) + { + return (bool) $this->interceptWhereClause($payload); + } + + /** + * @param mixed $payload + * + * @return bool + */ + protected function interceptWhereClause($payload) + { + foreach ($this->clauses['where'] as $item) { + list($key, $value) = $item; + if (isset($payload[$key]) && $payload[$key] !== $value) { + return true; + } + } + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Config.php b/vendor/overtrue/wechat/src/Kernel/Config.php new file mode 100755 index 0000000..081f6fd --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Config.php @@ -0,0 +1,23 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel; + +use EasyWeChat\Kernel\Support\Collection; + +/** + * Class Config. + * + * @author overtrue + */ +class Config extends Collection +{ +} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/AccessTokenInterface.php b/vendor/overtrue/wechat/src/Kernel/Contracts/AccessTokenInterface.php new file mode 100755 index 0000000..56f4a4d --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Contracts/AccessTokenInterface.php @@ -0,0 +1,40 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Contracts; + +use Psr\Http\Message\RequestInterface; + +/** + * Interface AuthorizerAccessToken. + * + * @author overtrue + */ +interface AccessTokenInterface +{ + /** + * @return array + */ + public function getToken(): array; + + /** + * @return \EasyWeChat\Kernel\Contracts\AccessTokenInterface + */ + public function refresh(): self; + + /** + * @param \Psr\Http\Message\RequestInterface $request + * @param array $requestOptions + * + * @return \Psr\Http\Message\RequestInterface + */ + public function applyToRequest(RequestInterface $request, array $requestOptions = []): RequestInterface; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/Arrayable.php b/vendor/overtrue/wechat/src/Kernel/Contracts/Arrayable.php new file mode 100755 index 0000000..d947f8f --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Contracts/Arrayable.php @@ -0,0 +1,29 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Contracts; + +use ArrayAccess; + +/** + * Interface Arrayable. + * + * @author overtrue + */ +interface Arrayable extends ArrayAccess +{ + /** + * Get the instance as an array. + * + * @return array + */ + public function toArray(); +} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/EventHandlerInterface.php b/vendor/overtrue/wechat/src/Kernel/Contracts/EventHandlerInterface.php new file mode 100755 index 0000000..c9d116c --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Contracts/EventHandlerInterface.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Contracts; + +/** + * Interface EventHandlerInterface. + * + * @author mingyoung + */ +interface EventHandlerInterface +{ + /** + * @param mixed $payload + */ + public function handle($payload = null); +} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/MediaInterface.php b/vendor/overtrue/wechat/src/Kernel/Contracts/MediaInterface.php new file mode 100755 index 0000000..63768cf --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Contracts/MediaInterface.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Contracts; + +/** + * Interface MediaInterface. + * + * @author overtrue + */ +interface MediaInterface extends MessageInterface +{ + /** + * @return string + */ + public function getMediaId(): string; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Contracts/MessageInterface.php b/vendor/overtrue/wechat/src/Kernel/Contracts/MessageInterface.php new file mode 100755 index 0000000..29ddb57 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Contracts/MessageInterface.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Contracts; + +/** + * Interface MessageInterface. + * + * @author overtrue + */ +interface MessageInterface +{ + /** + * @return string + */ + public function getType(): string; + + /** + * @return array + */ + public function transformForJsonRequest(): array; + + /** + * @return string + */ + public function transformToXml(): string; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Decorators/FinallyResult.php b/vendor/overtrue/wechat/src/Kernel/Decorators/FinallyResult.php new file mode 100755 index 0000000..e698bbf --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Decorators/FinallyResult.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Decorators; + +/** + * Class FinallyResult. + * + * @author overtrue + */ +class FinallyResult +{ + /** + * @var mixed + */ + public $content; + + /** + * FinallyResult constructor. + * + * @param mixed $content + */ + public function __construct($content) + { + $this->content = $content; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Decorators/TerminateResult.php b/vendor/overtrue/wechat/src/Kernel/Decorators/TerminateResult.php new file mode 100755 index 0000000..cf1042d --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Decorators/TerminateResult.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Decorators; + +/** + * Class TerminateResult. + * + * @author overtrue + */ +class TerminateResult +{ + /** + * @var mixed + */ + public $content; + + /** + * FinallyResult constructor. + * + * @param mixed $content + */ + public function __construct($content) + { + $this->content = $content; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Encryptor.php b/vendor/overtrue/wechat/src/Kernel/Encryptor.php new file mode 100755 index 0000000..150ad21 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Encryptor.php @@ -0,0 +1,219 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel; + +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Support\AES; +use function EasyWeChat\Kernel\Support\str_random; +use EasyWeChat\Kernel\Support\XML; +use Throwable; + +/** + * Class Encryptor. + * + * @author overtrue + */ +class Encryptor +{ + const ERROR_INVALID_SIGNATURE = -40001; // Signature verification failed + const ERROR_PARSE_XML = -40002; // Parse XML failed + const ERROR_CALC_SIGNATURE = -40003; // Calculating the signature failed + const ERROR_INVALID_AES_KEY = -40004; // Invalid AESKey + const ERROR_INVALID_APP_ID = -40005; // Check AppID failed + const ERROR_ENCRYPT_AES = -40006; // AES EncryptionInterface failed + const ERROR_DECRYPT_AES = -40007; // AES decryption failed + const ERROR_INVALID_XML = -40008; // Invalid XML + const ERROR_BASE64_ENCODE = -40009; // Base64 encoding failed + const ERROR_BASE64_DECODE = -40010; // Base64 decoding failed + const ERROR_XML_BUILD = -40011; // XML build failed + const ILLEGAL_BUFFER = -41003; // Illegal buffer + + /** + * App id. + * + * @var string + */ + protected $appId; + + /** + * App token. + * + * @var string + */ + protected $token; + + /** + * @var string + */ + protected $aesKey; + + /** + * Block size. + * + * @var int + */ + protected $blockSize = 32; + + /** + * Constructor. + * + * @param string $appId + * @param string|null $token + * @param string|null $aesKey + */ + public function __construct(string $appId, string $token = null, string $aesKey = null) + { + $this->appId = $appId; + $this->token = $token; + $this->aesKey = base64_decode($aesKey.'=', true); + } + + /** + * Get the app token. + * + * @return string + */ + public function getToken(): string + { + return $this->token; + } + + /** + * Encrypt the message and return XML. + * + * @param string $xml + * @param string $nonce + * @param int $timestamp + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function encrypt($xml, $nonce = null, $timestamp = null): string + { + try { + $xml = $this->pkcs7Pad(str_random(16).pack('N', strlen($xml)).$xml.$this->appId, $this->blockSize); + + $encrypted = base64_encode(AES::encrypt( + $xml, + $this->aesKey, + substr($this->aesKey, 0, 16), + OPENSSL_NO_PADDING + )); + // @codeCoverageIgnoreStart + } catch (Throwable $e) { + throw new RuntimeException($e->getMessage(), self::ERROR_ENCRYPT_AES); + } + // @codeCoverageIgnoreEnd + + !is_null($nonce) || $nonce = substr($this->appId, 0, 10); + !is_null($timestamp) || $timestamp = time(); + + $response = [ + 'Encrypt' => $encrypted, + 'MsgSignature' => $this->signature($this->token, $timestamp, $nonce, $encrypted), + 'TimeStamp' => $timestamp, + 'Nonce' => $nonce, + ]; + + //生成响应xml + return XML::build($response); + } + + /** + * Decrypt message. + * + * @param string $content + * @param string $msgSignature + * @param string $nonce + * @param string $timestamp + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function decrypt($content, $msgSignature, $nonce, $timestamp): string + { + $signature = $this->signature($this->token, $timestamp, $nonce, $content); + + if ($signature !== $msgSignature) { + throw new RuntimeException('Invalid Signature.', self::ERROR_INVALID_SIGNATURE); + } + + $decrypted = AES::decrypt( + base64_decode($content, true), + $this->aesKey, + substr($this->aesKey, 0, 16), + OPENSSL_NO_PADDING + ); + $result = $this->pkcs7Unpad($decrypted); + $content = substr($result, 16, strlen($result)); + $contentLen = unpack('N', substr($content, 0, 4))[1]; + + if (trim(substr($content, $contentLen + 4)) !== $this->appId) { + throw new RuntimeException('Invalid appId.', self::ERROR_INVALID_APP_ID); + } + + return substr($content, 4, $contentLen); + } + + /** + * Get SHA1. + * + * @return string + */ + public function signature(): string + { + $array = func_get_args(); + sort($array, SORT_STRING); + + return sha1(implode($array)); + } + + /** + * PKCS#7 pad. + * + * @param string $text + * @param int $blockSize + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function pkcs7Pad(string $text, int $blockSize): string + { + if ($blockSize > 256) { + throw new RuntimeException('$blockSize may not be more than 256'); + } + $padding = $blockSize - (strlen($text) % $blockSize); + $pattern = chr($padding); + + return $text.str_repeat($pattern, $padding); + } + + /** + * PKCS#7 unpad. + * + * @param string $text + * + * @return string + */ + public function pkcs7Unpad(string $text): string + { + $pad = ord(substr($text, -1)); + if ($pad < 1 || $pad > $this->blockSize) { + $pad = 0; + } + + return substr($text, 0, (strlen($text) - $pad)); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Events/AccessTokenRefreshed.php b/vendor/overtrue/wechat/src/Kernel/Events/AccessTokenRefreshed.php new file mode 100755 index 0000000..a829901 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Events/AccessTokenRefreshed.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Events; + +use EasyWeChat\Kernel\AccessToken; + +/** + * Class AccessTokenRefreshed. + * + * @author mingyoung + */ +class AccessTokenRefreshed +{ + /** + * @var \EasyWeChat\Kernel\AccessToken + */ + public $accessToken; + + /** + * @param \EasyWeChat\Kernel\AccessToken $accessToken + */ + public function __construct(AccessToken $accessToken) + { + $this->accessToken = $accessToken; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Events/ApplicationInitialized.php b/vendor/overtrue/wechat/src/Kernel/Events/ApplicationInitialized.php new file mode 100755 index 0000000..89d67fe --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Events/ApplicationInitialized.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Events; + +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Class ApplicationInitialized. + * + * @author mingyoung + */ +class ApplicationInitialized +{ + /** + * @var \EasyWeChat\Kernel\ServiceContainer + */ + public $app; + + /** + * @param \EasyWeChat\Kernel\ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + $this->app = $app; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Events/HttpResponseCreated.php b/vendor/overtrue/wechat/src/Kernel/Events/HttpResponseCreated.php new file mode 100755 index 0000000..2257260 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Events/HttpResponseCreated.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Events; + +use Psr\Http\Message\ResponseInterface; + +/** + * Class HttpResponseCreated. + * + * @author mingyoung + */ +class HttpResponseCreated +{ + /** + * @var \Psr\Http\Message\ResponseInterface + */ + public $response; + + /** + * @param \Psr\Http\Message\ResponseInterface $response + */ + public function __construct(ResponseInterface $response) + { + $this->response = $response; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Events/ServerGuardResponseCreated.php b/vendor/overtrue/wechat/src/Kernel/Events/ServerGuardResponseCreated.php new file mode 100755 index 0000000..3ab9925 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Events/ServerGuardResponseCreated.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Events; + +use Symfony\Component\HttpFoundation\Response; + +/** + * Class ServerGuardResponseCreated. + * + * @author mingyoung + */ +class ServerGuardResponseCreated +{ + /** + * @var \Symfony\Component\HttpFoundation\Response + */ + public $response; + + /** + * @param \Symfony\Component\HttpFoundation\Response $response + */ + public function __construct(Response $response) + { + $this->response = $response; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/BadRequestException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/BadRequestException.php new file mode 100755 index 0000000..a0b4f91 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Exceptions/BadRequestException.php @@ -0,0 +1,21 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Exceptions; + +/** + * Class BadRequestException. + * + * @author overtrue + */ +class BadRequestException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/DecryptException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/DecryptException.php new file mode 100755 index 0000000..f29acca --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Exceptions/DecryptException.php @@ -0,0 +1,16 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Exceptions; + +class DecryptException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/Exception.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/Exception.php new file mode 100755 index 0000000..9eba298 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Exceptions/Exception.php @@ -0,0 +1,23 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Exceptions; + +use Exception as BaseException; + +/** + * Class Exception. + * + * @author overtrue + */ +class Exception extends BaseException +{ +} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/HttpException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/HttpException.php new file mode 100755 index 0000000..8ab130d --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Exceptions/HttpException.php @@ -0,0 +1,52 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Exceptions; + +use Psr\Http\Message\ResponseInterface; + +/** + * Class HttpException. + * + * @author overtrue + */ +class HttpException extends Exception +{ + /** + * @var \Psr\Http\Message\ResponseInterface|null + */ + public $response; + + /** + * @var \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string|null + */ + public $formattedResponse; + + /** + * HttpException constructor. + * + * @param string $message + * @param \Psr\Http\Message\ResponseInterface|null $response + * @param null $formattedResponse + * @param int|null $code + */ + public function __construct($message, ResponseInterface $response = null, $formattedResponse = null, $code = null) + { + parent::__construct($message, $code); + + $this->response = $response; + $this->formattedResponse = $formattedResponse; + + if ($response) { + $response->getBody()->rewind(); + } + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidArgumentException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidArgumentException.php new file mode 100755 index 0000000..386a144 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidArgumentException.php @@ -0,0 +1,21 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Exceptions; + +/** + * Class InvalidArgumentException. + * + * @author overtrue + */ +class InvalidArgumentException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidConfigException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidConfigException.php new file mode 100755 index 0000000..1e4ae2a --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Exceptions/InvalidConfigException.php @@ -0,0 +1,21 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Exceptions; + +/** + * Class InvalidConfigException. + * + * @author overtrue + */ +class InvalidConfigException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/RuntimeException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/RuntimeException.php new file mode 100755 index 0000000..25f2f5b --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Exceptions/RuntimeException.php @@ -0,0 +1,21 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Exceptions; + +/** + * Class RuntimeException. + * + * @author overtrue + */ +class RuntimeException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/Kernel/Exceptions/UnboundServiceException.php b/vendor/overtrue/wechat/src/Kernel/Exceptions/UnboundServiceException.php new file mode 100755 index 0000000..78ea85c --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Exceptions/UnboundServiceException.php @@ -0,0 +1,21 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Exceptions; + +/** + * Class InvalidConfigException. + * + * @author overtrue + */ +class UnboundServiceException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/Kernel/Helpers.php b/vendor/overtrue/wechat/src/Kernel/Helpers.php new file mode 100755 index 0000000..ac9861c --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Helpers.php @@ -0,0 +1,55 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel; + +use EasyWeChat\Kernel\Contracts\Arrayable; +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Support\Arr; +use EasyWeChat\Kernel\Support\Collection; + +function data_get($data, $key, $default = null) +{ + switch (true) { + case is_array($data): + return Arr::get($data, $key, $default); + case $data instanceof Collection: + return $data->get($key, $default); + case $data instanceof Arrayable: + return Arr::get($data->toArray(), $key, $default); + case $data instanceof \ArrayIterator: + return $data->getArrayCopy()[$key] ?? $default; + case $data instanceof \ArrayAccess: + return $data[$key] ?? $default; + case $data instanceof \IteratorAggregate && $data->getIterator() instanceof \ArrayIterator: + return $data->getIterator()->getArrayCopy()[$key] ?? $default; + default: + throw new RuntimeException(sprintf('Can\'t access data with key "%s"', $key)); + } +} + +function data_to_array($data) +{ + switch (true) { + case is_array($data): + return $data; + case $data instanceof Collection: + return $data->all(); + case $data instanceof Arrayable: + return $data->toArray(); + case $data instanceof \IteratorAggregate && $data->getIterator() instanceof \ArrayIterator: + return $data->getIterator()->getArrayCopy(); + case $data instanceof \ArrayIterator: + return $data->getArrayCopy(); + default: + throw new RuntimeException(sprintf('Can\'t transform data to array')); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Http/Response.php b/vendor/overtrue/wechat/src/Kernel/Http/Response.php new file mode 100755 index 0000000..adcd416 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Http/Response.php @@ -0,0 +1,121 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Http; + +use EasyWeChat\Kernel\Support\Collection; +use EasyWeChat\Kernel\Support\XML; +use GuzzleHttp\Psr7\Response as GuzzleResponse; +use Psr\Http\Message\ResponseInterface; + +/** + * Class Response. + * + * @author overtrue + */ +class Response extends GuzzleResponse +{ + /** + * @return string + */ + public function getBodyContents() + { + $this->getBody()->rewind(); + $contents = $this->getBody()->getContents(); + $this->getBody()->rewind(); + + return $contents; + } + + /** + * @param \Psr\Http\Message\ResponseInterface $response + * + * @return \EasyWeChat\Kernel\Http\Response + */ + public static function buildFromPsrResponse(ResponseInterface $response) + { + return new static( + $response->getStatusCode(), + $response->getHeaders(), + $response->getBody(), + $response->getProtocolVersion(), + $response->getReasonPhrase() + ); + } + + /** + * Build to json. + * + * @return string + */ + public function toJson() + { + return json_encode($this->toArray()); + } + + /** + * Build to array. + * + * @return array + */ + public function toArray() + { + $content = $this->removeControlCharacters($this->getBodyContents()); + + if (false !== stripos($this->getHeaderLine('Content-Type'), 'xml') || 0 === stripos($content, 'toArray()); + } + + /** + * @return object + */ + public function toObject() + { + return json_decode($this->toJson()); + } + + /** + * @return bool|string + */ + public function __toString() + { + return $this->getBodyContents(); + } + + /** + * @param string $content + * + * @return string + */ + protected function removeControlCharacters(string $content) + { + return \preg_replace('/[\x00-\x1F\x80-\x9F]/u', '', $content); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Http/StreamResponse.php b/vendor/overtrue/wechat/src/Kernel/Http/StreamResponse.php new file mode 100755 index 0000000..104e8c3 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Http/StreamResponse.php @@ -0,0 +1,86 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Http; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Support\File; + +/** + * Class StreamResponse. + * + * @author overtrue + */ +class StreamResponse extends Response +{ + /** + * @param string $directory + * @param string $filename + * @param bool $appendSuffix + * + * @return bool|int + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function save(string $directory, string $filename = '', bool $appendSuffix = true) + { + $this->getBody()->rewind(); + + $directory = rtrim($directory, '/'); + + if (!is_dir($directory)) { + mkdir($directory, 0755, true); // @codeCoverageIgnore + } + + if (!is_writable($directory)) { + throw new InvalidArgumentException(sprintf("'%s' is not writable.", $directory)); + } + + $contents = $this->getBody()->getContents(); + + if (empty($contents) || '{' === $contents[0]) { + throw new RuntimeException('Invalid media response content.'); + } + + if (empty($filename)) { + if (preg_match('/filename="(?.*?)"/', $this->getHeaderLine('Content-Disposition'), $match)) { + $filename = $match['filename']; + } else { + $filename = md5($contents); + } + } + + if ($appendSuffix && empty(pathinfo($filename, PATHINFO_EXTENSION))) { + $filename .= File::getStreamExt($contents); + } + + file_put_contents($directory.'/'.$filename, $contents); + + return $filename; + } + + /** + * @param string $directory + * @param string $filename + * @param bool $appendSuffix + * + * @return bool|int + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function saveAs(string $directory, string $filename, bool $appendSuffix = true) + { + return $this->save($directory, $filename, $appendSuffix); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Log/LogManager.php b/vendor/overtrue/wechat/src/Kernel/Log/LogManager.php new file mode 100755 index 0000000..cf9f869 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Log/LogManager.php @@ -0,0 +1,544 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Log; + +use EasyWeChat\Kernel\ServiceContainer; +use Monolog\Formatter\LineFormatter; +use Monolog\Handler\ErrorLogHandler; +use Monolog\Handler\HandlerInterface; +use Monolog\Handler\RotatingFileHandler; +use Monolog\Handler\SlackWebhookHandler; +use Monolog\Handler\StreamHandler; +use Monolog\Handler\SyslogHandler; +use Monolog\Logger as Monolog; +use Psr\Log\LoggerInterface; + +/** + * Class LogManager. + * + * @author overtrue + */ +class LogManager implements LoggerInterface +{ + /** + * @var \EasyWeChat\Kernel\ServiceContainer + */ + protected $app; + + /** + * The array of resolved channels. + * + * @var array + */ + protected $channels = []; + + /** + * The registered custom driver creators. + * + * @var array + */ + protected $customCreators = []; + + /** + * The Log levels. + * + * @var array + */ + protected $levels = [ + 'debug' => Monolog::DEBUG, + 'info' => Monolog::INFO, + 'notice' => Monolog::NOTICE, + 'warning' => Monolog::WARNING, + 'error' => Monolog::ERROR, + 'critical' => Monolog::CRITICAL, + 'alert' => Monolog::ALERT, + 'emergency' => Monolog::EMERGENCY, + ]; + + /** + * LogManager constructor. + * + * @param \EasyWeChat\Kernel\ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + $this->app = $app; + } + + /** + * Create a new, on-demand aggregate logger instance. + * + * @param array $channels + * @param string|null $channel + * + * @return \Psr\Log\LoggerInterface + */ + public function stack(array $channels, $channel = null) + { + return $this->createStackDriver(compact('channels', 'channel')); + } + + /** + * Get a log channel instance. + * + * @param string|null $channel + * + * @return mixed + */ + public function channel($channel = null) + { + return $this->get($channel); + } + + /** + * Get a log driver instance. + * + * @param string|null $driver + * + * @return mixed + */ + public function driver($driver = null) + { + return $this->get($driver ?? $this->getDefaultDriver()); + } + + /** + * Attempt to get the log from the local cache. + * + * @param string $name + * + * @return \Psr\Log\LoggerInterface + */ + protected function get($name) + { + try { + return $this->channels[$name] ?? ($this->channels[$name] = $this->resolve($name)); + } catch (\Throwable $e) { + $logger = $this->createEmergencyLogger(); + + $logger->emergency('Unable to create configured logger. Using emergency logger.', [ + 'exception' => $e, + ]); + + return $logger; + } + } + + /** + * Resolve the given log instance by name. + * + * @param string $name + * + * @return \Psr\Log\LoggerInterface + * + * @throws \InvalidArgumentException + */ + protected function resolve($name) + { + $config = $this->app['config']->get(\sprintf('log.channels.%s', $name)); + + if (is_null($config)) { + throw new \InvalidArgumentException(\sprintf('Log [%s] is not defined.', $name)); + } + + if (isset($this->customCreators[$config['driver']])) { + return $this->callCustomCreator($config); + } + + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; + + if (method_exists($this, $driverMethod)) { + return $this->{$driverMethod}($config); + } + + throw new \InvalidArgumentException(\sprintf('Driver [%s] is not supported.', $config['driver'])); + } + + /** + * Create an emergency log handler to avoid white screens of death. + * + * @return \Monolog\Logger + */ + protected function createEmergencyLogger() + { + return new Monolog('EasyWeChat', $this->prepareHandlers([new StreamHandler( + \sys_get_temp_dir().'/easywechat/easywechat.log', $this->level(['level' => 'debug']) + )])); + } + + /** + * Call a custom driver creator. + * + * @param array $config + * + * @return mixed + */ + protected function callCustomCreator(array $config) + { + return $this->customCreators[$config['driver']]($this->app, $config); + } + + /** + * Create an aggregate log driver instance. + * + * @param array $config + * + * @return \Monolog\Logger + */ + protected function createStackDriver(array $config) + { + $handlers = []; + + foreach ($config['channels'] ?? [] as $channel) { + $handlers = \array_merge($handlers, $this->channel($channel)->getHandlers()); + } + + return new Monolog($this->parseChannel($config), $handlers); + } + + /** + * Create an instance of the single file log driver. + * + * @param array $config + * + * @return \Psr\Log\LoggerInterface + */ + protected function createSingleDriver(array $config) + { + return new Monolog($this->parseChannel($config), [ + $this->prepareHandler( + new StreamHandler($config['path'], $this->level($config)) + ), + ]); + } + + /** + * Create an instance of the daily file log driver. + * + * @param array $config + * + * @return \Psr\Log\LoggerInterface + */ + protected function createDailyDriver(array $config) + { + return new Monolog($this->parseChannel($config), [ + $this->prepareHandler(new RotatingFileHandler( + $config['path'], $config['days'] ?? 7, $this->level($config) + )), + ]); + } + + /** + * Create an instance of the Slack log driver. + * + * @param array $config + * + * @return \Psr\Log\LoggerInterface + */ + protected function createSlackDriver(array $config) + { + return new Monolog($this->parseChannel($config), [ + $this->prepareHandler(new SlackWebhookHandler( + $config['url'], + $config['channel'] ?? null, + $config['username'] ?? 'EasyWeChat', + $config['attachment'] ?? true, + $config['emoji'] ?? ':boom:', + $config['short'] ?? false, + $config['context'] ?? true, + $this->level($config) + )), + ]); + } + + /** + * Create an instance of the syslog log driver. + * + * @param array $config + * + * @return \Psr\Log\LoggerInterface + */ + protected function createSyslogDriver(array $config) + { + return new Monolog($this->parseChannel($config), [ + $this->prepareHandler(new SyslogHandler( + 'EasyWeChat', $config['facility'] ?? LOG_USER, $this->level($config)) + ), + ]); + } + + /** + * Create an instance of the "error log" log driver. + * + * @param array $config + * + * @return \Psr\Log\LoggerInterface + */ + protected function createErrorlogDriver(array $config) + { + return new Monolog($this->parseChannel($config), [ + $this->prepareHandler(new ErrorLogHandler( + $config['type'] ?? ErrorLogHandler::OPERATING_SYSTEM, $this->level($config)) + ), + ]); + } + + /** + * Prepare the handlers for usage by Monolog. + * + * @param array $handlers + * + * @return array + */ + protected function prepareHandlers(array $handlers) + { + foreach ($handlers as $key => $handler) { + $handlers[$key] = $this->prepareHandler($handler); + } + + return $handlers; + } + + /** + * Prepare the handler for usage by Monolog. + * + * @param \Monolog\Handler\HandlerInterface $handler + * + * @return \Monolog\Handler\HandlerInterface + */ + protected function prepareHandler(HandlerInterface $handler) + { + return $handler->setFormatter($this->formatter()); + } + + /** + * Get a Monolog formatter instance. + * + * @return \Monolog\Formatter\FormatterInterface + */ + protected function formatter() + { + $formatter = new LineFormatter(null, null, true, true); + $formatter->includeStacktraces(); + + return $formatter; + } + + /** + * Extract the log channel from the given configuration. + * + * @param array $config + * + * @return string + */ + protected function parseChannel(array $config) + { + return $config['name'] ?? null; + } + + /** + * Parse the string level into a Monolog constant. + * + * @param array $config + * + * @return int + * + * @throws \InvalidArgumentException + */ + protected function level(array $config) + { + $level = $config['level'] ?? 'debug'; + + if (isset($this->levels[$level])) { + return $this->levels[$level]; + } + + throw new \InvalidArgumentException('Invalid log level.'); + } + + /** + * Get the default log driver name. + * + * @return string + */ + public function getDefaultDriver() + { + return $this->app['config']['log.default']; + } + + /** + * Set the default log driver name. + * + * @param string $name + */ + public function setDefaultDriver($name) + { + $this->app['config']['log.default'] = $name; + } + + /** + * Register a custom driver creator Closure. + * + * @param string $driver + * @param \Closure $callback + * + * @return $this + */ + public function extend($driver, \Closure $callback) + { + $this->customCreators[$driver] = $callback->bindTo($this, $this); + + return $this; + } + + /** + * System is unusable. + * + * @param string $message + * @param array $context + * + * @return mixed + */ + public function emergency($message, array $context = []) + { + return $this->driver()->emergency($message, $context); + } + + /** + * Action must be taken immediately. + * + * Example: Entire website down, database unavailable, etc. This should + * trigger the SMS alerts and wake you up. + * + * @param string $message + * @param array $context + * + * @return mixed + */ + public function alert($message, array $context = []) + { + return $this->driver()->alert($message, $context); + } + + /** + * Critical conditions. + * + * Example: Application component unavailable, unexpected exception. + * + * @param string $message + * @param array $context + * + * @return mixed + */ + public function critical($message, array $context = []) + { + return $this->driver()->critical($message, $context); + } + + /** + * Runtime errors that do not require immediate action but should typically + * be logged and monitored. + * + * @param string $message + * @param array $context + * + * @return mixed + */ + public function error($message, array $context = []) + { + return $this->driver()->error($message, $context); + } + + /** + * Exceptional occurrences that are not errors. + * + * Example: Use of deprecated APIs, poor use of an API, undesirable things + * that are not necessarily wrong. + * + * @param string $message + * @param array $context + * + * @return mixed + */ + public function warning($message, array $context = []) + { + return $this->driver()->warning($message, $context); + } + + /** + * Normal but significant events. + * + * @param string $message + * @param array $context + * + * @return mixed + */ + public function notice($message, array $context = []) + { + return $this->driver()->notice($message, $context); + } + + /** + * Interesting events. + * + * Example: User logs in, SQL logs. + * + * @param string $message + * @param array $context + * + * @return mixed + */ + public function info($message, array $context = []) + { + return $this->driver()->info($message, $context); + } + + /** + * Detailed debug information. + * + * @param string $message + * @param array $context + * + * @return mixed + */ + public function debug($message, array $context = []) + { + return $this->driver()->debug($message, $context); + } + + /** + * Logs with an arbitrary level. + * + * @param mixed $level + * @param string $message + * @param array $context + * + * @return mixed + */ + public function log($level, $message, array $context = []) + { + return $this->driver()->log($level, $message, $context); + } + + /** + * Dynamically call the default driver instance. + * + * @param string $method + * @param array $parameters + * + * @return mixed + */ + public function __call($method, $parameters) + { + return $this->driver()->$method(...$parameters); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Article.php b/vendor/overtrue/wechat/src/Kernel/Messages/Article.php new file mode 100755 index 0000000..4792a1f --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Article.php @@ -0,0 +1,58 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Article. + */ +class Article extends Message +{ + /** + * @var string + */ + protected $type = 'mpnews'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'thumb_media_id', + 'author', + 'title', + 'content', + 'digest', + 'source_url', + 'show_cover', + ]; + + /** + * Aliases of attribute. + * + * @var array + */ + protected $jsonAliases = [ + 'content_source_url' => 'source_url', + 'show_cover_pic' => 'show_cover', + ]; + + /** + * @var array + */ + protected $required = [ + 'thumb_media_id', + 'title', + 'content', + 'show_cover', + ]; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Card.php b/vendor/overtrue/wechat/src/Kernel/Messages/Card.php new file mode 100755 index 0000000..0e21231 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Card.php @@ -0,0 +1,52 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * Card.php. + * + * @author overtrue + * @copyright 2015 overtrue + * + * @see https://github.com/overtrue + * @see http://overtrue.me + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Card. + */ +class Card extends Message +{ + /** + * Message type. + * + * @var string + */ + protected $type = 'wxcard'; + + /** + * Properties. + * + * @var array + */ + protected $properties = ['card_id']; + + /** + * Media constructor. + * + * @param string $cardId + */ + public function __construct(string $cardId) + { + parent::__construct(['card_id' => $cardId]); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/DeviceEvent.php b/vendor/overtrue/wechat/src/Kernel/Messages/DeviceEvent.php new file mode 100755 index 0000000..ae57910 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/DeviceEvent.php @@ -0,0 +1,40 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class DeviceEvent. + * + * @property string $media_id + */ +class DeviceEvent extends Message +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'device_event'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'device_type', + 'device_id', + 'content', + 'session_id', + 'open_id', + ]; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/DeviceText.php b/vendor/overtrue/wechat/src/Kernel/Messages/DeviceText.php new file mode 100755 index 0000000..87e627a --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/DeviceText.php @@ -0,0 +1,50 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class DeviceText. + * + * @property string $content + */ +class DeviceText extends Message +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'device_text'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'device_type', + 'device_id', + 'content', + 'session_id', + 'open_id', + ]; + + public function toXmlArray() + { + return [ + 'DeviceType' => $this->get('device_type'), + 'DeviceID' => $this->get('device_id'), + 'SessionID' => $this->get('session_id'), + 'Content' => base64_encode($this->get('content')), + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/File.php b/vendor/overtrue/wechat/src/Kernel/Messages/File.php new file mode 100755 index 0000000..a14c42f --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/File.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Image. + * + * @property string $media_id + */ +class File extends Media +{ + /** + * @var string + */ + protected $type = 'file'; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Image.php b/vendor/overtrue/wechat/src/Kernel/Messages/Image.php new file mode 100755 index 0000000..982033b --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Image.php @@ -0,0 +1,27 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Image. + * + * @property string $media_id + */ +class Image extends Media +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'image'; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Link.php b/vendor/overtrue/wechat/src/Kernel/Messages/Link.php new file mode 100755 index 0000000..9c126b5 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Link.php @@ -0,0 +1,36 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Link. + */ +class Link extends Message +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'link'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'title', + 'description', + 'url', + ]; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Location.php b/vendor/overtrue/wechat/src/Kernel/Messages/Location.php new file mode 100755 index 0000000..f10351b --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Location.php @@ -0,0 +1,38 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Location. + */ +class Location extends Message +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'location'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'latitude', + 'longitude', + 'scale', + 'label', + 'precision', + ]; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Media.php b/vendor/overtrue/wechat/src/Kernel/Messages/Media.php new file mode 100755 index 0000000..ccf1d57 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Media.php @@ -0,0 +1,68 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +use EasyWeChat\Kernel\Contracts\MediaInterface; +use EasyWeChat\Kernel\Support\Str; + +/** + * Class Media. + */ +class Media extends Message implements MediaInterface +{ + /** + * Properties. + * + * @var array + */ + protected $properties = ['media_id']; + + /** + * @var array + */ + protected $required = [ + 'media_id', + ]; + + /** + * MaterialClient constructor. + * + * @param string $mediaId + * @param string $type + * @param array $attributes + */ + public function __construct(string $mediaId, $type = null, array $attributes = []) + { + parent::__construct(array_merge(['media_id' => $mediaId], $attributes)); + + !empty($type) && $this->setType($type); + } + + /** + * @return string + */ + public function getMediaId(): string + { + $this->checkRequiredAttributes(); + + return $this->get('media_id'); + } + + public function toXmlArray() + { + return [ + Str::studly($this->getType()) => [ + 'MediaId' => $this->get('media_id'), + ], + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Message.php b/vendor/overtrue/wechat/src/Kernel/Messages/Message.php new file mode 100755 index 0000000..d0bb067 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Message.php @@ -0,0 +1,206 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +use EasyWeChat\Kernel\Contracts\MessageInterface; +use EasyWeChat\Kernel\Support\XML; +use EasyWeChat\Kernel\Traits\HasAttributes; +use Mockery\Exception\BadMethodCallException; + +/** + * Class Messages. + */ +abstract class Message implements MessageInterface +{ + use HasAttributes; + + const TEXT = 2; + const IMAGE = 4; + const VOICE = 8; + const VIDEO = 16; + const SHORT_VIDEO = 32; + const LOCATION = 64; + const LINK = 128; + const DEVICE_EVENT = 256; + const DEVICE_TEXT = 512; + const FILE = 1024; + const TEXT_CARD = 2048; + const TRANSFER = 4096; + const EVENT = 1048576; + const MINIPROGRAM_PAGE = 2097152; + const ALL = self::TEXT | self::IMAGE | self::VOICE | self::VIDEO | self::SHORT_VIDEO | self::LOCATION | self::LINK + | self::DEVICE_EVENT | self::DEVICE_TEXT | self::FILE | self::TEXT_CARD | self::TRANSFER | self::EVENT | self::MINIPROGRAM_PAGE; + + /** + * @var string + */ + protected $type; + + /** + * @var int + */ + protected $id; + + /** + * @var string + */ + protected $to; + + /** + * @var string + */ + protected $from; + + /** + * @var array + */ + protected $properties = []; + + /** + * @var array + */ + protected $jsonAliases = []; + + /** + * Message constructor. + * + * @param array $attributes + */ + public function __construct(array $attributes = []) + { + $this->setAttributes($attributes); + } + + /** + * Return type name message. + * + * @return string + */ + public function getType(): string + { + return $this->type; + } + + /** + * @param string $type + */ + public function setType(string $type) + { + $this->type = $type; + } + + /** + * Magic getter. + * + * @param string $property + * + * @return mixed + */ + public function __get($property) + { + if (property_exists($this, $property)) { + return $this->$property; + } + + return $this->getAttribute($property); + } + + /** + * Magic setter. + * + * @param string $property + * @param mixed $value + * + * @return Message + */ + public function __set($property, $value) + { + if (property_exists($this, $property)) { + $this->$property = $value; + } else { + $this->setAttribute($property, $value); + } + + return $this; + } + + /** + * @param array $appends + * + * @return array + */ + public function transformForJsonRequestWithoutType(array $appends = []) + { + return $this->transformForJsonRequest($appends, false); + } + + /** + * @param array $appends + * @param bool $withType + * + * @return array + */ + public function transformForJsonRequest(array $appends = [], $withType = true): array + { + if (!$withType) { + return $this->propertiesToArray([], $this->jsonAliases); + } + $messageType = $this->getType(); + $data = array_merge(['msgtype' => $messageType], $appends); + + $data[$messageType] = array_merge($data[$messageType] ?? [], $this->propertiesToArray([], $this->jsonAliases)); + + return $data; + } + + /** + * @param array $appends + * @param bool $returnAsArray + * + * @return string + */ + public function transformToXml(array $appends = [], bool $returnAsArray = false): string + { + $data = array_merge(['MsgType' => $this->getType()], $this->toXmlArray(), $appends); + + return $returnAsArray ? $data : XML::build($data); + } + + /** + * @param array $data + * @param array $aliases + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + protected function propertiesToArray(array $data, array $aliases = []): array + { + $this->checkRequiredAttributes(); + + foreach ($this->attributes as $property => $value) { + if (is_null($value) && !$this->isRequired($property)) { + continue; + } + $alias = array_search($property, $aliases, true); + + $data[$alias ?: $property] = $this->get($property); + } + + return $data; + } + + public function toXmlArray() + { + throw new BadMethodCallException(sprintf('Class "%s" cannot support transform to XML message.', __CLASS__)); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/MiniProgramPage.php b/vendor/overtrue/wechat/src/Kernel/Messages/MiniProgramPage.php new file mode 100755 index 0000000..e4973b1 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/MiniProgramPage.php @@ -0,0 +1,31 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class MiniProgramPage. + */ +class MiniProgramPage extends Message +{ + protected $type = 'miniprogrampage'; + + protected $properties = [ + 'title', + 'appid', + 'pagepath', + 'thumb_media_id', + ]; + + protected $required = [ + 'thumb_media_id', 'appid', 'pagepath', + ]; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Music.php b/vendor/overtrue/wechat/src/Kernel/Messages/Music.php new file mode 100755 index 0000000..85feb76 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Music.php @@ -0,0 +1,73 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Music. + * + * @property string $url + * @property string $hq_url + * @property string $title + * @property string $description + * @property string $thumb_media_id + * @property string $format + */ +class Music extends Message +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'music'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'title', + 'description', + 'url', + 'hq_url', + 'thumb_media_id', + 'format', + ]; + + /** + * Aliases of attribute. + * + * @var array + */ + protected $jsonAliases = [ + 'musicurl' => 'url', + 'hqmusicurl' => 'hq_url', + ]; + + public function toXmlArray() + { + $music = [ + 'Music' => [ + 'Title' => $this->get('title'), + 'Description' => $this->get('description'), + 'MusicUrl' => $this->get('url'), + 'HQMusicUrl' => $this->get('hq_url'), + ], + ]; + if ($thumbMediaId = $this->get('thumb_media_id')) { + $music['Music']['ThumbMediaId'] = $thumbMediaId; + } + + return $music; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/News.php b/vendor/overtrue/wechat/src/Kernel/Messages/News.php new file mode 100755 index 0000000..2ad46e8 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/News.php @@ -0,0 +1,73 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class News. + * + * @author overtrue + */ +class News extends Message +{ + /** + * @var string + */ + protected $type = 'news'; + + /** + * @var array + */ + protected $properties = [ + 'items', + ]; + + /** + * News constructor. + * + * @param array $items + */ + public function __construct(array $items = []) + { + parent::__construct(compact('items')); + } + + /** + * @param array $data + * @param array $aliases + * + * @return array + */ + public function propertiesToArray(array $data, array $aliases = []): array + { + return ['articles' => array_map(function ($item) { + if ($item instanceof NewsItem) { + return $item->toJsonArray(); + } + }, $this->get('items'))]; + } + + public function toXmlArray() + { + $items = []; + + foreach ($this->get('items') as $item) { + if ($item instanceof NewsItem) { + $items[] = $item->toXmlArray(); + } + } + + return [ + 'ArticleCount' => count($items), + 'Articles' => $items, + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/NewsItem.php b/vendor/overtrue/wechat/src/Kernel/Messages/NewsItem.php new file mode 100755 index 0000000..50bf336 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/NewsItem.php @@ -0,0 +1,57 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class NewsItem. + */ +class NewsItem extends Message +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'news'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'title', + 'description', + 'url', + 'image', + ]; + + public function toJsonArray() + { + return [ + 'title' => $this->get('title'), + 'description' => $this->get('description'), + 'url' => $this->get('url'), + 'picurl' => $this->get('image'), + ]; + } + + public function toXmlArray() + { + return [ + 'Title' => $this->get('title'), + 'Description' => $this->get('description'), + 'Url' => $this->get('url'), + 'PicUrl' => $this->get('image'), + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Raw.php b/vendor/overtrue/wechat/src/Kernel/Messages/Raw.php new file mode 100755 index 0000000..53f2a78 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Raw.php @@ -0,0 +1,56 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Raw. + */ +class Raw extends Message +{ + /** + * @var string + */ + protected $type = 'raw'; + + /** + * Properties. + * + * @var array + */ + protected $properties = ['content']; + + /** + * Constructor. + * + * @param string $content + */ + public function __construct(string $content) + { + parent::__construct(['content' => strval($content)]); + } + + /** + * @param array $appends + * @param bool $withType + * + * @return array + */ + public function transformForJsonRequest(array $appends = [], $withType = true): array + { + return json_decode($this->content, true) ?? []; + } + + public function __toString() + { + return $this->get('content') ?? ''; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/ShortVideo.php b/vendor/overtrue/wechat/src/Kernel/Messages/ShortVideo.php new file mode 100755 index 0000000..1dc1db9 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/ShortVideo.php @@ -0,0 +1,30 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class ShortVideo. + * + * @property string $title + * @property string $media_id + * @property string $description + * @property string $thumb_media_id + */ +class ShortVideo extends Video +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'shortvideo'; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/TaskCard.php b/vendor/overtrue/wechat/src/Kernel/Messages/TaskCard.php new file mode 100755 index 0000000..d02c411 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/TaskCard.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class TaskCard. + * + * @property string $title + * @property string $description + * @property string $url + * @property string $task_id + * @property array $btn + */ +class TaskCard extends Message +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'taskcard'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'title', + 'description', + 'url', + 'task_id', + 'btn', + ]; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Text.php b/vendor/overtrue/wechat/src/Kernel/Messages/Text.php new file mode 100755 index 0000000..e355743 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Text.php @@ -0,0 +1,54 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Text. + * + * @property string $content + */ +class Text extends Message +{ + /** + * Message type. + * + * @var string + */ + protected $type = 'text'; + + /** + * Properties. + * + * @var array + */ + protected $properties = ['content']; + + /** + * Text constructor. + * + * @param string $content + */ + public function __construct(string $content) + { + parent::__construct(compact('content')); + } + + /** + * @return array + */ + public function toXmlArray() + { + return [ + 'Content' => $this->get('content'), + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/TextCard.php b/vendor/overtrue/wechat/src/Kernel/Messages/TextCard.php new file mode 100755 index 0000000..edfb7c5 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/TextCard.php @@ -0,0 +1,40 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Text. + * + * @property string $title + * @property string $description + * @property string $url + */ +class TextCard extends Message +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'textcard'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'title', + 'description', + 'url', + ]; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Transfer.php b/vendor/overtrue/wechat/src/Kernel/Messages/Transfer.php new file mode 100755 index 0000000..ff27d1a --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Transfer.php @@ -0,0 +1,56 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Transfer. + * + * @property string $to + * @property string $account + */ +class Transfer extends Message +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'transfer_customer_service'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'account', + ]; + + /** + * Transfer constructor. + * + * @param string|null $account + */ + public function __construct(string $account = null) + { + parent::__construct(compact('account')); + } + + public function toXmlArray() + { + return empty($this->get('account')) ? [] : [ + 'TransInfo' => [ + 'KfAccount' => $this->get('account'), + ], + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Video.php b/vendor/overtrue/wechat/src/Kernel/Messages/Video.php new file mode 100755 index 0000000..90f72a0 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Video.php @@ -0,0 +1,65 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Video. + * + * @property string $video + * @property string $title + * @property string $media_id + * @property string $description + * @property string $thumb_media_id + */ +class Video extends Media +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'video'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'title', + 'description', + 'media_id', + 'thumb_media_id', + ]; + + /** + * Video constructor. + * + * @param string $mediaId + * @param array $attributes + */ + public function __construct(string $mediaId, array $attributes = []) + { + parent::__construct($mediaId, 'video', $attributes); + } + + public function toXmlArray() + { + return [ + 'Video' => [ + 'MediaId' => $this->get('media_id'), + 'Title' => $this->get('title'), + 'Description' => $this->get('description'), + ], + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Messages/Voice.php b/vendor/overtrue/wechat/src/Kernel/Messages/Voice.php new file mode 100755 index 0000000..ff723ea --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Messages/Voice.php @@ -0,0 +1,37 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Messages; + +/** + * Class Voice. + * + * @property string $media_id + */ +class Voice extends Media +{ + /** + * Messages type. + * + * @var string + */ + protected $type = 'voice'; + + /** + * Properties. + * + * @var array + */ + protected $properties = [ + 'media_id', + 'recognition', + ]; +} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/ConfigServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/ConfigServiceProvider.php new file mode 100755 index 0000000..b33f4a1 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Providers/ConfigServiceProvider.php @@ -0,0 +1,39 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Providers; + +use EasyWeChat\Kernel\Config; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ConfigServiceProvider. + * + * @author overtrue + */ +class ConfigServiceProvider implements ServiceProviderInterface +{ + /** + * Registers services on the given container. + * + * This method should only be used to configure services and parameters. + * It should not get services. + * + * @param Container $pimple A container instance + */ + public function register(Container $pimple) + { + $pimple['config'] = function ($app) { + return new Config($app->getConfig()); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/EventDispatcherServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/EventDispatcherServiceProvider.php new file mode 100755 index 0000000..9095cef --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Providers/EventDispatcherServiceProvider.php @@ -0,0 +1,47 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Providers; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; +use Symfony\Component\EventDispatcher\EventDispatcher; + +/** + * Class EventDispatcherServiceProvider. + * + * @author mingyoung + */ +class EventDispatcherServiceProvider implements ServiceProviderInterface +{ + /** + * Registers services on the given container. + * + * This method should only be used to configure services and parameters. + * It should not get services. + * + * @param Container $pimple A container instance + */ + public function register(Container $pimple) + { + $pimple['events'] = function ($app) { + $dispatcher = new EventDispatcher(); + + foreach ($app->config->get('events.listen', []) as $event => $listeners) { + foreach ($listeners as $listener) { + $dispatcher->addListener($event, $listener); + } + } + + return $dispatcher; + }; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/ExtensionServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/ExtensionServiceProvider.php new file mode 100755 index 0000000..23af832 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Providers/ExtensionServiceProvider.php @@ -0,0 +1,39 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Providers; + +use EasyWeChatComposer\Extension; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ExtensionServiceProvider. + * + * @author overtrue + */ +class ExtensionServiceProvider implements ServiceProviderInterface +{ + /** + * Registers services on the given container. + * + * This method should only be used to configure services and parameters. + * It should not get services. + * + * @param Container $pimple A container instance + */ + public function register(Container $pimple) + { + $pimple['extension'] = function ($app) { + return new Extension($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/HttpClientServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/HttpClientServiceProvider.php new file mode 100755 index 0000000..aca7fa9 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Providers/HttpClientServiceProvider.php @@ -0,0 +1,39 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Providers; + +use GuzzleHttp\Client; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class HttpClientServiceProvider. + * + * @author overtrue + */ +class HttpClientServiceProvider implements ServiceProviderInterface +{ + /** + * Registers services on the given container. + * + * This method should only be used to configure services and parameters. + * It should not get services. + * + * @param Container $pimple A container instance + */ + public function register(Container $pimple) + { + $pimple['http_client'] = function ($app) { + return new Client($app['config']->get('http', [])); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/LogServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/LogServiceProvider.php new file mode 100755 index 0000000..83498ac --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Providers/LogServiceProvider.php @@ -0,0 +1,79 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Providers; + +use EasyWeChat\Kernel\Log\LogManager; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class LoggingServiceProvider. + * + * @author overtrue + */ +class LogServiceProvider implements ServiceProviderInterface +{ + /** + * Registers services on the given container. + * + * This method should only be used to configure services and parameters. + * It should not get services. + * + * @param Container $pimple A container instance + */ + public function register(Container $pimple) + { + $pimple['logger'] = $pimple['log'] = function ($app) { + $config = $this->formatLogConfig($app); + + if (!empty($config)) { + $app->rebind('config', $app['config']->merge($config)); + } + + return new LogManager($app); + }; + } + + public function formatLogConfig($app) + { + if (!empty($app['config']->get('log.channels'))) { + return $app['config']->get('log'); + } + + if (empty($app['config']->get('log'))) { + return [ + 'log' => [ + 'default' => 'errorlog', + 'channels' => [ + 'errorlog' => [ + 'driver' => 'errorlog', + 'level' => 'debug', + ], + ], + ], + ]; + } + + return [ + 'log' => [ + 'default' => 'single', + 'channels' => [ + 'single' => [ + 'driver' => 'single', + 'path' => $app['config']->get('log.file') ?: \sys_get_temp_dir().'/logs/easywechat.log', + 'level' => $app['config']->get('log.level', 'debug'), + ], + ], + ], + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Providers/RequestServiceProvider.php b/vendor/overtrue/wechat/src/Kernel/Providers/RequestServiceProvider.php new file mode 100755 index 0000000..a0b111d --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Providers/RequestServiceProvider.php @@ -0,0 +1,39 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Providers; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; +use Symfony\Component\HttpFoundation\Request; + +/** + * Class RequestServiceProvider. + * + * @author overtrue + */ +class RequestServiceProvider implements ServiceProviderInterface +{ + /** + * Registers services on the given container. + * + * This method should only be used to configure services and parameters. + * It should not get services. + * + * @param Container $pimple A container instance + */ + public function register(Container $pimple) + { + $pimple['request'] = function () { + return Request::createFromGlobals(); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/ServerGuard.php b/vendor/overtrue/wechat/src/Kernel/ServerGuard.php new file mode 100755 index 0000000..c135e12 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/ServerGuard.php @@ -0,0 +1,375 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel; + +use EasyWeChat\Kernel\Contracts\MessageInterface; +use EasyWeChat\Kernel\Exceptions\BadRequestException; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Messages\Message; +use EasyWeChat\Kernel\Messages\News; +use EasyWeChat\Kernel\Messages\NewsItem; +use EasyWeChat\Kernel\Messages\Raw as RawMessage; +use EasyWeChat\Kernel\Messages\Text; +use EasyWeChat\Kernel\Support\XML; +use EasyWeChat\Kernel\Traits\Observable; +use EasyWeChat\Kernel\Traits\ResponseCastable; +use Symfony\Component\HttpFoundation\Response; + +/** + * Class ServerGuard. + * + * 1. url 里的 signature 只是将 token+nonce+timestamp 得到的签名,只是用于验证当前请求的,在公众号环境下一直有 + * 2. 企业号消息发送时是没有的,因为固定为完全模式,所以 url 里不会存在 signature, 只有 msg_signature 用于解密消息的 + * + * @author overtrue + */ +class ServerGuard +{ + use Observable; + use ResponseCastable; + + /** + * @var bool + */ + protected $alwaysValidate = false; + + /** + * Empty string. + */ + const SUCCESS_EMPTY_RESPONSE = 'success'; + + /** + * @var array + */ + const MESSAGE_TYPE_MAPPING = [ + 'text' => Message::TEXT, + 'image' => Message::IMAGE, + 'voice' => Message::VOICE, + 'video' => Message::VIDEO, + 'shortvideo' => Message::SHORT_VIDEO, + 'location' => Message::LOCATION, + 'link' => Message::LINK, + 'device_event' => Message::DEVICE_EVENT, + 'device_text' => Message::DEVICE_TEXT, + 'event' => Message::EVENT, + 'file' => Message::FILE, + 'miniprogrampage' => Message::MINIPROGRAM_PAGE, + ]; + + /** + * @var \EasyWeChat\Kernel\ServiceContainer + */ + protected $app; + + /** + * Constructor. + * + * @codeCoverageIgnore + * + * @param \EasyWeChat\Kernel\ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + $this->app = $app; + + foreach ($this->app->extension->observers() as $observer) { + call_user_func_array([$this, 'push'], $observer); + } + } + + /** + * Handle and return response. + * + * @return Response + * + * @throws BadRequestException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function serve(): Response + { + $this->app['logger']->debug('Request received:', [ + 'method' => $this->app['request']->getMethod(), + 'uri' => $this->app['request']->getUri(), + 'content-type' => $this->app['request']->getContentType(), + 'content' => $this->app['request']->getContent(), + ]); + + $response = $this->validate()->resolve(); + + $this->app['logger']->debug('Server response created:', ['content' => $response->getContent()]); + + return $response; + } + + /** + * @return $this + * + * @throws \EasyWeChat\Kernel\Exceptions\BadRequestException + */ + public function validate() + { + if (!$this->alwaysValidate && !$this->isSafeMode()) { + return $this; + } + + if ($this->app['request']->get('signature') !== $this->signature([ + $this->getToken(), + $this->app['request']->get('timestamp'), + $this->app['request']->get('nonce'), + ])) { + throw new BadRequestException('Invalid request signature.', 400); + } + + return $this; + } + + /** + * Force validate request. + * + * @return $this + */ + public function forceValidate() + { + $this->alwaysValidate = true; + + return $this; + } + + /** + * Get request message. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|string + * + * @throws BadRequestException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getMessage() + { + $message = $this->parseMessage($this->app['request']->getContent(false)); + + if (!is_array($message) || empty($message)) { + throw new BadRequestException('No message received.'); + } + + if ($this->isSafeMode() && !empty($message['Encrypt'])) { + $message = $this->decryptMessage($message); + + // Handle JSON format. + $dataSet = json_decode($message, true); + + if ($dataSet && (JSON_ERROR_NONE === json_last_error())) { + return $dataSet; + } + + $message = XML::parse($message); + } + + return $this->detectAndCastResponseToType($message, $this->app->config->get('response_type')); + } + + /** + * Resolve server request and return the response. + * + * @return \Symfony\Component\HttpFoundation\Response + * + * @throws \EasyWeChat\Kernel\Exceptions\BadRequestException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + protected function resolve(): Response + { + $result = $this->handleRequest(); + + if ($this->shouldReturnRawResponse()) { + $response = new Response($result['response']); + } else { + $response = new Response( + $this->buildResponse($result['to'], $result['from'], $result['response']), + 200, + ['Content-Type' => 'application/xml'] + ); + } + + $this->app->events->dispatch(new Events\ServerGuardResponseCreated($response)); + + return $response; + } + + /** + * @return string|null + */ + protected function getToken() + { + return $this->app['config']['token']; + } + + /** + * @param string $to + * @param string $from + * @param \EasyWeChat\Kernel\Contracts\MessageInterface|string|int $message + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function buildResponse(string $to, string $from, $message) + { + if (empty($message) || self::SUCCESS_EMPTY_RESPONSE === $message) { + return self::SUCCESS_EMPTY_RESPONSE; + } + + if ($message instanceof RawMessage) { + return $message->get('content', self::SUCCESS_EMPTY_RESPONSE); + } + + if (is_string($message) || is_numeric($message)) { + $message = new Text((string) $message); + } + + if (is_array($message) && reset($message) instanceof NewsItem) { + $message = new News($message); + } + + if (!($message instanceof Message)) { + throw new InvalidArgumentException(sprintf('Invalid Messages type "%s".', gettype($message))); + } + + return $this->buildReply($to, $from, $message); + } + + /** + * Handle request. + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\BadRequestException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + protected function handleRequest(): array + { + $castedMessage = $this->getMessage(); + + $messageArray = $this->detectAndCastResponseToType($castedMessage, 'array'); + + $response = $this->dispatch(self::MESSAGE_TYPE_MAPPING[$messageArray['MsgType'] ?? $messageArray['msg_type'] ?? 'text'], $castedMessage); + + return [ + 'to' => $messageArray['FromUserName'] ?? '', + 'from' => $messageArray['ToUserName'] ?? '', + 'response' => $response, + ]; + } + + /** + * Build reply XML. + * + * @param string $to + * @param string $from + * @param \EasyWeChat\Kernel\Contracts\MessageInterface $message + * + * @return string + */ + protected function buildReply(string $to, string $from, MessageInterface $message): string + { + $prepends = [ + 'ToUserName' => $to, + 'FromUserName' => $from, + 'CreateTime' => time(), + 'MsgType' => $message->getType(), + ]; + + $response = $message->transformToXml($prepends); + + if ($this->isSafeMode()) { + $this->app['logger']->debug('Messages safe mode is enabled.'); + $response = $this->app['encryptor']->encrypt($response); + } + + return $response; + } + + /** + * @param array $params + * + * @return string + */ + protected function signature(array $params) + { + sort($params, SORT_STRING); + + return sha1(implode($params)); + } + + /** + * Parse message array from raw php input. + * + * @param string $content + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\BadRequestException + */ + protected function parseMessage($content) + { + try { + if (0 === stripos($content, '<')) { + $content = XML::parse($content); + } else { + // Handle JSON format. + $dataSet = json_decode($content, true); + if ($dataSet && (JSON_ERROR_NONE === json_last_error())) { + $content = $dataSet; + } + } + + return (array) $content; + } catch (\Exception $e) { + throw new BadRequestException(sprintf('Invalid message content:(%s) %s', $e->getCode(), $e->getMessage()), $e->getCode()); + } + } + + /** + * Check the request message safe mode. + * + * @return bool + */ + protected function isSafeMode(): bool + { + return $this->app['request']->get('signature') && 'aes' === $this->app['request']->get('encrypt_type'); + } + + /** + * @return bool + */ + protected function shouldReturnRawResponse(): bool + { + return false; + } + + /** + * @param array $message + * + * @return mixed + */ + protected function decryptMessage(array $message) + { + return $message = $this->app['encryptor']->decrypt( + $message['Encrypt'], + $this->app['request']->get('msg_signature'), + $this->app['request']->get('nonce'), + $this->app['request']->get('timestamp') + ); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/ServiceContainer.php b/vendor/overtrue/wechat/src/Kernel/ServiceContainer.php new file mode 100755 index 0000000..af1f35b --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/ServiceContainer.php @@ -0,0 +1,167 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel; + +use EasyWeChat\Kernel\Providers\ConfigServiceProvider; +use EasyWeChat\Kernel\Providers\EventDispatcherServiceProvider; +use EasyWeChat\Kernel\Providers\ExtensionServiceProvider; +use EasyWeChat\Kernel\Providers\HttpClientServiceProvider; +use EasyWeChat\Kernel\Providers\LogServiceProvider; +use EasyWeChat\Kernel\Providers\RequestServiceProvider; +use EasyWeChatComposer\Traits\WithAggregator; +use Pimple\Container; + +/** + * Class ServiceContainer. + * + * @author overtrue + * + * @property \EasyWeChat\Kernel\Config $config + * @property \Symfony\Component\HttpFoundation\Request $request + * @property \GuzzleHttp\Client $http_client + * @property \Monolog\Logger $logger + * @property \Symfony\Component\EventDispatcher\EventDispatcher $events + */ +class ServiceContainer extends Container +{ + use WithAggregator; + + /** + * @var string + */ + protected $id; + + /** + * @var array + */ + protected $providers = []; + + /** + * @var array + */ + protected $defaultConfig = []; + + /** + * @var array + */ + protected $userConfig = []; + + /** + * Constructor. + * + * @param array $config + * @param array $prepends + * @param string|null $id + */ + public function __construct(array $config = [], array $prepends = [], string $id = null) + { + $this->registerProviders($this->getProviders()); + + parent::__construct($prepends); + + $this->userConfig = $config; + + $this->id = $id; + + $this->aggregate(); + + $this->events->dispatch(new Events\ApplicationInitialized($this)); + } + + /** + * @return string + */ + public function getId() + { + return $this->id ?? $this->id = md5(json_encode($this->userConfig)); + } + + /** + * @return array + */ + public function getConfig() + { + $base = [ + // http://docs.guzzlephp.org/en/stable/request-options.html + 'http' => [ + 'timeout' => 30.0, + 'base_uri' => 'https://api.weixin.qq.com/', + ], + ]; + + return array_replace_recursive($base, $this->defaultConfig, $this->userConfig); + } + + /** + * Return all providers. + * + * @return array + */ + public function getProviders() + { + return array_merge([ + ConfigServiceProvider::class, + LogServiceProvider::class, + RequestServiceProvider::class, + HttpClientServiceProvider::class, + ExtensionServiceProvider::class, + EventDispatcherServiceProvider::class, + ], $this->providers); + } + + /** + * @param string $id + * @param mixed $value + */ + public function rebind($id, $value) + { + $this->offsetUnset($id); + $this->offsetSet($id, $value); + } + + /** + * Magic get access. + * + * @param string $id + * + * @return mixed + */ + public function __get($id) + { + if ($this->shouldDelegate($id)) { + return $this->delegateTo($id); + } + + return $this->offsetGet($id); + } + + /** + * Magic set access. + * + * @param string $id + * @param mixed $value + */ + public function __set($id, $value) + { + $this->offsetSet($id, $value); + } + + /** + * @param array $providers + */ + public function registerProviders(array $providers) + { + foreach ($providers as $provider) { + parent::register(new $provider()); + } + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/AES.php b/vendor/overtrue/wechat/src/Kernel/Support/AES.php new file mode 100755 index 0000000..73b1b24 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Support/AES.php @@ -0,0 +1,85 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Support; + +/** + * Class AES. + * + * @author overtrue + */ +class AES +{ + /** + * @param string $text + * @param string $key + * @param string $iv + * @param int $option + * + * @return string + */ + public static function encrypt(string $text, string $key, string $iv, int $option = OPENSSL_RAW_DATA): string + { + self::validateKey($key); + self::validateIv($iv); + + return openssl_encrypt($text, self::getMode($key), $key, $option, $iv); + } + + /** + * @param string $cipherText + * @param string $key + * @param string $iv + * @param int $option + * @param string|null $method + * + * @return string + */ + public static function decrypt(string $cipherText, string $key, string $iv, int $option = OPENSSL_RAW_DATA, $method = null): string + { + self::validateKey($key); + self::validateIv($iv); + + return openssl_decrypt($cipherText, $method ?: self::getMode($key), $key, $option, $iv); + } + + /** + * @param string $key + * + * @return string + */ + public static function getMode($key) + { + return 'aes-'.(8 * strlen($key)).'-cbc'; + } + + /** + * @param string $key + */ + public static function validateKey(string $key) + { + if (!in_array(strlen($key), [16, 24, 32], true)) { + throw new \InvalidArgumentException(sprintf('Key length must be 16, 24, or 32 bytes; got key len (%s).', strlen($key))); + } + } + + /** + * @param string $iv + * + * @throws \InvalidArgumentException + */ + public static function validateIv(string $iv) + { + if (!empty($iv) && 16 !== strlen($iv)) { + throw new \InvalidArgumentException('IV length must be 16 bytes.'); + } + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/Arr.php b/vendor/overtrue/wechat/src/Kernel/Support/Arr.php new file mode 100755 index 0000000..ac34038 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Support/Arr.php @@ -0,0 +1,466 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Support; + +/** + * Array helper from Illuminate\Support\Arr. + */ +class Arr +{ + /** + * Add an element to an array using "dot" notation if it doesn't exist. + * + * @param array $array + * @param string $key + * @param mixed $value + * + * @return array + */ + public static function add(array $array, $key, $value) + { + if (is_null(static::get($array, $key))) { + static::set($array, $key, $value); + } + + return $array; + } + + /** + * Cross join the given arrays, returning all possible permutations. + * + * @param array ...$arrays + * + * @return array + */ + public static function crossJoin(...$arrays) + { + $results = [[]]; + + foreach ($arrays as $index => $array) { + $append = []; + + foreach ($results as $product) { + foreach ($array as $item) { + $product[$index] = $item; + + $append[] = $product; + } + } + + $results = $append; + } + + return $results; + } + + /** + * Divide an array into two arrays. One with keys and the other with values. + * + * @param array $array + * + * @return array + */ + public static function divide(array $array) + { + return [array_keys($array), array_values($array)]; + } + + /** + * Flatten a multi-dimensional associative array with dots. + * + * @param array $array + * @param string $prepend + * + * @return array + */ + public static function dot(array $array, $prepend = '') + { + $results = []; + + foreach ($array as $key => $value) { + if (is_array($value) && !empty($value)) { + $results = array_merge($results, static::dot($value, $prepend.$key.'.')); + } else { + $results[$prepend.$key] = $value; + } + } + + return $results; + } + + /** + * Get all of the given array except for a specified array of items. + * + * @param array $array + * @param array|string $keys + * + * @return array + */ + public static function except(array $array, $keys) + { + static::forget($array, $keys); + + return $array; + } + + /** + * Determine if the given key exists in the provided array. + * + * @param array $array + * @param string|int $key + * + * @return bool + */ + public static function exists(array $array, $key) + { + return array_key_exists($key, $array); + } + + /** + * Return the first element in an array passing a given truth test. + * + * @param array $array + * @param callable|null $callback + * @param mixed $default + * + * @return mixed + */ + public static function first(array $array, callable $callback = null, $default = null) + { + if (is_null($callback)) { + if (empty($array)) { + return $default; + } + + foreach ($array as $item) { + return $item; + } + } + + foreach ($array as $key => $value) { + if (call_user_func($callback, $value, $key)) { + return $value; + } + } + + return $default; + } + + /** + * Return the last element in an array passing a given truth test. + * + * @param array $array + * @param callable|null $callback + * @param mixed $default + * + * @return mixed + */ + public static function last(array $array, callable $callback = null, $default = null) + { + if (is_null($callback)) { + return empty($array) ? $default : end($array); + } + + return static::first(array_reverse($array, true), $callback, $default); + } + + /** + * Flatten a multi-dimensional array into a single level. + * + * @param array $array + * @param int $depth + * + * @return array + */ + public static function flatten(array $array, $depth = INF) + { + return array_reduce($array, function ($result, $item) use ($depth) { + $item = $item instanceof Collection ? $item->all() : $item; + + if (!is_array($item)) { + return array_merge($result, [$item]); + } elseif (1 === $depth) { + return array_merge($result, array_values($item)); + } + + return array_merge($result, static::flatten($item, $depth - 1)); + }, []); + } + + /** + * Remove one or many array items from a given array using "dot" notation. + * + * @param array $array + * @param array|string $keys + */ + public static function forget(array &$array, $keys) + { + $original = &$array; + + $keys = (array) $keys; + + if (0 === count($keys)) { + return; + } + + foreach ($keys as $key) { + // if the exact key exists in the top-level, remove it + if (static::exists($array, $key)) { + unset($array[$key]); + + continue; + } + + $parts = explode('.', $key); + + // clean up before each pass + $array = &$original; + + while (count($parts) > 1) { + $part = array_shift($parts); + + if (isset($array[$part]) && is_array($array[$part])) { + $array = &$array[$part]; + } else { + continue 2; + } + } + + unset($array[array_shift($parts)]); + } + } + + /** + * Get an item from an array using "dot" notation. + * + * @param array $array + * @param string $key + * @param mixed $default + * + * @return mixed + */ + public static function get(array $array, $key, $default = null) + { + if (is_null($key)) { + return $array; + } + + if (static::exists($array, $key)) { + return $array[$key]; + } + + foreach (explode('.', $key) as $segment) { + if (static::exists($array, $segment)) { + $array = $array[$segment]; + } else { + return $default; + } + } + + return $array; + } + + /** + * Check if an item or items exist in an array using "dot" notation. + * + * @param array $array + * @param string|array $keys + * + * @return bool + */ + public static function has(array $array, $keys) + { + if (is_null($keys)) { + return false; + } + + $keys = (array) $keys; + + if (empty($array)) { + return false; + } + + if ($keys === []) { + return false; + } + + foreach ($keys as $key) { + $subKeyArray = $array; + + if (static::exists($array, $key)) { + continue; + } + + foreach (explode('.', $key) as $segment) { + if (static::exists($subKeyArray, $segment)) { + $subKeyArray = $subKeyArray[$segment]; + } else { + return false; + } + } + } + + return true; + } + + /** + * Determines if an array is associative. + * + * An array is "associative" if it doesn't have sequential numerical keys beginning with zero. + * + * @param array $array + * + * @return bool + */ + public static function isAssoc(array $array) + { + $keys = array_keys($array); + + return array_keys($keys) !== $keys; + } + + /** + * Get a subset of the items from the given array. + * + * @param array $array + * @param array|string $keys + * + * @return array + */ + public static function only(array $array, $keys) + { + return array_intersect_key($array, array_flip((array) $keys)); + } + + /** + * Push an item onto the beginning of an array. + * + * @param array $array + * @param mixed $value + * @param mixed $key + * + * @return array + */ + public static function prepend(array $array, $value, $key = null) + { + if (is_null($key)) { + array_unshift($array, $value); + } else { + $array = [$key => $value] + $array; + } + + return $array; + } + + /** + * Get a value from the array, and remove it. + * + * @param array $array + * @param string $key + * @param mixed $default + * + * @return mixed + */ + public static function pull(array &$array, $key, $default = null) + { + $value = static::get($array, $key, $default); + + static::forget($array, $key); + + return $value; + } + + /** + * Get a 1 value from an array. + * + * @param array $array + * @param int|null $amount + * + * @return mixed + * + * @throws \InvalidArgumentException + */ + public static function random(array $array, int $amount = null) + { + if (is_null($amount)) { + return $array[array_rand($array)]; + } + + $keys = array_rand($array, $amount); + + $results = []; + + foreach ((array) $keys as $key) { + $results[] = $array[$key]; + } + + return $results; + } + + /** + * Set an array item to a given value using "dot" notation. + * + * If no key is given to the method, the entire array will be replaced. + * + * @param array $array + * @param string $key + * @param mixed $value + * + * @return array + */ + public static function set(array &$array, string $key, $value) + { + $keys = explode('.', $key); + + while (count($keys) > 1) { + $key = array_shift($keys); + + // If the key doesn't exist at this depth, we will just create an empty array + // to hold the next value, allowing us to create the arrays to hold final + // values at the correct depth. Then we'll keep digging into the array. + if (!isset($array[$key]) || !is_array($array[$key])) { + $array[$key] = []; + } + + $array = &$array[$key]; + } + + $array[array_shift($keys)] = $value; + + return $array; + } + + /** + * Filter the array using the given callback. + * + * @param array $array + * @param callable $callback + * + * @return array + */ + public static function where(array $array, callable $callback) + { + return array_filter($array, $callback, ARRAY_FILTER_USE_BOTH); + } + + /** + * If the given value is not an array, wrap it in one. + * + * @param mixed $value + * + * @return array + */ + public static function wrap($value) + { + return !is_array($value) ? [$value] : $value; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/ArrayAccessible.php b/vendor/overtrue/wechat/src/Kernel/Support/ArrayAccessible.php new file mode 100755 index 0000000..72e0b04 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Support/ArrayAccessible.php @@ -0,0 +1,66 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Support; + +use ArrayAccess; +use ArrayIterator; +use EasyWeChat\Kernel\Contracts\Arrayable; +use IteratorAggregate; + +/** + * Class ArrayAccessible. + * + * @author overtrue + */ +class ArrayAccessible implements ArrayAccess, IteratorAggregate, Arrayable +{ + private $array; + + public function __construct(array $array = []) + { + $this->array = $array; + } + + public function offsetExists($offset) + { + return array_key_exists($offset, $this->array); + } + + public function offsetGet($offset) + { + return $this->array[$offset]; + } + + public function offsetSet($offset, $value) + { + if (null === $offset) { + $this->array[] = $value; + } else { + $this->array[$offset] = $value; + } + } + + public function offsetUnset($offset) + { + unset($this->array[$offset]); + } + + public function getIterator() + { + return new ArrayIterator($this->array); + } + + public function toArray() + { + return $this->array; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/Collection.php b/vendor/overtrue/wechat/src/Kernel/Support/Collection.php new file mode 100755 index 0000000..adf24ea --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Support/Collection.php @@ -0,0 +1,421 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Support; + +use ArrayAccess; +use ArrayIterator; +use Countable; +use EasyWeChat\Kernel\Contracts\Arrayable; +use IteratorAggregate; +use JsonSerializable; +use Serializable; + +/** + * Class Collection. + */ +class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSerializable, Serializable, Arrayable +{ + /** + * The collection data. + * + * @var array + */ + protected $items = []; + + /** + * set data. + * + * @param array $items + */ + public function __construct(array $items = []) + { + foreach ($items as $key => $value) { + $this->set($key, $value); + } + } + + /** + * Return all items. + * + * @return array + */ + public function all() + { + return $this->items; + } + + /** + * Return specific items. + * + * @param array $keys + * + * @return \EasyWeChat\Kernel\Support\Collection + */ + public function only(array $keys) + { + $return = []; + + foreach ($keys as $key) { + $value = $this->get($key); + + if (!is_null($value)) { + $return[$key] = $value; + } + } + + return new static($return); + } + + /** + * Get all items except for those with the specified keys. + * + * @param mixed $keys + * + * @return static + */ + public function except($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + + return new static(Arr::except($this->items, $keys)); + } + + /** + * Merge data. + * + * @param Collection|array $items + * + * @return \EasyWeChat\Kernel\Support\Collection + */ + public function merge($items) + { + $clone = new static($this->all()); + + foreach ($items as $key => $value) { + $clone->set($key, $value); + } + + return $clone; + } + + /** + * To determine Whether the specified element exists. + * + * @param string $key + * + * @return bool + */ + public function has($key) + { + return !is_null(Arr::get($this->items, $key)); + } + + /** + * Retrieve the first item. + * + * @return mixed + */ + public function first() + { + return reset($this->items); + } + + /** + * Retrieve the last item. + * + * @return bool + */ + public function last() + { + $end = end($this->items); + + reset($this->items); + + return $end; + } + + /** + * add the item value. + * + * @param string $key + * @param mixed $value + */ + public function add($key, $value) + { + Arr::set($this->items, $key, $value); + } + + /** + * Set the item value. + * + * @param string $key + * @param mixed $value + */ + public function set($key, $value) + { + Arr::set($this->items, $key, $value); + } + + /** + * Retrieve item from Collection. + * + * @param string $key + * @param mixed $default + * + * @return mixed + */ + public function get($key, $default = null) + { + return Arr::get($this->items, $key, $default); + } + + /** + * Remove item form Collection. + * + * @param string $key + */ + public function forget($key) + { + Arr::forget($this->items, $key); + } + + /** + * Build to array. + * + * @return array + */ + public function toArray() + { + return $this->all(); + } + + /** + * Build to json. + * + * @param int $option + * + * @return string + */ + public function toJson($option = JSON_UNESCAPED_UNICODE) + { + return json_encode($this->all(), $option); + } + + /** + * To string. + * + * @return string + */ + public function __toString() + { + return $this->toJson(); + } + + /** + * (PHP 5 >= 5.4.0)
                            + * Specify data which should be serialized to JSON. + * + * @see http://php.net/manual/en/jsonserializable.jsonserialize.php + * + * @return mixed data which can be serialized by json_encode, + * which is a value of any type other than a resource + */ + public function jsonSerialize() + { + return $this->items; + } + + /** + * (PHP 5 >= 5.1.0)
                            + * String representation of object. + * + * @see http://php.net/manual/en/serializable.serialize.php + * + * @return string the string representation of the object or null + */ + public function serialize() + { + return serialize($this->items); + } + + /** + * (PHP 5 >= 5.0.0)
                            + * Retrieve an external iterator. + * + * @see http://php.net/manual/en/iteratoraggregate.getiterator.php + * + * @return \ArrayIterator An instance of an object implementing Iterator or + * Traversable + */ + public function getIterator() + { + return new ArrayIterator($this->items); + } + + /** + * (PHP 5 >= 5.1.0)
                            + * Count elements of an object. + * + * @see http://php.net/manual/en/countable.count.php + * + * @return int the custom count as an integer. + *

                            + *

                            + * The return value is cast to an integer + */ + public function count() + { + return count($this->items); + } + + /** + * (PHP 5 >= 5.1.0)
                            + * Constructs the object. + * + * @see http://php.net/manual/en/serializable.unserialize.php + * + * @param string $serialized

                            + * The string representation of the object. + *

                            + * + * @return mixed|void + */ + public function unserialize($serialized) + { + return $this->items = unserialize($serialized); + } + + /** + * Get a data by key. + * + * @param string $key + * + * @return mixed + */ + public function __get($key) + { + return $this->get($key); + } + + /** + * Assigns a value to the specified data. + * + * @param string $key + * @param mixed $value + */ + public function __set($key, $value) + { + $this->set($key, $value); + } + + /** + * Whether or not an data exists by key. + * + * @param string $key + * + * @return bool + */ + public function __isset($key) + { + return $this->has($key); + } + + /** + * Unset an data by key. + * + * @param string $key + */ + public function __unset($key) + { + $this->forget($key); + } + + /** + * var_export. + * + * @return array + */ + public function __set_state() + { + return $this->all(); + } + + /** + * (PHP 5 >= 5.0.0)
                            + * Whether a offset exists. + * + * @see http://php.net/manual/en/arrayaccess.offsetexists.php + * + * @param mixed $offset

                            + * An offset to check for. + *

                            + * + * @return bool true on success or false on failure. + * The return value will be casted to boolean if non-boolean was returned + */ + public function offsetExists($offset) + { + return $this->has($offset); + } + + /** + * (PHP 5 >= 5.0.0)
                            + * Offset to unset. + * + * @see http://php.net/manual/en/arrayaccess.offsetunset.php + * + * @param mixed $offset

                            + * The offset to unset. + *

                            + */ + public function offsetUnset($offset) + { + if ($this->offsetExists($offset)) { + $this->forget($offset); + } + } + + /** + * (PHP 5 >= 5.0.0)
                            + * Offset to retrieve. + * + * @see http://php.net/manual/en/arrayaccess.offsetget.php + * + * @param mixed $offset

                            + * The offset to retrieve. + *

                            + * + * @return mixed Can return all value types + */ + public function offsetGet($offset) + { + return $this->offsetExists($offset) ? $this->get($offset) : null; + } + + /** + * (PHP 5 >= 5.0.0)
                            + * Offset to set. + * + * @see http://php.net/manual/en/arrayaccess.offsetset.php + * + * @param mixed $offset

                            + * The offset to assign the value to. + *

                            + * @param mixed $value

                            + * The value to set. + *

                            + */ + public function offsetSet($offset, $value) + { + $this->set($offset, $value); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/File.php b/vendor/overtrue/wechat/src/Kernel/Support/File.php new file mode 100755 index 0000000..72aedf8 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Support/File.php @@ -0,0 +1,133 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Support; + +use finfo; + +/** + * Class File. + */ +class File +{ + /** + * MIME mapping. + * + * @var array + */ + protected static $extensionMap = [ + 'audio/wav' => '.wav', + 'audio/x-ms-wma' => '.wma', + 'video/x-ms-wmv' => '.wmv', + 'video/mp4' => '.mp4', + 'audio/mpeg' => '.mp3', + 'audio/amr' => '.amr', + 'application/vnd.rn-realmedia' => '.rm', + 'audio/mid' => '.mid', + 'image/bmp' => '.bmp', + 'image/gif' => '.gif', + 'image/png' => '.png', + 'image/tiff' => '.tiff', + 'image/jpeg' => '.jpg', + 'application/pdf' => '.pdf', + + // 列举更多的文件 mime, 企业号是支持的,公众平台这边之后万一也更新了呢 + 'application/msword' => '.doc', + + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => '.docx', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.template' => '.dotx', + 'application/vnd.ms-word.document.macroEnabled.12' => '.docm', + 'application/vnd.ms-word.template.macroEnabled.12' => '.dotm', + + 'application/vnd.ms-excel' => '.xls', + + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => '.xlsx', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.template' => '.xltx', + 'application/vnd.ms-excel.sheet.macroEnabled.12' => '.xlsm', + 'application/vnd.ms-excel.template.macroEnabled.12' => '.xltm', + 'application/vnd.ms-excel.addin.macroEnabled.12' => '.xlam', + 'application/vnd.ms-excel.sheet.binary.macroEnabled.12' => '.xlsb', + + 'application/vnd.ms-powerpoint' => '.ppt', + + 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => '.pptx', + 'application/vnd.openxmlformats-officedocument.presentationml.template' => '.potx', + 'application/vnd.openxmlformats-officedocument.presentationml.slideshow' => '.ppsx', + 'application/vnd.ms-powerpoint.addin.macroEnabled.12' => '.ppam', + ]; + + /** + * File header signatures. + * + * @var array + */ + protected static $signatures = [ + 'ffd8ff' => '.jpg', + '424d' => '.bmp', + '47494638' => '.gif', + '2f55736572732f6f7665' => '.png', + '89504e47' => '.png', + '494433' => '.mp3', + 'fffb' => '.mp3', + 'fff3' => '.mp3', + '3026b2758e66cf11' => '.wma', + '52494646' => '.wav', + '57415645' => '.wav', + '41564920' => '.avi', + '000001ba' => '.mpg', + '000001b3' => '.mpg', + '2321414d52' => '.amr', + '25504446' => '.pdf', + ]; + + /** + * Return steam extension. + * + * @param string $stream + * + * @return string|false + */ + public static function getStreamExt($stream) + { + try { + if (is_readable($stream)) { + $stream = file_get_contents($stream); + } + } catch (\Exception $e) { + } + + $fileInfo = new finfo(FILEINFO_MIME); + + $mime = strstr($fileInfo->buffer($stream), ';', true); + + return isset(self::$extensionMap[$mime]) ? self::$extensionMap[$mime] : self::getExtBySignature($stream); + } + + /** + * Get file extension by file header signature. + * + * @param string $stream + * + * @return string + */ + public static function getExtBySignature($stream) + { + $prefix = strval(bin2hex(mb_strcut($stream, 0, 10))); + + foreach (self::$signatures as $signature => $extension) { + if (0 === strpos($prefix, strval($signature))) { + return $extension; + } + } + + return ''; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/Helpers.php b/vendor/overtrue/wechat/src/Kernel/Support/Helpers.php new file mode 100755 index 0000000..0233787 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Support/Helpers.php @@ -0,0 +1,114 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Support; + +/* + * helpers. + * + * @author overtrue + */ + +/** + * Generate a signature. + * + * @param array $attributes + * @param string $key + * @param string $encryptMethod + * + * @return string + */ +function generate_sign(array $attributes, $key, $encryptMethod = 'md5') +{ + ksort($attributes); + + $attributes['key'] = $key; + + return strtoupper(call_user_func_array($encryptMethod, [urldecode(http_build_query($attributes))])); +} + +/** + * Get client ip. + * + * @return string + */ +function get_client_ip() +{ + if (!empty($_SERVER['REMOTE_ADDR'])) { + $ip = $_SERVER['REMOTE_ADDR']; + } else { + // for php-cli(phpunit etc.) + $ip = defined('PHPUNIT_RUNNING') ? '127.0.0.1' : gethostbyname(gethostname()); + } + + return filter_var($ip, FILTER_VALIDATE_IP) ?: '127.0.0.1'; +} + +/** + * Get current server ip. + * + * @return string + */ +function get_server_ip() +{ + if (!empty($_SERVER['SERVER_ADDR'])) { + $ip = $_SERVER['SERVER_ADDR']; + } elseif (!empty($_SERVER['SERVER_NAME'])) { + $ip = gethostbyname($_SERVER['SERVER_NAME']); + } else { + // for php-cli(phpunit etc.) + $ip = defined('PHPUNIT_RUNNING') ? '127.0.0.1' : gethostbyname(gethostname()); + } + + return filter_var($ip, FILTER_VALIDATE_IP) ?: '127.0.0.1'; +} + +/** + * Return current url. + * + * @return string + */ +function current_url() +{ + $protocol = 'http://'; + + if ((!empty($_SERVER['HTTPS']) && 'off' !== $_SERVER['HTTPS']) || ($_SERVER['HTTP_X_FORWARDED_PROTO'] ?? 'http') === 'https') { + $protocol = 'https://'; + } + + return $protocol.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; +} + +/** + * Return random string. + * + * @param string $length + * + * @return string + */ +function str_random($length) +{ + return Str::random($length); +} + +/** + * @param string $content + * @param string $publicKey + * + * @return string + */ +function rsa_public_encrypt($content, $publicKey) +{ + $encrypted = ''; + openssl_public_encrypt($content, $encrypted, openssl_pkey_get_public($publicKey), OPENSSL_PKCS1_OAEP_PADDING); + + return base64_encode($encrypted); +} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/Str.php b/vendor/overtrue/wechat/src/Kernel/Support/Str.php new file mode 100755 index 0000000..3c34246 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Support/Str.php @@ -0,0 +1,193 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Support; + +use EasyWeChat\Kernel\Exceptions\RuntimeException; + +/** + * Class Str. + */ +class Str +{ + /** + * The cache of snake-cased words. + * + * @var array + */ + protected static $snakeCache = []; + + /** + * The cache of camel-cased words. + * + * @var array + */ + protected static $camelCache = []; + + /** + * The cache of studly-cased words. + * + * @var array + */ + protected static $studlyCache = []; + + /** + * Convert a value to camel case. + * + * @param string $value + * + * @return string + */ + public static function camel($value) + { + if (isset(static::$camelCache[$value])) { + return static::$camelCache[$value]; + } + + return static::$camelCache[$value] = lcfirst(static::studly($value)); + } + + /** + * Generate a more truly "random" alpha-numeric string. + * + * @param int $length + * + * @return string + * + * @throws \RuntimeException + */ + public static function random($length = 16) + { + $string = ''; + + while (($len = strlen($string)) < $length) { + $size = $length - $len; + + $bytes = static::randomBytes($size); + + $string .= substr(str_replace(['/', '+', '='], '', base64_encode($bytes)), 0, $size); + } + + return $string; + } + + /** + * Generate a more truly "random" bytes. + * + * @param int $length + * + * @return string + * + * @throws RuntimeException + * + * @codeCoverageIgnore + * + * @throws \Exception + */ + public static function randomBytes($length = 16) + { + if (function_exists('random_bytes')) { + $bytes = random_bytes($length); + } elseif (function_exists('openssl_random_pseudo_bytes')) { + $bytes = openssl_random_pseudo_bytes($length, $strong); + if (false === $bytes || false === $strong) { + throw new RuntimeException('Unable to generate random string.'); + } + } else { + throw new RuntimeException('OpenSSL extension is required for PHP 5 users.'); + } + + return $bytes; + } + + /** + * Generate a "random" alpha-numeric string. + * + * Should not be considered sufficient for cryptography, etc. + * + * @param int $length + * + * @return string + */ + public static function quickRandom($length = 16) + { + $pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + + return substr(str_shuffle(str_repeat($pool, $length)), 0, $length); + } + + /** + * Convert the given string to upper-case. + * + * @param string $value + * + * @return string + */ + public static function upper($value) + { + return mb_strtoupper($value); + } + + /** + * Convert the given string to title case. + * + * @param string $value + * + * @return string + */ + public static function title($value) + { + return mb_convert_case($value, MB_CASE_TITLE, 'UTF-8'); + } + + /** + * Convert a string to snake case. + * + * @param string $value + * @param string $delimiter + * + * @return string + */ + public static function snake($value, $delimiter = '_') + { + $key = $value.$delimiter; + + if (isset(static::$snakeCache[$key])) { + return static::$snakeCache[$key]; + } + + if (!ctype_lower($value)) { + $value = strtolower(preg_replace('/(.)(?=[A-Z])/', '$1'.$delimiter, $value)); + } + + return static::$snakeCache[$key] = trim($value, '_'); + } + + /** + * Convert a value to studly caps case. + * + * @param string $value + * + * @return string + */ + public static function studly($value) + { + $key = $value; + + if (isset(static::$studlyCache[$key])) { + return static::$studlyCache[$key]; + } + + $value = ucwords(str_replace(['-', '_'], ' ', $value)); + + return static::$studlyCache[$key] = str_replace(' ', '', $value); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Support/XML.php b/vendor/overtrue/wechat/src/Kernel/Support/XML.php new file mode 100755 index 0000000..93026e6 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Support/XML.php @@ -0,0 +1,167 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Support; + +use SimpleXMLElement; + +/** + * Class XML. + */ +class XML +{ + /** + * XML to array. + * + * @param string $xml XML string + * + * @return array + */ + public static function parse($xml) + { + $backup = libxml_disable_entity_loader(true); + + $result = self::normalize(simplexml_load_string(self::sanitize($xml), 'SimpleXMLElement', LIBXML_COMPACT | LIBXML_NOCDATA | LIBXML_NOBLANKS)); + + libxml_disable_entity_loader($backup); + + return $result; + } + + /** + * XML encode. + * + * @param mixed $data + * @param string $root + * @param string $item + * @param string $attr + * @param string $id + * + * @return string + */ + public static function build( + $data, + $root = 'xml', + $item = 'item', + $attr = '', + $id = 'id' + ) { + if (is_array($attr)) { + $_attr = []; + + foreach ($attr as $key => $value) { + $_attr[] = "{$key}=\"{$value}\""; + } + + $attr = implode(' ', $_attr); + } + + $attr = trim($attr); + $attr = empty($attr) ? '' : " {$attr}"; + $xml = "<{$root}{$attr}>"; + $xml .= self::data2Xml($data, $item, $id); + $xml .= ""; + + return $xml; + } + + /** + * Build CDATA. + * + * @param string $string + * + * @return string + */ + public static function cdata($string) + { + return sprintf('', $string); + } + + /** + * Object to array. + * + * + * @param SimpleXMLElement $obj + * + * @return array + */ + protected static function normalize($obj) + { + $result = null; + + if (is_object($obj)) { + $obj = (array) $obj; + } + + if (is_array($obj)) { + foreach ($obj as $key => $value) { + $res = self::normalize($value); + if (('@attributes' === $key) && ($key)) { + $result = $res; // @codeCoverageIgnore + } else { + $result[$key] = $res; + } + } + } else { + $result = $obj; + } + + return $result; + } + + /** + * Array to XML. + * + * @param array $data + * @param string $item + * @param string $id + * + * @return string + */ + protected static function data2Xml($data, $item = 'item', $id = 'id') + { + $xml = $attr = ''; + + foreach ($data as $key => $val) { + if (is_numeric($key)) { + $id && $attr = " {$id}=\"{$key}\""; + $key = $item; + } + + $xml .= "<{$key}{$attr}>"; + + if ((is_array($val) || is_object($val))) { + $xml .= self::data2Xml((array) $val, $item, $id); + } else { + $xml .= is_numeric($val) ? $val : self::cdata($val); + } + + $xml .= ""; + } + + return $xml; + } + + /** + * Delete invalid characters in XML. + * + * @see https://www.w3.org/TR/2008/REC-xml-20081126/#charsets - XML charset range + * @see http://php.net/manual/en/regexp.reference.escape.php - escape in UTF-8 mode + * + * @param string $xml + * + * @return string + */ + public static function sanitize($xml) + { + return preg_replace('/[^\x{9}\x{A}\x{D}\x{20}-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]+/u', '', $xml); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/HasAttributes.php b/vendor/overtrue/wechat/src/Kernel/Traits/HasAttributes.php new file mode 100755 index 0000000..74fc9ac --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Traits/HasAttributes.php @@ -0,0 +1,249 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Traits; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Support\Arr; +use EasyWeChat\Kernel\Support\Str; + +/** + * Trait Attributes. + */ +trait HasAttributes +{ + /** + * @var array + */ + protected $attributes = []; + + /** + * @var bool + */ + protected $snakeable = true; + + /** + * Set Attributes. + * + * @param array $attributes + * + * @return $this + */ + public function setAttributes(array $attributes = []) + { + $this->attributes = $attributes; + + return $this; + } + + /** + * Set attribute. + * + * @param string $attribute + * @param string $value + * + * @return $this + */ + public function setAttribute($attribute, $value) + { + Arr::set($this->attributes, $attribute, $value); + + return $this; + } + + /** + * Get attribute. + * + * @param string $attribute + * @param mixed $default + * + * @return mixed + */ + public function getAttribute($attribute, $default = null) + { + return Arr::get($this->attributes, $attribute, $default); + } + + /** + * @param string $attribute + * + * @return bool + */ + public function isRequired($attribute) + { + return in_array($attribute, $this->getRequired(), true); + } + + /** + * @return array|mixed + */ + public function getRequired() + { + return property_exists($this, 'required') ? $this->required : []; + } + + /** + * Set attribute. + * + * @param string $attribute + * @param mixed $value + * + * @return $this + */ + public function with($attribute, $value) + { + $this->snakeable && $attribute = Str::snake($attribute); + + $this->setAttribute($attribute, $value); + + return $this; + } + + /** + * Override parent set() method. + * + * @param string $attribute + * @param mixed $value + * + * @return $this + */ + public function set($attribute, $value) + { + $this->setAttribute($attribute, $value); + + return $this; + } + + /** + * Override parent get() method. + * + * @param string $attribute + * @param mixed $default + * + * @return mixed + */ + public function get($attribute, $default = null) + { + return $this->getAttribute($attribute, $default); + } + + /** + * @param string $key + * + * @return bool + */ + public function has(string $key) + { + return Arr::has($this->attributes, $key); + } + + /** + * @param array $attributes + * + * @return $this + */ + public function merge(array $attributes) + { + $this->attributes = array_merge($this->attributes, $attributes); + + return $this; + } + + /** + * @param array|string $keys + * + * @return array + */ + public function only($keys) + { + return Arr::only($this->attributes, $keys); + } + + /** + * Return all items. + * + * @return array + */ + public function all() + { + $this->checkRequiredAttributes(); + + return $this->attributes; + } + + /** + * Magic call. + * + * @param string $method + * @param array $args + * + * @return $this + */ + public function __call($method, $args) + { + if (0 === stripos($method, 'with')) { + return $this->with(substr($method, 4), array_shift($args)); + } + + throw new \BadMethodCallException(sprintf('Method "%s" does not exists.', $method)); + } + + /** + * Magic get. + * + * @param string $property + * + * @return mixed + */ + public function __get($property) + { + return $this->get($property); + } + + /** + * Magic set. + * + * @param string $property + * @param mixed $value + * + * @return $this + */ + public function __set($property, $value) + { + return $this->with($property, $value); + } + + /** + * Whether or not an data exists by key. + * + * @param string $key + * + * @return bool + */ + public function __isset($key) + { + return isset($this->attributes[$key]); + } + + /** + * Check required attributes. + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + protected function checkRequiredAttributes() + { + foreach ($this->getRequired() as $attribute) { + if (is_null($this->get($attribute))) { + throw new InvalidArgumentException(sprintf('"%s" cannot be empty.', $attribute)); + } + } + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/HasHttpRequests.php b/vendor/overtrue/wechat/src/Kernel/Traits/HasHttpRequests.php new file mode 100755 index 0000000..9bf0a02 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Traits/HasHttpRequests.php @@ -0,0 +1,231 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Traits; + +use GuzzleHttp\Client; +use GuzzleHttp\ClientInterface; +use GuzzleHttp\HandlerStack; +use Psr\Http\Message\ResponseInterface; + +/** + * Trait HasHttpRequests. + * + * @author overtrue + */ +trait HasHttpRequests +{ + use ResponseCastable; + + /** + * @var \GuzzleHttp\ClientInterface + */ + protected $httpClient; + + /** + * @var array + */ + protected $middlewares = []; + + /** + * @var \GuzzleHttp\HandlerStack + */ + protected $handlerStack; + + /** + * @var array + */ + protected static $defaults = [ + 'curl' => [ + CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4, + ], + ]; + + /** + * Set guzzle default settings. + * + * @param array $defaults + */ + public static function setDefaultOptions($defaults = []) + { + self::$defaults = $defaults; + } + + /** + * Return current guzzle default settings. + * + * @return array + */ + public static function getDefaultOptions(): array + { + return self::$defaults; + } + + /** + * Set GuzzleHttp\Client. + * + * @param \GuzzleHttp\ClientInterface $httpClient + * + * @return $this + */ + public function setHttpClient(ClientInterface $httpClient) + { + $this->httpClient = $httpClient; + + return $this; + } + + /** + * Return GuzzleHttp\ClientInterface instance. + * + * @return ClientInterface + */ + public function getHttpClient(): ClientInterface + { + if (!($this->httpClient instanceof ClientInterface)) { + if (property_exists($this, 'app') && $this->app['http_client']) { + $this->httpClient = $this->app['http_client']; + } else { + $this->httpClient = new Client(['handler' => HandlerStack::create($this->getGuzzleHandler())]); + } + } + + return $this->httpClient; + } + + /** + * Add a middleware. + * + * @param callable $middleware + * @param string $name + * + * @return $this + */ + public function pushMiddleware(callable $middleware, string $name = null) + { + if (!is_null($name)) { + $this->middlewares[$name] = $middleware; + } else { + array_push($this->middlewares, $middleware); + } + + return $this; + } + + /** + * Return all middlewares. + * + * @return array + */ + public function getMiddlewares(): array + { + return $this->middlewares; + } + + /** + * Make a request. + * + * @param string $url + * @param string $method + * @param array $options + * + * @return \Psr\Http\Message\ResponseInterface + * + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function request($url, $method = 'GET', $options = []): ResponseInterface + { + $method = strtoupper($method); + + $options = array_merge(self::$defaults, $options, ['handler' => $this->getHandlerStack()]); + + $options = $this->fixJsonIssue($options); + + if (property_exists($this, 'baseUri') && !is_null($this->baseUri)) { + $options['base_uri'] = $this->baseUri; + } + + $response = $this->getHttpClient()->request($method, $url, $options); + $response->getBody()->rewind(); + + return $response; + } + + /** + * @param \GuzzleHttp\HandlerStack $handlerStack + * + * @return $this + */ + public function setHandlerStack(HandlerStack $handlerStack) + { + $this->handlerStack = $handlerStack; + + return $this; + } + + /** + * Build a handler stack. + * + * @return \GuzzleHttp\HandlerStack + */ + public function getHandlerStack(): HandlerStack + { + if ($this->handlerStack) { + return $this->handlerStack; + } + + $this->handlerStack = HandlerStack::create($this->getGuzzleHandler()); + + foreach ($this->middlewares as $name => $middleware) { + $this->handlerStack->push($middleware, $name); + } + + return $this->handlerStack; + } + + /** + * @param array $options + * + * @return array + */ + protected function fixJsonIssue(array $options): array + { + if (isset($options['json']) && is_array($options['json'])) { + $options['headers'] = array_merge($options['headers'] ?? [], ['Content-Type' => 'application/json']); + + if (empty($options['json'])) { + $options['body'] = \GuzzleHttp\json_encode($options['json'], JSON_FORCE_OBJECT); + } else { + $options['body'] = \GuzzleHttp\json_encode($options['json'], JSON_UNESCAPED_UNICODE); + } + + unset($options['json']); + } + + return $options; + } + + /** + * Get guzzle handler. + * + * @return callable + */ + protected function getGuzzleHandler() + { + if (property_exists($this, 'app') && isset($this->app['guzzle_handler'])) { + return is_string($handler = $this->app->raw('guzzle_handler')) + ? new $handler() + : $handler; + } + + return \GuzzleHttp\choose_handler(); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/InteractsWithCache.php b/vendor/overtrue/wechat/src/Kernel/Traits/InteractsWithCache.php new file mode 100755 index 0000000..e1c80e4 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Traits/InteractsWithCache.php @@ -0,0 +1,109 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Traits; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\ServiceContainer; +use Psr\Cache\CacheItemPoolInterface; +use Psr\SimpleCache\CacheInterface as SimpleCacheInterface; +use Symfony\Component\Cache\Adapter\FilesystemAdapter; +use Symfony\Component\Cache\Psr16Cache; +use Symfony\Component\Cache\Simple\FilesystemCache; + +/** + * Trait InteractsWithCache. + * + * @author overtrue + */ +trait InteractsWithCache +{ + /** + * @var \Psr\SimpleCache\CacheInterface + */ + protected $cache; + + /** + * Get cache instance. + * + * @return \Psr\SimpleCache\CacheInterface + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function getCache() + { + if ($this->cache) { + return $this->cache; + } + + if (property_exists($this, 'app') && $this->app instanceof ServiceContainer && isset($this->app['cache'])) { + $this->setCache($this->app['cache']); + + // Fix PHPStan error + assert($this->cache instanceof \Psr\SimpleCache\CacheInterface); + + return $this->cache; + } + + return $this->cache = $this->createDefaultCache(); + } + + /** + * Set cache instance. + * + * @param \Psr\SimpleCache\CacheInterface|\Psr\Cache\CacheItemPoolInterface $cache + * + * @return $this + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function setCache($cache) + { + if (empty(\array_intersect([SimpleCacheInterface::class, CacheItemPoolInterface::class], \class_implements($cache)))) { + throw new InvalidArgumentException( + \sprintf('The cache instance must implements %s or %s interface.', + SimpleCacheInterface::class, CacheItemPoolInterface::class + ) + ); + } + + if ($cache instanceof CacheItemPoolInterface) { + if (!$this->isSymfony43()) { + throw new InvalidArgumentException(sprintf('The cache instance must implements %s', SimpleCacheInterface::class)); + } + $cache = new Psr16Cache($cache); + } + + $this->cache = $cache; + + return $this; + } + + /** + * @return \Psr\SimpleCache\CacheInterface + */ + protected function createDefaultCache() + { + if ($this->isSymfony43()) { + return new Psr16Cache(new FilesystemAdapter('easywechat', 1500)); + } + + return new FilesystemCache(); + } + + /** + * @return bool + */ + protected function isSymfony43(): bool + { + return \class_exists('Symfony\Component\Cache\Psr16Cache'); + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/Observable.php b/vendor/overtrue/wechat/src/Kernel/Traits/Observable.php new file mode 100755 index 0000000..de3cebf --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Traits/Observable.php @@ -0,0 +1,271 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Traits; + +use EasyWeChat\Kernel\Clauses\Clause; +use EasyWeChat\Kernel\Contracts\EventHandlerInterface; +use EasyWeChat\Kernel\Decorators\FinallyResult; +use EasyWeChat\Kernel\Decorators\TerminateResult; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Trait Observable. + * + * @author overtrue + */ +trait Observable +{ + /** + * @var array + */ + protected $handlers = []; + + /** + * @var array + */ + protected $clauses = []; + + /** + * @param \Closure|EventHandlerInterface|callable|string $handler + * @param \Closure|EventHandlerInterface|callable|string $condition + * + * @return \EasyWeChat\Kernel\Clauses\Clause + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \ReflectionException + */ + public function push($handler, $condition = '*') + { + list($handler, $condition) = $this->resolveHandlerAndCondition($handler, $condition); + + if (!isset($this->handlers[$condition])) { + $this->handlers[$condition] = []; + } + + array_push($this->handlers[$condition], $handler); + + return $this->newClause($handler); + } + + /** + * @param \Closure|EventHandlerInterface|string $handler + * @param \Closure|EventHandlerInterface|string $condition + * + * @return \EasyWeChat\Kernel\Clauses\Clause + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \ReflectionException + */ + public function unshift($handler, $condition = '*') + { + list($handler, $condition) = $this->resolveHandlerAndCondition($handler, $condition); + + if (!isset($this->handlers[$condition])) { + $this->handlers[$condition] = []; + } + + array_unshift($this->handlers[$condition], $handler); + + return $this->newClause($handler); + } + + /** + * @param string $condition + * @param \Closure|EventHandlerInterface|string $handler + * + * @return \EasyWeChat\Kernel\Clauses\Clause + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function observe($condition, $handler) + { + return $this->push($handler, $condition); + } + + /** + * @param string $condition + * @param \Closure|EventHandlerInterface|string $handler + * + * @return \EasyWeChat\Kernel\Clauses\Clause + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function on($condition, $handler) + { + return $this->push($handler, $condition); + } + + /** + * @param string|int $event + * @param mixed ...$payload + * + * @return mixed|null + */ + public function dispatch($event, $payload) + { + return $this->notify($event, $payload); + } + + /** + * @param string|int $event + * @param mixed ...$payload + * + * @return mixed|null + */ + public function notify($event, $payload) + { + $result = null; + + foreach ($this->handlers as $condition => $handlers) { + if ('*' === $condition || ($condition & $event) === $event) { + foreach ($handlers as $handler) { + if ($clause = $this->clauses[$this->getHandlerHash($handler)] ?? null) { + if ($clause->intercepted($payload)) { + continue; + } + } + + $response = $this->callHandler($handler, $payload); + + switch (true) { + case $response instanceof TerminateResult: + return $response->content; + case true === $response: + continue 2; + case false === $response: + break 2; + case !empty($response) && !($result instanceof FinallyResult): + $result = $response; + } + } + } + } + + return $result instanceof FinallyResult ? $result->content : $result; + } + + /** + * @return array + */ + public function getHandlers() + { + return $this->handlers; + } + + /** + * @param mixed $handler + * + * @return \EasyWeChat\Kernel\Clauses\Clause + */ + protected function newClause($handler): Clause + { + return $this->clauses[$this->getHandlerHash($handler)] = new Clause(); + } + + /** + * @param mixed $handler + * + * @return string + */ + protected function getHandlerHash($handler) + { + if (is_string($handler)) { + return $handler; + } + + if (is_array($handler)) { + return is_string($handler[0]) + ? $handler[0].'::'.$handler[1] + : get_class($handler[0]).$handler[1]; + } + + return spl_object_hash($handler); + } + + /** + * @param callable $handler + * @param mixed $payload + * + * @return mixed + */ + protected function callHandler(callable $handler, $payload) + { + try { + return call_user_func_array($handler, [$payload]); + } catch (\Exception $e) { + if (property_exists($this, 'app') && $this->app instanceof ServiceContainer) { + $this->app['logger']->error($e->getCode().': '.$e->getMessage(), [ + 'code' => $e->getCode(), + 'message' => $e->getMessage(), + 'file' => $e->getFile(), + 'line' => $e->getLine(), + ]); + } + } + } + + /** + * @param mixed $handler + * + * @return \Closure + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \ReflectionException + */ + protected function makeClosure($handler) + { + if (is_callable($handler)) { + return $handler; + } + + if (is_string($handler)) { + if (!class_exists($handler)) { + throw new InvalidArgumentException(sprintf('Class "%s" not exists.', $handler)); + } + + if (!in_array(EventHandlerInterface::class, (new \ReflectionClass($handler))->getInterfaceNames(), true)) { + throw new InvalidArgumentException(sprintf('Class "%s" not an instance of "%s".', $handler, EventHandlerInterface::class)); + } + + return function ($payload) use ($handler) { + return (new $handler($this->app ?? null))->handle($payload); + }; + } + + if ($handler instanceof EventHandlerInterface) { + return function () use ($handler) { + return $handler->handle(...func_get_args()); + }; + } + + throw new InvalidArgumentException('No valid handler is found in arguments.'); + } + + /** + * @param mixed $handler + * @param mixed $condition + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \ReflectionException + */ + protected function resolveHandlerAndCondition($handler, $condition): array + { + if (is_int($handler) || (is_string($handler) && !class_exists($handler))) { + list($handler, $condition) = [$condition, $handler]; + } + + return [$this->makeClosure($handler), $condition]; + } +} diff --git a/vendor/overtrue/wechat/src/Kernel/Traits/ResponseCastable.php b/vendor/overtrue/wechat/src/Kernel/Traits/ResponseCastable.php new file mode 100755 index 0000000..22c5c04 --- /dev/null +++ b/vendor/overtrue/wechat/src/Kernel/Traits/ResponseCastable.php @@ -0,0 +1,96 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Kernel\Traits; + +use EasyWeChat\Kernel\Contracts\Arrayable; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Exceptions\InvalidConfigException; +use EasyWeChat\Kernel\Http\Response; +use EasyWeChat\Kernel\Support\Collection; +use Psr\Http\Message\ResponseInterface; + +/** + * Trait ResponseCastable. + * + * @author overtrue + */ +trait ResponseCastable +{ + /** + * @param \Psr\Http\Message\ResponseInterface $response + * @param string|null $type + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + protected function castResponseToType(ResponseInterface $response, $type = null) + { + $response = Response::buildFromPsrResponse($response); + $response->getBody()->rewind(); + + switch ($type ?? 'array') { + case 'collection': + return $response->toCollection(); + case 'array': + return $response->toArray(); + case 'object': + return $response->toObject(); + case 'raw': + return $response; + default: + if (!is_subclass_of($type, Arrayable::class)) { + throw new InvalidConfigException(sprintf( + 'Config key "response_type" classname must be an instanceof %s', + Arrayable::class + )); + } + + return new $type($response); + } + } + + /** + * @param mixed $response + * @param string|null $type + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + protected function detectAndCastResponseToType($response, $type = null) + { + switch (true) { + case $response instanceof ResponseInterface: + $response = Response::buildFromPsrResponse($response); + + break; + case $response instanceof Arrayable: + $response = new Response(200, [], json_encode($response->toArray())); + + break; + case ($response instanceof Collection) || is_array($response) || is_object($response): + $response = new Response(200, [], json_encode($response)); + + break; + case is_scalar($response): + $response = new Response(200, [], $response); + + break; + default: + throw new InvalidArgumentException(sprintf('Unsupported response type "%s"', gettype($response))); + } + + return $this->castResponseToType($response, $type); + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Application.php b/vendor/overtrue/wechat/src/MicroMerchant/Application.php new file mode 100755 index 0000000..ff7d06f --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Application.php @@ -0,0 +1,176 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\ServiceContainer; +use EasyWeChat\Kernel\Support; +use EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException; + +/** + * Class Application. + * + * @author liuml + * + * @property \EasyWeChat\MicroMerchant\Certficates\Client $certficates + * @property \EasyWeChat\MicroMerchant\Material\Client $material + * @property \EasyWeChat\MicroMerchant\MerchantConfig\Client $merchantConfig + * @property \EasyWeChat\MicroMerchant\Withdraw\Client $withdraw + * @property \EasyWeChat\MicroMerchant\Media\Client $media + * + * @method mixed submitApplication(array $params) + * @method mixed getStatus(string $applymentId, string $businessCode = '') + * @method mixed upgrade(array $params) + * @method mixed getUpgradeStatus(string $subMchId = '') + */ +class Application extends ServiceContainer +{ + /** + * @var array + */ + protected $providers = [ + // Base services + Base\ServiceProvider::class, + Certficates\ServiceProvider::class, + MerchantConfig\ServiceProvider::class, + Material\ServiceProvider::class, + Withdraw\ServiceProvider::class, + Media\ServiceProvider::class, + ]; + + /** + * @var array + */ + protected $defaultConfig = [ + 'http' => [ + 'base_uri' => 'https://api.mch.weixin.qq.com/', + ], + 'log' => [ + 'default' => 'dev', // 默认使用的 channel,生产环境可以改为下面的 prod + 'channels' => [ + // 测试环境 + 'dev' => [ + 'driver' => 'single', + 'path' => '/tmp/easywechat.log', + 'level' => 'debug', + ], + // 生产环境 + 'prod' => [ + 'driver' => 'daily', + 'path' => '/tmp/easywechat.log', + 'level' => 'info', + ], + ], + ], + ]; + + /** + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function getKey() + { + $key = $this['config']->key; + + if (empty($key)) { + throw new InvalidArgumentException('config key connot be empty.'); + } + + if (32 !== strlen($key)) { + throw new InvalidArgumentException(sprintf("'%s' should be 32 chars length.", $key)); + } + + return $key; + } + + /** + * set sub-mch-id and appid. + * + * @param string $subMchId Identification Number of Small and Micro Businessmen Reported by Service Providers + * @param string $appId Public Account ID of Service Provider + * + * @return $this + */ + public function setSubMchId(string $subMchId, string $appId = '') + { + $this['config']->set('sub_mch_id', $subMchId); + $this['config']->set('appid', $appId); + + return $this; + } + + /** + * setCertificate. + * + * @param string $certificate + * @param string $serialNo + * + * @return $this + */ + public function setCertificate(string $certificate, string $serialNo) + { + $this['config']->set('certificate', $certificate); + $this['config']->set('serial_no', $serialNo); + + return $this; + } + + /** + * Returning true indicates that the verification is successful, + * returning false indicates that the signature field does not exist or is empty, + * and if the signature verification is wrong, the InvalidSignException will be thrown directly. + * + * @param array $data + * + * @return bool + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException + */ + public function verifySignature(array $data) + { + if (!isset($data['sign']) || empty($data['sign'])) { + return false; + } + + $sign = $data['sign']; + strlen($sign) > 32 && $signType = 'HMAC-SHA256'; + unset($data['sign']); + $secretKey = $this->getKey(); + + if ('HMAC-SHA256' === ($signType ?? 'MD5')) { + $encryptMethod = function ($str) use ($secretKey) { + return hash_hmac('sha256', $str, $secretKey); + }; + } else { + $encryptMethod = 'md5'; + } + + if (Support\generate_sign($data, $secretKey, $encryptMethod) === $sign) { + return true; + } + + throw new InvalidSignException('return value signature verification error'); + } + + /** + * @param string $name + * @param array $arguments + * + * @return mixed + */ + public function __call($name, $arguments) + { + return call_user_func_array([$this['base'], $name], $arguments); + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Base/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Base/Client.php new file mode 100755 index 0000000..8c777b4 --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Base/Client.php @@ -0,0 +1,122 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Base; + +use EasyWeChat\MicroMerchant\Kernel\BaseClient; + +/** + * Class Client. + * + * @author liuml + * @DateTime 2019-05-30 14:19 + */ +class Client extends BaseClient +{ + /** + * apply to settle in to become a small micro merchant. + * + * @param array $params + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException + */ + public function submitApplication(array $params) + { + $params = $this->processParams(array_merge($params, [ + 'version' => '3.0', + 'cert_sn' => '', + 'sign_type' => 'HMAC-SHA256', + 'nonce_str' => uniqid('micro'), + ])); + + return $this->safeRequest('applyment/micro/submit', $params); + } + + /** + * query application status. + * + * @param string $applymentId + * @param string $businessCode + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getStatus(string $applymentId, string $businessCode = '') + { + if (!empty($applymentId)) { + $params = [ + 'applyment_id' => $applymentId, + ]; + } else { + $params = [ + 'business_code' => $businessCode, + ]; + } + + $params = array_merge($params, [ + 'version' => '1.0', + 'sign_type' => 'HMAC-SHA256', + 'nonce_str' => uniqid('micro'), + ]); + + return $this->safeRequest('applyment/micro/getstate', $params); + } + + /** + * merchant upgrade api. + * + * @param array $params + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException + */ + public function upgrade(array $params) + { + $params['sub_mch_id'] = $params['sub_mch_id'] ?? $this->app['config']->sub_mch_id; + $params = $this->processParams(array_merge($params, [ + 'version' => '1.0', + 'cert_sn' => '', + 'sign_type' => 'HMAC-SHA256', + 'nonce_str' => uniqid('micro'), + ])); + + return $this->safeRequest('applyment/micro/submitupgrade', $params); + } + + /** + * get upgrade status. + * + * @param string $subMchId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getUpgradeStatus(string $subMchId = '') + { + return $this->safeRequest('applyment/micro/getupgradestate', [ + 'version' => '1.0', + 'sign_type' => 'HMAC-SHA256', + 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, + 'nonce_str' => uniqid('micro'), + ]); + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Base/ServiceProvider.php new file mode 100755 index 0000000..db2f056 --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Base/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Base; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['base'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Certficates/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Certficates/Client.php new file mode 100755 index 0000000..fc572dc --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Certficates/Client.php @@ -0,0 +1,103 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Certficates; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\MicroMerchant\Kernel\BaseClient; +use EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidExtensionException; + +/** + * Class Client. + * + * @author liuml + * @DateTime 2019-05-30 14:19 + */ +class Client extends BaseClient +{ + /** + * get certficates. + * + * @param bool $returnRaw + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidExtensionException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function get(bool $returnRaw = false) + { + $params = [ + 'sign_type' => 'HMAC-SHA256', + 'nonce_str' => uniqid('micro'), + ]; + + if (true === $returnRaw) { + return $this->requestRaw('risk/getcertficates', $params); + } + /** @var array $response */ + $response = $this->requestArray('risk/getcertficates', $params); + + if ('SUCCESS' !== $response['return_code']) { + throw new InvalidArgumentException( + sprintf( + 'Failed to get certificate. return_code_msg: "%s" .', + $response['return_code'].'('.$response['return_msg'].')' + ) + ); + } + if ('SUCCESS' !== $response['result_code']) { + throw new InvalidArgumentException( + sprintf( + 'Failed to get certificate. result_err_code_des: "%s" .', + $response['result_code'].'('.$response['err_code'].'['.$response['err_code_des'].'])' + ) + ); + } + $certificates = \GuzzleHttp\json_decode($response['certificates'], true)['data'][0]; + $ciphertext = $this->decrypt($certificates['encrypt_certificate']); + unset($certificates['encrypt_certificate']); + $certificates['certificates'] = $ciphertext; + + return $certificates; + } + + /** + * decrypt ciphertext. + * + * @param array $encryptCertificate + * + * @return string + * + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidExtensionException + */ + public function decrypt(array $encryptCertificate) + { + if (false === extension_loaded('sodium')) { + throw new InvalidExtensionException('sodium extension is not installed,Reference link https://php.net/manual/zh/book.sodium.php'); + } + + if (false === sodium_crypto_aead_aes256gcm_is_available()) { + throw new InvalidExtensionException('aes256gcm is not currently supported'); + } + + // sodium_crypto_aead_aes256gcm_decrypt function needs to open libsodium extension. + // https://www.php.net/manual/zh/function.sodium-crypto-aead-aes256gcm-decrypt.php + return sodium_crypto_aead_aes256gcm_decrypt( + base64_decode($encryptCertificate['ciphertext'], true), + $encryptCertificate['associated_data'], + $encryptCertificate['nonce'], + $this->app['config']->apiv3_key + ); + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Certficates/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Certficates/ServiceProvider.php new file mode 100755 index 0000000..2e88b7e --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Certficates/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Certficates; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['certficates'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/BaseClient.php b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/BaseClient.php new file mode 100755 index 0000000..7f1ffaa --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/BaseClient.php @@ -0,0 +1,259 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Kernel; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Support; +use EasyWeChat\MicroMerchant\Application; +use EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException; +use EasyWeChat\Payment\Kernel\BaseClient as PaymentBaseClient; + +/** + * Class BaseClient. + * + * @author liuml + * @DateTime 2019-07-10 12:06 + */ +class BaseClient extends PaymentBaseClient +{ + /** + * @var string + */ + protected $certificates; + + /** + * BaseClient constructor. + * + * @param \EasyWeChat\MicroMerchant\Application $app + */ + public function __construct(Application $app) + { + $this->app = $app; + + $this->setHttpClient($this->app['http_client']); + } + + /** + * Extra request params. + * + * @return array + */ + protected function prepends() + { + return []; + } + + /** + * httpUpload. + * + * @param string $url + * @param array $files + * @param array $form + * @param array $query + * @param bool $returnResponse + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException + */ + public function httpUpload(string $url, array $files = [], array $form = [], array $query = [], $returnResponse = false) + { + $multipart = []; + + foreach ($files as $name => $path) { + $multipart[] = [ + 'name' => $name, + 'contents' => fopen($path, 'r'), + ]; + } + + $base = [ + 'mch_id' => $this->app['config']['mch_id'], + ]; + + $form = array_merge($base, $form); + + $form['sign'] = $this->getSign($form); + + foreach ($form as $name => $contents) { + $multipart[] = compact('name', 'contents'); + } + + $options = [ + 'query' => $query, + 'multipart' => $multipart, + 'connect_timeout' => 30, + 'timeout' => 30, + 'read_timeout' => 30, + 'cert' => $this->app['config']->get('cert_path'), + 'ssl_key' => $this->app['config']->get('key_path'), + ]; + + $this->pushMiddleware($this->logMiddleware(), 'log'); + + $response = $this->performRequest($url, 'POST', $options); + + $result = $returnResponse ? $response : $this->castResponseToType($response, $this->app->config->get('response_type')); + // auto verify signature + if ($returnResponse || 'array' !== ($this->app->config->get('response_type') ?? 'array')) { + $this->app->verifySignature($this->castResponseToType($response, 'array')); + } else { + $this->app->verifySignature($result); + } + + return $result; + } + + /** + * request. + * + * @param string $endpoint + * @param array $params + * @param string $method + * @param array $options + * @param bool $returnResponse + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException + */ + protected function request(string $endpoint, array $params = [], $method = 'post', array $options = [], $returnResponse = false) + { + $base = [ + 'mch_id' => $this->app['config']['mch_id'], + ]; + + $params = array_merge($base, $this->prepends(), $params); + $params['sign'] = $this->getSign($params); + $options = array_merge([ + 'body' => Support\XML::build($params), + ], $options); + + $this->pushMiddleware($this->logMiddleware(), 'log'); + $response = $this->performRequest($endpoint, $method, $options); + $result = $returnResponse ? $response : $this->castResponseToType($response, $this->app->config->get('response_type')); + // auto verify signature + if ($returnResponse || 'array' !== ($this->app->config->get('response_type') ?? 'array')) { + $this->app->verifySignature($this->castResponseToType($response, 'array')); + } else { + $this->app->verifySignature($result); + } + + return $result; + } + + /** + * processing parameters contain fields that require sensitive information encryption. + * + * @param array $params + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException + */ + protected function processParams(array $params) + { + $serial_no = $this->app['config']->get('serial_no'); + if (null === $serial_no) { + throw new InvalidArgumentException('config serial_no connot be empty.'); + } + + $params['cert_sn'] = $serial_no; + $sensitive_fields = $this->getSensitiveFieldsName(); + foreach ($params as $k => $v) { + if (in_array($k, $sensitive_fields, true)) { + $params[$k] = $this->encryptSensitiveInformation($v); + } + } + + return $params; + } + + /** + * To id card, mobile phone number and other fields sensitive information encryption. + * + * @param string $string + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException + */ + protected function encryptSensitiveInformation(string $string) + { + $certificates = $this->app['config']->get('certificate'); + if (null === $certificates) { + throw new InvalidArgumentException('config certificate connot be empty.'); + } + + $encrypted = ''; + $publicKeyResource = openssl_get_publickey($certificates); + $f = openssl_public_encrypt($string, $encrypted, $publicKeyResource); + openssl_free_key($publicKeyResource); + if ($f) { + return base64_encode($encrypted); + } + + throw new EncryptException('Encryption of sensitive information failed'); + } + + /** + * get sensitive fields name. + * + * @return array + */ + protected function getSensitiveFieldsName() + { + return [ + 'id_card_name', + 'id_card_number', + 'account_name', + 'account_number', + 'contact', + 'contact_phone', + 'contact_email', + 'legal_person', + 'mobile_phone', + 'email', + ]; + } + + /** + * getSign. + * + * @param array $params + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + protected function getSign(array $params) + { + $params = array_filter($params); + + $key = $this->app->getKey(); + if ('HMAC-SHA256' === ($params['sign_type'] ?? 'MD5')) { + $encryptMethod = function ($str) use ($key) { + return hash_hmac('sha256', $str, $key); + }; + } else { + $encryptMethod = 'md5'; + } + + return Support\generate_sign($params, $key, $encryptMethod); + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/EncryptException.php b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/EncryptException.php new file mode 100755 index 0000000..dd874ae --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/EncryptException.php @@ -0,0 +1,23 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Kernel\Exceptions; + +use EasyWeChat\Kernel\Exceptions\Exception; + +/** + * Class EncryptException. + * + * @author liuml + */ +class EncryptException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidExtensionException.php b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidExtensionException.php new file mode 100755 index 0000000..41e21cf --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidExtensionException.php @@ -0,0 +1,23 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Kernel\Exceptions; + +use EasyWeChat\Kernel\Exceptions\Exception; + +/** + * Class InvalidExtensionException. + * + * @author liuml + */ +class InvalidExtensionException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidSignException.php b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidSignException.php new file mode 100755 index 0000000..d09d92b --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Kernel/Exceptions/InvalidSignException.php @@ -0,0 +1,23 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Kernel\Exceptions; + +use EasyWeChat\Kernel\Exceptions\Exception; + +/** + * Class InvalidSignException. + * + * @author liuml + */ +class InvalidSignException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Material/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Material/Client.php new file mode 100755 index 0000000..8ce2648 --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Material/Client.php @@ -0,0 +1,71 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Material; + +use EasyWeChat\MicroMerchant\Kernel\BaseClient; + +/** + * Class Client. + * + * @author liuml + * @DateTime 2019-05-30 14:19 + */ +class Client extends BaseClient +{ + /** + * update settlement card. + * + * @param array $params + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException + */ + public function setSettlementCard(array $params) + { + $params['sub_mch_id'] = $params['sub_mch_id'] ?? $this->app['config']->sub_mch_id; + $params = $this->processParams(array_merge($params, [ + 'version' => '1.0', + 'cert_sn' => '', + 'sign_type' => 'HMAC-SHA256', + 'nonce_str' => uniqid('micro'), + ])); + + return $this->safeRequest('applyment/micro/modifyarchives', $params); + } + + /** + * update contact info. + * + * @param array $params + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\EncryptException + */ + public function updateContact(array $params) + { + $params['sub_mch_id'] = $params['sub_mch_id'] ?? $this->app['config']->sub_mch_id; + $params = $this->processParams(array_merge($params, [ + 'version' => '1.0', + 'cert_sn' => '', + 'sign_type' => 'HMAC-SHA256', + 'nonce_str' => uniqid('micro'), + ])); + + return $this->safeRequest('applyment/micro/modifycontactinfo', $params); + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Material/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Material/ServiceProvider.php new file mode 100755 index 0000000..dec5af7 --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Material/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Material; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['material'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Media/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Media/Client.php new file mode 100755 index 0000000..fde755b --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Media/Client.php @@ -0,0 +1,49 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Media; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\MicroMerchant\Kernel\BaseClient; + +/** + * Class Client. + * + * @author liuml + * @DateTime 2019-06-10 14:50 + */ +class Client extends BaseClient +{ + /** + * Upload material. + * + * @param string $path + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\MicroMerchant\Kernel\Exceptions\InvalidSignException + */ + public function upload(string $path) + { + if (!file_exists($path) || !is_readable($path)) { + throw new InvalidArgumentException(sprintf("File does not exist, or the file is unreadable: '%s'", $path)); + } + + $form = [ + 'media_hash' => strtolower(md5_file($path)), + 'sign_type' => 'HMAC-SHA256', + ]; + + return $this->httpUpload('secapi/mch/uploadmedia', ['media' => $path], $form); + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Media/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Media/ServiceProvider.php new file mode 100755 index 0000000..9d46a84 --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Media/ServiceProvider.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * ServiceProvider.php. + * + * This file is part of the wechat. + * + * (c) overtrue + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Media; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['media'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/Client.php new file mode 100755 index 0000000..472ae2b --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/Client.php @@ -0,0 +1,131 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\MerchantConfig; + +use EasyWeChat\MicroMerchant\Kernel\BaseClient; + +/** + * Class Client. + * + * @author liuml + * @DateTime 2019-05-30 14:19 + */ +class Client extends BaseClient +{ + /** + * Service providers configure recommendation functions for small and micro businesses. + * + * @param string $subAppId + * @param string $subscribeAppId + * @param string $receiptAppId + * @param string $subMchId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function setFollowConfig(string $subAppId, string $subscribeAppId, string $receiptAppId = '', string $subMchId = '') + { + $params = [ + 'sub_appid' => $subAppId, + 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, + ]; + + if (!empty($subscribeAppid)) { + $params['subscribe_appid'] = $subscribeAppId; + } else { + $params['receipt_appid'] = $receiptAppId; + } + + return $this->safeRequest('secapi/mkt/addrecommendconf', array_merge($params, [ + 'sign_type' => 'HMAC-SHA256', + 'nonce_str' => uniqid('micro'), + ])); + } + + /** + * Configure the new payment directory. + * + * @param string $jsapiPath + * @param string $appId + * @param string $subMchId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function addPath(string $jsapiPath, string $appId = '', string $subMchId = '') + { + return $this->addConfig([ + 'appid' => $appId ?: $this->app['config']->appid, + 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, + 'jsapi_path' => $jsapiPath, + ]); + } + + /** + * bind appid. + * + * @param string $subAppId + * @param string $appId + * @param string $subMchId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function bindAppId(string $subAppId, string $appId = '', string $subMchId = '') + { + return $this->addConfig([ + 'appid' => $appId ?: $this->app['config']->appid, + 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, + 'sub_appid' => $subAppId, + ]); + } + + /** + * add sub dev config. + * + * @param array $params + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + private function addConfig(array $params) + { + return $this->safeRequest('secapi/mch/addsubdevconfig', $params); + } + + /** + * query Sub Dev Config. + * + * @param string $subMchId + * @param string $appId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getConfig(string $subMchId = '', string $appId = '') + { + return $this->safeRequest('secapi/mch/querysubdevconfig', [ + 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, + 'appid' => $appId ?: $this->app['config']->appid, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/ServiceProvider.php new file mode 100755 index 0000000..5b78710 --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/MerchantConfig/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\MerchantConfig; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['merchantConfig'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/Client.php b/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/Client.php new file mode 100755 index 0000000..05541fa --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/Client.php @@ -0,0 +1,65 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Withdraw; + +use EasyWeChat\MicroMerchant\Kernel\BaseClient; + +/** + * Class Client. + * + * @author liuml + * @DateTime 2019-05-30 14:19 + */ +class Client extends BaseClient +{ + /** + * Query withdrawal status. + * + * @param string $date + * @param string $subMchId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function queryWithdrawalStatus($date, $subMchId = '') + { + return $this->safeRequest('fund/queryautowithdrawbydate', [ + 'date' => $date, + 'sign_type' => 'HMAC-SHA256', + 'nonce_str' => uniqid('micro'), + 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, + ]); + } + + /** + * Re-initiation of withdrawal. + * + * @param string $date + * @param string $subMchId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function requestWithdraw($date, $subMchId = '') + { + return $this->safeRequest('fund/reautowithdrawbydate', [ + 'date' => $date, + 'sign_type' => 'HMAC-SHA256', + 'nonce_str' => uniqid('micro'), + 'sub_mch_id' => $subMchId ?: $this->app['config']->sub_mch_id, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/ServiceProvider.php b/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/ServiceProvider.php new file mode 100755 index 0000000..b9c0141 --- /dev/null +++ b/vendor/overtrue/wechat/src/MicroMerchant/Withdraw/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MicroMerchant\Withdraw; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['withdraw'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/Client.php b/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/Client.php new file mode 100755 index 0000000..e003f8b --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/Client.php @@ -0,0 +1,79 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\ActivityMessage; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; + +class Client extends BaseClient +{ + /** + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function createActivityId() + { + return $this->httpGet('cgi-bin/message/wxopen/activityid/create'); + } + + /** + * @param string $activityId + * @param int $state + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws InvalidArgumentException + */ + public function updateMessage(string $activityId, int $state = 0, array $params = []) + { + if (!in_array($state, [0, 1], true)) { + throw new InvalidArgumentException('"state" should be "0" or "1".'); + } + + $params = $this->formatParameters($params); + + $params = [ + 'activity_id' => $activityId, + 'target_state' => $state, + 'template_info' => ['parameter_list' => $params], + ]; + + return $this->httpPostJson('cgi-bin/message/wxopen/updatablemsg/send', $params); + } + + /** + * @param array $params + * + * @return array + */ + protected function formatParameters(array $params) + { + $formatted = []; + + foreach ($params as $name => $value) { + if (!in_array($name, ['member_count', 'room_limit', 'path', 'version_type'], true)) { + continue; + } + + if ('version_type' === $name && !in_array($value, ['develop', 'trial', 'release'], true)) { + throw new InvalidArgumentException('Invalid value of attribute "version_type".'); + } + + $formatted[] = [ + 'name' => $name, + 'value' => strval($value), + ]; + } + + return $formatted; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/ServiceProvider.php new file mode 100755 index 0000000..fa7d3cf --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/ActivityMessage/ServiceProvider.php @@ -0,0 +1,28 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\ActivityMessage; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['activity_message'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/AppCode/Client.php b/vendor/overtrue/wechat/src/MiniProgram/AppCode/Client.php new file mode 100755 index 0000000..920191d --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/AppCode/Client.php @@ -0,0 +1,89 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\AppCode; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Http\StreamResponse; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get AppCode. + * + * @param string $path + * @param array $optional + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function get(string $path, array $optional = []) + { + $params = array_merge([ + 'path' => $path, + ], $optional); + + return $this->getStream('wxa/getwxacode', $params); + } + + /** + * Get AppCode unlimit. + * + * @param string $scene + * @param array $optional + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function getUnlimit(string $scene, array $optional = []) + { + $params = array_merge([ + 'scene' => $scene, + ], $optional); + + return $this->getStream('wxa/getwxacodeunlimit', $params); + } + + /** + * Create QrCode. + * + * @param string $path + * @param int|null $width + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function getQrCode(string $path, int $width = null) + { + return $this->getStream('cgi-bin/wxaapp/createwxaqrcode', compact('path', 'width')); + } + + /** + * Get stream. + * + * @param string $endpoint + * @param array $params + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + protected function getStream(string $endpoint, array $params) + { + $response = $this->requestRaw($endpoint, 'POST', ['json' => $params]); + + if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { + return StreamResponse::buildFromPsrResponse($response); + } + + return $this->castResponseToType($response, $this->app['config']->get('response_type')); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/AppCode/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/AppCode/ServiceProvider.php new file mode 100755 index 0000000..fefdc22 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/AppCode/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\AppCode; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['app_code'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Application.php b/vendor/overtrue/wechat/src/MiniProgram/Application.php new file mode 100755 index 0000000..ba86b0e --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Application.php @@ -0,0 +1,81 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram; + +use EasyWeChat\BasicService; +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Class Application. + * + * @author mingyoung + * + * @property \EasyWeChat\MiniProgram\Auth\AccessToken $access_token + * @property \EasyWeChat\MiniProgram\DataCube\Client $data_cube + * @property \EasyWeChat\MiniProgram\AppCode\Client $app_code + * @property \EasyWeChat\MiniProgram\Auth\Client $auth + * @property \EasyWeChat\OfficialAccount\Server\Guard $server + * @property \EasyWeChat\MiniProgram\Encryptor $encryptor + * @property \EasyWeChat\MiniProgram\TemplateMessage\Client $template_message + * @property \EasyWeChat\OfficialAccount\CustomerService\Client $customer_service + * @property \EasyWeChat\MiniProgram\Plugin\Client $plugin + * @property \EasyWeChat\MiniProgram\Plugin\DevClient $plugin_dev + * @property \EasyWeChat\MiniProgram\UniformMessage\Client $uniform_message + * @property \EasyWeChat\MiniProgram\ActivityMessage\Client $activity_message + * @property \EasyWeChat\MiniProgram\Express\Client $logistics + * @property \EasyWeChat\MiniProgram\NearbyPoi\Client $nearby_poi + * @property \EasyWeChat\MiniProgram\OCR\Client $ocr + * @property \EasyWeChat\MiniProgram\Soter\Client $soter + * @property \EasyWeChat\BasicService\Media\Client $media + * @property \EasyWeChat\BasicService\ContentSecurity\Client $content_security + * @property \EasyWeChat\MiniProgram\Mall\ForwardsMall $mall + */ +class Application extends ServiceContainer +{ + /** + * @var array + */ + protected $providers = [ + Auth\ServiceProvider::class, + DataCube\ServiceProvider::class, + AppCode\ServiceProvider::class, + Server\ServiceProvider::class, + TemplateMessage\ServiceProvider::class, + CustomerService\ServiceProvider::class, + UniformMessage\ServiceProvider::class, + ActivityMessage\ServiceProvider::class, + OpenData\ServiceProvider::class, + Plugin\ServiceProvider::class, + Base\ServiceProvider::class, + Express\ServiceProvider::class, + NearbyPoi\ServiceProvider::class, + OCR\ServiceProvider::class, + Soter\ServiceProvider::class, + Mall\ServiceProvider::class, + // Base services + BasicService\Media\ServiceProvider::class, + BasicService\ContentSecurity\ServiceProvider::class, + ]; + + /** + * Handle dynamic calls. + * + * @param string $method + * @param array $args + * + * @return mixed + */ + public function __call($method, $args) + { + return $this->base->$method(...$args); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Auth/AccessToken.php b/vendor/overtrue/wechat/src/MiniProgram/Auth/AccessToken.php new file mode 100755 index 0000000..8147d25 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Auth/AccessToken.php @@ -0,0 +1,39 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Auth; + +use EasyWeChat\Kernel\AccessToken as BaseAccessToken; + +/** + * Class AccessToken. + * + * @author mingyoung + */ +class AccessToken extends BaseAccessToken +{ + /** + * @var string + */ + protected $endpointToGetToken = 'https://api.weixin.qq.com/cgi-bin/token'; + + /** + * {@inheritdoc} + */ + protected function getCredentials(): array + { + return [ + 'grant_type' => 'client_credential', + 'appid' => $this->app['config']['app_id'], + 'secret' => $this->app['config']['secret'], + ]; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Auth/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Auth/Client.php new file mode 100755 index 0000000..90d2c88 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Auth/Client.php @@ -0,0 +1,43 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Auth; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Auth. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get session info by code. + * + * @param string $code + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function session(string $code) + { + $params = [ + 'appid' => $this->app['config']['app_id'], + 'secret' => $this->app['config']['secret'], + 'js_code' => $code, + 'grant_type' => 'authorization_code', + ]; + + return $this->httpGet('sns/jscode2session', $params); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Auth/ServiceProvider.php new file mode 100755 index 0000000..fcb687b --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Auth/ServiceProvider.php @@ -0,0 +1,32 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Auth; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + !isset($app['access_token']) && $app['access_token'] = function ($app) { + return new AccessToken($app); + }; + + !isset($app['auth']) && $app['auth'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Base/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Base/Client.php new file mode 100755 index 0000000..6d8876d --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Base/Client.php @@ -0,0 +1,32 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Base; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get paid unionid. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function getPaidUnionid($openid, $options = []) + { + return $this->httpGet('wxa/getpaidunionid', compact('openid') + $options); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Base/ServiceProvider.php new file mode 100755 index 0000000..d9aa41b --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Base/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Base; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['base'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/CustomerService/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/CustomerService/ServiceProvider.php new file mode 100755 index 0000000..cfd3039 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/CustomerService/ServiceProvider.php @@ -0,0 +1,34 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\CustomerService; + +use EasyWeChat\OfficialAccount\CustomerService\Client; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['customer_service'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/DataCube/Client.php b/vendor/overtrue/wechat/src/MiniProgram/DataCube/Client.php new file mode 100755 index 0000000..2b7d1ed --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/DataCube/Client.php @@ -0,0 +1,171 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\DataCube; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get summary trend. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function summaryTrend(string $from, string $to) + { + return $this->query('datacube/getweanalysisappiddailysummarytrend', $from, $to); + } + + /** + * Get daily visit trend. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function dailyVisitTrend(string $from, string $to) + { + return $this->query('datacube/getweanalysisappiddailyvisittrend', $from, $to); + } + + /** + * Get weekly visit trend. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function weeklyVisitTrend(string $from, string $to) + { + return $this->query('datacube/getweanalysisappidweeklyvisittrend', $from, $to); + } + + /** + * Get monthly visit trend. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function monthlyVisitTrend(string $from, string $to) + { + return $this->query('datacube/getweanalysisappidmonthlyvisittrend', $from, $to); + } + + /** + * Get visit distribution. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function visitDistribution(string $from, string $to) + { + return $this->query('datacube/getweanalysisappidvisitdistribution', $from, $to); + } + + /** + * Get daily retain info. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function dailyRetainInfo(string $from, string $to) + { + return $this->query('datacube/getweanalysisappiddailyretaininfo', $from, $to); + } + + /** + * Get weekly retain info. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function weeklyRetainInfo(string $from, string $to) + { + return $this->query('datacube/getweanalysisappidweeklyretaininfo', $from, $to); + } + + /** + * Get monthly retain info. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function monthlyRetainInfo(string $from, string $to) + { + return $this->query('datacube/getweanalysisappidmonthlyretaininfo', $from, $to); + } + + /** + * Get visit page. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function visitPage(string $from, string $to) + { + return $this->query('datacube/getweanalysisappidvisitpage', $from, $to); + } + + /** + * Get user portrait. + * + * @param string $from + * @param string $to + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function userPortrait(string $from, string $to) + { + return $this->query('datacube/getweanalysisappiduserportrait', $from, $to); + } + + /** + * Unify query. + * + * @param string $api + * @param string $from + * @param string $to + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + protected function query(string $api, string $from, string $to) + { + $params = [ + 'begin_date' => $from, + 'end_date' => $to, + ]; + + return $this->httpPostJson($api, $params); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/DataCube/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/DataCube/ServiceProvider.php new file mode 100755 index 0000000..258d7c4 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/DataCube/ServiceProvider.php @@ -0,0 +1,28 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\DataCube; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['data_cube'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Encryptor.php b/vendor/overtrue/wechat/src/MiniProgram/Encryptor.php new file mode 100755 index 0000000..6254068 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Encryptor.php @@ -0,0 +1,48 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram; + +use EasyWeChat\Kernel\Encryptor as BaseEncryptor; +use EasyWeChat\Kernel\Exceptions\DecryptException; +use EasyWeChat\Kernel\Support\AES; + +/** + * Class Encryptor. + * + * @author mingyoung + */ +class Encryptor extends BaseEncryptor +{ + /** + * Decrypt data. + * + * @param string $sessionKey + * @param string $iv + * @param string $encrypted + * + * @return array + */ + public function decryptData(string $sessionKey, string $iv, string $encrypted): array + { + $decrypted = AES::decrypt( + base64_decode($encrypted, false), base64_decode($sessionKey, false), base64_decode($iv, false) + ); + + $decrypted = json_decode($this->pkcs7Unpad($decrypted), true); + + if (!$decrypted) { + throw new DecryptException('The given payload is invalid.'); + } + + return $decrypted; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Express/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Express/Client.php new file mode 100755 index 0000000..b197d88 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Express/Client.php @@ -0,0 +1,126 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Express; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author kehuanhuan <1152018701@qq.com> + */ +class Client extends BaseClient +{ + /** + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function listProviders() + { + return $this->httpGet('cgi-bin/express/business/delivery/getall'); + } + + /** + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function createWaybill(array $params = []) + { + return $this->httpPostJson('cgi-bin/express/business/order/add', $params); + } + + /** + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function deleteWaybill(array $params = []) + { + return $this->httpPostJson('cgi-bin/express/business/order/cancel', $params); + } + + /** + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getWaybill(array $params = []) + { + return $this->httpPostJson('cgi-bin/express/business/order/get', $params); + } + + /** + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getWaybillTrack(array $params = []) + { + return $this->httpPostJson('cgi-bin/express/business/path/get', $params); + } + + /** + * @param string $deliveryId + * @param string $bizId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getBalance(string $deliveryId, string $bizId) + { + return $this->httpPostJson('cgi-bin/express/business/quota/get', [ + 'delivery_id' => $deliveryId, + 'biz_id' => $bizId, + ]); + } + + /** + * @param string $openid + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function bindPrinter(string $openid) + { + return $this->httpPostJson('cgi-bin/express/business/printer/update', [ + 'update_type' => 'bind', + 'openid' => $openid, + ]); + } + + /** + * @param string $openid + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function unbindPrinter(string $openid) + { + return $this->httpPostJson('cgi-bin/express/business/printer/update', [ + 'update_type' => 'unbind', + 'openid' => $openid, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Express/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Express/ServiceProvider.php new file mode 100755 index 0000000..4794094 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Express/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Express; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author kehuanhuan <1152018701@qq.com> + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['express'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/CartClient.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/CartClient.php new file mode 100755 index 0000000..000b133 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Mall/CartClient.php @@ -0,0 +1,76 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Mall; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class CartClient extends BaseClient +{ + /** + * 导入收藏. + * + * @param array $params + * @param bool $isTest + * + * @return mixed + */ + public function add($params, $isTest = false) + { + return $this->httpPostJson('mall/addshoppinglist', $params, ['is_test' => (int) $isTest]); + } + + /** + * 查询用户收藏信息. + * + * @param array $params + * + * @return mixed + */ + public function query($params) + { + return $this->httpPostJson('mall/queryshoppinglist', $params, ['type' => 'batchquery']); + } + + /** + * 查询用户收藏信息. + * + * @param array $params + * + * @return mixed + */ + public function queryByPage($params) + { + return $this->httpPostJson('mall/queryshoppinglist', $params, ['type' => 'getbypage']); + } + + /** + * 删除收藏. + * + * @param string $openid + * @param array $products + * + * @return mixed + */ + public function delete($openid, array $products = []) + { + if (empty($products)) { + return $this->httpPostJson('mall/deletebizallshoppinglist', ['user_open_id' => $openid]); + } + + return $this->httpPostJson('mall/deleteshoppinglist', ['user_open_id' => $openid, 'sku_product_list' => $products]); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/ForwardsMall.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/ForwardsMall.php new file mode 100755 index 0000000..f727b17 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Mall/ForwardsMall.php @@ -0,0 +1,48 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Mall; + +/** + * Class Application. + * + * @author mingyoung + * + * @property \EasyWeChat\MiniProgram\Mall\OrderClient $order + * @property \EasyWeChat\MiniProgram\Mall\CartClient $cart + * @property \EasyWeChat\MiniProgram\Mall\ProductClient $product + * @property \EasyWeChat\MiniProgram\Mall\MediaClient $media + */ +class ForwardsMall +{ + /** + * @var \EasyWeChat\Kernel\ServiceContainer + */ + protected $app; + + /** + * @param \EasyWeChat\Kernel\ServiceContainer $app + */ + public function __construct($app) + { + $this->app = $app; + } + + /** + * @param string $property + * + * @return mixed + */ + public function __get($property) + { + return $this->app["mall.{$property}"]; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/MediaClient.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/MediaClient.php new file mode 100755 index 0000000..1bfebfa --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Mall/MediaClient.php @@ -0,0 +1,34 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Mall; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class MediaClient extends BaseClient +{ + /** + * 更新或导入媒体信息. + * + * @param array $params + * + * @return mixed + */ + public function import($params) + { + return $this->httpPostJson('mall/importmedia', $params); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/OrderClient.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/OrderClient.php new file mode 100755 index 0000000..b38dbe7 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Mall/OrderClient.php @@ -0,0 +1,64 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Mall; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class OrderClient extends BaseClient +{ + /** + * 导入订单. + * + * @param array $params + * @param bool $isHistory + */ + public function add($params, $isHistory = false) + { + return $this->httpPostJson('mall/importorder', $params, ['action' => 'add-order', 'is_history' => (int) $isHistory]); + } + + /** + * 导入订单. + * + * @param array $params + * @param bool $isHistory + * + * @return mixed + */ + public function update($params, $isHistory = false) + { + return $this->httpPostJson('mall/importorder', $params, ['action' => 'update-order', 'is_history' => (int) $isHistory]); + } + + /** + * 删除订单. + * + * @param string $openid + * @param string $orderId + * + * @return mixed + */ + public function delete($openid, $orderId) + { + $params = [ + 'user_open_id' => $openid, + 'order_id' => $orderId, + ]; + + return $this->httpPostJson('mall/deleteorder', $params); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/ProductClient.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/ProductClient.php new file mode 100755 index 0000000..764fce9 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Mall/ProductClient.php @@ -0,0 +1,59 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Mall; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class ProductClient extends BaseClient +{ + /** + * 更新或导入物品信息. + * + * @param array $params + * @param bool $isTest + * + * @return mixed + */ + public function import($params, $isTest = false) + { + return $this->httpPostJson('mall/importproduct', $params, ['is_test' => (int) $isTest]); + } + + /** + * 查询物品信息. + * + * @param array $params + * + * @return mixed + */ + public function query($params) + { + return $this->httpPostJson('mall/queryproduct', $params, ['type' => 'batchquery']); + } + + /** + * 小程序的物品是否可被搜索. + * + * @param bool $value + * + * @return mixed + */ + public function setSearchable($value) + { + return $this->httpPostJson('mall/brandmanage', ['can_be_search' => $value], ['action' => 'set_biz_can_be_search']); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Mall/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Mall/ServiceProvider.php new file mode 100755 index 0000000..964395b --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Mall/ServiceProvider.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Mall; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['mall'] = function ($app) { + return new ForwardsMall($app); + }; + + $app['mall.order'] = function ($app) { + return new OrderClient($app); + }; + + $app['mall.cart'] = function ($app) { + return new CartClient($app); + }; + + $app['mall.product'] = function ($app) { + return new ProductClient($app); + }; + + $app['mall.media'] = function ($app) { + return new MediaClient($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/Client.php b/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/Client.php new file mode 100755 index 0000000..71e8b32 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/Client.php @@ -0,0 +1,112 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\NearbyPoi; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; + +/** + * Class Client. + * + * @author joyeekk + */ +class Client extends BaseClient +{ + /** + * Add nearby poi. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function add(array $params) + { + $params = array_merge([ + 'is_comm_nearby' => '1', + 'poi_id' => '', + ], $params); + + return $this->httpPostJson('wxa/addnearbypoi', $params); + } + + /** + * Update nearby poi. + * + * @param string $poiId + * @param array $params + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function update(string $poiId, array $params) + { + $params = array_merge([ + 'is_comm_nearby' => '1', + 'poi_id' => $poiId, + ], $params); + + return $this->httpPostJson('wxa/addnearbypoi', $params); + } + + /** + * Delete nearby poi. + * + * @param string $poiId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function delete(string $poiId) + { + return $this->httpPostJson('wxa/delnearbypoi', [ + 'poi_id' => $poiId, + ]); + } + + /** + * Get nearby poi list. + * + * @param int $page + * @param int $pageRows + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function list(int $page, int $pageRows) + { + return $this->httpGet('wxa/getnearbypoilist', [ + 'page' => $page, + 'page_rows' => $pageRows, + ]); + } + + /** + * Set nearby poi show status. + * + * @param string $poiId + * @param int $status + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function setVisibility(string $poiId, int $status) + { + if (!in_array($status, [0, 1], true)) { + throw new InvalidArgumentException('status should be 0 or 1.'); + } + + return $this->httpPostJson('wxa/setnearbypoishowstatus', [ + 'poi_id' => $poiId, + 'status' => $status, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/ServiceProvider.php new file mode 100755 index 0000000..cb15bb3 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/NearbyPoi/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\NearbyPoi; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author joyeekk + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['nearby_poi'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/OCR/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/OCR/ServiceProvider.php new file mode 100755 index 0000000..80e0001 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/OCR/ServiceProvider.php @@ -0,0 +1,34 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\OCR; + +use EasyWeChat\OfficialAccount\OCR\Client; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author joyeekk + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['ocr'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/OpenData/Client.php b/vendor/overtrue/wechat/src/MiniProgram/OpenData/Client.php new file mode 100755 index 0000000..51f1537 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/OpenData/Client.php @@ -0,0 +1,94 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\OpenData; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author tianyong90 <412039588@qq.com> + */ +class Client extends BaseClient +{ + /** + * @var string + */ + protected $baseUri = 'https://api.weixin.qq.com/wxa/'; + + /** + * removeUserStorage. + * + * @param string $openid + * @param string $sessionKey + * @param array $key + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function removeUserStorage(string $openid, string $sessionKey, array $key) + { + $data = ['key' => $key]; + $query = [ + 'openid' => $openid, + 'sig_method' => 'hmac_sha256', + 'signature' => hash_hmac('sha256', json_encode($data), $sessionKey), + ]; + + return $this->httpPostJson('remove_user_storage', $data, $query); + } + + /** + * setUserStorage. + * + * @param string $openid + * @param string $sessionKey + * @param array $kvList + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function setUserStorage(string $openid, string $sessionKey, array $kvList) + { + $kvList = $this->formatKVLists($kvList); + + $data = ['kv_list' => $kvList]; + $query = [ + 'openid' => $openid, + 'sig_method' => 'hmac_sha256', + 'signature' => hash_hmac('sha256', json_encode($data), $sessionKey), + ]; + + return $this->httpPostJson('set_user_storage', $data, $query); + } + + /** + * @param array $params + * + * @return array + */ + protected function formatKVLists(array $params) + { + $formatted = []; + + foreach ($params as $name => $value) { + $formatted[] = [ + 'key' => $name, + 'value' => strval($value), + ]; + } + + return $formatted; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/OpenData/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/OpenData/ServiceProvider.php new file mode 100755 index 0000000..3ea1287 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/OpenData/ServiceProvider.php @@ -0,0 +1,28 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\OpenData; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['open_data'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Plugin/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Plugin/Client.php new file mode 100755 index 0000000..f8d2578 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Plugin/Client.php @@ -0,0 +1,64 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Plugin; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * @param string $appId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function apply($appId) + { + return $this->httpPostJson('wxa/plugin', [ + 'action' => 'apply', + 'plugin_appid' => $appId, + ]); + } + + /** + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list() + { + return $this->httpPostJson('wxa/plugin', [ + 'action' => 'list', + ]); + } + + /** + * @param string $appId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function unbind($appId) + { + return $this->httpPostJson('wxa/plugin', [ + 'action' => 'unbind', + 'plugin_appid' => $appId, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Plugin/DevClient.php b/vendor/overtrue/wechat/src/MiniProgram/Plugin/DevClient.php new file mode 100755 index 0000000..0d80e07 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Plugin/DevClient.php @@ -0,0 +1,89 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Plugin; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class DevClient. + * + * @author her-cat + */ +class DevClient extends BaseClient +{ + /** + * Get users. + * + * @param int $page + * @param int $size + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getUsers(int $page = 1, int $size = 10) + { + return $this->httpPostJson('wxa/devplugin', [ + 'action' => 'dev_apply_list', + 'page' => $page, + 'num' => $size, + ]); + } + + /** + * Agree to use plugin. + * + * @param string $appId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function agree(string $appId) + { + return $this->httpPostJson('wxa/devplugin', [ + 'action' => 'dev_agree', + 'appid' => $appId, + ]); + } + + /** + * Refuse to use plugin. + * + * @param string $reason + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function refuse(string $reason) + { + return $this->httpPostJson('wxa/devplugin', [ + 'action' => 'dev_refuse', + 'reason' => $reason, + ]); + } + + /** + * Delete rejected applications. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function delete() + { + return $this->httpPostJson('wxa/devplugin', [ + 'action' => 'dev_delete', + ]); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Plugin/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Plugin/ServiceProvider.php new file mode 100755 index 0000000..097c77e --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Plugin/ServiceProvider.php @@ -0,0 +1,42 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Plugin; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * Registers services on the given container. + * + * This method should only be used to configure services and parameters. + * It should not get services. + * + * @param \Pimple\Container $app + */ + public function register(Container $app) + { + $app['plugin'] = function ($app) { + return new Client($app); + }; + + $app['plugin_dev'] = function ($app) { + return new DevClient($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Server/ServiceProvider.php new file mode 100755 index 0000000..0586bb9 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Server/ServiceProvider.php @@ -0,0 +1,42 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Server; + +use EasyWeChat\MiniProgram\Encryptor; +use EasyWeChat\OfficialAccount\Server\Guard; +use EasyWeChat\OfficialAccount\Server\Handlers\EchoStrHandler; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + !isset($app['encryptor']) && $app['encryptor'] = function ($app) { + return new Encryptor( + $app['config']['app_id'], + $app['config']['token'], + $app['config']['aes_key'] + ); + }; + + !isset($app['server']) && $app['server'] = function ($app) { + $guard = new Guard($app); + $guard->push(new EchoStrHandler($app)); + + return $guard; + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Soter/Client.php b/vendor/overtrue/wechat/src/MiniProgram/Soter/Client.php new file mode 100755 index 0000000..030efec --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Soter/Client.php @@ -0,0 +1,40 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Soter; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author her-cat + */ +class Client extends BaseClient +{ + /** + * @param string $openid + * @param string $json + * @param string $signature + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function verifySignature(string $openid, string $json, string $signature) + { + return $this->httpPostJson('cgi-bin/soter/verify_signature', [ + 'openid' => $openid, + 'json_string' => $json, + 'json_signature' => $signature, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/Soter/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/Soter/ServiceProvider.php new file mode 100755 index 0000000..c8520db --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/Soter/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\Soter; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author her-cat + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc} + */ + public function register(Container $app) + { + $app['soter'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/Client.php b/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/Client.php new file mode 100755 index 0000000..242fc5e --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/Client.php @@ -0,0 +1,99 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\TemplateMessage; + +use EasyWeChat\OfficialAccount\TemplateMessage\Client as BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + const API_SEND = 'cgi-bin/message/wxopen/template/send'; + + /** + * {@inheritdoc}. + */ + protected $message = [ + 'touser' => '', + 'template_id' => '', + 'page' => '', + 'form_id' => '', + 'data' => [], + 'emphasis_keyword' => '', + ]; + + /** + * {@inheritdoc}. + */ + protected $required = ['touser', 'template_id', 'form_id']; + + /** + * @param int $offset + * @param int $count + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function list(int $offset, int $count) + { + return $this->httpPostJson('cgi-bin/wxopen/template/library/list', compact('offset', 'count')); + } + + /** + * @param string $id + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function get(string $id) + { + return $this->httpPostJson('cgi-bin/wxopen/template/library/get', compact('id')); + } + + /** + * @param string $id + * @param array $keyword + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function add(string $id, array $keyword) + { + return $this->httpPostJson('cgi-bin/wxopen/template/add', [ + 'id' => $id, + 'keyword_id_list' => $keyword, + ]); + } + + /** + * @param string $templateId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function delete(string $templateId) + { + return $this->httpPostJson('cgi-bin/wxopen/template/del', [ + 'template_id' => $templateId, + ]); + } + + /** + * @param int $offset + * @param int $count + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function getTemplates(int $offset, int $count) + { + return $this->httpPostJson('cgi-bin/wxopen/template/list', compact('offset', 'count')); + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/ServiceProvider.php new file mode 100755 index 0000000..776a15e --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/TemplateMessage/ServiceProvider.php @@ -0,0 +1,28 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\TemplateMessage; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['template_message'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/Client.php b/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/Client.php new file mode 100755 index 0000000..51abeea --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/Client.php @@ -0,0 +1,142 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\UniformMessage; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\OfficialAccount\TemplateMessage\Client as BaseClient; + +class Client extends BaseClient +{ + const API_SEND = 'cgi-bin/message/wxopen/template/uniform_send'; + + /** + * {@inheritdoc}. + * + * @var array + */ + protected $message = [ + 'touser' => '', + ]; + + /** + * Weapp Attributes. + * + * @var array + */ + protected $weappMessage = [ + 'template_id' => '', + 'page' => '', + 'form_id' => '', + 'data' => [], + 'emphasis_keyword' => '', + ]; + + /** + * Official account attributes. + * + * @var array + */ + protected $mpMessage = [ + 'appid' => '', + 'template_id' => '', + 'url' => '', + 'miniprogram' => [], + 'data' => [], + ]; + + /** + * Required attributes. + * + * @var array + */ + protected $required = ['touser', 'template_id', 'form_id', 'miniprogram', 'appid']; + + /** + * @param array $data + * + * @return array + * + * @throws InvalidArgumentException + */ + protected function formatMessage(array $data = []) + { + $params = array_merge($this->message, $data); + + if (empty($params['touser'])) { + throw new InvalidArgumentException(sprintf('Attribute "touser" can not be empty!')); + } + + if (!empty($params['weapp_template_msg'])) { + $params['weapp_template_msg'] = $this->formatWeappMessage($params['weapp_template_msg']); + } + + if (!empty($params['mp_template_msg'])) { + $params['mp_template_msg'] = $this->formatMpMessage($params['mp_template_msg']); + } + + return $params; + } + + /** + * @param array $data + * + * @return array + */ + protected function formatWeappMessage(array $data = []) + { + $params = $this->baseFormat($data, $this->weappMessage); + + $params['data'] = $this->formatData($params['data'] ?? []); + + return $params; + } + + /** + * @param array $data + * + * @return array + */ + protected function formatMpMessage(array $data = []) + { + $params = $this->baseFormat($data, $this->mpMessage); + + if (empty($params['miniprogram']['appid'])) { + $params['miniprogram']['appid'] = $this->app['config']['app_id']; + } + + $params['data'] = $this->formatData($params['data'] ?? []); + + return $params; + } + + /** + * @param array $data + * @param array $default + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + protected function baseFormat($data = [], $default = []) + { + $params = array_merge($default, $data); + foreach ($params as $key => $value) { + if (in_array($key, $this->required, true) && empty($value) && empty($default[$key])) { + throw new InvalidArgumentException(sprintf('Attribute "%s" can not be empty!', $key)); + } + + $params[$key] = empty($value) ? $default[$key] : $value; + } + + return $params; + } +} diff --git a/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/ServiceProvider.php new file mode 100755 index 0000000..0e86db3 --- /dev/null +++ b/vendor/overtrue/wechat/src/MiniProgram/UniformMessage/ServiceProvider.php @@ -0,0 +1,28 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\MiniProgram\UniformMessage; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['uniform_message'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Application.php b/vendor/overtrue/wechat/src/OfficialAccount/Application.php new file mode 100755 index 0000000..8f43d84 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Application.php @@ -0,0 +1,83 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount; + +use EasyWeChat\BasicService; +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Class Application. + * + * @author overtrue + * + * @property \EasyWeChat\BasicService\Media\Client $media + * @property \EasyWeChat\BasicService\Url\Client $url + * @property \EasyWeChat\BasicService\QrCode\Client $qrcode + * @property \EasyWeChat\BasicService\Jssdk\Client $jssdk + * @property \EasyWeChat\OfficialAccount\Auth\AccessToken $access_token + * @property \EasyWeChat\OfficialAccount\Server\Guard $server + * @property \EasyWeChat\OfficialAccount\User\UserClient $user + * @property \EasyWeChat\OfficialAccount\User\TagClient $user_tag + * @property \EasyWeChat\OfficialAccount\Menu\Client $menu + * @property \EasyWeChat\OfficialAccount\TemplateMessage\Client $template_message + * @property \EasyWeChat\OfficialAccount\Material\Client $material + * @property \EasyWeChat\OfficialAccount\CustomerService\Client $customer_service + * @property \EasyWeChat\OfficialAccount\CustomerService\SessionClient $customer_service_session + * @property \EasyWeChat\OfficialAccount\Semantic\Client $semantic + * @property \EasyWeChat\OfficialAccount\DataCube\Client $data_cube + * @property \EasyWeChat\OfficialAccount\AutoReply\Client $auto_reply + * @property \EasyWeChat\OfficialAccount\Broadcasting\Client $broadcasting + * @property \EasyWeChat\OfficialAccount\Card\Card $card + * @property \EasyWeChat\OfficialAccount\Device\Client $device + * @property \EasyWeChat\OfficialAccount\ShakeAround\ShakeAround $shake_around + * @property \EasyWeChat\OfficialAccount\POI\Client $poi + * @property \EasyWeChat\OfficialAccount\Store\Client $store + * @property \EasyWeChat\OfficialAccount\Base\Client $base + * @property \EasyWeChat\OfficialAccount\Comment\Client $comment + * @property \EasyWeChat\OfficialAccount\OCR\Client $ocr + * @property \EasyWeChat\OfficialAccount\Goods\Client $goods + * @property \Overtrue\Socialite\Providers\WeChatProvider $oauth + */ +class Application extends ServiceContainer +{ + /** + * @var array + */ + protected $providers = [ + Auth\ServiceProvider::class, + Server\ServiceProvider::class, + User\ServiceProvider::class, + OAuth\ServiceProvider::class, + Menu\ServiceProvider::class, + TemplateMessage\ServiceProvider::class, + Material\ServiceProvider::class, + CustomerService\ServiceProvider::class, + Semantic\ServiceProvider::class, + DataCube\ServiceProvider::class, + POI\ServiceProvider::class, + AutoReply\ServiceProvider::class, + Broadcasting\ServiceProvider::class, + Card\ServiceProvider::class, + Device\ServiceProvider::class, + ShakeAround\ServiceProvider::class, + Store\ServiceProvider::class, + Comment\ServiceProvider::class, + Base\ServiceProvider::class, + OCR\ServiceProvider::class, + Goods\ServiceProvider::class, + // Base services + BasicService\QrCode\ServiceProvider::class, + BasicService\Media\ServiceProvider::class, + BasicService\Url\ServiceProvider::class, + BasicService\Jssdk\ServiceProvider::class, + ]; +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OfficialAccount/Auth/AccessToken.php new file mode 100755 index 0000000..aca1aca --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Auth/AccessToken.php @@ -0,0 +1,39 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Auth; + +use EasyWeChat\Kernel\AccessToken as BaseAccessToken; + +/** + * Class AuthorizerAccessToken. + * + * @author overtrue + */ +class AccessToken extends BaseAccessToken +{ + /** + * @var string + */ + protected $endpointToGetToken = 'https://api.weixin.qq.com/cgi-bin/token'; + + /** + * @return array + */ + protected function getCredentials(): array + { + return [ + 'grant_type' => 'client_credential', + 'appid' => $this->app['config']['app_id'], + 'secret' => $this->app['config']['secret'], + ]; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Auth/ServiceProvider.php new file mode 100755 index 0000000..e748730 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Auth/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Auth; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + !isset($app['access_token']) && $app['access_token'] = function ($app) { + return new AccessToken($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/Client.php new file mode 100755 index 0000000..ccc9d01 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/Client.php @@ -0,0 +1,32 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\AutoReply; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * Get current auto reply settings. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function current() + { + return $this->httpGet('cgi-bin/get_current_autoreply_info'); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/ServiceProvider.php new file mode 100755 index 0000000..4377550 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/AutoReply/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\AutoReply; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['auto_reply'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Base/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Base/Client.php new file mode 100755 index 0000000..e8ef6c4 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Base/Client.php @@ -0,0 +1,46 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Base; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Clear quota. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function clearQuota() + { + $params = [ + 'appid' => $this->app['config']['app_id'], + ]; + + return $this->httpPostJson('cgi-bin/clear_quota', $params); + } + + /** + * Get wechat callback ip. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function getValidIps() + { + return $this->httpGet('cgi-bin/getcallbackip'); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Base/ServiceProvider.php new file mode 100755 index 0000000..409593d --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Base/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Base; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['base'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/Client.php new file mode 100755 index 0000000..d3f4861 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/Client.php @@ -0,0 +1,377 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Broadcasting; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Contracts\MessageInterface; +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Messages\Card; +use EasyWeChat\Kernel\Messages\Image; +use EasyWeChat\Kernel\Messages\Media; +use EasyWeChat\Kernel\Messages\Text; +use EasyWeChat\Kernel\Support\Arr; + +/** + * Class Client. + * + * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewTextByName($text, $name); + * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewNewsByName($mediaId, $name); + * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewVoiceByName($mediaId, $name); + * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewImageByName($mediaId, $name); + * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewVideoByName($message, $name); + * @method \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string previewCardByName($cardId, $name); + * + * @author overtrue + */ +class Client extends BaseClient +{ + const PREVIEW_BY_OPENID = 'touser'; + const PREVIEW_BY_NAME = 'towxname'; + + /** + * Send a message. + * + * @param array $message + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function send(array $message) + { + if (empty($message['filter']) && empty($message['touser'])) { + throw new RuntimeException('The message reception object is not specified'); + } + + $api = Arr::get($message, 'touser') ? 'cgi-bin/message/mass/send' : 'cgi-bin/message/mass/sendall'; + + return $this->httpPostJson($api, $message); + } + + /** + * Preview a message. + * + * @param array $message + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function preview(array $message) + { + return $this->httpPostJson('cgi-bin/message/mass/preview', $message); + } + + /** + * Delete a broadcast. + * + * @param string $msgId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function delete(string $msgId) + { + $options = [ + 'msg_id' => $msgId, + ]; + + return $this->httpPostJson('cgi-bin/message/mass/delete', $options); + } + + /** + * Get a broadcast status. + * + * @param string $msgId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function status(string $msgId) + { + $options = [ + 'msg_id' => $msgId, + ]; + + return $this->httpPostJson('cgi-bin/message/mass/get', $options); + } + + /** + * Send a text message. + * + * @param string $message + * @param mixed $reception + * @param array $attributes + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function sendText(string $message, $reception = null, array $attributes = []) + { + return $this->sendMessage(new Text($message), $reception, $attributes); + } + + /** + * Send a news message. + * + * @param string $mediaId + * @param mixed $reception + * @param array $attributes + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function sendNews(string $mediaId, $reception = null, array $attributes = []) + { + return $this->sendMessage(new Media($mediaId, 'mpnews'), $reception, $attributes); + } + + /** + * Send a voice message. + * + * @param string $mediaId + * @param mixed $reception + * @param array $attributes + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function sendVoice(string $mediaId, $reception = null, array $attributes = []) + { + return $this->sendMessage(new Media($mediaId, 'voice'), $reception, $attributes); + } + + /** + * Send a image message. + * + * @param string $mediaId + * @param mixed $reception + * @param array $attributes + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function sendImage(string $mediaId, $reception = null, array $attributes = []) + { + return $this->sendMessage(new Image($mediaId), $reception, $attributes); + } + + /** + * Send a video message. + * + * @param string $mediaId + * @param mixed $reception + * @param array $attributes + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function sendVideo(string $mediaId, $reception = null, array $attributes = []) + { + return $this->sendMessage(new Media($mediaId, 'mpvideo'), $reception, $attributes); + } + + /** + * Send a card message. + * + * @param string $cardId + * @param mixed $reception + * @param array $attributes + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function sendCard(string $cardId, $reception = null, array $attributes = []) + { + return $this->sendMessage(new Card($cardId), $reception, $attributes); + } + + /** + * Preview a text message. + * + * @param string $message message + * @param string $reception + * @param string $method + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function previewText(string $message, $reception, $method = self::PREVIEW_BY_OPENID) + { + return $this->previewMessage(new Text($message), $reception, $method); + } + + /** + * Preview a news message. + * + * @param string $mediaId message + * @param string $reception + * @param string $method + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function previewNews(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) + { + return $this->previewMessage(new Media($mediaId, 'mpnews'), $reception, $method); + } + + /** + * Preview a voice message. + * + * @param string $mediaId message + * @param string $reception + * @param string $method + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function previewVoice(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) + { + return $this->previewMessage(new Media($mediaId, 'voice'), $reception, $method); + } + + /** + * Preview a image message. + * + * @param string $mediaId message + * @param string $reception + * @param string $method + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function previewImage(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) + { + return $this->previewMessage(new Image($mediaId), $reception, $method); + } + + /** + * Preview a video message. + * + * @param string $mediaId message + * @param string $reception + * @param string $method + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function previewVideo(string $mediaId, $reception, $method = self::PREVIEW_BY_OPENID) + { + return $this->previewMessage(new Media($mediaId, 'mpvideo'), $reception, $method); + } + + /** + * Preview a card message. + * + * @param string $cardId message + * @param string $reception + * @param string $method + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function previewCard(string $cardId, $reception, $method = self::PREVIEW_BY_OPENID) + { + return $this->previewMessage(new Card($cardId), $reception, $method); + } + + /** + * @param \EasyWeChat\Kernel\Contracts\MessageInterface $message + * @param string $reception + * @param string $method + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function previewMessage(MessageInterface $message, string $reception, $method = self::PREVIEW_BY_OPENID) + { + $message = (new MessageBuilder())->message($message)->buildForPreview($method, $reception); + + return $this->preview($message); + } + + /** + * @param \EasyWeChat\Kernel\Contracts\MessageInterface $message + * @param mixed $reception + * @param array $attributes + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function sendMessage(MessageInterface $message, $reception = null, $attributes = []) + { + $message = (new MessageBuilder())->message($message)->with($attributes)->toAll(); + + if (\is_int($reception)) { + $message->toTag($reception); + } elseif (\is_array($reception)) { + $message->toUsers($reception); + } + + return $this->send($message->build()); + } + + /** + * @codeCoverageIgnore + * + * @param string $method + * @param array $args + * + * @return mixed + */ + public function __call($method, $args) + { + if (strpos($method, 'ByName') > 0) { + $method = strstr($method, 'ByName', true); + + if (method_exists($this, $method)) { + array_push($args, self::PREVIEW_BY_NAME); + + return $this->$method(...$args); + } + } + + throw new \BadMethodCallException(sprintf('Method %s not exists.', $method)); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/MessageBuilder.php b/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/MessageBuilder.php new file mode 100755 index 0000000..70465b0 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/MessageBuilder.php @@ -0,0 +1,162 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Broadcasting; + +use EasyWeChat\Kernel\Contracts\MessageInterface; +use EasyWeChat\Kernel\Exceptions\RuntimeException; + +/** + * Class MessageBuilder. + * + * @author overtrue + */ +class MessageBuilder +{ + /** + * @var array + */ + protected $to = []; + + /** + * @var \EasyWeChat\Kernel\Contracts\MessageInterface + */ + protected $message; + + /** + * @var array + */ + protected $attributes = []; + + /** + * Set message. + * + * @param \EasyWeChat\Kernel\Contracts\MessageInterface $message + * + * @return $this + */ + public function message(MessageInterface $message) + { + $this->message = $message; + + return $this; + } + + /** + * Set target user or group. + * + * @param array $to + * + * @return $this + */ + public function to(array $to) + { + $this->to = $to; + + return $this; + } + + /** + * @param int $tagId + * + * @return \EasyWeChat\OfficialAccount\Broadcasting\MessageBuilder + */ + public function toTag(int $tagId) + { + $this->to([ + 'filter' => [ + 'is_to_all' => false, + 'tag_id' => $tagId, + ], + ]); + + return $this; + } + + /** + * @param array $openids + * + * @return \EasyWeChat\OfficialAccount\Broadcasting\MessageBuilder + */ + public function toUsers(array $openids) + { + $this->to([ + 'touser' => $openids, + ]); + + return $this; + } + + /** + * @return $this + */ + public function toAll() + { + $this->to([ + 'filter' => ['is_to_all' => true], + ]); + + return $this; + } + + /** + * @param array $attributes + * + * @return \EasyWeChat\OfficialAccount\Broadcasting\MessageBuilder + */ + public function with(array $attributes) + { + $this->attributes = $attributes; + + return $this; + } + + /** + * Build message. + * + * @param array $prepends + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function build(array $prepends = []): array + { + if (empty($this->message)) { + throw new RuntimeException('No message content to send.'); + } + + $content = $this->message->transformForJsonRequest(); + + if (empty($prepends)) { + $prepends = $this->to; + } + + $message = array_merge($prepends, $content, $this->attributes); + + return $message; + } + + /** + * Build preview message. + * + * @param string $by + * @param string $user + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function buildForPreview(string $by, string $user): array + { + return $this->build([$by => $user]); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/ServiceProvider.php new file mode 100755 index 0000000..1f956cf --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Broadcasting/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Broadcasting; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['broadcasting'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/BoardingPassClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/BoardingPassClient.php new file mode 100755 index 0000000..1007390 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/BoardingPassClient.php @@ -0,0 +1,30 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +/** + * Class BoardingPassClient. + * + * @author overtrue + */ +class BoardingPassClient extends Client +{ + /** + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function checkin(array $params) + { + return $this->httpPostJson('card/boardingpass/checkin', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/Card.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/Card.php new file mode 100755 index 0000000..9950944 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/Card.php @@ -0,0 +1,48 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; + +/** + * Class Card. + * + * @author overtrue + * + * @property \EasyWeChat\OfficialAccount\Card\CodeClient $code + * @property \EasyWeChat\OfficialAccount\Card\MeetingTicketClient $meeting_ticket + * @property \EasyWeChat\OfficialAccount\Card\MemberCardClient $member_card + * @property \EasyWeChat\OfficialAccount\Card\GeneralCardClient $general_card + * @property \EasyWeChat\OfficialAccount\Card\MovieTicketClient $movie_ticket + * @property \EasyWeChat\OfficialAccount\Card\CoinClient $coin + * @property \EasyWeChat\OfficialAccount\Card\SubMerchantClient $sub_merchant + * @property \EasyWeChat\OfficialAccount\Card\BoardingPassClient $boarding_pass + * @property \EasyWeChat\OfficialAccount\Card\JssdkClient $jssdk + */ +class Card extends Client +{ + /** + * @param string $property + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function __get($property) + { + if (isset($this->app["card.{$property}"])) { + return $this->app["card.{$property}"]; + } + + throw new InvalidArgumentException(sprintf('No card service named "%s".', $property)); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/Client.php new file mode 100755 index 0000000..abb6765 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/Client.php @@ -0,0 +1,359 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Traits\InteractsWithCache; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + use InteractsWithCache; + + /** + * @var string + */ + protected $url; + + /** + * Ticket cache key. + * + * @var string + */ + protected $ticketCacheKey; + + /** + * Ticket cache prefix. + * + * @var string + */ + protected $ticketCachePrefix = 'easywechat.official_account.card.api_ticket.'; + + /** + * 获取卡券颜色. + * + * @return mixed + */ + public function colors() + { + return $this->httpGet('card/getcolors'); + } + + /** + * 卡券开放类目查询接口. + * + * @return mixed + */ + public function categories() + { + return $this->httpGet('card/getapplyprotocol'); + } + + /** + * 创建卡券. + * + * @param string $cardType + * @param array $attributes + * + * @return mixed + */ + public function create($cardType = 'member_card', array $attributes) + { + $params = [ + 'card' => [ + 'card_type' => strtoupper($cardType), + strtolower($cardType) => $attributes, + ], + ]; + + return $this->httpPostJson('card/create', $params); + } + + /** + * 查看卡券详情. + * + * @param string $cardId + * + * @return mixed + */ + public function get($cardId) + { + $params = [ + 'card_id' => $cardId, + ]; + + return $this->httpPostJson('card/get', $params); + } + + /** + * 批量查询卡列表. + * + * @param int $offset + * @param int $count + * @param string $statusList + * + * @return mixed + */ + public function list($offset = 0, $count = 10, $statusList = 'CARD_STATUS_VERIFY_OK') + { + $params = [ + 'offset' => $offset, + 'count' => $count, + 'status_list' => $statusList, + ]; + + return $this->httpPostJson('card/batchget', $params); + } + + /** + * 更改卡券信息接口 and 设置跟随推荐接口. + * + * @param string $cardId + * @param string $type + * @param array $attributes + * + * @return mixed + */ + public function update($cardId, $type, array $attributes = []) + { + $card = []; + $card['card_id'] = $cardId; + $card[strtolower($type)] = $attributes; + + return $this->httpPostJson('card/update', $card); + } + + /** + * 删除卡券接口. + * + * @param string $cardId + * + * @return mixed + */ + public function delete($cardId) + { + $params = [ + 'card_id' => $cardId, + ]; + + return $this->httpPostJson('card/delete', $params); + } + + /** + * 创建二维码. + * + * @param array $cards + * + * @return mixed + */ + public function createQrCode(array $cards) + { + return $this->httpPostJson('card/qrcode/create', $cards); + } + + /** + * ticket 换取二维码图片. + * + * @param string $ticket + * + * @return array + */ + public function getQrCode($ticket) + { + $baseUri = 'https://mp.weixin.qq.com/cgi-bin/showqrcode'; + $params = [ + 'ticket' => $ticket, + ]; + + $response = $this->requestRaw($baseUri, 'GET', $params); + + return [ + 'status' => $response->getStatusCode(), + 'reason' => $response->getReasonPhrase(), + 'headers' => $response->getHeaders(), + 'body' => strval($response->getBody()), + 'url' => $baseUri.'?'.http_build_query($params), + ]; + } + + /** + * 通过ticket换取二维码 链接. + * + * @param string $ticket + * + * @return string + */ + public function getQrCodeUrl($ticket) + { + return sprintf('https://mp.weixin.qq.com/cgi-bin/showqrcode?ticket=%s', $ticket); + } + + /** + * 创建货架接口. + * + * @param string $banner + * @param string $pageTitle + * @param bool $canShare + * @param string $scene [SCENE_NEAR_BY 附近,SCENE_MENU 自定义菜单,SCENE_QRCODE 二维码,SCENE_ARTICLE 公众号文章, + * SCENE_H5 h5页面,SCENE_IVR 自动回复,SCENE_CARD_CUSTOM_CELL 卡券自定义cell] + * @param array $cardList + * + * @return mixed + */ + public function createLandingPage($banner, $pageTitle, $canShare, $scene, $cardList) + { + $params = [ + 'banner' => $banner, + 'page_title' => $pageTitle, + 'can_share' => $canShare, + 'scene' => $scene, + 'card_list' => $cardList, + ]; + + return $this->httpPostJson('card/landingpage/create', $params); + } + + /** + * 图文消息群发卡券. + * + * @param string $cardId + * + * @return mixed + */ + public function getHtml($cardId) + { + $params = [ + 'card_id' => $cardId, + ]; + + return $this->httpPostJson('card/mpnews/gethtml', $params); + } + + /** + * 设置测试白名单. + * + * @param array $openids + * + * @return mixed + */ + public function setTestWhitelist($openids) + { + $params = [ + 'openid' => $openids, + ]; + + return $this->httpPostJson('card/testwhitelist/set', $params); + } + + /** + * 设置测试白名单(by username). + * + * @param array $usernames + * + * @return mixed + */ + public function setTestWhitelistByName(array $usernames) + { + $params = [ + 'username' => $usernames, + ]; + + return $this->httpPostJson('card/testwhitelist/set', $params); + } + + /** + * 获取用户已领取卡券接口. + * + * @param string $openid + * @param string $cardId + * + * @return mixed + */ + public function getUserCards($openid, $cardId = '') + { + $params = [ + 'openid' => $openid, + 'card_id' => $cardId, + ]; + + return $this->httpPostJson('card/user/getcardlist', $params); + } + + /** + * 设置微信买单接口. + * 设置买单的 card_id 必须已经配置了门店,否则会报错. + * + * @param string $cardId + * @param bool $isOpen + * + * @return mixed + */ + public function setPayCell($cardId, $isOpen = true) + { + $params = [ + 'card_id' => $cardId, + 'is_open' => $isOpen, + ]; + + return $this->httpPostJson('card/paycell/set', $params); + } + + /** + * 增加库存. + * + * @param string $cardId + * @param int $amount + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function increaseStock($cardId, $amount) + { + return $this->updateStock($cardId, $amount, 'increase'); + } + + /** + * 减少库存. + * + * @param string $cardId + * @param int $amount + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function reduceStock($cardId, $amount) + { + return $this->updateStock($cardId, $amount, 'reduce'); + } + + /** + * 修改库存接口. + * + * @param string $cardId + * @param int $amount + * @param string $action + * + * @return mixed + */ + protected function updateStock($cardId, $amount, $action = 'increase') + { + $key = 'increase' === $action ? 'increase_stock_value' : 'reduce_stock_value'; + $params = [ + 'card_id' => $cardId, + $key => abs($amount), + ]; + + return $this->httpPostJson('card/modifystock', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/CodeClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/CodeClient.php new file mode 100755 index 0000000..0f76757 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/CodeClient.php @@ -0,0 +1,169 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class CodeClient. + * + * @author overtrue + */ +class CodeClient extends BaseClient +{ + /** + * 导入code接口. + * + * @param string $cardId + * @param array $codes + * + * @return mixed + */ + public function deposit(string $cardId, array $codes) + { + $params = [ + 'card_id' => $cardId, + 'code' => $codes, + ]; + + return $this->httpPostJson('card/code/deposit', $params); + } + + /** + * 查询导入code数目. + * + * @param string $cardId + * + * @return mixed + */ + public function getDepositedCount(string $cardId) + { + $params = [ + 'card_id' => $cardId, + ]; + + return $this->httpPostJson('card/code/getdepositcount', $params); + } + + /** + * 核查code接口. + * + * @param string $cardId + * @param array $codes + * + * @return mixed + */ + public function check(string $cardId, array $codes) + { + $params = [ + 'card_id' => $cardId, + 'code' => $codes, + ]; + + return $this->httpPostJson('card/code/checkcode', $params); + } + + /** + * 查询 Code 接口. + * + * @param string $code + * @param string $cardId + * @param bool $checkConsume + * + * @return mixed + */ + public function get(string $code, string $cardId = '', bool $checkConsume = true) + { + $params = [ + 'code' => $code, + 'check_consume' => $checkConsume, + 'card_id' => $cardId, + ]; + + return $this->httpPostJson('card/code/get', $params); + } + + /** + * 更改Code接口. + * + * @param string $code + * @param string $newCode + * @param string $cardId + * + * @return mixed + */ + public function update(string $code, string $newCode, string $cardId = '') + { + $params = [ + 'code' => $code, + 'new_code' => $newCode, + 'card_id' => $cardId, + ]; + + return $this->httpPostJson('card/code/update', $params); + } + + /** + * 设置卡券失效. + * + * @param string $code + * @param string $cardId + * + * @return mixed + */ + public function disable(string $code, string $cardId = '') + { + $params = [ + 'code' => $code, + 'card_id' => $cardId, + ]; + + return $this->httpPostJson('card/code/unavailable', $params); + } + + /** + * 核销 Code 接口. + * + * @param string $code + * @param string|null $cardId + * + * @return mixed + */ + public function consume(string $code, string $cardId = null) + { + $params = [ + 'code' => $code, + ]; + + if (!is_null($cardId)) { + $params['card_id'] = $cardId; + } + + return $this->httpPostJson('card/code/consume', $params); + } + + /** + * Code解码接口. + * + * @param string $encryptedCode + * + * @return mixed + */ + public function decrypt(string $encryptedCode) + { + $params = [ + 'encrypt_code' => $encryptedCode, + ]; + + return $this->httpPostJson('card/code/decrypt', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/CoinClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/CoinClient.php new file mode 100755 index 0000000..97681c1 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/CoinClient.php @@ -0,0 +1,100 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class CoinClient. + * + * @author overtrue + */ +class CoinClient extends BaseClient +{ + /** + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function activate() + { + return $this->httpGet('card/pay/activate'); + } + + /** + * @param string $cardId + * @param int $quantity + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function getPrice(string $cardId, int $quantity) + { + return $this->httpPostJson('card/pay/getpayprice', [ + 'card_id' => $cardId, + 'quantity' => $quantity, + ]); + } + + /** + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function summary() + { + return $this->httpGet('card/pay/getcoinsinfo'); + } + + /** + * @param int $count + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function recharge(int $count) + { + return $this->httpPostJson('card/pay/recharge', [ + 'coin_count' => $count, + ]); + } + + /** + * @param string $orderId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function order(string $orderId) + { + return $this->httpPostJson('card/pay/getorder', ['order_id' => $orderId]); + } + + /** + * @param array $filters + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function orders(array $filters) + { + return $this->httpPostJson('card/pay/getorderlist', $filters); + } + + /** + * @param string $cardId + * @param string $orderId + * @param int $quantity + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function confirm(string $cardId, string $orderId, int $quantity) + { + return $this->httpPostJson('card/pay/confirm', [ + 'card_id' => $cardId, + 'order_id' => $orderId, + 'quantity' => $quantity, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/GeneralCardClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/GeneralCardClient.php new file mode 100755 index 0000000..05b63af --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/GeneralCardClient.php @@ -0,0 +1,62 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +/** + * Class GeneralCardClient. + * + * @author overtrue + */ +class GeneralCardClient extends Client +{ + /** + * 通用卡接口激活. + * + * @param array $info + * + * @return mixed + */ + public function activate(array $info = []) + { + return $this->httpPostJson('card/generalcard/activate', $info); + } + + /** + * 通用卡撤销激活. + * + * @param string $cardId + * @param string $code + * + * @return mixed + */ + public function deactivate(string $cardId, string $code) + { + $params = [ + 'card_id' => $cardId, + 'code' => $code, + ]; + + return $this->httpPostJson('card/generalcard/unactivate', $params); + } + + /** + * 更新会员信息. + * + * @param array $params + * + * @return mixed + */ + public function updateUser(array $params = []) + { + return $this->httpPostJson('card/generalcard/updateuser', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/JssdkClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/JssdkClient.php new file mode 100755 index 0000000..ddd7d63 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/JssdkClient.php @@ -0,0 +1,83 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +use EasyWeChat\BasicService\Jssdk\Client as Jssdk; +use EasyWeChat\Kernel\Support\Arr; +use function EasyWeChat\Kernel\Support\str_random; + +/** + * Class Jssdk. + * + * @author overtrue + */ +class JssdkClient extends Jssdk +{ + /** + * @param bool $refresh + * @param string $type + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function getTicket(bool $refresh = false, string $type = 'wx_card'): array + { + return parent::getTicket($refresh, $type); + } + + /** + * 微信卡券:JSAPI 卡券发放. + * + * @param array $cards + * + * @return string + */ + public function assign(array $cards) + { + return json_encode(array_map(function ($card) { + return $this->attachExtension($card['card_id'], $card); + }, $cards)); + } + + /** + * 生成 js添加到卡包 需要的 card_list 项. + * + * @param string $cardId + * @param array $extension + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \Psr\SimpleCache\InvalidArgumentException + */ + public function attachExtension($cardId, array $extension = []) + { + $timestamp = time(); + $nonce = str_random(6); + $ticket = $this->getTicket()['ticket']; + + $ext = array_merge(['timestamp' => $timestamp, 'nonce_str' => $nonce], Arr::only( + $extension, + ['code', 'openid', 'outer_id', 'balance', 'fixed_begintimestamp', 'outer_str'] + )); + + $ext['signature'] = $this->dictionaryOrderSignature($ticket, $timestamp, $cardId, $ext['code'] ?? '', $ext['openid'] ?? '', $nonce); + + return [ + 'cardId' => $cardId, + 'cardExt' => json_encode($ext), + ]; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/MeetingTicketClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/MeetingTicketClient.php new file mode 100755 index 0000000..d404314 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/MeetingTicketClient.php @@ -0,0 +1,30 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +/** + * Class MeetingTicketClient. + * + * @author overtrue + */ +class MeetingTicketClient extends Client +{ + /** + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function updateUser(array $params) + { + return $this->httpPostJson('card/meetingticket/updateuser', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/MemberCardClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/MemberCardClient.php new file mode 100755 index 0000000..b376550 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/MemberCardClient.php @@ -0,0 +1,107 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +/** + * Class MemberCardClient. + * + * @author overtrue + */ +class MemberCardClient extends Client +{ + /** + * 会员卡接口激活. + * + * @param array $info + * + * @return mixed + */ + public function activate(array $info = []) + { + return $this->httpPostJson('card/membercard/activate', $info); + } + + /** + * 设置开卡字段接口. + * + * @param string $cardId + * @param array $settings + * + * @return mixed + */ + public function setActivationForm(string $cardId, array $settings) + { + $params = array_merge(['card_id' => $cardId], $settings); + + return $this->httpPostJson('card/membercard/activateuserform/set', $params); + } + + /** + * 拉取会员信息接口. + * + * @param string $cardId + * @param string $code + * + * @return mixed + */ + public function getUser(string $cardId, string $code) + { + $params = [ + 'card_id' => $cardId, + 'code' => $code, + ]; + + return $this->httpPostJson('card/membercard/userinfo/get', $params); + } + + /** + * 更新会员信息. + * + * @param array $params + * + * @return mixed + */ + public function updateUser(array $params = []) + { + return $this->httpPostJson('card/membercard/updateuser', $params); + } + + /** + * 获取用户提交资料. + * + * @param string $activateTicket + * + * @return mixed + */ + public function getActivationForm($activateTicket) + { + $params = [ + 'activate_ticket' => $activateTicket, + ]; + + return $this->httpPostJson('card/membercard/activatetempinfo/get', $params); + } + + /** + * 获取开卡组件链接接口. + * + * @param array $params 包含会员卡ID和随机字符串 + * + * @return string 开卡组件链接 + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getActivateUrl(array $params = []) + { + return $this->httpPostJson('card/membercard/activate/geturl', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/MovieTicketClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/MovieTicketClient.php new file mode 100755 index 0000000..3163ff9 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/MovieTicketClient.php @@ -0,0 +1,30 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +/** + * Class MovieTicketClient. + * + * @author overtrue + */ +class MovieTicketClient extends Client +{ + /** + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function updateUser(array $params) + { + return $this->httpPostJson('card/movieticket/updateuser', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/ServiceProvider.php new file mode 100755 index 0000000..9ebeeaa --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/ServiceProvider.php @@ -0,0 +1,73 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['card'] = function ($app) { + return new Card($app); + }; + + $app['card.client'] = function ($app) { + return new Client($app); + }; + + $app['card.coin'] = function ($app) { + return new CoinClient($app); + }; + + $app['card.sub_merchant'] = function ($app) { + return new SubMerchantClient($app); + }; + + $app['card.code'] = function ($app) { + return new CodeClient($app); + }; + + $app['card.movie_ticket'] = function ($app) { + return new MovieTicketClient($app); + }; + + $app['card.member_card'] = function ($app) { + return new MemberCardClient($app); + }; + + $app['card.general_card'] = function ($app) { + return new GeneralCardClient($app); + }; + + $app['card.boarding_pass'] = function ($app) { + return new BoardingPassClient($app); + }; + + $app['card.meeting_ticket'] = function ($app) { + return new MeetingTicketClient($app); + }; + + $app['card.jssdk'] = function ($app) { + return new JssdkClient($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Card/SubMerchantClient.php b/vendor/overtrue/wechat/src/OfficialAccount/Card/SubMerchantClient.php new file mode 100755 index 0000000..447e70c --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Card/SubMerchantClient.php @@ -0,0 +1,109 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Card; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Support\Arr; + +/** + * Class SubMerchantClient. + * + * @author overtrue + */ +class SubMerchantClient extends BaseClient +{ + /** + * 添加子商户. + * + * @param array $info + * + * @return mixed + */ + public function create(array $info = []) + { + $params = [ + 'info' => Arr::only($info, [ + 'brand_name', + 'logo_url', + 'protocol', + 'end_time', + 'primary_category_id', + 'secondary_category_id', + 'agreement_media_id', + 'operator_media_id', + 'app_id', + ]), + ]; + + return $this->httpPostJson('card/submerchant/submit', $params); + } + + /** + * 更新子商户. + * + * @param int $merchantId + * @param array $info + * + * @return mixed + */ + public function update(int $merchantId, array $info = []) + { + $params = [ + 'info' => array_merge(['merchant_id' => $merchantId], + Arr::only($info, [ + 'brand_name', + 'logo_url', + 'protocol', + 'end_time', + 'primary_category_id', + 'secondary_category_id', + 'agreement_media_id', + 'operator_media_id', + 'app_id', + ])), + ]; + + return $this->httpPostJson('card/submerchant/update', $params); + } + + /** + * 获取子商户信息. + * + * @param int $merchantId + * + * @return mixed + */ + public function get(int $merchantId) + { + return $this->httpPostJson('card/submerchant/get', ['merchant_id' => $merchantId]); + } + + /** + * 批量获取子商户信息. + * + * @param int $beginId + * @param int $limit + * @param string $status + * + * @return mixed + */ + public function list(int $beginId = 0, int $limit = 50, string $status = 'CHECKING') + { + $params = [ + 'begin_id' => $beginId, + 'limit' => $limit, + 'status' => $status, + ]; + + return $this->httpPostJson('card/submerchant/batchget', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Comment/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Comment/Client.php new file mode 100755 index 0000000..e67983e --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Comment/Client.php @@ -0,0 +1,184 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Comment; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * Open article comment. + * + * @param string $msgId + * @param int|null $index + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function open(string $msgId, int $index = null) + { + $params = [ + 'msg_data_id' => $msgId, + 'index' => $index, + ]; + + return $this->httpPostJson('cgi-bin/comment/open', $params); + } + + /** + * Close comment. + * + * @param string $msgId + * @param int|null $index + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function close(string $msgId, int $index = null) + { + $params = [ + 'msg_data_id' => $msgId, + 'index' => $index, + ]; + + return $this->httpPostJson('cgi-bin/comment/close', $params); + } + + /** + * Get article comments. + * + * @param string $msgId + * @param int $index + * @param int $begin + * @param int $count + * @param int $type + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function list(string $msgId, int $index, int $begin, int $count, int $type = 0) + { + $params = [ + 'msg_data_id' => $msgId, + 'index' => $index, + 'begin' => $begin, + 'count' => $count, + 'type' => $type, + ]; + + return $this->httpPostJson('cgi-bin/comment/list', $params); + } + + /** + * Mark elect comment. + * + * @param string $msgId + * @param int $index + * @param int $commentId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function markElect(string $msgId, int $index, int $commentId) + { + $params = [ + 'msg_data_id' => $msgId, + 'index' => $index, + 'user_comment_id' => $commentId, + ]; + + return $this->httpPostJson('cgi-bin/comment/markelect', $params); + } + + /** + * Unmark elect comment. + * + * @param string $msgId + * @param int $index + * @param int $commentId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function unmarkElect(string $msgId, int $index, int $commentId) + { + $params = [ + 'msg_data_id' => $msgId, + 'index' => $index, + 'user_comment_id' => $commentId, + ]; + + return $this->httpPostJson('cgi-bin/comment/unmarkelect', $params); + } + + /** + * Delete comment. + * + * @param string $msgId + * @param int $index + * @param int $commentId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function delete(string $msgId, int $index, int $commentId) + { + $params = [ + 'msg_data_id' => $msgId, + 'index' => $index, + 'user_comment_id' => $commentId, + ]; + + return $this->httpPostJson('cgi-bin/comment/delete', $params); + } + + /** + * Reply to a comment. + * + * @param string $msgId + * @param int $index + * @param int $commentId + * @param string $content + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function reply(string $msgId, int $index, int $commentId, string $content) + { + $params = [ + 'msg_data_id' => $msgId, + 'index' => $index, + 'user_comment_id' => $commentId, + 'content' => $content, + ]; + + return $this->httpPostJson('cgi-bin/comment/reply/add', $params); + } + + /** + * Delete a reply. + * + * @param string $msgId + * @param int $index + * @param int $commentId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function deleteReply(string $msgId, int $index, int $commentId) + { + $params = [ + 'msg_data_id' => $msgId, + 'index' => $index, + 'user_comment_id' => $commentId, + ]; + + return $this->httpPostJson('cgi-bin/comment/reply/delete', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Comment/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Comment/ServiceProvider.php new file mode 100755 index 0000000..8d6806c --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Comment/ServiceProvider.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * ServiceProvider.php. + * + * This file is part of the wechat. + * + * (c) overtrue + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Comment; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['comment'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Client.php new file mode 100755 index 0000000..d2ea931 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Client.php @@ -0,0 +1,203 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\CustomerService; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * List all staffs. + * + * @return mixed + */ + public function list() + { + return $this->httpGet('cgi-bin/customservice/getkflist'); + } + + /** + * List all online staffs. + * + * @return mixed + */ + public function online() + { + return $this->httpGet('cgi-bin/customservice/getonlinekflist'); + } + + /** + * Create a staff. + * + * @param string $account + * @param string $nickname + * + * @return mixed + */ + public function create(string $account, string $nickname) + { + $params = [ + 'kf_account' => $account, + 'nickname' => $nickname, + ]; + + return $this->httpPostJson('customservice/kfaccount/add', $params); + } + + /** + * Update a staff. + * + * @param string $account + * @param string $nickname + * + * @return mixed + */ + public function update(string $account, string $nickname) + { + $params = [ + 'kf_account' => $account, + 'nickname' => $nickname, + ]; + + return $this->httpPostJson('customservice/kfaccount/update', $params); + } + + /** + * Delete a staff. + * + * @param string $account + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function delete(string $account) + { + return $this->httpPostJson('customservice/kfaccount/del', [], ['kf_account' => $account]); + } + + /** + * Invite a staff. + * + * @param string $account + * @param string $wechatId + * + * @return mixed + */ + public function invite(string $account, string $wechatId) + { + $params = [ + 'kf_account' => $account, + 'invite_wx' => $wechatId, + ]; + + return $this->httpPostJson('customservice/kfaccount/inviteworker', $params); + } + + /** + * Set staff avatar. + * + * @param string $account + * @param string $path + * + * @return mixed + */ + public function setAvatar(string $account, string $path) + { + return $this->httpUpload('customservice/kfaccount/uploadheadimg', ['media' => $path], [], ['kf_account' => $account]); + } + + /** + * Get message builder. + * + * @param \EasyWeChat\Kernel\Messages\Message|string $message + * + * @return \EasyWeChat\OfficialAccount\CustomerService\Messenger + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function message($message) + { + $messageBuilder = new Messenger($this); + + return $messageBuilder->message($message); + } + + /** + * Send a message. + * + * @param array $message + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function send(array $message) + { + return $this->httpPostJson('cgi-bin/message/custom/send', $message); + } + + /** + * Show typing status. + * + * @param string $openid + * + * @return mixed + */ + public function showTypingStatusToUser(string $openid) + { + return $this->httpPostJson('cgi-bin/message/custom/typing', [ + 'touser' => $openid, + 'command' => 'Typing', + ]); + } + + /** + * Hide typing status. + * + * @param string $openid + * + * @return mixed + */ + public function hideTypingStatusToUser(string $openid) + { + return $this->httpPostJson('cgi-bin/message/custom/typing', [ + 'touser' => $openid, + 'command' => 'CancelTyping', + ]); + } + + /** + * Get messages history. + * + * @param int $startTime + * @param int $endTime + * @param int $msgId + * @param int $number + * + * @return mixed + */ + public function messages($startTime, $endTime, int $msgId = 1, int $number = 10000) + { + $params = [ + 'starttime' => is_numeric($startTime) ? $startTime : strtotime($startTime), + 'endtime' => is_numeric($endTime) ? $endTime : strtotime($endTime), + 'msgid' => $msgId, + 'number' => $number, + ]; + + return $this->httpPostJson('customservice/msgrecord/getmsglist', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Messenger.php b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Messenger.php new file mode 100755 index 0000000..2d4bf07 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/Messenger.php @@ -0,0 +1,163 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\CustomerService; + +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Messages\Message; +use EasyWeChat\Kernel\Messages\Raw as RawMessage; +use EasyWeChat\Kernel\Messages\Text; + +/** + * Class MessageBuilder. + * + * @author overtrue + */ +class Messenger +{ + /** + * Messages to send. + * + * @var \EasyWeChat\Kernel\Messages\Message; + */ + protected $message; + + /** + * Messages target user open id. + * + * @var string + */ + protected $to; + + /** + * Messages sender staff id. + * + * @var string + */ + protected $account; + + /** + * Customer service instance. + * + * @var \EasyWeChat\OfficialAccount\CustomerService\Client + */ + protected $client; + + /** + * MessageBuilder constructor. + * + * @param \EasyWeChat\OfficialAccount\CustomerService\Client $client + */ + public function __construct(Client $client) + { + $this->client = $client; + } + + /** + * Set message to send. + * + * @param string|Message $message + * + * @return Messenger + */ + public function message($message) + { + if (is_string($message)) { + $message = new Text($message); + } + + $this->message = $message; + + return $this; + } + + /** + * Set staff account to send message. + * + * @param string $account + * + * @return Messenger + */ + public function by(string $account) + { + $this->account = $account; + + return $this; + } + + /** + * @param string $account + * + * @return Messenger + */ + public function from(string $account) + { + return $this->by($account); + } + + /** + * Set target user open id. + * + * @param string $openid + * + * @return Messenger + */ + public function to($openid) + { + $this->to = $openid; + + return $this; + } + + /** + * Send the message. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws RuntimeException + */ + public function send() + { + if (empty($this->message)) { + throw new RuntimeException('No message to send.'); + } + + if ($this->message instanceof RawMessage) { + $message = json_decode($this->message->get('content'), true); + } else { + $prepends = [ + 'touser' => $this->to, + ]; + if ($this->account) { + $prepends['customservice'] = ['kf_account' => $this->account]; + } + $message = $this->message->transformForJsonRequest($prepends); + } + + return $this->client->send($message); + } + + /** + * Return property. + * + * @param string $property + * + * @return mixed + */ + public function __get(string $property) + { + if (property_exists($this, $property)) { + return $this->$property; + } + + return null; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/ServiceProvider.php new file mode 100755 index 0000000..a879ce8 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/ServiceProvider.php @@ -0,0 +1,37 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\CustomerService; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['customer_service'] = function ($app) { + return new Client($app); + }; + + $app['customer_service_session'] = function ($app) { + return new SessionClient($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/SessionClient.php b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/SessionClient.php new file mode 100755 index 0000000..db2717f --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/CustomerService/SessionClient.php @@ -0,0 +1,102 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\CustomerService; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class SessionClient. + * + * @author overtrue + */ +class SessionClient extends BaseClient +{ + /** + * List all sessions of $account. + * + * @param string $account + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list(string $account) + { + return $this->httpGet('customservice/kfsession/getsessionlist', ['kf_account' => $account]); + } + + /** + * List all the people waiting. + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function waiting() + { + return $this->httpGet('customservice/kfsession/getwaitcase'); + } + + /** + * Create a session. + * + * @param string $account + * @param string $openid + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function create(string $account, string $openid) + { + $params = [ + 'kf_account' => $account, + 'openid' => $openid, + ]; + + return $this->httpPostJson('customservice/kfsession/create', $params); + } + + /** + * Close a session. + * + * @param string $account + * @param string $openid + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function close(string $account, string $openid) + { + $params = [ + 'kf_account' => $account, + 'openid' => $openid, + ]; + + return $this->httpPostJson('customservice/kfsession/close', $params); + } + + /** + * Get a session. + * + * @param string $openid + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(string $openid) + { + return $this->httpGet('customservice/kfsession/getsession', ['openid' => $openid]); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/DataCube/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/DataCube/Client.php new file mode 100755 index 0000000..099c66f --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/DataCube/Client.php @@ -0,0 +1,337 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\DataCube; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * 获取用户增减数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function userSummary(string $from, string $to) + { + return $this->query('datacube/getusersummary', $from, $to); + } + + /** + * 获取累计用户数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function userCumulate(string $from, string $to) + { + return $this->query('datacube/getusercumulate', $from, $to); + } + + /** + * 获取图文群发每日数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function articleSummary(string $from, string $to) + { + return $this->query('datacube/getarticlesummary', $from, $to); + } + + /** + * 获取图文群发总数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function articleTotal(string $from, string $to) + { + return $this->query('datacube/getarticletotal', $from, $to); + } + + /** + * 获取图文统计数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function userReadSummary(string $from, string $to) + { + return $this->query('datacube/getuserread', $from, $to); + } + + /** + * 获取图文统计分时数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function userReadHourly(string $from, string $to) + { + return $this->query('datacube/getuserreadhour', $from, $to); + } + + /** + * 获取图文分享转发数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function userShareSummary(string $from, string $to) + { + return $this->query('datacube/getusershare', $from, $to); + } + + /** + * 获取图文分享转发分时数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function userShareHourly(string $from, string $to) + { + return $this->query('datacube/getusersharehour', $from, $to); + } + + /** + * 获取消息发送概况数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function upstreamMessageSummary(string $from, string $to) + { + return $this->query('datacube/getupstreammsg', $from, $to); + } + + /** + * 获取消息分送分时数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function upstreamMessageHourly(string $from, string $to) + { + return $this->query('datacube/getupstreammsghour', $from, $to); + } + + /** + * 获取消息发送周数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function upstreamMessageWeekly(string $from, string $to) + { + return $this->query('datacube/getupstreammsgweek', $from, $to); + } + + /** + * 获取消息发送月数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function upstreamMessageMonthly(string $from, string $to) + { + return $this->query('datacube/getupstreammsgmonth', $from, $to); + } + + /** + * 获取消息发送分布数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function upstreamMessageDistSummary(string $from, string $to) + { + return $this->query('datacube/getupstreammsgdist', $from, $to); + } + + /** + * 获取消息发送分布周数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function upstreamMessageDistWeekly(string $from, string $to) + { + return $this->query('datacube/getupstreammsgdistweek', $from, $to); + } + + /** + * 获取消息发送分布月数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function upstreamMessageDistMonthly(string $from, string $to) + { + return $this->query('datacube/getupstreammsgdistmonth', $from, $to); + } + + /** + * 获取接口分析数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function interfaceSummary(string $from, string $to) + { + return $this->query('datacube/getinterfacesummary', $from, $to); + } + + /** + * 获取接口分析分时数据. + * + * @param string $from + * @param string $to + * + * @return mixed + */ + public function interfaceSummaryHourly(string $from, string $to) + { + return $this->query('datacube/getinterfacesummaryhour', $from, $to); + } + + /** + * 拉取卡券概况数据接口. + * + * @param string $from + * @param string $to + * @param int $condSource + * + * @return mixed + */ + public function cardSummary(string $from, string $to, $condSource = 0) + { + $ext = [ + 'cond_source' => intval($condSource), + ]; + + return $this->query('datacube/getcardbizuininfo', $from, $to, $ext); + } + + /** + * 获取免费券数据接口. + * + * @param string $from + * @param string $to + * @param int $condSource + * @param string $cardId + * + * @return mixed + */ + public function freeCardSummary(string $from, string $to, int $condSource = 0, string $cardId = '') + { + $ext = [ + 'cond_source' => intval($condSource), + 'card_id' => $cardId, + ]; + + return $this->query('datacube/getcardcardinfo', $from, $to, $ext); + } + + /** + * 拉取会员卡数据接口. + * + * @param string $from + * @param string $to + * @param int $condSource + * + * @return mixed + */ + public function memberCardSummary(string $from, string $to, $condSource = 0) + { + $ext = [ + 'cond_source' => intval($condSource), + ]; + + return $this->query('datacube/getcardmembercardinfo', $from, $to, $ext); + } + + /** + * 拉取单张会员卡数据接口. + * + * @param string $from + * @param string $to + * @param string $cardId + * + * @return mixed + */ + public function memberCardSummaryById(string $from, string $to, string $cardId) + { + $ext = [ + 'card_id' => $cardId, + ]; + + return $this->query('datacube/getcardmembercarddetail', $from, $to, $ext); + } + + /** + * 查询数据. + * + * @param string $api + * @param string $from + * @param string $to + * @param array $ext + * + * @return mixed + */ + protected function query(string $api, string $from, string $to, array $ext = []) + { + $params = array_merge([ + 'begin_date' => $from, + 'end_date' => $to, + ], $ext); + + return $this->httpPostJson($api, $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/DataCube/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/DataCube/ServiceProvider.php new file mode 100755 index 0000000..bfec89a --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/DataCube/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\DataCube; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['data_cube'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Device/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Device/Client.php new file mode 100755 index 0000000..4bcfe71 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Device/Client.php @@ -0,0 +1,220 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Device; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @see http://iot.weixin.qq.com/wiki/new/index.html + * + * @author soone <66812590@qq.com> + */ +class Client extends BaseClient +{ + /** + * @param string $deviceId + * @param string $openid + * @param string $content + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function message(string $deviceId, string $openid, string $content) + { + $params = [ + 'device_type' => $this->app['config']['device_type'], + 'device_id' => $deviceId, + 'open_id' => $openid, + 'content' => base64_encode($content), + ]; + + return $this->httpPostJson('device/transmsg', $params); + } + + /** + * Get device qrcode. + * + * @param array $deviceIds + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function qrCode(array $deviceIds) + { + $params = [ + 'device_num' => count($deviceIds), + 'device_id_list' => $deviceIds, + ]; + + return $this->httpPostJson('device/create_qrcode', $params); + } + + /** + * @param array $devices + * @param string $productId + * @param int $opType + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function authorize(array $devices, string $productId, int $opType = 0) + { + $params = [ + 'device_num' => count($devices), + 'device_list' => $devices, + 'op_type' => $opType, + 'product_id' => $productId, + ]; + + return $this->httpPostJson('device/authorize_device', $params); + } + + /** + * 获取 device id 和二维码 + * + * @param string $productId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function createId(string $productId) + { + $params = [ + 'product_id' => $productId, + ]; + + return $this->httpGet('device/getqrcode', $params); + } + + /** + * @param string $openid + * @param string $deviceId + * @param string $ticket + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function bind(string $openid, string $deviceId, string $ticket) + { + $params = [ + 'ticket' => $ticket, + 'device_id' => $deviceId, + 'openid' => $openid, + ]; + + return $this->httpPostJson('device/bind', $params); + } + + /** + * @param string $openid + * @param string $deviceId + * @param string $ticket + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function unbind(string $openid, string $deviceId, string $ticket) + { + $params = [ + 'ticket' => $ticket, + 'device_id' => $deviceId, + 'openid' => $openid, + ]; + + return $this->httpPostJson('device/unbind', $params); + } + + /** + * @param string $openid + * @param string $deviceId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function forceBind(string $openid, string $deviceId) + { + $params = [ + 'device_id' => $deviceId, + 'openid' => $openid, + ]; + + return $this->httpPostJson('device/compel_bind', $params); + } + + /** + * @param string $openid + * @param string $deviceId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function forceUnbind(string $openid, string $deviceId) + { + $params = [ + 'device_id' => $deviceId, + 'openid' => $openid, + ]; + + return $this->httpPostJson('device/compel_unbind', $params); + } + + /** + * @param string $deviceId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function status(string $deviceId) + { + $params = [ + 'device_id' => $deviceId, + ]; + + return $this->httpGet('device/get_stat', $params); + } + + /** + * @param string $ticket + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function verify(string $ticket) + { + $params = [ + 'ticket' => $ticket, + ]; + + return $this->httpPost('device/verify_qrcode', $params); + } + + /** + * @param string $deviceId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function openid(string $deviceId) + { + $params = [ + 'device_type' => $this->app['config']['device_type'], + 'device_id' => $deviceId, + ]; + + return $this->httpGet('device/get_openid', $params); + } + + /** + * @param string $openid + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function listByOpenid(string $openid) + { + $params = [ + 'openid' => $openid, + ]; + + return $this->httpGet('device/get_bind_device', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Device/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Device/ServiceProvider.php new file mode 100755 index 0000000..e3dce8e --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Device/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Device; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author soone <66812590@qq.com + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['device'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Goods/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Goods/Client.php new file mode 100755 index 0000000..d3707bb --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Goods/Client.php @@ -0,0 +1,108 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Goods; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author her-cat + */ +class Client extends BaseClient +{ + /** + * Add the goods. + * + * @param array $data + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function add(array $data) + { + return $this->httpPostJson('scan/product/v2/add', [ + 'product' => $data, + ]); + } + + /** + * Update the goods. + * + * @param array $data + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function update(array $data) + { + return $this->httpPostJson('scan/product/v2/add', [ + 'product' => $data, + ]); + } + + /** + * Get add or update goods results. + * + * @param string $ticket + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function status(string $ticket) + { + return $this->httpPostJson('scan/product/v2/status', [ + 'status_ticket' => $ticket, + ]); + } + + /** + * Get goods information. + * + * @param string $pid + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(string $pid) + { + return $this->httpPostJson('scan/product/v2/getinfo', [ + 'product' => [ + 'pid' => $pid, + ], + ]); + } + + /** + * Get a list of goods. + * + * @param string $context + * @param int $page + * @param int $size + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list(string $context = '', int $page = 1, int $size = 10) + { + return $this->httpPostJson('scan/product/v2/getinfobypage', [ + 'page_context' => $context, + 'page_num' => $page, + 'page_size' => $size, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Goods/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Goods/ServiceProvider.php new file mode 100755 index 0000000..38a0902 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Goods/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Goods; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author her-cat + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['goods'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Material/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Material/Client.php new file mode 100755 index 0000000..b5c2413 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Material/Client.php @@ -0,0 +1,287 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Material; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Http\StreamResponse; +use EasyWeChat\Kernel\Messages\Article; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * Allow media type. + * + * @var array + */ + protected $allowTypes = ['image', 'voice', 'video', 'thumb', 'news_image']; + + /** + * Upload image. + * + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function uploadImage(string $path) + { + return $this->upload('image', $path); + } + + /** + * Upload voice. + * + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function uploadVoice(string $path) + { + return $this->upload('voice', $path); + } + + /** + * Upload thumb. + * + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function uploadThumb(string $path) + { + return $this->upload('thumb', $path); + } + + /** + * Upload video. + * + * @param string $path + * @param string $title + * @param string $description + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function uploadVideo(string $path, string $title, string $description) + { + $params = [ + 'description' => json_encode( + [ + 'title' => $title, + 'introduction' => $description, + ], JSON_UNESCAPED_UNICODE), + ]; + + return $this->upload('video', $path, $params); + } + + /** + * Upload articles. + * + * @param array|Article $articles + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function uploadArticle($articles) + { + if ($articles instanceof Article || !empty($articles['title'])) { + $articles = [$articles]; + } + + $params = ['articles' => array_map(function ($article) { + if ($article instanceof Article) { + return $article->transformForJsonRequestWithoutType(); + } + + return $article; + }, $articles)]; + + return $this->httpPostJson('cgi-bin/material/add_news', $params); + } + + /** + * Update article. + * + * @param string $mediaId + * @param array|Article $article + * @param int $index + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function updateArticle(string $mediaId, $article, int $index = 0) + { + if ($article instanceof Article) { + $article = $article->transformForJsonRequestWithoutType(); + } + + $params = [ + 'media_id' => $mediaId, + 'index' => $index, + 'articles' => isset($article['title']) ? $article : (isset($article[$index]) ? $article[$index] : []), + ]; + + return $this->httpPostJson('cgi-bin/material/update_news', $params); + } + + /** + * Upload image for article. + * + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function uploadArticleImage(string $path) + { + return $this->upload('news_image', $path); + } + + /** + * Fetch material. + * + * @param string $mediaId + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(string $mediaId) + { + $response = $this->requestRaw('cgi-bin/material/get_material', 'POST', ['json' => ['media_id' => $mediaId]]); + + if (false !== stripos($response->getHeaderLine('Content-disposition'), 'attachment')) { + return StreamResponse::buildFromPsrResponse($response); + } + + return $this->castResponseToType($response, $this->app['config']->get('response_type')); + } + + /** + * Delete material by media ID. + * + * @param string $mediaId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function delete(string $mediaId) + { + return $this->httpPostJson('cgi-bin/material/del_material', ['media_id' => $mediaId]); + } + + /** + * List materials. + * + * example: + * + * { + * "total_count": TOTAL_COUNT, + * "item_count": ITEM_COUNT, + * "item": [{ + * "media_id": MEDIA_ID, + * "name": NAME, + * "update_time": UPDATE_TIME + * }, + * // more... + * ] + * } + * + * @param string $type + * @param int $offset + * @param int $count + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list(string $type, int $offset = 0, int $count = 20) + { + $params = [ + 'type' => $type, + 'offset' => $offset, + 'count' => $count, + ]; + + return $this->httpPostJson('cgi-bin/material/batchget_material', $params); + } + + /** + * Get stats of materials. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function stats() + { + return $this->httpGet('cgi-bin/material/get_materialcount'); + } + + /** + * Upload material. + * + * @param string $type + * @param string $path + * @param array $form + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function upload(string $type, string $path, array $form = []) + { + if (!file_exists($path) || !is_readable($path)) { + throw new InvalidArgumentException(sprintf('File does not exist, or the file is unreadable: "%s"', $path)); + } + + $form['type'] = $type; + + return $this->httpUpload($this->getApiByType($type), ['media' => $path], $form); + } + + /** + * Get API by type. + * + * @param string $type + * + * @return string + */ + public function getApiByType(string $type) + { + switch ($type) { + case 'news_image': + return 'cgi-bin/media/uploadimg'; + default: + return 'cgi-bin/material/add_material'; + } + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Material/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Material/ServiceProvider.php new file mode 100755 index 0000000..089a8f8 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Material/ServiceProvider.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +/** + * ServiceProvider.php. + * + * This file is part of the wechat. + * + * (c) overtrue + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Material; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['material'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Menu/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Menu/Client.php new file mode 100755 index 0000000..20c2a79 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Menu/Client.php @@ -0,0 +1,90 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Menu; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * Get all menus. + * + * @return mixed + */ + public function list() + { + return $this->httpGet('cgi-bin/menu/get'); + } + + /** + * Get current menus. + * + * @return mixed + */ + public function current() + { + return $this->httpGet('cgi-bin/get_current_selfmenu_info'); + } + + /** + * Add menu. + * + * @param array $buttons + * @param array $matchRule + * + * @return mixed + */ + public function create(array $buttons, array $matchRule = []) + { + if (!empty($matchRule)) { + return $this->httpPostJson('cgi-bin/menu/addconditional', [ + 'button' => $buttons, + 'matchrule' => $matchRule, + ]); + } + + return $this->httpPostJson('cgi-bin/menu/create', ['button' => $buttons]); + } + + /** + * Destroy menu. + * + * @param int $menuId + * + * @return mixed + */ + public function delete(int $menuId = null) + { + if (is_null($menuId)) { + return $this->httpGet('cgi-bin/menu/delete'); + } + + return $this->httpPostJson('cgi-bin/menu/delconditional', ['menuid' => $menuId]); + } + + /** + * Test conditional menu. + * + * @param string $userId + * + * @return mixed + */ + public function match(string $userId) + { + return $this->httpPostJson('cgi-bin/menu/trymatch', ['user_id' => $userId]); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Menu/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Menu/ServiceProvider.php new file mode 100755 index 0000000..e79b105 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Menu/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Menu; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['menu'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/OAuth/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/OAuth/ServiceProvider.php new file mode 100755 index 0000000..ba176dc --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/OAuth/ServiceProvider.php @@ -0,0 +1,66 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\OAuth; + +use Overtrue\Socialite\SocialiteManager as Socialite; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['oauth'] = function ($app) { + $socialite = (new Socialite([ + 'wechat' => [ + 'client_id' => $app['config']['app_id'], + 'client_secret' => $app['config']['secret'], + 'redirect' => $this->prepareCallbackUrl($app), + ], + ], $app['request']))->driver('wechat'); + + $scopes = (array) $app['config']->get('oauth.scopes', ['snsapi_userinfo']); + + if (!empty($scopes)) { + $socialite->scopes($scopes); + } + + return $socialite; + }; + } + + /** + * Prepare the OAuth callback url for wechat. + * + * @param Container $app + * + * @return string + */ + private function prepareCallbackUrl($app) + { + $callback = $app['config']->get('oauth.callback'); + if (0 === stripos($callback, 'http')) { + return $callback; + } + $baseUrl = $app['request']->getSchemeAndHttpHost(); + + return $baseUrl.'/'.ltrim($callback, '/'); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/OCR/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/OCR/Client.php new file mode 100755 index 0000000..6aa44bc --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/OCR/Client.php @@ -0,0 +1,85 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\OCR; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; + +/** + * Class Client. + * + * @author joyeekk + */ +class Client extends BaseClient +{ + /** + * Allow image parameter type. + * + * @var array + */ + protected $allowTypes = ['photo', 'scan']; + + /** + * ID card OCR. + * + * @param string $path + * @param string $type + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function idCard(string $path, string $type = 'photo') + { + if (!\in_array($type, $this->allowTypes, true)) { + throw new InvalidArgumentException(sprintf("Unsupported type: '%s'", $type)); + } + + return $this->httpGet('cv/ocr/idcard', [ + 'type' => $type, + 'img_url' => $path, + ]); + } + + /** + * Bank card OCR. + * + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function bankCard(string $path) + { + return $this->httpGet('cv/ocr/bankcard', [ + 'img_url' => $path, + ]); + } + + /** + * Vehicle license OCR. + * + * @param string $path + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function vehicleLicense(string $path) + { + return $this->httpGet('cv/ocr/driving', [ + 'img_url' => $path, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/OCR/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/OCR/ServiceProvider.php new file mode 100755 index 0000000..1773079 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/OCR/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\OCR; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author joyeekk + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['ocr'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/POI/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/POI/Client.php new file mode 100755 index 0000000..6a8e570 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/POI/Client.php @@ -0,0 +1,145 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\POI; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * Get POI supported categories. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function categories() + { + return $this->httpGet('cgi-bin/poi/getwxcategory'); + } + + /** + * Get POI by ID. + * + * @param int $poiId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function get(int $poiId) + { + return $this->httpPostJson('cgi-bin/poi/getpoi', ['poi_id' => $poiId]); + } + + /** + * List POI. + * + * @param int $offset + * @param int $limit + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function list(int $offset = 0, int $limit = 10) + { + $params = [ + 'begin' => $offset, + 'limit' => $limit, + ]; + + return $this->httpPostJson('cgi-bin/poi/getpoilist', $params); + } + + /** + * Create a POI. + * + * @param array $baseInfo + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function create(array $baseInfo) + { + $params = [ + 'business' => [ + 'base_info' => $baseInfo, + ], + ]; + + return $this->httpPostJson('cgi-bin/poi/addpoi', $params); + } + + /** + * @param array $databaseInfo + * + * @return int + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function createAndGetId(array $databaseInfo) + { + /** @var array $response */ + $response = $this->detectAndCastResponseToType($this->create($databaseInfo), 'array'); + + return $response['poi_id']; + } + + /** + * Update a POI. + * + * @param int $poiId + * @param array $baseInfo + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function update(int $poiId, array $baseInfo) + { + $params = [ + 'business' => [ + 'base_info' => array_merge($baseInfo, ['poi_id' => $poiId]), + ], + ]; + + return $this->httpPostJson('cgi-bin/poi/updatepoi', $params); + } + + /** + * Delete a POI. + * + * @param int $poiId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function delete(int $poiId) + { + return $this->httpPostJson('cgi-bin/poi/delpoi', ['poi_id' => $poiId]); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/POI/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/POI/ServiceProvider.php new file mode 100755 index 0000000..156440b --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/POI/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\POI; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['poi'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Semantic/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Semantic/Client.php new file mode 100755 index 0000000..81b4d4d --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Semantic/Client.php @@ -0,0 +1,42 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Semantic; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * Get the semantic content of giving string. + * + * @param string $keyword + * @param string $categories + * @param array $optional + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function query(string $keyword, string $categories, array $optional = []) + { + $params = [ + 'query' => $keyword, + 'category' => $categories, + 'appid' => $this->app['config']['app_id'], + ]; + + return $this->httpPostJson('semantic/semproxy/search', array_merge($params, $optional)); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Semantic/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Semantic/ServiceProvider.php new file mode 100755 index 0000000..835b7fc --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Semantic/ServiceProvider.php @@ -0,0 +1,31 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Semantic; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['semantic'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Server/Guard.php b/vendor/overtrue/wechat/src/OfficialAccount/Server/Guard.php new file mode 100755 index 0000000..c723847 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Server/Guard.php @@ -0,0 +1,30 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Server; + +use EasyWeChat\Kernel\ServerGuard; + +/** + * Class Guard. + * + * @author overtrue + */ +class Guard extends ServerGuard +{ + /** + * @return bool + */ + protected function shouldReturnRawResponse(): bool + { + return !is_null($this->app['request']->get('echostr')); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Server/Handlers/EchoStrHandler.php b/vendor/overtrue/wechat/src/OfficialAccount/Server/Handlers/EchoStrHandler.php new file mode 100755 index 0000000..f076abf --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Server/Handlers/EchoStrHandler.php @@ -0,0 +1,51 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Server\Handlers; + +use EasyWeChat\Kernel\Contracts\EventHandlerInterface; +use EasyWeChat\Kernel\Decorators\FinallyResult; +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Class EchoStrHandler. + * + * @author overtrue + */ +class EchoStrHandler implements EventHandlerInterface +{ + /** + * @var ServiceContainer + */ + protected $app; + + /** + * EchoStrHandler constructor. + * + * @param ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + $this->app = $app; + } + + /** + * @param mixed $payload + * + * @return FinallyResult|null + */ + public function handle($payload = null) + { + if ($str = $this->app['request']->get('echostr')) { + return new FinallyResult($str); + } + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Server/ServiceProvider.php new file mode 100755 index 0000000..0c6716b --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Server/ServiceProvider.php @@ -0,0 +1,46 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Server; + +use EasyWeChat\Kernel\Encryptor; +use EasyWeChat\OfficialAccount\Server\Handlers\EchoStrHandler; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + !isset($app['encryptor']) && $app['encryptor'] = function ($app) { + return new Encryptor( + $app['config']['app_id'], + $app['config']['token'], + $app['config']['aes_key'] + ); + }; + + !isset($app['server']) && $app['server'] = function ($app) { + $guard = new Guard($app); + $guard->push(new EchoStrHandler($app)); + + return $guard; + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/Client.php new file mode 100755 index 0000000..54f3537 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/Client.php @@ -0,0 +1,73 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\ShakeAround; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * @param array $data + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function register($data) + { + return $this->httpPostJson('shakearound/account/register', $data); + } + + /** + * Get audit status. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function status() + { + return $this->httpGet('shakearound/account/auditstatus'); + } + + /** + * Get shake info. + * + * @param string $ticket + * @param bool $needPoi + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function user(string $ticket, bool $needPoi = false) + { + $params = [ + 'ticket' => $ticket, + ]; + + if ($needPoi) { + $params['need_poi'] = 1; + } + + return $this->httpPostJson('shakearound/user/getshakeinfo', $params); + } + + /** + * @param string $ticket + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function userWithPoi(string $ticket) + { + return $this->user($ticket, true); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/DeviceClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/DeviceClient.php new file mode 100755 index 0000000..70ae574 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/DeviceClient.php @@ -0,0 +1,175 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\ShakeAround; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; + +/** + * Class DeviceClient. + * + * @author allen05ren + */ +class DeviceClient extends BaseClient +{ + /** + * @param array $data + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function apply(array $data) + { + return $this->httpPostJson('shakearound/device/applyid', $data); + } + + /** + * Get audit status. + * + * @param int $applyId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function status(int $applyId) + { + $params = [ + 'apply_id' => $applyId, + ]; + + return $this->httpPostJson('shakearound/device/applystatus', $params); + } + + /** + * Update a device comment. + * + * @param array $deviceIdentifier + * @param string $comment + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function update(array $deviceIdentifier, string $comment) + { + $params = [ + 'device_identifier' => $deviceIdentifier, + 'comment' => $comment, + ]; + + return $this->httpPostJson('shakearound/device/update', $params); + } + + /** + * Bind location for device. + * + * @param array $deviceIdentifier + * @param int $poiId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws InvalidArgumentException + */ + public function bindPoi(array $deviceIdentifier, int $poiId) + { + $params = [ + 'device_identifier' => $deviceIdentifier, + 'poi_id' => $poiId, + ]; + + return $this->httpPostJson('shakearound/device/bindlocation', $params); + } + + /** + * @param array $deviceIdentifier + * @param int $poiId + * @param string $appId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function bindThirdPoi(array $deviceIdentifier, int $poiId, string $appId) + { + $params = [ + 'device_identifier' => $deviceIdentifier, + 'poi_id' => $poiId, + 'type' => 2, + 'poi_appid' => $appId, + ]; + + return $this->httpPostJson('shakearound/device/bindlocation', $params); + } + + /** + * Fetch batch of devices by deviceIds. + * + * @param array $deviceIdentifiers + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function listByIds(array $deviceIdentifiers) + { + $params = [ + 'type' => 1, + 'device_identifiers' => $deviceIdentifiers, + ]; + + return $this->search($params); + } + + /** + * Pagination to get batch of devices. + * + * @param int $lastId + * @param int $count + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function list(int $lastId, int $count) + { + $params = [ + 'type' => 2, + 'last_seen' => $lastId, + 'count' => $count, + ]; + + return $this->search($params); + } + + /** + * Fetch batch of devices by applyId. + * + * @param int $applyId + * @param int $lastId + * @param int $count + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function listByApplyId(int $applyId, int $lastId, int $count) + { + $params = [ + 'type' => 3, + 'apply_id' => $applyId, + 'last_seen' => $lastId, + 'count' => $count, + ]; + + return $this->search($params); + } + + /** + * Fetch batch of devices. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function search(array $params) + { + return $this->httpPostJson('shakearound/device/search', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/GroupClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/GroupClient.php new file mode 100755 index 0000000..1e4a22e --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/GroupClient.php @@ -0,0 +1,146 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\ShakeAround; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class GroupClient. + * + * @author allen05ren + */ +class GroupClient extends BaseClient +{ + /** + * Add device group. + * + * @param string $name + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function create(string $name) + { + $params = [ + 'group_name' => $name, + ]; + + return $this->httpPostJson('shakearound/device/group/add', $params); + } + + /** + * Update a device group name. + * + * @param int $groupId + * @param string $name + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function update(int $groupId, string $name) + { + $params = [ + 'group_id' => $groupId, + 'group_name' => $name, + ]; + + return $this->httpPostJson('shakearound/device/group/update', $params); + } + + /** + * Delete device group. + * + * @param int $groupId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function delete(int $groupId) + { + $params = [ + 'group_id' => $groupId, + ]; + + return $this->httpPostJson('shakearound/device/group/delete', $params); + } + + /** + * List all device groups. + * + * @param int $begin + * @param int $count + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function list(int $begin, int $count) + { + $params = [ + 'begin' => $begin, + 'count' => $count, + ]; + + return $this->httpPostJson('shakearound/device/group/getlist', $params); + } + + /** + * Get detail of a device group. + * + * @param int $groupId + * @param int $begin + * @param int $count + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function get(int $groupId, int $begin, int $count) + { + $params = [ + 'group_id' => $groupId, + 'begin' => $begin, + 'count' => $count, + ]; + + return $this->httpPostJson('shakearound/device/group/getdetail', $params); + } + + /** + * Add one or more devices to a device group. + * + * @param int $groupId + * @param array $deviceIdentifiers + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function addDevices(int $groupId, array $deviceIdentifiers) + { + $params = [ + 'group_id' => $groupId, + 'device_identifiers' => $deviceIdentifiers, + ]; + + return $this->httpPostJson('shakearound/device/group/adddevice', $params); + } + + /** + * Remove one or more devices from a device group. + * + * @param int $groupId + * @param array $deviceIdentifiers + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function removeDevices(int $groupId, array $deviceIdentifiers) + { + $params = [ + 'group_id' => $groupId, + 'device_identifiers' => $deviceIdentifiers, + ]; + + return $this->httpPostJson('shakearound/device/group/deletedevice', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/MaterialClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/MaterialClient.php new file mode 100755 index 0000000..b3f360b --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/MaterialClient.php @@ -0,0 +1,42 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\ShakeAround; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; + +/** + * Class MaterialClient. + * + * @author allen05ren + */ +class MaterialClient extends BaseClient +{ + /** + * Upload image material. + * + * @param string $path + * @param string $type + * + * @return string + * + * @throws InvalidArgumentException + */ + public function uploadImage(string $path, string $type = 'icon') + { + if (!file_exists($path) || !is_readable($path)) { + throw new InvalidArgumentException(sprintf('File does not exist, or the file is unreadable: "%s"', $path)); + } + + return $this->httpUpload('shakearound/material/add', ['media' => $path], [], ['type' => strtolower($type)]); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/PageClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/PageClient.php new file mode 100755 index 0000000..acb3a30 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/PageClient.php @@ -0,0 +1,95 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\ShakeAround; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class PageClient. + * + * @author allen05ren + */ +class PageClient extends BaseClient +{ + /** + * @param array $data + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function create(array $data) + { + return $this->httpPostJson('shakearound/page/add', $data); + } + + /** + * @param int $pageId + * @param array $data + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function update(int $pageId, array $data) + { + return $this->httpPostJson('shakearound/page/update', array_merge(['page_id' => $pageId], $data)); + } + + /** + * Fetch batch of pages by pageIds. + * + * @param array $pageIds + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function listByIds(array $pageIds) + { + $params = [ + 'type' => 1, + 'page_ids' => $pageIds, + ]; + + return $this->httpPostJson('shakearound/page/search', $params); + } + + /** + * Pagination to get batch of pages. + * + * @param int $begin + * @param int $count + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function list(int $begin, int $count) + { + $params = [ + 'type' => 2, + 'begin' => $begin, + 'count' => $count, + ]; + + return $this->httpPostJson('shakearound/page/search', $params); + } + + /** + * delete a page. + * + * @param int $pageId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function delete(int $pageId) + { + $params = [ + 'page_id' => $pageId, + ]; + + return $this->httpPostJson('shakearound/page/delete', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/RelationClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/RelationClient.php new file mode 100755 index 0000000..6ac9f38 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/RelationClient.php @@ -0,0 +1,78 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\ShakeAround; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class RelationClient. + * + * @author allen05ren + */ +class RelationClient extends BaseClient +{ + /** + * Bind pages for device. + * + * @param array $deviceIdentifier + * @param array $pageIds + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function bindPages(array $deviceIdentifier, array $pageIds) + { + $params = [ + 'device_identifier' => $deviceIdentifier, + 'page_ids' => $pageIds, + ]; + + return $this->httpPostJson('shakearound/device/bindpage', $params); + } + + /** + * Get pageIds by deviceId. + * + * @param array $deviceIdentifier + * + * @return array|\EasyWeChat\Kernel\Support\Collection + */ + public function listByDeviceId(array $deviceIdentifier) + { + $params = [ + 'type' => 1, + 'device_identifier' => $deviceIdentifier, + ]; + + return $this->httpPostJson('shakearound/relation/search', $params); + } + + /** + * Get devices by pageId. + * + * @param int $pageId + * @param int $begin + * @param int $count + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function listByPageId(int $pageId, int $begin, int $count) + { + $params = [ + 'type' => 2, + 'page_id' => $pageId, + 'begin' => $begin, + 'count' => $count, + ]; + + return $this->httpPostJson('shakearound/relation/search', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ServiceProvider.php new file mode 100755 index 0000000..a13d2b0 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ServiceProvider.php @@ -0,0 +1,57 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\ShakeAround; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author allen05ren + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['shake_around'] = function ($app) { + return new ShakeAround($app); + }; + + $app['shake_around.device'] = function ($app) { + return new DeviceClient($app); + }; + + $app['shake_around.page'] = function ($app) { + return new PageClient($app); + }; + + $app['shake_around.material'] = function ($app) { + return new MaterialClient($app); + }; + + $app['shake_around.group'] = function ($app) { + return new GroupClient($app); + }; + + $app['shake_around.relation'] = function ($app) { + return new RelationClient($app); + }; + + $app['shake_around.stats'] = function ($app) { + return new StatsClient($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ShakeAround.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ShakeAround.php new file mode 100755 index 0000000..666a38a --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/ShakeAround.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\ShakeAround; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; + +/** + * Class Card. + * + * @author overtrue + * + * @property \EasyWeChat\OfficialAccount\ShakeAround\DeviceClient $device + * @property \EasyWeChat\OfficialAccount\ShakeAround\GroupClient $group + * @property \EasyWeChat\OfficialAccount\ShakeAround\MaterialClient $material + * @property \EasyWeChat\OfficialAccount\ShakeAround\RelationClient $relation + * @property \EasyWeChat\OfficialAccount\ShakeAround\StatsClient $stats + */ +class ShakeAround extends Client +{ + /** + * @param string $property + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function __get($property) + { + if (isset($this->app["shake_around.{$property}"])) { + return $this->app["shake_around.{$property}"]; + } + + throw new InvalidArgumentException(sprintf('No shake_around service named "%s".', $property)); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/StatsClient.php b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/StatsClient.php new file mode 100755 index 0000000..c97eb32 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/ShakeAround/StatsClient.php @@ -0,0 +1,98 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\ShakeAround; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class StatsClient. + * + * @author allen05ren + */ +class StatsClient extends BaseClient +{ + /** + * Fetch statistics data by deviceId. + * + * @param array $deviceIdentifier + * @param int $beginTime (Unix timestamp) + * @param int $endTime (Unix timestamp) + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function deviceSummary(array $deviceIdentifier, int $beginTime, int $endTime) + { + $params = [ + 'device_identifier' => $deviceIdentifier, + 'begin_date' => $beginTime, + 'end_date' => $endTime, + ]; + + return $this->httpPostJson('shakearound/statistics/device', $params); + } + + /** + * Fetch all devices statistics data by date. + * + * @param int $timestamp + * @param int $pageIndex + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function devicesSummary(int $timestamp, int $pageIndex) + { + $params = [ + 'date' => $timestamp, + 'page_index' => $pageIndex, + ]; + + return $this->httpPostJson('shakearound/statistics/devicelist', $params); + } + + /** + * Fetch statistics data by pageId. + * + * @param int $pageId + * @param int $beginTime (Unix timestamp) + * @param int $endTime (Unix timestamp) + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function pageSummary(int $pageId, int $beginTime, int $endTime) + { + $params = [ + 'page_id' => $pageId, + 'begin_date' => $beginTime, + 'end_date' => $endTime, + ]; + + return $this->httpPostJson('shakearound/statistics/page', $params); + } + + /** + * Fetch all pages statistics data by date. + * + * @param int $timestamp + * @param int $pageIndex + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function pagesSummary(int $timestamp, int $pageIndex) + { + $params = [ + 'date' => $timestamp, + 'page_index' => $pageIndex, + ]; + + return $this->httpPostJson('shakearound/statistics/pagelist', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Store/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/Store/Client.php new file mode 100755 index 0000000..96318dc --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Store/Client.php @@ -0,0 +1,175 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Store; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author bigface + */ +class Client extends BaseClient +{ + /** + * Get WXA supported categories. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function categories() + { + return $this->httpGet('wxa/get_merchant_category'); + } + + /** + * Get district from tencent map . + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function districts() + { + return $this->httpGet('wxa/get_district'); + } + + /** + * Search store from tencent map. + * + * @param int $districtId + * @param string $keyword + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function searchFromMap(int $districtId, string $keyword) + { + $params = [ + 'districtid' => $districtId, + 'keyword' => $keyword, + ]; + + return $this->httpPostJson('wxa/search_map_poi', $params); + } + + /** + * Get store check status. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function getStatus() + { + return $this->httpPostJson('wxa/get_merchant_audit_info'); + } + + /** + * Create a merchant. + * + * @param array $baseInfo + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function createMerchant(array $baseInfo) + { + return $this->httpPostJson('wxa/apply_merchant', $baseInfo); + } + + /** + * Update a merchant. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function updateMerchant(array $params) + { + return $this->httpPostJson('wxa/modify_merchant', $params); + } + + /** + * Create a store from tencent map. + * + * @param array $baseInfo + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function createFromMap(array $baseInfo) + { + return $this->httpPostJson('wxa/create_map_poi', $baseInfo); + } + + /** + * Create a store. + * + * @param array $baseInfo + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function create(array $baseInfo) + { + return $this->httpPostJson('wxa/add_store', $baseInfo); + } + + /** + * Update a store. + * + * @param int $poiId + * @param array $baseInfo + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function update(int $poiId, array $baseInfo) + { + $params = array_merge($baseInfo, ['poi_id' => $poiId]); + + return $this->httpPostJson('wxa/update_store', $params); + } + + /** + * Get store by ID. + * + * @param int $poiId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function get(int $poiId) + { + return $this->httpPostJson('wxa/get_store_info', ['poi_id' => $poiId]); + } + + /** + * List store. + * + * @param int $offset + * @param int $limit + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function list(int $offset = 0, int $limit = 10) + { + $params = [ + 'offset' => $offset, + 'limit' => $limit, + ]; + + return $this->httpPostJson('wxa/get_store_list', $params); + } + + /** + * Delete a store. + * + * @param int $poiId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function delete(int $poiId) + { + return $this->httpPostJson('wxa/del_store', ['poi_id' => $poiId]); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/Store/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/Store/ServiceProvider.php new file mode 100755 index 0000000..f5c48d7 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/Store/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\Store; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author bigface + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['store'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/Client.php b/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/Client.php new file mode 100755 index 0000000..5729289 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/Client.php @@ -0,0 +1,216 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\TemplateMessage; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use ReflectionClass; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + const API_SEND = 'cgi-bin/message/template/send'; + + /** + * Attributes. + * + * @var array + */ + protected $message = [ + 'touser' => '', + 'template_id' => '', + 'url' => '', + 'data' => [], + 'miniprogram' => '', + ]; + + /** + * Required attributes. + * + * @var array + */ + protected $required = ['touser', 'template_id']; + + /** + * Set industry. + * + * @param int $industryOne + * @param int $industryTwo + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function setIndustry($industryOne, $industryTwo) + { + $params = [ + 'industry_id1' => $industryOne, + 'industry_id2' => $industryTwo, + ]; + + return $this->httpPostJson('cgi-bin/template/api_set_industry', $params); + } + + /** + * Get industry. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function getIndustry() + { + return $this->httpPostJson('cgi-bin/template/get_industry'); + } + + /** + * Add a template and get template ID. + * + * @param string $shortId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function addTemplate($shortId) + { + $params = ['template_id_short' => $shortId]; + + return $this->httpPostJson('cgi-bin/template/api_add_template', $params); + } + + /** + * Get private templates. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function getPrivateTemplates() + { + return $this->httpPostJson('cgi-bin/template/get_all_private_template'); + } + + /** + * Delete private template. + * + * @param string $templateId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function deletePrivateTemplate($templateId) + { + $params = ['template_id' => $templateId]; + + return $this->httpPostJson('cgi-bin/template/del_private_template', $params); + } + + /** + * Send a template message. + * + * @param array $data + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function send(array $data = []) + { + $params = $this->formatMessage($data); + + $this->restoreMessage(); + + return $this->httpPostJson(static::API_SEND, $params); + } + + /** + * Send template-message for subscription. + * + * @param array $data + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function sendSubscription(array $data = []) + { + $params = $this->formatMessage($data); + + $this->restoreMessage(); + + return $this->httpPostJson('cgi-bin/message/template/subscribe', $params); + } + + /** + * @param array $data + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + protected function formatMessage(array $data = []) + { + $params = array_merge($this->message, $data); + + foreach ($params as $key => $value) { + if (in_array($key, $this->required, true) && empty($value) && empty($this->message[$key])) { + throw new InvalidArgumentException(sprintf('Attribute "%s" can not be empty!', $key)); + } + + $params[$key] = empty($value) ? $this->message[$key] : $value; + } + + $params['data'] = $this->formatData($params['data'] ?? []); + + return $params; + } + + /** + * @param array $data + * + * @return array + */ + protected function formatData(array $data) + { + $formatted = []; + + foreach ($data as $key => $value) { + if (is_array($value)) { + if (isset($value['value'])) { + $formatted[$key] = $value; + + continue; + } + + if (count($value) >= 2) { + $value = [ + 'value' => $value[0], + 'color' => $value[1], + ]; + } + } else { + $value = [ + 'value' => strval($value), + ]; + } + + $formatted[$key] = $value; + } + + return $formatted; + } + + /** + * Restore message. + */ + protected function restoreMessage() + { + $this->message = (new ReflectionClass(static::class))->getDefaultProperties()['message']; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/ServiceProvider.php new file mode 100755 index 0000000..98476fc --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/TemplateMessage/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\TemplateMessage; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['template_message'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/User/ServiceProvider.php b/vendor/overtrue/wechat/src/OfficialAccount/User/ServiceProvider.php new file mode 100755 index 0000000..c11d8b3 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/User/ServiceProvider.php @@ -0,0 +1,35 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\User; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['user'] = function ($app) { + return new UserClient($app); + }; + + $app['user_tag'] = function ($app) { + return new TagClient($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/User/TagClient.php b/vendor/overtrue/wechat/src/OfficialAccount/User/TagClient.php new file mode 100755 index 0000000..8daacb9 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/User/TagClient.php @@ -0,0 +1,168 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\User; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class TagClient. + * + * @author overtrue + */ +class TagClient extends BaseClient +{ + /** + * Create tag. + * + * @param string $name + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function create(string $name) + { + $params = [ + 'tag' => ['name' => $name], + ]; + + return $this->httpPostJson('cgi-bin/tags/create', $params); + } + + /** + * List all tags. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list() + { + return $this->httpGet('cgi-bin/tags/get'); + } + + /** + * Update a tag name. + * + * @param int $tagId + * @param string $name + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function update(int $tagId, string $name) + { + $params = [ + 'tag' => [ + 'id' => $tagId, + 'name' => $name, + ], + ]; + + return $this->httpPostJson('cgi-bin/tags/update', $params); + } + + /** + * Delete tag. + * + * @param int $tagId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function delete(int $tagId) + { + $params = [ + 'tag' => ['id' => $tagId], + ]; + + return $this->httpPostJson('cgi-bin/tags/delete', $params); + } + + /** + * Get user tags. + * + * @param string $openid + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function userTags(string $openid) + { + $params = ['openid' => $openid]; + + return $this->httpPostJson('cgi-bin/tags/getidlist', $params); + } + + /** + * Get users from a tag. + * + * @param int $tagId + * @param string $nextOpenId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function usersOfTag(int $tagId, string $nextOpenId = '') + { + $params = [ + 'tagid' => $tagId, + 'next_openid' => $nextOpenId, + ]; + + return $this->httpPostJson('cgi-bin/user/tag/get', $params); + } + + /** + * Batch tag users. + * + * @param array $openids + * @param int $tagId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function tagUsers(array $openids, int $tagId) + { + $params = [ + 'openid_list' => $openids, + 'tagid' => $tagId, + ]; + + return $this->httpPostJson('cgi-bin/tags/members/batchtagging', $params); + } + + /** + * Untag users from a tag. + * + * @param array $openids + * @param int $tagId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function untagUsers(array $openids, int $tagId) + { + $params = [ + 'openid_list' => $openids, + 'tagid' => $tagId, + ]; + + return $this->httpPostJson('cgi-bin/tags/members/batchuntagging', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OfficialAccount/User/UserClient.php b/vendor/overtrue/wechat/src/OfficialAccount/User/UserClient.php new file mode 100755 index 0000000..85bfc33 --- /dev/null +++ b/vendor/overtrue/wechat/src/OfficialAccount/User/UserClient.php @@ -0,0 +1,166 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OfficialAccount\User; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class UserClient. + * + * @author overtrue + */ +class UserClient extends BaseClient +{ + /** + * Fetch a user by open id. + * + * @param string $openid + * @param string $lang + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(string $openid, string $lang = 'zh_CN') + { + $params = [ + 'openid' => $openid, + 'lang' => $lang, + ]; + + return $this->httpGet('cgi-bin/user/info', $params); + } + + /** + * Batch get users. + * + * @param array $openids + * @param string $lang + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function select(array $openids, string $lang = 'zh_CN') + { + return $this->httpPostJson('cgi-bin/user/info/batchget', [ + 'user_list' => array_map(function ($openid) use ($lang) { + return [ + 'openid' => $openid, + 'lang' => $lang, + ]; + }, $openids), + ]); + } + + /** + * List users. + * + * @param string $nextOpenId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list(string $nextOpenId = null) + { + $params = ['next_openid' => $nextOpenId]; + + return $this->httpGet('cgi-bin/user/get', $params); + } + + /** + * Set user remark. + * + * @param string $openid + * @param string $remark + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function remark(string $openid, string $remark) + { + $params = [ + 'openid' => $openid, + 'remark' => $remark, + ]; + + return $this->httpPostJson('cgi-bin/user/info/updateremark', $params); + } + + /** + * Get black list. + * + * @param string|null $beginOpenid + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function blacklist(string $beginOpenid = null) + { + $params = ['begin_openid' => $beginOpenid]; + + return $this->httpPostJson('cgi-bin/tags/members/getblacklist', $params); + } + + /** + * Batch block user. + * + * @param array|string $openidList + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function block($openidList) + { + $params = ['openid_list' => (array) $openidList]; + + return $this->httpPostJson('cgi-bin/tags/members/batchblacklist', $params); + } + + /** + * Batch unblock user. + * + * @param array $openidList + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function unblock($openidList) + { + $params = ['openid_list' => (array) $openidList]; + + return $this->httpPostJson('cgi-bin/tags/members/batchunblacklist', $params); + } + + /** + * @param string $oldAppId + * @param array $openidList + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function changeOpenid(string $oldAppId, array $openidList) + { + $params = [ + 'from_appid' => $oldAppId, + 'openid_list' => $openidList, + ]; + + return $this->httpPostJson('cgi-bin/changeopenid', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Application.php b/vendor/overtrue/wechat/src/OpenPlatform/Application.php new file mode 100755 index 0000000..459bb96 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Application.php @@ -0,0 +1,220 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform; + +use EasyWeChat\Kernel\ServiceContainer; +use EasyWeChat\MiniProgram\Encryptor; +use EasyWeChat\OpenPlatform\Authorizer\Auth\AccessToken; +use EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Application as MiniProgram; +use EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Auth\Client; +use EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Account\Client as AccountClient; +use EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Application as OfficialAccount; +use EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\OAuth\ComponentDelegate; +use EasyWeChat\OpenPlatform\Authorizer\Server\Guard; + +/** + * Class Application. + * + * @property \EasyWeChat\OpenPlatform\Server\Guard $server + * @property \EasyWeChat\OpenPlatform\Auth\AccessToken $access_token + * @property \EasyWeChat\OpenPlatform\CodeTemplate\Client $code_template + * @property \EasyWeChat\OpenPlatform\Component\Client $component + * + * @method mixed handleAuthorize(string $authCode = null) + * @method mixed getAuthorizer(string $appId) + * @method mixed getAuthorizerOption(string $appId, string $name) + * @method mixed setAuthorizerOption(string $appId, string $name, string $value) + * @method mixed getAuthorizers(int $offset = 0, int $count = 500) + * @method mixed createPreAuthorizationCode() + */ +class Application extends ServiceContainer +{ + /** + * @var array + */ + protected $providers = [ + Auth\ServiceProvider::class, + Base\ServiceProvider::class, + Server\ServiceProvider::class, + CodeTemplate\ServiceProvider::class, + Component\ServiceProvider::class, + ]; + + /** + * @var array + */ + protected $defaultConfig = [ + 'http' => [ + 'timeout' => 5.0, + 'base_uri' => 'https://api.weixin.qq.com/', + ], + ]; + + /** + * Creates the officialAccount application. + * + * @param string $appId + * @param string|null $refreshToken + * @param \EasyWeChat\OpenPlatform\Authorizer\Auth\AccessToken|null $accessToken + * + * @return \EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Application + */ + public function officialAccount(string $appId, string $refreshToken = null, AccessToken $accessToken = null): OfficialAccount + { + $application = new OfficialAccount($this->getAuthorizerConfig($appId, $refreshToken), $this->getReplaceServices($accessToken) + [ + 'encryptor' => $this['encryptor'], + + 'account' => function ($app) { + return new AccountClient($app, $this); + }, + ]); + + $application->extend('oauth', function ($socialite) { + /* @var \Overtrue\Socialite\Providers\WeChatProvider $socialite */ + return $socialite->component(new ComponentDelegate($this)); + }); + + return $application; + } + + /** + * Creates the miniProgram application. + * + * @param string $appId + * @param string|null $refreshToken + * @param \EasyWeChat\OpenPlatform\Authorizer\Auth\AccessToken|null $accessToken + * + * @return \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Application + */ + public function miniProgram(string $appId, string $refreshToken = null, AccessToken $accessToken = null): MiniProgram + { + return new MiniProgram($this->getAuthorizerConfig($appId, $refreshToken), $this->getReplaceServices($accessToken) + [ + 'encryptor' => function () { + return new Encryptor($this['config']['app_id'], $this['config']['token'], $this['config']['aes_key']); + }, + + 'auth' => function ($app) { + return new Client($app, $this); + }, + ]); + } + + /** + * Return the pre-authorization login page url. + * + * @param string $callbackUrl + * @param string|array|null $optional + * + * @return string + */ + public function getPreAuthorizationUrl(string $callbackUrl, $optional = []): string + { + // 兼容旧版 API 设计 + if (\is_string($optional)) { + $optional = [ + 'pre_auth_code' => $optional, + ]; + } else { + $optional['pre_auth_code'] = $this->createPreAuthorizationCode()['pre_auth_code']; + } + + $queries = \array_merge($optional, [ + 'component_appid' => $this['config']['app_id'], + 'redirect_uri' => $callbackUrl, + ]); + + return 'https://mp.weixin.qq.com/cgi-bin/componentloginpage?'.http_build_query($queries); + } + + /** + * Return the pre-authorization login page url (mobile). + * + * @param string $callbackUrl + * @param string|array|null $optional + * + * @return string + */ + public function getMobilePreAuthorizationUrl(string $callbackUrl, $optional = []): string + { + // 兼容旧版 API 设计 + if (\is_string($optional)) { + $optional = [ + 'pre_auth_code' => $optional, + ]; + } else { + $optional['pre_auth_code'] = $this->createPreAuthorizationCode()['pre_auth_code']; + } + + $queries = \array_merge($optional, [ + 'component_appid' => $this['config']['app_id'], + 'redirect_uri' => $callbackUrl, + 'action' => 'bindcomponent', + 'no_scan' => 1, + ]); + + return 'https://mp.weixin.qq.com/safe/bindcomponent?'.http_build_query($queries).'#wechat_redirect'; + } + + /** + * @param string $appId + * @param string|null $refreshToken + * + * @return array + */ + protected function getAuthorizerConfig(string $appId, string $refreshToken = null): array + { + return $this['config']->merge([ + 'component_app_id' => $this['config']['app_id'], + 'app_id' => $appId, + 'refresh_token' => $refreshToken, + ])->toArray(); + } + + /** + * @param \EasyWeChat\OpenPlatform\Authorizer\Auth\AccessToken|null $accessToken + * + * @return array + */ + protected function getReplaceServices(AccessToken $accessToken = null): array + { + $services = [ + 'access_token' => $accessToken ?: function ($app) { + return new AccessToken($app, $this); + }, + + 'server' => function ($app) { + return new Guard($app); + }, + ]; + + foreach (['cache', 'http_client', 'log', 'logger', 'request'] as $reuse) { + if (isset($this[$reuse])) { + $services[$reuse] = $this[$reuse]; + } + } + + return $services; + } + + /** + * Handle dynamic calls. + * + * @param string $method + * @param array $args + * + * @return mixed + */ + public function __call($method, $args) + { + return $this->base->$method(...$args); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OpenPlatform/Auth/AccessToken.php new file mode 100755 index 0000000..c15d78d --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Auth/AccessToken.php @@ -0,0 +1,49 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Auth; + +use EasyWeChat\Kernel\AccessToken as BaseAccessToken; + +/** + * Class AccessToken. + * + * @author mingyoung + */ +class AccessToken extends BaseAccessToken +{ + /** + * @var string + */ + protected $requestMethod = 'POST'; + + /** + * @var string + */ + protected $tokenKey = 'component_access_token'; + + /** + * @var string + */ + protected $endpointToGetToken = 'cgi-bin/component/api_component_token'; + + /** + * @return array + */ + protected function getCredentials(): array + { + return [ + 'component_appid' => $this->app['config']['app_id'], + 'component_appsecret' => $this->app['config']['secret'], + 'component_verify_ticket' => $this->app['verify_ticket']->getTicket(), + ]; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Auth/ServiceProvider.php new file mode 100755 index 0000000..c60784b --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Auth/ServiceProvider.php @@ -0,0 +1,37 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Auth; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['verify_ticket'] = function ($app) { + return new VerifyTicket($app); + }; + + $app['access_token'] = function ($app) { + return new AccessToken($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Auth/VerifyTicket.php b/vendor/overtrue/wechat/src/OpenPlatform/Auth/VerifyTicket.php new file mode 100755 index 0000000..59afa67 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Auth/VerifyTicket.php @@ -0,0 +1,89 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Auth; + +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Traits\InteractsWithCache; +use EasyWeChat\OpenPlatform\Application; + +/** + * Class VerifyTicket. + * + * @author mingyoung + */ +class VerifyTicket +{ + use InteractsWithCache; + + /** + * @var \EasyWeChat\OpenPlatform\Application + */ + protected $app; + + /** + * Constructor. + * + * @param \EasyWeChat\OpenPlatform\Application $app + */ + public function __construct(Application $app) + { + $this->app = $app; + } + + /** + * Put the credential `component_verify_ticket` in cache. + * + * @param string $ticket + * + * @return $this + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function setTicket(string $ticket) + { + $this->getCache()->set($this->getCacheKey(), $ticket, 3600); + + if (!$this->getCache()->has($this->getCacheKey())) { + throw new RuntimeException('Failed to cache verify ticket.'); + } + + return $this; + } + + /** + * Get the credential `component_verify_ticket` from cache. + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \Psr\SimpleCache\InvalidArgumentException + */ + public function getTicket(): string + { + if ($cached = $this->getCache()->get($this->getCacheKey())) { + return $cached; + } + + throw new RuntimeException('Credential "component_verify_ticket" does not exist in cache.'); + } + + /** + * Get cache key. + * + * @return string + */ + protected function getCacheKey(): string + { + return 'easywechat.open_platform.verify_ticket.'.$this->app['config']['app_id']; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/Account/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/Account/Client.php new file mode 100755 index 0000000..0216ebd --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/Account/Client.php @@ -0,0 +1,92 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\Aggregate\Account; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author Scholer + */ +class Client extends BaseClient +{ + /** + * 创建开放平台帐号并绑定公众号/小程序. + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function create() + { + $params = [ + 'appid' => $this->app['config']['app_id'], + ]; + + return $this->httpPostJson('cgi-bin/open/create', $params); + } + + /** + * 将公众号/小程序绑定到开放平台帐号下. + * + * @param string $openAppId 开放平台帐号appid + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function bindTo(string $openAppId) + { + $params = [ + 'appid' => $this->app['config']['app_id'], + 'open_appid' => $openAppId, + ]; + + return $this->httpPostJson('cgi-bin/open/bind', $params); + } + + /** + * 将公众号/小程序从开放平台帐号下解绑. + * + * @param string $openAppId 开放平台帐号appid + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function unbindFrom(string $openAppId) + { + $params = [ + 'appid' => $this->app['config']['app_id'], + 'open_appid' => $openAppId, + ]; + + return $this->httpPostJson('cgi-bin/open/unbind', $params); + } + + /** + * 获取公众号/小程序所绑定的开放平台帐号. + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getBinding() + { + $params = [ + 'appid' => $this->app['config']['app_id'], + ]; + + return $this->httpPostJson('cgi-bin/open/get', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/AggregateServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/AggregateServiceProvider.php new file mode 100755 index 0000000..d93293d --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Aggregate/AggregateServiceProvider.php @@ -0,0 +1,22 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\Aggregate; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class AggregateServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Auth/AccessToken.php new file mode 100755 index 0000000..07b808c --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Auth/AccessToken.php @@ -0,0 +1,79 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\Auth; + +use EasyWeChat\Kernel\AccessToken as BaseAccessToken; +use EasyWeChat\OpenPlatform\Application; +use Pimple\Container; + +/** + * Class AccessToken. + * + * @author mingyoung + */ +class AccessToken extends BaseAccessToken +{ + /** + * @var string + */ + protected $requestMethod = 'POST'; + + /** + * @var string + */ + protected $queryName = 'access_token'; + + /** + * {@inheritdoc}. + */ + protected $tokenKey = 'authorizer_access_token'; + + /** + * @var \EasyWeChat\OpenPlatform\Application + */ + protected $component; + + /** + * AuthorizerAccessToken constructor. + * + * @param \Pimple\Container $app + * @param \EasyWeChat\OpenPlatform\Application $component + */ + public function __construct(Container $app, Application $component) + { + parent::__construct($app); + + $this->component = $component; + } + + /** + * {@inheritdoc}. + */ + protected function getCredentials(): array + { + return [ + 'component_appid' => $this->component['config']['app_id'], + 'authorizer_appid' => $this->app['config']['app_id'], + 'authorizer_refresh_token' => $this->app['config']['refresh_token'], + ]; + } + + /** + * @return string + */ + public function getEndpoint(): string + { + return 'cgi-bin/component/api_authorizer_token?'.http_build_query([ + 'component_access_token' => $this->component['access_token']->getToken()['component_access_token'], + ]); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/Client.php new file mode 100755 index 0000000..4118572 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/Client.php @@ -0,0 +1,70 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Account; + +use EasyWeChat\OpenPlatform\Authorizer\Aggregate\Account\Client as BaseClient; + +/** + * Class Client. + * + * @author ClouderSky + */ +class Client extends BaseClient +{ + /** + * 获取账号基本信息. + */ + public function getBasicInfo() + { + return $this->httpPostJson('cgi-bin/account/getaccountbasicinfo'); + } + + /** + * 修改头像. + * + * @param string $mediaId 头像素材mediaId + * @param float $left 剪裁框左上角x坐标(取值范围:[0, 1]) + * @param float $top 剪裁框左上角y坐标(取值范围:[0, 1]) + * @param float $right 剪裁框右下角x坐标(取值范围:[0, 1]) + * @param float $bottom 剪裁框右下角y坐标(取值范围:[0, 1]) + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function updateAvatar( + string $mediaId, + float $left = 0.0, + float $top = 0.0, + float $right = 1.0, + float $bottom = 1.0 + ) { + $params = [ + 'head_img_media_id' => $mediaId, + 'x1' => $left, 'y1' => $top, 'x2' => $right, 'y2' => $bottom, + ]; + + return $this->httpPostJson('cgi-bin/account/modifyheadimage', $params); + } + + /** + * 修改功能介绍. + * + * @param string $signature 功能介绍(简介) + */ + public function updateSignature(string $signature) + { + $params = ['signature' => $signature]; + + return $this->httpPostJson('cgi-bin/account/modifysignature', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/ServiceProvider.php new file mode 100755 index 0000000..f062954 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Account/ServiceProvider.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Account; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['account'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Application.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Application.php new file mode 100755 index 0000000..b4b8c13 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Application.php @@ -0,0 +1,53 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram; + +use EasyWeChat\MiniProgram\Application as MiniProgram; +use EasyWeChat\OpenPlatform\Authorizer\Aggregate\AggregateServiceProvider; + +/** + * Class Application. + * + * @author mingyoung + * + * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Account\Client $account + * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Code\Client $code + * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Domain\Client $domain + * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Setting\Client $setting + * @property \EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Tester\Client $tester + */ +class Application extends MiniProgram +{ + /** + * Application constructor. + * + * @param array $config + * @param array $prepends + */ + public function __construct(array $config = [], array $prepends = []) + { + parent::__construct($config, $prepends); + + $providers = [ + AggregateServiceProvider::class, + Code\ServiceProvider::class, + Domain\ServiceProvider::class, + Account\ServiceProvider::class, + Setting\ServiceProvider::class, + Tester\ServiceProvider::class, + ]; + + foreach ($providers as $provider) { + $this->register(new $provider()); + } + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Auth/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Auth/Client.php new file mode 100755 index 0000000..05bb704 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Auth/Client.php @@ -0,0 +1,64 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Auth; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\ServiceContainer; +use EasyWeChat\OpenPlatform\Application; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * @var \EasyWeChat\OpenPlatform\Application + */ + protected $component; + + /** + * Client constructor. + * + * @param \EasyWeChat\Kernel\ServiceContainer $app + * @param \EasyWeChat\OpenPlatform\Application $component + */ + public function __construct(ServiceContainer $app, Application $component) + { + parent::__construct($app); + + $this->component = $component; + } + + /** + * Get session info by code. + * + * @param string $code + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function session(string $code) + { + $params = [ + 'appid' => $this->app['config']['app_id'], + 'js_code' => $code, + 'grant_type' => 'authorization_code', + 'component_appid' => $this->component['config']['app_id'], + 'component_access_token' => $this->component['access_token']->getToken()['component_access_token'], + ]; + + return $this->httpGet('sns/component/jscode2session', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/Client.php new file mode 100755 index 0000000..df19fae --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/Client.php @@ -0,0 +1,224 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Code; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * @param int $templateId + * @param string $extJson + * @param string $version + * @param string $description + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function commit(int $templateId, string $extJson, string $version, string $description) + { + return $this->httpPostJson('wxa/commit', [ + 'template_id' => $templateId, + 'ext_json' => $extJson, + 'user_version' => $version, + 'user_desc' => $description, + ]); + } + + /** + * @param string|null $path + * + * @return \EasyWeChat\Kernel\Http\Response + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getQrCode(string $path = null) + { + return $this->requestRaw('wxa/get_qrcode', 'GET', [ + 'query' => ['path' => $path], + ]); + } + + /** + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getCategory() + { + return $this->httpGet('wxa/get_category'); + } + + /** + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getPage() + { + return $this->httpGet('wxa/get_page'); + } + + /** + * @param array $itemList + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function submitAudit(array $itemList) + { + return $this->httpPostJson('wxa/submit_audit', [ + 'item_list' => $itemList, + ]); + } + + /** + * @param int $auditId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getAuditStatus(int $auditId) + { + return $this->httpPostJson('wxa/get_auditstatus', [ + 'auditid' => $auditId, + ]); + } + + /** + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getLatestAuditStatus() + { + return $this->httpGet('wxa/get_latest_auditstatus'); + } + + /** + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function release() + { + return $this->httpPostJson('wxa/release'); + } + + /** + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function withdrawAudit() + { + return $this->httpGet('wxa/undocodeaudit'); + } + + /** + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function rollbackRelease() + { + return $this->httpGet('wxa/revertcoderelease'); + } + + /** + * @param string $action + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function changeVisitStatus(string $action) + { + return $this->httpPostJson('wxa/change_visitstatus', [ + 'action' => $action, + ]); + } + + /** + * 分阶段发布. + * + * @param int $grayPercentage + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function grayRelease(int $grayPercentage) + { + return $this->httpPostJson('wxa/grayrelease', [ + 'gray_percentage' => $grayPercentage, + ]); + } + + /** + * 取消分阶段发布. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function revertGrayRelease() + { + return $this->httpGet('wxa/revertgrayrelease'); + } + + /** + * 查询当前分阶段发布详情. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getGrayRelease() + { + return $this->httpGet('wxa/getgrayreleaseplan'); + } + + /** + * 查询当前设置的最低基础库版本及各版本用户占比. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getSupportVersion() + { + return $this->httpPostJson('cgi-bin/wxopen/getweappsupportversion'); + } + + /** + * 设置最低基础库版本. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function setSupportVersion(string $version) + { + return $this->httpPostJson('cgi-bin/wxopen/setweappsupportversion', [ + 'version' => $version, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/ServiceProvider.php new file mode 100755 index 0000000..bce8611 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Code/ServiceProvider.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Code; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['code'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/Client.php new file mode 100755 index 0000000..0d55064 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/Client.php @@ -0,0 +1,52 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Domain; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * @param array $params + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function modify(array $params) + { + return $this->httpPostJson('wxa/modify_domain', $params); + } + + /** + * 设置小程序业务域名. + * + * @param array $domains + * @param string $action + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function setWebviewDomain(array $domains, $action = 'add') + { + return $this->httpPostJson('wxa/setwebviewdomain', [ + 'action' => $action, + 'webviewdomain' => $domains, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/ServiceProvider.php new file mode 100755 index 0000000..4eaef13 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Domain/ServiceProvider.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Domain; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['domain'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/Client.php new file mode 100755 index 0000000..9c81c29 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/Client.php @@ -0,0 +1,204 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Setting; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author ClouderSky + */ +class Client extends BaseClient +{ + /** + * 获取账号可以设置的所有类目. + */ + public function getAllCategories() + { + return $this->httpPostJson('cgi-bin/wxopen/getallcategories'); + } + + /** + * 添加类目. + * + * @param array $categories 类目数组 + */ + public function addCategories(array $categories) + { + $params = ['categories' => $categories]; + + return $this->httpPostJson('cgi-bin/wxopen/addcategory', $params); + } + + /** + * 删除类目. + * + * @param int $firstId 一级类目ID + * @param int $secondId 二级类目ID + */ + public function deleteCategories(int $firstId, int $secondId) + { + $params = ['first' => $firstId, 'second' => $secondId]; + + return $this->httpPostJson('cgi-bin/wxopen/deletecategory', $params); + } + + /** + * 获取账号已经设置的所有类目. + */ + public function getCategories() + { + return $this->httpPostJson('cgi-bin/wxopen/getcategory'); + } + + /** + * 修改类目. + * + * @param array $category 单个类目 + */ + public function updateCategory(array $category) + { + return $this->httpPostJson('cgi-bin/wxopen/modifycategory', $category); + } + + /** + * 小程序名称设置及改名. + * + * @param string $nickname 昵称 + * @param string $idCardMediaId 身份证照片素材ID + * @param string $licenseMediaId 组织机构代码证或营业执照素材ID + * @param array $otherStuffs 其他证明材料素材ID + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function setNickname( + string $nickname, + string $idCardMediaId = '', + string $licenseMediaId = '', + array $otherStuffs = [] + ) { + $params = [ + 'nick_name' => $nickname, + 'id_card' => $idCardMediaId, + 'license' => $licenseMediaId, + ]; + + for ($i = \count($otherStuffs) - 1; $i >= 0; --$i) { + $params['naming_other_stuff_'.($i + 1)] = $otherStuffs[$i]; + } + + return $this->httpPostJson('wxa/setnickname', $params); + } + + /** + * 小程序改名审核状态查询. + * + * @param int $auditId 审核单id + */ + public function getNicknameAuditStatus($auditId) + { + $params = ['audit_id' => $auditId]; + + return $this->httpPostJson('wxa/api_wxa_querynickname', $params); + } + + /** + * 微信认证名称检测. + * + * @param string $nickname 名称(昵称) + */ + public function isAvailableNickname($nickname) + { + $params = ['nick_name' => $nickname]; + + return $this->httpPostJson( + 'cgi-bin/wxverify/checkwxverifynickname', $params); + } + + /** + * 查询小程序是否可被搜索. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function getSearchStatus() + { + return $this->httpGet('wxa/getwxasearchstatus'); + } + + /** + * 设置小程序可被搜素. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function setSearchable() + { + return $this->httpPostJson('wxa/changewxasearchstatus', [ + 'status' => 0, + ]); + } + + /** + * 设置小程序不可被搜素. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function setUnsearchable() + { + return $this->httpPostJson('wxa/changewxasearchstatus', [ + 'status' => 1, + ]); + } + + /** + * 获取展示的公众号信息. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function getDisplayedOfficialAccount() + { + return $this->httpGet('wxa/getshowwxaitem'); + } + + /** + * 设置展示的公众号. + * + * @param string|bool $appid + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function setDisplayedOfficialAccount($appid) + { + return $this->httpPostJson('wxa/updateshowwxaitem', [ + 'appid' => $appid ?: null, + 'wxa_subscribe_biz_flag' => $appid ? 1 : 0, + ]); + } + + /** + * 获取可以用来设置的公众号列表. + * + * @param int $page + * @param int $num + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function getDisplayableOfficialAccounts(int $page, int $num) + { + return $this->httpGet('wxa/getwxamplinkforshow', [ + 'page' => $page, + 'num' => $num, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/ServiceProvider.php new file mode 100755 index 0000000..917aec5 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Setting/ServiceProvider.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Setting; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['setting'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/Client.php new file mode 100755 index 0000000..120ff52 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/Client.php @@ -0,0 +1,69 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Tester; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author caikeal + */ +class Client extends BaseClient +{ + /** + * 绑定小程序体验者. + * + * @param string $wechatId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function bind(string $wechatId) + { + return $this->httpPostJson('wxa/bind_tester', [ + 'wechatid' => $wechatId, + ]); + } + + /** + * 解绑小程序体验者. + * + * @param string $wechatId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function unbind(string $wechatId) + { + return $this->httpPostJson('wxa/unbind_tester', [ + 'wechatid' => $wechatId, + ]); + } + + /** + * 获取体验者列表. + * + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list() + { + return $this->httpPostJson('wxa/memberauth', [ + 'action' => 'get_experiencer', + ]); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/ServiceProvider.php new file mode 100755 index 0000000..ff1ffb3 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/MiniProgram/Tester/ServiceProvider.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\MiniProgram\Tester; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['tester'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Account/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Account/Client.php new file mode 100755 index 0000000..3a7a96d --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Account/Client.php @@ -0,0 +1,80 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Account; + +use EasyWeChat\Kernel\ServiceContainer; +use EasyWeChat\OpenPlatform\Application; +use EasyWeChat\OpenPlatform\Authorizer\Aggregate\Account\Client as BaseClient; + +/** + * Class Client. + * + * @author Keal + */ +class Client extends BaseClient +{ + /** + * @var \EasyWeChat\OpenPlatform\Application + */ + protected $component; + + /** + * Client constructor. + * + * @param \EasyWeChat\Kernel\ServiceContainer $app + * @param \EasyWeChat\OpenPlatform\Application $component + */ + public function __construct(ServiceContainer $app, Application $component) + { + parent::__construct($app); + + $this->component = $component; + } + + /** + * 从第三方平台跳转至微信公众平台授权注册页面, 授权注册小程序. + * + * @param string $callbackUrl + * @param bool $copyWxVerify + * + * @return string + */ + public function getFastRegistrationUrl(string $callbackUrl, bool $copyWxVerify = true): string + { + $queries = [ + 'copy_wx_verify' => $copyWxVerify, + 'component_appid' => $this->component['config']['app_id'], + 'appid' => $this->app['config']['app_id'], + 'redirect_uri' => $callbackUrl, + ]; + + return 'https://mp.weixin.qq.com/cgi-bin/fastregisterauth?'.http_build_query($queries); + } + + /** + * 小程序快速注册. + * + * @param string $ticket + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function register(string $ticket) + { + $params = [ + 'ticket' => $ticket, + ]; + + return $this->httpPostJson('cgi-bin/account/fastregister', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Application.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Application.php new file mode 100755 index 0000000..08509d2 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/Application.php @@ -0,0 +1,46 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount; + +use EasyWeChat\OfficialAccount\Application as OfficialAccount; +use EasyWeChat\OpenPlatform\Authorizer\Aggregate\AggregateServiceProvider; + +/** + * Class Application. + * + * @author mingyoung + * + * @property \EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\Account\Client $account + * @property \EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\MiniProgram\Client $mini_program + */ +class Application extends OfficialAccount +{ + /** + * Application constructor. + * + * @param array $config + * @param array $prepends + */ + public function __construct(array $config = [], array $prepends = []) + { + parent::__construct($config, $prepends); + + $providers = [ + AggregateServiceProvider::class, + MiniProgram\ServiceProvider::class, + ]; + + foreach ($providers as $provider) { + $this->register(new $provider()); + } + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/Client.php new file mode 100755 index 0000000..5996ac2 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/Client.php @@ -0,0 +1,74 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\MiniProgram; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author Keal + */ +class Client extends BaseClient +{ + /** + * 获取公众号关联的小程序. + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list() + { + return $this->httpPostJson('cgi-bin/wxopen/wxamplinkget'); + } + + /** + * 关联小程序. + * + * @param string $appId + * @param bool $notifyUsers + * @param bool $showProfile + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function link(string $appId, bool $notifyUsers = true, bool $showProfile = false) + { + $params = [ + 'appid' => $appId, + 'notify_users' => (string) $notifyUsers, + 'show_profile' => (string) $showProfile, + ]; + + return $this->httpPostJson('cgi-bin/wxopen/wxamplink', $params); + } + + /** + * 解除已关联的小程序. + * + * @param string $appId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function unlink(string $appId) + { + $params = [ + 'appid' => $appId, + ]; + + return $this->httpPostJson('cgi-bin/wxopen/wxampunlink', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/ServiceProvider.php new file mode 100755 index 0000000..31ce10b --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/MiniProgram/ServiceProvider.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\MiniProgram; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['mini_program'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/OAuth/ComponentDelegate.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/OAuth/ComponentDelegate.php new file mode 100755 index 0000000..a79d177 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/OfficialAccount/OAuth/ComponentDelegate.php @@ -0,0 +1,54 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\OfficialAccount\OAuth; + +use EasyWeChat\OpenPlatform\Application; +use Overtrue\Socialite\WeChatComponentInterface; + +/** + * Class ComponentDelegate. + * + * @author mingyoung + */ +class ComponentDelegate implements WeChatComponentInterface +{ + /** + * @var \EasyWeChat\OpenPlatform\Application + */ + protected $app; + + /** + * ComponentDelegate Constructor. + * + * @param \EasyWeChat\OpenPlatform\Application $app + */ + public function __construct(Application $app) + { + $this->app = $app; + } + + /** + * @return string + */ + public function getAppId() + { + return $this->app['config']['app_id']; + } + + /** + * @return string + */ + public function getToken() + { + return $this->app['access_token']->getToken()['component_access_token']; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Server/Guard.php b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Server/Guard.php new file mode 100755 index 0000000..d7efbd3 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Authorizer/Server/Guard.php @@ -0,0 +1,32 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Authorizer\Server; + +use EasyWeChat\Kernel\ServerGuard; + +/** + * Class Guard. + * + * @author mingyoung + */ +class Guard extends ServerGuard +{ + /** + * Get token from OpenPlatform encryptor. + * + * @return string + */ + protected function getToken() + { + return $this->app['encryptor']->getToken(); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Base/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Base/Client.php new file mode 100755 index 0000000..b41fb82 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Base/Client.php @@ -0,0 +1,145 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Base; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get authorization info. + * + * @param string|null $authCode + * + * @return mixed + */ + public function handleAuthorize(string $authCode = null) + { + $params = [ + 'component_appid' => $this->app['config']['app_id'], + 'authorization_code' => $authCode ?? $this->app['request']->get('auth_code'), + ]; + + return $this->httpPostJson('cgi-bin/component/api_query_auth', $params); + } + + /** + * Get authorizer info. + * + * @param string $appId + * + * @return mixed + */ + public function getAuthorizer(string $appId) + { + $params = [ + 'component_appid' => $this->app['config']['app_id'], + 'authorizer_appid' => $appId, + ]; + + return $this->httpPostJson('cgi-bin/component/api_get_authorizer_info', $params); + } + + /** + * Get options. + * + * @param string $appId + * @param string $name + * + * @return mixed + */ + public function getAuthorizerOption(string $appId, string $name) + { + $params = [ + 'component_appid' => $this->app['config']['app_id'], + 'authorizer_appid' => $appId, + 'option_name' => $name, + ]; + + return $this->httpPostJson('cgi-bin/component/api_get_authorizer_option', $params); + } + + /** + * Set authorizer option. + * + * @param string $appId + * @param string $name + * @param string $value + * + * @return mixed + */ + public function setAuthorizerOption(string $appId, string $name, string $value) + { + $params = [ + 'component_appid' => $this->app['config']['app_id'], + 'authorizer_appid' => $appId, + 'option_name' => $name, + 'option_value' => $value, + ]; + + return $this->httpPostJson('cgi-bin/component/api_set_authorizer_option', $params); + } + + /** + * Get authorizer list. + * + * @param int $offset + * @param int $count + * + * @return mixed + */ + public function getAuthorizers($offset = 0, $count = 500) + { + $params = [ + 'component_appid' => $this->app['config']['app_id'], + 'offset' => $offset, + 'count' => $count, + ]; + + return $this->httpPostJson('cgi-bin/component/api_get_authorizer_list', $params); + } + + /** + * Create pre-authorization code. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function createPreAuthorizationCode() + { + $params = [ + 'component_appid' => $this->app['config']['app_id'], + ]; + + return $this->httpPostJson('cgi-bin/component/api_create_preauthcode', $params); + } + + /** + * OpenPlatform Clear quota. + * + * @see https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1419318587 + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function clearQuota() + { + $params = [ + 'component_appid' => $this->app['config']['app_id'], + ]; + + return $this->httpPostJson('cgi-bin/component/clear_quota', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Base/ServiceProvider.php new file mode 100755 index 0000000..e647c41 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Base/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Base; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['base'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/Client.php new file mode 100755 index 0000000..495c590 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/Client.php @@ -0,0 +1,76 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\CodeTemplate; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author caikeal + */ +class Client extends BaseClient +{ + /** + * 获取草稿箱内的所有临时代码草稿 + * + * @return mixed + */ + public function getDrafts() + { + return $this->httpGet('wxa/gettemplatedraftlist'); + } + + /** + * 将草稿箱的草稿选为小程序代码模版. + * + * @param int $draftId + * + * @return mixed + */ + public function createFromDraft(int $draftId) + { + $params = [ + 'draft_id' => $draftId, + ]; + + return $this->httpPostJson('wxa/addtotemplate', $params); + } + + /** + * 获取代码模版库中的所有小程序代码模版. + * + * @return mixed + */ + public function list() + { + return $this->httpGet('wxa/gettemplatelist'); + } + + /** + * 删除指定小程序代码模版. + * + * @param string $templateId + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function delete($templateId) + { + $params = [ + 'template_id' => $templateId, + ]; + + return $this->httpPostJson('wxa/deletetemplate', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/ServiceProvider.php new file mode 100755 index 0000000..ab543a7 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/CodeTemplate/ServiceProvider.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\CodeTemplate; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['code_template'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Component/Client.php b/vendor/overtrue/wechat/src/OpenPlatform/Component/Client.php new file mode 100755 index 0000000..f063d93 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Component/Client.php @@ -0,0 +1,58 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Component; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author dudashuang + */ +class Client extends BaseClient +{ + /** + * 通过法人微信快速创建小程序. + * + * @param array $params + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function registerMiniProgram(array $params) + { + return $this->httpPostJson('cgi-bin/component/fastregisterweapp', $params, ['action' => 'create']); + } + + /** + * 查询创建任务状态. + * + * @param string $companyName + * @param string $legalPersonaWechat + * @param string $legalPersonaName + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getRegistrationStatus(string $companyName, string $legalPersonaWechat, string $legalPersonaName) + { + $params = [ + 'name' => $companyName, + 'legal_persona_wechat' => $legalPersonaWechat, + 'legal_persona_name' => $legalPersonaName, + ]; + + return $this->httpPostJson('cgi-bin/component/fastregisterweapp', $params, ['action' => 'search']); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Component/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Component/ServiceProvider.php new file mode 100755 index 0000000..83e309f --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Component/ServiceProvider.php @@ -0,0 +1,25 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Component; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['component'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Guard.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Guard.php new file mode 100755 index 0000000..b957890 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Server/Guard.php @@ -0,0 +1,59 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Server; + +use EasyWeChat\Kernel\ServerGuard; +use EasyWeChat\OpenPlatform\Server\Handlers\Authorized; +use EasyWeChat\OpenPlatform\Server\Handlers\Unauthorized; +use EasyWeChat\OpenPlatform\Server\Handlers\UpdateAuthorized; +use EasyWeChat\OpenPlatform\Server\Handlers\VerifyTicketRefreshed; +use Symfony\Component\HttpFoundation\Response; + +/** + * Class Guard. + * + * @author mingyoung + */ +class Guard extends ServerGuard +{ + const EVENT_AUTHORIZED = 'authorized'; + const EVENT_UNAUTHORIZED = 'unauthorized'; + const EVENT_UPDATE_AUTHORIZED = 'updateauthorized'; + const EVENT_COMPONENT_VERIFY_TICKET = 'component_verify_ticket'; + + /** + * @return \Symfony\Component\HttpFoundation\Response + */ + protected function resolve(): Response + { + $this->registerHandlers(); + + $message = $this->getMessage(); + + if (isset($message['InfoType'])) { + $this->dispatch($message['InfoType'], $message); + } + + return new Response(static::SUCCESS_EMPTY_RESPONSE); + } + + /** + * Register event handlers. + */ + protected function registerHandlers() + { + $this->on(self::EVENT_AUTHORIZED, Authorized::class); + $this->on(self::EVENT_UNAUTHORIZED, Unauthorized::class); + $this->on(self::EVENT_UPDATE_AUTHORIZED, UpdateAuthorized::class); + $this->on(self::EVENT_COMPONENT_VERIFY_TICKET, VerifyTicketRefreshed::class); + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Authorized.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Authorized.php new file mode 100755 index 0000000..fe7f9c6 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Authorized.php @@ -0,0 +1,30 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Server\Handlers; + +use EasyWeChat\Kernel\Contracts\EventHandlerInterface; + +/** + * Class Authorized. + * + * @author mingyoung + */ +class Authorized implements EventHandlerInterface +{ + /** + * {@inheritdoc}. + */ + public function handle($payload = null) + { + // Do nothing for the time being. + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Unauthorized.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Unauthorized.php new file mode 100755 index 0000000..158228b --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/Unauthorized.php @@ -0,0 +1,30 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Server\Handlers; + +use EasyWeChat\Kernel\Contracts\EventHandlerInterface; + +/** + * Class Unauthorized. + * + * @author mingyoung + */ +class Unauthorized implements EventHandlerInterface +{ + /** + * {@inheritdoc}. + */ + public function handle($payload = null) + { + // Do nothing for the time being. + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/UpdateAuthorized.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/UpdateAuthorized.php new file mode 100755 index 0000000..e73caa5 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/UpdateAuthorized.php @@ -0,0 +1,30 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Server\Handlers; + +use EasyWeChat\Kernel\Contracts\EventHandlerInterface; + +/** + * Class UpdateAuthorized. + * + * @author mingyoung + */ +class UpdateAuthorized implements EventHandlerInterface +{ + /** + * {@inheritdoc} + */ + public function handle($payload = null) + { + // Do nothing for the time being. + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/VerifyTicketRefreshed.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/VerifyTicketRefreshed.php new file mode 100755 index 0000000..e5ce58d --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Server/Handlers/VerifyTicketRefreshed.php @@ -0,0 +1,48 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Server\Handlers; + +use EasyWeChat\Kernel\Contracts\EventHandlerInterface; +use EasyWeChat\OpenPlatform\Application; + +/** + * Class VerifyTicketRefreshed. + * + * @author mingyoung + */ +class VerifyTicketRefreshed implements EventHandlerInterface +{ + /** + * @var \EasyWeChat\OpenPlatform\Application + */ + protected $app; + + /** + * Constructor. + * + * @param \EasyWeChat\OpenPlatform\Application $app + */ + public function __construct(Application $app) + { + $this->app = $app; + } + + /** + * {@inheritdoc}. + */ + public function handle($payload = null) + { + if (!empty($payload['ComponentVerifyTicket'])) { + $this->app['verify_ticket']->setTicket($payload['ComponentVerifyTicket']); + } + } +} diff --git a/vendor/overtrue/wechat/src/OpenPlatform/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenPlatform/Server/ServiceProvider.php new file mode 100755 index 0000000..7747061 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenPlatform/Server/ServiceProvider.php @@ -0,0 +1,34 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenPlatform\Server; + +use EasyWeChat\Kernel\Encryptor; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['encryptor'] = function ($app) { + return new Encryptor( + $app['config']['app_id'], + $app['config']['token'], + $app['config']['aes_key'] + ); + }; + + $app['server'] = function ($app) { + return new Guard($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Application.php b/vendor/overtrue/wechat/src/OpenWork/Application.php new file mode 100755 index 0000000..bde1421 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Application.php @@ -0,0 +1,85 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork; + +use EasyWeChat\Kernel\ServiceContainer; +use EasyWeChat\OpenWork\Work\Application as Work; + +/** + * Application. + * + * @author xiaomin + * + * @property \EasyWeChat\OpenWork\Server\Guard $server + * @property \EasyWeChat\OpenWork\Corp\Client $corp + * @property \EasyWeChat\OpenWork\Provider\Client $provider + * @property \EasyWeChat\OpenWork\SuiteAuth\AccessToken $suite_access_token + * @property \EasyWeChat\OpenWork\Auth\AccessToken $provider_access_token + * @property \EasyWeChat\OpenWork\SuiteAuth\SuiteTicket $suite_ticket + * @property \EasyWeChat\OpenWork\MiniProgram\Auth\Client $mini_program + */ +class Application extends ServiceContainer +{ + /** + * @var array + */ + protected $providers = [ + Auth\ServiceProvider::class, + SuiteAuth\ServiceProvider::class, + Server\ServiceProvider::class, + Corp\ServiceProvider::class, + Provider\ServiceProvider::class, + MiniProgram\ServiceProvider::class, + ]; + + /** + * @var array + */ + protected $defaultConfig = [ + // http://docs.guzzlephp.org/en/stable/request-options.html + 'http' => [ + 'base_uri' => 'https://qyapi.weixin.qq.com/', + ], + ]; + + /** + * Creates the miniProgram application. + * + * @return \EasyWeChat\Work\MiniProgram\Application + */ + public function miniProgram(): \EasyWeChat\Work\MiniProgram\Application + { + return new \EasyWeChat\Work\MiniProgram\Application($this->getConfig()); + } + + /** + * @param string $authCorpId 企业 corp_id + * @param string $permanentCode 企业永久授权码 + * + * @return Work + */ + public function work(string $authCorpId, string $permanentCode): Work + { + return new Work($authCorpId, $permanentCode, $this); + } + + /** + * @param string $method + * @param array $arguments + * + * @return mixed + */ + public function __call($method, $arguments) + { + return $this['base']->$method(...$arguments); + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OpenWork/Auth/AccessToken.php new file mode 100755 index 0000000..3f00a25 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Auth/AccessToken.php @@ -0,0 +1,52 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Auth; + +use EasyWeChat\Kernel\AccessToken as BaseAccessToken; + +/** + * AccessToken. + * + * @author xiaomin + */ +class AccessToken extends BaseAccessToken +{ + protected $requestMethod = 'POST'; + + /** + * @var string + */ + protected $endpointToGetToken = 'cgi-bin/service/get_provider_token'; + + /** + * @var string + */ + protected $tokenKey = 'provider_access_token'; + + /** + * @var string + */ + protected $cachePrefix = 'easywechat.kernel.provider_access_token.'; + + /** + * Credential for get token. + * + * @return array + */ + protected function getCredentials(): array + { + return [ + 'corpid' => $this->app['config']['corp_id'], //服务商的corpid + 'provider_secret' => $this->app['config']['secret'], + ]; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/Auth/ServiceProvider.php new file mode 100755 index 0000000..78aba05 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Auth/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Auth; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * ServiceProvider. + * + * @author xiaomin + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + isset($app['provider_access_token']) || $app['provider_access_token'] = function ($app) { + return new AccessToken($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Corp/Client.php b/vendor/overtrue/wechat/src/OpenWork/Corp/Client.php new file mode 100755 index 0000000..52eec2a --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Corp/Client.php @@ -0,0 +1,212 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Corp; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Client. + * + * @author xiaomin + */ +class Client extends BaseClient +{ + /** + * Client constructor. + * 三方接口有三个access_token,这里用的是suite_access_token. + * + * @param \EasyWeChat\Kernel\ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + parent::__construct($app, $app['suite_access_token']); + } + + /** + * 企业微信安装应用授权 url. + * + * @param string $preAuthCode 预授权码 + * @param string $redirectUri 回调地址 + * @param string $state + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getPreAuthorizationUrl(string $preAuthCode = '', string $redirectUri = '', string $state = '') + { + $redirectUri || $redirectUri = $this->app->config['redirect_uri_install']; + $preAuthCode || $preAuthCode = $this->getPreAuthCode()['pre_auth_code']; + $state || $state = rand(); + + $params = [ + 'suite_id' => $this->app['config']['suite_id'], + 'redirect_uri' => $redirectUri, + 'pre_auth_code' => $preAuthCode, + 'state' => $state, + ]; + + return 'https://open.work.weixin.qq.com/3rdapp/install?'.http_build_query($params); + } + + /** + * 获取预授权码. + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getPreAuthCode() + { + return $this->httpGet('cgi-bin/service/get_pre_auth_code'); + } + + /** + * 设置授权配置. + * 该接口可对某次授权进行配置. + * + * @param string $preAuthCode + * @param array $sessionInfo + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function setSession(string $preAuthCode, array $sessionInfo) + { + $params = [ + 'pre_auth_code' => $preAuthCode, + 'session_info' => $sessionInfo, + ]; + + return $this->httpPostJson('cgi-bin/service/set_session_info', $params); + } + + /** + * 获取企业永久授权码. + * + * @param string $authCode 临时授权码,会在授权成功时附加在redirect_uri中跳转回第三方服务商网站,或通过回调推送给服务商。长度为64至512个字节 + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getPermanentByCode(string $authCode) + { + $params = [ + 'auth_code' => $authCode, + ]; + + return $this->httpPostJson('cgi-bin/service/get_permanent_code', $params); + } + + /** + * 获取企业授权信息. + * + * @param string $authCorpId + * @param string $permanentCode + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getAuthorization(string $authCorpId, string $permanentCode) + { + $params = [ + 'auth_corpid' => $authCorpId, + 'permanent_code' => $permanentCode, + ]; + + return $this->httpPostJson('cgi-bin/service/get_auth_info', $params); + } + + /** + * 获取应用的管理员列表. + * + * @param string $authCorpId + * @param string $agentId + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getManagers(string $authCorpId, string $agentId) + { + $params = [ + 'auth_corpid' => $authCorpId, + 'agentid' => $agentId, + ]; + + return $this->httpPostJson('cgi-bin/service/get_admin_lis', $params); + } + + /** + * 获取登录url. + * + * @param string $redirectUri + * @param string $scope + * @param string|null $state + * + * @return string + */ + public function getOAuthRedirectUrl(string $redirectUri = '', string $scope = 'snsapi_userinfo', string $state = null) + { + $redirectUri || $redirectUri = $this->app->config['redirect_uri_oauth']; + $state || $state = rand(); + $params = [ + 'appid' => $this->app['config']['suite_id'], + 'redirect_uri' => $redirectUri, + 'response_type' => 'code', + 'scope' => $scope, + 'state' => $state, + ]; + + return 'https://open.weixin.qq.com/connect/oauth2/authorize?'.http_build_query($params).'#wechat_redirect'; + } + + /** + * 第三方根据code获取企业成员信息. + * + * @param string $code + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getUserByCode(string $code) + { + $params = [ + 'code' => $code, + ]; + + return $this->httpGet('cgi-bin/service/getuserinfo3rd', $params); + } + + /** + * 第三方使用user_ticket获取成员详情. + * + * @param string $userTicket + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getUserByTicket(string $userTicket) + { + $params = [ + 'user_ticket' => $userTicket, + ]; + + return $this->httpPostJson('cgi-bin/service/getuserdetail3rd', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Corp/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/Corp/ServiceProvider.php new file mode 100755 index 0000000..0cc8ea9 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Corp/ServiceProvider.php @@ -0,0 +1,38 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Corp; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * ServiceProvider. + * + * @author xiaomin + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * Registers services on the given container. + * + * This method should only be used to configure services and parameters. + * It should not get services. + * + * @param \Pimple\Container $app + */ + public function register(Container $app) + { + isset($app['corp']) || $app['corp'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/MiniProgram/Client.php b/vendor/overtrue/wechat/src/OpenWork/MiniProgram/Client.php new file mode 100755 index 0000000..29dae19 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/MiniProgram/Client.php @@ -0,0 +1,50 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\MiniProgram; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Class Client. + */ +class Client extends BaseClient +{ + /** + * Client constructor. + * + * @param \EasyWeChat\Kernel\ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + parent::__construct($app, $app['suite_access_token']); + } + + /** + * Get session info by code. + * + * @param string $code + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function session(string $code) + { + $params = [ + 'js_code' => $code, + 'grant_type' => 'authorization_code', + ]; + + return $this->httpGet('cgi-bin/service/miniprogram/jscode2session', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/MiniProgram/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/MiniProgram/ServiceProvider.php new file mode 100755 index 0000000..8e7dba2 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/MiniProgram/ServiceProvider.php @@ -0,0 +1,31 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\MiniProgram; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * ServiceProvider. + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + !isset($app['mini_program']) && $app['mini_program'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Provider/Client.php b/vendor/overtrue/wechat/src/OpenWork/Provider/Client.php new file mode 100755 index 0000000..07c6fe4 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Provider/Client.php @@ -0,0 +1,205 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Provider; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Client. + * + * @author xiaomin + */ +class Client extends BaseClient +{ + /** + * Client constructor. + * + * + * @param ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + parent::__construct($app, $app['provider_access_token']); + } + + /** + * 单点登录 - 获取登录的地址. + * + * @param string $redirectUri + * @param string $userType + * @param string $state + * + * @return string + */ + public function getLoginUrl(string $redirectUri = '', string $userType = 'admin', string $state = '') + { + $redirectUri || $redirectUri = $this->app->config['redirect_uri_single']; + $state || $state = rand(); + $params = [ + 'appid' => $this->app['config']['corp_id'], + 'redirect_uri' => $redirectUri, + 'usertype' => $userType, + 'state' => $state, + ]; + + return 'https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?'.http_build_query($params); + } + + /** + * 单点登录 - 获取登录用户信息. + * + * @param string $authCode + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getLoginInfo(string $authCode) + { + $params = [ + 'auth_code' => $authCode, + ]; + + return $this->httpPostJson('cgi-bin/service/get_login_info', $params); + } + + /** + * 获取注册定制化URL. + * + * @param string $registerCode + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function getRegisterUri(string $registerCode = '') + { + if (!$registerCode) { + /** @var array $response */ + $response = $this->detectAndCastResponseToType($this->getRegisterCode(), 'array'); + + $registerCode = $response['register_code']; + } + + $params = ['register_code' => $registerCode]; + + return 'https://open.work.weixin.qq.com/3rdservice/wework/register?'.http_build_query($params); + } + + /** + * 获取注册码. + * + * @param string $corpName + * @param string $adminName + * @param string $adminMobile + * @param string $state + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function getRegisterCode( + string $corpName = '', + string $adminName = '', + string $adminMobile = '', + string $state = '' + ) { + $params = []; + $params['template_id'] = $this->app['config']['reg_template_id']; + !empty($corpName) && $params['corp_name'] = $corpName; + !empty($adminName) && $params['admin_name'] = $adminName; + !empty($adminMobile) && $params['admin_mobile'] = $adminMobile; + !empty($state) && $params['state'] = $state; + + return $this->httpPostJson('cgi-bin/service/get_register_code', $params); + } + + /** + * 查询注册状态. + * + * Desc:该API用于查询企业注册状态,企业注册成功返回注册信息. + * + * @param string $registerCode + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function getRegisterInfo(string $registerCode) + { + $params = [ + 'register_code' => $registerCode, + ]; + + return $this->httpPostJson('cgi-bin/service/get_register_info', $params); + } + + /** + * 设置授权应用可见范围. + * + * Desc:调用该接口前提是开启通讯录迁移,收到授权成功通知后可调用。 + * 企业注册初始化安装应用后,应用默认可见范围为根部门。 + * 如需修改应用可见范围,服务商可以调用该接口设置授权应用的可见范围。 + * 该接口只能使用注册完成回调事件或者查询注册状态返回的access_token。 + * 调用设置通讯录同步完成后或者access_token超过30分钟失效(即解除通讯录锁定状态)则不能继续调用该接口。 + * + * @param string $accessToken + * @param string $agentId + * @param array $allowUser + * @param array $allowParty + * @param array $allowTag + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function setAgentScope( + string $accessToken, + string $agentId, + array $allowUser = [], + array $allowParty = [], + array $allowTag = [] + ) { + $params = [ + 'agentid' => $agentId, + 'allow_user' => $allowUser, + 'allow_party' => $allowParty, + 'allow_tag' => $allowTag, + 'access_token' => $accessToken, + ]; + + return $this->httpGet('cgi-bin/agent/set_scope', $params); + } + + /** + * 设置通讯录同步完成. + * + * Desc:该API用于设置通讯录同步完成,解除通讯录锁定状态,同时使通讯录迁移access_token失效。 + * + * @param string $accessToken + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function contactSyncSuccess(string $accessToken) + { + $params = ['access_token' => $accessToken]; + + return $this->httpGet('cgi-bin/sync/contact_sync_success', $params); + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Provider/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/Provider/ServiceProvider.php new file mode 100755 index 0000000..2185fec --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Provider/ServiceProvider.php @@ -0,0 +1,36 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Provider; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * ServiceProvider. + * + * @author xiaomin + */ +class ServiceProvider implements ServiceProviderInterface +{ + protected $app; + + /** + * @param Container $app + */ + public function register(Container $app) + { + $this->app = $app; + isset($app['provider']) || $app['provider'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Server/Guard.php b/vendor/overtrue/wechat/src/OpenWork/Server/Guard.php new file mode 100755 index 0000000..5700a77 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Server/Guard.php @@ -0,0 +1,68 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Server; + +use EasyWeChat\Kernel\Encryptor; +use EasyWeChat\Kernel\ServerGuard; + +/** + * Guard. + * + * @author xiaomin + */ +class Guard extends ServerGuard +{ + /** + * @var bool + */ + protected $alwaysValidate = true; + + /** + * @return $this + */ + public function validate() + { + return $this; + } + + /** + * @return bool + */ + protected function shouldReturnRawResponse(): bool + { + return !is_null($this->app['request']->get('echostr')); + } + + protected function isSafeMode(): bool + { + return true; + } + + /** + * @param array $message + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + protected function decryptMessage(array $message) + { + $encryptor = new Encryptor($message['ToUserName'], $this->app['config']->get('token'), $this->app['config']->get('aes_key')); + + return $message = $encryptor->decrypt( + $message['Encrypt'], + $this->app['request']->get('msg_signature'), + $this->app['request']->get('nonce'), + $this->app['request']->get('timestamp') + ); + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Server/Handlers/EchoStrHandler.php b/vendor/overtrue/wechat/src/OpenWork/Server/Handlers/EchoStrHandler.php new file mode 100755 index 0000000..78af701 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Server/Handlers/EchoStrHandler.php @@ -0,0 +1,62 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Server\Handlers; + +use EasyWeChat\Kernel\Contracts\EventHandlerInterface; +use EasyWeChat\Kernel\Decorators\FinallyResult; +use EasyWeChat\Kernel\ServiceContainer; + +/** + * EchoStrHandler. + * + * @author xiaomin + */ +class EchoStrHandler implements EventHandlerInterface +{ + /** + * @var ServiceContainer + */ + protected $app; + + /** + * EchoStrHandler constructor. + * + * @param ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + $this->app = $app; + } + + /** + * @param mixed $payload + * + * @return FinallyResult|null + */ + public function handle($payload = null) + { + if ($decrypted = $this->app['request']->get('echostr')) { + $str = $this->app['encryptor_corp']->decrypt( + $decrypted, + $this->app['request']->get('msg_signature'), + $this->app['request']->get('nonce'), + $this->app['request']->get('timestamp') + ); + + return new FinallyResult($str); + } + //把SuiteTicket缓存起来 + if (!empty($payload['SuiteTicket'])) { + $this->app['suite_ticket']->setTicket($payload['SuiteTicket']); + } + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/Server/ServiceProvider.php new file mode 100755 index 0000000..d33d5c8 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Server/ServiceProvider.php @@ -0,0 +1,56 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Server; + +use EasyWeChat\Kernel\Encryptor; +use EasyWeChat\OpenWork\Server\Handlers\EchoStrHandler; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * ServiceProvider. + * + * @author xiaomin + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + //微信第三方在校验url是使用的是GET方式请求和corp_id进行加密 + !isset($app['encryptor_corp']) && $app['encryptor_corp'] = function ($app) { + return new Encryptor( + $app['config']['corp_id'], + $app['config']['token'], + $app['config']['aes_key'] + ); + }; + + //微信第三方推送数据时使用的是suite_id进行加密 + !isset($app['encryptor']) && $app['encryptor'] = function ($app) { + return new Encryptor( + $app['config']['suite_id'], + $app['config']['token'], + $app['config']['aes_key'] + ); + }; + + !isset($app['server']) && $app['server'] = function ($app) { + $guard = new Guard($app); + $guard->push(new EchoStrHandler($app)); + + return $guard; + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/AccessToken.php b/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/AccessToken.php new file mode 100755 index 0000000..e4e248d --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/AccessToken.php @@ -0,0 +1,56 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\SuiteAuth; + +use EasyWeChat\Kernel\AccessToken as BaseAccessToken; + +/** + * AccessToken. + * + * @author xiaomin + */ +class AccessToken extends BaseAccessToken +{ + /** + * @var string + */ + protected $requestMethod = 'POST'; + + /** + * @var string + */ + protected $endpointToGetToken = 'cgi-bin/service/get_suite_token'; + + /** + * @var string + */ + protected $tokenKey = 'suite_access_token'; + + /** + * @var string + */ + protected $cachePrefix = 'easywechat.kernel.suite_access_token.'; + + /** + * Credential for get token. + * + * @return array + */ + protected function getCredentials(): array + { + return [ + 'suite_id' => $this->app['config']['suite_id'], + 'suite_secret' => $this->app['config']['suite_secret'], + 'suite_ticket' => $this->app['suite_ticket']->getTicket(), + ]; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/ServiceProvider.php b/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/ServiceProvider.php new file mode 100755 index 0000000..a4f5386 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/ServiceProvider.php @@ -0,0 +1,37 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\SuiteAuth; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * ServiceProvider. + * + * @author xiaomin + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['suite_ticket'] = function ($app) { + return new SuiteTicket($app); + }; + + isset($app['suite_access_token']) || $app['suite_access_token'] = function ($app) { + return new AccessToken($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/SuiteTicket.php b/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/SuiteTicket.php new file mode 100755 index 0000000..7bd6e01 --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/SuiteAuth/SuiteTicket.php @@ -0,0 +1,83 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\SuiteAuth; + +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Traits\InteractsWithCache; +use EasyWeChat\OpenWork\Application; + +/** + * SuiteTicket. + * + * @author xiaomin + */ +class SuiteTicket +{ + use InteractsWithCache; + + /** + * @var Application + */ + protected $app; + + /** + * SuiteTicket constructor. + * + * @param Application $app + */ + public function __construct(Application $app) + { + $this->app = $app; + } + + /** + * @param string $ticket + * + * @return $this + * + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function setTicket(string $ticket) + { + $this->getCache()->set($this->getCacheKey(), $ticket, 1800); + + if (!$this->getCache()->has($this->getCacheKey())) { + throw new RuntimeException('Failed to cache suite ticket.'); + } + + return $this; + } + + /** + * @return string + * + * @throws RuntimeException + * @throws \Psr\SimpleCache\InvalidArgumentException + */ + public function getTicket(): string + { + if ($cached = $this->getCache()->get($this->getCacheKey())) { + return $cached; + } + + throw new RuntimeException('Credential "suite_ticket" does not exist in cache.'); + } + + /** + * @return string + */ + protected function getCacheKey(): string + { + return 'easywechat.open_work.suite_ticket.'.$this->app['config']['suite_id']; + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Work/Application.php b/vendor/overtrue/wechat/src/OpenWork/Work/Application.php new file mode 100755 index 0000000..676013d --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Work/Application.php @@ -0,0 +1,41 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Work; + +use EasyWeChat\OpenWork\Application as OpenWork; +use EasyWeChat\OpenWork\Work\Auth\AccessToken; +use EasyWeChat\Work\Application as Work; + +/** + * Application. + * + * @author xiaomin + */ +class Application extends Work +{ + /** + * Application constructor. + * + * @param string $authCorpId + * @param string $permanentCode + * @param OpenWork $component + * @param array $prepends + */ + public function __construct(string $authCorpId, string $permanentCode, OpenWork $component, array $prepends = []) + { + parent::__construct($component->getConfig(), $prepends + [ + 'access_token' => function ($app) use ($authCorpId, $permanentCode, $component) { + return new AccessToken($app, $authCorpId, $permanentCode, $component); + }, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/OpenWork/Work/Auth/AccessToken.php b/vendor/overtrue/wechat/src/OpenWork/Work/Auth/AccessToken.php new file mode 100755 index 0000000..e80758a --- /dev/null +++ b/vendor/overtrue/wechat/src/OpenWork/Work/Auth/AccessToken.php @@ -0,0 +1,80 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\OpenWork\Work\Auth; + +use EasyWeChat\Kernel\AccessToken as BaseAccessToken; +use EasyWeChat\OpenWork\Application; +use Pimple\Container; + +/** + * AccessToken. + * + * @author xiaomin + */ +class AccessToken extends BaseAccessToken +{ + /** + * @var string + */ + protected $requestMethod = 'POST'; + + /** + * @var string 授权方企业ID + */ + protected $authCorpid; + + /** + * @var string 授权方企业永久授权码,通过get_permanent_code获取 + */ + protected $permanentCode; + + protected $component; + + /** + * AccessToken constructor. + * + * @param Container $app + * @param string $authCorpId + * @param string $permanentCode + * @param Application $component + */ + public function __construct(Container $app, string $authCorpId, string $permanentCode, Application $component) + { + $this->authCorpid = $authCorpId; + $this->permanentCode = $permanentCode; + $this->component = $component; + parent::__construct($app); + } + + /** + * Credential for get token. + * + * @return array + */ + protected function getCredentials(): array + { + return [ + 'auth_corpid' => $this->authCorpid, + 'permanent_code' => $this->permanentCode, + ]; + } + + /** + * @return string + */ + public function getEndpoint(): string + { + return 'cgi-bin/service/get_corp_token?'.http_build_query([ + 'suite_access_token' => $this->component['suite_access_token']->getToken()['suite_access_token'], + ]); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Application.php b/vendor/overtrue/wechat/src/Payment/Application.php new file mode 100755 index 0000000..7013f74 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Application.php @@ -0,0 +1,206 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment; + +use Closure; +use EasyWeChat\BasicService; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\ServiceContainer; +use EasyWeChat\Kernel\Support; +use EasyWeChat\OfficialAccount; + +/** + * Class Application. + * + * @property \EasyWeChat\Payment\Bill\Client $bill + * @property \EasyWeChat\Payment\Jssdk\Client $jssdk + * @property \EasyWeChat\Payment\Order\Client $order + * @property \EasyWeChat\Payment\Refund\Client $refund + * @property \EasyWeChat\Payment\Coupon\Client $coupon + * @property \EasyWeChat\Payment\Reverse\Client $reverse + * @property \EasyWeChat\Payment\Redpack\Client $redpack + * @property \EasyWeChat\BasicService\Url\Client $url + * @property \EasyWeChat\Payment\Transfer\Client $transfer + * @property \EasyWeChat\Payment\Security\Client $security + * @property \EasyWeChat\Payment\ProfitSharing\Client $profit_sharing + * @property \EasyWeChat\OfficialAccount\Auth\AccessToken $access_token + * + * @method mixed pay(array $attributes) + * @method mixed authCodeToOpenid(string $authCode) + */ +class Application extends ServiceContainer +{ + /** + * @var array + */ + protected $providers = [ + OfficialAccount\Auth\ServiceProvider::class, + BasicService\Url\ServiceProvider::class, + Base\ServiceProvider::class, + Bill\ServiceProvider::class, + Coupon\ServiceProvider::class, + Jssdk\ServiceProvider::class, + Merchant\ServiceProvider::class, + Order\ServiceProvider::class, + Redpack\ServiceProvider::class, + Refund\ServiceProvider::class, + Reverse\ServiceProvider::class, + Sandbox\ServiceProvider::class, + Transfer\ServiceProvider::class, + Security\ServiceProvider::class, + ProfitSharing\ServiceProvider::class, + ]; + + /** + * @var array + */ + protected $defaultConfig = [ + 'http' => [ + 'base_uri' => 'https://api.mch.weixin.qq.com/', + ], + ]; + + /** + * Build payment scheme for product. + * + * @param string $productId + * + * @return string + */ + public function scheme(string $productId): string + { + $params = [ + 'appid' => $this['config']->app_id, + 'mch_id' => $this['config']->mch_id, + 'time_stamp' => time(), + 'nonce_str' => uniqid(), + 'product_id' => $productId, + ]; + + $params['sign'] = Support\generate_sign($params, $this['config']->key); + + return 'weixin://wxpay/bizpayurl?'.http_build_query($params); + } + + /** + * @param string $codeUrl + * + * @return string + */ + public function codeUrlScheme(string $codeUrl) + { + return \sprintf('weixin://wxpay/bizpayurl?sr=%s', $codeUrl); + } + + /** + * @param \Closure $closure + * + * @return \Symfony\Component\HttpFoundation\Response + * + * @codeCoverageIgnore + * + * @throws \EasyWeChat\Kernel\Exceptions\Exception + */ + public function handlePaidNotify(Closure $closure) + { + return (new Notify\Paid($this))->handle($closure); + } + + /** + * @param \Closure $closure + * + * @return \Symfony\Component\HttpFoundation\Response + * + * @codeCoverageIgnore + * + * @throws \EasyWeChat\Kernel\Exceptions\Exception + */ + public function handleRefundedNotify(Closure $closure) + { + return (new Notify\Refunded($this))->handle($closure); + } + + /** + * @param \Closure $closure + * + * @return \Symfony\Component\HttpFoundation\Response + * + * @codeCoverageIgnore + * + * @throws \EasyWeChat\Kernel\Exceptions\Exception + */ + public function handleScannedNotify(Closure $closure) + { + return (new Notify\Scanned($this))->handle($closure); + } + + /** + * Set sub-merchant. + * + * @param string $mchId + * @param string|null $appId + * + * @return $this + */ + public function setSubMerchant(string $mchId, string $appId = null) + { + $this['config']->set('sub_mch_id', $mchId); + $this['config']->set('sub_appid', $appId); + + return $this; + } + + /** + * @return bool + */ + public function inSandbox(): bool + { + return (bool) $this['config']->get('sandbox'); + } + + /** + * @param string|null $endpoint + * + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function getKey(string $endpoint = null) + { + if ('sandboxnew/pay/getsignkey' === $endpoint) { + return $this['config']->key; + } + + $key = $this->inSandbox() ? $this['sandbox']->getKey() : $this['config']->key; + + if (empty($key)) { + throw new InvalidArgumentException('config key should not empty.'); + } + + if (32 !== strlen($key)) { + throw new InvalidArgumentException(sprintf("'%s' should be 32 chars length.", $key)); + } + + return $key; + } + + /** + * @param string $name + * @param array $arguments + * + * @return mixed + */ + public function __call($name, $arguments) + { + return call_user_func_array([$this['base'], $name], $arguments); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Base/Client.php b/vendor/overtrue/wechat/src/Payment/Base/Client.php new file mode 100755 index 0000000..67fbb46 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Base/Client.php @@ -0,0 +1,50 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Base; + +use EasyWeChat\Payment\Kernel\BaseClient; + +class Client extends BaseClient +{ + /** + * Pay the order. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function pay(array $params) + { + $params['appid'] = $this->app['config']->app_id; + + return $this->request($this->wrap('pay/micropay'), $params); + } + + /** + * Get openid by auth code. + * + * @param string $authCode + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function authCodeToOpenid(string $authCode) + { + return $this->request('tools/authcodetoopenid', [ + 'appid' => $this->app['config']->app_id, + 'auth_code' => $authCode, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Base/ServiceProvider.php new file mode 100755 index 0000000..71aebd9 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Base/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Base; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['base'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Bill/Client.php b/vendor/overtrue/wechat/src/Payment/Bill/Client.php new file mode 100755 index 0000000..d557d83 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Bill/Client.php @@ -0,0 +1,45 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Bill; + +use EasyWeChat\Kernel\Http\StreamResponse; +use EasyWeChat\Payment\Kernel\BaseClient; + +class Client extends BaseClient +{ + /** + * Download bill history as a table file. + * + * @param string $date + * @param string $type + * + * @return \EasyWeChat\Kernel\Http\StreamResponse|\Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(string $date, string $type = 'ALL', array $optional = []) + { + $params = [ + 'appid' => $this->app['config']->app_id, + 'bill_date' => $date, + 'bill_type' => $type, + ] + $optional; + + $response = $this->requestRaw($this->wrap('pay/downloadbill'), $params); + + if (0 === strpos($response->getBody()->getContents(), '')) { + return $this->castResponseToType($response, $this->app['config']->get('response_type')); + } + + return StreamResponse::buildFromPsrResponse($response); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Bill/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Bill/ServiceProvider.php new file mode 100755 index 0000000..3fd98d4 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Bill/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Bill; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['bill'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Coupon/Client.php b/vendor/overtrue/wechat/src/Payment/Coupon/Client.php new file mode 100755 index 0000000..331cfce --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Coupon/Client.php @@ -0,0 +1,71 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Coupon; + +use EasyWeChat\Payment\Kernel\BaseClient; + +/** + * Class Client. + * + * @author tianyong90 <412039588@qq.com> + */ +class Client extends BaseClient +{ + /** + * send a cash coupon. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function send(array $params) + { + $params['appid'] = $this->app['config']->app_id; + $params['openid_count'] = 1; + + return $this->safeRequest('mmpaymkttransfers/send_coupon', $params); + } + + /** + * query a coupon stock. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function stock(array $params) + { + $params['appid'] = $this->app['config']->app_id; + + return $this->request('mmpaymkttransfers/query_coupon_stock', $params); + } + + /** + * query a info of coupon. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function info(array $params) + { + $params['appid'] = $this->app['config']->app_id; + + return $this->request('mmpaymkttransfers/querycouponsinfo', $params); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Coupon/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Coupon/ServiceProvider.php new file mode 100755 index 0000000..513734b --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Coupon/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Coupon; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['coupon'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Jssdk/Client.php b/vendor/overtrue/wechat/src/Payment/Jssdk/Client.php new file mode 100755 index 0000000..c507453 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Jssdk/Client.php @@ -0,0 +1,135 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Jssdk; + +use EasyWeChat\BasicService\Jssdk\Client as JssdkClient; +use EasyWeChat\Kernel\Support; +use Overtrue\Socialite\AccessTokenInterface; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends JssdkClient +{ + /** + * [WeixinJSBridge] Generate js config for payment. + * + *
                            +     * WeixinJSBridge.invoke(
                            +     *  'getBrandWCPayRequest',
                            +     *  ...
                            +     * );
                            +     * 
                            + * + * @param string $prepayId + * @param bool $json + * + * @return string|array + */ + public function bridgeConfig(string $prepayId, bool $json = true) + { + $params = [ + 'appId' => $this->app['config']->sub_appid ?: $this->app['config']->app_id, + 'timeStamp' => strval(time()), + 'nonceStr' => uniqid(), + 'package' => "prepay_id=$prepayId", + 'signType' => 'MD5', + ]; + + $params['paySign'] = Support\generate_sign($params, $this->app['config']->key, 'md5'); + + return $json ? json_encode($params) : $params; + } + + /** + * [JSSDK] Generate js config for payment. + * + *
                            +     * wx.chooseWXPay({...});
                            +     * 
                            + * + * @param string $prepayId + * + * @return array + */ + public function sdkConfig(string $prepayId): array + { + $config = $this->bridgeConfig($prepayId, false); + + $config['timestamp'] = $config['timeStamp']; + unset($config['timeStamp']); + + return $config; + } + + /** + * Generate app payment parameters. + * + * @param string $prepayId + * + * @return array + */ + public function appConfig(string $prepayId): array + { + $params = [ + 'appid' => $this->app['config']->app_id, + 'partnerid' => $this->app['config']->mch_id, + 'prepayid' => $prepayId, + 'noncestr' => uniqid(), + 'timestamp' => time(), + 'package' => 'Sign=WXPay', + ]; + + $params['sign'] = Support\generate_sign($params, $this->app['config']->key); + + return $params; + } + + /** + * Generate js config for share user address. + * + * @param string|\Overtrue\Socialite\AccessTokenInterface $accessToken + * @param bool $json + * + * @return string|array + */ + public function shareAddressConfig($accessToken, bool $json = true) + { + if ($accessToken instanceof AccessTokenInterface) { + $accessToken = $accessToken->getToken(); + } + + $params = [ + 'appId' => $this->app['config']->app_id, + 'scope' => 'jsapi_address', + 'timeStamp' => strval(time()), + 'nonceStr' => uniqid(), + 'signType' => 'SHA1', + ]; + + $signParams = [ + 'appid' => $params['appId'], + 'url' => $this->getUrl(), + 'timestamp' => $params['timeStamp'], + 'noncestr' => $params['nonceStr'], + 'accesstoken' => strval($accessToken), + ]; + + ksort($signParams); + + $params['addrSign'] = sha1(urldecode(http_build_query($signParams))); + + return $json ? json_encode($params) : $params; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Jssdk/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Jssdk/ServiceProvider.php new file mode 100755 index 0000000..24f2a76 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Jssdk/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Jssdk; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['jssdk'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Kernel/BaseClient.php b/vendor/overtrue/wechat/src/Payment/Kernel/BaseClient.php new file mode 100755 index 0000000..b06d648 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Kernel/BaseClient.php @@ -0,0 +1,194 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Kernel; + +use EasyWeChat\Kernel\Support; +use EasyWeChat\Kernel\Traits\HasHttpRequests; +use EasyWeChat\Payment\Application; +use GuzzleHttp\MessageFormatter; +use GuzzleHttp\Middleware; +use Psr\Http\Message\ResponseInterface; + +/** + * Class BaseClient. + * + * @author overtrue + */ +class BaseClient +{ + use HasHttpRequests { request as performRequest; } + + /** + * @var \EasyWeChat\Payment\Application + */ + protected $app; + + /** + * Constructor. + * + * @param \EasyWeChat\Payment\Application $app + */ + public function __construct(Application $app) + { + $this->app = $app; + + $this->setHttpClient($this->app['http_client']); + } + + /** + * Extra request params. + * + * @return array + */ + protected function prepends() + { + return []; + } + + /** + * Make a API request. + * + * @param string $endpoint + * @param array $params + * @param string $method + * @param array $options + * @param bool $returnResponse + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + protected function request(string $endpoint, array $params = [], $method = 'post', array $options = [], $returnResponse = false) + { + $base = [ + 'mch_id' => $this->app['config']['mch_id'], + 'nonce_str' => uniqid(), + 'sub_mch_id' => $this->app['config']['sub_mch_id'], + 'sub_appid' => $this->app['config']['sub_appid'], + ]; + + $params = array_filter(array_merge($base, $this->prepends(), $params), 'strlen'); + + $secretKey = $this->app->getKey($endpoint); + if ('HMAC-SHA256' === ($params['sign_type'] ?? 'MD5')) { + $encryptMethod = function ($str) use ($secretKey) { + return hash_hmac('sha256', $str, $secretKey); + }; + } else { + $encryptMethod = 'md5'; + } + $params['sign'] = Support\generate_sign($params, $secretKey, $encryptMethod); + + $options = array_merge([ + 'body' => Support\XML::build($params), + ], $options); + + $this->pushMiddleware($this->logMiddleware(), 'log'); + + $response = $this->performRequest($endpoint, $method, $options); + + return $returnResponse ? $response : $this->castResponseToType($response, $this->app->config->get('response_type')); + } + + /** + * Log the request. + * + * @return \Closure + */ + protected function logMiddleware() + { + $formatter = new MessageFormatter($this->app['config']['http.log_template'] ?? MessageFormatter::DEBUG); + + return Middleware::log($this->app['logger'], $formatter); + } + + /** + * Make a request and return raw response. + * + * @param string $endpoint + * @param array $params + * @param string $method + * @param array $options + * + * @return ResponseInterface + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + protected function requestRaw(string $endpoint, array $params = [], $method = 'post', array $options = []) + { + /** @var ResponseInterface $response */ + $response = $this->request($endpoint, $params, $method, $options, true); + + return $response; + } + + /** + * Make a request and return an array. + * + * @param string $endpoint + * @param array $params + * @param string $method + * @param array $options + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + protected function requestArray(string $endpoint, array $params = [], $method = 'post', array $options = []): array + { + $response = $this->requestRaw($endpoint, $params, $method, $options); + + return $this->castResponseToType($response, 'array'); + } + + /** + * Request with SSL. + * + * @param string $endpoint + * @param array $params + * @param string $method + * @param array $options + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + protected function safeRequest($endpoint, array $params, $method = 'post', array $options = []) + { + $options = array_merge([ + 'cert' => $this->app['config']->get('cert_path'), + 'ssl_key' => $this->app['config']->get('key_path'), + ], $options); + + return $this->request($endpoint, $params, $method, $options); + } + + /** + * Wrapping an API endpoint. + * + * @param string $endpoint + * + * @return string + */ + protected function wrap(string $endpoint): string + { + return $this->app->inSandbox() ? "sandboxnew/{$endpoint}" : $endpoint; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/InvalidSignException.php b/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/InvalidSignException.php new file mode 100755 index 0000000..cdd25ba --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/InvalidSignException.php @@ -0,0 +1,18 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Kernel\Exceptions; + +use EasyWeChat\Kernel\Exceptions\Exception; + +class InvalidSignException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/SandboxException.php b/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/SandboxException.php new file mode 100755 index 0000000..01f9dd5 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Kernel/Exceptions/SandboxException.php @@ -0,0 +1,18 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Kernel\Exceptions; + +use EasyWeChat\Kernel\Exceptions\Exception; + +class SandboxException extends Exception +{ +} diff --git a/vendor/overtrue/wechat/src/Payment/Merchant/Client.php b/vendor/overtrue/wechat/src/Payment/Merchant/Client.php new file mode 100755 index 0000000..1f884be --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Merchant/Client.php @@ -0,0 +1,92 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Merchant; + +use EasyWeChat\Payment\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Add sub-merchant. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function addSubMerchant(array $params) + { + return $this->manage($params, ['action' => 'add']); + } + + /** + * Query sub-merchant by merchant id. + * + * @param string $id + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function querySubMerchantByMerchantId(string $id) + { + $params = [ + 'micro_mch_id' => $id, + ]; + + return $this->manage($params, ['action' => 'query']); + } + + /** + * Query sub-merchant by wechat id. + * + * @param string $id + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function querySubMerchantByWeChatId(string $id) + { + $params = [ + 'recipient_wechatid' => $id, + ]; + + return $this->manage($params, ['action' => 'query']); + } + + /** + * @param array $params + * @param array $query + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + protected function manage(array $params, array $query) + { + $params = array_merge($params, [ + 'appid' => $this->app['config']->app_id, + 'nonce_str' => '', + 'sub_mch_id' => '', + 'sub_appid' => '', + ]); + + return $this->safeRequest('secapi/mch/submchmanage', $params, 'post', compact('query')); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Merchant/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Merchant/ServiceProvider.php new file mode 100755 index 0000000..5d05c95 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Merchant/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Merchant; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['merchant'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Notify/Handler.php b/vendor/overtrue/wechat/src/Payment/Notify/Handler.php new file mode 100755 index 0000000..76983b4 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Notify/Handler.php @@ -0,0 +1,199 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Notify; + +use Closure; +use EasyWeChat\Kernel\Exceptions\Exception; +use EasyWeChat\Kernel\Support; +use EasyWeChat\Kernel\Support\XML; +use EasyWeChat\Payment\Kernel\Exceptions\InvalidSignException; +use Symfony\Component\HttpFoundation\Response; + +abstract class Handler +{ + const SUCCESS = 'SUCCESS'; + const FAIL = 'FAIL'; + + /** + * @var \EasyWeChat\Payment\Application + */ + protected $app; + + /** + * @var array + */ + protected $message; + + /** + * @var string|null + */ + protected $fail; + + /** + * @var array + */ + protected $attributes = []; + + /** + * Check sign. + * If failed, throws an exception. + * + * @var bool + */ + protected $check = true; + + /** + * Respond with sign. + * + * @var bool + */ + protected $sign = false; + + /** + * @param \EasyWeChat\Payment\Application $app + */ + public function __construct($app) + { + $this->app = $app; + } + + /** + * Handle incoming notify. + * + * @param \Closure $closure + * + * @return \Symfony\Component\HttpFoundation\Response + */ + abstract public function handle(Closure $closure); + + /** + * @param string $message + */ + public function fail(string $message) + { + $this->fail = $message; + } + + /** + * @param array $attributes + * @param bool $sign + * + * @return $this + */ + public function respondWith(array $attributes, bool $sign = false) + { + $this->attributes = $attributes; + $this->sign = $sign; + + return $this; + } + + /** + * Build xml and return the response to WeChat. + * + * @return \Symfony\Component\HttpFoundation\Response + */ + public function toResponse(): Response + { + $base = [ + 'return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL, + 'return_msg' => $this->fail, + ]; + + $attributes = array_merge($base, $this->attributes); + + if ($this->sign) { + $attributes['sign'] = Support\generate_sign($attributes, $this->app->getKey()); + } + + return new Response(XML::build($attributes)); + } + + /** + * Return the notify message from request. + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\Exception + */ + public function getMessage(): array + { + if (!empty($this->message)) { + return $this->message; + } + + try { + $message = XML::parse(strval($this->app['request']->getContent())); + } catch (\Throwable $e) { + throw new Exception('Invalid request XML: '.$e->getMessage(), 400); + } + + if (!is_array($message) || empty($message)) { + throw new Exception('Invalid request XML.', 400); + } + + if ($this->check) { + $this->validate($message); + } + + return $this->message = $message; + } + + /** + * Decrypt message. + * + * @param string $key + * + * @return string|null + * + * @throws \EasyWeChat\Kernel\Exceptions\Exception + */ + public function decryptMessage(string $key) + { + $message = $this->getMessage(); + if (empty($message[$key])) { + return null; + } + + return Support\AES::decrypt( + base64_decode($message[$key], true), md5($this->app['config']->key), '', OPENSSL_RAW_DATA, 'AES-256-ECB' + ); + } + + /** + * Validate the request params. + * + * @param array $message + * + * @throws \EasyWeChat\Payment\Kernel\Exceptions\InvalidSignException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + protected function validate(array $message) + { + $sign = $message['sign']; + unset($message['sign']); + + if (Support\generate_sign($message, $this->app->getKey()) !== $sign) { + throw new InvalidSignException(); + } + } + + /** + * @param mixed $result + */ + protected function strict($result) + { + if (true !== $result && is_null($this->fail)) { + $this->fail(strval($result)); + } + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Notify/Paid.php b/vendor/overtrue/wechat/src/Payment/Notify/Paid.php new file mode 100755 index 0000000..c54b9cd --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Notify/Paid.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Notify; + +use Closure; + +class Paid extends Handler +{ + /** + * @param \Closure $closure + * + * @return \Symfony\Component\HttpFoundation\Response + * + * @throws \EasyWeChat\Kernel\Exceptions\Exception + */ + public function handle(Closure $closure) + { + $this->strict( + \call_user_func($closure, $this->getMessage(), [$this, 'fail']) + ); + + return $this->toResponse(); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Notify/Refunded.php b/vendor/overtrue/wechat/src/Payment/Notify/Refunded.php new file mode 100755 index 0000000..8241892 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Notify/Refunded.php @@ -0,0 +1,48 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Notify; + +use Closure; +use EasyWeChat\Kernel\Support\XML; + +class Refunded extends Handler +{ + protected $check = false; + + /** + * @param \Closure $closure + * + * @return \Symfony\Component\HttpFoundation\Response + * + * @throws \EasyWeChat\Kernel\Exceptions\Exception + */ + public function handle(Closure $closure) + { + $this->strict( + \call_user_func($closure, $this->getMessage(), $this->reqInfo(), [$this, 'fail']) + ); + + return $this->toResponse(); + } + + /** + * Decrypt the `req_info` from request message. + * + * @return array + * + * @throws \EasyWeChat\Kernel\Exceptions\Exception + */ + public function reqInfo() + { + return XML::parse($this->decryptMessage('req_info')); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Notify/Scanned.php b/vendor/overtrue/wechat/src/Payment/Notify/Scanned.php new file mode 100755 index 0000000..023a905 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Notify/Scanned.php @@ -0,0 +1,60 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Notify; + +use Closure; + +class Scanned extends Handler +{ + protected $check = false; + + /** + * @var string|null + */ + protected $alert; + + /** + * @param string $message + */ + public function alert(string $message) + { + $this->alert = $message; + } + + /** + * @param \Closure $closure + * + * @return \Symfony\Component\HttpFoundation\Response + * + * @throws \EasyWeChat\Kernel\Exceptions\Exception + */ + public function handle(Closure $closure) + { + $result = \call_user_func($closure, $this->getMessage(), [$this, 'fail'], [$this, 'alert']); + + $attributes = [ + 'result_code' => is_null($this->alert) && is_null($this->fail) ? static::SUCCESS : static::FAIL, + 'err_code_des' => $this->alert, + ]; + + if (is_null($this->alert) && is_string($result)) { + $attributes += [ + 'appid' => $this->app['config']->app_id, + 'mch_id' => $this->app['config']->mch_id, + 'nonce_str' => uniqid(), + 'prepay_id' => $result, + ]; + } + + return $this->respondWith($attributes, true)->toResponse(); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Order/Client.php b/vendor/overtrue/wechat/src/Payment/Order/Client.php new file mode 100755 index 0000000..4589680 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Order/Client.php @@ -0,0 +1,123 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Order; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Exceptions\InvalidConfigException; +use EasyWeChat\Kernel\Support; +use EasyWeChat\Kernel\Support\Collection; +use EasyWeChat\Payment\Kernel\BaseClient; +use Psr\Http\Message\ResponseInterface; + +class Client extends BaseClient +{ + /** + * Unify order. + * + * @param array $params + * @param bool $isContract + * + * @return ResponseInterface|Collection|array|object|string + * + * @throws InvalidArgumentException + * @throws InvalidConfigException + */ + public function unify(array $params, $isContract = false) + { + if (empty($params['spbill_create_ip'])) { + $params['spbill_create_ip'] = ('NATIVE' === $params['trade_type']) ? Support\get_server_ip() : Support\get_client_ip(); + } + + $params['appid'] = $this->app['config']->app_id; + $params['notify_url'] = $params['notify_url'] ?? $this->app['config']['notify_url']; + + if ($isContract) { + $params['contract_appid'] = $this->app['config']['app_id']; + $params['contract_mchid'] = $this->app['config']['mch_id']; + $params['request_serial'] = $params['request_serial'] ?? time(); + $params['contract_notify_url'] = $params['contract_notify_url'] ?? $this->app['config']['contract_notify_url']; + + return $this->request($this->wrap('pay/contractorder'), $params); + } + + return $this->request($this->wrap('pay/unifiedorder'), $params); + } + + /** + * Query order by out trade number. + * + * @param string $number + * + * @return ResponseInterface|Collection|array|object|string + * + * @throws InvalidArgumentException + * @throws InvalidConfigException + */ + public function queryByOutTradeNumber(string $number) + { + return $this->query([ + 'out_trade_no' => $number, + ]); + } + + /** + * Query order by transaction id. + * + * @param string $transactionId + * + * @return ResponseInterface|Collection|array|object|string + * + * @throws InvalidArgumentException + * @throws InvalidConfigException + */ + public function queryByTransactionId(string $transactionId) + { + return $this->query([ + 'transaction_id' => $transactionId, + ]); + } + + /** + * @param array $params + * + * @return ResponseInterface|Collection|array|object|string + * + * @throws InvalidArgumentException + * @throws InvalidConfigException + */ + protected function query(array $params) + { + $params['appid'] = $this->app['config']->app_id; + + return $this->request($this->wrap('pay/orderquery'), $params); + } + + /** + * Close order by out_trade_no. + * + * @param string $tradeNo + * + * @return ResponseInterface|Collection|array|object|string + * + * @throws InvalidArgumentException + * @throws InvalidConfigException + */ + public function close(string $tradeNo) + { + $params = [ + 'appid' => $this->app['config']->app_id, + 'out_trade_no' => $tradeNo, + ]; + + return $this->request($this->wrap('pay/closeorder'), $params); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Order/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Order/ServiceProvider.php new file mode 100755 index 0000000..9e781c0 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Order/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Order; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['order'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/ProfitSharing/Client.php b/vendor/overtrue/wechat/src/Payment/ProfitSharing/Client.php new file mode 100755 index 0000000..49bff64 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/ProfitSharing/Client.php @@ -0,0 +1,175 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\ProfitSharing; + +use EasyWeChat\Payment\Kernel\BaseClient; + +/** + * Class Client. + * + * @author ClouderSky + */ +class Client extends BaseClient +{ + /** + * {@inheritdoc}. + */ + protected function prepends() + { + return [ + 'sign_type' => 'HMAC-SHA256', + ]; + } + + /** + * Add profit sharing receiver. + * 服务商代子商户发起添加分账接收方请求. + * 后续可通过发起分账请求将结算后的钱分到该分账接收方. + * + * @param array $receiver 分账接收方对象,json格式 + */ + public function addReceiver(array $receiver) + { + $params = [ + 'appid' => $this->app['config']->app_id, + 'receiver' => json_encode( + $receiver, JSON_UNESCAPED_UNICODE + ), + ]; + + return $this->request( + 'pay/profitsharingaddreceiver', $params + ); + } + + /** + * Delete profit sharing receiver. + * 服务商代子商户发起删除分账接收方请求. + * 删除后不支持将结算后的钱分到该分账接收方. + * + * @param array $receiver 分账接收方对象,json格式 + */ + public function deleteReceiver(array $receiver) + { + $params = [ + 'appid' => $this->app['config']->app_id, + 'receiver' => json_encode( + $receiver, JSON_UNESCAPED_UNICODE + ), + ]; + + return $this->request( + 'pay/profitsharingremovereceiver', $params + ); + } + + /** + * Single profit sharing. + * 请求单次分账. + * + * @param string $transactionId 微信支付订单号 + * @param string $outOrderNo 商户系统内部的分账单号 + * @param array $receivers 分账接收方列表 + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function share( + string $transactionId, + string $outOrderNo, + array $receivers + ) { + $params = [ + 'appid' => $this->app['config']->app_id, + 'transaction_id' => $transactionId, + 'out_order_no' => $outOrderNo, + 'receivers' => json_encode( + $receivers, JSON_UNESCAPED_UNICODE + ), + ]; + + return $this->safeRequest( + 'secapi/pay/profitsharing', $params + ); + } + + /** + * Multi profit sharing. + * 请求多次分账. + * + * @param string $transactionId 微信支付订单号 + * @param string $outOrderNo 商户系统内部的分账单号 + * @param array $receivers 分账接收方列表 + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function multiShare( + string $transactionId, + string $outOrderNo, + array $receivers + ) { + $params = [ + 'appid' => $this->app['config']->app_id, + 'transaction_id' => $transactionId, + 'out_order_no' => $outOrderNo, + 'receivers' => json_encode( + $receivers, JSON_UNESCAPED_UNICODE + ), + ]; + + return $this->safeRequest( + 'secapi/pay/multiprofitsharing', $params + ); + } + + /** + * Finish profit sharing. + * 完结分账. + * + * @param array $params + */ + public function markOrderAsFinished(array $params) + { + $params['appid'] = $this->app['config']->app_id; + $params['sub_appid'] = null; + + return $this->safeRequest( + 'secapi/pay/profitsharingfinish', $params + ); + } + + /** + * Query profit sharing result. + * 查询分账结果. + * + * @param string $transactionId 微信支付订单号 + * @param string $outOrderNo 商户系统内部的分账单号 + */ + public function query( + string $transactionId, string $outOrderNo + ) { + $params = [ + 'sub_appid' => null, + 'transaction_id' => $transactionId, + 'out_order_no' => $outOrderNo, + ]; + + return $this->request( + 'pay/profitsharingquery', $params + ); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/ProfitSharing/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/ProfitSharing/ServiceProvider.php new file mode 100755 index 0000000..d247d53 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/ProfitSharing/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\ProfitSharing; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author ClouderSky + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['profit_sharing'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Redpack/Client.php b/vendor/overtrue/wechat/src/Payment/Redpack/Client.php new file mode 100755 index 0000000..1a3c875 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Redpack/Client.php @@ -0,0 +1,83 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Redpack; + +use EasyWeChat\Kernel\Support; +use EasyWeChat\Payment\Kernel\BaseClient; + +/** + * Class Client. + * + * @author tianyong90 <412039588@qq.com> + */ +class Client extends BaseClient +{ + /** + * Query redpack. + * + * @param mixed $mchBillno + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function info($mchBillno) + { + $params = is_array($mchBillno) ? $mchBillno : ['mch_billno' => $mchBillno]; + $base = [ + 'appid' => $this->app['config']->app_id, + 'bill_type' => 'MCHT', + ]; + + return $this->safeRequest('mmpaymkttransfers/gethbinfo', array_merge($base, $params)); + } + + /** + * Send normal redpack. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function sendNormal(array $params) + { + $base = [ + 'total_num' => 1, + 'client_ip' => $params['client_ip'] ?? Support\get_server_ip(), + 'wxappid' => $this->app['config']->app_id, + ]; + + return $this->safeRequest('mmpaymkttransfers/sendredpack', array_merge($base, $params)); + } + + /** + * Send group redpack. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function sendGroup(array $params) + { + $base = [ + 'amt_type' => 'ALL_RAND', + 'wxappid' => $this->app['config']->app_id, + ]; + + return $this->safeRequest('mmpaymkttransfers/sendgroupredpack', array_merge($base, $params)); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Redpack/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Redpack/ServiceProvider.php new file mode 100755 index 0000000..af36f35 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Redpack/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Redpack; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['redpack'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Refund/Client.php b/vendor/overtrue/wechat/src/Payment/Refund/Client.php new file mode 100755 index 0000000..8352916 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Refund/Client.php @@ -0,0 +1,155 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Refund; + +use EasyWeChat\Payment\Kernel\BaseClient; + +class Client extends BaseClient +{ + /** + * Refund by out trade number. + * + * @param string $number + * @param string $refundNumber + * @param int $totalFee + * @param int $refundFee + * @param array $optional + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function byOutTradeNumber(string $number, string $refundNumber, int $totalFee, int $refundFee, array $optional = []) + { + return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['out_trade_no' => $number])); + } + + /** + * Refund by transaction id. + * + * @param string $transactionId + * @param string $refundNumber + * @param int $totalFee + * @param int $refundFee + * @param array $optional + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function byTransactionId(string $transactionId, string $refundNumber, int $totalFee, int $refundFee, array $optional = []) + { + return $this->refund($refundNumber, $totalFee, $refundFee, array_merge($optional, ['transaction_id' => $transactionId])); + } + + /** + * Query refund by transaction id. + * + * @param string $transactionId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function queryByTransactionId(string $transactionId) + { + return $this->query($transactionId, 'transaction_id'); + } + + /** + * Query refund by out trade number. + * + * @param string $outTradeNumber + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function queryByOutTradeNumber(string $outTradeNumber) + { + return $this->query($outTradeNumber, 'out_trade_no'); + } + + /** + * Query refund by out refund number. + * + * @param string $outRefundNumber + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function queryByOutRefundNumber(string $outRefundNumber) + { + return $this->query($outRefundNumber, 'out_refund_no'); + } + + /** + * Query refund by refund id. + * + * @param string $refundId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function queryByRefundId(string $refundId) + { + return $this->query($refundId, 'refund_id'); + } + + /** + * Refund. + * + * @param string $refundNumber + * @param int $totalFee + * @param int $refundFee + * @param array $optional + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + protected function refund(string $refundNumber, int $totalFee, int $refundFee, $optional = []) + { + $params = array_merge([ + 'out_refund_no' => $refundNumber, + 'total_fee' => $totalFee, + 'refund_fee' => $refundFee, + 'appid' => $this->app['config']->app_id, + ], $optional); + + return $this->safeRequest($this->wrap( + $this->app->inSandbox() ? 'pay/refund' : 'secapi/pay/refund' + ), $params); + } + + /** + * Query refund. + * + * @param string $number + * @param string $type + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + protected function query(string $number, string $type) + { + $params = [ + 'appid' => $this->app['config']->app_id, + $type => $number, + ]; + + return $this->request($this->wrap('pay/refundquery'), $params); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Refund/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Refund/ServiceProvider.php new file mode 100755 index 0000000..faa4e89 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Refund/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Refund; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['refund'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Reverse/Client.php b/vendor/overtrue/wechat/src/Payment/Reverse/Client.php new file mode 100755 index 0000000..2988854 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Reverse/Client.php @@ -0,0 +1,65 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Reverse; + +use EasyWeChat\Payment\Kernel\BaseClient; + +class Client extends BaseClient +{ + /** + * Reverse order by out trade number. + * + * @param string $outTradeNumber + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function byOutTradeNumber(string $outTradeNumber) + { + return $this->reverse($outTradeNumber, 'out_trade_no'); + } + + /** + * Reverse order by transaction_id. + * + * @param string $transactionId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function byTransactionId(string $transactionId) + { + return $this->reverse($transactionId, 'transaction_id'); + } + + /** + * Reverse order. + * + * @param string $number + * @param string $type + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + protected function reverse(string $number, string $type) + { + $params = [ + 'appid' => $this->app['config']->app_id, + $type => $number, + ]; + + return $this->safeRequest($this->wrap('secapi/pay/reverse'), $params); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Reverse/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Reverse/ServiceProvider.php new file mode 100755 index 0000000..2417874 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Reverse/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Reverse; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['reverse'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Sandbox/Client.php b/vendor/overtrue/wechat/src/Payment/Sandbox/Client.php new file mode 100755 index 0000000..9f1ec7c --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Sandbox/Client.php @@ -0,0 +1,60 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Sandbox; + +use EasyWeChat\Kernel\Traits\InteractsWithCache; +use EasyWeChat\Payment\Kernel\BaseClient; +use EasyWeChat\Payment\Kernel\Exceptions\SandboxException; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + use InteractsWithCache; + + /** + * @return string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Payment\Kernel\Exceptions\SandboxException + * @throws \Psr\SimpleCache\InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function getKey(): string + { + if ($cache = $this->getCache()->get($this->getCacheKey())) { + return $cache; + } + + $response = $this->requestArray('sandboxnew/pay/getsignkey'); + + if ('SUCCESS' === $response['return_code']) { + $this->getCache()->set($this->getCacheKey(), $key = $response['sandbox_signkey'], 24 * 3600); + + return $key; + } + + throw new SandboxException($response['retmsg'] ?? $response['return_msg']); + } + + /** + * @return string + */ + protected function getCacheKey(): string + { + return 'easywechat.payment.sandbox.'.md5($this->app['config']->app_id.$this->app['config']['mch_id']); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Sandbox/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Sandbox/ServiceProvider.php new file mode 100755 index 0000000..d0b5d6e --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Sandbox/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Sandbox; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * @param \Pimple\Container $app + */ + public function register(Container $app) + { + $app['sandbox'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Security/Client.php b/vendor/overtrue/wechat/src/Payment/Security/Client.php new file mode 100755 index 0000000..d9a2131 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Security/Client.php @@ -0,0 +1,36 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Security; + +use EasyWeChat\Payment\Kernel\BaseClient; + +/** + * Class Client. + * + * @author overtrue + */ +class Client extends BaseClient +{ + /** + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getPublicKey() + { + $params = [ + 'sign_type' => 'MD5', + ]; + + return $this->safeRequest('https://fraud.mch.weixin.qq.com/risk/getpublickey', $params); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Security/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Security/ServiceProvider.php new file mode 100755 index 0000000..e0e31f8 --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Security/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Security; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['security'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Transfer/Client.php b/vendor/overtrue/wechat/src/Payment/Transfer/Client.php new file mode 100755 index 0000000..e7b0d7d --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Transfer/Client.php @@ -0,0 +1,114 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Transfer; + +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use function EasyWeChat\Kernel\Support\get_server_ip; +use function EasyWeChat\Kernel\Support\rsa_public_encrypt; +use EasyWeChat\Payment\Kernel\BaseClient; + +/** + * Class Client. + * + * @author AC + */ +class Client extends BaseClient +{ + /** + * Query MerchantPay to balance. + * + * @param string $partnerTradeNo + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function queryBalanceOrder(string $partnerTradeNo) + { + $params = [ + 'appid' => $this->app['config']->app_id, + 'mch_id' => $this->app['config']->mch_id, + 'partner_trade_no' => $partnerTradeNo, + ]; + + return $this->safeRequest('mmpaymkttransfers/gettransferinfo', $params); + } + + /** + * Send MerchantPay to balance. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function toBalance(array $params) + { + $base = [ + 'mch_id' => null, + 'mchid' => $this->app['config']->mch_id, + 'mch_appid' => $this->app['config']->app_id, + ]; + + if (empty($params['spbill_create_ip'])) { + $params['spbill_create_ip'] = get_server_ip(); + } + + return $this->safeRequest('mmpaymkttransfers/promotion/transfers', array_merge($base, $params)); + } + + /** + * Query MerchantPay order to BankCard. + * + * @param string $partnerTradeNo + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function queryBankCardOrder(string $partnerTradeNo) + { + $params = [ + 'mch_id' => $this->app['config']->mch_id, + 'partner_trade_no' => $partnerTradeNo, + ]; + + return $this->safeRequest('mmpaysptrans/query_bank', $params); + } + + /** + * Send MerchantPay to BankCard. + * + * @param array $params + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + */ + public function toBankCard(array $params) + { + foreach (['bank_code', 'partner_trade_no', 'enc_bank_no', 'enc_true_name', 'amount'] as $key) { + if (empty($params[$key])) { + throw new RuntimeException(\sprintf('"%s" is required.', $key)); + } + } + + $publicKey = file_get_contents($this->app['config']->get('rsa_public_key_path')); + + $params['enc_bank_no'] = rsa_public_encrypt($params['enc_bank_no'], $publicKey); + $params['enc_true_name'] = rsa_public_encrypt($params['enc_true_name'], $publicKey); + + return $this->safeRequest('mmpaysptrans/pay_bank', $params); + } +} diff --git a/vendor/overtrue/wechat/src/Payment/Transfer/ServiceProvider.php b/vendor/overtrue/wechat/src/Payment/Transfer/ServiceProvider.php new file mode 100755 index 0000000..0e27aad --- /dev/null +++ b/vendor/overtrue/wechat/src/Payment/Transfer/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Payment\Transfer; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['transfer'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Agent/Client.php b/vendor/overtrue/wechat/src/Work/Agent/Client.php new file mode 100755 index 0000000..0ce3b6f --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Agent/Client.php @@ -0,0 +1,67 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Agent; + +use EasyWeChat\Kernel\BaseClient; + +/** + * This is WeWork Agent Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get agent. + * + * @param int $agentId + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(int $agentId) + { + $params = [ + 'agentid' => $agentId, + ]; + + return $this->httpGet('cgi-bin/agent/get', $params); + } + + /** + * Set agent. + * + * @param int $agentId + * @param array $attributes + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function set(int $agentId, array $attributes) + { + return $this->httpPostJson('cgi-bin/agent/set', array_merge(['agentid' => $agentId], $attributes)); + } + + /** + * Get agent list. + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list() + { + return $this->httpGet('cgi-bin/agent/list'); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Agent/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Agent/ServiceProvider.php new file mode 100755 index 0000000..b85a6f5 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Agent/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Agent; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['agent'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Application.php b/vendor/overtrue/wechat/src/Work/Application.php new file mode 100755 index 0000000..f127ce5 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Application.php @@ -0,0 +1,100 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work; + +use EasyWeChat\Kernel\ServiceContainer; +use EasyWeChat\Work\MiniProgram\Application as MiniProgram; + +/** + * Application. + * + * @author mingyoung + * + * @property \EasyWeChat\Work\OA\Client $oa + * @property \EasyWeChat\Work\Auth\AccessToken $access_token + * @property \EasyWeChat\Work\Agent\Client $agent + * @property \EasyWeChat\Work\Department\Client $department + * @property \EasyWeChat\Work\Media\Client $media + * @property \EasyWeChat\Work\Menu\Client $menu + * @property \EasyWeChat\Work\Message\Client $message + * @property \EasyWeChat\Work\Message\Messenger $messenger + * @property \EasyWeChat\Work\User\Client $user + * @property \EasyWeChat\Work\User\TagClient $tag + * @property \EasyWeChat\Work\Server\ServiceProvider $server + * @property \EasyWeChat\BasicService\Jssdk\Client $jssdk + * @property \Overtrue\Socialite\Providers\WeWorkProvider $oauth + * @property \EasyWeChat\Work\Invoice\Client $invoice + * @property \EasyWeChat\Work\Chat\Client $chat + * @property \EasyWeChat\Work\ExternalContact\Client $external_contact + * @property \EasyWeChat\Work\ExternalContact\ContactWayClient $contact_way + * @property \EasyWeChat\Work\ExternalContact\StatisticsClient $external_contact_statistics + * @property \EasyWeChat\Work\ExternalContact\MessageClient $external_contact_message + * @property \EasyWeChat\Work\GroupRobot\Client $group_robot + * @property \EasyWeChat\Work\GroupRobot\Messenger $group_robot_messenger + * + * @method mixed getCallbackIp() + */ +class Application extends ServiceContainer +{ + /** + * @var array + */ + protected $providers = [ + OA\ServiceProvider::class, + Auth\ServiceProvider::class, + Base\ServiceProvider::class, + Menu\ServiceProvider::class, + OAuth\ServiceProvider::class, + User\ServiceProvider::class, + Agent\ServiceProvider::class, + Media\ServiceProvider::class, + Message\ServiceProvider::class, + Department\ServiceProvider::class, + Server\ServiceProvider::class, + Jssdk\ServiceProvider::class, + Invoice\ServiceProvider::class, + Chat\ServiceProvider::class, + ExternalContact\ServiceProvider::class, + GroupRobot\ServiceProvider::class, + ]; + + /** + * @var array + */ + protected $defaultConfig = [ + // http://docs.guzzlephp.org/en/stable/request-options.html + 'http' => [ + 'base_uri' => 'https://qyapi.weixin.qq.com/', + ], + ]; + + /** + * Creates the miniProgram application. + * + * @return \EasyWeChat\Work\MiniProgram\Application + */ + public function miniProgram(): MiniProgram + { + return new MiniProgram($this->getConfig()); + } + + /** + * @param string $method + * @param array $arguments + * + * @return mixed + */ + public function __call($method, $arguments) + { + return $this['base']->$method(...$arguments); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Auth/AccessToken.php b/vendor/overtrue/wechat/src/Work/Auth/AccessToken.php new file mode 100755 index 0000000..56d5218 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Auth/AccessToken.php @@ -0,0 +1,45 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Auth; + +use EasyWeChat\Kernel\AccessToken as BaseAccessToken; + +/** + * Class AccessToken. + * + * @author mingyoung + */ +class AccessToken extends BaseAccessToken +{ + /** + * @var string + */ + protected $endpointToGetToken = 'cgi-bin/gettoken'; + + /** + * @var int + */ + protected $safeSeconds = 0; + + /** + * Credential for get token. + * + * @return array + */ + protected function getCredentials(): array + { + return [ + 'corpid' => $this->app['config']['corp_id'], + 'corpsecret' => $this->app['config']['secret'], + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Auth/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Auth/ServiceProvider.php new file mode 100755 index 0000000..5f0dba9 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Auth/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Auth; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + isset($app['access_token']) || $app['access_token'] = function ($app) { + return new AccessToken($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Base/Client.php b/vendor/overtrue/wechat/src/Work/Base/Client.php new file mode 100755 index 0000000..97b5445 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Base/Client.php @@ -0,0 +1,34 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Base; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get callback ip. + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getCallbackIp() + { + return $this->httpGet('cgi-bin/getcallbackip'); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Base/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Base/ServiceProvider.php new file mode 100755 index 0000000..5e28fd1 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Base/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Base; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * @param Container $app + */ + public function register(Container $app) + { + $app['base'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Chat/Client.php b/vendor/overtrue/wechat/src/Work/Chat/Client.php new file mode 100755 index 0000000..a1ced8f --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Chat/Client.php @@ -0,0 +1,71 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Chat; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author XiaolonY + */ +class Client extends BaseClient +{ + /** + * Get chat. + * + * @param string $chatId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function get(string $chatId) + { + return $this->httpGet('cgi-bin/appchat/get', ['chatid' => $chatId]); + } + + /** + * Create chat. + * + * @param array $data + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function create(array $data) + { + return $this->httpPostJson('cgi-bin/appchat/create', $data); + } + + /** + * Update chat. + * + * @param string $chatId + * @param array $data + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function update(string $chatId, array $data) + { + return $this->httpPostJson('cgi-bin/appchat/update', array_merge(['chatid' => $chatId], $data)); + } + + /** + * Send a message. + * + * @param array $message + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function send(array $message) + { + return $this->httpPostJson('cgi-bin/appchat/send', $message); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Chat/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Chat/ServiceProvider.php new file mode 100755 index 0000000..5bf9b2c --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Chat/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Chat; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author XiaolonY + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['chat'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Department/Client.php b/vendor/overtrue/wechat/src/Work/Department/Client.php new file mode 100755 index 0000000..5e111d9 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Department/Client.php @@ -0,0 +1,79 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Department; + +use EasyWeChat\Kernel\BaseClient; + +/** + * This is WeWork Department Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Create a department. + * + * @param array $data + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function create(array $data) + { + return $this->httpPostJson('cgi-bin/department/create', $data); + } + + /** + * Update a department. + * + * @param int $id + * @param array $data + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function update(int $id, array $data) + { + return $this->httpPostJson('cgi-bin/department/update', array_merge(compact('id'), $data)); + } + + /** + * Delete a department. + * + * @param int $id + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function delete($id) + { + return $this->httpGet('cgi-bin/department/delete', compact('id')); + } + + /** + * Get department lists. + * + * @param int|null $id + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list($id = null) + { + return $this->httpGet('cgi-bin/department/list', compact('id')); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Department/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Department/ServiceProvider.php new file mode 100755 index 0000000..2fe5bc6 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Department/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Department; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['department'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/Client.php b/vendor/overtrue/wechat/src/Work/ExternalContact/Client.php new file mode 100755 index 0000000..97528df --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/ExternalContact/Client.php @@ -0,0 +1,116 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\ExternalContact; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * 获取配置了客户联系功能的成员列表. + * + * @see https://work.weixin.qq.com/api/doc#90000/90135/91554 + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getFollowUsers() + { + return $this->httpGet('cgi-bin/externalcontact/get_follow_user_list'); + } + + /** + * 获取外部联系人列表. + * + * @see https://work.weixin.qq.com/api/doc#90000/90135/91555 + * + * @param string $userId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function list(string $userId) + { + return $this->httpGet('cgi-bin/externalcontact/list', [ + 'userid' => $userId, + ]); + } + + /** + * 获取外部联系人详情. + * + * @see https://work.weixin.qq.com/api/doc#90000/90135/91556 + * + * @param string $externalUserId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(string $externalUserId) + { + return $this->httpGet('cgi-bin/externalcontact/get', [ + 'external_userid' => $externalUserId, + ]); + } + + /** + * 获取离职成员的客户列表. + * + * @see https://work.weixin.qq.com/api/doc#90000/90135/91563 + * + * @param int $pageId + * @param int $pageSize + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getUnassigned(int $pageId = 0, int $pageSize = 1000) + { + return $this->httpPostJson('cgi-bin/externalcontact/get_unassigned_list', [ + 'page_id' => $pageId, + 'page_size' => $pageSize, + ]); + } + + /** + * 离职成员的外部联系人再分配. + * + * @see https://work.weixin.qq.com/api/doc#90000/90135/91564 + * + * @param string $externalUserId + * @param string $handoverUserId + * @param string $takeoverUserId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function transfer(string $externalUserId, string $handoverUserId, string $takeoverUserId) + { + $params = [ + 'external_userid' => $externalUserId, + 'handover_userid' => $handoverUserId, + 'takeover_userid' => $takeoverUserId, + ]; + + return $this->httpPostJson('cgi-bin/externalcontact/transfer', $params); + } +} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/ContactWayClient.php b/vendor/overtrue/wechat/src/Work/ExternalContact/ContactWayClient.php new file mode 100755 index 0000000..a1c49dd --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/ExternalContact/ContactWayClient.php @@ -0,0 +1,94 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\ExternalContact; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class ContactWayClient. + * + * @author milkmeowo + */ +class ContactWayClient extends BaseClient +{ + /** + * 配置客户联系「联系我」方式. + * + * @param int $type + * @param int $scene + * @param array $config + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function create(int $type, int $scene, array $config = []) + { + $params = array_merge([ + 'type' => $type, + 'scene' => $scene, + ], $config); + + return $this->httpPostJson('cgi-bin/externalcontact/add_contact_way', $params); + } + + /** + * 获取企业已配置的「联系我」方式. + * + * @param string $configId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(string $configId) + { + return $this->httpPostJson('cgi-bin/externalcontact/get_contact_way', [ + 'config_id' => $configId, + ]); + } + + /** + * 更新企业已配置的「联系我」方式. + * + * @param string $configId + * @param array $config + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function update(string $configId, array $config = []) + { + $params = array_merge([ + 'config_id' => $configId, + ], $config); + + return $this->httpPostJson('cgi-bin/externalcontact/update_contact_way', $params); + } + + /** + * 删除企业已配置的「联系我」方式. + * + * @param string $configId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function delete(string $configId) + { + return $this->httpPostJson('cgi-bin/externalcontact/del_contact_way', [ + 'config_id' => $configId, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/MessageClient.php b/vendor/overtrue/wechat/src/Work/ExternalContact/MessageClient.php new file mode 100755 index 0000000..c9f80ef --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/ExternalContact/MessageClient.php @@ -0,0 +1,165 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\ExternalContact; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; + +/** + * Class MessageClient. + * + * @author milkmeowo + */ +class MessageClient extends BaseClient +{ + /** + * Required attributes. + * + * @var array + */ + protected $required = ['content', 'media_id', 'title', 'url', 'pic_media_id', 'appid', 'page']; + + protected $textMessage = [ + 'content' => '', + ]; + + protected $imageMessage = [ + 'media_id' => '', + ]; + + protected $linkMessage = [ + 'title' => '', + 'picurl' => '', + 'desc' => '', + 'url' => '', + ]; + + protected $miniprogramMessage = [ + 'title' => '', + 'pic_media_id' => '', + 'appid' => '', + 'page' => '', + ]; + + /** + * 添加企业群发消息模板 + * + * @see https://work.weixin.qq.com/api/doc#90000/90135/91560 + * + * @param array $msg + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function submit(array $msg) + { + $params = $this->formatMessage($msg); + + return $this->httpPostJson('cgi-bin/externalcontact/add_msg_template', $params); + } + + /** + * 获取企业群发消息发送结果. + * + * @see https://work.weixin.qq.com/api/doc#90000/90135/91561 + * + * @param string $msgId + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(string $msgId) + { + return $this->httpPostJson('cgi-bin/externalcontact/get_group_msg_result', [ + 'msgid' => $msgId, + ]); + } + + /** + * 发送新客户欢迎语. + * + * @see https://work.weixin.qq.com/api/doc#90000/90135/91688 + * + * @param string $welcomeCode + * @param array $msg + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function sendWelcome(string $welcomeCode, array $msg) + { + $formattedMsg = $this->formatMessage($msg); + + $params = array_merge($formattedMsg, [ + 'welcome_code' => $welcomeCode, + ]); + + return $this->httpPostJson('cgi-bin/externalcontact/send_welcome_msg', $params); + } + + /** + * @param array $data + * + * @return array + * + * @throws InvalidArgumentException + */ + protected function formatMessage(array $data = []) + { + $params = $data; + + if (!empty($params['text'])) { + $params['text'] = $this->formatFields($params['text'], $this->textMessage); + } + + if (!empty($params['image'])) { + $params['image'] = $this->formatFields($params['image'], $this->imageMessage); + } + + if (!empty($params['link'])) { + $params['link'] = $this->formatFields($params['link'], $this->linkMessage); + } + + if (!empty($params['miniprogram'])) { + $params['miniprogram'] = $this->formatFields($params['miniprogram'], $this->miniprogramMessage); + } + + return $params; + } + + /** + * @param array $data + * @param array $default + * + * @return array + * + * @throws InvalidArgumentException + */ + protected function formatFields(array $data = [], array $default = []) + { + $params = array_merge($default, $data); + foreach ($params as $key => $value) { + if (in_array($key, $this->required, true) && empty($value) && empty($default[$key])) { + throw new InvalidArgumentException(sprintf('Attribute "%s" can not be empty!', $key)); + } + + $params[$key] = empty($value) ? $default[$key] : $value; + } + + return $params; + } +} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/ExternalContact/ServiceProvider.php new file mode 100755 index 0000000..b76630a --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/ExternalContact/ServiceProvider.php @@ -0,0 +1,45 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\ExternalContact; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['external_contact'] = function ($app) { + return new Client($app); + }; + + $app['contact_way'] = function ($app) { + return new ContactWayClient($app); + }; + + $app['external_contact_statistics'] = function ($app) { + return new StatisticsClient($app); + }; + + $app['external_contact_message'] = function ($app) { + return new MessageClient($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/ExternalContact/StatisticsClient.php b/vendor/overtrue/wechat/src/Work/ExternalContact/StatisticsClient.php new file mode 100755 index 0000000..da8af2f --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/ExternalContact/StatisticsClient.php @@ -0,0 +1,46 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\ExternalContact; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class StatisticsClient. + * + * @author milkmeowo + */ +class StatisticsClient extends BaseClient +{ + /** + * 获取员工行为数据. + * + * @see https://work.weixin.qq.com/api/doc#90000/90135/91580 + * + * @param array $userIds + * @param string $from + * @param string $to + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function userBehavior(array $userIds, string $from, string $to) + { + $params = [ + 'userid' => $userIds, + 'start_time' => $from, + 'end_time' => $to, + ]; + + return $this->httpPostJson('cgi-bin/externalcontact/get_user_behavior_data', $params); + } +} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Client.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Client.php new file mode 100755 index 0000000..901913f --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/GroupRobot/Client.php @@ -0,0 +1,48 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\GroupRobot; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Work\GroupRobot\Messages\Message; + +/** + * Class Client. + * + * @author her-cat + */ +class Client extends BaseClient +{ + /** + * @param string|Message $message + * + * @return Messenger + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function message($message) + { + return (new Messenger($this))->message($message); + } + + /** + * @param string $key + * @param array $message + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function send(string $key, array $message) + { + return $this->httpPostJson('cgi-bin/webhook/send', $message, ['key' => $key]); + } +} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Image.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Image.php new file mode 100755 index 0000000..14beb81 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Image.php @@ -0,0 +1,41 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\GroupRobot\Messages; + +/** + * Class Image. + * + * @author her-cat + */ +class Image extends Message +{ + /** + * @var string + */ + protected $type = 'image'; + + /** + * @var array + */ + protected $properties = ['base64', 'md5']; + + /** + * Image constructor. + * + * @param string $base64 + * @param string $md5 + */ + public function __construct(string $base64, string $md5) + { + parent::__construct(compact('base64', 'md5')); + } +} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Markdown.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Markdown.php new file mode 100755 index 0000000..dfe6980 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Markdown.php @@ -0,0 +1,40 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\GroupRobot\Messages; + +/** + * Class Markdown. + * + * @author her-cat + */ +class Markdown extends Message +{ + /** + * @var string + */ + protected $type = 'markdown'; + + /** + * @var array + */ + protected $properties = ['content']; + + /** + * Markdown constructor. + * + * @param string $content + */ + public function __construct(string $content) + { + parent::__construct(compact('content')); + } +} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Message.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Message.php new file mode 100755 index 0000000..50201b9 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Message.php @@ -0,0 +1,23 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\GroupRobot\Messages; + +use EasyWeChat\Kernel\Messages\Message as BaseMessage; + +/** + * Class Message. + * + * @author her-cat + */ +class Message extends BaseMessage +{ +} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/News.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/News.php new file mode 100755 index 0000000..835023e --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/News.php @@ -0,0 +1,55 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\GroupRobot\Messages; + +/** + * Class News. + * + * @author her-cat + */ +class News extends Message +{ + /** + * @var string + */ + protected $type = 'news'; + + /** + * @var array + */ + protected $properties = ['items']; + + /** + * News constructor. + * + * @param array $items + */ + public function __construct(array $items = []) + { + parent::__construct(compact('items')); + } + + /** + * @param array $data + * @param array $aliases + * + * @return array + */ + public function propertiesToArray(array $data, array $aliases = []): array + { + return ['articles' => array_map(function ($item) { + if ($item instanceof NewsItem) { + return $item->toJsonArray(); + } + }, $this->get('items'))]; + } +} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/NewsItem.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/NewsItem.php new file mode 100755 index 0000000..2d206de --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/NewsItem.php @@ -0,0 +1,45 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\GroupRobot\Messages; + +/** + * Class NewsItem. + * + * @author her-cat + */ +class NewsItem extends Message +{ + /** + * @var string + */ + protected $type = 'news'; + + /** + * @var array + */ + protected $properties = [ + 'title', + 'description', + 'url', + 'image', + ]; + + public function toJsonArray() + { + return [ + 'title' => $this->get('title'), + 'description' => $this->get('description'), + 'url' => $this->get('url'), + 'picurl' => $this->get('image'), + ]; + } +} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Text.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Text.php new file mode 100755 index 0000000..a1e6dda --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/GroupRobot/Messages/Text.php @@ -0,0 +1,70 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\GroupRobot\Messages; + +/** + * Class Text. + * + * @author her-cat + */ +class Text extends Message +{ + /** + * @var string + */ + protected $type = 'text'; + + /** + * @var array + */ + protected $properties = ['content', 'mentioned_list', 'mentioned_mobile_list']; + + /** + * Text constructor. + * + * @param string $content + * @param string|array $userIds + * @param string|array $mobiles + */ + public function __construct(string $content, $userIds = [], $mobiles = []) + { + parent::__construct([ + 'content' => $content, + 'mentioned_list' => (array) $userIds, + 'mentioned_mobile_list' => (array) $mobiles, + ]); + } + + /** + * @param array $userIds + * + * @return Text + */ + public function mention($userIds) + { + $this->set('mentioned_list', (array) $userIds); + + return $this; + } + + /** + * @param array $mobiles + * + * @return Text + */ + public function mentionByMobile($mobiles) + { + $this->set('mentioned_mobile_list', (array) $mobiles); + + return $this; + } +} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/Messenger.php b/vendor/overtrue/wechat/src/Work/GroupRobot/Messenger.php new file mode 100755 index 0000000..573296a --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/GroupRobot/Messenger.php @@ -0,0 +1,129 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\GroupRobot; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Exceptions\InvalidConfigException; +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Work\GroupRobot\Messages\Message; +use EasyWeChat\Work\GroupRobot\Messages\Text; + +/** + * Class Messenger. + * + * @author her-cat + */ +class Messenger +{ + /** + * @var Client + */ + protected $client; + + /** + * @var Message|null + */ + protected $message; + + /** + * @var string|null + */ + protected $groupKey; + + /** + * Messenger constructor. + * + * @param Client $client + */ + public function __construct(Client $client) + { + $this->client = $client; + } + + /** + * @param string|Message $message + * + * @return Messenger + * + * @throws InvalidArgumentException + */ + public function message($message) + { + if (is_string($message) || is_numeric($message)) { + $message = new Text($message); + } + + if (!($message instanceof Message)) { + throw new InvalidArgumentException('Invalid message.'); + } + + $this->message = $message; + + return $this; + } + + /** + * @param string $groupKey + * + * @return Messenger + */ + public function toGroup(string $groupKey) + { + $this->groupKey = $groupKey; + + return $this; + } + + /** + * @param string|Message|null $message + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws RuntimeException + * @throws InvalidArgumentException + * @throws InvalidConfigException + */ + public function send($message = null) + { + if ($message) { + $this->message($message); + } + + if (empty($this->message)) { + throw new RuntimeException('No message to send.'); + } + + if (is_null($this->groupKey)) { + throw new RuntimeException('No group key specified.'); + } + + $message = $this->message->transformForJsonRequest(); + + return $this->client->send($this->groupKey, $message); + } + + /** + * @param string $property + * + * @return mixed + * + * @throws InvalidArgumentException + */ + public function __get($property) + { + if (property_exists($this, $property)) { + return $this->$property; + } + + throw new InvalidArgumentException(sprintf('No property named "%s"', $property)); + } +} diff --git a/vendor/overtrue/wechat/src/Work/GroupRobot/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/GroupRobot/ServiceProvider.php new file mode 100755 index 0000000..d72d630 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/GroupRobot/ServiceProvider.php @@ -0,0 +1,37 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\GroupRobot; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author her-cat + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc} + */ + public function register(Container $app) + { + $app['group_robot'] = function ($app) { + return new Client($app); + }; + + $app['group_robot_messenger'] = function ($app) { + return new Messenger($app['group_robot']); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Invoice/Client.php b/vendor/overtrue/wechat/src/Work/Invoice/Client.php new file mode 100755 index 0000000..1956825 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Invoice/Client.php @@ -0,0 +1,96 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Invoice; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * @param string $cardId + * @param string $encryptCode + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function get(string $cardId, string $encryptCode) + { + $params = [ + 'card_id' => $cardId, + 'encrypt_code' => $encryptCode, + ]; + + return $this->httpPostJson('cgi-bin/card/invoice/reimburse/getinvoiceinfo', $params); + } + + /** + * @param array $invoices + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function select(array $invoices) + { + $params = [ + 'item_list' => $invoices, + ]; + + return $this->httpPostJson('cgi-bin/card/invoice/reimburse/getinvoiceinfobatch', $params); + } + + /** + * @param string $cardId + * @param string $encryptCode + * @param string $status + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function update(string $cardId, string $encryptCode, string $status) + { + $params = [ + 'card_id' => $cardId, + 'encrypt_code' => $encryptCode, + 'reimburse_status' => $status, + ]; + + return $this->httpPostJson('cgi-bin/card/invoice/reimburse/updateinvoicestatus', $params); + } + + /** + * @param array $invoices + * @param string $openid + * @param string $status + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function batchUpdate(array $invoices, string $openid, string $status) + { + $params = [ + 'openid' => $openid, + 'reimburse_status' => $status, + 'invoice_list' => $invoices, + ]; + + return $this->httpPostJson('cgi-bin/card/invoice/reimburse/updatestatusbatch', $params); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Invoice/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Invoice/ServiceProvider.php new file mode 100755 index 0000000..3259d80 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Invoice/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Invoice; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['invoice'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Jssdk/Client.php b/vendor/overtrue/wechat/src/Work/Jssdk/Client.php new file mode 100755 index 0000000..498b590 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Jssdk/Client.php @@ -0,0 +1,32 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Jssdk; + +use EasyWeChat\BasicService\Jssdk\Client as BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + protected $ticketEndpoint = 'https://qyapi.weixin.qq.com/cgi-bin/get_jsapi_ticket'; + + /** + * @return string + */ + protected function getAppId() + { + return $this->app['config']->get('corp_id'); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Jssdk/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Jssdk/ServiceProvider.php new file mode 100755 index 0000000..efb509c --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Jssdk/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Jssdk; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['jssdk'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Media/Client.php b/vendor/overtrue/wechat/src/Work/Media/Client.php new file mode 100755 index 0000000..5b7c83d --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Media/Client.php @@ -0,0 +1,113 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Media; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Http\StreamResponse; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get media. + * + * @param string $mediaId + * + * @return array|\EasyWeChat\Kernel\Http\Response|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + * @throws \GuzzleHttp\Exception\GuzzleException + */ + public function get(string $mediaId) + { + $response = $this->requestRaw('cgi-bin/media/get', 'GET', [ + 'query' => [ + 'media_id' => $mediaId, + ], + ]); + + if (false !== stripos($response->getHeaderLine('Content-Type'), 'text/plain')) { + return $this->castResponseToType($response, $this->app['config']->get('response_type')); + } + + return StreamResponse::buildFromPsrResponse($response); + } + + /** + * Upload Image. + * + * @param string $path + * + * @return mixed + */ + public function uploadImage(string $path) + { + return $this->upload('image', $path); + } + + /** + * Upload Voice. + * + * @param string $path + * + * @return mixed + */ + public function uploadVoice(string $path) + { + return $this->upload('voice', $path); + } + + /** + * Upload Video. + * + * @param string $path + * + * @return mixed + */ + public function uploadVideo(string $path) + { + return $this->upload('video', $path); + } + + /** + * Upload File. + * + * @param string $path + * + * @return mixed + */ + public function uploadFile(string $path) + { + return $this->upload('file', $path); + } + + /** + * Upload media. + * + * @param string $type + * @param string $path + * + * @return mixed + */ + public function upload(string $type, string $path) + { + $files = [ + 'media' => $path, + ]; + + return $this->httpUpload('cgi-bin/media/upload', $files, [], compact('type')); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Media/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Media/ServiceProvider.php new file mode 100755 index 0000000..450d156 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Media/ServiceProvider.php @@ -0,0 +1,28 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Media; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['media'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Menu/Client.php b/vendor/overtrue/wechat/src/Work/Menu/Client.php new file mode 100755 index 0000000..201ecee --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Menu/Client.php @@ -0,0 +1,54 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Menu; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get menu. + * + * @return mixed + */ + public function get() + { + return $this->httpGet('cgi-bin/menu/get', ['agentid' => $this->app['config']['agent_id']]); + } + + /** + * Create menu for the given agent. + * + * @param array $data + * + * @return mixed + */ + public function create(array $data) + { + return $this->httpPostJson('cgi-bin/menu/create', $data, ['agentid' => $this->app['config']['agent_id']]); + } + + /** + * Delete menu. + * + * @return mixed + */ + public function delete() + { + return $this->httpGet('cgi-bin/menu/delete', ['agentid' => $this->app['config']['agent_id']]); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Menu/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Menu/ServiceProvider.php new file mode 100755 index 0000000..02c4290 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Menu/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Menu; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['menu'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/Message/Client.php b/vendor/overtrue/wechat/src/Work/Message/Client.php new file mode 100755 index 0000000..fe704bd --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Message/Client.php @@ -0,0 +1,45 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Message; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Messages\Message; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * @param string|\EasyWeChat\Kernel\Messages\Message $message + * + * @return \EasyWeChat\Work\Message\Messenger + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function message($message) + { + return (new Messenger($this))->message($message); + } + + /** + * @param array $message + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function send(array $message) + { + return $this->httpPostJson('cgi-bin/message/send', $message); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Message/Messenger.php b/vendor/overtrue/wechat/src/Work/Message/Messenger.php new file mode 100755 index 0000000..62bc62d --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Message/Messenger.php @@ -0,0 +1,205 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Message; + +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; +use EasyWeChat\Kernel\Exceptions\RuntimeException; +use EasyWeChat\Kernel\Messages\Message; +use EasyWeChat\Kernel\Messages\Text; + +/** + * Class MessageBuilder. + * + * @author overtrue + */ +class Messenger +{ + /** + * @var \EasyWeChat\Kernel\Messages\Message; + */ + protected $message; + + /** + * @var array + */ + protected $to = ['touser' => '@all']; + + /** + * @var int + */ + protected $agentId; + + /** + * @var bool + */ + protected $secretive = false; + + /** + * @var \EasyWeChat\Work\Message\Client + */ + protected $client; + + /** + * MessageBuilder constructor. + * + * @param \EasyWeChat\Work\Message\Client $client + */ + public function __construct(Client $client) + { + $this->client = $client; + } + + /** + * Set message to send. + * + * @param string|Message $message + * + * @return \EasyWeChat\Work\Message\Messenger + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function message($message) + { + if (is_string($message) || is_numeric($message)) { + $message = new Text($message); + } + + if (!($message instanceof Message)) { + throw new InvalidArgumentException('Invalid message.'); + } + + $this->message = $message; + + return $this; + } + + /** + * @param int $agentId + * + * @return \EasyWeChat\Work\Message\Messenger + */ + public function ofAgent(int $agentId) + { + $this->agentId = $agentId; + + return $this; + } + + /** + * @param array|string $userIds + * + * @return \EasyWeChat\Work\Message\Messenger + */ + public function toUser($userIds) + { + return $this->setRecipients($userIds, 'touser'); + } + + /** + * @param array|string $partyIds + * + * @return \EasyWeChat\Work\Message\Messenger + */ + public function toParty($partyIds) + { + return $this->setRecipients($partyIds, 'toparty'); + } + + /** + * @param array|string $tagIds + * + * @return \EasyWeChat\Work\Message\Messenger + */ + public function toTag($tagIds) + { + return $this->setRecipients($tagIds, 'totag'); + } + + /** + * Keep secret. + * + * @return \EasyWeChat\Work\Message\Messenger + */ + public function secretive() + { + $this->secretive = true; + + return $this; + } + + /** + * @param array|string $ids + * @param string $key + * + * @return \EasyWeChat\Work\Message\Messenger + */ + protected function setRecipients($ids, string $key): self + { + if (is_array($ids)) { + $ids = implode('|', $ids); + } + + $this->to = [$key => $ids]; + + return $this; + } + + /** + * @param \EasyWeChat\Kernel\Messages\Message|string|null $message + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\RuntimeException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException + */ + public function send($message = null) + { + if ($message) { + $this->message($message); + } + + if (empty($this->message)) { + throw new RuntimeException('No message to send.'); + } + + if (is_null($this->agentId)) { + throw new RuntimeException('No agentid specified.'); + } + + $message = $this->message->transformForJsonRequest(array_merge([ + 'agentid' => $this->agentId, + 'safe' => intval($this->secretive), + ], $this->to)); + + $this->secretive = false; + + return $this->client->send($message); + } + + /** + * Return property. + * + * @param string $property + * + * @return mixed + * + * @throws InvalidArgumentException + */ + public function __get($property) + { + if (property_exists($this, $property)) { + return $this->$property; + } + + throw new InvalidArgumentException(sprintf('No property named "%s"', $property)); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Message/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Message/ServiceProvider.php new file mode 100755 index 0000000..18193bd --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Message/ServiceProvider.php @@ -0,0 +1,43 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Message; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['message'] = function ($app) { + return new Client($app); + }; + + $app['messenger'] = function ($app) { + $messenger = new Messenger($app['message']); + + if (is_int($app['config']['agent_id'])) { + $messenger->ofAgent($app['config']['agent_id']); + } + + return $messenger; + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/MiniProgram/Application.php b/vendor/overtrue/wechat/src/Work/MiniProgram/Application.php new file mode 100755 index 0000000..aa290cd --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/MiniProgram/Application.php @@ -0,0 +1,44 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\MiniProgram; + +use EasyWeChat\MiniProgram\Application as MiniProgram; +use EasyWeChat\Work\Auth\AccessToken; +use EasyWeChat\Work\MiniProgram\Auth\Client; + +/** + * Class Application. + * + * @author Caikeal + * + * @property \EasyWeChat\Work\MiniProgram\Auth\Client $auth + */ +class Application extends MiniProgram +{ + /** + * Application constructor. + * + * @param array $config + * @param array $prepends + */ + public function __construct(array $config = [], array $prepends = []) + { + parent::__construct($config, $prepends + [ + 'access_token' => function ($app) { + return new AccessToken($app); + }, + 'auth' => function ($app) { + return new Client($app); + }, + ]); + } +} diff --git a/vendor/overtrue/wechat/src/Work/MiniProgram/Auth/Client.php b/vendor/overtrue/wechat/src/Work/MiniProgram/Auth/Client.php new file mode 100755 index 0000000..ac9baff --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/MiniProgram/Auth/Client.php @@ -0,0 +1,39 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\MiniProgram\Auth; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + */ +class Client extends BaseClient +{ + /** + * Get session info by code. + * + * @param string $code + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function session(string $code) + { + $params = [ + 'js_code' => $code, + 'grant_type' => 'authorization_code', + ]; + + return $this->httpGet('cgi-bin/miniprogram/jscode2session', $params); + } +} diff --git a/vendor/overtrue/wechat/src/Work/OA/Client.php b/vendor/overtrue/wechat/src/Work/OA/Client.php new file mode 100755 index 0000000..34c0a7b --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/OA/Client.php @@ -0,0 +1,64 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\OA; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Get the checkin data. + * + * @param int $startTime + * @param int $endTime + * @param array $userList + * @param int $type + * + * @return mixed + */ + public function checkinRecords(int $startTime, int $endTime, array $userList, int $type = 3) + { + $params = [ + 'opencheckindatatype' => $type, + 'starttime' => $startTime, + 'endtime' => $endTime, + 'useridlist' => $userList, + ]; + + return $this->httpPostJson('cgi-bin/checkin/getcheckindata', $params); + } + + /** + * Get Approval Data. + * + * @param int $startTime + * @param int $endTime + * @param int $nextNumber + * + * @return mixed + */ + public function approvalRecords(int $startTime, int $endTime, int $nextNumber = null) + { + $params = [ + 'starttime' => $startTime, + 'endtime' => $endTime, + 'next_spnum' => $nextNumber, + ]; + + return $this->httpPostJson('cgi-bin/corp/getapprovaldata', $params); + } +} diff --git a/vendor/overtrue/wechat/src/Work/OA/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/OA/ServiceProvider.php new file mode 100755 index 0000000..5d389c2 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/OA/ServiceProvider.php @@ -0,0 +1,33 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\OA; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['oa'] = function ($app) { + return new Client($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/OAuth/AccessTokenDelegate.php b/vendor/overtrue/wechat/src/Work/OAuth/AccessTokenDelegate.php new file mode 100755 index 0000000..9acfbbb --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/OAuth/AccessTokenDelegate.php @@ -0,0 +1,46 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\OAuth; + +use EasyWeChat\Work\Application; +use Overtrue\Socialite\AccessTokenInterface; + +/** + * Class AccessTokenDelegate. + * + * @author mingyoung + */ +class AccessTokenDelegate implements AccessTokenInterface +{ + /** + * @var \EasyWeChat\Work\Application + */ + protected $app; + + /** + * @param \EasyWeChat\Work\Application $app + */ + public function __construct(Application $app) + { + $this->app = $app; + } + + /** + * Return the access token string. + * + * @return string + */ + public function getToken() + { + return $this->app['access_token']->getToken()['access_token']; + } +} diff --git a/vendor/overtrue/wechat/src/Work/OAuth/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/OAuth/ServiceProvider.php new file mode 100755 index 0000000..b1fdfce --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/OAuth/ServiceProvider.php @@ -0,0 +1,62 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\OAuth; + +use Overtrue\Socialite\SocialiteManager; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +class ServiceProvider implements ServiceProviderInterface +{ + public function register(Container $app) + { + $app['oauth'] = function ($app) { + $socialite = (new SocialiteManager([ + 'wework' => [ + 'client_id' => $app['config']['corp_id'], + 'client_secret' => null, + 'redirect' => $this->prepareCallbackUrl($app), + ], + ], $app['request']))->driver('wework'); + + $scopes = (array) $app['config']->get('oauth.scopes', ['snsapi_base']); + + if (!empty($scopes)) { + $socialite->scopes($scopes); + } else { + $socialite->setAgentId($app['config']['agent_id']); + } + + return $socialite->setAccessToken(new AccessTokenDelegate($app)); + }; + } + + /** + * Prepare the OAuth callback url for wechat. + * + * @param Container $app + * + * @return string + */ + private function prepareCallbackUrl($app) + { + $callback = $app['config']->get('oauth.callback'); + + if (0 === stripos($callback, 'http')) { + return $callback; + } + + $baseUrl = $app['request']->getSchemeAndHttpHost(); + + return $baseUrl.'/'.ltrim($callback, '/'); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Server/Guard.php b/vendor/overtrue/wechat/src/Work/Server/Guard.php new file mode 100755 index 0000000..b77c6c1 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Server/Guard.php @@ -0,0 +1,48 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Server; + +use EasyWeChat\Kernel\ServerGuard; + +/** + * Class Guard. + * + * @author overtrue + */ +class Guard extends ServerGuard +{ + /** + * @return $this + */ + public function validate() + { + return $this; + } + + /** + * Check the request message safe mode. + * + * @return bool + */ + protected function isSafeMode(): bool + { + return true; + } + + /** + * @return bool + */ + protected function shouldReturnRawResponse(): bool + { + return !is_null($this->app['request']->get('echostr')); + } +} diff --git a/vendor/overtrue/wechat/src/Work/Server/Handlers/EchoStrHandler.php b/vendor/overtrue/wechat/src/Work/Server/Handlers/EchoStrHandler.php new file mode 100755 index 0000000..64555ef --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Server/Handlers/EchoStrHandler.php @@ -0,0 +1,58 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Server\Handlers; + +use EasyWeChat\Kernel\Contracts\EventHandlerInterface; +use EasyWeChat\Kernel\Decorators\FinallyResult; +use EasyWeChat\Kernel\ServiceContainer; + +/** + * Class EchoStrHandler. + * + * @author overtrue + */ +class EchoStrHandler implements EventHandlerInterface +{ + /** + * @var ServiceContainer + */ + protected $app; + + /** + * EchoStrHandler constructor. + * + * @param ServiceContainer $app + */ + public function __construct(ServiceContainer $app) + { + $this->app = $app; + } + + /** + * @param mixed $payload + * + * @return FinallyResult|null + */ + public function handle($payload = null) + { + if ($decrypted = $this->app['request']->get('echostr')) { + $str = $this->app['encryptor']->decrypt( + $decrypted, + $this->app['request']->get('msg_signature'), + $this->app['request']->get('nonce'), + $this->app['request']->get('timestamp') + ); + + return new FinallyResult($str); + } + } +} diff --git a/vendor/overtrue/wechat/src/Work/Server/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/Server/ServiceProvider.php new file mode 100755 index 0000000..8a2fc3e --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/Server/ServiceProvider.php @@ -0,0 +1,46 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\Server; + +use EasyWeChat\Kernel\Encryptor; +use EasyWeChat\Work\Server\Handlers\EchoStrHandler; +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author overtrue + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + !isset($app['encryptor']) && $app['encryptor'] = function ($app) { + return new Encryptor( + $app['config']['corp_id'], + $app['config']['token'], + $app['config']['aes_key'] + ); + }; + + !isset($app['server']) && $app['server'] = function ($app) { + $guard = new Guard($app); + $guard->push(new EchoStrHandler($app)); + + return $guard; + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/User/Client.php b/vendor/overtrue/wechat/src/Work/User/Client.php new file mode 100755 index 0000000..6cb79a8 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/User/Client.php @@ -0,0 +1,223 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\User; + +use EasyWeChat\Kernel\BaseClient; +use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; + +/** + * Class Client. + * + * @author mingyoung + */ +class Client extends BaseClient +{ + /** + * Create a user. + * + * @param array $data + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function create(array $data) + { + return $this->httpPostJson('cgi-bin/user/create', $data); + } + + /** + * Update an exist user. + * + * @param string $id + * @param array $data + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + */ + public function update(string $id, array $data) + { + return $this->httpPostJson('cgi-bin/user/update', array_merge(['userid' => $id], $data)); + } + + /** + * Delete a user. + * + * @param string|array $userId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function delete($userId) + { + if (is_array($userId)) { + return $this->batchDelete($userId); + } + + return $this->httpGet('cgi-bin/user/delete', ['userid' => $userId]); + } + + /** + * Batch delete users. + * + * @param array $userIds + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function batchDelete(array $userIds) + { + return $this->httpPostJson('cgi-bin/user/batchdelete', ['useridlist' => $userIds]); + } + + /** + * Get user. + * + * @param string $userId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function get(string $userId) + { + return $this->httpGet('cgi-bin/user/get', ['userid' => $userId]); + } + + /** + * Get simple user list. + * + * @param int $departmentId + * @param bool $fetchChild + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function getDepartmentUsers(int $departmentId, bool $fetchChild = false) + { + $params = [ + 'department_id' => $departmentId, + 'fetch_child' => (int) $fetchChild, + ]; + + return $this->httpGet('cgi-bin/user/simplelist', $params); + } + + /** + * Get user list. + * + * @param int $departmentId + * @param bool $fetchChild + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function getDetailedDepartmentUsers(int $departmentId, bool $fetchChild = false) + { + $params = [ + 'department_id' => $departmentId, + 'fetch_child' => (int) $fetchChild, + ]; + + return $this->httpGet('cgi-bin/user/list', $params); + } + + /** + * Convert userId to openid. + * + * @param string $userId + * @param int|null $agentId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function userIdToOpenid(string $userId, int $agentId = null) + { + $params = [ + 'userid' => $userId, + 'agentid' => $agentId, + ]; + + return $this->httpPostJson('cgi-bin/user/convert_to_openid', $params); + } + + /** + * Convert openid to userId. + * + * @param string $openid + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function openidToUserId(string $openid) + { + $params = [ + 'openid' => $openid, + ]; + + return $this->httpPostJson('cgi-bin/user/convert_to_userid', $params); + } + + /** + * Convert mobile to userId. + * + * @param string $mobile + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function mobileToUserId(string $mobile) + { + $params = [ + 'mobile' => $mobile, + ]; + + return $this->httpPostJson('cgi-bin/user/getuserid', $params); + } + + /** + * @param string $userId + * + * @return \Psr\Http\Message\ResponseInterface|\EasyWeChat\Kernel\Support\Collection|array|object|string + */ + public function accept(string $userId) + { + $params = [ + 'userid' => $userId, + ]; + + return $this->httpGet('cgi-bin/user/authsucc', $params); + } + + /** + * Batch invite users. + * + * @param array $params + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function invite(array $params) + { + return $this->httpPostJson('cgi-bin/batch/invite', $params); + } + + /** + * Get invitation QR code. + * + * @param int $sizeType + * + * @return array|\EasyWeChat\Kernel\Support\Collection|object|\Psr\Http\Message\ResponseInterface|string + * + * @throws InvalidArgumentException + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + public function getInvitationQrCode(int $sizeType = 1) + { + if (!\in_array($sizeType, [1, 2, 3, 4], true)) { + throw new InvalidArgumentException('The sizeType must be 1, 2, 3, 4.'); + } + + return $this->httpGet('cgi-bin/corp/get_join_qrcode', ['size_type' => $sizeType]); + } +} diff --git a/vendor/overtrue/wechat/src/Work/User/ServiceProvider.php b/vendor/overtrue/wechat/src/Work/User/ServiceProvider.php new file mode 100755 index 0000000..fcb5f10 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/User/ServiceProvider.php @@ -0,0 +1,37 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\User; + +use Pimple\Container; +use Pimple\ServiceProviderInterface; + +/** + * Class ServiceProvider. + * + * @author mingyoung + */ +class ServiceProvider implements ServiceProviderInterface +{ + /** + * {@inheritdoc}. + */ + public function register(Container $app) + { + $app['user'] = function ($app) { + return new Client($app); + }; + + $app['tag'] = function ($app) { + return new TagClient($app); + }; + } +} diff --git a/vendor/overtrue/wechat/src/Work/User/TagClient.php b/vendor/overtrue/wechat/src/Work/User/TagClient.php new file mode 100755 index 0000000..0f67898 --- /dev/null +++ b/vendor/overtrue/wechat/src/Work/User/TagClient.php @@ -0,0 +1,153 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +namespace EasyWeChat\Work\User; + +use EasyWeChat\Kernel\BaseClient; + +/** + * Class TagClient. + * + * @author mingyoung + */ +class TagClient extends BaseClient +{ + /** + * Create tag. + * + * @param string $tagName + * @param int|null $tagId + * + * @return mixed + */ + public function create(string $tagName, int $tagId = null) + { + $params = [ + 'tagname' => $tagName, + 'tagid' => $tagId, + ]; + + return $this->httpPostJson('cgi-bin/tag/create', $params); + } + + /** + * Update tag. + * + * @param int $tagId + * @param string $tagName + * + * @return mixed + */ + public function update(int $tagId, string $tagName) + { + $params = [ + 'tagid' => $tagId, + 'tagname' => $tagName, + ]; + + return $this->httpPostJson('cgi-bin/tag/update', $params); + } + + /** + * Delete tag. + * + * @param int $tagId + * + * @return mixed + */ + public function delete(int $tagId) + { + return $this->httpGet('cgi-bin/tag/delete', ['tagid' => $tagId]); + } + + /** + * @param int $tagId + * + * @return mixed + */ + public function get(int $tagId) + { + return $this->httpGet('cgi-bin/tag/get', ['tagid' => $tagId]); + } + + /** + * @param int $tagId + * @param array $userList + * + * @return mixed + */ + public function tagUsers(int $tagId, array $userList = []) + { + return $this->tagOrUntagUsers('cgi-bin/tag/addtagusers', $tagId, $userList); + } + + /** + * @param int $tagId + * @param array $partyList + * + * @return mixed + */ + public function tagDepartments(int $tagId, array $partyList = []) + { + return $this->tagOrUntagUsers('cgi-bin/tag/addtagusers', $tagId, [], $partyList); + } + + /** + * @param int $tagId + * @param array $userList + * + * @return mixed + */ + public function untagUsers(int $tagId, array $userList = []) + { + return $this->tagOrUntagUsers('cgi-bin/tag/deltagusers', $tagId, $userList); + } + + /** + * @param int $tagId + * @param array $partyList + * + * @return mixed + */ + public function untagDepartments(int $tagId, array $partyList = []) + { + return $this->tagOrUntagUsers('cgi-bin/tag/deltagusers', $tagId, [], $partyList); + } + + /** + * @param string $endpoint + * @param int $tagId + * @param array $userList + * @param array $partyList + * + * @return mixed + * + * @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException + */ + protected function tagOrUntagUsers(string $endpoint, int $tagId, array $userList = [], array $partyList = []) + { + $data = [ + 'tagid' => $tagId, + 'userlist' => $userList, + 'partylist' => $partyList, + ]; + + return $this->httpPostJson($endpoint, $data); + } + + /** + * @return mixed + */ + public function list() + { + return $this->httpGet('cgi-bin/tag/list'); + } +} diff --git a/vendor/phpmailer/phpmailer/COMMITMENT b/vendor/phpmailer/phpmailer/COMMITMENT new file mode 100755 index 0000000..a687e0d --- /dev/null +++ b/vendor/phpmailer/phpmailer/COMMITMENT @@ -0,0 +1,46 @@ +GPL Cooperation Commitment +Version 1.0 + +Before filing or continuing to prosecute any legal proceeding or claim +(other than a Defensive Action) arising from termination of a Covered +License, we commit to extend to the person or entity ('you') accused +of violating the Covered License the following provisions regarding +cure and reinstatement, taken from GPL version 3. As used here, the +term 'this License' refers to the specific Covered License being +enforced. + + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you + have received notice of violation of this License (for any work) + from that copyright holder, and you cure the violation prior to 30 + days after your receipt of the notice. + +We intend this Commitment to be irrevocable, and binding and +enforceable against us and assignees of or successors to our +copyrights. + +Definitions + +'Covered License' means the GNU General Public License, version 2 +(GPLv2), the GNU Lesser General Public License, version 2.1 +(LGPLv2.1), or the GNU Library General Public License, version 2 +(LGPLv2), all as published by the Free Software Foundation. + +'Defensive Action' means a legal proceeding or claim that We bring +against you in response to a prior proceeding or claim initiated by +you or your affiliate. + +'We' means each contributor to this repository as of the date of +inclusion of this file, including subsidiaries of a corporate +contributor. + +This work is available under a Creative Commons Attribution-ShareAlike +4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/). diff --git a/vendor/phpmailer/phpmailer/LICENSE b/vendor/phpmailer/phpmailer/LICENSE new file mode 100755 index 0000000..f166cc5 --- /dev/null +++ b/vendor/phpmailer/phpmailer/LICENSE @@ -0,0 +1,502 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/README.md b/vendor/phpmailer/phpmailer/README.md new file mode 100755 index 0000000..6270646 --- /dev/null +++ b/vendor/phpmailer/phpmailer/README.md @@ -0,0 +1,218 @@ +![PHPMailer](https://raw.github.com/PHPMailer/PHPMailer/master/examples/images/phpmailer.png) + +# PHPMailer - A full-featured email creation and transfer class for PHP + +Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer) +[![Scrutinizer Quality Score](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/quality-score.png?s=3758e21d279becdf847a557a56a3ed16dfec9d5d)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) +[![Code Coverage](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/badges/coverage.png?s=3fe6ca5fe8cd2cdf96285756e42932f7ca256962)](https://scrutinizer-ci.com/g/PHPMailer/PHPMailer/) + +[![Latest Stable Version](https://poser.pugx.org/phpmailer/phpmailer/v/stable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![Total Downloads](https://poser.pugx.org/phpmailer/phpmailer/downloads)](https://packagist.org/packages/phpmailer/phpmailer) [![Latest Unstable Version](https://poser.pugx.org/phpmailer/phpmailer/v/unstable.svg)](https://packagist.org/packages/phpmailer/phpmailer) [![License](https://poser.pugx.org/phpmailer/phpmailer/license.svg)](https://packagist.org/packages/phpmailer/phpmailer) + +## Class Features +- Probably the world's most popular code for sending email from PHP! +- Used by many open-source projects: WordPress, Drupal, 1CRM, SugarCRM, Yii, Joomla! and many more +- Integrated SMTP support - send without a local mail server +- Send emails with multiple To, CC, BCC and Reply-to addresses +- Multipart/alternative emails for mail clients that do not read HTML email +- Add attachments, including inline +- Support for UTF-8 content and 8bit, base64, binary, and quoted-printable encodings +- SMTP authentication with LOGIN, PLAIN, CRAM-MD5 and XOAUTH2 mechanisms over SSL and SMTP+STARTTLS transports +- Validates email addresses automatically +- Protect against header injection attacks +- Error messages in over 50 languages! +- DKIM and S/MIME signing support +- Compatible with PHP 5.5 and later +- Namespaced to prevent name clashes +- Much more! + +## Why you might need it +Many PHP developers utilize email in their code. The only PHP function that supports this is the `mail()` function. However, it does not provide any assistance for making use of popular features such as HTML-based emails and attachments. + +Formatting email correctly is surprisingly difficult. There are myriad overlapping RFCs, requiring tight adherence to horribly complicated formatting and encoding rules - the vast majority of code that you'll find online that uses the `mail()` function directly is just plain wrong! +*Please* don't be tempted to do it yourself - if you don't use PHPMailer, there are many other excellent libraries that you should look at before rolling your own - try [SwiftMailer](https://swiftmailer.symfony.com/), [Zend/Mail](https://zendframework.github.io/zend-mail/), [eZcomponents](https://github.com/zetacomponents/Mail) etc. + +The PHP `mail()` function usually sends via a local mail server, typically fronted by a `sendmail` binary on Linux, BSD and OS X platforms, however, Windows usually doesn't include a local mail server; PHPMailer's integrated SMTP implementation allows email sending on Windows platforms without a local mail server. + +## License +This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) license, along with the [GPL Cooperation Commitment](https://gplcc.github.io/gplcc/). Please read LICENSE for information on the software availability and distribution. + +## Installation & loading +PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file: + +```json +"phpmailer/phpmailer": "~6.0" +``` + +or run + +```sh +composer require phpmailer/phpmailer +``` + +Note that the `vendor` folder and the `vendor/autoload.php` script are generated by Composer; they are not part of PHPMailer. + +If you want to use the Gmail XOAUTH2 authentication class, you will also need to add a dependency on the `league/oauth2-client` package in your `composer.json`. + +Alternatively, if you're not using Composer, copy the contents of the PHPMailer folder into one of the `include_path` directories specified in your PHP configuration and load each class file manually: + +```php +SMTPDebug = 2; // Enable verbose debug output + $mail->isSMTP(); // Set mailer to use SMTP + $mail->Host = 'smtp1.example.com;smtp2.example.com'; // Specify main and backup SMTP servers + $mail->SMTPAuth = true; // Enable SMTP authentication + $mail->Username = 'user@example.com'; // SMTP username + $mail->Password = 'secret'; // SMTP password + $mail->SMTPSecure = 'tls'; // Enable TLS encryption, `ssl` also accepted + $mail->Port = 587; // TCP port to connect to + + //Recipients + $mail->setFrom('from@example.com', 'Mailer'); + $mail->addAddress('joe@example.net', 'Joe User'); // Add a recipient + $mail->addAddress('ellen@example.com'); // Name is optional + $mail->addReplyTo('info@example.com', 'Information'); + $mail->addCC('cc@example.com'); + $mail->addBCC('bcc@example.com'); + + //Attachments + $mail->addAttachment('/var/tmp/file.tar.gz'); // Add attachments + $mail->addAttachment('/tmp/image.jpg', 'new.jpg'); // Optional name + + //Content + $mail->isHTML(true); // Set email format to HTML + $mail->Subject = 'Here is the subject'; + $mail->Body = 'This is the HTML message body in bold!'; + $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; + + $mail->send(); + echo 'Message has been sent'; +} catch (Exception $e) { + echo 'Message could not be sent. Mailer Error: ', $mail->ErrorInfo; +} +``` + +You'll find plenty more to play with in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. + +That's it. You should now be ready to use PHPMailer! + +## Localization +PHPMailer defaults to English, but in the [language](https://github.com/PHPMailer/PHPMailer/tree/master/language/) folder you'll find numerous (48 at the time of writing!) translations for PHPMailer error messages that you may encounter. Their filenames contain [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) language code for the translations, for example `fr` for French. To specify a language, you need to tell PHPMailer which one to use, like this: + +```php +// To load the French version +$mail->setLanguage('fr', '/optional/path/to/language/directory/'); +``` + +We welcome corrections and new languages - if you're looking for corrections to do, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations. + +## Documentation +Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, this should be the first place you look as it's the most frequently updated. + +Examples of how to use PHPMailer for common scenarios can be found in the [examples](https://github.com/PHPMailer/PHPMailer/tree/master/examples) folder. If you're looking for a good starting point, we recommend you start with [the Gmail example](https://github.com/PHPMailer/PHPMailer/tree/master/examples/gmail.phps). + +Note that in order to reduce PHPMailer's deployed code footprint, the examples are no longer included if you load PHPMailer via Composer or via [GitHub's zip file download](https://github.com/PHPMailer/PHPMailer/archive/master.zip), so you'll need to either clone the git repository or use the above links to get to the examples directly. + +Complete generated API documentation is [available online](http://phpmailer.github.io/PHPMailer/). + +You can generate complete API-level documentation by running `phpdoc` in the top-level folder, and documentation will appear in the `docs` folder, though you'll need to have [PHPDocumentor](http://www.phpdoc.org) installed. You may find [the unit tests](https://github.com/PHPMailer/PHPMailer/tree/master/test/phpmailerTest.php) a good source of how to do various operations such as encryption. + +If the documentation doesn't cover what you need, search the [many questions on Stack Overflow](http://stackoverflow.com/questions/tagged/phpmailer), and before you ask a question about "SMTP Error: Could not connect to SMTP host.", [read the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting). + +## Tests +There is a PHPUnit test script in the [test](https://github.com/PHPMailer/PHPMailer/tree/master/test/) folder. PHPMailer uses PHPUnit 4.8 - we would use 5.x but we need to run on PHP 5.5. + +Build status: [![Build Status](https://travis-ci.org/PHPMailer/PHPMailer.svg)](https://travis-ci.org/PHPMailer/PHPMailer) + +If this isn't passing, is there something you can do to help? + +## Security +Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately. + +PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity. + +PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer). + +PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a critical remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html). + +See [SECURITY](https://github.com/PHPMailer/PHPMailer/tree/master/SECURITY.md) for more detail on security issues. + +## Contributing +Please submit bug reports, suggestions and pull requests to the [GitHub issue tracker](https://github.com/PHPMailer/PHPMailer/issues). + +We're particularly interested in fixing edge-cases, expanding test coverage and updating translations. + +If you found a mistake in the docs, or want to add something, go ahead and amend the wiki - anyone can edit it. + +If you have git clones from prior to the move to the PHPMailer GitHub organisation, you'll need to update any remote URLs referencing the old GitHub location with a command like this from within your clone: + +```sh +git remote set-url upstream https://github.com/PHPMailer/PHPMailer.git +``` + +Please *don't* use the SourceForge or Google Code projects any more; they are obsolete and no longer maintained. + +## Sponsorship +Development time and resources for PHPMailer are provided by [Smartmessages.net](https://info.smartmessages.net/), a powerful email marketing system. + +Smartmessages email marketing + +Other contributions are gladly received, whether in beer 🍺, T-shirts 👕, Amazon wishlist raids, or cold, hard cash 💰. If you'd like to donate to say "thank you" to maintainers or contributors, please contact them through individual profile pages via [the contributors page](https://github.com/PHPMailer/PHPMailer/graphs/contributors). + +## Changelog +See [changelog](changelog.md). + +## History +- PHPMailer was originally written in 2001 by Brent R. Matzelle as a [SourceForge project](http://sourceforge.net/projects/phpmailer/). +- Marcus Bointon (coolbru on SF) and Andy Prevost (codeworxtech) took over the project in 2004. +- Became an Apache incubator project on Google Code in 2010, managed by Jim Jagielski. +- Marcus created his fork on [GitHub](https://github.com/Synchro/PHPMailer) in 2008. +- Jim and Marcus decide to join forces and use GitHub as the canonical and official repo for PHPMailer in 2013. +- PHPMailer moves to the [PHPMailer organisation](https://github.com/PHPMailer) on GitHub in 2013. + +### What's changed since moving from SourceForge? +- Official successor to the SourceForge and Google Code projects. +- Test suite. +- Continuous integration with Travis-CI. +- Composer support. +- Public development. +- Additional languages and language strings. +- CRAM-MD5 authentication support. +- Preserves full repo history of authors, commits and branches from the original SourceForge project. diff --git a/vendor/phpmailer/phpmailer/SECURITY.md b/vendor/phpmailer/phpmailer/SECURITY.md new file mode 100755 index 0000000..5e917cd --- /dev/null +++ b/vendor/phpmailer/phpmailer/SECURITY.md @@ -0,0 +1,28 @@ +# Security notices relating to PHPMailer + +Please disclose any vulnerabilities found responsibly - report any security problems found to the maintainers privately. + +PHPMailer versions prior to 6.0.6 and 5.2.27 are vulnerable to an object injection attack by passing `phar://` paths into `addAttachment()` and other functions that may receive unfiltered local paths, possibly leading to RCE. Recorded as [CVE-2018-19296](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2018-19296). See [this article](https://knasmueller.net/5-answers-about-php-phar-exploitation) for more info on this type of vulnerability. Mitigated by blocking the use of paths containing URL-protocol style prefixes such as `phar://`. Reported by Sehun Oh of cyberone.kr. + +PHPMailer versions prior to 5.2.24 (released July 26th 2017) have an XSS vulnerability in one of the code examples, [CVE-2017-11503](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-11503). The `code_generator.phps` example did not filter user input prior to output. This file is distributed with a `.phps` extension, so it it not normally executable unless it is explicitly renamed, and the file is not included when PHPMailer is loaded through composer, so it is safe by default. There was also an undisclosed potential XSS vulnerability in the default exception handler (unused by default). Patches for both issues kindly provided by Patrick Monnerat of the Fedora Project. + +PHPMailer versions prior to 5.2.22 (released January 9th 2017) have a local file disclosure vulnerability, [CVE-2017-5223](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2017-5223). If content passed into `msgHTML()` is sourced from unfiltered user input, relative paths can map to absolute local file paths and added as attachments. Also note that `addAttachment` (just like `file_get_contents`, `passthru`, `unlink`, etc) should not be passed user-sourced params either! Reported by Yongxiang Li of Asiasecurity. + +PHPMailer versions prior to 5.2.20 (released December 28th 2016) are vulnerable to [CVE-2016-10045](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10045) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](https://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10045-Vuln-Patch-Bypass.html), and patched by Paul Buonopane (@Zenexer). + +PHPMailer versions prior to 5.2.18 (released December 2016) are vulnerable to [CVE-2016-10033](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-10033) a remote code execution vulnerability, responsibly reported by [Dawid Golunski](http://legalhackers.com/advisories/PHPMailer-Exploit-Remote-Code-Exec-CVE-2016-10033-Vuln.html). + +PHPMailer versions prior to 5.2.14 (released November 2015) are vulnerable to [CVE-2015-8476](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2015-8476) an SMTP CRLF injection bug permitting arbitrary message sending. + +PHPMailer versions prior to 5.2.10 (released May 2015) are vulnerable to [CVE-2008-5619](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-5619), a remote code execution vulnerability in the bundled html2text library. This file was removed in 5.2.10, so if you are using a version prior to that and make use of the html2text function, it's vitally important that you upgrade and remove this file. + +PHPMailer versions prior to 2.0.7 and 2.2.1 are vulnerable to [CVE-2012-0796](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-0796), an email header injection attack. + +Joomla 1.6.0 uses PHPMailer in an unsafe way, allowing it to reveal local file paths, reported in [CVE-2011-3747](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-3747). + +PHPMailer didn't sanitise the `$lang_path` parameter in `SetLanguage`. This wasn't a problem in itself, but some apps (PHPClassifieds, ATutor) also failed to sanitise user-provided parameters passed to it, permitting semi-arbitrary local file inclusion, reported in [CVE-2010-4914](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-4914), [CVE-2007-2021](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-2021) and [CVE-2006-5734](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2006-5734). + +PHPMailer 1.7.2 and earlier contained a possible DDoS vulnerability reported in [CVE-2005-1807](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2005-1807). + +PHPMailer 1.7 and earlier (June 2003) have a possible vulnerability in the `SendmailSend` method where shell commands may not be sanitised. Reported in [CVE-2007-3215](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2007-3215). + diff --git a/vendor/phpmailer/phpmailer/VERSION b/vendor/phpmailer/phpmailer/VERSION new file mode 100755 index 0000000..41bd15e --- /dev/null +++ b/vendor/phpmailer/phpmailer/VERSION @@ -0,0 +1 @@ +6.0.7 \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/composer.json b/vendor/phpmailer/phpmailer/composer.json new file mode 100755 index 0000000..ee4e890 --- /dev/null +++ b/vendor/phpmailer/phpmailer/composer.json @@ -0,0 +1,55 @@ +{ + "name": "phpmailer/phpmailer", + "type": "library", + "description": "PHPMailer is a full-featured email creation and transfer class for PHP", + "authors": [ + { + "name": "Marcus Bointon", + "email": "phpmailer@synchromedia.co.uk" + }, + { + "name": "Jim Jagielski", + "email": "jimjag@gmail.com" + }, + { + "name": "Andy Prevost", + "email": "codeworxtech@users.sourceforge.net" + }, + { + "name": "Brent R. Matzelle" + } + ], + "require": { + "php": ">=5.5.0", + "ext-ctype": "*", + "ext-filter": "*" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.2", + "phpdocumentor/phpdocumentor": "2.*", + "phpunit/phpunit": "^4.8 || ^5.7", + "zendframework/zend-serializer": "2.7.*", + "doctrine/annotations": "1.2.*", + "zendframework/zend-eventmanager": "3.0.*", + "zendframework/zend-i18n": "2.7.3" + }, + "suggest": { + "psr/log": "For optional PSR-3 debug logging", + "league/oauth2-google": "Needed for Google XOAUTH2 authentication", + "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", + "stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication", + "ext-mbstring": "Needed to send email in multibyte encoding charset", + "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)" + }, + "autoload": { + "psr-4": { + "PHPMailer\\PHPMailer\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "PHPMailer\\Test\\": "test/" + } + }, + "license": "LGPL-2.1" +} diff --git a/vendor/phpmailer/phpmailer/get_oauth_token.php b/vendor/phpmailer/phpmailer/get_oauth_token.php new file mode 100755 index 0000000..1237b57 --- /dev/null +++ b/vendor/phpmailer/phpmailer/get_oauth_token.php @@ -0,0 +1,144 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ +/** + * Get an OAuth2 token from an OAuth2 provider. + * * Install this script on your server so that it's accessible + * as [https/http]:////get_oauth_token.php + * e.g.: http://localhost/phpmailer/get_oauth_token.php + * * Ensure dependencies are installed with 'composer install' + * * Set up an app in your Google/Yahoo/Microsoft account + * * Set the script address as the app's redirect URL + * If no refresh token is obtained when running this file, + * revoke access to your app and run the script again. + */ + +namespace PHPMailer\PHPMailer; + +/** + * Aliases for League Provider Classes + * Make sure you have added these to your composer.json and run `composer install` + * Plenty to choose from here: + * @see http://oauth2-client.thephpleague.com/providers/thirdparty/ + */ +// @see https://github.com/thephpleague/oauth2-google +use League\OAuth2\Client\Provider\Google; +// @see https://packagist.org/packages/hayageek/oauth2-yahoo +use Hayageek\OAuth2\Client\Provider\Yahoo; +// @see https://github.com/stevenmaguire/oauth2-microsoft +use Stevenmaguire\OAuth2\Client\Provider\Microsoft; + +if (!isset($_GET['code']) && !isset($_GET['provider'])) { +?> + +Select Provider:
                            +Google
                            +Yahoo
                            +Microsoft/Outlook/Hotmail/Live/Office365
                            + + + $clientId, + 'clientSecret' => $clientSecret, + 'redirectUri' => $redirectUri, + 'accessType' => 'offline' +]; + +$options = []; +$provider = null; + +switch ($providerName) { + case 'Google': + $provider = new Google($params); + $options = [ + 'scope' => [ + 'https://mail.google.com/' + ] + ]; + break; + case 'Yahoo': + $provider = new Yahoo($params); + break; + case 'Microsoft': + $provider = new Microsoft($params); + $options = [ + 'scope' => [ + 'wl.imap', + 'wl.offline_access' + ] + ]; + break; +} + +if (null === $provider) { + exit('Provider missing'); +} + +if (!isset($_GET['code'])) { + // If we don't have an authorization code then get one + $authUrl = $provider->getAuthorizationUrl($options); + $_SESSION['oauth2state'] = $provider->getState(); + header('Location: ' . $authUrl); + exit; +// Check given state against previously stored one to mitigate CSRF attack +} elseif (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) { + unset($_SESSION['oauth2state']); + unset($_SESSION['provider']); + exit('Invalid state'); +} else { + unset($_SESSION['provider']); + // Try to get an access token (using the authorization code grant) + $token = $provider->getAccessToken( + 'authorization_code', + [ + 'code' => $_GET['code'] + ] + ); + // Use this to interact with an API on the users behalf + // Use this to get a new access token if the old one expires + echo 'Refresh Token: ', $token->getRefreshToken(); +} diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php new file mode 100755 index 0000000..ff2a969 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-am.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP -ի սխալ: չհաջողվեց ստուգել իսկությունը.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP -ի սխալ: չհաջողվեց կապ հաստատել SMTP սերվերի հետ.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP -ի սխալ: տվյալները ընդունված չեն.'; +$PHPMAILER_LANG['empty_message'] = 'Հաղորդագրությունը դատարկ է'; +$PHPMAILER_LANG['encoding'] = 'Կոդավորման անհայտ տեսակ: '; +$PHPMAILER_LANG['execute'] = 'Չհաջողվեց իրականացնել հրամանը: '; +$PHPMAILER_LANG['file_access'] = 'Ֆայլը հասանելի չէ: '; +$PHPMAILER_LANG['file_open'] = 'Ֆայլի սխալ: ֆայլը չհաջողվեց բացել: '; +$PHPMAILER_LANG['from_failed'] = 'Ուղարկողի հետևյալ հասցեն սխալ է: '; +$PHPMAILER_LANG['instantiate'] = 'Հնարավոր չէ կանչել mail ֆունկցիան.'; +$PHPMAILER_LANG['invalid_address'] = 'Հասցեն սխալ է: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' փոստային սերվերի հետ չի աշխատում.'; +$PHPMAILER_LANG['provide_address'] = 'Անհրաժեշտ է տրամադրել գոնե մեկ ստացողի e-mail հասցե.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP -ի սխալ: չի հաջողվել ուղարկել հետևյալ ստացողների հասցեներին: '; +$PHPMAILER_LANG['signing'] = 'Ստորագրման սխալ: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP -ի connect() ֆունկցիան չի հաջողվել'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP սերվերի սխալ: '; +$PHPMAILER_LANG['variable_set'] = 'Չի հաջողվում ստեղծել կամ վերափոխել փոփոխականը: '; +$PHPMAILER_LANG['extension_missing'] = 'Հավելվածը բացակայում է: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php new file mode 100755 index 0000000..865d0b7 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ar.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'خطأ SMTP : لا يمكن تأكيد الهوية.'; +$PHPMAILER_LANG['connect_host'] = 'خطأ SMTP: لا يمكن الاتصال بالخادم SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطأ SMTP: لم يتم قبول المعلومات .'; +$PHPMAILER_LANG['empty_message'] = 'نص الرسالة فارغ'; +$PHPMAILER_LANG['encoding'] = 'ترميز غير معروف: '; +$PHPMAILER_LANG['execute'] = 'لا يمكن تنفيذ : '; +$PHPMAILER_LANG['file_access'] = 'لا يمكن الوصول للملف: '; +$PHPMAILER_LANG['file_open'] = 'خطأ في الملف: لا يمكن فتحه: '; +$PHPMAILER_LANG['from_failed'] = 'خطأ على مستوى عنوان المرسل : '; +$PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة البريد.'; +$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.'; +$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' . + 'فشل في الارسال لكل من : '; +$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.'; +$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'لا يمكن تعيين أو إعادة تعيين متغير: '; +$PHPMAILER_LANG['extension_missing'] = 'الإضافة غير موجودة: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php new file mode 100755 index 0000000..3749d83 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-az.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela prijava.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Nije moguće spojiti se sa SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznata kriptografija: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje sa navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedene e-mail adrese nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definišite barem jednu adresu primaoca.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP server nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP greška: '; +$PHPMAILER_LANG['variable_set'] = 'Nije moguće postaviti varijablu ili je vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje ekstenzija: '; \ No newline at end of file diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php new file mode 100755 index 0000000..e2f98f0 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-be.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Памылка SMTP: памылка ідэнтыфікацыі.'; +$PHPMAILER_LANG['connect_host'] = 'Памылка SMTP: нельга ўстанавіць сувязь з SMTP-серверам.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Памылка SMTP: звесткі непрынятыя.'; +$PHPMAILER_LANG['empty_message'] = 'Пустое паведамленне.'; +$PHPMAILER_LANG['encoding'] = 'Невядомая кадыроўка тэксту: '; +$PHPMAILER_LANG['execute'] = 'Нельга выканаць каманду: '; +$PHPMAILER_LANG['file_access'] = 'Няма доступу да файла: '; +$PHPMAILER_LANG['file_open'] = 'Нельга адкрыць файл: '; +$PHPMAILER_LANG['from_failed'] = 'Няправільны адрас адпраўніка: '; +$PHPMAILER_LANG['instantiate'] = 'Нельга прымяніць функцыю mail().'; +$PHPMAILER_LANG['invalid_address'] = 'Нельга даслаць паведамленне, няправільны email атрымальніка: '; +$PHPMAILER_LANG['provide_address'] = 'Запоўніце, калі ласка, правільны email атрымальніка.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - паштовы сервер не падтрымліваецца.'; +$PHPMAILER_LANG['recipients_failed'] = 'Памылка SMTP: няправільныя атрымальнікі: '; +$PHPMAILER_LANG['signing'] = 'Памылка подпісу паведамлення: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Памылка сувязі з SMTP-серверам.'; +$PHPMAILER_LANG['smtp_error'] = 'Памылка SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Нельга ўстанавіць або перамяніць значэнне пераменнай: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php new file mode 100755 index 0000000..b22941f --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-bg.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: Не може да се удостовери пред сървъра.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: Не може да се свърже с SMTP хоста.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: данните не са приети.'; +$PHPMAILER_LANG['empty_message'] = 'Съдържанието на съобщението е празно'; +$PHPMAILER_LANG['encoding'] = 'Неизвестно кодиране: '; +$PHPMAILER_LANG['execute'] = 'Не може да се изпълни: '; +$PHPMAILER_LANG['file_access'] = 'Няма достъп до файл: '; +$PHPMAILER_LANG['file_open'] = 'Файлова грешка: Не може да се отвори файл: '; +$PHPMAILER_LANG['from_failed'] = 'Следните адреси за подател са невалидни: '; +$PHPMAILER_LANG['instantiate'] = 'Не може да се инстанцира функцията mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Невалиден адрес: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' - пощенски сървър не се поддържа.'; +$PHPMAILER_LANG['provide_address'] = 'Трябва да предоставите поне един email адрес за получател.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: Следните адреси за Получател са невалидни: '; +$PHPMAILER_LANG['signing'] = 'Грешка при подписване: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP провален connect().'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP сървърна грешка: '; +$PHPMAILER_LANG['variable_set'] = 'Не може да се установи или възстанови променлива: '; +$PHPMAILER_LANG['extension_missing'] = 'Липсва разширение: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php new file mode 100755 index 0000000..4117596 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ca.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: No s’ha pogut autenticar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: No es pot connectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Dades no acceptades.'; +$PHPMAILER_LANG['empty_message'] = 'El cos del missatge està buit.'; +$PHPMAILER_LANG['encoding'] = 'Codificació desconeguda: '; +$PHPMAILER_LANG['execute'] = 'No es pot executar: '; +$PHPMAILER_LANG['file_access'] = 'No es pot accedir a l’arxiu: '; +$PHPMAILER_LANG['file_open'] = 'Error d’Arxiu: No es pot obrir l’arxiu: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) següent(s) adreces de remitent han fallat: '; +$PHPMAILER_LANG['instantiate'] = 'No s’ha pogut crear una instància de la funció Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Adreça d’email invalida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no està suportat'; +$PHPMAILER_LANG['provide_address'] = 'S’ha de proveir almenys una adreça d’email com a destinatari.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Els següents destinataris han fallat: '; +$PHPMAILER_LANG['signing'] = 'Error al signar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ha fallat el SMTP Connect().'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No s’ha pogut establir o restablir la variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php new file mode 100755 index 0000000..4fda6b8 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ch.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:身份验证失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误: 不能连接SMTP主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误: 数据不可接受。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '不能执行: '; +$PHPMAILER_LANG['file_access'] = '不能访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:不能打开文件:'; +$PHPMAILER_LANG['from_failed'] = '下面的发送地址邮件发送失败了: '; +$PHPMAILER_LANG['instantiate'] = '不能实现mail方法。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 您所选择的发送邮件的方法并不支持。'; +$PHPMAILER_LANG['provide_address'] = '您必须提供至少一个 收信人的email地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误: 下面的 收件人失败了: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php new file mode 100755 index 0000000..1160cf0 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-cs.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fejl: Kunne ikke logge på.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fejl: Kunne ikke tilslutte SMTP serveren.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fejl: Data kunne ikke accepteres.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Ukendt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunne ikke køre: '; +$PHPMAILER_LANG['file_access'] = 'Ingen adgang til fil: '; +$PHPMAILER_LANG['file_open'] = 'Fil fejl: Kunne ikke åbne filen: '; +$PHPMAILER_LANG['from_failed'] = 'Følgende afsenderadresse er forkert: '; +$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere email funktionen.'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer understøttes ikke.'; +$PHPMAILER_LANG['provide_address'] = 'Du skal indtaste mindst en modtagers emailadresse.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fejl: Følgende modtagere er forkerte: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php new file mode 100755 index 0000000..aa987a9 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-de.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Error SMTP: Imposible autentificar.'; +$PHPMAILER_LANG['connect_host'] = 'Error SMTP: Imposible conectar al servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Error SMTP: Datos no aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'El cuerpo del mensaje está vacío.'; +$PHPMAILER_LANG['encoding'] = 'Codificación desconocida: '; +$PHPMAILER_LANG['execute'] = 'Imposible ejecutar: '; +$PHPMAILER_LANG['file_access'] = 'Imposible acceder al archivo: '; +$PHPMAILER_LANG['file_open'] = 'Error de Archivo: Imposible abrir el archivo: '; +$PHPMAILER_LANG['from_failed'] = 'La(s) siguiente(s) direcciones de remitente fallaron: '; +$PHPMAILER_LANG['instantiate'] = 'Imposible crear una instancia de la función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Imposible enviar: dirección de email inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer no está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe proporcionar al menos una dirección de email de destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Error SMTP: Los siguientes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Error al firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falló.'; +$PHPMAILER_LANG['smtp_error'] = 'Error del servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'No se pudo configurar la variable: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensión faltante: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php new file mode 100755 index 0000000..7e06da1 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-et.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Viga: Autoriseerimise viga.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Viga: Ei õnnestunud luua ühendust SMTP serveriga.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Viga: Vigased andmed.'; +$PHPMAILER_LANG['empty_message'] = 'Tühi kirja sisu'; +$PHPMAILER_LANG["encoding"] = 'Tundmatu kodeering: '; +$PHPMAILER_LANG['execute'] = 'Tegevus ebaõnnestus: '; +$PHPMAILER_LANG['file_access'] = 'Pole piisavalt õiguseid järgneva faili avamiseks: '; +$PHPMAILER_LANG['file_open'] = 'Faili Viga: Faili avamine ebaõnnestus: '; +$PHPMAILER_LANG['from_failed'] = 'Järgnev saatja e-posti aadress on vigane: '; +$PHPMAILER_LANG['instantiate'] = 'mail funktiooni käivitamine ebaõnnestus.'; +$PHPMAILER_LANG['invalid_address'] = 'Saatmine peatatud, e-posti address vigane: '; +$PHPMAILER_LANG['provide_address'] = 'Te peate määrama vähemalt ühe saaja e-posti aadressi.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' maileri tugi puudub.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Viga: Järgnevate saajate e-posti aadressid on vigased: '; +$PHPMAILER_LANG["signing"] = 'Viga allkirjastamisel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() ebaõnnestus.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP serveri viga: '; +$PHPMAILER_LANG['variable_set'] = 'Ei õnnestunud määrata või lähtestada muutujat: '; +$PHPMAILER_LANG['extension_missing'] = 'Nõutud laiendus on puudu: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php new file mode 100755 index 0000000..ad0745c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fa.php @@ -0,0 +1,27 @@ + + * @author Mohammad Hossein Mojtahedi + */ + +$PHPMAILER_LANG['authenticate'] = 'خطای SMTP: احراز هویت با شکست مواجه شد.'; +$PHPMAILER_LANG['connect_host'] = 'خطای SMTP: اتصال به سرور SMTP برقرار نشد.'; +$PHPMAILER_LANG['data_not_accepted'] = 'خطای SMTP: داده‌ها نا‌درست هستند.'; +$PHPMAILER_LANG['empty_message'] = 'بخش متن پیام خالی است.'; +$PHPMAILER_LANG['encoding'] = 'کد‌گذاری نا‌شناخته: '; +$PHPMAILER_LANG['execute'] = 'امکان اجرا وجود ندارد: '; +$PHPMAILER_LANG['file_access'] = 'امکان دسترسی به فایل وجود ندارد: '; +$PHPMAILER_LANG['file_open'] = 'خطای File: امکان بازکردن فایل وجود ندارد: '; +$PHPMAILER_LANG['from_failed'] = 'آدرس فرستنده اشتباه است: '; +$PHPMAILER_LANG['instantiate'] = 'امکان معرفی تابع ایمیل وجود ندارد.'; +$PHPMAILER_LANG['invalid_address'] = 'آدرس ایمیل معتبر نیست: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer پشتیبانی نمی‌شود.'; +$PHPMAILER_LANG['provide_address'] = 'باید حداقل یک آدرس گیرنده وارد کنید.'; +$PHPMAILER_LANG['recipients_failed'] = 'خطای SMTP: ارسال به آدرس گیرنده با خطا مواجه شد: '; +$PHPMAILER_LANG['signing'] = 'خطا در امضا: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'خطا در اتصال به SMTP.'; +$PHPMAILER_LANG['smtp_error'] = 'خطا در SMTP Server: '; +$PHPMAILER_LANG['variable_set'] = 'امکان ارسال یا ارسال مجدد متغیر‌ها وجود ندارد: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php new file mode 100755 index 0000000..ec4e752 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fi.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP feilur: Kundi ikki góðkenna.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP feilur: Kundi ikki knýta samband við SMTP vert.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP feilur: Data ikki góðkent.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Ókend encoding: '; +$PHPMAILER_LANG['execute'] = 'Kundi ikki útføra: '; +$PHPMAILER_LANG['file_access'] = 'Kundi ikki tilganga fílu: '; +$PHPMAILER_LANG['file_open'] = 'Fílu feilur: Kundi ikki opna fílu: '; +$PHPMAILER_LANG['from_failed'] = 'fylgjandi Frá/From adressa miseydnaðist: '; +$PHPMAILER_LANG['instantiate'] = 'Kuni ikki instantiera mail funktión.'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' er ikki supporterað.'; +$PHPMAILER_LANG['provide_address'] = 'Tú skal uppgeva minst móttakara-emailadressu(r).'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feilur: Fylgjandi móttakarar miseydnaðust: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php new file mode 100755 index 0000000..af68c92 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-fr.php @@ -0,0 +1,29 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro SMTP: Non puido ser autentificado.'; +$PHPMAILER_LANG['connect_host'] = 'Erro SMTP: Non puido conectar co servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro SMTP: Datos non aceptados.'; +$PHPMAILER_LANG['empty_message'] = 'Corpo da mensaxe vacía'; +$PHPMAILER_LANG['encoding'] = 'Codificación descoñecida: '; +$PHPMAILER_LANG['execute'] = 'Non puido ser executado: '; +$PHPMAILER_LANG['file_access'] = 'Nob puido acceder ó arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: No puido abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'A(s) seguinte(s) dirección(s) de remitente(s) deron erro: '; +$PHPMAILER_LANG['instantiate'] = 'Non puido crear unha instancia da función Mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Non puido envia-lo correo: dirección de email inválida: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer non está soportado.'; +$PHPMAILER_LANG['provide_address'] = 'Debe engadir polo menos unha dirección de email coma destino.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro SMTP: Os seguintes destinos fallaron: '; +$PHPMAILER_LANG['signing'] = 'Erro ó firmar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro do servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Non puidemos axustar ou reaxustar a variábel: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php new file mode 100755 index 0000000..70eb717 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-he.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'שגיאת SMTP: פעולת האימות נכשלה.'; +$PHPMAILER_LANG['connect_host'] = 'שגיאת SMTP: לא הצלחתי להתחבר לשרת SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'שגיאת SMTP: מידע לא התקבל.'; +$PHPMAILER_LANG['empty_message'] = 'גוף ההודעה ריק'; +$PHPMAILER_LANG['invalid_address'] = 'כתובת שגויה: '; +$PHPMAILER_LANG['encoding'] = 'קידוד לא מוכר: '; +$PHPMAILER_LANG['execute'] = 'לא הצלחתי להפעיל את: '; +$PHPMAILER_LANG['file_access'] = 'לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['file_open'] = 'שגיאת קובץ: לא ניתן לגשת לקובץ: '; +$PHPMAILER_LANG['from_failed'] = 'כתובות הנמענים הבאות נכשלו: '; +$PHPMAILER_LANG['instantiate'] = 'לא הצלחתי להפעיל את פונקציית המייל.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' אינה נתמכת.'; +$PHPMAILER_LANG['provide_address'] = 'חובה לספק לפחות כתובת אחת של מקבל המייל.'; +$PHPMAILER_LANG['recipients_failed'] = 'שגיאת SMTP: הנמענים הבאים נכשלו: '; +$PHPMAILER_LANG['signing'] = 'שגיאת חתימה: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +$PHPMAILER_LANG['smtp_error'] = 'שגיאת שרת SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'לא ניתן לקבוע או לשנות את המשתנה: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php new file mode 100755 index 0000000..607a5ee --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hi.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। '; +$PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। '; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। '; +$PHPMAILER_LANG['empty_message'] = 'संदेश खाली है। '; +$PHPMAILER_LANG['encoding'] = 'अज्ञात एन्कोडिंग प्रकार। '; +$PHPMAILER_LANG['execute'] = 'आदेश को निष्पादित करने में विफल। '; +$PHPMAILER_LANG['file_access'] = 'फ़ाइल उपलब्ध नहीं है। '; +$PHPMAILER_LANG['file_open'] = 'फ़ाइल त्रुटि: फाइल को खोला नहीं जा सका। '; +$PHPMAILER_LANG['from_failed'] = 'प्रेषक का पता गलत है। '; +$PHPMAILER_LANG['instantiate'] = 'मेल फ़ंक्शन कॉल नहीं कर सकता है।'; +$PHPMAILER_LANG['invalid_address'] = 'पता गलत है। '; +$PHPMAILER_LANG['mailer_not_supported'] = 'मेल सर्वर के साथ काम नहीं करता है। '; +$PHPMAILER_LANG['provide_address'] = 'आपको कम से कम एक प्राप्तकर्ता का ई-मेल पता प्रदान करना होगा।'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP त्रुटि: निम्न प्राप्तकर्ताओं को पते भेजने में विफल। '; +$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि:। '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP का connect () फ़ंक्शन विफल हुआ। '; +$PHPMAILER_LANG['smtp_error'] = 'SMTP सर्वर त्रुटि। '; +$PHPMAILER_LANG['variable_set'] = 'चर को बना या संशोधित नहीं किया जा सकता। '; +$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php new file mode 100755 index 0000000..3822920 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hr.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Greška: Neuspjela autentikacija.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Greška: Ne mogu se spojiti na SMTP poslužitelj.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Greška: Podatci nisu prihvaćeni.'; +$PHPMAILER_LANG['empty_message'] = 'Sadržaj poruke je prazan.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznati encoding: '; +$PHPMAILER_LANG['execute'] = 'Nije moguće izvršiti naredbu: '; +$PHPMAILER_LANG['file_access'] = 'Nije moguće pristupiti datoteci: '; +$PHPMAILER_LANG['file_open'] = 'Nije moguće otvoriti datoteku: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP Greška: Slanje s navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Greška: Slanje na navedenih e-mail adresa nije uspjelo: '; +$PHPMAILER_LANG['instantiate'] = 'Ne mogu pokrenuti mail funkcionalnost.'; +$PHPMAILER_LANG['invalid_address'] = 'E-mail nije poslan. Neispravna e-mail adresa: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nije podržan.'; +$PHPMAILER_LANG['provide_address'] = 'Definirajte barem jednu adresu primatelja.'; +$PHPMAILER_LANG['signing'] = 'Greška prilikom prijave: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Spajanje na SMTP poslužitelj nije uspjelo.'; +$PHPMAILER_LANG['smtp_error'] = 'Greška SMTP poslužitelja: '; +$PHPMAILER_LANG['variable_set'] = 'Ne mogu postaviti varijablu niti ju vratiti nazad: '; +$PHPMAILER_LANG['extension_missing'] = 'Nedostaje proširenje: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php new file mode 100755 index 0000000..196cddc --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-hu.php @@ -0,0 +1,26 @@ + + * @author @januridp + */ + +$PHPMAILER_LANG['authenticate'] = 'Kesalahan SMTP: Tidak dapat mengotentikasi.'; +$PHPMAILER_LANG['connect_host'] = 'Kesalahan SMTP: Tidak dapat terhubung ke host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Kesalahan SMTP: Data tidak diterima.'; +$PHPMAILER_LANG['empty_message'] = 'Isi pesan kosong'; +$PHPMAILER_LANG['encoding'] = 'Pengkodean karakter tidak dikenali: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat menjalankan proses : '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses berkas : '; +$PHPMAILER_LANG['file_open'] = 'Kesalahan File: Berkas tidak dapat dibuka : '; +$PHPMAILER_LANG['from_failed'] = 'Alamat pengirim berikut mengakibatkan kesalahan : '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat menginisialisasi fungsi surel'; +$PHPMAILER_LANG['invalid_address'] = 'Gagal terkirim, alamat surel tidak benar : '; +$PHPMAILER_LANG['provide_address'] = 'Harus disediakan minimal satu alamat tujuan'; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tidak didukung'; +$PHPMAILER_LANG['recipients_failed'] = 'Kesalahan SMTP: Alamat tujuan berikut menghasilkan kesalahan : '; +$PHPMAILER_LANG['signing'] = 'Kesalahan dalam tanda tangan : '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Kesalahan pada pelayan SMTP : '; +$PHPMAILER_LANG['variable_set'] = 'Tidak dapat mengatur atau mengatur ulang variable : '; +$PHPMAILER_LANG['extension_missing'] = 'Ekstensi hilang: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php new file mode 100755 index 0000000..e67b6f7 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-it.php @@ -0,0 +1,27 @@ + + * @author Stefano Sabatini + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Impossibile autenticarsi.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Impossibile connettersi all\'host SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dati non accettati dal server.'; +$PHPMAILER_LANG['empty_message'] = 'Il corpo del messaggio è vuoto'; +$PHPMAILER_LANG['encoding'] = 'Codifica dei caratteri sconosciuta: '; +$PHPMAILER_LANG['execute'] = 'Impossibile eseguire l\'operazione: '; +$PHPMAILER_LANG['file_access'] = 'Impossibile accedere al file: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Impossibile aprire il file: '; +$PHPMAILER_LANG['from_failed'] = 'I seguenti indirizzi mittenti hanno generato errore: '; +$PHPMAILER_LANG['instantiate'] = 'Impossibile istanziare la funzione mail'; +$PHPMAILER_LANG['invalid_address'] = 'Impossibile inviare, l\'indirizzo email non è valido: '; +$PHPMAILER_LANG['provide_address'] = 'Deve essere fornito almeno un indirizzo ricevente'; +$PHPMAILER_LANG['mailer_not_supported'] = 'Mailer non supportato'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: I seguenti indirizzi destinatari hanno generato un errore: '; +$PHPMAILER_LANG['signing'] = 'Errore nella firma: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() fallita.'; +$PHPMAILER_LANG['smtp_error'] = 'Errore del server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Impossibile impostare o resettare la variabile: '; +$PHPMAILER_LANG['extension_missing'] = 'Estensione mancante: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php new file mode 100755 index 0000000..2d77872 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ja.php @@ -0,0 +1,27 @@ + + * @author Yoshi Sakai + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTPエラー: 認証できませんでした。'; +$PHPMAILER_LANG['connect_host'] = 'SMTPエラー: SMTPホストに接続できませんでした。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTPエラー: データが受け付けられませんでした。'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = '不明なエンコーディング: '; +$PHPMAILER_LANG['execute'] = '実行できませんでした: '; +$PHPMAILER_LANG['file_access'] = 'ファイルにアクセスできません: '; +$PHPMAILER_LANG['file_open'] = 'ファイルエラー: ファイルを開けません: '; +$PHPMAILER_LANG['from_failed'] = 'Fromアドレスを登録する際にエラーが発生しました: '; +$PHPMAILER_LANG['instantiate'] = 'メール関数が正常に動作しませんでした。'; +//$PHPMAILER_LANG['invalid_address'] = 'Invalid address: '; +$PHPMAILER_LANG['provide_address'] = '少なくとも1つメールアドレスを 指定する必要があります。'; +$PHPMAILER_LANG['mailer_not_supported'] = ' メーラーがサポートされていません。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTPエラー: 次の受信者アドレスに 間違いがあります: '; +//$PHPMAILER_LANG['signing'] = 'Signing Error: '; +//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.'; +//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: '; +//$PHPMAILER_LANG['variable_set'] = 'Cannot set or reset variable: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php new file mode 100755 index 0000000..dd1af8a --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ka.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP შეცდომა: ავტორიზაცია შეუძლებელია.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP შეცდომა: SMTP სერვერთან დაკავშირება შეუძლებელია.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP შეცდომა: მონაცემები არ იქნა მიღებული.'; +$PHPMAILER_LANG['encoding'] = 'კოდირების უცნობი ტიპი: '; +$PHPMAILER_LANG['execute'] = 'შეუძლებელია შემდეგი ბრძანების შესრულება: '; +$PHPMAILER_LANG['file_access'] = 'შეუძლებელია წვდომა ფაილთან: '; +$PHPMAILER_LANG['file_open'] = 'ფაილური სისტემის შეცდომა: არ იხსნება ფაილი: '; +$PHPMAILER_LANG['from_failed'] = 'გამგზავნის არასწორი მისამართი: '; +$PHPMAILER_LANG['instantiate'] = 'mail ფუნქციის გაშვება ვერ ხერხდება.'; +$PHPMAILER_LANG['provide_address'] = 'გთხოვთ მიუთითოთ ერთი ადრესატის e-mail მისამართი მაინც.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - საფოსტო სერვერის მხარდაჭერა არ არის.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP შეცდომა: შემდეგ მისამართებზე გაგზავნა ვერ მოხერხდა: '; +$PHPMAILER_LANG['empty_message'] = 'შეტყობინება ცარიელია'; +$PHPMAILER_LANG['invalid_address'] = 'არ გაიგზავნა, e-mail მისამართის არასწორი ფორმატი: '; +$PHPMAILER_LANG['signing'] = 'ხელმოწერის შეცდომა: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'შეცდომა SMTP სერვერთან დაკავშირებისას'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP სერვერის შეცდომა: '; +$PHPMAILER_LANG['variable_set'] = 'შეუძლებელია შემდეგი ცვლადის შექმნა ან შეცვლა: '; +$PHPMAILER_LANG['extension_missing'] = 'ბიბლიოთეკა არ არსებობს: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php new file mode 100755 index 0000000..9599fa6 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ko.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 오류: 인증할 수 없습니다.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 오류: SMTP 호스트에 접속할 수 없습니다.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 오류: 데이터가 받아들여지지 않았습니다.'; +$PHPMAILER_LANG['empty_message'] = '메세지 내용이 없습니다'; +$PHPMAILER_LANG['encoding'] = '알 수 없는 인코딩: '; +$PHPMAILER_LANG['execute'] = '실행 불가: '; +$PHPMAILER_LANG['file_access'] = '파일 접근 불가: '; +$PHPMAILER_LANG['file_open'] = '파일 오류: 파일을 열 수 없습니다: '; +$PHPMAILER_LANG['from_failed'] = '다음 From 주소에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['instantiate'] = 'mail 함수를 인스턴스화할 수 없습니다'; +$PHPMAILER_LANG['invalid_address'] = '잘못된 주소: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' 메일러는 지원되지 않습니다.'; +$PHPMAILER_LANG['provide_address'] = '적어도 한 개 이상의 수신자 메일 주소를 제공해야 합니다.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 오류: 다음 수신자에서 오류가 발생했습니다: '; +$PHPMAILER_LANG['signing'] = '서명 오류: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 연결을 실패하였습니다.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 서버 오류: '; +$PHPMAILER_LANG['variable_set'] = '변수 설정 및 초기화 불가: '; +$PHPMAILER_LANG['extension_missing'] = '확장자 없음: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php new file mode 100755 index 0000000..1253a4f --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lt.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP klaida: autentifikacija nepavyko.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP klaida: nepavyksta prisijungti prie SMTP stoties.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP klaida: duomenys nepriimti.'; +$PHPMAILER_LANG['empty_message'] = 'Laiško turinys tuščias'; +$PHPMAILER_LANG['encoding'] = 'Neatpažinta koduotė: '; +$PHPMAILER_LANG['execute'] = 'Nepavyko įvykdyti komandos: '; +$PHPMAILER_LANG['file_access'] = 'Byla nepasiekiama: '; +$PHPMAILER_LANG['file_open'] = 'Bylos klaida: Nepavyksta atidaryti: '; +$PHPMAILER_LANG['from_failed'] = 'Neteisingas siuntėjo adresas: '; +$PHPMAILER_LANG['instantiate'] = 'Nepavyko paleisti mail funkcijos.'; +$PHPMAILER_LANG['invalid_address'] = 'Neteisingas adresas: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' pašto stotis nepalaikoma.'; +$PHPMAILER_LANG['provide_address'] = 'Nurodykite bent vieną gavėjo adresą.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP klaida: nepavyko išsiųsti šiems gavėjams: '; +$PHPMAILER_LANG['signing'] = 'Prisijungimo klaida: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP susijungimo klaida'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP stoties klaida: '; +$PHPMAILER_LANG['variable_set'] = 'Nepavyko priskirti reikšmės kintamajam: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php new file mode 100755 index 0000000..39bf9a1 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-lv.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP kļūda: Autorizācija neizdevās.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Kļūda: Nevar izveidot savienojumu ar SMTP serveri.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Kļūda: Nepieņem informāciju.'; +$PHPMAILER_LANG['empty_message'] = 'Ziņojuma teksts ir tukšs'; +$PHPMAILER_LANG['encoding'] = 'Neatpazīts kodējums: '; +$PHPMAILER_LANG['execute'] = 'Neizdevās izpildīt komandu: '; +$PHPMAILER_LANG['file_access'] = 'Fails nav pieejams: '; +$PHPMAILER_LANG['file_open'] = 'Faila kļūda: Nevar atvērt failu: '; +$PHPMAILER_LANG['from_failed'] = 'Nepareiza sūtītāja adrese: '; +$PHPMAILER_LANG['instantiate'] = 'Nevar palaist sūtīšanas funkciju.'; +$PHPMAILER_LANG['invalid_address'] = 'Nepareiza adrese: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' sūtītājs netiek atbalstīts.'; +$PHPMAILER_LANG['provide_address'] = 'Lūdzu, norādiet vismaz vienu adresātu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP kļūda: neizdevās nosūtīt šādiem saņēmējiem: '; +$PHPMAILER_LANG['signing'] = 'Autorizācijas kļūda: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP savienojuma kļūda'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP servera kļūda: '; +$PHPMAILER_LANG['variable_set'] = 'Nevar piešķirt mainīgā vērtību: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php new file mode 100755 index 0000000..f4c7563 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-mg.php @@ -0,0 +1,25 @@ + + */ +$PHPMAILER_LANG['authenticate'] = 'Hadisoana SMTP: Tsy nahomby ny fanamarinana.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Tsy afaka mampifandray amin\'ny mpampiantrano SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP diso: tsy voarakitra ny angona.'; +$PHPMAILER_LANG['empty_message'] = 'Tsy misy ny votoaty mailaka.'; +$PHPMAILER_LANG['encoding'] = 'Tsy fantatra encoding: '; +$PHPMAILER_LANG['execute'] = 'Tsy afaka manatanteraka ity baiko manaraka ity: '; +$PHPMAILER_LANG['file_access'] = 'Tsy nahomby ny fidirana amin\'ity rakitra ity: '; +$PHPMAILER_LANG['file_open'] = 'Hadisoana diso: Tsy afaka nanokatra ity file manaraka ity: '; +$PHPMAILER_LANG['from_failed'] = 'Ny adiresy iraka manaraka dia diso: '; +$PHPMAILER_LANG['instantiate'] = 'Tsy afaka nanomboka ny hetsika mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Tsy mety ny adiresy: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer tsy manohana.'; +$PHPMAILER_LANG['provide_address'] = 'Alefaso azafady iray adiresy iray farafahakeliny.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Tsy mety ireo mpanaraka ireto: '; +$PHPMAILER_LANG['signing'] = 'Error nandritra ny sonia:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Tsy nahomby ny fifandraisana tamin\'ny server SMTP.'; +$PHPMAILER_LANG['smtp_error'] = 'Fahadisoana tamin\'ny server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tsy azo atao ny mametraka na mamerina ny variable: '; +$PHPMAILER_LANG['extension_missing'] = 'Tsy hita ny ampahany: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php new file mode 100755 index 0000000..f12a6ad --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ms.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Ralat SMTP: Tidak dapat pengesahan.'; +$PHPMAILER_LANG['connect_host'] = 'Ralat SMTP: Tidak dapat menghubungi hos pelayan SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ralat SMTP: Data tidak diterima oleh pelayan.'; +$PHPMAILER_LANG['empty_message'] = 'Tiada isi untuk mesej'; +$PHPMAILER_LANG['encoding'] = 'Pengekodan tidak diketahui: '; +$PHPMAILER_LANG['execute'] = 'Tidak dapat melaksanakan: '; +$PHPMAILER_LANG['file_access'] = 'Tidak dapat mengakses fail: '; +$PHPMAILER_LANG['file_open'] = 'Ralat Fail: Tidak dapat membuka fail: '; +$PHPMAILER_LANG['from_failed'] = 'Berikut merupakan ralat dari alamat e-mel: '; +$PHPMAILER_LANG['instantiate'] = 'Tidak dapat memberi contoh fungsi e-mel.'; +$PHPMAILER_LANG['invalid_address'] = 'Alamat emel tidak sah: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' jenis penghantar emel tidak disokong.'; +$PHPMAILER_LANG['provide_address'] = 'Anda perlu menyediakan sekurang-kurangnya satu alamat e-mel penerima.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ralat SMTP: Penerima e-mel berikut telah gagal: '; +$PHPMAILER_LANG['signing'] = 'Ralat pada tanda tangan: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() telah gagal.'; +$PHPMAILER_LANG['smtp_error'] = 'Ralat pada pelayan SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Tidak boleh menetapkan atau menetapkan semula pembolehubah: '; +$PHPMAILER_LANG['extension_missing'] = 'Sambungan hilang: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php new file mode 100755 index 0000000..97403e7 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-nb.php @@ -0,0 +1,25 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP-fout: authenticatie mislukt.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP-fout: kon niet verbinden met SMTP-host.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-fout: data niet geaccepteerd.'; +$PHPMAILER_LANG['empty_message'] = 'Berichttekst is leeg'; +$PHPMAILER_LANG['encoding'] = 'Onbekende codering: '; +$PHPMAILER_LANG['execute'] = 'Kon niet uitvoeren: '; +$PHPMAILER_LANG['file_access'] = 'Kreeg geen toegang tot bestand: '; +$PHPMAILER_LANG['file_open'] = 'Bestandsfout: kon bestand niet openen: '; +$PHPMAILER_LANG['from_failed'] = 'Het volgende afzendersadres is mislukt: '; +$PHPMAILER_LANG['instantiate'] = 'Kon mailfunctie niet initialiseren.'; +$PHPMAILER_LANG['invalid_address'] = 'Ongeldig adres: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer wordt niet ondersteund.'; +$PHPMAILER_LANG['provide_address'] = 'Er moet minstens één ontvanger worden opgegeven.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP-fout: de volgende ontvangers zijn mislukt: '; +$PHPMAILER_LANG['signing'] = 'Signeerfout: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Verbinding mislukt.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfout: '; +$PHPMAILER_LANG['variable_set'] = 'Kan de volgende variabele niet instellen of resetten: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensie afwezig: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php new file mode 100755 index 0000000..3da0dee --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pl.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro do SMTP: Não foi possível realizar a autenticação.'; +$PHPMAILER_LANG['connect_host'] = 'Erro do SMTP: Não foi possível realizar ligação com o servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro do SMTP: Os dados foram rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'A mensagem no e-mail está vazia.'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível aceder o ficheiro: '; +$PHPMAILER_LANG['file_open'] = 'Abertura do ficheiro: Não foi possível abrir o ficheiro: '; +$PHPMAILER_LANG['from_failed'] = 'Ocorreram falhas nos endereços dos seguintes remententes: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível iniciar uma instância da função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Não foi enviado nenhum e-mail para o endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Tem de fornecer pelo menos um endereço como destinatário do e-mail.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro do SMTP: O endereço do seguinte destinatário falhou: '; +$PHPMAILER_LANG['signing'] = 'Erro ao assinar: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão em falta: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php new file mode 100755 index 0000000..4ec10f7 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-pt_br.php @@ -0,0 +1,29 @@ + + * @author Lucas Guimarães + * @author Phelipe Alves + * @author Fabio Beneditto + */ + +$PHPMAILER_LANG['authenticate'] = 'Erro de SMTP: Não foi possível autenticar.'; +$PHPMAILER_LANG['connect_host'] = 'Erro de SMTP: Não foi possível conectar ao servidor SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Erro de SMTP: Dados rejeitados.'; +$PHPMAILER_LANG['empty_message'] = 'Mensagem vazia'; +$PHPMAILER_LANG['encoding'] = 'Codificação desconhecida: '; +$PHPMAILER_LANG['execute'] = 'Não foi possível executar: '; +$PHPMAILER_LANG['file_access'] = 'Não foi possível acessar o arquivo: '; +$PHPMAILER_LANG['file_open'] = 'Erro de Arquivo: Não foi possível abrir o arquivo: '; +$PHPMAILER_LANG['from_failed'] = 'Os seguintes remetentes falharam: '; +$PHPMAILER_LANG['instantiate'] = 'Não foi possível instanciar a função mail.'; +$PHPMAILER_LANG['invalid_address'] = 'Endereço de e-mail inválido: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer não é suportado.'; +$PHPMAILER_LANG['provide_address'] = 'Você deve informar pelo menos um destinatário.'; +$PHPMAILER_LANG['recipients_failed'] = 'Erro de SMTP: Os seguintes destinatários falharam: '; +$PHPMAILER_LANG['signing'] = 'Erro de Assinatura: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() falhou.'; +$PHPMAILER_LANG['smtp_error'] = 'Erro de servidor SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Não foi possível definir ou redefinir a variável: '; +$PHPMAILER_LANG['extension_missing'] = 'Extensão ausente: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php new file mode 100755 index 0000000..fa100ea --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ro.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Eroare SMTP: Autentificarea a eșuat.'; +$PHPMAILER_LANG['connect_host'] = 'Eroare SMTP: Conectarea la serverul SMTP a eșuat.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Eroare SMTP: Datele nu au fost acceptate.'; +$PHPMAILER_LANG['empty_message'] = 'Mesajul este gol.'; +$PHPMAILER_LANG['encoding'] = 'Encodare necunoscută: '; +$PHPMAILER_LANG['execute'] = 'Nu se poate executa următoarea comandă: '; +$PHPMAILER_LANG['file_access'] = 'Nu se poate accesa următorul fișier: '; +$PHPMAILER_LANG['file_open'] = 'Eroare fișier: Nu se poate deschide următorul fișier: '; +$PHPMAILER_LANG['from_failed'] = 'Următoarele adrese From au dat eroare: '; +$PHPMAILER_LANG['instantiate'] = 'Funcția mail nu a putut fi inițializată.'; +$PHPMAILER_LANG['invalid_address'] = 'Adresa de email nu este validă: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer nu este suportat.'; +$PHPMAILER_LANG['provide_address'] = 'Trebuie să adăugați cel puțin o adresă de email.'; +$PHPMAILER_LANG['recipients_failed'] = 'Eroare SMTP: Următoarele adrese de email au eșuat: '; +$PHPMAILER_LANG['signing'] = 'A aparut o problemă la semnarea emailului. '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Conectarea la serverul SMTP a eșuat.'; +$PHPMAILER_LANG['smtp_error'] = 'Eroare server SMTP: '; +$PHPMAILER_LANG['variable_set'] = 'Nu se poate seta/reseta variabila. '; +$PHPMAILER_LANG['extension_missing'] = 'Lipsește extensia: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php new file mode 100755 index 0000000..4066f6b --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-ru.php @@ -0,0 +1,27 @@ + + * @author Foster Snowhill + */ + +$PHPMAILER_LANG['authenticate'] = 'Ошибка SMTP: ошибка авторизации.'; +$PHPMAILER_LANG['connect_host'] = 'Ошибка SMTP: не удается подключиться к серверу SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Ошибка SMTP: данные не приняты.'; +$PHPMAILER_LANG['encoding'] = 'Неизвестный вид кодировки: '; +$PHPMAILER_LANG['execute'] = 'Невозможно выполнить команду: '; +$PHPMAILER_LANG['file_access'] = 'Нет доступа к файлу: '; +$PHPMAILER_LANG['file_open'] = 'Файловая ошибка: не удается открыть файл: '; +$PHPMAILER_LANG['from_failed'] = 'Неверный адрес отправителя: '; +$PHPMAILER_LANG['instantiate'] = 'Невозможно запустить функцию mail.'; +$PHPMAILER_LANG['provide_address'] = 'Пожалуйста, введите хотя бы один адрес e-mail получателя.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' — почтовый сервер не поддерживается.'; +$PHPMAILER_LANG['recipients_failed'] = 'Ошибка SMTP: отправка по следующим адресам получателей не удалась: '; +$PHPMAILER_LANG['empty_message'] = 'Пустое сообщение'; +$PHPMAILER_LANG['invalid_address'] = 'Не отослано, неправильный формат email адреса: '; +$PHPMAILER_LANG['signing'] = 'Ошибка подписи: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ошибка соединения с SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Ошибка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Невозможно установить или переустановить переменную: '; +$PHPMAILER_LANG['extension_missing'] = 'Расширение отсутствует: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php new file mode 100755 index 0000000..69cfb0f --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sk.php @@ -0,0 +1,27 @@ + + * @author Peter Orlický + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Chyba autentifikácie.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Nebolo možné nadviazať spojenie so SMTP serverom.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Dáta neboli prijaté'; +$PHPMAILER_LANG['empty_message'] = 'Prázdne telo správy.'; +$PHPMAILER_LANG['encoding'] = 'Neznáme kódovanie: '; +$PHPMAILER_LANG['execute'] = 'Nedá sa vykonať: '; +$PHPMAILER_LANG['file_access'] = 'Súbor nebol nájdený: '; +$PHPMAILER_LANG['file_open'] = 'File Error: Súbor sa otvoriť pre čítanie: '; +$PHPMAILER_LANG['from_failed'] = 'Následujúca adresa From je nesprávna: '; +$PHPMAILER_LANG['instantiate'] = 'Nedá sa vytvoriť inštancia emailovej funkcie.'; +$PHPMAILER_LANG['invalid_address'] = 'Neodoslané, emailová adresa je nesprávna: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' emailový klient nieje podporovaný.'; +$PHPMAILER_LANG['provide_address'] = 'Musíte zadať aspoň jednu emailovú adresu príjemcu.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Adresy príjemcov niesu správne '; +$PHPMAILER_LANG['signing'] = 'Chyba prihlasovania: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() zlyhalo.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP chyba serveru: '; +$PHPMAILER_LANG['variable_set'] = 'Nemožno nastaviť alebo resetovať premennú: '; +$PHPMAILER_LANG['extension_missing'] = 'Chýba rozšírenie: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php new file mode 100755 index 0000000..1e3cb7f --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sl.php @@ -0,0 +1,27 @@ + + * @author Filip Š + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP napaka: Avtentikacija ni uspela.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP napaka: Vzpostavljanje povezave s SMTP gostiteljem ni uspelo.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP napaka: Strežnik zavrača podatke.'; +$PHPMAILER_LANG['empty_message'] = 'E-poštno sporočilo nima vsebine.'; +$PHPMAILER_LANG['encoding'] = 'Nepoznan tip kodiranja: '; +$PHPMAILER_LANG['execute'] = 'Operacija ni uspela: '; +$PHPMAILER_LANG['file_access'] = 'Nimam dostopa do datoteke: '; +$PHPMAILER_LANG['file_open'] = 'Ne morem odpreti datoteke: '; +$PHPMAILER_LANG['from_failed'] = 'Neveljaven e-naslov pošiljatelja: '; +$PHPMAILER_LANG['instantiate'] = 'Ne morem inicializirati mail funkcije.'; +$PHPMAILER_LANG['invalid_address'] = 'E-poštno sporočilo ni bilo poslano. E-naslov je neveljaven: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer ni podprt.'; +$PHPMAILER_LANG['provide_address'] = 'Prosim vnesite vsaj enega naslovnika.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP napaka: Sledeči naslovniki so neveljavni: '; +$PHPMAILER_LANG['signing'] = 'Napaka pri podpisovanju: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ne morem vzpostaviti povezave s SMTP strežnikom.'; +$PHPMAILER_LANG['smtp_error'] = 'Napaka SMTP strežnika: '; +$PHPMAILER_LANG['variable_set'] = 'Ne morem nastaviti oz. ponastaviti spremenljivke: '; +$PHPMAILER_LANG['extension_missing'] = 'Manjkajoča razširitev: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php new file mode 100755 index 0000000..34c1e18 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sr.php @@ -0,0 +1,27 @@ + + * @author Miloš Milanović + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP грешка: аутентификација није успела.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP грешка: повезивање са SMTP сервером није успело.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP грешка: подаци нису прихваћени.'; +$PHPMAILER_LANG['empty_message'] = 'Садржај поруке је празан.'; +$PHPMAILER_LANG['encoding'] = 'Непознато кодирање: '; +$PHPMAILER_LANG['execute'] = 'Није могуће извршити наредбу: '; +$PHPMAILER_LANG['file_access'] = 'Није могуће приступити датотеци: '; +$PHPMAILER_LANG['file_open'] = 'Није могуће отворити датотеку: '; +$PHPMAILER_LANG['from_failed'] = 'SMTP грешка: слање са следећих адреса није успело: '; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP грешка: слање на следеће адресе није успело: '; +$PHPMAILER_LANG['instantiate'] = 'Није могуће покренути mail функцију.'; +$PHPMAILER_LANG['invalid_address'] = 'Порука није послата. Неисправна адреса: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' мејлер није подржан.'; +$PHPMAILER_LANG['provide_address'] = 'Дефинишите бар једну адресу примаоца.'; +$PHPMAILER_LANG['signing'] = 'Грешка приликом пријаве: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Повезивање са SMTP сервером није успело.'; +$PHPMAILER_LANG['smtp_error'] = 'Грешка SMTP сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Није могуће задати нити ресетовати променљиву: '; +$PHPMAILER_LANG['extension_missing'] = 'Недостаје проширење: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php new file mode 100755 index 0000000..4408e63 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-sv.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP fel: Kunde inte autentisera.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP fel: Kunde inte ansluta till SMTP-server.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP fel: Data accepterades inte.'; +//$PHPMAILER_LANG['empty_message'] = 'Message body empty'; +$PHPMAILER_LANG['encoding'] = 'Okänt encode-format: '; +$PHPMAILER_LANG['execute'] = 'Kunde inte köra: '; +$PHPMAILER_LANG['file_access'] = 'Ingen åtkomst till fil: '; +$PHPMAILER_LANG['file_open'] = 'Fil fel: Kunde inte öppna fil: '; +$PHPMAILER_LANG['from_failed'] = 'Följande avsändaradress är felaktig: '; +$PHPMAILER_LANG['instantiate'] = 'Kunde inte initiera e-postfunktion.'; +$PHPMAILER_LANG['invalid_address'] = 'Felaktig adress: '; +$PHPMAILER_LANG['provide_address'] = 'Du måste ange minst en mottagares e-postadress.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' mailer stöds inte.'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP fel: Följande mottagare är felaktig: '; +$PHPMAILER_LANG['signing'] = 'Signerings fel: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() misslyckades.'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP server fel: '; +$PHPMAILER_LANG['variable_set'] = 'Kunde inte definiera eller återställa variabel: '; +$PHPMAILER_LANG['extension_missing'] = 'Tillägg ej tillgängligt: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php new file mode 100755 index 0000000..ed51d4c --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tl.php @@ -0,0 +1,27 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP Error: Hindi mapatotohanan.'; +$PHPMAILER_LANG['connect_host'] = 'SMTP Error: Hindi makakonekta sa SMTP host.'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Error: Ang datos ay hindi maaaring matatanggap.'; +$PHPMAILER_LANG['empty_message'] = 'Walang laman ang mensahe'; +$PHPMAILER_LANG['encoding'] = 'Hindi alam ang encoding: '; +$PHPMAILER_LANG['execute'] = 'Hindi maisasagawa: '; +$PHPMAILER_LANG['file_access'] = 'Hindi ma-access ang file: '; +$PHPMAILER_LANG['file_open'] = 'Hindi mabuksan ang file: '; +$PHPMAILER_LANG['from_failed'] = 'Ang sumusunod na address ay nabigo: '; +$PHPMAILER_LANG['instantiate'] = 'Hindi maaaring magbigay ng institusyon ang mail'; +$PHPMAILER_LANG['invalid_address'] = 'Hindi wasto ang address na naibigay: '; +$PHPMAILER_LANG['mailer_not_supported'] = 'Ang mailer ay hindi suportado'; +$PHPMAILER_LANG['provide_address'] = 'Kailangan mong magbigay ng kahit isang email address na tatanggap'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP Error: Ang mga sumusunod na tatanggap ay nabigo: '; +$PHPMAILER_LANG['signing'] = 'Hindi ma-sign'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Ang SMTP connect() ay nabigo'; +$PHPMAILER_LANG['smtp_error'] = 'Ang server ng SMTP ay nabigo'; +$PHPMAILER_LANG['variable_set'] = 'Hindi matatakda ang mga variables: '; +$PHPMAILER_LANG['extension_missing'] = 'Nawawala ang extension'; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php new file mode 100755 index 0000000..cfe8eaa --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-tr.php @@ -0,0 +1,30 @@ + + * @fixed by Boris Yurchenko + */ + +$PHPMAILER_LANG['authenticate'] = 'Помилка SMTP: помилка авторизації.'; +$PHPMAILER_LANG['connect_host'] = 'Помилка SMTP: не вдається під\'єднатися до серверу SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Помилка SMTP: дані не прийняті.'; +$PHPMAILER_LANG['encoding'] = 'Невідомий тип кодування: '; +$PHPMAILER_LANG['execute'] = 'Неможливо виконати команду: '; +$PHPMAILER_LANG['file_access'] = 'Немає доступу до файлу: '; +$PHPMAILER_LANG['file_open'] = 'Помилка файлової системи: не вдається відкрити файл: '; +$PHPMAILER_LANG['from_failed'] = 'Невірна адреса відправника: '; +$PHPMAILER_LANG['instantiate'] = 'Неможливо запустити функцію mail.'; +$PHPMAILER_LANG['provide_address'] = 'Будь-ласка, введіть хоча б одну адресу e-mail отримувача.'; +$PHPMAILER_LANG['mailer_not_supported'] = ' - поштовий сервер не підтримується.'; +$PHPMAILER_LANG['recipients_failed'] = 'Помилка SMTP: відправлення наступним отримувачам не вдалося: '; +$PHPMAILER_LANG['empty_message'] = 'Пусте тіло повідомлення'; +$PHPMAILER_LANG['invalid_address'] = 'Не відправлено, невірний формат адреси e-mail: '; +$PHPMAILER_LANG['signing'] = 'Помилка підпису: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Помилка з\'єднання із SMTP-сервером'; +$PHPMAILER_LANG['smtp_error'] = 'Помилка SMTP-сервера: '; +$PHPMAILER_LANG['variable_set'] = 'Неможливо встановити або перевстановити змінну: '; +$PHPMAILER_LANG['extension_missing'] = 'Не знайдено розширення: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php new file mode 100755 index 0000000..c60dade --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-vi.php @@ -0,0 +1,26 @@ + + */ + +$PHPMAILER_LANG['authenticate'] = 'Lỗi SMTP: Không thể xác thực.'; +$PHPMAILER_LANG['connect_host'] = 'Lỗi SMTP: Không thể kết nối máy chủ SMTP.'; +$PHPMAILER_LANG['data_not_accepted'] = 'Lỗi SMTP: Dữ liệu không được chấp nhận.'; +$PHPMAILER_LANG['empty_message'] = 'Không có nội dung'; +$PHPMAILER_LANG['encoding'] = 'Mã hóa không xác định: '; +$PHPMAILER_LANG['execute'] = 'Không thực hiện được: '; +$PHPMAILER_LANG['file_access'] = 'Không thể truy cập tệp tin '; +$PHPMAILER_LANG['file_open'] = 'Lỗi Tập tin: Không thể mở tệp tin: '; +$PHPMAILER_LANG['from_failed'] = 'Lỗi địa chỉ gửi đi: '; +$PHPMAILER_LANG['instantiate'] = 'Không dùng được các hàm gửi thư.'; +$PHPMAILER_LANG['invalid_address'] = 'Đại chỉ emai không đúng: '; +$PHPMAILER_LANG['mailer_not_supported'] = ' trình gửi thư không được hỗ trợ.'; +$PHPMAILER_LANG['provide_address'] = 'Bạn phải cung cấp ít nhất một địa chỉ người nhận.'; +$PHPMAILER_LANG['recipients_failed'] = 'Lỗi SMTP: lỗi địa chỉ người nhận: '; +$PHPMAILER_LANG['signing'] = 'Lỗi đăng nhập: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'Lỗi kết nối với SMTP'; +$PHPMAILER_LANG['smtp_error'] = 'Lỗi máy chủ smtp '; +$PHPMAILER_LANG['variable_set'] = 'Không thể thiết lập hoặc thiết lập lại biến: '; +//$PHPMAILER_LANG['extension_missing'] = 'Extension missing: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php new file mode 100755 index 0000000..3e9e358 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh.php @@ -0,0 +1,28 @@ + + * @author Peter Dave Hello <@PeterDaveHello/> + * @author Jason Chiang + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 錯誤:登入失敗。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 錯誤:無法連線到 SMTP 主機。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 錯誤:無法接受的資料。'; +$PHPMAILER_LANG['empty_message'] = '郵件內容為空'; +$PHPMAILER_LANG['encoding'] = '未知編碼: '; +$PHPMAILER_LANG['execute'] = '無法執行:'; +$PHPMAILER_LANG['file_access'] = '無法存取檔案:'; +$PHPMAILER_LANG['file_open'] = '檔案錯誤:無法開啟檔案:'; +$PHPMAILER_LANG['from_failed'] = '發送地址錯誤:'; +$PHPMAILER_LANG['instantiate'] = '未知函數呼叫。'; +$PHPMAILER_LANG['invalid_address'] = '因為電子郵件地址無效,無法傳送: '; +$PHPMAILER_LANG['mailer_not_supported'] = '不支援的發信客戶端。'; +$PHPMAILER_LANG['provide_address'] = '必須提供至少一個收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 錯誤:以下收件人地址錯誤:'; +$PHPMAILER_LANG['signing'] = '電子簽章錯誤: '; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP 連線失敗'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP 伺服器錯誤: '; +$PHPMAILER_LANG['variable_set'] = '無法設定或重設變數: '; +$PHPMAILER_LANG['extension_missing'] = '遺失模組 Extension: '; diff --git a/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php new file mode 100755 index 0000000..3753780 --- /dev/null +++ b/vendor/phpmailer/phpmailer/language/phpmailer.lang-zh_cn.php @@ -0,0 +1,28 @@ + + * @author young + * @author Teddysun + */ + +$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。'; +$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。'; +$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。'; +$PHPMAILER_LANG['empty_message'] = '邮件正文为空。'; +$PHPMAILER_LANG['encoding'] = '未知编码:'; +$PHPMAILER_LANG['execute'] = '无法执行:'; +$PHPMAILER_LANG['file_access'] = '无法访问文件:'; +$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:'; +$PHPMAILER_LANG['from_failed'] = '发送地址错误:'; +$PHPMAILER_LANG['instantiate'] = '未知函数调用。'; +$PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是无效的:'; +$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。'; +$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。'; +$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:'; +$PHPMAILER_LANG['signing'] = '登录失败:'; +$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。'; +$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:'; +$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:'; +$PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:'; diff --git a/vendor/phpmailer/phpmailer/src/Exception.php b/vendor/phpmailer/phpmailer/src/Exception.php new file mode 100755 index 0000000..9a05dec --- /dev/null +++ b/vendor/phpmailer/phpmailer/src/Exception.php @@ -0,0 +1,39 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer exception handler. + * + * @author Marcus Bointon + */ +class Exception extends \Exception +{ + /** + * Prettify error message output. + * + * @return string + */ + public function errorMessage() + { + return '' . htmlspecialchars($this->getMessage()) . "
                            \n"; + } +} diff --git a/vendor/phpmailer/phpmailer/src/OAuth.php b/vendor/phpmailer/phpmailer/src/OAuth.php new file mode 100755 index 0000000..0bce7e3 --- /dev/null +++ b/vendor/phpmailer/phpmailer/src/OAuth.php @@ -0,0 +1,138 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2015 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +use League\OAuth2\Client\Grant\RefreshToken; +use League\OAuth2\Client\Provider\AbstractProvider; +use League\OAuth2\Client\Token\AccessToken; + +/** + * OAuth - OAuth2 authentication wrapper class. + * Uses the oauth2-client package from the League of Extraordinary Packages. + * + * @see http://oauth2-client.thephpleague.com + * + * @author Marcus Bointon (Synchro/coolbru) + */ +class OAuth +{ + /** + * An instance of the League OAuth Client Provider. + * + * @var AbstractProvider + */ + protected $provider; + + /** + * The current OAuth access token. + * + * @var AccessToken + */ + protected $oauthToken; + + /** + * The user's email address, usually used as the login ID + * and also the from address when sending email. + * + * @var string + */ + protected $oauthUserEmail = ''; + + /** + * The client secret, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientSecret = ''; + + /** + * The client ID, generated in the app definition of the service you're connecting to. + * + * @var string + */ + protected $oauthClientId = ''; + + /** + * The refresh token, used to obtain new AccessTokens. + * + * @var string + */ + protected $oauthRefreshToken = ''; + + /** + * OAuth constructor. + * + * @param array $options Associative array containing + * `provider`, `userName`, `clientSecret`, `clientId` and `refreshToken` elements + */ + public function __construct($options) + { + $this->provider = $options['provider']; + $this->oauthUserEmail = $options['userName']; + $this->oauthClientSecret = $options['clientSecret']; + $this->oauthClientId = $options['clientId']; + $this->oauthRefreshToken = $options['refreshToken']; + } + + /** + * Get a new RefreshToken. + * + * @return RefreshToken + */ + protected function getGrant() + { + return new RefreshToken(); + } + + /** + * Get a new AccessToken. + * + * @return AccessToken + */ + protected function getToken() + { + return $this->provider->getAccessToken( + $this->getGrant(), + ['refresh_token' => $this->oauthRefreshToken] + ); + } + + /** + * Generate a base64-encoded OAuth token. + * + * @return string + */ + public function getOauth64() + { + // Get a new token if it's not available or has expired + if (null === $this->oauthToken or $this->oauthToken->hasExpired()) { + $this->oauthToken = $this->getToken(); + } + + return base64_encode( + 'user=' . + $this->oauthUserEmail . + "\001auth=Bearer " . + $this->oauthToken . + "\001\001" + ); + } +} diff --git a/vendor/phpmailer/phpmailer/src/PHPMailer.php b/vendor/phpmailer/phpmailer/src/PHPMailer.php new file mode 100755 index 0000000..5210492 --- /dev/null +++ b/vendor/phpmailer/phpmailer/src/PHPMailer.php @@ -0,0 +1,4502 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer - PHP email creation and transport class. + * + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + */ +class PHPMailer +{ + const CHARSET_ISO88591 = 'iso-8859-1'; + const CHARSET_UTF8 = 'utf-8'; + + const CONTENT_TYPE_PLAINTEXT = 'text/plain'; + const CONTENT_TYPE_TEXT_CALENDAR = 'text/calendar'; + const CONTENT_TYPE_TEXT_HTML = 'text/html'; + const CONTENT_TYPE_MULTIPART_ALTERNATIVE = 'multipart/alternative'; + const CONTENT_TYPE_MULTIPART_MIXED = 'multipart/mixed'; + const CONTENT_TYPE_MULTIPART_RELATED = 'multipart/related'; + + const ENCODING_7BIT = '7bit'; + const ENCODING_8BIT = '8bit'; + const ENCODING_BASE64 = 'base64'; + const ENCODING_BINARY = 'binary'; + const ENCODING_QUOTED_PRINTABLE = 'quoted-printable'; + + /** + * Email priority. + * Options: null (default), 1 = High, 3 = Normal, 5 = low. + * When null, the header is not set at all. + * + * @var int + */ + public $Priority; + + /** + * The character set of the message. + * + * @var string + */ + public $CharSet = self::CHARSET_ISO88591; + + /** + * The MIME Content-type of the message. + * + * @var string + */ + public $ContentType = self::CONTENT_TYPE_PLAINTEXT; + + /** + * The message encoding. + * Options: "8bit", "7bit", "binary", "base64", and "quoted-printable". + * + * @var string + */ + public $Encoding = self::ENCODING_8BIT; + + /** + * Holds the most recent mailer error message. + * + * @var string + */ + public $ErrorInfo = ''; + + /** + * The From email address for the message. + * + * @var string + */ + public $From = 'root@localhost'; + + /** + * The From name of the message. + * + * @var string + */ + public $FromName = 'Root User'; + + /** + * The envelope sender of the message. + * This will usually be turned into a Return-Path header by the receiver, + * and is the address that bounces will be sent to. + * If not empty, will be passed via `-f` to sendmail or as the 'MAIL FROM' value over SMTP. + * + * @var string + */ + public $Sender = ''; + + /** + * The Subject of the message. + * + * @var string + */ + public $Subject = ''; + + /** + * An HTML or plain text message body. + * If HTML then call isHTML(true). + * + * @var string + */ + public $Body = ''; + + /** + * The plain-text message body. + * This body can be read by mail clients that do not have HTML email + * capability such as mutt & Eudora. + * Clients that can read HTML will view the normal Body. + * + * @var string + */ + public $AltBody = ''; + + /** + * An iCal message part body. + * Only supported in simple alt or alt_inline message types + * To generate iCal event structures, use classes like EasyPeasyICS or iCalcreator. + * + * @see http://sprain.ch/blog/downloads/php-class-easypeasyics-create-ical-files-with-php/ + * @see http://kigkonsult.se/iCalcreator/ + * + * @var string + */ + public $Ical = ''; + + /** + * The complete compiled MIME message body. + * + * @var string + */ + protected $MIMEBody = ''; + + /** + * The complete compiled MIME message headers. + * + * @var string + */ + protected $MIMEHeader = ''; + + /** + * Extra headers that createHeader() doesn't fold in. + * + * @var string + */ + protected $mailHeader = ''; + + /** + * Word-wrap the message body to this number of chars. + * Set to 0 to not wrap. A useful value here is 78, for RFC2822 section 2.1.1 compliance. + * + * @see static::STD_LINE_LENGTH + * + * @var int + */ + public $WordWrap = 0; + + /** + * Which method to use to send mail. + * Options: "mail", "sendmail", or "smtp". + * + * @var string + */ + public $Mailer = 'mail'; + + /** + * The path to the sendmail program. + * + * @var string + */ + public $Sendmail = '/usr/sbin/sendmail'; + + /** + * Whether mail() uses a fully sendmail-compatible MTA. + * One which supports sendmail's "-oi -f" options. + * + * @var bool + */ + public $UseSendmailOptions = true; + + /** + * The email address that a reading confirmation should be sent to, also known as read receipt. + * + * @var string + */ + public $ConfirmReadingTo = ''; + + /** + * The hostname to use in the Message-ID header and as default HELO string. + * If empty, PHPMailer attempts to find one with, in order, + * $_SERVER['SERVER_NAME'], gethostname(), php_uname('n'), or the value + * 'localhost.localdomain'. + * + * @var string + */ + public $Hostname = ''; + + /** + * An ID to be used in the Message-ID header. + * If empty, a unique id will be generated. + * You can set your own, but it must be in the format "", + * as defined in RFC5322 section 3.6.4 or it will be ignored. + * + * @see https://tools.ietf.org/html/rfc5322#section-3.6.4 + * + * @var string + */ + public $MessageID = ''; + + /** + * The message Date to be used in the Date header. + * If empty, the current date will be added. + * + * @var string + */ + public $MessageDate = ''; + + /** + * SMTP hosts. + * Either a single hostname or multiple semicolon-delimited hostnames. + * You can also specify a different port + * for each host by using this format: [hostname:port] + * (e.g. "smtp1.example.com:25;smtp2.example.com"). + * You can also specify encryption type, for example: + * (e.g. "tls://smtp1.example.com:587;ssl://smtp2.example.com:465"). + * Hosts will be tried in order. + * + * @var string + */ + public $Host = 'localhost'; + + /** + * The default SMTP server port. + * + * @var int + */ + public $Port = 25; + + /** + * The SMTP HELO of the message. + * Default is $Hostname. If $Hostname is empty, PHPMailer attempts to find + * one with the same method described above for $Hostname. + * + * @see PHPMailer::$Hostname + * + * @var string + */ + public $Helo = ''; + + /** + * What kind of encryption to use on the SMTP connection. + * Options: '', 'ssl' or 'tls'. + * + * @var string + */ + public $SMTPSecure = ''; + + /** + * Whether to enable TLS encryption automatically if a server supports it, + * even if `SMTPSecure` is not set to 'tls'. + * Be aware that in PHP >= 5.6 this requires that the server's certificates are valid. + * + * @var bool + */ + public $SMTPAutoTLS = true; + + /** + * Whether to use SMTP authentication. + * Uses the Username and Password properties. + * + * @see PHPMailer::$Username + * @see PHPMailer::$Password + * + * @var bool + */ + public $SMTPAuth = false; + + /** + * Options array passed to stream_context_create when connecting via SMTP. + * + * @var array + */ + public $SMTPOptions = []; + + /** + * SMTP username. + * + * @var string + */ + public $Username = ''; + + /** + * SMTP password. + * + * @var string + */ + public $Password = ''; + + /** + * SMTP auth type. + * Options are CRAM-MD5, LOGIN, PLAIN, XOAUTH2, attempted in that order if not specified. + * + * @var string + */ + public $AuthType = ''; + + /** + * An instance of the PHPMailer OAuth class. + * + * @var OAuth + */ + protected $oauth; + + /** + * The SMTP server timeout in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int + */ + public $Timeout = 300; + + /** + * SMTP class debug output mode. + * Debug output level. + * Options: + * * `0` No output + * * `1` Commands + * * `2` Data and commands + * * `3` As 2 plus connection status + * * `4` Low-level data output. + * + * @see SMTP::$do_debug + * + * @var int + */ + public $SMTPDebug = 0; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
                            `, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * By default PHPMailer will use `echo` if run from a `cli` or `cli-server` SAPI, `html` otherwise. + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * ```php + * $mail->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @see SMTP::$Debugoutput + * + * @var string|callable|\Psr\Log\LoggerInterface + */ + public $Debugoutput = 'echo'; + + /** + * Whether to keep SMTP connection open after each message. + * If this is set to true then to close the connection + * requires an explicit call to smtpClose(). + * + * @var bool + */ + public $SMTPKeepAlive = false; + + /** + * Whether to split multiple to addresses into multiple messages + * or send them all in one message. + * Only supported in `mail` and `sendmail` transports, not in SMTP. + * + * @var bool + */ + public $SingleTo = false; + + /** + * Storage for addresses when SingleTo is enabled. + * + * @var array + */ + protected $SingleToArray = []; + + /** + * Whether to generate VERP addresses on send. + * Only applicable when sending via SMTP. + * + * @see https://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see http://www.postfix.org/VERP_README.html Postfix VERP info + * + * @var bool + */ + public $do_verp = false; + + /** + * Whether to allow sending messages with an empty body. + * + * @var bool + */ + public $AllowEmpty = false; + + /** + * DKIM selector. + * + * @var string + */ + public $DKIM_selector = ''; + + /** + * DKIM Identity. + * Usually the email address used as the source of the email. + * + * @var string + */ + public $DKIM_identity = ''; + + /** + * DKIM passphrase. + * Used if your key is encrypted. + * + * @var string + */ + public $DKIM_passphrase = ''; + + /** + * DKIM signing domain name. + * + * @example 'example.com' + * + * @var string + */ + public $DKIM_domain = ''; + + /** + * DKIM Copy header field values for diagnostic use. + * + * @var bool + */ + public $DKIM_copyHeaderFields = true; + + /** + * DKIM Extra signing headers. + * + * @example ['List-Unsubscribe', 'List-Help'] + * + * @var array + */ + public $DKIM_extraHeaders = []; + + /** + * DKIM private key file path. + * + * @var string + */ + public $DKIM_private = ''; + + /** + * DKIM private key string. + * + * If set, takes precedence over `$DKIM_private`. + * + * @var string + */ + public $DKIM_private_string = ''; + + /** + * Callback Action function name. + * + * The function that handles the result of the send email action. + * It is called out by send() for each email sent. + * + * Value can be any php callable: http://www.php.net/is_callable + * + * Parameters: + * bool $result result of the send action + * array $to email addresses of the recipients + * array $cc cc email addresses + * array $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * string $from email address of sender + * string $extra extra information of possible use + * "smtp_transaction_id' => last smtp transaction id + * + * @var string + */ + public $action_function = ''; + + /** + * What to put in the X-Mailer header. + * Options: An empty string for PHPMailer default, whitespace for none, or a string to use. + * + * @var string + */ + public $XMailer = ''; + + /** + * Which validator to use by default when validating email addresses. + * May be a callable to inject your own validator, but there are several built-in validators. + * The default validator uses PHP's FILTER_VALIDATE_EMAIL filter_var option. + * + * @see PHPMailer::validateAddress() + * + * @var string|callable + */ + public static $validator = 'php'; + + /** + * An instance of the SMTP sender class. + * + * @var SMTP + */ + protected $smtp; + + /** + * The array of 'to' names and addresses. + * + * @var array + */ + protected $to = []; + + /** + * The array of 'cc' names and addresses. + * + * @var array + */ + protected $cc = []; + + /** + * The array of 'bcc' names and addresses. + * + * @var array + */ + protected $bcc = []; + + /** + * The array of reply-to names and addresses. + * + * @var array + */ + protected $ReplyTo = []; + + /** + * An array of all kinds of addresses. + * Includes all of $to, $cc, $bcc. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * + * @var array + */ + protected $all_recipients = []; + + /** + * An array of names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $all_recipients + * and one of $to, $cc, or $bcc. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$to + * @see PHPMailer::$cc + * @see PHPMailer::$bcc + * @see PHPMailer::$all_recipients + * + * @var array + */ + protected $RecipientsQueue = []; + + /** + * An array of reply-to names and addresses queued for validation. + * In send(), valid and non duplicate entries are moved to $ReplyTo. + * This array is used only for addresses with IDN. + * + * @see PHPMailer::$ReplyTo + * + * @var array + */ + protected $ReplyToQueue = []; + + /** + * The array of attachments. + * + * @var array + */ + protected $attachment = []; + + /** + * The array of custom headers. + * + * @var array + */ + protected $CustomHeader = []; + + /** + * The most recent Message-ID (including angular brackets). + * + * @var string + */ + protected $lastMessageID = ''; + + /** + * The message's MIME type. + * + * @var string + */ + protected $message_type = ''; + + /** + * The array of MIME boundary strings. + * + * @var array + */ + protected $boundary = []; + + /** + * The array of available languages. + * + * @var array + */ + protected $language = []; + + /** + * The number of errors encountered. + * + * @var int + */ + protected $error_count = 0; + + /** + * The S/MIME certificate file path. + * + * @var string + */ + protected $sign_cert_file = ''; + + /** + * The S/MIME key file path. + * + * @var string + */ + protected $sign_key_file = ''; + + /** + * The optional S/MIME extra certificates ("CA Chain") file path. + * + * @var string + */ + protected $sign_extracerts_file = ''; + + /** + * The S/MIME password for the key. + * Used only if the key is encrypted. + * + * @var string + */ + protected $sign_key_pass = ''; + + /** + * Whether to throw exceptions for errors. + * + * @var bool + */ + protected $exceptions = false; + + /** + * Unique ID used for message ID and boundaries. + * + * @var string + */ + protected $uniqueid = ''; + + /** + * The PHPMailer Version number. + * + * @var string + */ + const VERSION = '6.0.7'; + + /** + * Error severity: message only, continue processing. + * + * @var int + */ + const STOP_MESSAGE = 0; + + /** + * Error severity: message, likely ok to continue processing. + * + * @var int + */ + const STOP_CONTINUE = 1; + + /** + * Error severity: message, plus full stop, critical error reached. + * + * @var int + */ + const STOP_CRITICAL = 2; + + /** + * SMTP RFC standard line ending. + * + * @var string + */ + protected static $LE = "\r\n"; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1. + * + * @var int + */ + const MAX_LINE_LENGTH = 998; + + /** + * The lower maximum line length allowed by RFC 2822 section 2.1.1. + * This length does NOT include the line break + * 76 means that lines will be 77 or 78 chars depending on whether + * the line break format is LF or CRLF; both are valid. + * + * @var int + */ + const STD_LINE_LENGTH = 76; + + /** + * Constructor. + * + * @param bool $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = null) + { + if (null !== $exceptions) { + $this->exceptions = (bool) $exceptions; + } + //Pick an appropriate debug output format automatically + $this->Debugoutput = (strpos(PHP_SAPI, 'cli') !== false ? 'echo' : 'html'); + } + + /** + * Destructor. + */ + public function __destruct() + { + //Close any open SMTP connection nicely + $this->smtpClose(); + } + + /** + * Call mail() in a safe_mode-aware fashion. + * Also, unless sendmail_path points to sendmail (or something that + * claims to be sendmail), don't pass params (not a perfect fix, + * but it will do). + * + * @param string $to To + * @param string $subject Subject + * @param string $body Message Body + * @param string $header Additional Header(s) + * @param string|null $params Params + * + * @return bool + */ + private function mailPassthru($to, $subject, $body, $header, $params) + { + //Check overloading of mail function to avoid double-encoding + if (ini_get('mbstring.func_overload') & 1) { + $subject = $this->secureHeader($subject); + } else { + $subject = $this->encodeHeader($this->secureHeader($subject)); + } + //Calling mail() with null params breaks + if (!$this->UseSendmailOptions or null === $params) { + $result = @mail($to, $subject, $body, $header); + } else { + $result = @mail($to, $subject, $body, $header, $params); + } + + return $result; + } + + /** + * Output debugging info via user-defined method. + * Only generates output if SMTP debug output is enabled (@see SMTP::$do_debug). + * + * @see PHPMailer::$Debugoutput + * @see PHPMailer::$SMTPDebug + * + * @param string $str + */ + protected function edebug($str) + { + if ($this->SMTPDebug <= 0) { + return; + } + //Is this a PSR-3 logger? + if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { + $this->Debugoutput->debug($str); + + return; + } + //Avoid clash with built-in function names + if (!in_array($this->Debugoutput, ['error_log', 'html', 'echo']) and is_callable($this->Debugoutput)) { + call_user_func($this->Debugoutput, $str, $this->SMTPDebug); + + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ), "
                            \n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/\r\n|\r/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s'), + "\t", + //Trim trailing space + trim( + //Indent for readability, except for trailing break + str_replace( + "\n", + "\n \t ", + trim($str) + ) + ), + "\n"; + } + } + + /** + * Sets message type to HTML or plain. + * + * @param bool $isHtml True for HTML mode + */ + public function isHTML($isHtml = true) + { + if ($isHtml) { + $this->ContentType = static::CONTENT_TYPE_TEXT_HTML; + } else { + $this->ContentType = static::CONTENT_TYPE_PLAINTEXT; + } + } + + /** + * Send messages using SMTP. + */ + public function isSMTP() + { + $this->Mailer = 'smtp'; + } + + /** + * Send messages using PHP's mail() function. + */ + public function isMail() + { + $this->Mailer = 'mail'; + } + + /** + * Send messages using $Sendmail. + */ + public function isSendmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (false === stripos($ini_sendmail_path, 'sendmail')) { + $this->Sendmail = '/usr/sbin/sendmail'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'sendmail'; + } + + /** + * Send messages using qmail. + */ + public function isQmail() + { + $ini_sendmail_path = ini_get('sendmail_path'); + + if (false === stripos($ini_sendmail_path, 'qmail')) { + $this->Sendmail = '/var/qmail/bin/qmail-inject'; + } else { + $this->Sendmail = $ini_sendmail_path; + } + $this->Mailer = 'qmail'; + } + + /** + * Add a "To" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addAddress($address, $name = '') + { + return $this->addOrEnqueueAnAddress('to', $address, $name); + } + + /** + * Add a "CC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('cc', $address, $name); + } + + /** + * Add a "BCC" address. + * + * @param string $address The email address to send to + * @param string $name + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addBCC($address, $name = '') + { + return $this->addOrEnqueueAnAddress('bcc', $address, $name); + } + + /** + * Add a "Reply-To" address. + * + * @param string $address The email address to reply to + * @param string $name + * + * @return bool true on success, false if address already used or invalid in some way + */ + public function addReplyTo($address, $name = '') + { + return $this->addOrEnqueueAnAddress('Reply-To', $address, $name); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. Because PHPMailer + * can't validate addresses with an IDN without knowing the PHPMailer::$CharSet (that can still + * be modified after calling this function), addition of such addresses is delayed until send(). + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + protected function addOrEnqueueAnAddress($kind, $address, $name) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + $pos = strrpos($address, '@'); + if (false === $pos) { + // At-sign is missing. + $error_message = sprintf('%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + $params = [$kind, $address, $name]; + // Enqueue addresses with IDN until we know the PHPMailer::$CharSet. + if ($this->has8bitChars(substr($address, ++$pos)) and static::idnSupported()) { + if ('Reply-To' != $kind) { + if (!array_key_exists($address, $this->RecipientsQueue)) { + $this->RecipientsQueue[$address] = $params; + + return true; + } + } else { + if (!array_key_exists($address, $this->ReplyToQueue)) { + $this->ReplyToQueue[$address] = $params; + + return true; + } + } + + return false; + } + + // Immediately add standard addresses without IDN. + return call_user_func_array([$this, 'addAnAddress'], $params); + } + + /** + * Add an address to one of the recipient arrays or to the ReplyTo array. + * Addresses that have been added already return false, but do not throw exceptions. + * + * @param string $kind One of 'to', 'cc', 'bcc', or 'ReplyTo' + * @param string $address The email address to send, resp. to reply to + * @param string $name + * + * @throws Exception + * + * @return bool true on success, false if address already used or invalid in some way + */ + protected function addAnAddress($kind, $address, $name = '') + { + if (!in_array($kind, ['to', 'cc', 'bcc', 'Reply-To'])) { + $error_message = sprintf('%s: %s', + $this->lang('Invalid recipient kind'), + $kind); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + if (!static::validateAddress($address)) { + $error_message = sprintf('%s (%s): %s', + $this->lang('invalid_address'), + $kind, + $address); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + if ('Reply-To' != $kind) { + if (!array_key_exists(strtolower($address), $this->all_recipients)) { + $this->{$kind}[] = [$address, $name]; + $this->all_recipients[strtolower($address)] = true; + + return true; + } + } else { + if (!array_key_exists(strtolower($address), $this->ReplyTo)) { + $this->ReplyTo[strtolower($address)] = [$address, $name]; + + return true; + } + } + + return false; + } + + /** + * Parse and validate a string containing one or more RFC822-style comma-separated email addresses + * of the form "display name
                            " into an array of name/address pairs. + * Uses the imap_rfc822_parse_adrlist function if the IMAP extension is available. + * Note that quotes in the name part are removed. + * + * @see http://www.andrew.cmu.edu/user/agreen1/testing/mrbs/web/Mail/RFC822.php A more careful implementation + * + * @param string $addrstr The address list string + * @param bool $useimap Whether to use the IMAP extension to parse the list + * + * @return array + */ + public static function parseAddresses($addrstr, $useimap = true) + { + $addresses = []; + if ($useimap and function_exists('imap_rfc822_parse_adrlist')) { + //Use this built-in parser if it's available + $list = imap_rfc822_parse_adrlist($addrstr, ''); + foreach ($list as $address) { + if ('.SYNTAX-ERROR.' != $address->host) { + if (static::validateAddress($address->mailbox . '@' . $address->host)) { + $addresses[] = [ + 'name' => (property_exists($address, 'personal') ? $address->personal : ''), + 'address' => $address->mailbox . '@' . $address->host, + ]; + } + } + } + } else { + //Use this simpler parser + $list = explode(',', $addrstr); + foreach ($list as $address) { + $address = trim($address); + //Is there a separate name part? + if (strpos($address, '<') === false) { + //No separate name, just use the whole thing + if (static::validateAddress($address)) { + $addresses[] = [ + 'name' => '', + 'address' => $address, + ]; + } + } else { + list($name, $email) = explode('<', $address); + $email = trim(str_replace('>', '', $email)); + if (static::validateAddress($email)) { + $addresses[] = [ + 'name' => trim(str_replace(['"', "'"], '', $name)), + 'address' => $email, + ]; + } + } + } + } + + return $addresses; + } + + /** + * Set the From and FromName properties. + * + * @param string $address + * @param string $name + * @param bool $auto Whether to also set the Sender address, defaults to true + * + * @throws Exception + * + * @return bool + */ + public function setFrom($address, $name = '', $auto = true) + { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + // Don't validate now addresses with IDN. Will be done in send(). + $pos = strrpos($address, '@'); + if (false === $pos or + (!$this->has8bitChars(substr($address, ++$pos)) or !static::idnSupported()) and + !static::validateAddress($address)) { + $error_message = sprintf('%s (From): %s', + $this->lang('invalid_address'), + $address); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + $this->From = $address; + $this->FromName = $name; + if ($auto) { + if (empty($this->Sender)) { + $this->Sender = $address; + } + } + + return true; + } + + /** + * Return the Message-ID header of the last email. + * Technically this is the value from the last time the headers were created, + * but it's also the message ID of the last sent message except in + * pathological cases. + * + * @return string + */ + public function getLastMessageID() + { + return $this->lastMessageID; + } + + /** + * Check that a string looks like an email address. + * Validation patterns supported: + * * `auto` Pick best pattern automatically; + * * `pcre8` Use the squiloople.com pattern, requires PCRE > 8.0; + * * `pcre` Use old PCRE implementation; + * * `php` Use PHP built-in FILTER_VALIDATE_EMAIL; + * * `html5` Use the pattern given by the HTML5 spec for 'email' type form input elements. + * * `noregex` Don't use a regex: super fast, really dumb. + * Alternatively you may pass in a callable to inject your own validator, for example: + * + * ```php + * PHPMailer::validateAddress('user@example.com', function($address) { + * return (strpos($address, '@') !== false); + * }); + * ``` + * + * You can also set the PHPMailer::$validator static to a callable, allowing built-in methods to use your validator. + * + * @param string $address The email address to check + * @param string|callable $patternselect Which pattern to use + * + * @return bool + */ + public static function validateAddress($address, $patternselect = null) + { + if (null === $patternselect) { + $patternselect = static::$validator; + } + if (is_callable($patternselect)) { + return call_user_func($patternselect, $address); + } + //Reject line breaks in addresses; it's valid RFC5322, but not RFC5321 + if (strpos($address, "\n") !== false or strpos($address, "\r") !== false) { + return false; + } + switch ($patternselect) { + case 'pcre': //Kept for BC + case 'pcre8': + /* + * A more complex and more permissive version of the RFC5322 regex on which FILTER_VALIDATE_EMAIL + * is based. + * In addition to the addresses allowed by filter_var, also permits: + * * dotless domains: `a@b` + * * comments: `1234 @ local(blah) .machine .example` + * * quoted elements: `'"test blah"@example.org'` + * * numeric TLDs: `a@b.123` + * * unbracketed IPv4 literals: `a@192.168.0.1` + * * IPv6 literals: 'first.last@[IPv6:a1::]' + * Not all of these will necessarily work for sending! + * + * @see http://squiloople.com/2009/12/20/email-address-validation/ + * @copyright 2009-2010 Michael Rushton + * Feel free to use and redistribute this code. But please keep this copyright notice. + */ + return (bool) preg_match( + '/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)' . + '((?>(?>(?>((?>(?>(?>\x0D\x0A)?[\t ])+|(?>[\t ]*\x0D\x0A)?[\t ]+)?)(\((?>(?2)' . + '(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)' . + '([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*' . + '(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)' . + '(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}' . + '|(?!(?:.*[a-f0-9][:\]]){8,})((?6)(?>:(?6)){0,6})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:' . + '|(?!(?:.*[a-f0-9]:){6,})(?8)?::(?>((?6)(?>:(?6)){0,4}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}' . + '|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', + $address + ); + case 'html5': + /* + * This is the pattern used in the HTML5 spec for validation of 'email' type form input elements. + * + * @see http://www.whatwg.org/specs/web-apps/current-work/#e-mail-state-(type=email) + */ + return (bool) preg_match( + '/^[a-zA-Z0-9.!#$%&\'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}' . + '[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/sD', + $address + ); + case 'php': + default: + return (bool) filter_var($address, FILTER_VALIDATE_EMAIL); + } + } + + /** + * Tells whether IDNs (Internationalized Domain Names) are supported or not. This requires the + * `intl` and `mbstring` PHP extensions. + * + * @return bool `true` if required functions for IDN support are present + */ + public static function idnSupported() + { + return function_exists('idn_to_ascii') and function_exists('mb_convert_encoding'); + } + + /** + * Converts IDN in given email address to its ASCII form, also known as punycode, if possible. + * Important: Address must be passed in same encoding as currently set in PHPMailer::$CharSet. + * This function silently returns unmodified address if: + * - No conversion is necessary (i.e. domain name is not an IDN, or is already in ASCII form) + * - Conversion to punycode is impossible (e.g. required PHP functions are not available) + * or fails for any reason (e.g. domain contains characters not allowed in an IDN). + * + * @see PHPMailer::$CharSet + * + * @param string $address The email address to convert + * + * @return string The encoded address in ASCII form + */ + public function punyencodeAddress($address) + { + // Verify we have required functions, CharSet, and at-sign. + $pos = strrpos($address, '@'); + if (static::idnSupported() and + !empty($this->CharSet) and + false !== $pos + ) { + $domain = substr($address, ++$pos); + // Verify CharSet string is a valid one, and domain properly encoded in this CharSet. + if ($this->has8bitChars($domain) and @mb_check_encoding($domain, $this->CharSet)) { + $domain = mb_convert_encoding($domain, 'UTF-8', $this->CharSet); + //Ignore IDE complaints about this line - method signature changed in PHP 5.4 + $errorcode = 0; + $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_UTS46); + if (false !== $punycode) { + return substr($address, 0, $pos) . $punycode; + } + } + } + + return $address; + } + + /** + * Create a message and send it. + * Uses the sending method specified by $Mailer. + * + * @throws Exception + * + * @return bool false on error - See the ErrorInfo property for details of the error + */ + public function send() + { + try { + if (!$this->preSend()) { + return false; + } + + return $this->postSend(); + } catch (Exception $exc) { + $this->mailHeader = ''; + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + } + + /** + * Prepare a message for sending. + * + * @throws Exception + * + * @return bool + */ + public function preSend() + { + if ('smtp' == $this->Mailer or + ('mail' == $this->Mailer and stripos(PHP_OS, 'WIN') === 0) + ) { + //SMTP mandates RFC-compliant line endings + //and it's also used with mail() on Windows + static::setLE("\r\n"); + } else { + //Maintain backward compatibility with legacy Linux command line mailers + static::setLE(PHP_EOL); + } + //Check for buggy PHP versions that add a header with an incorrect line break + if (ini_get('mail.add_x_header') == 1 + and 'mail' == $this->Mailer + and stripos(PHP_OS, 'WIN') === 0 + and ((version_compare(PHP_VERSION, '7.0.0', '>=') + and version_compare(PHP_VERSION, '7.0.17', '<')) + or (version_compare(PHP_VERSION, '7.1.0', '>=') + and version_compare(PHP_VERSION, '7.1.3', '<'))) + ) { + trigger_error( + 'Your version of PHP is affected by a bug that may result in corrupted messages.' . + ' To fix it, switch to sending using SMTP, disable the mail.add_x_header option in' . + ' your php.ini, switch to MacOS or Linux, or upgrade your PHP to version 7.0.17+ or 7.1.3+.', + E_USER_WARNING + ); + } + + try { + $this->error_count = 0; // Reset errors + $this->mailHeader = ''; + + // Dequeue recipient and Reply-To addresses with IDN + foreach (array_merge($this->RecipientsQueue, $this->ReplyToQueue) as $params) { + $params[1] = $this->punyencodeAddress($params[1]); + call_user_func_array([$this, 'addAnAddress'], $params); + } + if (count($this->to) + count($this->cc) + count($this->bcc) < 1) { + throw new Exception($this->lang('provide_address'), self::STOP_CRITICAL); + } + + // Validate From, Sender, and ConfirmReadingTo addresses + foreach (['From', 'Sender', 'ConfirmReadingTo'] as $address_kind) { + $this->$address_kind = trim($this->$address_kind); + if (empty($this->$address_kind)) { + continue; + } + $this->$address_kind = $this->punyencodeAddress($this->$address_kind); + if (!static::validateAddress($this->$address_kind)) { + $error_message = sprintf('%s (%s): %s', + $this->lang('invalid_address'), + $address_kind, + $this->$address_kind); + $this->setError($error_message); + $this->edebug($error_message); + if ($this->exceptions) { + throw new Exception($error_message); + } + + return false; + } + } + + // Set whether the message is multipart/alternative + if ($this->alternativeExists()) { + $this->ContentType = static::CONTENT_TYPE_MULTIPART_ALTERNATIVE; + } + + $this->setMessageType(); + // Refuse to send an empty message unless we are specifically allowing it + if (!$this->AllowEmpty and empty($this->Body)) { + throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); + } + + //Trim subject consistently + $this->Subject = trim($this->Subject); + // Create body before headers in case body makes changes to headers (e.g. altering transfer encoding) + $this->MIMEHeader = ''; + $this->MIMEBody = $this->createBody(); + // createBody may have added some headers, so retain them + $tempheaders = $this->MIMEHeader; + $this->MIMEHeader = $this->createHeader(); + $this->MIMEHeader .= $tempheaders; + + // To capture the complete message when using mail(), create + // an extra header list which createHeader() doesn't fold in + if ('mail' == $this->Mailer) { + if (count($this->to) > 0) { + $this->mailHeader .= $this->addrAppend('To', $this->to); + } else { + $this->mailHeader .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + $this->mailHeader .= $this->headerLine( + 'Subject', + $this->encodeHeader($this->secureHeader($this->Subject)) + ); + } + + // Sign with DKIM if enabled + if (!empty($this->DKIM_domain) + and !empty($this->DKIM_selector) + and (!empty($this->DKIM_private_string) + or (!empty($this->DKIM_private) + and static::isPermittedPath($this->DKIM_private) + and file_exists($this->DKIM_private) + ) + ) + ) { + $header_dkim = $this->DKIM_Add( + $this->MIMEHeader . $this->mailHeader, + $this->encodeHeader($this->secureHeader($this->Subject)), + $this->MIMEBody + ); + $this->MIMEHeader = rtrim($this->MIMEHeader, "\r\n ") . static::$LE . + static::normalizeBreaks($header_dkim) . static::$LE; + } + + return true; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + } + + /** + * Actually send a message via the selected mechanism. + * + * @throws Exception + * + * @return bool + */ + public function postSend() + { + try { + // Choose the mailer and send through it + switch ($this->Mailer) { + case 'sendmail': + case 'qmail': + return $this->sendmailSend($this->MIMEHeader, $this->MIMEBody); + case 'smtp': + return $this->smtpSend($this->MIMEHeader, $this->MIMEBody); + case 'mail': + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + default: + $sendMethod = $this->Mailer . 'Send'; + if (method_exists($this, $sendMethod)) { + return $this->$sendMethod($this->MIMEHeader, $this->MIMEBody); + } + + return $this->mailSend($this->MIMEHeader, $this->MIMEBody); + } + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + } + + return false; + } + + /** + * Send mail using the $Sendmail program. + * + * @see PHPMailer::$Sendmail + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function sendmailSend($header, $body) + { + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (!empty($this->Sender) and self::isShellSafe($this->Sender)) { + if ('qmail' == $this->Mailer) { + $sendmailFmt = '%s -f%s'; + } else { + $sendmailFmt = '%s -oi -f%s -t'; + } + } else { + if ('qmail' == $this->Mailer) { + $sendmailFmt = '%s'; + } else { + $sendmailFmt = '%s -oi -t'; + } + } + + $sendmail = sprintf($sendmailFmt, escapeshellcmd($this->Sendmail), $this->Sender); + + if ($this->SingleTo) { + foreach ($this->SingleToArray as $toAddr) { + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fwrite($mail, 'To: ' . $toAddr . "\n"); + fwrite($mail, $header); + fwrite($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result == 0), + [$toAddr], + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From, + [] + ); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + } else { + $mail = @popen($sendmail, 'w'); + if (!$mail) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fwrite($mail, $header); + fwrite($mail, $body); + $result = pclose($mail); + $this->doCallback( + ($result == 0), + $this->to, + $this->cc, + $this->bcc, + $this->Subject, + $body, + $this->From, + [] + ); + if (0 !== $result) { + throw new Exception($this->lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + + return true; + } + + /** + * Fix CVE-2016-10033 and CVE-2016-10045 by disallowing potentially unsafe shell characters. + * Note that escapeshellarg and escapeshellcmd are inadequate for our purposes, especially on Windows. + * + * @see https://github.com/PHPMailer/PHPMailer/issues/924 CVE-2016-10045 bug report + * + * @param string $string The string to be validated + * + * @return bool + */ + protected static function isShellSafe($string) + { + // Future-proof + if (escapeshellcmd($string) !== $string + or !in_array(escapeshellarg($string), ["'$string'", "\"$string\""]) + ) { + return false; + } + + $length = strlen($string); + + for ($i = 0; $i < $length; ++$i) { + $c = $string[$i]; + + // All other characters have a special meaning in at least one common shell, including = and +. + // Full stop (.) has a special meaning in cmd.exe, but its impact should be negligible here. + // Note that this does permit non-Latin alphanumeric characters based on the current locale. + if (!ctype_alnum($c) && strpos('@_-.', $c) === false) { + return false; + } + } + + return true; + } + + /** + * Check whether a file path is of a permitted type. + * Used to reject URLs and phar files from functions that access local file paths, + * such as addAttachment. + * + * @param string $path A relative or absolute path to a file + * + * @return bool + */ + protected static function isPermittedPath($path) + { + return !preg_match('#^[a-z]+://#i', $path); + } + + /** + * Send mail using the PHP mail() function. + * + * @see http://www.php.net/manual/en/book.mail.php + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function mailSend($header, $body) + { + $toArr = []; + foreach ($this->to as $toaddr) { + $toArr[] = $this->addrFormat($toaddr); + } + $to = implode(', ', $toArr); + + $params = null; + //This sets the SMTP envelope sender which gets turned into a return-path header by the receiver + if (!empty($this->Sender) and static::validateAddress($this->Sender)) { + //A space after `-f` is optional, but there is a long history of its presence + //causing problems, so we don't use one + //Exim docs: http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html + //Sendmail docs: http://www.sendmail.org/~ca/email/man/sendmail.html + //Qmail docs: http://www.qmail.org/man/man8/qmail-inject.html + //Example problem: https://www.drupal.org/node/1057954 + // CVE-2016-10033, CVE-2016-10045: Don't pass -f if characters will be escaped. + if (self::isShellSafe($this->Sender)) { + $params = sprintf('-f%s', $this->Sender); + } + } + if (!empty($this->Sender) and static::validateAddress($this->Sender)) { + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + } + $result = false; + if ($this->SingleTo and count($toArr) > 1) { + foreach ($toArr as $toAddr) { + $result = $this->mailPassthru($toAddr, $this->Subject, $body, $header, $params); + $this->doCallback($result, [$toAddr], $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); + } + } else { + $result = $this->mailPassthru($to, $this->Subject, $body, $header, $params); + $this->doCallback($result, $this->to, $this->cc, $this->bcc, $this->Subject, $body, $this->From, []); + } + if (isset($old_from)) { + ini_set('sendmail_from', $old_from); + } + if (!$result) { + throw new Exception($this->lang('instantiate'), self::STOP_CRITICAL); + } + + return true; + } + + /** + * Get an instance to use for SMTP operations. + * Override this function to load your own SMTP implementation, + * or set one with setSMTPInstance. + * + * @return SMTP + */ + public function getSMTPInstance() + { + if (!is_object($this->smtp)) { + $this->smtp = new SMTP(); + } + + return $this->smtp; + } + + /** + * Provide an instance to use for SMTP operations. + * + * @param SMTP $smtp + * + * @return SMTP + */ + public function setSMTPInstance(SMTP $smtp) + { + $this->smtp = $smtp; + + return $this->smtp; + } + + /** + * Send mail via SMTP. + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * + * @see PHPMailer::setSMTPInstance() to use a different class. + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @param string $header The message headers + * @param string $body The message body + * + * @throws Exception + * + * @return bool + */ + protected function smtpSend($header, $body) + { + $bad_rcpt = []; + if (!$this->smtpConnect($this->SMTPOptions)) { + throw new Exception($this->lang('smtp_connect_failed'), self::STOP_CRITICAL); + } + //Sender already validated in preSend() + if ('' == $this->Sender) { + $smtp_from = $this->From; + } else { + $smtp_from = $this->Sender; + } + if (!$this->smtp->mail($smtp_from)) { + $this->setError($this->lang('from_failed') . $smtp_from . ' : ' . implode(',', $this->smtp->getError())); + throw new Exception($this->ErrorInfo, self::STOP_CRITICAL); + } + + $callbacks = []; + // Attempt to send to all recipients + foreach ([$this->to, $this->cc, $this->bcc] as $togroup) { + foreach ($togroup as $to) { + if (!$this->smtp->recipient($to[0])) { + $error = $this->smtp->getError(); + $bad_rcpt[] = ['to' => $to[0], 'error' => $error['detail']]; + $isSent = false; + } else { + $isSent = true; + } + + $callbacks[] = ['issent'=>$isSent, 'to'=>$to[0]]; + } + } + + // Only send the DATA command if we have viable recipients + if ((count($this->all_recipients) > count($bad_rcpt)) and !$this->smtp->data($header . $body)) { + throw new Exception($this->lang('data_not_accepted'), self::STOP_CRITICAL); + } + + $smtp_transaction_id = $this->smtp->getLastTransactionID(); + + if ($this->SMTPKeepAlive) { + $this->smtp->reset(); + } else { + $this->smtp->quit(); + $this->smtp->close(); + } + + foreach ($callbacks as $cb) { + $this->doCallback( + $cb['issent'], + [$cb['to']], + [], + [], + $this->Subject, + $body, + $this->From, + ['smtp_transaction_id' => $smtp_transaction_id] + ); + } + + //Create error message for any bad addresses + if (count($bad_rcpt) > 0) { + $errstr = ''; + foreach ($bad_rcpt as $bad) { + $errstr .= $bad['to'] . ': ' . $bad['error']; + } + throw new Exception( + $this->lang('recipients_failed') . $errstr, + self::STOP_CONTINUE + ); + } + + return true; + } + + /** + * Initiate a connection to an SMTP server. + * Returns false if the operation failed. + * + * @param array $options An array of options compatible with stream_context_create() + * + * @throws Exception + * + * @uses \PHPMailer\PHPMailer\SMTP + * + * @return bool + */ + public function smtpConnect($options = null) + { + if (null === $this->smtp) { + $this->smtp = $this->getSMTPInstance(); + } + + //If no options are provided, use whatever is set in the instance + if (null === $options) { + $options = $this->SMTPOptions; + } + + // Already connected? + if ($this->smtp->connected()) { + return true; + } + + $this->smtp->setTimeout($this->Timeout); + $this->smtp->setDebugLevel($this->SMTPDebug); + $this->smtp->setDebugOutput($this->Debugoutput); + $this->smtp->setVerp($this->do_verp); + $hosts = explode(';', $this->Host); + $lastexception = null; + + foreach ($hosts as $hostentry) { + $hostinfo = []; + if (!preg_match( + '/^((ssl|tls):\/\/)*([a-zA-Z0-9\.-]*|\[[a-fA-F0-9:]+\]):?([0-9]*)$/', + trim($hostentry), + $hostinfo + )) { + static::edebug($this->lang('connect_host') . ' ' . $hostentry); + // Not a valid host entry + continue; + } + // $hostinfo[2]: optional ssl or tls prefix + // $hostinfo[3]: the hostname + // $hostinfo[4]: optional port number + // The host string prefix can temporarily override the current setting for SMTPSecure + // If it's not specified, the default value is used + + //Check the host name is a valid name or IP address before trying to use it + if (!static::isValidHost($hostinfo[3])) { + static::edebug($this->lang('connect_host') . ' ' . $hostentry); + continue; + } + $prefix = ''; + $secure = $this->SMTPSecure; + $tls = ('tls' == $this->SMTPSecure); + if ('ssl' == $hostinfo[2] or ('' == $hostinfo[2] and 'ssl' == $this->SMTPSecure)) { + $prefix = 'ssl://'; + $tls = false; // Can't have SSL and TLS at the same time + $secure = 'ssl'; + } elseif ('tls' == $hostinfo[2]) { + $tls = true; + // tls doesn't use a prefix + $secure = 'tls'; + } + //Do we need the OpenSSL extension? + $sslext = defined('OPENSSL_ALGO_SHA256'); + if ('tls' === $secure or 'ssl' === $secure) { + //Check for an OpenSSL constant rather than using extension_loaded, which is sometimes disabled + if (!$sslext) { + throw new Exception($this->lang('extension_missing') . 'openssl', self::STOP_CRITICAL); + } + } + $host = $hostinfo[3]; + $port = $this->Port; + $tport = (int) $hostinfo[4]; + if ($tport > 0 and $tport < 65536) { + $port = $tport; + } + if ($this->smtp->connect($prefix . $host, $port, $this->Timeout, $options)) { + try { + if ($this->Helo) { + $hello = $this->Helo; + } else { + $hello = $this->serverHostname(); + } + $this->smtp->hello($hello); + //Automatically enable TLS encryption if: + // * it's not disabled + // * we have openssl extension + // * we are not already using SSL + // * the server offers STARTTLS + if ($this->SMTPAutoTLS and $sslext and 'ssl' != $secure and $this->smtp->getServerExt('STARTTLS')) { + $tls = true; + } + if ($tls) { + if (!$this->smtp->startTLS()) { + throw new Exception($this->lang('connect_host')); + } + // We must resend EHLO after TLS negotiation + $this->smtp->hello($hello); + } + if ($this->SMTPAuth) { + if (!$this->smtp->authenticate( + $this->Username, + $this->Password, + $this->AuthType, + $this->oauth + ) + ) { + throw new Exception($this->lang('authenticate')); + } + } + + return true; + } catch (Exception $exc) { + $lastexception = $exc; + $this->edebug($exc->getMessage()); + // We must have connected, but then failed TLS or Auth, so close connection nicely + $this->smtp->quit(); + } + } + } + // If we get here, all connection attempts have failed, so close connection hard + $this->smtp->close(); + // As we've caught all exceptions, just report whatever the last one was + if ($this->exceptions and null !== $lastexception) { + throw $lastexception; + } + + return false; + } + + /** + * Close the active SMTP session if one exists. + */ + public function smtpClose() + { + if (null !== $this->smtp) { + if ($this->smtp->connected()) { + $this->smtp->quit(); + $this->smtp->close(); + } + } + } + + /** + * Set the language for error messages. + * Returns false if it cannot load the language file. + * The default language is English. + * + * @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr") + * @param string $lang_path Path to the language file directory, with trailing separator (slash) + * + * @return bool + */ + public function setLanguage($langcode = 'en', $lang_path = '') + { + // Backwards compatibility for renamed language codes + $renamed_langcodes = [ + 'br' => 'pt_br', + 'cz' => 'cs', + 'dk' => 'da', + 'no' => 'nb', + 'se' => 'sv', + 'rs' => 'sr', + 'tg' => 'tl', + ]; + + if (isset($renamed_langcodes[$langcode])) { + $langcode = $renamed_langcodes[$langcode]; + } + + // Define full set of translatable strings in English + $PHPMAILER_LANG = [ + 'authenticate' => 'SMTP Error: Could not authenticate.', + 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', + 'data_not_accepted' => 'SMTP Error: data not accepted.', + 'empty_message' => 'Message body empty', + 'encoding' => 'Unknown encoding: ', + 'execute' => 'Could not execute: ', + 'file_access' => 'Could not access file: ', + 'file_open' => 'File Error: Could not open file: ', + 'from_failed' => 'The following From address failed: ', + 'instantiate' => 'Could not instantiate mail function.', + 'invalid_address' => 'Invalid address: ', + 'mailer_not_supported' => ' mailer is not supported.', + 'provide_address' => 'You must provide at least one recipient email address.', + 'recipients_failed' => 'SMTP Error: The following recipients failed: ', + 'signing' => 'Signing Error: ', + 'smtp_connect_failed' => 'SMTP connect() failed.', + 'smtp_error' => 'SMTP server error: ', + 'variable_set' => 'Cannot set or reset variable: ', + 'extension_missing' => 'Extension missing: ', + ]; + if (empty($lang_path)) { + // Calculate an absolute path so it can work if CWD is not here + $lang_path = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'language' . DIRECTORY_SEPARATOR; + } + //Validate $langcode + if (!preg_match('/^[a-z]{2}(?:_[a-zA-Z]{2})?$/', $langcode)) { + $langcode = 'en'; + } + $foundlang = true; + $lang_file = $lang_path . 'phpmailer.lang-' . $langcode . '.php'; + // There is no English translation file + if ('en' != $langcode) { + // Make sure language file path is readable + if (!static::isPermittedPath($lang_file) || !file_exists($lang_file)) { + $foundlang = false; + } else { + // Overwrite language-specific strings. + // This way we'll never have missing translation keys. + $foundlang = include $lang_file; + } + } + $this->language = $PHPMAILER_LANG; + + return (bool) $foundlang; // Returns false if language not found + } + + /** + * Get the array of strings for the current language. + * + * @return array + */ + public function getTranslations() + { + return $this->language; + } + + /** + * Create recipient headers. + * + * @param string $type + * @param array $addr An array of recipients, + * where each recipient is a 2-element indexed array with element 0 containing an address + * and element 1 containing a name, like: + * [['joe@example.com', 'Joe User'], ['zoe@example.com', 'Zoe User']] + * + * @return string + */ + public function addrAppend($type, $addr) + { + $addresses = []; + foreach ($addr as $address) { + $addresses[] = $this->addrFormat($address); + } + + return $type . ': ' . implode(', ', $addresses) . static::$LE; + } + + /** + * Format an address for use in a message header. + * + * @param array $addr A 2-element indexed array, element 0 containing an address, element 1 containing a name like + * ['joe@example.com', 'Joe User'] + * + * @return string + */ + public function addrFormat($addr) + { + if (empty($addr[1])) { // No name provided + return $this->secureHeader($addr[0]); + } + + return $this->encodeHeader($this->secureHeader($addr[1]), 'phrase') . ' <' . $this->secureHeader( + $addr[0] + ) . '>'; + } + + /** + * Word-wrap message. + * For use with mailers that do not automatically perform wrapping + * and for quoted-printable encoded messages. + * Original written by philippe. + * + * @param string $message The message to wrap + * @param int $length The line length to wrap to + * @param bool $qp_mode Whether to run in Quoted-Printable mode + * + * @return string + */ + public function wrapText($message, $length, $qp_mode = false) + { + if ($qp_mode) { + $soft_break = sprintf(' =%s', static::$LE); + } else { + $soft_break = static::$LE; + } + // If utf-8 encoding is used, we will need to make sure we don't + // split multibyte characters when we wrap + $is_utf8 = static::CHARSET_UTF8 === strtolower($this->CharSet); + $lelen = strlen(static::$LE); + $crlflen = strlen(static::$LE); + + $message = static::normalizeBreaks($message); + //Remove a trailing line break + if (substr($message, -$lelen) == static::$LE) { + $message = substr($message, 0, -$lelen); + } + + //Split message into lines + $lines = explode(static::$LE, $message); + //Message will be rebuilt in here + $message = ''; + foreach ($lines as $line) { + $words = explode(' ', $line); + $buf = ''; + $firstword = true; + foreach ($words as $word) { + if ($qp_mode and (strlen($word) > $length)) { + $space_left = $length - strlen($buf) - $crlflen; + if (!$firstword) { + if ($space_left > 20) { + $len = $space_left; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif ('=' == substr($word, $len - 1, 1)) { + --$len; + } elseif ('=' == substr($word, $len - 2, 1)) { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= ' ' . $part; + $message .= $buf . sprintf('=%s', static::$LE); + } else { + $message .= $buf . $soft_break; + } + $buf = ''; + } + while (strlen($word) > 0) { + if ($length <= 0) { + break; + } + $len = $length; + if ($is_utf8) { + $len = $this->utf8CharBoundary($word, $len); + } elseif ('=' == substr($word, $len - 1, 1)) { + --$len; + } elseif ('=' == substr($word, $len - 2, 1)) { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if (strlen($word) > 0) { + $message .= $part . sprintf('=%s', static::$LE); + } else { + $buf = $part; + } + } + } else { + $buf_o = $buf; + if (!$firstword) { + $buf .= ' '; + } + $buf .= $word; + + if (strlen($buf) > $length and '' != $buf_o) { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + $firstword = false; + } + $message .= $buf . static::$LE; + } + + return $message; + } + + /** + * Find the last character boundary prior to $maxLength in a utf-8 + * quoted-printable encoded string. + * Original written by Colin Brown. + * + * @param string $encodedText utf-8 QP text + * @param int $maxLength Find the last character boundary prior to this length + * + * @return int + */ + public function utf8CharBoundary($encodedText, $maxLength) + { + $foundSplitPos = false; + $lookBack = 3; + while (!$foundSplitPos) { + $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); + $encodedCharPos = strpos($lastChunk, '='); + if (false !== $encodedCharPos) { + // Found start of encoded character byte within $lookBack block. + // Check the encoded byte value (the 2 chars after the '=') + $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); + $dec = hexdec($hex); + if ($dec < 128) { + // Single byte character. + // If the encoded char was found at pos 0, it will fit + // otherwise reduce maxLength to start of the encoded char + if ($encodedCharPos > 0) { + $maxLength -= $lookBack - $encodedCharPos; + } + $foundSplitPos = true; + } elseif ($dec >= 192) { + // First byte of a multi byte character + // Reduce maxLength to split at start of character + $maxLength -= $lookBack - $encodedCharPos; + $foundSplitPos = true; + } elseif ($dec < 192) { + // Middle byte of a multi byte character, look further back + $lookBack += 3; + } + } else { + // No encoded character found + $foundSplitPos = true; + } + } + + return $maxLength; + } + + /** + * Apply word wrapping to the message body. + * Wraps the message body to the number of chars set in the WordWrap property. + * You should only do this to plain-text bodies as wrapping HTML tags may break them. + * This is called automatically by createBody(), so you don't need to call it yourself. + */ + public function setWordWrap() + { + if ($this->WordWrap < 1) { + return; + } + + switch ($this->message_type) { + case 'alt': + case 'alt_inline': + case 'alt_attach': + case 'alt_inline_attach': + $this->AltBody = $this->wrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->wrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assemble message headers. + * + * @return string The assembled headers + */ + public function createHeader() + { + $result = ''; + + $result .= $this->headerLine('Date', '' == $this->MessageDate ? self::rfcDate() : $this->MessageDate); + + // To be created automatically by mail() + if ($this->SingleTo) { + if ('mail' != $this->Mailer) { + foreach ($this->to as $toaddr) { + $this->SingleToArray[] = $this->addrFormat($toaddr); + } + } + } else { + if (count($this->to) > 0) { + if ('mail' != $this->Mailer) { + $result .= $this->addrAppend('To', $this->to); + } + } elseif (count($this->cc) == 0) { + $result .= $this->headerLine('To', 'undisclosed-recipients:;'); + } + } + + $result .= $this->addrAppend('From', [[trim($this->From), $this->FromName]]); + + // sendmail and mail() extract Cc from the header before sending + if (count($this->cc) > 0) { + $result .= $this->addrAppend('Cc', $this->cc); + } + + // sendmail and mail() extract Bcc from the header before sending + if (( + 'sendmail' == $this->Mailer or 'qmail' == $this->Mailer or 'mail' == $this->Mailer + ) + and count($this->bcc) > 0 + ) { + $result .= $this->addrAppend('Bcc', $this->bcc); + } + + if (count($this->ReplyTo) > 0) { + $result .= $this->addrAppend('Reply-To', $this->ReplyTo); + } + + // mail() sets the subject itself + if ('mail' != $this->Mailer) { + $result .= $this->headerLine('Subject', $this->encodeHeader($this->secureHeader($this->Subject))); + } + + // Only allow a custom message ID if it conforms to RFC 5322 section 3.6.4 + // https://tools.ietf.org/html/rfc5322#section-3.6.4 + if ('' != $this->MessageID and preg_match('/^<.*@.*>$/', $this->MessageID)) { + $this->lastMessageID = $this->MessageID; + } else { + $this->lastMessageID = sprintf('<%s@%s>', $this->uniqueid, $this->serverHostname()); + } + $result .= $this->headerLine('Message-ID', $this->lastMessageID); + if (null !== $this->Priority) { + $result .= $this->headerLine('X-Priority', $this->Priority); + } + if ('' == $this->XMailer) { + $result .= $this->headerLine( + 'X-Mailer', + 'PHPMailer ' . self::VERSION . ' (https://github.com/PHPMailer/PHPMailer)' + ); + } else { + $myXmailer = trim($this->XMailer); + if ($myXmailer) { + $result .= $this->headerLine('X-Mailer', $myXmailer); + } + } + + if ('' != $this->ConfirmReadingTo) { + $result .= $this->headerLine('Disposition-Notification-To', '<' . $this->ConfirmReadingTo . '>'); + } + + // Add custom headers + foreach ($this->CustomHeader as $header) { + $result .= $this->headerLine( + trim($header[0]), + $this->encodeHeader(trim($header[1])) + ); + } + if (!$this->sign_key_file) { + $result .= $this->headerLine('MIME-Version', '1.0'); + $result .= $this->getMailMIME(); + } + + return $result; + } + + /** + * Get the message MIME type headers. + * + * @return string + */ + public function getMailMIME() + { + $result = ''; + $ismultipart = true; + switch ($this->message_type) { + case 'inline': + $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'attach': + case 'inline_attach': + case 'alt_attach': + case 'alt_inline_attach': + $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_MIXED . ';'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'alt': + case 'alt_inline': + $result .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); + $result .= $this->textLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + default: + // Catches case 'plain': and case '': + $result .= $this->textLine('Content-Type: ' . $this->ContentType . '; charset=' . $this->CharSet); + $ismultipart = false; + break; + } + // RFC1341 part 5 says 7bit is assumed if not specified + if (static::ENCODING_7BIT != $this->Encoding) { + // RFC 2045 section 6.4 says multipart MIME parts may only use 7bit, 8bit or binary CTE + if ($ismultipart) { + if (static::ENCODING_8BIT == $this->Encoding) { + $result .= $this->headerLine('Content-Transfer-Encoding', static::ENCODING_8BIT); + } + // The only remaining alternatives are quoted-printable and base64, which are both 7bit compatible + } else { + $result .= $this->headerLine('Content-Transfer-Encoding', $this->Encoding); + } + } + + if ('mail' != $this->Mailer) { + $result .= static::$LE; + } + + return $result; + } + + /** + * Returns the whole MIME message. + * Includes complete headers and body. + * Only valid post preSend(). + * + * @see PHPMailer::preSend() + * + * @return string + */ + public function getSentMIMEMessage() + { + return rtrim($this->MIMEHeader . $this->mailHeader, "\n\r") . static::$LE . static::$LE . $this->MIMEBody; + } + + /** + * Create a unique ID to use for boundaries. + * + * @return string + */ + protected function generateId() + { + $len = 32; //32 bytes = 256 bits + if (function_exists('random_bytes')) { + $bytes = random_bytes($len); + } elseif (function_exists('openssl_random_pseudo_bytes')) { + $bytes = openssl_random_pseudo_bytes($len); + } else { + //Use a hash to force the length to the same as the other methods + $bytes = hash('sha256', uniqid((string) mt_rand(), true), true); + } + + //We don't care about messing up base64 format here, just want a random string + return str_replace(['=', '+', '/'], '', base64_encode(hash('sha256', $bytes, true))); + } + + /** + * Assemble the message body. + * Returns an empty string on failure. + * + * @throws Exception + * + * @return string The assembled message body + */ + public function createBody() + { + $body = ''; + //Create unique IDs and preset boundaries + $this->uniqueid = $this->generateId(); + $this->boundary[1] = 'b1_' . $this->uniqueid; + $this->boundary[2] = 'b2_' . $this->uniqueid; + $this->boundary[3] = 'b3_' . $this->uniqueid; + + if ($this->sign_key_file) { + $body .= $this->getMailMIME() . static::$LE; + } + + $this->setWordWrap(); + + $bodyEncoding = $this->Encoding; + $bodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if (static::ENCODING_8BIT == $bodyEncoding and !$this->has8bitChars($this->Body)) { + $bodyEncoding = static::ENCODING_7BIT; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $bodyCharSet = 'us-ascii'; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the body part only + if (static::ENCODING_BASE64 != $this->Encoding and static::hasLineLongerThanMax($this->Body)) { + $bodyEncoding = static::ENCODING_QUOTED_PRINTABLE; + } + + $altBodyEncoding = $this->Encoding; + $altBodyCharSet = $this->CharSet; + //Can we do a 7-bit downgrade? + if (static::ENCODING_8BIT == $altBodyEncoding and !$this->has8bitChars($this->AltBody)) { + $altBodyEncoding = static::ENCODING_7BIT; + //All ISO 8859, Windows codepage and UTF-8 charsets are ascii compatible up to 7-bit + $altBodyCharSet = 'us-ascii'; + } + //If lines are too long, and we're not already using an encoding that will shorten them, + //change to quoted-printable transfer encoding for the alt body part only + if (static::ENCODING_BASE64 != $altBodyEncoding and static::hasLineLongerThanMax($this->AltBody)) { + $altBodyEncoding = static::ENCODING_QUOTED_PRINTABLE; + } + //Use this as a preamble in all multipart message types + $mimepre = 'This is a multi-part message in MIME format.' . static::$LE; + switch ($this->message_type) { + case 'inline': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[1]); + break; + case 'attach': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, '', $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, static::CONTENT_TYPE_PLAINTEXT, $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[1], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + if (!empty($this->Ical)) { + $body .= $this->getBoundary($this->boundary[1], '', static::CONTENT_TYPE_TEXT_CALENDAR . '; method=REQUEST', ''); + $body .= $this->encodeString($this->Ical, $this->Encoding); + $body .= static::$LE; + } + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_inline': + $body .= $mimepre; + $body .= $this->getBoundary($this->boundary[1], $altBodyCharSet, static::CONTENT_TYPE_PLAINTEXT, $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[2]); + $body .= static::$LE; + $body .= $this->endBoundary($this->boundary[1]); + break; + case 'alt_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, static::CONTENT_TYPE_PLAINTEXT, $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + if (!empty($this->Ical)) { + $body .= $this->getBoundary($this->boundary[2], '', static::CONTENT_TYPE_TEXT_CALENDAR . '; method=REQUEST', ''); + $body .= $this->encodeString($this->Ical, $this->Encoding); + } + $body .= $this->endBoundary($this->boundary[2]); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + case 'alt_inline_attach': + $body .= $mimepre; + $body .= $this->textLine('--' . $this->boundary[1]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_ALTERNATIVE . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[2], $altBodyCharSet, static::CONTENT_TYPE_PLAINTEXT, $altBodyEncoding); + $body .= $this->encodeString($this->AltBody, $altBodyEncoding); + $body .= static::$LE; + $body .= $this->textLine('--' . $this->boundary[2]); + $body .= $this->headerLine('Content-Type', static::CONTENT_TYPE_MULTIPART_RELATED . ';'); + $body .= $this->textLine("\tboundary=\"" . $this->boundary[3] . '"'); + $body .= static::$LE; + $body .= $this->getBoundary($this->boundary[3], $bodyCharSet, static::CONTENT_TYPE_TEXT_HTML, $bodyEncoding); + $body .= $this->encodeString($this->Body, $bodyEncoding); + $body .= static::$LE; + $body .= $this->attachAll('inline', $this->boundary[3]); + $body .= static::$LE; + $body .= $this->endBoundary($this->boundary[2]); + $body .= static::$LE; + $body .= $this->attachAll('attachment', $this->boundary[1]); + break; + default: + // Catch case 'plain' and case '', applies to simple `text/plain` and `text/html` body content types + //Reset the `Encoding` property in case we changed it for line length reasons + $this->Encoding = $bodyEncoding; + $body .= $this->encodeString($this->Body, $this->Encoding); + break; + } + + if ($this->isError()) { + $body = ''; + if ($this->exceptions) { + throw new Exception($this->lang('empty_message'), self::STOP_CRITICAL); + } + } elseif ($this->sign_key_file) { + try { + if (!defined('PKCS7_TEXT')) { + throw new Exception($this->lang('extension_missing') . 'openssl'); + } + // @TODO would be nice to use php://temp streams here + $file = tempnam(sys_get_temp_dir(), 'mail'); + if (false === file_put_contents($file, $body)) { + throw new Exception($this->lang('signing') . ' Could not write temp file'); + } + $signed = tempnam(sys_get_temp_dir(), 'signed'); + //Workaround for PHP bug https://bugs.php.net/bug.php?id=69197 + if (empty($this->sign_extracerts_file)) { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + ['file://' . realpath($this->sign_key_file), $this->sign_key_pass], + [] + ); + } else { + $sign = @openssl_pkcs7_sign( + $file, + $signed, + 'file://' . realpath($this->sign_cert_file), + ['file://' . realpath($this->sign_key_file), $this->sign_key_pass], + [], + PKCS7_DETACHED, + $this->sign_extracerts_file + ); + } + @unlink($file); + if ($sign) { + $body = file_get_contents($signed); + @unlink($signed); + //The message returned by openssl contains both headers and body, so need to split them up + $parts = explode("\n\n", $body, 2); + $this->MIMEHeader .= $parts[0] . static::$LE . static::$LE; + $body = $parts[1]; + } else { + @unlink($signed); + throw new Exception($this->lang('signing') . openssl_error_string()); + } + } catch (Exception $exc) { + $body = ''; + if ($this->exceptions) { + throw $exc; + } + } + } + + return $body; + } + + /** + * Return the start of a message boundary. + * + * @param string $boundary + * @param string $charSet + * @param string $contentType + * @param string $encoding + * + * @return string + */ + protected function getBoundary($boundary, $charSet, $contentType, $encoding) + { + $result = ''; + if ('' == $charSet) { + $charSet = $this->CharSet; + } + if ('' == $contentType) { + $contentType = $this->ContentType; + } + if ('' == $encoding) { + $encoding = $this->Encoding; + } + $result .= $this->textLine('--' . $boundary); + $result .= sprintf('Content-Type: %s; charset=%s', $contentType, $charSet); + $result .= static::$LE; + // RFC1341 part 5 says 7bit is assumed if not specified + if (static::ENCODING_7BIT != $encoding) { + $result .= $this->headerLine('Content-Transfer-Encoding', $encoding); + } + $result .= static::$LE; + + return $result; + } + + /** + * Return the end of a message boundary. + * + * @param string $boundary + * + * @return string + */ + protected function endBoundary($boundary) + { + return static::$LE . '--' . $boundary . '--' . static::$LE; + } + + /** + * Set the message type. + * PHPMailer only supports some preset message types, not arbitrary MIME structures. + */ + protected function setMessageType() + { + $type = []; + if ($this->alternativeExists()) { + $type[] = 'alt'; + } + if ($this->inlineImageExists()) { + $type[] = 'inline'; + } + if ($this->attachmentExists()) { + $type[] = 'attach'; + } + $this->message_type = implode('_', $type); + if ('' == $this->message_type) { + //The 'plain' message_type refers to the message having a single body element, not that it is plain-text + $this->message_type = 'plain'; + } + } + + /** + * Format a header line. + * + * @param string $name + * @param string|int $value + * + * @return string + */ + public function headerLine($name, $value) + { + return $name . ': ' . $value . static::$LE; + } + + /** + * Return a formatted mail line. + * + * @param string $value + * + * @return string + */ + public function textLine($value) + { + return $value . static::$LE; + } + + /** + * Add an attachment from a path on the filesystem. + * Never use a user-supplied path to a file! + * Returns false if the file could not be found or read. + * Explicitly *does not* support passing URLs; PHPMailer is not an HTTP client. + * If you need to do that, fetch the resource yourself and pass it in via a local file or string. + * + * @param string $path Path to the attachment + * @param string $name Overrides the attachment name + * @param string $encoding File encoding (see $Encoding) + * @param string $type File extension (MIME) type + * @param string $disposition Disposition to use + * + * @throws Exception + * + * @return bool + */ + public function addAttachment($path, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'attachment') + { + try { + if (!static::isPermittedPath($path) || !@is_file($path)) { + throw new Exception($this->lang('file_access') . $path, self::STOP_CONTINUE); + } + + // If a MIME type is not specified, try to work it out from the file name + if ('' == $type) { + $type = static::filenameToType($path); + } + + $filename = basename($path); + if ('' == $name) { + $name = $filename; + } + + $this->attachment[] = [ + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => $name, + ]; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + $this->edebug($exc->getMessage()); + if ($this->exceptions) { + throw $exc; + } + + return false; + } + + return true; + } + + /** + * Return the array of attachments. + * + * @return array + */ + public function getAttachments() + { + return $this->attachment; + } + + /** + * Attach all file, string, and binary attachments to the message. + * Returns an empty string on failure. + * + * @param string $disposition_type + * @param string $boundary + * + * @return string + */ + protected function attachAll($disposition_type, $boundary) + { + // Return text of body + $mime = []; + $cidUniq = []; + $incl = []; + + // Add all attachments + foreach ($this->attachment as $attachment) { + // Check if it is a valid disposition_filter + if ($attachment[6] == $disposition_type) { + // Check for string attachment + $string = ''; + $path = ''; + $bString = $attachment[5]; + if ($bString) { + $string = $attachment[0]; + } else { + $path = $attachment[0]; + } + + $inclhash = hash('sha256', serialize($attachment)); + if (in_array($inclhash, $incl)) { + continue; + } + $incl[] = $inclhash; + $name = $attachment[2]; + $encoding = $attachment[3]; + $type = $attachment[4]; + $disposition = $attachment[6]; + $cid = $attachment[7]; + if ('inline' == $disposition and array_key_exists($cid, $cidUniq)) { + continue; + } + $cidUniq[$cid] = true; + + $mime[] = sprintf('--%s%s', $boundary, static::$LE); + //Only include a filename property if we have one + if (!empty($name)) { + $mime[] = sprintf( + 'Content-Type: %s; name="%s"%s', + $type, + $this->encodeHeader($this->secureHeader($name)), + static::$LE + ); + } else { + $mime[] = sprintf( + 'Content-Type: %s%s', + $type, + static::$LE + ); + } + // RFC1341 part 5 says 7bit is assumed if not specified + if (static::ENCODING_7BIT != $encoding) { + $mime[] = sprintf('Content-Transfer-Encoding: %s%s', $encoding, static::$LE); + } + + if (!empty($cid)) { + $mime[] = sprintf('Content-ID: <%s>%s', $cid, static::$LE); + } + + // If a filename contains any of these chars, it should be quoted, + // but not otherwise: RFC2183 & RFC2045 5.1 + // Fixes a warning in IETF's msglint MIME checker + // Allow for bypassing the Content-Disposition header totally + if (!(empty($disposition))) { + $encoded_name = $this->encodeHeader($this->secureHeader($name)); + if (preg_match('/[ \(\)<>@,;:\\"\/\[\]\?=]/', $encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename="%s"%s', + $disposition, + $encoded_name, + static::$LE . static::$LE + ); + } else { + if (!empty($encoded_name)) { + $mime[] = sprintf( + 'Content-Disposition: %s; filename=%s%s', + $disposition, + $encoded_name, + static::$LE . static::$LE + ); + } else { + $mime[] = sprintf( + 'Content-Disposition: %s%s', + $disposition, + static::$LE . static::$LE + ); + } + } + } else { + $mime[] = static::$LE; + } + + // Encode as string attachment + if ($bString) { + $mime[] = $this->encodeString($string, $encoding); + } else { + $mime[] = $this->encodeFile($path, $encoding); + } + if ($this->isError()) { + return ''; + } + $mime[] = static::$LE; + } + } + + $mime[] = sprintf('--%s--%s', $boundary, static::$LE); + + return implode('', $mime); + } + + /** + * Encode a file attachment in requested format. + * Returns an empty string on failure. + * + * @param string $path The full path to the file + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * + * @throws Exception + * + * @return string + */ + protected function encodeFile($path, $encoding = self::ENCODING_BASE64) + { + try { + if (!static::isPermittedPath($path) || !file_exists($path)) { + throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE); + } + $file_buffer = file_get_contents($path); + if (false === $file_buffer) { + throw new Exception($this->lang('file_open') . $path, self::STOP_CONTINUE); + } + $file_buffer = $this->encodeString($file_buffer, $encoding); + + return $file_buffer; + } catch (Exception $exc) { + $this->setError($exc->getMessage()); + + return ''; + } + } + + /** + * Encode a string in requested format. + * Returns an empty string on failure. + * + * @param string $str The text to encode + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * + * @return string + */ + public function encodeString($str, $encoding = self::ENCODING_BASE64) + { + $encoded = ''; + switch (strtolower($encoding)) { + case static::ENCODING_BASE64: + $encoded = chunk_split( + base64_encode($str), + static::STD_LINE_LENGTH, + static::$LE + ); + break; + case static::ENCODING_7BIT: + case static::ENCODING_8BIT: + $encoded = static::normalizeBreaks($str); + // Make sure it ends with a line break + if (substr($encoded, -(strlen(static::$LE))) != static::$LE) { + $encoded .= static::$LE; + } + break; + case static::ENCODING_BINARY: + $encoded = $str; + break; + case static::ENCODING_QUOTED_PRINTABLE: + $encoded = $this->encodeQP($str); + break; + default: + $this->setError($this->lang('encoding') . $encoding); + break; + } + + return $encoded; + } + + /** + * Encode a header value (not including its label) optimally. + * Picks shortest of Q, B, or none. Result includes folding if needed. + * See RFC822 definitions for phrase, comment and text positions. + * + * @param string $str The header value to encode + * @param string $position What context the string will be used in + * + * @return string + */ + public function encodeHeader($str, $position = 'text') + { + $matchcount = 0; + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know the value of magic_quotes_sybase + $encoded = addcslashes($str, "\0..\37\177\\\""); + if (($str == $encoded) and !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return $encoded; + } + + return "\"$encoded\""; + } + $matchcount = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + /* @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $matchcount = preg_match_all('/[()"]/', $str, $matches); + //fallthrough + case 'text': + default: + $matchcount += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + //RFCs specify a maximum line length of 78 chars, however mail() will sometimes + //corrupt messages with headers longer than 65 chars. See #818 + $lengthsub = 'mail' == $this->Mailer ? 13 : 0; + $maxlen = static::STD_LINE_LENGTH - $lengthsub; + // Try to select the encoding which should produce the shortest output + if ($matchcount > strlen($str) / 3) { + // More than a third of the content will need encoding, so B encoding will be most efficient + $encoding = 'B'; + //This calculation is: + // max line length + // - shorten to avoid mail() corruption + // - Q/B encoding char overhead ("` =??[QB]??=`") + // - charset name length + $maxlen = static::STD_LINE_LENGTH - $lengthsub - 8 - strlen($this->CharSet); + if ($this->hasMultiBytes($str)) { + // Use a custom function which correctly encodes and wraps long + // multibyte strings without breaking lines within a character + $encoded = $this->base64EncodeWrapMB($str, "\n"); + } else { + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } + $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); + } elseif ($matchcount > 0) { + //1 or more chars need encoding, use Q-encode + $encoding = 'Q'; + //Recalc max line length for Q encoding - see comments on B encode + $maxlen = static::STD_LINE_LENGTH - $lengthsub - 8 - strlen($this->CharSet); + $encoded = $this->encodeQ($str, $position); + $encoded = $this->wrapText($encoded, $maxlen, true); + $encoded = str_replace('=' . static::$LE, "\n", trim($encoded)); + $encoded = preg_replace('/^(.*)$/m', ' =?' . $this->CharSet . "?$encoding?\\1?=", $encoded); + } elseif (strlen($str) > $maxlen) { + //No chars need encoding, but line is too long, so fold it + $encoded = trim($this->wrapText($str, $maxlen, false)); + if ($str == $encoded) { + //Wrapping nicely didn't work, wrap hard instead + $encoded = trim(chunk_split($str, static::STD_LINE_LENGTH, static::$LE)); + } + $encoded = str_replace(static::$LE, "\n", trim($encoded)); + $encoded = preg_replace('/^(.*)$/m', ' \\1', $encoded); + } else { + //No reformatting needed + return $str; + } + + return trim(static::normalizeBreaks($encoded)); + } + + /** + * Check if a string contains multi-byte characters. + * + * @param string $str multi-byte text to wrap encode + * + * @return bool + */ + public function hasMultiBytes($str) + { + if (function_exists('mb_strlen')) { + return strlen($str) > mb_strlen($str, $this->CharSet); + } + + // Assume no multibytes (we can't handle without mbstring functions anyway) + return false; + } + + /** + * Does a string contain any 8-bit chars (in any charset)? + * + * @param string $text + * + * @return bool + */ + public function has8bitChars($text) + { + return (bool) preg_match('/[\x80-\xFF]/', $text); + } + + /** + * Encode and wrap long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid. + * + * @see http://www.php.net/manual/en/function.mb-encode-mimeheader.php#60283 + * + * @param string $str multi-byte text to wrap encode + * @param string $linebreak string to use as linefeed/end-of-line + * + * @return string + */ + public function base64EncodeWrapMB($str, $linebreak = null) + { + $start = '=?' . $this->CharSet . '?B?'; + $end = '?='; + $encoded = ''; + if (null === $linebreak) { + $linebreak = static::$LE; + } + + $mb_length = mb_strlen($str, $this->CharSet); + // Each line must have length <= 75, including $start and $end + $length = 75 - strlen($start) - strlen($end); + // Average multi-byte ratio + $ratio = $mb_length / strlen($str); + // Base64 has a 4:3 ratio + $avgLength = floor($length * $ratio * .75); + + for ($i = 0; $i < $mb_length; $i += $offset) { + $lookBack = 0; + do { + $offset = $avgLength - $lookBack; + $chunk = mb_substr($str, $i, $offset, $this->CharSet); + $chunk = base64_encode($chunk); + ++$lookBack; + } while (strlen($chunk) > $length); + $encoded .= $chunk . $linebreak; + } + + // Chomp the last linefeed + return substr($encoded, 0, -strlen($linebreak)); + } + + /** + * Encode a string in quoted-printable format. + * According to RFC2045 section 6.7. + * + * @param string $string The text to encode + * + * @return string + */ + public function encodeQP($string) + { + return static::normalizeBreaks(quoted_printable_encode($string)); + } + + /** + * Encode a string using Q encoding. + * + * @see http://tools.ietf.org/html/rfc2047#section-4.2 + * + * @param string $str the text to encode + * @param string $position Where the text is going to be used, see the RFC for what that means + * + * @return string + */ + public function encodeQ($str, $position = 'text') + { + // There should not be any EOL in the string + $pattern = ''; + $encoded = str_replace(["\r", "\n"], '', $str); + switch (strtolower($position)) { + case 'phrase': + // RFC 2047 section 5.3 + $pattern = '^A-Za-z0-9!*+\/ -'; + break; + /* + * RFC 2047 section 5.2. + * Build $pattern without including delimiters and [] + */ + /* @noinspection PhpMissingBreakStatementInspection */ + case 'comment': + $pattern = '\(\)"'; + /* Intentional fall through */ + case 'text': + default: + // RFC 2047 section 5.1 + // Replace every high ascii, control, =, ? and _ characters + /** @noinspection SuspiciousAssignmentsInspection */ + $pattern = '\000-\011\013\014\016-\037\075\077\137\177-\377' . $pattern; + break; + } + $matches = []; + if (preg_match_all("/[{$pattern}]/", $encoded, $matches)) { + // If the string contains an '=', make sure it's the first thing we replace + // so as to avoid double-encoding + $eqkey = array_search('=', $matches[0]); + if (false !== $eqkey) { + unset($matches[0][$eqkey]); + array_unshift($matches[0], '='); + } + foreach (array_unique($matches[0]) as $char) { + $encoded = str_replace($char, '=' . sprintf('%02X', ord($char)), $encoded); + } + } + // Replace spaces with _ (more readable than =20) + // RFC 2047 section 4.2(2) + return str_replace(' ', '_', $encoded); + } + + /** + * Add a string or binary attachment (non-filesystem). + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * + * @param string $string String attachment data + * @param string $filename Name of the attachment + * @param string $encoding File encoding (see $Encoding) + * @param string $type File extension (MIME) type + * @param string $disposition Disposition to use + */ + public function addStringAttachment( + $string, + $filename, + $encoding = self::ENCODING_BASE64, + $type = '', + $disposition = 'attachment' + ) { + // If a MIME type is not specified, try to work it out from the file name + if ('' == $type) { + $type = static::filenameToType($filename); + } + // Append to $attachment array + $this->attachment[] = [ + 0 => $string, + 1 => $filename, + 2 => basename($filename), + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => 0, + ]; + } + + /** + * Add an embedded (inline) attachment from a file. + * This can include images, sounds, and just about any other document type. + * These differ from 'regular' attachments in that they are intended to be + * displayed inline with the message, not just attached for download. + * This is used in HTML messages that embed the images + * the HTML refers to using the $cid value. + * Never use a user-supplied path to a file! + * + * @param string $path Path to the attachment + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name Overrides the attachment name + * @param string $encoding File encoding (see $Encoding) + * @param string $type File MIME type + * @param string $disposition Disposition to use + * + * @return bool True on successfully adding an attachment + */ + public function addEmbeddedImage($path, $cid, $name = '', $encoding = self::ENCODING_BASE64, $type = '', $disposition = 'inline') + { + if (!static::isPermittedPath($path) || !@is_file($path)) { + $this->setError($this->lang('file_access') . $path); + + return false; + } + + // If a MIME type is not specified, try to work it out from the file name + if ('' == $type) { + $type = static::filenameToType($path); + } + + $filename = basename($path); + if ('' == $name) { + $name = $filename; + } + + // Append to $attachment array + $this->attachment[] = [ + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => $disposition, + 7 => $cid, + ]; + + return true; + } + + /** + * Add an embedded stringified attachment. + * This can include images, sounds, and just about any other document type. + * If your filename doesn't contain an extension, be sure to set the $type to an appropriate MIME type. + * + * @param string $string The attachment binary data + * @param string $cid Content ID of the attachment; Use this to reference + * the content when using an embedded image in HTML + * @param string $name A filename for the attachment. If this contains an extension, + * PHPMailer will attempt to set a MIME type for the attachment. + * For example 'file.jpg' would get an 'image/jpeg' MIME type. + * @param string $encoding File encoding (see $Encoding), defaults to 'base64' + * @param string $type MIME type - will be used in preference to any automatically derived type + * @param string $disposition Disposition to use + * + * @return bool True on successfully adding an attachment + */ + public function addStringEmbeddedImage( + $string, + $cid, + $name = '', + $encoding = self::ENCODING_BASE64, + $type = '', + $disposition = 'inline' + ) { + // If a MIME type is not specified, try to work it out from the name + if ('' == $type and !empty($name)) { + $type = static::filenameToType($name); + } + + // Append to $attachment array + $this->attachment[] = [ + 0 => $string, + 1 => $name, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => $disposition, + 7 => $cid, + ]; + + return true; + } + + /** + * Check if an embedded attachment is present with this cid. + * + * @param string $cid + * + * @return bool + */ + protected function cidExists($cid) + { + foreach ($this->attachment as $attachment) { + if ('inline' == $attachment[6] and $cid == $attachment[7]) { + return true; + } + } + + return false; + } + + /** + * Check if an inline attachment is present. + * + * @return bool + */ + public function inlineImageExists() + { + foreach ($this->attachment as $attachment) { + if ('inline' == $attachment[6]) { + return true; + } + } + + return false; + } + + /** + * Check if an attachment (non-inline) is present. + * + * @return bool + */ + public function attachmentExists() + { + foreach ($this->attachment as $attachment) { + if ('attachment' == $attachment[6]) { + return true; + } + } + + return false; + } + + /** + * Check if this message has an alternative body set. + * + * @return bool + */ + public function alternativeExists() + { + return !empty($this->AltBody); + } + + /** + * Clear queued addresses of given kind. + * + * @param string $kind 'to', 'cc', or 'bcc' + */ + public function clearQueuedAddresses($kind) + { + $this->RecipientsQueue = array_filter( + $this->RecipientsQueue, + function ($params) use ($kind) { + return $params[0] != $kind; + } + ); + } + + /** + * Clear all To recipients. + */ + public function clearAddresses() + { + foreach ($this->to as $to) { + unset($this->all_recipients[strtolower($to[0])]); + } + $this->to = []; + $this->clearQueuedAddresses('to'); + } + + /** + * Clear all CC recipients. + */ + public function clearCCs() + { + foreach ($this->cc as $cc) { + unset($this->all_recipients[strtolower($cc[0])]); + } + $this->cc = []; + $this->clearQueuedAddresses('cc'); + } + + /** + * Clear all BCC recipients. + */ + public function clearBCCs() + { + foreach ($this->bcc as $bcc) { + unset($this->all_recipients[strtolower($bcc[0])]); + } + $this->bcc = []; + $this->clearQueuedAddresses('bcc'); + } + + /** + * Clear all ReplyTo recipients. + */ + public function clearReplyTos() + { + $this->ReplyTo = []; + $this->ReplyToQueue = []; + } + + /** + * Clear all recipient types. + */ + public function clearAllRecipients() + { + $this->to = []; + $this->cc = []; + $this->bcc = []; + $this->all_recipients = []; + $this->RecipientsQueue = []; + } + + /** + * Clear all filesystem, string, and binary attachments. + */ + public function clearAttachments() + { + $this->attachment = []; + } + + /** + * Clear all custom headers. + */ + public function clearCustomHeaders() + { + $this->CustomHeader = []; + } + + /** + * Add an error message to the error container. + * + * @param string $msg + */ + protected function setError($msg) + { + ++$this->error_count; + if ('smtp' == $this->Mailer and null !== $this->smtp) { + $lasterror = $this->smtp->getError(); + if (!empty($lasterror['error'])) { + $msg .= $this->lang('smtp_error') . $lasterror['error']; + if (!empty($lasterror['detail'])) { + $msg .= ' Detail: ' . $lasterror['detail']; + } + if (!empty($lasterror['smtp_code'])) { + $msg .= ' SMTP code: ' . $lasterror['smtp_code']; + } + if (!empty($lasterror['smtp_code_ex'])) { + $msg .= ' Additional SMTP info: ' . $lasterror['smtp_code_ex']; + } + } + } + $this->ErrorInfo = $msg; + } + + /** + * Return an RFC 822 formatted date. + * + * @return string + */ + public static function rfcDate() + { + // Set the time zone to whatever the default is to avoid 500 errors + // Will default to UTC if it's not set properly in php.ini + date_default_timezone_set(@date_default_timezone_get()); + + return date('D, j M Y H:i:s O'); + } + + /** + * Get the server hostname. + * Returns 'localhost.localdomain' if unknown. + * + * @return string + */ + protected function serverHostname() + { + $result = ''; + if (!empty($this->Hostname)) { + $result = $this->Hostname; + } elseif (isset($_SERVER) and array_key_exists('SERVER_NAME', $_SERVER)) { + $result = $_SERVER['SERVER_NAME']; + } elseif (function_exists('gethostname') and gethostname() !== false) { + $result = gethostname(); + } elseif (php_uname('n') !== false) { + $result = php_uname('n'); + } + if (!static::isValidHost($result)) { + return 'localhost.localdomain'; + } + + return $result; + } + + /** + * Validate whether a string contains a valid value to use as a hostname or IP address. + * IPv6 addresses must include [], e.g. `[::1]`, not just `::1`. + * + * @param string $host The host name or IP address to check + * + * @return bool + */ + public static function isValidHost($host) + { + //Simple syntax limits + if (empty($host) + or !is_string($host) + or strlen($host) > 256 + ) { + return false; + } + //Looks like a bracketed IPv6 address + if (trim($host, '[]') != $host) { + return (bool) filter_var(trim($host, '[]'), FILTER_VALIDATE_IP, FILTER_FLAG_IPV6); + } + //If removing all the dots results in a numeric string, it must be an IPv4 address. + //Need to check this first because otherwise things like `999.0.0.0` are considered valid host names + if (is_numeric(str_replace('.', '', $host))) { + //Is it a valid IPv4 address? + return (bool) filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4); + } + if (filter_var('http://' . $host, FILTER_VALIDATE_URL)) { + //Is it a syntactically valid hostname? + return true; + } + + return false; + } + + /** + * Get an error message in the current language. + * + * @param string $key + * + * @return string + */ + protected function lang($key) + { + if (count($this->language) < 1) { + $this->setLanguage('en'); // set the default language + } + + if (array_key_exists($key, $this->language)) { + if ('smtp_connect_failed' == $key) { + //Include a link to troubleshooting docs on SMTP connection failure + //this is by far the biggest cause of support questions + //but it's usually not PHPMailer's fault. + return $this->language[$key] . ' https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting'; + } + + return $this->language[$key]; + } + + //Return the key as a fallback + return $key; + } + + /** + * Check if an error occurred. + * + * @return bool True if an error did occur + */ + public function isError() + { + return $this->error_count > 0; + } + + /** + * Add a custom header. + * $name value can be overloaded to contain + * both header name and value (name:value). + * + * @param string $name Custom header name + * @param string|null $value Header value + */ + public function addCustomHeader($name, $value = null) + { + if (null === $value) { + // Value passed in as name:value + $this->CustomHeader[] = explode(':', $name, 2); + } else { + $this->CustomHeader[] = [$name, $value]; + } + } + + /** + * Returns all custom headers. + * + * @return array + */ + public function getCustomHeaders() + { + return $this->CustomHeader; + } + + /** + * Create a message body from an HTML string. + * Automatically inlines images and creates a plain-text version by converting the HTML, + * overwriting any existing values in Body and AltBody. + * Do not source $message content from user input! + * $basedir is prepended when handling relative URLs, e.g. and must not be empty + * will look for an image file in $basedir/images/a.png and convert it to inline. + * If you don't provide a $basedir, relative paths will be left untouched (and thus probably break in email) + * Converts data-uri images into embedded attachments. + * If you don't want to apply these transformations to your HTML, just set Body and AltBody directly. + * + * @param string $message HTML message string + * @param string $basedir Absolute path to a base directory to prepend to relative paths to images + * @param bool|callable $advanced Whether to use the internal HTML to text converter + * or your own custom converter @see PHPMailer::html2text() + * + * @return string $message The transformed message Body + */ + public function msgHTML($message, $basedir = '', $advanced = false) + { + preg_match_all('/(src|background)=["\'](.*)["\']/Ui', $message, $images); + if (array_key_exists(2, $images)) { + if (strlen($basedir) > 1 && '/' != substr($basedir, -1)) { + // Ensure $basedir has a trailing / + $basedir .= '/'; + } + foreach ($images[2] as $imgindex => $url) { + // Convert data URIs into embedded images + //e.g. "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" + if (preg_match('#^data:(image/(?:jpe?g|gif|png));?(base64)?,(.+)#', $url, $match)) { + if (count($match) == 4 and static::ENCODING_BASE64 == $match[2]) { + $data = base64_decode($match[3]); + } elseif ('' == $match[2]) { + $data = rawurldecode($match[3]); + } else { + //Not recognised so leave it alone + continue; + } + //Hash the decoded data, not the URL so that the same data-URI image used in multiple places + //will only be embedded once, even if it used a different encoding + $cid = hash('sha256', $data) . '@phpmailer.0'; // RFC2392 S 2 + + if (!$this->cidExists($cid)) { + $this->addStringEmbeddedImage($data, $cid, 'embed' . $imgindex, static::ENCODING_BASE64, $match[1]); + } + $message = str_replace( + $images[0][$imgindex], + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + continue; + } + if (// Only process relative URLs if a basedir is provided (i.e. no absolute local paths) + !empty($basedir) + // Ignore URLs containing parent dir traversal (..) + and (strpos($url, '..') === false) + // Do not change urls that are already inline images + and 0 !== strpos($url, 'cid:') + // Do not change absolute URLs, including anonymous protocol + and !preg_match('#^[a-z][a-z0-9+.-]*:?//#i', $url) + ) { + $filename = basename($url); + $directory = dirname($url); + if ('.' == $directory) { + $directory = ''; + } + $cid = hash('sha256', $url) . '@phpmailer.0'; // RFC2392 S 2 + if (strlen($basedir) > 1 and '/' != substr($basedir, -1)) { + $basedir .= '/'; + } + if (strlen($directory) > 1 and '/' != substr($directory, -1)) { + $directory .= '/'; + } + if ($this->addEmbeddedImage( + $basedir . $directory . $filename, + $cid, + $filename, + static::ENCODING_BASE64, + static::_mime_types((string) static::mb_pathinfo($filename, PATHINFO_EXTENSION)) + ) + ) { + $message = preg_replace( + '/' . $images[1][$imgindex] . '=["\']' . preg_quote($url, '/') . '["\']/Ui', + $images[1][$imgindex] . '="cid:' . $cid . '"', + $message + ); + } + } + } + } + $this->isHTML(true); + // Convert all message body line breaks to LE, makes quoted-printable encoding work much better + $this->Body = static::normalizeBreaks($message); + $this->AltBody = static::normalizeBreaks($this->html2text($message, $advanced)); + if (!$this->alternativeExists()) { + $this->AltBody = 'This is an HTML-only message. To view it, activate HTML in your email application.' + . static::$LE; + } + + return $this->Body; + } + + /** + * Convert an HTML string into plain text. + * This is used by msgHTML(). + * Note - older versions of this function used a bundled advanced converter + * which was removed for license reasons in #232. + * Example usage: + * + * ```php + * // Use default conversion + * $plain = $mail->html2text($html); + * // Use your own custom converter + * $plain = $mail->html2text($html, function($html) { + * $converter = new MyHtml2text($html); + * return $converter->get_text(); + * }); + * ``` + * + * @param string $html The HTML text to convert + * @param bool|callable $advanced Any boolean value to use the internal converter, + * or provide your own callable for custom conversion + * + * @return string + */ + public function html2text($html, $advanced = false) + { + if (is_callable($advanced)) { + return call_user_func($advanced, $html); + } + + return html_entity_decode( + trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/si', '', $html))), + ENT_QUOTES, + $this->CharSet + ); + } + + /** + * Get the MIME type for a file extension. + * + * @param string $ext File extension + * + * @return string MIME type of file + */ + public static function _mime_types($ext = '') + { + $mimes = [ + 'xl' => 'application/excel', + 'js' => 'application/javascript', + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'bin' => 'application/macbinary', + 'doc' => 'application/msword', + 'word' => 'application/msword', + 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template', + 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template', + 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow', + 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'sldx' => 'application/vnd.openxmlformats-officedocument.presentationml.slide', + 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template', + 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12', + 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12', + 'class' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'dms' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'psd' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'so' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'php3' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'm4a' => 'audio/mp4', + 'mpga' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'wav' => 'audio/x-wav', + 'mka' => 'audio/x-matroska', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'jpeg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'webp' => 'image/webp', + 'heif' => 'image/heif', + 'heifs' => 'image/heif-sequence', + 'heic' => 'image/heic', + 'heics' => 'image/heic-sequence', + 'eml' => 'message/rfc822', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'log' => 'text/plain', + 'text' => 'text/plain', + 'txt' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'vcf' => 'text/vcard', + 'vcard' => 'text/vcard', + 'ics' => 'text/calendar', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'wmv' => 'video/x-ms-wmv', + 'mpeg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mp4' => 'video/mp4', + 'm4v' => 'video/mp4', + 'mov' => 'video/quicktime', + 'qt' => 'video/quicktime', + 'rv' => 'video/vnd.rn-realvideo', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'webm' => 'video/webm', + 'mkv' => 'video/x-matroska', + ]; + $ext = strtolower($ext); + if (array_key_exists($ext, $mimes)) { + return $mimes[$ext]; + } + + return 'application/octet-stream'; + } + + /** + * Map a file name to a MIME type. + * Defaults to 'application/octet-stream', i.e.. arbitrary binary data. + * + * @param string $filename A file name or full path, does not need to exist as a file + * + * @return string + */ + public static function filenameToType($filename) + { + // In case the path is a URL, strip any query string before getting extension + $qpos = strpos($filename, '?'); + if (false !== $qpos) { + $filename = substr($filename, 0, $qpos); + } + $ext = static::mb_pathinfo($filename, PATHINFO_EXTENSION); + + return static::_mime_types($ext); + } + + /** + * Multi-byte-safe pathinfo replacement. + * Drop-in replacement for pathinfo(), but multibyte- and cross-platform-safe. + * + * @see http://www.php.net/manual/en/function.pathinfo.php#107461 + * + * @param string $path A filename or path, does not need to exist as a file + * @param int|string $options Either a PATHINFO_* constant, + * or a string name to return only the specified piece + * + * @return string|array + */ + public static function mb_pathinfo($path, $options = null) + { + $ret = ['dirname' => '', 'basename' => '', 'extension' => '', 'filename' => '']; + $pathinfo = []; + if (preg_match('#^(.*?)[\\\\/]*(([^/\\\\]*?)(\.([^\.\\\\/]+?)|))[\\\\/\.]*$#im', $path, $pathinfo)) { + if (array_key_exists(1, $pathinfo)) { + $ret['dirname'] = $pathinfo[1]; + } + if (array_key_exists(2, $pathinfo)) { + $ret['basename'] = $pathinfo[2]; + } + if (array_key_exists(5, $pathinfo)) { + $ret['extension'] = $pathinfo[5]; + } + if (array_key_exists(3, $pathinfo)) { + $ret['filename'] = $pathinfo[3]; + } + } + switch ($options) { + case PATHINFO_DIRNAME: + case 'dirname': + return $ret['dirname']; + case PATHINFO_BASENAME: + case 'basename': + return $ret['basename']; + case PATHINFO_EXTENSION: + case 'extension': + return $ret['extension']; + case PATHINFO_FILENAME: + case 'filename': + return $ret['filename']; + default: + return $ret; + } + } + + /** + * Set or reset instance properties. + * You should avoid this function - it's more verbose, less efficient, more error-prone and + * harder to debug than setting properties directly. + * Usage Example: + * `$mail->set('SMTPSecure', 'tls');` + * is the same as: + * `$mail->SMTPSecure = 'tls';`. + * + * @param string $name The property name to set + * @param mixed $value The value to set the property to + * + * @return bool + */ + public function set($name, $value = '') + { + if (property_exists($this, $name)) { + $this->$name = $value; + + return true; + } + $this->setError($this->lang('variable_set') . $name); + + return false; + } + + /** + * Strip newlines to prevent header injection. + * + * @param string $str + * + * @return string + */ + public function secureHeader($str) + { + return trim(str_replace(["\r", "\n"], '', $str)); + } + + /** + * Normalize line breaks in a string. + * Converts UNIX LF, Mac CR and Windows CRLF line breaks into a single line break format. + * Defaults to CRLF (for message bodies) and preserves consecutive breaks. + * + * @param string $text + * @param string $breaktype What kind of line break to use; defaults to static::$LE + * + * @return string + */ + public static function normalizeBreaks($text, $breaktype = null) + { + if (null === $breaktype) { + $breaktype = static::$LE; + } + // Normalise to \n + $text = str_replace(["\r\n", "\r"], "\n", $text); + // Now convert LE as needed + if ("\n" !== $breaktype) { + $text = str_replace("\n", $breaktype, $text); + } + + return $text; + } + + /** + * Return the current line break format string. + * + * @return string + */ + public static function getLE() + { + return static::$LE; + } + + /** + * Set the line break format string, e.g. "\r\n". + * + * @param string $le + */ + protected static function setLE($le) + { + static::$LE = $le; + } + + /** + * Set the public and private key files and password for S/MIME signing. + * + * @param string $cert_filename + * @param string $key_filename + * @param string $key_pass Password for private key + * @param string $extracerts_filename Optional path to chain certificate + */ + public function sign($cert_filename, $key_filename, $key_pass, $extracerts_filename = '') + { + $this->sign_cert_file = $cert_filename; + $this->sign_key_file = $key_filename; + $this->sign_key_pass = $key_pass; + $this->sign_extracerts_file = $extracerts_filename; + } + + /** + * Quoted-Printable-encode a DKIM header. + * + * @param string $txt + * + * @return string + */ + public function DKIM_QP($txt) + { + $line = ''; + $len = strlen($txt); + for ($i = 0; $i < $len; ++$i) { + $ord = ord($txt[$i]); + if (((0x21 <= $ord) and ($ord <= 0x3A)) or $ord == 0x3C or ((0x3E <= $ord) and ($ord <= 0x7E))) { + $line .= $txt[$i]; + } else { + $line .= '=' . sprintf('%02X', $ord); + } + } + + return $line; + } + + /** + * Generate a DKIM signature. + * + * @param string $signHeader + * + * @throws Exception + * + * @return string The DKIM signature value + */ + public function DKIM_Sign($signHeader) + { + if (!defined('PKCS7_TEXT')) { + if ($this->exceptions) { + throw new Exception($this->lang('extension_missing') . 'openssl'); + } + + return ''; + } + $privKeyStr = !empty($this->DKIM_private_string) ? + $this->DKIM_private_string : + file_get_contents($this->DKIM_private); + if ('' != $this->DKIM_passphrase) { + $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); + } else { + $privKey = openssl_pkey_get_private($privKeyStr); + } + if (openssl_sign($signHeader, $signature, $privKey, 'sha256WithRSAEncryption')) { + openssl_pkey_free($privKey); + + return base64_encode($signature); + } + openssl_pkey_free($privKey); + + return ''; + } + + /** + * Generate a DKIM canonicalization header. + * Uses the 'relaxed' algorithm from RFC6376 section 3.4.2. + * Canonicalized headers should *always* use CRLF, regardless of mailer setting. + * + * @see https://tools.ietf.org/html/rfc6376#section-3.4.2 + * + * @param string $signHeader Header + * + * @return string + */ + public function DKIM_HeaderC($signHeader) + { + //Unfold all header continuation lines + //Also collapses folded whitespace. + //Note PCRE \s is too broad a definition of whitespace; RFC5322 defines it as `[ \t]` + //@see https://tools.ietf.org/html/rfc5322#section-2.2 + //That means this may break if you do something daft like put vertical tabs in your headers. + $signHeader = preg_replace('/\r\n[ \t]+/', ' ', $signHeader); + $lines = explode("\r\n", $signHeader); + foreach ($lines as $key => $line) { + //If the header is missing a :, skip it as it's invalid + //This is likely to happen because the explode() above will also split + //on the trailing LE, leaving an empty line + if (strpos($line, ':') === false) { + continue; + } + list($heading, $value) = explode(':', $line, 2); + //Lower-case header name + $heading = strtolower($heading); + //Collapse white space within the value + $value = preg_replace('/[ \t]{2,}/', ' ', $value); + //RFC6376 is slightly unclear here - it says to delete space at the *end* of each value + //But then says to delete space before and after the colon. + //Net result is the same as trimming both ends of the value. + //by elimination, the same applies to the field name + $lines[$key] = trim($heading, " \t") . ':' . trim($value, " \t"); + } + + return implode("\r\n", $lines); + } + + /** + * Generate a DKIM canonicalization body. + * Uses the 'simple' algorithm from RFC6376 section 3.4.3. + * Canonicalized bodies should *always* use CRLF, regardless of mailer setting. + * + * @see https://tools.ietf.org/html/rfc6376#section-3.4.3 + * + * @param string $body Message Body + * + * @return string + */ + public function DKIM_BodyC($body) + { + if (empty($body)) { + return "\r\n"; + } + // Normalize line endings to CRLF + $body = static::normalizeBreaks($body, "\r\n"); + + //Reduce multiple trailing line breaks to a single one + return rtrim($body, "\r\n") . "\r\n"; + } + + /** + * Create the DKIM header and body in a new message header. + * + * @param string $headers_line Header lines + * @param string $subject Subject + * @param string $body Body + * + * @return string + */ + public function DKIM_Add($headers_line, $subject, $body) + { + $DKIMsignatureType = 'rsa-sha256'; // Signature & hash algorithms + $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body + $DKIMquery = 'dns/txt'; // Query method + $DKIMtime = time(); // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) + $subject_header = "Subject: $subject"; + $headers = explode(static::$LE, $headers_line); + $from_header = ''; + $to_header = ''; + $date_header = ''; + $current = ''; + $copiedHeaderFields = ''; + $foundExtraHeaders = []; + $extraHeaderKeys = ''; + $extraHeaderValues = ''; + $extraCopyHeaderFields = ''; + foreach ($headers as $header) { + if (strpos($header, 'From:') === 0) { + $from_header = $header; + $current = 'from_header'; + } elseif (strpos($header, 'To:') === 0) { + $to_header = $header; + $current = 'to_header'; + } elseif (strpos($header, 'Date:') === 0) { + $date_header = $header; + $current = 'date_header'; + } elseif (!empty($this->DKIM_extraHeaders)) { + foreach ($this->DKIM_extraHeaders as $extraHeader) { + if (strpos($header, $extraHeader . ':') === 0) { + $headerValue = $header; + foreach ($this->CustomHeader as $customHeader) { + if ($customHeader[0] === $extraHeader) { + $headerValue = trim($customHeader[0]) . + ': ' . + $this->encodeHeader(trim($customHeader[1])); + break; + } + } + $foundExtraHeaders[$extraHeader] = $headerValue; + $current = ''; + break; + } + } + } else { + if (!empty($$current) and strpos($header, ' =?') === 0) { + $$current .= $header; + } else { + $current = ''; + } + } + } + foreach ($foundExtraHeaders as $key => $value) { + $extraHeaderKeys .= ':' . $key; + $extraHeaderValues .= $value . "\r\n"; + if ($this->DKIM_copyHeaderFields) { + $extraCopyHeaderFields .= "\t|" . str_replace('|', '=7C', $this->DKIM_QP($value)) . ";\r\n"; + } + } + if ($this->DKIM_copyHeaderFields) { + $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); + $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); + $date = str_replace('|', '=7C', $this->DKIM_QP($date_header)); + $subject = str_replace('|', '=7C', $this->DKIM_QP($subject_header)); + $copiedHeaderFields = "\tz=$from\r\n" . + "\t|$to\r\n" . + "\t|$date\r\n" . + "\t|$subject;\r\n" . + $extraCopyHeaderFields; + } + $body = $this->DKIM_BodyC($body); + $DKIMlen = strlen($body); // Length of body + $DKIMb64 = base64_encode(pack('H*', hash('sha256', $body))); // Base64 of packed binary SHA-256 hash of body + if ('' == $this->DKIM_identity) { + $ident = ''; + } else { + $ident = ' i=' . $this->DKIM_identity . ';'; + } + $dkimhdrs = 'DKIM-Signature: v=1; a=' . + $DKIMsignatureType . '; q=' . + $DKIMquery . '; l=' . + $DKIMlen . '; s=' . + $this->DKIM_selector . + ";\r\n" . + "\tt=" . $DKIMtime . '; c=' . $DKIMcanonicalization . ";\r\n" . + "\th=From:To:Date:Subject" . $extraHeaderKeys . ";\r\n" . + "\td=" . $this->DKIM_domain . ';' . $ident . "\r\n" . + $copiedHeaderFields . + "\tbh=" . $DKIMb64 . ";\r\n" . + "\tb="; + $toSign = $this->DKIM_HeaderC( + $from_header . "\r\n" . + $to_header . "\r\n" . + $date_header . "\r\n" . + $subject_header . "\r\n" . + $extraHeaderValues . + $dkimhdrs + ); + $signed = $this->DKIM_Sign($toSign); + + return static::normalizeBreaks($dkimhdrs . $signed) . static::$LE; + } + + /** + * Detect if a string contains a line longer than the maximum line length + * allowed by RFC 2822 section 2.1.1. + * + * @param string $str + * + * @return bool + */ + public static function hasLineLongerThanMax($str) + { + return (bool) preg_match('/^(.{' . (self::MAX_LINE_LENGTH + strlen(static::$LE)) . ',})/m', $str); + } + + /** + * Allows for public read access to 'to' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getToAddresses() + { + return $this->to; + } + + /** + * Allows for public read access to 'cc' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getCcAddresses() + { + return $this->cc; + } + + /** + * Allows for public read access to 'bcc' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getBccAddresses() + { + return $this->bcc; + } + + /** + * Allows for public read access to 'ReplyTo' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getReplyToAddresses() + { + return $this->ReplyTo; + } + + /** + * Allows for public read access to 'all_recipients' property. + * Before the send() call, queued addresses (i.e. with IDN) are not yet included. + * + * @return array + */ + public function getAllRecipientAddresses() + { + return $this->all_recipients; + } + + /** + * Perform a callback. + * + * @param bool $isSent + * @param array $to + * @param array $cc + * @param array $bcc + * @param string $subject + * @param string $body + * @param string $from + * @param array $extra + */ + protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body, $from, $extra) + { + if (!empty($this->action_function) and is_callable($this->action_function)) { + call_user_func($this->action_function, $isSent, $to, $cc, $bcc, $subject, $body, $from, $extra); + } + } + + /** + * Get the OAuth instance. + * + * @return OAuth + */ + public function getOAuth() + { + return $this->oauth; + } + + /** + * Set an OAuth instance. + * + * @param OAuth $oauth + */ + public function setOAuth(OAuth $oauth) + { + $this->oauth = $oauth; + } +} diff --git a/vendor/phpmailer/phpmailer/src/POP3.php b/vendor/phpmailer/phpmailer/src/POP3.php new file mode 100755 index 0000000..66cf273 --- /dev/null +++ b/vendor/phpmailer/phpmailer/src/POP3.php @@ -0,0 +1,419 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer POP-Before-SMTP Authentication Class. + * Specifically for PHPMailer to use for RFC1939 POP-before-SMTP authentication. + * 1) This class does not support APOP authentication. + * 2) Opening and closing lots of POP3 connections can be quite slow. If you need + * to send a batch of emails then just perform the authentication once at the start, + * and then loop through your mail sending script. Providing this process doesn't + * take longer than the verification period lasts on your POP3 server, you should be fine. + * 3) This is really ancient technology; you should only need to use it to talk to very old systems. + * 4) This POP3 class is deliberately lightweight and incomplete, and implements just + * enough to do authentication. + * If you want a more complete class there are other POP3 classes for PHP available. + * + * @author Richard Davey (original author) + * @author Marcus Bointon (Synchro/coolbru) + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + */ +class POP3 +{ + /** + * The POP3 PHPMailer Version number. + * + * @var string + */ + const VERSION = '6.0.7'; + + /** + * Default POP3 port number. + * + * @var int + */ + const DEFAULT_PORT = 110; + + /** + * Default timeout in seconds. + * + * @var int + */ + const DEFAULT_TIMEOUT = 30; + + /** + * Debug display level. + * Options: 0 = no, 1+ = yes. + * + * @var int + */ + public $do_debug = 0; + + /** + * POP3 mail server hostname. + * + * @var string + */ + public $host; + + /** + * POP3 port number. + * + * @var int + */ + public $port; + + /** + * POP3 Timeout Value in seconds. + * + * @var int + */ + public $tval; + + /** + * POP3 username. + * + * @var string + */ + public $username; + + /** + * POP3 password. + * + * @var string + */ + public $password; + + /** + * Resource handle for the POP3 connection socket. + * + * @var resource + */ + protected $pop_conn; + + /** + * Are we connected? + * + * @var bool + */ + protected $connected = false; + + /** + * Error container. + * + * @var array + */ + protected $errors = []; + + /** + * Line break constant. + */ + const LE = "\r\n"; + + /** + * Simple static wrapper for all-in-one POP before SMTP. + * + * @param string $host The hostname to connect to + * @param int|bool $port The port number to connect to + * @param int|bool $timeout The timeout value + * @param string $username + * @param string $password + * @param int $debug_level + * + * @return bool + */ + public static function popBeforeSmtp( + $host, + $port = false, + $timeout = false, + $username = '', + $password = '', + $debug_level = 0 + ) { + $pop = new self(); + + return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level); + } + + /** + * Authenticate with a POP3 server. + * A connect, login, disconnect sequence + * appropriate for POP-before SMTP authorisation. + * + * @param string $host The hostname to connect to + * @param int|bool $port The port number to connect to + * @param int|bool $timeout The timeout value + * @param string $username + * @param string $password + * @param int $debug_level + * + * @return bool + */ + public function authorise($host, $port = false, $timeout = false, $username = '', $password = '', $debug_level = 0) + { + $this->host = $host; + // If no port value provided, use default + if (false === $port) { + $this->port = static::DEFAULT_PORT; + } else { + $this->port = (int) $port; + } + // If no timeout value provided, use default + if (false === $timeout) { + $this->tval = static::DEFAULT_TIMEOUT; + } else { + $this->tval = (int) $timeout; + } + $this->do_debug = $debug_level; + $this->username = $username; + $this->password = $password; + // Reset the error log + $this->errors = []; + // connect + $result = $this->connect($this->host, $this->port, $this->tval); + if ($result) { + $login_result = $this->login($this->username, $this->password); + if ($login_result) { + $this->disconnect(); + + return true; + } + } + // We need to disconnect regardless of whether the login succeeded + $this->disconnect(); + + return false; + } + + /** + * Connect to a POP3 server. + * + * @param string $host + * @param int|bool $port + * @param int $tval + * + * @return bool + */ + public function connect($host, $port = false, $tval = 30) + { + // Are we already connected? + if ($this->connected) { + return true; + } + + //On Windows this will raise a PHP Warning error if the hostname doesn't exist. + //Rather than suppress it with @fsockopen, capture it cleanly instead + set_error_handler([$this, 'catchWarning']); + + if (false === $port) { + $port = static::DEFAULT_PORT; + } + + // connect to the POP3 server + $this->pop_conn = fsockopen( + $host, // POP3 Host + $port, // Port # + $errno, // Error Number + $errstr, // Error Message + $tval + ); // Timeout (seconds) + // Restore the error handler + restore_error_handler(); + + // Did we connect? + if (false === $this->pop_conn) { + // It would appear not... + $this->setError( + "Failed to connect to server $host on port $port. errno: $errno; errstr: $errstr" + ); + + return false; + } + + // Increase the stream time-out + stream_set_timeout($this->pop_conn, $tval, 0); + + // Get the POP3 server response + $pop3_response = $this->getResponse(); + // Check for the +OK + if ($this->checkResponse($pop3_response)) { + // The connection is established and the POP3 server is talking + $this->connected = true; + + return true; + } + + return false; + } + + /** + * Log in to the POP3 server. + * Does not support APOP (RFC 2828, 4949). + * + * @param string $username + * @param string $password + * + * @return bool + */ + public function login($username = '', $password = '') + { + if (!$this->connected) { + $this->setError('Not connected to POP3 server'); + } + if (empty($username)) { + $username = $this->username; + } + if (empty($password)) { + $password = $this->password; + } + + // Send the Username + $this->sendString("USER $username" . static::LE); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + // Send the Password + $this->sendString("PASS $password" . static::LE); + $pop3_response = $this->getResponse(); + if ($this->checkResponse($pop3_response)) { + return true; + } + } + + return false; + } + + /** + * Disconnect from the POP3 server. + */ + public function disconnect() + { + $this->sendString('QUIT'); + //The QUIT command may cause the daemon to exit, which will kill our connection + //So ignore errors here + try { + @fclose($this->pop_conn); + } catch (Exception $e) { + //Do nothing + } + } + + /** + * Get a response from the POP3 server. + * + * @param int $size The maximum number of bytes to retrieve + * + * @return string + */ + protected function getResponse($size = 128) + { + $response = fgets($this->pop_conn, $size); + if ($this->do_debug >= 1) { + echo 'Server -> Client: ', $response; + } + + return $response; + } + + /** + * Send raw data to the POP3 server. + * + * @param string $string + * + * @return int + */ + protected function sendString($string) + { + if ($this->pop_conn) { + if ($this->do_debug >= 2) { //Show client messages when debug >= 2 + echo 'Client -> Server: ', $string; + } + + return fwrite($this->pop_conn, $string, strlen($string)); + } + + return 0; + } + + /** + * Checks the POP3 server response. + * Looks for for +OK or -ERR. + * + * @param string $string + * + * @return bool + */ + protected function checkResponse($string) + { + if (substr($string, 0, 3) !== '+OK') { + $this->setError("Server reported an error: $string"); + + return false; + } + + return true; + } + + /** + * Add an error to the internal error store. + * Also display debug output if it's enabled. + * + * @param string $error + */ + protected function setError($error) + { + $this->errors[] = $error; + if ($this->do_debug >= 1) { + echo '
                            ';
                            +            foreach ($this->errors as $e) {
                            +                print_r($e);
                            +            }
                            +            echo '
                            '; + } + } + + /** + * Get an array of error messages, if any. + * + * @return array + */ + public function getErrors() + { + return $this->errors; + } + + /** + * POP3 connection error handler. + * + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param int $errline + */ + protected function catchWarning($errno, $errstr, $errfile, $errline) + { + $this->setError( + 'Connecting to the POP3 server raised a PHP warning:' . + "errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline" + ); + } +} diff --git a/vendor/phpmailer/phpmailer/src/SMTP.php b/vendor/phpmailer/phpmailer/src/SMTP.php new file mode 100755 index 0000000..da85442 --- /dev/null +++ b/vendor/phpmailer/phpmailer/src/SMTP.php @@ -0,0 +1,1326 @@ + + * @author Jim Jagielski (jimjag) + * @author Andy Prevost (codeworxtech) + * @author Brent R. Matzelle (original founder) + * @copyright 2012 - 2017 Marcus Bointon + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + * @note This program is distributed in the hope that it will be useful - WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. + */ + +namespace PHPMailer\PHPMailer; + +/** + * PHPMailer RFC821 SMTP email transport class. + * Implements RFC 821 SMTP commands and provides some utility methods for sending mail to an SMTP server. + * + * @author Chris Ryan + * @author Marcus Bointon + */ +class SMTP +{ + /** + * The PHPMailer SMTP version number. + * + * @var string + */ + const VERSION = '6.0.7'; + + /** + * SMTP line break constant. + * + * @var string + */ + const LE = "\r\n"; + + /** + * The SMTP port to use if one is not specified. + * + * @var int + */ + const DEFAULT_PORT = 25; + + /** + * The maximum line length allowed by RFC 2822 section 2.1.1. + * + * @var int + */ + const MAX_LINE_LENGTH = 998; + + /** + * Debug level for no output. + */ + const DEBUG_OFF = 0; + + /** + * Debug level to show client -> server messages. + */ + const DEBUG_CLIENT = 1; + + /** + * Debug level to show client -> server and server -> client messages. + */ + const DEBUG_SERVER = 2; + + /** + * Debug level to show connection status, client -> server and server -> client messages. + */ + const DEBUG_CONNECTION = 3; + + /** + * Debug level to show all messages. + */ + const DEBUG_LOWLEVEL = 4; + + /** + * Debug output level. + * Options: + * * self::DEBUG_OFF (`0`) No debug output, default + * * self::DEBUG_CLIENT (`1`) Client commands + * * self::DEBUG_SERVER (`2`) Client commands and server responses + * * self::DEBUG_CONNECTION (`3`) As DEBUG_SERVER plus connection status + * * self::DEBUG_LOWLEVEL (`4`) Low-level data output, all messages. + * + * @var int + */ + public $do_debug = self::DEBUG_OFF; + + /** + * How to handle debug output. + * Options: + * * `echo` Output plain-text as-is, appropriate for CLI + * * `html` Output escaped, line breaks converted to `
                            `, appropriate for browser output + * * `error_log` Output to error log as configured in php.ini + * Alternatively, you can provide a callable expecting two params: a message string and the debug level: + * + * ```php + * $smtp->Debugoutput = function($str, $level) {echo "debug level $level; message: $str";}; + * ``` + * + * Alternatively, you can pass in an instance of a PSR-3 compatible logger, though only `debug` + * level output is used: + * + * ```php + * $mail->Debugoutput = new myPsr3Logger; + * ``` + * + * @var string|callable|\Psr\Log\LoggerInterface + */ + public $Debugoutput = 'echo'; + + /** + * Whether to use VERP. + * + * @see http://en.wikipedia.org/wiki/Variable_envelope_return_path + * @see http://www.postfix.org/VERP_README.html Info on VERP + * + * @var bool + */ + public $do_verp = false; + + /** + * The timeout value for connection, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * This needs to be quite high to function correctly with hosts using greetdelay as an anti-spam measure. + * + * @see http://tools.ietf.org/html/rfc2821#section-4.5.3.2 + * + * @var int + */ + public $Timeout = 300; + + /** + * How long to wait for commands to complete, in seconds. + * Default of 5 minutes (300sec) is from RFC2821 section 4.5.3.2. + * + * @var int + */ + public $Timelimit = 300; + + /** + * Patterns to extract an SMTP transaction id from reply to a DATA command. + * The first capture group in each regex will be used as the ID. + * MS ESMTP returns the message ID, which may not be correct for internal tracking. + * + * @var string[] + */ + protected $smtp_transaction_id_patterns = [ + 'exim' => '/[\d]{3} OK id=(.*)/', + 'sendmail' => '/[\d]{3} 2.0.0 (.*) Message/', + 'postfix' => '/[\d]{3} 2.0.0 Ok: queued as (.*)/', + 'Microsoft_ESMTP' => '/[0-9]{3} 2.[\d].0 (.*)@(?:.*) Queued mail for delivery/', + 'Amazon_SES' => '/[\d]{3} Ok (.*)/', + 'SendGrid' => '/[\d]{3} Ok: queued as (.*)/', + 'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/', + ]; + + /** + * The last transaction ID issued in response to a DATA command, + * if one was detected. + * + * @var string|bool|null + */ + protected $last_smtp_transaction_id; + + /** + * The socket for the server connection. + * + * @var ?resource + */ + protected $smtp_conn; + + /** + * Error information, if any, for the last SMTP command. + * + * @var array + */ + protected $error = [ + 'error' => '', + 'detail' => '', + 'smtp_code' => '', + 'smtp_code_ex' => '', + ]; + + /** + * The reply the server sent to us for HELO. + * If null, no HELO string has yet been received. + * + * @var string|null + */ + protected $helo_rply = null; + + /** + * The set of SMTP extensions sent in reply to EHLO command. + * Indexes of the array are extension names. + * Value at index 'HELO' or 'EHLO' (according to command that was sent) + * represents the server name. In case of HELO it is the only element of the array. + * Other values can be boolean TRUE or an array containing extension options. + * If null, no HELO/EHLO string has yet been received. + * + * @var array|null + */ + protected $server_caps = null; + + /** + * The most recent reply received from the server. + * + * @var string + */ + protected $last_reply = ''; + + /** + * Output debugging info via a user-selected method. + * + * @param string $str Debug string to output + * @param int $level The debug level of this message; see DEBUG_* constants + * + * @see SMTP::$Debugoutput + * @see SMTP::$do_debug + */ + protected function edebug($str, $level = 0) + { + if ($level > $this->do_debug) { + return; + } + //Is this a PSR-3 logger? + if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) { + $this->Debugoutput->debug($str); + + return; + } + //Avoid clash with built-in function names + if (!in_array($this->Debugoutput, ['error_log', 'html', 'echo']) and is_callable($this->Debugoutput)) { + call_user_func($this->Debugoutput, $str, $level); + + return; + } + switch ($this->Debugoutput) { + case 'error_log': + //Don't output, just log + error_log($str); + break; + case 'html': + //Cleans up output a bit for a better looking, HTML-safe output + echo gmdate('Y-m-d H:i:s'), ' ', htmlentities( + preg_replace('/[\r\n]+/', '', $str), + ENT_QUOTES, + 'UTF-8' + ), "
                            \n"; + break; + case 'echo': + default: + //Normalize line breaks + $str = preg_replace('/\r\n|\r/ms', "\n", $str); + echo gmdate('Y-m-d H:i:s'), + "\t", + //Trim trailing space + trim( + //Indent for readability, except for trailing break + str_replace( + "\n", + "\n \t ", + trim($str) + ) + ), + "\n"; + } + } + + /** + * Connect to an SMTP server. + * + * @param string $host SMTP server IP or host name + * @param int $port The port number to connect to + * @param int $timeout How long to wait for the connection to open + * @param array $options An array of options for stream_context_create() + * + * @return bool + */ + public function connect($host, $port = null, $timeout = 30, $options = []) + { + static $streamok; + //This is enabled by default since 5.0.0 but some providers disable it + //Check this once and cache the result + if (null === $streamok) { + $streamok = function_exists('stream_socket_client'); + } + // Clear errors to avoid confusion + $this->setError(''); + // Make sure we are __not__ connected + if ($this->connected()) { + // Already connected, generate error + $this->setError('Already connected to a server'); + + return false; + } + if (empty($port)) { + $port = self::DEFAULT_PORT; + } + // Connect to the SMTP server + $this->edebug( + "Connection: opening to $host:$port, timeout=$timeout, options=" . + (count($options) > 0 ? var_export($options, true) : 'array()'), + self::DEBUG_CONNECTION + ); + $errno = 0; + $errstr = ''; + if ($streamok) { + $socket_context = stream_context_create($options); + set_error_handler([$this, 'errorHandler']); + $this->smtp_conn = stream_socket_client( + $host . ':' . $port, + $errno, + $errstr, + $timeout, + STREAM_CLIENT_CONNECT, + $socket_context + ); + restore_error_handler(); + } else { + //Fall back to fsockopen which should work in more places, but is missing some features + $this->edebug( + 'Connection: stream_socket_client not available, falling back to fsockopen', + self::DEBUG_CONNECTION + ); + set_error_handler([$this, 'errorHandler']); + $this->smtp_conn = fsockopen( + $host, + $port, + $errno, + $errstr, + $timeout + ); + restore_error_handler(); + } + // Verify we connected properly + if (!is_resource($this->smtp_conn)) { + $this->setError( + 'Failed to connect to server', + '', + (string) $errno, + (string) $errstr + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] + . ": $errstr ($errno)", + self::DEBUG_CLIENT + ); + + return false; + } + $this->edebug('Connection: opened', self::DEBUG_CONNECTION); + // SMTP server can take longer to respond, give longer timeout for first read + // Windows does not have support for this timeout function + if (substr(PHP_OS, 0, 3) != 'WIN') { + $max = ini_get('max_execution_time'); + // Don't bother if unlimited + if (0 != $max and $timeout > $max) { + @set_time_limit($timeout); + } + stream_set_timeout($this->smtp_conn, $timeout, 0); + } + // Get any announcement + $announce = $this->get_lines(); + $this->edebug('SERVER -> CLIENT: ' . $announce, self::DEBUG_SERVER); + + return true; + } + + /** + * Initiate a TLS (encrypted) session. + * + * @return bool + */ + public function startTLS() + { + if (!$this->sendCommand('STARTTLS', 'STARTTLS', 220)) { + return false; + } + + //Allow the best TLS version(s) we can + $crypto_method = STREAM_CRYPTO_METHOD_TLS_CLIENT; + + //PHP 5.6.7 dropped inclusion of TLS 1.1 and 1.2 in STREAM_CRYPTO_METHOD_TLS_CLIENT + //so add them back in manually if we can + if (defined('STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT')) { + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT; + $crypto_method |= STREAM_CRYPTO_METHOD_TLSv1_1_CLIENT; + } + + // Begin encrypted connection + set_error_handler([$this, 'errorHandler']); + $crypto_ok = stream_socket_enable_crypto( + $this->smtp_conn, + true, + $crypto_method + ); + restore_error_handler(); + + return (bool) $crypto_ok; + } + + /** + * Perform SMTP authentication. + * Must be run after hello(). + * + * @see hello() + * + * @param string $username The user name + * @param string $password The password + * @param string $authtype The auth type (CRAM-MD5, PLAIN, LOGIN, XOAUTH2) + * @param OAuth $OAuth An optional OAuth instance for XOAUTH2 authentication + * + * @return bool True if successfully authenticated + */ + public function authenticate( + $username, + $password, + $authtype = null, + $OAuth = null + ) { + if (!$this->server_caps) { + $this->setError('Authentication is not allowed before HELO/EHLO'); + + return false; + } + + if (array_key_exists('EHLO', $this->server_caps)) { + // SMTP extensions are available; try to find a proper authentication method + if (!array_key_exists('AUTH', $this->server_caps)) { + $this->setError('Authentication is not allowed at this stage'); + // 'at this stage' means that auth may be allowed after the stage changes + // e.g. after STARTTLS + + return false; + } + + $this->edebug('Auth method requested: ' . ($authtype ? $authtype : 'UNSPECIFIED'), self::DEBUG_LOWLEVEL); + $this->edebug( + 'Auth methods available on the server: ' . implode(',', $this->server_caps['AUTH']), + self::DEBUG_LOWLEVEL + ); + + //If we have requested a specific auth type, check the server supports it before trying others + if (null !== $authtype and !in_array($authtype, $this->server_caps['AUTH'])) { + $this->edebug('Requested auth method not available: ' . $authtype, self::DEBUG_LOWLEVEL); + $authtype = null; + } + + if (empty($authtype)) { + //If no auth mechanism is specified, attempt to use these, in this order + //Try CRAM-MD5 first as it's more secure than the others + foreach (['CRAM-MD5', 'LOGIN', 'PLAIN', 'XOAUTH2'] as $method) { + if (in_array($method, $this->server_caps['AUTH'])) { + $authtype = $method; + break; + } + } + if (empty($authtype)) { + $this->setError('No supported authentication methods found'); + + return false; + } + self::edebug('Auth method selected: ' . $authtype, self::DEBUG_LOWLEVEL); + } + + if (!in_array($authtype, $this->server_caps['AUTH'])) { + $this->setError("The requested authentication method \"$authtype\" is not supported by the server"); + + return false; + } + } elseif (empty($authtype)) { + $authtype = 'LOGIN'; + } + switch ($authtype) { + case 'PLAIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH PLAIN', 334)) { + return false; + } + // Send encoded username and password + if (!$this->sendCommand( + 'User & Password', + base64_encode("\0" . $username . "\0" . $password), + 235 + ) + ) { + return false; + } + break; + case 'LOGIN': + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH LOGIN', 334)) { + return false; + } + if (!$this->sendCommand('Username', base64_encode($username), 334)) { + return false; + } + if (!$this->sendCommand('Password', base64_encode($password), 235)) { + return false; + } + break; + case 'CRAM-MD5': + // Start authentication + if (!$this->sendCommand('AUTH CRAM-MD5', 'AUTH CRAM-MD5', 334)) { + return false; + } + // Get the challenge + $challenge = base64_decode(substr($this->last_reply, 4)); + + // Build the response + $response = $username . ' ' . $this->hmac($challenge, $password); + + // send encoded credentials + return $this->sendCommand('Username', base64_encode($response), 235); + case 'XOAUTH2': + //The OAuth instance must be set up prior to requesting auth. + if (null === $OAuth) { + return false; + } + $oauth = $OAuth->getOauth64(); + + // Start authentication + if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) { + return false; + } + break; + default: + $this->setError("Authentication method \"$authtype\" is not supported"); + + return false; + } + + return true; + } + + /** + * Calculate an MD5 HMAC hash. + * Works like hash_hmac('md5', $data, $key) + * in case that function is not available. + * + * @param string $data The data to hash + * @param string $key The key to hash with + * + * @return string + */ + protected function hmac($data, $key) + { + if (function_exists('hash_hmac')) { + return hash_hmac('md5', $data, $key); + } + + // The following borrowed from + // http://php.net/manual/en/function.mhash.php#27225 + + // RFC 2104 HMAC implementation for php. + // Creates an md5 HMAC. + // Eliminates the need to install mhash to compute a HMAC + // by Lance Rushing + + $bytelen = 64; // byte length for md5 + if (strlen($key) > $bytelen) { + $key = pack('H*', md5($key)); + } + $key = str_pad($key, $bytelen, chr(0x00)); + $ipad = str_pad('', $bytelen, chr(0x36)); + $opad = str_pad('', $bytelen, chr(0x5c)); + $k_ipad = $key ^ $ipad; + $k_opad = $key ^ $opad; + + return md5($k_opad . pack('H*', md5($k_ipad . $data))); + } + + /** + * Check connection state. + * + * @return bool True if connected + */ + public function connected() + { + if (is_resource($this->smtp_conn)) { + $sock_status = stream_get_meta_data($this->smtp_conn); + if ($sock_status['eof']) { + // The socket is valid but we are not connected + $this->edebug( + 'SMTP NOTICE: EOF caught while checking if connected', + self::DEBUG_CLIENT + ); + $this->close(); + + return false; + } + + return true; // everything looks good + } + + return false; + } + + /** + * Close the socket and clean up the state of the class. + * Don't use this function without first trying to use QUIT. + * + * @see quit() + */ + public function close() + { + $this->setError(''); + $this->server_caps = null; + $this->helo_rply = null; + if (is_resource($this->smtp_conn)) { + // close the connection and cleanup + fclose($this->smtp_conn); + $this->smtp_conn = null; //Makes for cleaner serialization + $this->edebug('Connection: closed', self::DEBUG_CONNECTION); + } + } + + /** + * Send an SMTP DATA command. + * Issues a data command and sends the msg_data to the server, + * finializing the mail transaction. $msg_data is the message + * that is to be send with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being separated by an additional . + * Implements RFC 821: DATA . + * + * @param string $msg_data Message data to send + * + * @return bool + */ + public function data($msg_data) + { + //This will use the standard timelimit + if (!$this->sendCommand('DATA', 'DATA', 354)) { + return false; + } + + /* The server is ready to accept data! + * According to rfc821 we should not send more than 1000 characters on a single line (including the LE) + * so we will break the data up into lines by \r and/or \n then if needed we will break each of those into + * smaller lines to fit within the limit. + * We will also look for lines that start with a '.' and prepend an additional '.'. + * NOTE: this does not count towards line-length limit. + */ + + // Normalize line breaks before exploding + $lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data)); + + /* To distinguish between a complete RFC822 message and a plain message body, we check if the first field + * of the first line (':' separated) does not contain a space then it _should_ be a header and we will + * process all lines before a blank line as headers. + */ + + $field = substr($lines[0], 0, strpos($lines[0], ':')); + $in_headers = false; + if (!empty($field) and strpos($field, ' ') === false) { + $in_headers = true; + } + + foreach ($lines as $line) { + $lines_out = []; + if ($in_headers and $line == '') { + $in_headers = false; + } + //Break this line up into several smaller lines if it's too long + //Micro-optimisation: isset($str[$len]) is faster than (strlen($str) > $len), + while (isset($line[self::MAX_LINE_LENGTH])) { + //Working backwards, try to find a space within the last MAX_LINE_LENGTH chars of the line to break on + //so as to avoid breaking in the middle of a word + $pos = strrpos(substr($line, 0, self::MAX_LINE_LENGTH), ' '); + //Deliberately matches both false and 0 + if (!$pos) { + //No nice break found, add a hard break + $pos = self::MAX_LINE_LENGTH - 1; + $lines_out[] = substr($line, 0, $pos); + $line = substr($line, $pos); + } else { + //Break at the found point + $lines_out[] = substr($line, 0, $pos); + //Move along by the amount we dealt with + $line = substr($line, $pos + 1); + } + //If processing headers add a LWSP-char to the front of new line RFC822 section 3.1.1 + if ($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + //Send the lines to the server + foreach ($lines_out as $line_out) { + //RFC2821 section 4.5.2 + if (!empty($line_out) and $line_out[0] == '.') { + $line_out = '.' . $line_out; + } + $this->client_send($line_out . static::LE, 'DATA'); + } + } + + //Message data has been sent, complete the command + //Increase timelimit for end of DATA command + $savetimelimit = $this->Timelimit; + $this->Timelimit = $this->Timelimit * 2; + $result = $this->sendCommand('DATA END', '.', 250); + $this->recordLastTransactionID(); + //Restore timelimit + $this->Timelimit = $savetimelimit; + + return $result; + } + + /** + * Send an SMTP HELO or EHLO command. + * Used to identify the sending server to the receiving server. + * This makes sure that client and server are in a known state. + * Implements RFC 821: HELO + * and RFC 2821 EHLO. + * + * @param string $host The host name or IP to connect to + * + * @return bool + */ + public function hello($host = '') + { + //Try extended hello first (RFC 2821) + return $this->sendHello('EHLO', $host) or $this->sendHello('HELO', $host); + } + + /** + * Send an SMTP HELO or EHLO command. + * Low-level implementation used by hello(). + * + * @param string $hello The HELO string + * @param string $host The hostname to say we are + * + * @return bool + * + * @see hello() + */ + protected function sendHello($hello, $host) + { + $noerror = $this->sendCommand($hello, $hello . ' ' . $host, 250); + $this->helo_rply = $this->last_reply; + if ($noerror) { + $this->parseHelloFields($hello); + } else { + $this->server_caps = null; + } + + return $noerror; + } + + /** + * Parse a reply to HELO/EHLO command to discover server extensions. + * In case of HELO, the only parameter that can be discovered is a server name. + * + * @param string $type `HELO` or `EHLO` + */ + protected function parseHelloFields($type) + { + $this->server_caps = []; + $lines = explode("\n", $this->helo_rply); + + foreach ($lines as $n => $s) { + //First 4 chars contain response code followed by - or space + $s = trim(substr($s, 4)); + if (empty($s)) { + continue; + } + $fields = explode(' ', $s); + if (!empty($fields)) { + if (!$n) { + $name = $type; + $fields = $fields[0]; + } else { + $name = array_shift($fields); + switch ($name) { + case 'SIZE': + $fields = ($fields ? $fields[0] : 0); + break; + case 'AUTH': + if (!is_array($fields)) { + $fields = []; + } + break; + default: + $fields = true; + } + } + $this->server_caps[$name] = $fields; + } + } + } + + /** + * Send an SMTP MAIL command. + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. + * Implements RFC 821: MAIL FROM: . + * + * @param string $from Source address of this message + * + * @return bool + */ + public function mail($from) + { + $useVerp = ($this->do_verp ? ' XVERP' : ''); + + return $this->sendCommand( + 'MAIL FROM', + 'MAIL FROM:<' . $from . '>' . $useVerp, + 250 + ); + } + + /** + * Send an SMTP QUIT command. + * Closes the socket if there is no error or the $close_on_error argument is true. + * Implements from RFC 821: QUIT . + * + * @param bool $close_on_error Should the connection close if an error occurs? + * + * @return bool + */ + public function quit($close_on_error = true) + { + $noerror = $this->sendCommand('QUIT', 'QUIT', 221); + $err = $this->error; //Save any error + if ($noerror or $close_on_error) { + $this->close(); + $this->error = $err; //Restore any error from the quit command + } + + return $noerror; + } + + /** + * Send an SMTP RCPT command. + * Sets the TO argument to $toaddr. + * Returns true if the recipient was accepted false if it was rejected. + * Implements from RFC 821: RCPT TO: . + * + * @param string $address The address the message is being sent to + * + * @return bool + */ + public function recipient($address) + { + return $this->sendCommand( + 'RCPT TO', + 'RCPT TO:<' . $address . '>', + [250, 251] + ); + } + + /** + * Send an SMTP RSET command. + * Abort any transaction that is currently in progress. + * Implements RFC 821: RSET . + * + * @return bool True on success + */ + public function reset() + { + return $this->sendCommand('RSET', 'RSET', 250); + } + + /** + * Send a command to an SMTP server and check its return code. + * + * @param string $command The command name - not sent to the server + * @param string $commandstring The actual command to send + * @param int|array $expect One or more expected integer success codes + * + * @return bool True on success + */ + protected function sendCommand($command, $commandstring, $expect) + { + if (!$this->connected()) { + $this->setError("Called $command without being connected"); + + return false; + } + //Reject line breaks in all commands + if (strpos($commandstring, "\n") !== false or strpos($commandstring, "\r") !== false) { + $this->setError("Command '$command' contained line breaks"); + + return false; + } + $this->client_send($commandstring . static::LE, $command); + + $this->last_reply = $this->get_lines(); + // Fetch SMTP code and possible error code explanation + $matches = []; + if (preg_match('/^([0-9]{3})[ -](?:([0-9]\\.[0-9]\\.[0-9]) )?/', $this->last_reply, $matches)) { + $code = $matches[1]; + $code_ex = (count($matches) > 2 ? $matches[2] : null); + // Cut off error code from each response line + $detail = preg_replace( + "/{$code}[ -]" . + ($code_ex ? str_replace('.', '\\.', $code_ex) . ' ' : '') . '/m', + '', + $this->last_reply + ); + } else { + // Fall back to simple parsing if regex fails + $code = substr($this->last_reply, 0, 3); + $code_ex = null; + $detail = substr($this->last_reply, 4); + } + + $this->edebug('SERVER -> CLIENT: ' . $this->last_reply, self::DEBUG_SERVER); + + if (!in_array($code, (array) $expect)) { + $this->setError( + "$command command failed", + $detail, + $code, + $code_ex + ); + $this->edebug( + 'SMTP ERROR: ' . $this->error['error'] . ': ' . $this->last_reply, + self::DEBUG_CLIENT + ); + + return false; + } + + $this->setError(''); + + return true; + } + + /** + * Send an SMTP SAML command. + * Starts a mail transaction from the email address specified in $from. + * Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more recipient + * commands may be called followed by a data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * Implements RFC 821: SAML FROM: . + * + * @param string $from The address the message is from + * + * @return bool + */ + public function sendAndMail($from) + { + return $this->sendCommand('SAML', "SAML FROM:$from", 250); + } + + /** + * Send an SMTP VRFY command. + * + * @param string $name The name to verify + * + * @return bool + */ + public function verify($name) + { + return $this->sendCommand('VRFY', "VRFY $name", [250, 251]); + } + + /** + * Send an SMTP NOOP command. + * Used to keep keep-alives alive, doesn't actually do anything. + * + * @return bool + */ + public function noop() + { + return $this->sendCommand('NOOP', 'NOOP', 250); + } + + /** + * Send an SMTP TURN command. + * This is an optional command for SMTP that this class does not support. + * This method is here to make the RFC821 Definition complete for this class + * and _may_ be implemented in future. + * Implements from RFC 821: TURN . + * + * @return bool + */ + public function turn() + { + $this->setError('The SMTP TURN command is not implemented'); + $this->edebug('SMTP NOTICE: ' . $this->error['error'], self::DEBUG_CLIENT); + + return false; + } + + /** + * Send raw data to the server. + * + * @param string $data The data to send + * @param string $command Optionally, the command this is part of, used only for controlling debug output + * + * @return int|bool The number of bytes sent to the server or false on error + */ + public function client_send($data, $command = '') + { + //If SMTP transcripts are left enabled, or debug output is posted online + //it can leak credentials, so hide credentials in all but lowest level + if (self::DEBUG_LOWLEVEL > $this->do_debug and + in_array($command, ['User & Password', 'Username', 'Password'], true)) { + $this->edebug('CLIENT -> SERVER: